@zauru-sdk/services 2.0.228 → 2.0.229
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
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./zauru/httpOauth.js";
|
|
|
10
10
|
export * from "./zauru/httpZauru.js";
|
|
11
11
|
export * from "./zauru/4pinos-solicitud-eliminacion-po.js";
|
|
12
12
|
export * from "./zauru/4pinos-po-discount-history.js";
|
|
13
|
+
export * from "./zauru/4pinos-weight-limit-per-basket.js";
|
|
13
14
|
export * from "./zauru/zauru-agencies.js";
|
|
14
15
|
export * from "./zauru/zauru-automatic-numbers.js";
|
|
15
16
|
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 get4pinosWeightLimitPerBasket(headers, session) {
|
|
5
|
+
return handlePossibleAxiosErrors(async () => {
|
|
6
|
+
const { peso_maximo_por_canasta_webapp_table_id } = await getVariablesByName(headers, session, [
|
|
7
|
+
"peso_maximo_por_cesta_webapp_table_id",
|
|
8
|
+
]);
|
|
9
|
+
const response = await getWebAppTableRegisters(session, peso_maximo_por_canasta_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 delete4pinosWeightLimitPerBasket(headers, session, id) {
|
|
17
|
+
return handlePossibleAxiosErrors(async () => {
|
|
18
|
+
const { peso_maximo_por_canasta_webapp_table_id } = await getVariablesByName(headers, session, [
|
|
19
|
+
"peso_maximo_por_canasta_webapp_table_id",
|
|
20
|
+
]);
|
|
21
|
+
const response = await deleteWebAppTableRegister(headers, peso_maximo_por_canasta_webapp_table_id, id);
|
|
22
|
+
return response;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export async function create4pinosWeightLimitPerBasket(headers, session, body) {
|
|
26
|
+
return handlePossibleAxiosErrors(async () => {
|
|
27
|
+
const { peso_maximo_por_canasta_webapp_table_id } = await getVariablesByName(headers, session, [
|
|
28
|
+
"peso_maximo_por_canasta_webapp_table_id",
|
|
29
|
+
]);
|
|
30
|
+
const response = await createWebAppTableRegister(headers, peso_maximo_por_canasta_webapp_table_id, body, { temp_purchase_order_id: `${body.purchase_order_id}` });
|
|
31
|
+
return response;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
export async function update4pinosWeightLimitPerBasket(headers, session, id, body) {
|
|
35
|
+
return handlePossibleAxiosErrors(async () => {
|
|
36
|
+
const { peso_maximo_por_canasta_webapp_table_id } = await getVariablesByName(headers, session, [
|
|
37
|
+
"peso_maximo_por_canasta_webapp_table_id",
|
|
38
|
+
]);
|
|
39
|
+
const response = await updateWebAppTableRegister(headers, peso_maximo_por_canasta_webapp_table_id, id, body);
|
|
40
|
+
return response;
|
|
41
|
+
});
|
|
42
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./zauru/httpOauth.js";
|
|
|
10
10
|
export * from "./zauru/httpZauru.js";
|
|
11
11
|
export * from "./zauru/4pinos-solicitud-eliminacion-po.js";
|
|
12
12
|
export * from "./zauru/4pinos-po-discount-history.js";
|
|
13
|
+
export * from "./zauru/4pinos-weight-limit-per-basket.js";
|
|
13
14
|
export * from "./zauru/zauru-agencies.js";
|
|
14
15
|
export * from "./zauru/zauru-automatic-numbers.js";
|
|
15
16
|
export * from "./zauru/zauru-bookings.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Session } from "@remix-run/node";
|
|
2
|
+
import { AxiosUtilsResponse, PesoMaximoPorCanasta, WebAppRowGraphQL, WebAppTableUpdateResponse } from "@zauru-sdk/types";
|
|
3
|
+
export declare function get4pinosWeightLimitPerBasket(headers: any, session: Session): Promise<AxiosUtilsResponse<WebAppRowGraphQL<PesoMaximoPorCanasta>[]>>;
|
|
4
|
+
export declare function delete4pinosWeightLimitPerBasket(headers: any, session: Session, id: number): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
5
|
+
export declare function create4pinosWeightLimitPerBasket(headers: any, session: Session, body: PesoMaximoPorCanasta & {
|
|
6
|
+
purchase_order_id: number;
|
|
7
|
+
}): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
8
|
+
export declare function update4pinosWeightLimitPerBasket(headers: any, session: Session, id: number, body: Partial<PesoMaximoPorCanasta>): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/services",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.229",
|
|
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.229",
|
|
29
29
|
"@zauru-sdk/config": "^2.0.220",
|
|
30
30
|
"@zauru-sdk/graphql": "^2.0.228",
|
|
31
|
-
"@zauru-sdk/types": "^2.0.
|
|
31
|
+
"@zauru-sdk/types": "^2.0.229",
|
|
32
32
|
"axios": "^1.6.7",
|
|
33
33
|
"chalk": "5.3.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "5580dcd65cea6043535691f6ecca4956e99c6fa3"
|
|
36
36
|
}
|