attlaz-client 1.38.2 → 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.
@@ -4,7 +4,6 @@ export declare abstract class MetaDataAware {
4
4
  abstract id: string;
5
5
  name: string;
6
6
  description: string | null;
7
- icon: string | null;
8
7
  metadata: DataValueCollection;
9
8
  updatedAt: Date | null;
10
9
  createdAt: Date | null;
@@ -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 { MetaDataAware } from '../../Core/MetaDataAware.js';
1
+ import { MetaDataWithIconAware } from '../../Core/MetaDataWithIconAware.js';
2
2
  import { ApiRecord } from '../ApiRecord.js';
3
- export declare class Adapter extends MetaDataAware {
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 { MetaDataAware } from '../../Core/MetaDataAware.js';
2
- export class Adapter extends MetaDataAware {
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 = MetaDataAware.parseMetaData(new Adapter(), rawAdapter);
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
  }
@@ -14,5 +14,5 @@ export declare class LogEndpoint extends Endpoint {
14
14
  delete(logId: string): Promise<boolean>;
15
15
  clear(logStreamId: LogStreamId): Promise<boolean>;
16
16
  getInformation(logStreamId: LogStreamId): Promise<LogStreamInformation | null>;
17
- getByProject(projectId: string): Promise<CollectionResult<LogStream>>;
17
+ getByProject(projectId: string, pagination?: CursorPagination | null): Promise<CollectionResult<LogStream>>;
18
18
  }
@@ -129,9 +129,11 @@ export class LogEndpoint extends Endpoint {
129
129
  throw error;
130
130
  }
131
131
  }
132
- async getByProject(projectId) {
132
+ async getByProject(projectId, pagination = null) {
133
+ const queryString = new QueryString('projects/' + projectId + '/logstreams');
134
+ queryString.addPagination(pagination);
133
135
  const parser = (raw) => new LogStream(new LogStreamId(raw.id), raw.name);
134
- const result = await this.requestCollection('projects/' + projectId + '/logstreams', parser);
136
+ const result = await this.requestCollection(queryString, parser);
135
137
  return result;
136
138
  }
137
139
  }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.38.1";
1
+ export declare const VERSION = "1.39.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.38.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.38.2",
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.9.0",
46
+ "axios": "^1.13.2",
47
47
  "axios-oauth-client": "^2.2.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@types/jest": "^29.5.14",
51
- "@types/node": "^22.15.18",
50
+ "@types/jest": "^30.0.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": "^16.5.0",
55
- "eslint": "^9.26.0",
56
- "eslint-config-attlaz-base": "^1.3.1",
57
- "eslint-import-resolver-typescript": "^4.3.4",
58
- "eslint-plugin-import": "^2.31.0",
59
- "eslint-plugin-jsdoc": "^50.6.15",
54
+ "dotenv": "^17.2.3",
55
+ "eslint": "^9.39.1",
56
+ "eslint-config-attlaz-base": "^1.4.0",
57
+ "eslint-import-resolver-typescript": "^4.4.4",
58
+ "eslint-plugin-import": "^2.32.0",
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": "^29.7.0",
63
- "rimraf": "^6.0.1",
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.3.2",
68
- "typescript": "^5.8.3"
67
+ "ts-jest": "^29.4.5",
68
+ "typescript": "^5.9.3"
69
69
  },
70
70
  "directories": {
71
71
  "test": "test"