feat: customer group customers client endpoints (#1221)

* feat: add `listCustomers` (by group) to `medusa-js`

* feat: add `useAdminCustomerGroupCustomers` hook

* fix: remove log

* fix: import/export

* fix: change query keys

* wip: sublist query keys

* fix: revert query factory changes

* fix: add query as a param when building the "detail" key

* fix: revert keys logic, use special case

* fix: query path, change batch keys

* change admin customer groups cache key generation

* spread query params

Co-authored-by: fPolic <frane@medusajs.com>
This commit is contained in:
Frane Polić
2022-03-23 20:07:13 +01:00
committed by GitHub
co-authored by fPolic
parent 932f4b29a8
commit b7f699654b
7 changed files with 102 additions and 10 deletions
@@ -551,6 +551,15 @@ export const adminHandlers = [
)
}),
rest.get("/admin/customer-groups/:id/customers", (req, res, ctx) => {
return res(
ctx.status(200),
ctx.json({
customers: fixtures.list("customer"),
})
)
}),
rest.get("/admin/discounts/", (req, res, ctx) => {
return res(
ctx.status(200),