attlaz-client 1.26.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 +2 -2
- package/dist/Client.js +2 -2
- package/dist/Service/InfrastructureConfigurationEndpoint.d.ts +9 -0
- package/dist/Service/{WorkerConfigEndpoint.js → InfrastructureConfigurationEndpoint.js} +19 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/Service/WorkerConfigEndpoint.d.ts +0 -7
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 {
|
|
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():
|
|
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 {
|
|
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,
|
|
@@ -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
|
-
|
|
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 + '/
|
|
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
|
|
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/' +
|
|
20
|
-
const result = await this.requestObject(url,
|
|
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 {
|
|
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 {
|
|
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/package.json
CHANGED
|
@@ -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
|
-
}
|