mavenagi 0.0.0-alpha.2 → 0.0.0-alpha.21
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 +21 -0
- package/Client.js +20 -0
- package/README.md +83 -16
- package/api/resources/actions/client/Client.d.ts +96 -0
- package/api/resources/actions/client/Client.js +319 -0
- package/api/resources/actions/client/index.d.ts +1 -0
- package/api/resources/actions/client/index.js +1 -0
- package/api/resources/actions/index.d.ts +2 -0
- package/api/resources/actions/index.js +2 -0
- package/api/resources/actions/types/ActionBase.d.ts +18 -0
- package/api/resources/actions/types/ActionParameter.d.ts +9 -0
- package/api/resources/actions/types/ActionRequest.d.ts +31 -0
- package/api/resources/actions/types/ActionResponse.d.ts +35 -0
- package/api/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +10 -0
- package/api/resources/actions/types/ConversationPrecondition.d.ts +16 -0
- package/api/resources/actions/types/MetadataPrecondition.d.ts +10 -0
- package/api/resources/actions/types/Precondition.d.ts +31 -0
- package/api/resources/actions/types/PreconditionBase.d.ts +8 -0
- package/api/resources/actions/types/PreconditionGroup.d.ts +8 -0
- package/api/resources/actions/types/PreconditionGroupOperator.d.ts +8 -0
- package/api/resources/actions/types/PreconditionGroupOperator.js +7 -0
- package/api/resources/actions/types/PreconditionOperator.d.ts +7 -0
- package/api/resources/{knowledge/types/IdBody.d.ts → actions/types/PreconditionOperator.js} +3 -3
- package/api/resources/actions/types/TagsPrecondition.d.ts +8 -0
- package/api/resources/actions/types/index.d.ts +13 -0
- package/api/resources/actions/types/index.js +13 -0
- package/api/resources/appSettings/client/Client.d.ts +47 -0
- package/api/resources/appSettings/client/Client.js +125 -0
- package/api/resources/appSettings/client/index.d.ts +1 -0
- package/api/resources/appSettings/client/index.js +1 -0
- package/api/resources/appSettings/index.d.ts +1 -0
- package/api/resources/appSettings/index.js +1 -0
- package/api/resources/commons/errors/{AgentNotFoundError.d.ts → BadRequestError.d.ts} +1 -1
- package/api/resources/{conversation/errors/EmptyConversationError.js → commons/errors/BadRequestError.js} +3 -3
- package/{dist/api/resources/commons/errors/AgentNotFoundError.d.ts → api/resources/commons/errors/NotFoundError.d.ts} +1 -1
- package/{dist/api/resources/commons/errors/AgentNotFoundError.js → api/resources/commons/errors/NotFoundError.js} +3 -3
- package/api/resources/{conversation/errors/EmptyConversationError.d.ts → commons/errors/ServerError.d.ts} +1 -1
- package/api/resources/commons/errors/ServerError.js +14 -0
- package/api/resources/commons/errors/index.d.ts +3 -1
- package/api/resources/commons/errors/index.js +3 -1
- package/api/resources/commons/types/AppUser.d.ts +9 -0
- package/api/resources/commons/types/AppUserIdentifier.d.ts +9 -0
- package/api/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +8 -0
- package/api/resources/commons/types/AppUserIdentifyingPropertyType.js +7 -0
- package/api/resources/commons/types/AppUserRequest.d.ts +26 -0
- package/api/resources/commons/types/AppUserResponse.d.ts +42 -0
- package/api/resources/commons/types/EntityId.d.ts +14 -0
- package/api/resources/commons/types/EntityIdBase.d.ts +10 -0
- package/api/resources/commons/types/EntityIdBase.js +4 -0
- package/api/resources/commons/types/EntityType.d.ts +16 -0
- package/api/resources/commons/types/EntityType.js +15 -0
- package/api/resources/commons/types/EventTriggerBase.d.ts +10 -0
- package/api/resources/commons/types/EventTriggerBase.js +4 -0
- package/api/resources/commons/types/EventTriggerResponse.d.ts +22 -0
- package/api/resources/commons/types/EventTriggerResponse.js +4 -0
- package/api/resources/commons/types/EventTriggerType.d.ts +8 -0
- package/api/resources/commons/types/EventTriggerType.js +7 -0
- package/api/resources/commons/types/Feedback.d.ts +12 -0
- package/api/resources/commons/types/Feedback.js +4 -0
- package/api/resources/commons/types/FeedbackBase.d.ts +10 -0
- package/api/resources/commons/types/FeedbackBase.js +4 -0
- package/api/resources/{conversation → commons}/types/FeedbackType.d.ts +3 -1
- package/{dist/api/resources/conversation → api/resources/commons}/types/FeedbackType.js +2 -0
- package/api/resources/commons/types/UserData.d.ts +10 -0
- package/api/resources/commons/types/UserData.js +4 -0
- package/api/resources/commons/types/VisibilityType.d.ts +9 -0
- package/api/resources/commons/types/VisibilityType.js +8 -0
- package/api/resources/commons/types/index.d.ts +16 -1
- package/api/resources/commons/types/index.js +16 -1
- package/api/resources/conversation/client/Client.d.ts +149 -44
- package/api/resources/conversation/client/Client.js +474 -132
- package/api/resources/conversation/index.d.ts +0 -1
- package/api/resources/conversation/index.js +0 -1
- package/api/resources/conversation/types/ActionFormField.d.ts +1 -0
- package/api/resources/conversation/types/AskRequest.d.ts +15 -3
- package/api/resources/conversation/types/AskStreamActionEvent.d.ts +6 -0
- package/api/resources/conversation/types/AskStreamActionEvent.js +4 -0
- package/api/resources/conversation/types/AskStreamStartEvent.d.ts +2 -1
- package/api/resources/conversation/types/AskStreamTextEvent.d.ts +1 -0
- package/api/resources/conversation/types/BotActionFormResponse.d.ts +1 -0
- package/api/resources/conversation/types/BotMessage.d.ts +2 -0
- package/api/resources/conversation/types/Capability.d.ts +18 -0
- package/api/resources/conversation/types/Capability.js +8 -0
- package/{dist/api/resources/knowledge/types/IdBody.d.ts → api/resources/conversation/types/CategorizationResponse.d.ts} +2 -2
- package/api/resources/conversation/types/CategorizationResponse.js +4 -0
- package/api/resources/conversation/types/ConversationAnalysis.d.ts +12 -0
- package/api/resources/conversation/types/ConversationAnalysis.js +4 -0
- package/api/resources/conversation/types/ConversationBase.d.ts +14 -4
- package/api/resources/conversation/types/ConversationMessageBase.d.ts +4 -5
- package/api/resources/conversation/types/ConversationMessageRequest.d.ts +3 -1
- package/api/resources/conversation/types/ConversationRequest.d.ts +2 -0
- package/api/resources/conversation/types/ConversationResponse.d.ts +4 -0
- package/api/resources/conversation/types/FeedbackRequest.d.ts +7 -7
- package/api/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +2 -1
- package/api/resources/conversation/types/ResponseConfig.d.ts +12 -0
- package/api/resources/conversation/types/ResponseConfig.js +4 -0
- package/api/resources/conversation/types/ResponseLength.d.ts +9 -0
- package/api/resources/conversation/types/ResponseLength.js +8 -0
- package/api/resources/conversation/types/Sentiment.d.ts +14 -0
- package/api/resources/conversation/types/Sentiment.js +10 -0
- package/api/resources/conversation/types/StreamResponse.d.ts +4 -1
- package/api/resources/conversation/types/SubmitActionFormRequest.d.ts +8 -0
- package/api/resources/conversation/types/SubmitActionFormRequest.js +4 -0
- package/api/resources/conversation/types/UserMessage.d.ts +3 -3
- package/api/resources/conversation/types/UserMessageBase.d.ts +11 -0
- package/api/resources/conversation/types/UserMessageBase.js +4 -0
- package/api/resources/conversation/types/index.d.ts +9 -3
- package/api/resources/conversation/types/index.js +9 -3
- package/api/resources/index.d.ts +6 -2
- package/api/resources/index.js +6 -2
- package/api/resources/knowledge/client/Client.d.ts +86 -74
- package/api/resources/knowledge/client/Client.js +240 -175
- package/api/resources/knowledge/index.d.ts +0 -1
- package/api/resources/knowledge/index.js +0 -1
- package/{dist/api/resources/knowledge/types/KnowledgeDocument.d.ts → api/resources/knowledge/types/BaseKnowledgeDocument.d.ts} +2 -5
- package/api/resources/knowledge/types/BaseKnowledgeDocument.js +4 -0
- package/api/resources/knowledge/types/{KnowledgeBase.d.ts → KnowledgeBaseProperties.d.ts} +3 -3
- package/api/resources/knowledge/types/KnowledgeBaseProperties.js +4 -0
- package/api/resources/knowledge/types/KnowledgeBaseRequest.d.ts +18 -0
- package/api/resources/knowledge/types/KnowledgeBaseRequest.js +4 -0
- package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +22 -0
- package/api/resources/knowledge/types/KnowledgeBaseResponse.js +4 -0
- package/api/resources/knowledge/types/KnowledgeBaseType.d.ts +1 -1
- package/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +7 -3
- package/api/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +11 -0
- package/api/resources/knowledge/types/KnowledgeDocumentContentType.js +7 -0
- package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +22 -0
- package/api/resources/knowledge/types/KnowledgeDocumentRequest.js +4 -0
- package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +24 -0
- package/api/resources/knowledge/types/KnowledgeDocumentResponse.js +4 -0
- package/api/resources/knowledge/types/index.d.ts +7 -5
- package/api/resources/knowledge/types/index.js +7 -5
- package/api/resources/triggers/client/Client.d.ts +83 -0
- package/api/resources/triggers/client/Client.js +306 -0
- package/api/resources/triggers/client/index.d.ts +1 -0
- package/api/resources/triggers/client/index.js +1 -0
- package/api/resources/triggers/index.d.ts +2 -0
- package/api/resources/triggers/index.js +2 -0
- package/api/resources/triggers/types/EventTriggerRequest.d.ts +18 -0
- package/api/resources/triggers/types/EventTriggerRequest.js +4 -0
- package/api/resources/triggers/types/index.d.ts +1 -0
- package/api/resources/triggers/types/index.js +1 -0
- package/api/resources/users/client/Client.d.ts +77 -0
- package/api/resources/users/client/Client.js +230 -0
- package/api/resources/users/client/index.d.ts +1 -0
- package/api/resources/users/client/index.js +1 -0
- package/api/resources/users/index.d.ts +1 -0
- package/api/resources/users/index.js +1 -0
- package/core/fetcher/Fetcher.d.ts +4 -1
- package/core/fetcher/Fetcher.js +18 -159
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +6 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +32 -0
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +19 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +48 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +38 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +28 -0
- package/core/fetcher/signals.d.ts +12 -0
- package/core/fetcher/signals.js +32 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +243 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +120 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +225 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +23 -0
- package/core/index.d.ts +1 -1
- package/core/index.js +1 -1
- package/core/runtime/runtime.d.ts +1 -0
- package/core/runtime/runtime.js +1 -0
- package/core/schemas/Schema.d.ts +8 -4
- package/core/schemas/Schema.js +1 -0
- package/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/core/schemas/builders/bigint/bigint.js +46 -0
- package/core/schemas/builders/bigint/index.d.ts +1 -0
- package/core/schemas/builders/bigint/index.js +1 -0
- package/core/schemas/builders/index.d.ts +1 -0
- package/core/schemas/builders/index.js +1 -0
- package/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/core/schemas/builders/lazy/lazy.js +8 -19
- package/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/core/schemas/builders/list/list.js +31 -44
- package/core/schemas/builders/object/object.js +90 -111
- package/core/schemas/builders/object/types.d.ts +2 -2
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/core/schemas/builders/record/record.js +49 -60
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/core/schemas/builders/set/set.js +6 -15
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/core/schemas/builders/union/union.js +51 -62
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
- package/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/dist/Client.d.ts +21 -0
- package/dist/Client.js +20 -0
- package/dist/api/resources/actions/client/Client.d.ts +96 -0
- package/dist/api/resources/actions/client/Client.js +319 -0
- package/dist/api/resources/actions/client/index.d.ts +1 -0
- package/dist/api/resources/actions/client/index.js +1 -0
- package/dist/api/resources/actions/index.d.ts +2 -0
- package/dist/api/resources/actions/index.js +2 -0
- package/dist/api/resources/actions/types/ActionBase.d.ts +18 -0
- package/dist/api/resources/actions/types/ActionBase.js +4 -0
- package/dist/api/resources/actions/types/ActionParameter.d.ts +9 -0
- package/dist/api/resources/actions/types/ActionParameter.js +4 -0
- package/dist/api/resources/actions/types/ActionRequest.d.ts +31 -0
- package/dist/api/resources/actions/types/ActionRequest.js +4 -0
- package/dist/api/resources/actions/types/ActionResponse.d.ts +35 -0
- package/dist/api/resources/actions/types/ActionResponse.js +4 -0
- package/dist/api/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +10 -0
- package/dist/api/resources/actions/types/ConversationExecutedActionPrecondition.js +4 -0
- package/dist/api/resources/actions/types/ConversationPrecondition.d.ts +16 -0
- package/dist/api/resources/actions/types/ConversationPrecondition.js +4 -0
- package/dist/api/resources/actions/types/MetadataPrecondition.d.ts +10 -0
- package/dist/api/resources/actions/types/MetadataPrecondition.js +4 -0
- package/dist/api/resources/actions/types/Precondition.d.ts +31 -0
- package/dist/api/resources/actions/types/Precondition.js +4 -0
- package/dist/api/resources/actions/types/PreconditionBase.d.ts +8 -0
- package/dist/api/resources/actions/types/PreconditionBase.js +4 -0
- package/dist/api/resources/actions/types/PreconditionGroup.d.ts +8 -0
- package/dist/api/resources/actions/types/PreconditionGroup.js +4 -0
- package/dist/api/resources/actions/types/PreconditionGroupOperator.d.ts +8 -0
- package/dist/api/resources/actions/types/PreconditionGroupOperator.js +7 -0
- package/dist/api/resources/actions/types/PreconditionOperator.d.ts +7 -0
- package/dist/api/resources/actions/types/PreconditionOperator.js +6 -0
- package/dist/api/resources/actions/types/TagsPrecondition.d.ts +8 -0
- package/dist/api/resources/actions/types/TagsPrecondition.js +4 -0
- package/dist/api/resources/actions/types/index.d.ts +13 -0
- package/dist/api/resources/actions/types/index.js +13 -0
- package/dist/api/resources/appSettings/client/Client.d.ts +47 -0
- package/dist/api/resources/appSettings/client/Client.js +125 -0
- package/dist/api/resources/appSettings/client/index.d.ts +1 -0
- package/dist/api/resources/appSettings/client/index.js +1 -0
- package/dist/api/resources/appSettings/index.d.ts +1 -0
- package/dist/api/resources/appSettings/index.js +1 -0
- package/dist/api/resources/{conversation/errors/EmptyConversationError.d.ts → commons/errors/BadRequestError.d.ts} +1 -1
- package/dist/api/resources/{knowledge/errors/VersionInProgressError.js → commons/errors/BadRequestError.js} +3 -3
- package/dist/api/resources/commons/errors/NotFoundError.d.ts +8 -0
- package/{api/resources/commons/errors/AgentNotFoundError.js → dist/api/resources/commons/errors/NotFoundError.js} +3 -3
- package/dist/api/resources/commons/errors/ServerError.d.ts +8 -0
- package/dist/api/resources/commons/errors/ServerError.js +14 -0
- package/dist/api/resources/commons/errors/index.d.ts +3 -1
- package/dist/api/resources/commons/errors/index.js +3 -1
- package/dist/api/resources/commons/types/AppUser.d.ts +9 -0
- package/dist/api/resources/commons/types/AppUser.js +4 -0
- package/dist/api/resources/commons/types/AppUserIdentifier.d.ts +9 -0
- package/dist/api/resources/commons/types/AppUserIdentifier.js +4 -0
- package/dist/api/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +8 -0
- package/dist/api/resources/commons/types/AppUserIdentifyingPropertyType.js +7 -0
- package/dist/api/resources/commons/types/AppUserRequest.d.ts +26 -0
- package/dist/api/resources/commons/types/AppUserRequest.js +4 -0
- package/dist/api/resources/commons/types/AppUserResponse.d.ts +42 -0
- package/dist/api/resources/commons/types/AppUserResponse.js +4 -0
- package/dist/api/resources/commons/types/EntityId.d.ts +14 -0
- package/dist/api/resources/commons/types/EntityId.js +4 -0
- package/dist/api/resources/commons/types/EntityIdBase.d.ts +10 -0
- package/dist/api/resources/commons/types/EntityIdBase.js +4 -0
- package/dist/api/resources/commons/types/EntityType.d.ts +16 -0
- package/dist/api/resources/commons/types/EntityType.js +15 -0
- package/dist/api/resources/commons/types/EventTriggerBase.d.ts +10 -0
- package/dist/api/resources/commons/types/EventTriggerBase.js +4 -0
- package/dist/api/resources/commons/types/EventTriggerResponse.d.ts +22 -0
- package/dist/api/resources/commons/types/EventTriggerResponse.js +4 -0
- package/dist/api/resources/commons/types/EventTriggerType.d.ts +8 -0
- package/dist/api/resources/commons/types/EventTriggerType.js +7 -0
- package/dist/api/resources/commons/types/Feedback.d.ts +12 -0
- package/dist/api/resources/commons/types/Feedback.js +4 -0
- package/dist/api/resources/commons/types/FeedbackBase.d.ts +10 -0
- package/dist/api/resources/commons/types/FeedbackBase.js +4 -0
- package/dist/api/resources/{conversation → commons}/types/FeedbackType.d.ts +3 -1
- package/{api/resources/conversation → dist/api/resources/commons}/types/FeedbackType.js +2 -0
- package/dist/api/resources/commons/types/UserData.d.ts +10 -0
- package/dist/api/resources/commons/types/UserData.js +4 -0
- package/dist/api/resources/commons/types/VisibilityType.d.ts +9 -0
- package/dist/api/resources/commons/types/VisibilityType.js +8 -0
- package/dist/api/resources/commons/types/index.d.ts +16 -1
- package/dist/api/resources/commons/types/index.js +16 -1
- package/dist/api/resources/conversation/client/Client.d.ts +149 -44
- package/dist/api/resources/conversation/client/Client.js +474 -132
- package/dist/api/resources/conversation/index.d.ts +0 -1
- package/dist/api/resources/conversation/index.js +0 -1
- package/dist/api/resources/conversation/types/ActionFormField.d.ts +1 -0
- package/dist/api/resources/conversation/types/AskRequest.d.ts +15 -3
- package/dist/api/resources/conversation/types/AskStreamActionEvent.d.ts +6 -0
- package/dist/api/resources/conversation/types/AskStreamActionEvent.js +4 -0
- package/dist/api/resources/conversation/types/AskStreamStartEvent.d.ts +2 -1
- package/dist/api/resources/conversation/types/AskStreamTextEvent.d.ts +1 -0
- package/dist/api/resources/conversation/types/BotActionFormResponse.d.ts +1 -0
- package/dist/api/resources/conversation/types/BotMessage.d.ts +2 -0
- package/dist/api/resources/conversation/types/Capability.d.ts +18 -0
- package/dist/api/resources/conversation/types/Capability.js +8 -0
- package/dist/api/resources/conversation/types/CategorizationResponse.d.ts +6 -0
- package/dist/api/resources/conversation/types/CategorizationResponse.js +4 -0
- package/dist/api/resources/conversation/types/ConversationAnalysis.d.ts +12 -0
- package/dist/api/resources/conversation/types/ConversationAnalysis.js +4 -0
- package/dist/api/resources/conversation/types/ConversationBase.d.ts +14 -4
- package/dist/api/resources/conversation/types/ConversationMessageBase.d.ts +4 -5
- package/dist/api/resources/conversation/types/ConversationMessageRequest.d.ts +3 -1
- package/dist/api/resources/conversation/types/ConversationRequest.d.ts +2 -0
- package/dist/api/resources/conversation/types/ConversationResponse.d.ts +4 -0
- package/dist/api/resources/conversation/types/FeedbackRequest.d.ts +7 -7
- package/dist/api/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +2 -1
- package/dist/api/resources/conversation/types/ResponseConfig.d.ts +12 -0
- package/dist/api/resources/conversation/types/ResponseConfig.js +4 -0
- package/dist/api/resources/conversation/types/ResponseLength.d.ts +9 -0
- package/dist/api/resources/conversation/types/ResponseLength.js +8 -0
- package/dist/api/resources/conversation/types/Sentiment.d.ts +14 -0
- package/dist/api/resources/conversation/types/Sentiment.js +10 -0
- package/dist/api/resources/conversation/types/StreamResponse.d.ts +4 -1
- package/dist/api/resources/conversation/types/SubmitActionFormRequest.d.ts +8 -0
- package/dist/api/resources/conversation/types/SubmitActionFormRequest.js +4 -0
- package/dist/api/resources/conversation/types/UserMessage.d.ts +3 -3
- package/dist/api/resources/conversation/types/UserMessageBase.d.ts +11 -0
- package/dist/api/resources/conversation/types/UserMessageBase.js +4 -0
- package/dist/api/resources/conversation/types/index.d.ts +9 -3
- package/dist/api/resources/conversation/types/index.js +9 -3
- package/dist/api/resources/index.d.ts +6 -2
- package/dist/api/resources/index.js +6 -2
- package/dist/api/resources/knowledge/client/Client.d.ts +86 -74
- package/dist/api/resources/knowledge/client/Client.js +240 -175
- package/dist/api/resources/knowledge/index.d.ts +0 -1
- package/dist/api/resources/knowledge/index.js +0 -1
- package/{api/resources/knowledge/types/KnowledgeDocument.d.ts → dist/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts} +2 -5
- package/dist/api/resources/knowledge/types/BaseKnowledgeDocument.js +4 -0
- package/dist/api/resources/knowledge/types/{KnowledgeBase.d.ts → KnowledgeBaseProperties.d.ts} +3 -3
- package/dist/api/resources/knowledge/types/KnowledgeBaseProperties.js +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseRequest.d.ts +18 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseRequest.js +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +22 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.js +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseType.d.ts +1 -1
- package/dist/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +7 -3
- package/dist/api/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +11 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentContentType.js +7 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +22 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.js +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +24 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.js +4 -0
- package/dist/api/resources/knowledge/types/index.d.ts +7 -5
- package/dist/api/resources/knowledge/types/index.js +7 -5
- package/dist/api/resources/triggers/client/Client.d.ts +83 -0
- package/dist/api/resources/triggers/client/Client.js +306 -0
- package/dist/api/resources/triggers/client/index.d.ts +1 -0
- package/dist/api/resources/triggers/client/index.js +1 -0
- package/dist/api/resources/triggers/index.d.ts +2 -0
- package/dist/api/resources/triggers/index.js +2 -0
- package/dist/api/resources/triggers/types/EventTriggerRequest.d.ts +18 -0
- package/dist/api/resources/triggers/types/EventTriggerRequest.js +4 -0
- package/dist/api/resources/triggers/types/index.d.ts +1 -0
- package/dist/api/resources/triggers/types/index.js +1 -0
- package/dist/api/resources/users/client/Client.d.ts +77 -0
- package/dist/api/resources/users/client/Client.js +230 -0
- package/dist/api/resources/users/client/index.d.ts +1 -0
- package/dist/api/resources/users/client/index.js +1 -0
- package/dist/api/resources/users/index.d.ts +1 -0
- package/dist/api/resources/users/index.js +1 -0
- package/dist/core/fetcher/Fetcher.d.ts +4 -1
- package/dist/core/fetcher/Fetcher.js +18 -159
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +6 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +32 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +19 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +48 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +38 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +28 -0
- package/dist/core/fetcher/signals.d.ts +12 -0
- package/dist/core/fetcher/signals.js +32 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +243 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +120 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +225 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +23 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/runtime/runtime.d.ts +1 -0
- package/dist/core/runtime/runtime.js +1 -0
- package/dist/core/schemas/Schema.d.ts +8 -4
- package/dist/core/schemas/Schema.js +1 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/dist/core/schemas/builders/bigint/bigint.js +46 -0
- package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
- package/dist/core/schemas/builders/bigint/index.js +1 -0
- package/dist/core/schemas/builders/index.d.ts +1 -0
- package/dist/core/schemas/builders/index.js +1 -0
- package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/dist/core/schemas/builders/lazy/lazy.js +8 -19
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/dist/core/schemas/builders/list/list.js +31 -44
- package/dist/core/schemas/builders/object/object.js +90 -111
- package/dist/core/schemas/builders/object/types.d.ts +2 -2
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/dist/core/schemas/builders/record/record.js +49 -60
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/dist/core/schemas/builders/set/set.js +6 -15
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/dist/core/schemas/builders/union/union.js +51 -62
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
- package/dist/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/dist/serialization/resources/actions/index.d.ts +1 -0
- package/dist/serialization/resources/actions/index.js +1 -0
- package/dist/serialization/resources/actions/types/ActionBase.d.ts +18 -0
- package/dist/serialization/resources/actions/types/ActionBase.js +14 -0
- package/dist/serialization/resources/actions/types/ActionParameter.d.ts +15 -0
- package/dist/serialization/resources/actions/types/ActionParameter.js +10 -0
- package/dist/serialization/resources/actions/types/ActionRequest.d.ts +14 -0
- package/dist/serialization/resources/actions/types/ActionRequest.js +11 -0
- package/dist/serialization/resources/actions/types/ActionResponse.d.ts +14 -0
- package/dist/serialization/resources/actions/types/ActionResponse.js +11 -0
- package/dist/serialization/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +14 -0
- package/dist/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +11 -0
- package/dist/serialization/resources/actions/types/ConversationPrecondition.d.ts +22 -0
- package/dist/serialization/resources/actions/types/ConversationPrecondition.js +17 -0
- package/dist/serialization/resources/actions/types/MetadataPrecondition.d.ts +14 -0
- package/dist/serialization/resources/actions/types/MetadataPrecondition.js +11 -0
- package/dist/serialization/resources/actions/types/Precondition.d.ts +22 -0
- package/dist/serialization/resources/actions/types/Precondition.js +19 -0
- package/dist/serialization/resources/actions/types/PreconditionBase.d.ts +13 -0
- package/dist/serialization/resources/actions/types/PreconditionBase.js +8 -0
- package/dist/serialization/resources/actions/types/PreconditionGroup.d.ts +14 -0
- package/dist/serialization/resources/actions/types/PreconditionGroup.js +10 -0
- package/dist/serialization/resources/actions/types/PreconditionGroupOperator.d.ts +10 -0
- package/dist/serialization/resources/actions/types/PreconditionGroupOperator.js +5 -0
- package/dist/serialization/resources/actions/types/PreconditionOperator.d.ts +10 -0
- package/dist/serialization/resources/actions/types/PreconditionOperator.js +5 -0
- package/dist/serialization/resources/actions/types/TagsPrecondition.d.ts +13 -0
- package/dist/serialization/resources/actions/types/TagsPrecondition.js +10 -0
- package/dist/serialization/resources/actions/types/index.d.ts +13 -0
- package/dist/serialization/resources/actions/types/index.js +13 -0
- package/dist/serialization/resources/appSettings/client/get.d.ts +9 -0
- package/dist/serialization/resources/appSettings/client/get.js +5 -0
- package/dist/serialization/resources/appSettings/client/index.d.ts +1 -0
- package/dist/serialization/resources/appSettings/client/index.js +1 -0
- package/dist/serialization/resources/appSettings/index.d.ts +1 -0
- package/dist/serialization/resources/appSettings/index.js +1 -0
- package/dist/serialization/resources/commons/types/AppUser.d.ts +15 -0
- package/dist/serialization/resources/commons/types/AppUser.js +10 -0
- package/dist/serialization/resources/commons/types/AppUserIdentifier.d.ts +14 -0
- package/dist/serialization/resources/commons/types/AppUserIdentifier.js +9 -0
- package/dist/serialization/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +10 -0
- package/dist/serialization/resources/commons/types/AppUserIdentifyingPropertyType.js +5 -0
- package/dist/serialization/resources/commons/types/AppUserRequest.d.ts +14 -0
- package/dist/serialization/resources/commons/types/AppUserRequest.js +11 -0
- package/dist/serialization/resources/commons/types/AppUserResponse.d.ts +16 -0
- package/dist/serialization/resources/commons/types/AppUserResponse.js +13 -0
- package/dist/serialization/resources/commons/types/EntityId.d.ts +17 -0
- package/dist/serialization/resources/commons/types/EntityId.js +14 -0
- package/{serialization/resources/knowledge/types/IdBody.d.ts → dist/serialization/resources/commons/types/EntityIdBase.d.ts} +3 -3
- package/dist/serialization/resources/{knowledge/types/IdBody.js → commons/types/EntityIdBase.js} +2 -2
- package/dist/serialization/resources/commons/types/EntityType.d.ts +10 -0
- package/dist/serialization/resources/commons/types/EntityType.js +16 -0
- package/dist/serialization/resources/commons/types/EventTriggerBase.d.ts +14 -0
- package/dist/serialization/resources/commons/types/EventTriggerBase.js +9 -0
- package/dist/serialization/resources/commons/types/EventTriggerResponse.d.ts +14 -0
- package/dist/serialization/resources/commons/types/EventTriggerResponse.js +11 -0
- package/dist/serialization/resources/commons/types/EventTriggerType.d.ts +10 -0
- package/dist/serialization/resources/commons/types/EventTriggerType.js +5 -0
- package/dist/serialization/resources/commons/types/Feedback.d.ts +16 -0
- package/dist/serialization/resources/commons/types/Feedback.js +13 -0
- package/dist/serialization/resources/commons/types/FeedbackBase.d.ts +14 -0
- package/dist/serialization/resources/commons/types/FeedbackBase.js +9 -0
- package/{serialization/resources/conversation → dist/serialization/resources/commons}/types/FeedbackType.d.ts +1 -1
- package/dist/serialization/resources/{conversation → commons}/types/FeedbackType.js +1 -1
- package/dist/serialization/resources/commons/types/UserData.d.ts +14 -0
- package/dist/serialization/resources/commons/types/UserData.js +9 -0
- package/dist/serialization/resources/commons/types/VisibilityType.d.ts +10 -0
- package/dist/serialization/resources/commons/types/VisibilityType.js +5 -0
- package/dist/serialization/resources/commons/types/index.d.ts +16 -1
- package/dist/serialization/resources/commons/types/index.js +16 -1
- package/dist/serialization/resources/conversation/client/addConversationMetadata.d.ts +13 -0
- package/dist/serialization/resources/conversation/client/addConversationMetadata.js +6 -0
- package/dist/serialization/resources/conversation/client/index.d.ts +1 -0
- package/dist/serialization/resources/conversation/client/index.js +1 -0
- package/dist/serialization/resources/conversation/types/ActionFormField.d.ts +1 -0
- package/dist/serialization/resources/conversation/types/ActionFormField.js +1 -0
- package/dist/serialization/resources/conversation/types/AskRequest.d.ts +3 -3
- package/dist/serialization/resources/conversation/types/AskRequest.js +3 -3
- package/dist/serialization/resources/conversation/types/AskStreamActionEvent.d.ts +12 -0
- package/dist/serialization/resources/conversation/types/AskStreamActionEvent.js +6 -0
- package/dist/serialization/resources/conversation/types/AskStreamStartEvent.d.ts +2 -1
- package/dist/serialization/resources/conversation/types/AskStreamStartEvent.js +2 -1
- package/dist/serialization/resources/conversation/types/BotActionFormResponse.d.ts +1 -0
- package/dist/serialization/resources/conversation/types/BotActionFormResponse.js +1 -0
- package/dist/serialization/resources/conversation/types/BotMessage.d.ts +2 -0
- package/dist/serialization/resources/conversation/types/BotMessage.js +2 -0
- package/dist/serialization/resources/conversation/types/Capability.d.ts +10 -0
- package/dist/serialization/resources/conversation/types/Capability.js +5 -0
- package/dist/serialization/resources/{commons/types/User.d.ts → conversation/types/CategorizationResponse.d.ts} +3 -5
- package/dist/serialization/resources/conversation/types/CategorizationResponse.js +7 -0
- package/dist/serialization/resources/conversation/types/ConversationAnalysis.d.ts +15 -0
- package/dist/serialization/resources/conversation/types/ConversationAnalysis.js +10 -0
- package/dist/serialization/resources/conversation/types/ConversationBase.d.ts +8 -3
- package/dist/serialization/resources/conversation/types/ConversationBase.js +8 -3
- package/dist/serialization/resources/conversation/types/ConversationMessageBase.d.ts +2 -3
- package/dist/serialization/resources/conversation/types/ConversationMessageBase.js +2 -3
- package/dist/serialization/resources/conversation/types/ConversationMessageRequest.d.ts +4 -2
- package/dist/serialization/resources/conversation/types/ConversationMessageRequest.js +7 -2
- package/dist/serialization/resources/conversation/types/ConversationRequest.d.ts +2 -0
- package/dist/serialization/resources/conversation/types/ConversationRequest.js +2 -0
- package/dist/serialization/resources/conversation/types/ConversationResponse.d.ts +4 -0
- package/dist/serialization/resources/conversation/types/ConversationResponse.js +4 -0
- package/dist/serialization/resources/conversation/types/FeedbackRequest.d.ts +6 -5
- package/dist/serialization/resources/conversation/types/FeedbackRequest.js +9 -6
- package/dist/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +2 -1
- package/dist/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.js +2 -1
- package/dist/serialization/resources/conversation/types/ResponseConfig.d.ts +16 -0
- package/dist/serialization/resources/conversation/types/ResponseConfig.js +11 -0
- package/dist/serialization/resources/conversation/types/ResponseLength.d.ts +10 -0
- package/dist/serialization/resources/conversation/types/ResponseLength.js +5 -0
- package/dist/serialization/resources/conversation/types/Sentiment.d.ts +10 -0
- package/dist/serialization/resources/conversation/types/Sentiment.js +5 -0
- package/dist/serialization/resources/conversation/types/StreamResponse.d.ts +5 -1
- package/dist/serialization/resources/conversation/types/StreamResponse.js +2 -0
- package/dist/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts +13 -0
- package/dist/serialization/resources/conversation/types/SubmitActionFormRequest.js +8 -0
- package/dist/serialization/resources/conversation/types/UserMessage.d.ts +4 -5
- package/dist/serialization/resources/conversation/types/UserMessage.js +4 -5
- package/dist/serialization/resources/conversation/types/UserMessageBase.d.ts +17 -0
- package/dist/serialization/resources/conversation/types/UserMessageBase.js +14 -0
- package/dist/serialization/resources/conversation/types/index.d.ts +9 -3
- package/dist/serialization/resources/conversation/types/index.js +9 -3
- package/dist/serialization/resources/index.d.ts +5 -0
- package/dist/serialization/resources/index.js +5 -0
- package/dist/serialization/resources/knowledge/types/{KnowledgeDocument.d.ts → BaseKnowledgeDocument.d.ts} +3 -5
- package/{serialization/resources/knowledge/types/KnowledgeDocument.js → dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.js} +2 -6
- package/{serialization/resources/knowledge/types/KnowledgeBase.d.ts → dist/serialization/resources/knowledge/types/KnowledgeBaseProperties.d.ts} +4 -5
- package/dist/serialization/resources/knowledge/types/{KnowledgeBase.js → KnowledgeBaseProperties.js} +3 -6
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseRequest.d.ts +14 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseRequest.js +11 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +14 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +11 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +0 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +0 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +10 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentContentType.js +5 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +17 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +14 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +15 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +12 -0
- package/dist/serialization/resources/knowledge/types/index.d.ts +7 -5
- package/dist/serialization/resources/knowledge/types/index.js +7 -5
- package/dist/serialization/resources/triggers/index.d.ts +1 -0
- package/dist/serialization/resources/triggers/index.js +1 -0
- package/dist/serialization/resources/triggers/types/EventTriggerRequest.d.ts +14 -0
- package/dist/serialization/resources/triggers/types/EventTriggerRequest.js +11 -0
- package/dist/serialization/resources/triggers/types/index.d.ts +1 -0
- package/dist/serialization/resources/triggers/types/index.js +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +1 -0
- package/package.json +12 -2
- package/reference.md +1876 -0
- package/serialization/resources/actions/index.d.ts +1 -0
- package/serialization/resources/actions/index.js +1 -0
- package/serialization/resources/actions/types/ActionBase.d.ts +18 -0
- package/serialization/resources/actions/types/ActionBase.js +14 -0
- package/serialization/resources/actions/types/ActionParameter.d.ts +15 -0
- package/serialization/resources/actions/types/ActionParameter.js +10 -0
- package/serialization/resources/actions/types/ActionRequest.d.ts +14 -0
- package/serialization/resources/actions/types/ActionRequest.js +11 -0
- package/serialization/resources/actions/types/ActionResponse.d.ts +14 -0
- package/serialization/resources/actions/types/ActionResponse.js +11 -0
- package/serialization/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +14 -0
- package/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +11 -0
- package/serialization/resources/actions/types/ConversationPrecondition.d.ts +22 -0
- package/serialization/resources/actions/types/ConversationPrecondition.js +17 -0
- package/serialization/resources/actions/types/MetadataPrecondition.d.ts +14 -0
- package/serialization/resources/actions/types/MetadataPrecondition.js +11 -0
- package/serialization/resources/actions/types/Precondition.d.ts +22 -0
- package/serialization/resources/actions/types/Precondition.js +19 -0
- package/serialization/resources/actions/types/PreconditionBase.d.ts +13 -0
- package/serialization/resources/actions/types/PreconditionBase.js +8 -0
- package/serialization/resources/actions/types/PreconditionGroup.d.ts +14 -0
- package/serialization/resources/actions/types/PreconditionGroup.js +10 -0
- package/serialization/resources/actions/types/PreconditionGroupOperator.d.ts +10 -0
- package/serialization/resources/actions/types/PreconditionGroupOperator.js +5 -0
- package/serialization/resources/actions/types/PreconditionOperator.d.ts +10 -0
- package/serialization/resources/actions/types/PreconditionOperator.js +5 -0
- package/serialization/resources/actions/types/TagsPrecondition.d.ts +13 -0
- package/serialization/resources/actions/types/TagsPrecondition.js +10 -0
- package/serialization/resources/actions/types/index.d.ts +13 -0
- package/serialization/resources/actions/types/index.js +13 -0
- package/serialization/resources/appSettings/client/get.d.ts +9 -0
- package/serialization/resources/appSettings/client/get.js +5 -0
- package/serialization/resources/appSettings/client/index.d.ts +1 -0
- package/serialization/resources/appSettings/client/index.js +1 -0
- package/serialization/resources/appSettings/index.d.ts +1 -0
- package/serialization/resources/appSettings/index.js +1 -0
- package/serialization/resources/commons/types/AppUser.d.ts +15 -0
- package/serialization/resources/commons/types/AppUser.js +10 -0
- package/serialization/resources/commons/types/AppUserIdentifier.d.ts +14 -0
- package/serialization/resources/commons/types/AppUserIdentifier.js +9 -0
- package/serialization/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +10 -0
- package/serialization/resources/commons/types/AppUserIdentifyingPropertyType.js +5 -0
- package/serialization/resources/commons/types/AppUserRequest.d.ts +14 -0
- package/serialization/resources/commons/types/AppUserRequest.js +11 -0
- package/serialization/resources/commons/types/AppUserResponse.d.ts +16 -0
- package/serialization/resources/commons/types/AppUserResponse.js +13 -0
- package/serialization/resources/commons/types/EntityId.d.ts +17 -0
- package/serialization/resources/commons/types/EntityId.js +14 -0
- package/{dist/serialization/resources/knowledge/types/IdBody.d.ts → serialization/resources/commons/types/EntityIdBase.d.ts} +3 -3
- package/serialization/resources/{knowledge/types/IdBody.js → commons/types/EntityIdBase.js} +2 -2
- package/serialization/resources/commons/types/EntityType.d.ts +10 -0
- package/serialization/resources/commons/types/EntityType.js +16 -0
- package/serialization/resources/commons/types/EventTriggerBase.d.ts +14 -0
- package/serialization/resources/commons/types/EventTriggerBase.js +9 -0
- package/serialization/resources/commons/types/EventTriggerResponse.d.ts +14 -0
- package/serialization/resources/commons/types/EventTriggerResponse.js +11 -0
- package/serialization/resources/commons/types/EventTriggerType.d.ts +10 -0
- package/serialization/resources/commons/types/EventTriggerType.js +5 -0
- package/serialization/resources/commons/types/Feedback.d.ts +16 -0
- package/serialization/resources/commons/types/Feedback.js +13 -0
- package/serialization/resources/commons/types/FeedbackBase.d.ts +14 -0
- package/serialization/resources/commons/types/FeedbackBase.js +9 -0
- package/{dist/serialization/resources/conversation → serialization/resources/commons}/types/FeedbackType.d.ts +1 -1
- package/serialization/resources/{conversation → commons}/types/FeedbackType.js +1 -1
- package/serialization/resources/commons/types/UserData.d.ts +14 -0
- package/serialization/resources/commons/types/UserData.js +9 -0
- package/serialization/resources/commons/types/VisibilityType.d.ts +10 -0
- package/serialization/resources/commons/types/VisibilityType.js +5 -0
- package/serialization/resources/commons/types/index.d.ts +16 -1
- package/serialization/resources/commons/types/index.js +16 -1
- package/serialization/resources/conversation/client/addConversationMetadata.d.ts +13 -0
- package/serialization/resources/conversation/client/addConversationMetadata.js +6 -0
- package/serialization/resources/conversation/client/index.d.ts +1 -0
- package/serialization/resources/conversation/client/index.js +1 -0
- package/serialization/resources/conversation/types/ActionFormField.d.ts +1 -0
- package/serialization/resources/conversation/types/ActionFormField.js +1 -0
- package/serialization/resources/conversation/types/AskRequest.d.ts +3 -3
- package/serialization/resources/conversation/types/AskRequest.js +3 -3
- package/serialization/resources/conversation/types/AskStreamActionEvent.d.ts +12 -0
- package/serialization/resources/conversation/types/AskStreamActionEvent.js +6 -0
- package/serialization/resources/conversation/types/AskStreamStartEvent.d.ts +2 -1
- package/serialization/resources/conversation/types/AskStreamStartEvent.js +2 -1
- package/serialization/resources/conversation/types/BotActionFormResponse.d.ts +1 -0
- package/serialization/resources/conversation/types/BotActionFormResponse.js +1 -0
- package/serialization/resources/conversation/types/BotMessage.d.ts +2 -0
- package/serialization/resources/conversation/types/BotMessage.js +2 -0
- package/serialization/resources/conversation/types/Capability.d.ts +10 -0
- package/serialization/resources/conversation/types/Capability.js +5 -0
- package/serialization/resources/{commons/types/User.d.ts → conversation/types/CategorizationResponse.d.ts} +3 -5
- package/serialization/resources/conversation/types/CategorizationResponse.js +7 -0
- package/serialization/resources/conversation/types/ConversationAnalysis.d.ts +15 -0
- package/serialization/resources/conversation/types/ConversationAnalysis.js +10 -0
- package/serialization/resources/conversation/types/ConversationBase.d.ts +8 -3
- package/serialization/resources/conversation/types/ConversationBase.js +8 -3
- package/serialization/resources/conversation/types/ConversationMessageBase.d.ts +2 -3
- package/serialization/resources/conversation/types/ConversationMessageBase.js +2 -3
- package/serialization/resources/conversation/types/ConversationMessageRequest.d.ts +4 -2
- package/serialization/resources/conversation/types/ConversationMessageRequest.js +7 -2
- package/serialization/resources/conversation/types/ConversationRequest.d.ts +2 -0
- package/serialization/resources/conversation/types/ConversationRequest.js +2 -0
- package/serialization/resources/conversation/types/ConversationResponse.d.ts +4 -0
- package/serialization/resources/conversation/types/ConversationResponse.js +4 -0
- package/serialization/resources/conversation/types/FeedbackRequest.d.ts +6 -5
- package/serialization/resources/conversation/types/FeedbackRequest.js +9 -6
- package/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +2 -1
- package/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.js +2 -1
- package/serialization/resources/conversation/types/ResponseConfig.d.ts +16 -0
- package/serialization/resources/conversation/types/ResponseConfig.js +11 -0
- package/serialization/resources/conversation/types/ResponseLength.d.ts +10 -0
- package/serialization/resources/conversation/types/ResponseLength.js +5 -0
- package/serialization/resources/conversation/types/Sentiment.d.ts +10 -0
- package/serialization/resources/conversation/types/Sentiment.js +5 -0
- package/serialization/resources/conversation/types/StreamResponse.d.ts +5 -1
- package/serialization/resources/conversation/types/StreamResponse.js +2 -0
- package/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts +13 -0
- package/serialization/resources/conversation/types/SubmitActionFormRequest.js +8 -0
- package/serialization/resources/conversation/types/UserMessage.d.ts +4 -5
- package/serialization/resources/conversation/types/UserMessage.js +4 -5
- package/serialization/resources/conversation/types/UserMessageBase.d.ts +17 -0
- package/serialization/resources/conversation/types/UserMessageBase.js +14 -0
- package/serialization/resources/conversation/types/index.d.ts +9 -3
- package/serialization/resources/conversation/types/index.js +9 -3
- package/serialization/resources/index.d.ts +5 -0
- package/serialization/resources/index.js +5 -0
- package/serialization/resources/knowledge/types/{KnowledgeDocument.d.ts → BaseKnowledgeDocument.d.ts} +3 -5
- package/{dist/serialization/resources/knowledge/types/KnowledgeDocument.js → serialization/resources/knowledge/types/BaseKnowledgeDocument.js} +2 -6
- package/{dist/serialization/resources/knowledge/types/KnowledgeBase.d.ts → serialization/resources/knowledge/types/KnowledgeBaseProperties.d.ts} +4 -5
- package/serialization/resources/knowledge/types/{KnowledgeBase.js → KnowledgeBaseProperties.js} +3 -6
- package/serialization/resources/knowledge/types/KnowledgeBaseRequest.d.ts +14 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseRequest.js +11 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +14 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +11 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +0 -1
- package/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +0 -1
- package/serialization/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +10 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentContentType.js +5 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +17 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +14 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +15 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +12 -0
- package/serialization/resources/knowledge/types/index.d.ts +7 -5
- package/serialization/resources/knowledge/types/index.js +7 -5
- package/serialization/resources/triggers/index.d.ts +1 -0
- package/serialization/resources/triggers/index.js +1 -0
- package/serialization/resources/triggers/types/EventTriggerRequest.d.ts +14 -0
- package/serialization/resources/triggers/types/EventTriggerRequest.js +11 -0
- package/serialization/resources/triggers/types/index.d.ts +1 -0
- package/serialization/resources/triggers/types/index.js +1 -0
- package/version.d.ts +1 -0
- package/version.js +1 -0
- package/api/resources/commons/types/User.d.ts +0 -9
- package/api/resources/conversation/errors/ConversationAlreadyExistsError.d.ts +0 -8
- package/api/resources/conversation/errors/ConversationAlreadyExistsError.js +0 -14
- package/api/resources/conversation/errors/ConversationMessageNotFoundError.d.ts +0 -8
- package/api/resources/conversation/errors/ConversationMessageNotFoundError.js +0 -14
- package/api/resources/conversation/errors/ConversationNotFoundError.d.ts +0 -8
- package/api/resources/conversation/errors/ConversationNotFoundError.js +0 -14
- package/api/resources/conversation/errors/InvalidConversationIdError.d.ts +0 -8
- package/api/resources/conversation/errors/InvalidConversationIdError.js +0 -14
- package/api/resources/conversation/errors/InvalidConversationMessageIdError.d.ts +0 -8
- package/api/resources/conversation/errors/InvalidConversationMessageIdError.js +0 -14
- package/api/resources/conversation/errors/InvalidFeedbackTypeError.d.ts +0 -8
- package/api/resources/conversation/errors/InvalidFeedbackTypeError.js +0 -14
- package/api/resources/conversation/errors/index.d.ts +0 -7
- package/api/resources/conversation/errors/index.js +0 -7
- package/api/resources/conversation/types/ConversationContext.d.ts +0 -20
- package/api/resources/conversation/types/ConversationMessageContext.d.ts +0 -12
- package/api/resources/knowledge/errors/DocumentCreationError.d.ts +0 -7
- package/api/resources/knowledge/errors/DocumentCreationError.js +0 -13
- package/api/resources/knowledge/errors/DocumentNotFoundError.d.ts +0 -8
- package/api/resources/knowledge/errors/DocumentNotFoundError.js +0 -14
- package/api/resources/knowledge/errors/IneligibleKnowledgeBaseError.d.ts +0 -8
- package/api/resources/knowledge/errors/IneligibleKnowledgeBaseError.js +0 -14
- package/api/resources/knowledge/errors/KnowledgeBaseNotFoundError.d.ts +0 -8
- package/api/resources/knowledge/errors/KnowledgeBaseNotFoundError.js +0 -14
- package/api/resources/knowledge/errors/VersionInProgressError.d.ts +0 -8
- package/api/resources/knowledge/errors/VersionInProgressError.js +0 -14
- package/api/resources/knowledge/errors/VersionNotInProgressError.d.ts +0 -8
- package/api/resources/knowledge/errors/VersionNotInProgressError.js +0 -14
- package/api/resources/knowledge/errors/index.d.ts +0 -6
- package/api/resources/knowledge/errors/index.js +0 -6
- package/api/resources/knowledge/types/KnowledgeBaseId.d.ts +0 -7
- package/api/resources/knowledge/types/KnowledgeDocumentId.d.ts +0 -9
- package/dist/api/resources/commons/types/User.d.ts +0 -9
- package/dist/api/resources/conversation/errors/ConversationAlreadyExistsError.d.ts +0 -8
- package/dist/api/resources/conversation/errors/ConversationAlreadyExistsError.js +0 -14
- package/dist/api/resources/conversation/errors/ConversationMessageNotFoundError.d.ts +0 -8
- package/dist/api/resources/conversation/errors/ConversationMessageNotFoundError.js +0 -14
- package/dist/api/resources/conversation/errors/ConversationNotFoundError.d.ts +0 -8
- package/dist/api/resources/conversation/errors/ConversationNotFoundError.js +0 -14
- package/dist/api/resources/conversation/errors/EmptyConversationError.js +0 -14
- package/dist/api/resources/conversation/errors/InvalidConversationIdError.d.ts +0 -8
- package/dist/api/resources/conversation/errors/InvalidConversationIdError.js +0 -14
- package/dist/api/resources/conversation/errors/InvalidConversationMessageIdError.d.ts +0 -8
- package/dist/api/resources/conversation/errors/InvalidConversationMessageIdError.js +0 -14
- package/dist/api/resources/conversation/errors/InvalidFeedbackTypeError.d.ts +0 -8
- package/dist/api/resources/conversation/errors/InvalidFeedbackTypeError.js +0 -14
- package/dist/api/resources/conversation/errors/index.d.ts +0 -7
- package/dist/api/resources/conversation/errors/index.js +0 -7
- package/dist/api/resources/conversation/types/ConversationContext.d.ts +0 -20
- package/dist/api/resources/conversation/types/ConversationMessageContext.d.ts +0 -12
- package/dist/api/resources/knowledge/errors/DocumentCreationError.d.ts +0 -7
- package/dist/api/resources/knowledge/errors/DocumentCreationError.js +0 -13
- package/dist/api/resources/knowledge/errors/DocumentNotFoundError.d.ts +0 -8
- package/dist/api/resources/knowledge/errors/DocumentNotFoundError.js +0 -14
- package/dist/api/resources/knowledge/errors/IneligibleKnowledgeBaseError.d.ts +0 -8
- package/dist/api/resources/knowledge/errors/IneligibleKnowledgeBaseError.js +0 -14
- package/dist/api/resources/knowledge/errors/KnowledgeBaseNotFoundError.d.ts +0 -8
- package/dist/api/resources/knowledge/errors/KnowledgeBaseNotFoundError.js +0 -14
- package/dist/api/resources/knowledge/errors/VersionInProgressError.d.ts +0 -8
- package/dist/api/resources/knowledge/errors/VersionNotInProgressError.d.ts +0 -8
- package/dist/api/resources/knowledge/errors/VersionNotInProgressError.js +0 -14
- package/dist/api/resources/knowledge/errors/index.d.ts +0 -6
- package/dist/api/resources/knowledge/errors/index.js +0 -6
- package/dist/api/resources/knowledge/types/KnowledgeBaseId.d.ts +0 -7
- package/dist/api/resources/knowledge/types/KnowledgeDocumentId.d.ts +0 -9
- package/dist/serialization/resources/commons/types/User.js +0 -9
- package/dist/serialization/resources/conversation/types/ConversationContext.d.ts +0 -20
- package/dist/serialization/resources/conversation/types/ConversationContext.js +0 -15
- package/dist/serialization/resources/conversation/types/ConversationMessageContext.d.ts +0 -16
- package/dist/serialization/resources/conversation/types/ConversationMessageContext.js +0 -11
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseId.d.ts +0 -12
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseId.js +0 -7
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentId.d.ts +0 -13
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentId.js +0 -8
- package/serialization/resources/commons/types/User.js +0 -9
- package/serialization/resources/conversation/types/ConversationContext.d.ts +0 -20
- package/serialization/resources/conversation/types/ConversationContext.js +0 -15
- package/serialization/resources/conversation/types/ConversationMessageContext.d.ts +0 -16
- package/serialization/resources/conversation/types/ConversationMessageContext.js +0 -11
- package/serialization/resources/knowledge/types/KnowledgeBaseId.d.ts +0 -12
- package/serialization/resources/knowledge/types/KnowledgeBaseId.js +0 -7
- package/serialization/resources/knowledge/types/KnowledgeDocumentId.d.ts +0 -13
- package/serialization/resources/knowledge/types/KnowledgeDocumentId.js +0 -8
- /package/api/resources/{commons/types/User.js → actions/types/ActionBase.js} +0 -0
- /package/api/resources/{conversation/types/ConversationContext.js → actions/types/ActionParameter.js} +0 -0
- /package/api/resources/{conversation/types/ConversationMessageContext.js → actions/types/ActionRequest.js} +0 -0
- /package/api/resources/{knowledge/types/IdBody.js → actions/types/ActionResponse.js} +0 -0
- /package/api/resources/{knowledge/types/KnowledgeBase.js → actions/types/ConversationExecutedActionPrecondition.js} +0 -0
- /package/api/resources/{knowledge/types/KnowledgeBaseId.js → actions/types/ConversationPrecondition.js} +0 -0
- /package/api/resources/{knowledge/types/KnowledgeDocument.js → actions/types/MetadataPrecondition.js} +0 -0
- /package/api/resources/{knowledge/types/KnowledgeDocumentId.js → actions/types/Precondition.js} +0 -0
- /package/{dist/api/resources/commons/types/User.js → api/resources/actions/types/PreconditionBase.js} +0 -0
- /package/{dist/api/resources/conversation/types/ConversationContext.js → api/resources/actions/types/PreconditionGroup.js} +0 -0
- /package/{dist/api/resources/conversation/types/ConversationMessageContext.js → api/resources/actions/types/TagsPrecondition.js} +0 -0
- /package/{dist/api/resources/knowledge/types/IdBody.js → api/resources/commons/types/AppUser.js} +0 -0
- /package/{dist/api/resources/knowledge/types/KnowledgeBase.js → api/resources/commons/types/AppUserIdentifier.js} +0 -0
- /package/{dist/api/resources/knowledge/types/KnowledgeBaseId.js → api/resources/commons/types/AppUserRequest.js} +0 -0
- /package/{dist/api/resources/knowledge/types/KnowledgeDocument.js → api/resources/commons/types/AppUserResponse.js} +0 -0
- /package/{dist/api/resources/knowledge/types/KnowledgeDocumentId.js → api/resources/commons/types/EntityId.js} +0 -0
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
export interface KnowledgeDocument extends MavenAGI.KnowledgeDocumentId {
|
|
4
|
+
export interface BaseKnowledgeDocument {
|
|
6
5
|
/** The title of the document. Will be shown as part of answers. */
|
|
7
6
|
title: string;
|
|
8
|
-
/** The
|
|
9
|
-
content: string;
|
|
10
|
-
/** The URL of the document. Should be visible to end users. Will be shown as part of answers. */
|
|
7
|
+
/** The URL of the document. Should be visible to end users. Will be shown as part of answers. Not used for crawling. */
|
|
11
8
|
url?: string;
|
|
12
9
|
/** The document language. Must be a valid ISO 639-1 language code. */
|
|
13
10
|
language?: string;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as MavenAGI from "../../../index";
|
|
5
|
-
export interface
|
|
5
|
+
export interface KnowledgeBaseProperties {
|
|
6
6
|
/** The name of the knowledge base */
|
|
7
|
-
|
|
8
|
-
/** The type of the knowledge base */
|
|
7
|
+
name: string;
|
|
8
|
+
/** The type of the knowledge base. Can not be changed once created. */
|
|
9
9
|
type: MavenAGI.KnowledgeBaseType;
|
|
10
10
|
/** The URL to pull content from for RSS and URL knowledge bases. */
|
|
11
11
|
url?: string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* knowledgeBaseId: {
|
|
9
|
+
* referenceId: "help-center"
|
|
10
|
+
* },
|
|
11
|
+
* name: "Help center",
|
|
12
|
+
* type: MavenAGI.KnowledgeBaseType.Api
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export interface KnowledgeBaseRequest extends MavenAGI.KnowledgeBaseProperties {
|
|
16
|
+
/** ID that uniquely identifies this knowledge base */
|
|
17
|
+
knowledgeBaseId: MavenAGI.EntityIdBase;
|
|
18
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* knowledgeBaseId: {
|
|
9
|
+
* referenceId: "help-center",
|
|
10
|
+
* appId: "readme",
|
|
11
|
+
* organizationId: "acme",
|
|
12
|
+
* agentId: "support",
|
|
13
|
+
* type: MavenAGI.EntityType.KnowledgeBase
|
|
14
|
+
* },
|
|
15
|
+
* name: "Help center",
|
|
16
|
+
* type: MavenAGI.KnowledgeBaseType.Api
|
|
17
|
+
* }
|
|
18
|
+
*/
|
|
19
|
+
export interface KnowledgeBaseResponse extends MavenAGI.KnowledgeBaseProperties {
|
|
20
|
+
/** ID that uniquely identifies this knowledge base */
|
|
21
|
+
knowledgeBaseId: MavenAGI.EntityId;
|
|
22
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* API knowledge bases are managed by a Maven App. URL knowledge bases will start a web crawl of the provided URL. RSS knowledge bases will parse documents from the RSS returned from the provided URL.
|
|
6
6
|
*/
|
|
7
7
|
export declare type KnowledgeBaseType = "API" | "URL" | "RSS";
|
|
8
8
|
export declare const KnowledgeBaseType: {
|
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as MavenAGI from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* type: MavenAGI.KnowledgeBaseVersionType.Full
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
5
11
|
export interface KnowledgeBaseVersion {
|
|
6
|
-
/**
|
|
7
|
-
knowledgeBaseId: string;
|
|
8
|
-
/** Indicates whether the completed version constitutes a full or partial refresh of the knowledge base */
|
|
12
|
+
/** Indicates whether the completed version constitutes a full or partial refresh of the knowledge base. Deleting and updating documents is only supported for partial refreshes. */
|
|
9
13
|
type: MavenAGI.KnowledgeBaseVersionType;
|
|
10
14
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The type of the knowledge document content. Markdown preferred.
|
|
6
|
+
*/
|
|
7
|
+
export declare type KnowledgeDocumentContentType = "HTML" | "MARKDOWN";
|
|
8
|
+
export declare const KnowledgeDocumentContentType: {
|
|
9
|
+
readonly Html: "HTML";
|
|
10
|
+
readonly Markdown: "MARKDOWN";
|
|
11
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* knowledgeDocumentId: {
|
|
9
|
+
* referenceId: "getting-started"
|
|
10
|
+
* },
|
|
11
|
+
* contentType: MavenAGI.KnowledgeDocumentContentType.Markdown,
|
|
12
|
+
* content: "## Getting started\\nThis is a getting started guide for the help center.",
|
|
13
|
+
* title: "Getting started"
|
|
14
|
+
* }
|
|
15
|
+
*/
|
|
16
|
+
export interface KnowledgeDocumentRequest extends MavenAGI.BaseKnowledgeDocument {
|
|
17
|
+
/** ID that uniquely identifies this knowledge document within its knowledge base */
|
|
18
|
+
knowledgeDocumentId: MavenAGI.EntityIdBase;
|
|
19
|
+
contentType: MavenAGI.KnowledgeDocumentContentType;
|
|
20
|
+
/** The content of the document. Not shown directly to users. May be provided in HTML or markdown. HTML will be converted to markdown automatically. Images are not currently supported and will be ignored. */
|
|
21
|
+
content: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* knowledgeDocumentId: {
|
|
9
|
+
* referenceId: "getting-started",
|
|
10
|
+
* appId: "readme",
|
|
11
|
+
* organizationId: "acme",
|
|
12
|
+
* agentId: "support",
|
|
13
|
+
* type: MavenAGI.EntityType.KnowledgeDocument
|
|
14
|
+
* },
|
|
15
|
+
* content: "## Getting started This is a getting started guide for the help center.",
|
|
16
|
+
* title: "Getting started"
|
|
17
|
+
* }
|
|
18
|
+
*/
|
|
19
|
+
export interface KnowledgeDocumentResponse extends MavenAGI.BaseKnowledgeDocument {
|
|
20
|
+
/** ID that uniquely identifies this knowledge document within its knowledge base */
|
|
21
|
+
knowledgeDocumentId: MavenAGI.EntityId;
|
|
22
|
+
/** The content of the document in markdown format. Not shown directly to users. */
|
|
23
|
+
content: string;
|
|
24
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./KnowledgeBase";
|
|
1
|
+
export * from "./KnowledgeBaseProperties";
|
|
3
2
|
export * from "./KnowledgeBaseType";
|
|
3
|
+
export * from "./KnowledgeBaseRequest";
|
|
4
|
+
export * from "./KnowledgeBaseResponse";
|
|
4
5
|
export * from "./KnowledgeBaseVersion";
|
|
5
6
|
export * from "./KnowledgeBaseVersionType";
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
7
|
+
export * from "./BaseKnowledgeDocument";
|
|
8
|
+
export * from "./KnowledgeDocumentContentType";
|
|
9
|
+
export * from "./KnowledgeDocumentRequest";
|
|
10
|
+
export * from "./KnowledgeDocumentResponse";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./KnowledgeBase";
|
|
1
|
+
export * from "./KnowledgeBaseProperties";
|
|
3
2
|
export * from "./KnowledgeBaseType";
|
|
3
|
+
export * from "./KnowledgeBaseRequest";
|
|
4
|
+
export * from "./KnowledgeBaseResponse";
|
|
4
5
|
export * from "./KnowledgeBaseVersion";
|
|
5
6
|
export * from "./KnowledgeBaseVersionType";
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
7
|
+
export * from "./BaseKnowledgeDocument";
|
|
8
|
+
export * from "./KnowledgeDocumentContentType";
|
|
9
|
+
export * from "./KnowledgeDocumentRequest";
|
|
10
|
+
export * from "./KnowledgeDocumentResponse";
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
5
|
+
import * as core from "../../../../core";
|
|
6
|
+
import * as MavenAGI from "../../../index";
|
|
7
|
+
export declare namespace Triggers {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
|
|
10
|
+
appId?: core.Supplier<string | undefined>;
|
|
11
|
+
appSecret?: core.Supplier<string | undefined>;
|
|
12
|
+
/** Override the X-Organization-Id header */
|
|
13
|
+
organizationId: core.Supplier<string>;
|
|
14
|
+
/** Override the X-Agent-Id header */
|
|
15
|
+
agentId: core.Supplier<string>;
|
|
16
|
+
fetcher?: core.FetchFunction;
|
|
17
|
+
}
|
|
18
|
+
interface RequestOptions {
|
|
19
|
+
/** The maximum time to wait for a response in seconds. */
|
|
20
|
+
timeoutInSeconds?: number;
|
|
21
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
22
|
+
maxRetries?: number;
|
|
23
|
+
/** A hook to abort the request. */
|
|
24
|
+
abortSignal?: AbortSignal;
|
|
25
|
+
/** Override the X-Organization-Id header */
|
|
26
|
+
organizationId?: string;
|
|
27
|
+
/** Override the X-Agent-Id header */
|
|
28
|
+
agentId?: string;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export declare class Triggers {
|
|
32
|
+
protected readonly _options: Triggers.Options;
|
|
33
|
+
constructor(_options: Triggers.Options);
|
|
34
|
+
/**
|
|
35
|
+
* Update an event trigger or create it if it doesn't exist.
|
|
36
|
+
*
|
|
37
|
+
* @param {MavenAGI.EventTriggerRequest} request
|
|
38
|
+
* @param {Triggers.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
|
+
*
|
|
40
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
41
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
42
|
+
* @throws {@link MavenAGI.ServerError}
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* await client.triggers.createOrUpdate({
|
|
46
|
+
* triggerId: {
|
|
47
|
+
* referenceId: "store-in-snowflake"
|
|
48
|
+
* },
|
|
49
|
+
* description: "Stores conversation data in Snowflake",
|
|
50
|
+
* type: "CONVERSATION_CREATED"
|
|
51
|
+
* })
|
|
52
|
+
*/
|
|
53
|
+
createOrUpdate(request: MavenAGI.EventTriggerRequest, requestOptions?: Triggers.RequestOptions): Promise<MavenAGI.EventTriggerResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* Get an event trigger by its supplied ID
|
|
56
|
+
*
|
|
57
|
+
* @param {string} triggerReferenceId - The reference ID of the event trigger to get. All other entity ID fields are inferred from the request.
|
|
58
|
+
* @param {Triggers.RequestOptions} requestOptions - Request-specific configuration.
|
|
59
|
+
*
|
|
60
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
61
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
62
|
+
* @throws {@link MavenAGI.ServerError}
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* await client.triggers.get("store-in-snowflake")
|
|
66
|
+
*/
|
|
67
|
+
get(triggerReferenceId: string, requestOptions?: Triggers.RequestOptions): Promise<MavenAGI.EventTriggerResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Delete an event trigger
|
|
70
|
+
*
|
|
71
|
+
* @param {string} triggerReferenceId - The reference ID of the event trigger to delete. All other entity ID fields are inferred from the request.
|
|
72
|
+
* @param {Triggers.RequestOptions} requestOptions - Request-specific configuration.
|
|
73
|
+
*
|
|
74
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
75
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
76
|
+
* @throws {@link MavenAGI.ServerError}
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* await client.triggers.delete("store-in-snowflake")
|
|
80
|
+
*/
|
|
81
|
+
delete(triggerReferenceId: string, requestOptions?: Triggers.RequestOptions): Promise<void>;
|
|
82
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
83
|
+
}
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
import * as environments from "../../../../environments";
|
|
14
|
+
import * as core from "../../../../core";
|
|
15
|
+
import * as MavenAGI from "../../../index";
|
|
16
|
+
import * as serializers from "../../../../serialization/index";
|
|
17
|
+
import urlJoin from "url-join";
|
|
18
|
+
import * as errors from "../../../../errors/index";
|
|
19
|
+
export class Triggers {
|
|
20
|
+
constructor(_options) {
|
|
21
|
+
this._options = _options;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Update an event trigger or create it if it doesn't exist.
|
|
25
|
+
*
|
|
26
|
+
* @param {MavenAGI.EventTriggerRequest} request
|
|
27
|
+
* @param {Triggers.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
+
*
|
|
29
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
30
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
31
|
+
* @throws {@link MavenAGI.ServerError}
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* await client.triggers.createOrUpdate({
|
|
35
|
+
* triggerId: {
|
|
36
|
+
* referenceId: "store-in-snowflake"
|
|
37
|
+
* },
|
|
38
|
+
* description: "Stores conversation data in Snowflake",
|
|
39
|
+
* type: "CONVERSATION_CREATED"
|
|
40
|
+
* })
|
|
41
|
+
*/
|
|
42
|
+
createOrUpdate(request, requestOptions) {
|
|
43
|
+
var _a, _b;
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
46
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/triggers"),
|
|
47
|
+
method: "PUT",
|
|
48
|
+
headers: {
|
|
49
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
50
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
51
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
52
|
+
"X-Fern-Language": "JavaScript",
|
|
53
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
54
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.21",
|
|
55
|
+
"User-Agent": "mavenagi/0.0.0-alpha.21",
|
|
56
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
57
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
58
|
+
},
|
|
59
|
+
contentType: "application/json",
|
|
60
|
+
requestType: "json",
|
|
61
|
+
body: serializers.EventTriggerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
62
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
63
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
64
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
65
|
+
});
|
|
66
|
+
if (_response.ok) {
|
|
67
|
+
return serializers.EventTriggerResponse.parseOrThrow(_response.body, {
|
|
68
|
+
unrecognizedObjectKeys: "passthrough",
|
|
69
|
+
allowUnrecognizedUnionMembers: true,
|
|
70
|
+
allowUnrecognizedEnumValues: true,
|
|
71
|
+
breadcrumbsPrefix: ["response"],
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
if (_response.error.reason === "status-code") {
|
|
75
|
+
switch (_response.error.statusCode) {
|
|
76
|
+
case 404:
|
|
77
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
78
|
+
unrecognizedObjectKeys: "passthrough",
|
|
79
|
+
allowUnrecognizedUnionMembers: true,
|
|
80
|
+
allowUnrecognizedEnumValues: true,
|
|
81
|
+
breadcrumbsPrefix: ["response"],
|
|
82
|
+
}));
|
|
83
|
+
case 400:
|
|
84
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
85
|
+
unrecognizedObjectKeys: "passthrough",
|
|
86
|
+
allowUnrecognizedUnionMembers: true,
|
|
87
|
+
allowUnrecognizedEnumValues: true,
|
|
88
|
+
breadcrumbsPrefix: ["response"],
|
|
89
|
+
}));
|
|
90
|
+
case 500:
|
|
91
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
92
|
+
unrecognizedObjectKeys: "passthrough",
|
|
93
|
+
allowUnrecognizedUnionMembers: true,
|
|
94
|
+
allowUnrecognizedEnumValues: true,
|
|
95
|
+
breadcrumbsPrefix: ["response"],
|
|
96
|
+
}));
|
|
97
|
+
default:
|
|
98
|
+
throw new errors.MavenAGIError({
|
|
99
|
+
statusCode: _response.error.statusCode,
|
|
100
|
+
body: _response.error.body,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
switch (_response.error.reason) {
|
|
105
|
+
case "non-json":
|
|
106
|
+
throw new errors.MavenAGIError({
|
|
107
|
+
statusCode: _response.error.statusCode,
|
|
108
|
+
body: _response.error.rawBody,
|
|
109
|
+
});
|
|
110
|
+
case "timeout":
|
|
111
|
+
throw new errors.MavenAGITimeoutError();
|
|
112
|
+
case "unknown":
|
|
113
|
+
throw new errors.MavenAGIError({
|
|
114
|
+
message: _response.error.errorMessage,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Get an event trigger by its supplied ID
|
|
121
|
+
*
|
|
122
|
+
* @param {string} triggerReferenceId - The reference ID of the event trigger to get. All other entity ID fields are inferred from the request.
|
|
123
|
+
* @param {Triggers.RequestOptions} requestOptions - Request-specific configuration.
|
|
124
|
+
*
|
|
125
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
126
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
127
|
+
* @throws {@link MavenAGI.ServerError}
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* await client.triggers.get("store-in-snowflake")
|
|
131
|
+
*/
|
|
132
|
+
get(triggerReferenceId, requestOptions) {
|
|
133
|
+
var _a, _b;
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
136
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/triggers/${encodeURIComponent(triggerReferenceId)}`),
|
|
137
|
+
method: "GET",
|
|
138
|
+
headers: {
|
|
139
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
140
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
141
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
142
|
+
"X-Fern-Language": "JavaScript",
|
|
143
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
144
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.21",
|
|
145
|
+
"User-Agent": "mavenagi/0.0.0-alpha.21",
|
|
146
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
147
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
148
|
+
},
|
|
149
|
+
contentType: "application/json",
|
|
150
|
+
requestType: "json",
|
|
151
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
152
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
153
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
154
|
+
});
|
|
155
|
+
if (_response.ok) {
|
|
156
|
+
return serializers.EventTriggerResponse.parseOrThrow(_response.body, {
|
|
157
|
+
unrecognizedObjectKeys: "passthrough",
|
|
158
|
+
allowUnrecognizedUnionMembers: true,
|
|
159
|
+
allowUnrecognizedEnumValues: true,
|
|
160
|
+
breadcrumbsPrefix: ["response"],
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
if (_response.error.reason === "status-code") {
|
|
164
|
+
switch (_response.error.statusCode) {
|
|
165
|
+
case 404:
|
|
166
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
167
|
+
unrecognizedObjectKeys: "passthrough",
|
|
168
|
+
allowUnrecognizedUnionMembers: true,
|
|
169
|
+
allowUnrecognizedEnumValues: true,
|
|
170
|
+
breadcrumbsPrefix: ["response"],
|
|
171
|
+
}));
|
|
172
|
+
case 400:
|
|
173
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
174
|
+
unrecognizedObjectKeys: "passthrough",
|
|
175
|
+
allowUnrecognizedUnionMembers: true,
|
|
176
|
+
allowUnrecognizedEnumValues: true,
|
|
177
|
+
breadcrumbsPrefix: ["response"],
|
|
178
|
+
}));
|
|
179
|
+
case 500:
|
|
180
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
181
|
+
unrecognizedObjectKeys: "passthrough",
|
|
182
|
+
allowUnrecognizedUnionMembers: true,
|
|
183
|
+
allowUnrecognizedEnumValues: true,
|
|
184
|
+
breadcrumbsPrefix: ["response"],
|
|
185
|
+
}));
|
|
186
|
+
default:
|
|
187
|
+
throw new errors.MavenAGIError({
|
|
188
|
+
statusCode: _response.error.statusCode,
|
|
189
|
+
body: _response.error.body,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
switch (_response.error.reason) {
|
|
194
|
+
case "non-json":
|
|
195
|
+
throw new errors.MavenAGIError({
|
|
196
|
+
statusCode: _response.error.statusCode,
|
|
197
|
+
body: _response.error.rawBody,
|
|
198
|
+
});
|
|
199
|
+
case "timeout":
|
|
200
|
+
throw new errors.MavenAGITimeoutError();
|
|
201
|
+
case "unknown":
|
|
202
|
+
throw new errors.MavenAGIError({
|
|
203
|
+
message: _response.error.errorMessage,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Delete an event trigger
|
|
210
|
+
*
|
|
211
|
+
* @param {string} triggerReferenceId - The reference ID of the event trigger to delete. All other entity ID fields are inferred from the request.
|
|
212
|
+
* @param {Triggers.RequestOptions} requestOptions - Request-specific configuration.
|
|
213
|
+
*
|
|
214
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
215
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
216
|
+
* @throws {@link MavenAGI.ServerError}
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* await client.triggers.delete("store-in-snowflake")
|
|
220
|
+
*/
|
|
221
|
+
delete(triggerReferenceId, requestOptions) {
|
|
222
|
+
var _a, _b;
|
|
223
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
225
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/triggers/${encodeURIComponent(triggerReferenceId)}`),
|
|
226
|
+
method: "DELETE",
|
|
227
|
+
headers: {
|
|
228
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
229
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
230
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
231
|
+
"X-Fern-Language": "JavaScript",
|
|
232
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
233
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.21",
|
|
234
|
+
"User-Agent": "mavenagi/0.0.0-alpha.21",
|
|
235
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
236
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
237
|
+
},
|
|
238
|
+
contentType: "application/json",
|
|
239
|
+
requestType: "json",
|
|
240
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
241
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
242
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
243
|
+
});
|
|
244
|
+
if (_response.ok) {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
if (_response.error.reason === "status-code") {
|
|
248
|
+
switch (_response.error.statusCode) {
|
|
249
|
+
case 404:
|
|
250
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
251
|
+
unrecognizedObjectKeys: "passthrough",
|
|
252
|
+
allowUnrecognizedUnionMembers: true,
|
|
253
|
+
allowUnrecognizedEnumValues: true,
|
|
254
|
+
breadcrumbsPrefix: ["response"],
|
|
255
|
+
}));
|
|
256
|
+
case 400:
|
|
257
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
258
|
+
unrecognizedObjectKeys: "passthrough",
|
|
259
|
+
allowUnrecognizedUnionMembers: true,
|
|
260
|
+
allowUnrecognizedEnumValues: true,
|
|
261
|
+
breadcrumbsPrefix: ["response"],
|
|
262
|
+
}));
|
|
263
|
+
case 500:
|
|
264
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
265
|
+
unrecognizedObjectKeys: "passthrough",
|
|
266
|
+
allowUnrecognizedUnionMembers: true,
|
|
267
|
+
allowUnrecognizedEnumValues: true,
|
|
268
|
+
breadcrumbsPrefix: ["response"],
|
|
269
|
+
}));
|
|
270
|
+
default:
|
|
271
|
+
throw new errors.MavenAGIError({
|
|
272
|
+
statusCode: _response.error.statusCode,
|
|
273
|
+
body: _response.error.body,
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
switch (_response.error.reason) {
|
|
278
|
+
case "non-json":
|
|
279
|
+
throw new errors.MavenAGIError({
|
|
280
|
+
statusCode: _response.error.statusCode,
|
|
281
|
+
body: _response.error.rawBody,
|
|
282
|
+
});
|
|
283
|
+
case "timeout":
|
|
284
|
+
throw new errors.MavenAGITimeoutError();
|
|
285
|
+
case "unknown":
|
|
286
|
+
throw new errors.MavenAGIError({
|
|
287
|
+
message: _response.error.errorMessage,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
_getAuthorizationHeader() {
|
|
293
|
+
var _a, _b;
|
|
294
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
295
|
+
const appId = (_a = (yield core.Supplier.get(this._options.appId))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["MAVENAGI_APP_ID"];
|
|
296
|
+
const appSecret = (_b = (yield core.Supplier.get(this._options.appSecret))) !== null && _b !== void 0 ? _b : process === null || process === void 0 ? void 0 : process.env["MAVENAGI_APP_SECRET"];
|
|
297
|
+
if (appId != null && appSecret != null) {
|
|
298
|
+
return core.BasicAuth.toAuthorizationHeader({
|
|
299
|
+
username: appId,
|
|
300
|
+
password: appSecret,
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
return undefined;
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|