From ffdd8d0e9d761621b22c19b3620b02a0f9170bbb Mon Sep 17 00:00:00 2001 From: jerlyrosa Date: Tue, 14 Nov 2023 17:58:26 -0400 Subject: [PATCH 1/3] feat(inventory): add is_default parameter to createStatus method --- src/modules/inventory/index.ts | 3 ++- src/mutations/inventory.mutation.ts | 1 + src/queries/inventory.query.ts | 1 + src/types/inventory.ts | 1 + src/types/leads.ts | 2 +- 5 files changed, 6 insertions(+), 2 deletions(-) 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 3ed93542..69ff199b 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 | (number | string)[]; } export interface LeadsDashboardInput { From aea5fbca1ff2a962575fb4032aafb778f59c18a3 Mon Sep 17 00:00:00 2001 From: jerlyrosa Date: Tue, 14 Nov 2023 17:59:53 -0400 Subject: [PATCH 2/3] chore: Update version to 0.0.59 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", From 24b44d0968978bf1e2ad8eb6c2bcba0ccd1b5ab9 Mon Sep 17 00:00:00 2001 From: jerlyrosa Date: Tue, 14 Nov 2023 18:19:34 -0400 Subject: [PATCH 3/3] refactor(leads.ts): Update value type in WhereCondition --- src/types/leads.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/leads.ts b/src/types/leads.ts index 5eb6b6bf..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 | (number | string)[]; + value: number | string | Array; } export interface LeadsDashboardInput {