attlaz-client 1.33.0 → 1.34.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 -6
- package/dist/Client.js +2 -12
- package/dist/Model/{Queue → InfrastructureStatus}/QueueStatus.d.ts +5 -4
- package/dist/Model/InfrastructureStatus/QueueStatus.js +11 -0
- package/dist/Model/InfrastructureStatus/RunnersStatus.d.ts +9 -0
- package/dist/Model/InfrastructureStatus/RunnersStatus.js +9 -0
- package/dist/Model/InfrastructureStatus/StorageStatus.d.ts +12 -0
- package/dist/Model/InfrastructureStatus/StorageStatus.js +7 -0
- package/dist/Model/Worker/{WorkerConfig.d.ts → InfrastructureConfiguration.d.ts} +1 -7
- package/dist/Model/Worker/{WorkerConfig.js → InfrastructureConfiguration.js} +1 -12
- package/dist/Service/ConfigurationEndpoint.d.ts +2 -1
- package/dist/Service/ConfigurationEndpoint.js +2 -1
- package/dist/Service/RunnerEndpoint.d.ts +6 -0
- package/dist/Service/RunnerEndpoint.js +28 -0
- package/dist/index.d.ts +6 -10
- package/dist/index.js +6 -10
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/dist/Model/Queue/QueueStatus.js +0 -20
- package/dist/Model/Worker/Worker.d.ts +0 -11
- package/dist/Model/Worker/Worker.js +0 -27
- package/dist/Model/Worker/WorkerInstance.d.ts +0 -6
- package/dist/Model/Worker/WorkerInstance.js +0 -8
- package/dist/Model/Worker/WorkerInstanceState.d.ts +0 -8
- package/dist/Model/Worker/WorkerInstanceState.js +0 -16
- package/dist/Model/Worker/WorkerState.d.ts +0 -10
- package/dist/Model/Worker/WorkerState.js +0 -18
- package/dist/Service/InfrastructureConfigurationEndpoint.d.ts +0 -9
- package/dist/Service/InfrastructureConfigurationEndpoint.js +0 -47
- package/dist/Service/QueueEndpoint.d.ts +0 -5
- package/dist/Service/QueueEndpoint.js +0 -17
- package/dist/Service/WorkerEndpoint.d.ts +0 -9
- package/dist/Service/WorkerEndpoint.js +0 -60
package/dist/Client.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { OAuthClientToken } from './Http/OAuthClientToken.js';
|
|
2
|
-
import {
|
|
2
|
+
import { RunnerEndpoint } from './Service/RunnerEndpoint.js';
|
|
3
3
|
import { AdapterEndpoint } from './Service/AdapterEndpoint.js';
|
|
4
4
|
import { ProjectEnvironmentEndpoint } from './Service/ProjectEnvironmentEndpoint.js';
|
|
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 { InfrastructureConfigurationEndpoint } from './Service/InfrastructureConfigurationEndpoint.js';
|
|
9
8
|
import { WorkspaceEndpoint } from './Service/WorkspaceEndpoint.js';
|
|
10
9
|
import { UserEndpoint } from './Service/UserEndpoint.js';
|
|
11
10
|
import { ConfigEndpoint } from './Service/ConfigEndpoint.js';
|
|
@@ -13,7 +12,6 @@ import { SubscriberEndpoint } from './Service/SubscriberEndpoint.js';
|
|
|
13
12
|
import { FlowEndpoint } from './Service/FlowEndpoint.js';
|
|
14
13
|
import { WorkspaceMemberEndpoint } from './Service/WorkspaceMemberEndpoint.js';
|
|
15
14
|
import { StorageEndpoint } from './Service/StorageEndpoint.js';
|
|
16
|
-
import { QueueEndpoint } from './Service/QueueEndpoint.js';
|
|
17
15
|
import { InboxEndpoint } from './Service/InboxEndpoint.js';
|
|
18
16
|
import { CodeDeployEndpoint } from './Service/CodeDeployEndpoint.js';
|
|
19
17
|
import { SourcesAccountEndpoint } from './Service/SourcesAccountEndpoint.js';
|
|
@@ -72,13 +70,11 @@ export declare class Client {
|
|
|
72
70
|
getTriggerEndpoint(): TriggerEndpoint;
|
|
73
71
|
getUserEndpoint(): UserEndpoint;
|
|
74
72
|
getWorkspaceMemberEndpoint(): WorkspaceMemberEndpoint;
|
|
75
|
-
getWorkerEndpoint():
|
|
73
|
+
getWorkerEndpoint(): RunnerEndpoint;
|
|
76
74
|
getSourcesAccountEndpoint(): SourcesAccountEndpoint;
|
|
77
75
|
getLanguageEndpoint(): PlatformLanguageEndpoint;
|
|
78
76
|
getStorageEndpoint(): StorageEndpoint;
|
|
79
|
-
getInfrastructureConfigurationEndpoint(): InfrastructureConfigurationEndpoint;
|
|
80
77
|
getConfigurationEndpoint(): ConfigurationEndpoint;
|
|
81
|
-
getQueueEndpoint(): QueueEndpoint;
|
|
82
78
|
getHealthAlertEndpoint(): HealthAlertEndpoint;
|
|
83
79
|
getCodeSourceStrategiesEndpoint(): CodeSourceStrategiesEndpoint;
|
|
84
80
|
getSearchEndpoint(): SearchEndpoint;
|
package/dist/Client.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { OAuthClientToken } from './Http/OAuthClientToken.js';
|
|
2
|
-
import {
|
|
2
|
+
import { RunnerEndpoint } from './Service/RunnerEndpoint.js';
|
|
3
3
|
import { AdapterEndpoint } from './Service/AdapterEndpoint.js';
|
|
4
4
|
import { ProjectEnvironmentEndpoint } from './Service/ProjectEnvironmentEndpoint.js';
|
|
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 { InfrastructureConfigurationEndpoint } from './Service/InfrastructureConfigurationEndpoint.js';
|
|
9
8
|
import { WorkspaceEndpoint } from './Service/WorkspaceEndpoint.js';
|
|
10
9
|
import { UserEndpoint } from './Service/UserEndpoint.js';
|
|
11
10
|
import { ConfigEndpoint } from './Service/ConfigEndpoint.js';
|
|
@@ -13,7 +12,6 @@ import { SubscriberEndpoint } from './Service/SubscriberEndpoint.js';
|
|
|
13
12
|
import { FlowEndpoint } from './Service/FlowEndpoint.js';
|
|
14
13
|
import { WorkspaceMemberEndpoint } from './Service/WorkspaceMemberEndpoint.js';
|
|
15
14
|
import { StorageEndpoint } from './Service/StorageEndpoint.js';
|
|
16
|
-
import { QueueEndpoint } from './Service/QueueEndpoint.js';
|
|
17
15
|
import { InboxEndpoint } from './Service/InboxEndpoint.js';
|
|
18
16
|
import { CodeDeployEndpoint } from './Service/CodeDeployEndpoint.js';
|
|
19
17
|
import { SourcesAccountEndpoint } from './Service/SourcesAccountEndpoint.js';
|
|
@@ -58,7 +56,6 @@ export class Client {
|
|
|
58
56
|
PlatformLanguageEndpoint,
|
|
59
57
|
ProjectEndpoint,
|
|
60
58
|
ProjectEnvironmentEndpoint,
|
|
61
|
-
QueueEndpoint,
|
|
62
59
|
SearchEndpoint,
|
|
63
60
|
SourcesAccountEndpoint,
|
|
64
61
|
StorageEndpoint,
|
|
@@ -66,9 +63,8 @@ export class Client {
|
|
|
66
63
|
TriggerEndpoint,
|
|
67
64
|
UserActionEndpoint,
|
|
68
65
|
UserEndpoint,
|
|
69
|
-
InfrastructureConfigurationEndpoint,
|
|
70
66
|
ConfigurationEndpoint,
|
|
71
|
-
|
|
67
|
+
RunnerEndpoint,
|
|
72
68
|
WorkspaceEndpoint,
|
|
73
69
|
WorkspaceMemberEndpoint,
|
|
74
70
|
CollectionsEndpoint,
|
|
@@ -197,15 +193,9 @@ export class Client {
|
|
|
197
193
|
getStorageEndpoint() {
|
|
198
194
|
return this.getEndpoint('storage', this.Store.StorageEndpoint);
|
|
199
195
|
}
|
|
200
|
-
getInfrastructureConfigurationEndpoint() {
|
|
201
|
-
return this.getEndpoint('worker-config', this.Store.InfrastructureConfigurationEndpoint);
|
|
202
|
-
}
|
|
203
196
|
getConfigurationEndpoint() {
|
|
204
197
|
return this.getEndpoint('configuration', this.Store.ConfigurationEndpoint);
|
|
205
198
|
}
|
|
206
|
-
getQueueEndpoint() {
|
|
207
|
-
return this.getEndpoint('queue', this.Store.QueueEndpoint);
|
|
208
|
-
}
|
|
209
199
|
getHealthAlertEndpoint() {
|
|
210
200
|
return this.getEndpoint('healt-alert', this.Store.HealthAlertEndpoint);
|
|
211
201
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export declare class QueueStatus {
|
|
2
2
|
name: string;
|
|
3
|
+
state: 'nonexisting' | 'running';
|
|
4
|
+
vhost: string;
|
|
3
5
|
messages_ready: number;
|
|
4
6
|
messages_handling: number;
|
|
5
|
-
consumers: number;
|
|
6
7
|
message_publish_rate: number;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
message_handling_rate: number;
|
|
9
|
+
consumers: number;
|
|
10
|
+
updated: Date;
|
|
10
11
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type StorageTypeStatus = {
|
|
2
|
+
exists: boolean;
|
|
3
|
+
used: number;
|
|
4
|
+
};
|
|
5
|
+
export declare class StorageStatus {
|
|
6
|
+
persistent: StorageTypeStatus;
|
|
7
|
+
cache: StorageTypeStatus;
|
|
8
|
+
vault: StorageTypeStatus;
|
|
9
|
+
infrastructure: StorageTypeStatus;
|
|
10
|
+
updated: Date;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare class WorkerConfig {
|
|
3
|
-
readonly projectEnvironmentId: string;
|
|
4
|
-
readonly key: string;
|
|
5
|
-
readonly value: DataValueValue | null;
|
|
1
|
+
export declare class InfrastructureConfiguration {
|
|
6
2
|
static KEY_STATE: string;
|
|
7
3
|
static KEY_SCALE: string;
|
|
8
4
|
static KEY_MEMORY_LIMIT: string;
|
|
@@ -12,6 +8,4 @@ export declare class WorkerConfig {
|
|
|
12
8
|
static KEY_API_ENDPOINT: string;
|
|
13
9
|
static KEY_API_CLIENT_ID: string;
|
|
14
10
|
static KEY_API_CLIENT_SECRET: string;
|
|
15
|
-
constructor(projectEnvironmentId: string, key: string, value: DataValueValue | null);
|
|
16
|
-
static parse(raw: any): WorkerConfig;
|
|
17
11
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
export class
|
|
2
|
-
projectEnvironmentId;
|
|
3
|
-
key;
|
|
4
|
-
value;
|
|
1
|
+
export class InfrastructureConfiguration {
|
|
5
2
|
static KEY_STATE = 'state';
|
|
6
3
|
static KEY_SCALE = 'scale';
|
|
7
4
|
static KEY_MEMORY_LIMIT = 'memory_limit';
|
|
@@ -11,12 +8,4 @@ export class WorkerConfig {
|
|
|
11
8
|
static KEY_API_ENDPOINT = 'api_endpoint';
|
|
12
9
|
static KEY_API_CLIENT_ID = 'api_client_id';
|
|
13
10
|
static KEY_API_CLIENT_SECRET = 'api_client_secret';
|
|
14
|
-
constructor(projectEnvironmentId, key, value) {
|
|
15
|
-
this.projectEnvironmentId = projectEnvironmentId;
|
|
16
|
-
this.key = key;
|
|
17
|
-
this.value = value;
|
|
18
|
-
}
|
|
19
|
-
static parse(raw) {
|
|
20
|
-
return new WorkerConfig(raw.project_environment, raw.key, raw.value);
|
|
21
|
-
}
|
|
22
11
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Configuration } from '../Model/Configuration/Configuration.js';
|
|
2
2
|
import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
3
3
|
import { Endpoint } from './Endpoint.js';
|
|
4
|
+
import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
|
|
4
5
|
export declare class ConfigurationEndpoint extends Endpoint {
|
|
5
6
|
getByPath(scopeId: string, path: string): Promise<Configuration | null>;
|
|
6
|
-
getByPathQuery(scopeId: string, pathQuery: string): Promise<CollectionResult<Configuration>>;
|
|
7
|
+
getByPathQuery(scopeId: string, pathQuery: string, pagination: CursorPagination): Promise<CollectionResult<Configuration>>;
|
|
7
8
|
}
|
|
@@ -16,10 +16,11 @@ export class ConfigurationEndpoint extends Endpoint {
|
|
|
16
16
|
throw error;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
async getByPathQuery(scopeId, pathQuery) {
|
|
19
|
+
async getByPathQuery(scopeId, pathQuery, pagination) {
|
|
20
20
|
try {
|
|
21
21
|
const qs = new QueryString('/configurations/query/' + scopeId);
|
|
22
22
|
qs.set('query', pathQuery);
|
|
23
|
+
qs.addPagination(pagination);
|
|
23
24
|
const result = await this.requestCollection(qs, Configuration.parse);
|
|
24
25
|
return result;
|
|
25
26
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Endpoint } from './Endpoint.js';
|
|
2
|
+
import { RunnerImage } from '../Model/Runner/RunnerImage.js';
|
|
3
|
+
import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
4
|
+
export declare class RunnerEndpoint extends Endpoint {
|
|
5
|
+
getImages(): Promise<CollectionResult<RunnerImage>>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Endpoint } from './Endpoint.js';
|
|
2
|
+
import { RunnerImage } from '../Model/Runner/RunnerImage.js';
|
|
3
|
+
import { Utils } from '../Utils.js';
|
|
4
|
+
import { State } from '../Model/State.js';
|
|
5
|
+
export class RunnerEndpoint extends Endpoint {
|
|
6
|
+
async getImages() {
|
|
7
|
+
const url = '/runners/images';
|
|
8
|
+
const parser = (rawImage) => {
|
|
9
|
+
const runnerImage = new RunnerImage();
|
|
10
|
+
runnerImage.id = rawImage.id;
|
|
11
|
+
runnerImage.name = rawImage.name;
|
|
12
|
+
runnerImage.image = rawImage.image;
|
|
13
|
+
runnerImage.version = rawImage.image;
|
|
14
|
+
runnerImage.buildDate = Utils.parseRawDate(rawImage.build_date);
|
|
15
|
+
runnerImage.deprecated = Utils.isTrue(rawImage.deprecated);
|
|
16
|
+
if (rawImage.end_of_support !== null && rawImage.end_of_support !== undefined) {
|
|
17
|
+
runnerImage.endOfSupport = Utils.parseRawDate(rawImage.end_of_support);
|
|
18
|
+
}
|
|
19
|
+
if (rawImage.end_of_life !== null && rawImage.end_of_life !== undefined) {
|
|
20
|
+
runnerImage.endOfLife = Utils.parseRawDate(rawImage.end_of_life);
|
|
21
|
+
}
|
|
22
|
+
runnerImage.state = State.fromString(rawImage.state);
|
|
23
|
+
return runnerImage;
|
|
24
|
+
};
|
|
25
|
+
const result = await this.requestCollection(url, parser);
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -64,8 +64,6 @@ export { ProjectDeployCommit } from './Model/Project/ProjectDeployCommit.js';
|
|
|
64
64
|
export { CodeDeployStatus } from './Model/Project/CodeDeployStatus.js';
|
|
65
65
|
export { ProjectEnvironment } from './Model/Project/ProjectEnvironment.js';
|
|
66
66
|
export { ProjectEnvironmentType } from './Model/Project/ProjectEnvironmentType.js';
|
|
67
|
-
/** Queue * */
|
|
68
|
-
export { QueueStatus } from './Model/Queue/QueueStatus.js';
|
|
69
67
|
/** Result * */
|
|
70
68
|
export { CollectionResult } from './Model/Result/CollectionResult.js';
|
|
71
69
|
export { ObjectResult } from './Model/Result/ObjectResult.js';
|
|
@@ -81,11 +79,7 @@ export { Trigger } from './Model/Trigger/Trigger.js';
|
|
|
81
79
|
/** Worker* */
|
|
82
80
|
export { Platform } from './Model/Worker/Platform.js';
|
|
83
81
|
export { PlatformImage } from './Model/Worker/PlatformImage.js';
|
|
84
|
-
export {
|
|
85
|
-
export { WorkerConfig } from './Model/Worker/WorkerConfig.js';
|
|
86
|
-
export { WorkerInstance } from './Model/Worker/WorkerInstance.js';
|
|
87
|
-
export { WorkerInstanceState } from './Model/Worker/WorkerInstanceState.js';
|
|
88
|
-
export { WorkerState } from './Model/Worker/WorkerState.js';
|
|
82
|
+
export { InfrastructureConfiguration } from './Model/Worker/InfrastructureConfiguration.js';
|
|
89
83
|
/** Deployment * */
|
|
90
84
|
export { CodeSource } from './Model/Deployment/CodeSource.js';
|
|
91
85
|
export { CodeSourceAccount } from './Model/Deployment/CodeSourceAccount.js';
|
|
@@ -107,6 +101,10 @@ export { EntityId } from './Model/EntityId.js';
|
|
|
107
101
|
export { DataValueCollection } from './Model/DataValueCollection.js';
|
|
108
102
|
export { EntityType } from './Model/EntityType.js';
|
|
109
103
|
export { InboxMessage } from './Model/Inbox/InboxMessage.js';
|
|
104
|
+
/** Infrastructure Status **/
|
|
105
|
+
export { QueueStatus } from './Model/InfrastructureStatus/QueueStatus.js';
|
|
106
|
+
export { RunnersStatus } from './Model/InfrastructureStatus/RunnersStatus.js';
|
|
107
|
+
export { StorageStatus } from './Model/InfrastructureStatus/StorageStatus.js';
|
|
110
108
|
export { State } from './Model/State.js';
|
|
111
109
|
export { StateAware } from './Model/StateAware.js';
|
|
112
110
|
/** Flow * */
|
|
@@ -136,7 +134,6 @@ export { InboxEndpoint } from './Service/InboxEndpoint.js';
|
|
|
136
134
|
export { PlatformEndpoint } from './Service/PlatformEndpoint.js';
|
|
137
135
|
export { CodeDeployEndpoint } from './Service/CodeDeployEndpoint.js';
|
|
138
136
|
export { ProjectEnvironmentEndpoint } from './Service/ProjectEnvironmentEndpoint.js';
|
|
139
|
-
export { QueueEndpoint } from './Service/QueueEndpoint.js';
|
|
140
137
|
export { SearchEndpoint } from './Service/SearchEndpoint.js';
|
|
141
138
|
export { SourcesAccountEndpoint } from './Service/SourcesAccountEndpoint.js';
|
|
142
139
|
export { StorageEndpoint } from './Service/StorageEndpoint.js';
|
|
@@ -148,8 +145,7 @@ export { FlowRunStatsEndpoint } from './Service/FlowRunStatsEndpoint.js';
|
|
|
148
145
|
export { WorkspaceEndpoint } from './Service/WorkspaceEndpoint.js';
|
|
149
146
|
export { TriggerEndpoint } from './Service/TriggerEndpoint.js';
|
|
150
147
|
export { UserEndpoint } from './Service/UserEndpoint.js';
|
|
151
|
-
export {
|
|
152
|
-
export { WorkerEndpoint } from './Service/WorkerEndpoint.js';
|
|
148
|
+
export { RunnerEndpoint } from './Service/RunnerEndpoint.js';
|
|
153
149
|
export { HealthAlertEndpoint } from './Service/HealthAlertEndpoint.js';
|
|
154
150
|
export { CollectionsEndpoint } from './Service/CollectionsEndpoint.js';
|
|
155
151
|
export { Client } from './Client.js';
|
package/dist/index.js
CHANGED
|
@@ -58,8 +58,6 @@ export { ProjectDeployCommit } from './Model/Project/ProjectDeployCommit.js';
|
|
|
58
58
|
export { CodeDeployStatus } from './Model/Project/CodeDeployStatus.js';
|
|
59
59
|
export { ProjectEnvironment } from './Model/Project/ProjectEnvironment.js';
|
|
60
60
|
export { ProjectEnvironmentType } from './Model/Project/ProjectEnvironmentType.js';
|
|
61
|
-
/** Queue * */
|
|
62
|
-
export { QueueStatus } from './Model/Queue/QueueStatus.js';
|
|
63
61
|
/** Result * */
|
|
64
62
|
export { CollectionResult } from './Model/Result/CollectionResult.js';
|
|
65
63
|
export { ObjectResult } from './Model/Result/ObjectResult.js';
|
|
@@ -75,11 +73,7 @@ export { Trigger } from './Model/Trigger/Trigger.js';
|
|
|
75
73
|
/** Worker* */
|
|
76
74
|
export { Platform } from './Model/Worker/Platform.js';
|
|
77
75
|
export { PlatformImage } from './Model/Worker/PlatformImage.js';
|
|
78
|
-
export {
|
|
79
|
-
export { WorkerConfig } from './Model/Worker/WorkerConfig.js';
|
|
80
|
-
export { WorkerInstance } from './Model/Worker/WorkerInstance.js';
|
|
81
|
-
export { WorkerInstanceState } from './Model/Worker/WorkerInstanceState.js';
|
|
82
|
-
export { WorkerState } from './Model/Worker/WorkerState.js';
|
|
76
|
+
export { InfrastructureConfiguration } from './Model/Worker/InfrastructureConfiguration.js';
|
|
83
77
|
/** Deployment * */
|
|
84
78
|
export { CodeSource } from './Model/Deployment/CodeSource.js';
|
|
85
79
|
export { CodeSourceAccount } from './Model/Deployment/CodeSourceAccount.js';
|
|
@@ -101,6 +95,10 @@ export { EntityId } from './Model/EntityId.js';
|
|
|
101
95
|
export { DataValueCollection } from './Model/DataValueCollection.js';
|
|
102
96
|
export { EntityType } from './Model/EntityType.js';
|
|
103
97
|
export { InboxMessage } from './Model/Inbox/InboxMessage.js';
|
|
98
|
+
/** Infrastructure Status **/
|
|
99
|
+
export { QueueStatus } from './Model/InfrastructureStatus/QueueStatus.js';
|
|
100
|
+
export { RunnersStatus } from './Model/InfrastructureStatus/RunnersStatus.js';
|
|
101
|
+
export { StorageStatus } from './Model/InfrastructureStatus/StorageStatus.js';
|
|
104
102
|
export { State } from './Model/State.js';
|
|
105
103
|
/** Flow * */
|
|
106
104
|
export { Flow } from './Model/Flow/Flow.js';
|
|
@@ -130,7 +128,6 @@ export { InboxEndpoint } from './Service/InboxEndpoint.js';
|
|
|
130
128
|
export { PlatformEndpoint } from './Service/PlatformEndpoint.js';
|
|
131
129
|
export { CodeDeployEndpoint } from './Service/CodeDeployEndpoint.js';
|
|
132
130
|
export { ProjectEnvironmentEndpoint } from './Service/ProjectEnvironmentEndpoint.js';
|
|
133
|
-
export { QueueEndpoint } from './Service/QueueEndpoint.js';
|
|
134
131
|
export { SearchEndpoint } from './Service/SearchEndpoint.js';
|
|
135
132
|
export { SourcesAccountEndpoint } from './Service/SourcesAccountEndpoint.js';
|
|
136
133
|
export { StorageEndpoint } from './Service/StorageEndpoint.js';
|
|
@@ -142,8 +139,7 @@ export { FlowRunStatsEndpoint } from './Service/FlowRunStatsEndpoint.js';
|
|
|
142
139
|
export { WorkspaceEndpoint } from './Service/WorkspaceEndpoint.js';
|
|
143
140
|
export { TriggerEndpoint } from './Service/TriggerEndpoint.js';
|
|
144
141
|
export { UserEndpoint } from './Service/UserEndpoint.js';
|
|
145
|
-
export {
|
|
146
|
-
export { WorkerEndpoint } from './Service/WorkerEndpoint.js';
|
|
142
|
+
export { RunnerEndpoint } from './Service/RunnerEndpoint.js';
|
|
147
143
|
export { HealthAlertEndpoint } from './Service/HealthAlertEndpoint.js';
|
|
148
144
|
export { CollectionsEndpoint } from './Service/CollectionsEndpoint.js';
|
|
149
145
|
export { Client } from './Client.js';
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.33.
|
|
1
|
+
export declare const VERSION = "1.33.1";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.33.
|
|
1
|
+
export const VERSION = "1.33.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "attlaz-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.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.15.
|
|
51
|
+
"@types/node": "^22.15.17",
|
|
52
52
|
"@typescript-eslint/eslint-plugin": "^8.1.0",
|
|
53
53
|
"@typescript-eslint/parser": "^8.1.0",
|
|
54
54
|
"dotenv": "^16.5.0",
|
|
55
55
|
"eslint": "^9.26.0",
|
|
56
|
-
"eslint-config-attlaz-base": "^1.
|
|
56
|
+
"eslint-config-attlaz-base": "^1.3.1",
|
|
57
57
|
"eslint-import-resolver-typescript": "^4.3.4",
|
|
58
58
|
"eslint-plugin-import": "^2.31.0",
|
|
59
|
-
"eslint-plugin-jsdoc": "^50.6.
|
|
59
|
+
"eslint-plugin-jsdoc": "^50.6.14",
|
|
60
60
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
61
61
|
"eslint-plugin-promise": "^7.2.1",
|
|
62
62
|
"jest": "^29.7.0",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export class QueueStatus {
|
|
2
|
-
name;
|
|
3
|
-
messages_ready = 0;
|
|
4
|
-
messages_handling = 0;
|
|
5
|
-
consumers = 0;
|
|
6
|
-
message_publish_rate = 0;
|
|
7
|
-
message_deliver_rate = 0;
|
|
8
|
-
constructor(name) {
|
|
9
|
-
this.name = name;
|
|
10
|
-
}
|
|
11
|
-
static parse(raw) {
|
|
12
|
-
const queue = new QueueStatus(raw.name);
|
|
13
|
-
queue.messages_ready = raw.messages_ready;
|
|
14
|
-
queue.messages_handling = raw.messages_handling;
|
|
15
|
-
queue.consumers = raw.consumers;
|
|
16
|
-
queue.message_publish_rate = raw.message_publish_rate;
|
|
17
|
-
queue.message_deliver_rate = raw.message_deliver_rate;
|
|
18
|
-
return queue;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { WorkerState } from './WorkerState.js';
|
|
2
|
-
import { WorkerInstance } from './WorkerInstance.js';
|
|
3
|
-
export declare class Worker {
|
|
4
|
-
projectEnvironment: string;
|
|
5
|
-
state: WorkerState;
|
|
6
|
-
version: string;
|
|
7
|
-
scale: number;
|
|
8
|
-
instances: WorkerInstance[];
|
|
9
|
-
memoryLimit: number;
|
|
10
|
-
static parse(raw: any): Worker;
|
|
11
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { WorkerState } from './WorkerState.js';
|
|
2
|
-
import { WorkerInstance } from './WorkerInstance.js';
|
|
3
|
-
import { WorkerInstanceState } from './WorkerInstanceState.js';
|
|
4
|
-
export class Worker {
|
|
5
|
-
projectEnvironment;
|
|
6
|
-
state;
|
|
7
|
-
version;
|
|
8
|
-
scale;
|
|
9
|
-
instances;
|
|
10
|
-
memoryLimit;
|
|
11
|
-
static parse(raw) {
|
|
12
|
-
const worker = new Worker();
|
|
13
|
-
worker.projectEnvironment = raw.project_environment;
|
|
14
|
-
worker.state = WorkerState.fromString(raw.state);
|
|
15
|
-
worker.version = raw.version;
|
|
16
|
-
worker.scale = raw.scale;
|
|
17
|
-
const rawInstances = raw.instances;
|
|
18
|
-
worker.instances = [];
|
|
19
|
-
for (const rawInstance of rawInstances) {
|
|
20
|
-
const instance = new WorkerInstance(rawInstance.id);
|
|
21
|
-
instance.state = WorkerInstanceState.fromString(rawInstance.state);
|
|
22
|
-
worker.instances.push(instance);
|
|
23
|
-
}
|
|
24
|
-
worker.memoryLimit = raw.memory_limit;
|
|
25
|
-
return worker;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Utils } from '../../Utils.js';
|
|
2
|
-
export var WorkerInstanceState;
|
|
3
|
-
(function (WorkerInstanceState) {
|
|
4
|
-
WorkerInstanceState["Started"] = "Started";
|
|
5
|
-
WorkerInstanceState["Stopped"] = "Stopped";
|
|
6
|
-
WorkerInstanceState["Error"] = "Error";
|
|
7
|
-
})(WorkerInstanceState || (WorkerInstanceState = {}));
|
|
8
|
-
(function (WorkerInstanceState) {
|
|
9
|
-
WorkerInstanceState.fromString = (input) => {
|
|
10
|
-
const result = Utils.parseEnum(input, WorkerInstanceState);
|
|
11
|
-
if (result === null) {
|
|
12
|
-
throw new Error('Unable to parse WorkerInstanceState from string: Unknown WorkerInstanceState "' + input + '"');
|
|
13
|
-
}
|
|
14
|
-
return result;
|
|
15
|
-
};
|
|
16
|
-
})(WorkerInstanceState || (WorkerInstanceState = {}));
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare enum WorkerState {
|
|
2
|
-
Active = "Active",
|
|
3
|
-
Active_Upgrading = "Upgrading",
|
|
4
|
-
Active_Upgraded = "Upgraded",
|
|
5
|
-
Inactive = "Inactive",
|
|
6
|
-
NonExisting = "NonExisting"
|
|
7
|
-
}
|
|
8
|
-
export declare namespace WorkerState {
|
|
9
|
-
const fromString: (input: string) => WorkerState;
|
|
10
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Utils } from '../../Utils.js';
|
|
2
|
-
export var WorkerState;
|
|
3
|
-
(function (WorkerState) {
|
|
4
|
-
WorkerState["Active"] = "Active";
|
|
5
|
-
WorkerState["Active_Upgrading"] = "Upgrading";
|
|
6
|
-
WorkerState["Active_Upgraded"] = "Upgraded";
|
|
7
|
-
WorkerState["Inactive"] = "Inactive";
|
|
8
|
-
WorkerState["NonExisting"] = "NonExisting";
|
|
9
|
-
})(WorkerState || (WorkerState = {}));
|
|
10
|
-
(function (WorkerState) {
|
|
11
|
-
WorkerState.fromString = (input) => {
|
|
12
|
-
const result = Utils.parseEnum(input, WorkerState);
|
|
13
|
-
if (result === null) {
|
|
14
|
-
throw new Error('Unable to parse WorkerState from string: Unknown WorkerState "' + input + '"');
|
|
15
|
-
}
|
|
16
|
-
return result;
|
|
17
|
-
};
|
|
18
|
-
})(WorkerState || (WorkerState = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { WorkerConfig } from '../Model/Worker/WorkerConfig.js';
|
|
2
|
-
import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
3
|
-
import { DataValueValue } from '../Model/DataValue.js';
|
|
4
|
-
import { Endpoint } from './Endpoint.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,47 +0,0 @@
|
|
|
1
|
-
import { WorkerConfig } from '../Model/Worker/WorkerConfig.js';
|
|
2
|
-
import { Endpoint } from './Endpoint.js';
|
|
3
|
-
export class InfrastructureConfigurationEndpoint extends Endpoint {
|
|
4
|
-
async getByProjectEnvironment(projectEnvironmentId) {
|
|
5
|
-
try {
|
|
6
|
-
const url = '/projectenvironments/' + projectEnvironmentId + '/infrastructure/configurations';
|
|
7
|
-
const result = await this.requestCollection(url, WorkerConfig.parse);
|
|
8
|
-
return result;
|
|
9
|
-
}
|
|
10
|
-
catch (error) {
|
|
11
|
-
if (this.httpClient.isDebugEnabled()) {
|
|
12
|
-
console.error('Failed to load worker config: ', error);
|
|
13
|
-
}
|
|
14
|
-
throw error;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
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) {
|
|
31
|
-
try {
|
|
32
|
-
const url = '/projectenvironments/' + environmentId + '/infrastructure/configurations/' + key;
|
|
33
|
-
const result = await this.requestObject(url, { value }, WorkerConfig.parse, 'POST');
|
|
34
|
-
const createdWorkerConfig = result.getData();
|
|
35
|
-
if (createdWorkerConfig === null) {
|
|
36
|
-
throw new Error('WorkerConfig not created');
|
|
37
|
-
}
|
|
38
|
-
return createdWorkerConfig;
|
|
39
|
-
}
|
|
40
|
-
catch (error) {
|
|
41
|
-
if (this.httpClient.isDebugEnabled()) {
|
|
42
|
-
console.error('Failed to save worker config: ', error);
|
|
43
|
-
}
|
|
44
|
-
throw error;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { QueueStatus } from '../Model/Queue/QueueStatus.js';
|
|
2
|
-
import { Endpoint } from './Endpoint.js';
|
|
3
|
-
export class QueueEndpoint extends Endpoint {
|
|
4
|
-
async getByProjectEnvironment(projectEnvironmentId) {
|
|
5
|
-
try {
|
|
6
|
-
const url = '/projectenvironments/' + projectEnvironmentId + '/queues';
|
|
7
|
-
const result = await this.requestObject(url, null, QueueStatus.parse);
|
|
8
|
-
return result.getData();
|
|
9
|
-
}
|
|
10
|
-
catch (error) {
|
|
11
|
-
if (this.httpClient.isDebugEnabled()) {
|
|
12
|
-
console.error('Failed to load trigger by id: ', error);
|
|
13
|
-
}
|
|
14
|
-
throw error;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Endpoint } from './Endpoint.js';
|
|
2
|
-
import { Worker } from '../Model/Worker/Worker.js';
|
|
3
|
-
import { RunnerImage } from '../Model/Runner/RunnerImage.js';
|
|
4
|
-
import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
5
|
-
export declare class WorkerEndpoint extends Endpoint {
|
|
6
|
-
getByProjectEnvironment(projectEnvironmentId: string): Promise<Worker | null>;
|
|
7
|
-
update(projectEnvironmentId: string): Promise<boolean>;
|
|
8
|
-
getImages(): Promise<CollectionResult<RunnerImage>>;
|
|
9
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Endpoint } from './Endpoint.js';
|
|
2
|
-
import { Worker } from '../Model/Worker/Worker.js';
|
|
3
|
-
import { RunnerImage } from '../Model/Runner/RunnerImage.js';
|
|
4
|
-
import { Utils } from '../Utils.js';
|
|
5
|
-
import { State } from '../Model/State.js';
|
|
6
|
-
export class WorkerEndpoint extends Endpoint {
|
|
7
|
-
async getByProjectEnvironment(projectEnvironmentId) {
|
|
8
|
-
try {
|
|
9
|
-
const url = '/projectenvironments/' + projectEnvironmentId + '/workers';
|
|
10
|
-
const result = await this.requestObject(url, null, Worker.parse);
|
|
11
|
-
return result.getData();
|
|
12
|
-
}
|
|
13
|
-
catch (error) {
|
|
14
|
-
if (this.httpClient.isDebugEnabled()) {
|
|
15
|
-
console.error('Failed to load trigger by id: ', error);
|
|
16
|
-
}
|
|
17
|
-
throw error;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
async update(projectEnvironmentId) {
|
|
21
|
-
try {
|
|
22
|
-
const url = '/projectenvironments/' + projectEnvironmentId + '/workers';
|
|
23
|
-
const parser = (input) => ({ updated: input.updated });
|
|
24
|
-
const result = await this.requestObject(url, null, parser, 'POST');
|
|
25
|
-
const isUpdated = result.getData();
|
|
26
|
-
if (isUpdated === null) {
|
|
27
|
-
throw new Error('Worker probably not updated');
|
|
28
|
-
}
|
|
29
|
-
return isUpdated.updated;
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
if (this.httpClient.isDebugEnabled()) {
|
|
33
|
-
console.error('Failed to update worker: ', error);
|
|
34
|
-
}
|
|
35
|
-
throw error;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
async getImages() {
|
|
39
|
-
const url = '/runners/images';
|
|
40
|
-
const parser = (rawImage) => {
|
|
41
|
-
const runnerImage = new RunnerImage();
|
|
42
|
-
runnerImage.id = rawImage.id;
|
|
43
|
-
runnerImage.name = rawImage.name;
|
|
44
|
-
runnerImage.image = rawImage.image;
|
|
45
|
-
runnerImage.version = rawImage.image;
|
|
46
|
-
runnerImage.buildDate = Utils.parseRawDate(rawImage.build_date);
|
|
47
|
-
runnerImage.deprecated = Utils.isTrue(rawImage.deprecated);
|
|
48
|
-
if (rawImage.end_of_support !== null && rawImage.end_of_support !== undefined) {
|
|
49
|
-
runnerImage.endOfSupport = Utils.parseRawDate(rawImage.end_of_support);
|
|
50
|
-
}
|
|
51
|
-
if (rawImage.end_of_life !== null && rawImage.end_of_life !== undefined) {
|
|
52
|
-
runnerImage.endOfLife = Utils.parseRawDate(rawImage.end_of_life);
|
|
53
|
-
}
|
|
54
|
-
runnerImage.state = State.fromString(rawImage.state);
|
|
55
|
-
return runnerImage;
|
|
56
|
-
};
|
|
57
|
-
const result = await this.requestCollection(url, parser);
|
|
58
|
-
return result;
|
|
59
|
-
}
|
|
60
|
-
}
|