attlaz-client 1.25.0 → 1.27.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
@@ -5,7 +5,7 @@ import { ProjectEnvironmentEndpoint } from './Service/ProjectEnvironmentEndpoint
5
5
  import { ProjectEndpoint } from './Service/ProjectEndpoint.js';
6
6
  import { FlowRunRequestEndpoint } from './Service/FlowRunRequestEndpoint.js';
7
7
  import { OAuthClient } from './Http/OAuthClient.js';
8
- import { WorkerConfigEndpoint } from './Service/WorkerConfigEndpoint.js';
8
+ import { InfrastructureConfigurationEndpoint } from './Service/InfrastructureConfigurationEndpoint.js';
9
9
  import { WorkspaceEndpoint } from './Service/WorkspaceEndpoint.js';
10
10
  import { UserEndpoint } from './Service/UserEndpoint.js';
11
11
  import { ConfigEndpoint } from './Service/ConfigEndpoint.js';
@@ -75,7 +75,7 @@ export declare class Client {
75
75
  getSourcesAccountEndpoint(): SourcesAccountEndpoint;
76
76
  getLanguageEndpoint(): PlatformLanguageEndpoint;
77
77
  getStorageEndpoint(): StorageEndpoint;
78
- getWorkerConfigEndpoint(): WorkerConfigEndpoint;
78
+ getWorkerConfigEndpoint(): InfrastructureConfigurationEndpoint;
79
79
  getQueueEndpoint(): QueueEndpoint;
80
80
  getHealthAlertEndpoint(): HealthAlertEndpoint;
81
81
  getCodeSourceStrategiesEndpoint(): CodeSourceStrategiesEndpoint;
package/dist/Client.js CHANGED
@@ -5,7 +5,7 @@ import { ProjectEnvironmentEndpoint } from './Service/ProjectEnvironmentEndpoint
5
5
  import { ProjectEndpoint } from './Service/ProjectEndpoint.js';
6
6
  import { FlowRunRequestEndpoint } from './Service/FlowRunRequestEndpoint.js';
7
7
  import { OAuthClient } from './Http/OAuthClient.js';
8
- import { WorkerConfigEndpoint } from './Service/WorkerConfigEndpoint.js';
8
+ import { InfrastructureConfigurationEndpoint } from './Service/InfrastructureConfigurationEndpoint.js';
9
9
  import { WorkspaceEndpoint } from './Service/WorkspaceEndpoint.js';
10
10
  import { UserEndpoint } from './Service/UserEndpoint.js';
11
11
  import { ConfigEndpoint } from './Service/ConfigEndpoint.js';
@@ -65,7 +65,7 @@ export class Client {
65
65
  TriggerEndpoint,
66
66
  UserActionEndpoint,
67
67
  UserEndpoint,
68
- WorkerConfigEndpoint,
68
+ WorkerConfigEndpoint: InfrastructureConfigurationEndpoint,
69
69
  WorkerEndpoint,
70
70
  WorkspaceEndpoint,
71
71
  WorkspaceMemberEndpoint,
@@ -8,7 +8,7 @@ export class ObjectWrapper {
8
8
  throw new Error('Property "' + property + '" does not exist');
9
9
  }
10
10
  else {
11
- console.error('Property "' + property + '" does not exist', { object: raw });
11
+ console.warn('Unable to get property on object.', { property: property, object: raw });
12
12
  }
13
13
  }
14
14
  return value;
@@ -0,0 +1,9 @@
1
+ import { WorkerConfig } from '../Model/Worker/WorkerConfig.js';
2
+ import { CollectionResult } from '../Model/Result/CollectionResult.js';
3
+ import { Endpoint } from './Endpoint.js';
4
+ import { DataValueValue } from '../Model/DataValue.js';
5
+ export declare class InfrastructureConfigurationEndpoint extends Endpoint {
6
+ getByProjectEnvironment(projectEnvironmentId: string): Promise<CollectionResult<WorkerConfig>>;
7
+ getByKey(projectEnvironmentId: string, key: string): Promise<WorkerConfig | null>;
8
+ save(environmentId: string, key: string, value: DataValueValue | null): Promise<WorkerConfig>;
9
+ }
@@ -1,9 +1,9 @@
1
- import { Endpoint } from './Endpoint.js';
2
1
  import { WorkerConfig } from '../Model/Worker/WorkerConfig.js';
3
- export class WorkerConfigEndpoint extends Endpoint {
2
+ import { Endpoint } from './Endpoint.js';
3
+ export class InfrastructureConfigurationEndpoint extends Endpoint {
4
4
  async getByProjectEnvironment(projectEnvironmentId) {
5
5
  try {
6
- const url = '/projectenvironments/' + projectEnvironmentId + '/workerconfiguration';
6
+ const url = '/projectenvironments/' + projectEnvironmentId + '/infrastructure/configurations';
7
7
  const result = await this.requestCollection(url, WorkerConfig.parse);
8
8
  return result;
9
9
  }
@@ -14,10 +14,23 @@ export class WorkerConfigEndpoint extends Endpoint {
14
14
  throw error;
15
15
  }
16
16
  }
17
- async save(workerConfig) {
17
+ async getByKey(projectEnvironmentId, key) {
18
+ try {
19
+ const url = '/projectenvironments/' + projectEnvironmentId + '/infrastructure/configurations/' + key;
20
+ const result = await this.requestObject(url, null, WorkerConfig.parse);
21
+ return result.getData();
22
+ }
23
+ catch (error) {
24
+ if (this.httpClient.isDebugEnabled()) {
25
+ console.error('Failed to load worker config: ', error);
26
+ }
27
+ throw error;
28
+ }
29
+ }
30
+ async save(environmentId, key, value) {
18
31
  try {
19
- const url = '/projectenvironments/' + workerConfig.projectEnvironmentId + '/workerconfiguration';
20
- const result = await this.requestObject(url, workerConfig, WorkerConfig.parse, 'POST');
32
+ const url = '/projectenvironments/' + environmentId + '/infrastructure/configurations/' + key;
33
+ const result = await this.requestObject(url, { value }, WorkerConfig.parse, 'POST');
21
34
  const createdWorkerConfig = result.getData();
22
35
  if (createdWorkerConfig === null) {
23
36
  throw new Error('WorkerConfig not created');
package/dist/index.d.ts CHANGED
@@ -148,7 +148,7 @@ export { FlowRunStatsEndpoint } from './Service/FlowRunStatsEndpoint.js';
148
148
  export { WorkspaceEndpoint } from './Service/WorkspaceEndpoint.js';
149
149
  export { TriggerEndpoint } from './Service/TriggerEndpoint.js';
150
150
  export { UserEndpoint } from './Service/UserEndpoint.js';
151
- export { WorkerConfigEndpoint } from './Service/WorkerConfigEndpoint.js';
151
+ export { InfrastructureConfigurationEndpoint } from './Service/InfrastructureConfigurationEndpoint.js';
152
152
  export { WorkerEndpoint } from './Service/WorkerEndpoint.js';
153
153
  export { HealthAlertEndpoint } from './Service/HealthAlertEndpoint.js';
154
154
  export { CollectionsEndpoint } from './Service/CollectionsEndpoint.js';
package/dist/index.js CHANGED
@@ -142,7 +142,7 @@ export { FlowRunStatsEndpoint } from './Service/FlowRunStatsEndpoint.js';
142
142
  export { WorkspaceEndpoint } from './Service/WorkspaceEndpoint.js';
143
143
  export { TriggerEndpoint } from './Service/TriggerEndpoint.js';
144
144
  export { UserEndpoint } from './Service/UserEndpoint.js';
145
- export { WorkerConfigEndpoint } from './Service/WorkerConfigEndpoint.js';
145
+ export { InfrastructureConfigurationEndpoint } from './Service/InfrastructureConfigurationEndpoint.js';
146
146
  export { WorkerEndpoint } from './Service/WorkerEndpoint.js';
147
147
  export { HealthAlertEndpoint } from './Service/HealthAlertEndpoint.js';
148
148
  export { CollectionsEndpoint } from './Service/CollectionsEndpoint.js';
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.24.0";
1
+ export declare const VERSION = "1.26.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.24.0";
1
+ export const VERSION = "1.26.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.25.0",
3
+ "version": "1.27.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.7.9",
46
+ "axios": "^1.8.1",
47
47
  "axios-oauth-client": "^2.2.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/jest": "^29.5.14",
51
- "@types/node": "^22.10.5",
51
+ "@types/node": "^22.13.9",
52
52
  "@typescript-eslint/eslint-plugin": "^8.1.0",
53
53
  "@typescript-eslint/parser": "^8.1.0",
54
54
  "dotenv": "^16.4.7",
55
- "eslint": "^9.17.0",
55
+ "eslint": "^9.21.0",
56
56
  "eslint-config-attlaz-base": "^1.2.0",
57
- "eslint-import-resolver-typescript": "^3.7.0",
57
+ "eslint-import-resolver-typescript": "^3.8.3",
58
58
  "eslint-plugin-import": "^2.31.0",
59
- "eslint-plugin-jsdoc": "^50.6.1",
59
+ "eslint-plugin-jsdoc": "^50.6.3",
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.5",
68
- "typescript": "^5.7.2"
67
+ "ts-jest": "^29.2.6",
68
+ "typescript": "^5.8.2"
69
69
  },
70
70
  "directories": {
71
71
  "test": "test"
@@ -1,7 +0,0 @@
1
- import { Endpoint } from './Endpoint.js';
2
- import { WorkerConfig } from '../Model/Worker/WorkerConfig.js';
3
- import { CollectionResult } from '../Model/Result/CollectionResult.js';
4
- export declare class WorkerConfigEndpoint extends Endpoint {
5
- getByProjectEnvironment(projectEnvironmentId: string): Promise<CollectionResult<WorkerConfig>>;
6
- save(workerConfig: WorkerConfig): Promise<WorkerConfig>;
7
- }