@zauru-sdk/graphql 6.2.0 → 6.4.0

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.
@@ -61,6 +61,8 @@ export declare const getPurchaseOrdersBetweenDatesStringQuery: (startDate: strin
61
61
  discount?: number;
62
62
  excludeVoided?: boolean;
63
63
  tagId?: number | string;
64
+ paid?: boolean;
65
+ limit?: number;
64
66
  }) => string;
65
67
  export declare const getPayeesStringQuery: (filters?: {
66
68
  id_number?: string;
@@ -37,6 +37,7 @@ const getLast100ReceptionsStringQuery = (agency_id) => {
37
37
  reference
38
38
  booked_quantity
39
39
  delivered_quantity
40
+ unit_cost
40
41
  }
41
42
  lots(where: {active: {_eq: true}}) {
42
43
  id
@@ -80,6 +81,7 @@ query getPurchaseOrderByIdNumber {
80
81
  reference
81
82
  booked_quantity
82
83
  delivered_quantity
84
+ unit_cost
83
85
  }
84
86
  lots(where: {active: {_eq: true}}) {
85
87
  id
@@ -180,6 +182,7 @@ query getPurchaseOrder($id: bigint) @cached {
180
182
  reference
181
183
  booked_quantity
182
184
  delivered_quantity
185
+ unit_cost
183
186
  item {
184
187
  name
185
188
  stocks_only_integer
@@ -278,6 +281,7 @@ const getShipmentsStringQuery = ({ agency_to_id, agency_from_id, suffix, voided,
278
281
  reference
279
282
  booked_quantity
280
283
  delivered_quantity
284
+ unit_cost
281
285
  }
282
286
  }`
283
287
  : "";
@@ -394,6 +398,9 @@ const getPurchaseOrdersBetweenDatesStringQuery = (startDate, endDate, config) =>
394
398
  if (config.excludeVoided) {
395
399
  conditions.push("voided: { _eq: false }");
396
400
  }
401
+ if (typeof config.paid === "boolean") {
402
+ conditions.push(`paid: { _eq: ${config.paid} }`);
403
+ }
397
404
  if (config.agencyId) {
398
405
  conditions.push(`agency_id: { _eq: ${config.agencyId} }`);
399
406
  }
@@ -494,6 +501,7 @@ const getPurchaseOrdersBetweenDatesStringQuery = (startDate, endDate, config) =>
494
501
  reference
495
502
  booked_quantity
496
503
  delivered_quantity
504
+ unit_cost
497
505
  }`
498
506
  : "";
499
507
  const lots = config.withLots
@@ -529,9 +537,11 @@ const getPurchaseOrdersBetweenDatesStringQuery = (startDate, endDate, config) =>
529
537
  }
530
538
  }`
531
539
  : "";
540
+ const limitClause = typeof config.limit === "number" ? `limit: ${config.limit},` : "";
532
541
  return `
533
542
  query getPurchaseOrdersBetweenDates {
534
543
  purchase_orders (
544
+ ${limitClause}
535
545
  order_by: { id: desc },
536
546
  ${whereClause}
537
547
  ) {
@@ -550,6 +560,8 @@ const getPurchaseOrdersBetweenDatesStringQuery = (startDate, endDate, config) =>
550
560
  consolidate_id
551
561
  shipment_reference
552
562
  reference
563
+ incoterm_destination
564
+ paid
553
565
  ${purchaseOrderDetails}
554
566
  ${lots}
555
567
  ${webAppRows}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/graphql",
3
- "version": "6.2.0",
3
+ "version": "6.4.0",
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",
@@ -22,5 +22,5 @@
22
22
  "devDependencies": {
23
23
  "typescript": "^5.1.6"
24
24
  },
25
- "gitHead": "2950c31a115494a2beefde49d411be7983d57982"
25
+ "gitHead": "65139162e998fda40e90035321542c4b881d2aed"
26
26
  }