@breign/client 1.0.4 → 1.0.6
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 +51 -0
- package/dist/apis/AgentApi.d.ts +330 -0
- package/dist/apis/AgentApi.js +790 -0
- package/dist/apis/AppApi.d.ts +348 -0
- package/dist/apis/AppApi.js +837 -0
- package/dist/apis/AuthApi.d.ts +45 -0
- package/dist/apis/AuthApi.js +122 -0
- package/dist/apis/ChunksApi.d.ts +95 -0
- package/dist/apis/ChunksApi.js +235 -0
- package/dist/apis/ConfigurationApi.d.ts +74 -0
- package/dist/apis/ConfigurationApi.js +197 -0
- package/dist/apis/ContentsApi.d.ts +44 -0
- package/dist/apis/ContentsApi.js +115 -0
- package/dist/apis/ConversationsApi.d.ts +87 -0
- package/dist/apis/ConversationsApi.js +214 -0
- package/dist/apis/EngineApi.d.ts +112 -0
- package/dist/apis/EngineApi.js +280 -0
- package/dist/apis/FilesApi.d.ts +67 -0
- package/dist/apis/FilesApi.js +171 -0
- package/dist/apis/GeneralApi.d.ts +28 -0
- package/dist/apis/GeneralApi.js +83 -0
- package/dist/apis/GuardiansApi.d.ts +122 -0
- package/dist/apis/GuardiansApi.js +304 -0
- package/dist/apis/KnowledgeApi.d.ts +171 -0
- package/dist/apis/KnowledgeApi.js +436 -0
- package/dist/apis/ManifestsApi.d.ts +81 -0
- package/dist/apis/ManifestsApi.js +205 -0
- package/dist/apis/MetricsApi.d.ts +46 -0
- package/dist/apis/MetricsApi.js +121 -0
- package/dist/apis/OrganizationsApi.d.ts +31 -0
- package/dist/apis/OrganizationsApi.js +86 -0
- package/dist/apis/PromptsApi.d.ts +101 -0
- package/dist/apis/PromptsApi.js +254 -0
- package/dist/apis/RemotesApi.d.ts +31 -0
- package/dist/apis/RemotesApi.js +88 -0
- package/dist/apis/ToolsApi.d.ts +47 -0
- package/dist/apis/ToolsApi.js +128 -0
- package/dist/apis/index.d.ts +18 -1
- package/dist/apis/index.js +18 -1
- package/dist/models/AgentDuplicateRequestUio.d.ts +56 -0
- package/dist/models/AgentDuplicateRequestUio.js +58 -0
- package/dist/models/{BrainFlowCreateUio.d.ts → AgentFlowCreateUio.d.ts} +12 -12
- package/dist/models/{BrainFlowCreateUio.js → AgentFlowCreateUio.js} +13 -13
- package/dist/models/{BrainFlowUio.d.ts → AgentFlowUio.d.ts} +15 -15
- package/dist/models/{BrainFlowUio.js → AgentFlowUio.js} +16 -16
- package/dist/models/AgentKnowledgeBaseUio.d.ts +57 -0
- package/dist/models/AgentKnowledgeBaseUio.js +67 -0
- package/dist/models/AgentMetricsEventUio.d.ts +65 -0
- package/dist/models/{BrainMetricsEventUio.js → AgentMetricsEventUio.js} +20 -20
- package/dist/models/{BrainMetricsOverviewUio.d.ts → AgentMetricsOverviewUio.d.ts} +14 -14
- package/dist/models/{BrainMetricsOverviewUio.js → AgentMetricsOverviewUio.js} +13 -13
- package/dist/models/AgentMetricsUnitsTypeUio.d.ts +27 -0
- package/dist/models/AgentMetricsUnitsTypeUio.js +53 -0
- package/dist/models/AgentMetricsValueUio.d.ts +57 -0
- package/dist/models/{BrainMetricsValueUio.js → AgentMetricsValueUio.js} +16 -16
- package/dist/models/AgentModuleTypeUio.d.ts +25 -0
- package/dist/models/AgentModuleTypeUio.js +51 -0
- package/dist/models/AgentModuleUio.d.ts +51 -0
- package/dist/models/{BrainModuleUio.js → AgentModuleUio.js} +16 -16
- package/dist/models/AgentPatchEngineUio.d.ts +38 -0
- package/dist/models/AgentPatchEngineUio.js +54 -0
- package/dist/models/AgentPatchUio.d.ts +173 -0
- package/dist/models/{BrainPatchUio.js → AgentPatchUio.js} +32 -43
- package/dist/models/AgentRequestProfilePictureUio.d.ts +50 -0
- package/dist/models/{BrainRequestImageBrainUio.js → AgentRequestProfilePictureUio.js} +13 -13
- package/dist/models/{BrainRequestUio.d.ts → AgentRequestUio.d.ts} +26 -26
- package/dist/models/{BrainRequestUio.js → AgentRequestUio.js} +17 -19
- package/dist/models/AgentSubscriptionTextInteractionsUio.d.ts +39 -0
- package/dist/models/{BrainSubscriptionTextInteractionsUio.js → AgentSubscriptionTextInteractionsUio.js} +13 -13
- package/dist/models/AgentSubscriptionUio.d.ts +57 -0
- package/dist/models/AgentSubscriptionUio.js +63 -0
- package/dist/models/AgentToolUio.d.ts +78 -0
- package/dist/models/AgentToolUio.js +72 -0
- package/dist/models/AgentTypeUio.d.ts +27 -0
- package/dist/models/AgentTypeUio.js +53 -0
- package/dist/models/{BrainUio.d.ts → AgentUio.d.ts} +60 -39
- package/dist/models/{BrainUio.js → AgentUio.js} +30 -23
- package/dist/models/AgentUsageMetricsIdUio.d.ts +44 -0
- package/dist/models/{BrainUsageMetricsIdUio.js → AgentUsageMetricsIdUio.js} +13 -13
- package/dist/models/AgentUsageMetricsUio.d.ts +46 -0
- package/dist/models/{BrainUsageMetricsUio.js → AgentUsageMetricsUio.js} +16 -16
- package/dist/models/ApiKeyUio.d.ts +44 -0
- package/dist/models/ApiKeyUio.js +58 -0
- package/dist/models/AppChatCreateRequestUio.d.ts +44 -0
- package/dist/models/AppChatCreateRequestUio.js +56 -0
- package/dist/models/AppChatCreateResponseUio.d.ts +38 -0
- package/dist/models/AppChatCreateResponseUio.js +52 -0
- package/dist/models/AppChatSayRequestUio.d.ts +38 -0
- package/dist/models/AppChatSayRequestUio.js +52 -0
- package/dist/models/AppChatSayResponseUio.d.ts +32 -0
- package/dist/models/AppChatSayResponseUio.js +50 -0
- package/dist/models/AppChatSubmitMessageRequestUio.d.ts +32 -0
- package/dist/models/AppChatSubmitMessageRequestUio.js +50 -0
- package/dist/models/AppConfigurationUio.d.ts +33 -0
- package/dist/models/AppConfigurationUio.js +52 -0
- package/dist/models/AppConfigurationUpdateRequestUio.d.ts +33 -0
- package/dist/models/AppConfigurationUpdateRequestUio.js +50 -0
- package/dist/models/AppCreateRequestUio.d.ts +87 -0
- package/dist/models/AppCreateRequestUio.js +73 -0
- package/dist/models/AppFlowCreateRequestUio.d.ts +44 -0
- package/dist/models/AppFlowCreateRequestUio.js +54 -0
- package/dist/models/AppInstanceCreateRequestUio.d.ts +32 -0
- package/dist/models/AppInstanceCreateRequestUio.js +50 -0
- package/dist/models/AppLightUio.d.ts +80 -0
- package/dist/models/AppLightUio.js +80 -0
- package/dist/models/AppProbeRequestUio.d.ts +33 -0
- package/dist/models/AppProbeRequestUio.js +52 -0
- package/dist/models/AppProbeResponseUio.d.ts +39 -0
- package/dist/models/AppProbeResponseUio.js +56 -0
- package/dist/models/AppStatusRequestUio.d.ts +33 -0
- package/dist/models/AppStatusRequestUio.js +51 -0
- package/dist/models/AppStatusResponseUio.d.ts +45 -0
- package/dist/models/AppStatusResponseUio.js +57 -0
- package/dist/models/AppStatusUio.d.ts +25 -0
- package/dist/models/AppStatusUio.js +51 -0
- package/dist/models/AppSubmitMessageRequestUio.d.ts +34 -0
- package/dist/models/AppSubmitMessageRequestUio.js +50 -0
- package/dist/models/AppTextToSpeechRequestUio.d.ts +38 -0
- package/dist/models/AppTextToSpeechRequestUio.js +54 -0
- package/dist/models/AppTextToSpeechResponseUio.d.ts +33 -0
- package/dist/models/AppTextToSpeechResponseUio.js +51 -0
- package/dist/models/AppUio.d.ts +139 -0
- package/dist/models/AppUio.js +109 -0
- package/dist/models/AppUpdateRequestUio.d.ts +81 -0
- package/dist/models/AppUpdateRequestUio.js +65 -0
- package/dist/models/AttachmentCreateRequestUio.d.ts +57 -0
- package/dist/models/AttachmentCreateRequestUio.js +67 -0
- package/dist/models/AttachmentTypeUio.d.ts +24 -0
- package/dist/models/AttachmentTypeUio.js +50 -0
- package/dist/models/AudioFile1Uio.d.ts +45 -0
- package/dist/models/AudioFile1Uio.js +59 -0
- package/dist/models/AudioFileOrBufferUio.d.ts +22 -0
- package/dist/models/AudioFileOrBufferUio.js +50 -0
- package/dist/models/AudioFileTypeUio.d.ts +24 -0
- package/dist/models/AudioFileTypeUio.js +50 -0
- package/dist/models/AudioFileUio.d.ts +45 -0
- package/dist/models/AudioFileUio.js +59 -0
- package/dist/models/AuthCodeConfirmRequestUio.d.ts +45 -0
- package/dist/models/AuthCodeConfirmRequestUio.js +59 -0
- package/dist/models/AuthCodeConfirmResponseUio.d.ts +39 -0
- package/dist/models/AuthCodeConfirmResponseUio.js +55 -0
- package/dist/models/AuthCodeRequestUio.d.ts +40 -0
- package/dist/models/AuthCodeRequestUio.js +56 -0
- package/dist/models/AuthCodeResponseUio.d.ts +38 -0
- package/dist/models/AuthCodeResponseUio.js +54 -0
- package/dist/models/AuthTypeUio.d.ts +24 -0
- package/dist/models/AuthTypeUio.js +50 -0
- package/dist/models/BodyWithIdUio.d.ts +32 -0
- package/dist/models/BodyWithIdUio.js +50 -0
- package/dist/models/BodyWithMessageUio.d.ts +32 -0
- package/dist/models/BodyWithMessageUio.js +50 -0
- package/dist/models/ChatContextUio.d.ts +39 -0
- package/dist/models/ChatContextUio.js +53 -0
- package/dist/models/ChatMessageAudioInnerUio.d.ts +38 -0
- package/dist/models/ChatMessageAudioInnerUio.js +54 -0
- package/dist/models/ChatMessageRoleUio.d.ts +26 -0
- package/dist/models/ChatMessageRoleUio.js +52 -0
- package/dist/models/ChatMessageUio.d.ts +128 -0
- package/dist/models/ChatMessageUio.js +92 -0
- package/dist/models/ChatMessageWithFlowNodeUio.d.ts +129 -0
- package/dist/models/ChatMessageWithFlowNodeUio.js +95 -0
- package/dist/models/ChatUio.d.ts +100 -0
- package/dist/models/ChatUio.js +86 -0
- package/dist/models/ChunkContentCreateUio.d.ts +77 -0
- package/dist/models/ChunkContentCreateUio.js +77 -0
- package/dist/models/ChunkContentUio.d.ts +69 -0
- package/dist/models/ChunkContentUio.js +71 -0
- package/dist/models/ChunkCreateRequestContentInnerUio.d.ts +50 -0
- package/dist/models/ChunkCreateRequestContentInnerUio.js +62 -0
- package/dist/models/ChunkCreateRequestUio.d.ts +45 -0
- package/dist/models/ChunkCreateRequestUio.js +53 -0
- package/dist/models/ChunkCreateResponseUio.d.ts +57 -0
- package/dist/models/ChunkCreateResponseUio.js +67 -0
- package/dist/models/ChunkUio.d.ts +57 -0
- package/dist/models/ChunkUio.js +67 -0
- package/dist/models/ConfigurationDefaultFillerPhrasesUio.d.ts +44 -0
- package/dist/models/ConfigurationDefaultFillerPhrasesUio.js +58 -0
- package/dist/models/ContextUio.d.ts +33 -0
- package/dist/models/ContextUio.js +51 -0
- package/dist/models/ConversationUio.d.ts +39 -0
- package/dist/models/ConversationUio.js +55 -0
- package/dist/models/DefaultClientPricesUio.d.ts +39 -0
- package/dist/models/DefaultClientPricesUio.js +55 -0
- package/dist/models/DefaultEngineRequestUio.d.ts +44 -0
- package/dist/models/DefaultEngineRequestUio.js +58 -0
- package/dist/models/DocumentAddRequestUio.d.ts +38 -0
- package/dist/models/DocumentAddRequestUio.js +52 -0
- package/dist/models/EngineUio.d.ts +4 -7
- package/dist/models/EngineUio.js +6 -7
- package/dist/models/FileAttachmentProcessedOneOf1Uio.d.ts +45 -0
- package/dist/models/FileAttachmentProcessedOneOf1Uio.js +61 -0
- package/dist/models/FileAttachmentProcessedOneOfUio.d.ts +45 -0
- package/dist/models/FileAttachmentProcessedOneOfUio.js +57 -0
- package/dist/models/FileAttachmentProcessedUio.d.ts +23 -0
- package/dist/models/FileAttachmentProcessedUio.js +57 -0
- package/dist/models/FileAttachmentStatusUio.d.ts +27 -0
- package/dist/models/FileAttachmentStatusUio.js +53 -0
- package/dist/models/FileAttachmentUio.d.ts +89 -0
- package/dist/models/FileAttachmentUio.js +85 -0
- package/dist/models/FileCreationRequestUio.d.ts +6 -0
- package/dist/models/FileCreationRequestUio.js +2 -0
- package/dist/models/FileCreationResponseUio.d.ts +83 -0
- package/dist/models/FileCreationResponseUio.js +83 -0
- package/dist/models/FileStatusUio.d.ts +1 -0
- package/dist/models/FileStatusUio.js +2 -1
- package/dist/models/FileStatusUpdateRequestUio.d.ts +33 -0
- package/dist/models/FileStatusUpdateRequestUio.js +51 -0
- package/dist/models/FileUio.d.ts +2 -8
- package/dist/models/FileUio.js +2 -6
- package/dist/models/FileWithDownloadUrlUio.d.ts +75 -0
- package/dist/models/FileWithDownloadUrlUio.js +79 -0
- package/dist/models/FlowUio.d.ts +45 -0
- package/dist/models/FlowUio.js +53 -0
- package/dist/models/GuardianCreateRequestUio.d.ts +73 -0
- package/dist/models/GuardianCreateRequestUio.js +69 -0
- package/dist/models/GuardianEngineUio.d.ts +34 -0
- package/dist/models/GuardianEngineUio.js +50 -0
- package/dist/models/GuardianPositionUio.d.ts +25 -0
- package/dist/models/GuardianPositionUio.js +51 -0
- package/dist/models/GuardianPutRequestUio.d.ts +73 -0
- package/dist/models/GuardianPutRequestUio.js +63 -0
- package/dist/models/GuardianRoleUio.d.ts +28 -0
- package/dist/models/GuardianRoleUio.js +54 -0
- package/dist/models/GuardianTypeUio.d.ts +26 -0
- package/dist/models/GuardianTypeUio.js +52 -0
- package/dist/models/GuardianUio.d.ts +122 -0
- package/dist/models/GuardianUio.js +90 -0
- package/dist/models/HealthCheckResponseComponentsApiUio.d.ts +33 -0
- package/dist/models/HealthCheckResponseComponentsApiUio.js +49 -0
- package/dist/models/HealthCheckResponseComponentsUio.d.ts +39 -0
- package/dist/models/HealthCheckResponseComponentsUio.js +51 -0
- package/dist/models/HealthCheckResponseUio.d.ts +51 -0
- package/dist/models/HealthCheckResponseUio.js +55 -0
- package/dist/models/HealthStatusUio.d.ts +26 -0
- package/dist/models/HealthStatusUio.js +52 -0
- package/dist/models/ImportFileToAgentKnowledge200ResponseUio.d.ts +56 -0
- package/dist/models/ImportFileToAgentKnowledge200ResponseUio.js +56 -0
- package/dist/models/InputUio.d.ts +38 -0
- package/dist/models/InputUio.js +54 -0
- package/dist/models/InstanceUio.d.ts +57 -0
- package/dist/models/InstanceUio.js +67 -0
- package/dist/models/KnowledgeBasePrivacyUio.d.ts +25 -0
- package/dist/models/KnowledgeBasePrivacyUio.js +51 -0
- package/dist/models/LipsyncUio.d.ts +45 -0
- package/dist/models/LipsyncUio.js +56 -0
- package/dist/models/ManifestCreateRequestUio.d.ts +51 -0
- package/dist/models/ManifestCreateRequestUio.js +60 -0
- package/dist/models/ManifestUio.d.ts +57 -0
- package/dist/models/ManifestUio.js +66 -0
- package/dist/models/MessageUio.d.ts +32 -0
- package/dist/models/MessageUio.js +50 -0
- package/dist/models/MetricForAgentAgentUio.d.ts +38 -0
- package/dist/models/MetricForAgentAgentUio.js +54 -0
- package/dist/models/MetricForAgentIdentifierUio.d.ts +32 -0
- package/dist/models/MetricForAgentIdentifierUio.js +50 -0
- package/dist/models/MetricForAgentMetricUio.d.ts +57 -0
- package/dist/models/MetricForAgentMetricUio.js +67 -0
- package/dist/models/MetricForAgentMetricWithCostUio.d.ts +64 -0
- package/dist/models/MetricForAgentMetricWithCostUio.js +70 -0
- package/dist/models/MetricForAgentUio.d.ts +55 -0
- package/dist/models/MetricForAgentUio.js +63 -0
- package/dist/models/MetricIdentifierUio.d.ts +57 -0
- package/dist/models/MetricIdentifierUio.js +67 -0
- package/dist/models/MetricUio.d.ts +45 -0
- package/dist/models/MetricUio.js +59 -0
- package/dist/models/ModelUio.d.ts +38 -0
- package/dist/models/ModelUio.js +54 -0
- package/dist/models/OrganizationUio.d.ts +47 -0
- package/dist/models/OrganizationUio.js +60 -0
- package/dist/models/PinRequestUio.d.ts +39 -0
- package/dist/models/PinRequestUio.js +55 -0
- package/dist/models/PriceConfigurationModelConfigUio.d.ts +44 -0
- package/dist/models/PriceConfigurationModelConfigUio.js +58 -0
- package/dist/models/PriceConfigurationModelUio.d.ts +37 -0
- package/dist/models/PriceConfigurationModelUio.js +50 -0
- package/dist/models/PriceConfigurationUio.d.ts +35 -0
- package/dist/models/PriceConfigurationUio.js +52 -0
- package/dist/models/PriceUio.d.ts +38 -0
- package/dist/models/PriceUio.js +54 -0
- package/dist/models/PromptCreateRequestUio.d.ts +44 -0
- package/dist/models/PromptCreateRequestUio.js +56 -0
- package/dist/models/PromptCreateResponseUio.d.ts +58 -0
- package/dist/models/PromptCreateResponseUio.js +66 -0
- package/dist/models/PromptFlowCreateRequestUio.d.ts +38 -0
- package/dist/models/PromptFlowCreateRequestUio.js +52 -0
- package/dist/models/PromptFlowCreateResponseUio.d.ts +51 -0
- package/dist/models/PromptFlowCreateResponseUio.js +61 -0
- package/dist/models/ProviderCreateRequestUio.d.ts +57 -0
- package/dist/models/ProviderCreateRequestUio.js +63 -0
- package/dist/models/ProviderSimpleUio.d.ts +50 -0
- package/dist/models/ProviderSimpleUio.js +62 -0
- package/dist/models/ProviderTypeUio.d.ts +27 -0
- package/dist/models/ProviderTypeUio.js +53 -0
- package/dist/models/ProviderUio.d.ts +69 -0
- package/dist/models/ProviderUio.js +71 -0
- package/dist/models/ProviderValiationRequestUio.d.ts +38 -0
- package/dist/models/ProviderValiationRequestUio.js +54 -0
- package/dist/models/S3UploadBodyUio.d.ts +40 -0
- package/dist/models/S3UploadBodyUio.js +54 -0
- package/dist/models/STTResponseUio.d.ts +32 -0
- package/dist/models/STTResponseUio.js +50 -0
- package/dist/models/SimpleAgentUio.d.ts +38 -0
- package/dist/models/SimpleAgentUio.js +54 -0
- package/dist/models/SubscriptionMetricUio.d.ts +4 -4
- package/dist/models/SubscriptionMetricUio.js +4 -4
- package/dist/models/SuggestionUio.d.ts +38 -0
- package/dist/models/SuggestionUio.js +54 -0
- package/dist/models/TTSRequestUio.d.ts +45 -0
- package/dist/models/TTSRequestUio.js +59 -0
- package/dist/models/TTSResponseUio.d.ts +45 -0
- package/dist/models/TTSResponseUio.js +57 -0
- package/dist/models/TextToSpeechProviderUio.d.ts +24 -0
- package/dist/models/TextToSpeechProviderUio.js +50 -0
- package/dist/models/ToolActionUio.d.ts +33 -0
- package/dist/models/ToolActionUio.js +52 -0
- package/dist/models/ToolResultUio.d.ts +51 -0
- package/dist/models/ToolResultUio.js +57 -0
- package/dist/models/ToolResultsToolUio.d.ts +38 -0
- package/dist/models/ToolResultsToolUio.js +52 -0
- package/dist/models/ToolResultsUio.d.ts +40 -0
- package/dist/models/ToolResultsUio.js +52 -0
- package/dist/models/UserUio.d.ts +32 -0
- package/dist/models/UserUio.js +50 -0
- package/dist/models/index.d.ts +137 -17
- package/dist/models/index.js +137 -17
- package/dist/openapi.json +6740 -616
- package/package.json +1 -1
- package/dist/apis/BrainApi.d.ts +0 -290
- package/dist/apis/BrainApi.js +0 -697
- package/dist/models/BrainMetricsEventUio.d.ts +0 -65
- package/dist/models/BrainMetricsUnitsTypeUio.d.ts +0 -27
- package/dist/models/BrainMetricsUnitsTypeUio.js +0 -53
- package/dist/models/BrainMetricsValueUio.d.ts +0 -57
- package/dist/models/BrainModuleTypeUio.d.ts +0 -25
- package/dist/models/BrainModuleTypeUio.js +0 -51
- package/dist/models/BrainModuleUio.d.ts +0 -51
- package/dist/models/BrainPatchUio.d.ts +0 -166
- package/dist/models/BrainRequestImageBrainUio.d.ts +0 -50
- package/dist/models/BrainSubscriptionTextInteractionsUio.d.ts +0 -39
- package/dist/models/BrainSubscriptionUio.d.ts +0 -57
- package/dist/models/BrainSubscriptionUio.js +0 -63
- package/dist/models/BrainUsageMetricsIdUio.d.ts +0 -44
- package/dist/models/BrainUsageMetricsUio.d.ts +0 -46
- package/dist/models/EngineTypeUio.d.ts +0 -25
- package/dist/models/EngineTypeUio.js +0 -51
|
@@ -0,0 +1,790 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* brain-client
|
|
6
|
+
* Api ands models for brain-app and brain-app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.0.0-SNAPSHOT
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.AgentApi = void 0;
|
|
50
|
+
const runtime = __importStar(require("../runtime"));
|
|
51
|
+
const index_1 = require("../models/index");
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
class AgentApi extends runtime.BaseAPI {
|
|
56
|
+
/**
|
|
57
|
+
* Adds a new module to the specified agent
|
|
58
|
+
* Add a module to an agent
|
|
59
|
+
*/
|
|
60
|
+
async addModuleRaw(requestParameters, initOverrides) {
|
|
61
|
+
if (requestParameters['agentId'] == null) {
|
|
62
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling addModule().');
|
|
63
|
+
}
|
|
64
|
+
if (requestParameters['agentModuleUio'] == null) {
|
|
65
|
+
throw new runtime.RequiredError('agentModuleUio', 'Required parameter "agentModuleUio" was null or undefined when calling addModule().');
|
|
66
|
+
}
|
|
67
|
+
const queryParameters = {};
|
|
68
|
+
const headerParameters = {};
|
|
69
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
70
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
71
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
72
|
+
}
|
|
73
|
+
const response = await this.request({
|
|
74
|
+
path: `/agents/{agentId}/modules`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
75
|
+
method: 'POST',
|
|
76
|
+
headers: headerParameters,
|
|
77
|
+
query: queryParameters,
|
|
78
|
+
body: (0, index_1.AgentModuleUioToJSON)(requestParameters['agentModuleUio']),
|
|
79
|
+
}, initOverrides);
|
|
80
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentModuleUioFromJSON)(jsonValue));
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Adds a new module to the specified agent
|
|
84
|
+
* Add a module to an agent
|
|
85
|
+
*/
|
|
86
|
+
async addModule(agentId, agentModuleUio, initOverrides) {
|
|
87
|
+
const response = await this.addModuleRaw({ agentId: agentId, agentModuleUio: agentModuleUio }, initOverrides);
|
|
88
|
+
return await response.value();
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Creates a new agent with specified configuration (admin only)
|
|
92
|
+
* Create a new agent
|
|
93
|
+
*/
|
|
94
|
+
async createAgentRaw(requestParameters, initOverrides) {
|
|
95
|
+
if (requestParameters['agentRequestUio'] == null) {
|
|
96
|
+
throw new runtime.RequiredError('agentRequestUio', 'Required parameter "agentRequestUio" was null or undefined when calling createAgent().');
|
|
97
|
+
}
|
|
98
|
+
const queryParameters = {};
|
|
99
|
+
const headerParameters = {};
|
|
100
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
101
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
102
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
103
|
+
}
|
|
104
|
+
const response = await this.request({
|
|
105
|
+
path: `/agents`,
|
|
106
|
+
method: 'POST',
|
|
107
|
+
headers: headerParameters,
|
|
108
|
+
query: queryParameters,
|
|
109
|
+
body: (0, index_1.AgentRequestUioToJSON)(requestParameters['agentRequestUio']),
|
|
110
|
+
}, initOverrides);
|
|
111
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentUioFromJSON)(jsonValue));
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Creates a new agent with specified configuration (admin only)
|
|
115
|
+
* Create a new agent
|
|
116
|
+
*/
|
|
117
|
+
async createAgent(agentRequestUio, initOverrides) {
|
|
118
|
+
const response = await this.createAgentRaw({ agentRequestUio: agentRequestUio }, initOverrides);
|
|
119
|
+
return await response.value();
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Creates a new conversation flow for a specific agent
|
|
123
|
+
* Create a new flow
|
|
124
|
+
*/
|
|
125
|
+
async createFlowRaw(requestParameters, initOverrides) {
|
|
126
|
+
if (requestParameters['agentId'] == null) {
|
|
127
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling createFlow().');
|
|
128
|
+
}
|
|
129
|
+
if (requestParameters['agentFlowCreateUio'] == null) {
|
|
130
|
+
throw new runtime.RequiredError('agentFlowCreateUio', 'Required parameter "agentFlowCreateUio" was null or undefined when calling createFlow().');
|
|
131
|
+
}
|
|
132
|
+
const queryParameters = {};
|
|
133
|
+
const headerParameters = {};
|
|
134
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
135
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
136
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
137
|
+
}
|
|
138
|
+
const response = await this.request({
|
|
139
|
+
path: `/agents/{agentId}/flows`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
140
|
+
method: 'POST',
|
|
141
|
+
headers: headerParameters,
|
|
142
|
+
query: queryParameters,
|
|
143
|
+
body: (0, index_1.AgentFlowCreateUioToJSON)(requestParameters['agentFlowCreateUio']),
|
|
144
|
+
}, initOverrides);
|
|
145
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentFlowUioFromJSON)(jsonValue));
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Creates a new conversation flow for a specific agent
|
|
149
|
+
* Create a new flow
|
|
150
|
+
*/
|
|
151
|
+
async createFlow(agentId, agentFlowCreateUio, initOverrides) {
|
|
152
|
+
const response = await this.createFlowRaw({ agentId: agentId, agentFlowCreateUio: agentFlowCreateUio }, initOverrides);
|
|
153
|
+
return await response.value();
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Deletes an agent and all its associated flows
|
|
157
|
+
* Delete an agent
|
|
158
|
+
*/
|
|
159
|
+
async deleteAgentByIdRaw(requestParameters, initOverrides) {
|
|
160
|
+
if (requestParameters['agentId'] == null) {
|
|
161
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling deleteAgentById().');
|
|
162
|
+
}
|
|
163
|
+
const queryParameters = {};
|
|
164
|
+
const headerParameters = {};
|
|
165
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
166
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
167
|
+
}
|
|
168
|
+
const response = await this.request({
|
|
169
|
+
path: `/agents/{agentId}`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
170
|
+
method: 'DELETE',
|
|
171
|
+
headers: headerParameters,
|
|
172
|
+
query: queryParameters,
|
|
173
|
+
}, initOverrides);
|
|
174
|
+
return new runtime.VoidApiResponse(response);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Deletes an agent and all its associated flows
|
|
178
|
+
* Delete an agent
|
|
179
|
+
*/
|
|
180
|
+
async deleteAgentById(agentId, initOverrides) {
|
|
181
|
+
await this.deleteAgentByIdRaw({ agentId: agentId }, initOverrides);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Deletes a specific conversation flow
|
|
185
|
+
* Delete a flow
|
|
186
|
+
*/
|
|
187
|
+
async deleteFlowRaw(requestParameters, initOverrides) {
|
|
188
|
+
if (requestParameters['agentId'] == null) {
|
|
189
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling deleteFlow().');
|
|
190
|
+
}
|
|
191
|
+
if (requestParameters['flowId'] == null) {
|
|
192
|
+
throw new runtime.RequiredError('flowId', 'Required parameter "flowId" was null or undefined when calling deleteFlow().');
|
|
193
|
+
}
|
|
194
|
+
const queryParameters = {};
|
|
195
|
+
const headerParameters = {};
|
|
196
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
197
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
198
|
+
}
|
|
199
|
+
const response = await this.request({
|
|
200
|
+
path: `/agents/{agentId}/flows/{flowId}`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters['flowId']))),
|
|
201
|
+
method: 'DELETE',
|
|
202
|
+
headers: headerParameters,
|
|
203
|
+
query: queryParameters,
|
|
204
|
+
}, initOverrides);
|
|
205
|
+
return new runtime.VoidApiResponse(response);
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Deletes a specific conversation flow
|
|
209
|
+
* Delete a flow
|
|
210
|
+
*/
|
|
211
|
+
async deleteFlow(agentId, flowId, initOverrides) {
|
|
212
|
+
await this.deleteFlowRaw({ agentId: agentId, flowId: flowId }, initOverrides);
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Deletes a specific module from the agent
|
|
216
|
+
* Remove a module from an agent
|
|
217
|
+
*/
|
|
218
|
+
async deleteModuleRaw(requestParameters, initOverrides) {
|
|
219
|
+
if (requestParameters['agentId'] == null) {
|
|
220
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling deleteModule().');
|
|
221
|
+
}
|
|
222
|
+
if (requestParameters['moduleName'] == null) {
|
|
223
|
+
throw new runtime.RequiredError('moduleName', 'Required parameter "moduleName" was null or undefined when calling deleteModule().');
|
|
224
|
+
}
|
|
225
|
+
const queryParameters = {};
|
|
226
|
+
const headerParameters = {};
|
|
227
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
228
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
229
|
+
}
|
|
230
|
+
const response = await this.request({
|
|
231
|
+
path: `/agents/{agentId}/modules/{moduleName}`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"moduleName"}}`, encodeURIComponent(String(requestParameters['moduleName']))),
|
|
232
|
+
method: 'DELETE',
|
|
233
|
+
headers: headerParameters,
|
|
234
|
+
query: queryParameters,
|
|
235
|
+
}, initOverrides);
|
|
236
|
+
return new runtime.VoidApiResponse(response);
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Deletes a specific module from the agent
|
|
240
|
+
* Remove a module from an agent
|
|
241
|
+
*/
|
|
242
|
+
async deleteModule(agentId, moduleName, initOverrides) {
|
|
243
|
+
await this.deleteModuleRaw({ agentId: agentId, moduleName: moduleName }, initOverrides);
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Duplicates an agent and returns the new agent
|
|
247
|
+
* Duplicate an agent
|
|
248
|
+
*/
|
|
249
|
+
async duplicateAgentRaw(requestParameters, initOverrides) {
|
|
250
|
+
if (requestParameters['agentId'] == null) {
|
|
251
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling duplicateAgent().');
|
|
252
|
+
}
|
|
253
|
+
if (requestParameters['agentDuplicateRequestUio'] == null) {
|
|
254
|
+
throw new runtime.RequiredError('agentDuplicateRequestUio', 'Required parameter "agentDuplicateRequestUio" was null or undefined when calling duplicateAgent().');
|
|
255
|
+
}
|
|
256
|
+
const queryParameters = {};
|
|
257
|
+
const headerParameters = {};
|
|
258
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
259
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
260
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
261
|
+
}
|
|
262
|
+
const response = await this.request({
|
|
263
|
+
path: `/agents/{agentId}/duplicate`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
264
|
+
method: 'POST',
|
|
265
|
+
headers: headerParameters,
|
|
266
|
+
query: queryParameters,
|
|
267
|
+
body: (0, index_1.AgentDuplicateRequestUioToJSON)(requestParameters['agentDuplicateRequestUio']),
|
|
268
|
+
}, initOverrides);
|
|
269
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BodyWithIdUioFromJSON)(jsonValue));
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Duplicates an agent and returns the new agent
|
|
273
|
+
* Duplicate an agent
|
|
274
|
+
*/
|
|
275
|
+
async duplicateAgent(agentId, agentDuplicateRequestUio, initOverrides) {
|
|
276
|
+
const response = await this.duplicateAgentRaw({ agentId: agentId, agentDuplicateRequestUio: agentDuplicateRequestUio }, initOverrides);
|
|
277
|
+
return await response.value();
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Get a specific agent by ID
|
|
281
|
+
*/
|
|
282
|
+
async getAgentByIdRaw(requestParameters, initOverrides) {
|
|
283
|
+
if (requestParameters['agentId'] == null) {
|
|
284
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getAgentById().');
|
|
285
|
+
}
|
|
286
|
+
const queryParameters = {};
|
|
287
|
+
const headerParameters = {};
|
|
288
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
289
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
290
|
+
}
|
|
291
|
+
const response = await this.request({
|
|
292
|
+
path: `/agents/{agentId}`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
293
|
+
method: 'GET',
|
|
294
|
+
headers: headerParameters,
|
|
295
|
+
query: queryParameters,
|
|
296
|
+
}, initOverrides);
|
|
297
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentUioFromJSON)(jsonValue));
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Get a specific agent by ID
|
|
301
|
+
*/
|
|
302
|
+
async getAgentById(agentId, initOverrides) {
|
|
303
|
+
const response = await this.getAgentByIdRaw({ agentId: agentId }, initOverrides);
|
|
304
|
+
return await response.value();
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Retrieves detailed usage metrics for a specific agent (admin only)
|
|
308
|
+
* Get detailed agent metrics
|
|
309
|
+
*/
|
|
310
|
+
async getAgentMetricsRaw(requestParameters, initOverrides) {
|
|
311
|
+
if (requestParameters['agentId'] == null) {
|
|
312
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getAgentMetrics().');
|
|
313
|
+
}
|
|
314
|
+
const queryParameters = {};
|
|
315
|
+
if (requestParameters['startDate'] != null) {
|
|
316
|
+
queryParameters['startDate'] = requestParameters['startDate'].toISOString();
|
|
317
|
+
}
|
|
318
|
+
if (requestParameters['endDate'] != null) {
|
|
319
|
+
queryParameters['endDate'] = requestParameters['endDate'].toISOString();
|
|
320
|
+
}
|
|
321
|
+
const headerParameters = {};
|
|
322
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
323
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
324
|
+
}
|
|
325
|
+
const response = await this.request({
|
|
326
|
+
path: `/agents/{agentId}/metrics`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
327
|
+
method: 'GET',
|
|
328
|
+
headers: headerParameters,
|
|
329
|
+
query: queryParameters,
|
|
330
|
+
}, initOverrides);
|
|
331
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AgentUsageMetricsUioFromJSON));
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Retrieves detailed usage metrics for a specific agent (admin only)
|
|
335
|
+
* Get detailed agent metrics
|
|
336
|
+
*/
|
|
337
|
+
async getAgentMetrics(agentId, startDate, endDate, initOverrides) {
|
|
338
|
+
const response = await this.getAgentMetricsRaw({ agentId: agentId, startDate: startDate, endDate: endDate }, initOverrides);
|
|
339
|
+
return await response.value();
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Retrieves detailed metric events for a specific agent (admin only)
|
|
343
|
+
* Get agent metrics events
|
|
344
|
+
*/
|
|
345
|
+
async getAgentMetricsEventsRaw(requestParameters, initOverrides) {
|
|
346
|
+
if (requestParameters['agentId'] == null) {
|
|
347
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getAgentMetricsEvents().');
|
|
348
|
+
}
|
|
349
|
+
const queryParameters = {};
|
|
350
|
+
if (requestParameters['offset'] != null) {
|
|
351
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
352
|
+
}
|
|
353
|
+
if (requestParameters['startDate'] != null) {
|
|
354
|
+
queryParameters['startDate'] = requestParameters['startDate'].toISOString();
|
|
355
|
+
}
|
|
356
|
+
if (requestParameters['endDate'] != null) {
|
|
357
|
+
queryParameters['endDate'] = requestParameters['endDate'].toISOString();
|
|
358
|
+
}
|
|
359
|
+
const headerParameters = {};
|
|
360
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
361
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
362
|
+
}
|
|
363
|
+
const response = await this.request({
|
|
364
|
+
path: `/agents/{agentId}/metrics/events`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
365
|
+
method: 'GET',
|
|
366
|
+
headers: headerParameters,
|
|
367
|
+
query: queryParameters,
|
|
368
|
+
}, initOverrides);
|
|
369
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AgentMetricsEventUioFromJSON));
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Retrieves detailed metric events for a specific agent (admin only)
|
|
373
|
+
* Get agent metrics events
|
|
374
|
+
*/
|
|
375
|
+
async getAgentMetricsEvents(agentId, offset, startDate, endDate, initOverrides) {
|
|
376
|
+
const response = await this.getAgentMetricsEventsRaw({ agentId: agentId, offset: offset, startDate: startDate, endDate: endDate }, initOverrides);
|
|
377
|
+
return await response.value();
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Retrieves usage metrics overview for a specific agent
|
|
381
|
+
* Get agent metrics overview
|
|
382
|
+
*/
|
|
383
|
+
async getAgentMetricsOverviewRaw(requestParameters, initOverrides) {
|
|
384
|
+
if (requestParameters['agentId'] == null) {
|
|
385
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getAgentMetricsOverview().');
|
|
386
|
+
}
|
|
387
|
+
const queryParameters = {};
|
|
388
|
+
if (requestParameters['startDate'] != null) {
|
|
389
|
+
queryParameters['startDate'] = requestParameters['startDate'].toISOString();
|
|
390
|
+
}
|
|
391
|
+
if (requestParameters['endDate'] != null) {
|
|
392
|
+
queryParameters['endDate'] = requestParameters['endDate'].toISOString();
|
|
393
|
+
}
|
|
394
|
+
const headerParameters = {};
|
|
395
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
396
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
397
|
+
}
|
|
398
|
+
const response = await this.request({
|
|
399
|
+
path: `/agents/{agentId}/metrics/overview`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
400
|
+
method: 'GET',
|
|
401
|
+
headers: headerParameters,
|
|
402
|
+
query: queryParameters,
|
|
403
|
+
}, initOverrides);
|
|
404
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentMetricsOverviewUioFromJSON)(jsonValue));
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Retrieves usage metrics overview for a specific agent
|
|
408
|
+
* Get agent metrics overview
|
|
409
|
+
*/
|
|
410
|
+
async getAgentMetricsOverview(agentId, startDate, endDate, initOverrides) {
|
|
411
|
+
const response = await this.getAgentMetricsOverviewRaw({ agentId: agentId, startDate: startDate, endDate: endDate }, initOverrides);
|
|
412
|
+
return await response.value();
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Get all agents (admin only)
|
|
416
|
+
* Get all agents
|
|
417
|
+
*/
|
|
418
|
+
async getAgentsRaw(initOverrides) {
|
|
419
|
+
const queryParameters = {};
|
|
420
|
+
const headerParameters = {};
|
|
421
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
422
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
423
|
+
}
|
|
424
|
+
const response = await this.request({
|
|
425
|
+
path: `/agents`,
|
|
426
|
+
method: 'GET',
|
|
427
|
+
headers: headerParameters,
|
|
428
|
+
query: queryParameters,
|
|
429
|
+
}, initOverrides);
|
|
430
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AgentUioFromJSON));
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Get all agents (admin only)
|
|
434
|
+
* Get all agents
|
|
435
|
+
*/
|
|
436
|
+
async getAgents(initOverrides) {
|
|
437
|
+
const response = await this.getAgentsRaw(initOverrides);
|
|
438
|
+
return await response.value();
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* Get conversations for an agent
|
|
442
|
+
* Get conversations for an agent
|
|
443
|
+
*/
|
|
444
|
+
async getConversationsForAgentRaw(requestParameters, initOverrides) {
|
|
445
|
+
if (requestParameters['agentId'] == null) {
|
|
446
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getConversationsForAgent().');
|
|
447
|
+
}
|
|
448
|
+
const queryParameters = {};
|
|
449
|
+
if (requestParameters['page'] != null) {
|
|
450
|
+
queryParameters['page'] = requestParameters['page'];
|
|
451
|
+
}
|
|
452
|
+
const headerParameters = {};
|
|
453
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
454
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
455
|
+
}
|
|
456
|
+
const response = await this.request({
|
|
457
|
+
path: `/agents/{agentId}/conversations`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
458
|
+
method: 'GET',
|
|
459
|
+
headers: headerParameters,
|
|
460
|
+
query: queryParameters,
|
|
461
|
+
}, initOverrides);
|
|
462
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.ChatUioFromJSON));
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Get conversations for an agent
|
|
466
|
+
* Get conversations for an agent
|
|
467
|
+
*/
|
|
468
|
+
async getConversationsForAgent(agentId, page, initOverrides) {
|
|
469
|
+
const response = await this.getConversationsForAgentRaw({ agentId: agentId, page: page }, initOverrides);
|
|
470
|
+
return await response.value();
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* Retrieves a specific conversation flow by ID
|
|
474
|
+
* Get a specific flow
|
|
475
|
+
*/
|
|
476
|
+
async getFlowRaw(requestParameters, initOverrides) {
|
|
477
|
+
if (requestParameters['agentId'] == null) {
|
|
478
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getFlow().');
|
|
479
|
+
}
|
|
480
|
+
if (requestParameters['flowId'] == null) {
|
|
481
|
+
throw new runtime.RequiredError('flowId', 'Required parameter "flowId" was null or undefined when calling getFlow().');
|
|
482
|
+
}
|
|
483
|
+
const queryParameters = {};
|
|
484
|
+
const headerParameters = {};
|
|
485
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
486
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
487
|
+
}
|
|
488
|
+
const response = await this.request({
|
|
489
|
+
path: `/agents/{agentId}/flows/{flowId}`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters['flowId']))),
|
|
490
|
+
method: 'GET',
|
|
491
|
+
headers: headerParameters,
|
|
492
|
+
query: queryParameters,
|
|
493
|
+
}, initOverrides);
|
|
494
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentFlowUioFromJSON)(jsonValue));
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Retrieves a specific conversation flow by ID
|
|
498
|
+
* Get a specific flow
|
|
499
|
+
*/
|
|
500
|
+
async getFlow(agentId, flowId, initOverrides) {
|
|
501
|
+
const response = await this.getFlowRaw({ agentId: agentId, flowId: flowId }, initOverrides);
|
|
502
|
+
return await response.value();
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Retrieves all conversation flows associated with a specific agent
|
|
506
|
+
* Get all flows for an agent
|
|
507
|
+
*/
|
|
508
|
+
async getFlowsRaw(requestParameters, initOverrides) {
|
|
509
|
+
if (requestParameters['agentId'] == null) {
|
|
510
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getFlows().');
|
|
511
|
+
}
|
|
512
|
+
const queryParameters = {};
|
|
513
|
+
const headerParameters = {};
|
|
514
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
515
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
516
|
+
}
|
|
517
|
+
const response = await this.request({
|
|
518
|
+
path: `/agents/{agentId}/flows`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
519
|
+
method: 'GET',
|
|
520
|
+
headers: headerParameters,
|
|
521
|
+
query: queryParameters,
|
|
522
|
+
}, initOverrides);
|
|
523
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AgentFlowUioFromJSON));
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Retrieves all conversation flows associated with a specific agent
|
|
527
|
+
* Get all flows for an agent
|
|
528
|
+
*/
|
|
529
|
+
async getFlows(agentId, initOverrides) {
|
|
530
|
+
const response = await this.getFlowsRaw({ agentId: agentId }, initOverrides);
|
|
531
|
+
return await response.value();
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Retrieves all modules for a specific agent
|
|
535
|
+
* Get agent modules
|
|
536
|
+
*/
|
|
537
|
+
async getModulesRaw(requestParameters, initOverrides) {
|
|
538
|
+
if (requestParameters['agentId'] == null) {
|
|
539
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getModules().');
|
|
540
|
+
}
|
|
541
|
+
const queryParameters = {};
|
|
542
|
+
const headerParameters = {};
|
|
543
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
544
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
545
|
+
}
|
|
546
|
+
const response = await this.request({
|
|
547
|
+
path: `/agents/{agentId}/modules`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
548
|
+
method: 'GET',
|
|
549
|
+
headers: headerParameters,
|
|
550
|
+
query: queryParameters,
|
|
551
|
+
}, initOverrides);
|
|
552
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentModuleUioFromJSON)(jsonValue));
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Retrieves all modules for a specific agent
|
|
556
|
+
* Get agent modules
|
|
557
|
+
*/
|
|
558
|
+
async getModules(agentId, initOverrides) {
|
|
559
|
+
const response = await this.getModulesRaw({ agentId: agentId }, initOverrides);
|
|
560
|
+
return await response.value();
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* Removes the profile image for an agent
|
|
564
|
+
* Remove agent profile image
|
|
565
|
+
*/
|
|
566
|
+
async removeAgentProfileImageRaw(requestParameters, initOverrides) {
|
|
567
|
+
if (requestParameters['agentId'] == null) {
|
|
568
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling removeAgentProfileImage().');
|
|
569
|
+
}
|
|
570
|
+
const queryParameters = {};
|
|
571
|
+
const headerParameters = {};
|
|
572
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
573
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
574
|
+
}
|
|
575
|
+
const response = await this.request({
|
|
576
|
+
path: `/agents/{agentId}/files`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
577
|
+
method: 'DELETE',
|
|
578
|
+
headers: headerParameters,
|
|
579
|
+
query: queryParameters,
|
|
580
|
+
}, initOverrides);
|
|
581
|
+
return new runtime.VoidApiResponse(response);
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Removes the profile image for an agent
|
|
585
|
+
* Remove agent profile image
|
|
586
|
+
*/
|
|
587
|
+
async removeAgentProfileImage(agentId, initOverrides) {
|
|
588
|
+
await this.removeAgentProfileImageRaw({ agentId: agentId }, initOverrides);
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Removes the subscription plan from an agent (admin only)
|
|
592
|
+
* Remove agent subscription
|
|
593
|
+
*/
|
|
594
|
+
async removeAgentSubscriptionRaw(requestParameters, initOverrides) {
|
|
595
|
+
if (requestParameters['agentId'] == null) {
|
|
596
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling removeAgentSubscription().');
|
|
597
|
+
}
|
|
598
|
+
const queryParameters = {};
|
|
599
|
+
const headerParameters = {};
|
|
600
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
601
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
602
|
+
}
|
|
603
|
+
const response = await this.request({
|
|
604
|
+
path: `/agents/{agentId}/subscription`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
605
|
+
method: 'DELETE',
|
|
606
|
+
headers: headerParameters,
|
|
607
|
+
query: queryParameters,
|
|
608
|
+
}, initOverrides);
|
|
609
|
+
return new runtime.VoidApiResponse(response);
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* Removes the subscription plan from an agent (admin only)
|
|
613
|
+
* Remove agent subscription
|
|
614
|
+
*/
|
|
615
|
+
async removeAgentSubscription(agentId, initOverrides) {
|
|
616
|
+
await this.removeAgentSubscriptionRaw({ agentId: agentId }, initOverrides);
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Updates an existing agent\'s properties
|
|
620
|
+
* Update an agent
|
|
621
|
+
*/
|
|
622
|
+
async updateAgentByIdRaw(requestParameters, initOverrides) {
|
|
623
|
+
if (requestParameters['agentId'] == null) {
|
|
624
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling updateAgentById().');
|
|
625
|
+
}
|
|
626
|
+
if (requestParameters['agentPatchUio'] == null) {
|
|
627
|
+
throw new runtime.RequiredError('agentPatchUio', 'Required parameter "agentPatchUio" was null or undefined when calling updateAgentById().');
|
|
628
|
+
}
|
|
629
|
+
const queryParameters = {};
|
|
630
|
+
const headerParameters = {};
|
|
631
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
632
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
633
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
634
|
+
}
|
|
635
|
+
const response = await this.request({
|
|
636
|
+
path: `/agents/{agentId}`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
637
|
+
method: 'PATCH',
|
|
638
|
+
headers: headerParameters,
|
|
639
|
+
query: queryParameters,
|
|
640
|
+
body: (0, index_1.AgentPatchUioToJSON)(requestParameters['agentPatchUio']),
|
|
641
|
+
}, initOverrides);
|
|
642
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentPatchUioFromJSON)(jsonValue));
|
|
643
|
+
}
|
|
644
|
+
/**
|
|
645
|
+
* Updates an existing agent\'s properties
|
|
646
|
+
* Update an agent
|
|
647
|
+
*/
|
|
648
|
+
async updateAgentById(agentId, agentPatchUio, initOverrides) {
|
|
649
|
+
const response = await this.updateAgentByIdRaw({ agentId: agentId, agentPatchUio: agentPatchUio }, initOverrides);
|
|
650
|
+
return await response.value();
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Update profile picture for an agent
|
|
654
|
+
*/
|
|
655
|
+
async updateAgentProfilePictureRaw(requestParameters, initOverrides) {
|
|
656
|
+
if (requestParameters['agentId'] == null) {
|
|
657
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling updateAgentProfilePicture().');
|
|
658
|
+
}
|
|
659
|
+
if (requestParameters['fileCreationRequestUio'] == null) {
|
|
660
|
+
throw new runtime.RequiredError('fileCreationRequestUio', 'Required parameter "fileCreationRequestUio" was null or undefined when calling updateAgentProfilePicture().');
|
|
661
|
+
}
|
|
662
|
+
const queryParameters = {};
|
|
663
|
+
const headerParameters = {};
|
|
664
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
665
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
666
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
667
|
+
}
|
|
668
|
+
const response = await this.request({
|
|
669
|
+
path: `/agents/{agentId}/profile-picture`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
670
|
+
method: 'POST',
|
|
671
|
+
headers: headerParameters,
|
|
672
|
+
query: queryParameters,
|
|
673
|
+
body: (0, index_1.FileCreationRequestUioToJSON)(requestParameters['fileCreationRequestUio']),
|
|
674
|
+
}, initOverrides);
|
|
675
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.S3UploadBodyUioFromJSON)(jsonValue));
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Update profile picture for an agent
|
|
679
|
+
*/
|
|
680
|
+
async updateAgentProfilePicture(agentId, fileCreationRequestUio, initOverrides) {
|
|
681
|
+
const response = await this.updateAgentProfilePictureRaw({ agentId: agentId, fileCreationRequestUio: fileCreationRequestUio }, initOverrides);
|
|
682
|
+
return await response.value();
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* Sets or updates a subscription plan for an agent (admin only)
|
|
686
|
+
* Update agent subscription
|
|
687
|
+
*/
|
|
688
|
+
async updateAgentSubscriptionRaw(requestParameters, initOverrides) {
|
|
689
|
+
if (requestParameters['agentId'] == null) {
|
|
690
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling updateAgentSubscription().');
|
|
691
|
+
}
|
|
692
|
+
if (requestParameters['agentSubscriptionUio'] == null) {
|
|
693
|
+
throw new runtime.RequiredError('agentSubscriptionUio', 'Required parameter "agentSubscriptionUio" was null or undefined when calling updateAgentSubscription().');
|
|
694
|
+
}
|
|
695
|
+
const queryParameters = {};
|
|
696
|
+
const headerParameters = {};
|
|
697
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
698
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
699
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
700
|
+
}
|
|
701
|
+
const response = await this.request({
|
|
702
|
+
path: `/agents/{agentId}/subscription`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
703
|
+
method: 'PUT',
|
|
704
|
+
headers: headerParameters,
|
|
705
|
+
query: queryParameters,
|
|
706
|
+
body: (0, index_1.AgentSubscriptionUioToJSON)(requestParameters['agentSubscriptionUio']),
|
|
707
|
+
}, initOverrides);
|
|
708
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentSubscriptionUioFromJSON)(jsonValue));
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* Sets or updates a subscription plan for an agent (admin only)
|
|
712
|
+
* Update agent subscription
|
|
713
|
+
*/
|
|
714
|
+
async updateAgentSubscription(agentId, agentSubscriptionUio, initOverrides) {
|
|
715
|
+
const response = await this.updateAgentSubscriptionRaw({ agentId: agentId, agentSubscriptionUio: agentSubscriptionUio }, initOverrides);
|
|
716
|
+
return await response.value();
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* Updates an existing conversation flow
|
|
720
|
+
* Update a flow
|
|
721
|
+
*/
|
|
722
|
+
async updateFlowRaw(requestParameters, initOverrides) {
|
|
723
|
+
if (requestParameters['agentId'] == null) {
|
|
724
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling updateFlow().');
|
|
725
|
+
}
|
|
726
|
+
if (requestParameters['flowId'] == null) {
|
|
727
|
+
throw new runtime.RequiredError('flowId', 'Required parameter "flowId" was null or undefined when calling updateFlow().');
|
|
728
|
+
}
|
|
729
|
+
if (requestParameters['agentFlowUio'] == null) {
|
|
730
|
+
throw new runtime.RequiredError('agentFlowUio', 'Required parameter "agentFlowUio" was null or undefined when calling updateFlow().');
|
|
731
|
+
}
|
|
732
|
+
const queryParameters = {};
|
|
733
|
+
const headerParameters = {};
|
|
734
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
735
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
736
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
737
|
+
}
|
|
738
|
+
const response = await this.request({
|
|
739
|
+
path: `/agents/{agentId}/flows/{flowId}`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters['flowId']))),
|
|
740
|
+
method: 'PUT',
|
|
741
|
+
headers: headerParameters,
|
|
742
|
+
query: queryParameters,
|
|
743
|
+
body: (0, index_1.AgentFlowUioToJSON)(requestParameters['agentFlowUio']),
|
|
744
|
+
}, initOverrides);
|
|
745
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentFlowUioFromJSON)(jsonValue));
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* Updates an existing conversation flow
|
|
749
|
+
* Update a flow
|
|
750
|
+
*/
|
|
751
|
+
async updateFlow(agentId, flowId, agentFlowUio, initOverrides) {
|
|
752
|
+
const response = await this.updateFlowRaw({ agentId: agentId, flowId: flowId, agentFlowUio: agentFlowUio }, initOverrides);
|
|
753
|
+
return await response.value();
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Uploads a profile image for an agent and returns an upload URL
|
|
757
|
+
* Upload agent profile image
|
|
758
|
+
*/
|
|
759
|
+
async uploadAgentProfileImageRaw(requestParameters, initOverrides) {
|
|
760
|
+
if (requestParameters['agentId'] == null) {
|
|
761
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling uploadAgentProfileImage().');
|
|
762
|
+
}
|
|
763
|
+
if (requestParameters['fileCreationRequestUio'] == null) {
|
|
764
|
+
throw new runtime.RequiredError('fileCreationRequestUio', 'Required parameter "fileCreationRequestUio" was null or undefined when calling uploadAgentProfileImage().');
|
|
765
|
+
}
|
|
766
|
+
const queryParameters = {};
|
|
767
|
+
const headerParameters = {};
|
|
768
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
769
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
770
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
771
|
+
}
|
|
772
|
+
const response = await this.request({
|
|
773
|
+
path: `/agents/{agentId}/files`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
774
|
+
method: 'POST',
|
|
775
|
+
headers: headerParameters,
|
|
776
|
+
query: queryParameters,
|
|
777
|
+
body: (0, index_1.FileCreationRequestUioToJSON)(requestParameters['fileCreationRequestUio']),
|
|
778
|
+
}, initOverrides);
|
|
779
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.FileCreationResponseUioFromJSON)(jsonValue));
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* Uploads a profile image for an agent and returns an upload URL
|
|
783
|
+
* Upload agent profile image
|
|
784
|
+
*/
|
|
785
|
+
async uploadAgentProfileImage(agentId, fileCreationRequestUio, initOverrides) {
|
|
786
|
+
const response = await this.uploadAgentProfileImageRaw({ agentId: agentId, fileCreationRequestUio: fileCreationRequestUio }, initOverrides);
|
|
787
|
+
return await response.value();
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
exports.AgentApi = AgentApi;
|