@zauru-sdk/graphql 2.25.2 → 2.25.3
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.
|
@@ -6,8 +6,8 @@ export declare const getPurchaseOrderStringQuery: (id: number, config?: {
|
|
|
6
6
|
withReceptions: boolean;
|
|
7
7
|
}) => string;
|
|
8
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, }: {
|
|
9
|
-
agency_to_id?: number;
|
|
10
|
-
agency_from_id?: number;
|
|
9
|
+
agency_to_id?: number | number[];
|
|
10
|
+
agency_from_id?: number | number[];
|
|
11
11
|
suffix?: string;
|
|
12
12
|
id_number_not_null?: boolean;
|
|
13
13
|
voided?: boolean;
|
|
@@ -202,10 +202,20 @@ exports.getPurchaseOrderStringQuery = getPurchaseOrderStringQuery;
|
|
|
202
202
|
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, }) => {
|
|
203
203
|
let conditions = [];
|
|
204
204
|
if (agency_to_id) {
|
|
205
|
-
|
|
205
|
+
if (Array.isArray(agency_to_id)) {
|
|
206
|
+
conditions.push(`agency_to_id: {_in: [${agency_to_id.join(", ")}]}`);
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
conditions.push(`agency_to_id: {_eq: ${agency_to_id}}`);
|
|
210
|
+
}
|
|
206
211
|
}
|
|
207
212
|
if (agency_from_id) {
|
|
208
|
-
|
|
213
|
+
if (Array.isArray(agency_from_id)) {
|
|
214
|
+
conditions.push(`agency_from_id: {_in: [${agency_from_id.join(", ")}]}`);
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
conditions.push(`agency_from_id: {_eq: ${agency_from_id}}`);
|
|
218
|
+
}
|
|
209
219
|
}
|
|
210
220
|
// Merge all id_number conditions into a single object to avoid duplicate keys
|
|
211
221
|
const idNumberConditions = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/graphql",
|
|
3
|
-
"version": "2.25.
|
|
3
|
+
"version": "2.25.3",
|
|
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": "
|
|
24
|
+
"gitHead": "3ca3fc59312bd6aaba6ec2112f028d21a1bb0bab"
|
|
25
25
|
}
|