mavenagi 1.2.25 → 1.2.27

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 (118) hide show
  1. package/Client.js +2 -2
  2. package/api/resources/commons/types/ActionBase.d.ts +1 -1
  3. package/api/resources/commons/types/BotLogicCharterDetail.d.ts +14 -0
  4. package/api/resources/commons/types/BotLogicCharterDetail.js +3 -0
  5. package/api/resources/commons/types/BotLogicChartersItem.d.ts +10 -0
  6. package/api/resources/commons/types/BotLogicChartersItem.js +3 -0
  7. package/api/resources/commons/types/BotLogicIntelligentFieldDetail.d.ts +8 -0
  8. package/api/resources/commons/types/BotLogicIntelligentFieldDetail.js +3 -0
  9. package/api/resources/commons/types/BotLogicIntelligentFieldsItem.d.ts +4 -0
  10. package/api/resources/commons/types/BotLogicIntelligentFieldsItem.js +3 -0
  11. package/api/resources/commons/types/BotLogicItem.d.ts +7 -1
  12. package/api/resources/commons/types/InboxItemCustom.d.ts +1 -5
  13. package/api/resources/commons/types/IntelligentFieldValueResponse.d.ts +3 -0
  14. package/api/resources/commons/types/index.d.ts +4 -0
  15. package/api/resources/commons/types/index.js +4 -0
  16. package/api/resources/inbox/client/Client.d.ts +24 -2
  17. package/api/resources/inbox/client/Client.js +104 -2
  18. package/api/resources/inbox/client/requests/InboxItemPatchRequest.d.ts +20 -0
  19. package/api/resources/inbox/client/requests/InboxItemPatchRequest.js +3 -0
  20. package/api/resources/inbox/client/requests/index.d.ts +1 -0
  21. package/api/resources/inbox/types/InboxItemCreateRequest.d.ts +2 -8
  22. package/api/resources/knowledge/client/Client.d.ts +19 -0
  23. package/api/resources/knowledge/client/Client.js +93 -0
  24. package/api/resources/knowledge/types/CancelKnowledgeBaseVersionRequest.d.ts +5 -0
  25. package/api/resources/knowledge/types/CancelKnowledgeBaseVersionRequest.js +3 -0
  26. package/api/resources/knowledge/types/index.d.ts +1 -0
  27. package/api/resources/knowledge/types/index.js +1 -0
  28. package/api/resources/triggers/types/EventTriggerBase.d.ts +2 -0
  29. package/dist/Client.js +2 -2
  30. package/dist/api/resources/commons/types/ActionBase.d.ts +1 -1
  31. package/dist/api/resources/commons/types/BotLogicCharterDetail.d.ts +14 -0
  32. package/dist/api/resources/commons/types/BotLogicCharterDetail.js +3 -0
  33. package/dist/api/resources/commons/types/BotLogicChartersItem.d.ts +10 -0
  34. package/dist/api/resources/commons/types/BotLogicChartersItem.js +3 -0
  35. package/dist/api/resources/commons/types/BotLogicIntelligentFieldDetail.d.ts +8 -0
  36. package/dist/api/resources/commons/types/BotLogicIntelligentFieldDetail.js +3 -0
  37. package/dist/api/resources/commons/types/BotLogicIntelligentFieldsItem.d.ts +4 -0
  38. package/dist/api/resources/commons/types/BotLogicIntelligentFieldsItem.js +3 -0
  39. package/dist/api/resources/commons/types/BotLogicItem.d.ts +7 -1
  40. package/dist/api/resources/commons/types/InboxItemCustom.d.ts +1 -5
  41. package/dist/api/resources/commons/types/IntelligentFieldValueResponse.d.ts +3 -0
  42. package/dist/api/resources/commons/types/index.d.ts +4 -0
  43. package/dist/api/resources/commons/types/index.js +4 -0
  44. package/dist/api/resources/inbox/client/Client.d.ts +24 -2
  45. package/dist/api/resources/inbox/client/Client.js +104 -2
  46. package/dist/api/resources/inbox/client/requests/InboxItemPatchRequest.d.ts +20 -0
  47. package/dist/api/resources/inbox/client/requests/InboxItemPatchRequest.js +3 -0
  48. package/dist/api/resources/inbox/client/requests/index.d.ts +1 -0
  49. package/dist/api/resources/inbox/types/InboxItemCreateRequest.d.ts +2 -8
  50. package/dist/api/resources/knowledge/client/Client.d.ts +19 -0
  51. package/dist/api/resources/knowledge/client/Client.js +93 -0
  52. package/dist/api/resources/knowledge/types/CancelKnowledgeBaseVersionRequest.d.ts +5 -0
  53. package/dist/api/resources/knowledge/types/CancelKnowledgeBaseVersionRequest.js +3 -0
  54. package/dist/api/resources/knowledge/types/index.d.ts +1 -0
  55. package/dist/api/resources/knowledge/types/index.js +1 -0
  56. package/dist/api/resources/triggers/types/EventTriggerBase.d.ts +2 -0
  57. package/dist/serialization/resources/commons/types/BotLogicCharterDetail.d.ts +13 -0
  58. package/dist/serialization/resources/commons/types/BotLogicCharterDetail.js +45 -0
  59. package/dist/serialization/resources/commons/types/BotLogicChartersItem.d.ts +11 -0
  60. package/dist/serialization/resources/commons/types/BotLogicChartersItem.js +43 -0
  61. package/dist/serialization/resources/commons/types/BotLogicIntelligentFieldDetail.d.ts +14 -0
  62. package/dist/serialization/resources/commons/types/BotLogicIntelligentFieldDetail.js +46 -0
  63. package/dist/serialization/resources/commons/types/BotLogicIntelligentFieldsItem.d.ts +10 -0
  64. package/dist/serialization/resources/commons/types/BotLogicIntelligentFieldsItem.js +42 -0
  65. package/dist/serialization/resources/commons/types/BotLogicItem.d.ts +9 -1
  66. package/dist/serialization/resources/commons/types/BotLogicItem.js +4 -0
  67. package/dist/serialization/resources/commons/types/InboxItemCustom.d.ts +1 -3
  68. package/dist/serialization/resources/commons/types/InboxItemCustom.js +1 -3
  69. package/dist/serialization/resources/commons/types/IntelligentFieldValueResponse.d.ts +1 -0
  70. package/dist/serialization/resources/commons/types/IntelligentFieldValueResponse.js +1 -0
  71. package/dist/serialization/resources/commons/types/index.d.ts +4 -0
  72. package/dist/serialization/resources/commons/types/index.js +4 -0
  73. package/dist/serialization/resources/inbox/client/requests/InboxItemPatchRequest.d.ts +14 -0
  74. package/dist/serialization/resources/inbox/client/requests/InboxItemPatchRequest.js +46 -0
  75. package/dist/serialization/resources/inbox/client/requests/index.d.ts +1 -0
  76. package/dist/serialization/resources/inbox/client/requests/index.js +3 -1
  77. package/dist/serialization/resources/inbox/types/InboxItemCreateRequest.d.ts +2 -4
  78. package/dist/serialization/resources/inbox/types/InboxItemCreateRequest.js +2 -4
  79. package/dist/serialization/resources/knowledge/types/CancelKnowledgeBaseVersionRequest.d.ts +10 -0
  80. package/dist/serialization/resources/knowledge/types/CancelKnowledgeBaseVersionRequest.js +42 -0
  81. package/dist/serialization/resources/knowledge/types/index.d.ts +1 -0
  82. package/dist/serialization/resources/knowledge/types/index.js +1 -0
  83. package/dist/serialization/resources/triggers/types/EventTriggerBase.d.ts +1 -0
  84. package/dist/serialization/resources/triggers/types/EventTriggerBase.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 +153 -2
  89. package/serialization/resources/commons/types/BotLogicCharterDetail.d.ts +13 -0
  90. package/serialization/resources/commons/types/BotLogicCharterDetail.js +45 -0
  91. package/serialization/resources/commons/types/BotLogicChartersItem.d.ts +11 -0
  92. package/serialization/resources/commons/types/BotLogicChartersItem.js +43 -0
  93. package/serialization/resources/commons/types/BotLogicIntelligentFieldDetail.d.ts +14 -0
  94. package/serialization/resources/commons/types/BotLogicIntelligentFieldDetail.js +46 -0
  95. package/serialization/resources/commons/types/BotLogicIntelligentFieldsItem.d.ts +10 -0
  96. package/serialization/resources/commons/types/BotLogicIntelligentFieldsItem.js +42 -0
  97. package/serialization/resources/commons/types/BotLogicItem.d.ts +9 -1
  98. package/serialization/resources/commons/types/BotLogicItem.js +4 -0
  99. package/serialization/resources/commons/types/InboxItemCustom.d.ts +1 -3
  100. package/serialization/resources/commons/types/InboxItemCustom.js +1 -3
  101. package/serialization/resources/commons/types/IntelligentFieldValueResponse.d.ts +1 -0
  102. package/serialization/resources/commons/types/IntelligentFieldValueResponse.js +1 -0
  103. package/serialization/resources/commons/types/index.d.ts +4 -0
  104. package/serialization/resources/commons/types/index.js +4 -0
  105. package/serialization/resources/inbox/client/requests/InboxItemPatchRequest.d.ts +14 -0
  106. package/serialization/resources/inbox/client/requests/InboxItemPatchRequest.js +46 -0
  107. package/serialization/resources/inbox/client/requests/index.d.ts +1 -0
  108. package/serialization/resources/inbox/client/requests/index.js +3 -1
  109. package/serialization/resources/inbox/types/InboxItemCreateRequest.d.ts +2 -4
  110. package/serialization/resources/inbox/types/InboxItemCreateRequest.js +2 -4
  111. package/serialization/resources/knowledge/types/CancelKnowledgeBaseVersionRequest.d.ts +10 -0
  112. package/serialization/resources/knowledge/types/CancelKnowledgeBaseVersionRequest.js +42 -0
  113. package/serialization/resources/knowledge/types/index.d.ts +1 -0
  114. package/serialization/resources/knowledge/types/index.js +1 -0
  115. package/serialization/resources/triggers/types/EventTriggerBase.d.ts +1 -0
  116. package/serialization/resources/triggers/types/EventTriggerBase.js +1 -0
  117. package/version.d.ts +1 -1
  118. package/version.js +1 -1
package/Client.js CHANGED
@@ -62,8 +62,8 @@ class MavenAGIClient {
62
62
  "X-Agent-Id": _options === null || _options === void 0 ? void 0 : _options.agentId,
63
63
  "X-Fern-Language": "JavaScript",
64
64
  "X-Fern-SDK-Name": "mavenagi",
65
- "X-Fern-SDK-Version": "1.2.25",
66
- "User-Agent": "mavenagi/1.2.25",
65
+ "X-Fern-SDK-Version": "1.2.27",
66
+ "User-Agent": "mavenagi/1.2.27",
67
67
  "X-Fern-Runtime": core.RUNTIME.type,
68
68
  "X-Fern-Runtime-Version": core.RUNTIME.version,
69
69
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -2,6 +2,6 @@ import type * as MavenAGI from "../../../index";
2
2
  export interface ActionBase extends MavenAGI.ActionProperties {
3
3
  /** The name of the action. This is displayed to the end user as part of forms when user interaction is required. It is also used to help Maven decide if the action is relevant to a conversation. */
4
4
  name: string;
5
- /** The description of the action. Must be less than 1024 characters. This helps Maven decide if the action is relevant to a conversation and is not displayed directly to the end user. Descriptions are used by the LLM. */
5
+ /** The description of the action. Must be no more than 4096 characters. This helps Maven decide if the action is relevant to a conversation and is not displayed directly to the end user. Descriptions are used by the LLM. */
6
6
  description: string;
7
7
  }
@@ -0,0 +1,14 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * A charter that matched the conversation state during evaluation.
4
+ */
5
+ export interface BotLogicCharterDetail {
6
+ /** The charter's entity ID. */
7
+ charterId: MavenAGI.EntityIdWithoutAgent;
8
+ /** Human-readable charter name at the time of evaluation. */
9
+ name: string;
10
+ /** The segment that gates this charter, if any. Absent for wildcard charters. */
11
+ segmentId?: MavenAGI.EntityIdWithoutAgent;
12
+ /** The parent charter in the hierarchy, if any. Absent for root-level charters. */
13
+ parentId?: MavenAGI.EntityIdWithoutAgent;
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 });
@@ -0,0 +1,10 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * Charter evaluation results for this bot response.
4
+ */
5
+ export interface BotLogicChartersItem {
6
+ /** Charters that matched the conversation state and were used to generate this response. */
7
+ matchedCharters: MavenAGI.BotLogicCharterDetail[];
8
+ /** True when too many charters fit the initial criteria and evaluation was cut short. The matchedCharters list may be incomplete. */
9
+ evaluationTruncated: boolean;
10
+ }
@@ -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,8 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ export interface BotLogicIntelligentFieldDetail {
3
+ fieldId: MavenAGI.EntityIdWithoutAgent;
4
+ name: string;
5
+ value?: string;
6
+ confidence?: number;
7
+ rationale?: string;
8
+ }
@@ -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,4 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ export interface BotLogicIntelligentFieldsItem {
3
+ refreshedFields: MavenAGI.BotLogicIntelligentFieldDetail[];
4
+ }
@@ -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 });
@@ -1,5 +1,5 @@
1
1
  import type * as MavenAGI from "../../../index";
2
- export type BotLogicItem = MavenAGI.BotLogicItem.Knowledge | MavenAGI.BotLogicItem.Actions | MavenAGI.BotLogicItem.Form | MavenAGI.BotLogicItem.Safety | MavenAGI.BotLogicItem.User | MavenAGI.BotLogicItem.Segments;
2
+ export type BotLogicItem = MavenAGI.BotLogicItem.Knowledge | MavenAGI.BotLogicItem.Actions | MavenAGI.BotLogicItem.Form | MavenAGI.BotLogicItem.Safety | MavenAGI.BotLogicItem.User | MavenAGI.BotLogicItem.Segments | MavenAGI.BotLogicItem.IntelligentFields | MavenAGI.BotLogicItem.Charters;
3
3
  export declare namespace BotLogicItem {
4
4
  interface Knowledge extends MavenAGI.BotLogicKnowledgeItem {
5
5
  type: "knowledge";
@@ -19,4 +19,10 @@ export declare namespace BotLogicItem {
19
19
  interface Segments extends MavenAGI.BotLogicSegmentsItem {
20
20
  type: "segments";
21
21
  }
22
+ interface IntelligentFields extends MavenAGI.BotLogicIntelligentFieldsItem {
23
+ type: "intelligentFields";
24
+ }
25
+ interface Charters extends MavenAGI.BotLogicChartersItem {
26
+ type: "charters";
27
+ }
22
28
  }
@@ -8,12 +8,8 @@ export interface InboxItemCustom extends MavenAGI.InboxItemBase {
8
8
  description?: string;
9
9
  /** An optional URL that can be associated with the inbox item. */
10
10
  externalUrl?: string;
11
- /** An optional deadline for the inbox item. */
12
- deadline?: Date;
13
- /** An optional timestamp until which the inbox item is snoozed. */
14
- snoozedUntil?: Date;
15
11
  /** An optional assignee for the inbox item. */
16
- assignee?: string;
12
+ assignee?: MavenAGI.ScopedEntity;
17
13
  /** An optional list of references to other entities that are related to this inbox item. */
18
14
  references?: MavenAGI.ScopedEntity[];
19
15
  }
@@ -11,6 +11,7 @@ import type * as MavenAGI from "../../../index";
11
11
  * agentId: "support",
12
12
  * type: MavenAGI.EntityType.Conversation
13
13
  * },
14
+ * name: "Ticket Priority",
14
15
  * entityId: {
15
16
  * referenceId: "ticket-123",
16
17
  * appId: "zendesk",
@@ -27,6 +28,8 @@ import type * as MavenAGI from "../../../index";
27
28
  export interface IntelligentFieldValueResponse {
28
29
  /** The intelligent field that this value belongs to */
29
30
  fieldId: MavenAGI.EntityId;
31
+ /** Display name of the intelligent field */
32
+ name: string;
30
33
  /** The entity this value is for */
31
34
  entityId: MavenAGI.EntityId;
32
35
  /** The computed value (typed according to validationType) */
@@ -30,7 +30,11 @@ export * from "./BotLogic";
30
30
  export * from "./BotLogicActionExecutedDetail";
31
31
  export * from "./BotLogicActionItem";
32
32
  export * from "./BotLogicActionReviewedDetail";
33
+ export * from "./BotLogicCharterDetail";
34
+ export * from "./BotLogicChartersItem";
33
35
  export * from "./BotLogicFormSubmissionItem";
36
+ export * from "./BotLogicIntelligentFieldDetail";
37
+ export * from "./BotLogicIntelligentFieldsItem";
34
38
  export * from "./BotLogicItem";
35
39
  export * from "./BotLogicKnowledgeDetail";
36
40
  export * from "./BotLogicKnowledgeItem";
@@ -46,7 +46,11 @@ __exportStar(require("./BotLogic"), exports);
46
46
  __exportStar(require("./BotLogicActionExecutedDetail"), exports);
47
47
  __exportStar(require("./BotLogicActionItem"), exports);
48
48
  __exportStar(require("./BotLogicActionReviewedDetail"), exports);
49
+ __exportStar(require("./BotLogicCharterDetail"), exports);
50
+ __exportStar(require("./BotLogicChartersItem"), exports);
49
51
  __exportStar(require("./BotLogicFormSubmissionItem"), exports);
52
+ __exportStar(require("./BotLogicIntelligentFieldDetail"), exports);
53
+ __exportStar(require("./BotLogicIntelligentFieldsItem"), exports);
50
54
  __exportStar(require("./BotLogicItem"), exports);
51
55
  __exportStar(require("./BotLogicKnowledgeDetail"), exports);
52
56
  __exportStar(require("./BotLogicKnowledgeItem"), exports);
@@ -48,8 +48,6 @@ export declare class Inbox {
48
48
  * "key": "value"
49
49
  * },
50
50
  * externalUrl: "todo.com",
51
- * deadline: new Date("2026-12-31T23:59:59.000Z"),
52
- * snoozedUntil: new Date("2026-12-25T23:59:59.000Z"),
53
51
  * references: [{
54
52
  * entityId: {
55
53
  * type: "CONVERSATION_MESSAGE",
@@ -70,6 +68,30 @@ export declare class Inbox {
70
68
  */
71
69
  createOrUpdate(request: MavenAGI.InboxItemCreateRequest, requestOptions?: Inbox.RequestOptions): core.HttpResponsePromise<MavenAGI.InboxItem>;
72
70
  private __createOrUpdate;
71
+ /**
72
+ * Update mutable inbox item fields. Only supported for custom inbox items.
73
+ *
74
+ * The `appId` field can be provided to update a inbox item owned by a different app.
75
+ * All other fields will overwrite the existing value on the inbox item only if provided.
76
+ *
77
+ * @param {string} inboxItemId - The ID of the inbox item to patch
78
+ * @param {MavenAGI.InboxItemPatchRequest} request
79
+ * @param {Inbox.RequestOptions} requestOptions - Request-specific configuration.
80
+ *
81
+ * @throws {@link MavenAGI.NotFoundError}
82
+ * @throws {@link MavenAGI.BadRequestError}
83
+ * @throws {@link MavenAGI.ServerError}
84
+ *
85
+ * @example
86
+ * await client.inbox.patch("custom-item-1", {
87
+ * status: "OPEN",
88
+ * metadata: {
89
+ * "key": "value"
90
+ * }
91
+ * })
92
+ */
93
+ patch(inboxItemId: string, request?: MavenAGI.InboxItemPatchRequest, requestOptions?: Inbox.RequestOptions): core.HttpResponsePromise<MavenAGI.InboxItem>;
94
+ private __patch;
73
95
  /**
74
96
  * Update inbox item tag fields. All tags provided will overwrite the existing tags on the inbox item.
75
97
  *
@@ -172,8 +172,6 @@ class Inbox {
172
172
  * "key": "value"
173
173
  * },
174
174
  * externalUrl: "todo.com",
175
- * deadline: new Date("2026-12-31T23:59:59.000Z"),
176
- * snoozedUntil: new Date("2026-12-25T23:59:59.000Z"),
177
175
  * references: [{
178
176
  * entityId: {
179
177
  * type: "CONVERSATION_MESSAGE",
@@ -274,6 +272,110 @@ class Inbox {
274
272
  }
275
273
  });
276
274
  }
275
+ /**
276
+ * Update mutable inbox item fields. Only supported for custom inbox items.
277
+ *
278
+ * The `appId` field can be provided to update a inbox item owned by a different app.
279
+ * All other fields will overwrite the existing value on the inbox item only if provided.
280
+ *
281
+ * @param {string} inboxItemId - The ID of the inbox item to patch
282
+ * @param {MavenAGI.InboxItemPatchRequest} request
283
+ * @param {Inbox.RequestOptions} requestOptions - Request-specific configuration.
284
+ *
285
+ * @throws {@link MavenAGI.NotFoundError}
286
+ * @throws {@link MavenAGI.BadRequestError}
287
+ * @throws {@link MavenAGI.ServerError}
288
+ *
289
+ * @example
290
+ * await client.inbox.patch("custom-item-1", {
291
+ * status: "OPEN",
292
+ * metadata: {
293
+ * "key": "value"
294
+ * }
295
+ * })
296
+ */
297
+ patch(inboxItemId, request = {}, requestOptions) {
298
+ return core.HttpResponsePromise.fromPromise(this.__patch(inboxItemId, request, requestOptions));
299
+ }
300
+ __patch(inboxItemId_1) {
301
+ return __awaiter(this, arguments, void 0, function* (inboxItemId, request = {}, requestOptions) {
302
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
303
+ const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
304
+ Authorization: yield this._getAuthorizationHeader(),
305
+ "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,
306
+ "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,
307
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
308
+ const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
309
+ 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/inbox/${core.url.encodePathParam(inboxItemId)}`),
310
+ method: "PATCH",
311
+ headers: _headers,
312
+ contentType: "application/json",
313
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
314
+ requestType: "json",
315
+ body: serializers.InboxItemPatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
316
+ 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,
317
+ 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,
318
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
319
+ });
320
+ if (_response.ok) {
321
+ return {
322
+ data: serializers.InboxItem.parseOrThrow(_response.body, {
323
+ unrecognizedObjectKeys: "passthrough",
324
+ allowUnrecognizedUnionMembers: true,
325
+ allowUnrecognizedEnumValues: true,
326
+ breadcrumbsPrefix: ["response"],
327
+ }),
328
+ rawResponse: _response.rawResponse,
329
+ };
330
+ }
331
+ if (_response.error.reason === "status-code") {
332
+ switch (_response.error.statusCode) {
333
+ case 404:
334
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
335
+ unrecognizedObjectKeys: "passthrough",
336
+ allowUnrecognizedUnionMembers: true,
337
+ allowUnrecognizedEnumValues: true,
338
+ breadcrumbsPrefix: ["response"],
339
+ }), _response.rawResponse);
340
+ case 400:
341
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
342
+ unrecognizedObjectKeys: "passthrough",
343
+ allowUnrecognizedUnionMembers: true,
344
+ allowUnrecognizedEnumValues: true,
345
+ breadcrumbsPrefix: ["response"],
346
+ }), _response.rawResponse);
347
+ case 500:
348
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
349
+ unrecognizedObjectKeys: "passthrough",
350
+ allowUnrecognizedUnionMembers: true,
351
+ allowUnrecognizedEnumValues: true,
352
+ breadcrumbsPrefix: ["response"],
353
+ }), _response.rawResponse);
354
+ default:
355
+ throw new errors.MavenAGIError({
356
+ statusCode: _response.error.statusCode,
357
+ body: _response.error.body,
358
+ rawResponse: _response.rawResponse,
359
+ });
360
+ }
361
+ }
362
+ switch (_response.error.reason) {
363
+ case "non-json":
364
+ throw new errors.MavenAGIError({
365
+ statusCode: _response.error.statusCode,
366
+ body: _response.error.rawBody,
367
+ rawResponse: _response.rawResponse,
368
+ });
369
+ case "timeout":
370
+ throw new errors.MavenAGITimeoutError("Timeout exceeded when calling PATCH /v1/inbox/{inboxItemId}.");
371
+ case "unknown":
372
+ throw new errors.MavenAGIError({
373
+ message: _response.error.errorMessage,
374
+ rawResponse: _response.rawResponse,
375
+ });
376
+ }
377
+ });
378
+ }
277
379
  /**
278
380
  * Update inbox item tag fields. All tags provided will overwrite the existing tags on the inbox item.
279
381
  *
@@ -0,0 +1,20 @@
1
+ import type * as MavenAGI from "../../../../index";
2
+ /**
3
+ * @example
4
+ * {
5
+ * status: "OPEN",
6
+ * metadata: {
7
+ * "key": "value"
8
+ * }
9
+ * }
10
+ */
11
+ export interface InboxItemPatchRequest {
12
+ /** The App ID of the inbox item to patch. If not provided the ID of the calling app will be used. */
13
+ appId?: string;
14
+ /** Status of the inbox item. */
15
+ status?: MavenAGI.InboxItemStatus;
16
+ /** Severity of the inbox item. */
17
+ severity?: MavenAGI.InboxItemSeverity;
18
+ /** Additional metadata associated with the inbox item. */
19
+ metadata?: Record<string, string>;
20
+ }
@@ -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 });
@@ -1,4 +1,5 @@
1
1
  export type { InboxItemApplyTagsRequest } from "./InboxItemApplyTagsRequest";
2
2
  export type { InboxItemFixRequest } from "./InboxItemFixRequest";
3
3
  export type { InboxItemIgnoreRequest } from "./InboxItemIgnoreRequest";
4
+ export type { InboxItemPatchRequest } from "./InboxItemPatchRequest";
4
5
  export type { InboxItemRequest } from "./InboxItemRequest";
@@ -13,8 +13,6 @@ import type * as MavenAGI from "../../../index";
13
13
  * "key": "value"
14
14
  * },
15
15
  * externalUrl: "todo.com",
16
- * deadline: new Date("2026-12-31T23:59:59.000Z"),
17
- * snoozedUntil: new Date("2026-12-25T23:59:59.000Z"),
18
16
  * references: [{
19
17
  * entityId: {
20
18
  * type: MavenAGI.EntityType.ConversationMessage,
@@ -43,17 +41,13 @@ export interface InboxItemCreateRequest {
43
41
  /** Additional metadata associated with the inbox item. */
44
42
  metadata: Record<string, string>;
45
43
  /** Title of the inbox item. */
46
- title?: string;
44
+ title: string;
47
45
  /** Description of the inbox item. */
48
46
  description?: string;
49
47
  /** An optional URL that can be associated with the inbox item. */
50
48
  externalUrl?: string;
51
- /** An optional deadline for the inbox item. */
52
- deadline?: Date;
53
- /** An optional timestamp until which the inbox item is snoozed. */
54
- snoozedUntil?: Date;
55
49
  /** An optional assignee for the inbox item. */
56
- assignee?: string;
50
+ assignee?: MavenAGI.ScopedEntity;
57
51
  /** An optional list of references to other entities that are related to this inbox item. */
58
52
  references?: MavenAGI.ScopedEntity[];
59
53
  }
@@ -82,6 +82,25 @@ export declare class Knowledge {
82
82
  */
83
83
  refreshKnowledgeBase(knowledgeBaseReferenceId: string, request: MavenAGI.KnowledgeBaseRefreshRequest, requestOptions?: Knowledge.RequestOptions): core.HttpResponsePromise<void>;
84
84
  private __refreshKnowledgeBase;
85
+ /**
86
+ * in-progress knowledge base version.
87
+ *
88
+ * If the knowledge base has a version that is currently being ingested,
89
+ * this will cancel the ingestion workflow and set the version status to FAILED.
90
+ *
91
+ * @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to cancel ingestion for. All other entity ID fields are inferred from the request.
92
+ * @param {MavenAGI.CancelKnowledgeBaseVersionRequest} request
93
+ * @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
94
+ *
95
+ * @throws {@link MavenAGI.NotFoundError}
96
+ * @throws {@link MavenAGI.BadRequestError}
97
+ * @throws {@link MavenAGI.ServerError}
98
+ *
99
+ * @example
100
+ * await client.knowledge.cancelKnowledgeBaseVersion("knowledgeBaseReferenceId", {})
101
+ */
102
+ cancelKnowledgeBaseVersion(knowledgeBaseReferenceId: string, request: MavenAGI.CancelKnowledgeBaseVersionRequest, requestOptions?: Knowledge.RequestOptions): core.HttpResponsePromise<void>;
103
+ private __cancelKnowledgeBaseVersion;
85
104
  /**
86
105
  * Update mutable knowledge base fields
87
106
  *
@@ -440,6 +440,99 @@ class Knowledge {
440
440
  }
441
441
  });
442
442
  }
443
+ /**
444
+ * in-progress knowledge base version.
445
+ *
446
+ * If the knowledge base has a version that is currently being ingested,
447
+ * this will cancel the ingestion workflow and set the version status to FAILED.
448
+ *
449
+ * @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to cancel ingestion for. All other entity ID fields are inferred from the request.
450
+ * @param {MavenAGI.CancelKnowledgeBaseVersionRequest} request
451
+ * @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
452
+ *
453
+ * @throws {@link MavenAGI.NotFoundError}
454
+ * @throws {@link MavenAGI.BadRequestError}
455
+ * @throws {@link MavenAGI.ServerError}
456
+ *
457
+ * @example
458
+ * await client.knowledge.cancelKnowledgeBaseVersion("knowledgeBaseReferenceId", {})
459
+ */
460
+ cancelKnowledgeBaseVersion(knowledgeBaseReferenceId, request, requestOptions) {
461
+ return core.HttpResponsePromise.fromPromise(this.__cancelKnowledgeBaseVersion(knowledgeBaseReferenceId, request, requestOptions));
462
+ }
463
+ __cancelKnowledgeBaseVersion(knowledgeBaseReferenceId, request, requestOptions) {
464
+ return __awaiter(this, void 0, void 0, function* () {
465
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
466
+ const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
467
+ Authorization: yield this._getAuthorizationHeader(),
468
+ "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,
469
+ "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,
470
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
471
+ const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
472
+ 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)}/cancel`),
473
+ method: "POST",
474
+ headers: _headers,
475
+ contentType: "application/json",
476
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
477
+ requestType: "json",
478
+ body: serializers.CancelKnowledgeBaseVersionRequest.jsonOrThrow(request, {
479
+ unrecognizedObjectKeys: "strip",
480
+ }),
481
+ 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,
482
+ 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,
483
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
484
+ });
485
+ if (_response.ok) {
486
+ return { data: undefined, rawResponse: _response.rawResponse };
487
+ }
488
+ if (_response.error.reason === "status-code") {
489
+ switch (_response.error.statusCode) {
490
+ case 404:
491
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
492
+ unrecognizedObjectKeys: "passthrough",
493
+ allowUnrecognizedUnionMembers: true,
494
+ allowUnrecognizedEnumValues: true,
495
+ breadcrumbsPrefix: ["response"],
496
+ }), _response.rawResponse);
497
+ case 400:
498
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
499
+ unrecognizedObjectKeys: "passthrough",
500
+ allowUnrecognizedUnionMembers: true,
501
+ allowUnrecognizedEnumValues: true,
502
+ breadcrumbsPrefix: ["response"],
503
+ }), _response.rawResponse);
504
+ case 500:
505
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
506
+ unrecognizedObjectKeys: "passthrough",
507
+ allowUnrecognizedUnionMembers: true,
508
+ allowUnrecognizedEnumValues: true,
509
+ breadcrumbsPrefix: ["response"],
510
+ }), _response.rawResponse);
511
+ default:
512
+ throw new errors.MavenAGIError({
513
+ statusCode: _response.error.statusCode,
514
+ body: _response.error.body,
515
+ rawResponse: _response.rawResponse,
516
+ });
517
+ }
518
+ }
519
+ switch (_response.error.reason) {
520
+ case "non-json":
521
+ throw new errors.MavenAGIError({
522
+ statusCode: _response.error.statusCode,
523
+ body: _response.error.rawBody,
524
+ rawResponse: _response.rawResponse,
525
+ });
526
+ case "timeout":
527
+ throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/knowledge/{knowledgeBaseReferenceId}/cancel.");
528
+ case "unknown":
529
+ throw new errors.MavenAGIError({
530
+ message: _response.error.errorMessage,
531
+ rawResponse: _response.rawResponse,
532
+ });
533
+ }
534
+ });
535
+ }
443
536
  /**
444
537
  * Update mutable knowledge base fields
445
538
  *
@@ -0,0 +1,5 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ export interface CancelKnowledgeBaseVersionRequest {
3
+ /** ID that uniquely identifies which knowledge base version to cancel. If not provided will use the most recent version of the knowledge base. */
4
+ versionId?: MavenAGI.EntityIdWithoutAgent;
5
+ }
@@ -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 });
@@ -1,4 +1,5 @@
1
1
  export * from "./BaseKnowledgeDocument";
2
+ export * from "./CancelKnowledgeBaseVersionRequest";
2
3
  export * from "./FinalizeKnowledgeBaseVersionRequest";
3
4
  export * from "./KnowledgeBaseField";
4
5
  export * from "./KnowledgeBaseFilter";
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./BaseKnowledgeDocument"), exports);
18
+ __exportStar(require("./CancelKnowledgeBaseVersionRequest"), exports);
18
19
  __exportStar(require("./FinalizeKnowledgeBaseVersionRequest"), exports);
19
20
  __exportStar(require("./KnowledgeBaseField"), exports);
20
21
  __exportStar(require("./KnowledgeBaseFilter"), exports);
@@ -1,5 +1,7 @@
1
1
  import type * as MavenAGI from "../../../index";
2
2
  export interface EventTriggerBase {
3
+ /** The name of the trigger, displayed to end users. If not set, a name is derived from the app ID and trigger type. */
4
+ name?: string;
3
5
  /** The description of what the event trigger does, shown in the Maven Dashboard */
4
6
  description: string;
5
7
  /**
package/dist/Client.js CHANGED
@@ -62,8 +62,8 @@ class MavenAGIClient {
62
62
  "X-Agent-Id": _options === null || _options === void 0 ? void 0 : _options.agentId,
63
63
  "X-Fern-Language": "JavaScript",
64
64
  "X-Fern-SDK-Name": "mavenagi",
65
- "X-Fern-SDK-Version": "1.2.25",
66
- "User-Agent": "mavenagi/1.2.25",
65
+ "X-Fern-SDK-Version": "1.2.27",
66
+ "User-Agent": "mavenagi/1.2.27",
67
67
  "X-Fern-Runtime": core.RUNTIME.type,
68
68
  "X-Fern-Runtime-Version": core.RUNTIME.version,
69
69
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -2,6 +2,6 @@ import type * as MavenAGI from "../../../index";
2
2
  export interface ActionBase extends MavenAGI.ActionProperties {
3
3
  /** The name of the action. This is displayed to the end user as part of forms when user interaction is required. It is also used to help Maven decide if the action is relevant to a conversation. */
4
4
  name: string;
5
- /** The description of the action. Must be less than 1024 characters. This helps Maven decide if the action is relevant to a conversation and is not displayed directly to the end user. Descriptions are used by the LLM. */
5
+ /** The description of the action. Must be no more than 4096 characters. This helps Maven decide if the action is relevant to a conversation and is not displayed directly to the end user. Descriptions are used by the LLM. */
6
6
  description: string;
7
7
  }
@@ -0,0 +1,14 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * A charter that matched the conversation state during evaluation.
4
+ */
5
+ export interface BotLogicCharterDetail {
6
+ /** The charter's entity ID. */
7
+ charterId: MavenAGI.EntityIdWithoutAgent;
8
+ /** Human-readable charter name at the time of evaluation. */
9
+ name: string;
10
+ /** The segment that gates this charter, if any. Absent for wildcard charters. */
11
+ segmentId?: MavenAGI.EntityIdWithoutAgent;
12
+ /** The parent charter in the hierarchy, if any. Absent for root-level charters. */
13
+ parentId?: MavenAGI.EntityIdWithoutAgent;
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 });
@@ -0,0 +1,10 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * Charter evaluation results for this bot response.
4
+ */
5
+ export interface BotLogicChartersItem {
6
+ /** Charters that matched the conversation state and were used to generate this response. */
7
+ matchedCharters: MavenAGI.BotLogicCharterDetail[];
8
+ /** True when too many charters fit the initial criteria and evaluation was cut short. The matchedCharters list may be incomplete. */
9
+ evaluationTruncated: boolean;
10
+ }
@@ -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,8 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ export interface BotLogicIntelligentFieldDetail {
3
+ fieldId: MavenAGI.EntityIdWithoutAgent;
4
+ name: string;
5
+ value?: string;
6
+ confidence?: number;
7
+ rationale?: string;
8
+ }
@@ -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,4 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ export interface BotLogicIntelligentFieldsItem {
3
+ refreshedFields: MavenAGI.BotLogicIntelligentFieldDetail[];
4
+ }