Skip to content

CrmModule

new CrmModule(client): CrmModule

ApiClient

CrmModule

attributes: object

create: (data) => Promise<{ data: any; error?: string; success: boolean; }>

string

string

Promise<{ data: any; error?: string; success: boolean; }>

delete: (ids) => Promise<{ error?: string; message?: string; success: boolean; }>

string | string[]

Promise<{ error?: string; message?: string; success: boolean; }>

list: (params?) => Promise<{ data: any[]; error?: string; hasNextPage?: boolean; success: boolean; }>

number

number

string

string

Promise<{ data: any[]; error?: string; hasNextPage?: boolean; success: boolean; }>

restore: (ids) => Promise<{ error?: string; message?: string; success: boolean; }>

string[]

Promise<{ error?: string; message?: string; success: boolean; }>

stats: () => Promise<{ data: { status_active?: number; status_archived?: number; total?: number; }; error?: string; success: boolean; }>

Promise<{ data: { status_active?: number; status_archived?: number; total?: number; }; error?: string; success: boolean; }>

update: (id, data) => Promise<{ data: any; error?: string; success: boolean; }>

string

string

string

Promise<{ data: any; error?: string; success: boolean; }>


collections: object

create: (data) => Promise<{ data: any; error?: string; success: boolean; }>

any

Promise<{ data: any; error?: string; success: boolean; }>

delete: (ids) => Promise<{ error?: string; message?: string; success: boolean; }>

string | string[]

Promise<{ error?: string; message?: string; success: boolean; }>

getById: (id) => Promise<{ data?: any; error?: string; success: boolean; }>

string

Promise<{ data?: any; error?: string; success: boolean; }>

list: (params?) => Promise<{ data: any[]; error?: string; hasNextPage?: boolean; success: boolean; }>

number

number

string

string

Promise<{ data: any[]; error?: string; hasNextPage?: boolean; success: boolean; }>

restore: (ids) => Promise<{ error?: string; message?: string; success: boolean; }>

string[]

Promise<{ error?: string; message?: string; success: boolean; }>

stats: () => Promise<{ data: { status_active?: number; status_archived?: number; total?: number; }; error?: string; success: boolean; }>

Promise<{ data: { status_active?: number; status_archived?: number; total?: number; }; error?: string; success: boolean; }>

update: (id, data) => Promise<{ data: any; error?: string; success: boolean; }>

string

any

Promise<{ data: any; error?: string; success: boolean; }>


products: object

checkSlug: (name, slug?, excludeId?) => Promise<CheckSlugResponse>

string

string

string

Promise<CheckSlugResponse>

create: (data) => Promise<CreateProductResponse>

any

Promise<CreateProductResponse>

delete: (ids) => Promise<{ error?: string; success: boolean; }>

string[]

Promise<{ error?: string; success: boolean; }>

list: (params?) => Promise<ListProductsResponse>

number

number

string

string

"all" | "active" | "archived" | "draft"

"all" | "in_stock" | "out_of_stock"

string

Promise<ListProductsResponse>

restore: (ids) => Promise<{ error?: string; success: boolean; }>

string[]

Promise<{ error?: string; success: boolean; }>

stats: () => Promise<ProductStatsResponse>

Promise<ProductStatsResponse>

update: (id, data) => Promise<CreateProductResponse>

string

any

Promise<CreateProductResponse>


productTypes: object

create: (data) => Promise<CreateProductTypeResponse>

string[]

string

string

string

Promise<CreateProductTypeResponse>

delete: (ids) => Promise<{ error?: string; message?: string; success: boolean; }>

string | string[]

Promise<{ error?: string; message?: string; success: boolean; }>

getById: (id) => Promise<{ data?: any; error?: string; success: boolean; }>

string

Promise<{ data?: any; error?: string; success: boolean; }>

list: (params?) => Promise<ListProductTypesResponse>

number

number

string

string

Promise<ListProductTypesResponse>

restore: (ids) => Promise<{ error?: string; message?: string; success: boolean; }>

string[]

Promise<{ error?: string; message?: string; success: boolean; }>

stats: () => Promise<{ data: { status_active?: number; status_archived?: number; total?: number; }; error?: string; success: boolean; }>

Promise<{ data: { status_active?: number; status_archived?: number; total?: number; }; error?: string; success: boolean; }>

update: (id, data) => Promise<{ data?: any; error?: string; success: boolean; }>

string

string[]

string

string

string

Promise<{ data?: any; error?: string; success: boolean; }>


suppliers: object

checkSlug: (name, slug?, excludeId?) => Promise<CheckSlugResponse>

string

string

string

Promise<CheckSlugResponse>

create: (data) => Promise<CreateSupplierResponse>

Partial<Supplier>

Promise<CreateSupplierResponse>

delete: (ids) => Promise<{ error?: string; success: boolean; }>

string[]

Promise<{ error?: string; success: boolean; }>

list: (params?) => Promise<ListSuppliersResponse>

number

number

string

"all" | "active" | "archived"

Promise<ListSuppliersResponse>

restore: (ids) => Promise<{ error?: string; success: boolean; }>

string[]

Promise<{ error?: string; success: boolean; }>

stats: () => Promise<SupplierStatsResponse>

Promise<SupplierStatsResponse>

update: (id, data) => Promise<CreateSupplierResponse>

string

Partial<Supplier>

Promise<CreateSupplierResponse>


vendors: object

checkSlug: (name, slug?, excludeId?) => Promise<CheckSlugResponse>

string

string

string

Promise<CheckSlugResponse>

create: (data) => Promise<CreateVendorResponse>

Partial<Vendor>

Promise<CreateVendorResponse>

delete: (ids) => Promise<{ error?: string; success: boolean; }>

string[]

Promise<{ error?: string; success: boolean; }>

list: (params?) => Promise<ListVendorsResponse>

number

number

string

"all" | "active" | "archived"

Promise<ListVendorsResponse>

restore: (ids) => Promise<{ error?: string; success: boolean; }>

string[]

Promise<{ error?: string; success: boolean; }>

stats: () => Promise<VendorStatsResponse>

Promise<VendorStatsResponse>

update: (id, data) => Promise<CreateVendorResponse>

string

Partial<Vendor>

Promise<CreateVendorResponse>