@zauru-sdk/graphql 1.0.105 → 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
  : "";
@@ -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.105",
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": "57fb17e6d485c1d661432a1517fe8c4e8d354e78"
25
+ "gitHead": "f24dbaac6f5cc9543bdfcd33f20f704ead3965c3"
26
26
  }