@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
package/dist/apis/BrainApi.js
DELETED
|
@@ -1,697 +0,0 @@
|
|
|
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.BrainApi = void 0;
|
|
50
|
-
const runtime = __importStar(require("../runtime"));
|
|
51
|
-
const index_1 = require("../models/index");
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
class BrainApi extends runtime.BaseAPI {
|
|
56
|
-
/**
|
|
57
|
-
* Adds a new module to the specified brain
|
|
58
|
-
* Add a module to a brain
|
|
59
|
-
*/
|
|
60
|
-
async addModuleRaw(requestParameters, initOverrides) {
|
|
61
|
-
if (requestParameters['brainId'] == null) {
|
|
62
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" was null or undefined when calling addModule().');
|
|
63
|
-
}
|
|
64
|
-
if (requestParameters['brainModuleUio'] == null) {
|
|
65
|
-
throw new runtime.RequiredError('brainModuleUio', 'Required parameter "brainModuleUio" 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: `/brains/{brainId}/modules`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))),
|
|
75
|
-
method: 'POST',
|
|
76
|
-
headers: headerParameters,
|
|
77
|
-
query: queryParameters,
|
|
78
|
-
body: (0, index_1.BrainModuleUioToJSON)(requestParameters['brainModuleUio']),
|
|
79
|
-
}, initOverrides);
|
|
80
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrainModuleUioFromJSON)(jsonValue));
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Adds a new module to the specified brain
|
|
84
|
-
* Add a module to a brain
|
|
85
|
-
*/
|
|
86
|
-
async addModule(requestParameters, initOverrides) {
|
|
87
|
-
const response = await this.addModuleRaw(requestParameters, initOverrides);
|
|
88
|
-
return await response.value();
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Creates a new brain with specified configuration (admin only)
|
|
92
|
-
* Create a new brain
|
|
93
|
-
*/
|
|
94
|
-
async createBrainRaw(requestParameters, initOverrides) {
|
|
95
|
-
if (requestParameters['brainRequestUio'] == null) {
|
|
96
|
-
throw new runtime.RequiredError('brainRequestUio', 'Required parameter "brainRequestUio" was null or undefined when calling createBrain().');
|
|
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: `/brains`,
|
|
106
|
-
method: 'POST',
|
|
107
|
-
headers: headerParameters,
|
|
108
|
-
query: queryParameters,
|
|
109
|
-
body: (0, index_1.BrainRequestUioToJSON)(requestParameters['brainRequestUio']),
|
|
110
|
-
}, initOverrides);
|
|
111
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrainUioFromJSON)(jsonValue));
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Creates a new brain with specified configuration (admin only)
|
|
115
|
-
* Create a new brain
|
|
116
|
-
*/
|
|
117
|
-
async createBrain(requestParameters, initOverrides) {
|
|
118
|
-
const response = await this.createBrainRaw(requestParameters, initOverrides);
|
|
119
|
-
return await response.value();
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Creates a new conversation flow for a specific brain
|
|
123
|
-
* Create a new flow
|
|
124
|
-
*/
|
|
125
|
-
async createFlowRaw(requestParameters, initOverrides) {
|
|
126
|
-
if (requestParameters['brainId'] == null) {
|
|
127
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" was null or undefined when calling createFlow().');
|
|
128
|
-
}
|
|
129
|
-
if (requestParameters['brainFlowCreateUio'] == null) {
|
|
130
|
-
throw new runtime.RequiredError('brainFlowCreateUio', 'Required parameter "brainFlowCreateUio" 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: `/brains/{brainId}/flows`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))),
|
|
140
|
-
method: 'POST',
|
|
141
|
-
headers: headerParameters,
|
|
142
|
-
query: queryParameters,
|
|
143
|
-
body: (0, index_1.BrainFlowCreateUioToJSON)(requestParameters['brainFlowCreateUio']),
|
|
144
|
-
}, initOverrides);
|
|
145
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrainFlowUioFromJSON)(jsonValue));
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Creates a new conversation flow for a specific brain
|
|
149
|
-
* Create a new flow
|
|
150
|
-
*/
|
|
151
|
-
async createFlow(requestParameters, initOverrides) {
|
|
152
|
-
const response = await this.createFlowRaw(requestParameters, initOverrides);
|
|
153
|
-
return await response.value();
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Deletes a brain and all its associated agents
|
|
157
|
-
* Delete a brain
|
|
158
|
-
*/
|
|
159
|
-
async deleteBrainByIdRaw(requestParameters, initOverrides) {
|
|
160
|
-
if (requestParameters['brainId'] == null) {
|
|
161
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" was null or undefined when calling deleteBrainById().');
|
|
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: `/brains/{brainId}`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))),
|
|
170
|
-
method: 'DELETE',
|
|
171
|
-
headers: headerParameters,
|
|
172
|
-
query: queryParameters,
|
|
173
|
-
}, initOverrides);
|
|
174
|
-
return new runtime.VoidApiResponse(response);
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Deletes a brain and all its associated agents
|
|
178
|
-
* Delete a brain
|
|
179
|
-
*/
|
|
180
|
-
async deleteBrainById(requestParameters, initOverrides) {
|
|
181
|
-
await this.deleteBrainByIdRaw(requestParameters, initOverrides);
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Deletes a specific conversation flow
|
|
185
|
-
* Delete a flow
|
|
186
|
-
*/
|
|
187
|
-
async deleteFlowRaw(requestParameters, initOverrides) {
|
|
188
|
-
if (requestParameters['brainId'] == null) {
|
|
189
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" 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: `/brains/{brainId}/flows/{flowId}`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))).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(requestParameters, initOverrides) {
|
|
212
|
-
await this.deleteFlowRaw(requestParameters, initOverrides);
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Deletes a specific module from the brain
|
|
216
|
-
* Remove a module from a brain
|
|
217
|
-
*/
|
|
218
|
-
async deleteModuleRaw(requestParameters, initOverrides) {
|
|
219
|
-
if (requestParameters['brainId'] == null) {
|
|
220
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" 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: `/brains/{brainId}/modules/{moduleName}`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))).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 brain
|
|
240
|
-
* Remove a module from a brain
|
|
241
|
-
*/
|
|
242
|
-
async deleteModule(requestParameters, initOverrides) {
|
|
243
|
-
await this.deleteModuleRaw(requestParameters, initOverrides);
|
|
244
|
-
}
|
|
245
|
-
/**
|
|
246
|
-
* Get a specific brain by ID
|
|
247
|
-
*/
|
|
248
|
-
async getBrainByIdRaw(requestParameters, initOverrides) {
|
|
249
|
-
if (requestParameters['brainId'] == null) {
|
|
250
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" was null or undefined when calling getBrainById().');
|
|
251
|
-
}
|
|
252
|
-
const queryParameters = {};
|
|
253
|
-
const headerParameters = {};
|
|
254
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
255
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
256
|
-
}
|
|
257
|
-
const response = await this.request({
|
|
258
|
-
path: `/brains/{brainId}`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))),
|
|
259
|
-
method: 'GET',
|
|
260
|
-
headers: headerParameters,
|
|
261
|
-
query: queryParameters,
|
|
262
|
-
}, initOverrides);
|
|
263
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrainUioFromJSON)(jsonValue));
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Get a specific brain by ID
|
|
267
|
-
*/
|
|
268
|
-
async getBrainById(requestParameters, initOverrides) {
|
|
269
|
-
const response = await this.getBrainByIdRaw(requestParameters, initOverrides);
|
|
270
|
-
return await response.value();
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Retrieves detailed usage metrics for a specific brain (admin only)
|
|
274
|
-
* Get detailed brain metrics
|
|
275
|
-
*/
|
|
276
|
-
async getBrainMetricsRaw(requestParameters, initOverrides) {
|
|
277
|
-
if (requestParameters['brainId'] == null) {
|
|
278
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" was null or undefined when calling getBrainMetrics().');
|
|
279
|
-
}
|
|
280
|
-
const queryParameters = {};
|
|
281
|
-
if (requestParameters['startDate'] != null) {
|
|
282
|
-
queryParameters['startDate'] = requestParameters['startDate'].toISOString();
|
|
283
|
-
}
|
|
284
|
-
if (requestParameters['endDate'] != null) {
|
|
285
|
-
queryParameters['endDate'] = requestParameters['endDate'].toISOString();
|
|
286
|
-
}
|
|
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: `/brains/{brainId}/metrics`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))),
|
|
293
|
-
method: 'GET',
|
|
294
|
-
headers: headerParameters,
|
|
295
|
-
query: queryParameters,
|
|
296
|
-
}, initOverrides);
|
|
297
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.BrainUsageMetricsUioFromJSON));
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* Retrieves detailed usage metrics for a specific brain (admin only)
|
|
301
|
-
* Get detailed brain metrics
|
|
302
|
-
*/
|
|
303
|
-
async getBrainMetrics(requestParameters, initOverrides) {
|
|
304
|
-
const response = await this.getBrainMetricsRaw(requestParameters, initOverrides);
|
|
305
|
-
return await response.value();
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
|
-
* Retrieves detailed metric events for a specific brain (admin only)
|
|
309
|
-
* Get brain metrics events
|
|
310
|
-
*/
|
|
311
|
-
async getBrainMetricsEventsRaw(requestParameters, initOverrides) {
|
|
312
|
-
if (requestParameters['brainId'] == null) {
|
|
313
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" was null or undefined when calling getBrainMetricsEvents().');
|
|
314
|
-
}
|
|
315
|
-
const queryParameters = {};
|
|
316
|
-
if (requestParameters['offset'] != null) {
|
|
317
|
-
queryParameters['offset'] = requestParameters['offset'];
|
|
318
|
-
}
|
|
319
|
-
if (requestParameters['startDate'] != null) {
|
|
320
|
-
queryParameters['startDate'] = requestParameters['startDate'].toISOString();
|
|
321
|
-
}
|
|
322
|
-
if (requestParameters['endDate'] != null) {
|
|
323
|
-
queryParameters['endDate'] = requestParameters['endDate'].toISOString();
|
|
324
|
-
}
|
|
325
|
-
const headerParameters = {};
|
|
326
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
327
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
328
|
-
}
|
|
329
|
-
const response = await this.request({
|
|
330
|
-
path: `/brains/{brainId}/metrics/events`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))),
|
|
331
|
-
method: 'GET',
|
|
332
|
-
headers: headerParameters,
|
|
333
|
-
query: queryParameters,
|
|
334
|
-
}, initOverrides);
|
|
335
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.BrainMetricsEventUioFromJSON));
|
|
336
|
-
}
|
|
337
|
-
/**
|
|
338
|
-
* Retrieves detailed metric events for a specific brain (admin only)
|
|
339
|
-
* Get brain metrics events
|
|
340
|
-
*/
|
|
341
|
-
async getBrainMetricsEvents(requestParameters, initOverrides) {
|
|
342
|
-
const response = await this.getBrainMetricsEventsRaw(requestParameters, initOverrides);
|
|
343
|
-
return await response.value();
|
|
344
|
-
}
|
|
345
|
-
/**
|
|
346
|
-
* Retrieves usage metrics overview for a specific brain
|
|
347
|
-
* Get brain metrics overview
|
|
348
|
-
*/
|
|
349
|
-
async getBrainMetricsOverviewRaw(requestParameters, initOverrides) {
|
|
350
|
-
if (requestParameters['brainId'] == null) {
|
|
351
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" was null or undefined when calling getBrainMetricsOverview().');
|
|
352
|
-
}
|
|
353
|
-
const queryParameters = {};
|
|
354
|
-
if (requestParameters['startDate'] != null) {
|
|
355
|
-
queryParameters['startDate'] = requestParameters['startDate'].toISOString();
|
|
356
|
-
}
|
|
357
|
-
if (requestParameters['endDate'] != null) {
|
|
358
|
-
queryParameters['endDate'] = requestParameters['endDate'].toISOString();
|
|
359
|
-
}
|
|
360
|
-
const headerParameters = {};
|
|
361
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
362
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
363
|
-
}
|
|
364
|
-
const response = await this.request({
|
|
365
|
-
path: `/brains/{brainId}/metrics/overview`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))),
|
|
366
|
-
method: 'GET',
|
|
367
|
-
headers: headerParameters,
|
|
368
|
-
query: queryParameters,
|
|
369
|
-
}, initOverrides);
|
|
370
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrainMetricsOverviewUioFromJSON)(jsonValue));
|
|
371
|
-
}
|
|
372
|
-
/**
|
|
373
|
-
* Retrieves usage metrics overview for a specific brain
|
|
374
|
-
* Get brain metrics overview
|
|
375
|
-
*/
|
|
376
|
-
async getBrainMetricsOverview(requestParameters, initOverrides) {
|
|
377
|
-
const response = await this.getBrainMetricsOverviewRaw(requestParameters, initOverrides);
|
|
378
|
-
return await response.value();
|
|
379
|
-
}
|
|
380
|
-
/**
|
|
381
|
-
* Get all brains (admin only)
|
|
382
|
-
* Get all brains
|
|
383
|
-
*/
|
|
384
|
-
async getBrainsRaw(initOverrides) {
|
|
385
|
-
const queryParameters = {};
|
|
386
|
-
const headerParameters = {};
|
|
387
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
388
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
389
|
-
}
|
|
390
|
-
const response = await this.request({
|
|
391
|
-
path: `/brains`,
|
|
392
|
-
method: 'GET',
|
|
393
|
-
headers: headerParameters,
|
|
394
|
-
query: queryParameters,
|
|
395
|
-
}, initOverrides);
|
|
396
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.BrainUioFromJSON));
|
|
397
|
-
}
|
|
398
|
-
/**
|
|
399
|
-
* Get all brains (admin only)
|
|
400
|
-
* Get all brains
|
|
401
|
-
*/
|
|
402
|
-
async getBrains(initOverrides) {
|
|
403
|
-
const response = await this.getBrainsRaw(initOverrides);
|
|
404
|
-
return await response.value();
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
* Retrieves a specific conversation flow by ID
|
|
408
|
-
* Get a specific flow
|
|
409
|
-
*/
|
|
410
|
-
async getFlowRaw(requestParameters, initOverrides) {
|
|
411
|
-
if (requestParameters['brainId'] == null) {
|
|
412
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" was null or undefined when calling getFlow().');
|
|
413
|
-
}
|
|
414
|
-
if (requestParameters['flowId'] == null) {
|
|
415
|
-
throw new runtime.RequiredError('flowId', 'Required parameter "flowId" was null or undefined when calling getFlow().');
|
|
416
|
-
}
|
|
417
|
-
const queryParameters = {};
|
|
418
|
-
const headerParameters = {};
|
|
419
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
420
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
421
|
-
}
|
|
422
|
-
const response = await this.request({
|
|
423
|
-
path: `/brains/{brainId}/flows/{flowId}`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters['flowId']))),
|
|
424
|
-
method: 'GET',
|
|
425
|
-
headers: headerParameters,
|
|
426
|
-
query: queryParameters,
|
|
427
|
-
}, initOverrides);
|
|
428
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrainFlowUioFromJSON)(jsonValue));
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* Retrieves a specific conversation flow by ID
|
|
432
|
-
* Get a specific flow
|
|
433
|
-
*/
|
|
434
|
-
async getFlow(requestParameters, initOverrides) {
|
|
435
|
-
const response = await this.getFlowRaw(requestParameters, initOverrides);
|
|
436
|
-
return await response.value();
|
|
437
|
-
}
|
|
438
|
-
/**
|
|
439
|
-
* Retrieves all conversation flows associated with a specific brain
|
|
440
|
-
* Get all flows for a brain
|
|
441
|
-
*/
|
|
442
|
-
async getFlowsRaw(requestParameters, initOverrides) {
|
|
443
|
-
if (requestParameters['brainId'] == null) {
|
|
444
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" was null or undefined when calling getFlows().');
|
|
445
|
-
}
|
|
446
|
-
const queryParameters = {};
|
|
447
|
-
const headerParameters = {};
|
|
448
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
449
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
450
|
-
}
|
|
451
|
-
const response = await this.request({
|
|
452
|
-
path: `/brains/{brainId}/flows`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))),
|
|
453
|
-
method: 'GET',
|
|
454
|
-
headers: headerParameters,
|
|
455
|
-
query: queryParameters,
|
|
456
|
-
}, initOverrides);
|
|
457
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.BrainFlowUioFromJSON));
|
|
458
|
-
}
|
|
459
|
-
/**
|
|
460
|
-
* Retrieves all conversation flows associated with a specific brain
|
|
461
|
-
* Get all flows for a brain
|
|
462
|
-
*/
|
|
463
|
-
async getFlows(requestParameters, initOverrides) {
|
|
464
|
-
const response = await this.getFlowsRaw(requestParameters, initOverrides);
|
|
465
|
-
return await response.value();
|
|
466
|
-
}
|
|
467
|
-
/**
|
|
468
|
-
* Retrieves all modules for a specific brain
|
|
469
|
-
* Get brain modules
|
|
470
|
-
*/
|
|
471
|
-
async getModulesRaw(requestParameters, initOverrides) {
|
|
472
|
-
if (requestParameters['brainId'] == null) {
|
|
473
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" was null or undefined when calling getModules().');
|
|
474
|
-
}
|
|
475
|
-
const queryParameters = {};
|
|
476
|
-
const headerParameters = {};
|
|
477
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
478
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
479
|
-
}
|
|
480
|
-
const response = await this.request({
|
|
481
|
-
path: `/brains/{brainId}/modules`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))),
|
|
482
|
-
method: 'GET',
|
|
483
|
-
headers: headerParameters,
|
|
484
|
-
query: queryParameters,
|
|
485
|
-
}, initOverrides);
|
|
486
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrainModuleUioFromJSON)(jsonValue));
|
|
487
|
-
}
|
|
488
|
-
/**
|
|
489
|
-
* Retrieves all modules for a specific brain
|
|
490
|
-
* Get brain modules
|
|
491
|
-
*/
|
|
492
|
-
async getModules(requestParameters, initOverrides) {
|
|
493
|
-
const response = await this.getModulesRaw(requestParameters, initOverrides);
|
|
494
|
-
return await response.value();
|
|
495
|
-
}
|
|
496
|
-
/**
|
|
497
|
-
* Removes the profile image for a brain
|
|
498
|
-
* Remove brain profile image
|
|
499
|
-
*/
|
|
500
|
-
async removeBrainProfileImageRaw(requestParameters, initOverrides) {
|
|
501
|
-
if (requestParameters['brainId'] == null) {
|
|
502
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" was null or undefined when calling removeBrainProfileImage().');
|
|
503
|
-
}
|
|
504
|
-
const queryParameters = {};
|
|
505
|
-
const headerParameters = {};
|
|
506
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
507
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
508
|
-
}
|
|
509
|
-
const response = await this.request({
|
|
510
|
-
path: `/brains/{brainId}/files`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))),
|
|
511
|
-
method: 'DELETE',
|
|
512
|
-
headers: headerParameters,
|
|
513
|
-
query: queryParameters,
|
|
514
|
-
}, initOverrides);
|
|
515
|
-
return new runtime.VoidApiResponse(response);
|
|
516
|
-
}
|
|
517
|
-
/**
|
|
518
|
-
* Removes the profile image for a brain
|
|
519
|
-
* Remove brain profile image
|
|
520
|
-
*/
|
|
521
|
-
async removeBrainProfileImage(requestParameters, initOverrides) {
|
|
522
|
-
await this.removeBrainProfileImageRaw(requestParameters, initOverrides);
|
|
523
|
-
}
|
|
524
|
-
/**
|
|
525
|
-
* Removes the subscription plan from a brain (admin only)
|
|
526
|
-
* Remove brain subscription
|
|
527
|
-
*/
|
|
528
|
-
async removeBrainSubscriptionRaw(requestParameters, initOverrides) {
|
|
529
|
-
if (requestParameters['brainId'] == null) {
|
|
530
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" was null or undefined when calling removeBrainSubscription().');
|
|
531
|
-
}
|
|
532
|
-
const queryParameters = {};
|
|
533
|
-
const headerParameters = {};
|
|
534
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
535
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
536
|
-
}
|
|
537
|
-
const response = await this.request({
|
|
538
|
-
path: `/brains/{brainId}/subscription`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))),
|
|
539
|
-
method: 'DELETE',
|
|
540
|
-
headers: headerParameters,
|
|
541
|
-
query: queryParameters,
|
|
542
|
-
}, initOverrides);
|
|
543
|
-
return new runtime.VoidApiResponse(response);
|
|
544
|
-
}
|
|
545
|
-
/**
|
|
546
|
-
* Removes the subscription plan from a brain (admin only)
|
|
547
|
-
* Remove brain subscription
|
|
548
|
-
*/
|
|
549
|
-
async removeBrainSubscription(requestParameters, initOverrides) {
|
|
550
|
-
await this.removeBrainSubscriptionRaw(requestParameters, initOverrides);
|
|
551
|
-
}
|
|
552
|
-
/**
|
|
553
|
-
* Updates an existing brain\'s properties
|
|
554
|
-
* Update a brain
|
|
555
|
-
*/
|
|
556
|
-
async updateBrainByIdRaw(requestParameters, initOverrides) {
|
|
557
|
-
if (requestParameters['brainId'] == null) {
|
|
558
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" was null or undefined when calling updateBrainById().');
|
|
559
|
-
}
|
|
560
|
-
if (requestParameters['brainPatchUio'] == null) {
|
|
561
|
-
throw new runtime.RequiredError('brainPatchUio', 'Required parameter "brainPatchUio" was null or undefined when calling updateBrainById().');
|
|
562
|
-
}
|
|
563
|
-
const queryParameters = {};
|
|
564
|
-
const headerParameters = {};
|
|
565
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
566
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
567
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
568
|
-
}
|
|
569
|
-
const response = await this.request({
|
|
570
|
-
path: `/brains/{brainId}`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))),
|
|
571
|
-
method: 'PATCH',
|
|
572
|
-
headers: headerParameters,
|
|
573
|
-
query: queryParameters,
|
|
574
|
-
body: (0, index_1.BrainPatchUioToJSON)(requestParameters['brainPatchUio']),
|
|
575
|
-
}, initOverrides);
|
|
576
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrainPatchUioFromJSON)(jsonValue));
|
|
577
|
-
}
|
|
578
|
-
/**
|
|
579
|
-
* Updates an existing brain\'s properties
|
|
580
|
-
* Update a brain
|
|
581
|
-
*/
|
|
582
|
-
async updateBrainById(requestParameters, initOverrides) {
|
|
583
|
-
const response = await this.updateBrainByIdRaw(requestParameters, initOverrides);
|
|
584
|
-
return await response.value();
|
|
585
|
-
}
|
|
586
|
-
/**
|
|
587
|
-
* Sets or updates a subscription plan for a brain (admin only)
|
|
588
|
-
* Update brain subscription
|
|
589
|
-
*/
|
|
590
|
-
async updateBrainSubscriptionRaw(requestParameters, initOverrides) {
|
|
591
|
-
if (requestParameters['brainId'] == null) {
|
|
592
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" was null or undefined when calling updateBrainSubscription().');
|
|
593
|
-
}
|
|
594
|
-
if (requestParameters['brainSubscriptionUio'] == null) {
|
|
595
|
-
throw new runtime.RequiredError('brainSubscriptionUio', 'Required parameter "brainSubscriptionUio" was null or undefined when calling updateBrainSubscription().');
|
|
596
|
-
}
|
|
597
|
-
const queryParameters = {};
|
|
598
|
-
const headerParameters = {};
|
|
599
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
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: `/brains/{brainId}/subscription`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))),
|
|
605
|
-
method: 'PUT',
|
|
606
|
-
headers: headerParameters,
|
|
607
|
-
query: queryParameters,
|
|
608
|
-
body: (0, index_1.BrainSubscriptionUioToJSON)(requestParameters['brainSubscriptionUio']),
|
|
609
|
-
}, initOverrides);
|
|
610
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrainSubscriptionUioFromJSON)(jsonValue));
|
|
611
|
-
}
|
|
612
|
-
/**
|
|
613
|
-
* Sets or updates a subscription plan for a brain (admin only)
|
|
614
|
-
* Update brain subscription
|
|
615
|
-
*/
|
|
616
|
-
async updateBrainSubscription(requestParameters, initOverrides) {
|
|
617
|
-
const response = await this.updateBrainSubscriptionRaw(requestParameters, initOverrides);
|
|
618
|
-
return await response.value();
|
|
619
|
-
}
|
|
620
|
-
/**
|
|
621
|
-
* Updates an existing conversation flow
|
|
622
|
-
* Update a flow
|
|
623
|
-
*/
|
|
624
|
-
async updateFlowRaw(requestParameters, initOverrides) {
|
|
625
|
-
if (requestParameters['brainId'] == null) {
|
|
626
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" was null or undefined when calling updateFlow().');
|
|
627
|
-
}
|
|
628
|
-
if (requestParameters['flowId'] == null) {
|
|
629
|
-
throw new runtime.RequiredError('flowId', 'Required parameter "flowId" was null or undefined when calling updateFlow().');
|
|
630
|
-
}
|
|
631
|
-
if (requestParameters['brainFlowUio'] == null) {
|
|
632
|
-
throw new runtime.RequiredError('brainFlowUio', 'Required parameter "brainFlowUio" was null or undefined when calling updateFlow().');
|
|
633
|
-
}
|
|
634
|
-
const queryParameters = {};
|
|
635
|
-
const headerParameters = {};
|
|
636
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
637
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
638
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
639
|
-
}
|
|
640
|
-
const response = await this.request({
|
|
641
|
-
path: `/brains/{brainId}/flows/{flowId}`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters['flowId']))),
|
|
642
|
-
method: 'PUT',
|
|
643
|
-
headers: headerParameters,
|
|
644
|
-
query: queryParameters,
|
|
645
|
-
body: (0, index_1.BrainFlowUioToJSON)(requestParameters['brainFlowUio']),
|
|
646
|
-
}, initOverrides);
|
|
647
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BrainFlowUioFromJSON)(jsonValue));
|
|
648
|
-
}
|
|
649
|
-
/**
|
|
650
|
-
* Updates an existing conversation flow
|
|
651
|
-
* Update a flow
|
|
652
|
-
*/
|
|
653
|
-
async updateFlow(requestParameters, initOverrides) {
|
|
654
|
-
const response = await this.updateFlowRaw(requestParameters, initOverrides);
|
|
655
|
-
return await response.value();
|
|
656
|
-
}
|
|
657
|
-
/**
|
|
658
|
-
* Uploads a profile image for a brain and returns an upload URL
|
|
659
|
-
* Upload brain profile image
|
|
660
|
-
*/
|
|
661
|
-
async uploadBrainProfileImageRaw(requestParameters, initOverrides) {
|
|
662
|
-
if (requestParameters['brainId'] == null) {
|
|
663
|
-
throw new runtime.RequiredError('brainId', 'Required parameter "brainId" was null or undefined when calling uploadBrainProfileImage().');
|
|
664
|
-
}
|
|
665
|
-
if (requestParameters['fileCreationRequestUio'] == null) {
|
|
666
|
-
throw new runtime.RequiredError('fileCreationRequestUio', 'Required parameter "fileCreationRequestUio" was null or undefined when calling uploadBrainProfileImage().');
|
|
667
|
-
}
|
|
668
|
-
const queryParameters = {};
|
|
669
|
-
const headerParameters = {};
|
|
670
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
671
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
672
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
673
|
-
}
|
|
674
|
-
const response = await this.request({
|
|
675
|
-
path: `/brains/{brainId}/files`.replace(`{${"brainId"}}`, encodeURIComponent(String(requestParameters['brainId']))),
|
|
676
|
-
method: 'POST',
|
|
677
|
-
headers: headerParameters,
|
|
678
|
-
query: queryParameters,
|
|
679
|
-
body: (0, index_1.FileCreationRequestUioToJSON)(requestParameters['fileCreationRequestUio']),
|
|
680
|
-
}, initOverrides);
|
|
681
|
-
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
682
|
-
return new runtime.JSONApiResponse(response);
|
|
683
|
-
}
|
|
684
|
-
else {
|
|
685
|
-
return new runtime.TextApiResponse(response);
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
/**
|
|
689
|
-
* Uploads a profile image for a brain and returns an upload URL
|
|
690
|
-
* Upload brain profile image
|
|
691
|
-
*/
|
|
692
|
-
async uploadBrainProfileImage(requestParameters, initOverrides) {
|
|
693
|
-
const response = await this.uploadBrainProfileImageRaw(requestParameters, initOverrides);
|
|
694
|
-
return await response.value();
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
exports.BrainApi = BrainApi;
|