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
|
@@ -0,0 +1,220 @@
|
|
|
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 User {
|
|
20
|
+
constructor(_options) {
|
|
21
|
+
this._options = _options;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Create a new user or update an existing one
|
|
25
|
+
*
|
|
26
|
+
* @param {MavenAGI.AppUser} request
|
|
27
|
+
* @param {User.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.user.upsertAppUser({
|
|
35
|
+
* id: "string",
|
|
36
|
+
* userIdentifiers: {
|
|
37
|
+
* identifiers: new Set([{}])
|
|
38
|
+
* },
|
|
39
|
+
* metadata: {
|
|
40
|
+
* "string": "string"
|
|
41
|
+
* }
|
|
42
|
+
* })
|
|
43
|
+
*/
|
|
44
|
+
upsertAppUser(request, requestOptions) {
|
|
45
|
+
var _a, _b;
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
48
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/users"),
|
|
49
|
+
method: "PUT",
|
|
50
|
+
headers: {
|
|
51
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
52
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
53
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
54
|
+
"X-Fern-Language": "JavaScript",
|
|
55
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
56
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
57
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
58
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
59
|
+
},
|
|
60
|
+
contentType: "application/json",
|
|
61
|
+
body: yield serializers.AppUser.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 yield serializers.AppUser.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(yield 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(yield 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(yield 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 a user
|
|
121
|
+
*
|
|
122
|
+
* @param {string} userId - The ID of the user to get
|
|
123
|
+
* @param {User.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.user.getAppUser("string")
|
|
131
|
+
*/
|
|
132
|
+
getAppUser(userId, 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/users/${encodeURIComponent(userId)}`),
|
|
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.4",
|
|
145
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
146
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
147
|
+
},
|
|
148
|
+
contentType: "application/json",
|
|
149
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
150
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
151
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
152
|
+
});
|
|
153
|
+
if (_response.ok) {
|
|
154
|
+
return yield serializers.AppUser.parseOrThrow(_response.body, {
|
|
155
|
+
unrecognizedObjectKeys: "passthrough",
|
|
156
|
+
allowUnrecognizedUnionMembers: true,
|
|
157
|
+
allowUnrecognizedEnumValues: true,
|
|
158
|
+
breadcrumbsPrefix: ["response"],
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
if (_response.error.reason === "status-code") {
|
|
162
|
+
switch (_response.error.statusCode) {
|
|
163
|
+
case 404:
|
|
164
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
165
|
+
unrecognizedObjectKeys: "passthrough",
|
|
166
|
+
allowUnrecognizedUnionMembers: true,
|
|
167
|
+
allowUnrecognizedEnumValues: true,
|
|
168
|
+
breadcrumbsPrefix: ["response"],
|
|
169
|
+
}));
|
|
170
|
+
case 400:
|
|
171
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
172
|
+
unrecognizedObjectKeys: "passthrough",
|
|
173
|
+
allowUnrecognizedUnionMembers: true,
|
|
174
|
+
allowUnrecognizedEnumValues: true,
|
|
175
|
+
breadcrumbsPrefix: ["response"],
|
|
176
|
+
}));
|
|
177
|
+
case 500:
|
|
178
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
179
|
+
unrecognizedObjectKeys: "passthrough",
|
|
180
|
+
allowUnrecognizedUnionMembers: true,
|
|
181
|
+
allowUnrecognizedEnumValues: true,
|
|
182
|
+
breadcrumbsPrefix: ["response"],
|
|
183
|
+
}));
|
|
184
|
+
default:
|
|
185
|
+
throw new errors.MavenAGIError({
|
|
186
|
+
statusCode: _response.error.statusCode,
|
|
187
|
+
body: _response.error.body,
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
switch (_response.error.reason) {
|
|
192
|
+
case "non-json":
|
|
193
|
+
throw new errors.MavenAGIError({
|
|
194
|
+
statusCode: _response.error.statusCode,
|
|
195
|
+
body: _response.error.rawBody,
|
|
196
|
+
});
|
|
197
|
+
case "timeout":
|
|
198
|
+
throw new errors.MavenAGITimeoutError();
|
|
199
|
+
case "unknown":
|
|
200
|
+
throw new errors.MavenAGIError({
|
|
201
|
+
message: _response.error.errorMessage,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
_getAuthorizationHeader() {
|
|
207
|
+
var _a, _b;
|
|
208
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
209
|
+
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"];
|
|
210
|
+
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"];
|
|
211
|
+
if (appId != null && appSecret != null) {
|
|
212
|
+
return core.BasicAuth.toAuthorizationHeader({
|
|
213
|
+
username: appId,
|
|
214
|
+
password: appSecret,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
return undefined;
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|
package/core/index.d.ts
CHANGED
package/core/index.js
CHANGED
package/dist/Client.d.ts
CHANGED
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "./environments";
|
|
5
5
|
import * as core from "./core";
|
|
6
|
+
import { Actions } from "./api/resources/actions/client/Client";
|
|
6
7
|
import { Conversation } from "./api/resources/conversation/client/Client";
|
|
7
8
|
import { Knowledge } from "./api/resources/knowledge/client/Client";
|
|
9
|
+
import { Triggers } from "./api/resources/triggers/client/Client";
|
|
10
|
+
import { User } from "./api/resources/user/client/Client";
|
|
8
11
|
export declare namespace MavenAGIClient {
|
|
9
12
|
interface Options {
|
|
10
13
|
environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
|
|
@@ -23,8 +26,14 @@ export declare namespace MavenAGIClient {
|
|
|
23
26
|
export declare class MavenAGIClient {
|
|
24
27
|
protected readonly _options: MavenAGIClient.Options;
|
|
25
28
|
constructor(_options: MavenAGIClient.Options);
|
|
29
|
+
protected _actions: Actions | undefined;
|
|
30
|
+
get actions(): Actions;
|
|
26
31
|
protected _conversation: Conversation | undefined;
|
|
27
32
|
get conversation(): Conversation;
|
|
28
33
|
protected _knowledge: Knowledge | undefined;
|
|
29
34
|
get knowledge(): Knowledge;
|
|
35
|
+
protected _triggers: Triggers | undefined;
|
|
36
|
+
get triggers(): Triggers;
|
|
37
|
+
protected _user: User | undefined;
|
|
38
|
+
get user(): User;
|
|
30
39
|
}
|
package/dist/Client.js
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import { Actions } from "./api/resources/actions/client/Client";
|
|
4
5
|
import { Conversation } from "./api/resources/conversation/client/Client";
|
|
5
6
|
import { Knowledge } from "./api/resources/knowledge/client/Client";
|
|
7
|
+
import { Triggers } from "./api/resources/triggers/client/Client";
|
|
8
|
+
import { User } from "./api/resources/user/client/Client";
|
|
6
9
|
export class MavenAGIClient {
|
|
7
10
|
constructor(_options) {
|
|
8
11
|
this._options = _options;
|
|
9
12
|
}
|
|
13
|
+
get actions() {
|
|
14
|
+
var _a;
|
|
15
|
+
return ((_a = this._actions) !== null && _a !== void 0 ? _a : (this._actions = new Actions(this._options)));
|
|
16
|
+
}
|
|
10
17
|
get conversation() {
|
|
11
18
|
var _a;
|
|
12
19
|
return ((_a = this._conversation) !== null && _a !== void 0 ? _a : (this._conversation = new Conversation(this._options)));
|
|
@@ -15,4 +22,12 @@ export class MavenAGIClient {
|
|
|
15
22
|
var _a;
|
|
16
23
|
return ((_a = this._knowledge) !== null && _a !== void 0 ? _a : (this._knowledge = new Knowledge(this._options)));
|
|
17
24
|
}
|
|
25
|
+
get triggers() {
|
|
26
|
+
var _a;
|
|
27
|
+
return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Triggers(this._options)));
|
|
28
|
+
}
|
|
29
|
+
get user() {
|
|
30
|
+
var _a;
|
|
31
|
+
return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new User(this._options)));
|
|
32
|
+
}
|
|
18
33
|
}
|
|
@@ -0,0 +1,123 @@
|
|
|
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 Actions {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
|
|
10
|
+
appId?: core.Supplier<string | undefined>;
|
|
11
|
+
appSecret?: core.Supplier<string | undefined>;
|
|
12
|
+
organizationId: core.Supplier<string>;
|
|
13
|
+
agentId: core.Supplier<string>;
|
|
14
|
+
fetcher?: core.FetchFunction;
|
|
15
|
+
}
|
|
16
|
+
interface RequestOptions {
|
|
17
|
+
timeoutInSeconds?: number;
|
|
18
|
+
maxRetries?: number;
|
|
19
|
+
abortSignal?: AbortSignal;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export declare class Actions {
|
|
23
|
+
protected readonly _options: Actions.Options;
|
|
24
|
+
constructor(_options: Actions.Options);
|
|
25
|
+
/**
|
|
26
|
+
* Update an action set or create it if it doesn't exist
|
|
27
|
+
*
|
|
28
|
+
* @param {MavenAGI.ActionSetRequest} request
|
|
29
|
+
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
30
|
+
*
|
|
31
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
32
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
33
|
+
* @throws {@link MavenAGI.ServerError}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* await client.actions.createActionSet({
|
|
37
|
+
* id: "string",
|
|
38
|
+
* name: "string"
|
|
39
|
+
* })
|
|
40
|
+
*/
|
|
41
|
+
createActionSet(request: MavenAGI.ActionSetRequest, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionSetResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* Get an action set by its supplied ID
|
|
44
|
+
*
|
|
45
|
+
* @param {string} actionSetId - The ID of the action set to get
|
|
46
|
+
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
47
|
+
*
|
|
48
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
49
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
50
|
+
* @throws {@link MavenAGI.ServerError}
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* await client.actions.getActionSet("string")
|
|
54
|
+
*/
|
|
55
|
+
getActionSet(actionSetId: string, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionSetResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* Delete an action set
|
|
58
|
+
*
|
|
59
|
+
* @param {string} actionSetId - The ID of the action set to delete
|
|
60
|
+
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
63
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
64
|
+
* @throws {@link MavenAGI.ServerError}
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.actions.deleteActionSet("string")
|
|
68
|
+
*/
|
|
69
|
+
deleteActionSet(actionSetId: string, requestOptions?: Actions.RequestOptions): Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* Update an action or create it if it doesn't exist
|
|
72
|
+
*
|
|
73
|
+
* @param {MavenAGI.Action} request
|
|
74
|
+
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
75
|
+
*
|
|
76
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
77
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
78
|
+
* @throws {@link MavenAGI.ServerError}
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* await client.actions.registerAction({
|
|
82
|
+
* id: "string",
|
|
83
|
+
* actionSetId: "string",
|
|
84
|
+
* appId: "string",
|
|
85
|
+
* name: "string",
|
|
86
|
+
* description: "string",
|
|
87
|
+
* userInteractionRequired: true,
|
|
88
|
+
* buttonName: "string",
|
|
89
|
+
* requiredUserContextFieldNames: new Set(["string"]),
|
|
90
|
+
* userFormParameters: [{}]
|
|
91
|
+
* })
|
|
92
|
+
*/
|
|
93
|
+
registerAction(request: MavenAGI.Action, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.Action>;
|
|
94
|
+
/**
|
|
95
|
+
* Get an action by its supplied ID
|
|
96
|
+
*
|
|
97
|
+
* @param {string} actionId - The ID of the action to get
|
|
98
|
+
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
99
|
+
*
|
|
100
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
101
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
102
|
+
* @throws {@link MavenAGI.ServerError}
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* await client.actions.getAction("string")
|
|
106
|
+
*/
|
|
107
|
+
getAction(actionId: string, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.Action>;
|
|
108
|
+
/**
|
|
109
|
+
* Delete an action
|
|
110
|
+
*
|
|
111
|
+
* @param {string} actionId - The ID of the action to delete
|
|
112
|
+
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
113
|
+
*
|
|
114
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
115
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
116
|
+
* @throws {@link MavenAGI.ServerError}
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* await client.actions.deleteAction("string")
|
|
120
|
+
*/
|
|
121
|
+
deleteAction(actionId: string, requestOptions?: Actions.RequestOptions): Promise<void>;
|
|
122
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
123
|
+
}
|