@zauru-sdk/graphql 2.0.32 → 2.0.37
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 +6 -4
- package/dist/esm/GraphQL.queries.js +30 -32
- package/package.json +2 -2
|
@@ -3,16 +3,19 @@ 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
|
|
6
|
+
export declare const getShipmentsStringQuery: ({ agency_to_id, agency_from_id, suffix, voided, id_number_not_null, id_number, id_number_not_empty, withMovementLots, limit, id, wheres, memoILike, }: {
|
|
7
7
|
agency_to_id?: number;
|
|
8
8
|
agency_from_id?: number;
|
|
9
9
|
suffix?: string;
|
|
10
10
|
id_number_not_null?: boolean;
|
|
11
11
|
voided?: boolean;
|
|
12
|
-
shipped?: boolean;
|
|
13
|
-
delivered?: boolean;
|
|
14
12
|
id_number?: string;
|
|
15
13
|
id_number_not_empty?: boolean;
|
|
14
|
+
withMovementLots?: boolean;
|
|
15
|
+
limit?: number;
|
|
16
|
+
id?: number;
|
|
17
|
+
wheres?: string[];
|
|
18
|
+
memoILike?: string;
|
|
16
19
|
}) => string;
|
|
17
20
|
export declare const getLotsByNameStringQuery: (name: string, entity_id: number) => string;
|
|
18
21
|
export declare const getLotStocksByAgencyIdStringQuery: (agency_id: number) => string;
|
|
@@ -59,7 +62,6 @@ export declare const getEmployeesByAgencyIdStringQuery: (id: number) => string;
|
|
|
59
62
|
export declare const getBundlesByItemCategoryIdStringQuery: (id: number) => string;
|
|
60
63
|
export declare const getBundleByNameStringQuery: (name: string) => string;
|
|
61
64
|
export declare const getItemByNameStringQuery: (name: string) => string;
|
|
62
|
-
export declare const getShipmentsStringQuery: (wheres?: string[]) => string;
|
|
63
65
|
export declare const getAllFormsStringQuery: (config?: {
|
|
64
66
|
withSubmissions: boolean;
|
|
65
67
|
}) => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPrintTemplatesStringQuery = exports.getCasesByResponsibleIdStringQuery = exports.getInvoicesByAgencyIdStringQuery = exports.getPaymentTermByIdStringQuery = exports.getPaymentMethodsStringQuery = exports.getPaymentTermsStringQuery = exports.getSuggestedPricesStringQuery = exports.getCurrenciesStringQuery = exports.getInvoiceFormSubmissionsByInvoiceIdStringQuery = exports.getLastInvoiceFormSubmissionStringQuery = exports.getInvoiceFormSubmissionsByAgencyIdStringQuery = exports.getFormSubmissionByIdStringQuery = exports.getMyCaseFormSubmissionsStringQuery = exports.getFormsByDocumentTypeStringQuery = exports.getFormsStringQuery = exports.getFormByNameStringQuery = exports.getAllFormsStringQuery = exports.
|
|
3
|
+
exports.getPrintTemplatesStringQuery = exports.getCasesByResponsibleIdStringQuery = exports.getInvoicesByAgencyIdStringQuery = exports.getPaymentTermByIdStringQuery = exports.getPaymentMethodsStringQuery = exports.getPaymentTermsStringQuery = exports.getSuggestedPricesStringQuery = exports.getCurrenciesStringQuery = exports.getInvoiceFormSubmissionsByInvoiceIdStringQuery = exports.getLastInvoiceFormSubmissionStringQuery = exports.getInvoiceFormSubmissionsByAgencyIdStringQuery = exports.getFormSubmissionByIdStringQuery = exports.getMyCaseFormSubmissionsStringQuery = exports.getFormsByDocumentTypeStringQuery = exports.getFormsStringQuery = exports.getFormByNameStringQuery = exports.getAllFormsStringQuery = exports.getItemByNameStringQuery = exports.getBundleByNameStringQuery = exports.getBundlesByItemCategoryIdStringQuery = exports.getEmployeesByAgencyIdStringQuery = exports.getEmployeesStringQuery = exports.getEmployeeProfileStringQuery = exports.getConsolidatesBetweenDatesStringQuery = exports.getItemsBySuperCategoryStringQuery = exports.getItemsStringQuery = exports.getItemsByCategoryStringQuery = exports.getItemCategoryByIdStringQuery = exports.getSuperCategoryByIdStringQuery = exports.getPayeeByIdStringQuery = exports.getClientCategoriesStringQuery = exports.getProviderCategoriesStringQuery = exports.getPayeeCategoriesStringQuery = exports.getPayeeCategoriesByNotesMatchStringQuery = exports.getPayeeCategoryByIdStringQuery = exports.getWebAppRowsByWebAppTableIdStringQuery = exports.getWebAppRowStringQuery = exports.getAgenciesStringQuery = exports.getProvidersStringQuery = exports.getPayeesStringQuery = exports.getPurchaseOrdersBetweenDatesStringQuery = exports.getLotStocksByAgencyIdStringQuery = exports.getLotsByNameStringQuery = exports.getShipmentsStringQuery = exports.getPurchaseOrderStringQuery = exports.getPurchaseOrderByIdNumberStringQuery = exports.getLast100ReceptionsStringQuery = void 0;
|
|
4
4
|
const getLast100ReceptionsStringQuery = (agency_id) => `
|
|
5
5
|
query getLast100Receptions {
|
|
6
6
|
purchase_orders(limit: 100, order_by: {created_at: desc}, where: {voided: {_eq: false}, agency_id: {_eq: ${agency_id}}}) {
|
|
@@ -152,7 +152,7 @@ query getPurchaseOrder($id: bigint) @cached {
|
|
|
152
152
|
}
|
|
153
153
|
`;
|
|
154
154
|
exports.getPurchaseOrderStringQuery = getPurchaseOrderStringQuery;
|
|
155
|
-
const
|
|
155
|
+
const getShipmentsStringQuery = ({ agency_to_id, agency_from_id, suffix, voided = false, id_number_not_null = false, id_number, id_number_not_empty = false, withMovementLots = false, limit = 1000, id, wheres, memoILike, }) => {
|
|
156
156
|
let conditions = [];
|
|
157
157
|
conditions.push(`voided: {_eq: ${voided}}`);
|
|
158
158
|
if (suffix) {
|
|
@@ -173,9 +173,25 @@ const getLast100ShipmentsStringQuery = ({ agency_to_id, agency_from_id, suffix,
|
|
|
173
173
|
if (id_number_not_null) {
|
|
174
174
|
conditions.push(`id_number: {_is_null: false}`);
|
|
175
175
|
}
|
|
176
|
+
if (id) {
|
|
177
|
+
conditions.push(`id: {_eq: ${id}}`);
|
|
178
|
+
}
|
|
179
|
+
if (wheres) {
|
|
180
|
+
conditions.push(...wheres);
|
|
181
|
+
}
|
|
182
|
+
if (memoILike) {
|
|
183
|
+
conditions.push(`memo: {_ilike: "%${memoILike}%"}`);
|
|
184
|
+
}
|
|
185
|
+
const movementLots = withMovementLots
|
|
186
|
+
? `lot {
|
|
187
|
+
id
|
|
188
|
+
name
|
|
189
|
+
description
|
|
190
|
+
}`
|
|
191
|
+
: "";
|
|
176
192
|
return `query getLast100Shipments {
|
|
177
193
|
shipments(
|
|
178
|
-
limit:
|
|
194
|
+
limit: ${limit},
|
|
179
195
|
order_by: {id: desc},
|
|
180
196
|
where: {
|
|
181
197
|
${conditions.join(", ")}
|
|
@@ -193,21 +209,26 @@ const getLast100ShipmentsStringQuery = ({ agency_to_id, agency_from_id, suffix,
|
|
|
193
209
|
agency_to_id
|
|
194
210
|
transporter_id
|
|
195
211
|
created_at
|
|
212
|
+
planned_shipping
|
|
213
|
+
planned_delivery
|
|
214
|
+
delivered
|
|
215
|
+
shipped
|
|
216
|
+
shipped_at
|
|
217
|
+
delivered_at
|
|
218
|
+
returned
|
|
219
|
+
returned_at
|
|
196
220
|
movements {
|
|
197
221
|
id
|
|
198
222
|
booked_quantity
|
|
199
223
|
delivered_quantity
|
|
200
224
|
reference
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
name
|
|
204
|
-
description
|
|
205
|
-
}
|
|
225
|
+
item_id
|
|
226
|
+
${movementLots}
|
|
206
227
|
}
|
|
207
228
|
}
|
|
208
229
|
}`;
|
|
209
230
|
};
|
|
210
|
-
exports.
|
|
231
|
+
exports.getShipmentsStringQuery = getShipmentsStringQuery;
|
|
211
232
|
const getLotsByNameStringQuery = (name, entity_id) => `
|
|
212
233
|
query getLots {
|
|
213
234
|
lots (limit: 100, order_by: {id: desc}, where: {entity_id: {_eq: ${entity_id}}, name: {_eq: "${name}"}}) {
|
|
@@ -695,29 +716,6 @@ query getItemByName {
|
|
|
695
716
|
}
|
|
696
717
|
`;
|
|
697
718
|
exports.getItemByNameStringQuery = getItemByNameStringQuery;
|
|
698
|
-
const getShipmentsStringQuery = (wheres = []) => {
|
|
699
|
-
const additionalWheres = wheres.join(",");
|
|
700
|
-
return `query getShipments {
|
|
701
|
-
shipments (${additionalWheres.length > 0 ? `where: {${additionalWheres}},` : ""} order_by: {id: desc}) {
|
|
702
|
-
id
|
|
703
|
-
id_number
|
|
704
|
-
reference
|
|
705
|
-
needs_transport
|
|
706
|
-
payee_id
|
|
707
|
-
booker_id
|
|
708
|
-
shipped
|
|
709
|
-
shipper_id
|
|
710
|
-
delivered
|
|
711
|
-
delivered_at
|
|
712
|
-
voided
|
|
713
|
-
returned
|
|
714
|
-
memo
|
|
715
|
-
planned_delivery
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
`;
|
|
719
|
-
};
|
|
720
|
-
exports.getShipmentsStringQuery = getShipmentsStringQuery;
|
|
721
719
|
const getAllFormsStringQuery = (config = { withSubmissions: false }) => `
|
|
722
720
|
query getAllForms {
|
|
723
721
|
settings_forms (
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/graphql",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.37",
|
|
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": "
|
|
24
|
+
"gitHead": "1cffa483337722e7e3b875db9dad31132a99c5bb"
|
|
25
25
|
}
|