@zauru-sdk/graphql 1.0.64 → 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 +4 -4
- package/dist/cjs/GraphQL.queries.js +28 -12
- package/dist/esm/GraphQL.queries.js +28 -12
- 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;
|
|
@@ -20,7 +20,7 @@ export declare const getPayeesStringQuery = "\nquery getPayees {\n payees {\n
|
|
|
20
20
|
export declare const getProvidersStringQuery = "\nquery getProviders {\n payees (where: {vendor: {_eq: true}}) {\n id\n id_number\n name\n tin\n address_line_1\n }\n}\n";
|
|
21
21
|
export declare const getAgenciesStringQuery = "\nquery getAgencies {\n agencies {\n id\n name\n }\n}\n";
|
|
22
22
|
export declare const getWebAppRowStringQuery = "\nquery getWebAppRow($id: Int){\n webapp_rows(where: {id: {_eq: $id}}) {\n data\n }\n}\n";
|
|
23
|
-
export declare const getWebAppRowsByWebAppTableIdStringQuery = "\nquery getWebAppRowsByWebAppTableId ($webapp_table_id: Int) {\n webapp_rows (where: {webapp_table_id: {_eq: $webapp_table_id }}) {\n id\n data\n created_at\n }\n}\n";
|
|
23
|
+
export declare const getWebAppRowsByWebAppTableIdStringQuery = "\nquery getWebAppRowsByWebAppTableId ($webapp_table_id: Int) {\n webapp_rows (\n where: {\n webapp_table_id: {\n _eq: $webapp_table_id \n }\n },\n order_by: { \n id: desc \n }\n ) {\n id\n data\n created_at\n }\n}\n";
|
|
24
24
|
export declare const getPayeeCategoryByIdStringQuery = "\nquery getPayeeCategoryById ($id: Int) {\n payee_categories (where: {id: {_eq: $id }}) {\n payees (order_by: { id: desc }) { \n id\n name\n id_number\n email\n phone\n tin\n active\n address_line_1\n }\n }\n}\n";
|
|
25
25
|
export declare const getPayeeCategoriesByNotesMatchStringQuery: (match: string) => string;
|
|
26
26
|
export declare const getPayeeCategoriesStringQuery = "\nquery getPayeeCategories {\n payee_categories {\n id\n name\n notes\n payees_count\n price_list_id\n }\n}\n";
|
|
@@ -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}},"
|
|
@@ -330,7 +337,16 @@ query getWebAppRow($id: Int){
|
|
|
330
337
|
`;
|
|
331
338
|
exports.getWebAppRowsByWebAppTableIdStringQuery = `
|
|
332
339
|
query getWebAppRowsByWebAppTableId ($webapp_table_id: Int) {
|
|
333
|
-
webapp_rows (
|
|
340
|
+
webapp_rows (
|
|
341
|
+
where: {
|
|
342
|
+
webapp_table_id: {
|
|
343
|
+
_eq: $webapp_table_id
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
order_by: {
|
|
347
|
+
id: desc
|
|
348
|
+
}
|
|
349
|
+
) {
|
|
334
350
|
id
|
|
335
351
|
data
|
|
336
352
|
created_at
|
|
@@ -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}},"
|
|
@@ -330,7 +337,16 @@ query getWebAppRow($id: Int){
|
|
|
330
337
|
`;
|
|
331
338
|
exports.getWebAppRowsByWebAppTableIdStringQuery = `
|
|
332
339
|
query getWebAppRowsByWebAppTableId ($webapp_table_id: Int) {
|
|
333
|
-
webapp_rows (
|
|
340
|
+
webapp_rows (
|
|
341
|
+
where: {
|
|
342
|
+
webapp_table_id: {
|
|
343
|
+
_eq: $webapp_table_id
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
order_by: {
|
|
347
|
+
id: desc
|
|
348
|
+
}
|
|
349
|
+
) {
|
|
334
350
|
id
|
|
335
351
|
data
|
|
336
352
|
created_at
|
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
|
}
|