@zauru-sdk/graphql 2.0.93 → 2.0.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -113,6 +113,9 @@ export declare const getPaymentMethodsStringQuery: (config: {
113
113
  onlyActives: boolean;
114
114
  }) => string;
115
115
  export declare const getPaymentTermByIdStringQuery: (id: number) => string;
116
- export declare const getInvoicesByAgencyIdStringQuery: (id: number) => string;
116
+ export declare const getInvoicesByAgencyIdStringQuery: (id: number, filters: {
117
+ tag_id?: string;
118
+ invoice_id?: string;
119
+ }) => string;
117
120
  export declare const getCasesByResponsibleIdStringQuery: (responsible_id: number, wheres?: string[]) => string;
118
121
  export declare const getPrintTemplatesStringQuery = "\nquery getPrintTemplates {\n print_templates {\n id\n name\n }\n}\n";
@@ -1338,9 +1338,20 @@ query getPaymentTermById {
1338
1338
  }
1339
1339
  `;
1340
1340
  exports.getPaymentTermByIdStringQuery = getPaymentTermByIdStringQuery;
1341
- const getInvoicesByAgencyIdStringQuery = (id) => `
1341
+ const getInvoicesByAgencyIdStringQuery = (id, filters) => `
1342
1342
  query getInvoicesByAgencyId {
1343
- invoices(limit: 1000, where: {agency_id: {_eq: ${id}}, voided: {_eq: false}}, order_by: {id: desc}) {
1343
+ invoices(
1344
+ limit: 1000,
1345
+ where: {
1346
+ agency_id: {_eq: ${id}},
1347
+ voided: {_eq: false}
1348
+ ${filters?.invoice_id
1349
+ ? `, id: {_eq: ${filters?.invoice_id}}`
1350
+ : ""}
1351
+ ${filters?.tag_id
1352
+ ? `, tagging_invoices: { tag_id: {_eq: ${filters?.tag_id}}}`
1353
+ : ""}
1354
+ }, order_by: {id: desc}) {
1344
1355
  id
1345
1356
  zid
1346
1357
  id_number
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/graphql",
3
- "version": "2.0.93",
3
+ "version": "2.0.112",
4
4
  "description": "Queries de uso común para las aplicación de Zauru.",
5
5
  "main": "./dist/esm/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -21,5 +21,5 @@
21
21
  "devDependencies": {
22
22
  "typescript": "^5.1.6"
23
23
  },
24
- "gitHead": "22ed9078c4b82bbcb19ecff097926890a35570b6"
24
+ "gitHead": "b7aa31520777fdd9277745a5285731cc8ebbd1ac"
25
25
  }