mavenagi 1.0.9 → 1.0.10
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/api/resources/actions/client/Client.js +3 -3
- package/api/resources/analytics/client/Client.js +3 -3
- package/api/resources/appSettings/client/Client.d.ts +24 -0
- package/api/resources/appSettings/client/Client.js +91 -1
- package/api/resources/commons/types/ConversationAnalysis.d.ts +6 -0
- package/{dist/api/resources/conversation → api/resources/commons}/types/QualityReason.d.ts +1 -2
- package/{dist/api/resources/conversation → api/resources/commons}/types/QualityReason.js +0 -1
- 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 +8 -1
- package/api/resources/conversation/client/Client.js +21 -14
- package/api/resources/conversation/types/index.d.ts +0 -2
- package/api/resources/conversation/types/index.js +0 -2
- package/api/resources/inbox/client/Client.js +5 -5
- package/api/resources/knowledge/client/Client.d.ts +3 -1
- package/api/resources/knowledge/client/Client.js +10 -8
- package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +4 -1
- package/api/resources/knowledge/types/KnowledgeBaseType.d.ts +10 -0
- package/api/resources/knowledge/types/KnowledgeBaseType.js +9 -0
- package/api/resources/knowledge/types/index.d.ts +1 -0
- package/api/resources/knowledge/types/index.js +1 -0
- package/api/resources/realtime/types/HangUpPublishEvent.d.ts +6 -0
- package/api/resources/realtime/types/HangUpPublishEvent.js +5 -0
- package/api/resources/realtime/types/PublishEvent.d.ts +4 -1
- package/api/resources/realtime/types/index.d.ts +1 -0
- package/api/resources/realtime/types/index.js +1 -0
- package/api/resources/translations/client/Client.js +1 -1
- package/api/resources/triggers/client/Client.js +3 -3
- package/api/resources/users/client/Client.js +3 -3
- package/dist/api/resources/actions/client/Client.js +3 -3
- package/dist/api/resources/analytics/client/Client.js +3 -3
- package/dist/api/resources/appSettings/client/Client.d.ts +24 -0
- package/dist/api/resources/appSettings/client/Client.js +91 -1
- package/dist/api/resources/commons/types/ConversationAnalysis.d.ts +6 -0
- package/{api/resources/conversation → dist/api/resources/commons}/types/QualityReason.d.ts +1 -2
- package/{api/resources/conversation → dist/api/resources/commons}/types/QualityReason.js +0 -1
- 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 +8 -1
- package/dist/api/resources/conversation/client/Client.js +21 -14
- package/dist/api/resources/conversation/types/index.d.ts +0 -2
- package/dist/api/resources/conversation/types/index.js +0 -2
- package/dist/api/resources/inbox/client/Client.js +5 -5
- package/dist/api/resources/knowledge/client/Client.d.ts +3 -1
- package/dist/api/resources/knowledge/client/Client.js +10 -8
- package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +4 -1
- package/dist/api/resources/knowledge/types/KnowledgeBaseType.d.ts +10 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseType.js +9 -0
- package/dist/api/resources/knowledge/types/index.d.ts +1 -0
- package/dist/api/resources/knowledge/types/index.js +1 -0
- package/dist/api/resources/realtime/types/HangUpPublishEvent.d.ts +6 -0
- package/dist/api/resources/realtime/types/HangUpPublishEvent.js +5 -0
- package/dist/api/resources/realtime/types/PublishEvent.d.ts +4 -1
- package/dist/api/resources/realtime/types/index.d.ts +1 -0
- package/dist/api/resources/realtime/types/index.js +1 -0
- package/dist/api/resources/translations/client/Client.js +1 -1
- package/dist/api/resources/triggers/client/Client.js +3 -3
- package/dist/api/resources/users/client/Client.js +3 -3
- package/dist/serialization/resources/appSettings/client/index.d.ts +1 -0
- package/dist/serialization/resources/appSettings/client/index.js +2 -1
- package/dist/serialization/resources/appSettings/client/update.d.ts +13 -0
- package/dist/serialization/resources/appSettings/client/update.js +42 -0
- package/dist/serialization/resources/commons/types/ConversationAnalysis.d.ts +5 -0
- package/dist/serialization/resources/commons/types/ConversationAnalysis.js +5 -0
- package/dist/serialization/resources/{conversation → commons}/types/QualityReason.d.ts +1 -1
- package/dist/serialization/resources/{conversation → commons}/types/QualityReason.js +0 -1
- 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/ConversationFilter.d.ts +2 -2
- package/dist/serialization/resources/conversation/types/ConversationFilter.js +2 -2
- package/dist/serialization/resources/conversation/types/index.d.ts +0 -2
- package/dist/serialization/resources/conversation/types/index.js +0 -2
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +2 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +2 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseType.d.ts +10 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseType.js +41 -0
- package/dist/serialization/resources/knowledge/types/index.d.ts +1 -0
- package/dist/serialization/resources/knowledge/types/index.js +1 -0
- package/dist/serialization/resources/realtime/types/HangUpPublishEvent.d.ts +12 -0
- package/dist/serialization/resources/realtime/types/HangUpPublishEvent.js +43 -0
- package/dist/serialization/resources/realtime/types/PublishEvent.d.ts +5 -1
- package/dist/serialization/resources/realtime/types/PublishEvent.js +2 -0
- package/dist/serialization/resources/realtime/types/index.d.ts +1 -0
- package/dist/serialization/resources/realtime/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 +87 -5
- package/serialization/resources/appSettings/client/index.d.ts +1 -0
- package/serialization/resources/appSettings/client/index.js +2 -1
- package/serialization/resources/appSettings/client/update.d.ts +13 -0
- package/serialization/resources/appSettings/client/update.js +42 -0
- package/serialization/resources/commons/types/ConversationAnalysis.d.ts +5 -0
- package/serialization/resources/commons/types/ConversationAnalysis.js +5 -0
- package/serialization/resources/{conversation → commons}/types/QualityReason.d.ts +1 -1
- package/serialization/resources/{conversation → commons}/types/QualityReason.js +0 -1
- package/serialization/resources/commons/types/index.d.ts +2 -0
- package/serialization/resources/commons/types/index.js +2 -0
- package/serialization/resources/conversation/types/ConversationFilter.d.ts +2 -2
- package/serialization/resources/conversation/types/ConversationFilter.js +2 -2
- package/serialization/resources/conversation/types/index.d.ts +0 -2
- package/serialization/resources/conversation/types/index.js +0 -2
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +2 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +2 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseType.d.ts +10 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseType.js +41 -0
- package/serialization/resources/knowledge/types/index.d.ts +1 -0
- package/serialization/resources/knowledge/types/index.js +1 -0
- package/serialization/resources/realtime/types/HangUpPublishEvent.d.ts +12 -0
- package/serialization/resources/realtime/types/HangUpPublishEvent.js +43 -0
- package/serialization/resources/realtime/types/PublishEvent.d.ts +5 -1
- package/serialization/resources/realtime/types/PublishEvent.js +2 -0
- package/serialization/resources/realtime/types/index.d.ts +1 -0
- package/serialization/resources/realtime/types/index.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- /package/api/resources/{conversation → commons}/types/Quality.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/Quality.js +0 -0
- /package/dist/api/resources/{conversation → commons}/types/Quality.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/Quality.js +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/Quality.d.ts +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/Quality.js +0 -0
- /package/serialization/resources/{conversation → commons}/types/Quality.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/Quality.js +0 -0
|
@@ -83,7 +83,7 @@ class Knowledge {
|
|
|
83
83
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
84
84
|
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/knowledge"),
|
|
85
85
|
method: "PUT",
|
|
86
|
-
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.
|
|
86
|
+
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.10", "User-Agent": "mavenagi/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
87
87
|
contentType: "application/json",
|
|
88
88
|
requestType: "json",
|
|
89
89
|
body: serializers.KnowledgeBaseRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -163,7 +163,7 @@ class Knowledge {
|
|
|
163
163
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
164
164
|
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/knowledge/${encodeURIComponent(knowledgeBaseReferenceId)}`),
|
|
165
165
|
method: "GET",
|
|
166
|
-
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.
|
|
166
|
+
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.10", "User-Agent": "mavenagi/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
167
167
|
contentType: "application/json",
|
|
168
168
|
requestType: "json",
|
|
169
169
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -224,7 +224,9 @@ class Knowledge {
|
|
|
224
224
|
});
|
|
225
225
|
}
|
|
226
226
|
/**
|
|
227
|
-
* Create a new knowledge base version.
|
|
227
|
+
* Create a new knowledge base version.
|
|
228
|
+
*
|
|
229
|
+
* If an existing version is in progress, then that version will be finalized in an error state.
|
|
228
230
|
*
|
|
229
231
|
* @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to create a version for. All other entity ID fields are inferred from the request.
|
|
230
232
|
* @param {MavenAGI.KnowledgeBaseVersion} request
|
|
@@ -245,7 +247,7 @@ class Knowledge {
|
|
|
245
247
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
246
248
|
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/knowledge/${encodeURIComponent(knowledgeBaseReferenceId)}/version`),
|
|
247
249
|
method: "POST",
|
|
248
|
-
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.
|
|
250
|
+
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.10", "User-Agent": "mavenagi/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
249
251
|
contentType: "application/json",
|
|
250
252
|
requestType: "json",
|
|
251
253
|
body: serializers.KnowledgeBaseVersion.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -325,7 +327,7 @@ class Knowledge {
|
|
|
325
327
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
326
328
|
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/knowledge/${encodeURIComponent(knowledgeBaseReferenceId)}/version/finalize`),
|
|
327
329
|
method: "POST",
|
|
328
|
-
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.
|
|
330
|
+
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.10", "User-Agent": "mavenagi/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
329
331
|
contentType: "application/json",
|
|
330
332
|
requestType: "json",
|
|
331
333
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -407,7 +409,7 @@ class Knowledge {
|
|
|
407
409
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
408
410
|
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/knowledge/${encodeURIComponent(knowledgeBaseReferenceId)}/document`),
|
|
409
411
|
method: "POST",
|
|
410
|
-
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.
|
|
412
|
+
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.10", "User-Agent": "mavenagi/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
411
413
|
contentType: "application/json",
|
|
412
414
|
requestType: "json",
|
|
413
415
|
body: serializers.KnowledgeDocumentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -495,7 +497,7 @@ class Knowledge {
|
|
|
495
497
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
496
498
|
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/knowledge/${encodeURIComponent(knowledgeBaseReferenceId)}/document`),
|
|
497
499
|
method: "PUT",
|
|
498
|
-
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.
|
|
500
|
+
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.10", "User-Agent": "mavenagi/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
499
501
|
contentType: "application/json",
|
|
500
502
|
requestType: "json",
|
|
501
503
|
body: serializers.KnowledgeDocumentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -576,7 +578,7 @@ class Knowledge {
|
|
|
576
578
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
577
579
|
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/knowledge/${encodeURIComponent(knowledgeBaseReferenceId)}/${encodeURIComponent(knowledgeDocumentReferenceId)}/document`),
|
|
578
580
|
method: "DELETE",
|
|
579
|
-
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.
|
|
581
|
+
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.10", "User-Agent": "mavenagi/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
580
582
|
contentType: "application/json",
|
|
581
583
|
requestType: "json",
|
|
582
584
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -12,10 +12,13 @@ import * as MavenAGI from "../../../index";
|
|
|
12
12
|
* agentId: "support",
|
|
13
13
|
* type: MavenAGI.EntityType.KnowledgeBase
|
|
14
14
|
* },
|
|
15
|
-
* name: "Help center"
|
|
15
|
+
* name: "Help center",
|
|
16
|
+
* type: MavenAGI.KnowledgeBaseType.Api
|
|
16
17
|
* }
|
|
17
18
|
*/
|
|
18
19
|
export interface KnowledgeBaseResponse extends MavenAGI.KnowledgeBaseProperties {
|
|
19
20
|
/** ID that uniquely identifies this knowledge base */
|
|
20
21
|
knowledgeBaseId: MavenAGI.EntityId;
|
|
22
|
+
/** The type of the knowledge base. Can not be changed once created. */
|
|
23
|
+
type: MavenAGI.KnowledgeBaseType;
|
|
21
24
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./KnowledgeBaseProperties";
|
|
2
2
|
export * from "./KnowledgeBaseRequest";
|
|
3
3
|
export * from "./KnowledgeBaseResponse";
|
|
4
|
+
export * from "./KnowledgeBaseType";
|
|
4
5
|
export * from "./KnowledgeBaseVersion";
|
|
5
6
|
export * from "./KnowledgeBaseVersionType";
|
|
6
7
|
export * from "./BaseKnowledgeDocument";
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./KnowledgeBaseProperties"), exports);
|
|
18
18
|
__exportStar(require("./KnowledgeBaseRequest"), exports);
|
|
19
19
|
__exportStar(require("./KnowledgeBaseResponse"), exports);
|
|
20
|
+
__exportStar(require("./KnowledgeBaseType"), exports);
|
|
20
21
|
__exportStar(require("./KnowledgeBaseVersion"), exports);
|
|
21
22
|
__exportStar(require("./KnowledgeBaseVersionType"), exports);
|
|
22
23
|
__exportStar(require("./BaseKnowledgeDocument"), exports);
|
|
@@ -5,9 +5,12 @@ import * as MavenAGI from "../../../index";
|
|
|
5
5
|
/**
|
|
6
6
|
* The input from the user to send through the WebSocket.
|
|
7
7
|
*/
|
|
8
|
-
export type PublishEvent = MavenAGI.PublishEvent.Audio;
|
|
8
|
+
export type PublishEvent = MavenAGI.PublishEvent.Audio | MavenAGI.PublishEvent.HangUp;
|
|
9
9
|
export declare namespace PublishEvent {
|
|
10
10
|
interface Audio extends MavenAGI.AudioPublishEvent {
|
|
11
11
|
messageType: "audio";
|
|
12
12
|
}
|
|
13
|
+
interface HangUp extends MavenAGI.HangUpPublishEvent {
|
|
14
|
+
messageType: "hangUp";
|
|
15
|
+
}
|
|
13
16
|
}
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./ControlEvent"), exports);
|
|
18
18
|
__exportStar(require("./PublishEvent"), exports);
|
|
19
|
+
__exportStar(require("./HangUpPublishEvent"), exports);
|
|
19
20
|
__exportStar(require("./AudioPublishEvent"), exports);
|
|
20
21
|
__exportStar(require("./SubscribeEvent"), exports);
|
|
21
22
|
__exportStar(require("./AudioSubscribeEvent"), exports);
|
|
@@ -81,7 +81,7 @@ class Translations {
|
|
|
81
81
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
82
82
|
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/translations/translate"),
|
|
83
83
|
method: "POST",
|
|
84
|
-
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.
|
|
84
|
+
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.10", "User-Agent": "mavenagi/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
85
85
|
contentType: "application/json",
|
|
86
86
|
requestType: "json",
|
|
87
87
|
body: serializers.TranslationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -84,7 +84,7 @@ class Triggers {
|
|
|
84
84
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
85
85
|
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/triggers"),
|
|
86
86
|
method: "PUT",
|
|
87
|
-
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.
|
|
87
|
+
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.10", "User-Agent": "mavenagi/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
88
88
|
contentType: "application/json",
|
|
89
89
|
requestType: "json",
|
|
90
90
|
body: serializers.EventTriggerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -164,7 +164,7 @@ class Triggers {
|
|
|
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/triggers/${encodeURIComponent(triggerReferenceId)}`),
|
|
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.10", "User-Agent": "mavenagi/1.0.10", "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
|
requestType: "json",
|
|
170
170
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -243,7 +243,7 @@ class Triggers {
|
|
|
243
243
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
244
244
|
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/triggers/${encodeURIComponent(triggerReferenceId)}`),
|
|
245
245
|
method: "DELETE",
|
|
246
|
-
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.
|
|
246
|
+
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.10", "User-Agent": "mavenagi/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
247
247
|
contentType: "application/json",
|
|
248
248
|
requestType: "json",
|
|
249
249
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -92,7 +92,7 @@ class Users {
|
|
|
92
92
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
93
93
|
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/users"),
|
|
94
94
|
method: "PUT",
|
|
95
|
-
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.
|
|
95
|
+
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.10", "User-Agent": "mavenagi/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
96
96
|
contentType: "application/json",
|
|
97
97
|
requestType: "json",
|
|
98
98
|
body: serializers.AppUserRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -178,7 +178,7 @@ class Users {
|
|
|
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/users/${encodeURIComponent(userId)}`),
|
|
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.10", "User-Agent": "mavenagi/1.0.10", "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
|
queryParameters: _queryParams,
|
|
184
184
|
requestType: "json",
|
|
@@ -269,7 +269,7 @@ class Users {
|
|
|
269
269
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
270
270
|
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/users/${encodeURIComponent(userId)}`),
|
|
271
271
|
method: "DELETE",
|
|
272
|
-
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.
|
|
272
|
+
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.10", "User-Agent": "mavenagi/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
273
273
|
contentType: "application/json",
|
|
274
274
|
queryParameters: _queryParams,
|
|
275
275
|
requestType: "json",
|
|
@@ -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.10", "User-Agent": "mavenagi/1.0.10", "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.10", "User-Agent": "mavenagi/1.0.10", "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.10", "User-Agent": "mavenagi/1.0.10", "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,
|
|
@@ -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.10", "User-Agent": "mavenagi/1.0.10", "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.10", "User-Agent": "mavenagi/1.0.10", "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.10", "User-Agent": "mavenagi/1.0.10", "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" }),
|
|
@@ -47,5 +47,29 @@ export declare class AppSettings {
|
|
|
47
47
|
* await client.appSettings.get()
|
|
48
48
|
*/
|
|
49
49
|
get(requestOptions?: AppSettings.RequestOptions): Promise<Record<string, unknown>>;
|
|
50
|
+
/**
|
|
51
|
+
* Update app settings. Performs a merge of the provided settings with the existing app settings.
|
|
52
|
+
*
|
|
53
|
+
* - If a new key is provided, it will be added to the app settings.
|
|
54
|
+
* - If an existing key is provided, it will be updated.
|
|
55
|
+
* - No keys will be removed.
|
|
56
|
+
*
|
|
57
|
+
* Note that if an array value is provided it will fully replace an existing value as arrays cannot be merged.
|
|
58
|
+
*
|
|
59
|
+
* @param {Record<string, unknown>} request
|
|
60
|
+
* @param {AppSettings.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
63
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
64
|
+
* @throws {@link MavenAGI.ServerError}
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.appSettings.update({
|
|
68
|
+
* "string": {
|
|
69
|
+
* "key": "value"
|
|
70
|
+
* }
|
|
71
|
+
* })
|
|
72
|
+
*/
|
|
73
|
+
update(request: Record<string, unknown>, requestOptions?: AppSettings.RequestOptions): Promise<Record<string, unknown>>;
|
|
50
74
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
51
75
|
}
|
|
@@ -77,7 +77,7 @@ class AppSettings {
|
|
|
77
77
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
78
78
|
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"),
|
|
79
79
|
method: "GET",
|
|
80
|
-
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.
|
|
80
|
+
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.10", "User-Agent": "mavenagi/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
81
81
|
contentType: "application/json",
|
|
82
82
|
requestType: "json",
|
|
83
83
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -137,6 +137,96 @@ class AppSettings {
|
|
|
137
137
|
}
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Update app settings. Performs a merge of the provided settings with the existing app settings.
|
|
142
|
+
*
|
|
143
|
+
* - If a new key is provided, it will be added to the app settings.
|
|
144
|
+
* - If an existing key is provided, it will be updated.
|
|
145
|
+
* - No keys will be removed.
|
|
146
|
+
*
|
|
147
|
+
* Note that if an array value is provided it will fully replace an existing value as arrays cannot be merged.
|
|
148
|
+
*
|
|
149
|
+
* @param {Record<string, unknown>} request
|
|
150
|
+
* @param {AppSettings.RequestOptions} requestOptions - Request-specific configuration.
|
|
151
|
+
*
|
|
152
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
153
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
154
|
+
* @throws {@link MavenAGI.ServerError}
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* await client.appSettings.update({
|
|
158
|
+
* "string": {
|
|
159
|
+
* "key": "value"
|
|
160
|
+
* }
|
|
161
|
+
* })
|
|
162
|
+
*/
|
|
163
|
+
update(request, requestOptions) {
|
|
164
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
+
var _a, _b, _c;
|
|
166
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
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
|
+
method: "PATCH",
|
|
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.10", "User-Agent": "mavenagi/1.0.10", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
170
|
+
contentType: "application/json",
|
|
171
|
+
requestType: "json",
|
|
172
|
+
body: serializers.appSettings.update.Request.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
173
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
174
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
175
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
176
|
+
});
|
|
177
|
+
if (_response.ok) {
|
|
178
|
+
return serializers.appSettings.update.Response.parseOrThrow(_response.body, {
|
|
179
|
+
unrecognizedObjectKeys: "passthrough",
|
|
180
|
+
allowUnrecognizedUnionMembers: true,
|
|
181
|
+
allowUnrecognizedEnumValues: true,
|
|
182
|
+
breadcrumbsPrefix: ["response"],
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
if (_response.error.reason === "status-code") {
|
|
186
|
+
switch (_response.error.statusCode) {
|
|
187
|
+
case 404:
|
|
188
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
189
|
+
unrecognizedObjectKeys: "passthrough",
|
|
190
|
+
allowUnrecognizedUnionMembers: true,
|
|
191
|
+
allowUnrecognizedEnumValues: true,
|
|
192
|
+
breadcrumbsPrefix: ["response"],
|
|
193
|
+
}));
|
|
194
|
+
case 400:
|
|
195
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
196
|
+
unrecognizedObjectKeys: "passthrough",
|
|
197
|
+
allowUnrecognizedUnionMembers: true,
|
|
198
|
+
allowUnrecognizedEnumValues: true,
|
|
199
|
+
breadcrumbsPrefix: ["response"],
|
|
200
|
+
}));
|
|
201
|
+
case 500:
|
|
202
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
203
|
+
unrecognizedObjectKeys: "passthrough",
|
|
204
|
+
allowUnrecognizedUnionMembers: true,
|
|
205
|
+
allowUnrecognizedEnumValues: true,
|
|
206
|
+
breadcrumbsPrefix: ["response"],
|
|
207
|
+
}));
|
|
208
|
+
default:
|
|
209
|
+
throw new errors.MavenAGIError({
|
|
210
|
+
statusCode: _response.error.statusCode,
|
|
211
|
+
body: _response.error.body,
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
switch (_response.error.reason) {
|
|
216
|
+
case "non-json":
|
|
217
|
+
throw new errors.MavenAGIError({
|
|
218
|
+
statusCode: _response.error.statusCode,
|
|
219
|
+
body: _response.error.rawBody,
|
|
220
|
+
});
|
|
221
|
+
case "timeout":
|
|
222
|
+
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling PATCH /v1/app-settings.");
|
|
223
|
+
case "unknown":
|
|
224
|
+
throw new errors.MavenAGIError({
|
|
225
|
+
message: _response.error.errorMessage,
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
}
|
|
140
230
|
_getAuthorizationHeader() {
|
|
141
231
|
return __awaiter(this, void 0, void 0, function* () {
|
|
142
232
|
var _a, _b;
|
|
@@ -13,6 +13,12 @@ export interface ConversationAnalysis {
|
|
|
13
13
|
category?: string;
|
|
14
14
|
/** Generated sentiment of the conversation */
|
|
15
15
|
sentiment?: MavenAGI.Sentiment;
|
|
16
|
+
/** Generated quality of the conversation */
|
|
17
|
+
quality?: MavenAGI.Quality;
|
|
18
|
+
/** If the quality of the conversation is `UNKNOWN` or `NEEDS_IMPROVEMENT` then a reason for the quality will be provided when possible. */
|
|
19
|
+
qualityReason?: MavenAGI.QualityReason;
|
|
16
20
|
/** Whether the conversation was resolved by Maven */
|
|
17
21
|
resolvedByMaven?: boolean;
|
|
22
|
+
/** Primary language of the conversation in ISO 639-1 code format */
|
|
23
|
+
primaryLanguage?: string;
|
|
18
24
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type QualityReason = "MISSING_KNOWLEDGE" | "MISSING_USER_INFORMATION" | "MISSING_ACTION" | "NEEDS_USER_CLARIFICATION" | "UNSUPPORTED_FORMAT" | "
|
|
4
|
+
export type QualityReason = "MISSING_KNOWLEDGE" | "MISSING_USER_INFORMATION" | "MISSING_ACTION" | "NEEDS_USER_CLARIFICATION" | "UNSUPPORTED_FORMAT" | "INTERRUPTED" | "UNSUPPORTED_USER_BEHAVIOR" | "UNKNOWN";
|
|
5
5
|
export declare const QualityReason: {
|
|
6
6
|
readonly MissingKnowledge: "MISSING_KNOWLEDGE";
|
|
7
7
|
readonly MissingUserInformation: "MISSING_USER_INFORMATION";
|
|
8
8
|
readonly MissingAction: "MISSING_ACTION";
|
|
9
9
|
readonly NeedsUserClarification: "NEEDS_USER_CLARIFICATION";
|
|
10
10
|
readonly UnsupportedFormat: "UNSUPPORTED_FORMAT";
|
|
11
|
-
readonly GreatAnswer: "GREAT_ANSWER";
|
|
12
11
|
readonly Interrupted: "INTERRUPTED";
|
|
13
12
|
readonly UnsupportedUserBehavior: "UNSUPPORTED_USER_BEHAVIOR";
|
|
14
13
|
readonly Unknown: "UNKNOWN";
|
|
@@ -10,7 +10,6 @@ exports.QualityReason = {
|
|
|
10
10
|
MissingAction: "MISSING_ACTION",
|
|
11
11
|
NeedsUserClarification: "NEEDS_USER_CLARIFICATION",
|
|
12
12
|
UnsupportedFormat: "UNSUPPORTED_FORMAT",
|
|
13
|
-
GreatAnswer: "GREAT_ANSWER",
|
|
14
13
|
Interrupted: "INTERRUPTED",
|
|
15
14
|
UnsupportedUserBehavior: "UNSUPPORTED_USER_BEHAVIOR",
|
|
16
15
|
Unknown: "UNKNOWN",
|
|
@@ -22,6 +22,8 @@ export * from "./BasePaginatedRequest";
|
|
|
22
22
|
export * from "./ActionParameterType";
|
|
23
23
|
export * from "./ActionEnumOption";
|
|
24
24
|
export * from "./Sentiment";
|
|
25
|
+
export * from "./Quality";
|
|
26
|
+
export * from "./QualityReason";
|
|
25
27
|
export * from "./ConversationSummary";
|
|
26
28
|
export * from "./ConversationAnalysis";
|
|
27
29
|
export * from "./ConversationInformation";
|
|
@@ -38,6 +38,8 @@ __exportStar(require("./BasePaginatedRequest"), exports);
|
|
|
38
38
|
__exportStar(require("./ActionParameterType"), exports);
|
|
39
39
|
__exportStar(require("./ActionEnumOption"), exports);
|
|
40
40
|
__exportStar(require("./Sentiment"), exports);
|
|
41
|
+
__exportStar(require("./Quality"), exports);
|
|
42
|
+
__exportStar(require("./QualityReason"), exports);
|
|
41
43
|
__exportStar(require("./ConversationSummary"), exports);
|
|
42
44
|
__exportStar(require("./ConversationAnalysis"), exports);
|
|
43
45
|
__exportStar(require("./ConversationInformation"), exports);
|
|
@@ -36,7 +36,14 @@ export declare class Conversation {
|
|
|
36
36
|
protected readonly _options: Conversation.Options;
|
|
37
37
|
constructor(_options: Conversation.Options);
|
|
38
38
|
/**
|
|
39
|
-
* Initialize a new conversation.
|
|
39
|
+
* Initialize a new conversation.
|
|
40
|
+
* Only required if the ask request wishes to supply conversation level data or when syncing to external systems.
|
|
41
|
+
*
|
|
42
|
+
* Conversations can not be modified using this API. If the conversation already exists then the existing conversation will be returned.
|
|
43
|
+
*
|
|
44
|
+
* After initialization,
|
|
45
|
+
* - metadata can be changed using the `updateConversationMetadata` API.
|
|
46
|
+
* - messages can be added to the conversation with the `appendNewMessages` or `ask` APIs.
|
|
40
47
|
*
|
|
41
48
|
* @param {MavenAGI.ConversationRequest} request
|
|
42
49
|
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|