@zauru-sdk/graphql 6.8.0 → 6.9.1

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.
@@ -5,7 +5,7 @@ export declare const getPurchaseOrderStringQuery: (id: number, config?: {
5
5
  withPayee: boolean;
6
6
  withReceptions: boolean;
7
7
  }) => string;
8
- export declare const getShipmentsStringQuery: ({ agency_to_id, agency_from_id, suffix, voided, delivered, shipped, returned, id_number_not_null, id_number, id_number_not_empty, withMovementLots, withPurchaseOrdersByShipmentReference, limit, id, wheres, memoILike, plannedShippingDateRange, plannedDeliveryDateRange, }: {
8
+ export declare const getShipmentsStringQuery: ({ agency_to_id, agency_from_id, suffix, voided, delivered, shipped, returned, id_number_not_null, id_number, id_number_not_empty, withMovementLots, withMovements, withPurchaseOrdersByShipmentReference, limit, id, wheres, memoILike, plannedShippingDateRange, plannedDeliveryDateRange, }: {
9
9
  agency_to_id?: number | number[];
10
10
  agency_from_id?: number | number[];
11
11
  suffix?: string;
@@ -17,6 +17,7 @@ export declare const getShipmentsStringQuery: ({ agency_to_id, agency_from_id, s
17
17
  id_number?: string;
18
18
  id_number_not_empty?: boolean;
19
19
  withMovementLots?: boolean;
20
+ withMovements?: boolean;
20
21
  withPurchaseOrdersByShipmentReference?: boolean;
21
22
  limit?: number;
22
23
  id?: number | string;
@@ -203,7 +203,7 @@ query getPurchaseOrder($id: bigint) @cached {
203
203
  `;
204
204
  };
205
205
  exports.getPurchaseOrderStringQuery = getPurchaseOrderStringQuery;
206
- 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, withPurchaseOrdersByShipmentReference = false, limit = 1000, id, wheres, memoILike, plannedShippingDateRange, plannedDeliveryDateRange, }) => {
206
+ 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, withMovements = true, withPurchaseOrdersByShipmentReference = false, limit = 1000, id, wheres, memoILike, plannedShippingDateRange, plannedDeliveryDateRange, }) => {
207
207
  let conditions = [];
208
208
  if (agency_to_id) {
209
209
  if (Array.isArray(agency_to_id)) {
@@ -286,6 +286,17 @@ const getShipmentsStringQuery = ({ agency_to_id, agency_from_id, suffix, voided,
286
286
  }
287
287
  }`
288
288
  : "";
289
+ const movements = withMovements
290
+ ? `movements {
291
+ id
292
+ booked_quantity
293
+ delivered_quantity
294
+ reference
295
+ item_id
296
+ lot_id
297
+ ${movementLots}
298
+ }`
299
+ : "";
289
300
  return `query getShipments {
290
301
  shipments(
291
302
  limit: ${limit},
@@ -319,15 +330,7 @@ const getShipmentsStringQuery = ({ agency_to_id, agency_from_id, suffix, voided,
319
330
  returned_at
320
331
  returner_id
321
332
  ${purchaseOrdersByShipmentReference}
322
- movements {
323
- id
324
- booked_quantity
325
- delivered_quantity
326
- reference
327
- item_id
328
- lot_id
329
- ${movementLots}
330
- }
333
+ ${movements}
331
334
  }
332
335
  }`;
333
336
  };
@@ -890,6 +893,11 @@ query getPayeeById {
890
893
  tin
891
894
  active
892
895
  address_line_1
896
+ payee_category_id
897
+ payee_category {
898
+ id
899
+ name
900
+ }
893
901
  }
894
902
  }
895
903
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/graphql",
3
- "version": "6.8.0",
3
+ "version": "6.9.1",
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",
@@ -12,7 +12,7 @@
12
12
  "scripts": {
13
13
  "build": "npm run build:esm",
14
14
  "build:esm": "tsc -p tsconfig.esm.json",
15
- "test": "echo \"Error: no test specified\" && exit 1"
15
+ "test": "tsx --test src/GraphQL.queries.test.ts"
16
16
  },
17
17
  "files": [
18
18
  "dist"
@@ -20,7 +20,8 @@
20
20
  "author": "Oscar Cuéllar",
21
21
  "license": "MIT",
22
22
  "devDependencies": {
23
+ "tsx": "^4.23.15",
23
24
  "typescript": "^5.1.6"
24
25
  },
25
- "gitHead": "a5b35540efd2b3395e05ea0182c97d78f059c3c4"
26
+ "gitHead": "862f3a72643479e1b124cfc9159d33901e5b6912"
26
27
  }