@zauru-sdk/graphql 6.0.0 → 6.2.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.
@@ -158,3 +158,8 @@ export declare const getCasesStringQuery: (filters?: {
158
158
  includeSeller?: boolean;
159
159
  }) => string;
160
160
  export declare const getPrintTemplatesStringQuery = "\nquery getPrintTemplates {\n print_templates {\n id\n name\n }\n}\n";
161
+ export declare const getProductionWorkOrderStringQuery: (config: {
162
+ id: number | string;
163
+ closed?: boolean;
164
+ voided?: boolean;
165
+ }) => string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
3
+ exports.getProductionWorkOrderStringQuery = 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
4
  const getLast100ReceptionsStringQuery = (agency_id) => {
5
5
  const conditions = ["voided: {_eq: false}"];
6
6
  if (agency_id) {
@@ -546,6 +546,7 @@ const getPurchaseOrdersBetweenDatesStringQuery = (startDate, endDate, config) =>
546
546
  agency_id
547
547
  discount
548
548
  other_charges
549
+ total
549
550
  consolidate_id
550
551
  shipment_reference
551
552
  reference
@@ -1772,3 +1773,47 @@ query getPrintTemplates {
1772
1773
  }
1773
1774
  }
1774
1775
  `;
1776
+ const getProductionWorkOrderStringQuery = (config) => {
1777
+ const conditions = [`id: { _eq: ${config.id} }`];
1778
+ if (config.closed !== undefined) {
1779
+ conditions.push(`closed: { _eq: ${config.closed} }`);
1780
+ }
1781
+ if (config.voided !== undefined) {
1782
+ conditions.push(`voided: { _eq: ${config.voided} }`);
1783
+ }
1784
+ return `query getProductionWorkOrder {
1785
+ production_work_orders(where: { ${conditions.join(", ")} }) {
1786
+ id
1787
+ zid
1788
+ id_number
1789
+ agency_id
1790
+ reference
1791
+ order_date
1792
+ needs_delivery
1793
+ closed
1794
+ voided
1795
+ closed_at
1796
+ assigned_invoice_id
1797
+ assigned_agency_id
1798
+ assigned_lot_id
1799
+ assigned_serial_id
1800
+ responsible_id
1801
+ tag_id
1802
+ memo
1803
+ production_work_order_details {
1804
+ id
1805
+ work_order_id
1806
+ item_id
1807
+ bundle_id
1808
+ lot_id
1809
+ serial_id
1810
+ cost_center_id
1811
+ booked_quantity
1812
+ delivered_quantity
1813
+ reference
1814
+ average_cost
1815
+ }
1816
+ }
1817
+ }`;
1818
+ };
1819
+ exports.getProductionWorkOrderStringQuery = getProductionWorkOrderStringQuery;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/graphql",
3
- "version": "6.0.0",
3
+ "version": "6.2.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",
@@ -22,5 +22,5 @@
22
22
  "devDependencies": {
23
23
  "typescript": "^5.1.6"
24
24
  },
25
- "gitHead": "32fe3db68a20bc4bfec9b59db37bd1bf221acc34"
25
+ "gitHead": "2950c31a115494a2beefde49d411be7983d57982"
26
26
  }