@zauru-sdk/services 2.0.220 → 2.0.222
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/4pinos-po-discount-history.js +42 -0
- package/dist/esm/zauru/4pinos-solicitud-eliminacion-po.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/zauru/4pinos-po-discount-history.d.ts +6 -0
- package/dist/zauru/zauru-web-app-tables.d.ts +1 -1
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./zauru/httpGraphQL.js";
|
|
|
9
9
|
export * from "./zauru/httpOauth.js";
|
|
10
10
|
export * from "./zauru/httpZauru.js";
|
|
11
11
|
export * from "./zauru/4pinos-solicitud-eliminacion-po.js";
|
|
12
|
+
export * from "./zauru/4pinos-po-discount-history.js";
|
|
12
13
|
export * from "./zauru/zauru-agencies.js";
|
|
13
14
|
export * from "./zauru/zauru-automatic-numbers.js";
|
|
14
15
|
export * from "./zauru/zauru-bookings.js";
|
|
@@ -0,0 +1,42 @@
|
|
|
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 get4pinosPoDiscountHistory(headers, session) {
|
|
5
|
+
return handlePossibleAxiosErrors(async () => {
|
|
6
|
+
const { historial_porcentajes_de_rechazo_webapp_table_id } = await getVariablesByName(headers, session, [
|
|
7
|
+
"historial_porcentajes_de_rechazo_webapp_table_id",
|
|
8
|
+
]);
|
|
9
|
+
const response = await getWebAppTableRegisters(session, historial_porcentajes_de_rechazo_webapp_table_id);
|
|
10
|
+
if (response.error || !response.data) {
|
|
11
|
+
throw new Error(response.userMsg);
|
|
12
|
+
}
|
|
13
|
+
return response?.data;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export async function delete4pinosPoDiscountHistory(headers, session, id) {
|
|
17
|
+
return handlePossibleAxiosErrors(async () => {
|
|
18
|
+
const { historial_porcentajes_de_rechazo_webapp_table_id } = await getVariablesByName(headers, session, [
|
|
19
|
+
"historial_porcentajes_de_rechazo_webapp_table_id",
|
|
20
|
+
]);
|
|
21
|
+
const response = await deleteWebAppTableRegister(headers, historial_porcentajes_de_rechazo_webapp_table_id, id);
|
|
22
|
+
return response;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export async function create4pinosPoDiscountHistory(headers, session, body) {
|
|
26
|
+
return handlePossibleAxiosErrors(async () => {
|
|
27
|
+
const { historial_porcentajes_de_rechazo_webapp_table_id } = await getVariablesByName(headers, session, [
|
|
28
|
+
"historial_porcentajes_de_rechazo_webapp_table_id",
|
|
29
|
+
]);
|
|
30
|
+
const response = await createWebAppTableRegister(headers, historial_porcentajes_de_rechazo_webapp_table_id, body, { temp_purchase_order_id: body.purchase_order_id });
|
|
31
|
+
return response;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
export async function update4pinosPoDiscountHistory(headers, session, id, body) {
|
|
35
|
+
return handlePossibleAxiosErrors(async () => {
|
|
36
|
+
const { historial_porcentajes_de_rechazo_webapp_table_id } = await getVariablesByName(headers, session, [
|
|
37
|
+
"historial_porcentajes_de_rechazo_webapp_table_id",
|
|
38
|
+
]);
|
|
39
|
+
const response = await updateWebAppTableRegister(headers, historial_porcentajes_de_rechazo_webapp_table_id, id, body);
|
|
40
|
+
return response;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
@@ -27,7 +27,7 @@ export async function create4pinosSolicitudEliminacionPO(headers, session, body)
|
|
|
27
27
|
const { solicitud_eliminacion_po_webapp_table_id } = await getVariablesByName(headers, session, [
|
|
28
28
|
"solicitud_eliminacion_po_webapp_table_id",
|
|
29
29
|
]);
|
|
30
|
-
const response = await createWebAppTableRegister(headers, solicitud_eliminacion_po_webapp_table_id, body);
|
|
30
|
+
const response = await createWebAppTableRegister(headers, solicitud_eliminacion_po_webapp_table_id, body, { temp_purchase_order_id: body.purchase_order_id });
|
|
31
31
|
return response;
|
|
32
32
|
});
|
|
33
33
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./zauru/httpGraphQL.js";
|
|
|
9
9
|
export * from "./zauru/httpOauth.js";
|
|
10
10
|
export * from "./zauru/httpZauru.js";
|
|
11
11
|
export * from "./zauru/4pinos-solicitud-eliminacion-po.js";
|
|
12
|
+
export * from "./zauru/4pinos-po-discount-history.js";
|
|
12
13
|
export * from "./zauru/zauru-agencies.js";
|
|
13
14
|
export * from "./zauru/zauru-automatic-numbers.js";
|
|
14
15
|
export * from "./zauru/zauru-bookings.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Session } from "@remix-run/node";
|
|
2
|
+
import { AxiosUtilsResponse, PoDiscountHistory, WebAppRowGraphQL, WebAppTableUpdateResponse } from "@zauru-sdk/types";
|
|
3
|
+
export declare function get4pinosPoDiscountHistory(headers: any, session: Session): Promise<AxiosUtilsResponse<WebAppRowGraphQL<PoDiscountHistory>[]>>;
|
|
4
|
+
export declare function delete4pinosPoDiscountHistory(headers: any, session: Session, id: number): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
5
|
+
export declare function create4pinosPoDiscountHistory(headers: any, session: Session, body: PoDiscountHistory): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
6
|
+
export declare function update4pinosPoDiscountHistory(headers: any, session: Session, id: number, body: PoDiscountHistory): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
@@ -29,7 +29,7 @@ export declare function deleteWebAppTableRegister(headers: any, id_web_app_table
|
|
|
29
29
|
* @returns
|
|
30
30
|
*/
|
|
31
31
|
export declare function createWebAppTableRegister<T>(headers: any, id_web_app_table: string, body: T, extraBody?: {
|
|
32
|
-
temp_purchase_order_id: string;
|
|
32
|
+
temp_purchase_order_id: string | number;
|
|
33
33
|
}): Promise<WebAppTableUpdateResponse>;
|
|
34
34
|
/**
|
|
35
35
|
* updateWebAppTableRegister Function for update a web app table register
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/services",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.222",
|
|
4
4
|
"description": "Servicios de consulta a Zauru",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@remix-run/node": "^2.8.1",
|
|
27
27
|
"@upstash/redis": "^1.34.5",
|
|
28
|
-
"@zauru-sdk/common": "^2.0.
|
|
28
|
+
"@zauru-sdk/common": "^2.0.221",
|
|
29
29
|
"@zauru-sdk/config": "^2.0.220",
|
|
30
30
|
"@zauru-sdk/graphql": "^2.0.220",
|
|
31
|
-
"@zauru-sdk/types": "^2.0.
|
|
31
|
+
"@zauru-sdk/types": "^2.0.221",
|
|
32
32
|
"axios": "^1.6.7",
|
|
33
33
|
"chalk": "5.3.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "6d2aeab534dc2248f8cd2a355f35cfd42626f38e"
|
|
36
36
|
}
|