mavenagi 1.2.61 → 1.2.63
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/Client.d.ts +6 -0
- package/Client.js +40 -30
- package/api/resources/actions/client/Client.d.ts +16 -0
- package/api/resources/actions/client/Client.js +16 -0
- package/api/resources/analytics/types/ConversationBarChartRequest.d.ts +4 -0
- package/api/resources/analytics/types/ConversationBasicMetric.d.ts +4 -1
- package/api/resources/analytics/types/ConversationDateHistogramRequest.d.ts +2 -0
- package/api/resources/analytics/types/ConversationPieChartRequest.d.ts +2 -0
- package/api/resources/capabilities/client/Client.d.ts +118 -0
- package/api/resources/capabilities/client/Client.js +521 -0
- package/api/resources/capabilities/client/index.d.ts +1 -0
- package/api/resources/capabilities/client/index.js +17 -0
- package/api/resources/capabilities/client/requests/CapabilitiesSearchRequest.d.ts +38 -0
- package/api/resources/capabilities/client/requests/DeleteCapabilityByTypeRequest.d.ts +18 -0
- package/api/resources/capabilities/client/requests/GetCapabilityByTypeRequest.d.ts +22 -0
- package/api/resources/capabilities/client/requests/PatchCapabilityByTypeRequest.d.ts +24 -0
- package/api/resources/capabilities/client/requests/PatchCapabilityByTypeRequest.js +3 -0
- package/api/resources/capabilities/client/requests/index.d.ts +4 -0
- package/api/resources/capabilities/client/requests/index.js +2 -0
- package/api/resources/capabilities/exports.d.ts +2 -0
- package/api/resources/capabilities/exports.js +21 -0
- package/api/resources/capabilities/index.d.ts +2 -0
- package/api/resources/capabilities/index.js +18 -0
- package/api/resources/capabilities/types/CapabilitiesSearchResponse.d.ts +43 -0
- package/api/resources/capabilities/types/CapabilitiesSearchResponse.js +3 -0
- package/api/resources/capabilities/types/CapabilityResponse.d.ts +23 -0
- package/api/resources/capabilities/types/CapabilityResponse.js +3 -0
- package/api/resources/capabilities/types/CapabilitySortField.d.ts +7 -0
- package/api/resources/capabilities/types/CapabilitySortField.js +10 -0
- package/api/resources/capabilities/types/CapabilitySummary.d.ts +28 -0
- package/api/resources/capabilities/types/CapabilitySummary.js +3 -0
- package/api/resources/capabilities/types/index.d.ts +4 -0
- package/api/resources/capabilities/types/index.js +20 -0
- package/api/resources/charters/client/Client.js +3 -1
- package/api/resources/charters/client/requests/CharterDeleteRequest.d.ts +1 -1
- package/api/resources/charters/client/requests/CharterGetRequest.d.ts +4 -0
- package/api/resources/charters/client/requests/CharterPatchRequest.d.ts +1 -1
- package/api/resources/charters/types/CharterBase.d.ts +9 -0
- package/api/resources/charters/types/CharterRequest.d.ts +0 -8
- package/api/resources/charters/types/CharterSearchFilter.d.ts +14 -9
- package/api/resources/commons/types/ActionResponse.d.ts +11 -2
- package/api/resources/commons/types/AdditionalDataKey.d.ts +63 -0
- package/api/resources/commons/types/AdditionalDataKey.js +66 -0
- package/api/resources/commons/types/BaseConversationResponse.d.ts +7 -0
- package/api/resources/commons/types/CapabilityBase.d.ts +23 -0
- package/api/resources/commons/types/CapabilityBase.js +3 -0
- package/api/resources/{intelligentFields/types/IntelligentFieldStatus.d.ts → commons/types/CapabilityStatus.d.ts} +6 -3
- package/api/resources/{intelligentFields/types/IntelligentFieldStatus.js → commons/types/CapabilityStatus.js} +6 -3
- package/api/resources/commons/types/CapabilityType.d.ts +8 -0
- package/api/resources/commons/types/CapabilityType.js +11 -0
- package/api/resources/commons/types/EntityType.d.ts +5 -1
- package/api/resources/commons/types/EntityType.js +5 -1
- package/api/resources/commons/types/ErrorMessage.d.ts +3 -0
- package/api/resources/commons/types/ErrorReason.d.ts +34 -0
- package/api/resources/commons/types/ErrorReason.js +37 -0
- package/api/resources/commons/types/EventCondition.d.ts +35 -0
- package/api/resources/commons/types/EventCondition.js +3 -0
- package/api/resources/commons/types/EventConditionGroup.d.ts +11 -0
- package/api/resources/commons/types/EventConditionGroup.js +3 -0
- package/api/resources/commons/types/EventReferencesCondition.d.ts +13 -0
- package/api/resources/commons/types/EventReferencesCondition.js +3 -0
- package/api/resources/{conversation → commons}/types/IntelligentFieldFilter.d.ts +1 -1
- package/api/resources/commons/types/IntelligentFieldFilter.js +3 -0
- package/api/resources/commons/types/IntelligentFieldSearchCondition.js +3 -0
- package/api/resources/commons/types/SimulationContext.d.ts +12 -0
- package/api/resources/commons/types/SystemEventName.d.ts +4 -1
- package/api/resources/commons/types/SystemEventName.js +4 -1
- package/api/resources/commons/types/SystemEventNameCondition.d.ts +10 -0
- package/api/resources/commons/types/SystemEventNameCondition.js +3 -0
- package/api/resources/commons/types/UserEventNameCondition.d.ts +10 -0
- package/api/resources/commons/types/UserEventNameCondition.js +3 -0
- package/api/resources/commons/types/index.d.ts +13 -0
- package/api/resources/commons/types/index.js +13 -0
- package/api/resources/conversation/client/Client.d.ts +16 -0
- package/api/resources/conversation/client/Client.js +16 -0
- package/api/resources/conversation/types/ConversationField.d.ts +22 -1
- package/api/resources/conversation/types/ConversationField.js +22 -1
- package/api/resources/conversation/types/ConversationFilter.d.ts +18 -0
- package/api/resources/conversation/types/ConversationPatchRequest.d.ts +1 -1
- package/api/resources/conversation/types/ConversationsSearchRequest.d.ts +2 -2
- package/api/resources/conversation/types/index.d.ts +0 -3
- package/api/resources/conversation/types/index.js +0 -3
- package/api/resources/conversationKickoffs/client/Client.d.ts +45 -0
- package/api/resources/conversationKickoffs/client/Client.js +175 -0
- package/api/resources/conversationKickoffs/client/index.d.ts +1 -0
- package/api/resources/conversationKickoffs/client/index.js +17 -0
- package/api/resources/conversationKickoffs/client/requests/CreateConversationKickoffRequest.d.ts +22 -0
- package/api/resources/conversationKickoffs/client/requests/CreateConversationKickoffRequest.js +3 -0
- package/api/resources/conversationKickoffs/client/requests/index.d.ts +1 -0
- package/api/resources/conversationKickoffs/client/requests/index.js +2 -0
- package/api/resources/conversationKickoffs/exports.d.ts +2 -0
- package/api/resources/conversationKickoffs/exports.js +21 -0
- package/api/resources/conversationKickoffs/index.d.ts +2 -0
- package/api/resources/conversationKickoffs/index.js +18 -0
- package/api/resources/conversationKickoffs/types/ConversationKickoff.d.ts +27 -0
- package/api/resources/conversationKickoffs/types/ConversationKickoff.js +3 -0
- package/api/resources/conversationKickoffs/types/index.d.ts +1 -0
- package/api/resources/conversationKickoffs/types/index.js +17 -0
- package/api/resources/events/client/Client.d.ts +1 -1
- package/api/resources/events/client/Client.js +1 -1
- package/api/resources/inbox/types/InboxFilter.d.ts +11 -0
- package/api/resources/index.d.ts +6 -0
- package/api/resources/index.js +7 -1
- package/api/resources/intelligentFields/client/Client.d.ts +23 -3
- package/api/resources/intelligentFields/client/Client.js +23 -3
- package/api/resources/intelligentFields/client/requests/IntelligentFieldDeleteRequest.d.ts +1 -1
- package/api/resources/intelligentFields/client/requests/IntelligentFieldGetRequest.d.ts +1 -1
- package/api/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +4 -4
- package/api/resources/intelligentFields/types/EnumOption.d.ts +5 -0
- package/api/resources/intelligentFields/types/IntelligentFieldBase.d.ts +2 -2
- package/api/resources/intelligentFields/types/IntelligentFieldCore.d.ts +0 -4
- package/api/resources/intelligentFields/types/IntelligentFieldDetailResponse.d.ts +1 -1
- package/api/resources/intelligentFields/types/IntelligentFieldRequest.d.ts +6 -1
- package/api/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +2 -8
- package/api/resources/intelligentFields/types/IntelligentFieldValueSearchRequest.d.ts +9 -1
- package/api/resources/intelligentFields/types/index.d.ts +0 -1
- package/api/resources/intelligentFields/types/index.js +0 -1
- package/api/resources/knowledge/client/Client.d.ts +3 -0
- package/api/resources/knowledge/client/Client.js +3 -0
- package/api/resources/segments/client/Client.js +1 -3
- package/api/resources/segments/client/requests/SegmentDeleteRequest.d.ts +0 -12
- package/api/resources/segments/types/SegmentPatchRequest.d.ts +0 -8
- package/api/resources/segments/types/SegmentRequest.d.ts +0 -8
- package/api/resources/triggers/client/Client.d.ts +22 -5
- package/api/resources/triggers/client/Client.js +38 -10
- package/api/resources/triggers/client/requests/PartialUpdateRequest.d.ts +5 -4
- package/api/resources/triggers/types/EventTriggerBase.d.ts +8 -4
- package/api/resources/triggers/types/EventTriggerRequest.d.ts +4 -0
- package/api/resources/triggers/types/EventTriggerResponse.d.ts +11 -3
- package/api/resources/triggers/types/index.d.ts +0 -1
- package/api/resources/triggers/types/index.js +0 -1
- package/api/resources/users/types/AgentUser.d.ts +2 -0
- package/api/resources/users/types/AgentUserFilter.d.ts +3 -0
- package/package.json +1 -1
- package/reference.md +489 -8
- package/serialization/resources/capabilities/client/index.d.ts +1 -0
- package/serialization/resources/capabilities/client/index.js +17 -0
- package/serialization/resources/capabilities/client/requests/CapabilitiesSearchRequest.d.ts +23 -0
- package/serialization/resources/capabilities/client/requests/CapabilitiesSearchRequest.js +57 -0
- package/serialization/resources/capabilities/client/requests/PatchCapabilityByTypeRequest.d.ts +10 -0
- package/serialization/resources/capabilities/client/requests/PatchCapabilityByTypeRequest.js +42 -0
- package/serialization/resources/capabilities/client/requests/index.d.ts +2 -0
- package/serialization/resources/capabilities/client/requests/index.js +7 -0
- package/serialization/resources/capabilities/index.d.ts +2 -0
- package/serialization/resources/capabilities/index.js +18 -0
- package/serialization/resources/capabilities/types/CapabilitiesSearchResponse.d.ts +11 -0
- package/serialization/resources/capabilities/types/CapabilitiesSearchResponse.js +45 -0
- package/serialization/resources/capabilities/types/CapabilityResponse.d.ts +23 -0
- package/serialization/resources/capabilities/types/CapabilityResponse.js +53 -0
- package/serialization/resources/capabilities/types/CapabilitySortField.d.ts +7 -0
- package/serialization/resources/{intelligentFields/types/IntelligentFieldStatus.js → capabilities/types/CapabilitySortField.js} +2 -2
- package/serialization/resources/capabilities/types/CapabilitySummary.d.ts +13 -0
- package/serialization/resources/capabilities/types/CapabilitySummary.js +47 -0
- package/serialization/resources/capabilities/types/index.d.ts +4 -0
- package/serialization/resources/capabilities/types/index.js +20 -0
- package/serialization/resources/charters/types/CharterBase.d.ts +2 -0
- package/serialization/resources/charters/types/CharterBase.js +2 -0
- package/serialization/resources/charters/types/CharterRequest.d.ts +0 -2
- package/serialization/resources/charters/types/CharterRequest.js +0 -2
- package/serialization/resources/charters/types/CharterSearchFilter.d.ts +3 -0
- package/serialization/resources/charters/types/CharterSearchFilter.js +3 -0
- package/serialization/resources/commons/types/ActionResponse.d.ts +3 -2
- package/serialization/resources/commons/types/ActionResponse.js +4 -2
- package/serialization/resources/commons/types/AdditionalDataKey.d.ts +7 -0
- package/serialization/resources/commons/types/AdditionalDataKey.js +57 -0
- package/serialization/resources/commons/types/BaseConversationResponse.d.ts +1 -0
- package/serialization/resources/commons/types/BaseConversationResponse.js +1 -0
- package/serialization/resources/commons/types/CapabilityBase.d.ts +14 -0
- package/serialization/resources/commons/types/CapabilityBase.js +46 -0
- package/serialization/resources/{intelligentFields/types/IntelligentFieldStatus.d.ts → commons/types/CapabilityStatus.d.ts} +2 -2
- package/serialization/resources/{triggers/types/TriggerPartialUpdate.js → commons/types/CapabilityStatus.js} +2 -4
- package/serialization/resources/commons/types/CapabilityType.d.ts +7 -0
- package/serialization/resources/commons/types/CapabilityType.js +39 -0
- package/serialization/resources/commons/types/EntityType.d.ts +1 -1
- package/serialization/resources/commons/types/EntityType.js +1 -1
- package/serialization/resources/commons/types/ErrorMessage.d.ts +2 -0
- package/serialization/resources/commons/types/ErrorMessage.js +2 -0
- package/serialization/resources/commons/types/ErrorReason.d.ts +7 -0
- package/serialization/resources/commons/types/ErrorReason.js +50 -0
- package/serialization/resources/commons/types/EventCondition.d.ts +26 -0
- package/serialization/resources/commons/types/EventCondition.js +55 -0
- package/serialization/resources/commons/types/EventConditionGroup.d.ts +11 -0
- package/serialization/resources/commons/types/EventConditionGroup.js +44 -0
- package/serialization/resources/commons/types/EventReferencesCondition.d.ts +12 -0
- package/serialization/resources/commons/types/EventReferencesCondition.js +44 -0
- package/serialization/resources/{conversation → commons}/types/IntelligentFieldSearchCondition.d.ts +1 -1
- package/serialization/resources/{conversation → commons}/types/IntelligentFieldSearchCondition.js +1 -1
- package/serialization/resources/commons/types/SimulationContext.d.ts +2 -0
- package/serialization/resources/commons/types/SimulationContext.js +2 -0
- package/serialization/resources/commons/types/SystemEventName.d.ts +1 -1
- package/serialization/resources/commons/types/SystemEventName.js +1 -0
- package/serialization/resources/commons/types/SystemEventNameCondition.d.ts +12 -0
- package/serialization/resources/commons/types/SystemEventNameCondition.js +44 -0
- package/serialization/resources/commons/types/UserEventNameCondition.d.ts +12 -0
- package/serialization/resources/commons/types/UserEventNameCondition.js +44 -0
- package/serialization/resources/commons/types/index.d.ts +13 -0
- package/serialization/resources/commons/types/index.js +13 -0
- package/serialization/resources/conversation/types/ConversationField.d.ts +1 -1
- package/serialization/resources/conversation/types/ConversationField.js +2 -0
- package/serialization/resources/conversation/types/ConversationFilter.d.ts +3 -1
- package/serialization/resources/conversation/types/ConversationFilter.js +3 -1
- package/serialization/resources/conversation/types/index.d.ts +0 -3
- package/serialization/resources/conversation/types/index.js +0 -3
- package/serialization/resources/conversationKickoffs/client/index.d.ts +1 -0
- package/serialization/resources/conversationKickoffs/client/index.js +17 -0
- package/serialization/resources/conversationKickoffs/client/requests/CreateConversationKickoffRequest.d.ts +12 -0
- package/serialization/resources/conversationKickoffs/client/requests/CreateConversationKickoffRequest.js +44 -0
- package/serialization/resources/conversationKickoffs/client/requests/index.d.ts +1 -0
- package/serialization/resources/conversationKickoffs/client/requests/index.js +5 -0
- package/serialization/resources/conversationKickoffs/index.d.ts +2 -0
- package/serialization/resources/conversationKickoffs/index.js +18 -0
- package/serialization/resources/conversationKickoffs/types/ConversationKickoff.d.ts +11 -0
- package/serialization/resources/conversationKickoffs/types/ConversationKickoff.js +45 -0
- package/serialization/resources/conversationKickoffs/types/index.d.ts +1 -0
- package/serialization/resources/conversationKickoffs/types/index.js +17 -0
- package/serialization/resources/inbox/types/InboxFilter.d.ts +2 -0
- package/serialization/resources/inbox/types/InboxFilter.js +2 -0
- package/serialization/resources/index.d.ts +7 -0
- package/serialization/resources/index.js +8 -1
- package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +4 -4
- package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.js +4 -4
- package/serialization/resources/intelligentFields/types/EnumOption.d.ts +1 -0
- package/serialization/resources/intelligentFields/types/EnumOption.js +1 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldCore.d.ts +0 -2
- package/serialization/resources/intelligentFields/types/IntelligentFieldCore.js +0 -2
- package/serialization/resources/intelligentFields/types/IntelligentFieldRequest.d.ts +2 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldRequest.js +2 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +2 -5
- package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.js +3 -5
- package/serialization/resources/intelligentFields/types/index.d.ts +0 -1
- package/serialization/resources/intelligentFields/types/index.js +0 -1
- package/serialization/resources/segments/types/SegmentPatchRequest.d.ts +0 -2
- package/serialization/resources/segments/types/SegmentPatchRequest.js +0 -2
- package/serialization/resources/segments/types/SegmentRequest.d.ts +0 -2
- package/serialization/resources/segments/types/SegmentRequest.js +0 -2
- package/serialization/resources/triggers/client/index.d.ts +1 -0
- package/serialization/resources/triggers/client/index.js +17 -0
- package/serialization/resources/triggers/client/requests/PartialUpdateRequest.d.ts +10 -0
- package/serialization/resources/triggers/client/requests/PartialUpdateRequest.js +43 -0
- package/serialization/resources/triggers/client/requests/index.d.ts +1 -0
- package/serialization/resources/triggers/client/requests/index.js +5 -0
- package/serialization/resources/triggers/index.d.ts +1 -0
- package/serialization/resources/triggers/index.js +1 -0
- package/serialization/resources/triggers/types/EventTriggerBase.d.ts +2 -3
- package/serialization/resources/triggers/types/EventTriggerBase.js +2 -2
- package/serialization/resources/triggers/types/EventTriggerRequest.d.ts +2 -0
- package/serialization/resources/triggers/types/EventTriggerRequest.js +2 -0
- package/serialization/resources/triggers/types/EventTriggerResponse.d.ts +2 -1
- package/serialization/resources/triggers/types/EventTriggerResponse.js +3 -1
- package/serialization/resources/triggers/types/index.d.ts +0 -1
- package/serialization/resources/triggers/types/index.js +0 -1
- package/serialization/resources/users/types/AgentUser.d.ts +2 -0
- package/serialization/resources/users/types/AgentUser.js +2 -0
- package/serialization/resources/users/types/AgentUserFilter.d.ts +2 -0
- package/serialization/resources/users/types/AgentUserFilter.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/triggers/types/TriggerPartialUpdate.d.ts +0 -4
- package/serialization/resources/triggers/types/TriggerPartialUpdate.d.ts +0 -9
- /package/api/resources/{conversation/types/IntelligentFieldFilter.js → capabilities/client/requests/CapabilitiesSearchRequest.js} +0 -0
- /package/api/resources/{conversation/types/IntelligentFieldSearchCondition.js → capabilities/client/requests/DeleteCapabilityByTypeRequest.js} +0 -0
- /package/api/resources/{triggers/types/TriggerPartialUpdate.js → capabilities/client/requests/GetCapabilityByTypeRequest.js} +0 -0
- /package/api/resources/{conversation → commons}/types/IntelligentFieldOperator.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/IntelligentFieldOperator.js +0 -0
- /package/api/resources/{conversation → commons}/types/IntelligentFieldSearchCondition.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/IntelligentFieldFilter.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/IntelligentFieldFilter.js +0 -0
- /package/serialization/resources/{conversation → commons}/types/IntelligentFieldOperator.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/IntelligentFieldOperator.js +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
1
2
|
export interface ErrorMessage {
|
|
2
3
|
/** HTTP status code returned by the API. */
|
|
3
4
|
status?: number;
|
|
@@ -5,4 +6,6 @@ export interface ErrorMessage {
|
|
|
5
6
|
error?: string;
|
|
6
7
|
/** Human-readable error details. */
|
|
7
8
|
message?: string;
|
|
9
|
+
/** Machine-readable reason for the failure, when the API defines one. Match on this rather than on `message`, whose wording may change. */
|
|
10
|
+
reason?: MavenAGI.ErrorReason;
|
|
8
11
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** Why a request was rejected. Values are UPPER_SNAKE_CASE, at most 63 characters. New values may be added, so treat an unrecognized one as a generic error. All current values come from agent-variant operations. */
|
|
2
|
+
export declare const ErrorReason: {
|
|
3
|
+
/**
|
|
4
|
+
* The variant is receiving live traffic, so it can't be edited. Fork a working variant and edit that instead. */
|
|
5
|
+
readonly VariantLive: "VARIANT_LIVE";
|
|
6
|
+
/**
|
|
7
|
+
* The variant is archived or deleted. */
|
|
8
|
+
readonly VariantNotActive: "VARIANT_NOT_ACTIVE";
|
|
9
|
+
/**
|
|
10
|
+
* The traffic config changed since it was last read. Re-read it and retry. */
|
|
11
|
+
readonly StaleTrafficRevision: "STALE_TRAFFIC_REVISION";
|
|
12
|
+
/**
|
|
13
|
+
* The variant's working set changed since it was last read (its `workingSetRevision` moved). Re-read it and retry. */
|
|
14
|
+
readonly StaleWorkingSet: "STALE_WORKING_SET";
|
|
15
|
+
/**
|
|
16
|
+
* The variant's staged edits don't change its configuration, so there is nothing to commit. */
|
|
17
|
+
readonly NothingToCommit: "NOTHING_TO_COMMIT";
|
|
18
|
+
/**
|
|
19
|
+
* The ID requested for a new variant is already taken. */
|
|
20
|
+
readonly VariantAlreadyExists: "VARIANT_ALREADY_EXISTS";
|
|
21
|
+
/**
|
|
22
|
+
* The variant is receiving live traffic, so it can't be archived or deleted. Move its traffic elsewhere first. */
|
|
23
|
+
readonly CannotArchiveLiveVariant: "CANNOT_ARCHIVE_LIVE_VARIANT";
|
|
24
|
+
/**
|
|
25
|
+
* A traffic rule, a simulation or an eval run names a variant with staged edits. Publish or discard them first. */
|
|
26
|
+
readonly VariantHasStagedEdits: "VARIANT_HAS_STAGED_EDITS";
|
|
27
|
+
/**
|
|
28
|
+
* The entity type is versioned on this agent, so the request must name the agent variant to read or write. Pass the variant's reference ID, and its owning app where the endpoint takes one; a request that names none is rejected. */
|
|
29
|
+
readonly VariantRequired: "VARIANT_REQUIRED";
|
|
30
|
+
/**
|
|
31
|
+
* The write would change an intelligent field's `validationType` in an agent variant. A field keeps its type across variants; to use a different type, create a new field. */
|
|
32
|
+
readonly IntelligentFieldTypeChanged: "INTELLIGENT_FIELD_TYPE_CHANGED";
|
|
33
|
+
};
|
|
34
|
+
export type ErrorReason = (typeof ErrorReason)[keyof typeof ErrorReason] | string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ErrorReason = void 0;
|
|
5
|
+
/** Why a request was rejected. Values are UPPER_SNAKE_CASE, at most 63 characters. New values may be added, so treat an unrecognized one as a generic error. All current values come from agent-variant operations. */
|
|
6
|
+
exports.ErrorReason = {
|
|
7
|
+
/**
|
|
8
|
+
* The variant is receiving live traffic, so it can't be edited. Fork a working variant and edit that instead. */
|
|
9
|
+
VariantLive: "VARIANT_LIVE",
|
|
10
|
+
/**
|
|
11
|
+
* The variant is archived or deleted. */
|
|
12
|
+
VariantNotActive: "VARIANT_NOT_ACTIVE",
|
|
13
|
+
/**
|
|
14
|
+
* The traffic config changed since it was last read. Re-read it and retry. */
|
|
15
|
+
StaleTrafficRevision: "STALE_TRAFFIC_REVISION",
|
|
16
|
+
/**
|
|
17
|
+
* The variant's working set changed since it was last read (its `workingSetRevision` moved). Re-read it and retry. */
|
|
18
|
+
StaleWorkingSet: "STALE_WORKING_SET",
|
|
19
|
+
/**
|
|
20
|
+
* The variant's staged edits don't change its configuration, so there is nothing to commit. */
|
|
21
|
+
NothingToCommit: "NOTHING_TO_COMMIT",
|
|
22
|
+
/**
|
|
23
|
+
* The ID requested for a new variant is already taken. */
|
|
24
|
+
VariantAlreadyExists: "VARIANT_ALREADY_EXISTS",
|
|
25
|
+
/**
|
|
26
|
+
* The variant is receiving live traffic, so it can't be archived or deleted. Move its traffic elsewhere first. */
|
|
27
|
+
CannotArchiveLiveVariant: "CANNOT_ARCHIVE_LIVE_VARIANT",
|
|
28
|
+
/**
|
|
29
|
+
* A traffic rule, a simulation or an eval run names a variant with staged edits. Publish or discard them first. */
|
|
30
|
+
VariantHasStagedEdits: "VARIANT_HAS_STAGED_EDITS",
|
|
31
|
+
/**
|
|
32
|
+
* The entity type is versioned on this agent, so the request must name the agent variant to read or write. Pass the variant's reference ID, and its owning app where the endpoint takes one; a request that names none is rejected. */
|
|
33
|
+
VariantRequired: "VARIANT_REQUIRED",
|
|
34
|
+
/**
|
|
35
|
+
* The write would change an intelligent field's `validationType` in an agent variant. A field keeps its type across variants; to use a different type, create a new field. */
|
|
36
|
+
IntelligentFieldTypeChanged: "INTELLIGENT_FIELD_TYPE_CHANGED",
|
|
37
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* A predicate over an event, deciding whether an event trigger fires for it. A trigger with
|
|
4
|
+
* no condition fires for every event on its agent.
|
|
5
|
+
*
|
|
6
|
+
* Each condition tests one thing: `userEventName` and `systemEventName` match events of one
|
|
7
|
+
* family by name, `data` matches one key of `contextInfo.additionalData`, and `references`
|
|
8
|
+
* matches the entities an event references. `data` and `references` match events of either
|
|
9
|
+
* family. Combine conditions with `group`.
|
|
10
|
+
*
|
|
11
|
+
* A condition may nest at most 3 levels deep and hold at most 10 conditions and groups in
|
|
12
|
+
* total. Exceeding either is a 400.
|
|
13
|
+
*/
|
|
14
|
+
export type EventCondition = MavenAGI.EventCondition.UserEventName | MavenAGI.EventCondition.SystemEventName
|
|
15
|
+
/**
|
|
16
|
+
* A condition on one key of `contextInfo.additionalData`. Values are compared as strings,
|
|
17
|
+
* so there is no numeric comparison. */
|
|
18
|
+
| MavenAGI.EventCondition.Data | MavenAGI.EventCondition.References | MavenAGI.EventCondition.Group;
|
|
19
|
+
export declare namespace EventCondition {
|
|
20
|
+
interface UserEventName extends MavenAGI.UserEventNameCondition {
|
|
21
|
+
eventConditionType: "userEventName";
|
|
22
|
+
}
|
|
23
|
+
interface SystemEventName extends MavenAGI.SystemEventNameCondition {
|
|
24
|
+
eventConditionType: "systemEventName";
|
|
25
|
+
}
|
|
26
|
+
interface Data extends MavenAGI.MetadataEntryCondition {
|
|
27
|
+
eventConditionType: "data";
|
|
28
|
+
}
|
|
29
|
+
interface References extends MavenAGI.EventReferencesCondition {
|
|
30
|
+
eventConditionType: "references";
|
|
31
|
+
}
|
|
32
|
+
interface Group extends MavenAGI.EventConditionGroup {
|
|
33
|
+
eventConditionType: "group";
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* Combines event conditions with a logical operator. Groups nest, so `(a AND b) OR c` is a
|
|
4
|
+
* group holding a group and a condition.
|
|
5
|
+
*/
|
|
6
|
+
export interface EventConditionGroup {
|
|
7
|
+
/** How to combine `conditions`. */
|
|
8
|
+
operator: MavenAGI.PreconditionGroupOperator;
|
|
9
|
+
/** The conditions to combine. At least one is required; to match every event, omit the trigger's condition entirely. */
|
|
10
|
+
conditions: MavenAGI.EventCondition[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* A condition on the entities an event references -- the conversation it is about, the
|
|
4
|
+
* intelligent field whose value changed, the user who acted.
|
|
5
|
+
*
|
|
6
|
+
* A set relation between the entities the event references and the ones named here.
|
|
7
|
+
*/
|
|
8
|
+
export interface EventReferencesCondition {
|
|
9
|
+
/** The set relation to apply. The event's references are the left-hand set. */
|
|
10
|
+
operator: MavenAGI.SetRelationOperator;
|
|
11
|
+
/** The entities to match, at most 50. A conversation message is identified by its conversation, so give the conversation as `scopeEntityId` when naming one. An event that references a message also references its conversation, so `EQ` and `SUBSET_OF` must name both. */
|
|
12
|
+
references: MavenAGI.ScopedEntity[];
|
|
13
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../index";
|
|
2
2
|
/**
|
|
3
|
-
* Filter
|
|
3
|
+
* Filter by intelligent field values. All conditions are ANDed.
|
|
4
4
|
*/
|
|
5
5
|
export interface IntelligentFieldFilter {
|
|
6
6
|
/** List of conditions to filter by. All conditions must match (AND logic). */
|
|
@@ -10,4 +10,16 @@ export interface SimulationContext {
|
|
|
10
10
|
persona?: MavenAGI.LlmPersona;
|
|
11
11
|
/** If provided, knowledge search will be restricted to the provided list of knowledge bases. Otherwise, all active knowledge bases will be used. An empty list means no knowledge bases will be used. */
|
|
12
12
|
availableKnowledgeBases?: MavenAGI.EntityId[];
|
|
13
|
+
/**
|
|
14
|
+
* The agent variant to run the simulation on, instead of the one the agent's traffic rules
|
|
15
|
+
* would choose. Any ACTIVE variant of the agent with no staged edits can be named, including
|
|
16
|
+
* one with no traffic. The conversation is pinned to it when created, like any other
|
|
17
|
+
* conversation; the conversation's `variantId` reports it, and this field is not returned.
|
|
18
|
+
*
|
|
19
|
+
* Rejected with reason `VARIANT_NOT_ACTIVE` for an archived or deleted variant, and
|
|
20
|
+
* `VARIANT_HAS_STAGED_EDITS` for one with staged edits (publish them first). Rejected too
|
|
21
|
+
* while agent variants aren't enabled for the agent. A conversation that already exists
|
|
22
|
+
* keeps the variant it was created with.
|
|
23
|
+
*/
|
|
24
|
+
variantId?: MavenAGI.EntityIdWithoutAgent;
|
|
13
25
|
}
|
|
@@ -33,7 +33,10 @@ export declare const SystemEventName: {
|
|
|
33
33
|
* A data sync with an external system failed */
|
|
34
34
|
readonly SyncFailed: "SYNC_FAILED";
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* A conversation was closed, by setting `open` to false through the conversation PATCH. `references` carries the conversation. */
|
|
37
|
+
readonly ConversationClosed: "CONVERSATION_CLOSED";
|
|
38
|
+
/**
|
|
39
|
+
* An intelligent field's value on a conversation was set or changed. `references` carries the conversation and the field; `contextInfo.additionalData` carries the new `value` and the `previousValue` (see `AdditionalDataKey`). A string value is written as is, a boolean or number as its text (`true`, `3`), and a multi-select's options as a JSON array. A key is absent when its value is undetermined or, for `previousValue`, when the field had no previous value. */
|
|
37
40
|
readonly IntelligentFieldValueChanged: "INTELLIGENT_FIELD_VALUE_CHANGED";
|
|
38
41
|
};
|
|
39
42
|
export type SystemEventName = (typeof SystemEventName)[keyof typeof SystemEventName] | string;
|
|
@@ -37,6 +37,9 @@ exports.SystemEventName = {
|
|
|
37
37
|
* A data sync with an external system failed */
|
|
38
38
|
SyncFailed: "SYNC_FAILED",
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* A conversation was closed, by setting `open` to false through the conversation PATCH. `references` carries the conversation. */
|
|
41
|
+
ConversationClosed: "CONVERSATION_CLOSED",
|
|
42
|
+
/**
|
|
43
|
+
* An intelligent field's value on a conversation was set or changed. `references` carries the conversation and the field; `contextInfo.additionalData` carries the new `value` and the `previousValue` (see `AdditionalDataKey`). A string value is written as is, a boolean or number as its text (`true`, `3`), and a multi-select's options as a JSON array. A key is absent when its value is undetermined or, for `previousValue`, when the field had no previous value. */
|
|
41
44
|
IntelligentFieldValueChanged: "INTELLIGENT_FIELD_VALUE_CHANGED",
|
|
42
45
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* A condition on the name of a system event. Matches system events only.
|
|
4
|
+
*/
|
|
5
|
+
export interface SystemEventNameCondition {
|
|
6
|
+
/** The membership operator to apply. */
|
|
7
|
+
operator: MavenAGI.StringMembershipOperator;
|
|
8
|
+
/** The system event names to match, at most 50. At least one is required. */
|
|
9
|
+
names: MavenAGI.SystemEventName[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* A condition on the name of a user event. Matches user events only.
|
|
4
|
+
*/
|
|
5
|
+
export interface UserEventNameCondition {
|
|
6
|
+
/** The membership operator to apply. */
|
|
7
|
+
operator: MavenAGI.StringMembershipOperator;
|
|
8
|
+
/** The user event names to match, at most 50. At least one is required. */
|
|
9
|
+
names: MavenAGI.UserEventName[];
|
|
10
|
+
}
|
|
@@ -8,6 +8,7 @@ export * from "./ActionParameterType";
|
|
|
8
8
|
export * from "./ActionProperties";
|
|
9
9
|
export * from "./ActionResponse";
|
|
10
10
|
export * from "./ActionUser";
|
|
11
|
+
export * from "./AdditionalDataKey";
|
|
11
12
|
export * from "./AppPrecondition";
|
|
12
13
|
export * from "./AppUser";
|
|
13
14
|
export * from "./AppUserIdentifier";
|
|
@@ -54,6 +55,9 @@ export * from "./BotTextResponse";
|
|
|
54
55
|
export * from "./BrowserInfo";
|
|
55
56
|
export * from "./BrowserType";
|
|
56
57
|
export * from "./Capability";
|
|
58
|
+
export * from "./CapabilityBase";
|
|
59
|
+
export * from "./CapabilityStatus";
|
|
60
|
+
export * from "./CapabilityType";
|
|
57
61
|
export * from "./ChartSpecSchema";
|
|
58
62
|
export * from "./CheckboxSettingsSchemaEntry";
|
|
59
63
|
export * from "./ColorSettingsSchemaEntry";
|
|
@@ -89,9 +93,13 @@ export * from "./EntityIdWithoutAgent";
|
|
|
89
93
|
export * from "./EntityResult";
|
|
90
94
|
export * from "./EntityType";
|
|
91
95
|
export * from "./ErrorMessage";
|
|
96
|
+
export * from "./ErrorReason";
|
|
92
97
|
export * from "./EventBaseNoId";
|
|
98
|
+
export * from "./EventCondition";
|
|
99
|
+
export * from "./EventConditionGroup";
|
|
93
100
|
export * from "./EventField";
|
|
94
101
|
export * from "./EventFilter";
|
|
102
|
+
export * from "./EventReferencesCondition";
|
|
95
103
|
export * from "./EventRequest";
|
|
96
104
|
export * from "./EventResponse";
|
|
97
105
|
export * from "./EventsSearchRequest";
|
|
@@ -121,8 +129,11 @@ export * from "./InboxItemSeverity";
|
|
|
121
129
|
export * from "./InboxItemStatus";
|
|
122
130
|
export * from "./InboxItemType";
|
|
123
131
|
export * from "./InitializeConversationResponse";
|
|
132
|
+
export * from "./IntelligentFieldFilter";
|
|
133
|
+
export * from "./IntelligentFieldOperator";
|
|
124
134
|
export * from "./IntelligentFieldPrecondition";
|
|
125
135
|
export * from "./IntelligentFieldPreconditionResponse";
|
|
136
|
+
export * from "./IntelligentFieldSearchCondition";
|
|
126
137
|
export * from "./IntelligentFieldValueResponse";
|
|
127
138
|
export * from "./IpInfo";
|
|
128
139
|
export * from "./JsonSchemaSettingsSchemaEntry";
|
|
@@ -207,6 +218,7 @@ export * from "./SurveyInfo";
|
|
|
207
218
|
export * from "./SwitchSettingsSchemaEntry";
|
|
208
219
|
export * from "./SystemEvent";
|
|
209
220
|
export * from "./SystemEventName";
|
|
221
|
+
export * from "./SystemEventNameCondition";
|
|
210
222
|
export * from "./TagsPrecondition";
|
|
211
223
|
export * from "./TextFormat";
|
|
212
224
|
export * from "./TextFormatJsonSchema";
|
|
@@ -218,6 +230,7 @@ export * from "./UserData";
|
|
|
218
230
|
export * from "./UserDataWithReference";
|
|
219
231
|
export * from "./UserEvent";
|
|
220
232
|
export * from "./UserEventName";
|
|
233
|
+
export * from "./UserEventNameCondition";
|
|
221
234
|
export * from "./UserMessage";
|
|
222
235
|
export * from "./UserMessageBase";
|
|
223
236
|
export * from "./UserMessageResponseState";
|
|
@@ -24,6 +24,7 @@ __exportStar(require("./ActionParameterType"), exports);
|
|
|
24
24
|
__exportStar(require("./ActionProperties"), exports);
|
|
25
25
|
__exportStar(require("./ActionResponse"), exports);
|
|
26
26
|
__exportStar(require("./ActionUser"), exports);
|
|
27
|
+
__exportStar(require("./AdditionalDataKey"), exports);
|
|
27
28
|
__exportStar(require("./AppPrecondition"), exports);
|
|
28
29
|
__exportStar(require("./AppUser"), exports);
|
|
29
30
|
__exportStar(require("./AppUserIdentifier"), exports);
|
|
@@ -70,6 +71,9 @@ __exportStar(require("./BotTextResponse"), exports);
|
|
|
70
71
|
__exportStar(require("./BrowserInfo"), exports);
|
|
71
72
|
__exportStar(require("./BrowserType"), exports);
|
|
72
73
|
__exportStar(require("./Capability"), exports);
|
|
74
|
+
__exportStar(require("./CapabilityBase"), exports);
|
|
75
|
+
__exportStar(require("./CapabilityStatus"), exports);
|
|
76
|
+
__exportStar(require("./CapabilityType"), exports);
|
|
73
77
|
__exportStar(require("./ChartSpecSchema"), exports);
|
|
74
78
|
__exportStar(require("./CheckboxSettingsSchemaEntry"), exports);
|
|
75
79
|
__exportStar(require("./ColorSettingsSchemaEntry"), exports);
|
|
@@ -105,9 +109,13 @@ __exportStar(require("./EntityIdWithoutAgent"), exports);
|
|
|
105
109
|
__exportStar(require("./EntityResult"), exports);
|
|
106
110
|
__exportStar(require("./EntityType"), exports);
|
|
107
111
|
__exportStar(require("./ErrorMessage"), exports);
|
|
112
|
+
__exportStar(require("./ErrorReason"), exports);
|
|
108
113
|
__exportStar(require("./EventBaseNoId"), exports);
|
|
114
|
+
__exportStar(require("./EventCondition"), exports);
|
|
115
|
+
__exportStar(require("./EventConditionGroup"), exports);
|
|
109
116
|
__exportStar(require("./EventField"), exports);
|
|
110
117
|
__exportStar(require("./EventFilter"), exports);
|
|
118
|
+
__exportStar(require("./EventReferencesCondition"), exports);
|
|
111
119
|
__exportStar(require("./EventRequest"), exports);
|
|
112
120
|
__exportStar(require("./EventResponse"), exports);
|
|
113
121
|
__exportStar(require("./EventsSearchRequest"), exports);
|
|
@@ -137,8 +145,11 @@ __exportStar(require("./InboxItemSeverity"), exports);
|
|
|
137
145
|
__exportStar(require("./InboxItemStatus"), exports);
|
|
138
146
|
__exportStar(require("./InboxItemType"), exports);
|
|
139
147
|
__exportStar(require("./InitializeConversationResponse"), exports);
|
|
148
|
+
__exportStar(require("./IntelligentFieldFilter"), exports);
|
|
149
|
+
__exportStar(require("./IntelligentFieldOperator"), exports);
|
|
140
150
|
__exportStar(require("./IntelligentFieldPrecondition"), exports);
|
|
141
151
|
__exportStar(require("./IntelligentFieldPreconditionResponse"), exports);
|
|
152
|
+
__exportStar(require("./IntelligentFieldSearchCondition"), exports);
|
|
142
153
|
__exportStar(require("./IntelligentFieldValueResponse"), exports);
|
|
143
154
|
__exportStar(require("./IpInfo"), exports);
|
|
144
155
|
__exportStar(require("./JsonSchemaSettingsSchemaEntry"), exports);
|
|
@@ -223,6 +234,7 @@ __exportStar(require("./SurveyInfo"), exports);
|
|
|
223
234
|
__exportStar(require("./SwitchSettingsSchemaEntry"), exports);
|
|
224
235
|
__exportStar(require("./SystemEvent"), exports);
|
|
225
236
|
__exportStar(require("./SystemEventName"), exports);
|
|
237
|
+
__exportStar(require("./SystemEventNameCondition"), exports);
|
|
226
238
|
__exportStar(require("./TagsPrecondition"), exports);
|
|
227
239
|
__exportStar(require("./TextFormat"), exports);
|
|
228
240
|
__exportStar(require("./TextFormatJsonSchema"), exports);
|
|
@@ -234,6 +246,7 @@ __exportStar(require("./UserData"), exports);
|
|
|
234
246
|
__exportStar(require("./UserDataWithReference"), exports);
|
|
235
247
|
__exportStar(require("./UserEvent"), exports);
|
|
236
248
|
__exportStar(require("./UserEventName"), exports);
|
|
249
|
+
__exportStar(require("./UserEventNameCondition"), exports);
|
|
237
250
|
__exportStar(require("./UserMessage"), exports);
|
|
238
251
|
__exportStar(require("./UserMessageBase"), exports);
|
|
239
252
|
__exportStar(require("./UserMessageResponseState"), exports);
|
|
@@ -65,6 +65,9 @@ export declare class ConversationClient {
|
|
|
65
65
|
* The `appId` field can be provided to update a conversation owned by a different app.
|
|
66
66
|
* All other fields will overwrite the existing value on the conversation only if provided.
|
|
67
67
|
*
|
|
68
|
+
* A closed conversation (`open` set to false) cannot be reopened: a patch setting `open` to true
|
|
69
|
+
* returns a 400. Its other fields can still be patched.
|
|
70
|
+
*
|
|
68
71
|
* @param {string} conversationId - The ID of the conversation to patch
|
|
69
72
|
* @param {MavenAGI.ConversationPatchRequest} request
|
|
70
73
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -108,6 +111,7 @@ export declare class ConversationClient {
|
|
|
108
111
|
* Wipes a conversation of all user data.
|
|
109
112
|
* The conversation ID will still exist and non-user specific data will still be retained.
|
|
110
113
|
* Attempts to modify or add messages to the conversation will throw an error.
|
|
114
|
+
* The conversation is sealed against further writes as soon as this call returns. A `202 Accepted` response means the wipe is still completing and will finish on its own.
|
|
111
115
|
*
|
|
112
116
|
* Simulation conversations will no longer be visible in search results nor metrics.
|
|
113
117
|
* Non-simulation conversations will remain visible - they can not be fully removed from the system.
|
|
@@ -138,6 +142,8 @@ export declare class ConversationClient {
|
|
|
138
142
|
/**
|
|
139
143
|
* Append messages to an existing conversation. The conversation must be initialized first. If a message with the same ID already exists, it will be ignored. Messages do not allow modification.
|
|
140
144
|
*
|
|
145
|
+
* A closed conversation (`open` set to false) takes no new messages and returns a 400.
|
|
146
|
+
*
|
|
141
147
|
* @param {string} conversationId - The ID of the conversation to append messages to
|
|
142
148
|
* @param {MavenAGI.ConversationMessageRequest[]} request
|
|
143
149
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -177,6 +183,8 @@ export declare class ConversationClient {
|
|
|
177
183
|
* Get an answer from Maven for a given user question. If the user question or its answer already exists,
|
|
178
184
|
* they will be reused and will not be updated. Messages do not allow modification once generated.
|
|
179
185
|
*
|
|
186
|
+
* A closed conversation (`open` set to false) takes no new questions and returns a 400.
|
|
187
|
+
*
|
|
180
188
|
* Concurrency Behavior:
|
|
181
189
|
* - If another API call is made for the same user question while a response is mid-stream, partial answers may be returned.
|
|
182
190
|
* - The second caller will receive a truncated or partial response depending on where the first stream is in its processing. The first caller's stream will remain unaffected and continue delivering the full response.
|
|
@@ -226,6 +234,8 @@ export declare class ConversationClient {
|
|
|
226
234
|
* If the user question or its answer already exists, they will be reused and will not be updated.
|
|
227
235
|
* Messages do not allow modification once generated.
|
|
228
236
|
*
|
|
237
|
+
* A closed conversation (`open` set to false) takes no new questions and returns a 400.
|
|
238
|
+
*
|
|
229
239
|
* Concurrency Behavior:
|
|
230
240
|
* - If another API call is made for the same user question while a response is mid-stream, partial answers may be returned.
|
|
231
241
|
* - The second caller will receive a truncated or partial response depending on where the first stream is in its processing. The first caller's stream will remain unaffected and continue delivering the full response.
|
|
@@ -303,6 +313,8 @@ export declare class ConversationClient {
|
|
|
303
313
|
* Additionally, form submission is only allowed when the form is the last message in the conversation.
|
|
304
314
|
* Forms should be disabled in surface UI if a conversation continues and they remain unsubmitted.
|
|
305
315
|
*
|
|
316
|
+
* A form cannot be submitted on a closed conversation (`open` set to false): that returns a 400.
|
|
317
|
+
*
|
|
306
318
|
* @param {string} conversationId - The ID of a conversation the form being submitted belongs to
|
|
307
319
|
* @param {MavenAGI.SubmitActionFormRequest} request
|
|
308
320
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -334,6 +346,8 @@ export declare class ConversationClient {
|
|
|
334
346
|
*
|
|
335
347
|
* Adds metadata to an existing conversation. If a metadata field already exists, it will be overwritten.
|
|
336
348
|
*
|
|
349
|
+
* A closed conversation (`open` set to false) takes no new metadata and returns a 400.
|
|
350
|
+
*
|
|
337
351
|
* @param {string} conversationId - The ID of a conversation the metadata being added belongs to
|
|
338
352
|
* @param {Record<string, string>} request
|
|
339
353
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -362,6 +376,8 @@ export declare class ConversationClient {
|
|
|
362
376
|
*
|
|
363
377
|
* Returns all metadata saved by any app on the conversation.
|
|
364
378
|
*
|
|
379
|
+
* A closed conversation (`open` set to false) takes no new metadata and returns a 400.
|
|
380
|
+
*
|
|
365
381
|
* @param {string} conversationId - The ID of the conversation to modify metadata for
|
|
366
382
|
* @param {MavenAGI.UpdateMetadataRequest} request
|
|
367
383
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -195,6 +195,9 @@ class ConversationClient {
|
|
|
195
195
|
* The `appId` field can be provided to update a conversation owned by a different app.
|
|
196
196
|
* All other fields will overwrite the existing value on the conversation only if provided.
|
|
197
197
|
*
|
|
198
|
+
* A closed conversation (`open` set to false) cannot be reopened: a patch setting `open` to true
|
|
199
|
+
* returns a 400. Its other fields can still be patched.
|
|
200
|
+
*
|
|
198
201
|
* @param {string} conversationId - The ID of the conversation to patch
|
|
199
202
|
* @param {MavenAGI.ConversationPatchRequest} request
|
|
200
203
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -408,6 +411,7 @@ class ConversationClient {
|
|
|
408
411
|
* Wipes a conversation of all user data.
|
|
409
412
|
* The conversation ID will still exist and non-user specific data will still be retained.
|
|
410
413
|
* Attempts to modify or add messages to the conversation will throw an error.
|
|
414
|
+
* The conversation is sealed against further writes as soon as this call returns. A `202 Accepted` response means the wipe is still completing and will finish on its own.
|
|
411
415
|
*
|
|
412
416
|
* Simulation conversations will no longer be visible in search results nor metrics.
|
|
413
417
|
* Non-simulation conversations will remain visible - they can not be fully removed from the system.
|
|
@@ -518,6 +522,8 @@ class ConversationClient {
|
|
|
518
522
|
/**
|
|
519
523
|
* Append messages to an existing conversation. The conversation must be initialized first. If a message with the same ID already exists, it will be ignored. Messages do not allow modification.
|
|
520
524
|
*
|
|
525
|
+
* A closed conversation (`open` set to false) takes no new messages and returns a 400.
|
|
526
|
+
*
|
|
521
527
|
* @param {string} conversationId - The ID of the conversation to append messages to
|
|
522
528
|
* @param {MavenAGI.ConversationMessageRequest[]} request
|
|
523
529
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -641,6 +647,8 @@ class ConversationClient {
|
|
|
641
647
|
* Get an answer from Maven for a given user question. If the user question or its answer already exists,
|
|
642
648
|
* they will be reused and will not be updated. Messages do not allow modification once generated.
|
|
643
649
|
*
|
|
650
|
+
* A closed conversation (`open` set to false) takes no new questions and returns a 400.
|
|
651
|
+
*
|
|
644
652
|
* Concurrency Behavior:
|
|
645
653
|
* - If another API call is made for the same user question while a response is mid-stream, partial answers may be returned.
|
|
646
654
|
* - The second caller will receive a truncated or partial response depending on where the first stream is in its processing. The first caller's stream will remain unaffected and continue delivering the full response.
|
|
@@ -772,6 +780,8 @@ class ConversationClient {
|
|
|
772
780
|
* If the user question or its answer already exists, they will be reused and will not be updated.
|
|
773
781
|
* Messages do not allow modification once generated.
|
|
774
782
|
*
|
|
783
|
+
* A closed conversation (`open` set to false) takes no new questions and returns a 400.
|
|
784
|
+
*
|
|
775
785
|
* Concurrency Behavior:
|
|
776
786
|
* - If another API call is made for the same user question while a response is mid-stream, partial answers may be returned.
|
|
777
787
|
* - The second caller will receive a truncated or partial response depending on where the first stream is in its processing. The first caller's stream will remain unaffected and continue delivering the full response.
|
|
@@ -1102,6 +1112,8 @@ class ConversationClient {
|
|
|
1102
1112
|
* Additionally, form submission is only allowed when the form is the last message in the conversation.
|
|
1103
1113
|
* Forms should be disabled in surface UI if a conversation continues and they remain unsubmitted.
|
|
1104
1114
|
*
|
|
1115
|
+
* A form cannot be submitted on a closed conversation (`open` set to false): that returns a 400.
|
|
1116
|
+
*
|
|
1105
1117
|
* @param {string} conversationId - The ID of a conversation the form being submitted belongs to
|
|
1106
1118
|
* @param {MavenAGI.SubmitActionFormRequest} request
|
|
1107
1119
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1215,6 +1227,8 @@ class ConversationClient {
|
|
|
1215
1227
|
*
|
|
1216
1228
|
* Adds metadata to an existing conversation. If a metadata field already exists, it will be overwritten.
|
|
1217
1229
|
*
|
|
1230
|
+
* A closed conversation (`open` set to false) takes no new metadata and returns a 400.
|
|
1231
|
+
*
|
|
1218
1232
|
* @param {string} conversationId - The ID of a conversation the metadata being added belongs to
|
|
1219
1233
|
* @param {Record<string, string>} request
|
|
1220
1234
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1327,6 +1341,8 @@ class ConversationClient {
|
|
|
1327
1341
|
*
|
|
1328
1342
|
* Returns all metadata saved by any app on the conversation.
|
|
1329
1343
|
*
|
|
1344
|
+
* A closed conversation (`open` set to false) takes no new metadata and returns a 400.
|
|
1345
|
+
*
|
|
1330
1346
|
* @param {string} conversationId - The ID of the conversation to modify metadata for
|
|
1331
1347
|
* @param {MavenAGI.UpdateMetadataRequest} request
|
|
1332
1348
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -37,9 +37,30 @@ export declare const ConversationField: {
|
|
|
37
37
|
readonly AgentEnvironment: "AgentEnvironment";
|
|
38
38
|
readonly InboxItems: "InboxItems";
|
|
39
39
|
readonly InvolvedApps: "InvolvedApps";
|
|
40
|
+
/**
|
|
41
|
+
* In development, part of agent versioning. The agent variant the conversation is pinned
|
|
42
|
+
* to (its `variantId`). A conversation from before the agent's conversations were pinned
|
|
43
|
+
* has none; grouping puts those under `BEFORE_VERSIONING`. In a table row a variant is an
|
|
44
|
+
* `entityId` value and `BEFORE_VERSIONING` a `string` value. */
|
|
45
|
+
readonly Variant: "Variant";
|
|
40
46
|
/**
|
|
41
47
|
* Selects an intelligent field rather than a built-in conversation field.
|
|
42
|
-
* When used, `intelligentFieldId` must also be set to identify which field.
|
|
48
|
+
* When used, `intelligentFieldId` must also be set to identify which field.
|
|
49
|
+
* Grouping by it splits that one field's conversations by value; to split conversations by
|
|
50
|
+
* which fields they have, use `IntelligentFields`. */
|
|
43
51
|
readonly IntelligentField: "IntelligentField";
|
|
52
|
+
/**
|
|
53
|
+
* Groups conversations by each intelligent field that has a value on them: one bucket per
|
|
54
|
+
* field, keyed by the field as an `entityId` value. A conversation with three fields counts
|
|
55
|
+
* once under each, as with `Actions`. A field counts when the conversation has a value for
|
|
56
|
+
* it, an undetermined one included: the same conversations an `intelligentFields`
|
|
57
|
+
* `EXISTS` condition matches. Only conversation-level fields are on a conversation.
|
|
58
|
+
*
|
|
59
|
+
* Unlike `IntelligentField`, it takes no `intelligentFieldId` and doesn't look at values.
|
|
60
|
+
* Combine it with `Variant` to see which fields each variant's conversations have.
|
|
61
|
+
*
|
|
62
|
+
* It only works as a grouping: a metric targeting it, such as a `distinctCount`, is
|
|
63
|
+
* rejected with a 400. */
|
|
64
|
+
readonly IntelligentFields: "IntelligentFields";
|
|
44
65
|
};
|
|
45
66
|
export type ConversationField = (typeof ConversationField)[keyof typeof ConversationField] | string;
|
|
@@ -41,8 +41,29 @@ exports.ConversationField = {
|
|
|
41
41
|
AgentEnvironment: "AgentEnvironment",
|
|
42
42
|
InboxItems: "InboxItems",
|
|
43
43
|
InvolvedApps: "InvolvedApps",
|
|
44
|
+
/**
|
|
45
|
+
* In development, part of agent versioning. The agent variant the conversation is pinned
|
|
46
|
+
* to (its `variantId`). A conversation from before the agent's conversations were pinned
|
|
47
|
+
* has none; grouping puts those under `BEFORE_VERSIONING`. In a table row a variant is an
|
|
48
|
+
* `entityId` value and `BEFORE_VERSIONING` a `string` value. */
|
|
49
|
+
Variant: "Variant",
|
|
44
50
|
/**
|
|
45
51
|
* Selects an intelligent field rather than a built-in conversation field.
|
|
46
|
-
* When used, `intelligentFieldId` must also be set to identify which field.
|
|
52
|
+
* When used, `intelligentFieldId` must also be set to identify which field.
|
|
53
|
+
* Grouping by it splits that one field's conversations by value; to split conversations by
|
|
54
|
+
* which fields they have, use `IntelligentFields`. */
|
|
47
55
|
IntelligentField: "IntelligentField",
|
|
56
|
+
/**
|
|
57
|
+
* Groups conversations by each intelligent field that has a value on them: one bucket per
|
|
58
|
+
* field, keyed by the field as an `entityId` value. A conversation with three fields counts
|
|
59
|
+
* once under each, as with `Actions`. A field counts when the conversation has a value for
|
|
60
|
+
* it, an undetermined one included: the same conversations an `intelligentFields`
|
|
61
|
+
* `EXISTS` condition matches. Only conversation-level fields are on a conversation.
|
|
62
|
+
*
|
|
63
|
+
* Unlike `IntelligentField`, it takes no `intelligentFieldId` and doesn't look at values.
|
|
64
|
+
* Combine it with `Variant` to see which fields each variant's conversations have.
|
|
65
|
+
*
|
|
66
|
+
* It only works as a grouping: a metric targeting it, such as a `distinctCount`, is
|
|
67
|
+
* rejected with a 400. */
|
|
68
|
+
IntelligentFields: "IntelligentFields",
|
|
48
69
|
};
|
|
@@ -62,6 +62,14 @@ export interface ConversationFilter {
|
|
|
62
62
|
* customer-writable.
|
|
63
63
|
*/
|
|
64
64
|
conversationMode?: MavenAGI.ConversationMode[];
|
|
65
|
+
/**
|
|
66
|
+
* Filter by whether the conversation has been deleted with `deleteConversation`. `true`
|
|
67
|
+
* returns only deleted conversations, `false` excludes them. When unset, both are returned.
|
|
68
|
+
*
|
|
69
|
+
* The filter reads the search index, which is updated shortly after a deletion. Use the
|
|
70
|
+
* `deleted` field on each result to confirm.
|
|
71
|
+
*/
|
|
72
|
+
deleted?: boolean;
|
|
65
73
|
/** Filter by tags applied to the conversation */
|
|
66
74
|
tags?: string[];
|
|
67
75
|
/** Filter by agent user IDs associated with the conversation */
|
|
@@ -106,6 +114,16 @@ export interface ConversationFilter {
|
|
|
106
114
|
anyMsgCharterMode?: boolean;
|
|
107
115
|
/** Filter by inbox item IDs associated with the conversation */
|
|
108
116
|
inboxItemIds?: MavenAGI.EntityIdFilter[];
|
|
117
|
+
/**
|
|
118
|
+
* Filter by the agent variant each conversation is pinned to (its `variantId`), by
|
|
119
|
+
* reference ID and owning app, resolved against the calling agent. Matches conversations
|
|
120
|
+
* pinned to any of them.
|
|
121
|
+
*
|
|
122
|
+
* Omit it to match every conversation in the window, whichever variant it ran on. A
|
|
123
|
+
* conversation from before the agent's conversations were pinned has no variant, so it
|
|
124
|
+
* matches no list; grouping by `Variant` reports those as `BEFORE_VERSIONING`.
|
|
125
|
+
*/
|
|
126
|
+
variantIds?: MavenAGI.EntityIdFilter[];
|
|
109
127
|
/** Whether to include simulation conversations in search results. Defaults to only non-simulation conversations. */
|
|
110
128
|
simulationFilter?: MavenAGI.SimulationFilter;
|
|
111
129
|
/** Filter by intelligent field values. All conditions are ANDed together. */
|
|
@@ -8,7 +8,7 @@ import type * as MavenAGI from "../../../index";
|
|
|
8
8
|
export interface ConversationPatchRequest {
|
|
9
9
|
/** The App ID of the conversation to patch. If not provided the ID of the calling app will be used. */
|
|
10
10
|
appId?: string;
|
|
11
|
-
/** Whether the conversation is
|
|
11
|
+
/** Whether the conversation is open. Set it to false to close the conversation, which records a `CONVERSATION_CLOSED` system event. Closing is final: a closed conversation cannot be reopened and takes no new questions, form submissions, messages or metadata. It can still be read, deleted, and patched otherwise, for example to add attachments. For a conversation with the `ASYNC` capability, only an open conversation can receive asynchronous messages. */
|
|
12
12
|
open?: boolean;
|
|
13
13
|
/** Whether the LLM is enabled for this conversation. */
|
|
14
14
|
llmEnabled?: boolean;
|