@zauru-sdk/services 2.0.206 → 2.0.208

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
@@ -25,6 +25,7 @@ export * from "./zauru/zauru-lote-record.js";
25
25
  export * from "./zauru/zauru-lotes.js";
26
26
  export * from "./zauru/zauru-motivos-rechazo.js";
27
27
  export * from "./zauru/zauru-payees.js";
28
+ export * from "./zauru/zauru-authorization-update-discount-po.js";
28
29
  export * from "./zauru/zauru-payments.js";
29
30
  export * from "./zauru/zauru-payment-terms.js";
30
31
  export * from "./zauru/zauru-payment-method.js";
@@ -0,0 +1,33 @@
1
+ import { handlePossibleAxiosErrors } from "@zauru-sdk/common";
2
+ import { getVariablesByName } from "../common.js";
3
+ import { createWebAppTableRegister, deleteWebAppTableRegister, getWebAppTableRegisters, } from "./zauru-web-app-tables.js";
4
+ export async function getAuthorizationUpdateDiscountPO(headers, session) {
5
+ return handlePossibleAxiosErrors(async () => {
6
+ const { cc_autorizaciones } = await getVariablesByName(headers, session, [
7
+ "cc_autorizaciones",
8
+ ]);
9
+ const response = await getWebAppTableRegisters(session, cc_autorizaciones);
10
+ if (response.error || !response.data) {
11
+ throw new Error(response.userMsg);
12
+ }
13
+ return response?.data;
14
+ });
15
+ }
16
+ export async function deleteAuthorizationUpdateDiscountPO(headers, session, id) {
17
+ return handlePossibleAxiosErrors(async () => {
18
+ const { cc_autorizaciones } = await getVariablesByName(headers, session, [
19
+ "cc_autorizaciones",
20
+ ]);
21
+ const response = await deleteWebAppTableRegister(headers, cc_autorizaciones, id);
22
+ return response;
23
+ });
24
+ }
25
+ export async function createAuthorizationUpdateDiscountPO(headers, session, body) {
26
+ return handlePossibleAxiosErrors(async () => {
27
+ const { cc_autorizaciones } = await getVariablesByName(headers, session, [
28
+ "cc_autorizaciones",
29
+ ]);
30
+ const response = await createWebAppTableRegister(headers, cc_autorizaciones, body);
31
+ return response;
32
+ });
33
+ }
package/dist/index.d.ts CHANGED
@@ -25,6 +25,7 @@ export * from "./zauru/zauru-lote-record.js";
25
25
  export * from "./zauru/zauru-lotes.js";
26
26
  export * from "./zauru/zauru-motivos-rechazo.js";
27
27
  export * from "./zauru/zauru-payees.js";
28
+ export * from "./zauru/zauru-authorization-update-discount-po.js";
28
29
  export * from "./zauru/zauru-payments.js";
29
30
  export * from "./zauru/zauru-payment-terms.js";
30
31
  export * from "./zauru/zauru-payment-method.js";
@@ -0,0 +1,5 @@
1
+ import type { Session } from "@remix-run/node";
2
+ import { AxiosUtilsResponse, AuthorizationUpdateDiscountPO, WebAppRowGraphQL, WebAppTableUpdateResponse } from "@zauru-sdk/types";
3
+ export declare function getAuthorizationUpdateDiscountPO(headers: any, session: Session): Promise<AxiosUtilsResponse<WebAppRowGraphQL<AuthorizationUpdateDiscountPO>[]>>;
4
+ export declare function deleteAuthorizationUpdateDiscountPO(headers: any, session: Session, id: number): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
5
+ export declare function createAuthorizationUpdateDiscountPO(headers: any, session: Session, body: AuthorizationUpdateDiscountPO): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/services",
3
- "version": "2.0.206",
3
+ "version": "2.0.208",
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.204",
28
+ "@zauru-sdk/common": "^2.0.208",
29
29
  "@zauru-sdk/config": "^2.0.100",
30
30
  "@zauru-sdk/graphql": "^2.0.206",
31
- "@zauru-sdk/types": "^2.0.204",
31
+ "@zauru-sdk/types": "^2.0.208",
32
32
  "axios": "^1.6.7",
33
33
  "chalk": "5.3.0"
34
34
  },
35
- "gitHead": "f4d62b2808133edcd12c983d20e6c7853c02f646"
35
+ "gitHead": "12a01ef8632fa8bbabdd6240c449ecdbda608f6d"
36
36
  }