@zauru-sdk/utils 1.0.17 → 1.0.18

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/zauru/bitacora-edicion-masiva.utils.d.ts +3 -3
  3. package/dist/zauru/bitacora-edicion-masiva.utils.js +6 -6
  4. package/dist/zauru/consolidated-history.utils.d.ts +3 -3
  5. package/dist/zauru/consolidated-history.utils.js +6 -6
  6. package/dist/zauru/costos-items.utils.d.ts +9 -9
  7. package/dist/zauru/costos-items.utils.js +17 -17
  8. package/dist/zauru/discharges-histsory.utils.d.ts +3 -3
  9. package/dist/zauru/discharges-histsory.utils.js +6 -6
  10. package/dist/zauru/items.utils.d.ts +3 -3
  11. package/dist/zauru/items.utils.js +6 -6
  12. package/dist/zauru/motivos-rechazo.utils.d.ts +2 -2
  13. package/dist/zauru/motivos-rechazo.utils.js +4 -4
  14. package/dist/zauru/payees.utils.d.ts +5 -5
  15. package/dist/zauru/payees.utils.js +10 -10
  16. package/dist/zauru/specialItem.utils.d.ts +4 -4
  17. package/dist/zauru/specialItem.utils.js +9 -9
  18. package/dist/zauru/templates.utils.d.ts +6 -6
  19. package/dist/zauru/templates.utils.js +12 -12
  20. package/dist/zauru/tiposMuestra.utils.d.ts +4 -4
  21. package/dist/zauru/tiposMuestra.utils.js +8 -8
  22. package/dist/zauru/webapp-tables.utils.d.ts +1 -1
  23. package/dist/zauru/webapp-tables.utils.js +2 -2
  24. package/package.json +3 -3
  25. package/src/zauru/bitacora-edicion-masiva.utils.ts +9 -9
  26. package/src/zauru/consolidated-history.utils.ts +9 -9
  27. package/src/zauru/costos-items.utils.ts +31 -25
  28. package/src/zauru/discharges-histsory.utils.ts +9 -9
  29. package/src/zauru/items.utils.ts +9 -9
  30. package/src/zauru/motivos-rechazo.utils.ts +6 -6
  31. package/src/zauru/payees.utils.ts +15 -15
  32. package/src/zauru/specialItem.utils.ts +25 -15
  33. package/src/zauru/templates.utils.ts +18 -18
  34. package/src/zauru/tiposMuestra.utils.ts +12 -12
  35. package/src/zauru/webapp-tables.utils.ts +2 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.0.18](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.17...v1.0.18) (2024-03-22)
7
+
8
+ **Note:** Version bump only for package @zauru-sdk/utils
9
+
10
+
11
+
12
+
13
+
6
14
  ## [1.0.17](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.16...v1.0.17) (2024-03-21)
7
15
 
8
16
  **Note:** Version bump only for package @zauru-sdk/utils
@@ -6,18 +6,18 @@ import { AxiosUtilsResponse, WebAppTableUpdateResponse, BitacoraPOMassive, WebAp
6
6
  * @param session Session object.
7
7
  * @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraPOMassive>[]>.
8
8
  */
9
- export declare function saveBitacoraPOMassive(headers: any, session: Session, body: BitacoraPOMassive): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
9
+ export declare const saveBitacoraPOMassive: (headers: any, session: Session, body: BitacoraPOMassive) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
10
10
  /**
11
11
  * Get getBitacorasPOMassive from the web app table.
12
12
  * @param headers Request headers.
13
13
  * @param session Session object.
14
14
  * @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraPOMassive>[]>.
15
15
  */
16
- export declare function getBitacorasPOMassive(headers: any, session: Session): Promise<AxiosUtilsResponse<WebAppRowGraphQL<BitacoraPOMassive>[]>>;
16
+ export declare const getBitacorasPOMassive: (headers: any, session: Session) => Promise<AxiosUtilsResponse<WebAppRowGraphQL<BitacoraPOMassive>[]>>;
17
17
  /**
18
18
  * Put updateBitacorasPOMassive from the web app table.
19
19
  * @param headers Request headers.
20
20
  * @param session Session object.
21
21
  * @returns A Promise of AxiosUtilsResponse<BitacorasPOMassiveWebAppTable[]>.
22
22
  */
23
- export declare function updateBitacorasPOMassive(headers: any, session: Session, body: BitacoraPOMassive, id_registro: string | number): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
23
+ export declare const updateBitacorasPOMassive: (headers: any, session: Session, body: BitacoraPOMassive, id_registro: string | number) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
@@ -6,7 +6,7 @@ import { createWebAppTableRegister, getVariablesByName, getWebAppTableRegisters,
6
6
  * @param session Session object.
7
7
  * @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraPOMassive>[]>.
8
8
  */
9
- export async function saveBitacoraPOMassive(headers, session, body) {
9
+ export const saveBitacoraPOMassive = (headers, session, body) => {
10
10
  return handlePossibleAxiosErrors(async () => {
11
11
  const { bitacora_ediciones_masivas_web_app_table_id } = await getVariablesByName(headers, session, [
12
12
  "bitacora_ediciones_masivas_web_app_table_id",
@@ -14,14 +14,14 @@ export async function saveBitacoraPOMassive(headers, session, body) {
14
14
  const response = await createWebAppTableRegister(headers, bitacora_ediciones_masivas_web_app_table_id, { ...body, modificadoPor: session.get("name") });
15
15
  return response;
16
16
  });
17
- }
17
+ };
18
18
  /**
19
19
  * Get getBitacorasPOMassive from the web app table.
20
20
  * @param headers Request headers.
21
21
  * @param session Session object.
22
22
  * @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraPOMassive>[]>.
23
23
  */
24
- export async function getBitacorasPOMassive(headers, session) {
24
+ export const getBitacorasPOMassive = (headers, session) => {
25
25
  return handlePossibleAxiosErrors(async () => {
26
26
  const { bitacora_ediciones_masivas_web_app_table_id } = await getVariablesByName(headers, session, [
27
27
  "bitacora_ediciones_masivas_web_app_table_id",
@@ -32,14 +32,14 @@ export async function getBitacorasPOMassive(headers, session) {
32
32
  }
33
33
  return response.data;
34
34
  });
35
- }
35
+ };
36
36
  /**
37
37
  * Put updateBitacorasPOMassive from the web app table.
38
38
  * @param headers Request headers.
39
39
  * @param session Session object.
40
40
  * @returns A Promise of AxiosUtilsResponse<BitacorasPOMassiveWebAppTable[]>.
41
41
  */
42
- export async function updateBitacorasPOMassive(headers, session, body, id_registro) {
42
+ export const updateBitacorasPOMassive = (headers, session, body, id_registro) => {
43
43
  return handlePossibleAxiosErrors(async () => {
44
44
  const { bitacora_ediciones_masivas_web_app_table_id } = await getVariablesByName(headers, session, [
45
45
  "bitacora_ediciones_masivas_web_app_table_id",
@@ -47,4 +47,4 @@ export async function updateBitacorasPOMassive(headers, session, body, id_regist
47
47
  const response = await updateWebAppTableRegister(headers, bitacora_ediciones_masivas_web_app_table_id, id_registro, { ...body, modificadoPor: session.get("name") });
48
48
  return response;
49
49
  });
50
- }
50
+ };
@@ -6,7 +6,7 @@ import { AxiosUtilsResponse, WebAppRowGraphQL, ConsolidatedHistory, WebAppTableU
6
6
  * @param session Session object.
7
7
  * @returns A Promise of AxiosUtilsResponse<ConsolidatedHistory[]>.
8
8
  */
9
- export declare function getConsolidatedHistories(headers: any, session: Session): Promise<AxiosUtilsResponse<WebAppRowGraphQL<ConsolidatedHistory>[]>>;
9
+ export declare const getConsolidatedHistories: (headers: any, session: Session) => Promise<AxiosUtilsResponse<WebAppRowGraphQL<ConsolidatedHistory>[]>>;
10
10
  /**
11
11
  * Create a template in the web app table.
12
12
  * @param headers Request headers.
@@ -14,11 +14,11 @@ export declare function getConsolidatedHistories(headers: any, session: Session)
14
14
  * @param body ConsolidatedHistory data to be created.
15
15
  * @returns A Promise of AxiosUtilsResponse<ConsolidatedHistory>.
16
16
  */
17
- export declare function createConsolidatedHistory(headers: any, session: Session, body: ConsolidatedHistory): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
17
+ export declare const createConsolidatedHistory: (headers: any, session: Session, body: ConsolidatedHistory) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
18
18
  /**
19
19
  * Put updateConsolidatedHistory from the web app table.
20
20
  * @param headers Request headers.
21
21
  * @param session Session object.
22
22
  * @returns A Promise of AxiosUtilsResponse<ConsolidatedHistory[]>.
23
23
  */
24
- export declare function updateConsolidatedHistory(headers: any, session: Session, body: ConsolidatedHistory, id_registro: string | number): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
24
+ export declare const updateConsolidatedHistory: (headers: any, session: Session, body: ConsolidatedHistory, id_registro: string | number) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
@@ -6,7 +6,7 @@ import { createWebAppTableRegister, getVariablesByName, getWebAppTableRegisters,
6
6
  * @param session Session object.
7
7
  * @returns A Promise of AxiosUtilsResponse<ConsolidatedHistory[]>.
8
8
  */
9
- export async function getConsolidatedHistories(headers, session) {
9
+ export const getConsolidatedHistories = (headers, session) => {
10
10
  return handlePossibleAxiosErrors(async () => {
11
11
  const { purchase_order_consolidates_web_app_table_id } = await getVariablesByName(headers, session, [
12
12
  "purchase_order_consolidates_web_app_table_id",
@@ -18,7 +18,7 @@ export async function getConsolidatedHistories(headers, session) {
18
18
  const history = response?.data ?? [];
19
19
  return history;
20
20
  });
21
- }
21
+ };
22
22
  /**
23
23
  * Create a template in the web app table.
24
24
  * @param headers Request headers.
@@ -26,7 +26,7 @@ export async function getConsolidatedHistories(headers, session) {
26
26
  * @param body ConsolidatedHistory data to be created.
27
27
  * @returns A Promise of AxiosUtilsResponse<ConsolidatedHistory>.
28
28
  */
29
- export async function createConsolidatedHistory(headers, session, body) {
29
+ export const createConsolidatedHistory = (headers, session, body) => {
30
30
  return handlePossibleAxiosErrors(async () => {
31
31
  const { purchase_order_consolidates_web_app_table_id } = await getVariablesByName(headers, session, [
32
32
  "purchase_order_consolidates_web_app_table_id",
@@ -34,14 +34,14 @@ export async function createConsolidatedHistory(headers, session, body) {
34
34
  const response = await createWebAppTableRegister(headers, purchase_order_consolidates_web_app_table_id, body);
35
35
  return response;
36
36
  });
37
- }
37
+ };
38
38
  /**
39
39
  * Put updateConsolidatedHistory from the web app table.
40
40
  * @param headers Request headers.
41
41
  * @param session Session object.
42
42
  * @returns A Promise of AxiosUtilsResponse<ConsolidatedHistory[]>.
43
43
  */
44
- export async function updateConsolidatedHistory(headers, session, body, id_registro) {
44
+ export const updateConsolidatedHistory = (headers, session, body, id_registro) => {
45
45
  return handlePossibleAxiosErrors(async () => {
46
46
  const { purchase_order_consolidates_web_app_table_id } = await getVariablesByName(headers, session, [
47
47
  "purchase_order_consolidates_web_app_table_id",
@@ -49,4 +49,4 @@ export async function updateConsolidatedHistory(headers, session, body, id_regis
49
49
  const response = await updateWebAppTableRegister(headers, purchase_order_consolidates_web_app_table_id, id_registro, { ...body });
50
50
  return response;
51
51
  });
52
- }
52
+ };
@@ -25,12 +25,12 @@ export declare const obtenerSemanaAnterior: () => {
25
25
  * @param body
26
26
  * @returns
27
27
  */
28
- export declare function updateOneItemPrice(headers: any, session: Session, body: {
28
+ export declare const updateOneItemPrice: (headers: any, session: Session, body: {
29
29
  fechaInicio: string;
30
30
  fechaFin: string;
31
31
  item: number;
32
32
  price: number;
33
- }): Promise<AxiosUtilsResponse<any>>;
33
+ }) => Promise<AxiosUtilsResponse<any>>;
34
34
  /**
35
35
  * changePricesInit
36
36
  * @param headers
@@ -39,7 +39,7 @@ export declare function updateOneItemPrice(headers: any, session: Session, body:
39
39
  * @param body
40
40
  * @returns
41
41
  */
42
- export declare function changePricesInit(headers: any, session: Session, specialItems: WebAppRowGraphQL<SpecialItem>[], body: BitacoraCostosItems): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
42
+ export declare const changePricesInit: (headers: any, session: Session, specialItems: WebAppRowGraphQL<SpecialItem>[], body: BitacoraCostosItems) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
43
43
  /**
44
44
  * changePrice
45
45
  * @param headers
@@ -47,7 +47,7 @@ export declare function changePricesInit(headers: any, session: Session, special
47
47
  * @param body
48
48
  * @returns
49
49
  */
50
- export declare function changePrice(headers: any, costo: PurchaseOrderCosto): Promise<PurchaseOrderCosto>;
50
+ export declare const changePrice: (headers: any, costo: PurchaseOrderCosto) => Promise<PurchaseOrderCosto>;
51
51
  /**
52
52
  * changePrices
53
53
  * @param headers
@@ -55,7 +55,7 @@ export declare function changePrice(headers: any, costo: PurchaseOrderCosto): Pr
55
55
  * @param body
56
56
  * @returns
57
57
  */
58
- export declare function changePrices(headers: any, session: Session, bitacora: BitacoraCostosItems, id_bitacora: string): Promise<AxiosUtilsResponse<any>>;
58
+ export declare const changePrices: (headers: any, session: Session, bitacora: BitacoraCostosItems, id_bitacora: string) => Promise<AxiosUtilsResponse<any>>;
59
59
  /**
60
60
  * corregirCostos
61
61
  * @param headers
@@ -63,25 +63,25 @@ export declare function changePrices(headers: any, session: Session, bitacora: B
63
63
  * @param costos
64
64
  * @returns
65
65
  */
66
- export declare function corregirCostos(headers: any, session: Session, costos: PurchaseOrderCosto[], costosEspeciales: PurchaseOrderCosto[]): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
66
+ export declare const corregirCostos: (headers: any, session: Session, costos: PurchaseOrderCosto[], costosEspeciales: PurchaseOrderCosto[]) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
67
67
  /**
68
68
  * Get saveBitacoraCostos from the web app table.
69
69
  * @param headers Request headers.
70
70
  * @param session Session object.
71
71
  * @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>.
72
72
  */
73
- export declare function saveBitacoraCostos(headers: any, session: Session, body: BitacoraCostosItems): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
73
+ export declare const saveBitacoraCostos: (headers: any, session: Session, body: BitacoraCostosItems) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
74
74
  /**
75
75
  * Put updateBitacoraCostos from the web app table.
76
76
  * @param headers Request headers.
77
77
  * @param session Session object.
78
78
  * @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>.
79
79
  */
80
- export declare function updateBitacoraCostos(headers: any, session: Session, body: BitacoraCostosItems, id_registro: string | number): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
80
+ export declare const updateBitacoraCostos: (headers: any, session: Session, body: BitacoraCostosItems, id_registro: string | number) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
81
81
  /**
82
82
  * Get getCostosBitacora from the web app table.
83
83
  * @param headers Request headers.
84
84
  * @param session Session object.
85
85
  * @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>.
86
86
  */
87
- export declare function getCostosBitacora(headers: any, session: Session): Promise<AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>>;
87
+ export declare const getCostosBitacora: (headers: any, session: Session) => Promise<AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>>;
@@ -1,7 +1,7 @@
1
1
  import { handlePossibleAxiosErrors, localDateToUSDate, } from "@zauru-sdk/common";
2
2
  import moment from "moment";
3
3
  import { createSpecialItem, updateSpecialItem } from "./specialItem.utils.js";
4
- import { createWebAppTableRegister, getPurchasesList, getVariablesByName, getWebAppTableRegisters, updateWebAppTableRegister } from "@zauru-sdk/services";
4
+ import { createWebAppTableRegister, getPurchasesList, getVariablesByName, getWebAppTableRegisters, updateWebAppTableRegister, } from "@zauru-sdk/services";
5
5
  import { updatePurchaseItemPrice } from "./purchase-orders.utils.js";
6
6
  /**
7
7
  *
@@ -121,7 +121,7 @@ const logTotal = (total) => {
121
121
  * @param body
122
122
  * @returns
123
123
  */
124
- export async function updateOneItemPrice(headers, session, body) {
124
+ export const updateOneItemPrice = (headers, session, body) => {
125
125
  return handlePossibleAxiosErrors(async () => {
126
126
  //PASO 1
127
127
  //Obtengo todas las órdenes de compra dentro del rango de fechas
@@ -219,7 +219,7 @@ export async function updateOneItemPrice(headers, session, body) {
219
219
  }
220
220
  return response.data;
221
221
  });
222
- }
222
+ };
223
223
  /**
224
224
  * changePricesInit
225
225
  * @param headers
@@ -228,7 +228,7 @@ export async function updateOneItemPrice(headers, session, body) {
228
228
  * @param body
229
229
  * @returns
230
230
  */
231
- export async function changePricesInit(headers, session, specialItems, body) {
231
+ export const changePricesInit = (headers, session, specialItems, body) => {
232
232
  return handlePossibleAxiosErrors(async () => {
233
233
  //PASO 1
234
234
  //Obtengo todas las órdenes de compra dentro del rango de fechas
@@ -303,7 +303,7 @@ export async function changePricesInit(headers, session, specialItems, body) {
303
303
  }
304
304
  return response.data;
305
305
  });
306
- }
306
+ };
307
307
  /**
308
308
  * changePrice
309
309
  * @param headers
@@ -311,7 +311,7 @@ export async function changePricesInit(headers, session, specialItems, body) {
311
311
  * @param body
312
312
  * @returns
313
313
  */
314
- export async function changePrice(headers, costo) {
314
+ export const changePrice = async (headers, costo) => {
315
315
  const x = costo;
316
316
  const msgActualizando = `==============================> ACTUALIZANDO ÓRDEN DE COMPRA: ID: ${x.id} PRICE: ${x.purchase_order_details
317
317
  .map((x) => x.unit_cost)
@@ -346,7 +346,7 @@ export async function changePrice(headers, costo) {
346
346
  costo.finalizado = true;
347
347
  }
348
348
  return costo;
349
- }
349
+ };
350
350
  /**
351
351
  * changePrices
352
352
  * @param headers
@@ -354,7 +354,7 @@ export async function changePrice(headers, costo) {
354
354
  * @param body
355
355
  * @returns
356
356
  */
357
- export async function changePrices(headers, session, bitacora, id_bitacora) {
357
+ export const changePrices = (headers, session, bitacora, id_bitacora) => {
358
358
  return handlePossibleAxiosErrors(async () => {
359
359
  const costosWithPurchaseIds = bitacora.costosActualizados;
360
360
  const costosEspecialesWithPurchaseIds = bitacora.costosEspecialesActualizados;
@@ -438,7 +438,7 @@ export async function changePrices(headers, session, bitacora, id_bitacora) {
438
438
  }
439
439
  return response.data;
440
440
  });
441
- }
441
+ };
442
442
  /**
443
443
  * corregirCostos
444
444
  * @param headers
@@ -446,7 +446,7 @@ export async function changePrices(headers, session, bitacora, id_bitacora) {
446
446
  * @param costos
447
447
  * @returns
448
448
  */
449
- export async function corregirCostos(headers, session, costos, costosEspeciales) {
449
+ export const corregirCostos = (headers, session, costos, costosEspeciales) => {
450
450
  return handlePossibleAxiosErrors(async () => {
451
451
  //PASO 1
452
452
  //Hago una copia
@@ -549,14 +549,14 @@ export async function corregirCostos(headers, session, costos, costosEspeciales)
549
549
  }
550
550
  return response.data;
551
551
  });
552
- }
552
+ };
553
553
  /**
554
554
  * Get saveBitacoraCostos from the web app table.
555
555
  * @param headers Request headers.
556
556
  * @param session Session object.
557
557
  * @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>.
558
558
  */
559
- export async function saveBitacoraCostos(headers, session, body) {
559
+ export const saveBitacoraCostos = (headers, session, body) => {
560
560
  return handlePossibleAxiosErrors(async () => {
561
561
  const { bitacora_costos_verduras_web_app_table_id } = await getVariablesByName(headers, session, [
562
562
  "bitacora_costos_verduras_web_app_table_id",
@@ -564,14 +564,14 @@ export async function saveBitacoraCostos(headers, session, body) {
564
564
  const response = await createWebAppTableRegister(headers, bitacora_costos_verduras_web_app_table_id, { ...body, modificadoPor: session.get("name") });
565
565
  return response;
566
566
  });
567
- }
567
+ };
568
568
  /**
569
569
  * Put updateBitacoraCostos from the web app table.
570
570
  * @param headers Request headers.
571
571
  * @param session Session object.
572
572
  * @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>.
573
573
  */
574
- export async function updateBitacoraCostos(headers, session, body, id_registro) {
574
+ export const updateBitacoraCostos = (headers, session, body, id_registro) => {
575
575
  return handlePossibleAxiosErrors(async () => {
576
576
  const { bitacora_costos_verduras_web_app_table_id } = await getVariablesByName(headers, session, [
577
577
  "bitacora_costos_verduras_web_app_table_id",
@@ -579,14 +579,14 @@ export async function updateBitacoraCostos(headers, session, body, id_registro)
579
579
  const response = await updateWebAppTableRegister(headers, bitacora_costos_verduras_web_app_table_id, id_registro, { ...body, modificadoPor: session.get("name") });
580
580
  return response;
581
581
  });
582
- }
582
+ };
583
583
  /**
584
584
  * Get getCostosBitacora from the web app table.
585
585
  * @param headers Request headers.
586
586
  * @param session Session object.
587
587
  * @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>.
588
588
  */
589
- export async function getCostosBitacora(headers, session) {
589
+ export const getCostosBitacora = (headers, session) => {
590
590
  return handlePossibleAxiosErrors(async () => {
591
591
  const { bitacora_costos_verduras_web_app_table_id } = await getVariablesByName(headers, session, [
592
592
  "bitacora_costos_verduras_web_app_table_id",
@@ -598,4 +598,4 @@ export async function getCostosBitacora(headers, session) {
598
598
  const bitacora = response.data ?? [];
599
599
  return bitacora;
600
600
  });
601
- }
601
+ };
@@ -6,7 +6,7 @@ import { AxiosUtilsResponse, WebAppRowGraphQL, DischargeHistory, WebAppTableUpda
6
6
  * @param session Session object.
7
7
  * @returns A Promise of AxiosUtilsResponse<DischargeHistory[]>.
8
8
  */
9
- export declare function getDischargeHistories(headers: any, session: Session): Promise<AxiosUtilsResponse<WebAppRowGraphQL<DischargeHistory>[]>>;
9
+ export declare const getDischargeHistories: (headers: any, session: Session) => Promise<AxiosUtilsResponse<WebAppRowGraphQL<DischargeHistory>[]>>;
10
10
  /**
11
11
  * Create a template in the web app table.
12
12
  * @param headers Request headers.
@@ -14,11 +14,11 @@ export declare function getDischargeHistories(headers: any, session: Session): P
14
14
  * @param body DischargeHistory data to be created.
15
15
  * @returns A Promise of AxiosUtilsResponse<DischargeHistory>.
16
16
  */
17
- export declare function createDischargeHistory(headers: any, session: Session, body: DischargeHistory): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
17
+ export declare const createDischargeHistory: (headers: any, session: Session, body: DischargeHistory) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
18
18
  /**
19
19
  * Put updateDischargeHistory from the web app table.
20
20
  * @param headers Request headers.
21
21
  * @param session Session object.
22
22
  * @returns A Promise of AxiosUtilsResponse<DischargeHistory[]>.
23
23
  */
24
- export declare function updateDischargeHistory(headers: any, session: Session, body: DischargeHistory, id_registro: string | number): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
24
+ export declare const updateDischargeHistory: (headers: any, session: Session, body: DischargeHistory, id_registro: string | number) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
@@ -6,7 +6,7 @@ import { createWebAppTableRegister, getVariablesByName, getWebAppTableRegisters,
6
6
  * @param session Session object.
7
7
  * @returns A Promise of AxiosUtilsResponse<DischargeHistory[]>.
8
8
  */
9
- export async function getDischargeHistories(headers, session) {
9
+ export const getDischargeHistories = (headers, session) => {
10
10
  return handlePossibleAxiosErrors(async () => {
11
11
  const { discharge_history_web_app_table_id } = await getVariablesByName(headers, session, ["discharge_history_web_app_table_id"]);
12
12
  const response = await getWebAppTableRegisters(session, discharge_history_web_app_table_id);
@@ -16,7 +16,7 @@ export async function getDischargeHistories(headers, session) {
16
16
  const history = response?.data ?? [];
17
17
  return history;
18
18
  });
19
- }
19
+ };
20
20
  /**
21
21
  * Create a template in the web app table.
22
22
  * @param headers Request headers.
@@ -24,23 +24,23 @@ export async function getDischargeHistories(headers, session) {
24
24
  * @param body DischargeHistory data to be created.
25
25
  * @returns A Promise of AxiosUtilsResponse<DischargeHistory>.
26
26
  */
27
- export async function createDischargeHistory(headers, session, body) {
27
+ export const createDischargeHistory = (headers, session, body) => {
28
28
  return handlePossibleAxiosErrors(async () => {
29
29
  const { discharge_history_web_app_table_id } = await getVariablesByName(headers, session, ["discharge_history_web_app_table_id"]);
30
30
  const response = await createWebAppTableRegister(headers, discharge_history_web_app_table_id, body);
31
31
  return response;
32
32
  });
33
- }
33
+ };
34
34
  /**
35
35
  * Put updateDischargeHistory from the web app table.
36
36
  * @param headers Request headers.
37
37
  * @param session Session object.
38
38
  * @returns A Promise of AxiosUtilsResponse<DischargeHistory[]>.
39
39
  */
40
- export async function updateDischargeHistory(headers, session, body, id_registro) {
40
+ export const updateDischargeHistory = (headers, session, body, id_registro) => {
41
41
  return handlePossibleAxiosErrors(async () => {
42
42
  const { discharge_history_web_app_table_id } = await getVariablesByName(headers, session, ["discharge_history_web_app_table_id"]);
43
43
  const response = await updateWebAppTableRegister(headers, discharge_history_web_app_table_id, id_registro, { ...body });
44
44
  return response;
45
45
  });
46
- }
46
+ };
@@ -33,7 +33,7 @@ export declare const getItemsDataTable: (headers: any, search: SearchItemParams)
33
33
  * @param headers
34
34
  * @returns
35
35
  */
36
- export declare function getLabItemCategories(headers: any, session: Session): Promise<AxiosUtilsResponse<ItemCategoryGraphQL[]>>;
36
+ export declare const getLabItemCategories: (headers: any, session: Session) => Promise<AxiosUtilsResponse<ItemCategoryGraphQL[]>>;
37
37
  /**
38
38
  * createNewLaboratoryClient
39
39
  * @param session
@@ -41,7 +41,7 @@ export declare function getLabItemCategories(headers: any, session: Session): Pr
41
41
  * @param body
42
42
  * @returns
43
43
  */
44
- export declare function createNewLaboratoryItemCategory(session: Session, headers: any, body: Partial<ItemCategoryGraphQL>): Promise<AxiosUtilsResponse<boolean>>;
44
+ export declare const createNewLaboratoryItemCategory: (session: Session, headers: any, body: Partial<ItemCategoryGraphQL>) => Promise<AxiosUtilsResponse<boolean>>;
45
45
  /**
46
46
  * createNewLaboratoryItem
47
47
  * @param session
@@ -49,4 +49,4 @@ export declare function createNewLaboratoryItemCategory(session: Session, header
49
49
  * @param body
50
50
  * @returns
51
51
  */
52
- export declare function createNewLaboratoryItem(headers: any, body: Partial<ItemGraphQL>): Promise<AxiosUtilsResponse<ItemGraphQL>>;
52
+ export declare const createNewLaboratoryItem: (headers: any, body: Partial<ItemGraphQL>) => Promise<AxiosUtilsResponse<ItemGraphQL>>;
@@ -92,7 +92,7 @@ function formatHTMLItemList(item) {
92
92
  * @param headers
93
93
  * @returns
94
94
  */
95
- export async function getLabItemCategories(headers, session) {
95
+ export const getLabItemCategories = (headers, session) => {
96
96
  return handlePossibleAxiosErrors(async () => {
97
97
  const { lab_super_category_item_id } = await getVariablesByName(headers, session, ["lab_super_category_item_id"]);
98
98
  const response = await getItemCategoriesBySuperCategoryId(session, lab_super_category_item_id);
@@ -101,7 +101,7 @@ export async function getLabItemCategories(headers, session) {
101
101
  }
102
102
  return response.data;
103
103
  });
104
- }
104
+ };
105
105
  /**
106
106
  * createNewLaboratoryClient
107
107
  * @param session
@@ -109,7 +109,7 @@ export async function getLabItemCategories(headers, session) {
109
109
  * @param body
110
110
  * @returns
111
111
  */
112
- export async function createNewLaboratoryItemCategory(session, headers, body) {
112
+ export const createNewLaboratoryItemCategory = (session, headers, body) => {
113
113
  return handlePossibleAxiosErrors(async () => {
114
114
  const { lab_super_category_item_id } = await getVariablesByName(headers, session, ["lab_super_category_item_id"]);
115
115
  const sendBody = {
@@ -123,7 +123,7 @@ export async function createNewLaboratoryItemCategory(session, headers, body) {
123
123
  }
124
124
  return true;
125
125
  });
126
- }
126
+ };
127
127
  /**
128
128
  * createNewLaboratoryItem
129
129
  * @param session
@@ -131,7 +131,7 @@ export async function createNewLaboratoryItemCategory(session, headers, body) {
131
131
  * @param body
132
132
  * @returns
133
133
  */
134
- export async function createNewLaboratoryItem(headers, body) {
134
+ export const createNewLaboratoryItem = (headers, body) => {
135
135
  return handlePossibleAxiosErrors(async () => {
136
136
  const sendBody = {
137
137
  active: true,
@@ -149,4 +149,4 @@ export async function createNewLaboratoryItem(headers, body) {
149
149
  }
150
150
  return createResponse.data;
151
151
  });
152
- }
152
+ };
@@ -1,10 +1,10 @@
1
1
  import { Session } from "@remix-run/node";
2
2
  import { AxiosUtilsResponse, BasicIdNameSchema, MotivoRechazo, WebAppRowGraphQL, WebAppTableUpdateResponse } from "@zauru-sdk/types";
3
- export declare function formatearMotivoDeRechazo(entity: WebAppRowGraphQL<MotivoRechazo>): BasicIdNameSchema;
3
+ export declare const formatearMotivoDeRechazo: (entity: WebAppRowGraphQL<MotivoRechazo>) => BasicIdNameSchema;
4
4
  /**
5
5
  * Post saveBitacoraPOMassive from the web app table.
6
6
  * @param headers Request headers.
7
7
  * @param session Session object.
8
8
  * @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraPOMassive>[]>.
9
9
  */
10
- export declare function saveRechazoCanastas(headers: any, session: Session, body: any): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
10
+ export declare const saveRechazoCanastas: (headers: any, session: Session, body: any) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
@@ -1,18 +1,18 @@
1
1
  import { handlePossibleAxiosErrors } from "@zauru-sdk/common";
2
2
  import { createWebAppTableRegister, getVariablesByName, } from "@zauru-sdk/services";
3
- export function formatearMotivoDeRechazo(entity) {
3
+ export const formatearMotivoDeRechazo = (entity) => {
4
4
  return { id: entity.id, name: entity.data.Nombre };
5
- }
5
+ };
6
6
  /**
7
7
  * Post saveBitacoraPOMassive from the web app table.
8
8
  * @param headers Request headers.
9
9
  * @param session Session object.
10
10
  * @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraPOMassive>[]>.
11
11
  */
12
- export async function saveRechazoCanastas(headers, session, body) {
12
+ export const saveRechazoCanastas = (headers, session, body) => {
13
13
  return handlePossibleAxiosErrors(async () => {
14
14
  const { recepciones_rejections_webapp_table_id } = await getVariablesByName(headers, session, ["recepciones_rejections_webapp_table_id"]);
15
15
  const response = await createWebAppTableRegister(headers, recepciones_rejections_webapp_table_id, { ...body });
16
16
  return response;
17
17
  });
18
- }
18
+ };
@@ -8,7 +8,7 @@ export declare const TEXT_PAYEE_CATEGORY_NAME_FOR_PRICE = "CAT-LABORATORIO: ";
8
8
  * @param headers
9
9
  * @returns
10
10
  */
11
- export declare function getClientesLaboratorio(session: Session): Promise<AxiosUtilsResponse<PayeeGraphQL[]>>;
11
+ export declare const getClientesLaboratorio: (session: Session) => Promise<AxiosUtilsResponse<PayeeGraphQL[]>>;
12
12
  /**
13
13
  * createNewLaboratoryClient
14
14
  * @param session
@@ -16,7 +16,7 @@ export declare function getClientesLaboratorio(session: Session): Promise<AxiosU
16
16
  * @param body
17
17
  * @returns
18
18
  */
19
- export declare function createNewLaboratoryClient(headers: any, body: Partial<PayeeGraphQL>): Promise<AxiosUtilsResponse<boolean>>;
19
+ export declare const createNewLaboratoryClient: (headers: any, body: Partial<PayeeGraphQL>) => Promise<AxiosUtilsResponse<boolean>>;
20
20
  /**
21
21
  * createNewLaboratoryClientCategoryPrice
22
22
  * @param session
@@ -24,7 +24,7 @@ export declare function createNewLaboratoryClient(headers: any, body: Partial<Pa
24
24
  * @param body
25
25
  * @returns
26
26
  */
27
- export declare function updateLaboratoryClientCategoryPrice(headers: any, body: Partial<PayeeCategoryGraphQL>): Promise<AxiosUtilsResponse<boolean>>;
27
+ export declare const updateLaboratoryClientCategoryPrice: (headers: any, body: Partial<PayeeCategoryGraphQL>) => Promise<AxiosUtilsResponse<boolean>>;
28
28
  /**
29
29
  * createNewLaboratoryClientCategoryPrice
30
30
  * @param session
@@ -32,11 +32,11 @@ export declare function updateLaboratoryClientCategoryPrice(headers: any, body:
32
32
  * @param body
33
33
  * @returns
34
34
  */
35
- export declare function createNewLaboratoryClientCategoryPrice(headers: any, session: Session, body: Partial<PayeeCategoryGraphQL>): Promise<AxiosUtilsResponse<boolean>>;
35
+ export declare const createNewLaboratoryClientCategoryPrice: (headers: any, session: Session, body: Partial<PayeeCategoryGraphQL>) => Promise<AxiosUtilsResponse<boolean>>;
36
36
  /**
37
37
  * deleteLaboratoryClientCategoryPrice
38
38
  * @param headers
39
39
  * @param body
40
40
  * @returns
41
41
  */
42
- export declare function deleteLaboratoryClientCategoryPrice(headers: any, body: Partial<PayeeCategoryGraphQL>): Promise<AxiosUtilsResponse<boolean>>;
42
+ export declare const deleteLaboratoryClientCategoryPrice: (headers: any, body: Partial<PayeeCategoryGraphQL>) => Promise<AxiosUtilsResponse<boolean>>;