attlaz-client 1.39.0 → 1.40.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/Core/MetaDataAware.d.ts +0 -1
- package/dist/Core/MetaDataAware.js +2 -2
- package/dist/Core/MetaDataWithIconAware.d.ts +12 -0
- package/dist/Core/MetaDataWithIconAware.js +14 -0
- package/dist/Model/Adapter/Adapter.d.ts +2 -2
- package/dist/Model/Adapter/Adapter.js +7 -7
- package/dist/Service/ConfigurationEndpoint.d.ts +2 -1
- package/dist/Service/ConfigurationEndpoint.js +6 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +10 -10
|
@@ -3,7 +3,7 @@ import { Utils } from '../Utils.js';
|
|
|
3
3
|
export class MetaDataAware {
|
|
4
4
|
name;
|
|
5
5
|
description = null;
|
|
6
|
-
icon = null;
|
|
6
|
+
// public icon: string | null = null;
|
|
7
7
|
metadata;
|
|
8
8
|
updatedAt = null;
|
|
9
9
|
createdAt = null;
|
|
@@ -11,7 +11,7 @@ export class MetaDataAware {
|
|
|
11
11
|
input.id = raw.id;
|
|
12
12
|
input.name = raw.name;
|
|
13
13
|
input.description = raw.description;
|
|
14
|
-
input.icon = raw.icon;
|
|
14
|
+
// input.icon = raw.icon as string | null;
|
|
15
15
|
// TODO: parse meta data
|
|
16
16
|
if (Object.prototype.hasOwnProperty.call(raw, 'metadata')) {
|
|
17
17
|
// input.metadata = DataValueCollection.fromObject(raw.metadata as any);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ApiRecord } from '../Model/ApiRecord.js';
|
|
2
|
+
import { DataValueCollection } from '../Model/DataValueCollection.js';
|
|
3
|
+
export declare abstract class MetaDataWithIconAware {
|
|
4
|
+
abstract id: string;
|
|
5
|
+
icon: string | null;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string | null;
|
|
8
|
+
metadata: DataValueCollection;
|
|
9
|
+
updatedAt: Date | null;
|
|
10
|
+
createdAt: Date | null;
|
|
11
|
+
static parseMetaData<T extends MetaDataWithIconAware>(input: T, raw: ApiRecord): T;
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MetaDataAware } from './MetaDataAware.js';
|
|
2
|
+
export class MetaDataWithIconAware {
|
|
3
|
+
icon;
|
|
4
|
+
name;
|
|
5
|
+
description = null;
|
|
6
|
+
metadata;
|
|
7
|
+
updatedAt = null;
|
|
8
|
+
createdAt = null;
|
|
9
|
+
static parseMetaData(input, raw) {
|
|
10
|
+
input = MetaDataAware.parseMetaData(input, raw);
|
|
11
|
+
input.icon = raw.icon;
|
|
12
|
+
return input;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MetaDataWithIconAware } from '../../Core/MetaDataWithIconAware.js';
|
|
2
2
|
import { ApiRecord } from '../ApiRecord.js';
|
|
3
|
-
export declare class Adapter extends
|
|
3
|
+
export declare class Adapter extends MetaDataWithIconAware {
|
|
4
4
|
id: string;
|
|
5
5
|
vendor: string;
|
|
6
6
|
logo: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export class Adapter extends
|
|
1
|
+
import { MetaDataWithIconAware } from '../../Core/MetaDataWithIconAware.js';
|
|
2
|
+
export class Adapter extends MetaDataWithIconAware {
|
|
3
3
|
id;
|
|
4
4
|
vendor;
|
|
5
5
|
logo;
|
|
@@ -8,12 +8,12 @@ export class Adapter extends MetaDataAware {
|
|
|
8
8
|
docs;
|
|
9
9
|
website;
|
|
10
10
|
static parse(rawAdapter) {
|
|
11
|
-
const adapter =
|
|
12
|
-
adapter.id = rawAdapter.id;
|
|
13
|
-
adapter.name = rawAdapter.name;
|
|
14
|
-
adapter.description = rawAdapter.description;
|
|
11
|
+
const adapter = MetaDataWithIconAware.parseMetaData(new Adapter(), rawAdapter);
|
|
12
|
+
// adapter.id = rawAdapter.id as string;
|
|
13
|
+
// adapter.name = rawAdapter.name as string;
|
|
14
|
+
// adapter.description = rawAdapter.description as string;
|
|
15
15
|
adapter.vendor = rawAdapter.vendor;
|
|
16
|
-
adapter.icon = rawAdapter.icon;
|
|
16
|
+
// adapter.icon = rawAdapter.icon as string;
|
|
17
17
|
adapter.logo = rawAdapter.logo;
|
|
18
18
|
adapter.type = rawAdapter.type;
|
|
19
19
|
adapter.categoryIds = rawAdapter.categories;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Configuration } from '../Model/Configuration/Configuration.js';
|
|
2
|
-
import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
3
2
|
import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
|
|
3
|
+
import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
4
4
|
import { Endpoint } from './Endpoint.js';
|
|
5
5
|
export declare class ConfigurationEndpoint extends Endpoint {
|
|
6
6
|
getByPath(scopeId: string, path: string): Promise<Configuration | null>;
|
|
7
7
|
getByPathQuery(scopeId: string, pathQuery: string, pagination: CursorPagination): Promise<CollectionResult<Configuration>>;
|
|
8
|
+
save(scopeId: string, path: string, value: unknown): Promise<CollectionResult<Configuration>>;
|
|
8
9
|
}
|
|
@@ -31,4 +31,10 @@ export class ConfigurationEndpoint extends Endpoint {
|
|
|
31
31
|
throw error;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
+
async save(scopeId, path, value) {
|
|
35
|
+
const qs = new QueryString('/configurations/' + scopeId);
|
|
36
|
+
qs.set('path', path);
|
|
37
|
+
const result = await this.requestCollection(qs, Configuration.parse, { value: value }, 'POST');
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
34
40
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.39.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.
|
|
1
|
+
export const VERSION = "1.39.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "attlaz-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.40.0",
|
|
4
4
|
"description": "Javascript Client to access Attlaz API",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -43,29 +43,29 @@
|
|
|
43
43
|
"registry": "https://registry.npmjs.org"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"axios": "^1.
|
|
46
|
+
"axios": "^1.13.2",
|
|
47
47
|
"axios-oauth-client": "^2.2.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/jest": "^30.0.0",
|
|
51
|
-
"@types/node": "^24.0
|
|
51
|
+
"@types/node": "^24.10.0",
|
|
52
52
|
"@typescript-eslint/eslint-plugin": "^8.1.0",
|
|
53
53
|
"@typescript-eslint/parser": "^8.1.0",
|
|
54
|
-
"dotenv": "^17.2.
|
|
55
|
-
"eslint": "^9.
|
|
54
|
+
"dotenv": "^17.2.3",
|
|
55
|
+
"eslint": "^9.39.1",
|
|
56
56
|
"eslint-config-attlaz-base": "^1.4.0",
|
|
57
57
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
58
58
|
"eslint-plugin-import": "^2.32.0",
|
|
59
|
-
"eslint-plugin-jsdoc": "^51.
|
|
59
|
+
"eslint-plugin-jsdoc": "^51.4.1",
|
|
60
60
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
61
61
|
"eslint-plugin-promise": "^7.2.1",
|
|
62
|
-
"jest": "^30.0
|
|
63
|
-
"rimraf": "^6.0
|
|
62
|
+
"jest": "^30.2.0",
|
|
63
|
+
"rimraf": "^6.1.0",
|
|
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.4.
|
|
68
|
-
"typescript": "^5.
|
|
67
|
+
"ts-jest": "^29.4.5",
|
|
68
|
+
"typescript": "^5.9.3"
|
|
69
69
|
},
|
|
70
70
|
"directories": {
|
|
71
71
|
"test": "test"
|