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.
Files changed (124) hide show
  1. package/api/resources/actions/client/Client.js +3 -3
  2. package/api/resources/analytics/client/Client.js +3 -3
  3. package/api/resources/appSettings/client/Client.d.ts +24 -0
  4. package/api/resources/appSettings/client/Client.js +91 -1
  5. package/api/resources/commons/types/ConversationAnalysis.d.ts +6 -0
  6. package/{dist/api/resources/conversation → api/resources/commons}/types/QualityReason.d.ts +1 -2
  7. package/{dist/api/resources/conversation → api/resources/commons}/types/QualityReason.js +0 -1
  8. package/api/resources/commons/types/index.d.ts +2 -0
  9. package/api/resources/commons/types/index.js +2 -0
  10. package/api/resources/conversation/client/Client.d.ts +8 -1
  11. package/api/resources/conversation/client/Client.js +21 -14
  12. package/api/resources/conversation/types/index.d.ts +0 -2
  13. package/api/resources/conversation/types/index.js +0 -2
  14. package/api/resources/inbox/client/Client.js +5 -5
  15. package/api/resources/knowledge/client/Client.d.ts +3 -1
  16. package/api/resources/knowledge/client/Client.js +10 -8
  17. package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +4 -1
  18. package/api/resources/knowledge/types/KnowledgeBaseType.d.ts +10 -0
  19. package/api/resources/knowledge/types/KnowledgeBaseType.js +9 -0
  20. package/api/resources/knowledge/types/index.d.ts +1 -0
  21. package/api/resources/knowledge/types/index.js +1 -0
  22. package/api/resources/realtime/types/HangUpPublishEvent.d.ts +6 -0
  23. package/api/resources/realtime/types/HangUpPublishEvent.js +5 -0
  24. package/api/resources/realtime/types/PublishEvent.d.ts +4 -1
  25. package/api/resources/realtime/types/index.d.ts +1 -0
  26. package/api/resources/realtime/types/index.js +1 -0
  27. package/api/resources/translations/client/Client.js +1 -1
  28. package/api/resources/triggers/client/Client.js +3 -3
  29. package/api/resources/users/client/Client.js +3 -3
  30. package/dist/api/resources/actions/client/Client.js +3 -3
  31. package/dist/api/resources/analytics/client/Client.js +3 -3
  32. package/dist/api/resources/appSettings/client/Client.d.ts +24 -0
  33. package/dist/api/resources/appSettings/client/Client.js +91 -1
  34. package/dist/api/resources/commons/types/ConversationAnalysis.d.ts +6 -0
  35. package/{api/resources/conversation → dist/api/resources/commons}/types/QualityReason.d.ts +1 -2
  36. package/{api/resources/conversation → dist/api/resources/commons}/types/QualityReason.js +0 -1
  37. package/dist/api/resources/commons/types/index.d.ts +2 -0
  38. package/dist/api/resources/commons/types/index.js +2 -0
  39. package/dist/api/resources/conversation/client/Client.d.ts +8 -1
  40. package/dist/api/resources/conversation/client/Client.js +21 -14
  41. package/dist/api/resources/conversation/types/index.d.ts +0 -2
  42. package/dist/api/resources/conversation/types/index.js +0 -2
  43. package/dist/api/resources/inbox/client/Client.js +5 -5
  44. package/dist/api/resources/knowledge/client/Client.d.ts +3 -1
  45. package/dist/api/resources/knowledge/client/Client.js +10 -8
  46. package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +4 -1
  47. package/dist/api/resources/knowledge/types/KnowledgeBaseType.d.ts +10 -0
  48. package/dist/api/resources/knowledge/types/KnowledgeBaseType.js +9 -0
  49. package/dist/api/resources/knowledge/types/index.d.ts +1 -0
  50. package/dist/api/resources/knowledge/types/index.js +1 -0
  51. package/dist/api/resources/realtime/types/HangUpPublishEvent.d.ts +6 -0
  52. package/dist/api/resources/realtime/types/HangUpPublishEvent.js +5 -0
  53. package/dist/api/resources/realtime/types/PublishEvent.d.ts +4 -1
  54. package/dist/api/resources/realtime/types/index.d.ts +1 -0
  55. package/dist/api/resources/realtime/types/index.js +1 -0
  56. package/dist/api/resources/translations/client/Client.js +1 -1
  57. package/dist/api/resources/triggers/client/Client.js +3 -3
  58. package/dist/api/resources/users/client/Client.js +3 -3
  59. package/dist/serialization/resources/appSettings/client/index.d.ts +1 -0
  60. package/dist/serialization/resources/appSettings/client/index.js +2 -1
  61. package/dist/serialization/resources/appSettings/client/update.d.ts +13 -0
  62. package/dist/serialization/resources/appSettings/client/update.js +42 -0
  63. package/dist/serialization/resources/commons/types/ConversationAnalysis.d.ts +5 -0
  64. package/dist/serialization/resources/commons/types/ConversationAnalysis.js +5 -0
  65. package/dist/serialization/resources/{conversation → commons}/types/QualityReason.d.ts +1 -1
  66. package/dist/serialization/resources/{conversation → commons}/types/QualityReason.js +0 -1
  67. package/dist/serialization/resources/commons/types/index.d.ts +2 -0
  68. package/dist/serialization/resources/commons/types/index.js +2 -0
  69. package/dist/serialization/resources/conversation/types/ConversationFilter.d.ts +2 -2
  70. package/dist/serialization/resources/conversation/types/ConversationFilter.js +2 -2
  71. package/dist/serialization/resources/conversation/types/index.d.ts +0 -2
  72. package/dist/serialization/resources/conversation/types/index.js +0 -2
  73. package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +2 -0
  74. package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +2 -0
  75. package/dist/serialization/resources/knowledge/types/KnowledgeBaseType.d.ts +10 -0
  76. package/dist/serialization/resources/knowledge/types/KnowledgeBaseType.js +41 -0
  77. package/dist/serialization/resources/knowledge/types/index.d.ts +1 -0
  78. package/dist/serialization/resources/knowledge/types/index.js +1 -0
  79. package/dist/serialization/resources/realtime/types/HangUpPublishEvent.d.ts +12 -0
  80. package/dist/serialization/resources/realtime/types/HangUpPublishEvent.js +43 -0
  81. package/dist/serialization/resources/realtime/types/PublishEvent.d.ts +5 -1
  82. package/dist/serialization/resources/realtime/types/PublishEvent.js +2 -0
  83. package/dist/serialization/resources/realtime/types/index.d.ts +1 -0
  84. package/dist/serialization/resources/realtime/types/index.js +1 -0
  85. package/dist/version.d.ts +1 -1
  86. package/dist/version.js +1 -1
  87. package/package.json +1 -1
  88. package/reference.md +87 -5
  89. package/serialization/resources/appSettings/client/index.d.ts +1 -0
  90. package/serialization/resources/appSettings/client/index.js +2 -1
  91. package/serialization/resources/appSettings/client/update.d.ts +13 -0
  92. package/serialization/resources/appSettings/client/update.js +42 -0
  93. package/serialization/resources/commons/types/ConversationAnalysis.d.ts +5 -0
  94. package/serialization/resources/commons/types/ConversationAnalysis.js +5 -0
  95. package/serialization/resources/{conversation → commons}/types/QualityReason.d.ts +1 -1
  96. package/serialization/resources/{conversation → commons}/types/QualityReason.js +0 -1
  97. package/serialization/resources/commons/types/index.d.ts +2 -0
  98. package/serialization/resources/commons/types/index.js +2 -0
  99. package/serialization/resources/conversation/types/ConversationFilter.d.ts +2 -2
  100. package/serialization/resources/conversation/types/ConversationFilter.js +2 -2
  101. package/serialization/resources/conversation/types/index.d.ts +0 -2
  102. package/serialization/resources/conversation/types/index.js +0 -2
  103. package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +2 -0
  104. package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +2 -0
  105. package/serialization/resources/knowledge/types/KnowledgeBaseType.d.ts +10 -0
  106. package/serialization/resources/knowledge/types/KnowledgeBaseType.js +41 -0
  107. package/serialization/resources/knowledge/types/index.d.ts +1 -0
  108. package/serialization/resources/knowledge/types/index.js +1 -0
  109. package/serialization/resources/realtime/types/HangUpPublishEvent.d.ts +12 -0
  110. package/serialization/resources/realtime/types/HangUpPublishEvent.js +43 -0
  111. package/serialization/resources/realtime/types/PublishEvent.d.ts +5 -1
  112. package/serialization/resources/realtime/types/PublishEvent.js +2 -0
  113. package/serialization/resources/realtime/types/index.d.ts +1 -0
  114. package/serialization/resources/realtime/types/index.js +1 -0
  115. package/version.d.ts +1 -1
  116. package/version.js +1 -1
  117. /package/api/resources/{conversation → commons}/types/Quality.d.ts +0 -0
  118. /package/api/resources/{conversation → commons}/types/Quality.js +0 -0
  119. /package/dist/api/resources/{conversation → commons}/types/Quality.d.ts +0 -0
  120. /package/dist/api/resources/{conversation → commons}/types/Quality.js +0 -0
  121. /package/dist/serialization/resources/{conversation → commons}/types/Quality.d.ts +0 -0
  122. /package/dist/serialization/resources/{conversation → commons}/types/Quality.js +0 -0
  123. /package/serialization/resources/{conversation → commons}/types/Quality.d.ts +0 -0
  124. /package/serialization/resources/{conversation → commons}/types/Quality.js +0 -0
@@ -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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
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" | "GREAT_ANSWER" | "INTERRUPTED" | "UNSUPPORTED_USER_BEHAVIOR" | "UNKNOWN";
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. Only required if the ask request wishes to supply conversation level data or when syncing to external systems.
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.
@@ -60,7 +60,14 @@ class Conversation {
60
60
  this._options = _options;
61
61
  }
62
62
  /**
63
- * Initialize a new conversation. Only required if the ask request wishes to supply conversation level data or when syncing to external systems.
63
+ * Initialize a new conversation.
64
+ * Only required if the ask request wishes to supply conversation level data or when syncing to external systems.
65
+ *
66
+ * Conversations can not be modified using this API. If the conversation already exists then the existing conversation will be returned.
67
+ *
68
+ * After initialization,
69
+ * - metadata can be changed using the `updateConversationMetadata` API.
70
+ * - messages can be added to the conversation with the `appendNewMessages` or `ask` APIs.
64
71
  *
65
72
  * @param {MavenAGI.ConversationRequest} request
66
73
  * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
@@ -101,7 +108,7 @@ class Conversation {
101
108
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
102
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"),
103
110
  method: "POST",
104
- 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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
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.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),
105
112
  contentType: "application/json",
106
113
  requestType: "json",
107
114
  body: serializers.ConversationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -187,7 +194,7 @@ class Conversation {
187
194
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
188
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)}`),
189
196
  method: "GET",
190
- 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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
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.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),
191
198
  contentType: "application/json",
192
199
  queryParameters: _queryParams,
193
200
  requestType: "json",
@@ -282,7 +289,7 @@ class Conversation {
282
289
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
283
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)}`),
284
291
  method: "DELETE",
285
- 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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
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.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),
286
293
  contentType: "application/json",
287
294
  queryParameters: _queryParams,
288
295
  requestType: "json",
@@ -376,7 +383,7 @@ class Conversation {
376
383
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
377
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`),
378
385
  method: "POST",
379
- 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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
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.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),
380
387
  contentType: "application/json",
381
388
  requestType: "json",
382
389
  body: serializers.conversation.appendNewMessages.Request.jsonOrThrow(request, {
@@ -483,7 +490,7 @@ class Conversation {
483
490
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
484
491
  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`),
485
492
  method: "POST",
486
- 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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
493
+ 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),
487
494
  contentType: "application/json",
488
495
  requestType: "json",
489
496
  body: serializers.AskRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -565,7 +572,7 @@ class Conversation {
565
572
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
566
573
  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`),
567
574
  method: "POST",
568
- 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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
575
+ 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),
569
576
  contentType: "application/json",
570
577
  requestType: "json",
571
578
  body: serializers.AskRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -663,7 +670,7 @@ class Conversation {
663
670
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
664
671
  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`),
665
672
  method: "POST",
666
- 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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
673
+ 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),
667
674
  contentType: "application/json",
668
675
  requestType: "json",
669
676
  body: serializers.GenerateMavenSuggestionsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -743,7 +750,7 @@ class Conversation {
743
750
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
744
751
  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`),
745
752
  method: "POST",
746
- 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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
753
+ 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),
747
754
  contentType: "application/json",
748
755
  requestType: "json",
749
756
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -837,7 +844,7 @@ class Conversation {
837
844
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
838
845
  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"),
839
846
  method: "POST",
840
- 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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
847
+ 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),
841
848
  contentType: "application/json",
842
849
  requestType: "json",
843
850
  body: serializers.FeedbackRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -925,7 +932,7 @@ class Conversation {
925
932
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
926
933
  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`),
927
934
  method: "POST",
928
- 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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
935
+ 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),
929
936
  contentType: "application/json",
930
937
  requestType: "json",
931
938
  body: serializers.SubmitActionFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1010,7 +1017,7 @@ class Conversation {
1010
1017
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1011
1018
  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`),
1012
1019
  method: "POST",
1013
- 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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1020
+ 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),
1014
1021
  contentType: "application/json",
1015
1022
  requestType: "json",
1016
1023
  body: serializers.conversation.addConversationMetadata.Request.jsonOrThrow(request, {
@@ -1104,7 +1111,7 @@ class Conversation {
1104
1111
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1105
1112
  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`),
1106
1113
  method: "PUT",
1107
- 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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1114
+ 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),
1108
1115
  contentType: "application/json",
1109
1116
  requestType: "json",
1110
1117
  body: serializers.UpdateMetadataRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1184,7 +1191,7 @@ class Conversation {
1184
1191
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1185
1192
  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"),
1186
1193
  method: "POST",
1187
- 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.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1194
+ 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),
1188
1195
  contentType: "application/json",
1189
1196
  requestType: "json",
1190
1197
  body: serializers.ConversationsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -16,8 +16,6 @@ export * from "./CategorizationResponse";
16
16
  export * from "./ConversationField";
17
17
  export * from "./NumericConversationField";
18
18
  export * from "./ResolutionStatus";
19
- export * from "./Quality";
20
- export * from "./QualityReason";
21
19
  export * from "./ConversationsSearchRequest";
22
20
  export * from "./ConversationsResponse";
23
21
  export * from "./ConversationFilter";
@@ -32,8 +32,6 @@ __exportStar(require("./CategorizationResponse"), exports);
32
32
  __exportStar(require("./ConversationField"), exports);
33
33
  __exportStar(require("./NumericConversationField"), exports);
34
34
  __exportStar(require("./ResolutionStatus"), exports);
35
- __exportStar(require("./Quality"), exports);
36
- __exportStar(require("./QualityReason"), exports);
37
35
  __exportStar(require("./ConversationsSearchRequest"), exports);
38
36
  __exportStar(require("./ConversationsResponse"), exports);
39
37
  __exportStar(require("./ConversationFilter"), exports);
@@ -78,7 +78,7 @@ class Inbox {
78
78
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
79
79
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, "/v1/inbox/search"),
80
80
  method: "POST",
81
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.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),
82
82
  contentType: "application/json",
83
83
  requestType: "json",
84
84
  body: serializers.InboxSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -164,7 +164,7 @@ class Inbox {
164
164
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
165
165
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/inbox/${encodeURIComponent(inboxItemId)}`),
166
166
  method: "GET",
167
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
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
  queryParameters: _queryParams,
170
170
  requestType: "json",
@@ -250,7 +250,7 @@ class Inbox {
250
250
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
251
251
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/inbox/fix/${encodeURIComponent(inboxItemFixId)}`),
252
252
  method: "GET",
253
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
253
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.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),
254
254
  contentType: "application/json",
255
255
  queryParameters: _queryParams,
256
256
  requestType: "json",
@@ -333,7 +333,7 @@ class Inbox {
333
333
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
334
334
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/inbox/fix/${encodeURIComponent(inboxItemFixId)}/apply`),
335
335
  method: "POST",
336
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
336
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.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),
337
337
  contentType: "application/json",
338
338
  requestType: "json",
339
339
  body: serializers.ApplyInboxItemFixRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -414,7 +414,7 @@ class Inbox {
414
414
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
415
415
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, `/v1/inbox/${encodeURIComponent(inboxItemId)}/ignore`),
416
416
  method: "POST",
417
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.9", "User-Agent": "mavenagi/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
417
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.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),
418
418
  contentType: "application/json",
419
419
  queryParameters: _queryParams,
420
420
  requestType: "json",
@@ -69,7 +69,9 @@ export declare class Knowledge {
69
69
  */
70
70
  getKnowledgeBase(knowledgeBaseReferenceId: string, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeBaseResponse>;
71
71
  /**
72
- * Create a new knowledge base version. Only supported on API knowledge bases. Will throw an exception if there is an existing version in progress.
72
+ * Create a new knowledge base version.
73
+ *
74
+ * If an existing version is in progress, then that version will be finalized in an error state.
73
75
  *
74
76
  * @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.
75
77
  * @param {MavenAGI.KnowledgeBaseVersion} request