@zauru-sdk/graphql 1.0.65 → 1.0.68
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 +4 -4
- package/dist/cjs/GraphQL.queries.js +21 -12
- package/dist/esm/GraphQL.queries.js +21 -12
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const getLast100ReceptionsStringQuery = "\nquery getLast100Receptions($agencyId: Int) @cached {\n purchase_orders(limit: 100, order_by: {created_at: desc}, where: {voided: {_eq: false}, agency_id: {_eq: $agencyId}}) {\n id\n created_at\n due\n id_number\n memo\n payee_id\n issue_date\n discount\n authorized\n received\n transport_type\n purchase_order_details {\n item_id\n id\n reference\n booked_quantity\n delivered_quantity\n }\n lots(where: {active: {_eq: true}}) {\n id\n name\n description\n item_id\n }\n }\n}\n";
|
|
1
|
+
export declare const getLast100ReceptionsStringQuery = "\nquery getLast100Receptions($agencyId: Int) @cached {\n purchase_orders(limit: 100, order_by: {created_at: desc}, where: {voided: {_eq: false}, agency_id: {_eq: $agencyId}}) {\n id\n created_at\n due\n id_number\n memo\n payee_id\n issue_date\n discount\n other_charges\n authorized\n received\n transport_type\n purchase_order_details {\n item_id\n id\n reference\n booked_quantity\n delivered_quantity\n }\n lots(where: {active: {_eq: true}}) {\n id\n name\n description\n item_id\n }\n }\n}\n";
|
|
2
2
|
export declare const getPurchaseOrderByIdNumberStringQuery = "\nquery getPurchaseOrderByIdNumber($id_number: String) @cached {\n purchase_orders(where: {id_number: {_eq: $id_number}}) {\n id\n created_at\n due\n id_number\n memo\n payee_id\n transport_type\n reference\n incoterm_destination\n issue_date\n voided\n received\n discount\n other_charges\n webapp_table_rowables {\n webapp_rows {\n data\n }\n }\n purchase_order_details {\n item_id\n id\n reference\n booked_quantity\n delivered_quantity\n }\n lots(where: {active: {_eq: true}}) {\n id\n description\n }\n receptions {\n id\n received\n voided\n }\n shipments {\n shipment_id\n }\n }\n}\n";
|
|
3
3
|
export declare const getPurchaseOrderStringQuery: (config?: {
|
|
4
4
|
withLotStocks: boolean;
|
|
@@ -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;
|
|
@@ -12,6 +12,7 @@ query getLast100Receptions($agencyId: Int) @cached {
|
|
|
12
12
|
payee_id
|
|
13
13
|
issue_date
|
|
14
14
|
discount
|
|
15
|
+
other_charges
|
|
15
16
|
authorized
|
|
16
17
|
received
|
|
17
18
|
transport_type
|
|
@@ -204,30 +205,37 @@ query getLotStocksByAgencyId($agency_id: Int){
|
|
|
204
205
|
}
|
|
205
206
|
`;
|
|
206
207
|
const getPurchaseOrdersBetweenDatesStringQuery = (config = {
|
|
207
|
-
agencyFilter: false,
|
|
208
|
-
payeeCategoryFilter: false,
|
|
209
|
-
itemIdFilter: false,
|
|
210
208
|
consolidateIdFilter: false,
|
|
211
209
|
withLotStocks: false,
|
|
212
210
|
betweenIssueDate: false,
|
|
213
211
|
}) => `
|
|
214
212
|
query getPurchaseOrdersBetweenDates(
|
|
215
|
-
$agencyId: Int,
|
|
216
213
|
$startDate: ${config?.betweenIssueDate ? "date" : "timestamp"},
|
|
217
214
|
$endDate: ${config?.betweenIssueDate ? "date" : "timestamp"},
|
|
218
215
|
$lotItemIdExclusion: Int = null,
|
|
219
|
-
$poDetailTagId: Int = null
|
|
220
|
-
$payeeCategoryId: Int = null
|
|
216
|
+
$poDetailTagId: Int = null
|
|
221
217
|
) {
|
|
222
|
-
purchase_orders(
|
|
218
|
+
purchase_orders (
|
|
223
219
|
order_by: {id: desc},
|
|
224
220
|
where: {
|
|
225
|
-
${config.
|
|
226
|
-
|
|
227
|
-
|
|
221
|
+
${config.agencyId
|
|
222
|
+
? `agency_id: {
|
|
223
|
+
_eq: ${config.agencyId}
|
|
224
|
+
},`
|
|
225
|
+
: ""}
|
|
226
|
+
${config.payeeCategoryId
|
|
227
|
+
? `payee: {
|
|
228
|
+
payee_category: {
|
|
229
|
+
id: {
|
|
230
|
+
_eq: ${config.payeeCategoryId}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},`
|
|
228
234
|
: ""}
|
|
229
|
-
${config.
|
|
230
|
-
?
|
|
235
|
+
${config.itemId
|
|
236
|
+
? `purchase_order_details: {
|
|
237
|
+
item_id: {_eq: ${config.itemId}}
|
|
238
|
+
},`
|
|
231
239
|
: ""}
|
|
232
240
|
${config.lotItemIdExclusion
|
|
233
241
|
? "lots: {item_id: {_neq: $lotItemIdExclusion}},"
|
|
@@ -250,6 +258,7 @@ query getPurchaseOrdersBetweenDates(
|
|
|
250
258
|
issue_date
|
|
251
259
|
agency_id
|
|
252
260
|
discount
|
|
261
|
+
other_charges
|
|
253
262
|
consolidate_id
|
|
254
263
|
purchase_order_details {
|
|
255
264
|
item_id
|
|
@@ -12,6 +12,7 @@ query getLast100Receptions($agencyId: Int) @cached {
|
|
|
12
12
|
payee_id
|
|
13
13
|
issue_date
|
|
14
14
|
discount
|
|
15
|
+
other_charges
|
|
15
16
|
authorized
|
|
16
17
|
received
|
|
17
18
|
transport_type
|
|
@@ -204,30 +205,37 @@ query getLotStocksByAgencyId($agency_id: Int){
|
|
|
204
205
|
}
|
|
205
206
|
`;
|
|
206
207
|
const getPurchaseOrdersBetweenDatesStringQuery = (config = {
|
|
207
|
-
agencyFilter: false,
|
|
208
|
-
payeeCategoryFilter: false,
|
|
209
|
-
itemIdFilter: false,
|
|
210
208
|
consolidateIdFilter: false,
|
|
211
209
|
withLotStocks: false,
|
|
212
210
|
betweenIssueDate: false,
|
|
213
211
|
}) => `
|
|
214
212
|
query getPurchaseOrdersBetweenDates(
|
|
215
|
-
$agencyId: Int,
|
|
216
213
|
$startDate: ${config?.betweenIssueDate ? "date" : "timestamp"},
|
|
217
214
|
$endDate: ${config?.betweenIssueDate ? "date" : "timestamp"},
|
|
218
215
|
$lotItemIdExclusion: Int = null,
|
|
219
|
-
$poDetailTagId: Int = null
|
|
220
|
-
$payeeCategoryId: Int = null
|
|
216
|
+
$poDetailTagId: Int = null
|
|
221
217
|
) {
|
|
222
|
-
purchase_orders(
|
|
218
|
+
purchase_orders (
|
|
223
219
|
order_by: {id: desc},
|
|
224
220
|
where: {
|
|
225
|
-
${config.
|
|
226
|
-
|
|
227
|
-
|
|
221
|
+
${config.agencyId
|
|
222
|
+
? `agency_id: {
|
|
223
|
+
_eq: ${config.agencyId}
|
|
224
|
+
},`
|
|
225
|
+
: ""}
|
|
226
|
+
${config.payeeCategoryId
|
|
227
|
+
? `payee: {
|
|
228
|
+
payee_category: {
|
|
229
|
+
id: {
|
|
230
|
+
_eq: ${config.payeeCategoryId}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},`
|
|
228
234
|
: ""}
|
|
229
|
-
${config.
|
|
230
|
-
?
|
|
235
|
+
${config.itemId
|
|
236
|
+
? `purchase_order_details: {
|
|
237
|
+
item_id: {_eq: ${config.itemId}}
|
|
238
|
+
},`
|
|
231
239
|
: ""}
|
|
232
240
|
${config.lotItemIdExclusion
|
|
233
241
|
? "lots: {item_id: {_neq: $lotItemIdExclusion}},"
|
|
@@ -250,6 +258,7 @@ query getPurchaseOrdersBetweenDates(
|
|
|
250
258
|
issue_date
|
|
251
259
|
agency_id
|
|
252
260
|
discount
|
|
261
|
+
other_charges
|
|
253
262
|
consolidate_id
|
|
254
263
|
purchase_order_details {
|
|
255
264
|
item_id
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/graphql",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.68",
|
|
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": "907be35569dc738a582858bb47d96910ab5dcec3"
|
|
26
26
|
}
|