@attlaz/client 1.77.1
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/README.md +30 -0
- package/dist/AttlazResource.d.ts +3 -0
- package/dist/AttlazResource.js +4 -0
- package/dist/Client.d.ts +114 -0
- package/dist/Client.js +278 -0
- package/dist/Core/MetaDataAware.d.ts +11 -0
- package/dist/Core/MetaDataAware.js +27 -0
- package/dist/Core/MetaDataWithIconAware.d.ts +13 -0
- package/dist/Core/MetaDataWithIconAware.js +26 -0
- package/dist/Helper/LoadAllHelper.d.ts +8 -0
- package/dist/Helper/LoadAllHelper.js +25 -0
- package/dist/Helper/ResponseParser.d.ts +2 -0
- package/dist/Helper/ResponseParser.js +2 -0
- package/dist/Http/ClientError.d.ts +22 -0
- package/dist/Http/ClientError.js +79 -0
- package/dist/Http/ContentTypeHelper.d.ts +6 -0
- package/dist/Http/ContentTypeHelper.js +13 -0
- package/dist/Http/Data/Headers.d.ts +3 -0
- package/dist/Http/Data/Headers.js +1 -0
- package/dist/Http/Data/Parameters.d.ts +3 -0
- package/dist/Http/Data/Parameters.js +1 -0
- package/dist/Http/Data/QueryString.d.ts +18 -0
- package/dist/Http/Data/QueryString.js +67 -0
- package/dist/Http/HttpClient.d.ts +5 -0
- package/dist/Http/HttpClient.js +54 -0
- package/dist/Http/HttpClientRequest.d.ts +17 -0
- package/dist/Http/HttpClientRequest.js +39 -0
- package/dist/Http/HttpClientResponse.d.ts +8 -0
- package/dist/Http/HttpClientResponse.js +10 -0
- package/dist/Http/HttpStatus.d.ts +13 -0
- package/dist/Http/HttpStatus.js +13 -0
- package/dist/Http/OAuthClientOptions.d.ts +11 -0
- package/dist/Http/OAuthClientOptions.js +15 -0
- package/dist/Http/OAuthClientToken.d.ts +11 -0
- package/dist/Http/OAuthClientToken.js +32 -0
- package/dist/Http/Transport/DirectTransport.d.ts +41 -0
- package/dist/Http/Transport/DirectTransport.js +83 -0
- package/dist/Http/Transport/ITransport.d.ts +13 -0
- package/dist/Http/Transport/ITransport.js +1 -0
- package/dist/Http/Transport/OAuthClient.d.ts +45 -0
- package/dist/Http/Transport/OAuthClient.js +315 -0
- package/dist/Model/AccessToken/UserAccessToken.d.ts +15 -0
- package/dist/Model/AccessToken/UserAccessToken.js +28 -0
- package/dist/Model/AccessToken/UserAccessTokenStatus.d.ts +11 -0
- package/dist/Model/AccessToken/UserAccessTokenStatus.js +12 -0
- package/dist/Model/Adapter/Adapter.d.ts +14 -0
- package/dist/Model/Adapter/Adapter.js +28 -0
- package/dist/Model/Adapter/AdapterCategory.d.ts +6 -0
- package/dist/Model/Adapter/AdapterCategory.js +12 -0
- package/dist/Model/Adapter/AdapterConfiguration.d.ts +12 -0
- package/dist/Model/Adapter/AdapterConfiguration.js +22 -0
- package/dist/Model/Adapter/AdapterConnection.d.ts +15 -0
- package/dist/Model/Adapter/AdapterConnection.js +24 -0
- package/dist/Model/Adapter/AdapterConnectionConfigurationValue.d.ts +7 -0
- package/dist/Model/Adapter/AdapterConnectionConfigurationValue.js +6 -0
- package/dist/Model/Adapter/AdapterConnectionEvent.d.ts +9 -0
- package/dist/Model/Adapter/AdapterConnectionEvent.js +18 -0
- package/dist/Model/Adapter/AdapterConnectionStatus.d.ts +9 -0
- package/dist/Model/Adapter/AdapterConnectionStatus.js +20 -0
- package/dist/Model/Adapter/TestConnectionResult.d.ts +33 -0
- package/dist/Model/Adapter/TestConnectionResult.js +19 -0
- package/dist/Model/ApiRecord.d.ts +1 -0
- package/dist/Model/ApiRecord.js +1 -0
- package/dist/Model/Collections/Collection.d.ts +13 -0
- package/dist/Model/Collections/Collection.js +15 -0
- package/dist/Model/Collections/CollectionRecord.d.ts +6 -0
- package/dist/Model/Collections/CollectionRecord.js +12 -0
- package/dist/Model/Command/CommandExecutionFilter.d.ts +6 -0
- package/dist/Model/Command/CommandExecutionFilter.js +1 -0
- package/dist/Model/Command/CommandExecutionHistory.d.ts +15 -0
- package/dist/Model/Command/CommandExecutionHistory.js +15 -0
- package/dist/Model/Command/CommandExecutionStatus.d.ts +9 -0
- package/dist/Model/Command/CommandExecutionStatus.js +20 -0
- package/dist/Model/Config.d.ts +17 -0
- package/dist/Model/Config.js +31 -0
- package/dist/Model/Configuration/Configuration.d.ts +10 -0
- package/dist/Model/Configuration/Configuration.js +17 -0
- package/dist/Model/DataValue.d.ts +6 -0
- package/dist/Model/DataValue.js +8 -0
- package/dist/Model/DataValueCollection.d.ts +17 -0
- package/dist/Model/DataValueCollection.js +61 -0
- package/dist/Model/Deployment/CodeSource.d.ts +24 -0
- package/dist/Model/Deployment/CodeSource.js +32 -0
- package/dist/Model/Deployment/CodeSourceAccount.d.ts +13 -0
- package/dist/Model/Deployment/CodeSourceAccount.js +25 -0
- package/dist/Model/Deployment/CodeSourceBuildStrategy.d.ts +10 -0
- package/dist/Model/Deployment/CodeSourceBuildStrategy.js +17 -0
- package/dist/Model/Deployment/CodeSourceRunStrategy.d.ts +10 -0
- package/dist/Model/Deployment/CodeSourceRunStrategy.js +17 -0
- package/dist/Model/Deployment/SourcesAccountRepository.d.ts +7 -0
- package/dist/Model/Deployment/SourcesAccountRepository.js +14 -0
- package/dist/Model/Deployment/SourcesAccountRepositoryBranch.d.ts +4 -0
- package/dist/Model/Deployment/SourcesAccountRepositoryBranch.js +8 -0
- package/dist/Model/EntityId.d.ts +9 -0
- package/dist/Model/EntityId.js +27 -0
- package/dist/Model/EntityType.d.ts +25 -0
- package/dist/Model/EntityType.js +33 -0
- package/dist/Model/Error/ApiError.d.ts +14 -0
- package/dist/Model/Error/ApiError.js +16 -0
- package/dist/Model/Event/EventType.d.ts +17 -0
- package/dist/Model/Event/EventType.js +18 -0
- package/dist/Model/Filter/FilterNode.d.ts +18 -0
- package/dist/Model/Filter/FilterNode.js +1 -0
- package/dist/Model/Filter/FilterOperator.d.ts +1 -0
- package/dist/Model/Filter/FilterOperator.js +1 -0
- package/dist/Model/Flow/Flow.d.ts +17 -0
- package/dist/Model/Flow/Flow.js +27 -0
- package/dist/Model/Flow/FlowRun.d.ts +18 -0
- package/dist/Model/Flow/FlowRun.js +32 -0
- package/dist/Model/Flow/FlowRunHistory.d.ts +8 -0
- package/dist/Model/Flow/FlowRunHistory.js +14 -0
- package/dist/Model/Flow/FlowRunHistoryStatus.d.ts +16 -0
- package/dist/Model/Flow/FlowRunHistoryStatus.js +24 -0
- package/dist/Model/Flow/FlowRunLifecycle.d.ts +16 -0
- package/dist/Model/Flow/FlowRunLifecycle.js +24 -0
- package/dist/Model/Flow/FlowRunPriority.d.ts +9 -0
- package/dist/Model/Flow/FlowRunPriority.js +17 -0
- package/dist/Model/Flow/FlowRunResponse.d.ts +5 -0
- package/dist/Model/Flow/FlowRunResponse.js +6 -0
- package/dist/Model/Flow/FlowRunStats.d.ts +13 -0
- package/dist/Model/Flow/FlowRunStats.js +27 -0
- package/dist/Model/Flow/FlowRunStatus.d.ts +12 -0
- package/dist/Model/Flow/FlowRunStatus.js +20 -0
- package/dist/Model/Flow/FlowRunSummary.d.ts +17 -0
- package/dist/Model/Flow/FlowRunSummary.js +33 -0
- package/dist/Model/Flow/FlowSummary.d.ts +11 -0
- package/dist/Model/Flow/FlowSummary.js +21 -0
- package/dist/Model/Flow/FlowTemplate.d.ts +10 -0
- package/dist/Model/Flow/FlowTemplate.js +10 -0
- package/dist/Model/HealthAlert/HealthAlert.d.ts +17 -0
- package/dist/Model/HealthAlert/HealthAlert.js +34 -0
- package/dist/Model/HealthAlert/HealthAlertSeverity.d.ts +8 -0
- package/dist/Model/HealthAlert/HealthAlertSeverity.js +16 -0
- package/dist/Model/HealthAlert/HealthAlertStatus.d.ts +8 -0
- package/dist/Model/HealthAlert/HealthAlertStatus.js +16 -0
- package/dist/Model/HealthAlert/HealthTestType.d.ts +14 -0
- package/dist/Model/HealthAlert/HealthTestType.js +22 -0
- package/dist/Model/Inbox/InboxMessage.d.ts +10 -0
- package/dist/Model/Inbox/InboxMessage.js +21 -0
- package/dist/Model/Infrastructure/RunnerPool.d.ts +39 -0
- package/dist/Model/Infrastructure/RunnerPool.js +77 -0
- package/dist/Model/InfrastructureStatus/QueueStatus.d.ts +11 -0
- 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 +13 -0
- package/dist/Model/InfrastructureStatus/StorageStatus.js +7 -0
- package/dist/Model/JsonSerializable.d.ts +6 -0
- package/dist/Model/JsonSerializable.js +12 -0
- package/dist/Model/Log/Log.d.ts +17 -0
- package/dist/Model/Log/Log.js +37 -0
- package/dist/Model/Log/LogLevel.d.ts +15 -0
- package/dist/Model/Log/LogLevel.js +54 -0
- package/dist/Model/Log/LogQuery.d.ts +26 -0
- package/dist/Model/Log/LogQuery.js +15 -0
- package/dist/Model/Log/LogStatus.d.ts +8 -0
- package/dist/Model/Log/LogStatus.js +16 -0
- package/dist/Model/Log/LogStream.d.ts +6 -0
- package/dist/Model/Log/LogStream.js +8 -0
- package/dist/Model/Log/LogStreamId.d.ts +5 -0
- package/dist/Model/Log/LogStreamId.js +7 -0
- package/dist/Model/Log/LogStreamInformation.d.ts +18 -0
- package/dist/Model/Log/LogStreamInformation.js +58 -0
- package/dist/Model/Messaging/Channel/Channel.d.ts +16 -0
- package/dist/Model/Messaging/Channel/Channel.js +31 -0
- package/dist/Model/Messaging/Channel/ChannelData.d.ts +6 -0
- package/dist/Model/Messaging/Channel/ChannelData.js +9 -0
- package/dist/Model/Messaging/Channel/ChannelType.d.ts +10 -0
- package/dist/Model/Messaging/Channel/ChannelType.js +18 -0
- package/dist/Model/Messaging/Channel/EmailChannelData.d.ts +5 -0
- package/dist/Model/Messaging/Channel/EmailChannelData.js +9 -0
- package/dist/Model/Messaging/Channel/PushChannelData.d.ts +5 -0
- package/dist/Model/Messaging/Channel/PushChannelData.js +9 -0
- package/dist/Model/Messaging/Channel/SlackChannelData.d.ts +10 -0
- package/dist/Model/Messaging/Channel/SlackChannelData.js +19 -0
- package/dist/Model/Messaging/Channel/SmsChannelData.d.ts +5 -0
- package/dist/Model/Messaging/Channel/SmsChannelData.js +9 -0
- package/dist/Model/Messaging/Channel/WebhookChannelData.d.ts +6 -0
- package/dist/Model/Messaging/Channel/WebhookChannelData.js +11 -0
- package/dist/Model/Messaging/ChannelHistory.d.ts +10 -0
- package/dist/Model/Messaging/ChannelHistory.js +31 -0
- package/dist/Model/Messaging/Subscriber.d.ts +19 -0
- package/dist/Model/Messaging/Subscriber.js +35 -0
- package/dist/Model/Pagination/CursorPagination.d.ts +5 -0
- package/dist/Model/Pagination/CursorPagination.js +5 -0
- package/dist/Model/Pagination/Filters.d.ts +20 -0
- package/dist/Model/Pagination/Filters.js +33 -0
- package/dist/Model/Project/CodeDeploy.d.ts +28 -0
- package/dist/Model/Project/CodeDeploy.js +57 -0
- package/dist/Model/Project/CodeDeployStatus.d.ts +12 -0
- package/dist/Model/Project/CodeDeployStatus.js +20 -0
- package/dist/Model/Project/PlatformLanguage.d.ts +11 -0
- package/dist/Model/Project/PlatformLanguage.js +19 -0
- package/dist/Model/Project/Project.d.ts +13 -0
- package/dist/Model/Project/Project.js +26 -0
- package/dist/Model/Project/ProjectDeployCommit.d.ts +7 -0
- package/dist/Model/Project/ProjectDeployCommit.js +7 -0
- package/dist/Model/Project/ProjectEnvironment.d.ts +16 -0
- package/dist/Model/Project/ProjectEnvironment.js +25 -0
- package/dist/Model/Project/ProjectEnvironmentType.d.ts +8 -0
- package/dist/Model/Project/ProjectEnvironmentType.js +16 -0
- package/dist/Model/ProviderToken/ProviderToken.d.ts +11 -0
- package/dist/Model/ProviderToken/ProviderToken.js +12 -0
- package/dist/Model/ProviderToken/ProviderTokenAccessToken.d.ts +6 -0
- package/dist/Model/ProviderToken/ProviderTokenAccessToken.js +11 -0
- package/dist/Model/Result/CollectionResult.d.ts +7 -0
- package/dist/Model/Result/CollectionResult.js +27 -0
- package/dist/Model/Result/ObjectResult.d.ts +5 -0
- package/dist/Model/Result/ObjectResult.js +21 -0
- package/dist/Model/Result/ObjectWrapper.d.ts +3 -0
- package/dist/Model/Result/ObjectWrapper.js +20 -0
- package/dist/Model/Result/ResultError.d.ts +4 -0
- package/dist/Model/Result/ResultError.js +6 -0
- package/dist/Model/Runner/RunnerImage.d.ts +13 -0
- package/dist/Model/Runner/RunnerImage.js +12 -0
- package/dist/Model/Search/SearchResult.d.ts +23 -0
- package/dist/Model/Search/SearchResult.js +94 -0
- package/dist/Model/State.d.ts +8 -0
- package/dist/Model/State.js +16 -0
- package/dist/Model/StateAware.d.ts +4 -0
- package/dist/Model/StateAware.js +1 -0
- package/dist/Model/Storage/StorageInformation.d.ts +10 -0
- package/dist/Model/Storage/StorageInformation.js +7 -0
- package/dist/Model/Storage/StorageItem.d.ts +9 -0
- package/dist/Model/Storage/StorageItem.js +21 -0
- package/dist/Model/Storage/StorageItemInformation.d.ts +8 -0
- package/dist/Model/Storage/StorageItemInformation.js +19 -0
- package/dist/Model/Storage/StorageType.d.ts +9 -0
- package/dist/Model/Storage/StorageType.js +17 -0
- package/dist/Model/Trigger/Trigger.d.ts +18 -0
- package/dist/Model/Trigger/Trigger.js +34 -0
- package/dist/Model/User/User.d.ts +18 -0
- package/dist/Model/User/User.js +33 -0
- package/dist/Model/User/UserAction.d.ts +14 -0
- package/dist/Model/User/UserAction.js +13 -0
- package/dist/Model/User/UserActionFilter.d.ts +10 -0
- package/dist/Model/User/UserActionFilter.js +1 -0
- package/dist/Model/User/UserAuthProvider.d.ts +12 -0
- package/dist/Model/User/UserAuthProvider.js +22 -0
- package/dist/Model/User/UserNotificationSession.d.ts +13 -0
- package/dist/Model/User/UserNotificationSession.js +11 -0
- package/dist/Model/User/UserSummary.d.ts +13 -0
- package/dist/Model/User/UserSummary.js +11 -0
- package/dist/Model/Worker/InfrastructureConfiguration.d.ts +16 -0
- package/dist/Model/Worker/InfrastructureConfiguration.js +20 -0
- package/dist/Model/Worker/Platform.d.ts +13 -0
- package/dist/Model/Worker/Platform.js +24 -0
- package/dist/Model/Worker/PlatformImage.d.ts +13 -0
- package/dist/Model/Worker/PlatformImage.js +24 -0
- package/dist/Model/Workspace/Workspace.d.ts +10 -0
- package/dist/Model/Workspace/Workspace.js +14 -0
- package/dist/Model/Workspace/WorkspaceMember.d.ts +14 -0
- package/dist/Model/Workspace/WorkspaceMember.js +32 -0
- package/dist/Model/Workspace/WorkspaceMemberInvite.d.ts +13 -0
- package/dist/Model/Workspace/WorkspaceMemberInvite.js +13 -0
- package/dist/Model/Workspace/WorkspaceMemberInvite2.d.ts +10 -0
- package/dist/Model/Workspace/WorkspaceMemberInvite2.js +19 -0
- package/dist/Model/Workspace/WorkspaceMemberInviteState.d.ts +11 -0
- package/dist/Model/Workspace/WorkspaceMemberInviteState.js +19 -0
- package/dist/Model/Workspace/WorkspaceMemberRole.d.ts +4 -0
- package/dist/Model/Workspace/WorkspaceMemberRole.js +4 -0
- package/dist/ResourceNamespace.d.ts +2 -0
- package/dist/ResourceNamespace.js +2 -0
- package/dist/Service/AccessTokenEndpoint.d.ts +11 -0
- package/dist/Service/AccessTokenEndpoint.js +82 -0
- package/dist/Service/AdapterConnectionEndpoint.d.ts +28 -0
- package/dist/Service/AdapterConnectionEndpoint.js +124 -0
- package/dist/Service/AdapterEndpoint.d.ts +12 -0
- package/dist/Service/AdapterEndpoint.js +64 -0
- package/dist/Service/ChannelEndpoint.d.ts +13 -0
- package/dist/Service/ChannelEndpoint.js +96 -0
- package/dist/Service/CodeDeployEndpoint.d.ts +9 -0
- package/dist/Service/CodeDeployEndpoint.js +56 -0
- package/dist/Service/CodeSourceStrategiesEndpoint.d.ts +8 -0
- package/dist/Service/CodeSourceStrategiesEndpoint.js +13 -0
- package/dist/Service/CollectionsEndpoint.d.ts +11 -0
- package/dist/Service/CollectionsEndpoint.js +54 -0
- package/dist/Service/CommandExecutionEndpoint.d.ts +14 -0
- package/dist/Service/CommandExecutionEndpoint.js +60 -0
- package/dist/Service/ConfigEndpoint.d.ts +8 -0
- package/dist/Service/ConfigEndpoint.js +46 -0
- package/dist/Service/ConfigurationEndpoint.d.ts +20 -0
- package/dist/Service/ConfigurationEndpoint.js +53 -0
- package/dist/Service/Endpoint.d.ts +16 -0
- package/dist/Service/Endpoint.js +185 -0
- package/dist/Service/FirewallEndpoint.d.ts +29 -0
- package/dist/Service/FirewallEndpoint.js +88 -0
- package/dist/Service/FlowEndpoint.d.ts +12 -0
- package/dist/Service/FlowEndpoint.js +84 -0
- package/dist/Service/FlowRunEndpoint.d.ts +21 -0
- package/dist/Service/FlowRunEndpoint.js +93 -0
- package/dist/Service/FlowRunRequestEndpoint.d.ts +6 -0
- package/dist/Service/FlowRunRequestEndpoint.js +32 -0
- package/dist/Service/FlowRunStatsEndpoint.d.ts +5 -0
- package/dist/Service/FlowRunStatsEndpoint.js +21 -0
- package/dist/Service/HealthAlertEndpoint.d.ts +13 -0
- package/dist/Service/HealthAlertEndpoint.js +36 -0
- package/dist/Service/InboxEndpoint.d.ts +8 -0
- package/dist/Service/InboxEndpoint.js +20 -0
- package/dist/Service/LogEndpoint.d.ts +18 -0
- package/dist/Service/LogEndpoint.js +127 -0
- package/dist/Service/PlatformEndpoint.d.ts +9 -0
- package/dist/Service/PlatformEndpoint.js +18 -0
- package/dist/Service/PlatformLanguageEndpoint.d.ts +6 -0
- package/dist/Service/PlatformLanguageEndpoint.js +7 -0
- package/dist/Service/ProjectEndpoint.d.ts +11 -0
- package/dist/Service/ProjectEndpoint.js +63 -0
- package/dist/Service/ProjectEnvironmentEndpoint.d.ts +8 -0
- package/dist/Service/ProjectEnvironmentEndpoint.js +48 -0
- package/dist/Service/ProviderTokenEndpoint.d.ts +16 -0
- package/dist/Service/ProviderTokenEndpoint.js +43 -0
- package/dist/Service/RunnerEndpoint.d.ts +6 -0
- package/dist/Service/RunnerEndpoint.js +28 -0
- package/dist/Service/RunnerPoolEndpoint.d.ts +9 -0
- package/dist/Service/RunnerPoolEndpoint.js +20 -0
- package/dist/Service/SearchEndpoint.d.ts +6 -0
- package/dist/Service/SearchEndpoint.js +14 -0
- package/dist/Service/SourcesAccountEndpoint.d.ts +16 -0
- package/dist/Service/SourcesAccountEndpoint.js +85 -0
- package/dist/Service/StorageEndpoint.d.ts +20 -0
- package/dist/Service/StorageEndpoint.js +130 -0
- package/dist/Service/SubscriberEndpoint.d.ts +9 -0
- package/dist/Service/SubscriberEndpoint.js +29 -0
- package/dist/Service/TriggerEndpoint.d.ts +10 -0
- package/dist/Service/TriggerEndpoint.js +67 -0
- package/dist/Service/UserActionEndpoint.d.ts +16 -0
- package/dist/Service/UserActionEndpoint.js +96 -0
- package/dist/Service/UserEndpoint.d.ts +29 -0
- package/dist/Service/UserEndpoint.js +178 -0
- package/dist/Service/WorkspaceEndpoint.d.ts +9 -0
- package/dist/Service/WorkspaceEndpoint.js +49 -0
- package/dist/Service/WorkspaceMemberEndpoint.d.ts +14 -0
- package/dist/Service/WorkspaceMemberEndpoint.js +77 -0
- package/dist/Utils.d.ts +11 -0
- package/dist/Utils.js +68 -0
- package/dist/index.d.ts +169 -0
- package/dist/index.js +154 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { State } from '../State.js';
|
|
2
|
+
import { StateAware } from '../StateAware.js';
|
|
3
|
+
export declare class PlatformImage implements StateAware {
|
|
4
|
+
id: string;
|
|
5
|
+
platformId: string;
|
|
6
|
+
image: string;
|
|
7
|
+
name: string;
|
|
8
|
+
version: string;
|
|
9
|
+
languageVersion: string;
|
|
10
|
+
buildDate: Date;
|
|
11
|
+
state: State;
|
|
12
|
+
static parse(raw: any): PlatformImage;
|
|
13
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { State } from '../State.js';
|
|
2
|
+
import { Utils } from '../../Utils.js';
|
|
3
|
+
export class PlatformImage {
|
|
4
|
+
id;
|
|
5
|
+
platformId;
|
|
6
|
+
image;
|
|
7
|
+
name;
|
|
8
|
+
version;
|
|
9
|
+
languageVersion;
|
|
10
|
+
buildDate;
|
|
11
|
+
state = State.Active;
|
|
12
|
+
static parse(raw) {
|
|
13
|
+
const platformImage = new PlatformImage();
|
|
14
|
+
platformImage.id = raw.id;
|
|
15
|
+
platformImage.platformId = raw.platform;
|
|
16
|
+
platformImage.name = raw.name;
|
|
17
|
+
platformImage.image = raw.image;
|
|
18
|
+
platformImage.version = raw.version;
|
|
19
|
+
platformImage.languageVersion = raw.language_version;
|
|
20
|
+
platformImage.buildDate = Utils.parseRawDate(raw.build_date);
|
|
21
|
+
platformImage.state = State.fromString(raw.state);
|
|
22
|
+
return platformImage;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { State } from '../State.js';
|
|
2
|
+
import { StateAware } from '../StateAware.js';
|
|
3
|
+
import { MetaDataAware } from '../../Core/MetaDataAware.js';
|
|
4
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
5
|
+
export declare class Workspace extends MetaDataAware implements StateAware {
|
|
6
|
+
id: string;
|
|
7
|
+
key: string;
|
|
8
|
+
state: State;
|
|
9
|
+
static parse(raw: ApiRecord): Workspace;
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { State } from '../State.js';
|
|
2
|
+
import { MetaDataAware } from '../../Core/MetaDataAware.js';
|
|
3
|
+
export class Workspace extends MetaDataAware {
|
|
4
|
+
id;
|
|
5
|
+
key;
|
|
6
|
+
state;
|
|
7
|
+
static parse(raw) {
|
|
8
|
+
const workspace = MetaDataAware.parseMetaData(new Workspace(), raw);
|
|
9
|
+
workspace.id = raw.id;
|
|
10
|
+
workspace.key = raw.key;
|
|
11
|
+
workspace.state = State.fromString(raw.state);
|
|
12
|
+
return workspace;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { State } from '../State.js';
|
|
2
|
+
import { WorkspaceMemberInviteState } from './WorkspaceMemberInviteState.js';
|
|
3
|
+
import { ApiRecord } from '../ApiRecord.js';
|
|
4
|
+
export declare class WorkspaceMember {
|
|
5
|
+
id: string;
|
|
6
|
+
workspaceId: string;
|
|
7
|
+
email: string;
|
|
8
|
+
invite: boolean;
|
|
9
|
+
lastLoginAt: Date | null;
|
|
10
|
+
name: string;
|
|
11
|
+
roleId: string;
|
|
12
|
+
state: State | WorkspaceMemberInviteState;
|
|
13
|
+
static parse(rawMember: ApiRecord): WorkspaceMember;
|
|
14
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { State } from '../State.js';
|
|
2
|
+
import { WorkspaceMemberInviteState } from './WorkspaceMemberInviteState.js';
|
|
3
|
+
import { Utils } from '../../Utils.js';
|
|
4
|
+
export class WorkspaceMember {
|
|
5
|
+
id;
|
|
6
|
+
workspaceId;
|
|
7
|
+
email;
|
|
8
|
+
invite;
|
|
9
|
+
lastLoginAt = null;
|
|
10
|
+
name;
|
|
11
|
+
roleId;
|
|
12
|
+
state;
|
|
13
|
+
static parse(rawMember) {
|
|
14
|
+
const member = new WorkspaceMember();
|
|
15
|
+
member.id = rawMember.id;
|
|
16
|
+
member.workspaceId = rawMember.workspace;
|
|
17
|
+
member.email = rawMember.email;
|
|
18
|
+
member.invite = Utils.isTrue(rawMember.invite);
|
|
19
|
+
if (rawMember.last_login !== null && rawMember.last_login !== undefined) {
|
|
20
|
+
member.lastLoginAt = Utils.parseRawDate(rawMember.last_login);
|
|
21
|
+
}
|
|
22
|
+
member.name = rawMember.name;
|
|
23
|
+
member.roleId = rawMember.role;
|
|
24
|
+
if (member.invite) {
|
|
25
|
+
member.state = WorkspaceMemberInviteState.fromString(rawMember.state);
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
member.state = State.fromString(rawMember.state);
|
|
29
|
+
}
|
|
30
|
+
return member;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WorkspaceMemberInviteState } from './WorkspaceMemberInviteState.js';
|
|
2
|
+
export declare class WorkspaceMemberInvite {
|
|
3
|
+
id: string;
|
|
4
|
+
code: string;
|
|
5
|
+
workspaceId: string;
|
|
6
|
+
email: string;
|
|
7
|
+
role: string;
|
|
8
|
+
date: Date;
|
|
9
|
+
expiration: Date;
|
|
10
|
+
inviterId: string;
|
|
11
|
+
inviterEmail: string;
|
|
12
|
+
state: WorkspaceMemberInviteState;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WorkspaceMemberInviteState } from './WorkspaceMemberInviteState.js';
|
|
2
|
+
export class WorkspaceMemberInvite {
|
|
3
|
+
id;
|
|
4
|
+
code;
|
|
5
|
+
workspaceId;
|
|
6
|
+
email;
|
|
7
|
+
role;
|
|
8
|
+
date;
|
|
9
|
+
expiration;
|
|
10
|
+
inviterId;
|
|
11
|
+
inviterEmail;
|
|
12
|
+
state = WorkspaceMemberInviteState.Accepted;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WorkspaceMemberInviteState } from './WorkspaceMemberInviteState.js';
|
|
2
|
+
export declare class WorkspaceMemberInvite2 {
|
|
3
|
+
code: string;
|
|
4
|
+
email: string | null;
|
|
5
|
+
inviterName: string | null;
|
|
6
|
+
inviterEmail: string | null;
|
|
7
|
+
workspaceName: string | null;
|
|
8
|
+
state: WorkspaceMemberInviteState;
|
|
9
|
+
static parse(rawInvite: any): WorkspaceMemberInvite2;
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { WorkspaceMemberInviteState } from './WorkspaceMemberInviteState.js';
|
|
2
|
+
export class WorkspaceMemberInvite2 {
|
|
3
|
+
code;
|
|
4
|
+
email;
|
|
5
|
+
inviterName;
|
|
6
|
+
inviterEmail;
|
|
7
|
+
workspaceName;
|
|
8
|
+
state;
|
|
9
|
+
static parse(rawInvite) {
|
|
10
|
+
return {
|
|
11
|
+
code: rawInvite.code,
|
|
12
|
+
email: rawInvite.email,
|
|
13
|
+
inviterName: rawInvite.inviter_name,
|
|
14
|
+
inviterEmail: rawInvite.inviter_email,
|
|
15
|
+
workspaceName: rawInvite.workspace_name,
|
|
16
|
+
state: WorkspaceMemberInviteState.fromString(rawInvite.state),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum WorkspaceMemberInviteState {
|
|
2
|
+
Pending = "pending",
|
|
3
|
+
Declined = "declined",
|
|
4
|
+
Accepted = "accepted",
|
|
5
|
+
Revoked = "revoked",
|
|
6
|
+
Expired = "expired",
|
|
7
|
+
Removed = "removed"
|
|
8
|
+
}
|
|
9
|
+
export declare namespace WorkspaceMemberInviteState {
|
|
10
|
+
const fromString: (input: string) => WorkspaceMemberInviteState;
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Utils } from '../../Utils.js';
|
|
2
|
+
export var WorkspaceMemberInviteState;
|
|
3
|
+
(function (WorkspaceMemberInviteState) {
|
|
4
|
+
WorkspaceMemberInviteState["Pending"] = "pending";
|
|
5
|
+
WorkspaceMemberInviteState["Declined"] = "declined";
|
|
6
|
+
WorkspaceMemberInviteState["Accepted"] = "accepted";
|
|
7
|
+
WorkspaceMemberInviteState["Revoked"] = "revoked";
|
|
8
|
+
WorkspaceMemberInviteState["Expired"] = "expired";
|
|
9
|
+
WorkspaceMemberInviteState["Removed"] = "removed";
|
|
10
|
+
})(WorkspaceMemberInviteState || (WorkspaceMemberInviteState = {}));
|
|
11
|
+
(function (WorkspaceMemberInviteState) {
|
|
12
|
+
WorkspaceMemberInviteState.fromString = (input) => {
|
|
13
|
+
const result = Utils.parseEnum(input, WorkspaceMemberInviteState);
|
|
14
|
+
if (result === null) {
|
|
15
|
+
throw new Error('Unable to parse WorkspaceMemberInviteState from string: Unknown WorkspaceMemberInviteState "' + input + '"');
|
|
16
|
+
}
|
|
17
|
+
return result;
|
|
18
|
+
};
|
|
19
|
+
})(WorkspaceMemberInviteState || (WorkspaceMemberInviteState = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
2
|
+
import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
|
|
3
|
+
import { UserAccessToken } from '../Model/AccessToken/UserAccessToken.js';
|
|
4
|
+
import { UserAccessTokenStatus } from '../Model/AccessToken/UserAccessTokenStatus.js';
|
|
5
|
+
import { Endpoint } from './Endpoint.js';
|
|
6
|
+
export declare class AccessTokenEndpoint extends Endpoint {
|
|
7
|
+
getByUser(pagination: CursorPagination, status?: UserAccessTokenStatus | null): Promise<CollectionResult<UserAccessToken>>;
|
|
8
|
+
create(name: string, scopes: string[], expiresAt: Date): Promise<UserAccessToken>;
|
|
9
|
+
update(tokenId: string, name: string, scopes: string[]): Promise<UserAccessToken>;
|
|
10
|
+
revoke(tokenId: string): Promise<boolean>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { QueryString } from '../Http/Data/QueryString.js';
|
|
2
|
+
import { UserAccessToken } from '../Model/AccessToken/UserAccessToken.js';
|
|
3
|
+
import { Endpoint } from './Endpoint.js';
|
|
4
|
+
export class AccessTokenEndpoint extends Endpoint {
|
|
5
|
+
async getByUser(pagination, status = null) {
|
|
6
|
+
const queryString = new QueryString('/access-tokens');
|
|
7
|
+
queryString.addPagination(pagination);
|
|
8
|
+
if (status !== null) {
|
|
9
|
+
queryString.set('status', status);
|
|
10
|
+
}
|
|
11
|
+
try {
|
|
12
|
+
const result = await this.requestCollection(queryString, UserAccessToken.parse);
|
|
13
|
+
return result;
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
17
|
+
console.error('Failed to load user access tokens: ', error);
|
|
18
|
+
}
|
|
19
|
+
throw error;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async create(name, scopes, expiresAt) {
|
|
23
|
+
try {
|
|
24
|
+
const url = '/access-tokens';
|
|
25
|
+
const data = {
|
|
26
|
+
name,
|
|
27
|
+
scopes,
|
|
28
|
+
expires_at: expiresAt,
|
|
29
|
+
};
|
|
30
|
+
const result = await this.requestObject(url, data, UserAccessToken.parse, 'POST');
|
|
31
|
+
const createdToken = result.getData();
|
|
32
|
+
if (createdToken === null) {
|
|
33
|
+
throw new Error('Unable to create token: wrong response from API');
|
|
34
|
+
}
|
|
35
|
+
return createdToken;
|
|
36
|
+
}
|
|
37
|
+
catch (ex) {
|
|
38
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
39
|
+
console.error('Failed to save token: ', ex);
|
|
40
|
+
}
|
|
41
|
+
throw ex;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
async update(tokenId, name, scopes) {
|
|
45
|
+
try {
|
|
46
|
+
const url = '/access-tokens/' + tokenId;
|
|
47
|
+
const result = await this.requestObject(url, {
|
|
48
|
+
name, scopes,
|
|
49
|
+
}, UserAccessToken.parse, 'POST');
|
|
50
|
+
const updatedToken = result.getData();
|
|
51
|
+
if (updatedToken === null) {
|
|
52
|
+
throw new Error('Unable to create token: wrong response from API');
|
|
53
|
+
}
|
|
54
|
+
return updatedToken;
|
|
55
|
+
}
|
|
56
|
+
catch (ex) {
|
|
57
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
58
|
+
console.error('Failed to save token: ', ex);
|
|
59
|
+
}
|
|
60
|
+
throw ex;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
async revoke(tokenId) {
|
|
64
|
+
try {
|
|
65
|
+
const url = '/access-tokens/' + tokenId;
|
|
66
|
+
const parser = (raw) => ({ revoked: raw.revoked });
|
|
67
|
+
const result = await this.requestObject(url, null, parser, 'DELETE');
|
|
68
|
+
const res = result.getData();
|
|
69
|
+
if (res === null) {
|
|
70
|
+
console.log('Token delete item wrong data', { result, parsed: res });
|
|
71
|
+
throw new Error('Unable to revoke token: wrong response from API');
|
|
72
|
+
}
|
|
73
|
+
return res.revoked;
|
|
74
|
+
}
|
|
75
|
+
catch (ex) {
|
|
76
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
77
|
+
console.error('Failed to revoke token: ', ex);
|
|
78
|
+
}
|
|
79
|
+
throw ex;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AdapterConnection } from '../Model/Adapter/AdapterConnection.js';
|
|
2
|
+
import { TestConnectionResult } from '../Model/Adapter/TestConnectionResult.js';
|
|
3
|
+
import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
4
|
+
import { AdapterConnectionConfigurationValue } from '../Model/Adapter/AdapterConnectionConfigurationValue.js';
|
|
5
|
+
import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
|
|
6
|
+
import { AdapterConnectionEvent } from '../Model/Adapter/AdapterConnectionEvent.js';
|
|
7
|
+
import { Endpoint } from './Endpoint.js';
|
|
8
|
+
export declare class AdapterConnectionEndpoint extends Endpoint {
|
|
9
|
+
getConnections(projectId: string, pagination: CursorPagination): Promise<CollectionResult<AdapterConnection>>;
|
|
10
|
+
getConnectionById(connectionId: string): Promise<AdapterConnection | null>;
|
|
11
|
+
getConnectionByKey(projectId: string, connectionKey: string): Promise<AdapterConnection | null>;
|
|
12
|
+
getConnectionConfiguration(connectionId: string): Promise<CollectionResult<AdapterConnectionConfigurationValue>>;
|
|
13
|
+
saveConnection(projectId: string, connection: AdapterConnection): Promise<AdapterConnection>;
|
|
14
|
+
saveConnectionConfiguration(connectionId: string, configuration: AdapterConnectionConfigurationValue[]): Promise<boolean>;
|
|
15
|
+
getConnectionEvents(connectionId: string, pagination: CursorPagination): Promise<CollectionResult<AdapterConnectionEvent>>;
|
|
16
|
+
/**
|
|
17
|
+
* Test an adapter connection end-to-end via Services-Api.
|
|
18
|
+
*
|
|
19
|
+
* Runs schema validation first (config completeness) and then invokes the
|
|
20
|
+
* adapter's `testConnection()` probe. The returned result has a per-check
|
|
21
|
+
* breakdown so the UI can render a step-by-step view; the overall `state`
|
|
22
|
+
* is the worst of the per-check states (skipped < passed < warning < failed).
|
|
23
|
+
*
|
|
24
|
+
* Used by the Web App's "Test" button. Replaces the legacy
|
|
25
|
+
* `POST /connections/:id/check` route on Core-Api (removed).
|
|
26
|
+
*/
|
|
27
|
+
testConnection(connectionId: string): Promise<TestConnectionResult>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { AdapterConnection } from '../Model/Adapter/AdapterConnection.js';
|
|
2
|
+
import { parseTestConnectionResult } from '../Model/Adapter/TestConnectionResult.js';
|
|
3
|
+
import { QueryString } from '../Http/Data/QueryString.js';
|
|
4
|
+
import { AdapterConnectionEvent } from '../Model/Adapter/AdapterConnectionEvent.js';
|
|
5
|
+
import { Endpoint } from './Endpoint.js';
|
|
6
|
+
export class AdapterConnectionEndpoint extends Endpoint {
|
|
7
|
+
async getConnections(projectId, pagination) {
|
|
8
|
+
try {
|
|
9
|
+
const queryString = new QueryString('/projects/' + projectId + '/connections');
|
|
10
|
+
queryString.addPagination(pagination);
|
|
11
|
+
return await this.requestCollection(queryString, AdapterConnection.parse);
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
15
|
+
console.error('Failed to load adapters: ', error);
|
|
16
|
+
}
|
|
17
|
+
throw error;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
async getConnectionById(connectionId) {
|
|
21
|
+
try {
|
|
22
|
+
const url = '/connections/' + connectionId;
|
|
23
|
+
const result = await this.requestObject(url, null, AdapterConnection.parse);
|
|
24
|
+
return result.getData();
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
28
|
+
console.error('Failed to load connection: ', error);
|
|
29
|
+
}
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
async getConnectionByKey(projectId, connectionKey) {
|
|
34
|
+
try {
|
|
35
|
+
const url = '/projects/' + projectId + '/connections/' + connectionKey;
|
|
36
|
+
const result = await this.requestObject(url, null, AdapterConnection.parse);
|
|
37
|
+
return result.getData();
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
41
|
+
console.error('Failed to load connection: ', error);
|
|
42
|
+
}
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
async getConnectionConfiguration(connectionId) {
|
|
47
|
+
try {
|
|
48
|
+
const url = '/connections/' + connectionId + '/configuration';
|
|
49
|
+
const parser = (raw) => ({
|
|
50
|
+
id: raw.id,
|
|
51
|
+
adapterConnectionId: raw.adapter_connection,
|
|
52
|
+
configurationId: raw.configuration,
|
|
53
|
+
value: raw.value,
|
|
54
|
+
});
|
|
55
|
+
return await this.requestCollection(url, parser);
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
59
|
+
console.error('Failed to load connection: ', error);
|
|
60
|
+
}
|
|
61
|
+
throw error;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async saveConnection(projectId, connection) {
|
|
65
|
+
try {
|
|
66
|
+
const url = '/projects/' + projectId + '/connections';
|
|
67
|
+
const result = await this.requestObject(url, connection, AdapterConnection.parse, 'POST');
|
|
68
|
+
const updatedAdapterConnection = result.getData();
|
|
69
|
+
if (updatedAdapterConnection === null) {
|
|
70
|
+
throw new Error('AdapterConnection not updated');
|
|
71
|
+
}
|
|
72
|
+
return updatedAdapterConnection;
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
76
|
+
console.error('Failed to save connection: ', error);
|
|
77
|
+
}
|
|
78
|
+
throw error;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
async saveConnectionConfiguration(connectionId, configuration) {
|
|
82
|
+
try {
|
|
83
|
+
const url = '/connections/' + connectionId + '/configuration';
|
|
84
|
+
const parser = (raw) => ({ saved: raw.saved });
|
|
85
|
+
const result = await this.requestObject(url, { configuration: configuration }, parser, 'POST');
|
|
86
|
+
const res = result.getData();
|
|
87
|
+
if (res === null) {
|
|
88
|
+
throw new Error('Unable to save connection configuration: wrong response from API');
|
|
89
|
+
}
|
|
90
|
+
return res.saved;
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
94
|
+
console.error('Failed to save connection: ', error);
|
|
95
|
+
}
|
|
96
|
+
throw error;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
async getConnectionEvents(connectionId, pagination) {
|
|
100
|
+
const queryString = new QueryString('/adapters/connections/' + connectionId + '/events');
|
|
101
|
+
queryString.addPagination(pagination);
|
|
102
|
+
return await this.requestCollection(queryString, AdapterConnectionEvent.parse);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Test an adapter connection end-to-end via Services-Api.
|
|
106
|
+
*
|
|
107
|
+
* Runs schema validation first (config completeness) and then invokes the
|
|
108
|
+
* adapter's `testConnection()` probe. The returned result has a per-check
|
|
109
|
+
* breakdown so the UI can render a step-by-step view; the overall `state`
|
|
110
|
+
* is the worst of the per-check states (skipped < passed < warning < failed).
|
|
111
|
+
*
|
|
112
|
+
* Used by the Web App's "Test" button. Replaces the legacy
|
|
113
|
+
* `POST /connections/:id/check` route on Core-Api (removed).
|
|
114
|
+
*/
|
|
115
|
+
async testConnection(connectionId) {
|
|
116
|
+
const url = '/services/' + connectionId + '/test-connection';
|
|
117
|
+
const result = await this.requestObject(url, null, parseTestConnectionResult, 'POST');
|
|
118
|
+
const data = result.getData();
|
|
119
|
+
if (data === null) {
|
|
120
|
+
return { state: 'skipped', checks: [], error: 'Empty response from test endpoint' };
|
|
121
|
+
}
|
|
122
|
+
return data;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Adapter } from '../Model/Adapter/Adapter.js';
|
|
2
|
+
import { AdapterConfiguration } from '../Model/Adapter/AdapterConfiguration.js';
|
|
3
|
+
import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
4
|
+
import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
|
|
5
|
+
import { AdapterCategory } from '../Model/Adapter/AdapterCategory.js';
|
|
6
|
+
import { Endpoint } from './Endpoint.js';
|
|
7
|
+
export declare class AdapterEndpoint extends Endpoint {
|
|
8
|
+
getAdapters(pagination?: CursorPagination | null, withMedia?: boolean): Promise<CollectionResult<Adapter>>;
|
|
9
|
+
getAdapter(adapterId: string, withMedia?: boolean): Promise<Adapter | null>;
|
|
10
|
+
getAdapterConfiguration(adapterId: string): Promise<CollectionResult<AdapterConfiguration>>;
|
|
11
|
+
getAdapterCategories(pagination: CursorPagination): Promise<CollectionResult<AdapterCategory>>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Adapter } from '../Model/Adapter/Adapter.js';
|
|
2
|
+
import { AdapterConfiguration } from '../Model/Adapter/AdapterConfiguration.js';
|
|
3
|
+
import { QueryString } from '../Http/Data/QueryString.js';
|
|
4
|
+
import { AdapterCategory } from '../Model/Adapter/AdapterCategory.js';
|
|
5
|
+
import { Endpoint } from './Endpoint.js';
|
|
6
|
+
export class AdapterEndpoint extends Endpoint {
|
|
7
|
+
async getAdapters(pagination = null, withMedia = false) {
|
|
8
|
+
try {
|
|
9
|
+
const queryString = new QueryString('/adapters');
|
|
10
|
+
queryString.addPagination(pagination);
|
|
11
|
+
if (withMedia) {
|
|
12
|
+
queryString.set('with-media', true);
|
|
13
|
+
}
|
|
14
|
+
return await this.requestCollection(queryString, Adapter.parse);
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
18
|
+
console.error('Failed to load adapters: ', error);
|
|
19
|
+
}
|
|
20
|
+
throw error;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async getAdapter(adapterId, withMedia = false) {
|
|
24
|
+
try {
|
|
25
|
+
const queryString = new QueryString('/adapters/' + adapterId);
|
|
26
|
+
if (withMedia) {
|
|
27
|
+
queryString.set('with-media', true);
|
|
28
|
+
}
|
|
29
|
+
const result = await this.requestObject(queryString, null, Adapter.parse);
|
|
30
|
+
return result.getData();
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
34
|
+
console.error('Failed to load adapter by id: ', error);
|
|
35
|
+
}
|
|
36
|
+
throw error;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async getAdapterConfiguration(adapterId) {
|
|
40
|
+
try {
|
|
41
|
+
const url = '/adapters/' + adapterId + '/configuration';
|
|
42
|
+
return await this.requestCollection(url, AdapterConfiguration.parse);
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
46
|
+
console.error('Failed to load adapter configuration: ', error);
|
|
47
|
+
}
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
async getAdapterCategories(pagination) {
|
|
52
|
+
try {
|
|
53
|
+
const queryString = new QueryString('/adapter-categories');
|
|
54
|
+
queryString.addPagination(pagination);
|
|
55
|
+
return await this.requestCollection(queryString, AdapterCategory.parse);
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
if (this.httpClient.isDebugEnabled()) {
|
|
59
|
+
console.error('Failed to load adapter categories: ', error);
|
|
60
|
+
}
|
|
61
|
+
throw error;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Channel } from '../Model/Messaging/Channel/Channel.js';
|
|
2
|
+
import { ChannelHistory } from '../Model/Messaging/ChannelHistory.js';
|
|
3
|
+
import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
4
|
+
import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
|
|
5
|
+
import { Endpoint } from './Endpoint.js';
|
|
6
|
+
export declare class ChannelEndpoint extends Endpoint {
|
|
7
|
+
getById(channelId: string): Promise<Channel | null>;
|
|
8
|
+
getByWorkspace(workspaceId: string, pagination?: CursorPagination | null): Promise<CollectionResult<Channel>>;
|
|
9
|
+
getByOwner(pagination?: CursorPagination | null): Promise<CollectionResult<Channel>>;
|
|
10
|
+
getMessages(channelId: string, pagination?: CursorPagination | null): Promise<CollectionResult<ChannelHistory>>;
|
|
11
|
+
save(subscriberChannel: Channel): Promise<Channel>;
|
|
12
|
+
testChannel(subscriberChannel: Channel): Promise<boolean>;
|
|
13
|
+
}
|