attlaz-client 1.28.0 → 1.30.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/Client.d.ts CHANGED
@@ -32,6 +32,7 @@ import { UserActionEndpoint } from './Service/UserActionEndpoint.js';
32
32
  import { AccessTokenEndpoint } from './Service/AccessTokenEndpoint.js';
33
33
  import { AdapterConnectionEndpoint } from './Service/AdapterConnectionEndpoint.js';
34
34
  import { CollectionsEndpoint } from './Service/CollectionsEndpoint.js';
35
+ import { ConfigurationEndpoint } from './Service/ConfigurationEndpoint.js';
35
36
  export declare class Client {
36
37
  private readonly endpoints;
37
38
  private httpClient;
@@ -76,6 +77,7 @@ export declare class Client {
76
77
  getLanguageEndpoint(): PlatformLanguageEndpoint;
77
78
  getStorageEndpoint(): StorageEndpoint;
78
79
  getInfrastructureConfigurationEndpoint(): InfrastructureConfigurationEndpoint;
80
+ getConfigurationEndpoint(): ConfigurationEndpoint;
79
81
  getQueueEndpoint(): QueueEndpoint;
80
82
  getHealthAlertEndpoint(): HealthAlertEndpoint;
81
83
  getCodeSourceStrategiesEndpoint(): CodeSourceStrategiesEndpoint;
package/dist/Client.js CHANGED
@@ -34,6 +34,7 @@ import { AccessTokenEndpoint } from './Service/AccessTokenEndpoint.js';
34
34
  import { AdapterConnectionEndpoint } from './Service/AdapterConnectionEndpoint.js';
35
35
  import { VERSION } from './version.js';
36
36
  import { CollectionsEndpoint } from './Service/CollectionsEndpoint.js';
37
+ import { ConfigurationEndpoint } from './Service/ConfigurationEndpoint.js';
37
38
  export class Client {
38
39
  endpoints;
39
40
  httpClient;
@@ -66,6 +67,7 @@ export class Client {
66
67
  UserActionEndpoint,
67
68
  UserEndpoint,
68
69
  InfrastructureConfigurationEndpoint,
70
+ ConfigurationEndpoint,
69
71
  WorkerEndpoint,
70
72
  WorkspaceEndpoint,
71
73
  WorkspaceMemberEndpoint,
@@ -198,6 +200,9 @@ export class Client {
198
200
  getInfrastructureConfigurationEndpoint() {
199
201
  return this.getEndpoint('worker-config', this.Store.InfrastructureConfigurationEndpoint);
200
202
  }
203
+ getConfigurationEndpoint() {
204
+ return this.getEndpoint('configuration', this.Store.ConfigurationEndpoint);
205
+ }
201
206
  getQueueEndpoint() {
202
207
  return this.getEndpoint('queue', this.Store.QueueEndpoint);
203
208
  }
@@ -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
  }
@@ -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
  }
@@ -1,4 +1,7 @@
1
1
  import { State } from './State.js';
2
+ /**
3
+ * @deprecated
4
+ */
2
5
  export declare class Config {
3
6
  id: number;
4
7
  projectId: string;
@@ -1,5 +1,8 @@
1
1
  import { Utils } from '../Utils.js';
2
2
  import { State } from './State.js';
3
+ /**
4
+ * @deprecated
5
+ */
3
6
  export class Config {
4
7
  id;
5
8
  projectId;
@@ -0,0 +1,10 @@
1
+ import { State } from '../State.js';
2
+ import { DataValueValue } from '../DataValue.js';
3
+ export declare class Configuration {
4
+ id: string;
5
+ path: string;
6
+ value: DataValueValue;
7
+ state: State;
8
+ scope: string;
9
+ static parse(rawConfig: Record<string, unknown>): Configuration;
10
+ }
@@ -0,0 +1,17 @@
1
+ import { State } from '../State.js';
2
+ export class Configuration {
3
+ id;
4
+ path;
5
+ value;
6
+ state;
7
+ scope;
8
+ static parse(rawConfig) {
9
+ const config = new Configuration();
10
+ config.id = rawConfig.id;
11
+ config.path = rawConfig.path;
12
+ config.value = rawConfig.value;
13
+ config.state = State.fromString(rawConfig.state);
14
+ config.scope = rawConfig.scope;
15
+ return config;
16
+ }
17
+ }
@@ -0,0 +1,5 @@
1
+ import { Configuration } from '../Model/Configuration/Configuration.js';
2
+ import { Endpoint } from './Endpoint.js';
3
+ export declare class ConfigurationEndpoint extends Endpoint {
4
+ getConfiguration(scopeId: string, path: string): Promise<Configuration | null>;
5
+ }
@@ -0,0 +1,19 @@
1
+ import { QueryString } from '../Http/Data/QueryString.js';
2
+ import { Configuration } from '../Model/Configuration/Configuration.js';
3
+ import { Endpoint } from './Endpoint.js';
4
+ export class ConfigurationEndpoint extends Endpoint {
5
+ async getConfiguration(scopeId, path) {
6
+ try {
7
+ const qs = new QueryString('/configurations/' + scopeId);
8
+ qs.set('path', path);
9
+ const result = await this.requestObject('/configurations/:scopeId', null, Configuration.parse);
10
+ return result.getData();
11
+ }
12
+ catch (error) {
13
+ if (this.httpClient.isDebugEnabled()) {
14
+ console.error('Unable to load flow configuration', error);
15
+ }
16
+ throw error;
17
+ }
18
+ }
19
+ }
package/dist/index.d.ts CHANGED
@@ -31,6 +31,7 @@ export { AdapterConnectionEvent } from './Model/Adapter/AdapterConnectionEvent.j
31
31
  export { BlockedIp, FlaggedIp, IpRule } from './Service/FirewallEndpoint.js';
32
32
  export { Collection } from './Model/Collections/Collection.js';
33
33
  export { CollectionRecord } from './Model/Collections/CollectionRecord.js';
34
+ export { Configuration } from './Model/Configuration/Configuration.js';
34
35
  export { EventType } from './Model/Event/EventType.js';
35
36
  export { HealthAlert } from './Model/HealthAlert/HealthAlert.js';
36
37
  export { HealthAlertStatus } from './Model/HealthAlert/HealthAlertStatus.js';
package/dist/index.js CHANGED
@@ -25,6 +25,7 @@ export { AdapterConnectionConfigurationValue } from './Model/Adapter/AdapterConn
25
25
  export { AdapterConnectionEvent } from './Model/Adapter/AdapterConnectionEvent.js';
26
26
  export { Collection } from './Model/Collections/Collection.js';
27
27
  export { CollectionRecord } from './Model/Collections/CollectionRecord.js';
28
+ export { Configuration } from './Model/Configuration/Configuration.js';
28
29
  export { EventType } from './Model/Event/EventType.js';
29
30
  export { HealthAlert } from './Model/HealthAlert/HealthAlert.js';
30
31
  export { HealthAlertStatus } from './Model/HealthAlert/HealthAlertStatus.js';
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.27.3";
1
+ export declare const VERSION = "1.29.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.27.3";
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.28.0",
3
+ "version": "1.30.0",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -48,15 +48,15 @@
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/jest": "^29.5.14",
51
- "@types/node": "^22.13.11",
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.4.7",
55
- "eslint": "^9.23.0",
54
+ "dotenv": "^16.5.0",
55
+ "eslint": "^9.25.1",
56
56
  "eslint-config-attlaz-base": "^1.2.0",
57
- "eslint-import-resolver-typescript": "^4.2.2",
57
+ "eslint-import-resolver-typescript": "^4.3.4",
58
58
  "eslint-plugin-import": "^2.31.0",
59
- "eslint-plugin-jsdoc": "^50.6.8",
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.6",
68
- "typescript": "^5.8.2"
67
+ "ts-jest": "^29.3.2",
68
+ "typescript": "^5.8.3"
69
69
  },
70
70
  "directories": {
71
71
  "test": "test"