@zauru-sdk/graphql 1.0.94 → 1.0.114
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.
|
@@ -23,6 +23,8 @@ export declare const getPurchaseOrdersBetweenDatesStringQuery: (startDate: strin
|
|
|
23
23
|
withWebAppRows?: boolean;
|
|
24
24
|
payeeCategoryIds?: number[];
|
|
25
25
|
excludePayeeCategoryIds?: number[];
|
|
26
|
+
discountComparisonOperator?: "_eq" | "_neq" | "_gte" | "_lte" | "_gt" | "_lt";
|
|
27
|
+
discount?: number;
|
|
26
28
|
}) => string;
|
|
27
29
|
export declare const getPayeesStringQuery = "\nquery getPayees {\n payees {\n id\n id_number\n name\n tin\n vendor\n address_line_1\n }\n}\n";
|
|
28
30
|
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";
|
|
@@ -249,6 +249,9 @@ const getPurchaseOrdersBetweenDatesStringQuery = (startDate, endDate, config) =>
|
|
|
249
249
|
config.excludePayeeCategoryIds.length > 0) {
|
|
250
250
|
conditions.push(`payee: { payee_category: { id: { _nin: [${config.excludePayeeCategoryIds.join(",")}] } } }`);
|
|
251
251
|
}
|
|
252
|
+
if (config.discountComparisonOperator && config.discount) {
|
|
253
|
+
conditions.push(`discount: { ${config.discountComparisonOperator}: ${config.discount} }`);
|
|
254
|
+
}
|
|
252
255
|
const whereClause = conditions.length
|
|
253
256
|
? `where: { ${conditions.join(", ")} }`
|
|
254
257
|
: "";
|
|
@@ -363,7 +366,9 @@ query getAgencies {
|
|
|
363
366
|
const getWebAppRowStringQuery = (id) => `
|
|
364
367
|
query getWebAppRow {
|
|
365
368
|
webapp_rows(where: {id: {_eq: ${id}}}) {
|
|
369
|
+
id
|
|
366
370
|
data
|
|
371
|
+
created_at
|
|
367
372
|
}
|
|
368
373
|
}
|
|
369
374
|
`;
|
|
@@ -249,6 +249,9 @@ const getPurchaseOrdersBetweenDatesStringQuery = (startDate, endDate, config) =>
|
|
|
249
249
|
config.excludePayeeCategoryIds.length > 0) {
|
|
250
250
|
conditions.push(`payee: { payee_category: { id: { _nin: [${config.excludePayeeCategoryIds.join(",")}] } } }`);
|
|
251
251
|
}
|
|
252
|
+
if (config.discountComparisonOperator && config.discount) {
|
|
253
|
+
conditions.push(`discount: { ${config.discountComparisonOperator}: ${config.discount} }`);
|
|
254
|
+
}
|
|
252
255
|
const whereClause = conditions.length
|
|
253
256
|
? `where: { ${conditions.join(", ")} }`
|
|
254
257
|
: "";
|
|
@@ -363,7 +366,9 @@ query getAgencies {
|
|
|
363
366
|
const getWebAppRowStringQuery = (id) => `
|
|
364
367
|
query getWebAppRow {
|
|
365
368
|
webapp_rows(where: {id: {_eq: ${id}}}) {
|
|
369
|
+
id
|
|
366
370
|
data
|
|
371
|
+
created_at
|
|
367
372
|
}
|
|
368
373
|
}
|
|
369
374
|
`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/graphql",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.114",
|
|
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": "f24dbaac6f5cc9543bdfcd33f20f704ead3965c3"
|
|
26
26
|
}
|