@zauru-sdk/graphql 1.0.69 → 1.0.72

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.
@@ -61,6 +61,7 @@ export declare const getInvoiceFormSubmissionsByAgencyIdStringQuery: (filters?:
61
61
  bundle_ids?: number[];
62
62
  startDate?: string;
63
63
  endDate?: string;
64
+ formZid?: number | string;
64
65
  }) => string;
65
66
  export declare const getLastInvoiceFormSubmissionStringQuery: (filters?: {
66
67
  formZid?: number;
@@ -79,3 +80,4 @@ export declare const getPaymentTermsStringQuery = "\nquery getPaymentTerms {\n
79
80
  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";
80
81
  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";
81
82
  export declare const getCasesByResponsibleIdStringQuery: (wheres?: string[]) => string;
83
+ export declare const getPrintTemplatesStringQuery = "\nquery getPrintTemplates {\n print_templates {\n id\n name\n }\n}\n";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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.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}}) {
@@ -891,6 +891,9 @@ query getInvoiceFormSubmissionsByAgencyId (
891
891
  submission_invoices(
892
892
  where: {
893
893
  settings_form_submission: {
894
+ ${filters?.formZid
895
+ ? `settings_form: {zid: {_eq: ${filters?.formZid}}},`
896
+ : ""}
894
897
  ${filters?.some_field_value
895
898
  ? `settings_form_submission_values: {
896
899
  value: { _eq: "${filters?.some_field_value}" }
@@ -899,13 +902,15 @@ query getInvoiceFormSubmissionsByAgencyId (
899
902
  voided: {_eq: false}
900
903
  },
901
904
  ${filters?.startDate?.length && filters?.endDate?.length
902
- ? `created_at: { _gte: "${filters?.startDate}", _lte: "${filters?.endDate}" },`
905
+ ? `created_at: { _gte: "${filters?.startDate}T00:00:00", _lte: "${filters?.endDate}T00:00:00" },`
903
906
  : ""}
904
907
  invoice: {
905
908
  agency_id: {_eq: $agency_id},
906
909
  ${filters?.seller_id ? `seller_id: {_eq: ${filters?.seller_id} },` : ""}
907
910
  ${filters?.payee_id_number_search
908
- ? `payee: { id_number: { _ilike: "%${filters?.payee_id_number_search}%"} },`
911
+ ? `payee: {
912
+ id_number: { _ilike: "%${filters?.payee_id_number_search}%"}
913
+ },`
909
914
  : ""}
910
915
  ${filters?.item_ids?.length
911
916
  ? `invoice_details: {item_id: {_in: [${filters?.item_ids?.join(",")}]}}`
@@ -1229,3 +1234,11 @@ const getCasesByResponsibleIdStringQuery = (wheres = []) => {
1229
1234
  `;
1230
1235
  };
1231
1236
  exports.getCasesByResponsibleIdStringQuery = getCasesByResponsibleIdStringQuery;
1237
+ exports.getPrintTemplatesStringQuery = `
1238
+ query getPrintTemplates {
1239
+ print_templates {
1240
+ id
1241
+ name
1242
+ }
1243
+ }
1244
+ `;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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.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}}) {
@@ -891,6 +891,9 @@ query getInvoiceFormSubmissionsByAgencyId (
891
891
  submission_invoices(
892
892
  where: {
893
893
  settings_form_submission: {
894
+ ${filters?.formZid
895
+ ? `settings_form: {zid: {_eq: ${filters?.formZid}}},`
896
+ : ""}
894
897
  ${filters?.some_field_value
895
898
  ? `settings_form_submission_values: {
896
899
  value: { _eq: "${filters?.some_field_value}" }
@@ -899,13 +902,15 @@ query getInvoiceFormSubmissionsByAgencyId (
899
902
  voided: {_eq: false}
900
903
  },
901
904
  ${filters?.startDate?.length && filters?.endDate?.length
902
- ? `created_at: { _gte: "${filters?.startDate}", _lte: "${filters?.endDate}" },`
905
+ ? `created_at: { _gte: "${filters?.startDate}T00:00:00", _lte: "${filters?.endDate}T00:00:00" },`
903
906
  : ""}
904
907
  invoice: {
905
908
  agency_id: {_eq: $agency_id},
906
909
  ${filters?.seller_id ? `seller_id: {_eq: ${filters?.seller_id} },` : ""}
907
910
  ${filters?.payee_id_number_search
908
- ? `payee: { id_number: { _ilike: "%${filters?.payee_id_number_search}%"} },`
911
+ ? `payee: {
912
+ id_number: { _ilike: "%${filters?.payee_id_number_search}%"}
913
+ },`
909
914
  : ""}
910
915
  ${filters?.item_ids?.length
911
916
  ? `invoice_details: {item_id: {_in: [${filters?.item_ids?.join(",")}]}}`
@@ -1229,3 +1234,11 @@ const getCasesByResponsibleIdStringQuery = (wheres = []) => {
1229
1234
  `;
1230
1235
  };
1231
1236
  exports.getCasesByResponsibleIdStringQuery = getCasesByResponsibleIdStringQuery;
1237
+ exports.getPrintTemplatesStringQuery = `
1238
+ query getPrintTemplates {
1239
+ print_templates {
1240
+ id
1241
+ name
1242
+ }
1243
+ }
1244
+ `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/graphql",
3
- "version": "1.0.69",
3
+ "version": "1.0.72",
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": "46dd382e956e8b34c2a65ef078d8fddb2cdd434c"
25
+ "gitHead": "ac02d7a25f80e844c4c16971fd7c3df76be5c2f3"
26
26
  }