mavenagi 1.0.12 → 1.0.15
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/README.md +1 -1
- package/api/resources/actions/client/Client.js +3 -3
- package/api/resources/agents/client/Client.js +3 -3
- package/api/resources/analytics/client/Client.js +3 -3
- package/api/resources/appSettings/client/Client.js +3 -3
- package/api/resources/commons/types/ActionParameter.d.ts +1 -1
- package/api/resources/commons/types/ActionParameterType.d.ts +13 -1
- package/api/resources/commons/types/BotObjectResponse.d.ts +12 -0
- package/api/resources/commons/types/BotObjectResponse.js +5 -0
- package/api/resources/commons/types/BotResponse.d.ts +4 -1
- package/api/resources/commons/types/NumberRange.d.ts +12 -0
- package/api/resources/commons/types/NumberRange.js +5 -0
- package/api/resources/commons/types/index.d.ts +2 -0
- package/api/resources/commons/types/index.js +2 -0
- package/api/resources/conversation/client/Client.d.ts +30 -0
- package/api/resources/conversation/client/Client.js +109 -13
- package/api/resources/conversation/types/ConversationField.d.ts +2 -1
- package/api/resources/conversation/types/ConversationField.js +1 -0
- package/api/resources/conversation/types/ConversationFilter.d.ts +21 -0
- package/api/resources/conversation/types/FeedbackField.d.ts +2 -1
- package/api/resources/conversation/types/FeedbackField.js +1 -0
- package/api/resources/conversation/types/FeedbackFilter.d.ts +2 -0
- package/api/resources/conversation/types/GenerateObjectRequest.d.ts +8 -0
- package/api/resources/conversation/types/GenerateObjectRequest.js +5 -0
- package/api/resources/conversation/types/index.d.ts +1 -0
- package/api/resources/conversation/types/index.js +1 -0
- package/api/resources/events/client/Client.js +1 -1
- package/api/resources/inbox/client/Client.js +5 -5
- package/api/resources/knowledge/client/Client.js +7 -7
- package/api/resources/organizations/client/Client.js +2 -2
- package/api/resources/translations/client/Client.js +1 -1
- package/api/resources/triggers/client/Client.js +5 -5
- package/api/resources/users/client/Client.js +3 -3
- package/dist/api/resources/actions/client/Client.js +3 -3
- package/dist/api/resources/agents/client/Client.js +3 -3
- package/dist/api/resources/analytics/client/Client.js +3 -3
- package/dist/api/resources/appSettings/client/Client.js +3 -3
- package/dist/api/resources/commons/types/ActionParameter.d.ts +1 -1
- package/dist/api/resources/commons/types/ActionParameterType.d.ts +13 -1
- package/dist/api/resources/commons/types/BotObjectResponse.d.ts +12 -0
- package/dist/api/resources/commons/types/BotObjectResponse.js +5 -0
- package/dist/api/resources/commons/types/BotResponse.d.ts +4 -1
- package/dist/api/resources/commons/types/NumberRange.d.ts +12 -0
- package/dist/api/resources/commons/types/NumberRange.js +5 -0
- package/dist/api/resources/commons/types/index.d.ts +2 -0
- package/dist/api/resources/commons/types/index.js +2 -0
- package/dist/api/resources/conversation/client/Client.d.ts +30 -0
- package/dist/api/resources/conversation/client/Client.js +109 -13
- package/dist/api/resources/conversation/types/ConversationField.d.ts +2 -1
- package/dist/api/resources/conversation/types/ConversationField.js +1 -0
- package/dist/api/resources/conversation/types/ConversationFilter.d.ts +21 -0
- package/dist/api/resources/conversation/types/FeedbackField.d.ts +2 -1
- package/dist/api/resources/conversation/types/FeedbackField.js +1 -0
- package/dist/api/resources/conversation/types/FeedbackFilter.d.ts +2 -0
- package/dist/api/resources/conversation/types/GenerateObjectRequest.d.ts +8 -0
- package/dist/api/resources/conversation/types/GenerateObjectRequest.js +5 -0
- package/dist/api/resources/conversation/types/index.d.ts +1 -0
- package/dist/api/resources/conversation/types/index.js +1 -0
- package/dist/api/resources/events/client/Client.js +1 -1
- package/dist/api/resources/inbox/client/Client.js +5 -5
- package/dist/api/resources/knowledge/client/Client.js +7 -7
- package/dist/api/resources/organizations/client/Client.js +2 -2
- package/dist/api/resources/translations/client/Client.js +1 -1
- package/dist/api/resources/triggers/client/Client.js +5 -5
- package/dist/api/resources/users/client/Client.js +3 -3
- package/dist/serialization/resources/commons/types/BotObjectResponse.d.ts +13 -0
- package/dist/serialization/resources/commons/types/BotObjectResponse.js +44 -0
- package/dist/serialization/resources/commons/types/BotResponse.d.ts +5 -1
- package/dist/serialization/resources/commons/types/BotResponse.js +2 -0
- package/dist/serialization/resources/commons/types/NumberRange.d.ts +13 -0
- package/dist/serialization/resources/commons/types/NumberRange.js +44 -0
- package/dist/serialization/resources/commons/types/index.d.ts +2 -0
- package/dist/serialization/resources/commons/types/index.js +2 -0
- package/dist/serialization/resources/conversation/types/ConversationField.d.ts +1 -1
- package/dist/serialization/resources/conversation/types/ConversationField.js +1 -0
- package/dist/serialization/resources/conversation/types/ConversationFilter.d.ts +3 -0
- package/dist/serialization/resources/conversation/types/ConversationFilter.js +3 -0
- package/dist/serialization/resources/conversation/types/FeedbackField.d.ts +1 -1
- package/dist/serialization/resources/conversation/types/FeedbackField.js +1 -1
- package/dist/serialization/resources/conversation/types/FeedbackFilter.d.ts +2 -0
- package/dist/serialization/resources/conversation/types/FeedbackFilter.js +2 -0
- package/dist/serialization/resources/conversation/types/GenerateObjectRequest.d.ts +13 -0
- package/dist/serialization/resources/conversation/types/GenerateObjectRequest.js +46 -0
- package/dist/serialization/resources/conversation/types/index.d.ts +1 -0
- package/dist/serialization/resources/conversation/types/index.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +86 -0
- package/serialization/resources/commons/types/BotObjectResponse.d.ts +13 -0
- package/serialization/resources/commons/types/BotObjectResponse.js +44 -0
- package/serialization/resources/commons/types/BotResponse.d.ts +5 -1
- package/serialization/resources/commons/types/BotResponse.js +2 -0
- package/serialization/resources/commons/types/NumberRange.d.ts +13 -0
- package/serialization/resources/commons/types/NumberRange.js +44 -0
- package/serialization/resources/commons/types/index.d.ts +2 -0
- package/serialization/resources/commons/types/index.js +2 -0
- package/serialization/resources/conversation/types/ConversationField.d.ts +1 -1
- package/serialization/resources/conversation/types/ConversationField.js +1 -0
- package/serialization/resources/conversation/types/ConversationFilter.d.ts +3 -0
- package/serialization/resources/conversation/types/ConversationFilter.js +3 -0
- package/serialization/resources/conversation/types/FeedbackField.d.ts +1 -1
- package/serialization/resources/conversation/types/FeedbackField.js +1 -1
- package/serialization/resources/conversation/types/FeedbackFilter.d.ts +2 -0
- package/serialization/resources/conversation/types/FeedbackFilter.js +2 -0
- package/serialization/resources/conversation/types/GenerateObjectRequest.d.ts +13 -0
- package/serialization/resources/conversation/types/GenerateObjectRequest.js +46 -0
- package/serialization/resources/conversation/types/index.d.ts +1 -0
- package/serialization/resources/conversation/types/index.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as MavenAGI from "../../../index";
|
|
5
|
-
export type BotResponse = MavenAGI.BotResponse.Text | MavenAGI.BotResponse.ActionForm | MavenAGI.BotResponse.Chart;
|
|
5
|
+
export type BotResponse = MavenAGI.BotResponse.Text | MavenAGI.BotResponse.ActionForm | MavenAGI.BotResponse.Chart | MavenAGI.BotResponse.Object_;
|
|
6
6
|
export declare namespace BotResponse {
|
|
7
7
|
interface Text extends MavenAGI.BotTextResponse {
|
|
8
8
|
type: "text";
|
|
@@ -13,4 +13,7 @@ export declare namespace BotResponse {
|
|
|
13
13
|
interface Chart extends MavenAGI.BotChartResponse {
|
|
14
14
|
type: "chart";
|
|
15
15
|
}
|
|
16
|
+
interface Object_ extends MavenAGI.BotObjectResponse {
|
|
17
|
+
type: "object";
|
|
18
|
+
}
|
|
16
19
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* A range of numbers that can be used to filter search results by numeric fields.
|
|
6
|
+
* - `greaterThanOrEqual`: The minimum value (inclusive).
|
|
7
|
+
* - `lessThan`: The maximum value (exclusive).
|
|
8
|
+
*/
|
|
9
|
+
export interface NumberRange {
|
|
10
|
+
greaterThanOrEqual?: number;
|
|
11
|
+
lessThan?: number;
|
|
12
|
+
}
|
|
@@ -42,6 +42,7 @@ export * from "./BotMessage";
|
|
|
42
42
|
export * from "./Source";
|
|
43
43
|
export * from "./BotResponseMetadata";
|
|
44
44
|
export * from "./BotResponse";
|
|
45
|
+
export * from "./BotObjectResponse";
|
|
45
46
|
export * from "./BotTextResponse";
|
|
46
47
|
export * from "./BotActionFormResponse";
|
|
47
48
|
export * from "./ActionFormField";
|
|
@@ -76,3 +77,4 @@ export * from "./InboxItemFixBase";
|
|
|
76
77
|
export * from "./InboxItemFixAddDocument";
|
|
77
78
|
export * from "./InboxItemFixDeactivateDocument";
|
|
78
79
|
export * from "./InboxItemFixDeactivateKnowledgeBase";
|
|
80
|
+
export * from "./NumberRange";
|
|
@@ -58,6 +58,7 @@ __exportStar(require("./BotMessage"), exports);
|
|
|
58
58
|
__exportStar(require("./Source"), exports);
|
|
59
59
|
__exportStar(require("./BotResponseMetadata"), exports);
|
|
60
60
|
__exportStar(require("./BotResponse"), exports);
|
|
61
|
+
__exportStar(require("./BotObjectResponse"), exports);
|
|
61
62
|
__exportStar(require("./BotTextResponse"), exports);
|
|
62
63
|
__exportStar(require("./BotActionFormResponse"), exports);
|
|
63
64
|
__exportStar(require("./ActionFormField"), exports);
|
|
@@ -92,3 +93,4 @@ __exportStar(require("./InboxItemFixBase"), exports);
|
|
|
92
93
|
__exportStar(require("./InboxItemFixAddDocument"), exports);
|
|
93
94
|
__exportStar(require("./InboxItemFixDeactivateDocument"), exports);
|
|
94
95
|
__exportStar(require("./InboxItemFixDeactivateKnowledgeBase"), exports);
|
|
96
|
+
__exportStar(require("./NumberRange"), exports);
|
|
@@ -227,6 +227,36 @@ export declare class Conversation {
|
|
|
227
227
|
* })
|
|
228
228
|
*/
|
|
229
229
|
generateMavenSuggestions(conversationId: string, request: MavenAGI.GenerateMavenSuggestionsRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
|
|
230
|
+
/**
|
|
231
|
+
* Generate a structured object response based on a provided schema and user prompt.
|
|
232
|
+
*
|
|
233
|
+
* If the user question and object response already exist, they will be reused and not updated.
|
|
234
|
+
*
|
|
235
|
+
* Known Limitations:
|
|
236
|
+
* - Schema enforcement is best-effort and may not guarantee exact conformity.
|
|
237
|
+
* - This endpoint does not stream results. Use `askDataStream` (coming soon) for progressive rendering.
|
|
238
|
+
*
|
|
239
|
+
* @param {string} conversationId - The ID of a new or existing conversation to use as context for the object generation request
|
|
240
|
+
* @param {MavenAGI.GenerateObjectRequest} request
|
|
241
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
242
|
+
*
|
|
243
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
244
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
245
|
+
* @throws {@link MavenAGI.ServerError}
|
|
246
|
+
*
|
|
247
|
+
* @example
|
|
248
|
+
* await client.conversation.generateObject("conversationId", {
|
|
249
|
+
* conversationMessageId: {
|
|
250
|
+
* referenceId: "referenceId"
|
|
251
|
+
* },
|
|
252
|
+
* userId: {
|
|
253
|
+
* referenceId: "referenceId"
|
|
254
|
+
* },
|
|
255
|
+
* text: "text",
|
|
256
|
+
* schema: "schema"
|
|
257
|
+
* })
|
|
258
|
+
*/
|
|
259
|
+
generateObject(conversationId: string, request: MavenAGI.GenerateObjectRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.BotObjectResponse>;
|
|
230
260
|
/**
|
|
231
261
|
* Uses an LLM flow to categorize the conversation. Experimental.
|
|
232
262
|
*
|
|
@@ -108,7 +108,7 @@ class Conversation {
|
|
|
108
108
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
109
109
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, "/v1/conversations"),
|
|
110
110
|
method: "POST",
|
|
111
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
111
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
112
112
|
contentType: "application/json",
|
|
113
113
|
requestType: "json",
|
|
114
114
|
body: serializers.ConversationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -194,7 +194,7 @@ class Conversation {
|
|
|
194
194
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
195
195
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}`),
|
|
196
196
|
method: "GET",
|
|
197
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
197
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
198
198
|
contentType: "application/json",
|
|
199
199
|
queryParameters: _queryParams,
|
|
200
200
|
requestType: "json",
|
|
@@ -289,7 +289,7 @@ class Conversation {
|
|
|
289
289
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
290
290
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}`),
|
|
291
291
|
method: "DELETE",
|
|
292
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
292
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
293
293
|
contentType: "application/json",
|
|
294
294
|
queryParameters: _queryParams,
|
|
295
295
|
requestType: "json",
|
|
@@ -383,7 +383,7 @@ class Conversation {
|
|
|
383
383
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
384
384
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/messages`),
|
|
385
385
|
method: "POST",
|
|
386
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
386
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
387
387
|
contentType: "application/json",
|
|
388
388
|
requestType: "json",
|
|
389
389
|
body: serializers.conversation.appendNewMessages.Request.jsonOrThrow(request, {
|
|
@@ -491,7 +491,7 @@ class Conversation {
|
|
|
491
491
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
492
492
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/ask`),
|
|
493
493
|
method: "POST",
|
|
494
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
494
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
495
495
|
contentType: "application/json",
|
|
496
496
|
requestType: "json",
|
|
497
497
|
body: serializers.AskRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -573,7 +573,7 @@ class Conversation {
|
|
|
573
573
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
574
574
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/ask_stream`),
|
|
575
575
|
method: "POST",
|
|
576
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
576
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
577
577
|
contentType: "application/json",
|
|
578
578
|
requestType: "json",
|
|
579
579
|
body: serializers.AskRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -671,7 +671,7 @@ class Conversation {
|
|
|
671
671
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
672
672
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/generate_maven_suggestions`),
|
|
673
673
|
method: "POST",
|
|
674
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
674
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
675
675
|
contentType: "application/json",
|
|
676
676
|
requestType: "json",
|
|
677
677
|
body: serializers.GenerateMavenSuggestionsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -732,6 +732,102 @@ class Conversation {
|
|
|
732
732
|
}
|
|
733
733
|
});
|
|
734
734
|
}
|
|
735
|
+
/**
|
|
736
|
+
* Generate a structured object response based on a provided schema and user prompt.
|
|
737
|
+
*
|
|
738
|
+
* If the user question and object response already exist, they will be reused and not updated.
|
|
739
|
+
*
|
|
740
|
+
* Known Limitations:
|
|
741
|
+
* - Schema enforcement is best-effort and may not guarantee exact conformity.
|
|
742
|
+
* - This endpoint does not stream results. Use `askDataStream` (coming soon) for progressive rendering.
|
|
743
|
+
*
|
|
744
|
+
* @param {string} conversationId - The ID of a new or existing conversation to use as context for the object generation request
|
|
745
|
+
* @param {MavenAGI.GenerateObjectRequest} request
|
|
746
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
747
|
+
*
|
|
748
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
749
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
750
|
+
* @throws {@link MavenAGI.ServerError}
|
|
751
|
+
*
|
|
752
|
+
* @example
|
|
753
|
+
* await client.conversation.generateObject("conversationId", {
|
|
754
|
+
* conversationMessageId: {
|
|
755
|
+
* referenceId: "referenceId"
|
|
756
|
+
* },
|
|
757
|
+
* userId: {
|
|
758
|
+
* referenceId: "referenceId"
|
|
759
|
+
* },
|
|
760
|
+
* text: "text",
|
|
761
|
+
* schema: "schema"
|
|
762
|
+
* })
|
|
763
|
+
*/
|
|
764
|
+
generateObject(conversationId, request, requestOptions) {
|
|
765
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
766
|
+
var _a, _b, _c;
|
|
767
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
768
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/generate_object`),
|
|
769
|
+
method: "POST",
|
|
770
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
771
|
+
contentType: "application/json",
|
|
772
|
+
requestType: "json",
|
|
773
|
+
body: serializers.GenerateObjectRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
774
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
775
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
776
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
777
|
+
});
|
|
778
|
+
if (_response.ok) {
|
|
779
|
+
return serializers.BotObjectResponse.parseOrThrow(_response.body, {
|
|
780
|
+
unrecognizedObjectKeys: "passthrough",
|
|
781
|
+
allowUnrecognizedUnionMembers: true,
|
|
782
|
+
allowUnrecognizedEnumValues: true,
|
|
783
|
+
breadcrumbsPrefix: ["response"],
|
|
784
|
+
});
|
|
785
|
+
}
|
|
786
|
+
if (_response.error.reason === "status-code") {
|
|
787
|
+
switch (_response.error.statusCode) {
|
|
788
|
+
case 404:
|
|
789
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
790
|
+
unrecognizedObjectKeys: "passthrough",
|
|
791
|
+
allowUnrecognizedUnionMembers: true,
|
|
792
|
+
allowUnrecognizedEnumValues: true,
|
|
793
|
+
breadcrumbsPrefix: ["response"],
|
|
794
|
+
}));
|
|
795
|
+
case 400:
|
|
796
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
797
|
+
unrecognizedObjectKeys: "passthrough",
|
|
798
|
+
allowUnrecognizedUnionMembers: true,
|
|
799
|
+
allowUnrecognizedEnumValues: true,
|
|
800
|
+
breadcrumbsPrefix: ["response"],
|
|
801
|
+
}));
|
|
802
|
+
case 500:
|
|
803
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
804
|
+
unrecognizedObjectKeys: "passthrough",
|
|
805
|
+
allowUnrecognizedUnionMembers: true,
|
|
806
|
+
allowUnrecognizedEnumValues: true,
|
|
807
|
+
breadcrumbsPrefix: ["response"],
|
|
808
|
+
}));
|
|
809
|
+
default:
|
|
810
|
+
throw new errors.MavenAGIError({
|
|
811
|
+
statusCode: _response.error.statusCode,
|
|
812
|
+
body: _response.error.body,
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
switch (_response.error.reason) {
|
|
817
|
+
case "non-json":
|
|
818
|
+
throw new errors.MavenAGIError({
|
|
819
|
+
statusCode: _response.error.statusCode,
|
|
820
|
+
body: _response.error.rawBody,
|
|
821
|
+
});
|
|
822
|
+
case "timeout":
|
|
823
|
+
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/conversations/{conversationId}/generate_object.");
|
|
824
|
+
case "unknown":
|
|
825
|
+
throw new errors.MavenAGIError({
|
|
826
|
+
message: _response.error.errorMessage,
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
});
|
|
830
|
+
}
|
|
735
831
|
/**
|
|
736
832
|
* Uses an LLM flow to categorize the conversation. Experimental.
|
|
737
833
|
*
|
|
@@ -751,7 +847,7 @@ class Conversation {
|
|
|
751
847
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
752
848
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/categorize`),
|
|
753
849
|
method: "POST",
|
|
754
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
850
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
755
851
|
contentType: "application/json",
|
|
756
852
|
requestType: "json",
|
|
757
853
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -845,7 +941,7 @@ class Conversation {
|
|
|
845
941
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
846
942
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, "/v1/conversations/feedback"),
|
|
847
943
|
method: "POST",
|
|
848
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
944
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
849
945
|
contentType: "application/json",
|
|
850
946
|
requestType: "json",
|
|
851
947
|
body: serializers.FeedbackRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -933,7 +1029,7 @@ class Conversation {
|
|
|
933
1029
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
934
1030
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/submit-form`),
|
|
935
1031
|
method: "POST",
|
|
936
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
1032
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
937
1033
|
contentType: "application/json",
|
|
938
1034
|
requestType: "json",
|
|
939
1035
|
body: serializers.SubmitActionFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1018,7 +1114,7 @@ class Conversation {
|
|
|
1018
1114
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1019
1115
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/metadata`),
|
|
1020
1116
|
method: "POST",
|
|
1021
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
1117
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1022
1118
|
contentType: "application/json",
|
|
1023
1119
|
requestType: "json",
|
|
1024
1120
|
body: serializers.conversation.addConversationMetadata.Request.jsonOrThrow(request, {
|
|
@@ -1112,7 +1208,7 @@ class Conversation {
|
|
|
1112
1208
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1113
1209
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/metadata`),
|
|
1114
1210
|
method: "PUT",
|
|
1115
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
1211
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1116
1212
|
contentType: "application/json",
|
|
1117
1213
|
requestType: "json",
|
|
1118
1214
|
body: serializers.UpdateMetadataRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1192,7 +1288,7 @@ class Conversation {
|
|
|
1192
1288
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1193
1289
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, "/v1/conversations/search"),
|
|
1194
1290
|
method: "POST",
|
|
1195
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
1291
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1196
1292
|
contentType: "application/json",
|
|
1197
1293
|
requestType: "json",
|
|
1198
1294
|
body: serializers.ConversationsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type ConversationField = "Category" | "FirstResponseTime" | "HandleTime" | "HumanAgents" | "App" | "Sentiment" | "QualityReason" | "ResolutionStatus" | "Quality" | "Users" | "ResponseLength" | "ThumbsUpCount" | "ThumbsDownCount" | "InsertCount" | "Tags" | "UserMessageCount" | "Languages" | "Actions" | "IncompleteActions" | "Sources" | "CreatedAt";
|
|
4
|
+
export type ConversationField = "Category" | "FirstResponseTime" | "HandleTime" | "HumanAgents" | "HumanAgentsWithInserts" | "App" | "Sentiment" | "QualityReason" | "ResolutionStatus" | "Quality" | "Users" | "ResponseLength" | "ThumbsUpCount" | "ThumbsDownCount" | "InsertCount" | "Tags" | "UserMessageCount" | "Languages" | "Actions" | "IncompleteActions" | "Sources" | "CreatedAt";
|
|
5
5
|
export declare const ConversationField: {
|
|
6
6
|
readonly Category: "Category";
|
|
7
7
|
readonly FirstResponseTime: "FirstResponseTime";
|
|
8
8
|
readonly HandleTime: "HandleTime";
|
|
9
9
|
readonly HumanAgents: "HumanAgents";
|
|
10
|
+
readonly HumanAgentsWithInserts: "HumanAgentsWithInserts";
|
|
10
11
|
readonly App: "App";
|
|
11
12
|
readonly Sentiment: "Sentiment";
|
|
12
13
|
readonly QualityReason: "QualityReason";
|
|
@@ -3,21 +3,42 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as MavenAGI from "../../../index";
|
|
5
5
|
export interface ConversationFilter {
|
|
6
|
+
/** Full-text search query for matching conversations by content. When you search with this parameter, you're performing a full-text search across all textual content in the conversations, including both the user's messages and the AI's responses. */
|
|
6
7
|
search?: string;
|
|
8
|
+
/** Filter conversations created on or after this timestamp */
|
|
7
9
|
createdAfter?: Date;
|
|
10
|
+
/** Filter conversations created on or before this timestamp */
|
|
8
11
|
createdBefore?: Date;
|
|
12
|
+
/** Filter by app IDs */
|
|
9
13
|
apps?: string[];
|
|
14
|
+
/** Filter by conversation categories */
|
|
10
15
|
categories?: string[];
|
|
16
|
+
/** Filter by actions that were executed in the conversation */
|
|
11
17
|
actions?: MavenAGI.EntityIdFilter[];
|
|
18
|
+
/** Filter by actions that were suggested but not completed by the AI agent */
|
|
12
19
|
incompleteActions?: MavenAGI.EntityIdFilter[];
|
|
20
|
+
/** Filter by user feedback types received in the conversation */
|
|
13
21
|
feedback?: MavenAGI.FeedbackType[];
|
|
22
|
+
/** Filter by human agents who participated in the conversation */
|
|
14
23
|
humanAgents?: string[];
|
|
24
|
+
/** Filter by human agents who inserted a maven AI generated suggestion in the conversation */
|
|
25
|
+
humanAgentsWithInserts?: string[];
|
|
26
|
+
/** Filter by conversation languages */
|
|
15
27
|
languages?: string[];
|
|
28
|
+
/** Filter by AI assessed conversation quality classification */
|
|
16
29
|
quality?: MavenAGI.Quality[];
|
|
30
|
+
/** Filter by AI assessed quality reason classification */
|
|
17
31
|
qualityReason?: MavenAGI.QualityReason[];
|
|
32
|
+
/** Filter by AI response length classification */
|
|
18
33
|
responseLength?: MavenAGI.ResponseLength[];
|
|
34
|
+
/** Filter by AI assessed sentiment analysis */
|
|
19
35
|
sentiment?: MavenAGI.Sentiment[];
|
|
36
|
+
/** Filter by tags applied to the conversation */
|
|
20
37
|
tags?: string[];
|
|
38
|
+
/** Filter by conversation resolution status which is determined by AI based on the conversation content. */
|
|
21
39
|
resolutionStatus?: MavenAGI.ResolutionStatus[];
|
|
40
|
+
/** Filter conversations based on whether they were resolved by Maven AI */
|
|
22
41
|
resolvedByMaven?: boolean;
|
|
42
|
+
/** Filter by the number of messages sent by the user in the conversation */
|
|
43
|
+
userMessageCount?: MavenAGI.NumberRange;
|
|
23
44
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type FeedbackField = "Type" | "CreatedBy" | "CreatedAt";
|
|
4
|
+
export type FeedbackField = "Type" | "CreatedBy" | "CreatedAt" | "App";
|
|
5
5
|
export declare const FeedbackField: {
|
|
6
6
|
readonly Type: "Type";
|
|
7
7
|
readonly CreatedBy: "CreatedBy";
|
|
8
8
|
readonly CreatedAt: "CreatedAt";
|
|
9
|
+
readonly App: "App";
|
|
9
10
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
export interface GenerateObjectRequest extends MavenAGI.AskRequest {
|
|
6
|
+
/** JSON schema string defining the expected object shape. */
|
|
7
|
+
schema: string;
|
|
8
|
+
}
|
|
@@ -5,6 +5,7 @@ export * from "./ConversationRequest";
|
|
|
5
5
|
export * from "./ConversationMessageRequest";
|
|
6
6
|
export * from "./SubmitActionFormRequest";
|
|
7
7
|
export * from "./FeedbackRequest";
|
|
8
|
+
export * from "./GenerateObjectRequest";
|
|
8
9
|
export * from "./StreamResponse";
|
|
9
10
|
export * from "./AskStreamTextEvent";
|
|
10
11
|
export * from "./AskStreamActionEvent";
|
|
@@ -21,6 +21,7 @@ __exportStar(require("./ConversationRequest"), exports);
|
|
|
21
21
|
__exportStar(require("./ConversationMessageRequest"), exports);
|
|
22
22
|
__exportStar(require("./SubmitActionFormRequest"), exports);
|
|
23
23
|
__exportStar(require("./FeedbackRequest"), exports);
|
|
24
|
+
__exportStar(require("./GenerateObjectRequest"), exports);
|
|
24
25
|
__exportStar(require("./StreamResponse"), exports);
|
|
25
26
|
__exportStar(require("./AskStreamTextEvent"), exports);
|
|
26
27
|
__exportStar(require("./AskStreamActionEvent"), exports);
|
|
@@ -78,7 +78,7 @@ class Events {
|
|
|
78
78
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
79
79
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, "/v1/events/search"),
|
|
80
80
|
method: "POST",
|
|
81
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
81
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
82
82
|
contentType: "application/json",
|
|
83
83
|
requestType: "json",
|
|
84
84
|
body: serializers.EventsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -78,7 +78,7 @@ class Inbox {
|
|
|
78
78
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
79
79
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, "/v1/inbox/search"),
|
|
80
80
|
method: "POST",
|
|
81
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
81
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
82
82
|
contentType: "application/json",
|
|
83
83
|
requestType: "json",
|
|
84
84
|
body: serializers.InboxSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -164,7 +164,7 @@ class Inbox {
|
|
|
164
164
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
165
165
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/inbox/${encodeURIComponent(inboxItemId)}`),
|
|
166
166
|
method: "GET",
|
|
167
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
167
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
168
168
|
contentType: "application/json",
|
|
169
169
|
queryParameters: _queryParams,
|
|
170
170
|
requestType: "json",
|
|
@@ -250,7 +250,7 @@ class Inbox {
|
|
|
250
250
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
251
251
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/inbox/fix/${encodeURIComponent(inboxItemFixId)}`),
|
|
252
252
|
method: "GET",
|
|
253
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
253
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
254
254
|
contentType: "application/json",
|
|
255
255
|
queryParameters: _queryParams,
|
|
256
256
|
requestType: "json",
|
|
@@ -333,7 +333,7 @@ class Inbox {
|
|
|
333
333
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
334
334
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/inbox/fix/${encodeURIComponent(inboxItemFixId)}/apply`),
|
|
335
335
|
method: "POST",
|
|
336
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
336
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
337
337
|
contentType: "application/json",
|
|
338
338
|
requestType: "json",
|
|
339
339
|
body: serializers.ApplyInboxItemFixRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -414,7 +414,7 @@ class Inbox {
|
|
|
414
414
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
415
415
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/inbox/${encodeURIComponent(inboxItemId)}/ignore`),
|
|
416
416
|
method: "POST",
|
|
417
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
417
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
418
418
|
contentType: "application/json",
|
|
419
419
|
queryParameters: _queryParams,
|
|
420
420
|
requestType: "json",
|