docs: update Typedoc and regenerate references (#1994)
* generated new services reference * changed from automatic push to automated pull request * updated typedoc, regenerated JS Client reference * regenerated the reference after updating typedoc * added action for js client
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# Class: CustomerGroupService
|
||||
|
||||
Provides layer to manipulate discounts.
|
||||
|
||||
**`Implements`**
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- `"medusa-interfaces"`
|
||||
@@ -24,7 +28,7 @@ BaseService.constructor
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/customer-group.ts:31](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/customer-group.ts#L31)
|
||||
[packages/medusa/src/services/customer-group.ts:31](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/customer-group.ts#L31)
|
||||
|
||||
## Properties
|
||||
|
||||
@@ -34,7 +38,7 @@ BaseService.constructor
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/customer-group.ts:27](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/customer-group.ts#L27)
|
||||
[packages/medusa/src/services/customer-group.ts:27](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/customer-group.ts#L27)
|
||||
|
||||
___
|
||||
|
||||
@@ -44,7 +48,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/customer-group.ts:29](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/customer-group.ts#L29)
|
||||
[packages/medusa/src/services/customer-group.ts:29](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/customer-group.ts#L29)
|
||||
|
||||
___
|
||||
|
||||
@@ -54,7 +58,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/customer-group.ts:25](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/customer-group.ts#L25)
|
||||
[packages/medusa/src/services/customer-group.ts:25](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/customer-group.ts#L25)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -62,20 +66,24 @@ ___
|
||||
|
||||
▸ **addCustomers**(`id`, `customerIds`): `Promise`<`CustomerGroup`\>
|
||||
|
||||
Add a batch of customers to a customer group at once
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `id` | `string` | |
|
||||
| `customerIds` | `string` \| `string`[] | |
|
||||
| `id` | `string` | id of the customer group to add customers to |
|
||||
| `customerIds` | `string` \| `string`[] | customer id's to add to the group |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`CustomerGroup`\>
|
||||
|
||||
the customer group after insertion
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/customer-group.ts:113](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/customer-group.ts#L113)
|
||||
[packages/medusa/src/services/customer-group.ts:113](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/customer-group.ts#L113)
|
||||
|
||||
___
|
||||
|
||||
@@ -83,11 +91,13 @@ ___
|
||||
|
||||
▸ **create**(`group`): `Promise`<`CustomerGroup`\>
|
||||
|
||||
Creates a customer group with the provided data.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `group` | `Object` | |
|
||||
| `group` | `Object` | the customer group to create |
|
||||
| `group.created_at?` | { toString?: {} \| undefined; toDateString?: {} \| undefined; toTimeString?: {} \| undefined; toLocaleString?: {} \| undefined; toLocaleDateString?: {} \| undefined; toLocaleTimeString?: {} \| undefined; ... 37 more ...; [Symbol.toPrimitive]?: {} \| undefined; } | - |
|
||||
| `group.customers?` | (`undefined` \| { email?: string \| undefined; first\_name?: string \| undefined; last\_name?: string \| undefined; billing\_address\_id?: string \| null \| undefined; billing\_address?: { customer\_id?: string \| null \| undefined; ... 16 more ...; updated\_at?: { ...; } \| undefined; } \| undefined; ... 10 more ...; updated\_at?: { ...; } \| undef...)[] | - |
|
||||
| `group.deleted_at?` | ``null`` \| { toString?: {} \| undefined; toDateString?: {} \| undefined; toTimeString?: {} \| undefined; toLocaleString?: {} \| undefined; toLocaleDateString?: {} \| undefined; toLocaleTimeString?: {} \| undefined; ... 37 more ...; [Symbol.toPrimitive]?: {} \| undefined; } | - |
|
||||
@@ -101,9 +111,11 @@ ___
|
||||
|
||||
`Promise`<`CustomerGroup`\>
|
||||
|
||||
the result of the create operation
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/customer-group.ts:86](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/customer-group.ts#L86)
|
||||
[packages/medusa/src/services/customer-group.ts:86](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/customer-group.ts#L86)
|
||||
|
||||
___
|
||||
|
||||
@@ -111,19 +123,23 @@ ___
|
||||
|
||||
▸ **delete**(`groupId`): `Promise`<`void`\>
|
||||
|
||||
Remove customer group
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `groupId` | `string` | |
|
||||
| `groupId` | `string` | id of the customer group to delete |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
a promise
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/customer-group.ts:194](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/customer-group.ts#L194)
|
||||
[packages/medusa/src/services/customer-group.ts:194](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/customer-group.ts#L194)
|
||||
|
||||
___
|
||||
|
||||
@@ -131,20 +147,24 @@ ___
|
||||
|
||||
▸ **list**(`selector?`, `config`): `Promise`<`CustomerGroup`[]\>
|
||||
|
||||
List customer groups.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `selector` | `FilterableCustomerGroupProps` | |
|
||||
| `config` | `FindConfig`<`CustomerGroup`\> | |
|
||||
| `selector` | `FilterableCustomerGroupProps` | the query object for find |
|
||||
| `config` | `FindConfig`<`CustomerGroup`\> | the config to be used for find |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`CustomerGroup`[]\>
|
||||
|
||||
the result of the find operation
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/customer-group.ts:217](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/customer-group.ts#L217)
|
||||
[packages/medusa/src/services/customer-group.ts:217](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/customer-group.ts#L217)
|
||||
|
||||
___
|
||||
|
||||
@@ -152,20 +172,24 @@ ___
|
||||
|
||||
▸ **listAndCount**(`selector?`, `config`): `Promise`<[`CustomerGroup`[], `number`]\>
|
||||
|
||||
Retrieve a list of customer groups and total count of records that match the query.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `selector` | `FilterableCustomerGroupProps` | |
|
||||
| `config` | `FindConfig`<`CustomerGroup`\> | |
|
||||
| `selector` | `FilterableCustomerGroupProps` | the query object for find |
|
||||
| `config` | `FindConfig`<`CustomerGroup`\> | the config to be used for find |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`CustomerGroup`[], `number`]\>
|
||||
|
||||
the result of the find operation
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/customer-group.ts:236](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/customer-group.ts#L236)
|
||||
[packages/medusa/src/services/customer-group.ts:236](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/customer-group.ts#L236)
|
||||
|
||||
___
|
||||
|
||||
@@ -173,20 +197,24 @@ ___
|
||||
|
||||
▸ **removeCustomer**(`id`, `customerIds`): `Promise`<`CustomerGroup`\>
|
||||
|
||||
Remove list of customers from a customergroup
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `id` | `string` | |
|
||||
| `customerIds` | `string` \| `string`[] | |
|
||||
| `id` | `string` | id of the customer group from which the customers are removed |
|
||||
| `customerIds` | `string` \| `string`[] | id's of the customer to remove from group |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`CustomerGroup`\>
|
||||
|
||||
the customergroup with the provided id
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/customer-group.ts:271](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/customer-group.ts#L271)
|
||||
[packages/medusa/src/services/customer-group.ts:271](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/customer-group.ts#L271)
|
||||
|
||||
___
|
||||
|
||||
@@ -207,7 +235,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/customer-group.ts:62](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/customer-group.ts#L62)
|
||||
[packages/medusa/src/services/customer-group.ts:62](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/customer-group.ts#L62)
|
||||
|
||||
___
|
||||
|
||||
@@ -215,20 +243,24 @@ ___
|
||||
|
||||
▸ **update**(`customerGroupId`, `update`): `Promise`<`CustomerGroup`[]\>
|
||||
|
||||
Update a customer group.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `customerGroupId` | `string` | |
|
||||
| `update` | `CustomerGroupUpdate` | |
|
||||
| `customerGroupId` | `string` | id of the customer group |
|
||||
| `update` | `CustomerGroupUpdate` | customer group partial data |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`CustomerGroup`[]\>
|
||||
|
||||
resulting customer group
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/customer-group.ts:162](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/customer-group.ts#L162)
|
||||
[packages/medusa/src/services/customer-group.ts:162](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/customer-group.ts#L162)
|
||||
|
||||
___
|
||||
|
||||
@@ -248,4 +280,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/customer-group.ts:46](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/customer-group.ts#L46)
|
||||
[packages/medusa/src/services/customer-group.ts:46](https://github.com/medusajs/medusa/blob/f406c8d4/packages/medusa/src/services/customer-group.ts#L46)
|
||||
|
||||
Reference in New Issue
Block a user