@zauru-sdk/services 1.0.97 → 1.0.99

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.
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getGeneralQuery = void 0;
7
7
  const common_1 = require("@zauru-sdk/common");
8
- const common_js_1 = require("~/common.js");
9
- const httpGraphQL_js_1 = __importDefault(require("~/zauru/httpGraphQL.js"));
8
+ const common_js_1 = require("../common.js");
9
+ const httpGraphQL_js_1 = __importDefault(require("../zauru/httpGraphQL.js"));
10
10
  /**
11
11
  * getGeneralQuery
12
12
  * @param headers
@@ -37,12 +37,12 @@ async function createMotivoRechazo(headers, session, body) {
37
37
  });
38
38
  }
39
39
  exports.createMotivoRechazo = createMotivoRechazo;
40
- async function updateMotivosRechazo(headers, session, id, Nombre) {
40
+ async function updateMotivosRechazo(headers, session, id, body) {
41
41
  return (0, common_1.handlePossibleAxiosErrors)(async () => {
42
42
  const { recepciones_rejection_types_webapp_table_id } = await (0, common_js_1.getVariablesByName)(headers, session, [
43
43
  "recepciones_rejection_types_webapp_table_id",
44
44
  ]);
45
- const response = await (0, zauru_web_app_tables_js_1.updateWebAppTableRegister)(headers, recepciones_rejection_types_webapp_table_id, id, { Nombre });
45
+ const response = await (0, zauru_web_app_tables_js_1.updateWebAppTableRegister)(headers, recepciones_rejection_types_webapp_table_id, id, body);
46
46
  return response;
47
47
  });
48
48
  }
@@ -371,7 +371,7 @@ const getGraphQLPurchaseOrderBetweenDates = (session, dates, config = {}) => {
371
371
  if (finalConfig.withShipmentToMyAgency) {
372
372
  responseData = response.data?.data?.purchase_orders.filter((x) => x.shipment_purchase_orders.some((y) => y.shipment.agency_to_id?.toString() == session.get("agency_id")));
373
373
  }
374
- if (finalConfig.withLotStocksToMyAgency) {
374
+ if (finalConfig.withLotStocksToMyAgency && finalConfig.withLots) {
375
375
  responseData = responseData.map((x) => {
376
376
  x.lots = x.lots.map((y) => {
377
377
  y.lot_stocks = y.lot_stocks.filter((z) => z.agency_id == session.get("agency_id"));
@@ -1,6 +1,6 @@
1
1
  import { handlePossibleAxiosErrors } from "@zauru-sdk/common";
2
- import { getGraphQLAPIHeaders } from "~/common.js";
3
- import httpGraphQLAPI from "~/zauru/httpGraphQL.js";
2
+ import { getGraphQLAPIHeaders } from "../common.js";
3
+ import httpGraphQLAPI from "../zauru/httpGraphQL.js";
4
4
  /**
5
5
  * getGeneralQuery
6
6
  * @param headers
@@ -31,12 +31,12 @@ export async function createMotivoRechazo(headers, session, body) {
31
31
  return response;
32
32
  });
33
33
  }
34
- export async function updateMotivosRechazo(headers, session, id, Nombre) {
34
+ export async function updateMotivosRechazo(headers, session, id, body) {
35
35
  return handlePossibleAxiosErrors(async () => {
36
36
  const { recepciones_rejection_types_webapp_table_id } = await getVariablesByName(headers, session, [
37
37
  "recepciones_rejection_types_webapp_table_id",
38
38
  ]);
39
- const response = await updateWebAppTableRegister(headers, recepciones_rejection_types_webapp_table_id, id, { Nombre });
39
+ const response = await updateWebAppTableRegister(headers, recepciones_rejection_types_webapp_table_id, id, body);
40
40
  return response;
41
41
  });
42
42
  }
@@ -351,7 +351,7 @@ export const getGraphQLPurchaseOrderBetweenDates = (session, dates, config = {})
351
351
  if (finalConfig.withShipmentToMyAgency) {
352
352
  responseData = response.data?.data?.purchase_orders.filter((x) => x.shipment_purchase_orders.some((y) => y.shipment.agency_to_id?.toString() == session.get("agency_id")));
353
353
  }
354
- if (finalConfig.withLotStocksToMyAgency) {
354
+ if (finalConfig.withLotStocksToMyAgency && finalConfig.withLots) {
355
355
  responseData = responseData.map((x) => {
356
356
  x.lots = x.lots.map((y) => {
357
357
  y.lot_stocks = y.lot_stocks.filter((z) => z.agency_id == session.get("agency_id"));
@@ -3,7 +3,7 @@ import { AxiosUtilsResponse, MotivoRechazo, RegisterMotivosRechazoBody, WebAppRo
3
3
  export declare function getMotivosRechazo(headers: any, session: Session): Promise<AxiosUtilsResponse<WebAppRowGraphQL<MotivoRechazo>[]>>;
4
4
  export declare function deleteMotivosRechazo(headers: any, session: Session, id: number): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
5
5
  export declare function createMotivoRechazo(headers: any, session: Session, body: MotivoRechazo): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
6
- export declare function updateMotivosRechazo(headers: any, session: Session, id: number, Nombre: string): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
6
+ export declare function updateMotivosRechazo(headers: any, session: Session, id: number, body: MotivoRechazo): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
7
7
  export declare function saveMotivosDeRechazoByPurchase(headers: any, session: Session, body: RegisterMotivosRechazoBody, extraBody: {
8
8
  temp_purchase_order_id: string;
9
9
  }): Promise<AxiosUtilsResponse<any>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/services",
3
- "version": "1.0.97",
3
+ "version": "1.0.99",
4
4
  "description": "Servicios de consulta a Zauru",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -25,12 +25,12 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@remix-run/node": "^2.8.1",
28
- "@zauru-sdk/common": "^1.0.95",
28
+ "@zauru-sdk/common": "^1.0.99",
29
29
  "@zauru-sdk/config": "^1.0.60",
30
30
  "@zauru-sdk/graphql": "^1.0.94",
31
- "@zauru-sdk/types": "^1.0.95",
31
+ "@zauru-sdk/types": "^1.0.98",
32
32
  "axios": "^1.6.7",
33
33
  "chalk": "5.3.0"
34
34
  },
35
- "gitHead": "1726ba2804f8e2304a85ca8186387ee4545464d3"
35
+ "gitHead": "ad07b6fa1ffed108a45c2ae3e043e2168664dfb5"
36
36
  }