@zauru-sdk/graphql 1.0.105 → 1.0.115
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
|
: "";
|
|
@@ -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
|
: "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/graphql",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.115",
|
|
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": "9a49125d2c7974621d59f96389b9e08e3fa68dc9"
|
|
26
26
|
}
|