Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/update get status query #111

Merged
merged 4 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{

"version": "0.0.58",
"version": "0.0.59",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion src/modules/inventory/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@ export class Inventory {
return response.data;
}

public async createStatus(name: string): Promise<CreatedStatus> {
public async createStatus(name: string, is_default?:boolean): Promise<CreatedStatus> {
const response = await this.client.mutate({
mutation: CREATE_STATUS,
variables: {
input: {
name: name,
is_default: is_default
},
},
});
Expand Down
1 change: 1 addition & 0 deletions src/mutations/inventory.mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ export const CREATE_STATUS = gql`
createStatus(input: $input) {
id
name
is_default
}
}
`;
Expand Down
1 change: 1 addition & 0 deletions src/queries/inventory.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export const GET_STATUS = gql`
data {
name
id
is_default
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/types/inventory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export interface ProductWarehouse {
export interface StatusInterface {
id: string;
name: string;
is_default: boolean;
}

export interface OrderBy {
Expand Down
2 changes: 1 addition & 1 deletion src/types/leads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export interface LeadInput {
export interface WhereCondition {
column: string;
operator: string;
value: number | string;
value: number | string | Array<string | number>;
}

export interface LeadsDashboardInput {
Expand Down