feat(customer): admin CRUD endpoints (#6232)
**What** - GET /customers/:id - POST /customers/:id - DELETE /customers/:id - POST /customers Including workflows for each.
This commit is contained in:
@@ -48,12 +48,21 @@ export interface CreateCustomerDTO {
|
||||
|
||||
export interface UpdateCustomerDTO {
|
||||
id: string
|
||||
company_name?: string
|
||||
first_name?: string
|
||||
last_name?: string
|
||||
email?: string
|
||||
phone?: string
|
||||
metadata?: Record<string, unknown>
|
||||
company_name?: string | null
|
||||
first_name?: string | null
|
||||
last_name?: string | null
|
||||
email?: string | null
|
||||
phone?: string | null
|
||||
metadata?: Record<string, unknown> | null
|
||||
}
|
||||
|
||||
export interface CustomerUpdatableFields {
|
||||
company_name?: string | null
|
||||
first_name?: string | null
|
||||
last_name?: string | null
|
||||
email?: string | null
|
||||
phone?: string | null
|
||||
metadata?: Record<string, unknown> | null
|
||||
}
|
||||
|
||||
export interface CreateCustomerGroupDTO {
|
||||
|
||||
@@ -17,6 +17,7 @@ import {
|
||||
CreateCustomerAddressDTO,
|
||||
CreateCustomerDTO,
|
||||
CreateCustomerGroupDTO,
|
||||
CustomerUpdatableFields,
|
||||
UpdateCustomerAddressDTO,
|
||||
} from "./mutations"
|
||||
|
||||
@@ -35,17 +36,17 @@ export interface ICustomerModuleService extends IModuleService {
|
||||
|
||||
update(
|
||||
customerId: string,
|
||||
data: Partial<CreateCustomerDTO>,
|
||||
data: CustomerUpdatableFields,
|
||||
sharedContext?: Context
|
||||
): Promise<CustomerDTO>
|
||||
update(
|
||||
customerIds: string[],
|
||||
data: Partial<CreateCustomerDTO>,
|
||||
data: CustomerUpdatableFields,
|
||||
sharedContext?: Context
|
||||
): Promise<CustomerDTO[]>
|
||||
update(
|
||||
selector: FilterableCustomerProps,
|
||||
data: Partial<CreateCustomerDTO>,
|
||||
data: CustomerUpdatableFields,
|
||||
sharedContext?: Context
|
||||
): Promise<CustomerDTO[]>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user