mavenagi 1.2.50 → 1.2.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BaseClient.js +2 -2
- package/api/resources/commons/types/BaseAttachment.d.ts +2 -0
- package/api/resources/commons/types/BaseConversationResponse.d.ts +7 -0
- package/api/resources/commons/types/ConversationExecutedActionPrecondition.d.ts +2 -0
- package/api/resources/commons/types/ConversationKickoffExecutionResponse.d.ts +23 -0
- package/api/resources/commons/types/ConversationPrecondition.d.ts +4 -1
- package/api/resources/commons/types/ConversationPreconditionResponse.d.ts +4 -1
- package/api/resources/commons/types/ConversationRound.d.ts +13 -0
- package/api/resources/commons/types/ConversationRound.js +16 -0
- package/api/resources/commons/types/ConversationState.d.ts +6 -0
- package/api/resources/commons/types/ConversationState.js +9 -0
- package/api/resources/commons/types/ConversationStatePrecondition.d.ts +5 -0
- package/api/resources/commons/types/ConversationStatePrecondition.js +3 -0
- package/api/resources/commons/types/EntityType.d.ts +1 -0
- package/api/resources/commons/types/EntityType.js +1 -0
- package/api/resources/commons/types/InitializeConversationResponse.d.ts +5 -4
- package/api/resources/commons/types/RelationshipType.d.ts +12 -0
- package/api/resources/commons/types/RelationshipType.js +15 -0
- package/api/resources/commons/types/index.d.ts +5 -1
- package/api/resources/commons/types/index.js +5 -1
- package/api/resources/conversation/types/BillableFilterField.d.ts +12 -0
- package/api/resources/conversation/types/BillableFilterField.js +15 -0
- package/api/resources/conversation/types/ConversationFilter.d.ts +26 -2
- package/api/resources/conversation/types/ConversationRequest.d.ts +2 -0
- package/api/resources/conversation/types/index.d.ts +1 -0
- package/api/resources/conversation/types/index.js +1 -0
- package/api/resources/knowledge/types/KnowledgeBaseFilter.d.ts +2 -0
- package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +11 -2
- package/package.json +1 -1
- package/reference.md +22 -22
- package/serialization/resources/commons/types/BaseConversationResponse.d.ts +2 -0
- package/serialization/resources/commons/types/BaseConversationResponse.js +4 -0
- package/serialization/resources/commons/types/ConversationExecutedActionPrecondition.d.ts +2 -0
- package/serialization/resources/commons/types/ConversationExecutedActionPrecondition.js +2 -0
- package/serialization/resources/commons/types/ConversationKickoffExecutionResponse.d.ts +16 -0
- package/serialization/resources/commons/types/ConversationKickoffExecutionResponse.js +48 -0
- package/serialization/resources/commons/types/ConversationPrecondition.d.ts +5 -1
- package/serialization/resources/commons/types/ConversationPrecondition.js +2 -0
- package/serialization/resources/commons/types/ConversationPreconditionResponse.d.ts +5 -1
- package/serialization/resources/commons/types/ConversationPreconditionResponse.js +2 -0
- package/serialization/resources/commons/types/ConversationRound.d.ts +7 -0
- package/serialization/resources/commons/types/{ConversationKickoffResult.js → ConversationRound.js} +2 -6
- package/serialization/resources/commons/types/ConversationState.d.ts +7 -0
- package/serialization/resources/commons/types/ConversationState.js +39 -0
- package/serialization/resources/commons/types/ConversationStatePrecondition.d.ts +11 -0
- package/serialization/resources/commons/types/ConversationStatePrecondition.js +45 -0
- package/serialization/resources/commons/types/EntityType.d.ts +1 -1
- package/serialization/resources/commons/types/EntityType.js +1 -0
- package/serialization/resources/commons/types/InitializeConversationResponse.d.ts +2 -2
- package/serialization/resources/commons/types/InitializeConversationResponse.js +2 -2
- package/serialization/resources/commons/types/RelationshipType.d.ts +7 -0
- package/serialization/resources/commons/types/RelationshipType.js +39 -0
- package/serialization/resources/commons/types/index.d.ts +5 -1
- package/serialization/resources/commons/types/index.js +5 -1
- package/serialization/resources/conversation/types/BillableFilterField.d.ts +7 -0
- package/serialization/resources/conversation/types/BillableFilterField.js +39 -0
- package/serialization/resources/conversation/types/ConversationFilter.d.ts +2 -0
- package/serialization/resources/conversation/types/ConversationFilter.js +2 -0
- package/serialization/resources/conversation/types/ConversationRequest.d.ts +2 -0
- package/serialization/resources/conversation/types/ConversationRequest.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/knowledge/types/KnowledgeBaseFilter.d.ts +2 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseFilter.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/commons/types/ConversationKickoffResult.d.ts +0 -7
- package/serialization/resources/commons/types/ConversationKickoffResult.d.ts +0 -11
- /package/api/resources/commons/types/{ConversationKickoffResult.js → ConversationKickoffExecutionResponse.js} +0 -0
package/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "mavenagi",
|
|
46
|
-
"X-Fern-SDK-Version": "1.2.
|
|
47
|
-
"User-Agent": "mavenagi/1.2.
|
|
46
|
+
"X-Fern-SDK-Version": "1.2.52",
|
|
47
|
+
"User-Agent": "mavenagi/1.2.52",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
"X-Organization-Id": options === null || options === void 0 ? void 0 : options.organizationId,
|
|
@@ -8,6 +8,8 @@ export interface BaseAttachment {
|
|
|
8
8
|
* - image/webp
|
|
9
9
|
* - application/pdf
|
|
10
10
|
* - text/plain
|
|
11
|
+
* - text/markdown
|
|
12
|
+
* - text/x-markdown
|
|
11
13
|
* - text/csv
|
|
12
14
|
* - application/vnd.openxmlformats-officedocument.wordprocessingml.document
|
|
13
15
|
* - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
|
@@ -40,4 +40,11 @@ export interface BaseConversationResponse {
|
|
|
40
40
|
* Simulation conversations are excluded from normal search results unless explicitly included via the `simulationFilter` field.
|
|
41
41
|
*/
|
|
42
42
|
simulationContext?: MavenAGI.SimulationContext;
|
|
43
|
+
/**
|
|
44
|
+
* Related entity ids grouped by relationship type.
|
|
45
|
+
*
|
|
46
|
+
* - `SPAWN_FROM`: the conversation this one was spawned from (set via `ConversationCreateRequest.spawnedFromConversationId`).
|
|
47
|
+
* - `SPAWN_TO`: the conversations that were spawned from this conversation.
|
|
48
|
+
*/
|
|
49
|
+
relatedEntities?: Partial<Record<MavenAGI.RelationshipType, MavenAGI.EntityId[]>>;
|
|
43
50
|
}
|
|
@@ -4,4 +4,6 @@ export interface ConversationExecutedActionPrecondition extends MavenAGI.Precond
|
|
|
4
4
|
actionId: string;
|
|
5
5
|
/** App ID that the given actionId belongs to. If not provided, the calling appId will be used. */
|
|
6
6
|
appId?: string;
|
|
7
|
+
/** Restricts which round the action must have executed in. Defaults to ANY when omitted, matching an action executed in any round. */
|
|
8
|
+
conversationRound?: MavenAGI.ConversationRound;
|
|
7
9
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* A single persisted Conversation Kickoff execution result, with timing.
|
|
4
|
+
*/
|
|
5
|
+
export interface ConversationKickoffExecutionResponse {
|
|
6
|
+
/** The kickoff config (external) id that ran. */
|
|
7
|
+
referenceId?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The Maven app that registered the kickoff. Combined with referenceId this identifies
|
|
10
|
+
* the kickoff.
|
|
11
|
+
*/
|
|
12
|
+
appId?: string;
|
|
13
|
+
/** Whether the Conversation Kickoff completed successfully. */
|
|
14
|
+
status: MavenAGI.ConversationKickoffStatus;
|
|
15
|
+
/** Additional detail about the Conversation Kickoff result. */
|
|
16
|
+
message?: string;
|
|
17
|
+
/** When the Conversation Kickoff started. */
|
|
18
|
+
startedAt?: Date;
|
|
19
|
+
/** When the Conversation Kickoff completed. */
|
|
20
|
+
completedAt?: Date;
|
|
21
|
+
/** How long the Conversation Kickoff took, in milliseconds. */
|
|
22
|
+
durationMs?: number;
|
|
23
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../index";
|
|
2
|
-
export type ConversationPrecondition = MavenAGI.ConversationPrecondition.Tags | MavenAGI.ConversationPrecondition.Metadata | MavenAGI.ConversationPrecondition.ActionExecuted | MavenAGI.ConversationPrecondition.ResponseConfig | MavenAGI.ConversationPrecondition.App | MavenAGI.ConversationPrecondition.IntelligentField;
|
|
2
|
+
export type ConversationPrecondition = MavenAGI.ConversationPrecondition.Tags | MavenAGI.ConversationPrecondition.Metadata | MavenAGI.ConversationPrecondition.ActionExecuted | MavenAGI.ConversationPrecondition.ResponseConfig | MavenAGI.ConversationPrecondition.App | MavenAGI.ConversationPrecondition.ConversationState | MavenAGI.ConversationPrecondition.IntelligentField;
|
|
3
3
|
export declare namespace ConversationPrecondition {
|
|
4
4
|
interface Tags extends MavenAGI.TagsPrecondition {
|
|
5
5
|
conversationPreconditionType: "tags";
|
|
@@ -16,6 +16,9 @@ export declare namespace ConversationPrecondition {
|
|
|
16
16
|
interface App extends MavenAGI.AppPrecondition {
|
|
17
17
|
conversationPreconditionType: "app";
|
|
18
18
|
}
|
|
19
|
+
interface ConversationState extends MavenAGI.ConversationStatePrecondition {
|
|
20
|
+
conversationPreconditionType: "conversationState";
|
|
21
|
+
}
|
|
19
22
|
interface IntelligentField extends MavenAGI.IntelligentFieldPrecondition {
|
|
20
23
|
conversationPreconditionType: "intelligentField";
|
|
21
24
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../index";
|
|
2
|
-
export type ConversationPreconditionResponse = MavenAGI.ConversationPreconditionResponse.Tags | MavenAGI.ConversationPreconditionResponse.Metadata | MavenAGI.ConversationPreconditionResponse.ActionExecuted | MavenAGI.ConversationPreconditionResponse.ResponseConfig | MavenAGI.ConversationPreconditionResponse.App | MavenAGI.ConversationPreconditionResponse.IntelligentField;
|
|
2
|
+
export type ConversationPreconditionResponse = MavenAGI.ConversationPreconditionResponse.Tags | MavenAGI.ConversationPreconditionResponse.Metadata | MavenAGI.ConversationPreconditionResponse.ActionExecuted | MavenAGI.ConversationPreconditionResponse.ResponseConfig | MavenAGI.ConversationPreconditionResponse.App | MavenAGI.ConversationPreconditionResponse.ConversationState | MavenAGI.ConversationPreconditionResponse.IntelligentField;
|
|
3
3
|
export declare namespace ConversationPreconditionResponse {
|
|
4
4
|
interface Tags extends MavenAGI.TagsPrecondition {
|
|
5
5
|
conversationPreconditionType: "tags";
|
|
@@ -16,6 +16,9 @@ export declare namespace ConversationPreconditionResponse {
|
|
|
16
16
|
interface App extends MavenAGI.AppPrecondition {
|
|
17
17
|
conversationPreconditionType: "app";
|
|
18
18
|
}
|
|
19
|
+
interface ConversationState extends MavenAGI.ConversationStatePrecondition {
|
|
20
|
+
conversationPreconditionType: "conversationState";
|
|
21
|
+
}
|
|
19
22
|
interface IntelligentField extends MavenAGI.IntelligentFieldPreconditionResponse {
|
|
20
23
|
conversationPreconditionType: "intelligentField";
|
|
21
24
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Which round of the conversation an action must have executed in for a ConversationExecutedActionPrecondition to be met. A round is a single bot response to the user; the current round is the bot response being generated now. */
|
|
2
|
+
export declare const ConversationRound: {
|
|
3
|
+
/**
|
|
4
|
+
* The action has executed in any round of the conversation. */
|
|
5
|
+
readonly Any: "ANY";
|
|
6
|
+
/**
|
|
7
|
+
* The action has executed in the current round — the bot response being generated now. */
|
|
8
|
+
readonly Current: "CURRENT";
|
|
9
|
+
/**
|
|
10
|
+
* The action has executed in a round before the current round. */
|
|
11
|
+
readonly Previous: "PREVIOUS";
|
|
12
|
+
};
|
|
13
|
+
export type ConversationRound = (typeof ConversationRound)[keyof typeof ConversationRound] | string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ConversationRound = void 0;
|
|
5
|
+
/** Which round of the conversation an action must have executed in for a ConversationExecutedActionPrecondition to be met. A round is a single bot response to the user; the current round is the bot response being generated now. */
|
|
6
|
+
exports.ConversationRound = {
|
|
7
|
+
/**
|
|
8
|
+
* The action has executed in any round of the conversation. */
|
|
9
|
+
Any: "ANY",
|
|
10
|
+
/**
|
|
11
|
+
* The action has executed in the current round — the bot response being generated now. */
|
|
12
|
+
Current: "CURRENT",
|
|
13
|
+
/**
|
|
14
|
+
* The action has executed in a round before the current round. */
|
|
15
|
+
Previous: "PREVIOUS",
|
|
16
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const ConversationState: {
|
|
2
|
+
/**
|
|
3
|
+
* The welcome state — the very first round of the conversation, before the bot has sent a message to the user. */
|
|
4
|
+
readonly Welcome: "WELCOME";
|
|
5
|
+
};
|
|
6
|
+
export type ConversationState = (typeof ConversationState)[keyof typeof ConversationState] | string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ConversationState = void 0;
|
|
5
|
+
exports.ConversationState = {
|
|
6
|
+
/**
|
|
7
|
+
* The welcome state — the very first round of the conversation, before the bot has sent a message to the user. */
|
|
8
|
+
Welcome: "WELCOME",
|
|
9
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
export interface ConversationStatePrecondition extends MavenAGI.PreconditionBase {
|
|
3
|
+
/** The conversation state that must be active for the precondition to be met. Combine with the NOT operator to match every state except this one (e.g. NOT + WELCOME gates on "not the welcome state"). */
|
|
4
|
+
state: MavenAGI.ConversationState;
|
|
5
|
+
}
|
|
@@ -20,5 +20,6 @@ export declare const EntityType: {
|
|
|
20
20
|
readonly ConversationKickoff: "CONVERSATION_KICKOFF";
|
|
21
21
|
readonly AgentVariant: "AGENT_VARIANT";
|
|
22
22
|
readonly ConfigSnapshot: "CONFIG_SNAPSHOT";
|
|
23
|
+
readonly Asset: "ASSET";
|
|
23
24
|
};
|
|
24
25
|
export type EntityType = (typeof EntityType)[keyof typeof EntityType] | string;
|
|
@@ -6,9 +6,10 @@ import type * as MavenAGI from "../../../index";
|
|
|
6
6
|
*/
|
|
7
7
|
export interface InitializeConversationResponse extends MavenAGI.ConversationResponse {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* do not
|
|
9
|
+
* Results of the Conversation Kickoffs that ran during conversation initialization, one
|
|
10
|
+
* entry per kickoff in the order they were recorded. Empty when no kickoff ran. Only
|
|
11
|
+
* present on this initialize response; other endpoints that return a conversation do not
|
|
12
|
+
* include it.
|
|
12
13
|
*/
|
|
13
|
-
|
|
14
|
+
conversationKickoffResults: MavenAGI.ConversationKickoffExecutionResponse[];
|
|
14
15
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The kind of relationship (edge) between two entities. Names the edge,
|
|
3
|
+
* not the node — `EntityId` already carries the node type.
|
|
4
|
+
*
|
|
5
|
+
* * `SPAWN_FROM`: the entity this one was spawned from.
|
|
6
|
+
* * `SPAWN_TO`: the entities that were spawned from this one.
|
|
7
|
+
*/
|
|
8
|
+
export declare const RelationshipType: {
|
|
9
|
+
readonly SpawnFrom: "SPAWN_FROM";
|
|
10
|
+
readonly SpawnTo: "SPAWN_TO";
|
|
11
|
+
};
|
|
12
|
+
export type RelationshipType = (typeof RelationshipType)[keyof typeof RelationshipType] | string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.RelationshipType = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* The kind of relationship (edge) between two entities. Names the edge,
|
|
7
|
+
* not the node — `EntityId` already carries the node type.
|
|
8
|
+
*
|
|
9
|
+
* * `SPAWN_FROM`: the entity this one was spawned from.
|
|
10
|
+
* * `SPAWN_TO`: the entities that were spawned from this one.
|
|
11
|
+
*/
|
|
12
|
+
exports.RelationshipType = {
|
|
13
|
+
SpawnFrom: "SPAWN_FROM",
|
|
14
|
+
SpawnTo: "SPAWN_TO",
|
|
15
|
+
};
|
|
@@ -59,7 +59,7 @@ export * from "./ContextInfo";
|
|
|
59
59
|
export * from "./ConversationAnalysis";
|
|
60
60
|
export * from "./ConversationExecutedActionPrecondition";
|
|
61
61
|
export * from "./ConversationInformation";
|
|
62
|
-
export * from "./
|
|
62
|
+
export * from "./ConversationKickoffExecutionResponse";
|
|
63
63
|
export * from "./ConversationKickoffStatus";
|
|
64
64
|
export * from "./ConversationMessageBase";
|
|
65
65
|
export * from "./ConversationMessageResponse";
|
|
@@ -67,6 +67,9 @@ export * from "./ConversationPrecondition";
|
|
|
67
67
|
export * from "./ConversationPreconditionResponse";
|
|
68
68
|
export * from "./ConversationPreview";
|
|
69
69
|
export * from "./ConversationResponse";
|
|
70
|
+
export * from "./ConversationRound";
|
|
71
|
+
export * from "./ConversationState";
|
|
72
|
+
export * from "./ConversationStatePrecondition";
|
|
70
73
|
export * from "./ConversationSummary";
|
|
71
74
|
export * from "./CsatInfo";
|
|
72
75
|
export * from "./DeviceInfo";
|
|
@@ -155,6 +158,7 @@ export * from "./PresenceCondition";
|
|
|
155
158
|
export * from "./PresenceOperator";
|
|
156
159
|
export * from "./Quality";
|
|
157
160
|
export * from "./QualityReason";
|
|
161
|
+
export * from "./RelationshipType";
|
|
158
162
|
export * from "./ResolutionStatus";
|
|
159
163
|
export * from "./ResponseConfig";
|
|
160
164
|
export * from "./ResponseConfigPrecondition";
|
|
@@ -75,7 +75,7 @@ __exportStar(require("./ContextInfo"), exports);
|
|
|
75
75
|
__exportStar(require("./ConversationAnalysis"), exports);
|
|
76
76
|
__exportStar(require("./ConversationExecutedActionPrecondition"), exports);
|
|
77
77
|
__exportStar(require("./ConversationInformation"), exports);
|
|
78
|
-
__exportStar(require("./
|
|
78
|
+
__exportStar(require("./ConversationKickoffExecutionResponse"), exports);
|
|
79
79
|
__exportStar(require("./ConversationKickoffStatus"), exports);
|
|
80
80
|
__exportStar(require("./ConversationMessageBase"), exports);
|
|
81
81
|
__exportStar(require("./ConversationMessageResponse"), exports);
|
|
@@ -83,6 +83,9 @@ __exportStar(require("./ConversationPrecondition"), exports);
|
|
|
83
83
|
__exportStar(require("./ConversationPreconditionResponse"), exports);
|
|
84
84
|
__exportStar(require("./ConversationPreview"), exports);
|
|
85
85
|
__exportStar(require("./ConversationResponse"), exports);
|
|
86
|
+
__exportStar(require("./ConversationRound"), exports);
|
|
87
|
+
__exportStar(require("./ConversationState"), exports);
|
|
88
|
+
__exportStar(require("./ConversationStatePrecondition"), exports);
|
|
86
89
|
__exportStar(require("./ConversationSummary"), exports);
|
|
87
90
|
__exportStar(require("./CsatInfo"), exports);
|
|
88
91
|
__exportStar(require("./DeviceInfo"), exports);
|
|
@@ -171,6 +174,7 @@ __exportStar(require("./PresenceCondition"), exports);
|
|
|
171
174
|
__exportStar(require("./PresenceOperator"), exports);
|
|
172
175
|
__exportStar(require("./Quality"), exports);
|
|
173
176
|
__exportStar(require("./QualityReason"), exports);
|
|
177
|
+
__exportStar(require("./RelationshipType"), exports);
|
|
174
178
|
__exportStar(require("./ResolutionStatus"), exports);
|
|
175
179
|
__exportStar(require("./ResponseConfig"), exports);
|
|
176
180
|
__exportStar(require("./ResponseConfigPrecondition"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fields used to filter conversations by billing status:
|
|
3
|
+
* - ELIGIBLE_AND_BILLABLE: Billable conversations with a RESOLVED resolution status.
|
|
4
|
+
* - ELIGIBLE_AND_NOT_BILLABLE: Conversations eligible for billing consideration but not currently billable. Includes ERROR, IN_PROGRESS, ESCALATED, INCOMPLETE, and NEGATIVE_FEEDBACK.
|
|
5
|
+
* - INELIGIBLE: Conversations excluded from billing consideration. Includes CONTENT_SAFETY_FLAGGED, PROMPT_ATTACK_FLAGGED, HANGUP, INELIGIBLE, and UNKNOWN.
|
|
6
|
+
*/
|
|
7
|
+
export declare const BillableFilterField: {
|
|
8
|
+
readonly EligibleAndBillable: "ELIGIBLE_AND_BILLABLE";
|
|
9
|
+
readonly EligibleAndNotBillable: "ELIGIBLE_AND_NOT_BILLABLE";
|
|
10
|
+
readonly Ineligible: "INELIGIBLE";
|
|
11
|
+
};
|
|
12
|
+
export type BillableFilterField = (typeof BillableFilterField)[keyof typeof BillableFilterField] | string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.BillableFilterField = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Fields used to filter conversations by billing status:
|
|
7
|
+
* - ELIGIBLE_AND_BILLABLE: Billable conversations with a RESOLVED resolution status.
|
|
8
|
+
* - ELIGIBLE_AND_NOT_BILLABLE: Conversations eligible for billing consideration but not currently billable. Includes ERROR, IN_PROGRESS, ESCALATED, INCOMPLETE, and NEGATIVE_FEEDBACK.
|
|
9
|
+
* - INELIGIBLE: Conversations excluded from billing consideration. Includes CONTENT_SAFETY_FLAGGED, PROMPT_ATTACK_FLAGGED, HANGUP, INELIGIBLE, and UNKNOWN.
|
|
10
|
+
*/
|
|
11
|
+
exports.BillableFilterField = {
|
|
12
|
+
EligibleAndBillable: "ELIGIBLE_AND_BILLABLE",
|
|
13
|
+
EligibleAndNotBillable: "ELIGIBLE_AND_NOT_BILLABLE",
|
|
14
|
+
Ineligible: "INELIGIBLE",
|
|
15
|
+
};
|
|
@@ -58,9 +58,21 @@ export interface ConversationFilter {
|
|
|
58
58
|
tags?: string[];
|
|
59
59
|
/** Filter by agent user IDs associated with the conversation */
|
|
60
60
|
agentUserIds?: string[];
|
|
61
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* Filter by conversation resolution status which is determined by AI based on the conversation content.
|
|
63
|
+
*
|
|
64
|
+
* When `resolutionStatus`, `resolvedByMaven`, and `billable` are combined in a single filter,
|
|
65
|
+
* precedence is applied in the following order: `resolutionStatus`, `resolvedByMaven`,
|
|
66
|
+
* and then `billable`.
|
|
67
|
+
*/
|
|
62
68
|
resolutionStatus?: MavenAGI.ResolutionStatus[];
|
|
63
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Filter conversations based on whether they were resolved by Maven AI.
|
|
71
|
+
*
|
|
72
|
+
* When `resolutionStatus`, `resolvedByMaven`, and `billable` are combined in a single filter,
|
|
73
|
+
* precedence is applied in the following order: `resolutionStatus`, `resolvedByMaven`,
|
|
74
|
+
* and then `billable`.
|
|
75
|
+
*/
|
|
64
76
|
resolvedByMaven?: boolean;
|
|
65
77
|
/** Filter by the number of messages sent by the user in the conversation */
|
|
66
78
|
userMessageCount?: MavenAGI.NumberRange;
|
|
@@ -85,4 +97,16 @@ export interface ConversationFilter {
|
|
|
85
97
|
simulationFilter?: MavenAGI.SimulationFilter;
|
|
86
98
|
/** Filter by intelligent field values. All conditions are ANDed together. */
|
|
87
99
|
intelligentFields?: MavenAGI.IntelligentFieldFilter;
|
|
100
|
+
/**
|
|
101
|
+
* Filter by whether the conversation is billable. Defaults to all eligible conversations,
|
|
102
|
+
* which means ELIGIBLE_AND_BILLABLE and ELIGIBLE_AND_NOT_BILLABLE.
|
|
103
|
+
*
|
|
104
|
+
* When `resolutionStatus`, `resolvedByMaven`, and `billable` are combined in a single filter,
|
|
105
|
+
* precedence is applied in the following order: `resolutionStatus`, `resolvedByMaven`,
|
|
106
|
+
* and then `billable`.
|
|
107
|
+
*
|
|
108
|
+
* If billable is `null` or `[]` then defaults to all eligible conversations,
|
|
109
|
+
* which means ELIGIBLE_AND_BILLABLE and ELIGIBLE_AND_NOT_BILLABLE.
|
|
110
|
+
*/
|
|
111
|
+
billable?: MavenAGI.BillableFilterField[];
|
|
88
112
|
}
|
|
@@ -33,4 +33,6 @@ export interface ConversationRequest {
|
|
|
33
33
|
metadata?: Record<string, string>;
|
|
34
34
|
/** The messages in the conversation */
|
|
35
35
|
messages: MavenAGI.ConversationMessageRequest[];
|
|
36
|
+
/** The unique identifier of the conversation this new conversation was spawned from, if applicable. */
|
|
37
|
+
spawnedFromConversationId?: MavenAGI.EntityId;
|
|
36
38
|
}
|
|
@@ -8,6 +8,7 @@ export * from "./AskStreamMetadataEvent";
|
|
|
8
8
|
export * from "./AskStreamOAuthButtonEvent";
|
|
9
9
|
export * from "./AskStreamStartEvent";
|
|
10
10
|
export * from "./AskStreamTextEvent";
|
|
11
|
+
export * from "./BillableFilterField";
|
|
11
12
|
export * from "./CategorizationResponse";
|
|
12
13
|
export * from "./ConversationField";
|
|
13
14
|
export * from "./ConversationFilter";
|
|
@@ -24,6 +24,7 @@ __exportStar(require("./AskStreamMetadataEvent"), exports);
|
|
|
24
24
|
__exportStar(require("./AskStreamOAuthButtonEvent"), exports);
|
|
25
25
|
__exportStar(require("./AskStreamStartEvent"), exports);
|
|
26
26
|
__exportStar(require("./AskStreamTextEvent"), exports);
|
|
27
|
+
__exportStar(require("./BillableFilterField"), exports);
|
|
27
28
|
__exportStar(require("./CategorizationResponse"), exports);
|
|
28
29
|
__exportStar(require("./ConversationField"), exports);
|
|
29
30
|
__exportStar(require("./ConversationFilter"), exports);
|
|
@@ -23,6 +23,8 @@ export interface KnowledgeBaseFilter {
|
|
|
23
23
|
createdBefore?: Date;
|
|
24
24
|
/** Filter by app IDs */
|
|
25
25
|
appIds?: string[];
|
|
26
|
+
/** Filter by knowledge base type. */
|
|
27
|
+
types?: MavenAGI.KnowledgeBaseType[];
|
|
26
28
|
/** Filter knowledge bases by the most recent version status */
|
|
27
29
|
mostRecentVersionStatus?: MavenAGI.KnowledgeBaseVersionStatus[];
|
|
28
30
|
/** Filter knowledge bases by the LLM inclusion status */
|
|
@@ -29,8 +29,17 @@ export interface KnowledgeDocumentRequest extends MavenAGI.BaseKnowledgeDocument
|
|
|
29
29
|
title: string;
|
|
30
30
|
/**
|
|
31
31
|
* (Beta: under development, endpoint may change.)
|
|
32
|
-
* ID of the asset associated with this document. This asset
|
|
33
|
-
*
|
|
32
|
+
* ID of the asset associated with this document. This asset is transformed into text and
|
|
33
|
+
* set as the content of a single document, so only single-document MIME types are supported:
|
|
34
|
+
* - text/plain
|
|
35
|
+
* - text/markdown
|
|
36
|
+
* - text/x-markdown
|
|
37
|
+
* - application/pdf
|
|
38
|
+
* - application/vnd.openxmlformats-officedocument.wordprocessingml.document (docx)
|
|
39
|
+
* - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (xlsx)
|
|
40
|
+
* Multi-record formats that fan out into many documents (text/csv, application/json,
|
|
41
|
+
* application/jsonl) are not supported here. Any other type accepted by `initiateUpload`
|
|
42
|
+
* (e.g. images, audio, video) will result in a failed knowledge base version.
|
|
34
43
|
* Either this or content is required, but not both. The asset must have a checksum provided at commit time (see `commitUpload`).
|
|
35
44
|
*/
|
|
36
45
|
assetId?: MavenAGI.EntityIdWithoutAgent;
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -1693,7 +1693,7 @@ await client.assets.commitUpload("assetReferenceId", {});
|
|
|
1693
1693
|
<dl>
|
|
1694
1694
|
<dd>
|
|
1695
1695
|
|
|
1696
|
-
Initialize a new conversation.
|
|
1696
|
+
Initialize a new conversation.
|
|
1697
1697
|
Only required if the ask request wishes to supply conversation level data or when syncing to external systems.
|
|
1698
1698
|
|
|
1699
1699
|
Conversations can not be modified using this API. If the conversation already exists then the existing conversation will be returned.
|
|
@@ -1786,9 +1786,9 @@ await client.conversation.initialize({
|
|
|
1786
1786
|
<dl>
|
|
1787
1787
|
<dd>
|
|
1788
1788
|
|
|
1789
|
-
Update mutable conversation fields.
|
|
1789
|
+
Update mutable conversation fields.
|
|
1790
1790
|
|
|
1791
|
-
The `appId` field can be provided to update a conversation owned by a different app.
|
|
1791
|
+
The `appId` field can be provided to update a conversation owned by a different app.
|
|
1792
1792
|
All other fields will overwrite the existing value on the conversation only if provided.
|
|
1793
1793
|
</dd>
|
|
1794
1794
|
</dl>
|
|
@@ -1933,15 +1933,15 @@ await client.conversation.get("conversationId");
|
|
|
1933
1933
|
<dl>
|
|
1934
1934
|
<dd>
|
|
1935
1935
|
|
|
1936
|
-
Wipes a conversation of all user data.
|
|
1937
|
-
The conversation ID will still exist and non-user specific data will still be retained.
|
|
1938
|
-
Attempts to modify or add messages to the conversation will throw an error.
|
|
1936
|
+
Wipes a conversation of all user data.
|
|
1937
|
+
The conversation ID will still exist and non-user specific data will still be retained.
|
|
1938
|
+
Attempts to modify or add messages to the conversation will throw an error.
|
|
1939
1939
|
|
|
1940
|
-
Simulation conversations will no longer be visible in search results nor metrics.
|
|
1940
|
+
Simulation conversations will no longer be visible in search results nor metrics.
|
|
1941
1941
|
Non-simulation conversations will remain visible - they can not be fully removed from the system.
|
|
1942
1942
|
|
|
1943
1943
|
<Warning>This is a destructive operation and cannot be undone. <br/><br/>
|
|
1944
|
-
The exact fields cleared include: the conversation subject, userRequest, agentResponse.
|
|
1944
|
+
The exact fields cleared include: the conversation subject, userRequest, agentResponse.
|
|
1945
1945
|
As well as the text response, followup questions, and backend LLM prompt of all messages.</Warning>
|
|
1946
1946
|
</dd>
|
|
1947
1947
|
</dl>
|
|
@@ -2104,8 +2104,8 @@ await client.conversation.appendNewMessages("conversationId", [{
|
|
|
2104
2104
|
<dl>
|
|
2105
2105
|
<dd>
|
|
2106
2106
|
|
|
2107
|
-
Get an answer from Maven for a given user question. If the user question or its answer already exists,
|
|
2108
|
-
they will be reused and will not be updated. Messages do not allow modification once generated.
|
|
2107
|
+
Get an answer from Maven for a given user question. If the user question or its answer already exists,
|
|
2108
|
+
they will be reused and will not be updated. Messages do not allow modification once generated.
|
|
2109
2109
|
|
|
2110
2110
|
Concurrency Behavior:
|
|
2111
2111
|
- If another API call is made for the same user question while a response is mid-stream, partial answers may be returned.
|
|
@@ -2200,13 +2200,13 @@ await client.conversation.ask("conversation-0", {
|
|
|
2200
2200
|
<dl>
|
|
2201
2201
|
<dd>
|
|
2202
2202
|
|
|
2203
|
-
Get an answer from Maven for a given user question with a streaming response. The response will be sent as a stream of events.
|
|
2204
|
-
The text portions of stream responses should be concatenated to form the full response text.
|
|
2203
|
+
Get an answer from Maven for a given user question with a streaming response. The response will be sent as a stream of events.
|
|
2204
|
+
The text portions of stream responses should be concatenated to form the full response text.
|
|
2205
2205
|
Action and metadata events should overwrite past data and do not need concatenation.
|
|
2206
2206
|
|
|
2207
|
-
If the user question or its answer already exists, they will be reused and will not be updated.
|
|
2207
|
+
If the user question or its answer already exists, they will be reused and will not be updated.
|
|
2208
2208
|
Messages do not allow modification once generated.
|
|
2209
|
-
|
|
2209
|
+
|
|
2210
2210
|
Concurrency Behavior:
|
|
2211
2211
|
- If another API call is made for the same user question while a response is mid-stream, partial answers may be returned.
|
|
2212
2212
|
- 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.
|
|
@@ -2444,10 +2444,10 @@ await client.conversation.createFeedback({
|
|
|
2444
2444
|
<dl>
|
|
2445
2445
|
<dd>
|
|
2446
2446
|
|
|
2447
|
-
Submit a filled out action form.
|
|
2447
|
+
Submit a filled out action form.
|
|
2448
2448
|
Action forms can not be submitted more than once, attempting to do so will result in an error.
|
|
2449
2449
|
|
|
2450
|
-
Additionally, form submission is only allowed when the form is the last message in the conversation.
|
|
2450
|
+
Additionally, form submission is only allowed when the form is the last message in the conversation.
|
|
2451
2451
|
Forms should be disabled in surface UI if a conversation continues and they remain unsubmitted.
|
|
2452
2452
|
</dd>
|
|
2453
2453
|
</dl>
|
|
@@ -2526,7 +2526,7 @@ await client.conversation.submitActionForm("conversationId", {
|
|
|
2526
2526
|
<dl>
|
|
2527
2527
|
<dd>
|
|
2528
2528
|
|
|
2529
|
-
Replaced by `updateConversationMetadata`.
|
|
2529
|
+
Replaced by `updateConversationMetadata`.
|
|
2530
2530
|
|
|
2531
2531
|
Adds metadata to an existing conversation. If a metadata field already exists, it will be overwritten.
|
|
2532
2532
|
</dd>
|
|
@@ -2601,10 +2601,10 @@ await client.conversation.addConversationMetadata("conversationId", {
|
|
|
2601
2601
|
<dl>
|
|
2602
2602
|
<dd>
|
|
2603
2603
|
|
|
2604
|
-
Update metadata supplied by the calling application for an existing conversation.
|
|
2604
|
+
Update metadata supplied by the calling application for an existing conversation.
|
|
2605
2605
|
Does not modify metadata saved by other apps.
|
|
2606
2606
|
|
|
2607
|
-
If a metadata field already exists for the calling app, it will be overwritten.
|
|
2607
|
+
If a metadata field already exists for the calling app, it will be overwritten.
|
|
2608
2608
|
If it does not exist, it will be added. Will not remove metadata fields.
|
|
2609
2609
|
|
|
2610
2610
|
Returns all metadata saved by any app on the conversation.
|
|
@@ -2746,11 +2746,11 @@ await client.conversation.search({});
|
|
|
2746
2746
|
<dl>
|
|
2747
2747
|
<dd>
|
|
2748
2748
|
|
|
2749
|
-
Export conversations to a CSV file.
|
|
2749
|
+
Export conversations to a CSV file.
|
|
2750
2750
|
|
|
2751
2751
|
This will output a summary of each conversation that matches the supplied filter. A maximum of 10,000 conversations can be exported at a time.
|
|
2752
2752
|
|
|
2753
|
-
For most use cases it is recommended to use the `search` API instead and convert the JSON response to your desired format.
|
|
2753
|
+
For most use cases it is recommended to use the `search` API instead and convert the JSON response to your desired format.
|
|
2754
2754
|
The CSV format may change over time and should not be relied upon by code consumers.
|
|
2755
2755
|
</dd>
|
|
2756
2756
|
</dl>
|
|
@@ -2817,7 +2817,7 @@ await client.conversation.export({});
|
|
|
2817
2817
|
Deliver a message to a user or conversation.
|
|
2818
2818
|
|
|
2819
2819
|
<Warning>
|
|
2820
|
-
Currently, messages can only be successfully delivered to conversations with the `ASYNC` capability that are `open`.
|
|
2820
|
+
Currently, messages can only be successfully delivered to conversations with the `ASYNC` capability that are `open`.
|
|
2821
2821
|
User message delivery is not yet supported.
|
|
2822
2822
|
</Warning>
|
|
2823
2823
|
</dd>
|
|
@@ -4,6 +4,7 @@ import type * as serializers from "../../../index";
|
|
|
4
4
|
import { ConversationAnalysis } from "./ConversationAnalysis";
|
|
5
5
|
import { ConversationSummary } from "./ConversationSummary";
|
|
6
6
|
import { EntityId } from "./EntityId";
|
|
7
|
+
import { RelationshipType } from "./RelationshipType";
|
|
7
8
|
import { ResponseConfig } from "./ResponseConfig";
|
|
8
9
|
import { SimulationContext } from "./SimulationContext";
|
|
9
10
|
export declare const BaseConversationResponse: core.serialization.ObjectSchema<serializers.BaseConversationResponse.Raw, MavenAGI.BaseConversationResponse>;
|
|
@@ -24,5 +25,6 @@ export declare namespace BaseConversationResponse {
|
|
|
24
25
|
open: boolean;
|
|
25
26
|
llmEnabled: boolean;
|
|
26
27
|
simulationContext?: SimulationContext.Raw | null;
|
|
28
|
+
relatedEntities?: Record<RelationshipType.Raw, EntityId.Raw[] | null | undefined> | null;
|
|
27
29
|
}
|
|
28
30
|
}
|
|
@@ -39,6 +39,7 @@ const core = __importStar(require("../../../../core"));
|
|
|
39
39
|
const ConversationAnalysis_1 = require("./ConversationAnalysis");
|
|
40
40
|
const ConversationSummary_1 = require("./ConversationSummary");
|
|
41
41
|
const EntityId_1 = require("./EntityId");
|
|
42
|
+
const RelationshipType_1 = require("./RelationshipType");
|
|
42
43
|
const ResponseConfig_1 = require("./ResponseConfig");
|
|
43
44
|
const SimulationContext_1 = require("./SimulationContext");
|
|
44
45
|
exports.BaseConversationResponse = core.serialization.object({
|
|
@@ -57,4 +58,7 @@ exports.BaseConversationResponse = core.serialization.object({
|
|
|
57
58
|
open: core.serialization.boolean(),
|
|
58
59
|
llmEnabled: core.serialization.boolean(),
|
|
59
60
|
simulationContext: SimulationContext_1.SimulationContext.optional(),
|
|
61
|
+
relatedEntities: core.serialization
|
|
62
|
+
.partialRecord(RelationshipType_1.RelationshipType, core.serialization.list(EntityId_1.EntityId).optional())
|
|
63
|
+
.optional(),
|
|
60
64
|
});
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../../api/index";
|
|
2
2
|
import * as core from "../../../../core";
|
|
3
3
|
import type * as serializers from "../../../index";
|
|
4
|
+
import { ConversationRound } from "./ConversationRound";
|
|
4
5
|
import { PreconditionBase } from "./PreconditionBase";
|
|
5
6
|
export declare const ConversationExecutedActionPrecondition: core.serialization.ObjectSchema<serializers.ConversationExecutedActionPrecondition.Raw, MavenAGI.ConversationExecutedActionPrecondition>;
|
|
6
7
|
export declare namespace ConversationExecutedActionPrecondition {
|
|
7
8
|
interface Raw extends PreconditionBase.Raw {
|
|
8
9
|
actionId: string;
|
|
9
10
|
appId?: string | null;
|
|
11
|
+
conversationRound?: ConversationRound.Raw | null;
|
|
10
12
|
}
|
|
11
13
|
}
|
|
@@ -36,10 +36,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.ConversationExecutedActionPrecondition = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../core"));
|
|
39
|
+
const ConversationRound_1 = require("./ConversationRound");
|
|
39
40
|
const PreconditionBase_1 = require("./PreconditionBase");
|
|
40
41
|
exports.ConversationExecutedActionPrecondition = core.serialization
|
|
41
42
|
.object({
|
|
42
43
|
actionId: core.serialization.string(),
|
|
43
44
|
appId: core.serialization.string().optional(),
|
|
45
|
+
conversationRound: ConversationRound_1.ConversationRound.optional(),
|
|
44
46
|
})
|
|
45
47
|
.extend(PreconditionBase_1.PreconditionBase);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../../api/index";
|
|
2
|
+
import * as core from "../../../../core";
|
|
3
|
+
import type * as serializers from "../../../index";
|
|
4
|
+
import { ConversationKickoffStatus } from "./ConversationKickoffStatus";
|
|
5
|
+
export declare const ConversationKickoffExecutionResponse: core.serialization.ObjectSchema<serializers.ConversationKickoffExecutionResponse.Raw, MavenAGI.ConversationKickoffExecutionResponse>;
|
|
6
|
+
export declare namespace ConversationKickoffExecutionResponse {
|
|
7
|
+
interface Raw {
|
|
8
|
+
referenceId?: string | null;
|
|
9
|
+
appId?: string | null;
|
|
10
|
+
status: ConversationKickoffStatus.Raw;
|
|
11
|
+
message?: string | null;
|
|
12
|
+
startedAt?: string | null;
|
|
13
|
+
completedAt?: string | null;
|
|
14
|
+
durationMs?: number | null;
|
|
15
|
+
}
|
|
16
|
+
}
|