@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,436 @@
|
|
|
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.KnowledgeApi = void 0;
|
|
50
|
+
const runtime = __importStar(require("../runtime"));
|
|
51
|
+
const index_1 = require("../models/index");
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
class KnowledgeApi extends runtime.BaseAPI {
|
|
56
|
+
/**
|
|
57
|
+
* Adds a text document to the agent\'s knowledge base, splitting it into chunks if necessary
|
|
58
|
+
* Add a document to agent\'s knowledge base
|
|
59
|
+
*/
|
|
60
|
+
async addDocumentToKnowledgeBaseRaw(requestParameters, initOverrides) {
|
|
61
|
+
if (requestParameters['agentId'] == null) {
|
|
62
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling addDocumentToKnowledgeBase().');
|
|
63
|
+
}
|
|
64
|
+
if (requestParameters['documentAddRequestUio'] == null) {
|
|
65
|
+
throw new runtime.RequiredError('documentAddRequestUio', 'Required parameter "documentAddRequestUio" was null or undefined when calling addDocumentToKnowledgeBase().');
|
|
66
|
+
}
|
|
67
|
+
const queryParameters = {};
|
|
68
|
+
if (requestParameters['noSplit'] != null) {
|
|
69
|
+
queryParameters['noSplit'] = requestParameters['noSplit'];
|
|
70
|
+
}
|
|
71
|
+
const headerParameters = {};
|
|
72
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
73
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
74
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
75
|
+
}
|
|
76
|
+
const response = await this.request({
|
|
77
|
+
path: `/agents/{agentId}/knowledge/documents`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
78
|
+
method: 'POST',
|
|
79
|
+
headers: headerParameters,
|
|
80
|
+
query: queryParameters,
|
|
81
|
+
body: (0, index_1.DocumentAddRequestUioToJSON)(requestParameters['documentAddRequestUio']),
|
|
82
|
+
}, initOverrides);
|
|
83
|
+
return new runtime.VoidApiResponse(response);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Adds a text document to the agent\'s knowledge base, splitting it into chunks if necessary
|
|
87
|
+
* Add a document to agent\'s knowledge base
|
|
88
|
+
*/
|
|
89
|
+
async addDocumentToKnowledgeBase(agentId, documentAddRequestUio, noSplit, initOverrides) {
|
|
90
|
+
await this.addDocumentToKnowledgeBaseRaw({ agentId: agentId, documentAddRequestUio: documentAddRequestUio, noSplit: noSplit }, initOverrides);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Add a file to the knowledge base
|
|
94
|
+
* Add a file to the knowledge base
|
|
95
|
+
*/
|
|
96
|
+
async addFileToKnowledgeBaseRaw(requestParameters, initOverrides) {
|
|
97
|
+
if (requestParameters['organizationId'] == null) {
|
|
98
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling addFileToKnowledgeBase().');
|
|
99
|
+
}
|
|
100
|
+
if (requestParameters['fileCreationRequestUio'] == null) {
|
|
101
|
+
throw new runtime.RequiredError('fileCreationRequestUio', 'Required parameter "fileCreationRequestUio" was null or undefined when calling addFileToKnowledgeBase().');
|
|
102
|
+
}
|
|
103
|
+
const queryParameters = {};
|
|
104
|
+
const headerParameters = {};
|
|
105
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
106
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
107
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
108
|
+
}
|
|
109
|
+
const response = await this.request({
|
|
110
|
+
path: `/organizations/{organizationId}/knowledge/files`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
111
|
+
method: 'POST',
|
|
112
|
+
headers: headerParameters,
|
|
113
|
+
query: queryParameters,
|
|
114
|
+
body: (0, index_1.FileCreationRequestUioToJSON)(requestParameters['fileCreationRequestUio']),
|
|
115
|
+
}, initOverrides);
|
|
116
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.FileCreationResponseUioFromJSON)(jsonValue));
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Add a file to the knowledge base
|
|
120
|
+
* Add a file to the knowledge base
|
|
121
|
+
*/
|
|
122
|
+
async addFileToKnowledgeBase(organizationId, fileCreationRequestUio, initOverrides) {
|
|
123
|
+
const response = await this.addFileToKnowledgeBaseRaw({ organizationId: organizationId, fileCreationRequestUio: fileCreationRequestUio }, initOverrides);
|
|
124
|
+
return await response.value();
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Create a new module for an organization
|
|
128
|
+
* Create a new module for an organization
|
|
129
|
+
*/
|
|
130
|
+
async createModuleForOrganizationRaw(requestParameters, initOverrides) {
|
|
131
|
+
if (requestParameters['organizationId'] == null) {
|
|
132
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling createModuleForOrganization().');
|
|
133
|
+
}
|
|
134
|
+
if (requestParameters['agentModuleUio'] == null) {
|
|
135
|
+
throw new runtime.RequiredError('agentModuleUio', 'Required parameter "agentModuleUio" was null or undefined when calling createModuleForOrganization().');
|
|
136
|
+
}
|
|
137
|
+
const queryParameters = {};
|
|
138
|
+
const headerParameters = {};
|
|
139
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
140
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
141
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
142
|
+
}
|
|
143
|
+
const response = await this.request({
|
|
144
|
+
path: `/organizations/{organizationId}/modules`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
145
|
+
method: 'POST',
|
|
146
|
+
headers: headerParameters,
|
|
147
|
+
query: queryParameters,
|
|
148
|
+
body: (0, index_1.AgentModuleUioToJSON)(requestParameters['agentModuleUio']),
|
|
149
|
+
}, initOverrides);
|
|
150
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AgentModuleUioFromJSON)(jsonValue));
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Create a new module for an organization
|
|
154
|
+
* Create a new module for an organization
|
|
155
|
+
*/
|
|
156
|
+
async createModuleForOrganization(organizationId, agentModuleUio, initOverrides) {
|
|
157
|
+
const response = await this.createModuleForOrganizationRaw({ organizationId: organizationId, agentModuleUio: agentModuleUio }, initOverrides);
|
|
158
|
+
return await response.value();
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Removes a file and its associated chunks from the agent\'s knowledge base
|
|
162
|
+
* Delete a knowledge file from an agent
|
|
163
|
+
*/
|
|
164
|
+
async deleteFileFromAgentKnowledgeRaw(requestParameters, initOverrides) {
|
|
165
|
+
if (requestParameters['agentId'] == null) {
|
|
166
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling deleteFileFromAgentKnowledge().');
|
|
167
|
+
}
|
|
168
|
+
if (requestParameters['fileId'] == null) {
|
|
169
|
+
throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling deleteFileFromAgentKnowledge().');
|
|
170
|
+
}
|
|
171
|
+
const queryParameters = {};
|
|
172
|
+
const headerParameters = {};
|
|
173
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
174
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
175
|
+
}
|
|
176
|
+
const response = await this.request({
|
|
177
|
+
path: `/agents/{agentId}/knowledge/files/{fileId}`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
|
|
178
|
+
method: 'DELETE',
|
|
179
|
+
headers: headerParameters,
|
|
180
|
+
query: queryParameters,
|
|
181
|
+
}, initOverrides);
|
|
182
|
+
return new runtime.VoidApiResponse(response);
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Removes a file and its associated chunks from the agent\'s knowledge base
|
|
186
|
+
* Delete a knowledge file from an agent
|
|
187
|
+
*/
|
|
188
|
+
async deleteFileFromAgentKnowledge(agentId, fileId, initOverrides) {
|
|
189
|
+
await this.deleteFileFromAgentKnowledgeRaw({ agentId: agentId, fileId: fileId }, initOverrides);
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Retrieves metadata for a file that has been imported into the agent\'s knowledge base
|
|
193
|
+
* Get a specific knowledge file from an agent
|
|
194
|
+
*/
|
|
195
|
+
async getFileFromAgentKnowledgeRaw(requestParameters, initOverrides) {
|
|
196
|
+
if (requestParameters['agentId'] == null) {
|
|
197
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getFileFromAgentKnowledge().');
|
|
198
|
+
}
|
|
199
|
+
if (requestParameters['fileId'] == null) {
|
|
200
|
+
throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling getFileFromAgentKnowledge().');
|
|
201
|
+
}
|
|
202
|
+
const queryParameters = {};
|
|
203
|
+
const headerParameters = {};
|
|
204
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
205
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
206
|
+
}
|
|
207
|
+
const response = await this.request({
|
|
208
|
+
path: `/agents/{agentId}/knowledge/files/{fileId}`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
|
|
209
|
+
method: 'GET',
|
|
210
|
+
headers: headerParameters,
|
|
211
|
+
query: queryParameters,
|
|
212
|
+
}, initOverrides);
|
|
213
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.FileWithDownloadUrlUioFromJSON)(jsonValue));
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Retrieves metadata for a file that has been imported into the agent\'s knowledge base
|
|
217
|
+
* Get a specific knowledge file from an agent
|
|
218
|
+
*/
|
|
219
|
+
async getFileFromAgentKnowledge(agentId, fileId, initOverrides) {
|
|
220
|
+
const response = await this.getFileFromAgentKnowledgeRaw({ agentId: agentId, fileId: fileId }, initOverrides);
|
|
221
|
+
return await response.value();
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Processes documents like PDFs, CSVs, and text files, and adds them to the brain\'s knowledge base
|
|
225
|
+
* Upload and import a file into the brain\'s knowledge base
|
|
226
|
+
*/
|
|
227
|
+
async importFileToAgentKnowledgeRaw(requestParameters, initOverrides) {
|
|
228
|
+
if (requestParameters['agentId'] == null) {
|
|
229
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling importFileToAgentKnowledge().');
|
|
230
|
+
}
|
|
231
|
+
if (requestParameters['file'] == null) {
|
|
232
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling importFileToAgentKnowledge().');
|
|
233
|
+
}
|
|
234
|
+
const queryParameters = {};
|
|
235
|
+
const headerParameters = {};
|
|
236
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
237
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
238
|
+
}
|
|
239
|
+
const consumes = [
|
|
240
|
+
{ contentType: 'multipart/form-data' },
|
|
241
|
+
];
|
|
242
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
243
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
244
|
+
let formParams;
|
|
245
|
+
let useForm = false;
|
|
246
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
247
|
+
useForm = canConsumeForm;
|
|
248
|
+
if (useForm) {
|
|
249
|
+
formParams = new FormData();
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
formParams = new URLSearchParams();
|
|
253
|
+
}
|
|
254
|
+
if (requestParameters['file'] != null) {
|
|
255
|
+
formParams.append('file', requestParameters['file']);
|
|
256
|
+
}
|
|
257
|
+
const response = await this.request({
|
|
258
|
+
path: `/agents/{agentId}/knowledge/file-imports`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
259
|
+
method: 'POST',
|
|
260
|
+
headers: headerParameters,
|
|
261
|
+
query: queryParameters,
|
|
262
|
+
body: formParams,
|
|
263
|
+
}, initOverrides);
|
|
264
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ImportFileToAgentKnowledge200ResponseUioFromJSON)(jsonValue));
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Processes documents like PDFs, CSVs, and text files, and adds them to the brain\'s knowledge base
|
|
268
|
+
* Upload and import a file into the brain\'s knowledge base
|
|
269
|
+
*/
|
|
270
|
+
async importFileToAgentKnowledge(agentId, file, initOverrides) {
|
|
271
|
+
const response = await this.importFileToAgentKnowledgeRaw({ agentId: agentId, file: file }, initOverrides);
|
|
272
|
+
return await response.value();
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Imports project data from a local JSON file into the agent\'s knowledge base
|
|
276
|
+
* Import projects into agent knowledge
|
|
277
|
+
*/
|
|
278
|
+
async importProjectsToAgentKnowledgeRaw(requestParameters, initOverrides) {
|
|
279
|
+
if (requestParameters['agentId'] == null) {
|
|
280
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling importProjectsToAgentKnowledge().');
|
|
281
|
+
}
|
|
282
|
+
const queryParameters = {};
|
|
283
|
+
const headerParameters = {};
|
|
284
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
285
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
286
|
+
}
|
|
287
|
+
const response = await this.request({
|
|
288
|
+
path: `/agents/{agentId}/knowledge/project-imports`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
289
|
+
method: 'POST',
|
|
290
|
+
headers: headerParameters,
|
|
291
|
+
query: queryParameters,
|
|
292
|
+
}, initOverrides);
|
|
293
|
+
return new runtime.VoidApiResponse(response);
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Imports project data from a local JSON file into the agent\'s knowledge base
|
|
297
|
+
* Import projects into agent knowledge
|
|
298
|
+
*/
|
|
299
|
+
async importProjectsToAgentKnowledge(agentId, initOverrides) {
|
|
300
|
+
await this.importProjectsToAgentKnowledgeRaw({ agentId: agentId }, initOverrides);
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Registers a file for upload to the brain\'s knowledge base and returns an upload URL
|
|
304
|
+
* Prepare file upload for knowledge base
|
|
305
|
+
*/
|
|
306
|
+
async prepareFileUploadRaw(requestParameters, initOverrides) {
|
|
307
|
+
if (requestParameters['agentId'] == null) {
|
|
308
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling prepareFileUpload().');
|
|
309
|
+
}
|
|
310
|
+
if (requestParameters['fileCreationRequestUio'] == null) {
|
|
311
|
+
throw new runtime.RequiredError('fileCreationRequestUio', 'Required parameter "fileCreationRequestUio" was null or undefined when calling prepareFileUpload().');
|
|
312
|
+
}
|
|
313
|
+
const queryParameters = {};
|
|
314
|
+
const headerParameters = {};
|
|
315
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
316
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
317
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
318
|
+
}
|
|
319
|
+
const response = await this.request({
|
|
320
|
+
path: `/agents/{agentId}/knowledge/files`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
321
|
+
method: 'POST',
|
|
322
|
+
headers: headerParameters,
|
|
323
|
+
query: queryParameters,
|
|
324
|
+
body: (0, index_1.FileCreationRequestUioToJSON)(requestParameters['fileCreationRequestUio']),
|
|
325
|
+
}, initOverrides);
|
|
326
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.FileCreationResponseUioFromJSON)(jsonValue));
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Registers a file for upload to the brain\'s knowledge base and returns an upload URL
|
|
330
|
+
* Prepare file upload for knowledge base
|
|
331
|
+
*/
|
|
332
|
+
async prepareFileUpload(agentId, fileCreationRequestUio, initOverrides) {
|
|
333
|
+
const response = await this.prepareFileUploadRaw({ agentId: agentId, fileCreationRequestUio: fileCreationRequestUio }, initOverrides);
|
|
334
|
+
return await response.value();
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Deletes all knowledge embeddings and files associated with an agent
|
|
338
|
+
* Reset all knowledge for an agent
|
|
339
|
+
*/
|
|
340
|
+
async resetAgentKnowledgeRaw(requestParameters, initOverrides) {
|
|
341
|
+
if (requestParameters['agentId'] == null) {
|
|
342
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling resetAgentKnowledge().');
|
|
343
|
+
}
|
|
344
|
+
const queryParameters = {};
|
|
345
|
+
const headerParameters = {};
|
|
346
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
347
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
348
|
+
}
|
|
349
|
+
const response = await this.request({
|
|
350
|
+
path: `/agents/{agentId}/knowledge/resets`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))),
|
|
351
|
+
method: 'POST',
|
|
352
|
+
headers: headerParameters,
|
|
353
|
+
query: queryParameters,
|
|
354
|
+
}, initOverrides);
|
|
355
|
+
return new runtime.VoidApiResponse(response);
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Deletes all knowledge embeddings and files associated with an agent
|
|
359
|
+
* Reset all knowledge for an agent
|
|
360
|
+
*/
|
|
361
|
+
async resetAgentKnowledge(agentId, initOverrides) {
|
|
362
|
+
await this.resetAgentKnowledgeRaw({ agentId: agentId }, initOverrides);
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Reset knowledge base
|
|
366
|
+
* Reset knowledge base
|
|
367
|
+
*/
|
|
368
|
+
async resetKnowledgeBaseRaw(requestParameters, initOverrides) {
|
|
369
|
+
if (requestParameters['organizationId'] == null) {
|
|
370
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling resetKnowledgeBase().');
|
|
371
|
+
}
|
|
372
|
+
const queryParameters = {};
|
|
373
|
+
const headerParameters = {};
|
|
374
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
375
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
376
|
+
}
|
|
377
|
+
const response = await this.request({
|
|
378
|
+
path: `/organizations/{organizationId}/knowledge/resets`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
379
|
+
method: 'POST',
|
|
380
|
+
headers: headerParameters,
|
|
381
|
+
query: queryParameters,
|
|
382
|
+
}, initOverrides);
|
|
383
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BodyWithMessageUioFromJSON)(jsonValue));
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Reset knowledge base
|
|
387
|
+
* Reset knowledge base
|
|
388
|
+
*/
|
|
389
|
+
async resetKnowledgeBase(organizationId, initOverrides) {
|
|
390
|
+
const response = await this.resetKnowledgeBaseRaw({ organizationId: organizationId }, initOverrides);
|
|
391
|
+
return await response.value();
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Updates the status of a knowledge file and triggers the indexing process if the file is uploaded
|
|
395
|
+
* Update file status and trigger indexing
|
|
396
|
+
*/
|
|
397
|
+
async updateFileStatusRaw(requestParameters, initOverrides) {
|
|
398
|
+
if (requestParameters['agentId'] == null) {
|
|
399
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling updateFileStatus().');
|
|
400
|
+
}
|
|
401
|
+
if (requestParameters['fileId'] == null) {
|
|
402
|
+
throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling updateFileStatus().');
|
|
403
|
+
}
|
|
404
|
+
if (requestParameters['fileStatusUpdateRequestUio'] == null) {
|
|
405
|
+
throw new runtime.RequiredError('fileStatusUpdateRequestUio', 'Required parameter "fileStatusUpdateRequestUio" was null or undefined when calling updateFileStatus().');
|
|
406
|
+
}
|
|
407
|
+
const queryParameters = {};
|
|
408
|
+
const headerParameters = {};
|
|
409
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
410
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
411
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
412
|
+
}
|
|
413
|
+
const response = await this.request({
|
|
414
|
+
path: `/agents/{agentId}/knowledge/files/{fileId}/status`.replace(`{${"agentId"}}`, encodeURIComponent(String(requestParameters['agentId']))).replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
|
|
415
|
+
method: 'POST',
|
|
416
|
+
headers: headerParameters,
|
|
417
|
+
query: queryParameters,
|
|
418
|
+
body: (0, index_1.FileStatusUpdateRequestUioToJSON)(requestParameters['fileStatusUpdateRequestUio']),
|
|
419
|
+
}, initOverrides);
|
|
420
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
421
|
+
return new runtime.JSONApiResponse(response);
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
return new runtime.TextApiResponse(response);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Updates the status of a knowledge file and triggers the indexing process if the file is uploaded
|
|
429
|
+
* Update file status and trigger indexing
|
|
430
|
+
*/
|
|
431
|
+
async updateFileStatus(agentId, fileId, fileStatusUpdateRequestUio, initOverrides) {
|
|
432
|
+
const response = await this.updateFileStatusRaw({ agentId: agentId, fileId: fileId, fileStatusUpdateRequestUio: fileStatusUpdateRequestUio }, initOverrides);
|
|
433
|
+
return await response.value();
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
exports.KnowledgeApi = KnowledgeApi;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* brain-client
|
|
3
|
+
* Api ands models for brain-app and brain-app
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.0-SNAPSHOT
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { ManifestCreateRequestUio, ManifestUio } from '../models/index';
|
|
14
|
+
export interface CreateManifestRequest {
|
|
15
|
+
manifestCreateRequestUio: ManifestCreateRequestUio;
|
|
16
|
+
}
|
|
17
|
+
export interface DeleteManifestByIdRequest {
|
|
18
|
+
manifestId: string;
|
|
19
|
+
}
|
|
20
|
+
export interface GetManifestByIdRequest {
|
|
21
|
+
manifestId: string;
|
|
22
|
+
}
|
|
23
|
+
export interface UpdateManifestByIdRequest {
|
|
24
|
+
manifestId: string;
|
|
25
|
+
manifestCreateRequestUio: ManifestCreateRequestUio;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export declare class ManifestsApi extends runtime.BaseAPI {
|
|
31
|
+
/**
|
|
32
|
+
* Creates a new manifest document
|
|
33
|
+
* Create a manifest
|
|
34
|
+
*/
|
|
35
|
+
createManifestRaw(requestParameters: CreateManifestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManifestUio>>;
|
|
36
|
+
/**
|
|
37
|
+
* Creates a new manifest document
|
|
38
|
+
* Create a manifest
|
|
39
|
+
*/
|
|
40
|
+
createManifest(manifestCreateRequestUio: ManifestCreateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManifestUio>;
|
|
41
|
+
/**
|
|
42
|
+
* Deletes a manifest by ID
|
|
43
|
+
* Delete manifest
|
|
44
|
+
*/
|
|
45
|
+
deleteManifestByIdRaw(requestParameters: DeleteManifestByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
46
|
+
/**
|
|
47
|
+
* Deletes a manifest by ID
|
|
48
|
+
* Delete manifest
|
|
49
|
+
*/
|
|
50
|
+
deleteManifestById(manifestId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Retrieves a specific manifest by its ID
|
|
53
|
+
* Get manifest by ID
|
|
54
|
+
*/
|
|
55
|
+
getManifestByIdRaw(requestParameters: GetManifestByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManifestUio>>;
|
|
56
|
+
/**
|
|
57
|
+
* Retrieves a specific manifest by its ID
|
|
58
|
+
* Get manifest by ID
|
|
59
|
+
*/
|
|
60
|
+
getManifestById(manifestId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManifestUio>;
|
|
61
|
+
/**
|
|
62
|
+
* Retrieves manifests, filtered by user ID for non-admin users
|
|
63
|
+
* Get manifests
|
|
64
|
+
*/
|
|
65
|
+
getManifestsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ManifestUio>>>;
|
|
66
|
+
/**
|
|
67
|
+
* Retrieves manifests, filtered by user ID for non-admin users
|
|
68
|
+
* Get manifests
|
|
69
|
+
*/
|
|
70
|
+
getManifests(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ManifestUio>>;
|
|
71
|
+
/**
|
|
72
|
+
* Updates a manifest by ID
|
|
73
|
+
* Update manifest
|
|
74
|
+
*/
|
|
75
|
+
updateManifestByIdRaw(requestParameters: UpdateManifestByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManifestUio>>;
|
|
76
|
+
/**
|
|
77
|
+
* Updates a manifest by ID
|
|
78
|
+
* Update manifest
|
|
79
|
+
*/
|
|
80
|
+
updateManifestById(manifestId: string, manifestCreateRequestUio: ManifestCreateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManifestUio>;
|
|
81
|
+
}
|