feat: Update customer related typings and sdk methods (#7440)
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import { createCustomersWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
AdminCustomerListResponse,
|
||||
AdminCustomerResponse,
|
||||
} from "@medusajs/types"
|
||||
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
@@ -13,10 +10,11 @@ import {
|
||||
} from "../../../types/routing"
|
||||
import { AdminCreateCustomerType } from "./validators"
|
||||
import { refetchCustomer } from "./helpers"
|
||||
import { AdminCustomer, PaginatedResponse } from "@medusajs/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest,
|
||||
res: MedusaResponse<AdminCustomerListResponse>
|
||||
res: MedusaResponse<PaginatedResponse<{ customers: AdminCustomer }>>
|
||||
) => {
|
||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||
|
||||
@@ -41,7 +39,7 @@ export const GET = async (
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminCreateCustomerType>,
|
||||
res: MedusaResponse<AdminCustomerResponse>
|
||||
res: MedusaResponse<{ customer: AdminCustomer }>
|
||||
) => {
|
||||
const createCustomers = createCustomersWorkflow(req.scope)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user