@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.
- package/dist/cjs/graphql/index.js +2 -2
- package/dist/cjs/zauru/zauru-motivos-rechazo.js +2 -2
- package/dist/cjs/zauru/zauru-purchase-orders.js +1 -1
- package/dist/esm/graphql/index.js +2 -2
- package/dist/esm/zauru/zauru-motivos-rechazo.js +2 -2
- package/dist/esm/zauru/zauru-purchase-orders.js +1 -1
- package/dist/zauru/zauru-motivos-rechazo.d.ts +1 -1
- package/package.json +4 -4
|
@@ -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("
|
|
9
|
-
const httpGraphQL_js_1 = __importDefault(require("
|
|
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,
|
|
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,
|
|
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 "
|
|
3
|
-
import httpGraphQLAPI from "
|
|
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,
|
|
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,
|
|
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,
|
|
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.
|
|
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.
|
|
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.
|
|
31
|
+
"@zauru-sdk/types": "^1.0.98",
|
|
32
32
|
"axios": "^1.6.7",
|
|
33
33
|
"chalk": "5.3.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "ad07b6fa1ffed108a45c2ae3e043e2168664dfb5"
|
|
36
36
|
}
|