mavenagi 1.0.15 → 1.2.0
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/Client.d.ts +9 -4
- package/Client.js +69 -20
- package/README.md +21 -8
- package/api/resources/actions/client/Client.d.ts +42 -4
- package/api/resources/actions/client/Client.js +264 -40
- package/api/resources/actions/client/index.d.ts +1 -0
- package/api/resources/actions/client/index.js +15 -0
- package/api/resources/actions/client/requests/ActionGetRequest.d.ts +13 -0
- package/api/resources/actions/client/requests/index.d.ts +1 -0
- package/api/resources/actions/types/ActionField.d.ts +11 -0
- package/api/resources/actions/types/ActionField.js +13 -0
- package/api/resources/actions/types/ActionFilter.d.ts +14 -0
- package/api/resources/actions/types/ActionPatchRequest.d.ts +12 -0
- package/api/resources/actions/types/ActionsResponse.d.ts +8 -0
- package/api/resources/actions/types/ActionsSearchRequest.d.ts +8 -0
- package/api/resources/actions/types/index.d.ts +5 -0
- package/api/resources/actions/types/index.js +5 -0
- package/api/resources/agents/client/Client.d.ts +75 -4
- package/api/resources/agents/client/Client.js +363 -42
- package/api/resources/agents/types/Agent.d.ts +10 -0
- package/api/resources/agents/types/AgentPatchRequest.d.ts +12 -0
- package/api/resources/agents/types/CreateAgentRequest.d.ts +10 -0
- package/api/resources/agents/types/PiiCategory.d.ts +63 -0
- package/api/resources/agents/types/PiiCategory.js +65 -0
- package/api/resources/agents/types/index.d.ts +3 -0
- package/api/resources/agents/types/index.js +3 -0
- package/api/resources/analytics/client/Client.d.ts +9 -4
- package/api/resources/analytics/client/Client.js +76 -40
- package/api/resources/analytics/types/ConversationTableResponse.d.ts +3 -3
- package/api/resources/appSettings/client/Client.d.ts +9 -4
- package/api/resources/appSettings/client/Client.js +76 -44
- package/api/resources/appSettings/client/index.d.ts +1 -0
- package/api/resources/assets/client/Client.d.ts +76 -0
- package/api/resources/assets/client/Client.js +257 -0
- package/api/resources/assets/types/CommitAssetUploadRequest.d.ts +7 -0
- package/api/resources/assets/types/InitiateAssetUploadRequest.d.ts +6 -0
- package/api/resources/assets/types/InitiateAssetUploadResponse.d.ts +12 -0
- package/api/resources/assets/types/index.d.ts +3 -0
- package/api/resources/assets/types/index.js +19 -0
- package/api/resources/commons/errors/BadRequestError.d.ts +2 -1
- package/api/resources/commons/errors/BadRequestError.js +2 -1
- package/api/resources/commons/errors/NotFoundError.d.ts +2 -1
- package/api/resources/commons/errors/NotFoundError.js +2 -1
- package/api/resources/commons/errors/ServerError.d.ts +2 -1
- package/api/resources/commons/errors/ServerError.js +2 -1
- package/api/resources/commons/types/ActionResponse.d.ts +27 -1
- package/api/resources/commons/types/AppUserRequest.d.ts +2 -2
- package/api/resources/commons/types/AppUserResponse.d.ts +2 -2
- package/api/resources/commons/types/AttachmentRequest.d.ts +22 -0
- package/api/resources/commons/types/AttachmentResponse.d.ts +12 -0
- package/api/resources/commons/types/AttachmentStatus.d.ts +10 -0
- package/api/resources/commons/types/AttachmentStatus.js +12 -0
- package/api/resources/commons/types/BaseAttachment.d.ts +32 -0
- package/api/resources/commons/types/BaseConversationResponse.d.ts +11 -0
- package/api/resources/commons/types/BotLogic.d.ts +7 -0
- package/api/resources/commons/types/BotLogicActionExecutedDetail.d.ts +9 -0
- package/api/resources/commons/types/BotLogicActionItem.d.ts +8 -0
- package/api/resources/commons/types/BotLogicActionReviewedDetail.d.ts +8 -0
- package/api/resources/commons/types/BotLogicFormSubmissionItem.d.ts +6 -0
- package/api/resources/commons/types/BotLogicItem.d.ts +25 -0
- package/{dist/api/resources/commons/types/KnowledgeBaseInformation.d.ts → api/resources/commons/types/BotLogicKnowledgeDetail.d.ts} +4 -2
- package/api/resources/commons/types/BotLogicKnowledgeItem.d.ts +8 -0
- package/api/resources/{realtime/types/AudioPublishEvent.d.ts → commons/types/BotLogicSafetyItem.d.ts} +2 -2
- package/api/resources/commons/types/BotLogicSegmentsItem.d.ts +7 -0
- package/api/resources/{realtime/types/HangUpPublishEvent.d.ts → commons/types/BotLogicUserItem.d.ts} +2 -2
- package/api/resources/commons/types/BotMessage.d.ts +3 -1
- package/api/resources/commons/types/Capability.d.ts +2 -1
- package/api/resources/commons/types/Capability.js +1 -0
- package/api/resources/commons/types/ConversationResponse.d.ts +15 -2
- package/api/resources/commons/types/DocumentInformation.d.ts +2 -0
- package/api/resources/commons/types/EntityType.d.ts +2 -1
- package/api/resources/commons/types/EntityType.js +1 -0
- package/api/resources/commons/types/InboxItem.d.ts +1 -7
- package/api/resources/commons/types/InboxItemBase.d.ts +2 -0
- package/api/resources/commons/types/InboxItemDuplicateDocuments.d.ts +1 -1
- package/api/resources/commons/types/InboxItemFix.d.ts +1 -4
- package/api/resources/commons/types/InboxItemSeverity.d.ts +9 -0
- package/api/resources/commons/types/InboxItemSeverity.js +11 -0
- package/api/resources/commons/types/InboxItemType.d.ts +1 -9
- package/api/resources/commons/types/InboxItemType.js +0 -2
- package/api/resources/commons/types/LlmInclusionStatus.d.ts +9 -0
- package/api/resources/commons/types/LlmInclusionStatus.js +11 -0
- package/api/resources/commons/types/{BotMessageStatus.d.ts → MessageStatus.d.ts} +3 -3
- package/{dist/api/resources/commons/types/BotMessageStatus.js → api/resources/commons/types/MessageStatus.js} +2 -2
- package/api/resources/commons/types/ResponseConfig.d.ts +6 -8
- package/api/resources/commons/types/UserMessage.d.ts +21 -1
- package/api/resources/commons/types/UserMessageResponseState.d.ts +9 -0
- package/api/resources/commons/types/UserMessageResponseState.js +11 -0
- package/api/resources/commons/types/index.d.ts +19 -6
- package/api/resources/commons/types/index.js +19 -6
- package/api/resources/conversation/client/Client.d.ts +111 -51
- package/api/resources/conversation/client/Client.js +603 -222
- package/api/resources/conversation/client/index.d.ts +1 -0
- package/{dist/api/resources/conversation/types/GenerateObjectRequest.d.ts → api/resources/conversation/types/AskObjectRequest.d.ts} +1 -1
- package/api/resources/conversation/types/AskRequest.d.ts +5 -2
- package/api/resources/conversation/types/ConversationField.d.ts +5 -1
- package/api/resources/conversation/types/ConversationField.js +4 -0
- package/api/resources/conversation/types/ConversationFilter.d.ts +23 -1
- package/api/resources/conversation/types/ConversationMessageRequest.d.ts +2 -0
- package/api/resources/conversation/types/ConversationPatchRequest.d.ts +20 -0
- package/api/resources/conversation/types/DeliverConversationMessageRequest.d.ts +10 -0
- package/api/resources/conversation/types/DeliverMessageRequest.d.ts +13 -0
- package/api/resources/conversation/types/DeliverMessageResponse.d.ts +7 -0
- package/api/resources/conversation/types/DeliverUserMessageRequest.d.ts +10 -0
- package/api/resources/conversation/types/DeliveryStatus.d.ts +9 -0
- package/api/resources/conversation/types/DeliveryStatus.js +11 -0
- package/api/resources/conversation/types/NumericConversationField.d.ts +2 -1
- package/api/resources/conversation/types/NumericConversationField.js +1 -0
- package/api/resources/conversation/types/ObjectStreamResponse.d.ts +16 -0
- package/api/resources/conversation/types/index.d.ts +8 -2
- package/api/resources/conversation/types/index.js +8 -2
- package/api/resources/events/client/Client.d.ts +5 -2
- package/api/resources/events/client/Client.js +26 -16
- package/api/resources/inbox/client/Client.d.ts +19 -11
- package/api/resources/inbox/client/Client.js +119 -68
- package/api/resources/inbox/client/index.d.ts +1 -0
- package/api/resources/inbox/types/AddDocumentFixRequest.d.ts +4 -1
- package/api/resources/inbox/types/ApplyFixesRequest.d.ts +12 -0
- package/api/resources/inbox/types/InboxFilter.d.ts +14 -0
- package/api/resources/inbox/types/InboxFilter.js +5 -0
- package/api/resources/inbox/types/InboxSearchRequest.d.ts +2 -9
- package/api/resources/inbox/types/InboxSearchResponse.d.ts +1 -1
- package/api/resources/inbox/types/index.d.ts +2 -2
- package/api/resources/inbox/types/index.js +2 -2
- package/api/resources/index.d.ts +9 -3
- package/api/resources/index.js +10 -4
- package/api/resources/knowledge/client/Client.d.ts +67 -8
- package/api/resources/knowledge/client/Client.js +459 -88
- package/api/resources/knowledge/client/index.d.ts +1 -0
- package/api/resources/knowledge/client/index.js +15 -0
- package/api/resources/knowledge/client/requests/KnowledgeBaseGetRequest.d.ts +13 -0
- package/api/resources/knowledge/client/requests/KnowledgeBaseGetRequest.js +5 -0
- package/api/resources/knowledge/client/requests/index.d.ts +1 -0
- package/api/resources/knowledge/client/requests/index.js +2 -0
- package/api/resources/knowledge/types/KnowledgeBaseField.d.ts +8 -0
- package/api/resources/knowledge/types/KnowledgeBaseField.js +10 -0
- package/api/resources/knowledge/types/KnowledgeBaseFilter.d.ts +26 -0
- package/api/resources/knowledge/types/KnowledgeBaseFilter.js +5 -0
- package/api/resources/knowledge/types/KnowledgeBasePatchRequest.d.ts +16 -0
- package/api/resources/knowledge/types/KnowledgeBasePatchRequest.js +5 -0
- package/api/resources/knowledge/types/KnowledgeBaseProperties.d.ts +1 -1
- package/api/resources/knowledge/types/KnowledgeBaseRefreshFrequency.d.ts +10 -0
- package/api/resources/knowledge/types/KnowledgeBaseRefreshFrequency.js +12 -0
- package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +15 -1
- package/api/resources/knowledge/types/KnowledgeBaseSearchRequest.d.ts +8 -0
- package/api/resources/knowledge/types/KnowledgeBaseSearchRequest.js +5 -0
- package/api/resources/knowledge/types/KnowledgeBasesResponse.d.ts +8 -0
- package/api/resources/knowledge/types/KnowledgeBasesResponse.js +5 -0
- package/api/resources/knowledge/types/KnowledgeDocumentField.d.ts +10 -0
- package/api/resources/knowledge/types/KnowledgeDocumentField.js +12 -0
- package/api/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +26 -0
- package/api/resources/knowledge/types/KnowledgeDocumentFilter.js +5 -0
- package/api/resources/knowledge/types/KnowledgeDocumentSearchRequest.d.ts +8 -0
- package/api/resources/knowledge/types/KnowledgeDocumentSearchRequest.js +5 -0
- package/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +10 -0
- package/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +5 -0
- package/api/resources/knowledge/types/KnowledgeDocumentsResponse.d.ts +8 -0
- package/api/resources/knowledge/types/KnowledgeDocumentsResponse.js +5 -0
- package/api/resources/knowledge/types/index.d.ts +11 -0
- package/api/resources/knowledge/types/index.js +11 -0
- package/api/resources/organizations/client/Client.d.ts +7 -3
- package/api/resources/organizations/client/Client.js +51 -28
- package/api/resources/segments/client/Client.d.ts +120 -0
- package/api/resources/segments/client/Client.js +468 -0
- package/api/resources/segments/client/index.d.ts +2 -0
- package/{core/websocket → api/resources/segments/client}/index.js +1 -1
- package/api/resources/segments/client/requests/SegmentGetRequest.d.ts +13 -0
- package/api/resources/segments/client/requests/SegmentGetRequest.js +5 -0
- package/api/resources/segments/client/requests/index.d.ts +1 -0
- package/api/resources/segments/client/requests/index.js +2 -0
- package/api/resources/segments/types/SegmentBase.d.ts +10 -0
- package/api/resources/segments/types/SegmentBase.js +5 -0
- package/api/resources/segments/types/SegmentField.d.ts +8 -0
- package/api/resources/{realtime/types/AudioFormat.js → segments/types/SegmentField.js} +4 -4
- package/api/resources/segments/types/SegmentPatchRequest.d.ts +14 -0
- package/api/resources/segments/types/SegmentPatchRequest.js +5 -0
- package/api/resources/segments/types/SegmentRequest.d.ts +28 -0
- package/api/resources/segments/types/SegmentRequest.js +5 -0
- package/api/resources/segments/types/SegmentResponse.d.ts +39 -0
- package/api/resources/segments/types/SegmentResponse.js +5 -0
- package/api/resources/segments/types/SegmentStatus.d.ts +8 -0
- package/api/resources/segments/types/SegmentStatus.js +10 -0
- package/api/resources/segments/types/SegmentsSearchRequest.d.ts +8 -0
- package/api/resources/segments/types/SegmentsSearchRequest.js +5 -0
- package/api/resources/segments/types/SegmentsSearchResponse.d.ts +7 -0
- package/api/resources/segments/types/SegmentsSearchResponse.js +5 -0
- package/api/resources/segments/types/index.d.ts +8 -0
- package/api/resources/{realtime → segments}/types/index.js +8 -8
- package/api/resources/translations/client/Client.d.ts +5 -2
- package/api/resources/translations/client/Client.js +26 -16
- package/api/resources/triggers/client/Client.d.ts +13 -6
- package/api/resources/triggers/client/Client.js +118 -63
- package/api/resources/triggers/client/index.d.ts +1 -0
- package/api/resources/users/client/Client.d.ts +49 -10
- package/api/resources/users/client/Client.js +263 -47
- package/api/resources/users/client/index.d.ts +1 -0
- package/api/resources/users/client/requests/UserDeleteRequest.d.ts +1 -1
- package/api/resources/users/client/requests/UserGetRequest.d.ts +1 -1
- package/api/resources/users/index.d.ts +1 -0
- package/api/resources/users/index.js +1 -0
- package/api/resources/users/types/AgentUser.d.ts +24 -0
- package/api/resources/users/types/AgentUser.js +5 -0
- package/api/resources/users/types/AgentUserField.d.ts +8 -0
- package/api/resources/users/types/AgentUserField.js +10 -0
- package/api/resources/users/types/AgentUserFilter.d.ts +12 -0
- package/api/resources/users/types/AgentUserFilter.js +5 -0
- package/api/resources/users/types/AgentUserSearchRequest.d.ts +8 -0
- package/api/resources/users/types/AgentUserSearchRequest.js +5 -0
- package/api/resources/users/types/AgentUserSearchResponse.d.ts +8 -0
- package/api/resources/users/types/AgentUserSearchResponse.js +5 -0
- package/api/resources/users/types/AppUserSummary.d.ts +12 -0
- package/api/resources/users/types/AppUserSummary.js +5 -0
- package/api/resources/users/types/index.d.ts +6 -0
- package/api/resources/users/types/index.js +22 -0
- package/core/auth/BasicAuth.js +3 -3
- package/core/base64.d.ts +2 -0
- package/core/base64.js +26 -0
- package/core/fetcher/APIResponse.d.ts +10 -0
- package/core/fetcher/BinaryResponse.d.ts +20 -0
- package/core/fetcher/BinaryResponse.js +17 -0
- package/core/fetcher/Fetcher.d.ts +3 -2
- package/core/fetcher/Fetcher.js +32 -12
- package/core/fetcher/Headers.d.ts +2 -0
- package/core/fetcher/Headers.js +84 -0
- package/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/core/fetcher/HttpResponsePromise.js +103 -0
- package/core/fetcher/RawResponse.d.ts +29 -0
- package/core/fetcher/RawResponse.js +44 -0
- package/core/fetcher/ResponseWithBody.d.ts +4 -0
- package/core/fetcher/ResponseWithBody.js +6 -0
- package/core/fetcher/createRequestUrl.d.ts +1 -1
- package/core/fetcher/createRequestUrl.js +3 -7
- package/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/core/fetcher/getErrorResponseBody.js +44 -0
- package/core/fetcher/getFetchFn.d.ts +1 -4
- package/core/fetcher/getFetchFn.js +1 -52
- package/core/fetcher/getResponseBody.js +34 -33
- package/core/fetcher/index.d.ts +4 -0
- package/core/fetcher/index.js +7 -1
- package/core/headers.d.ts +3 -0
- package/core/headers.js +29 -0
- package/core/index.d.ts +3 -2
- package/core/index.js +4 -3
- package/core/runtime/runtime.js +0 -1
- package/core/{streaming-fetcher → stream}/Stream.d.ts +1 -2
- package/core/url/index.d.ts +2 -0
- package/core/url/index.js +7 -0
- package/core/url/join.d.ts +1 -0
- package/core/url/join.js +49 -0
- package/core/url/qs.d.ts +6 -0
- package/core/url/qs.js +64 -0
- package/dist/Client.d.ts +9 -4
- package/dist/Client.js +69 -20
- package/dist/api/resources/actions/client/Client.d.ts +42 -4
- package/dist/api/resources/actions/client/Client.js +264 -40
- package/dist/api/resources/actions/client/index.d.ts +1 -0
- package/dist/api/resources/actions/client/index.js +15 -0
- package/dist/api/resources/actions/client/requests/ActionGetRequest.d.ts +13 -0
- package/dist/api/resources/actions/client/requests/ActionGetRequest.js +5 -0
- package/dist/api/resources/actions/client/requests/index.d.ts +1 -0
- package/dist/api/resources/actions/client/requests/index.js +2 -0
- package/dist/api/resources/actions/types/ActionField.d.ts +11 -0
- package/dist/api/resources/actions/types/ActionField.js +13 -0
- package/dist/api/resources/actions/types/ActionFilter.d.ts +14 -0
- package/dist/api/resources/actions/types/ActionFilter.js +5 -0
- package/dist/api/resources/actions/types/ActionPatchRequest.d.ts +12 -0
- package/dist/api/resources/actions/types/ActionPatchRequest.js +5 -0
- package/dist/api/resources/actions/types/ActionsResponse.d.ts +8 -0
- package/dist/api/resources/actions/types/ActionsResponse.js +5 -0
- package/dist/api/resources/actions/types/ActionsSearchRequest.d.ts +8 -0
- package/dist/api/resources/actions/types/ActionsSearchRequest.js +5 -0
- package/dist/api/resources/actions/types/index.d.ts +5 -0
- package/dist/api/resources/actions/types/index.js +5 -0
- package/dist/api/resources/agents/client/Client.d.ts +75 -4
- package/dist/api/resources/agents/client/Client.js +363 -42
- package/dist/api/resources/agents/types/Agent.d.ts +10 -0
- package/dist/api/resources/agents/types/AgentPatchRequest.d.ts +12 -0
- package/dist/api/resources/agents/types/AgentPatchRequest.js +5 -0
- package/dist/api/resources/agents/types/CreateAgentRequest.d.ts +10 -0
- package/dist/api/resources/agents/types/CreateAgentRequest.js +5 -0
- package/dist/api/resources/agents/types/PiiCategory.d.ts +63 -0
- package/dist/api/resources/agents/types/PiiCategory.js +65 -0
- package/dist/api/resources/agents/types/index.d.ts +3 -0
- package/dist/api/resources/agents/types/index.js +3 -0
- package/dist/api/resources/analytics/client/Client.d.ts +9 -4
- package/dist/api/resources/analytics/client/Client.js +76 -40
- package/dist/api/resources/analytics/types/ConversationTableResponse.d.ts +3 -3
- package/dist/api/resources/appSettings/client/Client.d.ts +9 -4
- package/dist/api/resources/appSettings/client/Client.js +76 -44
- package/dist/api/resources/appSettings/client/index.d.ts +1 -0
- package/dist/api/resources/assets/client/Client.d.ts +76 -0
- package/dist/api/resources/assets/client/Client.js +257 -0
- package/dist/api/resources/assets/client/index.js +2 -0
- package/dist/api/resources/assets/index.d.ts +2 -0
- package/dist/api/resources/assets/index.js +18 -0
- package/dist/api/resources/assets/types/CommitAssetUploadRequest.d.ts +7 -0
- package/dist/api/resources/assets/types/CommitAssetUploadRequest.js +5 -0
- package/dist/api/resources/assets/types/InitiateAssetUploadRequest.d.ts +6 -0
- package/dist/api/resources/assets/types/InitiateAssetUploadRequest.js +5 -0
- package/dist/api/resources/assets/types/InitiateAssetUploadResponse.d.ts +12 -0
- package/dist/api/resources/assets/types/InitiateAssetUploadResponse.js +5 -0
- package/dist/api/resources/assets/types/index.d.ts +3 -0
- package/dist/api/resources/assets/types/index.js +19 -0
- package/dist/api/resources/commons/errors/BadRequestError.d.ts +2 -1
- package/dist/api/resources/commons/errors/BadRequestError.js +2 -1
- package/dist/api/resources/commons/errors/NotFoundError.d.ts +2 -1
- package/dist/api/resources/commons/errors/NotFoundError.js +2 -1
- package/dist/api/resources/commons/errors/ServerError.d.ts +2 -1
- package/dist/api/resources/commons/errors/ServerError.js +2 -1
- package/dist/api/resources/commons/types/ActionResponse.d.ts +27 -1
- package/dist/api/resources/commons/types/AppUserRequest.d.ts +2 -2
- package/dist/api/resources/commons/types/AppUserResponse.d.ts +2 -2
- package/dist/api/resources/commons/types/AttachmentRequest.d.ts +22 -0
- package/dist/api/resources/commons/types/AttachmentRequest.js +5 -0
- package/dist/api/resources/commons/types/AttachmentResponse.d.ts +12 -0
- package/dist/api/resources/commons/types/AttachmentResponse.js +5 -0
- package/dist/api/resources/commons/types/AttachmentStatus.d.ts +10 -0
- package/dist/api/resources/commons/types/AttachmentStatus.js +12 -0
- package/dist/api/resources/commons/types/BaseAttachment.d.ts +32 -0
- package/dist/api/resources/commons/types/BaseAttachment.js +5 -0
- package/dist/api/resources/commons/types/BaseConversationResponse.d.ts +11 -0
- package/dist/api/resources/commons/types/BotLogic.d.ts +7 -0
- package/dist/api/resources/commons/types/BotLogic.js +5 -0
- package/dist/api/resources/commons/types/BotLogicActionExecutedDetail.d.ts +9 -0
- package/dist/api/resources/commons/types/BotLogicActionExecutedDetail.js +5 -0
- package/dist/api/resources/commons/types/BotLogicActionItem.d.ts +8 -0
- package/dist/api/resources/commons/types/BotLogicActionItem.js +5 -0
- package/dist/api/resources/commons/types/BotLogicActionReviewedDetail.d.ts +8 -0
- package/dist/api/resources/commons/types/BotLogicActionReviewedDetail.js +5 -0
- package/dist/api/resources/commons/types/BotLogicFormSubmissionItem.d.ts +6 -0
- package/dist/api/resources/commons/types/BotLogicFormSubmissionItem.js +5 -0
- package/dist/api/resources/commons/types/BotLogicItem.d.ts +25 -0
- package/dist/api/resources/commons/types/BotLogicItem.js +5 -0
- package/{api/resources/commons/types/KnowledgeBaseInformation.d.ts → dist/api/resources/commons/types/BotLogicKnowledgeDetail.d.ts} +4 -2
- package/dist/api/resources/commons/types/BotLogicKnowledgeDetail.js +5 -0
- package/dist/api/resources/commons/types/BotLogicKnowledgeItem.d.ts +8 -0
- package/dist/api/resources/commons/types/BotLogicKnowledgeItem.js +5 -0
- package/{api/resources/realtime/types/AudioSubscribeEvent.d.ts → dist/api/resources/commons/types/BotLogicSafetyItem.d.ts} +2 -2
- package/dist/api/resources/commons/types/BotLogicSafetyItem.js +5 -0
- package/dist/api/resources/commons/types/BotLogicSegmentsItem.d.ts +7 -0
- package/dist/api/resources/commons/types/BotLogicSegmentsItem.js +5 -0
- package/{api/resources/realtime/types/MessageBase.d.ts → dist/api/resources/commons/types/BotLogicUserItem.d.ts} +2 -2
- package/dist/api/resources/commons/types/BotLogicUserItem.js +5 -0
- package/dist/api/resources/commons/types/BotMessage.d.ts +3 -1
- package/dist/api/resources/commons/types/Capability.d.ts +2 -1
- package/dist/api/resources/commons/types/Capability.js +1 -0
- package/dist/api/resources/commons/types/ConversationResponse.d.ts +15 -2
- package/dist/api/resources/commons/types/DocumentInformation.d.ts +2 -0
- package/dist/api/resources/commons/types/EntityType.d.ts +2 -1
- package/dist/api/resources/commons/types/EntityType.js +1 -0
- package/dist/api/resources/commons/types/InboxItem.d.ts +1 -7
- package/dist/api/resources/commons/types/InboxItemBase.d.ts +2 -0
- package/dist/api/resources/commons/types/InboxItemDuplicateDocuments.d.ts +1 -1
- package/dist/api/resources/commons/types/InboxItemFix.d.ts +1 -4
- package/dist/api/resources/commons/types/InboxItemSeverity.d.ts +9 -0
- package/dist/api/resources/commons/types/InboxItemSeverity.js +11 -0
- package/dist/api/resources/commons/types/InboxItemType.d.ts +1 -9
- package/dist/api/resources/commons/types/InboxItemType.js +0 -2
- package/dist/api/resources/commons/types/LlmInclusionStatus.d.ts +9 -0
- package/dist/api/resources/commons/types/LlmInclusionStatus.js +11 -0
- package/dist/api/resources/commons/types/{BotMessageStatus.d.ts → MessageStatus.d.ts} +3 -3
- package/{api/resources/commons/types/BotMessageStatus.js → dist/api/resources/commons/types/MessageStatus.js} +2 -2
- package/dist/api/resources/commons/types/ResponseConfig.d.ts +6 -8
- package/dist/api/resources/commons/types/UserMessage.d.ts +21 -1
- package/dist/api/resources/commons/types/UserMessageResponseState.d.ts +9 -0
- package/dist/api/resources/commons/types/UserMessageResponseState.js +11 -0
- package/dist/api/resources/commons/types/index.d.ts +19 -6
- package/dist/api/resources/commons/types/index.js +19 -6
- package/dist/api/resources/conversation/client/Client.d.ts +111 -51
- package/dist/api/resources/conversation/client/Client.js +603 -222
- package/dist/api/resources/conversation/client/index.d.ts +1 -0
- package/{api/resources/conversation/types/GenerateObjectRequest.d.ts → dist/api/resources/conversation/types/AskObjectRequest.d.ts} +1 -1
- package/dist/api/resources/conversation/types/AskObjectRequest.js +5 -0
- package/dist/api/resources/conversation/types/AskRequest.d.ts +5 -2
- package/dist/api/resources/conversation/types/ConversationField.d.ts +5 -1
- package/dist/api/resources/conversation/types/ConversationField.js +4 -0
- package/dist/api/resources/conversation/types/ConversationFilter.d.ts +23 -1
- package/dist/api/resources/conversation/types/ConversationMessageRequest.d.ts +2 -0
- package/dist/api/resources/conversation/types/ConversationPatchRequest.d.ts +20 -0
- package/dist/api/resources/conversation/types/ConversationPatchRequest.js +5 -0
- package/dist/api/resources/conversation/types/DeliverConversationMessageRequest.d.ts +10 -0
- package/dist/api/resources/conversation/types/DeliverConversationMessageRequest.js +5 -0
- package/dist/api/resources/conversation/types/DeliverMessageRequest.d.ts +13 -0
- package/dist/api/resources/conversation/types/DeliverMessageRequest.js +5 -0
- package/dist/api/resources/conversation/types/DeliverMessageResponse.d.ts +7 -0
- package/dist/api/resources/conversation/types/DeliverMessageResponse.js +5 -0
- package/dist/api/resources/conversation/types/DeliverUserMessageRequest.d.ts +10 -0
- package/dist/api/resources/conversation/types/DeliverUserMessageRequest.js +5 -0
- package/dist/api/resources/conversation/types/DeliveryStatus.d.ts +9 -0
- package/dist/api/resources/conversation/types/DeliveryStatus.js +11 -0
- package/dist/api/resources/conversation/types/NumericConversationField.d.ts +2 -1
- package/dist/api/resources/conversation/types/NumericConversationField.js +1 -0
- package/dist/api/resources/conversation/types/ObjectStreamResponse.d.ts +16 -0
- package/dist/api/resources/conversation/types/ObjectStreamResponse.js +5 -0
- package/dist/api/resources/conversation/types/index.d.ts +8 -2
- package/dist/api/resources/conversation/types/index.js +8 -2
- package/dist/api/resources/events/client/Client.d.ts +5 -2
- package/dist/api/resources/events/client/Client.js +26 -16
- package/dist/api/resources/inbox/client/Client.d.ts +19 -11
- package/dist/api/resources/inbox/client/Client.js +119 -68
- package/dist/api/resources/inbox/client/index.d.ts +1 -0
- package/dist/api/resources/inbox/types/AddDocumentFixRequest.d.ts +4 -1
- package/dist/api/resources/inbox/types/ApplyFixesRequest.d.ts +12 -0
- package/dist/api/resources/inbox/types/ApplyFixesRequest.js +5 -0
- package/dist/api/resources/inbox/types/InboxFilter.d.ts +14 -0
- package/dist/api/resources/inbox/types/InboxFilter.js +5 -0
- package/dist/api/resources/inbox/types/InboxSearchRequest.d.ts +2 -9
- package/dist/api/resources/inbox/types/InboxSearchResponse.d.ts +1 -1
- package/dist/api/resources/inbox/types/index.d.ts +2 -2
- package/dist/api/resources/inbox/types/index.js +2 -2
- package/dist/api/resources/index.d.ts +9 -3
- package/dist/api/resources/index.js +10 -4
- package/dist/api/resources/knowledge/client/Client.d.ts +67 -8
- package/dist/api/resources/knowledge/client/Client.js +459 -88
- package/dist/api/resources/knowledge/client/index.d.ts +1 -0
- package/dist/api/resources/knowledge/client/index.js +15 -0
- package/dist/api/resources/knowledge/client/requests/KnowledgeBaseGetRequest.d.ts +13 -0
- package/dist/api/resources/knowledge/client/requests/KnowledgeBaseGetRequest.js +5 -0
- package/dist/api/resources/knowledge/client/requests/index.d.ts +1 -0
- package/dist/api/resources/knowledge/client/requests/index.js +2 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseField.d.ts +8 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseField.js +10 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseFilter.d.ts +26 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseFilter.js +5 -0
- package/dist/api/resources/knowledge/types/KnowledgeBasePatchRequest.d.ts +16 -0
- package/dist/api/resources/knowledge/types/KnowledgeBasePatchRequest.js +5 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseProperties.d.ts +1 -1
- package/dist/api/resources/knowledge/types/KnowledgeBaseRefreshFrequency.d.ts +10 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseRefreshFrequency.js +12 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +15 -1
- package/dist/api/resources/knowledge/types/KnowledgeBaseSearchRequest.d.ts +8 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseSearchRequest.js +5 -0
- package/dist/api/resources/knowledge/types/KnowledgeBasesResponse.d.ts +8 -0
- package/dist/api/resources/knowledge/types/KnowledgeBasesResponse.js +5 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentField.d.ts +10 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentField.js +12 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +26 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentFilter.js +5 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentSearchRequest.d.ts +8 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentSearchRequest.js +5 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +10 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +5 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentsResponse.d.ts +8 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentsResponse.js +5 -0
- package/dist/api/resources/knowledge/types/index.d.ts +11 -0
- package/dist/api/resources/knowledge/types/index.js +11 -0
- package/dist/api/resources/organizations/client/Client.d.ts +7 -3
- package/dist/api/resources/organizations/client/Client.js +51 -28
- package/dist/api/resources/segments/client/Client.d.ts +120 -0
- package/dist/api/resources/segments/client/Client.js +468 -0
- package/dist/api/resources/segments/client/index.d.ts +2 -0
- package/dist/{core/websocket → api/resources/segments/client}/index.js +1 -1
- package/dist/api/resources/segments/client/requests/SegmentGetRequest.d.ts +13 -0
- package/dist/api/resources/segments/client/requests/SegmentGetRequest.js +5 -0
- package/dist/api/resources/segments/client/requests/index.d.ts +1 -0
- package/dist/api/resources/segments/client/requests/index.js +2 -0
- package/dist/api/resources/segments/index.d.ts +2 -0
- package/dist/api/resources/segments/index.js +18 -0
- package/dist/api/resources/segments/types/SegmentBase.d.ts +10 -0
- package/dist/api/resources/segments/types/SegmentBase.js +5 -0
- package/dist/api/resources/segments/types/SegmentField.d.ts +8 -0
- package/dist/api/resources/{realtime/types/AudioFormat.js → segments/types/SegmentField.js} +4 -4
- package/dist/api/resources/segments/types/SegmentPatchRequest.d.ts +14 -0
- package/dist/api/resources/segments/types/SegmentPatchRequest.js +5 -0
- package/dist/api/resources/segments/types/SegmentRequest.d.ts +28 -0
- package/dist/api/resources/segments/types/SegmentRequest.js +5 -0
- package/dist/api/resources/segments/types/SegmentResponse.d.ts +39 -0
- package/dist/api/resources/segments/types/SegmentResponse.js +5 -0
- package/dist/api/resources/segments/types/SegmentStatus.d.ts +8 -0
- package/dist/api/resources/segments/types/SegmentStatus.js +10 -0
- package/dist/api/resources/segments/types/SegmentsSearchRequest.d.ts +8 -0
- package/dist/api/resources/segments/types/SegmentsSearchRequest.js +5 -0
- package/dist/api/resources/segments/types/SegmentsSearchResponse.d.ts +7 -0
- package/dist/api/resources/segments/types/SegmentsSearchResponse.js +5 -0
- package/dist/api/resources/segments/types/index.d.ts +8 -0
- package/dist/api/resources/segments/types/index.js +24 -0
- package/dist/api/resources/translations/client/Client.d.ts +5 -2
- package/dist/api/resources/translations/client/Client.js +26 -16
- package/dist/api/resources/triggers/client/Client.d.ts +13 -6
- package/dist/api/resources/triggers/client/Client.js +118 -63
- package/dist/api/resources/triggers/client/index.d.ts +1 -0
- package/dist/api/resources/users/client/Client.d.ts +49 -10
- package/dist/api/resources/users/client/Client.js +263 -47
- package/dist/api/resources/users/client/index.d.ts +1 -0
- package/dist/api/resources/users/client/requests/UserDeleteRequest.d.ts +1 -1
- package/dist/api/resources/users/client/requests/UserGetRequest.d.ts +1 -1
- package/dist/api/resources/users/index.d.ts +1 -0
- package/dist/api/resources/users/index.js +1 -0
- package/dist/api/resources/users/types/AgentUser.d.ts +24 -0
- package/dist/api/resources/users/types/AgentUser.js +5 -0
- package/dist/api/resources/users/types/AgentUserField.d.ts +8 -0
- package/dist/api/resources/users/types/AgentUserField.js +10 -0
- package/dist/api/resources/users/types/AgentUserFilter.d.ts +12 -0
- package/dist/api/resources/users/types/AgentUserFilter.js +5 -0
- package/dist/api/resources/users/types/AgentUserSearchRequest.d.ts +8 -0
- package/dist/api/resources/users/types/AgentUserSearchRequest.js +5 -0
- package/dist/api/resources/users/types/AgentUserSearchResponse.d.ts +8 -0
- package/dist/api/resources/users/types/AgentUserSearchResponse.js +5 -0
- package/dist/api/resources/users/types/AppUserSummary.d.ts +12 -0
- package/dist/api/resources/users/types/AppUserSummary.js +5 -0
- package/dist/api/resources/users/types/index.d.ts +6 -0
- package/dist/api/resources/users/types/index.js +22 -0
- package/dist/core/auth/BasicAuth.js +3 -3
- package/dist/core/base64.d.ts +2 -0
- package/dist/core/base64.js +26 -0
- package/dist/core/fetcher/APIResponse.d.ts +10 -0
- package/dist/core/fetcher/BinaryResponse.d.ts +20 -0
- package/dist/core/fetcher/BinaryResponse.js +17 -0
- package/dist/core/fetcher/Fetcher.d.ts +3 -2
- package/dist/core/fetcher/Fetcher.js +32 -12
- package/dist/core/fetcher/Headers.d.ts +2 -0
- package/dist/core/fetcher/Headers.js +84 -0
- package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/core/fetcher/HttpResponsePromise.js +103 -0
- package/dist/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/core/fetcher/RawResponse.js +44 -0
- package/dist/core/fetcher/ResponseWithBody.d.ts +4 -0
- package/dist/core/fetcher/ResponseWithBody.js +6 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.js +3 -7
- package/dist/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getErrorResponseBody.js +44 -0
- package/dist/core/fetcher/getFetchFn.d.ts +1 -4
- package/dist/core/fetcher/getFetchFn.js +1 -52
- package/dist/core/fetcher/getResponseBody.js +34 -33
- package/dist/core/fetcher/index.d.ts +4 -0
- package/dist/core/fetcher/index.js +7 -1
- package/dist/core/headers.d.ts +3 -0
- package/dist/core/headers.js +29 -0
- package/dist/core/index.d.ts +3 -2
- package/dist/core/index.js +4 -3
- package/dist/core/runtime/runtime.js +0 -1
- package/dist/core/{streaming-fetcher → stream}/Stream.d.ts +1 -2
- package/dist/core/url/index.d.ts +2 -0
- package/dist/core/url/index.js +7 -0
- package/dist/core/url/join.d.ts +1 -0
- package/dist/core/url/join.js +49 -0
- package/dist/core/url/qs.d.ts +6 -0
- package/dist/core/url/qs.js +64 -0
- package/dist/errors/MavenAGIError.d.ts +4 -1
- package/dist/errors/MavenAGIError.js +4 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/serialization/resources/actions/types/ActionField.d.ts +10 -0
- package/dist/serialization/resources/actions/types/ActionField.js +41 -0
- package/dist/serialization/resources/actions/types/ActionFilter.d.ts +16 -0
- package/dist/serialization/resources/actions/types/ActionFilter.js +47 -0
- package/dist/serialization/resources/actions/types/ActionPatchRequest.d.ts +15 -0
- package/dist/serialization/resources/actions/types/ActionPatchRequest.js +46 -0
- package/dist/serialization/resources/actions/types/ActionsResponse.d.ts +14 -0
- package/dist/serialization/resources/{realtime/types/ControlEvent.js → actions/types/ActionsResponse.js} +6 -7
- package/dist/serialization/resources/actions/types/ActionsSearchRequest.d.ts +16 -0
- package/dist/serialization/resources/actions/types/ActionsSearchRequest.js +49 -0
- package/dist/serialization/resources/actions/types/index.d.ts +5 -0
- package/dist/serialization/resources/actions/types/index.js +5 -0
- package/dist/serialization/resources/agents/types/Agent.d.ts +2 -0
- package/dist/serialization/resources/agents/types/Agent.js +2 -0
- package/dist/serialization/resources/agents/types/AgentPatchRequest.d.ts +16 -0
- package/dist/serialization/resources/agents/types/AgentPatchRequest.js +47 -0
- package/dist/serialization/resources/agents/types/CreateAgentRequest.d.ts +14 -0
- package/dist/serialization/resources/agents/types/CreateAgentRequest.js +45 -0
- package/dist/serialization/resources/agents/types/PiiCategory.d.ts +10 -0
- package/dist/serialization/resources/agents/types/PiiCategory.js +99 -0
- package/dist/serialization/resources/agents/types/index.d.ts +3 -0
- package/dist/serialization/resources/agents/types/index.js +3 -0
- package/dist/serialization/resources/assets/types/CommitAssetUploadRequest.d.ts +12 -0
- package/dist/serialization/resources/assets/types/CommitAssetUploadRequest.js +43 -0
- package/dist/serialization/resources/assets/types/InitiateAssetUploadRequest.d.ts +12 -0
- package/dist/serialization/resources/assets/types/InitiateAssetUploadRequest.js +42 -0
- package/dist/serialization/resources/assets/types/InitiateAssetUploadResponse.d.ts +15 -0
- package/dist/serialization/resources/assets/types/InitiateAssetUploadResponse.js +46 -0
- package/dist/serialization/resources/assets/types/index.d.ts +3 -0
- package/dist/serialization/resources/assets/types/index.js +19 -0
- package/dist/serialization/resources/commons/types/ActionResponse.d.ts +6 -0
- package/dist/serialization/resources/commons/types/ActionResponse.js +6 -0
- package/dist/serialization/resources/commons/types/AttachmentRequest.d.ts +15 -0
- package/dist/serialization/resources/commons/types/AttachmentRequest.js +48 -0
- package/dist/serialization/resources/commons/types/AttachmentResponse.d.ts +16 -0
- package/dist/serialization/resources/commons/types/AttachmentResponse.js +49 -0
- package/dist/serialization/resources/commons/types/AttachmentStatus.d.ts +10 -0
- package/dist/serialization/resources/commons/types/AttachmentStatus.js +41 -0
- package/{serialization/resources/conversation/types/Attachment.d.ts → dist/serialization/resources/commons/types/BaseAttachment.d.ts} +3 -3
- package/dist/serialization/resources/{conversation/types/Attachment.js → commons/types/BaseAttachment.js} +3 -3
- package/dist/serialization/resources/commons/types/BaseConversationResponse.d.ts +2 -0
- package/dist/serialization/resources/commons/types/BaseConversationResponse.js +2 -0
- package/dist/serialization/resources/commons/types/BotLogic.d.ts +13 -0
- package/dist/serialization/resources/commons/types/BotLogic.js +44 -0
- package/dist/serialization/resources/commons/types/BotLogicActionExecutedDetail.d.ts +15 -0
- package/dist/serialization/resources/commons/types/BotLogicActionExecutedDetail.js +48 -0
- package/dist/serialization/resources/commons/types/BotLogicActionItem.d.ts +15 -0
- package/dist/serialization/resources/commons/types/BotLogicActionItem.js +46 -0
- package/dist/serialization/resources/commons/types/BotLogicActionReviewedDetail.d.ts +14 -0
- package/{serialization/resources/commons/types/KnowledgeBaseInformation.js → dist/serialization/resources/commons/types/BotLogicActionReviewedDetail.js} +4 -3
- package/dist/serialization/resources/commons/types/BotLogicFormSubmissionItem.d.ts +12 -0
- package/dist/serialization/resources/commons/types/BotLogicFormSubmissionItem.js +42 -0
- package/dist/serialization/resources/commons/types/BotLogicItem.d.ts +34 -0
- package/dist/serialization/resources/commons/types/BotLogicItem.js +59 -0
- package/{serialization/resources/commons/types/KnowledgeBaseInformation.d.ts → dist/serialization/resources/commons/types/BotLogicKnowledgeDetail.d.ts} +5 -2
- package/dist/serialization/resources/commons/types/BotLogicKnowledgeDetail.js +47 -0
- package/dist/serialization/resources/commons/types/BotLogicKnowledgeItem.d.ts +14 -0
- package/dist/serialization/resources/commons/types/BotLogicKnowledgeItem.js +45 -0
- package/dist/serialization/resources/commons/types/{UserMessageAttachment.d.ts → BotLogicSafetyItem.d.ts} +3 -3
- package/dist/serialization/resources/{realtime/types/AudioPublishEvent.js → commons/types/BotLogicSafetyItem.js} +3 -3
- package/dist/serialization/resources/commons/types/BotLogicSegmentsItem.d.ts +13 -0
- package/dist/serialization/resources/{inbox/types/BaseInboxSearchRequest.js → commons/types/BotLogicSegmentsItem.js} +4 -4
- package/dist/serialization/resources/{realtime/types/AudioPublishEvent.d.ts → commons/types/BotLogicUserItem.d.ts} +3 -3
- package/dist/serialization/resources/commons/types/BotLogicUserItem.js +43 -0
- package/dist/serialization/resources/commons/types/BotMessage.d.ts +4 -2
- package/dist/serialization/resources/commons/types/BotMessage.js +4 -2
- package/dist/serialization/resources/commons/types/Capability.d.ts +1 -1
- package/dist/serialization/resources/commons/types/Capability.js +1 -1
- package/dist/serialization/resources/commons/types/ConversationResponse.d.ts +2 -0
- package/dist/serialization/resources/commons/types/ConversationResponse.js +2 -0
- package/dist/serialization/resources/commons/types/DocumentInformation.d.ts +1 -0
- package/dist/serialization/resources/commons/types/DocumentInformation.js +1 -0
- package/dist/serialization/resources/commons/types/EntityType.d.ts +1 -1
- package/dist/serialization/resources/commons/types/EntityType.js +1 -0
- package/dist/serialization/resources/commons/types/InboxItem.d.ts +1 -9
- package/dist/serialization/resources/commons/types/InboxItem.js +0 -4
- package/dist/serialization/resources/commons/types/InboxItemBase.d.ts +2 -0
- package/dist/serialization/resources/commons/types/InboxItemBase.js +2 -0
- package/dist/serialization/resources/commons/types/InboxItemDuplicateDocuments.d.ts +1 -1
- package/dist/serialization/resources/commons/types/InboxItemDuplicateDocuments.js +1 -1
- package/dist/serialization/resources/commons/types/InboxItemFix.d.ts +1 -5
- package/dist/serialization/resources/commons/types/InboxItemFix.js +0 -2
- package/dist/serialization/resources/commons/types/InboxItemSeverity.d.ts +10 -0
- package/dist/serialization/resources/{realtime/types/MessageBase.js → commons/types/InboxItemSeverity.js} +2 -4
- package/dist/serialization/resources/commons/types/InboxItemType.d.ts +1 -1
- package/dist/serialization/resources/commons/types/InboxItemType.js +1 -6
- package/dist/serialization/resources/commons/types/LlmInclusionStatus.d.ts +10 -0
- package/{serialization/resources/realtime/types/MessageBase.js → dist/serialization/resources/commons/types/LlmInclusionStatus.js} +2 -4
- package/dist/serialization/resources/commons/types/{BotMessageStatus.d.ts → MessageStatus.d.ts} +2 -2
- package/dist/serialization/resources/commons/types/{UserMessageAttachment.js → MessageStatus.js} +2 -4
- package/dist/serialization/resources/commons/types/UserMessage.d.ts +7 -2
- package/dist/serialization/resources/commons/types/UserMessage.js +7 -2
- package/dist/serialization/resources/commons/types/UserMessageResponseState.d.ts +10 -0
- package/dist/serialization/resources/commons/types/UserMessageResponseState.js +41 -0
- package/dist/serialization/resources/commons/types/index.d.ts +19 -6
- package/dist/serialization/resources/commons/types/index.js +19 -6
- package/{serialization/resources/conversation/types/GenerateObjectRequest.d.ts → dist/serialization/resources/conversation/types/AskObjectRequest.d.ts} +2 -2
- package/{serialization/resources/conversation/types/GenerateObjectRequest.js → dist/serialization/resources/conversation/types/AskObjectRequest.js} +2 -2
- package/dist/serialization/resources/conversation/types/AskRequest.d.ts +2 -2
- package/dist/serialization/resources/conversation/types/AskRequest.js +2 -2
- package/dist/serialization/resources/conversation/types/ConversationField.d.ts +1 -1
- package/dist/serialization/resources/conversation/types/ConversationField.js +4 -0
- package/dist/serialization/resources/conversation/types/ConversationFilter.d.ts +1 -0
- package/dist/serialization/resources/conversation/types/ConversationFilter.js +1 -0
- package/dist/serialization/resources/conversation/types/ConversationMessageRequest.d.ts +2 -0
- package/dist/serialization/resources/conversation/types/ConversationMessageRequest.js +2 -0
- package/dist/serialization/resources/conversation/types/ConversationPatchRequest.d.ts +16 -0
- package/dist/serialization/resources/conversation/types/ConversationPatchRequest.js +47 -0
- package/dist/serialization/resources/conversation/types/DeliverConversationMessageRequest.d.ts +15 -0
- package/dist/serialization/resources/conversation/types/DeliverConversationMessageRequest.js +46 -0
- package/dist/serialization/resources/conversation/types/DeliverMessageRequest.d.ts +18 -0
- package/dist/serialization/resources/{realtime/types/PublishEvent.js → conversation/types/DeliverMessageRequest.js} +7 -7
- package/dist/serialization/resources/conversation/types/DeliverMessageResponse.d.ts +13 -0
- package/dist/serialization/resources/conversation/types/DeliverMessageResponse.js +44 -0
- package/dist/serialization/resources/conversation/types/DeliverUserMessageRequest.d.ts +15 -0
- package/dist/serialization/resources/conversation/types/DeliverUserMessageRequest.js +46 -0
- package/{serialization/resources/realtime/types/MessageBase.d.ts → dist/serialization/resources/conversation/types/DeliveryStatus.d.ts} +3 -5
- package/dist/serialization/resources/conversation/types/DeliveryStatus.js +41 -0
- package/dist/serialization/resources/conversation/types/NumericConversationField.d.ts +1 -1
- package/dist/serialization/resources/conversation/types/NumericConversationField.js +1 -0
- package/dist/serialization/resources/conversation/types/ObjectStreamResponse.d.ts +22 -0
- package/dist/serialization/resources/{realtime/types/SubscribeEvent.js → conversation/types/ObjectStreamResponse.js} +9 -10
- package/dist/serialization/resources/conversation/types/index.d.ts +8 -2
- package/dist/serialization/resources/conversation/types/index.js +8 -2
- package/dist/serialization/resources/inbox/types/{ApplyInboxItemFixRequest.d.ts → ApplyFixesRequest.d.ts} +3 -2
- package/{serialization/resources/inbox/types/ApplyInboxItemFixRequest.js → dist/serialization/resources/inbox/types/ApplyFixesRequest.js} +3 -2
- package/dist/serialization/resources/inbox/types/InboxFilter.d.ts +17 -0
- package/dist/serialization/resources/inbox/types/InboxFilter.js +48 -0
- package/dist/serialization/resources/inbox/types/InboxSearchRequest.d.ts +4 -8
- package/dist/serialization/resources/inbox/types/InboxSearchRequest.js +4 -8
- package/dist/serialization/resources/inbox/types/InboxSearchResponse.d.ts +1 -1
- package/dist/serialization/resources/inbox/types/InboxSearchResponse.js +1 -1
- package/dist/serialization/resources/inbox/types/index.d.ts +2 -2
- package/dist/serialization/resources/inbox/types/index.js +2 -2
- package/dist/serialization/resources/index.d.ts +6 -2
- package/dist/serialization/resources/index.js +7 -3
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseField.d.ts +10 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseField.js +41 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseFilter.d.ts +15 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseFilter.js +46 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBasePatchRequest.d.ts +18 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBasePatchRequest.js +49 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseRefreshFrequency.d.ts +10 -0
- package/dist/serialization/resources/{commons/types/BotMessageStatus.js → knowledge/types/KnowledgeBaseRefreshFrequency.js} +2 -2
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +6 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +6 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseSearchRequest.d.ts +16 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseSearchRequest.js +49 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBasesResponse.d.ts +14 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBasesResponse.js +47 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentField.d.ts +10 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentField.js +41 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +15 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentFilter.js +46 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentSearchRequest.d.ts +16 -0
- package/dist/serialization/resources/{commons/types/InboxItemKnowledgeBaseAlert.js → knowledge/types/KnowledgeDocumentSearchRequest.js} +8 -8
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +15 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +48 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentsResponse.d.ts +14 -0
- package/dist/serialization/resources/{commons/types/InboxItemFixDeactivateKnowledgeBase.js → knowledge/types/KnowledgeDocumentsResponse.js} +6 -6
- package/dist/serialization/resources/knowledge/types/index.d.ts +11 -0
- package/dist/serialization/resources/knowledge/types/index.js +11 -0
- package/dist/serialization/resources/segments/types/SegmentBase.d.ts +13 -0
- package/dist/serialization/resources/segments/types/SegmentBase.js +45 -0
- package/{serialization/resources/realtime/types/AudioFormat.d.ts → dist/serialization/resources/segments/types/SegmentField.d.ts} +3 -3
- package/{serialization/resources/realtime/types/AudioFormat.js → dist/serialization/resources/segments/types/SegmentField.js} +2 -2
- package/dist/serialization/resources/segments/types/SegmentPatchRequest.d.ts +16 -0
- package/dist/serialization/resources/segments/types/SegmentPatchRequest.js +48 -0
- package/dist/serialization/resources/segments/types/SegmentRequest.d.ts +14 -0
- package/dist/serialization/resources/segments/types/SegmentRequest.js +47 -0
- package/dist/serialization/resources/segments/types/SegmentResponse.d.ts +16 -0
- package/dist/serialization/resources/segments/types/SegmentResponse.js +49 -0
- package/dist/serialization/resources/{realtime/types/MessageBase.d.ts → segments/types/SegmentStatus.d.ts} +3 -5
- package/dist/serialization/resources/segments/types/SegmentStatus.js +41 -0
- package/dist/serialization/resources/segments/types/SegmentsSearchRequest.d.ts +14 -0
- package/dist/serialization/resources/segments/types/SegmentsSearchRequest.js +47 -0
- package/dist/serialization/resources/segments/types/SegmentsSearchResponse.d.ts +14 -0
- package/{serialization/resources/realtime/types/ControlEvent.js → dist/serialization/resources/segments/types/SegmentsSearchResponse.js} +6 -7
- package/dist/serialization/resources/segments/types/index.d.ts +8 -0
- package/dist/serialization/resources/segments/types/index.js +24 -0
- package/dist/serialization/resources/users/index.d.ts +1 -0
- package/dist/serialization/resources/users/index.js +17 -0
- package/dist/serialization/resources/users/types/AgentUser.d.ts +19 -0
- package/dist/serialization/resources/users/types/AgentUser.js +50 -0
- package/dist/serialization/resources/users/types/AgentUserField.d.ts +10 -0
- package/dist/serialization/resources/users/types/AgentUserField.js +41 -0
- package/dist/serialization/resources/users/types/AgentUserFilter.d.ts +13 -0
- package/dist/serialization/resources/users/types/AgentUserFilter.js +44 -0
- package/dist/serialization/resources/users/types/AgentUserSearchRequest.d.ts +16 -0
- package/dist/serialization/resources/users/types/AgentUserSearchRequest.js +49 -0
- package/dist/serialization/resources/users/types/AgentUserSearchResponse.d.ts +14 -0
- package/dist/serialization/resources/users/types/AgentUserSearchResponse.js +47 -0
- package/dist/serialization/resources/users/types/AppUserSummary.d.ts +16 -0
- package/dist/serialization/resources/users/types/AppUserSummary.js +47 -0
- package/dist/serialization/resources/users/types/index.d.ts +6 -0
- package/dist/serialization/resources/users/types/index.js +22 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/errors/MavenAGIError.d.ts +4 -1
- package/errors/MavenAGIError.js +4 -7
- package/index.d.ts +2 -2
- package/index.js +5 -5
- package/jest.config.mjs +6 -1
- package/package.json +13 -21
- package/reference.md +2051 -753
- package/scripts/rename-to-esm-files.js +10 -2
- package/serialization/resources/actions/types/ActionField.d.ts +10 -0
- package/serialization/resources/actions/types/ActionField.js +41 -0
- package/serialization/resources/actions/types/ActionFilter.d.ts +16 -0
- package/serialization/resources/actions/types/ActionFilter.js +47 -0
- package/serialization/resources/actions/types/ActionPatchRequest.d.ts +15 -0
- package/serialization/resources/actions/types/ActionPatchRequest.js +46 -0
- package/serialization/resources/actions/types/ActionsResponse.d.ts +14 -0
- package/serialization/resources/actions/types/ActionsResponse.js +47 -0
- package/serialization/resources/actions/types/ActionsSearchRequest.d.ts +16 -0
- package/serialization/resources/actions/types/ActionsSearchRequest.js +49 -0
- package/serialization/resources/actions/types/index.d.ts +5 -0
- package/serialization/resources/actions/types/index.js +5 -0
- package/serialization/resources/agents/types/Agent.d.ts +2 -0
- package/serialization/resources/agents/types/Agent.js +2 -0
- package/serialization/resources/agents/types/AgentPatchRequest.d.ts +16 -0
- package/serialization/resources/agents/types/AgentPatchRequest.js +47 -0
- package/serialization/resources/agents/types/CreateAgentRequest.d.ts +14 -0
- package/serialization/resources/agents/types/CreateAgentRequest.js +45 -0
- package/serialization/resources/agents/types/PiiCategory.d.ts +10 -0
- package/serialization/resources/agents/types/PiiCategory.js +99 -0
- package/serialization/resources/agents/types/index.d.ts +3 -0
- package/serialization/resources/agents/types/index.js +3 -0
- package/serialization/resources/assets/index.d.ts +1 -0
- package/serialization/resources/assets/index.js +17 -0
- package/serialization/resources/assets/types/CommitAssetUploadRequest.d.ts +12 -0
- package/serialization/resources/assets/types/CommitAssetUploadRequest.js +43 -0
- package/serialization/resources/assets/types/InitiateAssetUploadRequest.d.ts +12 -0
- package/serialization/resources/assets/types/InitiateAssetUploadRequest.js +42 -0
- package/serialization/resources/assets/types/InitiateAssetUploadResponse.d.ts +15 -0
- package/serialization/resources/assets/types/InitiateAssetUploadResponse.js +46 -0
- package/serialization/resources/assets/types/index.d.ts +3 -0
- package/serialization/resources/assets/types/index.js +19 -0
- package/serialization/resources/commons/types/ActionResponse.d.ts +6 -0
- package/serialization/resources/commons/types/ActionResponse.js +6 -0
- package/serialization/resources/commons/types/AttachmentRequest.d.ts +15 -0
- package/serialization/resources/commons/types/AttachmentRequest.js +48 -0
- package/serialization/resources/commons/types/AttachmentResponse.d.ts +16 -0
- package/serialization/resources/commons/types/AttachmentResponse.js +49 -0
- package/serialization/resources/commons/types/AttachmentStatus.d.ts +10 -0
- package/serialization/resources/commons/types/AttachmentStatus.js +41 -0
- package/{dist/serialization/resources/conversation/types/Attachment.d.ts → serialization/resources/commons/types/BaseAttachment.d.ts} +3 -3
- package/serialization/resources/{conversation/types/Attachment.js → commons/types/BaseAttachment.js} +3 -3
- package/serialization/resources/commons/types/BaseConversationResponse.d.ts +2 -0
- package/serialization/resources/commons/types/BaseConversationResponse.js +2 -0
- package/serialization/resources/commons/types/BotLogic.d.ts +13 -0
- package/serialization/resources/commons/types/BotLogic.js +44 -0
- package/serialization/resources/commons/types/BotLogicActionExecutedDetail.d.ts +15 -0
- package/serialization/resources/commons/types/BotLogicActionExecutedDetail.js +48 -0
- package/serialization/resources/commons/types/BotLogicActionItem.d.ts +15 -0
- package/serialization/resources/commons/types/BotLogicActionItem.js +46 -0
- package/serialization/resources/commons/types/BotLogicActionReviewedDetail.d.ts +14 -0
- package/{dist/serialization/resources/commons/types/KnowledgeBaseInformation.js → serialization/resources/commons/types/BotLogicActionReviewedDetail.js} +4 -3
- package/serialization/resources/commons/types/BotLogicFormSubmissionItem.d.ts +12 -0
- package/serialization/resources/commons/types/BotLogicFormSubmissionItem.js +42 -0
- package/serialization/resources/commons/types/BotLogicItem.d.ts +34 -0
- package/serialization/resources/commons/types/BotLogicItem.js +59 -0
- package/{dist/serialization/resources/commons/types/KnowledgeBaseInformation.d.ts → serialization/resources/commons/types/BotLogicKnowledgeDetail.d.ts} +5 -2
- package/serialization/resources/commons/types/BotLogicKnowledgeDetail.js +47 -0
- package/serialization/resources/commons/types/BotLogicKnowledgeItem.d.ts +14 -0
- package/serialization/resources/commons/types/BotLogicKnowledgeItem.js +45 -0
- package/serialization/resources/commons/types/BotLogicSafetyItem.d.ts +12 -0
- package/{dist/serialization/resources/realtime/types/AudioSubscribeEvent.js → serialization/resources/commons/types/BotLogicSafetyItem.js} +3 -3
- package/serialization/resources/commons/types/BotLogicSegmentsItem.d.ts +13 -0
- package/serialization/resources/commons/types/BotLogicSegmentsItem.js +44 -0
- package/{dist/serialization/resources/realtime/types/AudioSubscribeEvent.d.ts → serialization/resources/commons/types/BotLogicUserItem.d.ts} +3 -3
- package/serialization/resources/commons/types/BotLogicUserItem.js +43 -0
- package/serialization/resources/commons/types/BotMessage.d.ts +4 -2
- package/serialization/resources/commons/types/BotMessage.js +4 -2
- package/serialization/resources/commons/types/Capability.d.ts +1 -1
- package/serialization/resources/commons/types/Capability.js +1 -1
- package/serialization/resources/commons/types/ConversationResponse.d.ts +2 -0
- package/serialization/resources/commons/types/ConversationResponse.js +2 -0
- package/serialization/resources/commons/types/DocumentInformation.d.ts +1 -0
- package/serialization/resources/commons/types/DocumentInformation.js +1 -0
- package/serialization/resources/commons/types/EntityType.d.ts +1 -1
- package/serialization/resources/commons/types/EntityType.js +1 -0
- package/serialization/resources/commons/types/InboxItem.d.ts +1 -9
- package/serialization/resources/commons/types/InboxItem.js +0 -4
- package/serialization/resources/commons/types/InboxItemBase.d.ts +2 -0
- package/serialization/resources/commons/types/InboxItemBase.js +2 -0
- package/serialization/resources/commons/types/InboxItemDuplicateDocuments.d.ts +1 -1
- package/serialization/resources/commons/types/InboxItemDuplicateDocuments.js +1 -1
- package/serialization/resources/commons/types/InboxItemFix.d.ts +1 -5
- package/serialization/resources/commons/types/InboxItemFix.js +0 -2
- package/serialization/resources/commons/types/InboxItemSeverity.d.ts +10 -0
- package/serialization/resources/commons/types/InboxItemSeverity.js +41 -0
- package/serialization/resources/commons/types/InboxItemType.d.ts +1 -1
- package/serialization/resources/commons/types/InboxItemType.js +1 -6
- package/serialization/resources/commons/types/LlmInclusionStatus.d.ts +10 -0
- package/serialization/resources/commons/types/LlmInclusionStatus.js +41 -0
- package/serialization/resources/commons/types/{BotMessageStatus.d.ts → MessageStatus.d.ts} +2 -2
- package/serialization/resources/commons/types/MessageStatus.js +41 -0
- package/serialization/resources/commons/types/UserMessage.d.ts +7 -2
- package/serialization/resources/commons/types/UserMessage.js +7 -2
- package/serialization/resources/commons/types/UserMessageResponseState.d.ts +10 -0
- package/serialization/resources/commons/types/UserMessageResponseState.js +41 -0
- package/serialization/resources/commons/types/index.d.ts +19 -6
- package/serialization/resources/commons/types/index.js +19 -6
- package/{dist/serialization/resources/conversation/types/GenerateObjectRequest.d.ts → serialization/resources/conversation/types/AskObjectRequest.d.ts} +2 -2
- package/{dist/serialization/resources/conversation/types/GenerateObjectRequest.js → serialization/resources/conversation/types/AskObjectRequest.js} +2 -2
- package/serialization/resources/conversation/types/AskRequest.d.ts +2 -2
- package/serialization/resources/conversation/types/AskRequest.js +2 -2
- package/serialization/resources/conversation/types/ConversationField.d.ts +1 -1
- package/serialization/resources/conversation/types/ConversationField.js +4 -0
- package/serialization/resources/conversation/types/ConversationFilter.d.ts +1 -0
- package/serialization/resources/conversation/types/ConversationFilter.js +1 -0
- package/serialization/resources/conversation/types/ConversationMessageRequest.d.ts +2 -0
- package/serialization/resources/conversation/types/ConversationMessageRequest.js +2 -0
- package/serialization/resources/conversation/types/ConversationPatchRequest.d.ts +16 -0
- package/serialization/resources/conversation/types/ConversationPatchRequest.js +47 -0
- package/serialization/resources/conversation/types/DeliverConversationMessageRequest.d.ts +15 -0
- package/serialization/resources/conversation/types/DeliverConversationMessageRequest.js +46 -0
- package/serialization/resources/conversation/types/DeliverMessageRequest.d.ts +18 -0
- package/serialization/resources/{realtime/types/PublishEvent.js → conversation/types/DeliverMessageRequest.js} +7 -7
- package/serialization/resources/conversation/types/DeliverMessageResponse.d.ts +13 -0
- package/serialization/resources/conversation/types/DeliverMessageResponse.js +44 -0
- package/serialization/resources/conversation/types/DeliverUserMessageRequest.d.ts +15 -0
- package/serialization/resources/conversation/types/DeliverUserMessageRequest.js +46 -0
- package/serialization/resources/conversation/types/DeliveryStatus.d.ts +10 -0
- package/serialization/resources/conversation/types/DeliveryStatus.js +41 -0
- package/serialization/resources/conversation/types/NumericConversationField.d.ts +1 -1
- package/serialization/resources/conversation/types/NumericConversationField.js +1 -0
- package/serialization/resources/conversation/types/ObjectStreamResponse.d.ts +22 -0
- package/serialization/resources/{realtime/types/SubscribeEvent.js → conversation/types/ObjectStreamResponse.js} +9 -10
- package/serialization/resources/conversation/types/index.d.ts +8 -2
- package/serialization/resources/conversation/types/index.js +8 -2
- package/serialization/resources/inbox/types/{ApplyInboxItemFixRequest.d.ts → ApplyFixesRequest.d.ts} +3 -2
- package/{dist/serialization/resources/inbox/types/ApplyInboxItemFixRequest.js → serialization/resources/inbox/types/ApplyFixesRequest.js} +3 -2
- package/serialization/resources/inbox/types/InboxFilter.d.ts +17 -0
- package/serialization/resources/inbox/types/InboxFilter.js +48 -0
- package/serialization/resources/inbox/types/InboxSearchRequest.d.ts +4 -8
- package/serialization/resources/inbox/types/InboxSearchRequest.js +4 -8
- package/serialization/resources/inbox/types/InboxSearchResponse.d.ts +1 -1
- package/serialization/resources/inbox/types/InboxSearchResponse.js +1 -1
- package/serialization/resources/inbox/types/index.d.ts +2 -2
- package/serialization/resources/inbox/types/index.js +2 -2
- package/serialization/resources/index.d.ts +6 -2
- package/serialization/resources/index.js +7 -3
- package/serialization/resources/knowledge/types/KnowledgeBaseField.d.ts +10 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseField.js +41 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseFilter.d.ts +15 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseFilter.js +46 -0
- package/serialization/resources/knowledge/types/KnowledgeBasePatchRequest.d.ts +18 -0
- package/serialization/resources/knowledge/types/KnowledgeBasePatchRequest.js +49 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseRefreshFrequency.d.ts +10 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseRefreshFrequency.js +41 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +6 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +6 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseSearchRequest.d.ts +16 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseSearchRequest.js +49 -0
- package/serialization/resources/knowledge/types/KnowledgeBasesResponse.d.ts +14 -0
- package/serialization/resources/knowledge/types/KnowledgeBasesResponse.js +47 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentField.d.ts +10 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentField.js +41 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +15 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentFilter.js +46 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentSearchRequest.d.ts +16 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentSearchRequest.js +49 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +15 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +48 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentsResponse.d.ts +14 -0
- package/serialization/resources/{commons/types/InboxItemFixDeactivateKnowledgeBase.js → knowledge/types/KnowledgeDocumentsResponse.js} +6 -6
- package/serialization/resources/knowledge/types/index.d.ts +11 -0
- package/serialization/resources/knowledge/types/index.js +11 -0
- package/serialization/resources/segments/index.d.ts +1 -0
- package/serialization/resources/segments/index.js +17 -0
- package/serialization/resources/segments/types/SegmentBase.d.ts +13 -0
- package/serialization/resources/segments/types/SegmentBase.js +45 -0
- package/{dist/serialization/resources/realtime/types/AudioFormat.d.ts → serialization/resources/segments/types/SegmentField.d.ts} +3 -3
- package/{dist/serialization/resources/realtime/types/AudioFormat.js → serialization/resources/segments/types/SegmentField.js} +2 -2
- package/serialization/resources/segments/types/SegmentPatchRequest.d.ts +16 -0
- package/serialization/resources/segments/types/SegmentPatchRequest.js +48 -0
- package/serialization/resources/segments/types/SegmentRequest.d.ts +14 -0
- package/serialization/resources/segments/types/SegmentRequest.js +47 -0
- package/serialization/resources/segments/types/SegmentResponse.d.ts +16 -0
- package/serialization/resources/segments/types/SegmentResponse.js +49 -0
- package/serialization/resources/segments/types/SegmentStatus.d.ts +10 -0
- package/serialization/resources/segments/types/SegmentStatus.js +41 -0
- package/serialization/resources/segments/types/SegmentsSearchRequest.d.ts +14 -0
- package/serialization/resources/segments/types/SegmentsSearchRequest.js +47 -0
- package/serialization/resources/segments/types/SegmentsSearchResponse.d.ts +14 -0
- package/serialization/resources/segments/types/SegmentsSearchResponse.js +47 -0
- package/serialization/resources/segments/types/index.d.ts +8 -0
- package/serialization/resources/segments/types/index.js +24 -0
- package/serialization/resources/users/index.d.ts +1 -0
- package/serialization/resources/users/index.js +17 -0
- package/serialization/resources/users/types/AgentUser.d.ts +19 -0
- package/serialization/resources/users/types/AgentUser.js +50 -0
- package/serialization/resources/users/types/AgentUserField.d.ts +10 -0
- package/serialization/resources/users/types/AgentUserField.js +41 -0
- package/serialization/resources/users/types/AgentUserFilter.d.ts +13 -0
- package/serialization/resources/users/types/AgentUserFilter.js +44 -0
- package/serialization/resources/users/types/AgentUserSearchRequest.d.ts +16 -0
- package/serialization/resources/users/types/AgentUserSearchRequest.js +49 -0
- package/serialization/resources/users/types/AgentUserSearchResponse.d.ts +14 -0
- package/serialization/resources/users/types/AgentUserSearchResponse.js +47 -0
- package/serialization/resources/users/types/AppUserSummary.d.ts +16 -0
- package/serialization/resources/users/types/AppUserSummary.js +47 -0
- package/serialization/resources/users/types/index.d.ts +6 -0
- package/serialization/resources/users/types/index.js +22 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/commons/types/InboxItemDuplicateKnowledgeBase.d.ts +0 -12
- package/api/resources/commons/types/InboxItemFixDeactivateKnowledgeBase.d.ts +0 -8
- package/api/resources/commons/types/InboxItemKnowledgeBaseAlert.d.ts +0 -10
- package/api/resources/commons/types/UserMessageAttachment.d.ts +0 -7
- package/api/resources/conversation/types/Attachment.d.ts +0 -9
- package/api/resources/inbox/types/ApplyInboxItemFixRequest.d.ts +0 -9
- package/api/resources/inbox/types/BaseInboxSearchRequest.d.ts +0 -9
- package/api/resources/realtime/client/Client.d.ts +0 -36
- package/api/resources/realtime/client/Client.js +0 -90
- package/api/resources/realtime/client/Socket.d.ts +0 -41
- package/api/resources/realtime/client/Socket.js +0 -155
- package/api/resources/realtime/types/AudioFormat.d.ts +0 -8
- package/api/resources/realtime/types/ControlEvent.d.ts +0 -9
- package/api/resources/realtime/types/PublishEvent.d.ts +0 -16
- package/api/resources/realtime/types/SubscribeEvent.d.ts +0 -25
- package/api/resources/realtime/types/index.d.ts +0 -8
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
- package/core/websocket/events.d.ts +0 -36
- package/core/websocket/events.js +0 -27
- package/core/websocket/index.d.ts +0 -1
- package/core/websocket/ws.d.ts +0 -137
- package/core/websocket/ws.js +0 -452
- package/dist/api/resources/commons/types/InboxItemDuplicateKnowledgeBase.d.ts +0 -12
- package/dist/api/resources/commons/types/InboxItemFixDeactivateKnowledgeBase.d.ts +0 -8
- package/dist/api/resources/commons/types/InboxItemKnowledgeBaseAlert.d.ts +0 -10
- package/dist/api/resources/commons/types/UserMessageAttachment.d.ts +0 -7
- package/dist/api/resources/conversation/types/Attachment.d.ts +0 -9
- package/dist/api/resources/inbox/types/ApplyInboxItemFixRequest.d.ts +0 -9
- package/dist/api/resources/inbox/types/BaseInboxSearchRequest.d.ts +0 -9
- package/dist/api/resources/realtime/client/Client.d.ts +0 -36
- package/dist/api/resources/realtime/client/Client.js +0 -90
- package/dist/api/resources/realtime/client/Socket.d.ts +0 -41
- package/dist/api/resources/realtime/client/Socket.js +0 -155
- package/dist/api/resources/realtime/types/AudioFormat.d.ts +0 -8
- package/dist/api/resources/realtime/types/AudioPublishEvent.d.ts +0 -6
- package/dist/api/resources/realtime/types/AudioSubscribeEvent.d.ts +0 -6
- package/dist/api/resources/realtime/types/ControlEvent.d.ts +0 -9
- package/dist/api/resources/realtime/types/HangUpPublishEvent.d.ts +0 -6
- package/dist/api/resources/realtime/types/MessageBase.d.ts +0 -6
- package/dist/api/resources/realtime/types/PublishEvent.d.ts +0 -16
- package/dist/api/resources/realtime/types/SubscribeEvent.d.ts +0 -25
- package/dist/api/resources/realtime/types/index.d.ts +0 -8
- package/dist/api/resources/realtime/types/index.js +0 -24
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
- package/dist/core/websocket/events.d.ts +0 -36
- package/dist/core/websocket/events.js +0 -27
- package/dist/core/websocket/index.d.ts +0 -1
- package/dist/core/websocket/ws.d.ts +0 -137
- package/dist/core/websocket/ws.js +0 -452
- package/dist/serialization/resources/commons/types/InboxItemDuplicateKnowledgeBase.d.ts +0 -17
- package/dist/serialization/resources/commons/types/InboxItemDuplicateKnowledgeBase.js +0 -50
- package/dist/serialization/resources/commons/types/InboxItemFixDeactivateKnowledgeBase.d.ts +0 -14
- package/dist/serialization/resources/commons/types/InboxItemKnowledgeBaseAlert.d.ts +0 -16
- package/dist/serialization/resources/inbox/types/BaseInboxSearchRequest.d.ts +0 -13
- package/dist/serialization/resources/realtime/types/ControlEvent.d.ts +0 -15
- package/dist/serialization/resources/realtime/types/HangUpPublishEvent.d.ts +0 -12
- package/dist/serialization/resources/realtime/types/HangUpPublishEvent.js +0 -43
- package/dist/serialization/resources/realtime/types/PublishEvent.d.ts +0 -18
- package/dist/serialization/resources/realtime/types/SubscribeEvent.d.ts +0 -27
- package/dist/serialization/resources/realtime/types/index.d.ts +0 -8
- package/dist/serialization/resources/realtime/types/index.js +0 -24
- package/serialization/resources/commons/types/BotMessageStatus.js +0 -41
- package/serialization/resources/commons/types/InboxItemDuplicateKnowledgeBase.d.ts +0 -17
- package/serialization/resources/commons/types/InboxItemDuplicateKnowledgeBase.js +0 -50
- package/serialization/resources/commons/types/InboxItemFixDeactivateKnowledgeBase.d.ts +0 -14
- package/serialization/resources/commons/types/InboxItemKnowledgeBaseAlert.d.ts +0 -16
- package/serialization/resources/commons/types/InboxItemKnowledgeBaseAlert.js +0 -49
- package/serialization/resources/commons/types/UserMessageAttachment.d.ts +0 -12
- package/serialization/resources/commons/types/UserMessageAttachment.js +0 -43
- package/serialization/resources/inbox/types/BaseInboxSearchRequest.d.ts +0 -13
- package/serialization/resources/inbox/types/BaseInboxSearchRequest.js +0 -44
- package/serialization/resources/realtime/types/AudioPublishEvent.d.ts +0 -12
- package/serialization/resources/realtime/types/AudioPublishEvent.js +0 -43
- package/serialization/resources/realtime/types/AudioSubscribeEvent.d.ts +0 -12
- package/serialization/resources/realtime/types/AudioSubscribeEvent.js +0 -43
- package/serialization/resources/realtime/types/ControlEvent.d.ts +0 -15
- package/serialization/resources/realtime/types/HangUpPublishEvent.d.ts +0 -12
- package/serialization/resources/realtime/types/HangUpPublishEvent.js +0 -43
- package/serialization/resources/realtime/types/PublishEvent.d.ts +0 -18
- package/serialization/resources/realtime/types/SubscribeEvent.d.ts +0 -27
- package/serialization/resources/realtime/types/index.d.ts +0 -8
- package/serialization/resources/realtime/types/index.js +0 -24
- /package/api/resources/{commons/types/InboxItemDuplicateKnowledgeBase.js → actions/client/requests/ActionGetRequest.js} +0 -0
- /package/api/resources/{realtime/client → actions/client/requests}/index.js +0 -0
- /package/api/resources/{commons/types/InboxItemFixDeactivateKnowledgeBase.js → actions/types/ActionFilter.js} +0 -0
- /package/api/resources/{commons/types/InboxItemKnowledgeBaseAlert.js → actions/types/ActionPatchRequest.js} +0 -0
- /package/api/resources/{commons/types/KnowledgeBaseInformation.js → actions/types/ActionsResponse.js} +0 -0
- /package/api/resources/{commons/types/UserMessageAttachment.js → actions/types/ActionsSearchRequest.js} +0 -0
- /package/api/resources/{conversation/types/Attachment.js → agents/types/AgentPatchRequest.js} +0 -0
- /package/api/resources/{conversation/types/GenerateObjectRequest.js → agents/types/CreateAgentRequest.js} +0 -0
- /package/api/resources/{realtime → assets}/client/index.d.ts +0 -0
- /package/{dist/api/resources/realtime → api/resources/assets}/client/index.js +0 -0
- /package/api/resources/{realtime → assets}/index.d.ts +0 -0
- /package/api/resources/{realtime → assets}/index.js +0 -0
- /package/api/resources/{inbox/types/ApplyInboxItemFixRequest.js → assets/types/CommitAssetUploadRequest.js} +0 -0
- /package/api/resources/{inbox/types/BaseInboxSearchRequest.js → assets/types/InitiateAssetUploadRequest.js} +0 -0
- /package/api/resources/{realtime/types/AudioPublishEvent.js → assets/types/InitiateAssetUploadResponse.js} +0 -0
- /package/api/resources/{realtime/types/AudioSubscribeEvent.js → commons/types/AttachmentRequest.js} +0 -0
- /package/api/resources/{realtime/types/ControlEvent.js → commons/types/AttachmentResponse.js} +0 -0
- /package/api/resources/{realtime/types/HangUpPublishEvent.js → commons/types/BaseAttachment.js} +0 -0
- /package/api/resources/{realtime/types/MessageBase.js → commons/types/BotLogic.js} +0 -0
- /package/api/resources/{realtime/types/PublishEvent.js → commons/types/BotLogicActionExecutedDetail.js} +0 -0
- /package/api/resources/{realtime/types/SubscribeEvent.js → commons/types/BotLogicActionItem.js} +0 -0
- /package/{dist/api/resources/commons/types/InboxItemDuplicateKnowledgeBase.js → api/resources/commons/types/BotLogicActionReviewedDetail.js} +0 -0
- /package/{dist/api/resources/commons/types/InboxItemFixDeactivateKnowledgeBase.js → api/resources/commons/types/BotLogicFormSubmissionItem.js} +0 -0
- /package/{dist/api/resources/commons/types/InboxItemKnowledgeBaseAlert.js → api/resources/commons/types/BotLogicItem.js} +0 -0
- /package/{dist/api/resources/commons/types/KnowledgeBaseInformation.js → api/resources/commons/types/BotLogicKnowledgeDetail.js} +0 -0
- /package/{dist/api/resources/commons/types/UserMessageAttachment.js → api/resources/commons/types/BotLogicKnowledgeItem.js} +0 -0
- /package/{dist/api/resources/conversation/types/Attachment.js → api/resources/commons/types/BotLogicSafetyItem.js} +0 -0
- /package/{dist/api/resources/conversation/types/GenerateObjectRequest.js → api/resources/commons/types/BotLogicSegmentsItem.js} +0 -0
- /package/{dist/api/resources/inbox/types/ApplyInboxItemFixRequest.js → api/resources/commons/types/BotLogicUserItem.js} +0 -0
- /package/{dist/api/resources/inbox/types/BaseInboxSearchRequest.js → api/resources/conversation/types/AskObjectRequest.js} +0 -0
- /package/{dist/api/resources/realtime/types/AudioPublishEvent.js → api/resources/conversation/types/ConversationPatchRequest.js} +0 -0
- /package/{dist/api/resources/realtime/types/AudioSubscribeEvent.js → api/resources/conversation/types/DeliverConversationMessageRequest.js} +0 -0
- /package/{dist/api/resources/realtime/types/ControlEvent.js → api/resources/conversation/types/DeliverMessageRequest.js} +0 -0
- /package/{dist/api/resources/realtime/types/HangUpPublishEvent.js → api/resources/conversation/types/DeliverMessageResponse.js} +0 -0
- /package/{dist/api/resources/realtime/types/MessageBase.js → api/resources/conversation/types/DeliverUserMessageRequest.js} +0 -0
- /package/{dist/api/resources/realtime/types/PublishEvent.js → api/resources/conversation/types/ObjectStreamResponse.js} +0 -0
- /package/{dist/api/resources/realtime/types/SubscribeEvent.js → api/resources/inbox/types/ApplyFixesRequest.js} +0 -0
- /package/{dist/api/resources/realtime → api/resources/segments}/index.d.ts +0 -0
- /package/{dist/api/resources/realtime → api/resources/segments}/index.js +0 -0
- /package/core/{streaming-fetcher → stream}/Stream.js +0 -0
- /package/core/{streaming-fetcher → stream}/index.d.ts +0 -0
- /package/core/{streaming-fetcher → stream}/index.js +0 -0
- /package/dist/api/resources/{realtime → assets}/client/index.d.ts +0 -0
- /package/dist/core/{streaming-fetcher → stream}/Stream.js +0 -0
- /package/dist/core/{streaming-fetcher → stream}/index.d.ts +0 -0
- /package/dist/core/{streaming-fetcher → stream}/index.js +0 -0
- /package/dist/serialization/resources/{realtime → assets}/index.d.ts +0 -0
- /package/dist/serialization/resources/{realtime → assets}/index.js +0 -0
- /package/{serialization/resources/realtime → dist/serialization/resources/segments}/index.d.ts +0 -0
- /package/{serialization/resources/realtime → dist/serialization/resources/segments}/index.js +0 -0
|
@@ -44,21 +44,111 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
44
44
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
-
};
|
|
50
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
48
|
exports.Knowledge = void 0;
|
|
52
49
|
const environments = __importStar(require("../../../../environments"));
|
|
53
50
|
const core = __importStar(require("../../../../core"));
|
|
54
51
|
const MavenAGI = __importStar(require("../../../index"));
|
|
52
|
+
const headers_1 = require("../../../../core/headers");
|
|
55
53
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
56
|
-
const url_join_1 = __importDefault(require("url-join"));
|
|
57
54
|
const errors = __importStar(require("../../../../errors/index"));
|
|
58
55
|
class Knowledge {
|
|
59
56
|
constructor(_options) {
|
|
60
57
|
this._options = _options;
|
|
61
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Search knowledge bases
|
|
61
|
+
*
|
|
62
|
+
* @param {MavenAGI.KnowledgeBaseSearchRequest} request
|
|
63
|
+
* @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
66
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
67
|
+
* @throws {@link MavenAGI.ServerError}
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* await client.knowledge.searchKnowledgeBases({})
|
|
71
|
+
*/
|
|
72
|
+
searchKnowledgeBases(request, requestOptions) {
|
|
73
|
+
return core.HttpResponsePromise.fromPromise(this.__searchKnowledgeBases(request, requestOptions));
|
|
74
|
+
}
|
|
75
|
+
__searchKnowledgeBases(request, requestOptions) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
var _a, _b, _c, _d;
|
|
78
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
79
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, "/v1/knowledge/search"),
|
|
80
|
+
method: "POST",
|
|
81
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
82
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
83
|
+
"X-Organization-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId,
|
|
84
|
+
"X-Agent-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId,
|
|
85
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
86
|
+
contentType: "application/json",
|
|
87
|
+
requestType: "json",
|
|
88
|
+
body: serializers.KnowledgeBaseSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
89
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
90
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
91
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
92
|
+
});
|
|
93
|
+
if (_response.ok) {
|
|
94
|
+
return {
|
|
95
|
+
data: serializers.KnowledgeBasesResponse.parseOrThrow(_response.body, {
|
|
96
|
+
unrecognizedObjectKeys: "passthrough",
|
|
97
|
+
allowUnrecognizedUnionMembers: true,
|
|
98
|
+
allowUnrecognizedEnumValues: true,
|
|
99
|
+
breadcrumbsPrefix: ["response"],
|
|
100
|
+
}),
|
|
101
|
+
rawResponse: _response.rawResponse,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
if (_response.error.reason === "status-code") {
|
|
105
|
+
switch (_response.error.statusCode) {
|
|
106
|
+
case 404:
|
|
107
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
108
|
+
unrecognizedObjectKeys: "passthrough",
|
|
109
|
+
allowUnrecognizedUnionMembers: true,
|
|
110
|
+
allowUnrecognizedEnumValues: true,
|
|
111
|
+
breadcrumbsPrefix: ["response"],
|
|
112
|
+
}), _response.rawResponse);
|
|
113
|
+
case 400:
|
|
114
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
115
|
+
unrecognizedObjectKeys: "passthrough",
|
|
116
|
+
allowUnrecognizedUnionMembers: true,
|
|
117
|
+
allowUnrecognizedEnumValues: true,
|
|
118
|
+
breadcrumbsPrefix: ["response"],
|
|
119
|
+
}), _response.rawResponse);
|
|
120
|
+
case 500:
|
|
121
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
122
|
+
unrecognizedObjectKeys: "passthrough",
|
|
123
|
+
allowUnrecognizedUnionMembers: true,
|
|
124
|
+
allowUnrecognizedEnumValues: true,
|
|
125
|
+
breadcrumbsPrefix: ["response"],
|
|
126
|
+
}), _response.rawResponse);
|
|
127
|
+
default:
|
|
128
|
+
throw new errors.MavenAGIError({
|
|
129
|
+
statusCode: _response.error.statusCode,
|
|
130
|
+
body: _response.error.body,
|
|
131
|
+
rawResponse: _response.rawResponse,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
switch (_response.error.reason) {
|
|
136
|
+
case "non-json":
|
|
137
|
+
throw new errors.MavenAGIError({
|
|
138
|
+
statusCode: _response.error.statusCode,
|
|
139
|
+
body: _response.error.rawBody,
|
|
140
|
+
rawResponse: _response.rawResponse,
|
|
141
|
+
});
|
|
142
|
+
case "timeout":
|
|
143
|
+
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/knowledge/search.");
|
|
144
|
+
case "unknown":
|
|
145
|
+
throw new errors.MavenAGIError({
|
|
146
|
+
message: _response.error.errorMessage,
|
|
147
|
+
rawResponse: _response.rawResponse,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
62
152
|
/**
|
|
63
153
|
* Update a knowledge base or create it if it doesn't exist.
|
|
64
154
|
*
|
|
@@ -78,12 +168,19 @@ class Knowledge {
|
|
|
78
168
|
* })
|
|
79
169
|
*/
|
|
80
170
|
createOrUpdateKnowledgeBase(request, requestOptions) {
|
|
171
|
+
return core.HttpResponsePromise.fromPromise(this.__createOrUpdateKnowledgeBase(request, requestOptions));
|
|
172
|
+
}
|
|
173
|
+
__createOrUpdateKnowledgeBase(request, requestOptions) {
|
|
81
174
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
-
var _a, _b, _c;
|
|
175
|
+
var _a, _b, _c, _d;
|
|
83
176
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
84
|
-
url:
|
|
177
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, "/v1/knowledge"),
|
|
85
178
|
method: "PUT",
|
|
86
|
-
headers:
|
|
179
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
180
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
181
|
+
"X-Organization-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId,
|
|
182
|
+
"X-Agent-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId,
|
|
183
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
87
184
|
contentType: "application/json",
|
|
88
185
|
requestType: "json",
|
|
89
186
|
body: serializers.KnowledgeBaseRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -92,12 +189,15 @@ class Knowledge {
|
|
|
92
189
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
93
190
|
});
|
|
94
191
|
if (_response.ok) {
|
|
95
|
-
return
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
192
|
+
return {
|
|
193
|
+
data: serializers.KnowledgeBaseResponse.parseOrThrow(_response.body, {
|
|
194
|
+
unrecognizedObjectKeys: "passthrough",
|
|
195
|
+
allowUnrecognizedUnionMembers: true,
|
|
196
|
+
allowUnrecognizedEnumValues: true,
|
|
197
|
+
breadcrumbsPrefix: ["response"],
|
|
198
|
+
}),
|
|
199
|
+
rawResponse: _response.rawResponse,
|
|
200
|
+
};
|
|
101
201
|
}
|
|
102
202
|
if (_response.error.reason === "status-code") {
|
|
103
203
|
switch (_response.error.statusCode) {
|
|
@@ -107,25 +207,26 @@ class Knowledge {
|
|
|
107
207
|
allowUnrecognizedUnionMembers: true,
|
|
108
208
|
allowUnrecognizedEnumValues: true,
|
|
109
209
|
breadcrumbsPrefix: ["response"],
|
|
110
|
-
}));
|
|
210
|
+
}), _response.rawResponse);
|
|
111
211
|
case 400:
|
|
112
212
|
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
113
213
|
unrecognizedObjectKeys: "passthrough",
|
|
114
214
|
allowUnrecognizedUnionMembers: true,
|
|
115
215
|
allowUnrecognizedEnumValues: true,
|
|
116
216
|
breadcrumbsPrefix: ["response"],
|
|
117
|
-
}));
|
|
217
|
+
}), _response.rawResponse);
|
|
118
218
|
case 500:
|
|
119
219
|
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
120
220
|
unrecognizedObjectKeys: "passthrough",
|
|
121
221
|
allowUnrecognizedUnionMembers: true,
|
|
122
222
|
allowUnrecognizedEnumValues: true,
|
|
123
223
|
breadcrumbsPrefix: ["response"],
|
|
124
|
-
}));
|
|
224
|
+
}), _response.rawResponse);
|
|
125
225
|
default:
|
|
126
226
|
throw new errors.MavenAGIError({
|
|
127
227
|
statusCode: _response.error.statusCode,
|
|
128
228
|
body: _response.error.body,
|
|
229
|
+
rawResponse: _response.rawResponse,
|
|
129
230
|
});
|
|
130
231
|
}
|
|
131
232
|
}
|
|
@@ -134,12 +235,14 @@ class Knowledge {
|
|
|
134
235
|
throw new errors.MavenAGIError({
|
|
135
236
|
statusCode: _response.error.statusCode,
|
|
136
237
|
body: _response.error.rawBody,
|
|
238
|
+
rawResponse: _response.rawResponse,
|
|
137
239
|
});
|
|
138
240
|
case "timeout":
|
|
139
241
|
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling PUT /v1/knowledge.");
|
|
140
242
|
case "unknown":
|
|
141
243
|
throw new errors.MavenAGIError({
|
|
142
244
|
message: _response.error.errorMessage,
|
|
245
|
+
rawResponse: _response.rawResponse,
|
|
143
246
|
});
|
|
144
247
|
}
|
|
145
248
|
});
|
|
@@ -148,6 +251,7 @@ class Knowledge {
|
|
|
148
251
|
* Get an existing knowledge base by its supplied ID
|
|
149
252
|
*
|
|
150
253
|
* @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to get. All other entity ID fields are inferred from the request.
|
|
254
|
+
* @param {MavenAGI.KnowledgeBaseGetRequest} request
|
|
151
255
|
* @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
|
|
152
256
|
*
|
|
153
257
|
* @throws {@link MavenAGI.NotFoundError}
|
|
@@ -157,26 +261,137 @@ class Knowledge {
|
|
|
157
261
|
* @example
|
|
158
262
|
* await client.knowledge.getKnowledgeBase("help-center")
|
|
159
263
|
*/
|
|
160
|
-
getKnowledgeBase(knowledgeBaseReferenceId, requestOptions) {
|
|
161
|
-
return
|
|
162
|
-
|
|
264
|
+
getKnowledgeBase(knowledgeBaseReferenceId, request = {}, requestOptions) {
|
|
265
|
+
return core.HttpResponsePromise.fromPromise(this.__getKnowledgeBase(knowledgeBaseReferenceId, request, requestOptions));
|
|
266
|
+
}
|
|
267
|
+
__getKnowledgeBase(knowledgeBaseReferenceId_1) {
|
|
268
|
+
return __awaiter(this, arguments, void 0, function* (knowledgeBaseReferenceId, request = {}, requestOptions) {
|
|
269
|
+
var _a, _b, _c, _d;
|
|
270
|
+
const { appId } = request;
|
|
271
|
+
const _queryParams = {};
|
|
272
|
+
if (appId != null) {
|
|
273
|
+
_queryParams["appId"] = appId;
|
|
274
|
+
}
|
|
163
275
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
164
|
-
url:
|
|
276
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/knowledge/${encodeURIComponent(knowledgeBaseReferenceId)}`),
|
|
165
277
|
method: "GET",
|
|
166
|
-
headers:
|
|
278
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
279
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
280
|
+
"X-Organization-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId,
|
|
281
|
+
"X-Agent-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId,
|
|
282
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
283
|
+
queryParameters: _queryParams,
|
|
284
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
285
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
286
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
287
|
+
});
|
|
288
|
+
if (_response.ok) {
|
|
289
|
+
return {
|
|
290
|
+
data: serializers.KnowledgeBaseResponse.parseOrThrow(_response.body, {
|
|
291
|
+
unrecognizedObjectKeys: "passthrough",
|
|
292
|
+
allowUnrecognizedUnionMembers: true,
|
|
293
|
+
allowUnrecognizedEnumValues: true,
|
|
294
|
+
breadcrumbsPrefix: ["response"],
|
|
295
|
+
}),
|
|
296
|
+
rawResponse: _response.rawResponse,
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
if (_response.error.reason === "status-code") {
|
|
300
|
+
switch (_response.error.statusCode) {
|
|
301
|
+
case 404:
|
|
302
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
303
|
+
unrecognizedObjectKeys: "passthrough",
|
|
304
|
+
allowUnrecognizedUnionMembers: true,
|
|
305
|
+
allowUnrecognizedEnumValues: true,
|
|
306
|
+
breadcrumbsPrefix: ["response"],
|
|
307
|
+
}), _response.rawResponse);
|
|
308
|
+
case 400:
|
|
309
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
310
|
+
unrecognizedObjectKeys: "passthrough",
|
|
311
|
+
allowUnrecognizedUnionMembers: true,
|
|
312
|
+
allowUnrecognizedEnumValues: true,
|
|
313
|
+
breadcrumbsPrefix: ["response"],
|
|
314
|
+
}), _response.rawResponse);
|
|
315
|
+
case 500:
|
|
316
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
317
|
+
unrecognizedObjectKeys: "passthrough",
|
|
318
|
+
allowUnrecognizedUnionMembers: true,
|
|
319
|
+
allowUnrecognizedEnumValues: true,
|
|
320
|
+
breadcrumbsPrefix: ["response"],
|
|
321
|
+
}), _response.rawResponse);
|
|
322
|
+
default:
|
|
323
|
+
throw new errors.MavenAGIError({
|
|
324
|
+
statusCode: _response.error.statusCode,
|
|
325
|
+
body: _response.error.body,
|
|
326
|
+
rawResponse: _response.rawResponse,
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
switch (_response.error.reason) {
|
|
331
|
+
case "non-json":
|
|
332
|
+
throw new errors.MavenAGIError({
|
|
333
|
+
statusCode: _response.error.statusCode,
|
|
334
|
+
body: _response.error.rawBody,
|
|
335
|
+
rawResponse: _response.rawResponse,
|
|
336
|
+
});
|
|
337
|
+
case "timeout":
|
|
338
|
+
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling GET /v1/knowledge/{knowledgeBaseReferenceId}.");
|
|
339
|
+
case "unknown":
|
|
340
|
+
throw new errors.MavenAGIError({
|
|
341
|
+
message: _response.error.errorMessage,
|
|
342
|
+
rawResponse: _response.rawResponse,
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Update mutable knowledge base fields
|
|
349
|
+
*
|
|
350
|
+
* The `appId` field can be provided to update a knowledge base owned by a different app.
|
|
351
|
+
* All other fields will overwrite the existing value on the knowledge base only if provided.
|
|
352
|
+
*
|
|
353
|
+
* @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to patch.
|
|
354
|
+
* @param {MavenAGI.KnowledgeBasePatchRequest} request
|
|
355
|
+
* @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
|
|
356
|
+
*
|
|
357
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
358
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
359
|
+
* @throws {@link MavenAGI.ServerError}
|
|
360
|
+
*
|
|
361
|
+
* @example
|
|
362
|
+
* await client.knowledge.patchKnowledgeBase("knowledgeBaseReferenceId", {})
|
|
363
|
+
*/
|
|
364
|
+
patchKnowledgeBase(knowledgeBaseReferenceId, request, requestOptions) {
|
|
365
|
+
return core.HttpResponsePromise.fromPromise(this.__patchKnowledgeBase(knowledgeBaseReferenceId, request, requestOptions));
|
|
366
|
+
}
|
|
367
|
+
__patchKnowledgeBase(knowledgeBaseReferenceId, request, requestOptions) {
|
|
368
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
369
|
+
var _a, _b, _c, _d;
|
|
370
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
371
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/knowledge/${encodeURIComponent(knowledgeBaseReferenceId)}`),
|
|
372
|
+
method: "PATCH",
|
|
373
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
374
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
375
|
+
"X-Organization-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId,
|
|
376
|
+
"X-Agent-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId,
|
|
377
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
167
378
|
contentType: "application/json",
|
|
168
379
|
requestType: "json",
|
|
380
|
+
body: serializers.KnowledgeBasePatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
169
381
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
170
382
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
171
383
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
172
384
|
});
|
|
173
385
|
if (_response.ok) {
|
|
174
|
-
return
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
386
|
+
return {
|
|
387
|
+
data: serializers.KnowledgeBaseResponse.parseOrThrow(_response.body, {
|
|
388
|
+
unrecognizedObjectKeys: "passthrough",
|
|
389
|
+
allowUnrecognizedUnionMembers: true,
|
|
390
|
+
allowUnrecognizedEnumValues: true,
|
|
391
|
+
breadcrumbsPrefix: ["response"],
|
|
392
|
+
}),
|
|
393
|
+
rawResponse: _response.rawResponse,
|
|
394
|
+
};
|
|
180
395
|
}
|
|
181
396
|
if (_response.error.reason === "status-code") {
|
|
182
397
|
switch (_response.error.statusCode) {
|
|
@@ -186,25 +401,26 @@ class Knowledge {
|
|
|
186
401
|
allowUnrecognizedUnionMembers: true,
|
|
187
402
|
allowUnrecognizedEnumValues: true,
|
|
188
403
|
breadcrumbsPrefix: ["response"],
|
|
189
|
-
}));
|
|
404
|
+
}), _response.rawResponse);
|
|
190
405
|
case 400:
|
|
191
406
|
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
192
407
|
unrecognizedObjectKeys: "passthrough",
|
|
193
408
|
allowUnrecognizedUnionMembers: true,
|
|
194
409
|
allowUnrecognizedEnumValues: true,
|
|
195
410
|
breadcrumbsPrefix: ["response"],
|
|
196
|
-
}));
|
|
411
|
+
}), _response.rawResponse);
|
|
197
412
|
case 500:
|
|
198
413
|
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
199
414
|
unrecognizedObjectKeys: "passthrough",
|
|
200
415
|
allowUnrecognizedUnionMembers: true,
|
|
201
416
|
allowUnrecognizedEnumValues: true,
|
|
202
417
|
breadcrumbsPrefix: ["response"],
|
|
203
|
-
}));
|
|
418
|
+
}), _response.rawResponse);
|
|
204
419
|
default:
|
|
205
420
|
throw new errors.MavenAGIError({
|
|
206
421
|
statusCode: _response.error.statusCode,
|
|
207
422
|
body: _response.error.body,
|
|
423
|
+
rawResponse: _response.rawResponse,
|
|
208
424
|
});
|
|
209
425
|
}
|
|
210
426
|
}
|
|
@@ -213,12 +429,14 @@ class Knowledge {
|
|
|
213
429
|
throw new errors.MavenAGIError({
|
|
214
430
|
statusCode: _response.error.statusCode,
|
|
215
431
|
body: _response.error.rawBody,
|
|
432
|
+
rawResponse: _response.rawResponse,
|
|
216
433
|
});
|
|
217
434
|
case "timeout":
|
|
218
|
-
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling
|
|
435
|
+
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling PATCH /v1/knowledge/{knowledgeBaseReferenceId}.");
|
|
219
436
|
case "unknown":
|
|
220
437
|
throw new errors.MavenAGIError({
|
|
221
438
|
message: _response.error.errorMessage,
|
|
439
|
+
rawResponse: _response.rawResponse,
|
|
222
440
|
});
|
|
223
441
|
}
|
|
224
442
|
});
|
|
@@ -250,12 +468,19 @@ class Knowledge {
|
|
|
250
468
|
* })
|
|
251
469
|
*/
|
|
252
470
|
createKnowledgeBaseVersion(knowledgeBaseReferenceId, request, requestOptions) {
|
|
471
|
+
return core.HttpResponsePromise.fromPromise(this.__createKnowledgeBaseVersion(knowledgeBaseReferenceId, request, requestOptions));
|
|
472
|
+
}
|
|
473
|
+
__createKnowledgeBaseVersion(knowledgeBaseReferenceId, request, requestOptions) {
|
|
253
474
|
return __awaiter(this, void 0, void 0, function* () {
|
|
254
|
-
var _a, _b, _c;
|
|
475
|
+
var _a, _b, _c, _d;
|
|
255
476
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
256
|
-
url:
|
|
477
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/knowledge/${encodeURIComponent(knowledgeBaseReferenceId)}/version`),
|
|
257
478
|
method: "POST",
|
|
258
|
-
headers:
|
|
479
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
480
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
481
|
+
"X-Organization-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId,
|
|
482
|
+
"X-Agent-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId,
|
|
483
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
259
484
|
contentType: "application/json",
|
|
260
485
|
requestType: "json",
|
|
261
486
|
body: serializers.KnowledgeBaseVersion.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -264,12 +489,15 @@ class Knowledge {
|
|
|
264
489
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
265
490
|
});
|
|
266
491
|
if (_response.ok) {
|
|
267
|
-
return
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
492
|
+
return {
|
|
493
|
+
data: serializers.KnowledgeBaseVersion.parseOrThrow(_response.body, {
|
|
494
|
+
unrecognizedObjectKeys: "passthrough",
|
|
495
|
+
allowUnrecognizedUnionMembers: true,
|
|
496
|
+
allowUnrecognizedEnumValues: true,
|
|
497
|
+
breadcrumbsPrefix: ["response"],
|
|
498
|
+
}),
|
|
499
|
+
rawResponse: _response.rawResponse,
|
|
500
|
+
};
|
|
273
501
|
}
|
|
274
502
|
if (_response.error.reason === "status-code") {
|
|
275
503
|
switch (_response.error.statusCode) {
|
|
@@ -279,25 +507,26 @@ class Knowledge {
|
|
|
279
507
|
allowUnrecognizedUnionMembers: true,
|
|
280
508
|
allowUnrecognizedEnumValues: true,
|
|
281
509
|
breadcrumbsPrefix: ["response"],
|
|
282
|
-
}));
|
|
510
|
+
}), _response.rawResponse);
|
|
283
511
|
case 400:
|
|
284
512
|
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
285
513
|
unrecognizedObjectKeys: "passthrough",
|
|
286
514
|
allowUnrecognizedUnionMembers: true,
|
|
287
515
|
allowUnrecognizedEnumValues: true,
|
|
288
516
|
breadcrumbsPrefix: ["response"],
|
|
289
|
-
}));
|
|
517
|
+
}), _response.rawResponse);
|
|
290
518
|
case 500:
|
|
291
519
|
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
292
520
|
unrecognizedObjectKeys: "passthrough",
|
|
293
521
|
allowUnrecognizedUnionMembers: true,
|
|
294
522
|
allowUnrecognizedEnumValues: true,
|
|
295
523
|
breadcrumbsPrefix: ["response"],
|
|
296
|
-
}));
|
|
524
|
+
}), _response.rawResponse);
|
|
297
525
|
default:
|
|
298
526
|
throw new errors.MavenAGIError({
|
|
299
527
|
statusCode: _response.error.statusCode,
|
|
300
528
|
body: _response.error.body,
|
|
529
|
+
rawResponse: _response.rawResponse,
|
|
301
530
|
});
|
|
302
531
|
}
|
|
303
532
|
}
|
|
@@ -306,12 +535,14 @@ class Knowledge {
|
|
|
306
535
|
throw new errors.MavenAGIError({
|
|
307
536
|
statusCode: _response.error.statusCode,
|
|
308
537
|
body: _response.error.rawBody,
|
|
538
|
+
rawResponse: _response.rawResponse,
|
|
309
539
|
});
|
|
310
540
|
case "timeout":
|
|
311
541
|
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/knowledge/{knowledgeBaseReferenceId}/version.");
|
|
312
542
|
case "unknown":
|
|
313
543
|
throw new errors.MavenAGIError({
|
|
314
544
|
message: _response.error.errorMessage,
|
|
545
|
+
rawResponse: _response.rawResponse,
|
|
315
546
|
});
|
|
316
547
|
}
|
|
317
548
|
});
|
|
@@ -338,12 +569,19 @@ class Knowledge {
|
|
|
338
569
|
* })
|
|
339
570
|
*/
|
|
340
571
|
finalizeKnowledgeBaseVersion(knowledgeBaseReferenceId, request, requestOptions) {
|
|
572
|
+
return core.HttpResponsePromise.fromPromise(this.__finalizeKnowledgeBaseVersion(knowledgeBaseReferenceId, request, requestOptions));
|
|
573
|
+
}
|
|
574
|
+
__finalizeKnowledgeBaseVersion(knowledgeBaseReferenceId, request, requestOptions) {
|
|
341
575
|
return __awaiter(this, void 0, void 0, function* () {
|
|
342
|
-
var _a, _b, _c;
|
|
576
|
+
var _a, _b, _c, _d;
|
|
343
577
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
344
|
-
url:
|
|
578
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/knowledge/${encodeURIComponent(knowledgeBaseReferenceId)}/version/finalize`),
|
|
345
579
|
method: "POST",
|
|
346
|
-
headers:
|
|
580
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
581
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
582
|
+
"X-Organization-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId,
|
|
583
|
+
"X-Agent-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId,
|
|
584
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
347
585
|
contentType: "application/json",
|
|
348
586
|
requestType: "json",
|
|
349
587
|
body: serializers.FinalizeKnowledgeBaseVersionRequest.jsonOrThrow(request, {
|
|
@@ -354,12 +592,15 @@ class Knowledge {
|
|
|
354
592
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
355
593
|
});
|
|
356
594
|
if (_response.ok) {
|
|
357
|
-
return
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
595
|
+
return {
|
|
596
|
+
data: serializers.KnowledgeBaseVersion.parseOrThrow(_response.body, {
|
|
597
|
+
unrecognizedObjectKeys: "passthrough",
|
|
598
|
+
allowUnrecognizedUnionMembers: true,
|
|
599
|
+
allowUnrecognizedEnumValues: true,
|
|
600
|
+
breadcrumbsPrefix: ["response"],
|
|
601
|
+
}),
|
|
602
|
+
rawResponse: _response.rawResponse,
|
|
603
|
+
};
|
|
363
604
|
}
|
|
364
605
|
if (_response.error.reason === "status-code") {
|
|
365
606
|
switch (_response.error.statusCode) {
|
|
@@ -369,25 +610,26 @@ class Knowledge {
|
|
|
369
610
|
allowUnrecognizedUnionMembers: true,
|
|
370
611
|
allowUnrecognizedEnumValues: true,
|
|
371
612
|
breadcrumbsPrefix: ["response"],
|
|
372
|
-
}));
|
|
613
|
+
}), _response.rawResponse);
|
|
373
614
|
case 400:
|
|
374
615
|
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
375
616
|
unrecognizedObjectKeys: "passthrough",
|
|
376
617
|
allowUnrecognizedUnionMembers: true,
|
|
377
618
|
allowUnrecognizedEnumValues: true,
|
|
378
619
|
breadcrumbsPrefix: ["response"],
|
|
379
|
-
}));
|
|
620
|
+
}), _response.rawResponse);
|
|
380
621
|
case 500:
|
|
381
622
|
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
382
623
|
unrecognizedObjectKeys: "passthrough",
|
|
383
624
|
allowUnrecognizedUnionMembers: true,
|
|
384
625
|
allowUnrecognizedEnumValues: true,
|
|
385
626
|
breadcrumbsPrefix: ["response"],
|
|
386
|
-
}));
|
|
627
|
+
}), _response.rawResponse);
|
|
387
628
|
default:
|
|
388
629
|
throw new errors.MavenAGIError({
|
|
389
630
|
statusCode: _response.error.statusCode,
|
|
390
631
|
body: _response.error.body,
|
|
632
|
+
rawResponse: _response.rawResponse,
|
|
391
633
|
});
|
|
392
634
|
}
|
|
393
635
|
}
|
|
@@ -396,12 +638,107 @@ class Knowledge {
|
|
|
396
638
|
throw new errors.MavenAGIError({
|
|
397
639
|
statusCode: _response.error.statusCode,
|
|
398
640
|
body: _response.error.rawBody,
|
|
641
|
+
rawResponse: _response.rawResponse,
|
|
399
642
|
});
|
|
400
643
|
case "timeout":
|
|
401
644
|
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/knowledge/{knowledgeBaseReferenceId}/version/finalize.");
|
|
402
645
|
case "unknown":
|
|
403
646
|
throw new errors.MavenAGIError({
|
|
404
647
|
message: _response.error.errorMessage,
|
|
648
|
+
rawResponse: _response.rawResponse,
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
/**
|
|
654
|
+
* Search knowledge documents
|
|
655
|
+
*
|
|
656
|
+
* @param {MavenAGI.KnowledgeDocumentSearchRequest} request
|
|
657
|
+
* @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
|
|
658
|
+
*
|
|
659
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
660
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
661
|
+
* @throws {@link MavenAGI.ServerError}
|
|
662
|
+
*
|
|
663
|
+
* @example
|
|
664
|
+
* await client.knowledge.searchKnowledgeDocuments({})
|
|
665
|
+
*/
|
|
666
|
+
searchKnowledgeDocuments(request, requestOptions) {
|
|
667
|
+
return core.HttpResponsePromise.fromPromise(this.__searchKnowledgeDocuments(request, requestOptions));
|
|
668
|
+
}
|
|
669
|
+
__searchKnowledgeDocuments(request, requestOptions) {
|
|
670
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
671
|
+
var _a, _b, _c, _d;
|
|
672
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
673
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, "/v1/knowledge/documents/search"),
|
|
674
|
+
method: "POST",
|
|
675
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
676
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
677
|
+
"X-Organization-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId,
|
|
678
|
+
"X-Agent-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId,
|
|
679
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
680
|
+
contentType: "application/json",
|
|
681
|
+
requestType: "json",
|
|
682
|
+
body: serializers.KnowledgeDocumentSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
683
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
684
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
685
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
686
|
+
});
|
|
687
|
+
if (_response.ok) {
|
|
688
|
+
return {
|
|
689
|
+
data: serializers.KnowledgeDocumentsResponse.parseOrThrow(_response.body, {
|
|
690
|
+
unrecognizedObjectKeys: "passthrough",
|
|
691
|
+
allowUnrecognizedUnionMembers: true,
|
|
692
|
+
allowUnrecognizedEnumValues: true,
|
|
693
|
+
breadcrumbsPrefix: ["response"],
|
|
694
|
+
}),
|
|
695
|
+
rawResponse: _response.rawResponse,
|
|
696
|
+
};
|
|
697
|
+
}
|
|
698
|
+
if (_response.error.reason === "status-code") {
|
|
699
|
+
switch (_response.error.statusCode) {
|
|
700
|
+
case 404:
|
|
701
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
702
|
+
unrecognizedObjectKeys: "passthrough",
|
|
703
|
+
allowUnrecognizedUnionMembers: true,
|
|
704
|
+
allowUnrecognizedEnumValues: true,
|
|
705
|
+
breadcrumbsPrefix: ["response"],
|
|
706
|
+
}), _response.rawResponse);
|
|
707
|
+
case 400:
|
|
708
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
709
|
+
unrecognizedObjectKeys: "passthrough",
|
|
710
|
+
allowUnrecognizedUnionMembers: true,
|
|
711
|
+
allowUnrecognizedEnumValues: true,
|
|
712
|
+
breadcrumbsPrefix: ["response"],
|
|
713
|
+
}), _response.rawResponse);
|
|
714
|
+
case 500:
|
|
715
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
716
|
+
unrecognizedObjectKeys: "passthrough",
|
|
717
|
+
allowUnrecognizedUnionMembers: true,
|
|
718
|
+
allowUnrecognizedEnumValues: true,
|
|
719
|
+
breadcrumbsPrefix: ["response"],
|
|
720
|
+
}), _response.rawResponse);
|
|
721
|
+
default:
|
|
722
|
+
throw new errors.MavenAGIError({
|
|
723
|
+
statusCode: _response.error.statusCode,
|
|
724
|
+
body: _response.error.body,
|
|
725
|
+
rawResponse: _response.rawResponse,
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
switch (_response.error.reason) {
|
|
730
|
+
case "non-json":
|
|
731
|
+
throw new errors.MavenAGIError({
|
|
732
|
+
statusCode: _response.error.statusCode,
|
|
733
|
+
body: _response.error.rawBody,
|
|
734
|
+
rawResponse: _response.rawResponse,
|
|
735
|
+
});
|
|
736
|
+
case "timeout":
|
|
737
|
+
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/knowledge/documents/search.");
|
|
738
|
+
case "unknown":
|
|
739
|
+
throw new errors.MavenAGIError({
|
|
740
|
+
message: _response.error.errorMessage,
|
|
741
|
+
rawResponse: _response.rawResponse,
|
|
405
742
|
});
|
|
406
743
|
}
|
|
407
744
|
});
|
|
@@ -441,12 +778,19 @@ class Knowledge {
|
|
|
441
778
|
* })
|
|
442
779
|
*/
|
|
443
780
|
createKnowledgeDocument(knowledgeBaseReferenceId, request, requestOptions) {
|
|
781
|
+
return core.HttpResponsePromise.fromPromise(this.__createKnowledgeDocument(knowledgeBaseReferenceId, request, requestOptions));
|
|
782
|
+
}
|
|
783
|
+
__createKnowledgeDocument(knowledgeBaseReferenceId, request, requestOptions) {
|
|
444
784
|
return __awaiter(this, void 0, void 0, function* () {
|
|
445
|
-
var _a, _b, _c;
|
|
785
|
+
var _a, _b, _c, _d;
|
|
446
786
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
447
|
-
url:
|
|
787
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/knowledge/${encodeURIComponent(knowledgeBaseReferenceId)}/document`),
|
|
448
788
|
method: "POST",
|
|
449
|
-
headers:
|
|
789
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
790
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
791
|
+
"X-Organization-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId,
|
|
792
|
+
"X-Agent-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId,
|
|
793
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
450
794
|
contentType: "application/json",
|
|
451
795
|
requestType: "json",
|
|
452
796
|
body: serializers.KnowledgeDocumentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -455,12 +799,15 @@ class Knowledge {
|
|
|
455
799
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
456
800
|
});
|
|
457
801
|
if (_response.ok) {
|
|
458
|
-
return
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
802
|
+
return {
|
|
803
|
+
data: serializers.KnowledgeDocumentResponse.parseOrThrow(_response.body, {
|
|
804
|
+
unrecognizedObjectKeys: "passthrough",
|
|
805
|
+
allowUnrecognizedUnionMembers: true,
|
|
806
|
+
allowUnrecognizedEnumValues: true,
|
|
807
|
+
breadcrumbsPrefix: ["response"],
|
|
808
|
+
}),
|
|
809
|
+
rawResponse: _response.rawResponse,
|
|
810
|
+
};
|
|
464
811
|
}
|
|
465
812
|
if (_response.error.reason === "status-code") {
|
|
466
813
|
switch (_response.error.statusCode) {
|
|
@@ -470,25 +817,26 @@ class Knowledge {
|
|
|
470
817
|
allowUnrecognizedUnionMembers: true,
|
|
471
818
|
allowUnrecognizedEnumValues: true,
|
|
472
819
|
breadcrumbsPrefix: ["response"],
|
|
473
|
-
}));
|
|
820
|
+
}), _response.rawResponse);
|
|
474
821
|
case 400:
|
|
475
822
|
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
476
823
|
unrecognizedObjectKeys: "passthrough",
|
|
477
824
|
allowUnrecognizedUnionMembers: true,
|
|
478
825
|
allowUnrecognizedEnumValues: true,
|
|
479
826
|
breadcrumbsPrefix: ["response"],
|
|
480
|
-
}));
|
|
827
|
+
}), _response.rawResponse);
|
|
481
828
|
case 500:
|
|
482
829
|
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
483
830
|
unrecognizedObjectKeys: "passthrough",
|
|
484
831
|
allowUnrecognizedUnionMembers: true,
|
|
485
832
|
allowUnrecognizedEnumValues: true,
|
|
486
833
|
breadcrumbsPrefix: ["response"],
|
|
487
|
-
}));
|
|
834
|
+
}), _response.rawResponse);
|
|
488
835
|
default:
|
|
489
836
|
throw new errors.MavenAGIError({
|
|
490
837
|
statusCode: _response.error.statusCode,
|
|
491
838
|
body: _response.error.body,
|
|
839
|
+
rawResponse: _response.rawResponse,
|
|
492
840
|
});
|
|
493
841
|
}
|
|
494
842
|
}
|
|
@@ -497,12 +845,14 @@ class Knowledge {
|
|
|
497
845
|
throw new errors.MavenAGIError({
|
|
498
846
|
statusCode: _response.error.statusCode,
|
|
499
847
|
body: _response.error.rawBody,
|
|
848
|
+
rawResponse: _response.rawResponse,
|
|
500
849
|
});
|
|
501
850
|
case "timeout":
|
|
502
851
|
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/knowledge/{knowledgeBaseReferenceId}/document.");
|
|
503
852
|
case "unknown":
|
|
504
853
|
throw new errors.MavenAGIError({
|
|
505
854
|
message: _response.error.errorMessage,
|
|
855
|
+
rawResponse: _response.rawResponse,
|
|
506
856
|
});
|
|
507
857
|
}
|
|
508
858
|
});
|
|
@@ -537,12 +887,19 @@ class Knowledge {
|
|
|
537
887
|
* })
|
|
538
888
|
*/
|
|
539
889
|
updateKnowledgeDocument(knowledgeBaseReferenceId, request, requestOptions) {
|
|
890
|
+
return core.HttpResponsePromise.fromPromise(this.__updateKnowledgeDocument(knowledgeBaseReferenceId, request, requestOptions));
|
|
891
|
+
}
|
|
892
|
+
__updateKnowledgeDocument(knowledgeBaseReferenceId, request, requestOptions) {
|
|
540
893
|
return __awaiter(this, void 0, void 0, function* () {
|
|
541
|
-
var _a, _b, _c;
|
|
894
|
+
var _a, _b, _c, _d;
|
|
542
895
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
543
|
-
url:
|
|
896
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/knowledge/${encodeURIComponent(knowledgeBaseReferenceId)}/document`),
|
|
544
897
|
method: "PUT",
|
|
545
|
-
headers:
|
|
898
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
899
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
900
|
+
"X-Organization-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId,
|
|
901
|
+
"X-Agent-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId,
|
|
902
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
546
903
|
contentType: "application/json",
|
|
547
904
|
requestType: "json",
|
|
548
905
|
body: serializers.KnowledgeDocumentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -551,12 +908,15 @@ class Knowledge {
|
|
|
551
908
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
552
909
|
});
|
|
553
910
|
if (_response.ok) {
|
|
554
|
-
return
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
911
|
+
return {
|
|
912
|
+
data: serializers.KnowledgeDocumentResponse.parseOrThrow(_response.body, {
|
|
913
|
+
unrecognizedObjectKeys: "passthrough",
|
|
914
|
+
allowUnrecognizedUnionMembers: true,
|
|
915
|
+
allowUnrecognizedEnumValues: true,
|
|
916
|
+
breadcrumbsPrefix: ["response"],
|
|
917
|
+
}),
|
|
918
|
+
rawResponse: _response.rawResponse,
|
|
919
|
+
};
|
|
560
920
|
}
|
|
561
921
|
if (_response.error.reason === "status-code") {
|
|
562
922
|
switch (_response.error.statusCode) {
|
|
@@ -566,25 +926,26 @@ class Knowledge {
|
|
|
566
926
|
allowUnrecognizedUnionMembers: true,
|
|
567
927
|
allowUnrecognizedEnumValues: true,
|
|
568
928
|
breadcrumbsPrefix: ["response"],
|
|
569
|
-
}));
|
|
929
|
+
}), _response.rawResponse);
|
|
570
930
|
case 400:
|
|
571
931
|
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
572
932
|
unrecognizedObjectKeys: "passthrough",
|
|
573
933
|
allowUnrecognizedUnionMembers: true,
|
|
574
934
|
allowUnrecognizedEnumValues: true,
|
|
575
935
|
breadcrumbsPrefix: ["response"],
|
|
576
|
-
}));
|
|
936
|
+
}), _response.rawResponse);
|
|
577
937
|
case 500:
|
|
578
938
|
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
579
939
|
unrecognizedObjectKeys: "passthrough",
|
|
580
940
|
allowUnrecognizedUnionMembers: true,
|
|
581
941
|
allowUnrecognizedEnumValues: true,
|
|
582
942
|
breadcrumbsPrefix: ["response"],
|
|
583
|
-
}));
|
|
943
|
+
}), _response.rawResponse);
|
|
584
944
|
default:
|
|
585
945
|
throw new errors.MavenAGIError({
|
|
586
946
|
statusCode: _response.error.statusCode,
|
|
587
947
|
body: _response.error.body,
|
|
948
|
+
rawResponse: _response.rawResponse,
|
|
588
949
|
});
|
|
589
950
|
}
|
|
590
951
|
}
|
|
@@ -593,12 +954,14 @@ class Knowledge {
|
|
|
593
954
|
throw new errors.MavenAGIError({
|
|
594
955
|
statusCode: _response.error.statusCode,
|
|
595
956
|
body: _response.error.rawBody,
|
|
957
|
+
rawResponse: _response.rawResponse,
|
|
596
958
|
});
|
|
597
959
|
case "timeout":
|
|
598
960
|
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling PUT /v1/knowledge/{knowledgeBaseReferenceId}/document.");
|
|
599
961
|
case "unknown":
|
|
600
962
|
throw new errors.MavenAGIError({
|
|
601
963
|
message: _response.error.errorMessage,
|
|
964
|
+
rawResponse: _response.rawResponse,
|
|
602
965
|
});
|
|
603
966
|
}
|
|
604
967
|
});
|
|
@@ -618,20 +981,25 @@ class Knowledge {
|
|
|
618
981
|
* await client.knowledge.deleteKnowledgeDocument("help-center", "getting-started")
|
|
619
982
|
*/
|
|
620
983
|
deleteKnowledgeDocument(knowledgeBaseReferenceId, knowledgeDocumentReferenceId, requestOptions) {
|
|
984
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteKnowledgeDocument(knowledgeBaseReferenceId, knowledgeDocumentReferenceId, requestOptions));
|
|
985
|
+
}
|
|
986
|
+
__deleteKnowledgeDocument(knowledgeBaseReferenceId, knowledgeDocumentReferenceId, requestOptions) {
|
|
621
987
|
return __awaiter(this, void 0, void 0, function* () {
|
|
622
|
-
var _a, _b, _c;
|
|
988
|
+
var _a, _b, _c, _d;
|
|
623
989
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
624
|
-
url:
|
|
990
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/knowledge/${encodeURIComponent(knowledgeBaseReferenceId)}/${encodeURIComponent(knowledgeDocumentReferenceId)}/document`),
|
|
625
991
|
method: "DELETE",
|
|
626
|
-
headers:
|
|
627
|
-
|
|
628
|
-
|
|
992
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
993
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
994
|
+
"X-Organization-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId,
|
|
995
|
+
"X-Agent-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId,
|
|
996
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
629
997
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
630
998
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
631
999
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
632
1000
|
});
|
|
633
1001
|
if (_response.ok) {
|
|
634
|
-
return;
|
|
1002
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
635
1003
|
}
|
|
636
1004
|
if (_response.error.reason === "status-code") {
|
|
637
1005
|
switch (_response.error.statusCode) {
|
|
@@ -641,25 +1009,26 @@ class Knowledge {
|
|
|
641
1009
|
allowUnrecognizedUnionMembers: true,
|
|
642
1010
|
allowUnrecognizedEnumValues: true,
|
|
643
1011
|
breadcrumbsPrefix: ["response"],
|
|
644
|
-
}));
|
|
1012
|
+
}), _response.rawResponse);
|
|
645
1013
|
case 400:
|
|
646
1014
|
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
647
1015
|
unrecognizedObjectKeys: "passthrough",
|
|
648
1016
|
allowUnrecognizedUnionMembers: true,
|
|
649
1017
|
allowUnrecognizedEnumValues: true,
|
|
650
1018
|
breadcrumbsPrefix: ["response"],
|
|
651
|
-
}));
|
|
1019
|
+
}), _response.rawResponse);
|
|
652
1020
|
case 500:
|
|
653
1021
|
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
654
1022
|
unrecognizedObjectKeys: "passthrough",
|
|
655
1023
|
allowUnrecognizedUnionMembers: true,
|
|
656
1024
|
allowUnrecognizedEnumValues: true,
|
|
657
1025
|
breadcrumbsPrefix: ["response"],
|
|
658
|
-
}));
|
|
1026
|
+
}), _response.rawResponse);
|
|
659
1027
|
default:
|
|
660
1028
|
throw new errors.MavenAGIError({
|
|
661
1029
|
statusCode: _response.error.statusCode,
|
|
662
1030
|
body: _response.error.body,
|
|
1031
|
+
rawResponse: _response.rawResponse,
|
|
663
1032
|
});
|
|
664
1033
|
}
|
|
665
1034
|
}
|
|
@@ -668,12 +1037,14 @@ class Knowledge {
|
|
|
668
1037
|
throw new errors.MavenAGIError({
|
|
669
1038
|
statusCode: _response.error.statusCode,
|
|
670
1039
|
body: _response.error.rawBody,
|
|
1040
|
+
rawResponse: _response.rawResponse,
|
|
671
1041
|
});
|
|
672
1042
|
case "timeout":
|
|
673
1043
|
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling DELETE /v1/knowledge/{knowledgeBaseReferenceId}/{knowledgeDocumentReferenceId}/document.");
|
|
674
1044
|
case "unknown":
|
|
675
1045
|
throw new errors.MavenAGIError({
|
|
676
1046
|
message: _response.error.errorMessage,
|
|
1047
|
+
rawResponse: _response.rawResponse,
|
|
677
1048
|
});
|
|
678
1049
|
}
|
|
679
1050
|
});
|