@zauru-sdk/services 6.7.5 → 6.8.0

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.
@@ -24,13 +24,14 @@ export async function getWebAppRow(session, id) {
24
24
  * getWebAppTableRegisters Function for get all web app table registers
25
25
  * @param headers
26
26
  * @param webapp_table_id web app table id
27
+ * @param limitOrOptions optional row limit, or `{ limit, data }` JSONB filters
27
28
  * @returns
28
29
  */
29
- export async function getWebAppTableRegisters(session, webapp_table_id, limit) {
30
+ export async function getWebAppTableRegisters(session, webapp_table_id, limitOrOptions) {
30
31
  return handlePossibleAxiosErrors(async () => {
31
32
  const headers = await getGraphQLAPIHeaders(session);
32
33
  const response = await httpGraphQLAPI.post("", {
33
- query: getWebAppRowsByWebAppTableIdStringQuery(Number(webapp_table_id), limit),
34
+ query: getWebAppRowsByWebAppTableIdStringQuery(Number(webapp_table_id), limitOrOptions),
34
35
  }, { headers });
35
36
  if (response.data.errors) {
36
37
  throw new Error(response.data.errors.map((x) => x.message).join(";"));
@@ -1,5 +1,6 @@
1
1
  import type { Session } from "@remix-run/node";
2
2
  import { AxiosUtilsResponse, RejectionWebAppTableObject, WebAppRowAssociateBody, WebAppRowAssociateResponse, WebAppRowDissociateBody, WebAppRowDissociateResponse, WebAppRowGraphQL, WebAppTableCreateBody, WebAppTableGraphQL, WebAppTableUpdateResponse } from "@zauru-sdk/types";
3
+ import { type GetWebAppRowsByTableIdOptions } from "@zauru-sdk/graphql";
3
4
  /**
4
5
  * getWebAppRow
5
6
  * @param headers
@@ -10,9 +11,10 @@ export declare function getWebAppRow<T>(session: Session, id: number): Promise<A
10
11
  * getWebAppTableRegisters Function for get all web app table registers
11
12
  * @param headers
12
13
  * @param webapp_table_id web app table id
14
+ * @param limitOrOptions optional row limit, or `{ limit, data }` JSONB filters
13
15
  * @returns
14
16
  */
15
- export declare function getWebAppTableRegisters<T>(session: Session, webapp_table_id: string, limit?: number): Promise<AxiosUtilsResponse<WebAppRowGraphQL<T>[]>>;
17
+ export declare function getWebAppTableRegisters<T>(session: Session, webapp_table_id: string, limitOrOptions?: number | GetWebAppRowsByTableIdOptions): Promise<AxiosUtilsResponse<WebAppRowGraphQL<T>[]>>;
16
18
  /**
17
19
  * deleteWebAppTableRegister Function for delete a web app table register
18
20
  * @param headers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/services",
3
- "version": "6.7.5",
3
+ "version": "6.8.0",
4
4
  "description": "Servicios de consulta a Zauru",
5
5
  "main": "./dist/esm/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -28,11 +28,11 @@
28
28
  "@upstash/redis": "^1.34.5",
29
29
  "@zauru-sdk/common": "^6.4.0",
30
30
  "@zauru-sdk/config": "^6.0.0",
31
- "@zauru-sdk/graphql": "^6.5.0",
31
+ "@zauru-sdk/graphql": "^6.6.0",
32
32
  "@zauru-sdk/types": "^6.14.0",
33
33
  "axios": "^1.6.7",
34
34
  "chalk": "5.3.0",
35
35
  "moment": "^2.30.1"
36
36
  },
37
- "gitHead": "66fea5adcf174e0a5e7a5f9324eb45ae0223f8b7"
37
+ "gitHead": "e32a0a82d185dbd8feb512c2252e458b415edc95"
38
38
  }