@zauru-sdk/graphql 1.0.65 → 1.0.66
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.
- package/dist/GraphQL.queries.d.ts +3 -3
- package/dist/cjs/GraphQL.queries.js +18 -11
- package/dist/esm/GraphQL.queries.js +18 -11
- package/package.json +2 -2
|
@@ -7,9 +7,9 @@ export declare const getShipmentsByToAgencyLast100StringQuery = "\nquery getShip
|
|
|
7
7
|
export declare const getLotsByNameStringQuery = "\nquery getLots($name: String, $entity_id: Int){\n lots (limit: 100, order_by: {id: desc}, where: {entity_id: {_eq: $entity_id}, name: {_eq: $name}}) {\n id\n name\n description\n }\n}\n";
|
|
8
8
|
export declare const getLotStocksByAgencyIdStringQuery = "\nquery getLotStocksByAgencyId($agency_id: Int){\n lot_stocks (\n order_by: { id: desc },\n where: { agency_id: { _eq: $agency_id }}\n ){\n id\n available\n lot_id\n lot {\n id\n item_id\n expires\n }\n }\n}\n";
|
|
9
9
|
export declare const getPurchaseOrdersBetweenDatesStringQuery: (config?: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
agencyId?: number | string;
|
|
11
|
+
itemId?: number | string;
|
|
12
|
+
payeeCategoryId?: number | string;
|
|
13
13
|
consolidateIdFilter?: boolean;
|
|
14
14
|
lotItemIdExclusion?: number;
|
|
15
15
|
poDetailTagId?: number;
|
|
@@ -204,30 +204,37 @@ query getLotStocksByAgencyId($agency_id: Int){
|
|
|
204
204
|
}
|
|
205
205
|
`;
|
|
206
206
|
const getPurchaseOrdersBetweenDatesStringQuery = (config = {
|
|
207
|
-
agencyFilter: false,
|
|
208
|
-
payeeCategoryFilter: false,
|
|
209
|
-
itemIdFilter: false,
|
|
210
207
|
consolidateIdFilter: false,
|
|
211
208
|
withLotStocks: false,
|
|
212
209
|
betweenIssueDate: false,
|
|
213
210
|
}) => `
|
|
214
211
|
query getPurchaseOrdersBetweenDates(
|
|
215
|
-
$agencyId: Int,
|
|
216
212
|
$startDate: ${config?.betweenIssueDate ? "date" : "timestamp"},
|
|
217
213
|
$endDate: ${config?.betweenIssueDate ? "date" : "timestamp"},
|
|
218
214
|
$lotItemIdExclusion: Int = null,
|
|
219
|
-
$poDetailTagId: Int = null
|
|
220
|
-
$payeeCategoryId: Int = null
|
|
215
|
+
$poDetailTagId: Int = null
|
|
221
216
|
) {
|
|
222
217
|
purchase_orders(
|
|
223
218
|
order_by: {id: desc},
|
|
224
219
|
where: {
|
|
225
|
-
${config.
|
|
226
|
-
|
|
227
|
-
|
|
220
|
+
${config.agencyId
|
|
221
|
+
? `agency_id: {
|
|
222
|
+
_eq: ${config.agencyId}
|
|
223
|
+
},`
|
|
224
|
+
: ""}
|
|
225
|
+
${config.payeeCategoryId
|
|
226
|
+
? `payee: {
|
|
227
|
+
payee_category: {
|
|
228
|
+
id: {
|
|
229
|
+
_eq: ${config.payeeCategoryId}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
},`
|
|
228
233
|
: ""}
|
|
229
|
-
${config.
|
|
230
|
-
?
|
|
234
|
+
${config.itemId
|
|
235
|
+
? `purchase_order_details: {
|
|
236
|
+
item_id: {_eq: ${config.itemId}}
|
|
237
|
+
},`
|
|
231
238
|
: ""}
|
|
232
239
|
${config.lotItemIdExclusion
|
|
233
240
|
? "lots: {item_id: {_neq: $lotItemIdExclusion}},"
|
|
@@ -204,30 +204,37 @@ query getLotStocksByAgencyId($agency_id: Int){
|
|
|
204
204
|
}
|
|
205
205
|
`;
|
|
206
206
|
const getPurchaseOrdersBetweenDatesStringQuery = (config = {
|
|
207
|
-
agencyFilter: false,
|
|
208
|
-
payeeCategoryFilter: false,
|
|
209
|
-
itemIdFilter: false,
|
|
210
207
|
consolidateIdFilter: false,
|
|
211
208
|
withLotStocks: false,
|
|
212
209
|
betweenIssueDate: false,
|
|
213
210
|
}) => `
|
|
214
211
|
query getPurchaseOrdersBetweenDates(
|
|
215
|
-
$agencyId: Int,
|
|
216
212
|
$startDate: ${config?.betweenIssueDate ? "date" : "timestamp"},
|
|
217
213
|
$endDate: ${config?.betweenIssueDate ? "date" : "timestamp"},
|
|
218
214
|
$lotItemIdExclusion: Int = null,
|
|
219
|
-
$poDetailTagId: Int = null
|
|
220
|
-
$payeeCategoryId: Int = null
|
|
215
|
+
$poDetailTagId: Int = null
|
|
221
216
|
) {
|
|
222
217
|
purchase_orders(
|
|
223
218
|
order_by: {id: desc},
|
|
224
219
|
where: {
|
|
225
|
-
${config.
|
|
226
|
-
|
|
227
|
-
|
|
220
|
+
${config.agencyId
|
|
221
|
+
? `agency_id: {
|
|
222
|
+
_eq: ${config.agencyId}
|
|
223
|
+
},`
|
|
224
|
+
: ""}
|
|
225
|
+
${config.payeeCategoryId
|
|
226
|
+
? `payee: {
|
|
227
|
+
payee_category: {
|
|
228
|
+
id: {
|
|
229
|
+
_eq: ${config.payeeCategoryId}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
},`
|
|
228
233
|
: ""}
|
|
229
|
-
${config.
|
|
230
|
-
?
|
|
234
|
+
${config.itemId
|
|
235
|
+
? `purchase_order_details: {
|
|
236
|
+
item_id: {_eq: ${config.itemId}}
|
|
237
|
+
},`
|
|
231
238
|
: ""}
|
|
232
239
|
${config.lotItemIdExclusion
|
|
233
240
|
? "lots: {item_id: {_neq: $lotItemIdExclusion}},"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/graphql",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.66",
|
|
4
4
|
"description": "Queries de uso común para las aplicación de Zauru.",
|
|
5
5
|
"main": "./dist/cjs/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": "
|
|
25
|
+
"gitHead": "7640aacff44c60067dc41d92fa08d2fb582f7acb"
|
|
26
26
|
}
|