mavenagi 1.2.48 → 1.2.49

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 (43) hide show
  1. package/BaseClient.js +2 -2
  2. package/api/resources/commons/types/ConversationKickoffResult.d.ts +7 -0
  3. package/api/resources/commons/types/ConversationKickoffResult.js +3 -0
  4. package/api/resources/commons/types/ConversationKickoffStatus.d.ts +5 -0
  5. package/api/resources/commons/types/ConversationKickoffStatus.js +8 -0
  6. package/api/resources/commons/types/ConversationMessageBase.d.ts +9 -0
  7. package/api/resources/commons/types/ConversationResponse.d.ts +3 -0
  8. package/api/resources/commons/types/ConversationSummary.d.ts +6 -0
  9. package/api/resources/commons/types/EntityType.d.ts +3 -0
  10. package/api/resources/commons/types/EntityType.js +3 -0
  11. package/api/resources/commons/types/InitializeConversationResponse.d.ts +14 -0
  12. package/api/resources/commons/types/InitializeConversationResponse.js +3 -0
  13. package/api/resources/commons/types/index.d.ts +3 -0
  14. package/api/resources/commons/types/index.js +3 -0
  15. package/api/resources/conversation/client/Client.d.ts +1 -1
  16. package/api/resources/conversation/client/Client.js +1 -1
  17. package/api/resources/conversation/types/AskRequest.d.ts +9 -0
  18. package/api/resources/knowledge/client/Client.d.ts +17 -0
  19. package/api/resources/knowledge/client/Client.js +88 -0
  20. package/api/resources/knowledge/types/KnowledgeBaseIndexingStatus.d.ts +2 -0
  21. package/api/resources/knowledge/types/KnowledgeBaseIndexingStatus.js +2 -0
  22. package/package.json +1 -1
  23. package/reference.md +64 -1
  24. package/serialization/resources/commons/types/ConversationKickoffResult.d.ts +11 -0
  25. package/serialization/resources/commons/types/ConversationKickoffResult.js +43 -0
  26. package/serialization/resources/commons/types/ConversationKickoffStatus.d.ts +7 -0
  27. package/serialization/resources/commons/types/ConversationKickoffStatus.js +39 -0
  28. package/serialization/resources/commons/types/ConversationMessageBase.d.ts +1 -0
  29. package/serialization/resources/commons/types/ConversationMessageBase.js +1 -0
  30. package/serialization/resources/commons/types/ConversationSummary.d.ts +3 -0
  31. package/serialization/resources/commons/types/ConversationSummary.js +3 -0
  32. package/serialization/resources/commons/types/EntityType.d.ts +1 -1
  33. package/serialization/resources/commons/types/EntityType.js +3 -0
  34. package/serialization/resources/commons/types/InitializeConversationResponse.d.ts +11 -0
  35. package/serialization/resources/commons/types/InitializeConversationResponse.js +45 -0
  36. package/serialization/resources/commons/types/index.d.ts +3 -0
  37. package/serialization/resources/commons/types/index.js +3 -0
  38. package/serialization/resources/conversation/types/AskRequest.d.ts +1 -0
  39. package/serialization/resources/conversation/types/AskRequest.js +1 -0
  40. package/serialization/resources/knowledge/types/KnowledgeBaseIndexingStatus.d.ts +1 -1
  41. package/serialization/resources/knowledge/types/KnowledgeBaseIndexingStatus.js +10 -1
  42. package/version.d.ts +1 -1
  43. package/version.js +1 -1
package/BaseClient.js CHANGED
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "mavenagi",
46
- "X-Fern-SDK-Version": "1.2.48",
47
- "User-Agent": "mavenagi/1.2.48",
46
+ "X-Fern-SDK-Version": "1.2.49",
47
+ "User-Agent": "mavenagi/1.2.49",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  "X-Organization-Id": options === null || options === void 0 ? void 0 : options.organizationId,
@@ -0,0 +1,7 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ export interface ConversationKickoffResult {
3
+ /** Whether the Conversation Kickoff completed successfully. */
4
+ status: MavenAGI.ConversationKickoffStatus;
5
+ /** Additional detail about the Conversation Kickoff result. */
6
+ message?: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export declare const ConversationKickoffStatus: {
2
+ readonly Success: "SUCCESS";
3
+ readonly Failed: "FAILED";
4
+ };
5
+ export type ConversationKickoffStatus = (typeof ConversationKickoffStatus)[keyof typeof ConversationKickoffStatus] | string;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ConversationKickoffStatus = void 0;
5
+ exports.ConversationKickoffStatus = {
6
+ Success: "SUCCESS",
7
+ Failed: "FAILED",
8
+ };
@@ -3,4 +3,13 @@ export interface ConversationMessageBase {
3
3
  createdAt?: Date;
4
4
  /** The date and time the conversation was last updated */
5
5
  updatedAt?: Date;
6
+ /**
7
+ * Key-value metadata for this message, supplied by the app which created the message.
8
+ * Useful for storing additional structured information about the message and querying
9
+ * for it via API or the dashboard.
10
+ *
11
+ * Keys are strings with a maximum length of 500 characters. Values are strings with a
12
+ * maximum length of 500 characters.
13
+ */
14
+ appMetadata?: Record<string, string>;
6
15
  }
@@ -20,6 +20,9 @@ import type * as MavenAGI from "../../../index";
20
20
  * summary: {
21
21
  * actionIds: [],
22
22
  * incompleteActionIds: [],
23
+ * matchedCharterIds: [],
24
+ * matchedCharterNames: [],
25
+ * matchedSegmentedCharterNames: [],
23
26
  * insertCount: 0,
24
27
  * thumbsUpCount: 0,
25
28
  * thumbsDownCount: 0,
@@ -4,6 +4,12 @@ export interface ConversationSummary {
4
4
  actionIds: MavenAGI.EntityIdWithoutAgent[];
5
5
  /** The IDs of the actions that were taken by Maven but not completed in the conversation. Occurs when the user is shown an action form but does not submit it. */
6
6
  incompleteActionIds: MavenAGI.EntityIdWithoutAgent[];
7
+ /** The IDs of the charters that were matched anywhere in the conversation. */
8
+ matchedCharterIds: MavenAGI.EntityIdWithoutAgent[];
9
+ /** The names of the charters that were matched anywhere in the conversation. */
10
+ matchedCharterNames: string[];
11
+ /** The names of the matched charters that are gated by a segment (i.e. have a segment condition) anywhere in the conversation. */
12
+ matchedSegmentedCharterNames: string[];
7
13
  /** The number of insert events on messages in the conversation. */
8
14
  insertCount: number;
9
15
  /** The number of thumbs up events on messages in the conversation. */
@@ -17,5 +17,8 @@ export declare const EntityType: {
17
17
  readonly Customer: "CUSTOMER";
18
18
  readonly IntelligentField: "INTELLIGENT_FIELD";
19
19
  readonly Charter: "CHARTER";
20
+ readonly ConversationKickoff: "CONVERSATION_KICKOFF";
21
+ readonly AgentVariant: "AGENT_VARIANT";
22
+ readonly ConfigSnapshot: "CONFIG_SNAPSHOT";
20
23
  };
21
24
  export type EntityType = (typeof EntityType)[keyof typeof EntityType] | string;
@@ -21,4 +21,7 @@ exports.EntityType = {
21
21
  Customer: "CUSTOMER",
22
22
  IntelligentField: "INTELLIGENT_FIELD",
23
23
  Charter: "CHARTER",
24
+ ConversationKickoff: "CONVERSATION_KICKOFF",
25
+ AgentVariant: "AGENT_VARIANT",
26
+ ConfigSnapshot: "CONFIG_SNAPSHOT",
24
27
  };
@@ -0,0 +1,14 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * A conversation as returned by the `initialize` endpoint. Extends the shared
4
+ * ConversationResponse with the Conversation Kickoff result, which is only available at
5
+ * initialization time.
6
+ */
7
+ export interface InitializeConversationResponse extends MavenAGI.ConversationResponse {
8
+ /**
9
+ * Result of the Conversation Kickoff, when one ran during conversation initialization.
10
+ * Only present on this initialize response; other endpoints that return a conversation
11
+ * do not include it.
12
+ */
13
+ conversationKickoffResult?: MavenAGI.ConversationKickoffResult;
14
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -59,6 +59,8 @@ export * from "./ContextInfo";
59
59
  export * from "./ConversationAnalysis";
60
60
  export * from "./ConversationExecutedActionPrecondition";
61
61
  export * from "./ConversationInformation";
62
+ export * from "./ConversationKickoffResult";
63
+ export * from "./ConversationKickoffStatus";
62
64
  export * from "./ConversationMessageBase";
63
65
  export * from "./ConversationMessageResponse";
64
66
  export * from "./ConversationPrecondition";
@@ -108,6 +110,7 @@ export * from "./InboxItemMissingKnowledge";
108
110
  export * from "./InboxItemSeverity";
109
111
  export * from "./InboxItemStatus";
110
112
  export * from "./InboxItemType";
113
+ export * from "./InitializeConversationResponse";
111
114
  export * from "./IntelligentFieldCondition";
112
115
  export * from "./IntelligentFieldPrecondition";
113
116
  export * from "./IntelligentFieldPreconditionResponse";
@@ -75,6 +75,8 @@ __exportStar(require("./ContextInfo"), exports);
75
75
  __exportStar(require("./ConversationAnalysis"), exports);
76
76
  __exportStar(require("./ConversationExecutedActionPrecondition"), exports);
77
77
  __exportStar(require("./ConversationInformation"), exports);
78
+ __exportStar(require("./ConversationKickoffResult"), exports);
79
+ __exportStar(require("./ConversationKickoffStatus"), exports);
78
80
  __exportStar(require("./ConversationMessageBase"), exports);
79
81
  __exportStar(require("./ConversationMessageResponse"), exports);
80
82
  __exportStar(require("./ConversationPrecondition"), exports);
@@ -124,6 +126,7 @@ __exportStar(require("./InboxItemMissingKnowledge"), exports);
124
126
  __exportStar(require("./InboxItemSeverity"), exports);
125
127
  __exportStar(require("./InboxItemStatus"), exports);
126
128
  __exportStar(require("./InboxItemType"), exports);
129
+ __exportStar(require("./InitializeConversationResponse"), exports);
127
130
  __exportStar(require("./IntelligentFieldCondition"), exports);
128
131
  __exportStar(require("./IntelligentFieldPrecondition"), exports);
129
132
  __exportStar(require("./IntelligentFieldPreconditionResponse"), exports);
@@ -55,7 +55,7 @@ export declare class ConversationClient {
55
55
  * }]
56
56
  * })
57
57
  */
58
- initialize(request: MavenAGI.ConversationRequest, requestOptions?: ConversationClient.RequestOptions): core.HttpResponsePromise<MavenAGI.ConversationResponse>;
58
+ initialize(request: MavenAGI.ConversationRequest, requestOptions?: ConversationClient.RequestOptions): core.HttpResponsePromise<MavenAGI.InitializeConversationResponse>;
59
59
  private __initialize;
60
60
  /**
61
61
  * Update mutable conversation fields.
@@ -129,7 +129,7 @@ class ConversationClient {
129
129
  });
130
130
  if (_response.ok) {
131
131
  return {
132
- data: serializers.ConversationResponse.parseOrThrow(_response.body, {
132
+ data: serializers.InitializeConversationResponse.parseOrThrow(_response.body, {
133
133
  unrecognizedObjectKeys: "passthrough",
134
134
  allowUnrecognizedUnionMembers: true,
135
135
  allowUnrecognizedEnumValues: true,
@@ -36,4 +36,13 @@ export interface AskRequest {
36
36
  transientData?: Record<string, string>;
37
37
  /** IANA timezone identifier (e.g. "America/New_York", "Europe/London") to be used for time-based operations in the conversation. */
38
38
  timezone?: string;
39
+ /**
40
+ * Key-value metadata to persist on the user message created by this request. Unlike
41
+ * `transientData` (which is never persisted) this is stored and returned when the message
42
+ * is read back via the API or dashboard, and unlike user data it is not sent to the LLM.
43
+ * Applied only when the message is first created — if `conversationMessageId` already
44
+ * exists the message is reused and its metadata is not updated. Keys and values are strings
45
+ * with a maximum length of 500 characters each.
46
+ */
47
+ appMetadata?: Record<string, string>;
39
48
  }
@@ -111,6 +111,23 @@ export declare class KnowledgeClient {
111
111
  */
112
112
  cancelKnowledgeBaseVersion(knowledgeBaseReferenceId: string, request: MavenAGI.CancelKnowledgeBaseVersionRequest, requestOptions?: KnowledgeClient.RequestOptions): core.HttpResponsePromise<void>;
113
113
  private __cancelKnowledgeBaseVersion;
114
+ /**
115
+ * Rolls the knowledge base back to its previous published version.
116
+ *
117
+ * @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to roll back. All other entity ID fields are inferred from the request.
118
+ * @param {KnowledgeClient.RequestOptions} requestOptions - Request-specific configuration.
119
+ *
120
+ * @throws {@link MavenAGI.NotFoundError}
121
+ * @throws {@link MavenAGI.BadRequestError}
122
+ * @throws {@link MavenAGI.PayloadTooLargeError}
123
+ * @throws {@link MavenAGI.TooManyRequestsError}
124
+ * @throws {@link MavenAGI.ServerError}
125
+ *
126
+ * @example
127
+ * await client.knowledge.rollbackKnowledgeBaseVersion("knowledgeBaseReferenceId")
128
+ */
129
+ rollbackKnowledgeBaseVersion(knowledgeBaseReferenceId: string, requestOptions?: KnowledgeClient.RequestOptions): core.HttpResponsePromise<void>;
130
+ private __rollbackKnowledgeBaseVersion;
114
131
  /**
115
132
  * Update mutable knowledge base fields
116
133
  *
@@ -558,6 +558,94 @@ class KnowledgeClient {
558
558
  return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/knowledge/{knowledgeBaseReferenceId}/cancel");
559
559
  });
560
560
  }
561
+ /**
562
+ * Rolls the knowledge base back to its previous published version.
563
+ *
564
+ * @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to roll back. All other entity ID fields are inferred from the request.
565
+ * @param {KnowledgeClient.RequestOptions} requestOptions - Request-specific configuration.
566
+ *
567
+ * @throws {@link MavenAGI.NotFoundError}
568
+ * @throws {@link MavenAGI.BadRequestError}
569
+ * @throws {@link MavenAGI.PayloadTooLargeError}
570
+ * @throws {@link MavenAGI.TooManyRequestsError}
571
+ * @throws {@link MavenAGI.ServerError}
572
+ *
573
+ * @example
574
+ * await client.knowledge.rollbackKnowledgeBaseVersion("knowledgeBaseReferenceId")
575
+ */
576
+ rollbackKnowledgeBaseVersion(knowledgeBaseReferenceId, requestOptions) {
577
+ return core.HttpResponsePromise.fromPromise(this.__rollbackKnowledgeBaseVersion(knowledgeBaseReferenceId, requestOptions));
578
+ }
579
+ __rollbackKnowledgeBaseVersion(knowledgeBaseReferenceId, requestOptions) {
580
+ return __awaiter(this, void 0, void 0, function* () {
581
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
582
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
583
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
584
+ "X-Organization-Id": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationId,
585
+ "X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
586
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
587
+ const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
588
+ url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/knowledge/${core.url.encodePathParam(knowledgeBaseReferenceId)}/rollback`),
589
+ method: "POST",
590
+ headers: _headers,
591
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
592
+ timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
593
+ maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
594
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
595
+ fetchFn: (_p = this._options) === null || _p === void 0 ? void 0 : _p.fetch,
596
+ logging: this._options.logging,
597
+ });
598
+ if (_response.ok) {
599
+ return { data: undefined, rawResponse: _response.rawResponse };
600
+ }
601
+ if (_response.error.reason === "status-code") {
602
+ switch (_response.error.statusCode) {
603
+ case 404:
604
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
605
+ unrecognizedObjectKeys: "passthrough",
606
+ allowUnrecognizedUnionMembers: true,
607
+ allowUnrecognizedEnumValues: true,
608
+ breadcrumbsPrefix: ["response"],
609
+ }), _response.rawResponse);
610
+ case 400:
611
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
612
+ unrecognizedObjectKeys: "passthrough",
613
+ allowUnrecognizedUnionMembers: true,
614
+ allowUnrecognizedEnumValues: true,
615
+ breadcrumbsPrefix: ["response"],
616
+ }), _response.rawResponse);
617
+ case 413:
618
+ throw new MavenAGI.PayloadTooLargeError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
619
+ unrecognizedObjectKeys: "passthrough",
620
+ allowUnrecognizedUnionMembers: true,
621
+ allowUnrecognizedEnumValues: true,
622
+ breadcrumbsPrefix: ["response"],
623
+ }), _response.rawResponse);
624
+ case 429:
625
+ throw new MavenAGI.TooManyRequestsError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
626
+ unrecognizedObjectKeys: "passthrough",
627
+ allowUnrecognizedUnionMembers: true,
628
+ allowUnrecognizedEnumValues: true,
629
+ breadcrumbsPrefix: ["response"],
630
+ }), _response.rawResponse);
631
+ case 500:
632
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
633
+ unrecognizedObjectKeys: "passthrough",
634
+ allowUnrecognizedUnionMembers: true,
635
+ allowUnrecognizedEnumValues: true,
636
+ breadcrumbsPrefix: ["response"],
637
+ }), _response.rawResponse);
638
+ default:
639
+ throw new errors.MavenAGIError({
640
+ statusCode: _response.error.statusCode,
641
+ body: _response.error.body,
642
+ rawResponse: _response.rawResponse,
643
+ });
644
+ }
645
+ }
646
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/knowledge/{knowledgeBaseReferenceId}/rollback");
647
+ });
648
+ }
561
649
  /**
562
650
  * Update mutable knowledge base fields
563
651
  *
@@ -4,7 +4,9 @@ export declare const KnowledgeBaseIndexingStatus: {
4
4
  readonly Indexing: "INDEXING";
5
5
  readonly Indexed: "INDEXED";
6
6
  readonly Published: "PUBLISHED";
7
+ readonly RollingBack: "ROLLING_BACK";
7
8
  readonly Failed: "FAILED";
8
9
  readonly Superseded: "SUPERSEDED";
10
+ readonly RolledBack: "ROLLED_BACK";
9
11
  };
10
12
  export type KnowledgeBaseIndexingStatus = (typeof KnowledgeBaseIndexingStatus)[keyof typeof KnowledgeBaseIndexingStatus] | string;
@@ -8,6 +8,8 @@ exports.KnowledgeBaseIndexingStatus = {
8
8
  Indexing: "INDEXING",
9
9
  Indexed: "INDEXED",
10
10
  Published: "PUBLISHED",
11
+ RollingBack: "ROLLING_BACK",
11
12
  Failed: "FAILED",
12
13
  Superseded: "SUPERSEDED",
14
+ RolledBack: "ROLLED_BACK",
13
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mavenagi",
3
- "version": "1.2.48",
3
+ "version": "1.2.49",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -1681,7 +1681,7 @@ await client.assets.commitUpload("assetReferenceId", {});
1681
1681
  </details>
1682
1682
 
1683
1683
  ## Conversation
1684
- <details><summary><code>client.conversation.<a href="/src/api/resources/conversation/client/Client.ts">initialize</a>({ ...params }) -> MavenAGI.ConversationResponse</code></summary>
1684
+ <details><summary><code>client.conversation.<a href="/src/api/resources/conversation/client/Client.ts">initialize</a>({ ...params }) -> MavenAGI.InitializeConversationResponse</code></summary>
1685
1685
  <dl>
1686
1686
  <dd>
1687
1687
 
@@ -4455,6 +4455,69 @@ await client.knowledge.cancelKnowledgeBaseVersion("knowledgeBaseReferenceId", {}
4455
4455
  </dl>
4456
4456
 
4457
4457
 
4458
+ </dd>
4459
+ </dl>
4460
+ </details>
4461
+
4462
+ <details><summary><code>client.knowledge.<a href="/src/api/resources/knowledge/client/Client.ts">rollbackKnowledgeBaseVersion</a>(knowledgeBaseReferenceId) -> void</code></summary>
4463
+ <dl>
4464
+ <dd>
4465
+
4466
+ #### 📝 Description
4467
+
4468
+ <dl>
4469
+ <dd>
4470
+
4471
+ <dl>
4472
+ <dd>
4473
+
4474
+ Rolls the knowledge base back to its previous published version.
4475
+ </dd>
4476
+ </dl>
4477
+ </dd>
4478
+ </dl>
4479
+
4480
+ #### 🔌 Usage
4481
+
4482
+ <dl>
4483
+ <dd>
4484
+
4485
+ <dl>
4486
+ <dd>
4487
+
4488
+ ```typescript
4489
+ await client.knowledge.rollbackKnowledgeBaseVersion("knowledgeBaseReferenceId");
4490
+
4491
+ ```
4492
+ </dd>
4493
+ </dl>
4494
+ </dd>
4495
+ </dl>
4496
+
4497
+ #### ⚙️ Parameters
4498
+
4499
+ <dl>
4500
+ <dd>
4501
+
4502
+ <dl>
4503
+ <dd>
4504
+
4505
+ **knowledgeBaseReferenceId:** `string` — The reference ID of the knowledge base to roll back. All other entity ID fields are inferred from the request.
4506
+
4507
+ </dd>
4508
+ </dl>
4509
+
4510
+ <dl>
4511
+ <dd>
4512
+
4513
+ **requestOptions:** `KnowledgeClient.RequestOptions`
4514
+
4515
+ </dd>
4516
+ </dl>
4517
+ </dd>
4518
+ </dl>
4519
+
4520
+
4458
4521
  </dd>
4459
4522
  </dl>
4460
4523
  </details>
@@ -0,0 +1,11 @@
1
+ import type * as MavenAGI from "../../../../api/index";
2
+ import * as core from "../../../../core";
3
+ import type * as serializers from "../../../index";
4
+ import { ConversationKickoffStatus } from "./ConversationKickoffStatus";
5
+ export declare const ConversationKickoffResult: core.serialization.ObjectSchema<serializers.ConversationKickoffResult.Raw, MavenAGI.ConversationKickoffResult>;
6
+ export declare namespace ConversationKickoffResult {
7
+ interface Raw {
8
+ status: ConversationKickoffStatus.Raw;
9
+ message?: string | null;
10
+ }
11
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.ConversationKickoffResult = void 0;
38
+ const core = __importStar(require("../../../../core"));
39
+ const ConversationKickoffStatus_1 = require("./ConversationKickoffStatus");
40
+ exports.ConversationKickoffResult = core.serialization.object({
41
+ status: ConversationKickoffStatus_1.ConversationKickoffStatus,
42
+ message: core.serialization.string().optional(),
43
+ });
@@ -0,0 +1,7 @@
1
+ import type * as MavenAGI from "../../../../api/index";
2
+ import * as core from "../../../../core";
3
+ import type * as serializers from "../../../index";
4
+ export declare const ConversationKickoffStatus: core.serialization.Schema<serializers.ConversationKickoffStatus.Raw, MavenAGI.ConversationKickoffStatus>;
5
+ export declare namespace ConversationKickoffStatus {
6
+ type Raw = "SUCCESS" | "FAILED";
7
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.ConversationKickoffStatus = void 0;
38
+ const core = __importStar(require("../../../../core"));
39
+ exports.ConversationKickoffStatus = core.serialization.forwardCompatibleEnum_(["SUCCESS", "FAILED"]);
@@ -6,5 +6,6 @@ export declare namespace ConversationMessageBase {
6
6
  interface Raw {
7
7
  createdAt?: string | null;
8
8
  updatedAt?: string | null;
9
+ appMetadata?: Record<string, string> | null;
9
10
  }
10
11
  }
@@ -39,4 +39,5 @@ const core = __importStar(require("../../../../core"));
39
39
  exports.ConversationMessageBase = core.serialization.object({
40
40
  createdAt: core.serialization.date().optional(),
41
41
  updatedAt: core.serialization.date().optional(),
42
+ appMetadata: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(),
42
43
  });
@@ -7,6 +7,9 @@ export declare namespace ConversationSummary {
7
7
  interface Raw {
8
8
  actionIds: EntityIdWithoutAgent.Raw[];
9
9
  incompleteActionIds: EntityIdWithoutAgent.Raw[];
10
+ matchedCharterIds: EntityIdWithoutAgent.Raw[];
11
+ matchedCharterNames: string[];
12
+ matchedSegmentedCharterNames: string[];
10
13
  insertCount: number;
11
14
  thumbsUpCount: number;
12
15
  thumbsDownCount: number;
@@ -40,6 +40,9 @@ const EntityIdWithoutAgent_1 = require("./EntityIdWithoutAgent");
40
40
  exports.ConversationSummary = core.serialization.object({
41
41
  actionIds: core.serialization.list(EntityIdWithoutAgent_1.EntityIdWithoutAgent),
42
42
  incompleteActionIds: core.serialization.list(EntityIdWithoutAgent_1.EntityIdWithoutAgent),
43
+ matchedCharterIds: core.serialization.list(EntityIdWithoutAgent_1.EntityIdWithoutAgent),
44
+ matchedCharterNames: core.serialization.list(core.serialization.string()),
45
+ matchedSegmentedCharterNames: core.serialization.list(core.serialization.string()),
43
46
  insertCount: core.serialization.number(),
44
47
  thumbsUpCount: core.serialization.number(),
45
48
  thumbsDownCount: core.serialization.number(),
@@ -3,5 +3,5 @@ import * as core from "../../../../core";
3
3
  import type * as serializers from "../../../index";
4
4
  export declare const EntityType: core.serialization.Schema<serializers.EntityType.Raw, MavenAGI.EntityType>;
5
5
  export declare namespace EntityType {
6
- type Raw = "AGENT" | "CONVERSATION" | "CONVERSATION_MESSAGE" | "KNOWLEDGE_BASE" | "KNOWLEDGE_BASE_VERSION" | "KNOWLEDGE_DOCUMENT" | "ACTION" | "USER" | "EVENT" | "EVENT_TRIGGER" | "USER_PROFILE" | "FEEDBACK" | "INBOX_ITEM" | "INBOX_ITEM_FIX" | "SEGMENT" | "CUSTOMER" | "INTELLIGENT_FIELD" | "CHARTER";
6
+ type Raw = "AGENT" | "CONVERSATION" | "CONVERSATION_MESSAGE" | "KNOWLEDGE_BASE" | "KNOWLEDGE_BASE_VERSION" | "KNOWLEDGE_DOCUMENT" | "ACTION" | "USER" | "EVENT" | "EVENT_TRIGGER" | "USER_PROFILE" | "FEEDBACK" | "INBOX_ITEM" | "INBOX_ITEM_FIX" | "SEGMENT" | "CUSTOMER" | "INTELLIGENT_FIELD" | "CHARTER" | "CONVERSATION_KICKOFF" | "AGENT_VARIANT" | "CONFIG_SNAPSHOT";
7
7
  }
@@ -55,4 +55,7 @@ exports.EntityType = core.serialization.forwardCompatibleEnum_([
55
55
  "CUSTOMER",
56
56
  "INTELLIGENT_FIELD",
57
57
  "CHARTER",
58
+ "CONVERSATION_KICKOFF",
59
+ "AGENT_VARIANT",
60
+ "CONFIG_SNAPSHOT",
58
61
  ]);
@@ -0,0 +1,11 @@
1
+ import type * as MavenAGI from "../../../../api/index";
2
+ import * as core from "../../../../core";
3
+ import type * as serializers from "../../../index";
4
+ import { ConversationKickoffResult } from "./ConversationKickoffResult";
5
+ import { ConversationResponse } from "./ConversationResponse";
6
+ export declare const InitializeConversationResponse: core.serialization.ObjectSchema<serializers.InitializeConversationResponse.Raw, MavenAGI.InitializeConversationResponse>;
7
+ export declare namespace InitializeConversationResponse {
8
+ interface Raw extends ConversationResponse.Raw {
9
+ conversationKickoffResult?: ConversationKickoffResult.Raw | null;
10
+ }
11
+ }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.InitializeConversationResponse = void 0;
38
+ const core = __importStar(require("../../../../core"));
39
+ const ConversationKickoffResult_1 = require("./ConversationKickoffResult");
40
+ const ConversationResponse_1 = require("./ConversationResponse");
41
+ exports.InitializeConversationResponse = core.serialization
42
+ .object({
43
+ conversationKickoffResult: ConversationKickoffResult_1.ConversationKickoffResult.optional(),
44
+ })
45
+ .extend(ConversationResponse_1.ConversationResponse);
@@ -59,6 +59,8 @@ export * from "./ContextInfo";
59
59
  export * from "./ConversationAnalysis";
60
60
  export * from "./ConversationExecutedActionPrecondition";
61
61
  export * from "./ConversationInformation";
62
+ export * from "./ConversationKickoffResult";
63
+ export * from "./ConversationKickoffStatus";
62
64
  export * from "./ConversationMessageBase";
63
65
  export * from "./ConversationMessageResponse";
64
66
  export * from "./ConversationPrecondition";
@@ -108,6 +110,7 @@ export * from "./InboxItemMissingKnowledge";
108
110
  export * from "./InboxItemSeverity";
109
111
  export * from "./InboxItemStatus";
110
112
  export * from "./InboxItemType";
113
+ export * from "./InitializeConversationResponse";
111
114
  export * from "./IntelligentFieldCondition";
112
115
  export * from "./IntelligentFieldPrecondition";
113
116
  export * from "./IntelligentFieldPreconditionResponse";
@@ -75,6 +75,8 @@ __exportStar(require("./ContextInfo"), exports);
75
75
  __exportStar(require("./ConversationAnalysis"), exports);
76
76
  __exportStar(require("./ConversationExecutedActionPrecondition"), exports);
77
77
  __exportStar(require("./ConversationInformation"), exports);
78
+ __exportStar(require("./ConversationKickoffResult"), exports);
79
+ __exportStar(require("./ConversationKickoffStatus"), exports);
78
80
  __exportStar(require("./ConversationMessageBase"), exports);
79
81
  __exportStar(require("./ConversationMessageResponse"), exports);
80
82
  __exportStar(require("./ConversationPrecondition"), exports);
@@ -124,6 +126,7 @@ __exportStar(require("./InboxItemMissingKnowledge"), exports);
124
126
  __exportStar(require("./InboxItemSeverity"), exports);
125
127
  __exportStar(require("./InboxItemStatus"), exports);
126
128
  __exportStar(require("./InboxItemType"), exports);
129
+ __exportStar(require("./InitializeConversationResponse"), exports);
127
130
  __exportStar(require("./IntelligentFieldCondition"), exports);
128
131
  __exportStar(require("./IntelligentFieldPrecondition"), exports);
129
132
  __exportStar(require("./IntelligentFieldPreconditionResponse"), exports);
@@ -12,5 +12,6 @@ export declare namespace AskRequest {
12
12
  attachments?: AttachmentRequest.Raw[] | null;
13
13
  transientData?: Record<string, string> | null;
14
14
  timezone?: string | null;
15
+ appMetadata?: Record<string, string> | null;
15
16
  }
16
17
  }
@@ -45,4 +45,5 @@ exports.AskRequest = core.serialization.object({
45
45
  attachments: core.serialization.list(AttachmentRequest_1.AttachmentRequest).optional(),
46
46
  transientData: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(),
47
47
  timezone: core.serialization.string().optional(),
48
+ appMetadata: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(),
48
49
  });
@@ -3,5 +3,5 @@ import * as core from "../../../../core";
3
3
  import type * as serializers from "../../../index";
4
4
  export declare const KnowledgeBaseIndexingStatus: core.serialization.Schema<serializers.KnowledgeBaseIndexingStatus.Raw, MavenAGI.KnowledgeBaseIndexingStatus>;
5
5
  export declare namespace KnowledgeBaseIndexingStatus {
6
- type Raw = "BUILDING" | "INDEXING" | "INDEXED" | "PUBLISHED" | "FAILED" | "SUPERSEDED";
6
+ type Raw = "BUILDING" | "INDEXING" | "INDEXED" | "PUBLISHED" | "ROLLING_BACK" | "FAILED" | "SUPERSEDED" | "ROLLED_BACK";
7
7
  }
@@ -36,4 +36,13 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.KnowledgeBaseIndexingStatus = void 0;
38
38
  const core = __importStar(require("../../../../core"));
39
- exports.KnowledgeBaseIndexingStatus = core.serialization.forwardCompatibleEnum_(["BUILDING", "INDEXING", "INDEXED", "PUBLISHED", "FAILED", "SUPERSEDED"]);
39
+ exports.KnowledgeBaseIndexingStatus = core.serialization.forwardCompatibleEnum_([
40
+ "BUILDING",
41
+ "INDEXING",
42
+ "INDEXED",
43
+ "PUBLISHED",
44
+ "ROLLING_BACK",
45
+ "FAILED",
46
+ "SUPERSEDED",
47
+ "ROLLED_BACK",
48
+ ]);
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.2.48";
1
+ export declare const SDK_VERSION = "1.2.49";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.2.48";
4
+ exports.SDK_VERSION = "1.2.49";