mavenagi 0.0.0-alpha.3 → 0.0.0-alpha.5
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 +11 -8
- package/Client.js +13 -8
- package/README.md +45 -37
- package/api/resources/actions/client/Client.d.ts +77 -0
- package/api/resources/{action → actions}/client/Client.js +42 -43
- package/api/resources/{action/types/Action.d.ts → actions/types/ActionBase.d.ts} +3 -9
- package/api/resources/{action → actions}/types/ActionParameter.d.ts +1 -0
- package/api/resources/actions/types/ActionRequest.d.ts +21 -0
- package/api/resources/actions/types/ActionResponse.d.ts +25 -0
- package/api/resources/actions/types/index.d.ts +4 -0
- package/api/resources/actions/types/index.js +4 -0
- package/api/resources/commons/types/AppUser.d.ts +10 -0
- package/api/resources/commons/types/AppUserIdentification.d.ts +8 -0
- package/api/resources/commons/types/AppUserIdentifyingProperty.d.ts +9 -0
- package/api/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +8 -0
- package/api/resources/commons/types/AppUserIdentifyingPropertyType.js +7 -0
- package/api/resources/commons/types/EntityId.d.ts +14 -0
- package/api/resources/commons/types/EntityIdBase.d.ts +10 -0
- package/api/resources/commons/types/EntityType.d.ts +14 -0
- package/api/resources/commons/types/EntityType.js +13 -0
- package/api/resources/commons/types/Feedback.d.ts +1 -1
- package/api/resources/commons/types/index.d.ts +7 -0
- package/api/resources/commons/types/index.js +7 -0
- package/api/resources/conversation/client/Client.d.ts +27 -4
- package/api/resources/conversation/client/Client.js +125 -26
- package/api/resources/conversation/types/AskRequest.d.ts +2 -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 -2
- package/api/resources/conversation/types/ConversationRequest.d.ts +2 -0
- package/api/resources/conversation/types/ConversationResponse.d.ts +2 -0
- package/api/resources/conversation/types/ResponseConfig.d.ts +12 -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/index.d.ts +3 -0
- package/api/resources/conversation/types/index.js +3 -0
- package/api/resources/index.d.ts +5 -4
- package/api/resources/index.js +5 -4
- package/api/resources/knowledge/client/Client.d.ts +24 -8
- package/api/resources/knowledge/client/Client.js +115 -26
- package/api/resources/knowledge/types/{KnowledgeDocument.d.ts → BaseKnowledgeDocument.d.ts} +1 -3
- package/api/resources/knowledge/types/KnowledgeBase.d.ts +1 -1
- package/api/resources/knowledge/types/KnowledgeBaseType.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/KnowledgeDocumentResponse.d.ts +8 -0
- package/api/resources/knowledge/types/KnowledgeDocumentResponse.js +4 -0
- package/api/resources/knowledge/types/index.d.ts +4 -1
- package/api/resources/knowledge/types/index.js +4 -1
- package/api/resources/triggers/client/Client.d.ts +74 -0
- package/api/resources/{actionSet → triggers}/client/Client.js +40 -37
- package/api/resources/triggers/types/EventTriggerBase.d.ts +10 -0
- package/api/resources/triggers/types/EventTriggerBase.js +4 -0
- package/api/resources/triggers/types/EventTriggerRequest.d.ts +18 -0
- package/api/resources/triggers/types/EventTriggerRequest.js +4 -0
- package/api/resources/triggers/types/EventTriggerResponse.d.ts +22 -0
- package/api/resources/triggers/types/EventTriggerResponse.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 +4 -0
- package/api/resources/triggers/types/index.js +4 -0
- package/api/resources/users/client/Client.d.ts +62 -0
- package/api/resources/users/client/Client.js +220 -0
- package/api/resources/users/index.d.ts +1 -0
- package/api/resources/users/index.js +1 -0
- package/dist/Client.d.ts +11 -8
- package/dist/Client.js +13 -8
- package/dist/api/resources/actions/client/Client.d.ts +77 -0
- package/dist/api/resources/{action → actions}/client/Client.js +42 -43
- package/dist/api/resources/{action/types/Action.d.ts → actions/types/ActionBase.d.ts} +3 -9
- package/dist/api/resources/actions/types/ActionBase.js +4 -0
- package/dist/api/resources/{action → actions}/types/ActionParameter.d.ts +1 -0
- package/dist/api/resources/actions/types/ActionParameter.js +4 -0
- package/dist/api/resources/actions/types/ActionRequest.d.ts +21 -0
- package/dist/api/resources/actions/types/ActionRequest.js +4 -0
- package/dist/api/resources/actions/types/ActionResponse.d.ts +25 -0
- package/dist/api/resources/actions/types/ActionResponse.js +4 -0
- package/dist/api/resources/actions/types/index.d.ts +4 -0
- package/dist/api/resources/actions/types/index.js +4 -0
- 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/EntityId.d.ts +14 -0
- package/dist/api/resources/commons/types/EntityId.js +4 -0
- package/dist/api/resources/commons/types/EntityIdBase.d.ts +10 -0
- package/dist/api/resources/commons/types/EntityIdBase.js +4 -0
- package/dist/api/resources/commons/types/EntityType.d.ts +14 -0
- package/dist/api/resources/commons/types/EntityType.js +13 -0
- package/dist/api/resources/commons/types/Feedback.d.ts +1 -1
- package/dist/api/resources/commons/types/index.d.ts +7 -0
- package/dist/api/resources/commons/types/index.js +7 -0
- package/dist/api/resources/conversation/client/Client.d.ts +27 -4
- package/dist/api/resources/conversation/client/Client.js +125 -26
- package/dist/api/resources/conversation/types/AskRequest.d.ts +2 -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 -2
- package/dist/api/resources/conversation/types/ConversationRequest.d.ts +2 -0
- package/dist/api/resources/conversation/types/ConversationResponse.d.ts +2 -0
- 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/index.d.ts +3 -0
- package/dist/api/resources/conversation/types/index.js +3 -0
- package/dist/api/resources/index.d.ts +5 -4
- package/dist/api/resources/index.js +5 -4
- package/dist/api/resources/knowledge/client/Client.d.ts +24 -8
- package/dist/api/resources/knowledge/client/Client.js +115 -26
- 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/KnowledgeBase.d.ts +1 -1
- package/dist/api/resources/knowledge/types/KnowledgeBaseType.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 -1
- package/dist/api/resources/knowledge/types/index.js +4 -1
- package/dist/api/resources/triggers/client/Client.d.ts +74 -0
- package/dist/api/resources/{actionSet → triggers}/client/Client.js +40 -37
- 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/types/EventTriggerBase.d.ts +10 -0
- package/dist/api/resources/triggers/types/EventTriggerBase.js +4 -0
- package/dist/api/resources/triggers/types/EventTriggerRequest.d.ts +18 -0
- package/dist/api/resources/triggers/types/EventTriggerRequest.js +4 -0
- package/dist/api/resources/triggers/types/EventTriggerResponse.d.ts +22 -0
- package/dist/api/resources/triggers/types/EventTriggerResponse.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 +4 -0
- package/dist/api/resources/triggers/types/index.js +4 -0
- package/dist/api/resources/users/client/Client.d.ts +62 -0
- package/dist/api/resources/users/client/Client.js +220 -0
- package/dist/api/resources/users/client/index.d.ts +1 -0
- package/dist/api/resources/users/client/index.js +1 -0
- package/dist/api/resources/users/index.d.ts +1 -0
- package/dist/api/resources/users/index.js +1 -0
- package/dist/serialization/resources/{action/types/Action.d.ts → actions/types/ActionBase.d.ts} +2 -5
- package/{serialization/resources/action/types/Action.js → dist/serialization/resources/actions/types/ActionBase.js} +1 -4
- package/dist/serialization/resources/{action → actions}/types/ActionParameter.d.ts +1 -0
- package/dist/serialization/resources/{action → actions}/types/ActionParameter.js +1 -0
- package/dist/serialization/resources/actions/types/ActionRequest.d.ts +14 -0
- package/dist/serialization/resources/actions/types/ActionRequest.js +11 -0
- package/dist/serialization/resources/actions/types/ActionResponse.d.ts +14 -0
- package/dist/serialization/resources/actions/types/ActionResponse.js +11 -0
- package/dist/serialization/resources/actions/types/index.d.ts +4 -0
- package/dist/serialization/resources/actions/types/index.js +4 -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/commons/types/AppUserIdentifyingPropertyType.js +5 -0
- package/dist/serialization/resources/commons/types/EntityId.d.ts +17 -0
- package/dist/serialization/resources/commons/types/EntityId.js +14 -0
- package/{serialization/resources/actionSet/types/ActionSetBase.d.ts → dist/serialization/resources/commons/types/EntityIdBase.d.ts} +3 -4
- package/dist/serialization/resources/commons/types/EntityIdBase.js +7 -0
- package/dist/serialization/resources/commons/types/EntityType.d.ts +10 -0
- package/dist/serialization/resources/commons/types/EntityType.js +14 -0
- package/dist/serialization/resources/commons/types/Feedback.d.ts +1 -1
- package/dist/serialization/resources/commons/types/Feedback.js +1 -1
- package/dist/serialization/resources/commons/types/index.d.ts +7 -0
- package/dist/serialization/resources/commons/types/index.js +7 -0
- package/dist/serialization/resources/conversation/client/addConversationMetadata.d.ts +13 -0
- package/dist/serialization/resources/conversation/client/addConversationMetadata.js +6 -0
- package/dist/serialization/resources/conversation/client/index.d.ts +1 -0
- package/dist/serialization/resources/conversation/client/index.js +1 -0
- package/dist/serialization/resources/conversation/types/AskRequest.d.ts +2 -0
- package/dist/serialization/resources/conversation/types/AskRequest.js +2 -0
- package/dist/serialization/resources/conversation/types/Capability.d.ts +10 -0
- package/dist/serialization/resources/conversation/types/Capability.js +5 -0
- package/dist/serialization/resources/conversation/types/ConversationBase.d.ts +2 -2
- package/dist/serialization/resources/conversation/types/ConversationBase.js +2 -2
- package/dist/serialization/resources/conversation/types/ConversationRequest.d.ts +2 -0
- package/dist/serialization/resources/conversation/types/ConversationRequest.js +2 -0
- package/dist/serialization/resources/conversation/types/ConversationResponse.d.ts +2 -0
- package/dist/serialization/resources/conversation/types/ConversationResponse.js +2 -0
- 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 +3 -0
- package/dist/serialization/resources/conversation/types/index.js +3 -0
- package/dist/serialization/resources/index.d.ts +4 -4
- package/dist/serialization/resources/index.js +4 -4
- package/dist/serialization/resources/knowledge/types/{KnowledgeDocument.d.ts → BaseKnowledgeDocument.d.ts} +4 -5
- package/dist/serialization/resources/knowledge/types/{KnowledgeDocument.js → 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 -1
- package/dist/serialization/resources/knowledge/types/index.js +4 -1
- package/dist/serialization/resources/triggers/types/EventTriggerBase.d.ts +14 -0
- package/dist/serialization/resources/triggers/types/EventTriggerBase.js +9 -0
- package/dist/serialization/resources/triggers/types/EventTriggerRequest.d.ts +14 -0
- package/dist/serialization/resources/triggers/types/EventTriggerRequest.js +11 -0
- package/dist/serialization/resources/triggers/types/EventTriggerResponse.d.ts +14 -0
- package/dist/serialization/resources/triggers/types/EventTriggerResponse.js +11 -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 +4 -0
- package/dist/serialization/resources/triggers/types/index.js +4 -0
- package/package.json +1 -1
- package/serialization/resources/{action/types/Action.d.ts → actions/types/ActionBase.d.ts} +2 -5
- package/{dist/serialization/resources/action/types/Action.js → serialization/resources/actions/types/ActionBase.js} +1 -4
- package/serialization/resources/{action → actions}/types/ActionParameter.d.ts +1 -0
- package/serialization/resources/{action → actions}/types/ActionParameter.js +1 -0
- package/serialization/resources/actions/types/ActionRequest.d.ts +14 -0
- package/serialization/resources/actions/types/ActionRequest.js +11 -0
- package/serialization/resources/actions/types/ActionResponse.d.ts +14 -0
- package/serialization/resources/actions/types/ActionResponse.js +11 -0
- package/serialization/resources/actions/types/index.d.ts +4 -0
- package/serialization/resources/actions/types/index.js +4 -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/EntityId.d.ts +17 -0
- package/serialization/resources/commons/types/EntityId.js +14 -0
- package/{dist/serialization/resources/actionSet/types/ActionSetBase.d.ts → serialization/resources/commons/types/EntityIdBase.d.ts} +3 -4
- package/serialization/resources/commons/types/EntityIdBase.js +7 -0
- package/serialization/resources/commons/types/EntityType.d.ts +10 -0
- package/serialization/resources/commons/types/EntityType.js +14 -0
- package/serialization/resources/commons/types/Feedback.d.ts +1 -1
- package/serialization/resources/commons/types/Feedback.js +1 -1
- package/serialization/resources/commons/types/index.d.ts +7 -0
- package/serialization/resources/commons/types/index.js +7 -0
- package/serialization/resources/conversation/client/addConversationMetadata.d.ts +13 -0
- package/serialization/resources/conversation/client/addConversationMetadata.js +6 -0
- package/serialization/resources/conversation/client/index.d.ts +1 -0
- package/serialization/resources/conversation/client/index.js +1 -0
- package/serialization/resources/conversation/types/AskRequest.d.ts +2 -0
- package/serialization/resources/conversation/types/AskRequest.js +2 -0
- package/serialization/resources/conversation/types/Capability.d.ts +10 -0
- package/serialization/resources/conversation/types/Capability.js +5 -0
- package/serialization/resources/conversation/types/ConversationBase.d.ts +2 -2
- package/serialization/resources/conversation/types/ConversationBase.js +2 -2
- package/serialization/resources/conversation/types/ConversationRequest.d.ts +2 -0
- package/serialization/resources/conversation/types/ConversationRequest.js +2 -0
- package/serialization/resources/conversation/types/ConversationResponse.d.ts +2 -0
- package/serialization/resources/conversation/types/ConversationResponse.js +2 -0
- 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 +3 -0
- package/serialization/resources/conversation/types/index.js +3 -0
- package/serialization/resources/index.d.ts +4 -4
- package/serialization/resources/index.js +4 -4
- package/serialization/resources/knowledge/types/{KnowledgeDocument.d.ts → BaseKnowledgeDocument.d.ts} +4 -5
- package/serialization/resources/knowledge/types/{KnowledgeDocument.js → 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 -1
- package/serialization/resources/knowledge/types/index.js +4 -1
- package/serialization/resources/triggers/types/EventTriggerBase.d.ts +14 -0
- package/serialization/resources/triggers/types/EventTriggerBase.js +9 -0
- package/serialization/resources/triggers/types/EventTriggerRequest.d.ts +14 -0
- package/serialization/resources/triggers/types/EventTriggerRequest.js +11 -0
- package/serialization/resources/triggers/types/EventTriggerResponse.d.ts +14 -0
- package/serialization/resources/triggers/types/EventTriggerResponse.js +11 -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 +4 -0
- package/serialization/resources/triggers/types/index.js +4 -0
- package/api/resources/action/client/Client.d.ts +0 -78
- package/api/resources/action/types/index.d.ts +0 -2
- package/api/resources/action/types/index.js +0 -2
- package/api/resources/actionSet/client/Client.d.ts +0 -71
- package/api/resources/actionSet/types/ActionSetBase.d.ts +0 -9
- package/api/resources/actionSet/types/ActionSetRequest.d.ts +0 -6
- package/api/resources/actionSet/types/ActionSetResponse.d.ts +0 -8
- package/api/resources/actionSet/types/index.d.ts +0 -3
- package/api/resources/actionSet/types/index.js +0 -3
- package/dist/api/resources/action/client/Client.d.ts +0 -78
- package/dist/api/resources/action/types/index.d.ts +0 -2
- package/dist/api/resources/action/types/index.js +0 -2
- package/dist/api/resources/actionSet/client/Client.d.ts +0 -71
- package/dist/api/resources/actionSet/types/ActionSetBase.d.ts +0 -9
- package/dist/api/resources/actionSet/types/ActionSetRequest.d.ts +0 -6
- package/dist/api/resources/actionSet/types/ActionSetResponse.d.ts +0 -8
- package/dist/api/resources/actionSet/types/index.d.ts +0 -3
- package/dist/api/resources/actionSet/types/index.js +0 -3
- package/dist/serialization/resources/action/types/index.d.ts +0 -2
- package/dist/serialization/resources/action/types/index.js +0 -2
- package/dist/serialization/resources/actionSet/types/ActionSetBase.js +0 -8
- package/dist/serialization/resources/actionSet/types/ActionSetRequest.d.ts +0 -12
- package/dist/serialization/resources/actionSet/types/ActionSetRequest.js +0 -6
- package/dist/serialization/resources/actionSet/types/ActionSetResponse.d.ts +0 -14
- package/dist/serialization/resources/actionSet/types/ActionSetResponse.js +0 -11
- package/dist/serialization/resources/actionSet/types/index.d.ts +0 -3
- package/dist/serialization/resources/actionSet/types/index.js +0 -3
- package/serialization/resources/action/types/index.d.ts +0 -2
- package/serialization/resources/action/types/index.js +0 -2
- package/serialization/resources/actionSet/types/ActionSetBase.js +0 -8
- package/serialization/resources/actionSet/types/ActionSetRequest.d.ts +0 -12
- package/serialization/resources/actionSet/types/ActionSetRequest.js +0 -6
- package/serialization/resources/actionSet/types/ActionSetResponse.d.ts +0 -14
- package/serialization/resources/actionSet/types/ActionSetResponse.js +0 -11
- package/serialization/resources/actionSet/types/index.d.ts +0 -3
- package/serialization/resources/actionSet/types/index.js +0 -3
- /package/api/resources/{action → actions}/client/index.d.ts +0 -0
- /package/api/resources/{action → actions}/client/index.js +0 -0
- /package/api/resources/{action → actions}/index.d.ts +0 -0
- /package/api/resources/{action → actions}/index.js +0 -0
- /package/api/resources/{action/types/Action.js → actions/types/ActionBase.js} +0 -0
- /package/api/resources/{action → actions}/types/ActionParameter.js +0 -0
- /package/api/resources/{actionSet/types/ActionSetBase.js → actions/types/ActionRequest.js} +0 -0
- /package/api/resources/{actionSet/types/ActionSetRequest.js → actions/types/ActionResponse.js} +0 -0
- /package/api/resources/{actionSet/types/ActionSetResponse.js → commons/types/AppUser.js} +0 -0
- /package/api/resources/{knowledge/types/KnowledgeDocument.js → commons/types/AppUserIdentification.js} +0 -0
- /package/{dist/api/resources/action/types/Action.js → api/resources/commons/types/AppUserIdentifyingProperty.js} +0 -0
- /package/{dist/api/resources/action/types/ActionParameter.js → api/resources/commons/types/EntityId.js} +0 -0
- /package/{dist/api/resources/actionSet/types/ActionSetBase.js → api/resources/commons/types/EntityIdBase.js} +0 -0
- /package/{dist/api/resources/actionSet/types/ActionSetRequest.js → api/resources/conversation/types/ResponseConfig.js} +0 -0
- /package/{dist/api/resources/actionSet/types/ActionSetResponse.js → api/resources/knowledge/types/BaseKnowledgeDocument.js} +0 -0
- /package/{dist/api/resources/knowledge/types/KnowledgeDocument.js → api/resources/knowledge/types/KnowledgeDocumentRequest.js} +0 -0
- /package/api/resources/{actionSet → triggers}/client/index.d.ts +0 -0
- /package/api/resources/{actionSet → triggers}/client/index.js +0 -0
- /package/api/resources/{actionSet → triggers}/index.d.ts +0 -0
- /package/api/resources/{actionSet → triggers}/index.js +0 -0
- /package/{dist/api/resources/action → api/resources/users}/client/index.d.ts +0 -0
- /package/{dist/api/resources/action → api/resources/users}/client/index.js +0 -0
- /package/dist/api/resources/{actionSet → actions}/client/index.d.ts +0 -0
- /package/dist/api/resources/{actionSet → actions}/client/index.js +0 -0
- /package/dist/api/resources/{action → actions}/index.d.ts +0 -0
- /package/dist/api/resources/{action → actions}/index.js +0 -0
- /package/dist/api/resources/{actionSet → triggers}/index.d.ts +0 -0
- /package/dist/api/resources/{actionSet → triggers}/index.js +0 -0
- /package/dist/serialization/resources/{action → actions}/index.d.ts +0 -0
- /package/dist/serialization/resources/{action → actions}/index.js +0 -0
- /package/dist/serialization/resources/{actionSet → triggers}/index.d.ts +0 -0
- /package/dist/serialization/resources/{actionSet → triggers}/index.js +0 -0
- /package/serialization/resources/{action → actions}/index.d.ts +0 -0
- /package/serialization/resources/{action → actions}/index.js +0 -0
- /package/serialization/resources/{actionSet → triggers}/index.d.ts +0 -0
- /package/serialization/resources/{actionSet → triggers}/index.js +0 -0
package/Client.d.ts
CHANGED
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "./environments";
|
|
5
5
|
import * as core from "./core";
|
|
6
|
-
import {
|
|
7
|
-
import { Action } from "./api/resources/action/client/Client";
|
|
6
|
+
import { Actions } from "./api/resources/actions/client/Client";
|
|
8
7
|
import { Conversation } from "./api/resources/conversation/client/Client";
|
|
9
8
|
import { Knowledge } from "./api/resources/knowledge/client/Client";
|
|
9
|
+
import { Triggers } from "./api/resources/triggers/client/Client";
|
|
10
|
+
import { Users } from "./api/resources/users/client/Client";
|
|
10
11
|
export declare namespace MavenAGIClient {
|
|
11
12
|
interface Options {
|
|
12
13
|
environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
|
|
13
14
|
appId?: core.Supplier<string | undefined>;
|
|
14
15
|
appSecret?: core.Supplier<string | undefined>;
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
xOrganizationId: core.Supplier<string>;
|
|
17
|
+
xAgentId: core.Supplier<string>;
|
|
17
18
|
fetcher?: core.FetchFunction;
|
|
18
19
|
}
|
|
19
20
|
interface RequestOptions {
|
|
@@ -25,12 +26,14 @@ export declare namespace MavenAGIClient {
|
|
|
25
26
|
export declare class MavenAGIClient {
|
|
26
27
|
protected readonly _options: MavenAGIClient.Options;
|
|
27
28
|
constructor(_options: MavenAGIClient.Options);
|
|
28
|
-
protected
|
|
29
|
-
get
|
|
30
|
-
protected _action: Action | undefined;
|
|
31
|
-
get action(): Action;
|
|
29
|
+
protected _actions: Actions | undefined;
|
|
30
|
+
get actions(): Actions;
|
|
32
31
|
protected _conversation: Conversation | undefined;
|
|
33
32
|
get conversation(): Conversation;
|
|
34
33
|
protected _knowledge: Knowledge | undefined;
|
|
35
34
|
get knowledge(): Knowledge;
|
|
35
|
+
protected _triggers: Triggers | undefined;
|
|
36
|
+
get triggers(): Triggers;
|
|
37
|
+
protected _users: Users | undefined;
|
|
38
|
+
get users(): Users;
|
|
36
39
|
}
|
package/Client.js
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import { Action } from "./api/resources/action/client/Client";
|
|
4
|
+
import { Actions } from "./api/resources/actions/client/Client";
|
|
6
5
|
import { Conversation } from "./api/resources/conversation/client/Client";
|
|
7
6
|
import { Knowledge } from "./api/resources/knowledge/client/Client";
|
|
7
|
+
import { Triggers } from "./api/resources/triggers/client/Client";
|
|
8
|
+
import { Users } from "./api/resources/users/client/Client";
|
|
8
9
|
export class MavenAGIClient {
|
|
9
10
|
constructor(_options) {
|
|
10
11
|
this._options = _options;
|
|
11
12
|
}
|
|
12
|
-
get
|
|
13
|
+
get actions() {
|
|
13
14
|
var _a;
|
|
14
|
-
return ((_a = this.
|
|
15
|
-
}
|
|
16
|
-
get action() {
|
|
17
|
-
var _a;
|
|
18
|
-
return ((_a = this._action) !== null && _a !== void 0 ? _a : (this._action = new Action(this._options)));
|
|
15
|
+
return ((_a = this._actions) !== null && _a !== void 0 ? _a : (this._actions = new Actions(this._options)));
|
|
19
16
|
}
|
|
20
17
|
get conversation() {
|
|
21
18
|
var _a;
|
|
@@ -25,4 +22,12 @@ export class MavenAGIClient {
|
|
|
25
22
|
var _a;
|
|
26
23
|
return ((_a = this._knowledge) !== null && _a !== void 0 ? _a : (this._knowledge = new Knowledge(this._options)));
|
|
27
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 users() {
|
|
30
|
+
var _a;
|
|
31
|
+
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Users(this._options)));
|
|
32
|
+
}
|
|
28
33
|
}
|
package/README.md
CHANGED
|
@@ -17,17 +17,23 @@ Instantiate and use the client with the following:
|
|
|
17
17
|
|
|
18
18
|
```typescript
|
|
19
19
|
import * as environments from "../src/environments";
|
|
20
|
-
import { MavenAGIClient } from "mavenagi";
|
|
20
|
+
import { MavenAGIClient, MavenAGI } from "mavenagi";
|
|
21
21
|
|
|
22
22
|
const client = new MavenAGIClient({
|
|
23
23
|
appId: "YOUR_APP_ID",
|
|
24
24
|
appSecret: "YOUR_APP_SECRET",
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
xOrganizationId: "YOUR_X_ORGANIZATION_ID",
|
|
26
|
+
xAgentId: "YOUR_X_AGENT_ID",
|
|
27
27
|
});
|
|
28
|
-
await client.
|
|
28
|
+
await client.conversation.initialize({
|
|
29
|
+
messages: [{}],
|
|
30
|
+
context: {},
|
|
29
31
|
id: "string",
|
|
30
|
-
|
|
32
|
+
responseConfig: {
|
|
33
|
+
capabilities: [MavenAGI.Capability.Markdown],
|
|
34
|
+
isCopilot: true,
|
|
35
|
+
responseLength: MavenAGI.ResponseLength.Short,
|
|
36
|
+
},
|
|
31
37
|
});
|
|
32
38
|
```
|
|
33
39
|
|
|
@@ -40,7 +46,7 @@ will be thrown.
|
|
|
40
46
|
import { MavenAGIError } from "mavenagi";
|
|
41
47
|
|
|
42
48
|
try {
|
|
43
|
-
await client.
|
|
49
|
+
await client.initialize(...);
|
|
44
50
|
} catch (err) {
|
|
45
51
|
if (err instanceof MavenAGIError) {
|
|
46
52
|
console.log(err.statusCode);
|
|
@@ -50,43 +56,13 @@ try {
|
|
|
50
56
|
}
|
|
51
57
|
```
|
|
52
58
|
|
|
53
|
-
## Retries
|
|
54
|
-
|
|
55
|
-
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
|
|
56
|
-
as the request is deemed retriable and the number of retry attempts has not grown larger than the configured
|
|
57
|
-
retry limit (default: 2).
|
|
58
|
-
|
|
59
|
-
A request is deemed retriable when any of the following HTTP status codes is returned:
|
|
60
|
-
|
|
61
|
-
- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
|
|
62
|
-
- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
|
|
63
|
-
- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
|
|
64
|
-
|
|
65
|
-
Use the `maxRetries` request option to configure this behavior.
|
|
66
|
-
|
|
67
|
-
```typescript
|
|
68
|
-
const response = await client.create(..., {
|
|
69
|
-
maxRetries: 0 // override maxRetries at the request level
|
|
70
|
-
});
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Timeouts
|
|
74
|
-
|
|
75
|
-
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
|
76
|
-
|
|
77
|
-
```typescript
|
|
78
|
-
const response = await client.create(..., {
|
|
79
|
-
timeoutInSeconds: 30 // override timeout to 30s
|
|
80
|
-
});
|
|
81
|
-
```
|
|
82
|
-
|
|
83
59
|
## Aborting Requests
|
|
84
60
|
|
|
85
61
|
The SDK allows users to abort requests at any point by passing in an abort signal.
|
|
86
62
|
|
|
87
63
|
```typescript
|
|
88
64
|
const controller = new AbortController();
|
|
89
|
-
const response = await client.
|
|
65
|
+
const response = await client.initialize(..., {
|
|
90
66
|
abortSignal: controller.signal
|
|
91
67
|
});
|
|
92
68
|
controller.abort(); // aborts the request
|
|
@@ -118,6 +94,38 @@ const client = new MavenAGIClient({
|
|
|
118
94
|
});
|
|
119
95
|
```
|
|
120
96
|
|
|
97
|
+
## Advanced
|
|
98
|
+
|
|
99
|
+
### Retries
|
|
100
|
+
|
|
101
|
+
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
|
|
102
|
+
as the request is deemed retriable and the number of retry attempts has not grown larger than the configured
|
|
103
|
+
retry limit (default: 2).
|
|
104
|
+
|
|
105
|
+
A request is deemed retriable when any of the following HTTP status codes is returned:
|
|
106
|
+
|
|
107
|
+
- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
|
|
108
|
+
- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
|
|
109
|
+
- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
|
|
110
|
+
|
|
111
|
+
Use the `maxRetries` request option to configure this behavior.
|
|
112
|
+
|
|
113
|
+
```typescript
|
|
114
|
+
const response = await client.initialize(..., {
|
|
115
|
+
maxRetries: 0 // override maxRetries at the request level
|
|
116
|
+
});
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Timeouts
|
|
120
|
+
|
|
121
|
+
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
const response = await client.initialize(..., {
|
|
125
|
+
timeoutInSeconds: 30 // override timeout to 30s
|
|
126
|
+
});
|
|
127
|
+
```
|
|
128
|
+
|
|
121
129
|
## Contributing
|
|
122
130
|
|
|
123
131
|
While we value open-source contributions to this SDK, this library is generated programmatically.
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
xOrganizationId: core.Supplier<string>;
|
|
13
|
+
xAgentId: 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 or create it if it doesn't exist
|
|
27
|
+
*
|
|
28
|
+
* @param {MavenAGI.ActionRequest} 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.createOrUpdateAction({
|
|
37
|
+
* entityId: {
|
|
38
|
+
* referenceId: "get-balance"
|
|
39
|
+
* },
|
|
40
|
+
* name: "Get the user's balance",
|
|
41
|
+
* description: "This action calls an API to get the user's current balance.",
|
|
42
|
+
* userInteractionRequired: false,
|
|
43
|
+
* requiredUserContextFieldNames: new Set(["my-billing-system.userId"]),
|
|
44
|
+
* userFormParameters: []
|
|
45
|
+
* })
|
|
46
|
+
*/
|
|
47
|
+
createOrUpdateAction(request: MavenAGI.ActionRequest, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* Get an action by its supplied ID
|
|
50
|
+
*
|
|
51
|
+
* @param {string} referenceId - The reference ID of the action to get. All other entity ID fields are inferred from the request.
|
|
52
|
+
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
54
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
55
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
56
|
+
* @throws {@link MavenAGI.ServerError}
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* await client.actions.getAction("get-balance")
|
|
60
|
+
*/
|
|
61
|
+
getAction(referenceId: string, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionResponse>;
|
|
62
|
+
/**
|
|
63
|
+
* Delete an action
|
|
64
|
+
*
|
|
65
|
+
* @param {string} referenceId - The reference ID of the action to unregister. All other entity ID fields are inferred from the request.
|
|
66
|
+
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
69
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
70
|
+
* @throws {@link MavenAGI.ServerError}
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* await client.actions.deleteAction("get-balance")
|
|
74
|
+
*/
|
|
75
|
+
deleteAction(referenceId: string, requestOptions?: Actions.RequestOptions): Promise<void>;
|
|
76
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
77
|
+
}
|
|
@@ -13,49 +13,59 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
13
13
|
import * as environments from "../../../../environments";
|
|
14
14
|
import * as core from "../../../../core";
|
|
15
15
|
import * as MavenAGI from "../../../index";
|
|
16
|
-
import urlJoin from "url-join";
|
|
17
16
|
import * as serializers from "../../../../serialization/index";
|
|
17
|
+
import urlJoin from "url-join";
|
|
18
18
|
import * as errors from "../../../../errors/index";
|
|
19
|
-
export class
|
|
19
|
+
export class Actions {
|
|
20
20
|
constructor(_options) {
|
|
21
21
|
this._options = _options;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Update an action or create it if it doesn't exist
|
|
25
25
|
*
|
|
26
|
-
* @param {
|
|
27
|
-
* @param {
|
|
26
|
+
* @param {MavenAGI.ActionRequest} request
|
|
27
|
+
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
28
|
*
|
|
29
29
|
* @throws {@link MavenAGI.NotFoundError}
|
|
30
30
|
* @throws {@link MavenAGI.BadRequestError}
|
|
31
31
|
* @throws {@link MavenAGI.ServerError}
|
|
32
32
|
*
|
|
33
33
|
* @example
|
|
34
|
-
* await client.
|
|
34
|
+
* await client.actions.createOrUpdateAction({
|
|
35
|
+
* entityId: {
|
|
36
|
+
* referenceId: "get-balance"
|
|
37
|
+
* },
|
|
38
|
+
* name: "Get the user's balance",
|
|
39
|
+
* description: "This action calls an API to get the user's current balance.",
|
|
40
|
+
* userInteractionRequired: false,
|
|
41
|
+
* requiredUserContextFieldNames: new Set(["my-billing-system.userId"]),
|
|
42
|
+
* userFormParameters: []
|
|
43
|
+
* })
|
|
35
44
|
*/
|
|
36
|
-
|
|
45
|
+
createOrUpdateAction(request, requestOptions) {
|
|
37
46
|
var _a, _b;
|
|
38
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
48
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
40
|
-
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production,
|
|
41
|
-
method: "
|
|
49
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/actions"),
|
|
50
|
+
method: "PUT",
|
|
42
51
|
headers: {
|
|
43
52
|
Authorization: yield this._getAuthorizationHeader(),
|
|
44
|
-
"X-Organization-Id": yield core.Supplier.get(this._options.
|
|
45
|
-
"X-Agent-Id": yield core.Supplier.get(this._options.
|
|
53
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.xOrganizationId),
|
|
54
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.xAgentId),
|
|
46
55
|
"X-Fern-Language": "JavaScript",
|
|
47
56
|
"X-Fern-SDK-Name": "mavenagi",
|
|
48
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
57
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.5",
|
|
49
58
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
50
59
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
51
60
|
},
|
|
52
61
|
contentType: "application/json",
|
|
62
|
+
body: yield serializers.ActionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
53
63
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
54
64
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
55
65
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
56
66
|
});
|
|
57
67
|
if (_response.ok) {
|
|
58
|
-
return yield serializers.
|
|
68
|
+
return yield serializers.ActionResponse.parseOrThrow(_response.body, {
|
|
59
69
|
unrecognizedObjectKeys: "passthrough",
|
|
60
70
|
allowUnrecognizedUnionMembers: true,
|
|
61
71
|
allowUnrecognizedEnumValues: true,
|
|
@@ -108,52 +118,41 @@ export class Action {
|
|
|
108
118
|
});
|
|
109
119
|
}
|
|
110
120
|
/**
|
|
111
|
-
*
|
|
121
|
+
* Get an action by its supplied ID
|
|
112
122
|
*
|
|
113
|
-
* @param {
|
|
114
|
-
* @param {
|
|
123
|
+
* @param {string} referenceId - The reference ID of the action to get. All other entity ID fields are inferred from the request.
|
|
124
|
+
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
115
125
|
*
|
|
116
126
|
* @throws {@link MavenAGI.NotFoundError}
|
|
117
127
|
* @throws {@link MavenAGI.BadRequestError}
|
|
118
128
|
* @throws {@link MavenAGI.ServerError}
|
|
119
129
|
*
|
|
120
130
|
* @example
|
|
121
|
-
* await client.
|
|
122
|
-
* id: "string",
|
|
123
|
-
* actionSetId: "string",
|
|
124
|
-
* appId: "string",
|
|
125
|
-
* name: "string",
|
|
126
|
-
* description: "string",
|
|
127
|
-
* userInteractionRequired: true,
|
|
128
|
-
* buttonName: "string",
|
|
129
|
-
* requiredUserContextFieldNames: new Set(["string"]),
|
|
130
|
-
* userFormParameters: [{}]
|
|
131
|
-
* })
|
|
131
|
+
* await client.actions.getAction("get-balance")
|
|
132
132
|
*/
|
|
133
|
-
|
|
133
|
+
getAction(referenceId, requestOptions) {
|
|
134
134
|
var _a, _b;
|
|
135
135
|
return __awaiter(this, void 0, void 0, function* () {
|
|
136
136
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
137
|
-
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production,
|
|
138
|
-
method: "
|
|
137
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/actions/${encodeURIComponent(referenceId)}`),
|
|
138
|
+
method: "GET",
|
|
139
139
|
headers: {
|
|
140
140
|
Authorization: yield this._getAuthorizationHeader(),
|
|
141
|
-
"X-Organization-Id": yield core.Supplier.get(this._options.
|
|
142
|
-
"X-Agent-Id": yield core.Supplier.get(this._options.
|
|
141
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.xOrganizationId),
|
|
142
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.xAgentId),
|
|
143
143
|
"X-Fern-Language": "JavaScript",
|
|
144
144
|
"X-Fern-SDK-Name": "mavenagi",
|
|
145
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
145
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.5",
|
|
146
146
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
147
147
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
148
148
|
},
|
|
149
149
|
contentType: "application/json",
|
|
150
|
-
body: yield serializers.Action.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
151
150
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
152
151
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
153
152
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
154
153
|
});
|
|
155
154
|
if (_response.ok) {
|
|
156
|
-
return yield serializers.
|
|
155
|
+
return yield serializers.ActionResponse.parseOrThrow(_response.body, {
|
|
157
156
|
unrecognizedObjectKeys: "passthrough",
|
|
158
157
|
allowUnrecognizedUnionMembers: true,
|
|
159
158
|
allowUnrecognizedEnumValues: true,
|
|
@@ -208,29 +207,29 @@ export class Action {
|
|
|
208
207
|
/**
|
|
209
208
|
* Delete an action
|
|
210
209
|
*
|
|
211
|
-
* @param {string}
|
|
212
|
-
* @param {
|
|
210
|
+
* @param {string} referenceId - The reference ID of the action to unregister. All other entity ID fields are inferred from the request.
|
|
211
|
+
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
213
212
|
*
|
|
214
213
|
* @throws {@link MavenAGI.NotFoundError}
|
|
215
214
|
* @throws {@link MavenAGI.BadRequestError}
|
|
216
215
|
* @throws {@link MavenAGI.ServerError}
|
|
217
216
|
*
|
|
218
217
|
* @example
|
|
219
|
-
* await client.
|
|
218
|
+
* await client.actions.deleteAction("get-balance")
|
|
220
219
|
*/
|
|
221
|
-
|
|
220
|
+
deleteAction(referenceId, requestOptions) {
|
|
222
221
|
var _a, _b;
|
|
223
222
|
return __awaiter(this, void 0, void 0, function* () {
|
|
224
223
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
225
|
-
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/actions/${encodeURIComponent(
|
|
224
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/actions/${encodeURIComponent(referenceId)}`),
|
|
226
225
|
method: "DELETE",
|
|
227
226
|
headers: {
|
|
228
227
|
Authorization: yield this._getAuthorizationHeader(),
|
|
229
|
-
"X-Organization-Id": yield core.Supplier.get(this._options.
|
|
230
|
-
"X-Agent-Id": yield core.Supplier.get(this._options.
|
|
228
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.xOrganizationId),
|
|
229
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.xAgentId),
|
|
231
230
|
"X-Fern-Language": "JavaScript",
|
|
232
231
|
"X-Fern-SDK-Name": "mavenagi",
|
|
233
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
232
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.5",
|
|
234
233
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
235
234
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
236
235
|
},
|
|
@@ -2,20 +2,14 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as MavenAGI from "../../../index";
|
|
5
|
-
export interface
|
|
6
|
-
/** Externally supplied ID to uniquely identify this action */
|
|
7
|
-
id: string;
|
|
8
|
-
/** The ID of the action set this action belongs to. Must be an existing action set ID. */
|
|
9
|
-
actionSetId: string;
|
|
10
|
-
/** The maven app id of the app that runs this action */
|
|
11
|
-
appId: string;
|
|
5
|
+
export interface ActionBase {
|
|
12
6
|
/** The name of the action */
|
|
13
7
|
name: string;
|
|
14
|
-
/** The description of the action. This helps Maven decide when to trigger the action and is not displayed directly to the user. */
|
|
8
|
+
/** The description of the action. This helps Maven decide when to trigger the action and is not displayed directly to the end user. */
|
|
15
9
|
description: string;
|
|
16
10
|
/** Whether the action requires user interaction to execute */
|
|
17
11
|
userInteractionRequired: boolean;
|
|
18
|
-
/**
|
|
12
|
+
/** When user interaction is required, the name of the button that is shown to the end user to execute the action */
|
|
19
13
|
buttonName?: string;
|
|
20
14
|
/** The names of the user context fields required by the action */
|
|
21
15
|
requiredUserContextFieldNames: Set<string>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* entityId: {
|
|
9
|
+
* referenceId: "get-balance"
|
|
10
|
+
* },
|
|
11
|
+
* name: "Get the user's balance",
|
|
12
|
+
* description: "This action calls an API to get the user's current balance.",
|
|
13
|
+
* userInteractionRequired: false,
|
|
14
|
+
* requiredUserContextFieldNames: new Set(["my-billing-system.userId"]),
|
|
15
|
+
* userFormParameters: []
|
|
16
|
+
* }
|
|
17
|
+
*/
|
|
18
|
+
export interface ActionRequest extends MavenAGI.ActionBase {
|
|
19
|
+
/** ID that uniquely identifies this action */
|
|
20
|
+
entityId: MavenAGI.EntityIdBase;
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* entityId: {
|
|
9
|
+
* referenceId: "get-balance",
|
|
10
|
+
* appId: "my-billing-system",
|
|
11
|
+
* organizationId: "acme",
|
|
12
|
+
* agentId: "support",
|
|
13
|
+
* type: MavenAGI.EntityType.Action
|
|
14
|
+
* },
|
|
15
|
+
* name: "Get the user's balance",
|
|
16
|
+
* description: "This action calls an API to get the user's current balance.",
|
|
17
|
+
* userInteractionRequired: false,
|
|
18
|
+
* requiredUserContextFieldNames: new Set(["my-billing-system.userId"]),
|
|
19
|
+
* userFormParameters: []
|
|
20
|
+
* }
|
|
21
|
+
*/
|
|
22
|
+
export interface ActionResponse extends MavenAGI.ActionBase {
|
|
23
|
+
/** ID that uniquely identifies this action */
|
|
24
|
+
entityId: MavenAGI.EntityId;
|
|
25
|
+
}
|
|
@@ -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 AppUser {
|
|
6
|
+
/** Externally supplied unique ID of the user */
|
|
7
|
+
id: string;
|
|
8
|
+
userIdentifiers?: MavenAGI.AppUserIdentification;
|
|
9
|
+
metadata?: Record<string, string>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
export interface AppUserIdentification {
|
|
6
|
+
/** At least one identifying property must be provided. etc */
|
|
7
|
+
identifiers: MavenAGI.AppUserIdentifyingProperty[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
export interface AppUserIdentifyingProperty {
|
|
6
|
+
/** The identifying property text */
|
|
7
|
+
value: string;
|
|
8
|
+
userIdentifyingPropertyType: MavenAGI.AppUserIdentifyingPropertyType;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export declare type AppUserIdentifyingPropertyType = "EMAIL" | "PHONE_NUMBER";
|
|
5
|
+
export declare const AppUserIdentifyingPropertyType: {
|
|
6
|
+
readonly Email: "EMAIL";
|
|
7
|
+
readonly PhoneNumber: "PHONE_NUMBER";
|
|
8
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
export interface EntityId extends MavenAGI.EntityIdBase {
|
|
6
|
+
/** The object type */
|
|
7
|
+
type: MavenAGI.EntityType;
|
|
8
|
+
/** The ID of the application that created this object */
|
|
9
|
+
appId: string;
|
|
10
|
+
/** The ID of the organization that this object belongs too */
|
|
11
|
+
organizationId: string;
|
|
12
|
+
/** The ID of the agent that this object belongs too */
|
|
13
|
+
agentId: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* All other entityId fields are inferred from the API request.
|
|
6
|
+
*/
|
|
7
|
+
export interface EntityIdBase {
|
|
8
|
+
/** Externally supplied ID to uniquely identify this object. Is globally unique when combined with all other entityId fields (type, appId, organizationId, agentId) */
|
|
9
|
+
referenceId: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export declare type EntityType = "CONVERSATION" | "CONVERSATION_MESSAGE" | "KNOWLEDGE_BASE" | "KNOWLEDGE_DOCUMENT" | "ACTION" | "USER" | "USER_EVENT" | "EVENT_TRIGGER";
|
|
5
|
+
export declare const EntityType: {
|
|
6
|
+
readonly Conversation: "CONVERSATION";
|
|
7
|
+
readonly ConversationMessage: "CONVERSATION_MESSAGE";
|
|
8
|
+
readonly KnowledgeBase: "KNOWLEDGE_BASE";
|
|
9
|
+
readonly KnowledgeDocument: "KNOWLEDGE_DOCUMENT";
|
|
10
|
+
readonly Action: "ACTION";
|
|
11
|
+
readonly User: "USER";
|
|
12
|
+
readonly UserEvent: "USER_EVENT";
|
|
13
|
+
readonly EventTrigger: "EVENT_TRIGGER";
|
|
14
|
+
};
|