@zauru-sdk/services 6.17.0 → 6.18.1

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.
@@ -84,6 +84,21 @@ export async function createWebAppTableRegister(headers, id_web_app_table, body,
84
84
  });
85
85
  return response.data;
86
86
  }
87
+ /**
88
+ * Creates multiple webapp table rows in one Baculo request.
89
+ * Baculo currently accepts up to 200 rows per request.
90
+ */
91
+ export async function createWebAppTableRegistersBulk(headers, id_web_app_table, bodies) {
92
+ const requestBody = {
93
+ webapp_rows: bodies.map((data) => ({ data })),
94
+ };
95
+ const response = await httpZauru(`/apps/webapp_tables/${id_web_app_table}/webapp_rows/bulk.json`, {
96
+ method: "POST",
97
+ headers,
98
+ data: requestBody,
99
+ });
100
+ return response.data;
101
+ }
87
102
  /**
88
103
  * updateWebAppTableRegister Function for update a web app table register
89
104
  * @param headers
@@ -100,6 +115,19 @@ export async function updateWebAppTableRegister(headers, id_web_app_table, id_re
100
115
  });
101
116
  return response.data;
102
117
  }
118
+ /**
119
+ * Partially updates multiple webapp table rows in one Baculo request.
120
+ * Each row's data is shallow-merged with its current JSON data.
121
+ */
122
+ export async function updateWebAppTableRegistersBulk(headers, id_web_app_table, rows) {
123
+ const requestBody = { webapp_rows: rows };
124
+ const response = await httpZauru(`/apps/webapp_tables/${id_web_app_table}/webapp_rows/bulk.json`, {
125
+ method: "PATCH",
126
+ headers,
127
+ data: requestBody,
128
+ });
129
+ return response.data;
130
+ }
103
131
  /**
104
132
  * associateWebAppTableRegister — links one or more rowables to an existing row
105
133
  * POST /apps/webapp_tables/:webapp_table_id/webapp_rows/:id/associate.json
@@ -1,5 +1,5 @@
1
1
  import type { Session } from "@remix-run/node";
2
- import { AxiosUtilsResponse, RejectionWebAppTableObject, WebAppRowAssociateBody, WebAppRowAssociateResponse, WebAppRowDissociateBody, WebAppRowDissociateResponse, WebAppRowGraphQL, WebAppTableCreateBody, WebAppTableGraphQL, WebAppTableUpdateResponse } from "@zauru-sdk/types";
2
+ import { AxiosUtilsResponse, RejectionWebAppTableObject, WebAppRowAssociateBody, WebAppRowAssociateResponse, WebAppRowDissociateBody, WebAppRowDissociateResponse, WebAppRowGraphQL, WebAppTableBulkResponse, WebAppTableBulkUpdateBody, WebAppTableCreateBody, WebAppTableGraphQL, WebAppTableUpdateResponse } from "@zauru-sdk/types";
3
3
  import { type GetWebAppRowsByTableIdOptions } from "@zauru-sdk/graphql";
4
4
  /**
5
5
  * getWebAppRow
@@ -35,6 +35,11 @@ export declare function getWebAppTableRegistersRest<T>(headers: any, id_web_app_
35
35
  * @returns
36
36
  */
37
37
  export declare function createWebAppTableRegister<T>(headers: any, id_web_app_table: string, body: T, extraBody?: WebAppRowAssociateBody): Promise<WebAppTableUpdateResponse>;
38
+ /**
39
+ * Creates multiple webapp table rows in one Baculo request.
40
+ * Baculo currently accepts up to 200 rows per request.
41
+ */
42
+ export declare function createWebAppTableRegistersBulk<T>(headers: any, id_web_app_table: string, bodies: T[]): Promise<WebAppTableBulkResponse<T>>;
38
43
  /**
39
44
  * updateWebAppTableRegister Function for update a web app table register
40
45
  * @param headers
@@ -43,6 +48,11 @@ export declare function createWebAppTableRegister<T>(headers: any, id_web_app_ta
43
48
  * @returns
44
49
  */
45
50
  export declare function updateWebAppTableRegister<T>(headers: any, id_web_app_table: string, id_register: number | string, body: Partial<T>): Promise<WebAppTableUpdateResponse>;
51
+ /**
52
+ * Partially updates multiple webapp table rows in one Baculo request.
53
+ * Each row's data is shallow-merged with its current JSON data.
54
+ */
55
+ export declare function updateWebAppTableRegistersBulk<T>(headers: any, id_web_app_table: string, rows: WebAppTableBulkUpdateBody<T>["webapp_rows"]): Promise<WebAppTableBulkResponse<T>>;
46
56
  /**
47
57
  * associateWebAppTableRegister — links one or more rowables to an existing row
48
58
  * POST /apps/webapp_tables/:webapp_table_id/webapp_rows/:id/associate.json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/services",
3
- "version": "6.17.0",
3
+ "version": "6.18.1",
4
4
  "description": "Servicios de consulta a Zauru",
5
5
  "main": "./dist/esm/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -27,13 +27,13 @@
27
27
  "dependencies": {
28
28
  "@remix-run/node": "^2.8.1",
29
29
  "@upstash/redis": "^1.34.5",
30
- "@zauru-sdk/common": "^6.14.0",
30
+ "@zauru-sdk/common": "^6.14.2",
31
31
  "@zauru-sdk/config": "^6.0.0",
32
32
  "@zauru-sdk/graphql": "^6.9.1",
33
- "@zauru-sdk/types": "^6.29.0",
33
+ "@zauru-sdk/types": "^6.30.2",
34
34
  "axios": "^1.6.7",
35
35
  "chalk": "5.3.0",
36
36
  "moment": "^2.30.1"
37
37
  },
38
- "gitHead": "8e5cb991b0da7d1a5d70cd6275d7bfdc52ee1102"
38
+ "gitHead": "c0b80c26ce1e4788cb7683fb6514ad449b46ac59"
39
39
  }