diff --git a/package.json b/package.json index bf091c62..64f9887a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "version": "0.0.58", + "version": "0.0.59", "license": "MIT", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/src/modules/inventory/index.ts b/src/modules/inventory/index.ts index 9bc435e1..2eaeac95 100644 --- a/src/modules/inventory/index.ts +++ b/src/modules/inventory/index.ts @@ -57,12 +57,13 @@ export class Inventory { return response.data; } - public async createStatus(name: string): Promise { + public async createStatus(name: string, is_default?:boolean): Promise { const response = await this.client.mutate({ mutation: CREATE_STATUS, variables: { input: { name: name, + is_default: is_default }, }, }); diff --git a/src/mutations/inventory.mutation.ts b/src/mutations/inventory.mutation.ts index 8ade30bd..673649aa 100644 --- a/src/mutations/inventory.mutation.ts +++ b/src/mutations/inventory.mutation.ts @@ -203,6 +203,7 @@ export const CREATE_STATUS = gql` createStatus(input: $input) { id name + is_default } } `; diff --git a/src/queries/inventory.query.ts b/src/queries/inventory.query.ts index a8f203af..e1d9cac2 100644 --- a/src/queries/inventory.query.ts +++ b/src/queries/inventory.query.ts @@ -156,6 +156,7 @@ export const GET_STATUS = gql` data { name id + is_default } } } diff --git a/src/types/inventory.ts b/src/types/inventory.ts index 10dbadbe..aa997a5e 100644 --- a/src/types/inventory.ts +++ b/src/types/inventory.ts @@ -29,6 +29,7 @@ export interface ProductWarehouse { export interface StatusInterface { id: string; name: string; + is_default: boolean; } export interface OrderBy { diff --git a/src/types/leads.ts b/src/types/leads.ts index 4f11c616..ffcad9dc 100644 --- a/src/types/leads.ts +++ b/src/types/leads.ts @@ -120,7 +120,7 @@ export interface LeadInput { export interface WhereCondition { column: string; operator: string; - value: number | string; + value: number | string | Array; } export interface LeadsDashboardInput {