CrmModule
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CrmModule(
client):CrmModule
Parameters
Section titled “Parameters”client
Section titled “client”Returns
Section titled “Returns”CrmModule
Properties
Section titled “Properties”attributes
Section titled “attributes”attributes:
object
create
Section titled “create”create: (
data) =>Promise<{data:any;error?:string;success:boolean; }>
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”Promise<{ data: any; error?: string; success: boolean; }>
delete
Section titled “delete”delete: (
ids) =>Promise<{error?:string;message?:string;success:boolean; }>
Parameters
Section titled “Parameters”string | string[]
Returns
Section titled “Returns”Promise<{ error?: string; message?: string; success: boolean; }>
list: (
params?) =>Promise<{data:any[];error?:string;hasNextPage?:boolean;success:boolean; }>
Parameters
Section titled “Parameters”params?
Section titled “params?”limit?
Section titled “limit?”number
offset?
Section titled “offset?”number
search?
Section titled “search?”string
status?
Section titled “status?”string
Returns
Section titled “Returns”Promise<{ data: any[]; error?: string; hasNextPage?: boolean; success: boolean; }>
restore
Section titled “restore”restore: (
ids) =>Promise<{error?:string;message?:string;success:boolean; }>
Parameters
Section titled “Parameters”string[]
Returns
Section titled “Returns”Promise<{ error?: string; message?: string; success: boolean; }>
stats: () =>
Promise<{data: {status_active?:number;status_archived?:number;total?:number; };error?:string;success:boolean; }>
Returns
Section titled “Returns”Promise<{ data: { status_active?: number; status_archived?: number; total?: number; }; error?: string; success: boolean; }>
update
Section titled “update”update: (
id,data) =>Promise<{data:any;error?:string;success:boolean; }>
Parameters
Section titled “Parameters”string
string
string
Returns
Section titled “Returns”Promise<{ data: any; error?: string; success: boolean; }>
collections
Section titled “collections”collections:
object
create
Section titled “create”create: (
data) =>Promise<{data:any;error?:string;success:boolean; }>
Parameters
Section titled “Parameters”any
Returns
Section titled “Returns”Promise<{ data: any; error?: string; success: boolean; }>
delete
Section titled “delete”delete: (
ids) =>Promise<{error?:string;message?:string;success:boolean; }>
Parameters
Section titled “Parameters”string | string[]
Returns
Section titled “Returns”Promise<{ error?: string; message?: string; success: boolean; }>
getById
Section titled “getById”getById: (
id) =>Promise<{data?:any;error?:string;success:boolean; }>
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<{ data?: any; error?: string; success: boolean; }>
list: (
params?) =>Promise<{data:any[];error?:string;hasNextPage?:boolean;success:boolean; }>
Parameters
Section titled “Parameters”params?
Section titled “params?”limit?
Section titled “limit?”number
offset?
Section titled “offset?”number
search?
Section titled “search?”string
status?
Section titled “status?”string
Returns
Section titled “Returns”Promise<{ data: any[]; error?: string; hasNextPage?: boolean; success: boolean; }>
restore
Section titled “restore”restore: (
ids) =>Promise<{error?:string;message?:string;success:boolean; }>
Parameters
Section titled “Parameters”string[]
Returns
Section titled “Returns”Promise<{ error?: string; message?: string; success: boolean; }>
stats: () =>
Promise<{data: {status_active?:number;status_archived?:number;total?:number; };error?:string;success:boolean; }>
Returns
Section titled “Returns”Promise<{ data: { status_active?: number; status_archived?: number; total?: number; }; error?: string; success: boolean; }>
update
Section titled “update”update: (
id,data) =>Promise<{data:any;error?:string;success:boolean; }>
Parameters
Section titled “Parameters”string
any
Returns
Section titled “Returns”Promise<{ data: any; error?: string; success: boolean; }>
products
Section titled “products”products:
object
checkSlug
Section titled “checkSlug”checkSlug: (
name,slug?,excludeId?) =>Promise<CheckSlugResponse>
Parameters
Section titled “Parameters”string
string
excludeId?
Section titled “excludeId?”string
Returns
Section titled “Returns”Promise<CheckSlugResponse>
create
Section titled “create”create: (
data) =>Promise<CreateProductResponse>
Parameters
Section titled “Parameters”any
Returns
Section titled “Returns”Promise<CreateProductResponse>
delete
Section titled “delete”delete: (
ids) =>Promise<{error?:string;success:boolean; }>
Parameters
Section titled “Parameters”string[]
Returns
Section titled “Returns”Promise<{ error?: string; success: boolean; }>
list: (
params?) =>Promise<ListProductsResponse>
Parameters
Section titled “Parameters”params?
Section titled “params?”limit?
Section titled “limit?”number
offset?
Section titled “offset?”number
productType?
Section titled “productType?”string
search?
Section titled “search?”string
status?
Section titled “status?”"all" | "active" | "archived" | "draft"
stockStatus?
Section titled “stockStatus?”"all" | "in_stock" | "out_of_stock"
vendorId?
Section titled “vendorId?”string
Returns
Section titled “Returns”Promise<ListProductsResponse>
restore
Section titled “restore”restore: (
ids) =>Promise<{error?:string;success:boolean; }>
Parameters
Section titled “Parameters”string[]
Returns
Section titled “Returns”Promise<{ error?: string; success: boolean; }>
stats: () =>
Promise<ProductStatsResponse>
Returns
Section titled “Returns”Promise<ProductStatsResponse>
update
Section titled “update”update: (
id,data) =>Promise<CreateProductResponse>
Parameters
Section titled “Parameters”string
any
Returns
Section titled “Returns”Promise<CreateProductResponse>
productTypes
Section titled “productTypes”productTypes:
object
create
Section titled “create”create: (
data) =>Promise<CreateProductTypeResponse>
Parameters
Section titled “Parameters”default_attributes?
Section titled “default_attributes?”string[]
description?
Section titled “description?”string
string
string
Returns
Section titled “Returns”Promise<CreateProductTypeResponse>
delete
Section titled “delete”delete: (
ids) =>Promise<{error?:string;message?:string;success:boolean; }>
Parameters
Section titled “Parameters”string | string[]
Returns
Section titled “Returns”Promise<{ error?: string; message?: string; success: boolean; }>
getById
Section titled “getById”getById: (
id) =>Promise<{data?:any;error?:string;success:boolean; }>
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<{ data?: any; error?: string; success: boolean; }>
list: (
params?) =>Promise<ListProductTypesResponse>
Parameters
Section titled “Parameters”params?
Section titled “params?”limit?
Section titled “limit?”number
offset?
Section titled “offset?”number
search?
Section titled “search?”string
status?
Section titled “status?”string
Returns
Section titled “Returns”Promise<ListProductTypesResponse>
restore
Section titled “restore”restore: (
ids) =>Promise<{error?:string;message?:string;success:boolean; }>
Parameters
Section titled “Parameters”string[]
Returns
Section titled “Returns”Promise<{ error?: string; message?: string; success: boolean; }>
stats: () =>
Promise<{data: {status_active?:number;status_archived?:number;total?:number; };error?:string;success:boolean; }>
Returns
Section titled “Returns”Promise<{ data: { status_active?: number; status_archived?: number; total?: number; }; error?: string; success: boolean; }>
update
Section titled “update”update: (
id,data) =>Promise<{data?:any;error?:string;success:boolean; }>
Parameters
Section titled “Parameters”string
default_attributes?
Section titled “default_attributes?”string[]
description?
Section titled “description?”string
string
string
Returns
Section titled “Returns”Promise<{ data?: any; error?: string; success: boolean; }>
suppliers
Section titled “suppliers”suppliers:
object
checkSlug
Section titled “checkSlug”checkSlug: (
name,slug?,excludeId?) =>Promise<CheckSlugResponse>
Parameters
Section titled “Parameters”string
string
excludeId?
Section titled “excludeId?”string
Returns
Section titled “Returns”Promise<CheckSlugResponse>
create
Section titled “create”create: (
data) =>Promise<CreateSupplierResponse>
Parameters
Section titled “Parameters”Partial<Supplier>
Returns
Section titled “Returns”Promise<CreateSupplierResponse>
delete
Section titled “delete”delete: (
ids) =>Promise<{error?:string;success:boolean; }>
Parameters
Section titled “Parameters”string[]
Returns
Section titled “Returns”Promise<{ error?: string; success: boolean; }>
list: (
params?) =>Promise<ListSuppliersResponse>
Parameters
Section titled “Parameters”params?
Section titled “params?”limit?
Section titled “limit?”number
offset?
Section titled “offset?”number
search?
Section titled “search?”string
status?
Section titled “status?”"all" | "active" | "archived"
Returns
Section titled “Returns”Promise<ListSuppliersResponse>
restore
Section titled “restore”restore: (
ids) =>Promise<{error?:string;success:boolean; }>
Parameters
Section titled “Parameters”string[]
Returns
Section titled “Returns”Promise<{ error?: string; success: boolean; }>
stats: () =>
Promise<SupplierStatsResponse>
Returns
Section titled “Returns”Promise<SupplierStatsResponse>
update
Section titled “update”update: (
id,data) =>Promise<CreateSupplierResponse>
Parameters
Section titled “Parameters”string
Partial<Supplier>
Returns
Section titled “Returns”Promise<CreateSupplierResponse>
vendors
Section titled “vendors”vendors:
object
checkSlug
Section titled “checkSlug”checkSlug: (
name,slug?,excludeId?) =>Promise<CheckSlugResponse>
Parameters
Section titled “Parameters”string
string
excludeId?
Section titled “excludeId?”string
Returns
Section titled “Returns”Promise<CheckSlugResponse>
create
Section titled “create”create: (
data) =>Promise<CreateVendorResponse>
Parameters
Section titled “Parameters”Partial<Vendor>
Returns
Section titled “Returns”Promise<CreateVendorResponse>
delete
Section titled “delete”delete: (
ids) =>Promise<{error?:string;success:boolean; }>
Parameters
Section titled “Parameters”string[]
Returns
Section titled “Returns”Promise<{ error?: string; success: boolean; }>
list: (
params?) =>Promise<ListVendorsResponse>
Parameters
Section titled “Parameters”params?
Section titled “params?”limit?
Section titled “limit?”number
offset?
Section titled “offset?”number
search?
Section titled “search?”string
status?
Section titled “status?”"all" | "active" | "archived"
Returns
Section titled “Returns”Promise<ListVendorsResponse>
restore
Section titled “restore”restore: (
ids) =>Promise<{error?:string;success:boolean; }>
Parameters
Section titled “Parameters”string[]
Returns
Section titled “Returns”Promise<{ error?: string; success: boolean; }>
stats: () =>
Promise<VendorStatsResponse>
Returns
Section titled “Returns”Promise<VendorStatsResponse>
update
Section titled “update”update: (
id,data) =>Promise<CreateVendorResponse>
Parameters
Section titled “Parameters”string
Partial<Vendor>
Returns
Section titled “Returns”Promise<CreateVendorResponse>