mavenagi 1.2.69 → 1.2.71
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/BaseClient.js +2 -2
- package/api/resources/agents/client/requests/AgentPatchRequest.d.ts +3 -1
- package/api/resources/agents/types/AgentPrompting.d.ts +4 -3
- package/api/resources/appSettings/client/Client.d.ts +2 -0
- package/api/resources/appSettings/client/Client.js +2 -0
- package/api/resources/assets/client/Client.d.ts +5 -0
- package/api/resources/assets/client/Client.js +5 -0
- package/api/resources/capabilities/client/Client.d.ts +6 -2
- package/api/resources/capabilities/client/Client.js +6 -2
- package/api/resources/capabilities/types/CapabilityExecutionBase.d.ts +4 -25
- package/api/resources/capabilities/types/CapabilityRunBase.d.ts +31 -0
- package/api/resources/capabilities/types/CapabilityRunBase.js +3 -0
- package/api/resources/capabilities/types/CapabilitySimulationInput.d.ts +9 -3
- package/api/resources/capabilities/types/CapabilitySimulationResult.d.ts +7 -1
- package/api/resources/capabilities/types/ConversationKickoffSimulationInput.d.ts +6 -0
- package/api/resources/capabilities/types/ConversationKickoffSimulationInput.js +3 -0
- package/api/resources/capabilities/types/TriggerCapabilityExecution.d.ts +1 -7
- package/api/resources/capabilities/types/TriggerRunDetails.d.ts +12 -0
- package/api/resources/capabilities/types/TriggerRunDetails.js +3 -0
- package/api/resources/capabilities/types/TriggerSimulationInput.d.ts +14 -0
- package/api/resources/capabilities/types/TriggerSimulationInput.js +3 -0
- package/api/resources/capabilities/types/TriggerSimulationResult.d.ts +7 -0
- package/api/resources/capabilities/types/TriggerSimulationResult.js +3 -0
- package/api/resources/capabilities/types/index.d.ts +5 -0
- package/api/resources/capabilities/types/index.js +5 -0
- package/api/resources/commons/types/AbsoluteTimeWindow.d.ts +18 -0
- package/api/resources/commons/types/AbsoluteTimeWindow.js +3 -0
- package/api/resources/commons/types/ActionEffects.d.ts +18 -0
- package/api/resources/commons/types/ActionEffects.js +3 -0
- package/api/resources/commons/types/AllUsersConversationAudience.d.ts +1 -0
- package/api/resources/commons/types/AllUsersConversationAudience.js +3 -0
- package/api/resources/commons/types/AppUser.d.ts +9 -0
- package/api/resources/commons/types/ArraySettingsSchemaEntry.d.ts +1 -2
- package/api/resources/commons/types/BotLogic.d.ts +9 -0
- package/api/resources/commons/types/BotLogicIntelligentFieldsItem.d.ts +10 -0
- package/api/resources/commons/types/ChangeAuthor.d.ts +18 -0
- package/api/resources/commons/types/ChangeAuthor.js +3 -0
- package/api/resources/commons/types/ColorSettingsSchemaEntry.d.ts +1 -2
- package/api/resources/commons/types/ConversationAnalysis.d.ts +10 -2
- package/api/resources/commons/types/ConversationAudience.d.ts +19 -0
- package/api/resources/commons/types/ConversationAudience.js +3 -0
- package/api/resources/commons/types/ConversationAudienceResponse.d.ts +16 -0
- package/api/resources/commons/types/ConversationAudienceResponse.js +3 -0
- package/api/resources/commons/types/ConversationKickoffExecutionResponse.d.ts +1 -1
- package/api/resources/commons/types/ConversationPrecondition.d.ts +4 -1
- package/api/resources/commons/types/ConversationPreconditionResponse.d.ts +4 -1
- package/api/resources/commons/types/ConversationResponse.d.ts +8 -0
- package/api/resources/commons/types/ConversationSetupFields.d.ts +21 -0
- package/api/resources/commons/types/ConversationSetupFields.js +3 -0
- package/api/resources/commons/types/CrossOrganizationLevelEntityId.d.ts +7 -0
- package/api/resources/commons/types/CrossOrganizationLevelEntityId.js +3 -0
- package/api/resources/commons/types/DayOfMonthDaySelector.d.ts +4 -0
- package/api/resources/commons/types/DayOfMonthDaySelector.js +3 -0
- package/api/resources/commons/types/DayOfWeek.d.ts +10 -0
- package/api/resources/commons/types/DayOfWeek.js +13 -0
- package/api/resources/commons/types/DaySelector.d.ts +33 -0
- package/api/resources/commons/types/DaySelector.js +3 -0
- package/api/resources/commons/types/EntityIdBase.d.ts +1 -1
- package/api/resources/commons/types/EntityType.d.ts +4 -0
- package/api/resources/commons/types/EntityType.js +4 -0
- package/api/resources/commons/types/InitializeConversationResponse.d.ts +3 -0
- package/api/resources/commons/types/LeveledEntityId.d.ts +28 -0
- package/api/resources/commons/types/LeveledEntityId.js +3 -0
- package/api/resources/commons/types/Month.d.ts +15 -0
- package/api/resources/commons/types/Month.js +18 -0
- package/api/resources/commons/types/MultilineSettingsSchemaEntry.d.ts +1 -2
- package/api/resources/commons/types/NthWeekdayDaySelector.d.ts +15 -0
- package/api/resources/commons/types/NthWeekdayDaySelector.js +3 -0
- package/api/resources/commons/types/NumberSettingsSchemaEntry.d.ts +1 -2
- package/api/resources/commons/types/Occurrence.d.ts +11 -0
- package/api/resources/commons/types/Occurrence.js +14 -0
- package/api/resources/commons/types/OrganizationLevelEntityId.d.ts +9 -0
- package/api/resources/commons/types/OrganizationLevelEntityId.js +3 -0
- package/api/resources/commons/types/RecurringTimeWindow.d.ts +21 -0
- package/api/resources/commons/types/RecurringTimeWindow.js +3 -0
- package/api/resources/commons/types/ResolutionStatus.d.ts +57 -1
- package/api/resources/commons/types/ResolutionStatus.js +57 -1
- package/api/resources/commons/types/SimulationActionBehavior.d.ts +1 -1
- package/api/resources/commons/types/SimulationContext.d.ts +1 -24
- package/api/resources/commons/types/SimulationFixedResponse.d.ts +14 -0
- package/api/resources/commons/types/SimulationFixedResponse.js +3 -0
- package/api/resources/commons/types/SimulationSetupFields.d.ts +29 -0
- package/api/resources/commons/types/SimulationSetupFields.js +3 -0
- package/api/resources/commons/types/TextSettingsSchemaEntry.d.ts +1 -2
- package/api/resources/commons/types/TimeOfDayRange.d.ts +14 -0
- package/api/resources/commons/types/TimeOfDayRange.js +3 -0
- package/api/resources/commons/types/TimePrecondition.d.ts +110 -0
- package/api/resources/commons/types/TimePrecondition.js +3 -0
- package/api/resources/commons/types/TimeWindow.d.ts +22 -0
- package/api/resources/commons/types/TimeWindow.js +3 -0
- package/api/resources/commons/types/UserData.d.ts +14 -1
- package/api/resources/commons/types/UserDataEffect.d.ts +10 -0
- package/api/resources/commons/types/UserDataEffect.js +3 -0
- package/api/resources/commons/types/UserDataPatch.d.ts +10 -0
- package/api/resources/commons/types/UserDataPatch.js +3 -0
- package/api/resources/commons/types/UsersConversationAudience.d.ts +8 -0
- package/api/resources/commons/types/UsersConversationAudience.js +3 -0
- package/api/resources/commons/types/UsersConversationAudienceResponse.d.ts +9 -0
- package/api/resources/commons/types/UsersConversationAudienceResponse.js +3 -0
- package/api/resources/commons/types/ValidatedSettingsSchemaEntryBase.d.ts +7 -0
- package/api/resources/commons/types/ValidatedSettingsSchemaEntryBase.js +3 -0
- package/api/resources/commons/types/WeekTime.d.ts +9 -0
- package/api/resources/commons/types/WeekTime.js +3 -0
- package/api/resources/commons/types/WeekdaysDaySelector.d.ts +5 -0
- package/api/resources/commons/types/WeekdaysDaySelector.js +3 -0
- package/api/resources/commons/types/WeeklyTimeWindow.d.ts +23 -0
- package/api/resources/commons/types/WeeklyTimeWindow.js +3 -0
- package/api/resources/commons/types/YearlyDatesDaySelector.d.ts +16 -0
- package/api/resources/commons/types/YearlyDatesDaySelector.js +3 -0
- package/api/resources/commons/types/index.d.ts +31 -0
- package/api/resources/commons/types/index.js +31 -0
- package/api/resources/conversation/client/Client.d.ts +71 -10
- package/api/resources/conversation/client/Client.js +71 -10
- package/api/resources/conversation/types/AskRequest.d.ts +4 -1
- package/api/resources/conversation/types/AskRequestBase.d.ts +1 -35
- package/api/resources/conversation/types/AskRequestFields.d.ts +40 -0
- package/api/resources/conversation/types/AskRequestFields.js +3 -0
- package/api/resources/conversation/types/BillableFilterField.d.ts +7 -2
- package/api/resources/conversation/types/BillableFilterField.js +7 -2
- package/api/resources/conversation/types/ConversationFilter.d.ts +11 -8
- package/api/resources/conversation/types/ConversationRequest.d.ts +26 -16
- package/api/resources/conversation/types/DeliverAskRequest.d.ts +9 -0
- package/api/resources/conversation/types/DeliverAskRequest.js +3 -0
- package/api/resources/conversation/types/DeliverContent.d.ts +19 -0
- package/api/resources/conversation/types/DeliverContent.js +3 -0
- package/api/resources/conversation/types/DeliverConversationMessageRequest.d.ts +1 -3
- package/api/resources/conversation/types/DeliverMessageBase.d.ts +11 -0
- package/api/resources/conversation/types/DeliverMessageBase.js +3 -0
- package/api/resources/conversation/types/DeliverMessageResponse.d.ts +5 -0
- package/api/resources/conversation/types/DeliverUserMessageRequest.d.ts +21 -3
- package/api/resources/conversation/types/index.d.ts +4 -0
- package/api/resources/conversation/types/index.js +4 -0
- package/api/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +4 -0
- package/api/resources/knowledge/types/KnowledgeBaseType.d.ts +2 -0
- package/api/resources/knowledge/types/KnowledgeBaseType.js +2 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionRequest.d.ts +2 -0
- package/api/resources/organizations/client/Client.d.ts +0 -4
- package/api/resources/organizations/client/Client.js +0 -4
- package/api/resources/users/client/Client.d.ts +7 -1
- package/api/resources/users/client/Client.js +7 -1
- package/api/resources/users/types/AppUserSummary.d.ts +1 -1
- package/package.json +1 -1
- package/reference.md +50 -15
- package/serialization/resources/capabilities/types/CapabilityExecutionBase.d.ts +2 -12
- package/serialization/resources/capabilities/types/CapabilityExecutionBase.js +5 -13
- package/serialization/resources/capabilities/types/CapabilityRunBase.d.ts +20 -0
- package/serialization/resources/capabilities/types/CapabilityRunBase.js +52 -0
- package/serialization/resources/capabilities/types/CapabilitySimulationInput.d.ts +9 -1
- package/serialization/resources/capabilities/types/CapabilitySimulationInput.js +4 -0
- package/serialization/resources/capabilities/types/CapabilitySimulationResult.d.ts +9 -1
- package/serialization/resources/capabilities/types/CapabilitySimulationResult.js +4 -0
- package/serialization/resources/capabilities/types/ConversationKickoffSimulationInput.d.ts +9 -0
- package/serialization/resources/capabilities/types/ConversationKickoffSimulationInput.js +40 -0
- package/serialization/resources/capabilities/types/TriggerCapabilityExecution.d.ts +2 -6
- package/serialization/resources/capabilities/types/TriggerCapabilityExecution.js +3 -6
- package/serialization/resources/capabilities/types/TriggerRunDetails.d.ts +13 -0
- package/serialization/resources/capabilities/types/TriggerRunDetails.js +45 -0
- package/serialization/resources/capabilities/types/TriggerSimulationInput.d.ts +10 -0
- package/serialization/resources/capabilities/types/TriggerSimulationInput.js +42 -0
- package/serialization/resources/capabilities/types/TriggerSimulationResult.d.ts +10 -0
- package/serialization/resources/capabilities/types/TriggerSimulationResult.js +41 -0
- package/serialization/resources/capabilities/types/index.d.ts +5 -0
- package/serialization/resources/capabilities/types/index.js +5 -0
- package/serialization/resources/commons/types/AbsoluteTimeWindow.d.ts +11 -0
- package/serialization/resources/commons/types/AbsoluteTimeWindow.js +43 -0
- package/serialization/resources/commons/types/ActionEffects.d.ts +11 -0
- package/serialization/resources/commons/types/ActionEffects.js +45 -0
- package/serialization/resources/commons/types/AllUsersConversationAudience.d.ts +7 -0
- package/serialization/resources/commons/types/AllUsersConversationAudience.js +39 -0
- package/serialization/resources/commons/types/ArraySettingsSchemaEntry.d.ts +2 -4
- package/serialization/resources/commons/types/ArraySettingsSchemaEntry.js +2 -4
- package/serialization/resources/commons/types/ChangeAuthor.d.ts +12 -0
- package/serialization/resources/commons/types/ChangeAuthor.js +44 -0
- package/serialization/resources/commons/types/ColorSettingsSchemaEntry.d.ts +2 -4
- package/serialization/resources/commons/types/ColorSettingsSchemaEntry.js +2 -4
- package/serialization/resources/commons/types/ConversationAudience.d.ts +15 -0
- package/serialization/resources/commons/types/ConversationAudience.js +49 -0
- package/serialization/resources/commons/types/ConversationAudienceResponse.d.ts +15 -0
- package/serialization/resources/commons/types/ConversationAudienceResponse.js +49 -0
- package/serialization/resources/commons/types/ConversationPrecondition.d.ts +5 -1
- package/serialization/resources/commons/types/ConversationPrecondition.js +2 -0
- package/serialization/resources/commons/types/ConversationPreconditionResponse.d.ts +5 -1
- package/serialization/resources/commons/types/ConversationPreconditionResponse.js +2 -0
- package/serialization/resources/commons/types/ConversationResponse.d.ts +2 -0
- package/serialization/resources/commons/types/ConversationResponse.js +2 -0
- package/serialization/resources/commons/types/ConversationSetupFields.d.ts +12 -0
- package/serialization/resources/commons/types/ConversationSetupFields.js +44 -0
- package/serialization/resources/commons/types/CrossOrganizationLevelEntityId.d.ts +9 -0
- package/serialization/resources/commons/types/CrossOrganizationLevelEntityId.js +40 -0
- package/serialization/resources/commons/types/DayOfMonthDaySelector.d.ts +9 -0
- package/serialization/resources/commons/types/DayOfMonthDaySelector.js +41 -0
- package/serialization/resources/commons/types/DayOfWeek.d.ts +7 -0
- package/serialization/resources/commons/types/DayOfWeek.js +47 -0
- package/serialization/resources/commons/types/DaySelector.d.ts +23 -0
- package/serialization/resources/commons/types/DaySelector.js +53 -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/LeveledEntityId.d.ts +19 -0
- package/serialization/resources/commons/types/LeveledEntityId.js +51 -0
- package/serialization/resources/commons/types/Month.d.ts +7 -0
- package/serialization/resources/commons/types/Month.js +52 -0
- package/serialization/resources/commons/types/MultilineSettingsSchemaEntry.d.ts +2 -4
- package/serialization/resources/commons/types/MultilineSettingsSchemaEntry.js +2 -4
- package/serialization/resources/commons/types/NthWeekdayDaySelector.d.ts +12 -0
- package/serialization/resources/commons/types/NthWeekdayDaySelector.js +44 -0
- package/serialization/resources/commons/types/NumberSettingsSchemaEntry.d.ts +2 -4
- package/serialization/resources/commons/types/NumberSettingsSchemaEntry.js +2 -4
- package/serialization/resources/commons/types/Occurrence.d.ts +7 -0
- package/serialization/resources/commons/types/Occurrence.js +39 -0
- package/serialization/resources/commons/types/OrganizationLevelEntityId.d.ts +10 -0
- package/serialization/resources/commons/types/OrganizationLevelEntityId.js +44 -0
- package/serialization/resources/commons/types/RecurringTimeWindow.d.ts +15 -0
- package/serialization/resources/commons/types/RecurringTimeWindow.js +47 -0
- package/serialization/resources/commons/types/SimulationActionBehavior.d.ts +2 -2
- package/serialization/resources/commons/types/SimulationActionBehavior.js +2 -2
- package/serialization/resources/commons/types/SimulationContext.d.ts +2 -6
- package/serialization/resources/commons/types/SimulationContext.js +5 -7
- package/serialization/resources/commons/types/SimulationFixedResponse.d.ts +11 -0
- package/serialization/resources/commons/types/SimulationFixedResponse.js +45 -0
- package/serialization/resources/commons/types/SimulationSetupFields.d.ts +13 -0
- package/serialization/resources/commons/types/SimulationSetupFields.js +45 -0
- package/serialization/resources/commons/types/TextSettingsSchemaEntry.d.ts +2 -4
- package/serialization/resources/commons/types/TextSettingsSchemaEntry.js +2 -4
- package/serialization/resources/commons/types/TimeOfDayRange.d.ts +10 -0
- package/serialization/resources/commons/types/TimeOfDayRange.js +42 -0
- package/serialization/resources/commons/types/TimePrecondition.d.ts +11 -0
- package/serialization/resources/commons/types/TimePrecondition.js +45 -0
- package/serialization/resources/commons/types/TimeWindow.d.ts +19 -0
- package/serialization/resources/commons/types/TimeWindow.js +51 -0
- package/serialization/resources/commons/types/UserDataEffect.d.ts +11 -0
- package/serialization/resources/commons/types/UserDataEffect.js +43 -0
- package/serialization/resources/commons/types/UserDataPatch.d.ts +11 -0
- package/serialization/resources/commons/types/UserDataPatch.js +43 -0
- package/serialization/resources/commons/types/UsersConversationAudience.d.ts +10 -0
- package/serialization/resources/commons/types/UsersConversationAudience.js +42 -0
- package/serialization/resources/commons/types/UsersConversationAudienceResponse.d.ts +10 -0
- package/serialization/resources/commons/types/UsersConversationAudienceResponse.js +42 -0
- package/serialization/resources/commons/types/ValidatedSettingsSchemaEntryBase.d.ts +12 -0
- package/serialization/resources/commons/types/ValidatedSettingsSchemaEntryBase.js +46 -0
- package/serialization/resources/commons/types/WeekTime.d.ts +11 -0
- package/serialization/resources/commons/types/WeekTime.js +43 -0
- package/serialization/resources/commons/types/WeekdaysDaySelector.d.ts +10 -0
- package/serialization/resources/commons/types/WeekdaysDaySelector.js +42 -0
- package/serialization/resources/commons/types/WeeklyTimeWindow.d.ts +12 -0
- package/serialization/resources/commons/types/WeeklyTimeWindow.js +44 -0
- package/serialization/resources/commons/types/YearlyDatesDaySelector.d.ts +10 -0
- package/serialization/resources/commons/types/YearlyDatesDaySelector.js +42 -0
- package/serialization/resources/commons/types/index.d.ts +31 -0
- package/serialization/resources/commons/types/index.js +31 -0
- package/serialization/resources/conversation/types/AskRequestBase.d.ts +2 -11
- package/serialization/resources/conversation/types/AskRequestBase.js +5 -12
- package/serialization/resources/conversation/types/AskRequestFields.d.ts +18 -0
- package/serialization/resources/conversation/types/AskRequestFields.js +50 -0
- package/serialization/resources/conversation/types/ConversationRequest.d.ts +4 -5
- package/serialization/resources/conversation/types/ConversationRequest.js +7 -6
- package/serialization/resources/conversation/types/DeliverAskRequest.d.ts +11 -0
- package/serialization/resources/conversation/types/DeliverAskRequest.js +45 -0
- package/serialization/resources/conversation/types/DeliverContent.d.ts +15 -0
- package/serialization/resources/conversation/types/DeliverContent.js +49 -0
- package/serialization/resources/conversation/types/DeliverConversationMessageRequest.d.ts +2 -3
- package/serialization/resources/conversation/types/DeliverConversationMessageRequest.js +5 -4
- package/serialization/resources/conversation/types/DeliverMessageBase.d.ts +12 -0
- package/serialization/resources/conversation/types/DeliverMessageBase.js +44 -0
- package/serialization/resources/conversation/types/DeliverMessageResponse.d.ts +2 -0
- package/serialization/resources/conversation/types/DeliverMessageResponse.js +2 -0
- package/serialization/resources/conversation/types/DeliverUserMessageRequest.d.ts +3 -3
- package/serialization/resources/conversation/types/DeliverUserMessageRequest.js +6 -4
- package/serialization/resources/conversation/types/index.d.ts +4 -0
- package/serialization/resources/conversation/types/index.js +4 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +3 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.js +3 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionRequest.d.ts +2 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionRequest.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -143,7 +143,7 @@ export declare class ConversationClient {
|
|
|
143
143
|
* <Warning>This is a destructive operation and cannot be undone. <br/><br/>
|
|
144
144
|
* What is wiped: the conversation's `subject` and `analysis.agentResponse` are cleared, and `analysis.userRequest` is replaced with `reason`.
|
|
145
145
|
* Every message's text, from the user and the agent alike, is replaced with `reason`, and its attachments, follow-up questions, backend LLM prompt and history, the data actions returned, and action arguments are cleared.
|
|
146
|
-
* Evaluation results for the conversation are deleted,
|
|
146
|
+
* Evaluation results for the conversation are deleted, the payloads recorded on its trigger and action executions are cleared, and the message recorded on each of its Conversation Kickoff executions is cleared. <br/><br/>
|
|
147
147
|
* What is kept: the conversation's metadata, each message's charts, structured answer and app-supplied metadata, the conversation's intelligent field values, its feedback and events, and the users who took part. To wipe a user's data, use `DELETE /users/{userId}` or `DELETE /agentusers/{agentUserId}`.</Warning>
|
|
148
148
|
*
|
|
149
149
|
* <Note>**Required permission:** `delete:conversations`</Note>
|
|
@@ -386,6 +386,8 @@ export declare class ConversationClient {
|
|
|
386
386
|
*
|
|
387
387
|
* Adds metadata to an existing conversation. If a metadata field already exists, it will be overwritten.
|
|
388
388
|
*
|
|
389
|
+
* When a metadata size limit is enforced for the agent, each entry may be at most 8,192 bytes by default, counting the key and value together, plus one byte, in UTF-8. A larger entry returns a 400 that names the key.
|
|
390
|
+
*
|
|
389
391
|
* A closed conversation (`open` set to false) takes no new metadata and returns a 400.
|
|
390
392
|
*
|
|
391
393
|
* @param {string} conversationId - The ID of a conversation the metadata being added belongs to
|
|
@@ -557,11 +559,26 @@ export declare class ConversationClient {
|
|
|
557
559
|
*
|
|
558
560
|
* Deliver a message to a user or conversation.
|
|
559
561
|
*
|
|
562
|
+
* Send `content` with `contentType: message` to deliver a message as written, or `contentType: ask`
|
|
563
|
+
* to have the agent take a `WELCOME` or `PROACTIVE` turn and deliver its reply. Either way the app
|
|
564
|
+
* that owns the conversation receives the message through its `handleMessage` hook.
|
|
565
|
+
*
|
|
560
566
|
* A closed conversation (`open` set to false) takes no new messages and returns a 400.
|
|
561
567
|
*
|
|
568
|
+
* To reach a user rather than a known conversation, send `type: user`. The message goes to one of that
|
|
569
|
+
* user's open conversations, chosen as described on `appIds`. The response's `conversationId` names the
|
|
570
|
+
* conversation it went to.
|
|
571
|
+
*
|
|
562
572
|
* <Warning>
|
|
563
573
|
* Currently, messages can only be successfully delivered to conversations with the `ASYNC` capability.
|
|
564
|
-
*
|
|
574
|
+
* Delivering to a user only reaches a conversation that already exists; it never starts a new one.
|
|
575
|
+
* </Warning>
|
|
576
|
+
*
|
|
577
|
+
* <Warning>
|
|
578
|
+
* Retrying a delivery is not supported. Sending the same `conversationMessageId` again saves the message, or an
|
|
579
|
+
* `ask`'s reply, only once in a conversation, but calls the app's `handleMessage` hook again each time. With
|
|
580
|
+
* `type: user`, a repeat can also go to a different conversation if the user's conversations changed in between,
|
|
581
|
+
* so the message is saved and delivered twice.
|
|
565
582
|
* </Warning>
|
|
566
583
|
*
|
|
567
584
|
* <Note>**Required permission:** `ask:agent`</Note>
|
|
@@ -579,21 +596,65 @@ export declare class ConversationClient {
|
|
|
579
596
|
*
|
|
580
597
|
* @example
|
|
581
598
|
* await client.conversation.deliverMessage({
|
|
599
|
+
* type: "conversation",
|
|
600
|
+
* conversationId: {
|
|
601
|
+
* type: "CONVERSATION",
|
|
602
|
+
* appId: "chat-app",
|
|
603
|
+
* referenceId: "conversation-0"
|
|
604
|
+
* },
|
|
605
|
+
* content: {
|
|
606
|
+
* contentType: "message",
|
|
607
|
+
* conversationMessageId: {
|
|
608
|
+
* referenceId: "message-0"
|
|
609
|
+
* },
|
|
610
|
+
* userId: {
|
|
611
|
+
* referenceId: "human-agent-0"
|
|
612
|
+
* },
|
|
613
|
+
* text: "Hi, I'm Priya. I can help with your refund.",
|
|
614
|
+
* userMessageType: "HUMAN_AGENT"
|
|
615
|
+
* }
|
|
616
|
+
* })
|
|
617
|
+
*
|
|
618
|
+
* @example
|
|
619
|
+
* await client.conversation.deliverMessage({
|
|
620
|
+
* type: "conversation",
|
|
621
|
+
* conversationId: {
|
|
622
|
+
* type: "CONVERSATION",
|
|
623
|
+
* appId: "chat-app",
|
|
624
|
+
* referenceId: "conversation-0"
|
|
625
|
+
* },
|
|
626
|
+
* content: {
|
|
627
|
+
* contentType: "ask",
|
|
628
|
+
* conversationMessageId: {
|
|
629
|
+
* referenceId: "message-1"
|
|
630
|
+
* },
|
|
631
|
+
* userId: {
|
|
632
|
+
* referenceId: "system-live-support"
|
|
633
|
+
* },
|
|
634
|
+
* type: "PROACTIVE",
|
|
635
|
+
* text: "Tell the user their refund was approved."
|
|
636
|
+
* }
|
|
637
|
+
* })
|
|
638
|
+
*
|
|
639
|
+
* @example
|
|
640
|
+
* await client.conversation.deliverMessage({
|
|
582
641
|
* type: "user",
|
|
583
642
|
* userId: {
|
|
584
|
-
* type: "
|
|
585
|
-
* appId: "
|
|
586
|
-
* referenceId: "
|
|
643
|
+
* type: "USER",
|
|
644
|
+
* appId: "shop-app",
|
|
645
|
+
* referenceId: "customer-42"
|
|
587
646
|
* },
|
|
588
|
-
*
|
|
647
|
+
* appIds: ["chat-app", "email-app"],
|
|
648
|
+
* content: {
|
|
649
|
+
* contentType: "ask",
|
|
589
650
|
* conversationMessageId: {
|
|
590
|
-
* referenceId: "
|
|
651
|
+
* referenceId: "message-2"
|
|
591
652
|
* },
|
|
592
653
|
* userId: {
|
|
593
|
-
* referenceId: "
|
|
654
|
+
* referenceId: "system-orders"
|
|
594
655
|
* },
|
|
595
|
-
*
|
|
596
|
-
*
|
|
656
|
+
* type: "PROACTIVE",
|
|
657
|
+
* text: "Tell the user their order has shipped."
|
|
597
658
|
* }
|
|
598
659
|
* })
|
|
599
660
|
*/
|
|
@@ -444,7 +444,7 @@ class ConversationClient {
|
|
|
444
444
|
* <Warning>This is a destructive operation and cannot be undone. <br/><br/>
|
|
445
445
|
* What is wiped: the conversation's `subject` and `analysis.agentResponse` are cleared, and `analysis.userRequest` is replaced with `reason`.
|
|
446
446
|
* Every message's text, from the user and the agent alike, is replaced with `reason`, and its attachments, follow-up questions, backend LLM prompt and history, the data actions returned, and action arguments are cleared.
|
|
447
|
-
* Evaluation results for the conversation are deleted,
|
|
447
|
+
* Evaluation results for the conversation are deleted, the payloads recorded on its trigger and action executions are cleared, and the message recorded on each of its Conversation Kickoff executions is cleared. <br/><br/>
|
|
448
448
|
* What is kept: the conversation's metadata, each message's charts, structured answer and app-supplied metadata, the conversation's intelligent field values, its feedback and events, and the users who took part. To wipe a user's data, use `DELETE /users/{userId}` or `DELETE /agentusers/{agentUserId}`.</Warning>
|
|
449
449
|
*
|
|
450
450
|
* <Note>**Required permission:** `delete:conversations`</Note>
|
|
@@ -1268,6 +1268,8 @@ class ConversationClient {
|
|
|
1268
1268
|
*
|
|
1269
1269
|
* Adds metadata to an existing conversation. If a metadata field already exists, it will be overwritten.
|
|
1270
1270
|
*
|
|
1271
|
+
* When a metadata size limit is enforced for the agent, each entry may be at most 8,192 bytes by default, counting the key and value together, plus one byte, in UTF-8. A larger entry returns a 400 that names the key.
|
|
1272
|
+
*
|
|
1271
1273
|
* A closed conversation (`open` set to false) takes no new metadata and returns a 400.
|
|
1272
1274
|
*
|
|
1273
1275
|
* @param {string} conversationId - The ID of a conversation the metadata being added belongs to
|
|
@@ -1921,11 +1923,26 @@ class ConversationClient {
|
|
|
1921
1923
|
*
|
|
1922
1924
|
* Deliver a message to a user or conversation.
|
|
1923
1925
|
*
|
|
1926
|
+
* Send `content` with `contentType: message` to deliver a message as written, or `contentType: ask`
|
|
1927
|
+
* to have the agent take a `WELCOME` or `PROACTIVE` turn and deliver its reply. Either way the app
|
|
1928
|
+
* that owns the conversation receives the message through its `handleMessage` hook.
|
|
1929
|
+
*
|
|
1924
1930
|
* A closed conversation (`open` set to false) takes no new messages and returns a 400.
|
|
1925
1931
|
*
|
|
1932
|
+
* To reach a user rather than a known conversation, send `type: user`. The message goes to one of that
|
|
1933
|
+
* user's open conversations, chosen as described on `appIds`. The response's `conversationId` names the
|
|
1934
|
+
* conversation it went to.
|
|
1935
|
+
*
|
|
1926
1936
|
* <Warning>
|
|
1927
1937
|
* Currently, messages can only be successfully delivered to conversations with the `ASYNC` capability.
|
|
1928
|
-
*
|
|
1938
|
+
* Delivering to a user only reaches a conversation that already exists; it never starts a new one.
|
|
1939
|
+
* </Warning>
|
|
1940
|
+
*
|
|
1941
|
+
* <Warning>
|
|
1942
|
+
* Retrying a delivery is not supported. Sending the same `conversationMessageId` again saves the message, or an
|
|
1943
|
+
* `ask`'s reply, only once in a conversation, but calls the app's `handleMessage` hook again each time. With
|
|
1944
|
+
* `type: user`, a repeat can also go to a different conversation if the user's conversations changed in between,
|
|
1945
|
+
* so the message is saved and delivered twice.
|
|
1929
1946
|
* </Warning>
|
|
1930
1947
|
*
|
|
1931
1948
|
* <Note>**Required permission:** `ask:agent`</Note>
|
|
@@ -1943,21 +1960,65 @@ class ConversationClient {
|
|
|
1943
1960
|
*
|
|
1944
1961
|
* @example
|
|
1945
1962
|
* await client.conversation.deliverMessage({
|
|
1963
|
+
* type: "conversation",
|
|
1964
|
+
* conversationId: {
|
|
1965
|
+
* type: "CONVERSATION",
|
|
1966
|
+
* appId: "chat-app",
|
|
1967
|
+
* referenceId: "conversation-0"
|
|
1968
|
+
* },
|
|
1969
|
+
* content: {
|
|
1970
|
+
* contentType: "message",
|
|
1971
|
+
* conversationMessageId: {
|
|
1972
|
+
* referenceId: "message-0"
|
|
1973
|
+
* },
|
|
1974
|
+
* userId: {
|
|
1975
|
+
* referenceId: "human-agent-0"
|
|
1976
|
+
* },
|
|
1977
|
+
* text: "Hi, I'm Priya. I can help with your refund.",
|
|
1978
|
+
* userMessageType: "HUMAN_AGENT"
|
|
1979
|
+
* }
|
|
1980
|
+
* })
|
|
1981
|
+
*
|
|
1982
|
+
* @example
|
|
1983
|
+
* await client.conversation.deliverMessage({
|
|
1984
|
+
* type: "conversation",
|
|
1985
|
+
* conversationId: {
|
|
1986
|
+
* type: "CONVERSATION",
|
|
1987
|
+
* appId: "chat-app",
|
|
1988
|
+
* referenceId: "conversation-0"
|
|
1989
|
+
* },
|
|
1990
|
+
* content: {
|
|
1991
|
+
* contentType: "ask",
|
|
1992
|
+
* conversationMessageId: {
|
|
1993
|
+
* referenceId: "message-1"
|
|
1994
|
+
* },
|
|
1995
|
+
* userId: {
|
|
1996
|
+
* referenceId: "system-live-support"
|
|
1997
|
+
* },
|
|
1998
|
+
* type: "PROACTIVE",
|
|
1999
|
+
* text: "Tell the user their refund was approved."
|
|
2000
|
+
* }
|
|
2001
|
+
* })
|
|
2002
|
+
*
|
|
2003
|
+
* @example
|
|
2004
|
+
* await client.conversation.deliverMessage({
|
|
1946
2005
|
* type: "user",
|
|
1947
2006
|
* userId: {
|
|
1948
|
-
* type: "
|
|
1949
|
-
* appId: "
|
|
1950
|
-
* referenceId: "
|
|
2007
|
+
* type: "USER",
|
|
2008
|
+
* appId: "shop-app",
|
|
2009
|
+
* referenceId: "customer-42"
|
|
1951
2010
|
* },
|
|
1952
|
-
*
|
|
2011
|
+
* appIds: ["chat-app", "email-app"],
|
|
2012
|
+
* content: {
|
|
2013
|
+
* contentType: "ask",
|
|
1953
2014
|
* conversationMessageId: {
|
|
1954
|
-
* referenceId: "
|
|
2015
|
+
* referenceId: "message-2"
|
|
1955
2016
|
* },
|
|
1956
2017
|
* userId: {
|
|
1957
|
-
* referenceId: "
|
|
2018
|
+
* referenceId: "system-orders"
|
|
1958
2019
|
* },
|
|
1959
|
-
*
|
|
1960
|
-
*
|
|
2020
|
+
* type: "PROACTIVE",
|
|
2021
|
+
* text: "Tell the user their order has shipped."
|
|
1961
2022
|
* }
|
|
1962
2023
|
* })
|
|
1963
2024
|
*/
|
|
@@ -76,6 +76,9 @@ import type * as MavenAGI from "../../../index";
|
|
|
76
76
|
* }
|
|
77
77
|
*/
|
|
78
78
|
export interface AskRequest extends MavenAGI.AskRequestBase {
|
|
79
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Externally supplied ID to uniquely identify the user that created this message. On a conversation
|
|
81
|
+
* with a `users` audience, a `USER_MESSAGE` ask from a user outside it is rejected with a 400.
|
|
82
|
+
*/
|
|
80
83
|
userId: MavenAGI.EntityIdBase;
|
|
81
84
|
}
|
|
@@ -2,23 +2,7 @@ import type * as MavenAGI from "../../../index";
|
|
|
2
2
|
/**
|
|
3
3
|
* An ask without the user who asks, for endpoints that take the user from the caller's credentials.
|
|
4
4
|
*/
|
|
5
|
-
export interface AskRequestBase {
|
|
6
|
-
/** Externally supplied ID to uniquely identify this message within the conversation. If a message with this ID already exists it will be reused and will not be updated. */
|
|
7
|
-
conversationMessageId: MavenAGI.EntityIdBase;
|
|
8
|
-
/**
|
|
9
|
-
* What prompts this assistant response. Omit (or send USER_MESSAGE) for a normal user
|
|
10
|
-
* question — this is the backwards-compatible default. Use WELCOME for an agent-authored
|
|
11
|
-
* opener, or PROACTIVE for a message the user did not prompt.
|
|
12
|
-
*/
|
|
13
|
-
type?: MavenAGI.AskType;
|
|
14
|
-
/**
|
|
15
|
-
* For USER_MESSAGE (the default) this is the user's message, in the user's own words, and
|
|
16
|
-
* is required. For WELCOME and PROACTIVE it is optional and, when provided, steers the
|
|
17
|
-
* agent's response (a directive to the agent, not the user's own words). (Changed from
|
|
18
|
-
* required to optional to support the non-user ask types — existing USER_MESSAGE callers
|
|
19
|
-
* are unaffected.)
|
|
20
|
-
*/
|
|
21
|
-
text?: string;
|
|
5
|
+
export interface AskRequestBase extends MavenAGI.AskRequestFields {
|
|
22
6
|
/**
|
|
23
7
|
* What form the answer takes. Omit it for prose, or send `jsonSchema` to additionally get a
|
|
24
8
|
* `BotObjectResponse` matching a schema you supply.
|
|
@@ -46,22 +30,4 @@ export interface AskRequestBase {
|
|
|
46
30
|
* nothing to shape into the requested schema — the round returns the manual as `text` alone.
|
|
47
31
|
*/
|
|
48
32
|
textFormat?: MavenAGI.TextFormat;
|
|
49
|
-
/**
|
|
50
|
-
* The attachments to the message. Image attachments will be sent to the LLM as additional data.
|
|
51
|
-
* Non-image attachments can be stored and downloaded from the API but will not be sent to the LLM.
|
|
52
|
-
*/
|
|
53
|
-
attachments?: MavenAGI.AttachmentRequest[];
|
|
54
|
-
/** Transient data which the Maven platform will not persist. This data will only be forwarded to actions taken by this ask request. For example, one may put in user tokens as transient data. */
|
|
55
|
-
transientData?: Record<string, string>;
|
|
56
|
-
/** IANA timezone identifier (e.g. "America/New_York", "Europe/London") to be used for time-based operations in the conversation. */
|
|
57
|
-
timezone?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Key-value metadata to persist on the user message created by this request. Unlike
|
|
60
|
-
* `transientData` (which is never persisted) this is stored and returned when the message
|
|
61
|
-
* is read back via the API or dashboard, and unlike user data it is not sent to the LLM.
|
|
62
|
-
* Applied only when the message is first created — if `conversationMessageId` already
|
|
63
|
-
* exists the message is reused and its metadata is not updated. Keys and values are strings
|
|
64
|
-
* with a maximum length of 500 characters each.
|
|
65
|
-
*/
|
|
66
|
-
appMetadata?: Record<string, string>;
|
|
67
33
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* The fields every kind of ask shares, without the user who asks or the form of the answer.
|
|
4
|
+
*/
|
|
5
|
+
export interface AskRequestFields {
|
|
6
|
+
/** Externally supplied ID to uniquely identify this message within the conversation. If a message with this ID already exists it will be reused and will not be updated. */
|
|
7
|
+
conversationMessageId: MavenAGI.EntityIdBase;
|
|
8
|
+
/**
|
|
9
|
+
* What prompts this assistant response. Omit (or send USER_MESSAGE) for a normal user
|
|
10
|
+
* question — this is the backwards-compatible default. Use WELCOME for an agent-authored
|
|
11
|
+
* opener, or PROACTIVE for a message the user did not prompt.
|
|
12
|
+
*/
|
|
13
|
+
type?: MavenAGI.AskType;
|
|
14
|
+
/**
|
|
15
|
+
* For USER_MESSAGE (the default) this is the user's message, in the user's own words, and
|
|
16
|
+
* is required. For WELCOME and PROACTIVE it is optional and, when provided, steers the
|
|
17
|
+
* agent's response (a directive to the agent, not the user's own words). (Changed from
|
|
18
|
+
* required to optional to support the non-user ask types — existing USER_MESSAGE callers
|
|
19
|
+
* are unaffected.)
|
|
20
|
+
*/
|
|
21
|
+
text?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The attachments to the message. Image attachments will be sent to the LLM as additional data.
|
|
24
|
+
* Non-image attachments can be stored and downloaded from the API but will not be sent to the LLM.
|
|
25
|
+
*/
|
|
26
|
+
attachments?: MavenAGI.AttachmentRequest[];
|
|
27
|
+
/** Transient data which the Maven platform will not persist. This data will only be forwarded to actions taken by this ask request. For example, one may put in user tokens as transient data. */
|
|
28
|
+
transientData?: Record<string, string>;
|
|
29
|
+
/** IANA timezone identifier (e.g. "America/New_York", "Europe/London") to be used for time-based operations in the conversation. */
|
|
30
|
+
timezone?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Key-value metadata to persist on the user message created by this request. Unlike
|
|
33
|
+
* `transientData` (which is never persisted) this is stored and returned when the message
|
|
34
|
+
* is read back via the API or dashboard, and unlike user data it is not sent to the LLM.
|
|
35
|
+
* Applied only when the message is first created — if `conversationMessageId` already
|
|
36
|
+
* exists the message is reused and its metadata is not updated. Keys and values are strings
|
|
37
|
+
* with a maximum length of 500 characters each.
|
|
38
|
+
*/
|
|
39
|
+
appMetadata?: Record<string, string>;
|
|
40
|
+
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Fields used to filter conversations by billing status:
|
|
3
3
|
* - ELIGIBLE_AND_BILLABLE: Billable conversations with a RESOLVED resolution status. Shown in Agent Designer as "Billable".
|
|
4
|
-
* - ELIGIBLE_AND_NOT_BILLABLE:
|
|
5
|
-
* - INELIGIBLE: Conversations excluded from billing consideration. Includes CONTENT_SAFETY_FLAGGED, PROMPT_ATTACK_FLAGGED, HANGUP, INELIGIBLE, and UNKNOWN. Shown in Agent Designer as "Not eligible".
|
|
4
|
+
* - ELIGIBLE_AND_NOT_BILLABLE: Eligible conversations that are not RESOLVED. Shown in Agent Designer as "Not billable". Includes ERROR, IN_PROGRESS, ESCALATED, INCOMPLETE, and NEGATIVE_FEEDBACK.
|
|
5
|
+
* - INELIGIBLE: Conversations excluded from billing consideration. Includes CONTENT_SAFETY_FLAGGED, PROMPT_ATTACK_FLAGGED, HANGUP, INELIGIBLE, and UNKNOWN. Shown in Agent Designer as "Not eligible". This differs from the INELIGIBLE resolution status, which covers copilot chat conversations only.
|
|
6
|
+
*
|
|
7
|
+
* Resolution-based pricing bills ELIGIBLE_AND_BILLABLE conversations. Volume-based pricing, used
|
|
8
|
+
* for Voice and Proactive, bills ELIGIBLE_AND_BILLABLE and ELIGIBLE_AND_NOT_BILLABLE conversations.
|
|
9
|
+
* Resolution rate is ELIGIBLE_AND_BILLABLE divided by both eligible values. Simulator and test
|
|
10
|
+
* suite conversations are never billed. See [Resolution status and billing](https://docs.mavenagi.com/agent-designer/pages/resolution-status).
|
|
6
11
|
*/
|
|
7
12
|
export declare const BillableFilterField: {
|
|
8
13
|
readonly EligibleAndBillable: "ELIGIBLE_AND_BILLABLE";
|
|
@@ -5,8 +5,13 @@ exports.BillableFilterField = void 0;
|
|
|
5
5
|
/**
|
|
6
6
|
* Fields used to filter conversations by billing status:
|
|
7
7
|
* - ELIGIBLE_AND_BILLABLE: Billable conversations with a RESOLVED resolution status. Shown in Agent Designer as "Billable".
|
|
8
|
-
* - ELIGIBLE_AND_NOT_BILLABLE:
|
|
9
|
-
* - INELIGIBLE: Conversations excluded from billing consideration. Includes CONTENT_SAFETY_FLAGGED, PROMPT_ATTACK_FLAGGED, HANGUP, INELIGIBLE, and UNKNOWN. Shown in Agent Designer as "Not eligible".
|
|
8
|
+
* - ELIGIBLE_AND_NOT_BILLABLE: Eligible conversations that are not RESOLVED. Shown in Agent Designer as "Not billable". Includes ERROR, IN_PROGRESS, ESCALATED, INCOMPLETE, and NEGATIVE_FEEDBACK.
|
|
9
|
+
* - INELIGIBLE: Conversations excluded from billing consideration. Includes CONTENT_SAFETY_FLAGGED, PROMPT_ATTACK_FLAGGED, HANGUP, INELIGIBLE, and UNKNOWN. Shown in Agent Designer as "Not eligible". This differs from the INELIGIBLE resolution status, which covers copilot chat conversations only.
|
|
10
|
+
*
|
|
11
|
+
* Resolution-based pricing bills ELIGIBLE_AND_BILLABLE conversations. Volume-based pricing, used
|
|
12
|
+
* for Voice and Proactive, bills ELIGIBLE_AND_BILLABLE and ELIGIBLE_AND_NOT_BILLABLE conversations.
|
|
13
|
+
* Resolution rate is ELIGIBLE_AND_BILLABLE divided by both eligible values. Simulator and test
|
|
14
|
+
* suite conversations are never billed. See [Resolution status and billing](https://docs.mavenagi.com/agent-designer/pages/resolution-status).
|
|
10
15
|
*/
|
|
11
16
|
exports.BillableFilterField = {
|
|
12
17
|
EligibleAndBillable: "ELIGIBLE_AND_BILLABLE",
|
|
@@ -79,19 +79,22 @@ export interface ConversationFilter {
|
|
|
79
79
|
/** Filter by agent user IDs associated with the conversation. Shown in Agent Designer as "Users", where the user enters identifiers such as an email. */
|
|
80
80
|
agentUserIds?: string[];
|
|
81
81
|
/**
|
|
82
|
-
* Filter by conversation resolution status
|
|
82
|
+
* Filter by conversation resolution status. Matches conversations with any of the listed
|
|
83
|
+
* statuses. See `ResolutionStatus` for how each status is set.
|
|
83
84
|
*
|
|
84
85
|
* When `resolutionStatus`, `resolvedByMaven`, and `billable` are combined in a single filter,
|
|
85
|
-
*
|
|
86
|
-
*
|
|
86
|
+
* only the first one set is applied, in this order: `resolutionStatus`, `resolvedByMaven`,
|
|
87
|
+
* then `billable`. The others are ignored.
|
|
87
88
|
*/
|
|
88
89
|
resolutionStatus?: MavenAGI.ResolutionStatus[];
|
|
89
90
|
/**
|
|
90
|
-
* Filter conversations based on whether they were resolved by Maven
|
|
91
|
+
* Filter conversations based on whether they were resolved by Maven. `true` is the same as
|
|
92
|
+
* `billable: [ELIGIBLE_AND_BILLABLE]` and `false` the same as
|
|
93
|
+
* `billable: [ELIGIBLE_AND_NOT_BILLABLE]`. Use `billable` or `resolutionStatus` instead.
|
|
91
94
|
*
|
|
92
95
|
* When `resolutionStatus`, `resolvedByMaven`, and `billable` are combined in a single filter,
|
|
93
|
-
*
|
|
94
|
-
*
|
|
96
|
+
* only the first one set is applied, in this order: `resolutionStatus`, `resolvedByMaven`,
|
|
97
|
+
* then `billable`. The others are ignored.
|
|
95
98
|
*/
|
|
96
99
|
resolvedByMaven?: boolean;
|
|
97
100
|
/** Filter by the number of messages sent by the user in the conversation */
|
|
@@ -137,8 +140,8 @@ export interface ConversationFilter {
|
|
|
137
140
|
* which means ELIGIBLE_AND_BILLABLE and ELIGIBLE_AND_NOT_BILLABLE.
|
|
138
141
|
*
|
|
139
142
|
* When `resolutionStatus`, `resolvedByMaven`, and `billable` are combined in a single filter,
|
|
140
|
-
*
|
|
141
|
-
*
|
|
143
|
+
* only the first one set is applied, in this order: `resolutionStatus`, `resolvedByMaven`,
|
|
144
|
+
* then `billable`. The others are ignored.
|
|
142
145
|
*
|
|
143
146
|
* If billable is `null` or `[]` then defaults to all eligible conversations,
|
|
144
147
|
* which means ELIGIBLE_AND_BILLABLE and ELIGIBLE_AND_NOT_BILLABLE.
|
|
@@ -11,6 +11,20 @@ import type * as MavenAGI from "../../../index";
|
|
|
11
11
|
* @example
|
|
12
12
|
* {
|
|
13
13
|
* conversationId: {
|
|
14
|
+
* referenceId: "conversation-1"
|
|
15
|
+
* },
|
|
16
|
+
* audience: {
|
|
17
|
+
* type: "users",
|
|
18
|
+
* userIds: [{
|
|
19
|
+
* referenceId: "user-0"
|
|
20
|
+
* }]
|
|
21
|
+
* },
|
|
22
|
+
* messages: []
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* {
|
|
27
|
+
* conversationId: {
|
|
14
28
|
* referenceId: "simulation-0"
|
|
15
29
|
* },
|
|
16
30
|
* simulationContext: {
|
|
@@ -44,7 +58,7 @@ import type * as MavenAGI from "../../../index";
|
|
|
44
58
|
* messages: []
|
|
45
59
|
* }
|
|
46
60
|
*/
|
|
47
|
-
export interface ConversationRequest {
|
|
61
|
+
export interface ConversationRequest extends MavenAGI.ConversationSetupFields {
|
|
48
62
|
/** An externally supplied ID to uniquely identify this conversation */
|
|
49
63
|
conversationId: MavenAGI.EntityIdBase;
|
|
50
64
|
/**
|
|
@@ -53,8 +67,6 @@ export interface ConversationRequest {
|
|
|
53
67
|
* search results unless explicitly included via the `simulationFilter` field.
|
|
54
68
|
*/
|
|
55
69
|
simulationContext?: MavenAGI.SimulationContext;
|
|
56
|
-
/** Optional configurations for responses to this conversation */
|
|
57
|
-
responseConfig?: MavenAGI.ResponseConfig;
|
|
58
70
|
/** The subject of the conversation */
|
|
59
71
|
subject?: string;
|
|
60
72
|
/** The url of the conversation */
|
|
@@ -63,19 +75,6 @@ export interface ConversationRequest {
|
|
|
63
75
|
createdAt?: Date;
|
|
64
76
|
/** The date and time the conversation was last updated */
|
|
65
77
|
updatedAt?: Date;
|
|
66
|
-
/** The tags of the conversation. Used for filtering in Agent Designer. */
|
|
67
|
-
tags?: Set<string>;
|
|
68
|
-
/**
|
|
69
|
-
* Set of 16 key-value pairs that can be attached to an object. This can be useful for storing
|
|
70
|
-
* additional information about the object in a structured format, and querying for objects
|
|
71
|
-
* via API or the dashboard.
|
|
72
|
-
*
|
|
73
|
-
* Keys are strings with a maximum length of 500 characters. Values are strings with a maximum
|
|
74
|
-
* length of 512 characters.
|
|
75
|
-
*
|
|
76
|
-
* The metadata of the conversation supplied by the app which created the conversation.
|
|
77
|
-
*/
|
|
78
|
-
metadata?: Record<string, string>;
|
|
79
78
|
/** The messages in the conversation */
|
|
80
79
|
messages: MavenAGI.ConversationMessageRequest[];
|
|
81
80
|
/**
|
|
@@ -91,4 +90,15 @@ export interface ConversationRequest {
|
|
|
91
90
|
* back to the end user, only set this to a conversation the current user is entitled to see.
|
|
92
91
|
*/
|
|
93
92
|
spawnedFromConversationId?: MavenAGI.EntityId;
|
|
93
|
+
/**
|
|
94
|
+
* Who the conversation is for. Omit this field or send `allUsers` for a conversation that any of
|
|
95
|
+
* the agent's users may take part in. Send `users` to restrict the conversation to the listed users.
|
|
96
|
+
* A `USER` message from any other user, sent through `ask`, `askStream`, `appendNewMessages` or
|
|
97
|
+
* this request's `messages` when this request creates the conversation, is rejected with a 400.
|
|
98
|
+
* Initializing an existing conversation saves none of its `messages`.
|
|
99
|
+
*
|
|
100
|
+
* The audience is set when the conversation is created and cannot be changed. Initializing an
|
|
101
|
+
* existing conversation leaves its audience unchanged.
|
|
102
|
+
*/
|
|
103
|
+
audience?: MavenAGI.ConversationAudience;
|
|
94
104
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* An agent turn to run on a conversation and deliver to the app that owns it. `type` must be `WELCOME`
|
|
4
|
+
* or `PROACTIVE`; a `USER_MESSAGE` ask, which is also the default when `type` is omitted, returns a 400.
|
|
5
|
+
*/
|
|
6
|
+
export interface DeliverAskRequest extends MavenAGI.AskRequestFields {
|
|
7
|
+
/** Externally supplied ID to uniquely identify the user that created this message */
|
|
8
|
+
userId: MavenAGI.EntityIdBase;
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
export type DeliverContent =
|
|
3
|
+
/**
|
|
4
|
+
* A message to deliver as written, such as a human agent's reply. The agent does not respond to it. */
|
|
5
|
+
MavenAGI.DeliverContent.Message
|
|
6
|
+
/**
|
|
7
|
+
* Has the agent take a `WELCOME` or `PROACTIVE` turn on the conversation, and delivers the agent's
|
|
8
|
+
* reply to the app that owns it. `text` steers what the agent says. The `text` is saved on the
|
|
9
|
+
* conversation but not delivered; only the agent's reply is. Returns a 400 if the conversation has
|
|
10
|
+
* `llmEnabled` set to false. */
|
|
11
|
+
| MavenAGI.DeliverContent.Ask;
|
|
12
|
+
export declare namespace DeliverContent {
|
|
13
|
+
interface Message extends MavenAGI.ConversationMessageRequest {
|
|
14
|
+
contentType: "message";
|
|
15
|
+
}
|
|
16
|
+
interface Ask extends MavenAGI.DeliverAskRequest {
|
|
17
|
+
contentType: "ask";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../index";
|
|
2
|
-
export interface DeliverConversationMessageRequest {
|
|
2
|
+
export interface DeliverConversationMessageRequest extends MavenAGI.DeliverMessageBase {
|
|
3
3
|
/** The ID of the conversation to deliver the message to. Message delivery will fail if the conversation does not have the `ASYNC` capability, and a closed conversation (`open` set to false) returns a 400. */
|
|
4
4
|
conversationId: MavenAGI.EntityIdWithoutAgent;
|
|
5
|
-
/** The message to deliver. */
|
|
6
|
-
message: MavenAGI.ConversationMessageRequest;
|
|
7
5
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
export interface DeliverMessageBase {
|
|
3
|
+
/**
|
|
4
|
+
* Deprecated. Use `content` with `contentType: message`, which takes the same message.
|
|
5
|
+
*
|
|
6
|
+
* A message to deliver as written. Set exactly one of `message` or `content`.
|
|
7
|
+
*/
|
|
8
|
+
message?: MavenAGI.ConversationMessageRequest;
|
|
9
|
+
/** What to deliver. Set exactly one of `message` or `content`. */
|
|
10
|
+
content?: MavenAGI.DeliverContent;
|
|
11
|
+
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../index";
|
|
2
2
|
export interface DeliverMessageResponse {
|
|
3
3
|
status: MavenAGI.DeliveryStatus;
|
|
4
|
+
/**
|
|
5
|
+
* The conversation the message was delivered to, or attempted on when `status` is `FAILED`. Absent when
|
|
6
|
+
* no conversation qualified for a delivery to a user.
|
|
7
|
+
*/
|
|
8
|
+
conversationId?: MavenAGI.EntityId;
|
|
4
9
|
}
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../index";
|
|
2
|
-
export interface DeliverUserMessageRequest {
|
|
2
|
+
export interface DeliverUserMessageRequest extends MavenAGI.DeliverMessageBase {
|
|
3
3
|
/** The ID of the user to deliver the message to. */
|
|
4
4
|
userId: MavenAGI.EntityIdWithoutAgent;
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The apps whose conversations may receive the message, in order of preference. Omit it to allow any app; an empty list is rejected with a 400.
|
|
7
|
+
*
|
|
8
|
+
* The message goes to a conversation that already exists, is open, has the `ASYNC` capability, is owned
|
|
9
|
+
* by an allowed app, and lists this user in a `users` audience (set by `initialize`'s `audience`). A
|
|
10
|
+
* conversation with an `allUsers` audience, or with none, is never chosen. Apps are tried in the order
|
|
11
|
+
* given, and within an app the most recently updated conversation wins; with `appIds` omitted, the most
|
|
12
|
+
* recently updated conversation of any app wins. An `ask` also skips conversations with `llmEnabled`
|
|
13
|
+
* set to false.
|
|
14
|
+
*
|
|
15
|
+
* The message goes to one conversation only. To reach the user in several apps, send one request per app.
|
|
16
|
+
* Whether an app is installed is not checked when choosing: the message is handed to the chosen
|
|
17
|
+
* conversation's app, and if that app fails to take it, `status` is `FAILED` and no other app is tried.
|
|
18
|
+
*
|
|
19
|
+
* When no conversation qualifies, nothing is delivered and `status` is `FAILED`.
|
|
20
|
+
*
|
|
21
|
+
* Only 20 of a user's open `ASYNC` conversations are considered. If a user has more, an arbitrary 20
|
|
22
|
+
* are, so the most recent one may be missed. Close conversations that no longer take messages.
|
|
23
|
+
*/
|
|
24
|
+
appIds?: string[];
|
|
7
25
|
}
|
|
@@ -2,6 +2,7 @@ export * from "./ActionFormAttachment";
|
|
|
2
2
|
export * from "./ActionFormRequestParamValue";
|
|
3
3
|
export * from "./AskRequest";
|
|
4
4
|
export * from "./AskRequestBase";
|
|
5
|
+
export * from "./AskRequestFields";
|
|
5
6
|
export * from "./AskStreamActionEvent";
|
|
6
7
|
export * from "./AskStreamChartEvent";
|
|
7
8
|
export * from "./AskStreamEndEvent";
|
|
@@ -22,7 +23,10 @@ export * from "./ConversationsCursorSearchRequest";
|
|
|
22
23
|
export * from "./ConversationsCursorSearchResponse";
|
|
23
24
|
export * from "./ConversationsResponse";
|
|
24
25
|
export * from "./ConversationsSearchRequest";
|
|
26
|
+
export * from "./DeliverAskRequest";
|
|
27
|
+
export * from "./DeliverContent";
|
|
25
28
|
export * from "./DeliverConversationMessageRequest";
|
|
29
|
+
export * from "./DeliverMessageBase";
|
|
26
30
|
export * from "./DeliverMessageRequest";
|
|
27
31
|
export * from "./DeliverMessageResponse";
|
|
28
32
|
export * from "./DeliverUserMessageRequest";
|