* docs: migrate ui docs to docs universe * created yarn workspace * added eslint and tsconfig configurations * fix eslint configurations * fixed eslint configurations * shared tailwind configurations * added shared ui package * added more shared components * migrating more components * made details components shared * move InlineCode component * moved InputText * moved Loading component * Moved Modal component * moved Select components * Moved Tooltip component * moved Search components * moved ColorMode provider * Moved Notification components and providers * used icons package * use UI colors in api-reference * moved Navbar component * used Navbar and Search in UI docs * added Feedback to UI docs * general enhancements * fix color mode * added copy colors file from ui-preset * added features and enhancements to UI docs * move Sidebar component and provider * general fixes and preparations for deployment * update docusaurus version * adjusted versions * fix output directory * remove rootDirectory property * fix yarn.lock * moved code component * added vale for all docs MD and MDX * fix tests * fix vale error * fix deployment errors * change ignore commands * add output directory * fix docs test * general fixes * content fixes * fix announcement script * added changeset * fix vale checks * added nofilter option * fix vale error
7.0 KiB
Class: AdminCustomerGroupsResource
Hierarchy
-
default↳
AdminCustomerGroupsResource
Methods
addCustomers
▸ addCustomers(id, payload, customHeaders?): ResponsePromise<AdminCustomerGroupsRes>
Add multiple customers to a customer group.
Parameters
| Name | Type | Description |
|---|---|---|
id |
string |
customer group id |
payload |
AdminPostCustomerGroupsGroupCustomersBatchReq |
an object which contains an array of customer ids which will be added to the group |
customHeaders |
Record<string, any> |
Returns
ResponsePromise<AdminCustomerGroupsRes>
Defined in
medusa-js/src/resources/admin/customer-groups.ts:112
create
▸ create(payload, customHeaders?): ResponsePromise<AdminCustomerGroupsRes>
Create a customer group.
Parameters
| Name | Type | Description |
|---|---|---|
payload |
AdminPostCustomerGroupsReq |
customer group info |
customHeaders |
Record<string, any> |
Returns
ResponsePromise<AdminCustomerGroupsRes>
Defined in
medusa-js/src/resources/admin/customer-groups.ts:26
delete
▸ delete(id, customHeaders?): ResponsePromise<DeleteResponse>
Deletes a customer group.
Parameters
| Name | Type | Description |
|---|---|---|
id |
string |
id of the customer group |
customHeaders |
Record<string, any> |
Returns
ResponsePromise<DeleteResponse>
Defined in
medusa-js/src/resources/admin/customer-groups.ts:77
list
▸ list(query?, customHeaders?): ResponsePromise<AdminCustomerGroupsListRes>
Lists customer groups.
Parameters
| Name | Type | Description |
|---|---|---|
query? |
AdminGetCustomerGroupsParams |
optional |
customHeaders |
Record<string, any> |
Returns
ResponsePromise<AdminCustomerGroupsListRes>
Defined in
medusa-js/src/resources/admin/customer-groups.ts:91
listCustomers
▸ listCustomers(id, query?, customHeaders?): ResponsePromise<AdminCustomersListRes>
List and count customers that belong to provided customer groups.
Parameters
| Name | Type | Description |
|---|---|---|
id |
string |
customer group id |
query? |
AdminGetCustomersParams |
params for filtering customers |
customHeaders |
Record<string, any> |
Returns
ResponsePromise<AdminCustomersListRes>
Defined in
medusa-js/src/resources/admin/customer-groups.ts:144
removeCustomers
▸ removeCustomers(id, payload, customHeaders?): ResponsePromise<AdminCustomerGroupsRes>
Remove multiple customers from a customer group.
Parameters
| Name | Type | Description |
|---|---|---|
id |
string |
customer group id |
payload |
AdminDeleteCustomerGroupsGroupCustomerBatchReq |
an object which contains an array of customers ids which will be removed from the group |
customHeaders |
Record<string, any> |
Returns
ResponsePromise<AdminCustomerGroupsRes>
Defined in
medusa-js/src/resources/admin/customer-groups.ts:128
retrieve
▸ retrieve(id, query?, customHeaders?): ResponsePromise<AdminCustomerGroupsRes>
Retrieves a customer group.
Parameters
| Name | Type | Description |
|---|---|---|
id |
string |
customer group id |
query? |
AdminGetCustomerGroupsGroupParams |
pass query options such as "expand", "fields" etc. |
customHeaders |
Record<string, any> |
Returns
ResponsePromise<AdminCustomerGroupsRes>
Defined in
medusa-js/src/resources/admin/customer-groups.ts:41
update
▸ update(id, payload, customHeaders?): ResponsePromise<AdminCustomerGroupsRes>
Updates a customer group
Parameters
| Name | Type | Description |
|---|---|---|
id |
string |
customer group id |
payload |
AdminPostCustomerGroupsGroupReq |
data to update customer group with |
customHeaders |
Record<string, any> |
Returns
ResponsePromise<AdminCustomerGroupsRes>