mavenagi 0.0.0-alpha.2 → 0.0.0-alpha.4
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 -0
- package/Client.js +15 -0
- package/README.md +63 -39
- package/api/resources/actions/client/Client.d.ts +123 -0
- package/api/resources/actions/client/Client.js +564 -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/Action.d.ts +23 -0
- package/api/resources/actions/types/ActionParameter.d.ts +8 -0
- package/api/resources/actions/types/ActionSetBase.d.ts +9 -0
- package/api/resources/actions/types/ActionSetRequest.d.ts +6 -0
- package/api/resources/actions/types/ActionSetResponse.d.ts +6 -0
- package/api/resources/actions/types/ActionSetResponse.js +4 -0
- package/api/resources/actions/types/index.d.ts +5 -0
- package/api/resources/actions/types/index.js +5 -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/{dist/api/resources/conversation/errors/EmptyConversationError.d.ts → api/resources/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 +10 -0
- package/api/resources/commons/types/AppUser.js +4 -0
- package/api/resources/commons/types/AppUserIdentification.d.ts +8 -0
- package/api/resources/commons/types/AppUserIdentification.js +4 -0
- package/api/resources/commons/types/AppUserIdentifyingProperty.d.ts +9 -0
- package/api/resources/commons/types/AppUserIdentifyingProperty.js +4 -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/Feedback.d.ts +16 -0
- package/api/resources/commons/types/Feedback.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/User.d.ts +1 -0
- package/api/resources/commons/types/index.d.ts +6 -0
- package/api/resources/commons/types/index.js +6 -0
- package/api/resources/conversation/client/Client.d.ts +69 -31
- package/api/resources/conversation/client/Client.js +223 -111
- package/api/resources/conversation/index.d.ts +0 -1
- package/api/resources/conversation/index.js +0 -1
- package/api/resources/conversation/types/ActionExecutionRequest.d.ts +10 -0
- package/api/resources/conversation/types/ActionExecutionRequest.js +4 -0
- package/api/resources/conversation/types/ActionExecutionResponse.d.ts +7 -0
- package/api/resources/conversation/types/ActionExecutionResponse.js +4 -0
- package/api/resources/conversation/types/AskRequest.d.ts +2 -0
- package/api/resources/conversation/types/BotActionFormResponse.d.ts +1 -0
- package/api/resources/conversation/types/Capability.d.ts +8 -0
- package/api/resources/conversation/types/Capability.js +7 -0
- package/api/resources/conversation/types/ConversationBase.d.ts +2 -0
- package/api/resources/conversation/types/FeedbackRequest.d.ts +1 -8
- 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/UserMessage.d.ts +1 -0
- package/api/resources/conversation/types/index.d.ts +5 -1
- package/api/resources/conversation/types/index.js +5 -1
- package/api/resources/index.d.ts +5 -2
- package/api/resources/index.js +5 -2
- package/api/resources/knowledge/client/Client.d.ts +52 -40
- package/api/resources/knowledge/client/Client.js +191 -129
- package/api/resources/knowledge/index.d.ts +0 -1
- package/api/resources/knowledge/index.js +0 -1
- package/api/resources/knowledge/types/{KnowledgeDocument.d.ts → BaseKnowledgeDocument.d.ts} +1 -3
- package/api/resources/knowledge/types/BaseKnowledgeDocument.js +4 -0
- package/api/resources/knowledge/types/KnowledgeBaseType.d.ts +1 -1
- package/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +1 -1
- 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 +9 -0
- package/api/resources/knowledge/types/KnowledgeDocumentRequest.js +4 -0
- package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +8 -0
- package/api/resources/knowledge/types/KnowledgeDocumentResponse.js +4 -0
- package/api/resources/knowledge/types/index.d.ts +4 -2
- package/api/resources/knowledge/types/index.js +4 -2
- package/api/resources/triggers/client/Client.d.ts +72 -0
- package/api/resources/triggers/client/Client.js +298 -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/EventTrigger.d.ts +12 -0
- package/api/resources/triggers/types/EventTrigger.js +4 -0
- package/api/resources/triggers/types/EventTriggerType.d.ts +8 -0
- package/api/resources/triggers/types/EventTriggerType.js +7 -0
- package/api/resources/triggers/types/index.d.ts +2 -0
- package/api/resources/triggers/types/index.js +2 -0
- package/api/resources/user/client/Client.d.ts +62 -0
- package/api/resources/user/client/Client.js +220 -0
- package/api/resources/user/client/index.d.ts +1 -0
- package/api/resources/user/client/index.js +1 -0
- package/api/resources/user/index.d.ts +1 -0
- package/api/resources/user/index.js +1 -0
- package/core/index.d.ts +1 -1
- package/core/index.js +1 -1
- package/dist/Client.d.ts +9 -0
- package/dist/Client.js +15 -0
- package/dist/api/resources/actions/client/Client.d.ts +123 -0
- package/dist/api/resources/actions/client/Client.js +564 -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/Action.d.ts +23 -0
- package/dist/api/resources/actions/types/Action.js +4 -0
- package/dist/api/resources/actions/types/ActionParameter.d.ts +8 -0
- package/dist/api/resources/actions/types/ActionParameter.js +4 -0
- package/dist/api/resources/actions/types/ActionSetBase.d.ts +9 -0
- package/dist/api/resources/actions/types/ActionSetBase.js +4 -0
- package/dist/api/resources/actions/types/ActionSetRequest.d.ts +6 -0
- package/dist/api/resources/actions/types/ActionSetRequest.js +4 -0
- package/dist/api/resources/actions/types/ActionSetResponse.d.ts +6 -0
- package/dist/api/resources/actions/types/ActionSetResponse.js +4 -0
- package/dist/api/resources/actions/types/index.d.ts +5 -0
- package/dist/api/resources/actions/types/index.js +5 -0
- package/{api/resources/conversation/errors/EmptyConversationError.d.ts → dist/api/resources/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 +10 -0
- package/dist/api/resources/commons/types/AppUser.js +4 -0
- package/dist/api/resources/commons/types/AppUserIdentification.d.ts +8 -0
- package/dist/api/resources/commons/types/AppUserIdentification.js +4 -0
- package/dist/api/resources/commons/types/AppUserIdentifyingProperty.d.ts +9 -0
- package/dist/api/resources/commons/types/AppUserIdentifyingProperty.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/Feedback.d.ts +16 -0
- package/dist/api/resources/commons/types/Feedback.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/User.d.ts +1 -0
- package/dist/api/resources/commons/types/index.d.ts +6 -0
- package/dist/api/resources/commons/types/index.js +6 -0
- package/dist/api/resources/conversation/client/Client.d.ts +69 -31
- package/dist/api/resources/conversation/client/Client.js +223 -111
- 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/ActionExecutionRequest.d.ts +10 -0
- package/dist/api/resources/conversation/types/ActionExecutionRequest.js +4 -0
- package/dist/api/resources/conversation/types/ActionExecutionResponse.d.ts +7 -0
- package/dist/api/resources/conversation/types/ActionExecutionResponse.js +4 -0
- package/dist/api/resources/conversation/types/AskRequest.d.ts +2 -0
- package/dist/api/resources/conversation/types/BotActionFormResponse.d.ts +1 -0
- package/dist/api/resources/conversation/types/Capability.d.ts +8 -0
- package/dist/api/resources/conversation/types/Capability.js +7 -0
- package/dist/api/resources/conversation/types/ConversationBase.d.ts +2 -0
- package/dist/api/resources/conversation/types/FeedbackRequest.d.ts +1 -8
- 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/UserMessage.d.ts +1 -0
- package/dist/api/resources/conversation/types/index.d.ts +5 -1
- package/dist/api/resources/conversation/types/index.js +5 -1
- package/dist/api/resources/index.d.ts +5 -2
- package/dist/api/resources/index.js +5 -2
- package/dist/api/resources/knowledge/client/Client.d.ts +52 -40
- package/dist/api/resources/knowledge/client/Client.js +191 -129
- package/dist/api/resources/knowledge/index.d.ts +0 -1
- package/dist/api/resources/knowledge/index.js +0 -1
- package/dist/api/resources/knowledge/types/{KnowledgeDocument.d.ts → BaseKnowledgeDocument.d.ts} +1 -3
- package/dist/api/resources/knowledge/types/BaseKnowledgeDocument.js +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseType.d.ts +1 -1
- package/dist/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +1 -1
- 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 +9 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.js +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +8 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.js +4 -0
- package/dist/api/resources/knowledge/types/index.d.ts +4 -2
- package/dist/api/resources/knowledge/types/index.js +4 -2
- package/dist/api/resources/triggers/client/Client.d.ts +72 -0
- package/dist/api/resources/triggers/client/Client.js +298 -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/EventTrigger.d.ts +12 -0
- package/dist/api/resources/triggers/types/EventTrigger.js +4 -0
- package/dist/api/resources/triggers/types/EventTriggerType.d.ts +8 -0
- package/dist/api/resources/triggers/types/EventTriggerType.js +7 -0
- package/dist/api/resources/triggers/types/index.d.ts +2 -0
- package/dist/api/resources/triggers/types/index.js +2 -0
- package/dist/api/resources/user/client/Client.d.ts +62 -0
- package/dist/api/resources/user/client/Client.js +220 -0
- package/dist/api/resources/user/client/index.d.ts +1 -0
- package/dist/api/resources/user/client/index.js +1 -0
- package/dist/api/resources/user/index.d.ts +1 -0
- package/dist/api/resources/user/index.js +1 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- 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/Action.d.ts +21 -0
- package/dist/serialization/resources/actions/types/Action.js +16 -0
- package/dist/serialization/resources/actions/types/ActionParameter.d.ts +14 -0
- package/dist/serialization/resources/actions/types/ActionParameter.js +9 -0
- package/dist/serialization/resources/{knowledge/types/IdBody.d.ts → actions/types/ActionSetBase.d.ts} +4 -3
- package/dist/serialization/resources/actions/types/ActionSetBase.js +8 -0
- package/dist/serialization/resources/actions/types/ActionSetRequest.d.ts +12 -0
- package/dist/serialization/resources/actions/types/ActionSetRequest.js +6 -0
- package/dist/serialization/resources/actions/types/ActionSetResponse.d.ts +12 -0
- package/dist/serialization/resources/actions/types/ActionSetResponse.js +6 -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/commons/types/AppUser.d.ts +15 -0
- package/dist/serialization/resources/commons/types/AppUser.js +10 -0
- package/dist/serialization/resources/commons/types/AppUserIdentification.d.ts +13 -0
- package/dist/serialization/resources/commons/types/AppUserIdentification.js +8 -0
- package/dist/serialization/resources/commons/types/AppUserIdentifyingProperty.d.ts +14 -0
- package/dist/serialization/resources/commons/types/AppUserIdentifyingProperty.js +9 -0
- package/dist/serialization/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +10 -0
- package/dist/serialization/resources/{knowledge/types/IdBody.js → commons/types/AppUserIdentifyingPropertyType.js} +1 -3
- package/dist/serialization/resources/commons/types/Feedback.d.ts +17 -0
- package/dist/serialization/resources/commons/types/Feedback.js +12 -0
- package/dist/serialization/resources/{conversation → commons}/types/FeedbackType.d.ts +1 -1
- package/dist/serialization/resources/{conversation → commons}/types/FeedbackType.js +1 -1
- package/dist/serialization/resources/commons/types/User.d.ts +1 -0
- package/dist/serialization/resources/commons/types/User.js +1 -0
- package/dist/serialization/resources/commons/types/index.d.ts +6 -0
- package/dist/serialization/resources/commons/types/index.js +6 -0
- package/dist/serialization/resources/conversation/types/ActionExecutionRequest.d.ts +15 -0
- package/dist/serialization/resources/conversation/types/ActionExecutionRequest.js +10 -0
- package/dist/serialization/resources/conversation/types/ActionExecutionResponse.d.ts +12 -0
- package/dist/serialization/resources/conversation/types/ActionExecutionResponse.js +7 -0
- package/dist/serialization/resources/conversation/types/AskRequest.d.ts +2 -0
- package/dist/serialization/resources/conversation/types/AskRequest.js +2 -0
- 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/Capability.d.ts +10 -0
- package/{serialization/resources/knowledge/types/IdBody.js → dist/serialization/resources/conversation/types/Capability.js} +1 -3
- package/dist/serialization/resources/conversation/types/ConversationBase.d.ts +2 -0
- package/dist/serialization/resources/conversation/types/ConversationBase.js +2 -0
- package/dist/serialization/resources/conversation/types/FeedbackRequest.d.ts +2 -6
- package/dist/serialization/resources/conversation/types/FeedbackRequest.js +2 -7
- 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/index.d.ts +5 -1
- package/dist/serialization/resources/conversation/types/index.js +5 -1
- package/dist/serialization/resources/index.d.ts +4 -0
- package/dist/serialization/resources/index.js +4 -0
- package/dist/serialization/resources/knowledge/types/{KnowledgeDocument.d.ts → BaseKnowledgeDocument.d.ts} +4 -5
- package/{serialization/resources/knowledge/types/KnowledgeDocument.js → dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.js} +3 -4
- 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 +15 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +12 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +13 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +10 -0
- package/dist/serialization/resources/knowledge/types/index.d.ts +4 -2
- package/dist/serialization/resources/knowledge/types/index.js +4 -2
- 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/EventTrigger.d.ts +15 -0
- package/dist/serialization/resources/triggers/types/EventTrigger.js +10 -0
- package/dist/serialization/resources/triggers/types/EventTriggerType.d.ts +10 -0
- package/dist/serialization/resources/triggers/types/EventTriggerType.js +5 -0
- package/dist/serialization/resources/triggers/types/index.d.ts +2 -0
- package/dist/serialization/resources/triggers/types/index.js +2 -0
- package/package.json +1 -1
- package/serialization/resources/actions/index.d.ts +1 -0
- package/serialization/resources/actions/index.js +1 -0
- package/serialization/resources/actions/types/Action.d.ts +21 -0
- package/serialization/resources/actions/types/Action.js +16 -0
- package/serialization/resources/actions/types/ActionParameter.d.ts +14 -0
- package/serialization/resources/actions/types/ActionParameter.js +9 -0
- package/serialization/resources/{knowledge/types/IdBody.d.ts → actions/types/ActionSetBase.d.ts} +4 -3
- package/serialization/resources/actions/types/ActionSetBase.js +8 -0
- package/serialization/resources/actions/types/ActionSetRequest.d.ts +12 -0
- package/serialization/resources/actions/types/ActionSetRequest.js +6 -0
- package/serialization/resources/actions/types/ActionSetResponse.d.ts +12 -0
- package/serialization/resources/actions/types/ActionSetResponse.js +6 -0
- package/serialization/resources/actions/types/index.d.ts +5 -0
- package/serialization/resources/actions/types/index.js +5 -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/AppUserIdentification.d.ts +13 -0
- package/serialization/resources/commons/types/AppUserIdentification.js +8 -0
- package/serialization/resources/commons/types/AppUserIdentifyingProperty.d.ts +14 -0
- package/serialization/resources/commons/types/AppUserIdentifyingProperty.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/Feedback.d.ts +17 -0
- package/serialization/resources/commons/types/Feedback.js +12 -0
- package/serialization/resources/{conversation → commons}/types/FeedbackType.d.ts +1 -1
- package/serialization/resources/{conversation → commons}/types/FeedbackType.js +1 -1
- package/serialization/resources/commons/types/User.d.ts +1 -0
- package/serialization/resources/commons/types/User.js +1 -0
- package/serialization/resources/commons/types/index.d.ts +6 -0
- package/serialization/resources/commons/types/index.js +6 -0
- package/serialization/resources/conversation/types/ActionExecutionRequest.d.ts +15 -0
- package/serialization/resources/conversation/types/ActionExecutionRequest.js +10 -0
- package/serialization/resources/conversation/types/ActionExecutionResponse.d.ts +12 -0
- package/serialization/resources/conversation/types/ActionExecutionResponse.js +7 -0
- package/serialization/resources/conversation/types/AskRequest.d.ts +2 -0
- package/serialization/resources/conversation/types/AskRequest.js +2 -0
- package/serialization/resources/conversation/types/BotActionFormResponse.d.ts +1 -0
- package/serialization/resources/conversation/types/BotActionFormResponse.js +1 -0
- package/serialization/resources/conversation/types/Capability.d.ts +10 -0
- package/serialization/resources/conversation/types/Capability.js +5 -0
- package/serialization/resources/conversation/types/ConversationBase.d.ts +2 -0
- package/serialization/resources/conversation/types/ConversationBase.js +2 -0
- package/serialization/resources/conversation/types/FeedbackRequest.d.ts +2 -6
- package/serialization/resources/conversation/types/FeedbackRequest.js +2 -7
- 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/index.d.ts +5 -1
- package/serialization/resources/conversation/types/index.js +5 -1
- package/serialization/resources/index.d.ts +4 -0
- package/serialization/resources/index.js +4 -0
- package/serialization/resources/knowledge/types/{KnowledgeDocument.d.ts → BaseKnowledgeDocument.d.ts} +4 -5
- package/{dist/serialization/resources/knowledge/types/KnowledgeDocument.js → serialization/resources/knowledge/types/BaseKnowledgeDocument.js} +3 -4
- 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 +15 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +12 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +13 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +10 -0
- package/serialization/resources/knowledge/types/index.d.ts +4 -2
- package/serialization/resources/knowledge/types/index.js +4 -2
- package/serialization/resources/triggers/index.d.ts +1 -0
- package/serialization/resources/triggers/index.js +1 -0
- package/serialization/resources/triggers/types/EventTrigger.d.ts +15 -0
- package/serialization/resources/triggers/types/EventTrigger.js +10 -0
- package/serialization/resources/triggers/types/EventTriggerType.d.ts +10 -0
- package/serialization/resources/triggers/types/EventTriggerType.js +5 -0
- package/serialization/resources/triggers/types/index.d.ts +2 -0
- package/serialization/resources/triggers/types/index.js +2 -0
- 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/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/IdBody.d.ts +0 -6
- 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/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/IdBody.d.ts +0 -6
- /package/api/resources/{knowledge/types/IdBody.js → actions/types/Action.js} +0 -0
- /package/api/resources/{knowledge/types/KnowledgeDocument.js → actions/types/ActionParameter.js} +0 -0
- /package/{dist/api/resources/knowledge/types/IdBody.js → api/resources/actions/types/ActionSetBase.js} +0 -0
- /package/{dist/api/resources/knowledge/types/KnowledgeDocument.js → api/resources/actions/types/ActionSetRequest.js} +0 -0
|
@@ -26,21 +26,24 @@ export class Conversation {
|
|
|
26
26
|
* @param {MavenAGI.ConversationRequest} request
|
|
27
27
|
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
28
|
*
|
|
29
|
-
* @throws {@link MavenAGI.
|
|
30
|
-
* @throws {@link MavenAGI.
|
|
31
|
-
* @throws {@link MavenAGI.
|
|
32
|
-
* @throws {@link MavenAGI.EmptyConversationError}
|
|
33
|
-
* @throws {@link MavenAGI.AgentNotFoundError}
|
|
29
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
30
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
31
|
+
* @throws {@link MavenAGI.ServerError}
|
|
34
32
|
*
|
|
35
33
|
* @example
|
|
36
|
-
* await
|
|
34
|
+
* await client.conversation.initialize({
|
|
37
35
|
* messages: [{}],
|
|
38
36
|
* id: "string",
|
|
39
|
-
* context: {}
|
|
37
|
+
* context: {},
|
|
38
|
+
* responseConfig: {
|
|
39
|
+
* capabilities: [MavenAGI.Capability.Markdown],
|
|
40
|
+
* isCopilot: true,
|
|
41
|
+
* responseLength: MavenAGI.ResponseLength.Short
|
|
42
|
+
* }
|
|
40
43
|
* })
|
|
41
44
|
*/
|
|
42
45
|
initialize(request, requestOptions) {
|
|
43
|
-
var _a, _b
|
|
46
|
+
var _a, _b;
|
|
44
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
48
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
46
49
|
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/conversations"),
|
|
@@ -51,7 +54,7 @@ export class Conversation {
|
|
|
51
54
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
52
55
|
"X-Fern-Language": "JavaScript",
|
|
53
56
|
"X-Fern-SDK-Name": "mavenagi",
|
|
54
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
57
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
55
58
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
56
59
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
57
60
|
},
|
|
@@ -70,37 +73,23 @@ export class Conversation {
|
|
|
70
73
|
});
|
|
71
74
|
}
|
|
72
75
|
if (_response.error.reason === "status-code") {
|
|
73
|
-
switch (
|
|
74
|
-
case
|
|
75
|
-
throw new MavenAGI.
|
|
76
|
-
unrecognizedObjectKeys: "passthrough",
|
|
77
|
-
allowUnrecognizedUnionMembers: true,
|
|
78
|
-
allowUnrecognizedEnumValues: true,
|
|
79
|
-
breadcrumbsPrefix: ["response"],
|
|
80
|
-
}));
|
|
81
|
-
case "InvalidConversationIdError":
|
|
82
|
-
throw new MavenAGI.InvalidConversationIdError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
76
|
+
switch (_response.error.statusCode) {
|
|
77
|
+
case 404:
|
|
78
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
83
79
|
unrecognizedObjectKeys: "passthrough",
|
|
84
80
|
allowUnrecognizedUnionMembers: true,
|
|
85
81
|
allowUnrecognizedEnumValues: true,
|
|
86
82
|
breadcrumbsPrefix: ["response"],
|
|
87
83
|
}));
|
|
88
|
-
case
|
|
89
|
-
throw new MavenAGI.
|
|
84
|
+
case 400:
|
|
85
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
90
86
|
unrecognizedObjectKeys: "passthrough",
|
|
91
87
|
allowUnrecognizedUnionMembers: true,
|
|
92
88
|
allowUnrecognizedEnumValues: true,
|
|
93
89
|
breadcrumbsPrefix: ["response"],
|
|
94
90
|
}));
|
|
95
|
-
case
|
|
96
|
-
throw new MavenAGI.
|
|
97
|
-
unrecognizedObjectKeys: "passthrough",
|
|
98
|
-
allowUnrecognizedUnionMembers: true,
|
|
99
|
-
allowUnrecognizedEnumValues: true,
|
|
100
|
-
breadcrumbsPrefix: ["response"],
|
|
101
|
-
}));
|
|
102
|
-
case "AgentNotFoundError":
|
|
103
|
-
throw new MavenAGI.AgentNotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
91
|
+
case 500:
|
|
92
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
104
93
|
unrecognizedObjectKeys: "passthrough",
|
|
105
94
|
allowUnrecognizedUnionMembers: true,
|
|
106
95
|
allowUnrecognizedEnumValues: true,
|
|
@@ -131,17 +120,18 @@ export class Conversation {
|
|
|
131
120
|
/**
|
|
132
121
|
* Get a conversation
|
|
133
122
|
*
|
|
134
|
-
* @param {string} conversationId - The ID of
|
|
123
|
+
* @param {string} conversationId - The ID of the conversation to get
|
|
135
124
|
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
136
125
|
*
|
|
137
|
-
* @throws {@link MavenAGI.
|
|
138
|
-
* @throws {@link MavenAGI.
|
|
126
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
127
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
128
|
+
* @throws {@link MavenAGI.ServerError}
|
|
139
129
|
*
|
|
140
130
|
* @example
|
|
141
|
-
* await
|
|
131
|
+
* await client.conversation.get("string")
|
|
142
132
|
*/
|
|
143
133
|
get(conversationId, requestOptions) {
|
|
144
|
-
var _a, _b
|
|
134
|
+
var _a, _b;
|
|
145
135
|
return __awaiter(this, void 0, void 0, function* () {
|
|
146
136
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
147
137
|
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}`),
|
|
@@ -152,7 +142,7 @@ export class Conversation {
|
|
|
152
142
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
153
143
|
"X-Fern-Language": "JavaScript",
|
|
154
144
|
"X-Fern-SDK-Name": "mavenagi",
|
|
155
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
145
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
156
146
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
157
147
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
158
148
|
},
|
|
@@ -170,16 +160,23 @@ export class Conversation {
|
|
|
170
160
|
});
|
|
171
161
|
}
|
|
172
162
|
if (_response.error.reason === "status-code") {
|
|
173
|
-
switch (
|
|
174
|
-
case
|
|
175
|
-
throw new MavenAGI.
|
|
163
|
+
switch (_response.error.statusCode) {
|
|
164
|
+
case 404:
|
|
165
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
176
166
|
unrecognizedObjectKeys: "passthrough",
|
|
177
167
|
allowUnrecognizedUnionMembers: true,
|
|
178
168
|
allowUnrecognizedEnumValues: true,
|
|
179
169
|
breadcrumbsPrefix: ["response"],
|
|
180
170
|
}));
|
|
181
|
-
case
|
|
182
|
-
throw new MavenAGI.
|
|
171
|
+
case 400:
|
|
172
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
173
|
+
unrecognizedObjectKeys: "passthrough",
|
|
174
|
+
allowUnrecognizedUnionMembers: true,
|
|
175
|
+
allowUnrecognizedEnumValues: true,
|
|
176
|
+
breadcrumbsPrefix: ["response"],
|
|
177
|
+
}));
|
|
178
|
+
case 500:
|
|
179
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
183
180
|
unrecognizedObjectKeys: "passthrough",
|
|
184
181
|
allowUnrecognizedUnionMembers: true,
|
|
185
182
|
allowUnrecognizedEnumValues: true,
|
|
@@ -214,12 +211,12 @@ export class Conversation {
|
|
|
214
211
|
* @param {MavenAGI.ConversationMessageRequest[]} request
|
|
215
212
|
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
216
213
|
*
|
|
217
|
-
* @throws {@link MavenAGI.
|
|
218
|
-
* @throws {@link MavenAGI.
|
|
219
|
-
* @throws {@link MavenAGI.
|
|
214
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
215
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
216
|
+
* @throws {@link MavenAGI.ServerError}
|
|
220
217
|
*
|
|
221
218
|
* @example
|
|
222
|
-
* await
|
|
219
|
+
* await client.conversation.appendNewMessages("string", [{
|
|
223
220
|
* text: "string",
|
|
224
221
|
* userMessageType: MavenAGI.UserConversationMessageType.User,
|
|
225
222
|
* id: "string",
|
|
@@ -227,7 +224,7 @@ export class Conversation {
|
|
|
227
224
|
* }])
|
|
228
225
|
*/
|
|
229
226
|
appendNewMessages(conversationId, request, requestOptions) {
|
|
230
|
-
var _a, _b
|
|
227
|
+
var _a, _b;
|
|
231
228
|
return __awaiter(this, void 0, void 0, function* () {
|
|
232
229
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
233
230
|
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/messages`),
|
|
@@ -238,7 +235,7 @@ export class Conversation {
|
|
|
238
235
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
239
236
|
"X-Fern-Language": "JavaScript",
|
|
240
237
|
"X-Fern-SDK-Name": "mavenagi",
|
|
241
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
238
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
242
239
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
243
240
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
244
241
|
},
|
|
@@ -259,23 +256,23 @@ export class Conversation {
|
|
|
259
256
|
});
|
|
260
257
|
}
|
|
261
258
|
if (_response.error.reason === "status-code") {
|
|
262
|
-
switch (
|
|
263
|
-
case
|
|
264
|
-
throw new MavenAGI.
|
|
259
|
+
switch (_response.error.statusCode) {
|
|
260
|
+
case 404:
|
|
261
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
265
262
|
unrecognizedObjectKeys: "passthrough",
|
|
266
263
|
allowUnrecognizedUnionMembers: true,
|
|
267
264
|
allowUnrecognizedEnumValues: true,
|
|
268
265
|
breadcrumbsPrefix: ["response"],
|
|
269
266
|
}));
|
|
270
|
-
case
|
|
271
|
-
throw new MavenAGI.
|
|
267
|
+
case 400:
|
|
268
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
272
269
|
unrecognizedObjectKeys: "passthrough",
|
|
273
270
|
allowUnrecognizedUnionMembers: true,
|
|
274
271
|
allowUnrecognizedEnumValues: true,
|
|
275
272
|
breadcrumbsPrefix: ["response"],
|
|
276
273
|
}));
|
|
277
|
-
case
|
|
278
|
-
throw new MavenAGI.
|
|
274
|
+
case 500:
|
|
275
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
279
276
|
unrecognizedObjectKeys: "passthrough",
|
|
280
277
|
allowUnrecognizedUnionMembers: true,
|
|
281
278
|
allowUnrecognizedEnumValues: true,
|
|
@@ -310,18 +307,20 @@ export class Conversation {
|
|
|
310
307
|
* @param {MavenAGI.AskRequest} request
|
|
311
308
|
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
312
309
|
*
|
|
313
|
-
* @throws {@link MavenAGI.
|
|
314
|
-
* @throws {@link MavenAGI.
|
|
310
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
311
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
312
|
+
* @throws {@link MavenAGI.ServerError}
|
|
315
313
|
*
|
|
316
314
|
* @example
|
|
317
|
-
* await
|
|
315
|
+
* await client.conversation.ask("string", {
|
|
318
316
|
* id: "string",
|
|
319
317
|
* text: "string",
|
|
320
|
-
* context: {}
|
|
318
|
+
* context: {},
|
|
319
|
+
* responseConfig: {}
|
|
321
320
|
* })
|
|
322
321
|
*/
|
|
323
322
|
ask(conversationId, request, requestOptions) {
|
|
324
|
-
var _a, _b
|
|
323
|
+
var _a, _b;
|
|
325
324
|
return __awaiter(this, void 0, void 0, function* () {
|
|
326
325
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
327
326
|
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/ask`),
|
|
@@ -332,7 +331,7 @@ export class Conversation {
|
|
|
332
331
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
333
332
|
"X-Fern-Language": "JavaScript",
|
|
334
333
|
"X-Fern-SDK-Name": "mavenagi",
|
|
335
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
334
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
336
335
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
337
336
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
338
337
|
},
|
|
@@ -351,16 +350,23 @@ export class Conversation {
|
|
|
351
350
|
});
|
|
352
351
|
}
|
|
353
352
|
if (_response.error.reason === "status-code") {
|
|
354
|
-
switch (
|
|
355
|
-
case
|
|
356
|
-
throw new MavenAGI.
|
|
353
|
+
switch (_response.error.statusCode) {
|
|
354
|
+
case 404:
|
|
355
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
356
|
+
unrecognizedObjectKeys: "passthrough",
|
|
357
|
+
allowUnrecognizedUnionMembers: true,
|
|
358
|
+
allowUnrecognizedEnumValues: true,
|
|
359
|
+
breadcrumbsPrefix: ["response"],
|
|
360
|
+
}));
|
|
361
|
+
case 400:
|
|
362
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
357
363
|
unrecognizedObjectKeys: "passthrough",
|
|
358
364
|
allowUnrecognizedUnionMembers: true,
|
|
359
365
|
allowUnrecognizedEnumValues: true,
|
|
360
366
|
breadcrumbsPrefix: ["response"],
|
|
361
367
|
}));
|
|
362
|
-
case
|
|
363
|
-
throw new MavenAGI.
|
|
368
|
+
case 500:
|
|
369
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
364
370
|
unrecognizedObjectKeys: "passthrough",
|
|
365
371
|
allowUnrecognizedUnionMembers: true,
|
|
366
372
|
allowUnrecognizedEnumValues: true,
|
|
@@ -392,7 +398,7 @@ export class Conversation {
|
|
|
392
398
|
* Ask a question
|
|
393
399
|
*/
|
|
394
400
|
askStream(conversationId, request, requestOptions) {
|
|
395
|
-
var _a, _b
|
|
401
|
+
var _a, _b;
|
|
396
402
|
return __awaiter(this, void 0, void 0, function* () {
|
|
397
403
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
398
404
|
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/ask_stream`),
|
|
@@ -403,7 +409,7 @@ export class Conversation {
|
|
|
403
409
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
404
410
|
"X-Fern-Language": "JavaScript",
|
|
405
411
|
"X-Fern-SDK-Name": "mavenagi",
|
|
406
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
412
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
407
413
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
408
414
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
409
415
|
},
|
|
@@ -433,9 +439,23 @@ export class Conversation {
|
|
|
433
439
|
});
|
|
434
440
|
}
|
|
435
441
|
if (_response.error.reason === "status-code") {
|
|
436
|
-
switch (
|
|
437
|
-
case
|
|
438
|
-
throw new MavenAGI.
|
|
442
|
+
switch (_response.error.statusCode) {
|
|
443
|
+
case 404:
|
|
444
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
445
|
+
unrecognizedObjectKeys: "passthrough",
|
|
446
|
+
allowUnrecognizedUnionMembers: true,
|
|
447
|
+
allowUnrecognizedEnumValues: true,
|
|
448
|
+
breadcrumbsPrefix: ["response"],
|
|
449
|
+
}));
|
|
450
|
+
case 400:
|
|
451
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
452
|
+
unrecognizedObjectKeys: "passthrough",
|
|
453
|
+
allowUnrecognizedUnionMembers: true,
|
|
454
|
+
allowUnrecognizedEnumValues: true,
|
|
455
|
+
breadcrumbsPrefix: ["response"],
|
|
456
|
+
}));
|
|
457
|
+
case 500:
|
|
458
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
439
459
|
unrecognizedObjectKeys: "passthrough",
|
|
440
460
|
allowUnrecognizedUnionMembers: true,
|
|
441
461
|
allowUnrecognizedEnumValues: true,
|
|
@@ -470,19 +490,17 @@ export class Conversation {
|
|
|
470
490
|
* @param {MavenAGI.GenerateMavenSuggestionsRequest} request
|
|
471
491
|
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
472
492
|
*
|
|
473
|
-
* @throws {@link MavenAGI.
|
|
474
|
-
* @throws {@link MavenAGI.
|
|
475
|
-
* @throws {@link MavenAGI.
|
|
476
|
-
* @throws {@link MavenAGI.InvalidConversationMessageIdError}
|
|
477
|
-
* @throws {@link MavenAGI.AgentNotFoundError}
|
|
493
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
494
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
495
|
+
* @throws {@link MavenAGI.ServerError}
|
|
478
496
|
*
|
|
479
497
|
* @example
|
|
480
|
-
* await
|
|
498
|
+
* await client.conversation.generateMavenSuggestions("string", {
|
|
481
499
|
* messageIds: ["string"]
|
|
482
500
|
* })
|
|
483
501
|
*/
|
|
484
502
|
generateMavenSuggestions(conversationId, request, requestOptions) {
|
|
485
|
-
var _a, _b
|
|
503
|
+
var _a, _b;
|
|
486
504
|
return __awaiter(this, void 0, void 0, function* () {
|
|
487
505
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
488
506
|
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/generate_maven_suggestions`),
|
|
@@ -493,7 +511,7 @@ export class Conversation {
|
|
|
493
511
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
494
512
|
"X-Fern-Language": "JavaScript",
|
|
495
513
|
"X-Fern-SDK-Name": "mavenagi",
|
|
496
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
514
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
497
515
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
498
516
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
499
517
|
},
|
|
@@ -514,37 +532,112 @@ export class Conversation {
|
|
|
514
532
|
});
|
|
515
533
|
}
|
|
516
534
|
if (_response.error.reason === "status-code") {
|
|
517
|
-
switch (
|
|
518
|
-
case
|
|
519
|
-
throw new MavenAGI.
|
|
535
|
+
switch (_response.error.statusCode) {
|
|
536
|
+
case 404:
|
|
537
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
520
538
|
unrecognizedObjectKeys: "passthrough",
|
|
521
539
|
allowUnrecognizedUnionMembers: true,
|
|
522
540
|
allowUnrecognizedEnumValues: true,
|
|
523
541
|
breadcrumbsPrefix: ["response"],
|
|
524
542
|
}));
|
|
525
|
-
case
|
|
526
|
-
throw new MavenAGI.
|
|
543
|
+
case 400:
|
|
544
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
527
545
|
unrecognizedObjectKeys: "passthrough",
|
|
528
546
|
allowUnrecognizedUnionMembers: true,
|
|
529
547
|
allowUnrecognizedEnumValues: true,
|
|
530
548
|
breadcrumbsPrefix: ["response"],
|
|
531
549
|
}));
|
|
532
|
-
case
|
|
533
|
-
throw new MavenAGI.
|
|
550
|
+
case 500:
|
|
551
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
552
|
+
unrecognizedObjectKeys: "passthrough",
|
|
553
|
+
allowUnrecognizedUnionMembers: true,
|
|
554
|
+
allowUnrecognizedEnumValues: true,
|
|
555
|
+
breadcrumbsPrefix: ["response"],
|
|
556
|
+
}));
|
|
557
|
+
default:
|
|
558
|
+
throw new errors.MavenAGIError({
|
|
559
|
+
statusCode: _response.error.statusCode,
|
|
560
|
+
body: _response.error.body,
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
switch (_response.error.reason) {
|
|
565
|
+
case "non-json":
|
|
566
|
+
throw new errors.MavenAGIError({
|
|
567
|
+
statusCode: _response.error.statusCode,
|
|
568
|
+
body: _response.error.rawBody,
|
|
569
|
+
});
|
|
570
|
+
case "timeout":
|
|
571
|
+
throw new errors.MavenAGITimeoutError();
|
|
572
|
+
case "unknown":
|
|
573
|
+
throw new errors.MavenAGIError({
|
|
574
|
+
message: _response.error.errorMessage,
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* Create feedback
|
|
581
|
+
*
|
|
582
|
+
* @param {MavenAGI.FeedbackRequest} request
|
|
583
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
584
|
+
*
|
|
585
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
586
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
587
|
+
* @throws {@link MavenAGI.ServerError}
|
|
588
|
+
*
|
|
589
|
+
* @example
|
|
590
|
+
* await client.conversation.createFeedback({
|
|
591
|
+
* id: "string",
|
|
592
|
+
* conversationId: "string",
|
|
593
|
+
* conversationMessageId: "string",
|
|
594
|
+
* type: MavenAGI.FeedbackType.ThumbsUp,
|
|
595
|
+
* text: "string"
|
|
596
|
+
* })
|
|
597
|
+
*/
|
|
598
|
+
createFeedback(request, requestOptions) {
|
|
599
|
+
var _a, _b;
|
|
600
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
601
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
602
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/conversations/feedback"),
|
|
603
|
+
method: "POST",
|
|
604
|
+
headers: {
|
|
605
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
606
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
607
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
608
|
+
"X-Fern-Language": "JavaScript",
|
|
609
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
610
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
611
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
612
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
613
|
+
},
|
|
614
|
+
contentType: "application/json",
|
|
615
|
+
body: yield serializers.FeedbackRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
616
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
617
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
618
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
619
|
+
});
|
|
620
|
+
if (_response.ok) {
|
|
621
|
+
return;
|
|
622
|
+
}
|
|
623
|
+
if (_response.error.reason === "status-code") {
|
|
624
|
+
switch (_response.error.statusCode) {
|
|
625
|
+
case 404:
|
|
626
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
534
627
|
unrecognizedObjectKeys: "passthrough",
|
|
535
628
|
allowUnrecognizedUnionMembers: true,
|
|
536
629
|
allowUnrecognizedEnumValues: true,
|
|
537
630
|
breadcrumbsPrefix: ["response"],
|
|
538
631
|
}));
|
|
539
|
-
case
|
|
540
|
-
throw new MavenAGI.
|
|
632
|
+
case 400:
|
|
633
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
541
634
|
unrecognizedObjectKeys: "passthrough",
|
|
542
635
|
allowUnrecognizedUnionMembers: true,
|
|
543
636
|
allowUnrecognizedEnumValues: true,
|
|
544
637
|
breadcrumbsPrefix: ["response"],
|
|
545
638
|
}));
|
|
546
|
-
case
|
|
547
|
-
throw new MavenAGI.
|
|
639
|
+
case 500:
|
|
640
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
548
641
|
unrecognizedObjectKeys: "passthrough",
|
|
549
642
|
allowUnrecognizedUnionMembers: true,
|
|
550
643
|
allowUnrecognizedEnumValues: true,
|
|
@@ -573,27 +666,41 @@ export class Conversation {
|
|
|
573
666
|
});
|
|
574
667
|
}
|
|
575
668
|
/**
|
|
576
|
-
*
|
|
669
|
+
* Submit a filled out action form
|
|
577
670
|
*
|
|
578
|
-
* @param {
|
|
671
|
+
* @param {string} conversationId - The ID of a conversation the form being submitted belongs to
|
|
672
|
+
* @param {MavenAGI.ActionExecutionRequest} request
|
|
579
673
|
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
580
674
|
*
|
|
581
|
-
* @throws {@link MavenAGI.
|
|
582
|
-
* @throws {@link MavenAGI.
|
|
583
|
-
* @throws {@link MavenAGI.
|
|
675
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
676
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
677
|
+
* @throws {@link MavenAGI.ServerError}
|
|
584
678
|
*
|
|
585
679
|
* @example
|
|
586
|
-
* await
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
*
|
|
680
|
+
* await client.conversation.submitActionForm("string", {
|
|
681
|
+
* actionFormId: "string",
|
|
682
|
+
* userContext: {
|
|
683
|
+
* name: "string",
|
|
684
|
+
* id: {
|
|
685
|
+
* "string": "string"
|
|
686
|
+
* },
|
|
687
|
+
* email: "string",
|
|
688
|
+
* context: {
|
|
689
|
+
* "string": "string"
|
|
690
|
+
* }
|
|
691
|
+
* },
|
|
692
|
+
* parameters: {
|
|
693
|
+
* "string": {
|
|
694
|
+
* "key": "value"
|
|
695
|
+
* }
|
|
696
|
+
* }
|
|
590
697
|
* })
|
|
591
698
|
*/
|
|
592
|
-
|
|
593
|
-
var _a, _b
|
|
699
|
+
submitActionForm(conversationId, request, requestOptions) {
|
|
700
|
+
var _a, _b;
|
|
594
701
|
return __awaiter(this, void 0, void 0, function* () {
|
|
595
702
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
596
|
-
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production,
|
|
703
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/submit-form`),
|
|
597
704
|
method: "POST",
|
|
598
705
|
headers: {
|
|
599
706
|
Authorization: yield this._getAuthorizationHeader(),
|
|
@@ -601,37 +708,42 @@ export class Conversation {
|
|
|
601
708
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
602
709
|
"X-Fern-Language": "JavaScript",
|
|
603
710
|
"X-Fern-SDK-Name": "mavenagi",
|
|
604
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
711
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
605
712
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
606
713
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
607
714
|
},
|
|
608
715
|
contentType: "application/json",
|
|
609
|
-
body: yield serializers.
|
|
716
|
+
body: yield serializers.ActionExecutionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
610
717
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
611
718
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
612
719
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
613
720
|
});
|
|
614
721
|
if (_response.ok) {
|
|
615
|
-
return
|
|
722
|
+
return yield serializers.ActionExecutionResponse.parseOrThrow(_response.body, {
|
|
723
|
+
unrecognizedObjectKeys: "passthrough",
|
|
724
|
+
allowUnrecognizedUnionMembers: true,
|
|
725
|
+
allowUnrecognizedEnumValues: true,
|
|
726
|
+
breadcrumbsPrefix: ["response"],
|
|
727
|
+
});
|
|
616
728
|
}
|
|
617
729
|
if (_response.error.reason === "status-code") {
|
|
618
|
-
switch (
|
|
619
|
-
case
|
|
620
|
-
throw new MavenAGI.
|
|
730
|
+
switch (_response.error.statusCode) {
|
|
731
|
+
case 404:
|
|
732
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
621
733
|
unrecognizedObjectKeys: "passthrough",
|
|
622
734
|
allowUnrecognizedUnionMembers: true,
|
|
623
735
|
allowUnrecognizedEnumValues: true,
|
|
624
736
|
breadcrumbsPrefix: ["response"],
|
|
625
737
|
}));
|
|
626
|
-
case
|
|
627
|
-
throw new MavenAGI.
|
|
738
|
+
case 400:
|
|
739
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
628
740
|
unrecognizedObjectKeys: "passthrough",
|
|
629
741
|
allowUnrecognizedUnionMembers: true,
|
|
630
742
|
allowUnrecognizedEnumValues: true,
|
|
631
743
|
breadcrumbsPrefix: ["response"],
|
|
632
744
|
}));
|
|
633
|
-
case
|
|
634
|
-
throw new MavenAGI.
|
|
745
|
+
case 500:
|
|
746
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
635
747
|
unrecognizedObjectKeys: "passthrough",
|
|
636
748
|
allowUnrecognizedUnionMembers: true,
|
|
637
749
|
allowUnrecognizedEnumValues: true,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
export interface ActionExecutionRequest {
|
|
6
|
+
actionFormId: string;
|
|
7
|
+
userContext: MavenAGI.User;
|
|
8
|
+
/** Map of parameter names to values */
|
|
9
|
+
parameters: Record<string, unknown>;
|
|
10
|
+
}
|
|
@@ -9,4 +9,6 @@ export interface AskRequest {
|
|
|
9
9
|
text: string;
|
|
10
10
|
/** The context of the message */
|
|
11
11
|
context?: MavenAGI.ConversationMessageContext;
|
|
12
|
+
/** Optional configuration for responses to this conversation. Only applies to new conversations. */
|
|
13
|
+
responseConfig?: MavenAGI.ResponseConfig;
|
|
12
14
|
}
|