@zauru-sdk/graphql 2.0.26 → 2.0.29

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.
@@ -3,9 +3,14 @@ export declare const getPurchaseOrderByIdNumberStringQuery: (id_number: string)
3
3
  export declare const getPurchaseOrderStringQuery: (id: number, config?: {
4
4
  withLotStocks: boolean;
5
5
  }) => string;
6
- export declare const getLast100ShipmentsStringQuery: ({ agency_to_id, suffix, }: {
6
+ export declare const getLast100ShipmentsStringQuery: ({ agency_to_id, suffix, voided, shipped, delivered, id_number_not_null, id_number, }: {
7
7
  agency_to_id?: number;
8
8
  suffix?: string;
9
+ id_number_not_null?: boolean;
10
+ voided?: boolean;
11
+ shipped?: boolean;
12
+ delivered?: boolean;
13
+ id_number?: string;
9
14
  }) => string;
10
15
  export declare const getLotsByNameStringQuery: (name: string, entity_id: number) => string;
11
16
  export declare const getLotStocksByAgencyIdStringQuery: (agency_id: number) => string;
@@ -152,18 +152,23 @@ query getPurchaseOrder($id: bigint) @cached {
152
152
  }
153
153
  `;
154
154
  exports.getPurchaseOrderStringQuery = getPurchaseOrderStringQuery;
155
- const getLast100ShipmentsStringQuery = ({ agency_to_id, suffix, }) => {
156
- let conditions = [
157
- "voided: {_eq: false}",
158
- "shipped: {_eq: false}",
159
- "delivered: {_eq: false}",
160
- ];
155
+ const getLast100ShipmentsStringQuery = ({ agency_to_id, suffix, voided = false, shipped = false, delivered = false, id_number_not_null = false, id_number, }) => {
156
+ let conditions = [];
157
+ conditions.push(`voided: {_eq: ${voided}}`);
158
+ conditions.push(`shipped: {_eq: ${shipped}}`);
159
+ conditions.push(`delivered: {_eq: ${delivered}}`);
161
160
  if (suffix) {
162
161
  conditions.push(`id_number: {_ilike: "%${suffix}%"}`);
163
162
  }
164
163
  if (agency_to_id) {
165
164
  conditions.push(`agency_to_id: {_eq: ${agency_to_id}}`);
166
165
  }
166
+ if (id_number_not_null) {
167
+ conditions.push(`id_number: {_is_null: false}`);
168
+ }
169
+ if (id_number) {
170
+ conditions.push(`id_number: {_eq: "${id_number}"}`);
171
+ }
167
172
  return `query getLast100Shipments {
168
173
  shipments(
169
174
  limit: 100,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/graphql",
3
- "version": "2.0.26",
3
+ "version": "2.0.29",
4
4
  "description": "Queries de uso común para las aplicación de Zauru.",
5
5
  "main": "./dist/esm/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -21,5 +21,5 @@
21
21
  "devDependencies": {
22
22
  "typescript": "^5.1.6"
23
23
  },
24
- "gitHead": "41440682edbc853c6e9ce4f7c982dbf4ac9a185b"
24
+ "gitHead": "c85e2aba30765b5735d0f1348cb37f4e666e96a2"
25
25
  }