@zauru-sdk/graphql 1.0.79 → 1.0.81
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.
|
@@ -78,6 +78,9 @@ export declare const getSuggestedPricesStringQuery: (config?: {
|
|
|
78
78
|
onlyCurrent: boolean;
|
|
79
79
|
}) => string;
|
|
80
80
|
export declare const getPaymentTermsStringQuery = "\nquery getPaymentTerms {\n payment_terms {\n active\n id\n memo\n name\n }\n}\n";
|
|
81
|
+
export declare const getPaymentMethodsStringQuery: (config: {
|
|
82
|
+
onlyActives: boolean;
|
|
83
|
+
}) => string;
|
|
81
84
|
export declare const getPaymentTermByIdStringQuery = "\nquery getPaymentTermById ($id: Int) {\n payment_terms (where: {id: {_eq: $id }}) {\n active\n id\n memo\n name\n account_from_id\n account_to_id\n allowed_payment_terms {\n payee_category_id\n }\n }\n}\n";
|
|
82
85
|
export declare const getInvoicesByAgencyIdStringQuery = "\nquery getInvoicesByAgencyId($id: Int) {\n invoices(limit: 1000, where: {agency_id: {_eq: $id}, voided: {_eq: false}}, order_by: {id: desc}) {\n id\n zid\n id_number\n currency_id\n date\n payee_id\n total\n subtotal\n seller_id\n order_number\n memo\n issued\n invoice_number\n id_number\n payment_term_id\n reference\n submission_invoices {\n id\n settings_form_submission {\n zid\n voided\n settings_form {\n id\n zid\n }\n }\n }\n invoice_details {\n bundle_id\n id\n item_bundle_name\n item_bundle_description\n item_id\n price\n quantity\n unit_price\n }\n payee {\n name\n payee_category_id\n }\n }\n}\n";
|
|
83
86
|
export declare const getCasesByResponsibleIdStringQuery: (wheres?: string[]) => 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.getPaymentTermsStringQuery = exports.getSuggestedPricesStringQuery = exports.getCurrenciesStringQuery = exports.getInvoiceFormSubmissionsByInvoiceIdStringQuery = exports.getLastInvoiceFormSubmissionStringQuery = exports.getInvoiceFormSubmissionsByAgencyIdStringQuery = exports.getFormSubmissionByIdStringQuery = exports.getMyCaseFormSubmissionsStringQuery = exports.getFormsByDocumentTypeStringQuery = exports.getFormsStringQuery = exports.getFormByNameStringQuery = exports.getAllFormsStringQuery = exports.getShipmentsStringQuery = exports.getItemByNameStringQuery = exports.getBundleByNameStringQuery = exports.getBundlesByItemCategoryIdStringQuery = exports.getEmployeesByAgencyIdStringQuery = 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.getShipmentsByToAgencyLast100StringQuery = exports.getPurchaseOrderStringQuery = exports.getPurchaseOrderByIdNumberStringQuery = exports.getLast100ReceptionsStringQuery = void 0;
|
|
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.getShipmentsStringQuery = exports.getItemByNameStringQuery = exports.getBundleByNameStringQuery = exports.getBundlesByItemCategoryIdStringQuery = exports.getEmployeesByAgencyIdStringQuery = 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.getShipmentsByToAgencyLast100StringQuery = exports.getPurchaseOrderStringQuery = exports.getPurchaseOrderByIdNumberStringQuery = exports.getLast100ReceptionsStringQuery = void 0;
|
|
4
4
|
exports.getLast100ReceptionsStringQuery = `
|
|
5
5
|
query getLast100Receptions($agencyId: Int) @cached {
|
|
6
6
|
purchase_orders(limit: 100, order_by: {created_at: desc}, where: {voided: {_eq: false}, agency_id: {_eq: $agencyId}}) {
|
|
@@ -1158,6 +1158,28 @@ query getPaymentTerms {
|
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
1160
1160
|
`;
|
|
1161
|
+
const getPaymentMethodsStringQuery = (config) => {
|
|
1162
|
+
const conditions = [];
|
|
1163
|
+
if (config.onlyActives) {
|
|
1164
|
+
conditions.push(`active: { _eq: true}`);
|
|
1165
|
+
}
|
|
1166
|
+
const whereClause = conditions.length
|
|
1167
|
+
? `where: { ${conditions.join(", ")} }`
|
|
1168
|
+
: "";
|
|
1169
|
+
return `query getPaymentMethods {
|
|
1170
|
+
payment_methods (
|
|
1171
|
+
order_by: { id: desc },
|
|
1172
|
+
${whereClause}
|
|
1173
|
+
) {
|
|
1174
|
+
id
|
|
1175
|
+
active
|
|
1176
|
+
name
|
|
1177
|
+
avoid_overpay_showing_change
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
`;
|
|
1181
|
+
};
|
|
1182
|
+
exports.getPaymentMethodsStringQuery = getPaymentMethodsStringQuery;
|
|
1161
1183
|
exports.getPaymentTermByIdStringQuery = `
|
|
1162
1184
|
query getPaymentTermById ($id: Int) {
|
|
1163
1185
|
payment_terms (where: {id: {_eq: $id }}) {
|
|
@@ -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.getPaymentTermsStringQuery = exports.getSuggestedPricesStringQuery = exports.getCurrenciesStringQuery = exports.getInvoiceFormSubmissionsByInvoiceIdStringQuery = exports.getLastInvoiceFormSubmissionStringQuery = exports.getInvoiceFormSubmissionsByAgencyIdStringQuery = exports.getFormSubmissionByIdStringQuery = exports.getMyCaseFormSubmissionsStringQuery = exports.getFormsByDocumentTypeStringQuery = exports.getFormsStringQuery = exports.getFormByNameStringQuery = exports.getAllFormsStringQuery = exports.getShipmentsStringQuery = exports.getItemByNameStringQuery = exports.getBundleByNameStringQuery = exports.getBundlesByItemCategoryIdStringQuery = exports.getEmployeesByAgencyIdStringQuery = 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.getShipmentsByToAgencyLast100StringQuery = exports.getPurchaseOrderStringQuery = exports.getPurchaseOrderByIdNumberStringQuery = exports.getLast100ReceptionsStringQuery = void 0;
|
|
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.getShipmentsStringQuery = exports.getItemByNameStringQuery = exports.getBundleByNameStringQuery = exports.getBundlesByItemCategoryIdStringQuery = exports.getEmployeesByAgencyIdStringQuery = 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.getShipmentsByToAgencyLast100StringQuery = exports.getPurchaseOrderStringQuery = exports.getPurchaseOrderByIdNumberStringQuery = exports.getLast100ReceptionsStringQuery = void 0;
|
|
4
4
|
exports.getLast100ReceptionsStringQuery = `
|
|
5
5
|
query getLast100Receptions($agencyId: Int) @cached {
|
|
6
6
|
purchase_orders(limit: 100, order_by: {created_at: desc}, where: {voided: {_eq: false}, agency_id: {_eq: $agencyId}}) {
|
|
@@ -1158,6 +1158,28 @@ query getPaymentTerms {
|
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
1160
1160
|
`;
|
|
1161
|
+
const getPaymentMethodsStringQuery = (config) => {
|
|
1162
|
+
const conditions = [];
|
|
1163
|
+
if (config.onlyActives) {
|
|
1164
|
+
conditions.push(`active: { _eq: true}`);
|
|
1165
|
+
}
|
|
1166
|
+
const whereClause = conditions.length
|
|
1167
|
+
? `where: { ${conditions.join(", ")} }`
|
|
1168
|
+
: "";
|
|
1169
|
+
return `query getPaymentMethods {
|
|
1170
|
+
payment_methods (
|
|
1171
|
+
order_by: { id: desc },
|
|
1172
|
+
${whereClause}
|
|
1173
|
+
) {
|
|
1174
|
+
id
|
|
1175
|
+
active
|
|
1176
|
+
name
|
|
1177
|
+
avoid_overpay_showing_change
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
`;
|
|
1181
|
+
};
|
|
1182
|
+
exports.getPaymentMethodsStringQuery = getPaymentMethodsStringQuery;
|
|
1161
1183
|
exports.getPaymentTermByIdStringQuery = `
|
|
1162
1184
|
query getPaymentTermById ($id: Int) {
|
|
1163
1185
|
payment_terms (where: {id: {_eq: $id }}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/graphql",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.81",
|
|
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": "24f4eeb19473bf56b1681e21ca5d7db831429c4a"
|
|
26
26
|
}
|