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
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ class Actions {
|
|
|
98
98
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
99
99
|
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/actions"),
|
|
100
100
|
method: "PUT",
|
|
101
|
-
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.
|
|
101
|
+
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),
|
|
102
102
|
contentType: "application/json",
|
|
103
103
|
requestType: "json",
|
|
104
104
|
body: serializers.ActionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -178,7 +178,7 @@ class Actions {
|
|
|
178
178
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
179
179
|
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/actions/${encodeURIComponent(actionReferenceId)}`),
|
|
180
180
|
method: "GET",
|
|
181
|
-
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.
|
|
181
|
+
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),
|
|
182
182
|
contentType: "application/json",
|
|
183
183
|
requestType: "json",
|
|
184
184
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -257,7 +257,7 @@ class Actions {
|
|
|
257
257
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
258
258
|
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/actions/${encodeURIComponent(actionReferenceId)}`),
|
|
259
259
|
method: "DELETE",
|
|
260
|
-
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.
|
|
260
|
+
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),
|
|
261
261
|
contentType: "application/json",
|
|
262
262
|
requestType: "json",
|
|
263
263
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -82,7 +82,7 @@ class Agents {
|
|
|
82
82
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
83
83
|
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/agents"),
|
|
84
84
|
method: "POST",
|
|
85
|
-
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.
|
|
85
|
+
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),
|
|
86
86
|
contentType: "application/json",
|
|
87
87
|
requestType: "json",
|
|
88
88
|
body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -162,7 +162,7 @@ class Agents {
|
|
|
162
162
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
163
163
|
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/organizations/${encodeURIComponent(organizationReferenceId)}/agents`),
|
|
164
164
|
method: "GET",
|
|
165
|
-
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.
|
|
165
|
+
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),
|
|
166
166
|
contentType: "application/json",
|
|
167
167
|
requestType: "json",
|
|
168
168
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -242,7 +242,7 @@ class Agents {
|
|
|
242
242
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
243
243
|
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/organizations/${encodeURIComponent(organizationReferenceId)}/agents/${encodeURIComponent(agentReferenceId)}`),
|
|
244
244
|
method: "GET",
|
|
245
|
-
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.
|
|
245
|
+
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),
|
|
246
246
|
contentType: "application/json",
|
|
247
247
|
requestType: "json",
|
|
248
248
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -105,7 +105,7 @@ class Analytics {
|
|
|
105
105
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
106
106
|
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/tables/conversations"),
|
|
107
107
|
method: "POST",
|
|
108
|
-
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.
|
|
108
|
+
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),
|
|
109
109
|
contentType: "application/json",
|
|
110
110
|
requestType: "json",
|
|
111
111
|
body: serializers.ConversationTableRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -228,7 +228,7 @@ class Analytics {
|
|
|
228
228
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
229
229
|
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/charts/conversations"),
|
|
230
230
|
method: "POST",
|
|
231
|
-
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.
|
|
231
|
+
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),
|
|
232
232
|
contentType: "application/json",
|
|
233
233
|
requestType: "json",
|
|
234
234
|
body: serializers.ConversationChartRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -321,7 +321,7 @@ class Analytics {
|
|
|
321
321
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
322
322
|
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/tables/feedback"),
|
|
323
323
|
method: "POST",
|
|
324
|
-
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.
|
|
324
|
+
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),
|
|
325
325
|
contentType: "application/json",
|
|
326
326
|
requestType: "json",
|
|
327
327
|
body: serializers.FeedbackTableRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -87,7 +87,7 @@ class AppSettings {
|
|
|
87
87
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
88
88
|
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/app-settings/search"),
|
|
89
89
|
method: "GET",
|
|
90
|
-
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.
|
|
90
|
+
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),
|
|
91
91
|
contentType: "application/json",
|
|
92
92
|
queryParameters: _queryParams,
|
|
93
93
|
requestType: "json",
|
|
@@ -166,7 +166,7 @@ class AppSettings {
|
|
|
166
166
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
167
167
|
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/app-settings"),
|
|
168
168
|
method: "GET",
|
|
169
|
-
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.
|
|
169
|
+
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),
|
|
170
170
|
contentType: "application/json",
|
|
171
171
|
requestType: "json",
|
|
172
172
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -255,7 +255,7 @@ class AppSettings {
|
|
|
255
255
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
256
256
|
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/app-settings"),
|
|
257
257
|
method: "PATCH",
|
|
258
|
-
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.
|
|
258
|
+
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),
|
|
259
259
|
contentType: "application/json",
|
|
260
260
|
requestType: "json",
|
|
261
261
|
body: serializers.appSettings.update.Request.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -13,7 +13,7 @@ export interface ActionParameter {
|
|
|
13
13
|
required: boolean;
|
|
14
14
|
/** The parameter type. Values provided to `executeAction` will conform to this type. Defaults to `STRING`. */
|
|
15
15
|
type?: MavenAGI.ActionParameterType;
|
|
16
|
-
/** Restricts the action parameter to only the options in this list. Valid for type `STRING`, `BOOLEAN`, and `NUMBER`. */
|
|
16
|
+
/** Restricts the action parameter to only the options in this list. Valid for type `STRING`, `BOOLEAN`, and `NUMBER`. Should not be used when type is `SCHEMA`. */
|
|
17
17
|
enumOptions?: MavenAGI.ActionEnumOption[];
|
|
18
18
|
/** JSON schema for validating the parameter value. Only valid when type is `SCHEMA`. */
|
|
19
19
|
schema?: string;
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type ActionParameterType =
|
|
4
|
+
export type ActionParameterType =
|
|
5
|
+
/**
|
|
6
|
+
* String parameter type for text input. */
|
|
7
|
+
"STRING"
|
|
8
|
+
/**
|
|
9
|
+
* Boolean parameter type for true/false values. */
|
|
10
|
+
| "BOOLEAN"
|
|
11
|
+
/**
|
|
12
|
+
* Number parameter type for numeric values. */
|
|
13
|
+
| "NUMBER"
|
|
14
|
+
/**
|
|
15
|
+
* Schema parameter type for complex structured data that adheres to a JSON schema definition. When this type is used this should be the only action parameter (all other parameters should be omitted), the `schema` field must be set and `enumOptions` should not be used. */
|
|
16
|
+
| "SCHEMA";
|
|
5
17
|
export declare const ActionParameterType: {
|
|
6
18
|
readonly String: "STRING";
|
|
7
19
|
readonly Boolean: "BOOLEAN";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* A structured object generated by the bot in response to a schema-based generateObject request. Should be rendered as JSON.
|
|
6
|
+
*/
|
|
7
|
+
export interface BotObjectResponse {
|
|
8
|
+
/** A human-readable name for the generated object, for use in the UI. */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** The generated object conforming to the provided schema. */
|
|
11
|
+
object?: unknown;
|
|
12
|
+
}
|
|
@@ -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";
|