attlaz-client 1.21.9 → 1.21.11

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.
@@ -3,5 +3,5 @@ import { CollectionResult } from '../Model/Result/CollectionResult.js';
3
3
  export declare class LoadAllHelper {
4
4
  static loadAll<T extends {
5
5
  id: string;
6
- }>(call: (pagination: CursorPagination) => Promise<CollectionResult<T>>): Promise<T[]>;
6
+ }>(call: (pagination: CursorPagination) => Promise<CollectionResult<T>>, limit?: number): Promise<T[]>;
7
7
  }
@@ -1,12 +1,12 @@
1
1
  import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
2
2
  export class LoadAllHelper {
3
- static async loadAll(call) {
3
+ static async loadAll(call, limit = 25) {
4
4
  const totalResult = [];
5
5
  let hasMore = true;
6
6
  let lastRef = null;
7
7
  while (hasMore) {
8
8
  const firstPagination = new CursorPagination();
9
- firstPagination.limit = 10;
9
+ firstPagination.limit = limit;
10
10
  firstPagination.startingAfter = lastRef;
11
11
  const data = await call(firstPagination);
12
12
  for (const record of data.getData()) {
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.21.6";
1
+ export declare const VERSION = "1.21.9";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.21.6";
1
+ export const VERSION = "1.21.9";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.21.9",
3
+ "version": "1.21.11",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",