feat: customer groups client endpoints (#1147)

* feat: WIP add customer group endpoints, fix generated type exports from api

* fix: export api types, add `list`method

* fix: export customer groups types from the `medusa-js` package

* fix: cleanup type exports from customer groups api

* feat: add customer group batch methods

* fix: refactor comments

* fix: address PR comments

Co-authored-by: fPolic <frane@medusajs.com>
This commit is contained in:
Frane Polić
2022-03-03 03:52:40 +01:00
committed by GitHub
co-authored by fPolic
parent a514d84ccf
commit 93426bfc02
5 changed files with 147 additions and 2 deletions
+1
View File
@@ -19,6 +19,7 @@ export default (container, config) => {
export * from "./routes/admin/collections"
export * from "./routes/admin/auth"
export * from "./routes/admin/customers"
export * from "./routes/admin/customer-groups"
export * from "./routes/admin/discounts"
export * from "./routes/admin/draft-orders"
export * from "./routes/admin/gift-cards"
@@ -32,6 +32,10 @@ export default (app) => {
return app
}
/* ************************************** */
/* ******** EXPORT API CLIENT TYPES ***** */
/* ************************************** */
export type AdminCustomerGroupsRes = {
customer_group: CustomerGroup
}
@@ -44,4 +48,9 @@ export type AdminCustomerGroupsListRes = PaginatedResponse & {
export const defaultAdminCustomerGroupsRelations = []
export * from "./add-customers-batch"
export * from "./create-customer-group"
export * from "./delete-customers-batch"
export * from "./get-customer-group"
export * from "./list-customer-groups"
export * from "./update-customer-group"