attlaz-client 1.9.62 → 1.9.63
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 +77 -77
- package/dist/Client.js +225 -225
- package/dist/Core/MetaDataAware.d.ts +4 -4
- package/dist/Core/MetaDataAware.js +6 -6
- package/dist/Http/Data/Header.d.ts +3 -3
- package/dist/Http/Data/Header.js +2 -2
- package/dist/Http/Data/Parameters.d.ts +3 -3
- package/dist/Http/Data/Parameters.js +2 -2
- package/dist/Http/Data/QueryString.d.ts +9 -9
- package/dist/Http/Data/QueryString.js +29 -29
- package/dist/Http/HttpClient.d.ts +17 -17
- package/dist/Http/HttpClient.js +91 -91
- package/dist/Http/HttpClientRequest.d.ts +16 -16
- package/dist/Http/HttpClientRequest.js +41 -41
- package/dist/Http/HttpClientResponse.d.ts +6 -6
- package/dist/Http/HttpClientResponse.js +11 -11
- package/dist/Http/OAuthClient.d.ts +33 -33
- package/dist/Http/OAuthClient.js +231 -231
- package/dist/Http/OAuthClientOptions.d.ts +13 -13
- package/dist/Http/OAuthClientOptions.js +17 -17
- package/dist/Http/OAuthClientToken.d.ts +11 -11
- package/dist/Http/OAuthClientToken.js +36 -36
- package/dist/Model/Adapter/Adapter.d.ts +13 -13
- package/dist/Model/Adapter/Adapter.js +20 -20
- package/dist/Model/Adapter/AdapterConfiguration.d.ts +9 -9
- package/dist/Model/Adapter/AdapterConfiguration.js +16 -16
- package/dist/Model/Adapter/AdapterConnection.d.ts +10 -10
- package/dist/Model/Adapter/AdapterConnection.js +26 -26
- package/dist/Model/Config.d.ts +14 -14
- package/dist/Model/Config.js +27 -27
- package/dist/Model/DataValue.d.ts +6 -6
- package/dist/Model/DataValue.js +10 -10
- package/dist/Model/DataValueCollection.d.ts +16 -16
- package/dist/Model/DataValueCollection.js +61 -61
- package/dist/Model/Deployment/CodeSource.d.ts +13 -13
- package/dist/Model/Deployment/CodeSource.js +22 -22
- package/dist/Model/Deployment/CodeSourceAccount.d.ts +8 -8
- package/dist/Model/Deployment/CodeSourceAccount.js +22 -22
- package/dist/Model/Deployment/CodeSourceBuildStrategy.d.ts +9 -9
- package/dist/Model/Deployment/CodeSourceBuildStrategy.js +18 -18
- package/dist/Model/Deployment/SourcesAccountRepository.d.ts +5 -5
- package/dist/Model/Deployment/SourcesAccountRepository.js +12 -12
- package/dist/Model/Deployment/SourcesAccountRepositoryBranch.d.ts +4 -4
- package/dist/Model/Deployment/SourcesAccountRepositoryBranch.js +11 -11
- package/dist/Model/Error/ClientError.d.ts +10 -10
- package/dist/Model/Error/ClientError.js +93 -93
- package/dist/Model/Event/EventType.d.ts +17 -17
- package/dist/Model/Event/EventType.js +21 -21
- package/dist/Model/Flow/Flow.d.ts +15 -15
- package/dist/Model/Flow/Flow.js +30 -30
- package/dist/Model/Flow/FlowRun.d.ts +16 -16
- package/dist/Model/Flow/FlowRun.js +30 -30
- package/dist/Model/Flow/FlowRunHistory.d.ts +7 -7
- package/dist/Model/Flow/FlowRunHistory.js +15 -15
- package/dist/Model/Flow/FlowRunPriority.d.ts +9 -9
- package/dist/Model/Flow/FlowRunPriority.js +21 -21
- package/dist/Model/Flow/FlowRunResponse.d.ts +5 -5
- package/dist/Model/Flow/FlowRunResponse.js +6 -6
- package/dist/Model/Flow/FlowRunStats.d.ts +13 -13
- package/dist/Model/Flow/FlowRunStats.js +31 -31
- package/dist/Model/Flow/FlowRunStatus.d.ts +12 -12
- package/dist/Model/Flow/FlowRunStatus.js +24 -24
- package/dist/Model/Flow/FlowRunSummary.d.ts +9 -9
- package/dist/Model/Flow/FlowRunSummary.js +21 -21
- package/dist/Model/Flow/FlowSummary.d.ts +10 -10
- package/dist/Model/Flow/FlowSummary.js +26 -26
- package/dist/Model/HealthAlert/HealthAlert.d.ts +13 -13
- package/dist/Model/HealthAlert/HealthAlert.js +31 -31
- package/dist/Model/HealthAlert/HealthAlertStatus.d.ts +8 -8
- package/dist/Model/HealthAlert/HealthAlertStatus.js +20 -20
- package/dist/Model/HealthAlert/HealthTestType.d.ts +11 -11
- package/dist/Model/HealthAlert/HealthTestType.js +23 -23
- package/dist/Model/JsonSerializable.d.ts +4 -4
- package/dist/Model/JsonSerializable.js +16 -16
- package/dist/Model/Log/Log.d.ts +17 -17
- package/dist/Model/Log/Log.js +34 -34
- package/dist/Model/Log/LogItemFilter.d.ts +9 -9
- package/dist/Model/Log/LogItemFilter.js +10 -10
- package/dist/Model/Log/LogLevel.d.ts +15 -15
- package/dist/Model/Log/LogLevel.js +60 -60
- package/dist/Model/Log/LogQuery.d.ts +20 -20
- package/dist/Model/Log/LogQuery.js +15 -15
- package/dist/Model/Log/LogStatus.d.ts +8 -8
- package/dist/Model/Log/LogStatus.js +20 -20
- package/dist/Model/Log/LogStream.d.ts +6 -6
- package/dist/Model/Log/LogStream.js +10 -10
- package/dist/Model/Log/LogStreamId.d.ts +5 -5
- package/dist/Model/Log/LogStreamId.js +12 -12
- package/dist/Model/Log/LogStreamInformation.d.ts +18 -18
- package/dist/Model/Log/LogStreamInformation.js +59 -59
- package/dist/Model/Messaging/Channel/Channel.d.ts +15 -15
- package/dist/Model/Messaging/Channel/Channel.js +29 -29
- package/dist/Model/Messaging/Channel/ChannelData.d.ts +6 -6
- package/dist/Model/Messaging/Channel/ChannelData.js +12 -12
- package/dist/Model/Messaging/Channel/ChannelType.d.ts +10 -10
- package/dist/Model/Messaging/Channel/ChannelType.js +22 -22
- package/dist/Model/Messaging/Channel/EmailChannelData.d.ts +5 -5
- package/dist/Model/Messaging/Channel/EmailChannelData.js +12 -12
- package/dist/Model/Messaging/Channel/PushChannelData.d.ts +9 -9
- package/dist/Model/Messaging/Channel/PushChannelData.js +13 -13
- package/dist/Model/Messaging/Channel/SlackChannelData.d.ts +10 -10
- package/dist/Model/Messaging/Channel/SlackChannelData.js +17 -17
- package/dist/Model/Messaging/Channel/SmsChannelData.d.ts +5 -5
- package/dist/Model/Messaging/Channel/SmsChannelData.js +12 -12
- package/dist/Model/Messaging/Channel/WebhookChannelData.d.ts +6 -6
- package/dist/Model/Messaging/Channel/WebhookChannelData.js +13 -13
- package/dist/Model/Messaging/ChannelHistory.d.ts +10 -10
- package/dist/Model/Messaging/ChannelHistory.js +28 -28
- package/dist/Model/Messaging/Subscriber.d.ts +19 -19
- package/dist/Model/Messaging/Subscriber.js +33 -33
- package/dist/Model/Notification.d.ts +10 -10
- package/dist/Model/Notification.js +21 -21
- package/dist/Model/Pagination/CursorPagination.d.ts +5 -5
- package/dist/Model/Pagination/CursorPagination.js +11 -11
- package/dist/Model/Project/PlatformLanguage.d.ts +10 -10
- package/dist/Model/Project/PlatformLanguage.js +19 -19
- package/dist/Model/Project/Project.d.ts +12 -12
- package/dist/Model/Project/Project.js +23 -23
- package/dist/Model/Project/ProjectDeploy.d.ts +20 -20
- package/dist/Model/Project/ProjectDeploy.js +45 -45
- package/dist/Model/Project/ProjectDeployCommit.d.ts +7 -7
- package/dist/Model/Project/ProjectDeployCommit.js +6 -6
- package/dist/Model/Project/ProjectDeployStatus.d.ts +12 -12
- package/dist/Model/Project/ProjectDeployStatus.js +24 -24
- package/dist/Model/Project/ProjectEnvironment.d.ts +13 -13
- package/dist/Model/Project/ProjectEnvironment.js +26 -26
- package/dist/Model/Queue/QueueStatus.d.ts +10 -10
- package/dist/Model/Queue/QueueStatus.js +23 -23
- package/dist/Model/Result/CollectionResult.d.ts +7 -7
- package/dist/Model/Result/CollectionResult.js +30 -30
- package/dist/Model/Result/DataResult.d.ts +18 -18
- package/dist/Model/Result/DataResult.js +69 -69
- package/dist/Model/Result/ObjectResult.d.ts +6 -6
- package/dist/Model/Result/ObjectResult.js +26 -26
- package/dist/Model/Result/ObjectWrapper.d.ts +3 -3
- package/dist/Model/Result/ObjectWrapper.js +24 -24
- package/dist/Model/Result/ResultError.d.ts +4 -4
- package/dist/Model/Result/ResultError.js +9 -9
- package/dist/Model/State.d.ts +8 -8
- package/dist/Model/State.js +20 -20
- package/dist/Model/StateAware.d.ts +4 -4
- package/dist/Model/StateAware.js +2 -2
- package/dist/Model/Storage/StorageInformation.d.ts +10 -10
- package/dist/Model/Storage/StorageInformation.js +6 -6
- package/dist/Model/Storage/StorageItem.d.ts +7 -7
- package/dist/Model/Storage/StorageItem.js +15 -15
- package/dist/Model/Storage/StorageItemInformation.d.ts +6 -6
- package/dist/Model/Storage/StorageItemInformation.js +14 -14
- package/dist/Model/Storage/StorageType.d.ts +9 -9
- package/dist/Model/Storage/StorageType.js +21 -21
- package/dist/Model/Trigger/ApiTrigger.d.ts +6 -6
- package/dist/Model/Trigger/ApiTrigger.js +14 -14
- package/dist/Model/Trigger/ApiTriggerData.d.ts +4 -4
- package/dist/Model/Trigger/ApiTriggerData.js +10 -10
- package/dist/Model/Trigger/ScheduleTrigger.d.ts +6 -6
- package/dist/Model/Trigger/ScheduleTrigger.js +14 -14
- package/dist/Model/Trigger/ScheduleTriggerData.d.ts +5 -5
- package/dist/Model/Trigger/ScheduleTriggerData.js +11 -11
- package/dist/Model/Trigger/Trigger.d.ts +17 -17
- package/dist/Model/Trigger/Trigger.js +50 -50
- package/dist/Model/Trigger/TriggerData.d.ts +3 -3
- package/dist/Model/Trigger/TriggerData.js +9 -9
- package/dist/Model/Trigger/TriggerType.d.ts +8 -8
- package/dist/Model/Trigger/TriggerType.js +20 -20
- package/dist/Model/Trigger/WebhookTrigger.d.ts +6 -6
- package/dist/Model/Trigger/WebhookTrigger.js +14 -14
- package/dist/Model/Trigger/WebhookTriggerData.d.ts +5 -5
- package/dist/Model/Trigger/WebhookTriggerData.js +11 -11
- package/dist/Model/User/UserAction.d.ts +14 -14
- package/dist/Model/User/UserAction.js +6 -6
- package/dist/Model/User/UserAuthProvider.d.ts +12 -12
- package/dist/Model/User/UserAuthProvider.js +23 -23
- package/dist/Model/User.d.ts +16 -16
- package/dist/Model/User.js +25 -25
- package/dist/Model/Worker/Platform.d.ts +12 -12
- package/dist/Model/Worker/Platform.js +22 -22
- package/dist/Model/Worker/PlatformImage.d.ts +12 -12
- package/dist/Model/Worker/PlatformImage.js +22 -22
- package/dist/Model/Worker/Worker.d.ts +11 -11
- package/dist/Model/Worker/Worker.js +25 -25
- package/dist/Model/Worker/WorkerConfig.d.ts +17 -17
- package/dist/Model/Worker/WorkerConfig.js +23 -23
- package/dist/Model/Worker/WorkerInstance.d.ts +6 -6
- package/dist/Model/Worker/WorkerInstance.js +11 -11
- package/dist/Model/Worker/WorkerInstanceState.d.ts +8 -8
- package/dist/Model/Worker/WorkerInstanceState.js +20 -20
- package/dist/Model/Worker/WorkerState.d.ts +10 -10
- package/dist/Model/Worker/WorkerState.js +22 -22
- package/dist/Model/Workspace/Workspace.d.ts +8 -8
- package/dist/Model/Workspace/Workspace.js +14 -14
- package/dist/Model/Workspace/WorkspaceMember.d.ts +12 -12
- package/dist/Model/Workspace/WorkspaceMember.js +9 -9
- package/dist/Model/Workspace/WorkspaceMemberInvite.d.ts +14 -14
- package/dist/Model/Workspace/WorkspaceMemberInvite.js +10 -10
- package/dist/Model/Workspace/WorkspaceMemberInvite2.d.ts +10 -10
- package/dist/Model/Workspace/WorkspaceMemberInvite2.js +17 -17
- package/dist/Model/Workspace/WorkspaceMemberInviteState.d.ts +11 -11
- package/dist/Model/Workspace/WorkspaceMemberInviteState.js +23 -23
- package/dist/Model/Workspace/WorkspaceMemberRole.d.ts +11 -11
- package/dist/Model/Workspace/WorkspaceMemberRole.js +23 -23
- package/dist/Service/AdapterEndpoint.d.ts +13 -13
- package/dist/Service/AdapterEndpoint.js +92 -92
- package/dist/Service/ChannelEndpoint.d.ts +12 -12
- package/dist/Service/ChannelEndpoint.js +119 -119
- package/dist/Service/CodeSourceBuildStrategyEndpoint.d.ts +6 -6
- package/dist/Service/CodeSourceBuildStrategyEndpoint.js +14 -14
- package/dist/Service/ConfigEndpoint.d.ts +8 -8
- package/dist/Service/ConfigEndpoint.js +50 -50
- package/dist/Service/Endpoint.d.ts +17 -17
- package/dist/Service/Endpoint.js +159 -159
- package/dist/Service/FirewallEndpoint.d.ts +10 -10
- package/dist/Service/FirewallEndpoint.js +70 -70
- package/dist/Service/FlowEndpoint.d.ts +11 -11
- package/dist/Service/FlowEndpoint.js +92 -92
- package/dist/Service/FlowRunEndpoint.d.ts +14 -14
- package/dist/Service/FlowRunEndpoint.js +91 -91
- package/dist/Service/FlowRunRequestEndpoint.d.ts +6 -6
- package/dist/Service/FlowRunRequestEndpoint.js +36 -36
- package/dist/Service/FlowRunStatsEndpoint.d.ts +5 -5
- package/dist/Service/FlowRunStatsEndpoint.js +25 -25
- package/dist/Service/HealthAlertEndpoint.d.ts +6 -6
- package/dist/Service/HealthAlertEndpoint.js +21 -21
- package/dist/Service/LogEndpoint.d.ts +18 -18
- package/dist/Service/LogEndpoint.js +147 -147
- package/dist/Service/NotificationsEndpoint.d.ts +7 -7
- package/dist/Service/NotificationsEndpoint.js +20 -20
- package/dist/Service/PlatformEndpoint.d.ts +8 -8
- package/dist/Service/PlatformEndpoint.js +19 -19
- package/dist/Service/PlatformLanguageEndpoint.d.ts +6 -6
- package/dist/Service/PlatformLanguageEndpoint.js +12 -12
- package/dist/Service/ProjectDeployEndpoint.d.ts +9 -9
- package/dist/Service/ProjectDeployEndpoint.js +60 -60
- package/dist/Service/ProjectEndpoint.d.ts +10 -9
- package/dist/Service/ProjectEndpoint.js +66 -61
- package/dist/Service/ProjectEnvironmentEndpoint.d.ts +8 -8
- package/dist/Service/ProjectEnvironmentEndpoint.js +52 -52
- package/dist/Service/QueueEndpoint.d.ts +5 -5
- package/dist/Service/QueueEndpoint.js +21 -21
- package/dist/Service/SourcesAccountEndpoint.d.ts +15 -15
- package/dist/Service/SourcesAccountEndpoint.js +82 -82
- package/dist/Service/StorageEndpoint.d.ts +14 -14
- package/dist/Service/StorageEndpoint.js +117 -117
- package/dist/Service/SubscriberEndpoint.d.ts +8 -8
- package/dist/Service/SubscriberEndpoint.js +30 -30
- package/dist/Service/TriggerEndpoint.d.ts +8 -8
- package/dist/Service/TriggerEndpoint.js +54 -54
- package/dist/Service/UserEndpoint.d.ts +26 -26
- package/dist/Service/UserEndpoint.js +170 -170
- package/dist/Service/WorkerConfigEndpoint.d.ts +7 -7
- package/dist/Service/WorkerConfigEndpoint.js +38 -38
- package/dist/Service/WorkerEndpoint.d.ts +6 -6
- package/dist/Service/WorkerEndpoint.js +41 -41
- package/dist/Service/WorkspaceEndpoint.d.ts +6 -6
- package/dist/Service/WorkspaceEndpoint.js +20 -20
- package/dist/Service/WorkspaceMemberEndpoint.d.ts +13 -13
- package/dist/Service/WorkspaceMemberEndpoint.js +103 -103
- package/dist/Utils.d.ts +11 -11
- package/dist/Utils.js +67 -67
- package/dist/index.d.ts +129 -129
- package/dist/index.js +248 -248
- package/dist/main.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +4 -4
- package/package.json +2 -2
package/dist/Client.d.ts
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { OAuthClientToken } from './Http/OAuthClientToken';
|
|
2
|
-
import { WorkerEndpoint } from './Service/WorkerEndpoint';
|
|
3
|
-
import { AdapterEndpoint } from './Service/AdapterEndpoint';
|
|
4
|
-
import { ProjectEnvironmentEndpoint } from './Service/ProjectEnvironmentEndpoint';
|
|
5
|
-
import { ProjectEndpoint } from './Service/ProjectEndpoint';
|
|
6
|
-
import { FlowRunRequestEndpoint } from './Service/FlowRunRequestEndpoint';
|
|
7
|
-
import { OAuthClient } from './Http/OAuthClient';
|
|
8
|
-
import { WorkerConfigEndpoint } from './Service/WorkerConfigEndpoint';
|
|
9
|
-
import { WorkspaceEndpoint } from './Service/WorkspaceEndpoint';
|
|
10
|
-
import { UserEndpoint } from './Service/UserEndpoint';
|
|
11
|
-
import { ConfigEndpoint } from './Service/ConfigEndpoint';
|
|
12
|
-
import { SubscriberEndpoint } from './Service/SubscriberEndpoint';
|
|
13
|
-
import { FlowEndpoint } from './Service/FlowEndpoint';
|
|
14
|
-
import { WorkspaceMemberEndpoint } from './Service/WorkspaceMemberEndpoint';
|
|
15
|
-
import { StorageEndpoint } from './Service/StorageEndpoint';
|
|
16
|
-
import { QueueEndpoint } from './Service/QueueEndpoint';
|
|
17
|
-
import { NotificationsEndpoint } from './Service/NotificationsEndpoint';
|
|
18
|
-
import { ProjectDeployEndpoint } from './Service/ProjectDeployEndpoint';
|
|
19
|
-
import { SourcesAccountEndpoint } from './Service/SourcesAccountEndpoint';
|
|
20
|
-
import { PlatformLanguageEndpoint } from './Service/PlatformLanguageEndpoint';
|
|
21
|
-
import { ChannelEndpoint } from './Service/ChannelEndpoint';
|
|
22
|
-
import { HealthAlertEndpoint } from './Service/HealthAlertEndpoint';
|
|
23
|
-
import { FlowRunEndpoint } from './Service/FlowRunEndpoint';
|
|
24
|
-
import { LogEndpoint } from './Service/LogEndpoint';
|
|
25
|
-
import { TriggerEndpoint } from './Service/TriggerEndpoint';
|
|
26
|
-
import { PlatformEndpoint } from './Service/PlatformEndpoint';
|
|
27
|
-
import { FlowRunStatsEndpoint } from './Service/FlowRunStatsEndpoint';
|
|
28
|
-
import { FirewallEndpoint } from './Service/FirewallEndpoint';
|
|
29
|
-
import { CodeSourceBuildStrategyEndpoint } from './Service/CodeSourceBuildStrategyEndpoint';
|
|
30
|
-
export declare class Client {
|
|
31
|
-
private readonly apiEndpoint;
|
|
32
|
-
private readonly clientId;
|
|
33
|
-
private readonly clientSecret;
|
|
34
|
-
private endpoints;
|
|
35
|
-
private readonly httpClient;
|
|
36
|
-
private Store;
|
|
37
|
-
constructor(apiEndpoint: string, clientId: string, clientSecret: string);
|
|
38
|
-
private getHeaders;
|
|
39
|
-
getHttpClient(): OAuthClient;
|
|
40
|
-
authenticate(): Promise<boolean>;
|
|
41
|
-
authenticate(username: string, password: string): Promise<boolean>;
|
|
42
|
-
isAuthenticated(): boolean;
|
|
43
|
-
getToken(): OAuthClientToken | null;
|
|
44
|
-
setToken(token: OAuthClientToken): void;
|
|
45
|
-
unsetAccessToken(): void;
|
|
46
|
-
getApiInformation(): Promise<{
|
|
47
|
-
version: string;
|
|
48
|
-
}>;
|
|
49
|
-
getAdapterEndpoint(): AdapterEndpoint;
|
|
50
|
-
getProjectEndpoint(): ProjectEndpoint;
|
|
51
|
-
getProjectEnvironmentEndpoint(): ProjectEnvironmentEndpoint;
|
|
52
|
-
getProjectDeployEndpoint(): ProjectDeployEndpoint;
|
|
53
|
-
getChannelEndpoint(): ChannelEndpoint;
|
|
54
|
-
getConfigEndpoint(): ConfigEndpoint;
|
|
55
|
-
getNotificationsEndpoint(): NotificationsEndpoint;
|
|
56
|
-
getPlatformEndpoint(): PlatformEndpoint;
|
|
57
|
-
getSubscriberEndpoint(): SubscriberEndpoint;
|
|
58
|
-
getLogEndPoint(): LogEndpoint;
|
|
59
|
-
getFlowEndpoint(): FlowEndpoint;
|
|
60
|
-
getFlowRunEndpoint(): FlowRunEndpoint;
|
|
61
|
-
getFlowRunRequestEndpoint(): FlowRunRequestEndpoint;
|
|
62
|
-
getFlowRunStatsEndpoint(): FlowRunStatsEndpoint;
|
|
63
|
-
getWorkspaceEndpoint(): WorkspaceEndpoint;
|
|
64
|
-
getTriggerEndpoint(): TriggerEndpoint;
|
|
65
|
-
getUserEndpoint(): UserEndpoint;
|
|
66
|
-
getWorkspaceMemberEndpoint(): WorkspaceMemberEndpoint;
|
|
67
|
-
getWorkerEndpoint(): WorkerEndpoint;
|
|
68
|
-
getSourcesAccountEndpoint(): SourcesAccountEndpoint;
|
|
69
|
-
getLanguageEndpoint(): PlatformLanguageEndpoint;
|
|
70
|
-
getStorageEndpoint(): StorageEndpoint;
|
|
71
|
-
getWorkerConfigEndpoint(): WorkerConfigEndpoint;
|
|
72
|
-
getQueueEndpoint(): QueueEndpoint;
|
|
73
|
-
getHealthAlertEndpoint(): HealthAlertEndpoint;
|
|
74
|
-
getCodeSourceBuildStrategyEndpoint(): CodeSourceBuildStrategyEndpoint;
|
|
75
|
-
getFirewallEndpoint(): FirewallEndpoint;
|
|
76
|
-
private getEndpoint;
|
|
77
|
-
}
|
|
1
|
+
import { OAuthClientToken } from './Http/OAuthClientToken';
|
|
2
|
+
import { WorkerEndpoint } from './Service/WorkerEndpoint';
|
|
3
|
+
import { AdapterEndpoint } from './Service/AdapterEndpoint';
|
|
4
|
+
import { ProjectEnvironmentEndpoint } from './Service/ProjectEnvironmentEndpoint';
|
|
5
|
+
import { ProjectEndpoint } from './Service/ProjectEndpoint';
|
|
6
|
+
import { FlowRunRequestEndpoint } from './Service/FlowRunRequestEndpoint';
|
|
7
|
+
import { OAuthClient } from './Http/OAuthClient';
|
|
8
|
+
import { WorkerConfigEndpoint } from './Service/WorkerConfigEndpoint';
|
|
9
|
+
import { WorkspaceEndpoint } from './Service/WorkspaceEndpoint';
|
|
10
|
+
import { UserEndpoint } from './Service/UserEndpoint';
|
|
11
|
+
import { ConfigEndpoint } from './Service/ConfigEndpoint';
|
|
12
|
+
import { SubscriberEndpoint } from './Service/SubscriberEndpoint';
|
|
13
|
+
import { FlowEndpoint } from './Service/FlowEndpoint';
|
|
14
|
+
import { WorkspaceMemberEndpoint } from './Service/WorkspaceMemberEndpoint';
|
|
15
|
+
import { StorageEndpoint } from './Service/StorageEndpoint';
|
|
16
|
+
import { QueueEndpoint } from './Service/QueueEndpoint';
|
|
17
|
+
import { NotificationsEndpoint } from './Service/NotificationsEndpoint';
|
|
18
|
+
import { ProjectDeployEndpoint } from './Service/ProjectDeployEndpoint';
|
|
19
|
+
import { SourcesAccountEndpoint } from './Service/SourcesAccountEndpoint';
|
|
20
|
+
import { PlatformLanguageEndpoint } from './Service/PlatformLanguageEndpoint';
|
|
21
|
+
import { ChannelEndpoint } from './Service/ChannelEndpoint';
|
|
22
|
+
import { HealthAlertEndpoint } from './Service/HealthAlertEndpoint';
|
|
23
|
+
import { FlowRunEndpoint } from './Service/FlowRunEndpoint';
|
|
24
|
+
import { LogEndpoint } from './Service/LogEndpoint';
|
|
25
|
+
import { TriggerEndpoint } from './Service/TriggerEndpoint';
|
|
26
|
+
import { PlatformEndpoint } from './Service/PlatformEndpoint';
|
|
27
|
+
import { FlowRunStatsEndpoint } from './Service/FlowRunStatsEndpoint';
|
|
28
|
+
import { FirewallEndpoint } from './Service/FirewallEndpoint';
|
|
29
|
+
import { CodeSourceBuildStrategyEndpoint } from './Service/CodeSourceBuildStrategyEndpoint';
|
|
30
|
+
export declare class Client {
|
|
31
|
+
private readonly apiEndpoint;
|
|
32
|
+
private readonly clientId;
|
|
33
|
+
private readonly clientSecret;
|
|
34
|
+
private endpoints;
|
|
35
|
+
private readonly httpClient;
|
|
36
|
+
private Store;
|
|
37
|
+
constructor(apiEndpoint: string, clientId: string, clientSecret: string);
|
|
38
|
+
private getHeaders;
|
|
39
|
+
getHttpClient(): OAuthClient;
|
|
40
|
+
authenticate(): Promise<boolean>;
|
|
41
|
+
authenticate(username: string, password: string): Promise<boolean>;
|
|
42
|
+
isAuthenticated(): boolean;
|
|
43
|
+
getToken(): OAuthClientToken | null;
|
|
44
|
+
setToken(token: OAuthClientToken): void;
|
|
45
|
+
unsetAccessToken(): void;
|
|
46
|
+
getApiInformation(): Promise<{
|
|
47
|
+
version: string;
|
|
48
|
+
}>;
|
|
49
|
+
getAdapterEndpoint(): AdapterEndpoint;
|
|
50
|
+
getProjectEndpoint(): ProjectEndpoint;
|
|
51
|
+
getProjectEnvironmentEndpoint(): ProjectEnvironmentEndpoint;
|
|
52
|
+
getProjectDeployEndpoint(): ProjectDeployEndpoint;
|
|
53
|
+
getChannelEndpoint(): ChannelEndpoint;
|
|
54
|
+
getConfigEndpoint(): ConfigEndpoint;
|
|
55
|
+
getNotificationsEndpoint(): NotificationsEndpoint;
|
|
56
|
+
getPlatformEndpoint(): PlatformEndpoint;
|
|
57
|
+
getSubscriberEndpoint(): SubscriberEndpoint;
|
|
58
|
+
getLogEndPoint(): LogEndpoint;
|
|
59
|
+
getFlowEndpoint(): FlowEndpoint;
|
|
60
|
+
getFlowRunEndpoint(): FlowRunEndpoint;
|
|
61
|
+
getFlowRunRequestEndpoint(): FlowRunRequestEndpoint;
|
|
62
|
+
getFlowRunStatsEndpoint(): FlowRunStatsEndpoint;
|
|
63
|
+
getWorkspaceEndpoint(): WorkspaceEndpoint;
|
|
64
|
+
getTriggerEndpoint(): TriggerEndpoint;
|
|
65
|
+
getUserEndpoint(): UserEndpoint;
|
|
66
|
+
getWorkspaceMemberEndpoint(): WorkspaceMemberEndpoint;
|
|
67
|
+
getWorkerEndpoint(): WorkerEndpoint;
|
|
68
|
+
getSourcesAccountEndpoint(): SourcesAccountEndpoint;
|
|
69
|
+
getLanguageEndpoint(): PlatformLanguageEndpoint;
|
|
70
|
+
getStorageEndpoint(): StorageEndpoint;
|
|
71
|
+
getWorkerConfigEndpoint(): WorkerConfigEndpoint;
|
|
72
|
+
getQueueEndpoint(): QueueEndpoint;
|
|
73
|
+
getHealthAlertEndpoint(): HealthAlertEndpoint;
|
|
74
|
+
getCodeSourceBuildStrategyEndpoint(): CodeSourceBuildStrategyEndpoint;
|
|
75
|
+
getFirewallEndpoint(): FirewallEndpoint;
|
|
76
|
+
private getEndpoint;
|
|
77
|
+
}
|
package/dist/Client.js
CHANGED
|
@@ -1,225 +1,225 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Client = void 0;
|
|
4
|
-
const WorkerEndpoint_1 = require("./Service/WorkerEndpoint");
|
|
5
|
-
const AdapterEndpoint_1 = require("./Service/AdapterEndpoint");
|
|
6
|
-
const ProjectEnvironmentEndpoint_1 = require("./Service/ProjectEnvironmentEndpoint");
|
|
7
|
-
const ProjectEndpoint_1 = require("./Service/ProjectEndpoint");
|
|
8
|
-
const FlowRunRequestEndpoint_1 = require("./Service/FlowRunRequestEndpoint");
|
|
9
|
-
const OAuthClient_1 = require("./Http/OAuthClient");
|
|
10
|
-
const WorkerConfigEndpoint_1 = require("./Service/WorkerConfigEndpoint");
|
|
11
|
-
const WorkspaceEndpoint_1 = require("./Service/WorkspaceEndpoint");
|
|
12
|
-
const UserEndpoint_1 = require("./Service/UserEndpoint");
|
|
13
|
-
const ConfigEndpoint_1 = require("./Service/ConfigEndpoint");
|
|
14
|
-
const SubscriberEndpoint_1 = require("./Service/SubscriberEndpoint");
|
|
15
|
-
const FlowEndpoint_1 = require("./Service/FlowEndpoint");
|
|
16
|
-
const WorkspaceMemberEndpoint_1 = require("./Service/WorkspaceMemberEndpoint");
|
|
17
|
-
const StorageEndpoint_1 = require("./Service/StorageEndpoint");
|
|
18
|
-
const QueueEndpoint_1 = require("./Service/QueueEndpoint");
|
|
19
|
-
const NotificationsEndpoint_1 = require("./Service/NotificationsEndpoint");
|
|
20
|
-
const ProjectDeployEndpoint_1 = require("./Service/ProjectDeployEndpoint");
|
|
21
|
-
const SourcesAccountEndpoint_1 = require("./Service/SourcesAccountEndpoint");
|
|
22
|
-
const OAuthClientOptions_1 = require("./Http/OAuthClientOptions");
|
|
23
|
-
const PlatformLanguageEndpoint_1 = require("./Service/PlatformLanguageEndpoint");
|
|
24
|
-
const ChannelEndpoint_1 = require("./Service/ChannelEndpoint");
|
|
25
|
-
const HealthAlertEndpoint_1 = require("./Service/HealthAlertEndpoint");
|
|
26
|
-
const FlowRunEndpoint_1 = require("./Service/FlowRunEndpoint");
|
|
27
|
-
const LogEndpoint_1 = require("./Service/LogEndpoint");
|
|
28
|
-
const TriggerEndpoint_1 = require("./Service/TriggerEndpoint");
|
|
29
|
-
const PlatformEndpoint_1 = require("./Service/PlatformEndpoint");
|
|
30
|
-
const FlowRunStatsEndpoint_1 = require("./Service/FlowRunStatsEndpoint");
|
|
31
|
-
const FirewallEndpoint_1 = require("./Service/FirewallEndpoint");
|
|
32
|
-
const version_1 = require("./version");
|
|
33
|
-
const CodeSourceBuildStrategyEndpoint_1 = require("./Service/CodeSourceBuildStrategyEndpoint");
|
|
34
|
-
class Client {
|
|
35
|
-
constructor(apiEndpoint, clientId, clientSecret) {
|
|
36
|
-
this.apiEndpoint = apiEndpoint;
|
|
37
|
-
this.clientId = clientId;
|
|
38
|
-
this.clientSecret = clientSecret;
|
|
39
|
-
this.Store = {
|
|
40
|
-
WorkerEndpoint: WorkerEndpoint_1.WorkerEndpoint,
|
|
41
|
-
AdapterEndpoint: AdapterEndpoint_1.AdapterEndpoint,
|
|
42
|
-
ProjectEndpoint: ProjectEndpoint_1.ProjectEndpoint,
|
|
43
|
-
ProjectEnvironmentEndpoint: ProjectEnvironmentEndpoint_1.ProjectEnvironmentEndpoint,
|
|
44
|
-
ProjectDeployEndpoint: ProjectDeployEndpoint_1.ProjectDeployEndpoint,
|
|
45
|
-
QueueEndpoint: QueueEndpoint_1.QueueEndpoint,
|
|
46
|
-
ChannelEndpoint: ChannelEndpoint_1.ChannelEndpoint,
|
|
47
|
-
ConfigEndpoint: ConfigEndpoint_1.ConfigEndpoint,
|
|
48
|
-
NotificationsEndpoint: NotificationsEndpoint_1.NotificationsEndpoint,
|
|
49
|
-
SubscriberEndpoint: SubscriberEndpoint_1.SubscriberEndpoint,
|
|
50
|
-
LogEndpoint: LogEndpoint_1.LogEndpoint,
|
|
51
|
-
FlowEndpoint: FlowEndpoint_1.FlowEndpoint,
|
|
52
|
-
FlowRunEndpoint: FlowRunEndpoint_1.FlowRunEndpoint,
|
|
53
|
-
FlowRunRequestEndpoint: FlowRunRequestEndpoint_1.FlowRunRequestEndpoint,
|
|
54
|
-
WorkspaceEndpoint: WorkspaceEndpoint_1.WorkspaceEndpoint,
|
|
55
|
-
TriggerEndpoint: TriggerEndpoint_1.TriggerEndpoint,
|
|
56
|
-
UserEndpoint: UserEndpoint_1.UserEndpoint,
|
|
57
|
-
WorkspaceMemberEndpoint: WorkspaceMemberEndpoint_1.WorkspaceMemberEndpoint,
|
|
58
|
-
SourcesAccountEndpoint: SourcesAccountEndpoint_1.SourcesAccountEndpoint,
|
|
59
|
-
PlatformLanguageEndpoint: PlatformLanguageEndpoint_1.PlatformLanguageEndpoint,
|
|
60
|
-
StorageEndpoint: StorageEndpoint_1.StorageEndpoint,
|
|
61
|
-
WorkerConfigEndpoint: WorkerConfigEndpoint_1.WorkerConfigEndpoint,
|
|
62
|
-
HealthAlertEndpoint: HealthAlertEndpoint_1.HealthAlertEndpoint,
|
|
63
|
-
PlatformEndpoint: PlatformEndpoint_1.PlatformEndpoint,
|
|
64
|
-
FlowRunStatsEndpoint: FlowRunStatsEndpoint_1.FlowRunStatsEndpoint,
|
|
65
|
-
CodeSourceBuildStrategyEndpoint: CodeSourceBuildStrategyEndpoint_1.CodeSourceBuildStrategyEndpoint,
|
|
66
|
-
FirewallEndpoint: FirewallEndpoint_1.FirewallEndpoint
|
|
67
|
-
};
|
|
68
|
-
const options = new OAuthClientOptions_1.OAuthClientOptions(apiEndpoint, clientId, clientSecret, this.getHeaders());
|
|
69
|
-
this.httpClient = new OAuthClient_1.OAuthClient(options);
|
|
70
|
-
this.endpoints = new Map();
|
|
71
|
-
// this.test = new Map<string, any>();
|
|
72
|
-
//
|
|
73
|
-
// this.test.set('WorkerEndpoint', WorkerEndpoint);
|
|
74
|
-
// this.socketService = socketIo(this.apiEndpoint);
|
|
75
|
-
//
|
|
76
|
-
// this.socketService.on('message', (data: any) => {
|
|
77
|
-
// console.log('Incoming:', data);
|
|
78
|
-
// });
|
|
79
|
-
}
|
|
80
|
-
getHeaders() {
|
|
81
|
-
const userAgentInfo = {
|
|
82
|
-
version: version_1.VERSION,
|
|
83
|
-
language: 'Javascript',
|
|
84
|
-
language_version: '',
|
|
85
|
-
publisher: 'Attlaz'
|
|
86
|
-
};
|
|
87
|
-
return {
|
|
88
|
-
'User-Agent': 'Attlaz Javascript Client/' + version_1.VERSION,
|
|
89
|
-
'X-Attlaz-Client-User-Agent': JSON.stringify(userAgentInfo)
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
getHttpClient() {
|
|
93
|
-
return this.httpClient;
|
|
94
|
-
}
|
|
95
|
-
async authenticate(username = null, password = null) {
|
|
96
|
-
if (username === null || password === null) {
|
|
97
|
-
return this.httpClient.authenticate();
|
|
98
|
-
}
|
|
99
|
-
return this.httpClient.authenticate(username, password);
|
|
100
|
-
}
|
|
101
|
-
isAuthenticated() {
|
|
102
|
-
return this.httpClient.isAuthenticated();
|
|
103
|
-
}
|
|
104
|
-
getToken() {
|
|
105
|
-
return this.httpClient.getToken();
|
|
106
|
-
}
|
|
107
|
-
// public getAccessToken(): string {
|
|
108
|
-
// return this.httpClient.getAccessToken();
|
|
109
|
-
// }
|
|
110
|
-
//
|
|
111
|
-
setToken(token) {
|
|
112
|
-
this.httpClient.setToken(token);
|
|
113
|
-
}
|
|
114
|
-
//
|
|
115
|
-
// public x(accessToken: string, refreshToken: string): Promise<Token> {
|
|
116
|
-
// return this.httpClient.refreshToken(accessToken, refreshToken);
|
|
117
|
-
// }
|
|
118
|
-
unsetAccessToken() {
|
|
119
|
-
this.httpClient.unsetToken();
|
|
120
|
-
}
|
|
121
|
-
async getApiInformation() {
|
|
122
|
-
const result = await this.httpClient.request('/system/health', null, 'GET', false);
|
|
123
|
-
return { version: result.version };
|
|
124
|
-
}
|
|
125
|
-
/* Endpoints */
|
|
126
|
-
getAdapterEndpoint() {
|
|
127
|
-
return this.getEndpoint('adapter', this.Store.AdapterEndpoint);
|
|
128
|
-
}
|
|
129
|
-
getProjectEndpoint() {
|
|
130
|
-
return this.getEndpoint('project', this.Store.ProjectEndpoint);
|
|
131
|
-
}
|
|
132
|
-
getProjectEnvironmentEndpoint() {
|
|
133
|
-
return this.getEndpoint('project-environment', this.Store.ProjectEnvironmentEndpoint);
|
|
134
|
-
}
|
|
135
|
-
getProjectDeployEndpoint() {
|
|
136
|
-
return this.getEndpoint('project-deploy', this.Store.ProjectDeployEndpoint);
|
|
137
|
-
}
|
|
138
|
-
getChannelEndpoint() {
|
|
139
|
-
return this.getEndpoint('channel', this.Store.ChannelEndpoint);
|
|
140
|
-
}
|
|
141
|
-
getConfigEndpoint() {
|
|
142
|
-
return this.getEndpoint('config', this.Store.ConfigEndpoint);
|
|
143
|
-
}
|
|
144
|
-
getNotificationsEndpoint() {
|
|
145
|
-
return this.getEndpoint('notification', this.Store.NotificationsEndpoint);
|
|
146
|
-
}
|
|
147
|
-
getPlatformEndpoint() {
|
|
148
|
-
return this.getEndpoint('platform', this.Store.PlatformEndpoint);
|
|
149
|
-
}
|
|
150
|
-
getSubscriberEndpoint() {
|
|
151
|
-
return this.getEndpoint('subscriber', this.Store.SubscriberEndpoint);
|
|
152
|
-
}
|
|
153
|
-
getLogEndPoint() {
|
|
154
|
-
return this.getEndpoint('log', this.Store.LogEndpoint);
|
|
155
|
-
}
|
|
156
|
-
getFlowEndpoint() {
|
|
157
|
-
return this.getEndpoint('flow', this.Store.FlowEndpoint);
|
|
158
|
-
}
|
|
159
|
-
getFlowRunEndpoint() {
|
|
160
|
-
return this.getEndpoint('flow-run', this.Store.FlowRunEndpoint);
|
|
161
|
-
}
|
|
162
|
-
getFlowRunRequestEndpoint() {
|
|
163
|
-
return this.getEndpoint('flow-run-request', this.Store.FlowRunRequestEndpoint);
|
|
164
|
-
}
|
|
165
|
-
getFlowRunStatsEndpoint() {
|
|
166
|
-
return this.getEndpoint('flow-run-stats', this.Store.FlowRunStatsEndpoint);
|
|
167
|
-
}
|
|
168
|
-
getWorkspaceEndpoint() {
|
|
169
|
-
return this.getEndpoint('workspaces', this.Store.WorkspaceEndpoint);
|
|
170
|
-
}
|
|
171
|
-
getTriggerEndpoint() {
|
|
172
|
-
return this.getEndpoint('trigger', this.Store.TriggerEndpoint);
|
|
173
|
-
}
|
|
174
|
-
getUserEndpoint() {
|
|
175
|
-
return this.getEndpoint('user', this.Store.UserEndpoint);
|
|
176
|
-
}
|
|
177
|
-
getWorkspaceMemberEndpoint() {
|
|
178
|
-
return this.getEndpoint('member', this.Store.WorkspaceMemberEndpoint);
|
|
179
|
-
}
|
|
180
|
-
getWorkerEndpoint() {
|
|
181
|
-
return this.getEndpoint('worker', this.Store.WorkerEndpoint);
|
|
182
|
-
}
|
|
183
|
-
getSourcesAccountEndpoint() {
|
|
184
|
-
return this.getEndpoint('sources-account', this.Store.SourcesAccountEndpoint);
|
|
185
|
-
}
|
|
186
|
-
getLanguageEndpoint() {
|
|
187
|
-
return this.getEndpoint('language', this.Store.PlatformLanguageEndpoint);
|
|
188
|
-
}
|
|
189
|
-
getStorageEndpoint() {
|
|
190
|
-
return this.getEndpoint('storage', this.Store.StorageEndpoint);
|
|
191
|
-
}
|
|
192
|
-
getWorkerConfigEndpoint() {
|
|
193
|
-
return this.getEndpoint('worker-config', this.Store.WorkerConfigEndpoint);
|
|
194
|
-
}
|
|
195
|
-
getQueueEndpoint() {
|
|
196
|
-
return this.getEndpoint('queue', this.Store.QueueEndpoint);
|
|
197
|
-
}
|
|
198
|
-
getHealthAlertEndpoint() {
|
|
199
|
-
return this.getEndpoint('healt-alert', this.Store.HealthAlertEndpoint);
|
|
200
|
-
}
|
|
201
|
-
getCodeSourceBuildStrategyEndpoint() {
|
|
202
|
-
return this.getEndpoint('code-source-deploy-strategy', this.Store.CodeSourceBuildStrategyEndpoint);
|
|
203
|
-
}
|
|
204
|
-
// TODO: this should be in a separate API?
|
|
205
|
-
getFirewallEndpoint() {
|
|
206
|
-
return this.getEndpoint('firewall', this.Store.FirewallEndpoint);
|
|
207
|
-
}
|
|
208
|
-
getEndpoint(key, className) {
|
|
209
|
-
//const classNameString: string = className.name;
|
|
210
|
-
if (!this.endpoints.has(key)) {
|
|
211
|
-
// if (this.Store[classNameString] === undefined || this.Store[classNameString] === null) {
|
|
212
|
-
// throw new Error(`Class type of \'${classNameString}\' is not in the store`);
|
|
213
|
-
// }
|
|
214
|
-
try {
|
|
215
|
-
const endpoint = new className(this.httpClient);
|
|
216
|
-
this.endpoints.set(key, endpoint);
|
|
217
|
-
}
|
|
218
|
-
catch (e) {
|
|
219
|
-
throw new Error('Unable to initialize ' + key + ' endpoint (' + e.message + ')');
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
return this.endpoints.get(key);
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
exports.Client = Client;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Client = void 0;
|
|
4
|
+
const WorkerEndpoint_1 = require("./Service/WorkerEndpoint");
|
|
5
|
+
const AdapterEndpoint_1 = require("./Service/AdapterEndpoint");
|
|
6
|
+
const ProjectEnvironmentEndpoint_1 = require("./Service/ProjectEnvironmentEndpoint");
|
|
7
|
+
const ProjectEndpoint_1 = require("./Service/ProjectEndpoint");
|
|
8
|
+
const FlowRunRequestEndpoint_1 = require("./Service/FlowRunRequestEndpoint");
|
|
9
|
+
const OAuthClient_1 = require("./Http/OAuthClient");
|
|
10
|
+
const WorkerConfigEndpoint_1 = require("./Service/WorkerConfigEndpoint");
|
|
11
|
+
const WorkspaceEndpoint_1 = require("./Service/WorkspaceEndpoint");
|
|
12
|
+
const UserEndpoint_1 = require("./Service/UserEndpoint");
|
|
13
|
+
const ConfigEndpoint_1 = require("./Service/ConfigEndpoint");
|
|
14
|
+
const SubscriberEndpoint_1 = require("./Service/SubscriberEndpoint");
|
|
15
|
+
const FlowEndpoint_1 = require("./Service/FlowEndpoint");
|
|
16
|
+
const WorkspaceMemberEndpoint_1 = require("./Service/WorkspaceMemberEndpoint");
|
|
17
|
+
const StorageEndpoint_1 = require("./Service/StorageEndpoint");
|
|
18
|
+
const QueueEndpoint_1 = require("./Service/QueueEndpoint");
|
|
19
|
+
const NotificationsEndpoint_1 = require("./Service/NotificationsEndpoint");
|
|
20
|
+
const ProjectDeployEndpoint_1 = require("./Service/ProjectDeployEndpoint");
|
|
21
|
+
const SourcesAccountEndpoint_1 = require("./Service/SourcesAccountEndpoint");
|
|
22
|
+
const OAuthClientOptions_1 = require("./Http/OAuthClientOptions");
|
|
23
|
+
const PlatformLanguageEndpoint_1 = require("./Service/PlatformLanguageEndpoint");
|
|
24
|
+
const ChannelEndpoint_1 = require("./Service/ChannelEndpoint");
|
|
25
|
+
const HealthAlertEndpoint_1 = require("./Service/HealthAlertEndpoint");
|
|
26
|
+
const FlowRunEndpoint_1 = require("./Service/FlowRunEndpoint");
|
|
27
|
+
const LogEndpoint_1 = require("./Service/LogEndpoint");
|
|
28
|
+
const TriggerEndpoint_1 = require("./Service/TriggerEndpoint");
|
|
29
|
+
const PlatformEndpoint_1 = require("./Service/PlatformEndpoint");
|
|
30
|
+
const FlowRunStatsEndpoint_1 = require("./Service/FlowRunStatsEndpoint");
|
|
31
|
+
const FirewallEndpoint_1 = require("./Service/FirewallEndpoint");
|
|
32
|
+
const version_1 = require("./version");
|
|
33
|
+
const CodeSourceBuildStrategyEndpoint_1 = require("./Service/CodeSourceBuildStrategyEndpoint");
|
|
34
|
+
class Client {
|
|
35
|
+
constructor(apiEndpoint, clientId, clientSecret) {
|
|
36
|
+
this.apiEndpoint = apiEndpoint;
|
|
37
|
+
this.clientId = clientId;
|
|
38
|
+
this.clientSecret = clientSecret;
|
|
39
|
+
this.Store = {
|
|
40
|
+
WorkerEndpoint: WorkerEndpoint_1.WorkerEndpoint,
|
|
41
|
+
AdapterEndpoint: AdapterEndpoint_1.AdapterEndpoint,
|
|
42
|
+
ProjectEndpoint: ProjectEndpoint_1.ProjectEndpoint,
|
|
43
|
+
ProjectEnvironmentEndpoint: ProjectEnvironmentEndpoint_1.ProjectEnvironmentEndpoint,
|
|
44
|
+
ProjectDeployEndpoint: ProjectDeployEndpoint_1.ProjectDeployEndpoint,
|
|
45
|
+
QueueEndpoint: QueueEndpoint_1.QueueEndpoint,
|
|
46
|
+
ChannelEndpoint: ChannelEndpoint_1.ChannelEndpoint,
|
|
47
|
+
ConfigEndpoint: ConfigEndpoint_1.ConfigEndpoint,
|
|
48
|
+
NotificationsEndpoint: NotificationsEndpoint_1.NotificationsEndpoint,
|
|
49
|
+
SubscriberEndpoint: SubscriberEndpoint_1.SubscriberEndpoint,
|
|
50
|
+
LogEndpoint: LogEndpoint_1.LogEndpoint,
|
|
51
|
+
FlowEndpoint: FlowEndpoint_1.FlowEndpoint,
|
|
52
|
+
FlowRunEndpoint: FlowRunEndpoint_1.FlowRunEndpoint,
|
|
53
|
+
FlowRunRequestEndpoint: FlowRunRequestEndpoint_1.FlowRunRequestEndpoint,
|
|
54
|
+
WorkspaceEndpoint: WorkspaceEndpoint_1.WorkspaceEndpoint,
|
|
55
|
+
TriggerEndpoint: TriggerEndpoint_1.TriggerEndpoint,
|
|
56
|
+
UserEndpoint: UserEndpoint_1.UserEndpoint,
|
|
57
|
+
WorkspaceMemberEndpoint: WorkspaceMemberEndpoint_1.WorkspaceMemberEndpoint,
|
|
58
|
+
SourcesAccountEndpoint: SourcesAccountEndpoint_1.SourcesAccountEndpoint,
|
|
59
|
+
PlatformLanguageEndpoint: PlatformLanguageEndpoint_1.PlatformLanguageEndpoint,
|
|
60
|
+
StorageEndpoint: StorageEndpoint_1.StorageEndpoint,
|
|
61
|
+
WorkerConfigEndpoint: WorkerConfigEndpoint_1.WorkerConfigEndpoint,
|
|
62
|
+
HealthAlertEndpoint: HealthAlertEndpoint_1.HealthAlertEndpoint,
|
|
63
|
+
PlatformEndpoint: PlatformEndpoint_1.PlatformEndpoint,
|
|
64
|
+
FlowRunStatsEndpoint: FlowRunStatsEndpoint_1.FlowRunStatsEndpoint,
|
|
65
|
+
CodeSourceBuildStrategyEndpoint: CodeSourceBuildStrategyEndpoint_1.CodeSourceBuildStrategyEndpoint,
|
|
66
|
+
FirewallEndpoint: FirewallEndpoint_1.FirewallEndpoint
|
|
67
|
+
};
|
|
68
|
+
const options = new OAuthClientOptions_1.OAuthClientOptions(apiEndpoint, clientId, clientSecret, this.getHeaders());
|
|
69
|
+
this.httpClient = new OAuthClient_1.OAuthClient(options);
|
|
70
|
+
this.endpoints = new Map();
|
|
71
|
+
// this.test = new Map<string, any>();
|
|
72
|
+
//
|
|
73
|
+
// this.test.set('WorkerEndpoint', WorkerEndpoint);
|
|
74
|
+
// this.socketService = socketIo(this.apiEndpoint);
|
|
75
|
+
//
|
|
76
|
+
// this.socketService.on('message', (data: any) => {
|
|
77
|
+
// console.log('Incoming:', data);
|
|
78
|
+
// });
|
|
79
|
+
}
|
|
80
|
+
getHeaders() {
|
|
81
|
+
const userAgentInfo = {
|
|
82
|
+
version: version_1.VERSION,
|
|
83
|
+
language: 'Javascript',
|
|
84
|
+
language_version: '',
|
|
85
|
+
publisher: 'Attlaz'
|
|
86
|
+
};
|
|
87
|
+
return {
|
|
88
|
+
'User-Agent': 'Attlaz Javascript Client/' + version_1.VERSION,
|
|
89
|
+
'X-Attlaz-Client-User-Agent': JSON.stringify(userAgentInfo)
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
getHttpClient() {
|
|
93
|
+
return this.httpClient;
|
|
94
|
+
}
|
|
95
|
+
async authenticate(username = null, password = null) {
|
|
96
|
+
if (username === null || password === null) {
|
|
97
|
+
return this.httpClient.authenticate();
|
|
98
|
+
}
|
|
99
|
+
return this.httpClient.authenticate(username, password);
|
|
100
|
+
}
|
|
101
|
+
isAuthenticated() {
|
|
102
|
+
return this.httpClient.isAuthenticated();
|
|
103
|
+
}
|
|
104
|
+
getToken() {
|
|
105
|
+
return this.httpClient.getToken();
|
|
106
|
+
}
|
|
107
|
+
// public getAccessToken(): string {
|
|
108
|
+
// return this.httpClient.getAccessToken();
|
|
109
|
+
// }
|
|
110
|
+
//
|
|
111
|
+
setToken(token) {
|
|
112
|
+
this.httpClient.setToken(token);
|
|
113
|
+
}
|
|
114
|
+
//
|
|
115
|
+
// public x(accessToken: string, refreshToken: string): Promise<Token> {
|
|
116
|
+
// return this.httpClient.refreshToken(accessToken, refreshToken);
|
|
117
|
+
// }
|
|
118
|
+
unsetAccessToken() {
|
|
119
|
+
this.httpClient.unsetToken();
|
|
120
|
+
}
|
|
121
|
+
async getApiInformation() {
|
|
122
|
+
const result = await this.httpClient.request('/system/health', null, 'GET', false);
|
|
123
|
+
return { version: result.version };
|
|
124
|
+
}
|
|
125
|
+
/* Endpoints */
|
|
126
|
+
getAdapterEndpoint() {
|
|
127
|
+
return this.getEndpoint('adapter', this.Store.AdapterEndpoint);
|
|
128
|
+
}
|
|
129
|
+
getProjectEndpoint() {
|
|
130
|
+
return this.getEndpoint('project', this.Store.ProjectEndpoint);
|
|
131
|
+
}
|
|
132
|
+
getProjectEnvironmentEndpoint() {
|
|
133
|
+
return this.getEndpoint('project-environment', this.Store.ProjectEnvironmentEndpoint);
|
|
134
|
+
}
|
|
135
|
+
getProjectDeployEndpoint() {
|
|
136
|
+
return this.getEndpoint('project-deploy', this.Store.ProjectDeployEndpoint);
|
|
137
|
+
}
|
|
138
|
+
getChannelEndpoint() {
|
|
139
|
+
return this.getEndpoint('channel', this.Store.ChannelEndpoint);
|
|
140
|
+
}
|
|
141
|
+
getConfigEndpoint() {
|
|
142
|
+
return this.getEndpoint('config', this.Store.ConfigEndpoint);
|
|
143
|
+
}
|
|
144
|
+
getNotificationsEndpoint() {
|
|
145
|
+
return this.getEndpoint('notification', this.Store.NotificationsEndpoint);
|
|
146
|
+
}
|
|
147
|
+
getPlatformEndpoint() {
|
|
148
|
+
return this.getEndpoint('platform', this.Store.PlatformEndpoint);
|
|
149
|
+
}
|
|
150
|
+
getSubscriberEndpoint() {
|
|
151
|
+
return this.getEndpoint('subscriber', this.Store.SubscriberEndpoint);
|
|
152
|
+
}
|
|
153
|
+
getLogEndPoint() {
|
|
154
|
+
return this.getEndpoint('log', this.Store.LogEndpoint);
|
|
155
|
+
}
|
|
156
|
+
getFlowEndpoint() {
|
|
157
|
+
return this.getEndpoint('flow', this.Store.FlowEndpoint);
|
|
158
|
+
}
|
|
159
|
+
getFlowRunEndpoint() {
|
|
160
|
+
return this.getEndpoint('flow-run', this.Store.FlowRunEndpoint);
|
|
161
|
+
}
|
|
162
|
+
getFlowRunRequestEndpoint() {
|
|
163
|
+
return this.getEndpoint('flow-run-request', this.Store.FlowRunRequestEndpoint);
|
|
164
|
+
}
|
|
165
|
+
getFlowRunStatsEndpoint() {
|
|
166
|
+
return this.getEndpoint('flow-run-stats', this.Store.FlowRunStatsEndpoint);
|
|
167
|
+
}
|
|
168
|
+
getWorkspaceEndpoint() {
|
|
169
|
+
return this.getEndpoint('workspaces', this.Store.WorkspaceEndpoint);
|
|
170
|
+
}
|
|
171
|
+
getTriggerEndpoint() {
|
|
172
|
+
return this.getEndpoint('trigger', this.Store.TriggerEndpoint);
|
|
173
|
+
}
|
|
174
|
+
getUserEndpoint() {
|
|
175
|
+
return this.getEndpoint('user', this.Store.UserEndpoint);
|
|
176
|
+
}
|
|
177
|
+
getWorkspaceMemberEndpoint() {
|
|
178
|
+
return this.getEndpoint('member', this.Store.WorkspaceMemberEndpoint);
|
|
179
|
+
}
|
|
180
|
+
getWorkerEndpoint() {
|
|
181
|
+
return this.getEndpoint('worker', this.Store.WorkerEndpoint);
|
|
182
|
+
}
|
|
183
|
+
getSourcesAccountEndpoint() {
|
|
184
|
+
return this.getEndpoint('sources-account', this.Store.SourcesAccountEndpoint);
|
|
185
|
+
}
|
|
186
|
+
getLanguageEndpoint() {
|
|
187
|
+
return this.getEndpoint('language', this.Store.PlatformLanguageEndpoint);
|
|
188
|
+
}
|
|
189
|
+
getStorageEndpoint() {
|
|
190
|
+
return this.getEndpoint('storage', this.Store.StorageEndpoint);
|
|
191
|
+
}
|
|
192
|
+
getWorkerConfigEndpoint() {
|
|
193
|
+
return this.getEndpoint('worker-config', this.Store.WorkerConfigEndpoint);
|
|
194
|
+
}
|
|
195
|
+
getQueueEndpoint() {
|
|
196
|
+
return this.getEndpoint('queue', this.Store.QueueEndpoint);
|
|
197
|
+
}
|
|
198
|
+
getHealthAlertEndpoint() {
|
|
199
|
+
return this.getEndpoint('healt-alert', this.Store.HealthAlertEndpoint);
|
|
200
|
+
}
|
|
201
|
+
getCodeSourceBuildStrategyEndpoint() {
|
|
202
|
+
return this.getEndpoint('code-source-deploy-strategy', this.Store.CodeSourceBuildStrategyEndpoint);
|
|
203
|
+
}
|
|
204
|
+
// TODO: this should be in a separate API?
|
|
205
|
+
getFirewallEndpoint() {
|
|
206
|
+
return this.getEndpoint('firewall', this.Store.FirewallEndpoint);
|
|
207
|
+
}
|
|
208
|
+
getEndpoint(key, className) {
|
|
209
|
+
//const classNameString: string = className.name;
|
|
210
|
+
if (!this.endpoints.has(key)) {
|
|
211
|
+
// if (this.Store[classNameString] === undefined || this.Store[classNameString] === null) {
|
|
212
|
+
// throw new Error(`Class type of \'${classNameString}\' is not in the store`);
|
|
213
|
+
// }
|
|
214
|
+
try {
|
|
215
|
+
const endpoint = new className(this.httpClient);
|
|
216
|
+
this.endpoints.set(key, endpoint);
|
|
217
|
+
}
|
|
218
|
+
catch (e) {
|
|
219
|
+
throw new Error('Unable to initialize ' + key + ' endpoint (' + e.message + ')');
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return this.endpoints.get(key);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
exports.Client = Client;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataValueCollection } from '../Model/DataValueCollection';
|
|
2
|
-
export declare abstract class MetaDataAware {
|
|
3
|
-
metadata: DataValueCollection;
|
|
4
|
-
}
|
|
1
|
+
import { DataValueCollection } from '../Model/DataValueCollection';
|
|
2
|
+
export declare abstract class MetaDataAware {
|
|
3
|
+
metadata: DataValueCollection;
|
|
4
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MetaDataAware = void 0;
|
|
4
|
-
class MetaDataAware {
|
|
5
|
-
}
|
|
6
|
-
exports.MetaDataAware = MetaDataAware;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MetaDataAware = void 0;
|
|
4
|
+
class MetaDataAware {
|
|
5
|
+
}
|
|
6
|
+
exports.MetaDataAware = MetaDataAware;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type Headers = {
|
|
2
|
-
[key: string]: string | string[];
|
|
3
|
-
};
|
|
1
|
+
export type Headers = {
|
|
2
|
+
[key: string]: string | string[];
|
|
3
|
+
};
|
package/dist/Http/Data/Header.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|