attlaz-client 1.27.3 → 1.29.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.
- package/dist/AttlazResource.d.ts +3 -0
- package/dist/AttlazResource.js +4 -0
- package/dist/Helper/LoadAllHelper.d.ts +2 -1
- package/dist/Helper/LoadAllHelper.js +2 -2
- package/dist/Http/Data/QueryString.js +9 -3
- package/dist/ResourceNamespace.d.ts +2 -0
- package/dist/ResourceNamespace.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +9 -9
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
|
|
2
2
|
import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
3
|
+
import { EntityId } from '../Model/EntityId.js';
|
|
3
4
|
export declare class LoadAllHelper {
|
|
4
5
|
static loadAll<T extends {
|
|
5
|
-
id: string;
|
|
6
|
+
id: string | EntityId;
|
|
6
7
|
}>(call: (pagination: CursorPagination) => Promise<CollectionResult<T>>, limit?: number): Promise<T[]>;
|
|
7
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
|
|
2
2
|
export class LoadAllHelper {
|
|
3
|
-
static async loadAll(call, limit =
|
|
3
|
+
static async loadAll(call, limit = 100) {
|
|
4
4
|
const totalResult = [];
|
|
5
5
|
let hasMore = true;
|
|
6
6
|
let lastRef = null;
|
|
@@ -11,7 +11,7 @@ export class LoadAllHelper {
|
|
|
11
11
|
const data = await call(firstPagination);
|
|
12
12
|
for (const record of data.getData()) {
|
|
13
13
|
totalResult.push(record);
|
|
14
|
-
lastRef = record.id;
|
|
14
|
+
lastRef = record.id.toString();
|
|
15
15
|
}
|
|
16
16
|
hasMore = data.hasMore;
|
|
17
17
|
}
|
|
@@ -47,11 +47,17 @@ export class QueryString {
|
|
|
47
47
|
}
|
|
48
48
|
const output = [];
|
|
49
49
|
for (const parameter of this.parameters) {
|
|
50
|
-
|
|
50
|
+
const { value } = parameter;
|
|
51
51
|
if (Array.isArray(value)) {
|
|
52
|
-
|
|
52
|
+
/** Legacy way **/
|
|
53
|
+
// output.push(parameter.parameter + '=' + encodeURIComponent(value.join(',')));
|
|
54
|
+
for (const subValue of value) {
|
|
55
|
+
output.push(parameter.parameter + '=' + encodeURIComponent(subValue));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
output.push(parameter.parameter + '=' + encodeURIComponent(value));
|
|
53
60
|
}
|
|
54
|
-
output.push(parameter.parameter + '=' + encodeURIComponent(value));
|
|
55
61
|
}
|
|
56
62
|
if (this.command.includes('?')) {
|
|
57
63
|
return this.command + '&' + output.join('&');
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.29.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.
|
|
1
|
+
export const VERSION = "1.29.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "attlaz-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.29.0",
|
|
4
4
|
"description": "Javascript Client to access Attlaz API",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -43,20 +43,20 @@
|
|
|
43
43
|
"registry": "https://registry.npmjs.org"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"axios": "^1.8.
|
|
46
|
+
"axios": "^1.8.4",
|
|
47
47
|
"axios-oauth-client": "^2.2.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/jest": "^29.5.14",
|
|
51
|
-
"@types/node": "^22.
|
|
51
|
+
"@types/node": "^22.14.1",
|
|
52
52
|
"@typescript-eslint/eslint-plugin": "^8.1.0",
|
|
53
53
|
"@typescript-eslint/parser": "^8.1.0",
|
|
54
|
-
"dotenv": "^16.
|
|
55
|
-
"eslint": "^9.
|
|
54
|
+
"dotenv": "^16.5.0",
|
|
55
|
+
"eslint": "^9.25.1",
|
|
56
56
|
"eslint-config-attlaz-base": "^1.2.0",
|
|
57
|
-
"eslint-import-resolver-typescript": "^3.
|
|
57
|
+
"eslint-import-resolver-typescript": "^4.3.4",
|
|
58
58
|
"eslint-plugin-import": "^2.31.0",
|
|
59
|
-
"eslint-plugin-jsdoc": "^50.6.
|
|
59
|
+
"eslint-plugin-jsdoc": "^50.6.9",
|
|
60
60
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
61
61
|
"eslint-plugin-promise": "^7.2.1",
|
|
62
62
|
"jest": "^29.7.0",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"rollup-plugin-commonjs": "^10.1.0",
|
|
65
65
|
"rollup-plugin-node-resolve": "^5.2.0",
|
|
66
66
|
"rollup-plugin-typescript": "^1.0.1",
|
|
67
|
-
"ts-jest": "^29.2
|
|
68
|
-
"typescript": "^5.8.
|
|
67
|
+
"ts-jest": "^29.3.2",
|
|
68
|
+
"typescript": "^5.8.3"
|
|
69
69
|
},
|
|
70
70
|
"directories": {
|
|
71
71
|
"test": "test"
|