feat(customers): add delete and update (#6148)
Depends on #6137 **What** - Add update and delete methods to the customer module
This commit is contained in:
@@ -9,6 +9,7 @@ export interface CreateCustomerDTO {
|
||||
}
|
||||
|
||||
export interface UpdateCustomerDTO {
|
||||
id: string
|
||||
company_name?: string
|
||||
first_name?: string
|
||||
last_name?: string
|
||||
@@ -28,6 +29,24 @@ export interface CustomerGroupUpdatableFileds {
|
||||
metadata?: Record<string, unknown> | null
|
||||
}
|
||||
|
||||
export interface UpdateCustomerGroupDTO {
|
||||
id?: string
|
||||
name?: string
|
||||
customer_ids?: string[]
|
||||
metadata?: Record<string, unknown> | null
|
||||
}
|
||||
|
||||
export interface CreateCustomerGroupDTO {
|
||||
name: string
|
||||
metadata?: Record<string, unknown> | null
|
||||
created_by?: string
|
||||
}
|
||||
|
||||
export interface CustomerGroupUpdatableFileds {
|
||||
name?: string
|
||||
metadata?: Record<string, unknown> | null
|
||||
}
|
||||
|
||||
export interface UpdateCustomerGroupDTO {
|
||||
id?: string
|
||||
name?: string
|
||||
|
||||
@@ -24,6 +24,29 @@ export interface ICustomerModuleService extends IModuleService {
|
||||
|
||||
create(data: CreateCustomerDTO, sharedContext?: Context): Promise<CustomerDTO>
|
||||
|
||||
update(
|
||||
customerId: string,
|
||||
data: Partial<CreateCustomerDTO>,
|
||||
sharedContext?: Context
|
||||
): Promise<CustomerDTO>
|
||||
update(
|
||||
customerIds: string[],
|
||||
data: Partial<CreateCustomerDTO>,
|
||||
sharedContext?: Context
|
||||
): Promise<CustomerDTO[]>
|
||||
update(
|
||||
selector: FilterableCustomerProps,
|
||||
data: Partial<CreateCustomerDTO>,
|
||||
sharedContext?: Context
|
||||
): Promise<CustomerDTO[]>
|
||||
|
||||
delete(customerId: string, sharedContext?: Context): Promise<void>
|
||||
delete(customerIds: string[], sharedContext?: Context): Promise<void>
|
||||
delete(
|
||||
selector: FilterableCustomerProps,
|
||||
sharedContext?: Context
|
||||
): Promise<void>
|
||||
|
||||
createCustomerGroup(
|
||||
data: CreateCustomerGroupDTO[],
|
||||
sharedContext?: Context
|
||||
|
||||
Reference in New Issue
Block a user