mavenagi 1.2.10 → 1.2.12
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 +6 -0
- package/Client.js +32 -22
- package/api/resources/auth/client/Client.d.ts +33 -0
- package/api/resources/auth/client/Client.js +171 -0
- package/api/resources/auth/client/index.d.ts +1 -0
- package/api/resources/auth/client/index.js +2 -0
- package/api/resources/auth/index.d.ts +2 -0
- package/api/resources/auth/index.js +18 -0
- package/api/resources/auth/types/SessionTokenRequest.d.ts +3 -0
- package/api/resources/auth/types/SessionTokenRequest.js +3 -0
- package/api/resources/auth/types/SessionTokenResponse.d.ts +6 -0
- package/api/resources/auth/types/SessionTokenResponse.js +3 -0
- package/api/resources/auth/types/index.d.ts +2 -0
- package/api/resources/auth/types/index.js +18 -0
- package/api/resources/commons/types/ActionBase.d.ts +1 -11
- package/api/resources/commons/types/ActionParameterType.d.ts +3 -0
- package/api/resources/commons/types/ActionParameterType.js +3 -0
- package/api/resources/commons/types/ActionProperties.d.ts +13 -0
- package/api/resources/commons/types/ActionProperties.js +3 -0
- package/api/resources/commons/types/ActionUser.d.ts +46 -0
- package/api/resources/commons/types/ActionUser.js +3 -0
- package/api/resources/commons/types/EntityType.d.ts +1 -0
- package/api/resources/commons/types/EntityType.js +1 -0
- package/api/resources/commons/types/EventField.d.ts +1 -0
- package/api/resources/commons/types/EventField.js +1 -0
- package/api/resources/commons/types/MetadataPrecondition.d.ts +3 -1
- package/api/resources/commons/types/PreconditionOperator.d.ts +20 -0
- package/api/resources/commons/types/PreconditionOperator.js +20 -0
- package/api/resources/commons/types/UserEvent.d.ts +2 -0
- package/api/resources/commons/types/index.d.ts +3 -0
- package/api/resources/commons/types/index.js +3 -0
- package/api/resources/index.d.ts +4 -0
- package/api/resources/index.js +5 -1
- package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +2 -0
- package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +1 -1
- package/api/resources/segments/types/SegmentResponse.d.ts +6 -0
- package/api/resources/triggers/types/index.d.ts +0 -1
- package/api/resources/triggers/types/index.js +0 -1
- package/api/resources/websockets/client/Client.d.ts +22 -0
- package/api/resources/websockets/client/Client.js +89 -0
- package/api/resources/websockets/client/Socket.d.ts +48 -0
- package/api/resources/websockets/client/Socket.js +172 -0
- package/api/resources/websockets/client/index.d.ts +1 -0
- package/api/resources/websockets/client/index.js +2 -0
- package/api/resources/websockets/index.d.ts +2 -0
- package/api/resources/websockets/index.js +18 -0
- package/api/resources/websockets/types/AgentAudioChunk.d.ts +9 -0
- package/api/resources/websockets/types/AgentAudioChunk.js +3 -0
- package/api/resources/websockets/types/AgentTranscript.d.ts +9 -0
- package/api/resources/websockets/types/AgentTranscript.js +3 -0
- package/api/resources/websockets/types/AudioFormat.d.ts +7 -0
- package/api/resources/websockets/types/AudioFormat.js +10 -0
- package/api/resources/websockets/types/Config.d.ts +15 -0
- package/api/resources/websockets/types/Config.js +3 -0
- package/api/resources/websockets/types/ConversationEnded.d.ts +7 -0
- package/api/resources/websockets/types/ConversationEnded.js +3 -0
- package/api/resources/websockets/types/ConversationReady.d.ts +6 -0
- package/api/resources/websockets/types/ConversationReady.js +3 -0
- package/api/resources/websockets/types/Error_.d.ts +9 -0
- package/api/resources/websockets/types/Error_.js +3 -0
- package/api/resources/websockets/types/ServerEventBase.d.ts +6 -0
- package/api/resources/websockets/types/ServerEventBase.js +3 -0
- package/api/resources/websockets/types/UserAudioChunk.d.ts +8 -0
- package/api/resources/websockets/types/UserAudioChunk.js +3 -0
- package/api/resources/websockets/types/UserFinishedSpeaking.d.ts +7 -0
- package/api/resources/websockets/types/UserFinishedSpeaking.js +3 -0
- package/api/resources/websockets/types/UserStartedSpeaking.d.ts +7 -0
- package/api/resources/websockets/types/UserStartedSpeaking.js +3 -0
- package/api/resources/websockets/types/UserTranscript.d.ts +9 -0
- package/api/resources/websockets/types/UserTranscript.js +3 -0
- package/api/resources/websockets/types/index.d.ts +12 -0
- package/api/resources/websockets/types/index.js +28 -0
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/core/websocket/events.d.ts +36 -0
- package/core/websocket/events.js +27 -0
- package/core/websocket/index.d.ts +1 -0
- package/core/websocket/index.js +17 -0
- package/core/websocket/ws.d.ts +147 -0
- package/core/websocket/ws.js +444 -0
- package/dist/Client.d.ts +6 -0
- package/dist/Client.js +32 -22
- package/dist/api/resources/auth/client/Client.d.ts +33 -0
- package/dist/api/resources/auth/client/Client.js +171 -0
- package/dist/api/resources/auth/client/index.d.ts +1 -0
- package/dist/api/resources/auth/client/index.js +2 -0
- package/dist/api/resources/auth/index.d.ts +2 -0
- package/dist/api/resources/auth/index.js +18 -0
- package/dist/api/resources/auth/types/SessionTokenRequest.d.ts +3 -0
- package/dist/api/resources/auth/types/SessionTokenRequest.js +3 -0
- package/dist/api/resources/auth/types/SessionTokenResponse.d.ts +6 -0
- package/dist/api/resources/auth/types/SessionTokenResponse.js +3 -0
- package/dist/api/resources/auth/types/index.d.ts +2 -0
- package/dist/api/resources/auth/types/index.js +18 -0
- package/dist/api/resources/commons/types/ActionBase.d.ts +1 -11
- package/dist/api/resources/commons/types/ActionParameterType.d.ts +3 -0
- package/dist/api/resources/commons/types/ActionParameterType.js +3 -0
- package/dist/api/resources/commons/types/ActionProperties.d.ts +13 -0
- package/dist/api/resources/commons/types/ActionProperties.js +3 -0
- package/dist/api/resources/commons/types/ActionUser.d.ts +46 -0
- package/dist/api/resources/commons/types/ActionUser.js +3 -0
- package/dist/api/resources/commons/types/EntityType.d.ts +1 -0
- package/dist/api/resources/commons/types/EntityType.js +1 -0
- package/dist/api/resources/commons/types/EventField.d.ts +1 -0
- package/dist/api/resources/commons/types/EventField.js +1 -0
- package/dist/api/resources/commons/types/MetadataPrecondition.d.ts +3 -1
- package/dist/api/resources/commons/types/PreconditionOperator.d.ts +20 -0
- package/dist/api/resources/commons/types/PreconditionOperator.js +20 -0
- package/dist/api/resources/commons/types/UserEvent.d.ts +2 -0
- package/dist/api/resources/commons/types/index.d.ts +3 -0
- package/dist/api/resources/commons/types/index.js +3 -0
- package/dist/api/resources/index.d.ts +4 -0
- package/dist/api/resources/index.js +5 -1
- package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +2 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +1 -1
- package/dist/api/resources/segments/types/SegmentResponse.d.ts +6 -0
- package/dist/api/resources/triggers/types/index.d.ts +0 -1
- package/dist/api/resources/triggers/types/index.js +0 -1
- package/dist/api/resources/websockets/client/Client.d.ts +22 -0
- package/dist/api/resources/websockets/client/Client.js +89 -0
- package/dist/api/resources/websockets/client/Socket.d.ts +48 -0
- package/dist/api/resources/websockets/client/Socket.js +172 -0
- package/dist/api/resources/websockets/client/index.d.ts +1 -0
- package/dist/api/resources/websockets/client/index.js +2 -0
- package/dist/api/resources/websockets/index.d.ts +2 -0
- package/dist/api/resources/websockets/index.js +18 -0
- package/dist/api/resources/websockets/types/AgentAudioChunk.d.ts +9 -0
- package/dist/api/resources/websockets/types/AgentAudioChunk.js +3 -0
- package/dist/api/resources/websockets/types/AgentTranscript.d.ts +9 -0
- package/dist/api/resources/websockets/types/AgentTranscript.js +3 -0
- package/dist/api/resources/websockets/types/AudioFormat.d.ts +7 -0
- package/dist/api/resources/websockets/types/AudioFormat.js +10 -0
- package/dist/api/resources/websockets/types/Config.d.ts +15 -0
- package/dist/api/resources/websockets/types/Config.js +3 -0
- package/dist/api/resources/websockets/types/ConversationEnded.d.ts +7 -0
- package/dist/api/resources/websockets/types/ConversationEnded.js +3 -0
- package/dist/api/resources/websockets/types/ConversationReady.d.ts +6 -0
- package/dist/api/resources/websockets/types/ConversationReady.js +3 -0
- package/dist/api/resources/websockets/types/Error_.d.ts +9 -0
- package/dist/api/resources/websockets/types/Error_.js +3 -0
- package/dist/api/resources/websockets/types/ServerEventBase.d.ts +6 -0
- package/dist/api/resources/websockets/types/ServerEventBase.js +3 -0
- package/dist/api/resources/websockets/types/UserAudioChunk.d.ts +8 -0
- package/dist/api/resources/websockets/types/UserAudioChunk.js +3 -0
- package/dist/api/resources/websockets/types/UserFinishedSpeaking.d.ts +7 -0
- package/dist/api/resources/websockets/types/UserFinishedSpeaking.js +3 -0
- package/dist/api/resources/websockets/types/UserStartedSpeaking.d.ts +7 -0
- package/dist/api/resources/websockets/types/UserStartedSpeaking.js +3 -0
- package/dist/api/resources/websockets/types/UserTranscript.d.ts +9 -0
- package/dist/api/resources/websockets/types/UserTranscript.js +3 -0
- package/dist/api/resources/websockets/types/index.d.ts +12 -0
- package/dist/api/resources/websockets/types/index.js +28 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/core/websocket/events.d.ts +36 -0
- package/dist/core/websocket/events.js +27 -0
- package/dist/core/websocket/index.d.ts +1 -0
- package/dist/core/websocket/index.js +17 -0
- package/dist/core/websocket/ws.d.ts +147 -0
- package/dist/core/websocket/ws.js +444 -0
- package/dist/serialization/resources/auth/index.d.ts +1 -0
- package/dist/serialization/resources/auth/index.js +17 -0
- package/dist/serialization/resources/auth/types/SessionTokenRequest.d.ts +9 -0
- package/dist/serialization/resources/auth/types/SessionTokenRequest.js +41 -0
- package/dist/serialization/resources/auth/types/SessionTokenResponse.d.ts +10 -0
- package/dist/serialization/resources/auth/types/SessionTokenResponse.js +42 -0
- package/dist/serialization/resources/auth/types/index.d.ts +2 -0
- package/dist/serialization/resources/auth/types/index.js +18 -0
- package/dist/serialization/resources/commons/types/ActionBase.d.ts +3 -8
- package/dist/serialization/resources/commons/types/ActionBase.js +5 -9
- package/dist/serialization/resources/commons/types/ActionParameterType.d.ts +1 -1
- package/dist/serialization/resources/commons/types/ActionParameterType.js +1 -0
- package/dist/serialization/resources/commons/types/ActionProperties.d.ts +14 -0
- package/dist/serialization/resources/commons/types/ActionProperties.js +47 -0
- package/dist/serialization/resources/commons/types/ActionUser.d.ts +17 -0
- package/dist/serialization/resources/commons/types/ActionUser.js +49 -0
- package/dist/serialization/resources/commons/types/EntityType.d.ts +1 -1
- package/dist/serialization/resources/commons/types/EntityType.js +1 -0
- package/dist/serialization/resources/commons/types/EventField.d.ts +1 -1
- package/dist/serialization/resources/commons/types/EventField.js +1 -0
- package/dist/serialization/resources/commons/types/MetadataPrecondition.d.ts +1 -0
- package/dist/serialization/resources/commons/types/MetadataPrecondition.js +1 -0
- package/dist/serialization/resources/commons/types/PreconditionOperator.d.ts +1 -1
- package/dist/serialization/resources/commons/types/PreconditionOperator.js +9 -1
- package/dist/serialization/resources/commons/types/UserEvent.d.ts +1 -0
- package/dist/serialization/resources/commons/types/UserEvent.js +1 -0
- package/dist/serialization/resources/commons/types/index.d.ts +3 -0
- package/dist/serialization/resources/commons/types/index.js +3 -0
- package/dist/serialization/resources/index.d.ts +5 -0
- package/dist/serialization/resources/index.js +6 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +1 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +1 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +1 -1
- package/dist/serialization/resources/segments/types/SegmentResponse.d.ts +2 -0
- package/dist/serialization/resources/segments/types/SegmentResponse.js +2 -0
- package/dist/serialization/resources/triggers/types/EventTriggerBase.d.ts +1 -1
- package/dist/serialization/resources/triggers/types/EventTriggerBase.js +1 -1
- package/dist/serialization/resources/triggers/types/index.d.ts +0 -1
- package/dist/serialization/resources/triggers/types/index.js +0 -1
- package/dist/serialization/resources/websockets/client/index.d.ts +1 -0
- package/dist/serialization/resources/websockets/client/index.js +17 -0
- package/dist/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.d.ts +15 -0
- package/dist/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.js +56 -0
- package/dist/serialization/resources/websockets/client/socket/index.d.ts +1 -0
- package/dist/serialization/resources/websockets/client/socket/index.js +5 -0
- package/dist/serialization/resources/websockets/index.d.ts +2 -0
- package/dist/serialization/resources/websockets/index.js +18 -0
- package/dist/serialization/resources/websockets/types/AgentAudioChunk.d.ts +11 -0
- package/dist/serialization/resources/websockets/types/AgentAudioChunk.js +45 -0
- package/dist/serialization/resources/websockets/types/AgentTranscript.d.ts +11 -0
- package/dist/serialization/resources/websockets/types/AgentTranscript.js +45 -0
- package/dist/serialization/resources/websockets/types/AudioFormat.d.ts +7 -0
- package/dist/serialization/resources/websockets/types/AudioFormat.js +39 -0
- package/dist/serialization/resources/websockets/types/Config.d.ts +14 -0
- package/dist/serialization/resources/websockets/types/Config.js +46 -0
- package/dist/serialization/resources/websockets/types/ConversationEnded.d.ts +10 -0
- package/dist/serialization/resources/websockets/types/ConversationEnded.js +44 -0
- package/dist/serialization/resources/websockets/types/ConversationReady.d.ts +9 -0
- package/dist/serialization/resources/websockets/types/ConversationReady.js +41 -0
- package/dist/serialization/resources/websockets/types/Error_.d.ts +12 -0
- package/dist/serialization/resources/websockets/types/Error_.js +46 -0
- package/dist/serialization/resources/websockets/types/ServerEventBase.d.ts +9 -0
- package/dist/serialization/resources/websockets/types/ServerEventBase.js +41 -0
- package/dist/serialization/resources/websockets/types/UserAudioChunk.d.ts +10 -0
- package/dist/serialization/resources/websockets/types/UserAudioChunk.js +42 -0
- package/dist/serialization/resources/websockets/types/UserFinishedSpeaking.d.ts +10 -0
- package/dist/serialization/resources/websockets/types/UserFinishedSpeaking.js +44 -0
- package/dist/serialization/resources/websockets/types/UserStartedSpeaking.d.ts +10 -0
- package/dist/serialization/resources/websockets/types/UserStartedSpeaking.js +44 -0
- package/dist/serialization/resources/websockets/types/UserTranscript.d.ts +11 -0
- package/dist/serialization/resources/websockets/types/UserTranscript.js +45 -0
- package/dist/serialization/resources/websockets/types/index.d.ts +12 -0
- package/dist/serialization/resources/websockets/types/index.js +28 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -1
- package/reference.md +73 -5
- package/serialization/resources/auth/index.d.ts +1 -0
- package/serialization/resources/auth/index.js +17 -0
- package/serialization/resources/auth/types/SessionTokenRequest.d.ts +9 -0
- package/serialization/resources/auth/types/SessionTokenRequest.js +41 -0
- package/serialization/resources/auth/types/SessionTokenResponse.d.ts +10 -0
- package/serialization/resources/auth/types/SessionTokenResponse.js +42 -0
- package/serialization/resources/auth/types/index.d.ts +2 -0
- package/serialization/resources/auth/types/index.js +18 -0
- package/serialization/resources/commons/types/ActionBase.d.ts +3 -8
- package/serialization/resources/commons/types/ActionBase.js +5 -9
- package/serialization/resources/commons/types/ActionParameterType.d.ts +1 -1
- package/serialization/resources/commons/types/ActionParameterType.js +1 -0
- package/serialization/resources/commons/types/ActionProperties.d.ts +14 -0
- package/serialization/resources/commons/types/ActionProperties.js +47 -0
- package/serialization/resources/commons/types/ActionUser.d.ts +17 -0
- package/serialization/resources/commons/types/ActionUser.js +49 -0
- package/serialization/resources/commons/types/EntityType.d.ts +1 -1
- package/serialization/resources/commons/types/EntityType.js +1 -0
- package/serialization/resources/commons/types/EventField.d.ts +1 -1
- package/serialization/resources/commons/types/EventField.js +1 -0
- package/serialization/resources/commons/types/MetadataPrecondition.d.ts +1 -0
- package/serialization/resources/commons/types/MetadataPrecondition.js +1 -0
- package/serialization/resources/commons/types/PreconditionOperator.d.ts +1 -1
- package/serialization/resources/commons/types/PreconditionOperator.js +9 -1
- package/serialization/resources/commons/types/UserEvent.d.ts +1 -0
- package/serialization/resources/commons/types/UserEvent.js +1 -0
- package/serialization/resources/commons/types/index.d.ts +3 -0
- package/serialization/resources/commons/types/index.js +3 -0
- package/serialization/resources/index.d.ts +5 -0
- package/serialization/resources/index.js +6 -1
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +1 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +1 -1
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +1 -1
- package/serialization/resources/segments/types/SegmentResponse.d.ts +2 -0
- package/serialization/resources/segments/types/SegmentResponse.js +2 -0
- package/serialization/resources/triggers/types/EventTriggerBase.d.ts +1 -1
- package/serialization/resources/triggers/types/EventTriggerBase.js +1 -1
- package/serialization/resources/triggers/types/index.d.ts +0 -1
- package/serialization/resources/triggers/types/index.js +0 -1
- package/serialization/resources/websockets/client/index.d.ts +1 -0
- package/serialization/resources/websockets/client/index.js +17 -0
- package/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.d.ts +15 -0
- package/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.js +56 -0
- package/serialization/resources/websockets/client/socket/index.d.ts +1 -0
- package/serialization/resources/websockets/client/socket/index.js +5 -0
- package/serialization/resources/websockets/index.d.ts +2 -0
- package/serialization/resources/websockets/index.js +18 -0
- package/serialization/resources/websockets/types/AgentAudioChunk.d.ts +11 -0
- package/serialization/resources/websockets/types/AgentAudioChunk.js +45 -0
- package/serialization/resources/websockets/types/AgentTranscript.d.ts +11 -0
- package/serialization/resources/websockets/types/AgentTranscript.js +45 -0
- package/serialization/resources/websockets/types/AudioFormat.d.ts +7 -0
- package/serialization/resources/websockets/types/AudioFormat.js +39 -0
- package/serialization/resources/websockets/types/Config.d.ts +14 -0
- package/serialization/resources/websockets/types/Config.js +46 -0
- package/serialization/resources/websockets/types/ConversationEnded.d.ts +10 -0
- package/serialization/resources/websockets/types/ConversationEnded.js +44 -0
- package/serialization/resources/websockets/types/ConversationReady.d.ts +9 -0
- package/serialization/resources/websockets/types/ConversationReady.js +41 -0
- package/serialization/resources/websockets/types/Error_.d.ts +12 -0
- package/serialization/resources/websockets/types/Error_.js +46 -0
- package/serialization/resources/websockets/types/ServerEventBase.d.ts +9 -0
- package/serialization/resources/websockets/types/ServerEventBase.js +41 -0
- package/serialization/resources/websockets/types/UserAudioChunk.d.ts +10 -0
- package/serialization/resources/websockets/types/UserAudioChunk.js +42 -0
- package/serialization/resources/websockets/types/UserFinishedSpeaking.d.ts +10 -0
- package/serialization/resources/websockets/types/UserFinishedSpeaking.js +44 -0
- package/serialization/resources/websockets/types/UserStartedSpeaking.d.ts +10 -0
- package/serialization/resources/websockets/types/UserStartedSpeaking.js +44 -0
- package/serialization/resources/websockets/types/UserTranscript.d.ts +11 -0
- package/serialization/resources/websockets/types/UserTranscript.js +45 -0
- package/serialization/resources/websockets/types/index.d.ts +12 -0
- package/serialization/resources/websockets/types/index.js +28 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- /package/api/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
- /package/api/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
- /package/dist/api/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
- /package/dist/api/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
- /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
- /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
- /package/serialization/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
- /package/serialization/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.Auth = void 0;
|
|
47
|
+
const core = __importStar(require("../../../../core"));
|
|
48
|
+
const headers_1 = require("../../../../core/headers");
|
|
49
|
+
const environments = __importStar(require("../../../../environments"));
|
|
50
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
51
|
+
const serializers = __importStar(require("../../../../serialization/index"));
|
|
52
|
+
const MavenAGI = __importStar(require("../../../index"));
|
|
53
|
+
class Auth {
|
|
54
|
+
constructor(_options) {
|
|
55
|
+
this._options = _options;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Creates a short-lived session token that can be used to authenticate
|
|
59
|
+
* WebSocket connections. Session tokens are useful for client-side applications where
|
|
60
|
+
* you don’t want to expose your API key.
|
|
61
|
+
*
|
|
62
|
+
* @param {MavenAGI.SessionTokenRequest} request
|
|
63
|
+
* @param {Auth.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
66
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
67
|
+
* @throws {@link MavenAGI.ServerError}
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* await client.auth.sessionToken({
|
|
71
|
+
* ttlSeconds: 3600
|
|
72
|
+
* })
|
|
73
|
+
*/
|
|
74
|
+
sessionToken(request, requestOptions) {
|
|
75
|
+
return core.HttpResponsePromise.fromPromise(this.__sessionToken(request, requestOptions));
|
|
76
|
+
}
|
|
77
|
+
__sessionToken(request, requestOptions) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
80
|
+
const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
81
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
82
|
+
"X-Organization-Id": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationId,
|
|
83
|
+
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
84
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
85
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
86
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, "/v1/auth/session-token"),
|
|
87
|
+
method: "POST",
|
|
88
|
+
headers: _headers,
|
|
89
|
+
contentType: "application/json",
|
|
90
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
91
|
+
requestType: "json",
|
|
92
|
+
body: serializers.SessionTokenRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
93
|
+
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
94
|
+
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
95
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
96
|
+
});
|
|
97
|
+
if (_response.ok) {
|
|
98
|
+
return {
|
|
99
|
+
data: serializers.SessionTokenResponse.parseOrThrow(_response.body, {
|
|
100
|
+
unrecognizedObjectKeys: "passthrough",
|
|
101
|
+
allowUnrecognizedUnionMembers: true,
|
|
102
|
+
allowUnrecognizedEnumValues: true,
|
|
103
|
+
breadcrumbsPrefix: ["response"],
|
|
104
|
+
}),
|
|
105
|
+
rawResponse: _response.rawResponse,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
if (_response.error.reason === "status-code") {
|
|
109
|
+
switch (_response.error.statusCode) {
|
|
110
|
+
case 404:
|
|
111
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
112
|
+
unrecognizedObjectKeys: "passthrough",
|
|
113
|
+
allowUnrecognizedUnionMembers: true,
|
|
114
|
+
allowUnrecognizedEnumValues: true,
|
|
115
|
+
breadcrumbsPrefix: ["response"],
|
|
116
|
+
}), _response.rawResponse);
|
|
117
|
+
case 400:
|
|
118
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
119
|
+
unrecognizedObjectKeys: "passthrough",
|
|
120
|
+
allowUnrecognizedUnionMembers: true,
|
|
121
|
+
allowUnrecognizedEnumValues: true,
|
|
122
|
+
breadcrumbsPrefix: ["response"],
|
|
123
|
+
}), _response.rawResponse);
|
|
124
|
+
case 500:
|
|
125
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
126
|
+
unrecognizedObjectKeys: "passthrough",
|
|
127
|
+
allowUnrecognizedUnionMembers: true,
|
|
128
|
+
allowUnrecognizedEnumValues: true,
|
|
129
|
+
breadcrumbsPrefix: ["response"],
|
|
130
|
+
}), _response.rawResponse);
|
|
131
|
+
default:
|
|
132
|
+
throw new errors.MavenAGIError({
|
|
133
|
+
statusCode: _response.error.statusCode,
|
|
134
|
+
body: _response.error.body,
|
|
135
|
+
rawResponse: _response.rawResponse,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
switch (_response.error.reason) {
|
|
140
|
+
case "non-json":
|
|
141
|
+
throw new errors.MavenAGIError({
|
|
142
|
+
statusCode: _response.error.statusCode,
|
|
143
|
+
body: _response.error.rawBody,
|
|
144
|
+
rawResponse: _response.rawResponse,
|
|
145
|
+
});
|
|
146
|
+
case "timeout":
|
|
147
|
+
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/auth/session-token.");
|
|
148
|
+
case "unknown":
|
|
149
|
+
throw new errors.MavenAGIError({
|
|
150
|
+
message: _response.error.errorMessage,
|
|
151
|
+
rawResponse: _response.rawResponse,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
_getAuthorizationHeader() {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
var _a, _b;
|
|
159
|
+
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;
|
|
160
|
+
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;
|
|
161
|
+
if (appId != null && appSecret != null) {
|
|
162
|
+
return core.BasicAuth.toAuthorizationHeader({
|
|
163
|
+
username: appId,
|
|
164
|
+
password: appSecret,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
return undefined;
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
exports.Auth = Auth;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./SessionTokenRequest"), exports);
|
|
18
|
+
__exportStar(require("./SessionTokenResponse"), exports);
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../index";
|
|
2
|
-
export interface ActionBase {
|
|
2
|
+
export interface ActionBase extends MavenAGI.ActionProperties {
|
|
3
3
|
/** The name of the action. This is displayed to the end user as part of forms when user interaction is required. It is also used to help Maven decide if the action is relevant to a conversation. */
|
|
4
4
|
name: string;
|
|
5
5
|
/** The description of the action. Must be less than 1024 characters. This helps Maven decide if the action is relevant to a conversation and is not displayed directly to the end user. Descriptions are used by the LLM. */
|
|
6
6
|
description: string;
|
|
7
|
-
/** Whether the action requires user interaction to execute. If false, and all of the required action parameters are known, the LLM may call the action automatically. If true, an conversations ask call will return a BotActionFormResponse which must be submitted by an API caller. API callers must display a button with the buttonName label to confirm the user's intent. */
|
|
8
|
-
userInteractionRequired: boolean;
|
|
9
|
-
/** When user interaction is required, the name of the button that is shown to the end user to confirm execution of the action. Defaults to "Submit" if not supplied. */
|
|
10
|
-
buttonName?: string;
|
|
11
|
-
/** The preconditions that must be met for an action to be relevant to a conversation. Can be used to restrict actions to certain types of users. */
|
|
12
|
-
precondition?: MavenAGI.Precondition;
|
|
13
|
-
/** The parameters that the action uses as input. An action will only be executed when all of the required parameters are provided. During execution, actions all have access to the full Conversation and User objects. Parameter values may be inferred from the user's conversation by the LLM. */
|
|
14
|
-
userFormParameters: MavenAGI.ActionParameter[];
|
|
15
|
-
/** The ISO 639-1 code for the language used in all fields of this action. Will be derived using the description's text if not specified. */
|
|
16
|
-
language?: string;
|
|
17
7
|
}
|
|
@@ -23,6 +23,9 @@ export declare const ActionParameterType: {
|
|
|
23
23
|
/**
|
|
24
24
|
* Email parameter type; must be a valid email address */
|
|
25
25
|
readonly Email: "EMAIL";
|
|
26
|
+
/**
|
|
27
|
+
* Phone number parameter type; must be a valid phone number (E.164 or regional format) */
|
|
28
|
+
readonly Phone: "PHONE";
|
|
26
29
|
/**
|
|
27
30
|
* Schema parameter type for complex structured data that adheres to a JSON schema definition. When this type is used this should be the only action parameter (all other parameters should be omitted), the `schema` field must be set and `enumOptions` should not be used. */
|
|
28
31
|
readonly Schema: "SCHEMA";
|
|
@@ -27,6 +27,9 @@ exports.ActionParameterType = {
|
|
|
27
27
|
/**
|
|
28
28
|
* Email parameter type; must be a valid email address */
|
|
29
29
|
Email: "EMAIL",
|
|
30
|
+
/**
|
|
31
|
+
* Phone number parameter type; must be a valid phone number (E.164 or regional format) */
|
|
32
|
+
Phone: "PHONE",
|
|
30
33
|
/**
|
|
31
34
|
* Schema parameter type for complex structured data that adheres to a JSON schema definition. When this type is used this should be the only action parameter (all other parameters should be omitted), the `schema` field must be set and `enumOptions` should not be used. */
|
|
32
35
|
Schema: "SCHEMA",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
export interface ActionProperties {
|
|
3
|
+
/** Whether the action requires user interaction to execute. If false, and all of the required action parameters are known, the LLM may call the action automatically. If true, an conversations ask call will return a BotActionFormResponse which must be submitted by an API caller. API callers must display a button with the buttonName label to confirm the user's intent. */
|
|
4
|
+
userInteractionRequired: boolean;
|
|
5
|
+
/** When user interaction is required, the name of the button that is shown to the end user to confirm execution of the action. Defaults to "Submit" if not supplied. */
|
|
6
|
+
buttonName?: string;
|
|
7
|
+
/** The preconditions that must be met for an action to be relevant to a conversation. Can be used to restrict actions to certain types of users. */
|
|
8
|
+
precondition?: MavenAGI.Precondition;
|
|
9
|
+
/** The parameters that the action uses as input. An action will only be executed when all of the required parameters are provided. During execution, actions all have access to the full Conversation and User objects. Parameter values may be inferred from the user's conversation by the LLM. */
|
|
10
|
+
userFormParameters: MavenAGI.ActionParameter[];
|
|
11
|
+
/** The ISO 639-1 code for the language used in all fields of this action. Will be derived using the description's text if not specified. */
|
|
12
|
+
language?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* userId: {
|
|
6
|
+
* referenceId: "user0"
|
|
7
|
+
* },
|
|
8
|
+
* agentUserId: "aus_1234567890",
|
|
9
|
+
* userIdentifiers: [{
|
|
10
|
+
* value: "joe@joe.com",
|
|
11
|
+
* type: MavenAGI.AppUserIdentifyingPropertyType.Email
|
|
12
|
+
* }],
|
|
13
|
+
* allUserData: {
|
|
14
|
+
* "myapp": {
|
|
15
|
+
* "name": "Joe"
|
|
16
|
+
* }
|
|
17
|
+
* },
|
|
18
|
+
* defaultUserData: {
|
|
19
|
+
* "name": "Joe"
|
|
20
|
+
* },
|
|
21
|
+
* agentUserData: {
|
|
22
|
+
* "name": [{
|
|
23
|
+
* value: "Joe",
|
|
24
|
+
* visibility: MavenAGI.VisibilityType.Visible,
|
|
25
|
+
* userId: {
|
|
26
|
+
* appId: "myapp",
|
|
27
|
+
* referenceId: "user0"
|
|
28
|
+
* }
|
|
29
|
+
* }]
|
|
30
|
+
* }
|
|
31
|
+
* }
|
|
32
|
+
*/
|
|
33
|
+
export interface ActionUser {
|
|
34
|
+
/** A user ID that can be used to store user information. Will only be undefined on legacy surfaces. */
|
|
35
|
+
userId?: MavenAGI.EntityIdBase;
|
|
36
|
+
/** The ID of the agent user that the userId is associated with */
|
|
37
|
+
agentUserId?: string;
|
|
38
|
+
/** All known identifiers for the user who is executing the action. */
|
|
39
|
+
userIdentifiers: MavenAGI.AppUserIdentifier[];
|
|
40
|
+
/** Data from all apps */
|
|
41
|
+
allUserData: Record<string, Record<string, string>>;
|
|
42
|
+
/** Default data for this user */
|
|
43
|
+
defaultUserData: Record<string, string>;
|
|
44
|
+
/** All user data for this user, including reverse indexable user data */
|
|
45
|
+
agentUserData: Record<string, MavenAGI.UserDataWithReference[]>;
|
|
46
|
+
}
|
|
@@ -15,5 +15,6 @@ export declare const EntityType: {
|
|
|
15
15
|
readonly InboxItemFix: "INBOX_ITEM_FIX";
|
|
16
16
|
readonly Segment: "SEGMENT";
|
|
17
17
|
readonly Customer: "CUSTOMER";
|
|
18
|
+
readonly IntelligentField: "INTELLIGENT_FIELD";
|
|
18
19
|
};
|
|
19
20
|
export type EntityType = (typeof EntityType)[keyof typeof EntityType];
|
|
@@ -15,5 +15,6 @@ export declare const EventField: {
|
|
|
15
15
|
readonly SourceGeoCountry: "SOURCE_GEO_COUNTRY";
|
|
16
16
|
readonly UserReferenceId: "USER_REFERENCE_ID";
|
|
17
17
|
readonly AgentUserId: "AGENT_USER_ID";
|
|
18
|
+
readonly Timestamp: "TIMESTAMP";
|
|
18
19
|
};
|
|
19
20
|
export type EventField = (typeof EventField)[keyof typeof EventField];
|
|
@@ -2,6 +2,8 @@ import type * as MavenAGI from "../../../index";
|
|
|
2
2
|
export interface MetadataPrecondition extends MavenAGI.PreconditionBase {
|
|
3
3
|
/** The key that must be present in the metadata for a precondition to be met */
|
|
4
4
|
key: string;
|
|
5
|
-
/**
|
|
5
|
+
/** Single value for CONTAINS operator or exact match */
|
|
6
6
|
value?: string;
|
|
7
|
+
/** Multiple values for CONTAINS_ANY and CONTAINS_ALL operators */
|
|
8
|
+
values?: string[];
|
|
7
9
|
}
|
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
export declare const PreconditionOperator: {
|
|
2
|
+
/**
|
|
3
|
+
* Negation operator (can compose with any comparison operator) */
|
|
2
4
|
readonly Not: "NOT";
|
|
5
|
+
/**
|
|
6
|
+
* Single value - check if value is in JSON array (x ∈ array) */
|
|
7
|
+
readonly Contains: "CONTAINS";
|
|
8
|
+
/**
|
|
9
|
+
* Single value - check if value is NOT in JSON array (x ∉ array) */
|
|
10
|
+
readonly NotContains: "NOT_CONTAINS";
|
|
11
|
+
/**
|
|
12
|
+
* Multiple values - check if ANY value is in JSON array ({x,y} ∩ array ≠ ∅) */
|
|
13
|
+
readonly ContainsAny: "CONTAINS_ANY";
|
|
14
|
+
/**
|
|
15
|
+
* Multiple values - check if NO values are in JSON array ({x,y} ∩ array = ∅) */
|
|
16
|
+
readonly NotContainsAny: "NOT_CONTAINS_ANY";
|
|
17
|
+
/**
|
|
18
|
+
* Multiple values - check if ALL values are in JSON array ({x,y} ⊆ array) */
|
|
19
|
+
readonly ContainsAll: "CONTAINS_ALL";
|
|
20
|
+
/**
|
|
21
|
+
* Multiple values - check if NOT ALL values are in JSON array ({x,y} ⊄ array) */
|
|
22
|
+
readonly NotContainsAll: "NOT_CONTAINS_ALL";
|
|
3
23
|
};
|
|
4
24
|
export type PreconditionOperator = (typeof PreconditionOperator)[keyof typeof PreconditionOperator];
|
|
@@ -3,5 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.PreconditionOperator = void 0;
|
|
5
5
|
exports.PreconditionOperator = {
|
|
6
|
+
/**
|
|
7
|
+
* Negation operator (can compose with any comparison operator) */
|
|
6
8
|
Not: "NOT",
|
|
9
|
+
/**
|
|
10
|
+
* Single value - check if value is in JSON array (x ∈ array) */
|
|
11
|
+
Contains: "CONTAINS",
|
|
12
|
+
/**
|
|
13
|
+
* Single value - check if value is NOT in JSON array (x ∉ array) */
|
|
14
|
+
NotContains: "NOT_CONTAINS",
|
|
15
|
+
/**
|
|
16
|
+
* Multiple values - check if ANY value is in JSON array ({x,y} ∩ array ≠ ∅) */
|
|
17
|
+
ContainsAny: "CONTAINS_ANY",
|
|
18
|
+
/**
|
|
19
|
+
* Multiple values - check if NO values are in JSON array ({x,y} ∩ array = ∅) */
|
|
20
|
+
NotContainsAny: "NOT_CONTAINS_ANY",
|
|
21
|
+
/**
|
|
22
|
+
* Multiple values - check if ALL values are in JSON array ({x,y} ⊆ array) */
|
|
23
|
+
ContainsAll: "CONTAINS_ALL",
|
|
24
|
+
/**
|
|
25
|
+
* Multiple values - check if NOT ALL values are in JSON array ({x,y} ⊄ array) */
|
|
26
|
+
NotContainsAll: "NOT_CONTAINS_ALL",
|
|
7
27
|
};
|
|
@@ -2,6 +2,8 @@ import type * as MavenAGI from "../../../index";
|
|
|
2
2
|
export interface UserEvent extends MavenAGI.EventBaseNoId {
|
|
3
3
|
/** The unique ID of the event */
|
|
4
4
|
id: MavenAGI.EntityId;
|
|
5
|
+
/** The date and time the event was created */
|
|
6
|
+
createdAt?: Date;
|
|
5
7
|
/** The name of the event */
|
|
6
8
|
eventName: MavenAGI.UserEventName;
|
|
7
9
|
/** Information about the user who triggered the event */
|
|
@@ -5,7 +5,9 @@ export * from "./ActionFormField";
|
|
|
5
5
|
export * from "./ActionOAuthConfiguration";
|
|
6
6
|
export * from "./ActionParameter";
|
|
7
7
|
export * from "./ActionParameterType";
|
|
8
|
+
export * from "./ActionProperties";
|
|
8
9
|
export * from "./ActionResponse";
|
|
10
|
+
export * from "./ActionUser";
|
|
9
11
|
export * from "./AppPrecondition";
|
|
10
12
|
export * from "./AppUser";
|
|
11
13
|
export * from "./AppUserIdentifier";
|
|
@@ -70,6 +72,7 @@ export * from "./EventRequest";
|
|
|
70
72
|
export * from "./EventResponse";
|
|
71
73
|
export * from "./EventsSearchRequest";
|
|
72
74
|
export * from "./EventsSearchResponse";
|
|
75
|
+
export * from "./EventTriggerType";
|
|
73
76
|
export * from "./EventType";
|
|
74
77
|
export * from "./EventUserInfo";
|
|
75
78
|
export * from "./EventUserInfoBase";
|
|
@@ -21,7 +21,9 @@ __exportStar(require("./ActionFormField"), exports);
|
|
|
21
21
|
__exportStar(require("./ActionOAuthConfiguration"), exports);
|
|
22
22
|
__exportStar(require("./ActionParameter"), exports);
|
|
23
23
|
__exportStar(require("./ActionParameterType"), exports);
|
|
24
|
+
__exportStar(require("./ActionProperties"), exports);
|
|
24
25
|
__exportStar(require("./ActionResponse"), exports);
|
|
26
|
+
__exportStar(require("./ActionUser"), exports);
|
|
25
27
|
__exportStar(require("./AppPrecondition"), exports);
|
|
26
28
|
__exportStar(require("./AppUser"), exports);
|
|
27
29
|
__exportStar(require("./AppUserIdentifier"), exports);
|
|
@@ -86,6 +88,7 @@ __exportStar(require("./EventRequest"), exports);
|
|
|
86
88
|
__exportStar(require("./EventResponse"), exports);
|
|
87
89
|
__exportStar(require("./EventsSearchRequest"), exports);
|
|
88
90
|
__exportStar(require("./EventsSearchResponse"), exports);
|
|
91
|
+
__exportStar(require("./EventTriggerType"), exports);
|
|
89
92
|
__exportStar(require("./EventType"), exports);
|
|
90
93
|
__exportStar(require("./EventUserInfo"), exports);
|
|
91
94
|
__exportStar(require("./EventUserInfoBase"), exports);
|
|
@@ -11,6 +11,8 @@ export * from "./appSettings/client/requests";
|
|
|
11
11
|
export * from "./appSettings/types";
|
|
12
12
|
export * as assets from "./assets";
|
|
13
13
|
export * from "./assets/types";
|
|
14
|
+
export * as auth from "./auth";
|
|
15
|
+
export * from "./auth/types";
|
|
14
16
|
export * as commons from "./commons";
|
|
15
17
|
export * from "./commons/errors";
|
|
16
18
|
export * from "./commons/types";
|
|
@@ -41,3 +43,5 @@ export * from "./triggers/types";
|
|
|
41
43
|
export * as users from "./users";
|
|
42
44
|
export * from "./users/client/requests";
|
|
43
45
|
export * from "./users/types";
|
|
46
|
+
export * as websockets from "./websockets";
|
|
47
|
+
export * from "./websockets/types";
|
|
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.users = exports.triggers = exports.translations = exports.segments = exports.organizations = exports.knowledge = exports.inbox = exports.events = exports.customers = exports.conversation = exports.commons = exports.assets = exports.appSettings = exports.analytics = exports.agents = exports.actions = void 0;
|
|
39
|
+
exports.websockets = exports.users = exports.triggers = exports.translations = exports.segments = exports.organizations = exports.knowledge = exports.inbox = exports.events = exports.customers = exports.conversation = exports.commons = exports.auth = exports.assets = exports.appSettings = exports.analytics = exports.agents = exports.actions = void 0;
|
|
40
40
|
exports.actions = __importStar(require("./actions"));
|
|
41
41
|
__exportStar(require("./actions/client/requests"), exports);
|
|
42
42
|
__exportStar(require("./actions/types"), exports);
|
|
@@ -50,6 +50,8 @@ __exportStar(require("./appSettings/client/requests"), exports);
|
|
|
50
50
|
__exportStar(require("./appSettings/types"), exports);
|
|
51
51
|
exports.assets = __importStar(require("./assets"));
|
|
52
52
|
__exportStar(require("./assets/types"), exports);
|
|
53
|
+
exports.auth = __importStar(require("./auth"));
|
|
54
|
+
__exportStar(require("./auth/types"), exports);
|
|
53
55
|
exports.commons = __importStar(require("./commons"));
|
|
54
56
|
__exportStar(require("./commons/errors"), exports);
|
|
55
57
|
__exportStar(require("./commons/types"), exports);
|
|
@@ -80,3 +82,5 @@ __exportStar(require("./triggers/types"), exports);
|
|
|
80
82
|
exports.users = __importStar(require("./users"));
|
|
81
83
|
__exportStar(require("./users/client/requests"), exports);
|
|
82
84
|
__exportStar(require("./users/types"), exports);
|
|
85
|
+
exports.websockets = __importStar(require("./websockets"));
|
|
86
|
+
__exportStar(require("./websockets/types"), exports);
|
|
@@ -67,4 +67,6 @@ export interface KnowledgeBaseResponse extends MavenAGI.KnowledgeBaseProperties
|
|
|
67
67
|
* Inline precondition support will be removed in a future release.
|
|
68
68
|
*/
|
|
69
69
|
segmentId?: MavenAGI.EntityId;
|
|
70
|
+
/** The source URL of URL and RSS knowledge bases that was used for crawl. */
|
|
71
|
+
url?: string;
|
|
70
72
|
}
|
|
@@ -28,7 +28,7 @@ export interface KnowledgeDocumentRequest extends MavenAGI.BaseKnowledgeDocument
|
|
|
28
28
|
/** The title of the document. Will be shown as part of answers. */
|
|
29
29
|
title: string;
|
|
30
30
|
/** ID of the asset associated with this document. This asset will be transformed into text and set as the content of the document. The following types are supported: `application/pdf`, `text/plain`. Either this or content is required, but not both */
|
|
31
|
-
assetId?: MavenAGI.
|
|
31
|
+
assetId?: MavenAGI.EntityIdWithoutAgent;
|
|
32
32
|
/** The content of the document. Not shown directly to users. May be provided in HTML or markdown. HTML will be converted to markdown automatically. Images are not currently supported and will be ignored. Either this or assetId is required, but not both */
|
|
33
33
|
content?: string;
|
|
34
34
|
/** Metadata for the knowledge document. */
|
|
@@ -10,6 +10,8 @@ import type * as MavenAGI from "../../../index";
|
|
|
10
10
|
* type: MavenAGI.EntityType.Segment
|
|
11
11
|
* },
|
|
12
12
|
* name: "Admin users",
|
|
13
|
+
* createdAt: new Date("2025-01-01T00:00:00.000Z"),
|
|
14
|
+
* updatedAt: new Date("2025-01-15T12:30:00.000Z"),
|
|
13
15
|
* status: MavenAGI.SegmentStatus.Active,
|
|
14
16
|
* precondition: {
|
|
15
17
|
* preconditionType: "group",
|
|
@@ -27,6 +29,10 @@ import type * as MavenAGI from "../../../index";
|
|
|
27
29
|
export interface SegmentResponse extends MavenAGI.SegmentBase {
|
|
28
30
|
/** ID that uniquely identifies this segment */
|
|
29
31
|
segmentId: MavenAGI.EntityId;
|
|
32
|
+
/** The date and time when the segment was created. */
|
|
33
|
+
createdAt: Date;
|
|
34
|
+
/** The date and time when the segment was last updated. */
|
|
35
|
+
updatedAt: Date;
|
|
30
36
|
/**
|
|
31
37
|
* Whether or not the segment is in active use. To preserve historical data, segments can not be deleted.
|
|
32
38
|
*
|
|
@@ -3,6 +3,5 @@ export * from "./EventTriggerRequest";
|
|
|
3
3
|
export * from "./EventTriggerResponse";
|
|
4
4
|
export * from "./EventTriggersSearchRequest";
|
|
5
5
|
export * from "./EventTriggersSearchResponse";
|
|
6
|
-
export * from "./EventTriggerType";
|
|
7
6
|
export * from "./TriggerField";
|
|
8
7
|
export * from "./TriggerPartialUpdate";
|
|
@@ -19,6 +19,5 @@ __exportStar(require("./EventTriggerRequest"), exports);
|
|
|
19
19
|
__exportStar(require("./EventTriggerResponse"), exports);
|
|
20
20
|
__exportStar(require("./EventTriggersSearchRequest"), exports);
|
|
21
21
|
__exportStar(require("./EventTriggersSearchResponse"), exports);
|
|
22
|
-
__exportStar(require("./EventTriggerType"), exports);
|
|
23
22
|
__exportStar(require("./TriggerField"), exports);
|
|
24
23
|
__exportStar(require("./TriggerPartialUpdate"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BaseClientOptions } from "../../../../BaseClient";
|
|
2
|
+
import { WebsocketsSocket } from "./Socket";
|
|
3
|
+
export declare namespace Websockets {
|
|
4
|
+
interface Options extends BaseClientOptions {
|
|
5
|
+
}
|
|
6
|
+
interface ConnectArgs {
|
|
7
|
+
version?: string | undefined;
|
|
8
|
+
Authorization: string;
|
|
9
|
+
/** Arbitrary headers to send with the websocket connect request. */
|
|
10
|
+
headers?: Record<string, string>;
|
|
11
|
+
/** Enable debug mode on the websocket. Defaults to false. */
|
|
12
|
+
debug?: boolean;
|
|
13
|
+
/** Number of reconnect attempts. Defaults to 30. */
|
|
14
|
+
reconnectAttempts?: number;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export declare class Websockets {
|
|
18
|
+
protected readonly _options: Websockets.Options;
|
|
19
|
+
constructor(_options: Websockets.Options);
|
|
20
|
+
connect(args: Websockets.ConnectArgs): Promise<WebsocketsSocket>;
|
|
21
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
22
|
+
}
|