mavenagi 1.2.56 → 1.2.57
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 +3 -0
- package/Client.js +21 -16
- package/api/resources/analytics/types/ConversationBasicMetric.d.ts +5 -0
- package/api/resources/analytics/types/ConversationGroupBy.d.ts +9 -1
- package/api/resources/analytics/types/ConversationNumericMetric.d.ts +5 -0
- package/api/resources/analytics/types/ConversationTableRequest.d.ts +6 -0
- package/api/resources/charters/index.d.ts +1 -0
- package/api/resources/charters/index.js +17 -0
- package/api/resources/charters/types/CharterChildrenExclusionPolicy.d.ts +17 -0
- package/api/resources/charters/types/CharterChildrenExclusionPolicy.js +20 -0
- package/api/resources/charters/types/CharterStatus.d.ts +16 -0
- package/api/resources/charters/types/CharterStatus.js +19 -0
- package/api/resources/charters/types/CharterSummary.d.ts +28 -0
- package/api/resources/charters/types/CharterType.d.ts +25 -0
- package/api/resources/charters/types/CharterType.js +28 -0
- package/api/resources/charters/types/index.d.ts +4 -0
- package/api/resources/charters/types/index.js +20 -0
- package/api/resources/commons/types/ActionParameter.d.ts +2 -2
- package/api/resources/commons/types/BotObjectResponse.d.ts +2 -4
- package/api/resources/commons/types/FieldCondition.d.ts +45 -0
- package/api/resources/commons/types/FieldCondition.js +3 -0
- package/api/resources/commons/types/IntelligentFieldPrecondition.d.ts +1 -1
- package/api/resources/commons/types/IntelligentFieldPreconditionResponse.d.ts +1 -1
- package/api/resources/commons/types/KeyValueEntryCondition.d.ts +1 -1
- package/api/resources/commons/types/TextFormat.d.ts +13 -0
- package/api/resources/commons/types/TextFormat.js +3 -0
- package/api/resources/commons/types/TextFormatJsonSchema.d.ts +35 -0
- package/api/resources/commons/types/TextFormatJsonSchema.js +3 -0
- package/api/resources/commons/types/TextFormatText.d.ts +4 -0
- package/api/resources/commons/types/TextFormatText.js +3 -0
- package/api/resources/commons/types/UniversalCondition.d.ts +3 -3
- package/api/resources/commons/types/index.d.ts +4 -1
- package/api/resources/commons/types/index.js +4 -1
- package/api/resources/conversation/types/AskRequest.d.ts +59 -0
- package/api/resources/conversation/types/AskStreamObjectEvent.d.ts +7 -0
- package/api/resources/conversation/types/AskStreamObjectEvent.js +3 -0
- package/api/resources/conversation/types/ConversationField.d.ts +8 -0
- package/api/resources/conversation/types/ConversationField.js +8 -0
- package/api/resources/conversation/types/ConversationsSearchRequest.d.ts +5 -0
- package/api/resources/conversation/types/NumericConversationField.d.ts +4 -0
- package/api/resources/conversation/types/NumericConversationField.js +4 -0
- package/api/resources/conversation/types/StreamResponse.d.ts +4 -1
- package/api/resources/conversation/types/index.d.ts +1 -0
- package/api/resources/conversation/types/index.js +1 -0
- package/api/resources/index.d.ts +5 -0
- package/api/resources/index.js +6 -1
- package/api/resources/intelligentFields/client/Client.d.ts +156 -0
- package/api/resources/intelligentFields/client/Client.js +627 -0
- package/api/resources/intelligentFields/client/index.d.ts +1 -0
- package/api/resources/intelligentFields/client/index.js +17 -0
- package/api/resources/intelligentFields/client/requests/IntelligentFieldDeleteRequest.d.ts +12 -0
- package/api/resources/intelligentFields/client/requests/IntelligentFieldDeleteRequest.js +3 -0
- package/api/resources/intelligentFields/client/requests/IntelligentFieldGetRequest.d.ts +8 -0
- package/api/resources/intelligentFields/client/requests/IntelligentFieldGetRequest.js +3 -0
- package/api/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +26 -0
- package/api/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.js +3 -0
- package/api/resources/intelligentFields/client/requests/index.d.ts +3 -0
- package/api/resources/intelligentFields/client/requests/index.js +2 -0
- package/api/resources/intelligentFields/exports.d.ts +2 -0
- package/api/resources/intelligentFields/exports.js +21 -0
- package/api/resources/intelligentFields/index.d.ts +2 -0
- package/api/resources/intelligentFields/index.js +18 -0
- package/api/resources/intelligentFields/types/EnumOption.d.ts +9 -0
- package/api/resources/intelligentFields/types/EnumOption.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldBase.d.ts +7 -0
- package/api/resources/intelligentFields/types/IntelligentFieldBase.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldCore.d.ts +28 -0
- package/api/resources/intelligentFields/types/IntelligentFieldCore.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldDetailResponse.d.ts +36 -0
- package/api/resources/intelligentFields/types/IntelligentFieldDetailResponse.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldRequest.d.ts +28 -0
- package/api/resources/intelligentFields/types/IntelligentFieldRequest.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +41 -0
- package/api/resources/intelligentFields/types/IntelligentFieldResponse.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldStatus.d.ts +7 -0
- package/api/resources/intelligentFields/types/IntelligentFieldStatus.js +10 -0
- package/api/resources/intelligentFields/types/IntelligentFieldType.d.ts +9 -0
- package/api/resources/intelligentFields/types/IntelligentFieldType.js +12 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueEntityFilter.d.ts +8 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueEntityFilter.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueFieldFilter.d.ts +10 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueFieldFilter.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueSearchRequest.d.ts +17 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueSearchRequest.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueSearchResponse.d.ts +35 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueSearchResponse.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueSortField.d.ts +5 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueSortField.js +8 -0
- package/api/resources/intelligentFields/types/index.d.ts +13 -0
- package/api/resources/intelligentFields/types/index.js +29 -0
- package/api/resources/knowledge/client/Client.d.ts +33 -0
- package/api/resources/knowledge/client/Client.js +117 -0
- package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +5 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +25 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionProgress.d.ts +29 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionProgress.js +3 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionProgressRequest.d.ts +24 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionProgressRequest.js +3 -0
- package/api/resources/knowledge/types/index.d.ts +2 -0
- package/api/resources/knowledge/types/index.js +2 -0
- package/api/resources/segments/client/Client.js +3 -1
- package/api/resources/segments/client/requests/SegmentDeleteRequest.d.ts +12 -0
- package/api/resources/segments/types/SegmentPatchRequest.d.ts +8 -0
- package/api/resources/segments/types/SegmentRequest.d.ts +8 -0
- package/api/resources/segments/types/SegmentSummary.d.ts +14 -0
- package/api/resources/segments/types/SegmentSummary.js +3 -0
- package/api/resources/segments/types/index.d.ts +1 -0
- package/api/resources/segments/types/index.js +1 -0
- package/package.json +1 -1
- package/reference.md +476 -0
- package/serialization/resources/analytics/types/ConversationBasicMetric.d.ts +2 -0
- package/serialization/resources/analytics/types/ConversationBasicMetric.js +2 -0
- package/serialization/resources/analytics/types/ConversationGroupBy.d.ts +2 -0
- package/serialization/resources/analytics/types/ConversationGroupBy.js +2 -0
- package/serialization/resources/analytics/types/ConversationNumericMetric.d.ts +2 -0
- package/serialization/resources/analytics/types/ConversationNumericMetric.js +2 -0
- package/serialization/resources/charters/index.d.ts +1 -0
- package/serialization/resources/charters/index.js +17 -0
- package/serialization/resources/charters/types/CharterChildrenExclusionPolicy.d.ts +7 -0
- package/serialization/resources/charters/types/CharterChildrenExclusionPolicy.js +39 -0
- package/serialization/resources/charters/types/CharterStatus.d.ts +7 -0
- package/serialization/resources/charters/types/CharterStatus.js +39 -0
- package/serialization/resources/charters/types/CharterSummary.d.ts +22 -0
- package/serialization/resources/charters/types/CharterSummary.js +54 -0
- package/serialization/resources/charters/types/CharterType.d.ts +7 -0
- package/serialization/resources/charters/types/CharterType.js +39 -0
- package/serialization/resources/charters/types/index.d.ts +4 -0
- package/serialization/resources/charters/types/index.js +20 -0
- package/serialization/resources/commons/types/BotObjectResponse.d.ts +0 -1
- package/serialization/resources/commons/types/BotObjectResponse.js +0 -1
- package/serialization/resources/commons/types/{IntelligentFieldCondition.d.ts → FieldCondition.d.ts} +3 -3
- package/serialization/resources/commons/types/{IntelligentFieldCondition.js → FieldCondition.js} +2 -2
- package/serialization/resources/commons/types/IntelligentFieldPrecondition.d.ts +2 -2
- package/serialization/resources/commons/types/IntelligentFieldPrecondition.js +2 -2
- package/serialization/resources/commons/types/IntelligentFieldPreconditionResponse.d.ts +2 -2
- package/serialization/resources/commons/types/IntelligentFieldPreconditionResponse.js +2 -2
- package/serialization/resources/commons/types/KeyValueEntryCondition.d.ts +2 -2
- package/serialization/resources/commons/types/KeyValueEntryCondition.js +2 -2
- package/serialization/resources/commons/types/TextFormat.d.ts +15 -0
- package/serialization/resources/commons/types/TextFormat.js +49 -0
- package/serialization/resources/commons/types/TextFormatJsonSchema.d.ts +10 -0
- package/serialization/resources/commons/types/TextFormatJsonSchema.js +42 -0
- package/serialization/resources/commons/types/TextFormatText.d.ts +7 -0
- package/serialization/resources/commons/types/TextFormatText.js +39 -0
- package/serialization/resources/commons/types/index.d.ts +4 -1
- package/serialization/resources/commons/types/index.js +4 -1
- package/serialization/resources/conversation/types/AskRequest.d.ts +2 -0
- package/serialization/resources/conversation/types/AskRequest.js +2 -0
- package/serialization/resources/conversation/types/AskStreamObjectEvent.d.ts +9 -0
- package/serialization/resources/conversation/types/AskStreamObjectEvent.js +40 -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/NumericConversationField.d.ts +1 -1
- package/serialization/resources/conversation/types/NumericConversationField.js +1 -0
- package/serialization/resources/conversation/types/StreamResponse.d.ts +5 -1
- package/serialization/resources/conversation/types/StreamResponse.js +2 -0
- package/serialization/resources/conversation/types/index.d.ts +1 -0
- package/serialization/resources/conversation/types/index.js +1 -0
- package/serialization/resources/index.d.ts +5 -0
- package/serialization/resources/index.js +6 -1
- package/serialization/resources/intelligentFields/client/index.d.ts +1 -0
- package/serialization/resources/intelligentFields/client/index.js +17 -0
- package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +17 -0
- package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.js +49 -0
- package/serialization/resources/intelligentFields/client/requests/index.d.ts +1 -0
- package/serialization/resources/intelligentFields/client/requests/index.js +5 -0
- package/serialization/resources/intelligentFields/index.d.ts +2 -0
- package/serialization/resources/intelligentFields/index.js +18 -0
- package/serialization/resources/intelligentFields/types/EnumOption.d.ts +10 -0
- package/serialization/resources/intelligentFields/types/EnumOption.js +42 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldBase.d.ts +13 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldBase.js +47 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldCore.d.ts +15 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldCore.js +47 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldDetailResponse.d.ts +11 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldDetailResponse.js +45 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldRequest.d.ts +11 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldRequest.js +45 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +15 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.js +49 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldStatus.d.ts +7 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldStatus.js +39 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldType.d.ts +7 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldType.js +39 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueEntityFilter.d.ts +10 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueEntityFilter.js +42 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueFieldFilter.d.ts +12 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueFieldFilter.js +44 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueSearchRequest.d.ts +20 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueSearchRequest.js +54 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueSearchResponse.d.ts +11 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueSearchResponse.js +45 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueSortField.d.ts +7 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueSortField.js +39 -0
- package/serialization/resources/intelligentFields/types/index.d.ts +13 -0
- package/serialization/resources/intelligentFields/types/index.js +29 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +2 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +2 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +2 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +2 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionProgress.d.ts +11 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionProgress.js +43 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionProgressRequest.d.ts +13 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionProgressRequest.js +45 -0
- package/serialization/resources/knowledge/types/index.d.ts +2 -0
- package/serialization/resources/knowledge/types/index.js +2 -0
- package/serialization/resources/segments/types/SegmentPatchRequest.d.ts +2 -0
- package/serialization/resources/segments/types/SegmentPatchRequest.js +2 -0
- package/serialization/resources/segments/types/SegmentRequest.d.ts +2 -0
- package/serialization/resources/segments/types/SegmentRequest.js +2 -0
- package/serialization/resources/segments/types/SegmentSummary.d.ts +14 -0
- package/serialization/resources/segments/types/SegmentSummary.js +47 -0
- package/serialization/resources/segments/types/index.d.ts +1 -0
- package/serialization/resources/segments/types/index.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/commons/types/IntelligentFieldCondition.d.ts +0 -37
- /package/api/resources/{commons/types/IntelligentFieldCondition.js → charters/types/CharterSummary.js} +0 -0
|
@@ -42,6 +42,38 @@ import type * as MavenAGI from "../../../index";
|
|
|
42
42
|
* type: MavenAGI.AskType.Proactive,
|
|
43
43
|
* text: "Inform the user that they should restart their machine."
|
|
44
44
|
* }
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* {
|
|
48
|
+
* conversationMessageId: {
|
|
49
|
+
* referenceId: "message-0"
|
|
50
|
+
* },
|
|
51
|
+
* userId: {
|
|
52
|
+
* referenceId: "user-0"
|
|
53
|
+
* },
|
|
54
|
+
* text: "Is this customer at risk of churning, and why?",
|
|
55
|
+
* textFormat: {
|
|
56
|
+
* type: "jsonSchema",
|
|
57
|
+
* schema: {
|
|
58
|
+
* "type": "object",
|
|
59
|
+
* "additionalProperties": false,
|
|
60
|
+
* "properties": {
|
|
61
|
+
* "atRisk": {
|
|
62
|
+
* "type": "boolean",
|
|
63
|
+
* "description": "Whether the customer shows churn risk."
|
|
64
|
+
* },
|
|
65
|
+
* "reason": {
|
|
66
|
+
* "type": "string",
|
|
67
|
+
* "description": "A one-sentence explanation of the assessment."
|
|
68
|
+
* }
|
|
69
|
+
* },
|
|
70
|
+
* "required": [
|
|
71
|
+
* "atRisk",
|
|
72
|
+
* "reason"
|
|
73
|
+
* ]
|
|
74
|
+
* }
|
|
75
|
+
* }
|
|
76
|
+
* }
|
|
45
77
|
*/
|
|
46
78
|
export interface AskRequest {
|
|
47
79
|
/** 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. */
|
|
@@ -62,6 +94,33 @@ export interface AskRequest {
|
|
|
62
94
|
* are unaffected.)
|
|
63
95
|
*/
|
|
64
96
|
text?: string;
|
|
97
|
+
/**
|
|
98
|
+
* What form the answer takes. Omit it for prose, or send `jsonSchema` to additionally get a
|
|
99
|
+
* `BotObjectResponse` matching a schema you supply.
|
|
100
|
+
*
|
|
101
|
+
* Set per ask and independent of `type`, so one conversation can mix prose and structured
|
|
102
|
+
* turns. Only the answer's form changes: knowledge, actions, charters and segments apply
|
|
103
|
+
* the same way either way.
|
|
104
|
+
*
|
|
105
|
+
* A structured answer accompanies the prose one rather than replacing it — the same turn
|
|
106
|
+
* produces both, so the conversation stays readable. On `ask_stream` the prose still streams
|
|
107
|
+
* on `text` events as it always has, and the object arrives whole on a single `object` event
|
|
108
|
+
* near the end.
|
|
109
|
+
*
|
|
110
|
+
* Every answering turn carries an object, including one where the agent asks a clarifying
|
|
111
|
+
* question rather than answering. Shape the schema so it can say "not enough information"
|
|
112
|
+
* — a populated object is not on its own evidence of a confident answer.
|
|
113
|
+
*
|
|
114
|
+
* Two exceptions. A turn that asks the user to *act* produces an action form from the
|
|
115
|
+
* action rather than from an answer, so it carries no object; the turn that answers after
|
|
116
|
+
* the form is submitted does carry one. Leave the `FORMS` capability off if you need an
|
|
117
|
+
* object on every turn.
|
|
118
|
+
*
|
|
119
|
+
* A turn answered verbatim by a `STRICT_RETURN` charter also carries no object. That
|
|
120
|
+
* charter's manual is returned exactly as written without consulting the agent, so there is
|
|
121
|
+
* nothing to shape into the requested schema — the turn returns the manual as `text` alone.
|
|
122
|
+
*/
|
|
123
|
+
textFormat?: MavenAGI.TextFormat;
|
|
65
124
|
/**
|
|
66
125
|
* The attachments to the message. Image attachments will be sent to the LLM as additional data.
|
|
67
126
|
* Non-image attachments can be stored and downloaded from the API but will not be sent to the LLM.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* The structured answer for an ask whose `textFormat` was `jsonSchema`, emitted once and already complete. There is nothing to concatenate, and no partial object is ever sent.
|
|
4
|
+
* It arrives late in the stream — the object is only known once the whole answer parses — and alongside the `text` events carrying the prose answer, not instead of them.
|
|
5
|
+
*/
|
|
6
|
+
export interface AskStreamObjectEvent extends MavenAGI.BotObjectResponse {
|
|
7
|
+
}
|
|
@@ -31,7 +31,15 @@ export declare const ConversationField: {
|
|
|
31
31
|
readonly Csat: "Csat";
|
|
32
32
|
readonly OrganizationId: "OrganizationId";
|
|
33
33
|
readonly AgentId: "AgentId";
|
|
34
|
+
/**
|
|
35
|
+
* The environment configured on the agent: DEMO, STAGING, or PRODUCTION. Constant within a
|
|
36
|
+
* single agent, so it only separates conversations on a cross-agent request. */
|
|
37
|
+
readonly AgentEnvironment: "AgentEnvironment";
|
|
34
38
|
readonly InboxItems: "InboxItems";
|
|
35
39
|
readonly InvolvedApps: "InvolvedApps";
|
|
40
|
+
/**
|
|
41
|
+
* Selects an intelligent field rather than a built-in conversation field.
|
|
42
|
+
* When used, `intelligentFieldId` must also be set to identify which field. */
|
|
43
|
+
readonly IntelligentField: "IntelligentField";
|
|
36
44
|
};
|
|
37
45
|
export type ConversationField = (typeof ConversationField)[keyof typeof ConversationField] | string;
|
|
@@ -35,6 +35,14 @@ exports.ConversationField = {
|
|
|
35
35
|
Csat: "Csat",
|
|
36
36
|
OrganizationId: "OrganizationId",
|
|
37
37
|
AgentId: "AgentId",
|
|
38
|
+
/**
|
|
39
|
+
* The environment configured on the agent: DEMO, STAGING, or PRODUCTION. Constant within a
|
|
40
|
+
* single agent, so it only separates conversations on a cross-agent request. */
|
|
41
|
+
AgentEnvironment: "AgentEnvironment",
|
|
38
42
|
InboxItems: "InboxItems",
|
|
39
43
|
InvolvedApps: "InvolvedApps",
|
|
44
|
+
/**
|
|
45
|
+
* Selects an intelligent field rather than a built-in conversation field.
|
|
46
|
+
* When used, `intelligentFieldId` must also be set to identify which field. */
|
|
47
|
+
IntelligentField: "IntelligentField",
|
|
40
48
|
};
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../index";
|
|
2
2
|
export interface ConversationsSearchRequest extends MavenAGI.BasePaginatedRequest {
|
|
3
|
+
/**
|
|
4
|
+
* Field to sort results by. `IntelligentField` is not supported here - sorting conversations
|
|
5
|
+
* by an intelligent field value is not available. Intelligent fields can be filtered on via
|
|
6
|
+
* `filter.intelligentFields`, and grouped or aggregated through the analytics APIs.
|
|
7
|
+
*/
|
|
3
8
|
sort?: MavenAGI.ConversationField;
|
|
4
9
|
filter?: MavenAGI.ConversationFilter;
|
|
5
10
|
}
|
|
@@ -10,5 +10,9 @@ export declare const NumericConversationField: {
|
|
|
10
10
|
readonly Csat: "Csat";
|
|
11
11
|
readonly ActionExecutionCount: "ActionExecutionCount";
|
|
12
12
|
readonly ActionErrorCount: "ActionErrorCount";
|
|
13
|
+
/**
|
|
14
|
+
* Selects a NUMBER-validated intelligent field rather than a built-in numeric field.
|
|
15
|
+
* When used, `intelligentFieldId` must also be set to identify which field. */
|
|
16
|
+
readonly IntelligentField: "IntelligentField";
|
|
13
17
|
};
|
|
14
18
|
export type NumericConversationField = (typeof NumericConversationField)[keyof typeof NumericConversationField] | string;
|
|
@@ -14,4 +14,8 @@ exports.NumericConversationField = {
|
|
|
14
14
|
Csat: "Csat",
|
|
15
15
|
ActionExecutionCount: "ActionExecutionCount",
|
|
16
16
|
ActionErrorCount: "ActionErrorCount",
|
|
17
|
+
/**
|
|
18
|
+
* Selects a NUMBER-validated intelligent field rather than a built-in numeric field.
|
|
19
|
+
* When used, `intelligentFieldId` must also be set to identify which field. */
|
|
20
|
+
IntelligentField: "IntelligentField",
|
|
17
21
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../index";
|
|
2
|
-
export type StreamResponse = MavenAGI.StreamResponse.Text | MavenAGI.StreamResponse.Action | MavenAGI.StreamResponse.OauthButton | MavenAGI.StreamResponse.Chart | MavenAGI.StreamResponse.Metadata | MavenAGI.StreamResponse.Start | MavenAGI.StreamResponse.End;
|
|
2
|
+
export type StreamResponse = MavenAGI.StreamResponse.Text | MavenAGI.StreamResponse.Action | MavenAGI.StreamResponse.OauthButton | MavenAGI.StreamResponse.Chart | MavenAGI.StreamResponse.Object | MavenAGI.StreamResponse.Metadata | MavenAGI.StreamResponse.Start | MavenAGI.StreamResponse.End;
|
|
3
3
|
export declare namespace StreamResponse {
|
|
4
4
|
interface Text extends MavenAGI.AskStreamTextEvent {
|
|
5
5
|
eventType: "text";
|
|
@@ -13,6 +13,9 @@ export declare namespace StreamResponse {
|
|
|
13
13
|
interface Chart extends MavenAGI.AskStreamChartEvent {
|
|
14
14
|
eventType: "chart";
|
|
15
15
|
}
|
|
16
|
+
interface Object extends MavenAGI.AskStreamObjectEvent {
|
|
17
|
+
eventType: "object";
|
|
18
|
+
}
|
|
16
19
|
interface Metadata extends MavenAGI.AskStreamMetadataEvent {
|
|
17
20
|
eventType: "metadata";
|
|
18
21
|
}
|
|
@@ -6,6 +6,7 @@ export * from "./AskStreamChartEvent";
|
|
|
6
6
|
export * from "./AskStreamEndEvent";
|
|
7
7
|
export * from "./AskStreamMetadataEvent";
|
|
8
8
|
export * from "./AskStreamOAuthButtonEvent";
|
|
9
|
+
export * from "./AskStreamObjectEvent";
|
|
9
10
|
export * from "./AskStreamStartEvent";
|
|
10
11
|
export * from "./AskStreamTextEvent";
|
|
11
12
|
export * from "./BillableFilterField";
|
|
@@ -22,6 +22,7 @@ __exportStar(require("./AskStreamChartEvent"), exports);
|
|
|
22
22
|
__exportStar(require("./AskStreamEndEvent"), exports);
|
|
23
23
|
__exportStar(require("./AskStreamMetadataEvent"), exports);
|
|
24
24
|
__exportStar(require("./AskStreamOAuthButtonEvent"), exports);
|
|
25
|
+
__exportStar(require("./AskStreamObjectEvent"), exports);
|
|
25
26
|
__exportStar(require("./AskStreamStartEvent"), exports);
|
|
26
27
|
__exportStar(require("./AskStreamTextEvent"), exports);
|
|
27
28
|
__exportStar(require("./BillableFilterField"), exports);
|
package/api/resources/index.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export * from "./appSettings/client/requests";
|
|
|
11
11
|
export * from "./appSettings/types";
|
|
12
12
|
export * as assets from "./assets";
|
|
13
13
|
export * from "./assets/types";
|
|
14
|
+
export * as charters from "./charters";
|
|
15
|
+
export * from "./charters/types";
|
|
14
16
|
export * as commons from "./commons";
|
|
15
17
|
export * from "./commons/errors";
|
|
16
18
|
export * from "./commons/types";
|
|
@@ -29,6 +31,9 @@ export * from "./inbox/client/requests";
|
|
|
29
31
|
export * from "./inbox/types";
|
|
30
32
|
export * as integrations from "./integrations";
|
|
31
33
|
export * from "./integrations/types";
|
|
34
|
+
export * as intelligentFields from "./intelligentFields";
|
|
35
|
+
export * from "./intelligentFields/client/requests";
|
|
36
|
+
export * from "./intelligentFields/types";
|
|
32
37
|
export * as knowledge from "./knowledge";
|
|
33
38
|
export * from "./knowledge/client/requests";
|
|
34
39
|
export * from "./knowledge/types";
|
package/api/resources/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.voiceConversations = exports.voice = exports.users = exports.triggers = exports.translations = exports.segments = exports.organizations = exports.knowledge = exports.integrations = exports.inbox = exports.events = exports.developersCommons = exports.customers = exports.conversation = exports.commons = exports.assets = exports.appSettings = exports.analytics = exports.agents = exports.actions = void 0;
|
|
39
|
+
exports.voiceConversations = exports.voice = exports.users = exports.triggers = exports.translations = exports.segments = exports.organizations = exports.knowledge = exports.intelligentFields = exports.integrations = exports.inbox = exports.events = exports.developersCommons = exports.customers = exports.conversation = exports.commons = exports.charters = exports.assets = exports.appSettings = exports.analytics = exports.agents = exports.actions = void 0;
|
|
40
40
|
exports.actions = __importStar(require("./actions"));
|
|
41
41
|
__exportStar(require("./actions/client/requests"), exports);
|
|
42
42
|
__exportStar(require("./actions/types"), exports);
|
|
@@ -50,6 +50,8 @@ __exportStar(require("./appSettings/client/requests"), exports);
|
|
|
50
50
|
__exportStar(require("./appSettings/types"), exports);
|
|
51
51
|
exports.assets = __importStar(require("./assets"));
|
|
52
52
|
__exportStar(require("./assets/types"), exports);
|
|
53
|
+
exports.charters = __importStar(require("./charters"));
|
|
54
|
+
__exportStar(require("./charters/types"), exports);
|
|
53
55
|
exports.commons = __importStar(require("./commons"));
|
|
54
56
|
__exportStar(require("./commons/errors"), exports);
|
|
55
57
|
__exportStar(require("./commons/types"), exports);
|
|
@@ -68,6 +70,9 @@ __exportStar(require("./inbox/client/requests"), exports);
|
|
|
68
70
|
__exportStar(require("./inbox/types"), exports);
|
|
69
71
|
exports.integrations = __importStar(require("./integrations"));
|
|
70
72
|
__exportStar(require("./integrations/types"), exports);
|
|
73
|
+
exports.intelligentFields = __importStar(require("./intelligentFields"));
|
|
74
|
+
__exportStar(require("./intelligentFields/client/requests"), exports);
|
|
75
|
+
__exportStar(require("./intelligentFields/types"), exports);
|
|
71
76
|
exports.knowledge = __importStar(require("./knowledge"));
|
|
72
77
|
__exportStar(require("./knowledge/client/requests"), exports);
|
|
73
78
|
__exportStar(require("./knowledge/types"), exports);
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient";
|
|
3
|
+
import * as core from "../../../../core";
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
export declare namespace IntelligentFieldsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class IntelligentFieldsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<IntelligentFieldsClient.Options>;
|
|
12
|
+
constructor(options: IntelligentFieldsClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Create a new intelligent field. Intelligent fields are used to store custom LLM-generated values on entities like conversations or events.
|
|
15
|
+
*
|
|
16
|
+
* @param {MavenAGI.IntelligentFieldRequest} request
|
|
17
|
+
* @param {IntelligentFieldsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
20
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
21
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
22
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
23
|
+
* @throws {@link MavenAGI.ServerError}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* await client.intelligentFields.createOrUpdate({
|
|
27
|
+
* fieldId: {
|
|
28
|
+
* referenceId: "ticket-priority"
|
|
29
|
+
* },
|
|
30
|
+
* name: "Ticket Priority",
|
|
31
|
+
* description: "The priority of the conversation based on urgency",
|
|
32
|
+
* entityType: "CONVERSATION",
|
|
33
|
+
* validationType: "STRING",
|
|
34
|
+
* enumOptions: [{
|
|
35
|
+
* value: "HIGH",
|
|
36
|
+
* label: "High Priority"
|
|
37
|
+
* }, {
|
|
38
|
+
* value: "MEDIUM",
|
|
39
|
+
* label: "Medium Priority"
|
|
40
|
+
* }, {
|
|
41
|
+
* value: "LOW",
|
|
42
|
+
* label: "Low Priority"
|
|
43
|
+
* }],
|
|
44
|
+
* definition: "The priority of the conversation based on the urgency and importance; draw from the content / messages in the conversation; must be one of HIGH, MEDIUM, or LOW."
|
|
45
|
+
* })
|
|
46
|
+
*/
|
|
47
|
+
createOrUpdate(request: MavenAGI.IntelligentFieldRequest, requestOptions?: IntelligentFieldsClient.RequestOptions): core.HttpResponsePromise<MavenAGI.IntelligentFieldResponse>;
|
|
48
|
+
private __createOrUpdate;
|
|
49
|
+
/**
|
|
50
|
+
* Get an intelligent field by its supplied ID
|
|
51
|
+
*
|
|
52
|
+
* @param {string} fieldReferenceId - The reference ID of the intelligent field to get. All other entity ID fields are inferred from the request.
|
|
53
|
+
* @param {MavenAGI.IntelligentFieldGetRequest} request
|
|
54
|
+
* @param {IntelligentFieldsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
|
+
*
|
|
56
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
57
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
58
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
59
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
60
|
+
* @throws {@link MavenAGI.ServerError}
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* await client.intelligentFields.get("ticket-priority")
|
|
64
|
+
*/
|
|
65
|
+
get(fieldReferenceId: string, request?: MavenAGI.IntelligentFieldGetRequest, requestOptions?: IntelligentFieldsClient.RequestOptions): core.HttpResponsePromise<MavenAGI.IntelligentFieldDetailResponse>;
|
|
66
|
+
private __get;
|
|
67
|
+
/**
|
|
68
|
+
* Patch an intelligent field. Can be used to update the definition, status, or other mutable properties.
|
|
69
|
+
*
|
|
70
|
+
* @param {string} fieldReferenceId - The reference ID of the intelligent field to patch.
|
|
71
|
+
* @param {MavenAGI.IntelligentFieldPatchRequest} request
|
|
72
|
+
* @param {IntelligentFieldsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
73
|
+
*
|
|
74
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
75
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
76
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
77
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
78
|
+
* @throws {@link MavenAGI.ServerError}
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* await client.intelligentFields.patch("ticket-priority", {
|
|
82
|
+
* definition: "The priority of the conversation based on the urgency and importance; draw from the content / messages in the conversation; must be one of HIGH, MEDIUM, or LOW."
|
|
83
|
+
* })
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* await client.intelligentFields.patch("ticket-priority", {
|
|
87
|
+
* status: "INACTIVE"
|
|
88
|
+
* })
|
|
89
|
+
*/
|
|
90
|
+
patch(fieldReferenceId: string, request?: MavenAGI.IntelligentFieldPatchRequest, requestOptions?: IntelligentFieldsClient.RequestOptions): core.HttpResponsePromise<MavenAGI.IntelligentFieldResponse>;
|
|
91
|
+
private __patch;
|
|
92
|
+
/**
|
|
93
|
+
* Soft delete an intelligent field. Only INACTIVE fields can be deleted.
|
|
94
|
+
*
|
|
95
|
+
* Deleted fields are excluded from search results but can still be retrieved by ID.
|
|
96
|
+
* Creating a new field with the same referenceId as a deleted field will overwrite
|
|
97
|
+
* the deleted field and restore it to INACTIVE status.
|
|
98
|
+
*
|
|
99
|
+
* Deleted fields cannot be modified.
|
|
100
|
+
*
|
|
101
|
+
* @param {string} fieldReferenceId - The reference ID of the intelligent field to delete.
|
|
102
|
+
* @param {MavenAGI.IntelligentFieldDeleteRequest} request
|
|
103
|
+
* @param {IntelligentFieldsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
104
|
+
*
|
|
105
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
106
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
107
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
108
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
109
|
+
* @throws {@link MavenAGI.ServerError}
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* await client.intelligentFields.delete("ticket-priority")
|
|
113
|
+
*/
|
|
114
|
+
delete(fieldReferenceId: string, request?: MavenAGI.IntelligentFieldDeleteRequest, requestOptions?: IntelligentFieldsClient.RequestOptions): core.HttpResponsePromise<MavenAGI.IntelligentFieldResponse>;
|
|
115
|
+
private __delete;
|
|
116
|
+
/**
|
|
117
|
+
* Search computed values for intelligent fields across entities. Supports filtering by field properties and target entity.
|
|
118
|
+
*
|
|
119
|
+
* @param {MavenAGI.IntelligentFieldValueSearchRequest} request
|
|
120
|
+
* @param {IntelligentFieldsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
121
|
+
*
|
|
122
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
123
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
124
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
125
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
126
|
+
* @throws {@link MavenAGI.ServerError}
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* await client.intelligentFields.searchValues({
|
|
130
|
+
* fieldFilter: {
|
|
131
|
+
* fieldIds: [{
|
|
132
|
+
* referenceId: "ticket-priority",
|
|
133
|
+
* appId: "zendesk",
|
|
134
|
+
* type: "INTELLIGENT_FIELD",
|
|
135
|
+
* organizationId: "acme",
|
|
136
|
+
* agentId: "support"
|
|
137
|
+
* }]
|
|
138
|
+
* },
|
|
139
|
+
* entityFilter: {
|
|
140
|
+
* entityIds: [{
|
|
141
|
+
* referenceId: "conv-123",
|
|
142
|
+
* appId: "zendesk",
|
|
143
|
+
* type: "CONVERSATION",
|
|
144
|
+
* organizationId: "acme",
|
|
145
|
+
* agentId: "support"
|
|
146
|
+
* }]
|
|
147
|
+
* },
|
|
148
|
+
* page: 0,
|
|
149
|
+
* size: 20,
|
|
150
|
+
* sort: "CREATED_AT",
|
|
151
|
+
* sortDesc: true
|
|
152
|
+
* })
|
|
153
|
+
*/
|
|
154
|
+
searchValues(request: MavenAGI.IntelligentFieldValueSearchRequest, requestOptions?: IntelligentFieldsClient.RequestOptions): core.HttpResponsePromise<MavenAGI.IntelligentFieldValueSearchResponse>;
|
|
155
|
+
private __searchValues;
|
|
156
|
+
}
|