@zauru-sdk/graphql 2.0.87 → 2.0.110

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.
@@ -42,6 +42,7 @@ export declare const getPurchaseOrdersBetweenDatesStringQuery: (startDate: strin
42
42
  shipment_reference?: string;
43
43
  discountComparisonOperator?: "_eq" | "_neq" | "_gte" | "_lte" | "_gt" | "_lt";
44
44
  discount?: number;
45
+ excludeVoided?: boolean;
45
46
  }) => string;
46
47
  export declare const getPayeesStringQuery = "\nquery getPayees {\n payees {\n id\n id_number\n name\n tin\n vendor\n address_line_1\n }\n}\n";
47
48
  export declare const getProvidersStringQuery = "\nquery getProviders {\n payees (where: {vendor: {_eq: true}}) {\n id\n id_number\n name\n tin\n address_line_1\n }\n}\n";
@@ -112,6 +113,8 @@ export declare const getPaymentMethodsStringQuery: (config: {
112
113
  onlyActives: boolean;
113
114
  }) => string;
114
115
  export declare const getPaymentTermByIdStringQuery: (id: number) => string;
115
- export declare const getInvoicesByAgencyIdStringQuery: (id: number) => string;
116
+ export declare const getInvoicesByAgencyIdStringQuery: (id: number, filters: {
117
+ tag_id?: string;
118
+ }) => string;
116
119
  export declare const getCasesByResponsibleIdStringQuery: (responsible_id: number, wheres?: string[]) => string;
117
120
  export declare const getPrintTemplatesStringQuery = "\nquery getPrintTemplates {\n print_templates {\n id\n name\n }\n}\n";
@@ -275,6 +275,9 @@ query getLotStocksByAgencyId {
275
275
  exports.getLotStocksByAgencyIdStringQuery = getLotStocksByAgencyIdStringQuery;
276
276
  const getPurchaseOrdersBetweenDatesStringQuery = (startDate, endDate, config) => {
277
277
  const conditions = [];
278
+ if (config.excludeVoided) {
279
+ conditions.push("voided: { _eq: false }");
280
+ }
278
281
  if (config.agencyId) {
279
282
  conditions.push(`agency_id: { _eq: ${config.agencyId} }`);
280
283
  }
@@ -1335,9 +1338,14 @@ query getPaymentTermById {
1335
1338
  }
1336
1339
  `;
1337
1340
  exports.getPaymentTermByIdStringQuery = getPaymentTermByIdStringQuery;
1338
- const getInvoicesByAgencyIdStringQuery = (id) => `
1341
+ const getInvoicesByAgencyIdStringQuery = (id, filters) => `
1339
1342
  query getInvoicesByAgencyId {
1340
- invoices(limit: 1000, where: {agency_id: {_eq: ${id}}, voided: {_eq: false}}, order_by: {id: desc}) {
1343
+ invoices(limit: 1000,
1344
+ where: {agency_id: {_eq: ${id}}, voided: {_eq: false}
1345
+ ${filters?.tag_id
1346
+ ? `, tagging_invoices: { tag_id: {_eq: ${filters?.tag_id}}}`
1347
+ : ""}
1348
+ }, order_by: {id: desc}) {
1341
1349
  id
1342
1350
  zid
1343
1351
  id_number
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/graphql",
3
- "version": "2.0.87",
3
+ "version": "2.0.110",
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": "a1b59b23ca3d0d786e9166d6d76efc59aa34ba8d"
24
+ "gitHead": "48da37315a5c24db0135c55e41c8fa1aa0f0adf5"
25
25
  }