@zauru-sdk/services 2.0.149 → 2.0.152
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/esm/index.js +1 -0
- package/dist/esm/zauru/zauru-cc-porcentajes-rechazo.js +34 -0
- package/dist/esm/zauru/zauru-purchase-orders.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/zauru/zauru-cc-porcentajes-rechazo.d.ts +6 -0
- package/dist/zauru/zauru-purchase-orders.d.ts +1 -0
- package/package.json +5 -5
package/dist/esm/index.js
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { handlePossibleAxiosErrors } from "@zauru-sdk/common";
|
|
2
|
+
import { getVariablesByName } from "../common.js";
|
|
3
|
+
import { createWebAppTableRegister, deleteWebAppTableRegister, getWebAppTableRegisters, updateWebAppTableRegister, } from "./zauru-web-app-tables.js";
|
|
4
|
+
export async function getCCPorcentajesDeRechazo(headers, session) {
|
|
5
|
+
return handlePossibleAxiosErrors(async () => {
|
|
6
|
+
const { cc_porcentajes_rechazo_en_planta } = await getVariablesByName(headers, session, ["cc_porcentajes_rechazo_en_planta"]);
|
|
7
|
+
const response = await getWebAppTableRegisters(session, cc_porcentajes_rechazo_en_planta);
|
|
8
|
+
if (response.error || !response.data) {
|
|
9
|
+
throw new Error(response.userMsg);
|
|
10
|
+
}
|
|
11
|
+
return response?.data;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export async function deleteCCPorcentajesDeRechazo(headers, session, id) {
|
|
15
|
+
return handlePossibleAxiosErrors(async () => {
|
|
16
|
+
const { cc_porcentajes_rechazo_en_planta } = await getVariablesByName(headers, session, ["cc_porcentajes_rechazo_en_planta"]);
|
|
17
|
+
const response = await deleteWebAppTableRegister(headers, cc_porcentajes_rechazo_en_planta, id);
|
|
18
|
+
return response;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export async function createCCPorcentajesDeRechazo(headers, session, body) {
|
|
22
|
+
return handlePossibleAxiosErrors(async () => {
|
|
23
|
+
const { cc_porcentajes_rechazo_en_planta } = await getVariablesByName(headers, session, ["cc_porcentajes_rechazo_en_planta"]);
|
|
24
|
+
const response = await createWebAppTableRegister(headers, cc_porcentajes_rechazo_en_planta, body);
|
|
25
|
+
return response;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
export async function updateCCPorcentajesDeRechazo(headers, session, id, body) {
|
|
29
|
+
return handlePossibleAxiosErrors(async () => {
|
|
30
|
+
const { cc_porcentajes_rechazo_en_planta } = await getVariablesByName(headers, session, ["cc_porcentajes_rechazo_en_planta"]);
|
|
31
|
+
const response = await updateWebAppTableRegister(headers, cc_porcentajes_rechazo_en_planta, id, body);
|
|
32
|
+
return response;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -319,7 +319,6 @@ export const getGraphQLPurchaseOrderBetweenDates = (session, dates, config = {})
|
|
|
319
319
|
withWebAppRows: true,
|
|
320
320
|
payeeCategoryIds: [],
|
|
321
321
|
excludePayeeCategoryIds: [],
|
|
322
|
-
shipment_reference: undefined,
|
|
323
322
|
withLotStocks: false,
|
|
324
323
|
excludeVoided: true,
|
|
325
324
|
};
|
|
@@ -354,6 +353,7 @@ export const getGraphQLPurchaseOrderBetweenDates = (session, dates, config = {})
|
|
|
354
353
|
discount: finalConfig.discount,
|
|
355
354
|
shipment_reference: finalConfig.shipment_reference,
|
|
356
355
|
excludeVoided: finalConfig.excludeVoided,
|
|
356
|
+
agencyNameIlike: finalConfig.agencyNameIlike,
|
|
357
357
|
});
|
|
358
358
|
const graphQLBody = {
|
|
359
359
|
query,
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Session } from "@remix-run/node";
|
|
2
|
+
import { AxiosUtilsResponse, CCPorcentajeRechazo, WebAppRowGraphQL, WebAppTableUpdateResponse } from "@zauru-sdk/types";
|
|
3
|
+
export declare function getCCPorcentajesDeRechazo(headers: any, session: Session): Promise<AxiosUtilsResponse<WebAppRowGraphQL<CCPorcentajeRechazo>[]>>;
|
|
4
|
+
export declare function deleteCCPorcentajesDeRechazo(headers: any, session: Session, id: number): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
5
|
+
export declare function createCCPorcentajesDeRechazo(headers: any, session: Session, body: CCPorcentajeRechazo): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
6
|
+
export declare function updateCCPorcentajesDeRechazo(headers: any, session: Session, id: number, body: CCPorcentajeRechazo): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
@@ -139,6 +139,7 @@ export declare const getGraphQLPurchaseOrderBetweenDates: (session: Session, dat
|
|
|
139
139
|
agencyId?: number | string;
|
|
140
140
|
id_number?: string;
|
|
141
141
|
shipment_reference?: string;
|
|
142
|
+
agencyNameIlike?: string;
|
|
142
143
|
useProductionAgencyId?: boolean;
|
|
143
144
|
consolidateIdFilter?: boolean;
|
|
144
145
|
lotItemIdExclusion?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/services",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.152",
|
|
4
4
|
"description": "Servicios de consulta a Zauru",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@remix-run/node": "^2.8.1",
|
|
27
|
-
"@zauru-sdk/common": "^2.0.
|
|
27
|
+
"@zauru-sdk/common": "^2.0.152",
|
|
28
28
|
"@zauru-sdk/config": "^2.0.100",
|
|
29
|
-
"@zauru-sdk/graphql": "^2.0.
|
|
30
|
-
"@zauru-sdk/types": "^2.0.
|
|
29
|
+
"@zauru-sdk/graphql": "^2.0.150",
|
|
30
|
+
"@zauru-sdk/types": "^2.0.152",
|
|
31
31
|
"axios": "^1.6.7",
|
|
32
32
|
"chalk": "5.3.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "355e7ea7662f3e2e848832e177f9d2ae680a6ba2"
|
|
35
35
|
}
|