@zauru-sdk/utils 1.0.99 → 1.0.105

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteQueueFormReceptionHistory = exports.updateQueueFormReceptionHistory = exports.createQueueFormReceptionHistory = exports.getQueueFormReceptionHistories = exports.ESTADOS_COLA_RECEPCIONES = void 0;
3
+ exports.deleteQueueFormReceptionHistory = exports.updateQueueFormReceptionHistory = exports.createQueueFormReceptionHistory = exports.getQueueFormReceptionHistoryByID = exports.getQueueFormReceptionHistories = exports.ESTADOS_COLA_RECEPCIONES = void 0;
4
4
  const common_1 = require("@zauru-sdk/common");
5
5
  const services_1 = require("@zauru-sdk/services");
6
6
  exports.ESTADOS_COLA_RECEPCIONES = {
@@ -30,6 +30,23 @@ const getQueueFormReceptionHistories = (headers, session) => {
30
30
  });
31
31
  };
32
32
  exports.getQueueFormReceptionHistories = getQueueFormReceptionHistories;
33
+ /**
34
+ * Get getQueueFormReceptionHistories from the web app table.
35
+ * @param headers Request headers.
36
+ * @param session Session object.
37
+ * @returns A Promise of AxiosUtilsResponse<QueueFormReceptionWebAppTable[]>.
38
+ */
39
+ const getQueueFormReceptionHistoryByID = (session, id) => {
40
+ return (0, common_1.handlePossibleAxiosErrors)(async () => {
41
+ const response = await (0, services_1.getWebAppRow)(session, Number(id));
42
+ if (response.error) {
43
+ throw new Error(`Ocurrió un error al consultar el historial de colas: ${response.userMsg}`);
44
+ }
45
+ const history = response?.data ?? null;
46
+ return history;
47
+ });
48
+ };
49
+ exports.getQueueFormReceptionHistoryByID = getQueueFormReceptionHistoryByID;
33
50
  /**
34
51
  * Create a template in the web app table.
35
52
  * @param headers Request headers.
@@ -1,5 +1,5 @@
1
1
  import { handlePossibleAxiosErrors } from "@zauru-sdk/common";
2
- import { createWebAppTableRegister, deleteWebAppTableRegister, getVariablesByName, getWebAppTableRegisters, updateWebAppTableRegister, } from "@zauru-sdk/services";
2
+ import { createWebAppTableRegister, deleteWebAppTableRegister, getVariablesByName, getWebAppRow, getWebAppTableRegisters, updateWebAppTableRegister, } from "@zauru-sdk/services";
3
3
  export const ESTADOS_COLA_RECEPCIONES = {
4
4
  EN_PROCESO: "En proceso",
5
5
  ERROR: "Con error",
@@ -26,6 +26,22 @@ export const getQueueFormReceptionHistories = (headers, session) => {
26
26
  return history;
27
27
  });
28
28
  };
29
+ /**
30
+ * Get getQueueFormReceptionHistories from the web app table.
31
+ * @param headers Request headers.
32
+ * @param session Session object.
33
+ * @returns A Promise of AxiosUtilsResponse<QueueFormReceptionWebAppTable[]>.
34
+ */
35
+ export const getQueueFormReceptionHistoryByID = (session, id) => {
36
+ return handlePossibleAxiosErrors(async () => {
37
+ const response = await getWebAppRow(session, Number(id));
38
+ if (response.error) {
39
+ throw new Error(`Ocurrió un error al consultar el historial de colas: ${response.userMsg}`);
40
+ }
41
+ const history = response?.data ?? null;
42
+ return history;
43
+ });
44
+ };
29
45
  /**
30
46
  * Create a template in the web app table.
31
47
  * @param headers Request headers.
@@ -14,6 +14,13 @@ export declare const ESTADOS_COLA_RECEPCIONES: {
14
14
  * @returns A Promise of AxiosUtilsResponse<QueueFormReceptionWebAppTable[]>.
15
15
  */
16
16
  export declare const getQueueFormReceptionHistories: (headers: any, session: Session) => Promise<AxiosUtilsResponse<WebAppRowGraphQL<QueueFormReceptionWebAppTable>[]>>;
17
+ /**
18
+ * Get getQueueFormReceptionHistories from the web app table.
19
+ * @param headers Request headers.
20
+ * @param session Session object.
21
+ * @returns A Promise of AxiosUtilsResponse<QueueFormReceptionWebAppTable[]>.
22
+ */
23
+ export declare const getQueueFormReceptionHistoryByID: (session: Session, id: string | number) => Promise<AxiosUtilsResponse<QueueFormReceptionWebAppTable | null>>;
17
24
  /**
18
25
  * Create a template in the web app table.
19
26
  * @param headers Request headers.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/utils",
3
- "version": "1.0.99",
3
+ "version": "1.0.105",
4
4
  "description": "Utilidades, parseo de request y demás para desarrollo de webapps de Zauru",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -25,11 +25,11 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@remix-run/node": "^2.8.1",
28
- "@zauru-sdk/common": "^1.0.99",
28
+ "@zauru-sdk/common": "^1.0.105",
29
29
  "@zauru-sdk/config": "^1.0.60",
30
- "@zauru-sdk/graphql": "^1.0.94",
31
- "@zauru-sdk/services": "^1.0.99",
30
+ "@zauru-sdk/graphql": "^1.0.105",
31
+ "@zauru-sdk/services": "^1.0.105",
32
32
  "@zauru-sdk/types": "^1.0.98"
33
33
  },
34
- "gitHead": "ad07b6fa1ffed108a45c2ae3e043e2168664dfb5"
34
+ "gitHead": "57fb17e6d485c1d661432a1517fe8c4e8d354e78"
35
35
  }