@zauru-sdk/graphql 2.19.1 → 2.25.0
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 +1 -1
- package/dist/esm/GraphQL.queries.js +45 -30
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const getLast100ReceptionsStringQuery: (agency_id
|
|
1
|
+
export declare const getLast100ReceptionsStringQuery: (agency_id?: number | string) => string;
|
|
2
2
|
export declare const getPurchaseOrderByIdNumberStringQuery: (id_number: string) => string;
|
|
3
3
|
export declare const getPurchaseOrderStringQuery: (id: number, config?: {
|
|
4
4
|
withLotStocks: boolean;
|
|
@@ -1,38 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getPrintTemplatesStringQuery = exports.getCasesStringQuery = exports.getInvoicesByAgencyIdStringQuery = exports.getPaymentTermByIdStringQuery = exports.getPaymentMethodsStringQuery = exports.getPaymentTermsStringQuery = exports.getSuggestedPricesStringQuery = exports.getCurrenciesStringQuery = exports.getInvoiceFormSubmissionsByInvoiceIdStringQuery = exports.getCaseFormSubmissionsByCaseIdStringQuery = 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.getSerialsStringQuery = exports.getLotStocksByAgencyIdStringQuery = exports.getLotsByNameStringQuery = exports.getShipmentsStringQuery = exports.getPurchaseOrderStringQuery = exports.getPurchaseOrderByIdNumberStringQuery = exports.getLast100ReceptionsStringQuery = void 0;
|
|
4
|
-
const getLast100ReceptionsStringQuery = (agency_id) =>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
created_at
|
|
9
|
-
due
|
|
10
|
-
id_number
|
|
11
|
-
memo
|
|
12
|
-
payee_id
|
|
13
|
-
issue_date
|
|
14
|
-
discount
|
|
15
|
-
other_charges
|
|
16
|
-
authorized
|
|
17
|
-
received
|
|
18
|
-
transport_type
|
|
19
|
-
shipment_reference
|
|
20
|
-
purchase_order_details {
|
|
21
|
-
item_id
|
|
22
|
-
id
|
|
23
|
-
reference
|
|
24
|
-
booked_quantity
|
|
25
|
-
delivered_quantity
|
|
4
|
+
const getLast100ReceptionsStringQuery = (agency_id) => {
|
|
5
|
+
const conditions = ["voided: {_eq: false}"];
|
|
6
|
+
if (agency_id) {
|
|
7
|
+
conditions.push(`agency_id: {_eq: ${agency_id}}`);
|
|
26
8
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
9
|
+
return `
|
|
10
|
+
query getLast100Receptions {
|
|
11
|
+
purchase_orders(
|
|
12
|
+
limit: 100,
|
|
13
|
+
order_by: {
|
|
14
|
+
created_at: desc
|
|
15
|
+
},
|
|
16
|
+
where: {
|
|
17
|
+
${conditions.join(", ")}
|
|
18
|
+
}
|
|
19
|
+
) {
|
|
20
|
+
id
|
|
21
|
+
created_at
|
|
22
|
+
due
|
|
23
|
+
id_number
|
|
24
|
+
memo
|
|
25
|
+
payee_id
|
|
26
|
+
issue_date
|
|
27
|
+
discount
|
|
28
|
+
other_charges
|
|
29
|
+
authorized
|
|
30
|
+
received
|
|
31
|
+
transport_type
|
|
32
|
+
shipment_reference
|
|
33
|
+
reference
|
|
34
|
+
purchase_order_details {
|
|
35
|
+
item_id
|
|
36
|
+
id
|
|
37
|
+
reference
|
|
38
|
+
booked_quantity
|
|
39
|
+
delivered_quantity
|
|
40
|
+
}
|
|
41
|
+
lots(where: {active: {_eq: true}}) {
|
|
42
|
+
id
|
|
43
|
+
name
|
|
44
|
+
description
|
|
45
|
+
item_id
|
|
46
|
+
}
|
|
47
|
+
}
|
|
32
48
|
}
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
`;
|
|
49
|
+
`;
|
|
50
|
+
};
|
|
36
51
|
exports.getLast100ReceptionsStringQuery = getLast100ReceptionsStringQuery;
|
|
37
52
|
const getPurchaseOrderByIdNumberStringQuery = (id_number) => `
|
|
38
53
|
query getPurchaseOrderByIdNumber {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/graphql",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.25.0",
|
|
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": "da550f653a8f3439364198939bb2fc1e3aeb2752"
|
|
25
25
|
}
|