mavenagi 1.2.48 → 1.2.50
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/ConversationKickoffResult.d.ts +7 -0
- package/api/resources/commons/types/ConversationKickoffResult.js +3 -0
- package/api/resources/commons/types/ConversationKickoffStatus.d.ts +5 -0
- package/api/resources/commons/types/ConversationKickoffStatus.js +8 -0
- package/api/resources/commons/types/ConversationMessageBase.d.ts +9 -0
- package/api/resources/commons/types/ConversationResponse.d.ts +3 -0
- package/api/resources/commons/types/ConversationSummary.d.ts +6 -0
- package/api/resources/commons/types/EntityType.d.ts +3 -0
- package/api/resources/commons/types/EntityType.js +3 -0
- package/api/resources/commons/types/InitializeConversationResponse.d.ts +14 -0
- package/api/resources/commons/types/InitializeConversationResponse.js +3 -0
- package/api/resources/commons/types/IntelligentFieldCondition.d.ts +5 -1
- package/api/resources/commons/types/JsonSchemaSettingsSchemaEntry.d.ts +6 -0
- package/api/resources/commons/types/JsonSchemaSettingsSchemaEntry.js +3 -0
- package/api/resources/commons/types/PresenceCondition.d.ts +9 -0
- package/api/resources/commons/types/PresenceCondition.js +3 -0
- package/api/resources/commons/types/PresenceOperator.d.ts +15 -0
- package/api/resources/commons/types/PresenceOperator.js +18 -0
- package/api/resources/commons/types/SettingsSchemaEntry.d.ts +7 -1
- package/api/resources/commons/types/SwitchSettingsSchemaEntry.d.ts +4 -0
- package/api/resources/commons/types/SwitchSettingsSchemaEntry.js +3 -0
- package/api/resources/commons/types/UniversalCondition.d.ts +13 -0
- package/api/resources/commons/types/UniversalCondition.js +3 -0
- package/api/resources/commons/types/index.d.ts +8 -0
- package/api/resources/commons/types/index.js +8 -0
- package/api/resources/conversation/client/Client.d.ts +1 -1
- package/api/resources/conversation/client/Client.js +1 -1
- package/api/resources/conversation/types/AskRequest.d.ts +9 -0
- package/api/resources/conversation/types/ConversationField.d.ts +1 -0
- package/api/resources/conversation/types/ConversationField.js +1 -0
- package/api/resources/knowledge/client/Client.d.ts +17 -0
- package/api/resources/knowledge/client/Client.js +88 -0
- package/api/resources/knowledge/types/KnowledgeBaseIndexingStatus.d.ts +2 -0
- package/api/resources/knowledge/types/KnowledgeBaseIndexingStatus.js +2 -0
- package/package.json +1 -1
- package/reference.md +64 -1
- package/serialization/resources/commons/types/ConversationKickoffResult.d.ts +11 -0
- package/serialization/resources/commons/types/ConversationKickoffResult.js +43 -0
- package/serialization/resources/commons/types/ConversationKickoffStatus.d.ts +7 -0
- package/serialization/resources/commons/types/ConversationKickoffStatus.js +39 -0
- package/serialization/resources/commons/types/ConversationMessageBase.d.ts +1 -0
- package/serialization/resources/commons/types/ConversationMessageBase.js +1 -0
- package/serialization/resources/commons/types/ConversationSummary.d.ts +3 -0
- package/serialization/resources/commons/types/ConversationSummary.js +3 -0
- package/serialization/resources/commons/types/EntityType.d.ts +1 -1
- package/serialization/resources/commons/types/EntityType.js +3 -0
- package/serialization/resources/commons/types/InitializeConversationResponse.d.ts +11 -0
- package/serialization/resources/commons/types/InitializeConversationResponse.js +45 -0
- package/serialization/resources/commons/types/IntelligentFieldCondition.d.ts +6 -1
- package/serialization/resources/commons/types/IntelligentFieldCondition.js +4 -0
- package/serialization/resources/commons/types/JsonSchemaSettingsSchemaEntry.d.ts +11 -0
- package/serialization/resources/commons/types/JsonSchemaSettingsSchemaEntry.js +45 -0
- package/serialization/resources/commons/types/PresenceCondition.d.ts +10 -0
- package/serialization/resources/commons/types/PresenceCondition.js +42 -0
- package/serialization/resources/commons/types/PresenceOperator.d.ts +7 -0
- package/serialization/resources/commons/types/PresenceOperator.js +39 -0
- package/serialization/resources/commons/types/SettingsSchemaEntry.d.ts +9 -1
- package/serialization/resources/commons/types/SettingsSchemaEntry.js +4 -0
- package/serialization/resources/commons/types/SwitchSettingsSchemaEntry.d.ts +10 -0
- package/serialization/resources/commons/types/SwitchSettingsSchemaEntry.js +44 -0
- package/serialization/resources/commons/types/UniversalCondition.d.ts +11 -0
- package/serialization/resources/commons/types/UniversalCondition.js +47 -0
- package/serialization/resources/commons/types/index.d.ts +8 -0
- package/serialization/resources/commons/types/index.js +8 -0
- package/serialization/resources/conversation/types/AskRequest.d.ts +1 -0
- package/serialization/resources/conversation/types/AskRequest.js +1 -0
- package/serialization/resources/conversation/types/ConversationField.d.ts +1 -1
- package/serialization/resources/conversation/types/ConversationField.js +1 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseIndexingStatus.d.ts +1 -1
- package/serialization/resources/knowledge/types/KnowledgeBaseIndexingStatus.js +10 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
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.50",
|
|
47
|
+
"User-Agent": "mavenagi/1.2.50",
|
|
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,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
export interface ConversationKickoffResult {
|
|
3
|
+
/** Whether the Conversation Kickoff completed successfully. */
|
|
4
|
+
status: MavenAGI.ConversationKickoffStatus;
|
|
5
|
+
/** Additional detail about the Conversation Kickoff result. */
|
|
6
|
+
message?: string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ConversationKickoffStatus = void 0;
|
|
5
|
+
exports.ConversationKickoffStatus = {
|
|
6
|
+
Success: "SUCCESS",
|
|
7
|
+
Failed: "FAILED",
|
|
8
|
+
};
|
|
@@ -3,4 +3,13 @@ export interface ConversationMessageBase {
|
|
|
3
3
|
createdAt?: Date;
|
|
4
4
|
/** The date and time the conversation was last updated */
|
|
5
5
|
updatedAt?: Date;
|
|
6
|
+
/**
|
|
7
|
+
* Key-value metadata for this message, supplied by the app which created the message.
|
|
8
|
+
* Useful for storing additional structured information about the message and querying
|
|
9
|
+
* for it via API or the dashboard.
|
|
10
|
+
*
|
|
11
|
+
* Keys are strings with a maximum length of 500 characters. Values are strings with a
|
|
12
|
+
* maximum length of 500 characters.
|
|
13
|
+
*/
|
|
14
|
+
appMetadata?: Record<string, string>;
|
|
6
15
|
}
|
|
@@ -20,6 +20,9 @@ import type * as MavenAGI from "../../../index";
|
|
|
20
20
|
* summary: {
|
|
21
21
|
* actionIds: [],
|
|
22
22
|
* incompleteActionIds: [],
|
|
23
|
+
* matchedCharterIds: [],
|
|
24
|
+
* matchedCharterNames: [],
|
|
25
|
+
* matchedSegmentedCharterNames: [],
|
|
23
26
|
* insertCount: 0,
|
|
24
27
|
* thumbsUpCount: 0,
|
|
25
28
|
* thumbsDownCount: 0,
|
|
@@ -4,6 +4,12 @@ export interface ConversationSummary {
|
|
|
4
4
|
actionIds: MavenAGI.EntityIdWithoutAgent[];
|
|
5
5
|
/** The IDs of the actions that were taken by Maven but not completed in the conversation. Occurs when the user is shown an action form but does not submit it. */
|
|
6
6
|
incompleteActionIds: MavenAGI.EntityIdWithoutAgent[];
|
|
7
|
+
/** The IDs of the charters that were matched anywhere in the conversation. */
|
|
8
|
+
matchedCharterIds: MavenAGI.EntityIdWithoutAgent[];
|
|
9
|
+
/** The names of the charters that were matched anywhere in the conversation. */
|
|
10
|
+
matchedCharterNames: string[];
|
|
11
|
+
/** The names of the matched charters that are gated by a segment (i.e. have a segment condition) anywhere in the conversation. */
|
|
12
|
+
matchedSegmentedCharterNames: string[];
|
|
7
13
|
/** The number of insert events on messages in the conversation. */
|
|
8
14
|
insertCount: number;
|
|
9
15
|
/** The number of thumbs up events on messages in the conversation. */
|
|
@@ -17,5 +17,8 @@ export declare const EntityType: {
|
|
|
17
17
|
readonly Customer: "CUSTOMER";
|
|
18
18
|
readonly IntelligentField: "INTELLIGENT_FIELD";
|
|
19
19
|
readonly Charter: "CHARTER";
|
|
20
|
+
readonly ConversationKickoff: "CONVERSATION_KICKOFF";
|
|
21
|
+
readonly AgentVariant: "AGENT_VARIANT";
|
|
22
|
+
readonly ConfigSnapshot: "CONFIG_SNAPSHOT";
|
|
20
23
|
};
|
|
21
24
|
export type EntityType = (typeof EntityType)[keyof typeof EntityType] | string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* A conversation as returned by the `initialize` endpoint. Extends the shared
|
|
4
|
+
* ConversationResponse with the Conversation Kickoff result, which is only available at
|
|
5
|
+
* initialization time.
|
|
6
|
+
*/
|
|
7
|
+
export interface InitializeConversationResponse extends MavenAGI.ConversationResponse {
|
|
8
|
+
/**
|
|
9
|
+
* Result of the Conversation Kickoff, when one ran during conversation initialization.
|
|
10
|
+
* Only present on this initialize response; other endpoints that return a conversation
|
|
11
|
+
* do not include it.
|
|
12
|
+
*/
|
|
13
|
+
conversationKickoffResult?: MavenAGI.ConversationKickoffResult;
|
|
14
|
+
}
|
|
@@ -13,7 +13,7 @@ import type * as MavenAGI from "../../../index";
|
|
|
13
13
|
* The caller is responsible for querying the validationType and enumOptions
|
|
14
14
|
* from the intelligent field API to ensure the values are valid enumOptions.
|
|
15
15
|
*/
|
|
16
|
-
export type IntelligentFieldCondition = MavenAGI.IntelligentFieldCondition.String | MavenAGI.IntelligentFieldCondition.Numeric | MavenAGI.IntelligentFieldCondition.Boolean | MavenAGI.IntelligentFieldCondition.Set;
|
|
16
|
+
export type IntelligentFieldCondition = MavenAGI.IntelligentFieldCondition.String | MavenAGI.IntelligentFieldCondition.Numeric | MavenAGI.IntelligentFieldCondition.Boolean | MavenAGI.IntelligentFieldCondition.Set | MavenAGI.IntelligentFieldCondition.Universal;
|
|
17
17
|
export declare namespace IntelligentFieldCondition {
|
|
18
18
|
interface String {
|
|
19
19
|
fieldValidationType: "string";
|
|
@@ -30,4 +30,8 @@ export declare namespace IntelligentFieldCondition {
|
|
|
30
30
|
fieldValidationType: "set";
|
|
31
31
|
value: MavenAGI.SetCondition;
|
|
32
32
|
}
|
|
33
|
+
interface Universal {
|
|
34
|
+
fieldValidationType: "universal";
|
|
35
|
+
value: MavenAGI.UniversalCondition;
|
|
36
|
+
}
|
|
33
37
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
export interface JsonSchemaSettingsSchemaEntry extends MavenAGI.SettingsSchemaEntryBase {
|
|
3
|
+
/** JSON Schema (as a JSON string) describing the expected shape of this setting's value. */
|
|
4
|
+
jsonSchema: string;
|
|
5
|
+
defaultValue?: unknown;
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* A type-independent check on whether an intelligent field is determined or
|
|
4
|
+
* undetermined. Works for every field validationType.
|
|
5
|
+
*/
|
|
6
|
+
export interface PresenceCondition {
|
|
7
|
+
/** The presence operator to apply */
|
|
8
|
+
operator: MavenAGI.PresenceOperator;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type-independent operators that check whether an intelligent field has a
|
|
3
|
+
* determined value on the conversation, rather than comparing its value.
|
|
4
|
+
*/
|
|
5
|
+
export declare const PresenceOperator: {
|
|
6
|
+
/**
|
|
7
|
+
* The field has no determined value — the LLM could not determine one, the
|
|
8
|
+
* computation failed, is still running, or has not run. Surfaced to authors as
|
|
9
|
+
* the special "Undetermined" value. */
|
|
10
|
+
readonly IsUndetermined: "IS_UNDETERMINED";
|
|
11
|
+
/**
|
|
12
|
+
* The field has a determined (non-null) value. */
|
|
13
|
+
readonly IsDetermined: "IS_DETERMINED";
|
|
14
|
+
};
|
|
15
|
+
export type PresenceOperator = (typeof PresenceOperator)[keyof typeof PresenceOperator] | string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PresenceOperator = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Type-independent operators that check whether an intelligent field has a
|
|
7
|
+
* determined value on the conversation, rather than comparing its value.
|
|
8
|
+
*/
|
|
9
|
+
exports.PresenceOperator = {
|
|
10
|
+
/**
|
|
11
|
+
* The field has no determined value — the LLM could not determine one, the
|
|
12
|
+
* computation failed, is still running, or has not run. Surfaced to authors as
|
|
13
|
+
* the special "Undetermined" value. */
|
|
14
|
+
IsUndetermined: "IS_UNDETERMINED",
|
|
15
|
+
/**
|
|
16
|
+
* The field has a determined (non-null) value. */
|
|
17
|
+
IsDetermined: "IS_DETERMINED",
|
|
18
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../index";
|
|
2
|
-
export type SettingsSchemaEntry = MavenAGI.SettingsSchemaEntry.Text | MavenAGI.SettingsSchemaEntry.Multiline | MavenAGI.SettingsSchemaEntry.Array | MavenAGI.SettingsSchemaEntry.Complexarray | MavenAGI.SettingsSchemaEntry.Color | MavenAGI.SettingsSchemaEntry.Image | MavenAGI.SettingsSchemaEntry.Checkbox | MavenAGI.SettingsSchemaEntry.Dropdown | MavenAGI.SettingsSchemaEntry.Section | MavenAGI.SettingsSchemaEntry.Oauth | MavenAGI.SettingsSchemaEntry.Number | MavenAGI.SettingsSchemaEntry.OneOf;
|
|
2
|
+
export type SettingsSchemaEntry = MavenAGI.SettingsSchemaEntry.Text | MavenAGI.SettingsSchemaEntry.Multiline | MavenAGI.SettingsSchemaEntry.Array | MavenAGI.SettingsSchemaEntry.Complexarray | MavenAGI.SettingsSchemaEntry.Color | MavenAGI.SettingsSchemaEntry.Image | MavenAGI.SettingsSchemaEntry.Checkbox | MavenAGI.SettingsSchemaEntry.Switch | MavenAGI.SettingsSchemaEntry.Dropdown | MavenAGI.SettingsSchemaEntry.Section | MavenAGI.SettingsSchemaEntry.Oauth | MavenAGI.SettingsSchemaEntry.Number | MavenAGI.SettingsSchemaEntry.OneOf | MavenAGI.SettingsSchemaEntry.JsonSchema;
|
|
3
3
|
export declare namespace SettingsSchemaEntry {
|
|
4
4
|
interface Text extends MavenAGI.TextSettingsSchemaEntry {
|
|
5
5
|
type: "text";
|
|
@@ -22,6 +22,9 @@ export declare namespace SettingsSchemaEntry {
|
|
|
22
22
|
interface Checkbox extends MavenAGI.CheckboxSettingsSchemaEntry {
|
|
23
23
|
type: "checkbox";
|
|
24
24
|
}
|
|
25
|
+
interface Switch extends MavenAGI.SwitchSettingsSchemaEntry {
|
|
26
|
+
type: "switch";
|
|
27
|
+
}
|
|
25
28
|
interface Dropdown extends MavenAGI.DropdownSettingsSchemaEntry {
|
|
26
29
|
type: "dropdown";
|
|
27
30
|
}
|
|
@@ -37,4 +40,7 @@ export declare namespace SettingsSchemaEntry {
|
|
|
37
40
|
interface OneOf extends MavenAGI.OneOfSettingsSchemaEntry {
|
|
38
41
|
type: "oneOf";
|
|
39
42
|
}
|
|
43
|
+
interface JsonSchema extends MavenAGI.JsonSchemaSettingsSchemaEntry {
|
|
44
|
+
type: "jsonSchema";
|
|
45
|
+
}
|
|
40
46
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* Type-independent conditions that apply to any intelligent field regardless of its
|
|
4
|
+
* validationType. Currently only a presence (determined/undetermined) check. Modeled as
|
|
5
|
+
* its own discriminated union so future type-independent operators can be added without
|
|
6
|
+
* changing the top-level IntelligentFieldCondition union.
|
|
7
|
+
*/
|
|
8
|
+
export type UniversalCondition = MavenAGI.UniversalCondition.Presence;
|
|
9
|
+
export declare namespace UniversalCondition {
|
|
10
|
+
interface Presence extends MavenAGI.PresenceCondition {
|
|
11
|
+
opType: "presence";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -59,6 +59,8 @@ export * from "./ContextInfo";
|
|
|
59
59
|
export * from "./ConversationAnalysis";
|
|
60
60
|
export * from "./ConversationExecutedActionPrecondition";
|
|
61
61
|
export * from "./ConversationInformation";
|
|
62
|
+
export * from "./ConversationKickoffResult";
|
|
63
|
+
export * from "./ConversationKickoffStatus";
|
|
62
64
|
export * from "./ConversationMessageBase";
|
|
63
65
|
export * from "./ConversationMessageResponse";
|
|
64
66
|
export * from "./ConversationPrecondition";
|
|
@@ -108,11 +110,13 @@ export * from "./InboxItemMissingKnowledge";
|
|
|
108
110
|
export * from "./InboxItemSeverity";
|
|
109
111
|
export * from "./InboxItemStatus";
|
|
110
112
|
export * from "./InboxItemType";
|
|
113
|
+
export * from "./InitializeConversationResponse";
|
|
111
114
|
export * from "./IntelligentFieldCondition";
|
|
112
115
|
export * from "./IntelligentFieldPrecondition";
|
|
113
116
|
export * from "./IntelligentFieldPreconditionResponse";
|
|
114
117
|
export * from "./IntelligentFieldValueResponse";
|
|
115
118
|
export * from "./IpInfo";
|
|
119
|
+
export * from "./JsonSchemaSettingsSchemaEntry";
|
|
116
120
|
export * from "./KnowledgeContextByEntities";
|
|
117
121
|
export * from "./KnowledgeContextByEntityTypes";
|
|
118
122
|
export * from "./KnowledgeContextFilter";
|
|
@@ -147,6 +151,8 @@ export * from "./PreconditionGroupOperator";
|
|
|
147
151
|
export * from "./PreconditionGroupResponse";
|
|
148
152
|
export * from "./PreconditionOperator";
|
|
149
153
|
export * from "./PreconditionResponse";
|
|
154
|
+
export * from "./PresenceCondition";
|
|
155
|
+
export * from "./PresenceOperator";
|
|
150
156
|
export * from "./Quality";
|
|
151
157
|
export * from "./QualityReason";
|
|
152
158
|
export * from "./ResolutionStatus";
|
|
@@ -179,10 +185,12 @@ export * from "./StringCondition";
|
|
|
179
185
|
export * from "./StringMembershipCondition";
|
|
180
186
|
export * from "./StringMembershipOperator";
|
|
181
187
|
export * from "./SurveyInfo";
|
|
188
|
+
export * from "./SwitchSettingsSchemaEntry";
|
|
182
189
|
export * from "./SystemEvent";
|
|
183
190
|
export * from "./SystemEventName";
|
|
184
191
|
export * from "./TagsPrecondition";
|
|
185
192
|
export * from "./TextSettingsSchemaEntry";
|
|
193
|
+
export * from "./UniversalCondition";
|
|
186
194
|
export * from "./UserConversationMessageType";
|
|
187
195
|
export * from "./UserData";
|
|
188
196
|
export * from "./UserDataWithReference";
|
|
@@ -75,6 +75,8 @@ __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("./ConversationKickoffResult"), exports);
|
|
79
|
+
__exportStar(require("./ConversationKickoffStatus"), exports);
|
|
78
80
|
__exportStar(require("./ConversationMessageBase"), exports);
|
|
79
81
|
__exportStar(require("./ConversationMessageResponse"), exports);
|
|
80
82
|
__exportStar(require("./ConversationPrecondition"), exports);
|
|
@@ -124,11 +126,13 @@ __exportStar(require("./InboxItemMissingKnowledge"), exports);
|
|
|
124
126
|
__exportStar(require("./InboxItemSeverity"), exports);
|
|
125
127
|
__exportStar(require("./InboxItemStatus"), exports);
|
|
126
128
|
__exportStar(require("./InboxItemType"), exports);
|
|
129
|
+
__exportStar(require("./InitializeConversationResponse"), exports);
|
|
127
130
|
__exportStar(require("./IntelligentFieldCondition"), exports);
|
|
128
131
|
__exportStar(require("./IntelligentFieldPrecondition"), exports);
|
|
129
132
|
__exportStar(require("./IntelligentFieldPreconditionResponse"), exports);
|
|
130
133
|
__exportStar(require("./IntelligentFieldValueResponse"), exports);
|
|
131
134
|
__exportStar(require("./IpInfo"), exports);
|
|
135
|
+
__exportStar(require("./JsonSchemaSettingsSchemaEntry"), exports);
|
|
132
136
|
__exportStar(require("./KnowledgeContextByEntities"), exports);
|
|
133
137
|
__exportStar(require("./KnowledgeContextByEntityTypes"), exports);
|
|
134
138
|
__exportStar(require("./KnowledgeContextFilter"), exports);
|
|
@@ -163,6 +167,8 @@ __exportStar(require("./PreconditionGroupOperator"), exports);
|
|
|
163
167
|
__exportStar(require("./PreconditionGroupResponse"), exports);
|
|
164
168
|
__exportStar(require("./PreconditionOperator"), exports);
|
|
165
169
|
__exportStar(require("./PreconditionResponse"), exports);
|
|
170
|
+
__exportStar(require("./PresenceCondition"), exports);
|
|
171
|
+
__exportStar(require("./PresenceOperator"), exports);
|
|
166
172
|
__exportStar(require("./Quality"), exports);
|
|
167
173
|
__exportStar(require("./QualityReason"), exports);
|
|
168
174
|
__exportStar(require("./ResolutionStatus"), exports);
|
|
@@ -195,10 +201,12 @@ __exportStar(require("./StringCondition"), exports);
|
|
|
195
201
|
__exportStar(require("./StringMembershipCondition"), exports);
|
|
196
202
|
__exportStar(require("./StringMembershipOperator"), exports);
|
|
197
203
|
__exportStar(require("./SurveyInfo"), exports);
|
|
204
|
+
__exportStar(require("./SwitchSettingsSchemaEntry"), exports);
|
|
198
205
|
__exportStar(require("./SystemEvent"), exports);
|
|
199
206
|
__exportStar(require("./SystemEventName"), exports);
|
|
200
207
|
__exportStar(require("./TagsPrecondition"), exports);
|
|
201
208
|
__exportStar(require("./TextSettingsSchemaEntry"), exports);
|
|
209
|
+
__exportStar(require("./UniversalCondition"), exports);
|
|
202
210
|
__exportStar(require("./UserConversationMessageType"), exports);
|
|
203
211
|
__exportStar(require("./UserData"), exports);
|
|
204
212
|
__exportStar(require("./UserDataWithReference"), exports);
|
|
@@ -55,7 +55,7 @@ export declare class ConversationClient {
|
|
|
55
55
|
* }]
|
|
56
56
|
* })
|
|
57
57
|
*/
|
|
58
|
-
initialize(request: MavenAGI.ConversationRequest, requestOptions?: ConversationClient.RequestOptions): core.HttpResponsePromise<MavenAGI.
|
|
58
|
+
initialize(request: MavenAGI.ConversationRequest, requestOptions?: ConversationClient.RequestOptions): core.HttpResponsePromise<MavenAGI.InitializeConversationResponse>;
|
|
59
59
|
private __initialize;
|
|
60
60
|
/**
|
|
61
61
|
* Update mutable conversation fields.
|
|
@@ -129,7 +129,7 @@ class ConversationClient {
|
|
|
129
129
|
});
|
|
130
130
|
if (_response.ok) {
|
|
131
131
|
return {
|
|
132
|
-
data: serializers.
|
|
132
|
+
data: serializers.InitializeConversationResponse.parseOrThrow(_response.body, {
|
|
133
133
|
unrecognizedObjectKeys: "passthrough",
|
|
134
134
|
allowUnrecognizedUnionMembers: true,
|
|
135
135
|
allowUnrecognizedEnumValues: true,
|
|
@@ -36,4 +36,13 @@ export interface AskRequest {
|
|
|
36
36
|
transientData?: Record<string, string>;
|
|
37
37
|
/** IANA timezone identifier (e.g. "America/New_York", "Europe/London") to be used for time-based operations in the conversation. */
|
|
38
38
|
timezone?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Key-value metadata to persist on the user message created by this request. Unlike
|
|
41
|
+
* `transientData` (which is never persisted) this is stored and returned when the message
|
|
42
|
+
* is read back via the API or dashboard, and unlike user data it is not sent to the LLM.
|
|
43
|
+
* Applied only when the message is first created — if `conversationMessageId` already
|
|
44
|
+
* exists the message is reused and its metadata is not updated. Keys and values are strings
|
|
45
|
+
* with a maximum length of 500 characters each.
|
|
46
|
+
*/
|
|
47
|
+
appMetadata?: Record<string, string>;
|
|
39
48
|
}
|
|
@@ -21,6 +21,7 @@ export declare const ConversationField: {
|
|
|
21
21
|
readonly Languages: "Languages";
|
|
22
22
|
readonly Actions: "Actions";
|
|
23
23
|
readonly IncompleteActions: "IncompleteActions";
|
|
24
|
+
readonly Charters: "Charters";
|
|
24
25
|
readonly Sources: "Sources";
|
|
25
26
|
readonly CreatedAt: "CreatedAt";
|
|
26
27
|
readonly PredictedNps: "PredictedNPS";
|
|
@@ -111,6 +111,23 @@ export declare class KnowledgeClient {
|
|
|
111
111
|
*/
|
|
112
112
|
cancelKnowledgeBaseVersion(knowledgeBaseReferenceId: string, request: MavenAGI.CancelKnowledgeBaseVersionRequest, requestOptions?: KnowledgeClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
113
113
|
private __cancelKnowledgeBaseVersion;
|
|
114
|
+
/**
|
|
115
|
+
* Rolls the knowledge base back to its previous published version.
|
|
116
|
+
*
|
|
117
|
+
* @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to roll back. All other entity ID fields are inferred from the request.
|
|
118
|
+
* @param {KnowledgeClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
119
|
+
*
|
|
120
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
121
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
122
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
123
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
124
|
+
* @throws {@link MavenAGI.ServerError}
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* await client.knowledge.rollbackKnowledgeBaseVersion("knowledgeBaseReferenceId")
|
|
128
|
+
*/
|
|
129
|
+
rollbackKnowledgeBaseVersion(knowledgeBaseReferenceId: string, requestOptions?: KnowledgeClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
130
|
+
private __rollbackKnowledgeBaseVersion;
|
|
114
131
|
/**
|
|
115
132
|
* Update mutable knowledge base fields
|
|
116
133
|
*
|
|
@@ -558,6 +558,94 @@ class KnowledgeClient {
|
|
|
558
558
|
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/knowledge/{knowledgeBaseReferenceId}/cancel");
|
|
559
559
|
});
|
|
560
560
|
}
|
|
561
|
+
/**
|
|
562
|
+
* Rolls the knowledge base back to its previous published version.
|
|
563
|
+
*
|
|
564
|
+
* @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to roll back. All other entity ID fields are inferred from the request.
|
|
565
|
+
* @param {KnowledgeClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
566
|
+
*
|
|
567
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
568
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
569
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
570
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
571
|
+
* @throws {@link MavenAGI.ServerError}
|
|
572
|
+
*
|
|
573
|
+
* @example
|
|
574
|
+
* await client.knowledge.rollbackKnowledgeBaseVersion("knowledgeBaseReferenceId")
|
|
575
|
+
*/
|
|
576
|
+
rollbackKnowledgeBaseVersion(knowledgeBaseReferenceId, requestOptions) {
|
|
577
|
+
return core.HttpResponsePromise.fromPromise(this.__rollbackKnowledgeBaseVersion(knowledgeBaseReferenceId, requestOptions));
|
|
578
|
+
}
|
|
579
|
+
__rollbackKnowledgeBaseVersion(knowledgeBaseReferenceId, requestOptions) {
|
|
580
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
581
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
582
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
583
|
+
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
584
|
+
"X-Organization-Id": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationId,
|
|
585
|
+
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
586
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
587
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
588
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/knowledge/${core.url.encodePathParam(knowledgeBaseReferenceId)}/rollback`),
|
|
589
|
+
method: "POST",
|
|
590
|
+
headers: _headers,
|
|
591
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
592
|
+
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
593
|
+
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
594
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
595
|
+
fetchFn: (_p = this._options) === null || _p === void 0 ? void 0 : _p.fetch,
|
|
596
|
+
logging: this._options.logging,
|
|
597
|
+
});
|
|
598
|
+
if (_response.ok) {
|
|
599
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
600
|
+
}
|
|
601
|
+
if (_response.error.reason === "status-code") {
|
|
602
|
+
switch (_response.error.statusCode) {
|
|
603
|
+
case 404:
|
|
604
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
605
|
+
unrecognizedObjectKeys: "passthrough",
|
|
606
|
+
allowUnrecognizedUnionMembers: true,
|
|
607
|
+
allowUnrecognizedEnumValues: true,
|
|
608
|
+
breadcrumbsPrefix: ["response"],
|
|
609
|
+
}), _response.rawResponse);
|
|
610
|
+
case 400:
|
|
611
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
612
|
+
unrecognizedObjectKeys: "passthrough",
|
|
613
|
+
allowUnrecognizedUnionMembers: true,
|
|
614
|
+
allowUnrecognizedEnumValues: true,
|
|
615
|
+
breadcrumbsPrefix: ["response"],
|
|
616
|
+
}), _response.rawResponse);
|
|
617
|
+
case 413:
|
|
618
|
+
throw new MavenAGI.PayloadTooLargeError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
619
|
+
unrecognizedObjectKeys: "passthrough",
|
|
620
|
+
allowUnrecognizedUnionMembers: true,
|
|
621
|
+
allowUnrecognizedEnumValues: true,
|
|
622
|
+
breadcrumbsPrefix: ["response"],
|
|
623
|
+
}), _response.rawResponse);
|
|
624
|
+
case 429:
|
|
625
|
+
throw new MavenAGI.TooManyRequestsError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
626
|
+
unrecognizedObjectKeys: "passthrough",
|
|
627
|
+
allowUnrecognizedUnionMembers: true,
|
|
628
|
+
allowUnrecognizedEnumValues: true,
|
|
629
|
+
breadcrumbsPrefix: ["response"],
|
|
630
|
+
}), _response.rawResponse);
|
|
631
|
+
case 500:
|
|
632
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
633
|
+
unrecognizedObjectKeys: "passthrough",
|
|
634
|
+
allowUnrecognizedUnionMembers: true,
|
|
635
|
+
allowUnrecognizedEnumValues: true,
|
|
636
|
+
breadcrumbsPrefix: ["response"],
|
|
637
|
+
}), _response.rawResponse);
|
|
638
|
+
default:
|
|
639
|
+
throw new errors.MavenAGIError({
|
|
640
|
+
statusCode: _response.error.statusCode,
|
|
641
|
+
body: _response.error.body,
|
|
642
|
+
rawResponse: _response.rawResponse,
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/knowledge/{knowledgeBaseReferenceId}/rollback");
|
|
647
|
+
});
|
|
648
|
+
}
|
|
561
649
|
/**
|
|
562
650
|
* Update mutable knowledge base fields
|
|
563
651
|
*
|
|
@@ -4,7 +4,9 @@ export declare const KnowledgeBaseIndexingStatus: {
|
|
|
4
4
|
readonly Indexing: "INDEXING";
|
|
5
5
|
readonly Indexed: "INDEXED";
|
|
6
6
|
readonly Published: "PUBLISHED";
|
|
7
|
+
readonly RollingBack: "ROLLING_BACK";
|
|
7
8
|
readonly Failed: "FAILED";
|
|
8
9
|
readonly Superseded: "SUPERSEDED";
|
|
10
|
+
readonly RolledBack: "ROLLED_BACK";
|
|
9
11
|
};
|
|
10
12
|
export type KnowledgeBaseIndexingStatus = (typeof KnowledgeBaseIndexingStatus)[keyof typeof KnowledgeBaseIndexingStatus] | string;
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -1681,7 +1681,7 @@ await client.assets.commitUpload("assetReferenceId", {});
|
|
|
1681
1681
|
</details>
|
|
1682
1682
|
|
|
1683
1683
|
## Conversation
|
|
1684
|
-
<details><summary><code>client.conversation.<a href="/src/api/resources/conversation/client/Client.ts">initialize</a>({ ...params }) -> MavenAGI.
|
|
1684
|
+
<details><summary><code>client.conversation.<a href="/src/api/resources/conversation/client/Client.ts">initialize</a>({ ...params }) -> MavenAGI.InitializeConversationResponse</code></summary>
|
|
1685
1685
|
<dl>
|
|
1686
1686
|
<dd>
|
|
1687
1687
|
|
|
@@ -4455,6 +4455,69 @@ await client.knowledge.cancelKnowledgeBaseVersion("knowledgeBaseReferenceId", {}
|
|
|
4455
4455
|
</dl>
|
|
4456
4456
|
|
|
4457
4457
|
|
|
4458
|
+
</dd>
|
|
4459
|
+
</dl>
|
|
4460
|
+
</details>
|
|
4461
|
+
|
|
4462
|
+
<details><summary><code>client.knowledge.<a href="/src/api/resources/knowledge/client/Client.ts">rollbackKnowledgeBaseVersion</a>(knowledgeBaseReferenceId) -> void</code></summary>
|
|
4463
|
+
<dl>
|
|
4464
|
+
<dd>
|
|
4465
|
+
|
|
4466
|
+
#### 📝 Description
|
|
4467
|
+
|
|
4468
|
+
<dl>
|
|
4469
|
+
<dd>
|
|
4470
|
+
|
|
4471
|
+
<dl>
|
|
4472
|
+
<dd>
|
|
4473
|
+
|
|
4474
|
+
Rolls the knowledge base back to its previous published version.
|
|
4475
|
+
</dd>
|
|
4476
|
+
</dl>
|
|
4477
|
+
</dd>
|
|
4478
|
+
</dl>
|
|
4479
|
+
|
|
4480
|
+
#### 🔌 Usage
|
|
4481
|
+
|
|
4482
|
+
<dl>
|
|
4483
|
+
<dd>
|
|
4484
|
+
|
|
4485
|
+
<dl>
|
|
4486
|
+
<dd>
|
|
4487
|
+
|
|
4488
|
+
```typescript
|
|
4489
|
+
await client.knowledge.rollbackKnowledgeBaseVersion("knowledgeBaseReferenceId");
|
|
4490
|
+
|
|
4491
|
+
```
|
|
4492
|
+
</dd>
|
|
4493
|
+
</dl>
|
|
4494
|
+
</dd>
|
|
4495
|
+
</dl>
|
|
4496
|
+
|
|
4497
|
+
#### ⚙️ Parameters
|
|
4498
|
+
|
|
4499
|
+
<dl>
|
|
4500
|
+
<dd>
|
|
4501
|
+
|
|
4502
|
+
<dl>
|
|
4503
|
+
<dd>
|
|
4504
|
+
|
|
4505
|
+
**knowledgeBaseReferenceId:** `string` — The reference ID of the knowledge base to roll back. All other entity ID fields are inferred from the request.
|
|
4506
|
+
|
|
4507
|
+
</dd>
|
|
4508
|
+
</dl>
|
|
4509
|
+
|
|
4510
|
+
<dl>
|
|
4511
|
+
<dd>
|
|
4512
|
+
|
|
4513
|
+
**requestOptions:** `KnowledgeClient.RequestOptions`
|
|
4514
|
+
|
|
4515
|
+
</dd>
|
|
4516
|
+
</dl>
|
|
4517
|
+
</dd>
|
|
4518
|
+
</dl>
|
|
4519
|
+
|
|
4520
|
+
|
|
4458
4521
|
</dd>
|
|
4459
4522
|
</dl>
|
|
4460
4523
|
</details>
|