@zauru-sdk/graphql 2.0.45 → 2.0.46

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.
@@ -154,7 +154,6 @@ query getPurchaseOrder($id: bigint) @cached {
154
154
  exports.getPurchaseOrderStringQuery = getPurchaseOrderStringQuery;
155
155
  const getShipmentsStringQuery = ({ agency_to_id, agency_from_id, suffix, voided, delivered, shipped, returned, id_number_not_null = false, id_number, id_number_not_empty = false, withMovementLots = false, limit = 1000, id, wheres, memoILike, }) => {
156
156
  let conditions = [];
157
- conditions.push(`voided: {_eq: ${voided}}`);
158
157
  if (suffix) {
159
158
  conditions.push(`id_number: {_ilike: "%${suffix}%"}`);
160
159
  }
@@ -205,9 +204,11 @@ const getShipmentsStringQuery = ({ agency_to_id, agency_from_id, suffix, voided,
205
204
  shipments(
206
205
  limit: ${limit},
207
206
  order_by: {id: desc},
208
- where: {
207
+ ${conditions.length > 0
208
+ ? `where: {
209
209
  ${conditions.join(", ")}
210
- }
210
+ }`
211
+ : ""}
211
212
  ) {
212
213
  id
213
214
  zid
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/graphql",
3
- "version": "2.0.45",
3
+ "version": "2.0.46",
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": "c40eaca1e20f74dde80e58dbb492b0444ca3085a"
24
+ "gitHead": "aefd2b55a21a873eb419e284f872a40b2e6dec4d"
25
25
  }