mavenagi 1.2.62 → 1.2.63

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 (140) hide show
  1. package/BaseClient.js +2 -2
  2. package/api/resources/analytics/types/ConversationBarChartRequest.d.ts +4 -0
  3. package/api/resources/analytics/types/ConversationBasicMetric.d.ts +4 -1
  4. package/api/resources/analytics/types/ConversationDateHistogramRequest.d.ts +2 -0
  5. package/api/resources/analytics/types/ConversationPieChartRequest.d.ts +2 -0
  6. package/api/resources/capabilities/client/requests/CapabilitiesSearchRequest.d.ts +3 -1
  7. package/api/resources/charters/client/Client.js +3 -1
  8. package/api/resources/charters/client/requests/CharterDeleteRequest.d.ts +1 -1
  9. package/api/resources/charters/client/requests/CharterGetRequest.d.ts +4 -0
  10. package/api/resources/charters/client/requests/CharterPatchRequest.d.ts +1 -1
  11. package/api/resources/charters/types/CharterBase.d.ts +9 -0
  12. package/api/resources/charters/types/CharterRequest.d.ts +0 -8
  13. package/api/resources/charters/types/CharterSearchFilter.d.ts +2 -0
  14. package/api/resources/commons/types/AdditionalDataKey.d.ts +63 -0
  15. package/api/resources/commons/types/AdditionalDataKey.js +66 -0
  16. package/api/resources/commons/types/BaseConversationResponse.d.ts +4 -3
  17. package/api/resources/commons/types/ErrorReason.d.ts +4 -1
  18. package/api/resources/commons/types/ErrorReason.js +4 -1
  19. package/api/resources/commons/types/EventCondition.d.ts +35 -0
  20. package/api/resources/commons/types/EventConditionGroup.d.ts +11 -0
  21. package/api/resources/commons/types/EventReferencesCondition.d.ts +13 -0
  22. package/api/resources/{conversation → commons}/types/IntelligentFieldFilter.d.ts +1 -1
  23. package/api/resources/commons/types/IntelligentFieldFilter.js +3 -0
  24. package/api/resources/commons/types/IntelligentFieldSearchCondition.js +3 -0
  25. package/api/resources/commons/types/SimulationContext.d.ts +12 -0
  26. package/api/resources/commons/types/SystemEventName.d.ts +4 -1
  27. package/api/resources/commons/types/SystemEventName.js +4 -1
  28. package/api/resources/commons/types/SystemEventNameCondition.d.ts +10 -0
  29. package/api/resources/commons/types/SystemEventNameCondition.js +3 -0
  30. package/api/resources/commons/types/UserEventNameCondition.d.ts +10 -0
  31. package/api/resources/commons/types/UserEventNameCondition.js +3 -0
  32. package/api/resources/commons/types/index.d.ts +9 -0
  33. package/api/resources/commons/types/index.js +9 -0
  34. package/api/resources/conversation/client/Client.d.ts +15 -0
  35. package/api/resources/conversation/client/Client.js +15 -0
  36. package/api/resources/conversation/types/ConversationField.d.ts +22 -1
  37. package/api/resources/conversation/types/ConversationField.js +22 -1
  38. package/api/resources/conversation/types/ConversationFilter.d.ts +18 -0
  39. package/api/resources/conversation/types/ConversationPatchRequest.d.ts +1 -1
  40. package/api/resources/conversation/types/ConversationsSearchRequest.d.ts +2 -2
  41. package/api/resources/conversation/types/index.d.ts +0 -3
  42. package/api/resources/conversation/types/index.js +0 -3
  43. package/api/resources/events/client/Client.d.ts +1 -1
  44. package/api/resources/events/client/Client.js +1 -1
  45. package/api/resources/inbox/types/InboxFilter.d.ts +11 -0
  46. package/api/resources/intelligentFields/client/Client.d.ts +10 -2
  47. package/api/resources/intelligentFields/client/Client.js +10 -2
  48. package/api/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +3 -3
  49. package/api/resources/intelligentFields/types/IntelligentFieldBase.d.ts +2 -2
  50. package/api/resources/intelligentFields/types/IntelligentFieldValueSearchRequest.d.ts +9 -1
  51. package/api/resources/segments/client/Client.js +1 -3
  52. package/api/resources/segments/client/requests/SegmentDeleteRequest.d.ts +0 -12
  53. package/api/resources/segments/types/SegmentPatchRequest.d.ts +0 -8
  54. package/api/resources/segments/types/SegmentRequest.d.ts +0 -8
  55. package/api/resources/triggers/client/Client.d.ts +5 -9
  56. package/api/resources/triggers/client/Client.js +21 -14
  57. package/api/resources/triggers/client/requests/PartialUpdateRequest.d.ts +5 -4
  58. package/api/resources/triggers/types/EventTriggerBase.d.ts +8 -0
  59. package/api/resources/triggers/types/index.d.ts +0 -1
  60. package/api/resources/triggers/types/index.js +0 -1
  61. package/api/resources/users/types/AgentUser.d.ts +2 -0
  62. package/api/resources/users/types/AgentUserFilter.d.ts +3 -0
  63. package/package.json +1 -1
  64. package/reference.md +30 -9
  65. package/serialization/resources/capabilities/client/requests/CapabilitiesSearchRequest.d.ts +2 -0
  66. package/serialization/resources/capabilities/client/requests/CapabilitiesSearchRequest.js +2 -0
  67. package/serialization/resources/charters/types/CharterBase.d.ts +2 -0
  68. package/serialization/resources/charters/types/CharterBase.js +2 -0
  69. package/serialization/resources/charters/types/CharterRequest.d.ts +0 -2
  70. package/serialization/resources/charters/types/CharterRequest.js +0 -2
  71. package/serialization/resources/charters/types/CharterSearchFilter.d.ts +2 -0
  72. package/serialization/resources/charters/types/CharterSearchFilter.js +2 -0
  73. package/serialization/resources/commons/types/AdditionalDataKey.d.ts +7 -0
  74. package/serialization/resources/commons/types/AdditionalDataKey.js +57 -0
  75. package/serialization/resources/commons/types/ErrorReason.d.ts +1 -1
  76. package/serialization/resources/commons/types/ErrorReason.js +1 -0
  77. package/serialization/resources/commons/types/EventCondition.d.ts +26 -0
  78. package/serialization/resources/commons/types/EventCondition.js +55 -0
  79. package/serialization/resources/commons/types/EventConditionGroup.d.ts +11 -0
  80. package/serialization/resources/commons/types/EventConditionGroup.js +44 -0
  81. package/serialization/resources/commons/types/EventReferencesCondition.d.ts +12 -0
  82. package/serialization/resources/commons/types/EventReferencesCondition.js +44 -0
  83. package/serialization/resources/{conversation → commons}/types/IntelligentFieldSearchCondition.d.ts +1 -1
  84. package/serialization/resources/{conversation → commons}/types/IntelligentFieldSearchCondition.js +1 -1
  85. package/serialization/resources/commons/types/SimulationContext.d.ts +2 -0
  86. package/serialization/resources/commons/types/SimulationContext.js +2 -0
  87. package/serialization/resources/commons/types/SystemEventName.d.ts +1 -1
  88. package/serialization/resources/commons/types/SystemEventName.js +1 -0
  89. package/serialization/resources/commons/types/SystemEventNameCondition.d.ts +12 -0
  90. package/serialization/resources/commons/types/SystemEventNameCondition.js +44 -0
  91. package/serialization/resources/commons/types/UserEventNameCondition.d.ts +12 -0
  92. package/serialization/resources/commons/types/UserEventNameCondition.js +44 -0
  93. package/serialization/resources/commons/types/index.d.ts +9 -0
  94. package/serialization/resources/commons/types/index.js +9 -0
  95. package/serialization/resources/conversation/types/ConversationField.d.ts +1 -1
  96. package/serialization/resources/conversation/types/ConversationField.js +2 -0
  97. package/serialization/resources/conversation/types/ConversationFilter.d.ts +3 -1
  98. package/serialization/resources/conversation/types/ConversationFilter.js +3 -1
  99. package/serialization/resources/conversation/types/index.d.ts +0 -3
  100. package/serialization/resources/conversation/types/index.js +0 -3
  101. package/serialization/resources/inbox/types/InboxFilter.d.ts +2 -0
  102. package/serialization/resources/inbox/types/InboxFilter.js +2 -0
  103. package/serialization/resources/index.d.ts +1 -0
  104. package/serialization/resources/index.js +1 -0
  105. package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +2 -2
  106. package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.js +2 -2
  107. package/serialization/resources/segments/types/SegmentPatchRequest.d.ts +0 -2
  108. package/serialization/resources/segments/types/SegmentPatchRequest.js +0 -2
  109. package/serialization/resources/segments/types/SegmentRequest.d.ts +0 -2
  110. package/serialization/resources/segments/types/SegmentRequest.js +0 -2
  111. package/serialization/resources/triggers/client/index.d.ts +1 -0
  112. package/serialization/resources/triggers/client/index.js +17 -0
  113. package/serialization/resources/triggers/client/requests/PartialUpdateRequest.d.ts +10 -0
  114. package/serialization/resources/triggers/{types/TriggerPartialUpdate.js → client/requests/PartialUpdateRequest.js} +5 -3
  115. package/serialization/resources/triggers/client/requests/index.d.ts +1 -0
  116. package/serialization/resources/triggers/client/requests/index.js +5 -0
  117. package/serialization/resources/triggers/index.d.ts +1 -0
  118. package/serialization/resources/triggers/index.js +1 -0
  119. package/serialization/resources/triggers/types/EventTriggerBase.d.ts +2 -1
  120. package/serialization/resources/triggers/types/EventTriggerBase.js +2 -0
  121. package/serialization/resources/triggers/types/index.d.ts +0 -1
  122. package/serialization/resources/triggers/types/index.js +0 -1
  123. package/serialization/resources/users/types/AgentUser.d.ts +2 -0
  124. package/serialization/resources/users/types/AgentUser.js +2 -0
  125. package/serialization/resources/users/types/AgentUserFilter.d.ts +2 -0
  126. package/serialization/resources/users/types/AgentUserFilter.js +2 -0
  127. package/version.d.ts +1 -1
  128. package/version.js +1 -1
  129. package/api/resources/triggers/types/TriggerPartialUpdate.d.ts +0 -4
  130. package/serialization/resources/triggers/types/TriggerPartialUpdate.d.ts +0 -9
  131. /package/api/resources/{conversation/types/IntelligentFieldFilter.js → commons/types/EventCondition.js} +0 -0
  132. /package/api/resources/{conversation/types/IntelligentFieldSearchCondition.js → commons/types/EventConditionGroup.js} +0 -0
  133. /package/api/resources/{triggers/types/TriggerPartialUpdate.js → commons/types/EventReferencesCondition.js} +0 -0
  134. /package/api/resources/{conversation → commons}/types/IntelligentFieldOperator.d.ts +0 -0
  135. /package/api/resources/{conversation → commons}/types/IntelligentFieldOperator.js +0 -0
  136. /package/api/resources/{conversation → commons}/types/IntelligentFieldSearchCondition.d.ts +0 -0
  137. /package/serialization/resources/{conversation → commons}/types/IntelligentFieldFilter.d.ts +0 -0
  138. /package/serialization/resources/{conversation → commons}/types/IntelligentFieldFilter.js +0 -0
  139. /package/serialization/resources/{conversation → commons}/types/IntelligentFieldOperator.d.ts +0 -0
  140. /package/serialization/resources/{conversation → commons}/types/IntelligentFieldOperator.js +0 -0
@@ -65,6 +65,9 @@ export declare class ConversationClient {
65
65
  * The `appId` field can be provided to update a conversation owned by a different app.
66
66
  * All other fields will overwrite the existing value on the conversation only if provided.
67
67
  *
68
+ * A closed conversation (`open` set to false) cannot be reopened: a patch setting `open` to true
69
+ * returns a 400. Its other fields can still be patched.
70
+ *
68
71
  * @param {string} conversationId - The ID of the conversation to patch
69
72
  * @param {MavenAGI.ConversationPatchRequest} request
70
73
  * @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -139,6 +142,8 @@ export declare class ConversationClient {
139
142
  /**
140
143
  * Append messages to an existing conversation. The conversation must be initialized first. If a message with the same ID already exists, it will be ignored. Messages do not allow modification.
141
144
  *
145
+ * A closed conversation (`open` set to false) takes no new messages and returns a 400.
146
+ *
142
147
  * @param {string} conversationId - The ID of the conversation to append messages to
143
148
  * @param {MavenAGI.ConversationMessageRequest[]} request
144
149
  * @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -178,6 +183,8 @@ export declare class ConversationClient {
178
183
  * Get an answer from Maven for a given user question. If the user question or its answer already exists,
179
184
  * they will be reused and will not be updated. Messages do not allow modification once generated.
180
185
  *
186
+ * A closed conversation (`open` set to false) takes no new questions and returns a 400.
187
+ *
181
188
  * Concurrency Behavior:
182
189
  * - If another API call is made for the same user question while a response is mid-stream, partial answers may be returned.
183
190
  * - The second caller will receive a truncated or partial response depending on where the first stream is in its processing. The first caller's stream will remain unaffected and continue delivering the full response.
@@ -227,6 +234,8 @@ export declare class ConversationClient {
227
234
  * If the user question or its answer already exists, they will be reused and will not be updated.
228
235
  * Messages do not allow modification once generated.
229
236
  *
237
+ * A closed conversation (`open` set to false) takes no new questions and returns a 400.
238
+ *
230
239
  * Concurrency Behavior:
231
240
  * - If another API call is made for the same user question while a response is mid-stream, partial answers may be returned.
232
241
  * - The second caller will receive a truncated or partial response depending on where the first stream is in its processing. The first caller's stream will remain unaffected and continue delivering the full response.
@@ -304,6 +313,8 @@ export declare class ConversationClient {
304
313
  * Additionally, form submission is only allowed when the form is the last message in the conversation.
305
314
  * Forms should be disabled in surface UI if a conversation continues and they remain unsubmitted.
306
315
  *
316
+ * A form cannot be submitted on a closed conversation (`open` set to false): that returns a 400.
317
+ *
307
318
  * @param {string} conversationId - The ID of a conversation the form being submitted belongs to
308
319
  * @param {MavenAGI.SubmitActionFormRequest} request
309
320
  * @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -335,6 +346,8 @@ export declare class ConversationClient {
335
346
  *
336
347
  * Adds metadata to an existing conversation. If a metadata field already exists, it will be overwritten.
337
348
  *
349
+ * A closed conversation (`open` set to false) takes no new metadata and returns a 400.
350
+ *
338
351
  * @param {string} conversationId - The ID of a conversation the metadata being added belongs to
339
352
  * @param {Record<string, string>} request
340
353
  * @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -363,6 +376,8 @@ export declare class ConversationClient {
363
376
  *
364
377
  * Returns all metadata saved by any app on the conversation.
365
378
  *
379
+ * A closed conversation (`open` set to false) takes no new metadata and returns a 400.
380
+ *
366
381
  * @param {string} conversationId - The ID of the conversation to modify metadata for
367
382
  * @param {MavenAGI.UpdateMetadataRequest} request
368
383
  * @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -195,6 +195,9 @@ class ConversationClient {
195
195
  * The `appId` field can be provided to update a conversation owned by a different app.
196
196
  * All other fields will overwrite the existing value on the conversation only if provided.
197
197
  *
198
+ * A closed conversation (`open` set to false) cannot be reopened: a patch setting `open` to true
199
+ * returns a 400. Its other fields can still be patched.
200
+ *
198
201
  * @param {string} conversationId - The ID of the conversation to patch
199
202
  * @param {MavenAGI.ConversationPatchRequest} request
200
203
  * @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -519,6 +522,8 @@ class ConversationClient {
519
522
  /**
520
523
  * Append messages to an existing conversation. The conversation must be initialized first. If a message with the same ID already exists, it will be ignored. Messages do not allow modification.
521
524
  *
525
+ * A closed conversation (`open` set to false) takes no new messages and returns a 400.
526
+ *
522
527
  * @param {string} conversationId - The ID of the conversation to append messages to
523
528
  * @param {MavenAGI.ConversationMessageRequest[]} request
524
529
  * @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -642,6 +647,8 @@ class ConversationClient {
642
647
  * Get an answer from Maven for a given user question. If the user question or its answer already exists,
643
648
  * they will be reused and will not be updated. Messages do not allow modification once generated.
644
649
  *
650
+ * A closed conversation (`open` set to false) takes no new questions and returns a 400.
651
+ *
645
652
  * Concurrency Behavior:
646
653
  * - If another API call is made for the same user question while a response is mid-stream, partial answers may be returned.
647
654
  * - The second caller will receive a truncated or partial response depending on where the first stream is in its processing. The first caller's stream will remain unaffected and continue delivering the full response.
@@ -773,6 +780,8 @@ class ConversationClient {
773
780
  * If the user question or its answer already exists, they will be reused and will not be updated.
774
781
  * Messages do not allow modification once generated.
775
782
  *
783
+ * A closed conversation (`open` set to false) takes no new questions and returns a 400.
784
+ *
776
785
  * Concurrency Behavior:
777
786
  * - If another API call is made for the same user question while a response is mid-stream, partial answers may be returned.
778
787
  * - The second caller will receive a truncated or partial response depending on where the first stream is in its processing. The first caller's stream will remain unaffected and continue delivering the full response.
@@ -1103,6 +1112,8 @@ class ConversationClient {
1103
1112
  * Additionally, form submission is only allowed when the form is the last message in the conversation.
1104
1113
  * Forms should be disabled in surface UI if a conversation continues and they remain unsubmitted.
1105
1114
  *
1115
+ * A form cannot be submitted on a closed conversation (`open` set to false): that returns a 400.
1116
+ *
1106
1117
  * @param {string} conversationId - The ID of a conversation the form being submitted belongs to
1107
1118
  * @param {MavenAGI.SubmitActionFormRequest} request
1108
1119
  * @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1216,6 +1227,8 @@ class ConversationClient {
1216
1227
  *
1217
1228
  * Adds metadata to an existing conversation. If a metadata field already exists, it will be overwritten.
1218
1229
  *
1230
+ * A closed conversation (`open` set to false) takes no new metadata and returns a 400.
1231
+ *
1219
1232
  * @param {string} conversationId - The ID of a conversation the metadata being added belongs to
1220
1233
  * @param {Record<string, string>} request
1221
1234
  * @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1328,6 +1341,8 @@ class ConversationClient {
1328
1341
  *
1329
1342
  * Returns all metadata saved by any app on the conversation.
1330
1343
  *
1344
+ * A closed conversation (`open` set to false) takes no new metadata and returns a 400.
1345
+ *
1331
1346
  * @param {string} conversationId - The ID of the conversation to modify metadata for
1332
1347
  * @param {MavenAGI.UpdateMetadataRequest} request
1333
1348
  * @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -37,9 +37,30 @@ export declare const ConversationField: {
37
37
  readonly AgentEnvironment: "AgentEnvironment";
38
38
  readonly InboxItems: "InboxItems";
39
39
  readonly InvolvedApps: "InvolvedApps";
40
+ /**
41
+ * In development, part of agent versioning. The agent variant the conversation is pinned
42
+ * to (its `variantId`). A conversation from before the agent's conversations were pinned
43
+ * has none; grouping puts those under `BEFORE_VERSIONING`. In a table row a variant is an
44
+ * `entityId` value and `BEFORE_VERSIONING` a `string` value. */
45
+ readonly Variant: "Variant";
40
46
  /**
41
47
  * Selects an intelligent field rather than a built-in conversation field.
42
- * When used, `intelligentFieldId` must also be set to identify which field. */
48
+ * When used, `intelligentFieldId` must also be set to identify which field.
49
+ * Grouping by it splits that one field's conversations by value; to split conversations by
50
+ * which fields they have, use `IntelligentFields`. */
43
51
  readonly IntelligentField: "IntelligentField";
52
+ /**
53
+ * Groups conversations by each intelligent field that has a value on them: one bucket per
54
+ * field, keyed by the field as an `entityId` value. A conversation with three fields counts
55
+ * once under each, as with `Actions`. A field counts when the conversation has a value for
56
+ * it, an undetermined one included: the same conversations an `intelligentFields`
57
+ * `EXISTS` condition matches. Only conversation-level fields are on a conversation.
58
+ *
59
+ * Unlike `IntelligentField`, it takes no `intelligentFieldId` and doesn't look at values.
60
+ * Combine it with `Variant` to see which fields each variant's conversations have.
61
+ *
62
+ * It only works as a grouping: a metric targeting it, such as a `distinctCount`, is
63
+ * rejected with a 400. */
64
+ readonly IntelligentFields: "IntelligentFields";
44
65
  };
45
66
  export type ConversationField = (typeof ConversationField)[keyof typeof ConversationField] | string;
@@ -41,8 +41,29 @@ exports.ConversationField = {
41
41
  AgentEnvironment: "AgentEnvironment",
42
42
  InboxItems: "InboxItems",
43
43
  InvolvedApps: "InvolvedApps",
44
+ /**
45
+ * In development, part of agent versioning. The agent variant the conversation is pinned
46
+ * to (its `variantId`). A conversation from before the agent's conversations were pinned
47
+ * has none; grouping puts those under `BEFORE_VERSIONING`. In a table row a variant is an
48
+ * `entityId` value and `BEFORE_VERSIONING` a `string` value. */
49
+ Variant: "Variant",
44
50
  /**
45
51
  * Selects an intelligent field rather than a built-in conversation field.
46
- * When used, `intelligentFieldId` must also be set to identify which field. */
52
+ * When used, `intelligentFieldId` must also be set to identify which field.
53
+ * Grouping by it splits that one field's conversations by value; to split conversations by
54
+ * which fields they have, use `IntelligentFields`. */
47
55
  IntelligentField: "IntelligentField",
56
+ /**
57
+ * Groups conversations by each intelligent field that has a value on them: one bucket per
58
+ * field, keyed by the field as an `entityId` value. A conversation with three fields counts
59
+ * once under each, as with `Actions`. A field counts when the conversation has a value for
60
+ * it, an undetermined one included: the same conversations an `intelligentFields`
61
+ * `EXISTS` condition matches. Only conversation-level fields are on a conversation.
62
+ *
63
+ * Unlike `IntelligentField`, it takes no `intelligentFieldId` and doesn't look at values.
64
+ * Combine it with `Variant` to see which fields each variant's conversations have.
65
+ *
66
+ * It only works as a grouping: a metric targeting it, such as a `distinctCount`, is
67
+ * rejected with a 400. */
68
+ IntelligentFields: "IntelligentFields",
48
69
  };
@@ -62,6 +62,14 @@ export interface ConversationFilter {
62
62
  * customer-writable.
63
63
  */
64
64
  conversationMode?: MavenAGI.ConversationMode[];
65
+ /**
66
+ * Filter by whether the conversation has been deleted with `deleteConversation`. `true`
67
+ * returns only deleted conversations, `false` excludes them. When unset, both are returned.
68
+ *
69
+ * The filter reads the search index, which is updated shortly after a deletion. Use the
70
+ * `deleted` field on each result to confirm.
71
+ */
72
+ deleted?: boolean;
65
73
  /** Filter by tags applied to the conversation */
66
74
  tags?: string[];
67
75
  /** Filter by agent user IDs associated with the conversation */
@@ -106,6 +114,16 @@ export interface ConversationFilter {
106
114
  anyMsgCharterMode?: boolean;
107
115
  /** Filter by inbox item IDs associated with the conversation */
108
116
  inboxItemIds?: MavenAGI.EntityIdFilter[];
117
+ /**
118
+ * Filter by the agent variant each conversation is pinned to (its `variantId`), by
119
+ * reference ID and owning app, resolved against the calling agent. Matches conversations
120
+ * pinned to any of them.
121
+ *
122
+ * Omit it to match every conversation in the window, whichever variant it ran on. A
123
+ * conversation from before the agent's conversations were pinned has no variant, so it
124
+ * matches no list; grouping by `Variant` reports those as `BEFORE_VERSIONING`.
125
+ */
126
+ variantIds?: MavenAGI.EntityIdFilter[];
109
127
  /** Whether to include simulation conversations in search results. Defaults to only non-simulation conversations. */
110
128
  simulationFilter?: MavenAGI.SimulationFilter;
111
129
  /** Filter by intelligent field values. All conditions are ANDed together. */
@@ -8,7 +8,7 @@ import type * as MavenAGI from "../../../index";
8
8
  export interface ConversationPatchRequest {
9
9
  /** The App ID of the conversation to patch. If not provided the ID of the calling app will be used. */
10
10
  appId?: string;
11
- /** Whether the conversation is able to receive asynchronous messages. Only valid for conversations with the `ASYNC` capability. */
11
+ /** Whether the conversation is open. Set it to false to close the conversation, which records a `CONVERSATION_CLOSED` system event. Closing is final: a closed conversation cannot be reopened and takes no new questions, form submissions, messages or metadata. It can still be read, deleted, and patched otherwise, for example to add attachments. For a conversation with the `ASYNC` capability, only an open conversation can receive asynchronous messages. */
12
12
  open?: boolean;
13
13
  /** Whether the LLM is enabled for this conversation. */
14
14
  llmEnabled?: boolean;
@@ -1,8 +1,8 @@
1
1
  import type * as MavenAGI from "../../../index";
2
2
  export interface ConversationsSearchRequest extends MavenAGI.BasePaginatedRequest {
3
3
  /**
4
- * Field to sort results by. `IntelligentField` is not supported here - sorting conversations
5
- * by an intelligent field value is not available. Intelligent fields can be filtered on via
4
+ * Field to sort results by. `IntelligentField` and `IntelligentFields` are not supported
5
+ * here - sorting conversations by an intelligent field value is not available. Intelligent fields can be filtered on via
6
6
  * `filter.intelligentFields`, and grouped or aggregated through the analytics APIs.
7
7
  */
8
8
  sort?: MavenAGI.ConversationField;
@@ -29,9 +29,6 @@ export * from "./DeliveryStatus";
29
29
  export * from "./FeedbackField";
30
30
  export * from "./FeedbackFilter";
31
31
  export * from "./FeedbackRequest";
32
- export * from "./IntelligentFieldFilter";
33
- export * from "./IntelligentFieldOperator";
34
- export * from "./IntelligentFieldSearchCondition";
35
32
  export * from "./NumericConversationField";
36
33
  export * from "./SimulationFilter";
37
34
  export * from "./StreamResponse";
@@ -45,9 +45,6 @@ __exportStar(require("./DeliveryStatus"), exports);
45
45
  __exportStar(require("./FeedbackField"), exports);
46
46
  __exportStar(require("./FeedbackFilter"), exports);
47
47
  __exportStar(require("./FeedbackRequest"), exports);
48
- __exportStar(require("./IntelligentFieldFilter"), exports);
49
- __exportStar(require("./IntelligentFieldOperator"), exports);
50
- __exportStar(require("./IntelligentFieldSearchCondition"), exports);
51
48
  __exportStar(require("./NumericConversationField"), exports);
52
49
  __exportStar(require("./SimulationFilter"), exports);
53
50
  __exportStar(require("./StreamResponse"), exports);
@@ -11,7 +11,7 @@ export declare class EventsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<EventsClient.Options>;
12
12
  constructor(options: EventsClient.Options);
13
13
  /**
14
- * Create a new event
14
+ * Create a new event. Events are immutable, so a create that reuses the `referenceId` of an existing event in the same app is rejected with a 409 and leaves that event unchanged.
15
15
  *
16
16
  * @param {MavenAGI.EventRequest} request
17
17
  * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -58,7 +58,7 @@ class EventsClient {
58
58
  this._options = (0, BaseClient_1.normalizeClientOptionsWithAuth)(options);
59
59
  }
60
60
  /**
61
- * Create a new event
61
+ * Create a new event. Events are immutable, so a create that reuses the `referenceId` of an existing event in the same app is rejected with a 409 and leaves that event unchanged.
62
62
  *
63
63
  * @param {MavenAGI.EventRequest} request
64
64
  * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -10,4 +10,15 @@ export interface InboxFilter {
10
10
  createdAfter?: Date;
11
11
  /** Filter for items created before this timestamp. */
12
12
  createdBefore?: Date;
13
+ /**
14
+ * Filter for items raised from conversations pinned to any of these agent variants, by
15
+ * reference ID and owning app. Only missing-knowledge items are raised from
16
+ * conversations, so no other item type matches a variant. Simulation conversations don't
17
+ * count. Omit it to match items whatever variant their conversations ran on.
18
+ *
19
+ * Reads those conversations, so it needs permission to read conversations as well as the
20
+ * inbox. At most 10,000 items are considered: those referenced by the most of the
21
+ * variants' conversations.
22
+ */
23
+ variantIds?: MavenAGI.EntityIdFilter[];
13
24
  }
@@ -16,7 +16,15 @@ export declare class IntelligentFieldsClient {
16
16
  * entities such as conversations.
17
17
  *
18
18
  * New fields are created with `status: INACTIVE` and are not evaluated until activated
19
- * with the patch endpoint. `definition` is limited to 5,000 characters.
19
+ * with the patch endpoint. A new field created in a `variantId` starts `ACTIVE` instead,
20
+ * since it is evaluated only once that variant is published and given traffic; it starts
21
+ * `INACTIVE` while the agent is at its limit of active fields. `definition` is limited
22
+ * to 5,000 characters.
23
+ *
24
+ * A replace that names a `variantId` must keep the field's `validationType` as that
25
+ * variant has it, or it is rejected with reason `INTELLIGENT_FIELD_TYPE_CHANGED`. To use
26
+ * a different type, create a new field. A field deleted in the variant may be recreated
27
+ * with any type.
20
28
  *
21
29
  * @param {MavenAGI.IntelligentFieldRequest} request
22
30
  * @param {IntelligentFieldsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -122,7 +130,7 @@ export declare class IntelligentFieldsClient {
122
130
  *
123
131
  * Deleted fields are excluded from search results but can still be retrieved by ID.
124
132
  * Creating a new field with the same referenceId as a deleted field will overwrite
125
- * the deleted field and restore it to INACTIVE status.
133
+ * the deleted field and restore it with the status a new field gets.
126
134
  *
127
135
  * Deleted fields cannot be modified.
128
136
  *
@@ -63,7 +63,15 @@ class IntelligentFieldsClient {
63
63
  * entities such as conversations.
64
64
  *
65
65
  * New fields are created with `status: INACTIVE` and are not evaluated until activated
66
- * with the patch endpoint. `definition` is limited to 5,000 characters.
66
+ * with the patch endpoint. A new field created in a `variantId` starts `ACTIVE` instead,
67
+ * since it is evaluated only once that variant is published and given traffic; it starts
68
+ * `INACTIVE` while the agent is at its limit of active fields. `definition` is limited
69
+ * to 5,000 characters.
70
+ *
71
+ * A replace that names a `variantId` must keep the field's `validationType` as that
72
+ * variant has it, or it is rejected with reason `INTELLIGENT_FIELD_TYPE_CHANGED`. To use
73
+ * a different type, create a new field. A field deleted in the variant may be recreated
74
+ * with any type.
67
75
  *
68
76
  * @param {MavenAGI.IntelligentFieldRequest} request
69
77
  * @param {IntelligentFieldsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -422,7 +430,7 @@ class IntelligentFieldsClient {
422
430
  *
423
431
  * Deleted fields are excluded from search results but can still be retrieved by ID.
424
432
  * Creating a new field with the same referenceId as a deleted field will overwrite
425
- * the deleted field and restore it to INACTIVE status.
433
+ * the deleted field and restore it with the status a new field gets.
426
434
  *
427
435
  * Deleted fields cannot be modified.
428
436
  *
@@ -28,8 +28,8 @@ export interface IntelligentFieldPatchRequest {
28
28
  description?: string;
29
29
  /** Updated enum options for fields that constrain the LLM to a finite set. Omit to leave unchanged. The new list must be a superset of the existing options (add-only; removals are rejected). */
30
30
  enumOptions?: MavenAGI.EnumOption[];
31
- /** The agent variant to stage this patch in, by reference ID. Its owning app is `variantAppId`. Required on an agent with versioned intelligent fields; a patch that omits it there is rejected with reason `VARIANT_REQUIRED`. */
32
- variantId?: MavenAGI.EntityIdBase;
33
- /** The App ID of the agent variant named by `variantId`. If not provided, the ID of the calling app will be used — name the owning app to patch in a variant the caller does not own, as the platform's own seeded variants are. */
31
+ /** The agent variant to stage this patch in. Required on an agent with versioned intelligent fields; a patch that omits it there is rejected with reason `VARIANT_REQUIRED`. */
32
+ variantId?: MavenAGI.EntityIdWithoutAgent;
33
+ /** Deprecated, use `variantId.appId`, which wins when both are set. */
34
34
  variantAppId?: string;
35
35
  }
@@ -1,7 +1,7 @@
1
1
  import type * as MavenAGI from "../../../index";
2
2
  export interface IntelligentFieldBase extends MavenAGI.IntelligentFieldCore {
3
- /** Target entity type for evaluation. Only CONVERSATION is supported at this time. The backend will return an error for other types. */
3
+ /** Target entity type for evaluation. CONVERSATION is supported, and AGENT_USER is supported for agents with user-level intelligent fields enabled. The backend will return an error for other types. */
4
4
  entityType: MavenAGI.EntityType;
5
- /** ID of the agent variant this field belongs to, if applicable */
5
+ /** On a request, the agent variant to stage the write in. On a response, the variant the request named, if any; absent when it named none. */
6
6
  variantId?: MavenAGI.EntityIdWithoutAgent;
7
7
  }
@@ -12,6 +12,14 @@ export interface IntelligentFieldValueSearchRequest extends MavenAGI.BaseCappedP
12
12
  includeUnknownValues?: boolean;
13
13
  /** Field to sort by. Defaults to CREATED_AT. */
14
14
  sort?: MavenAGI.IntelligentFieldValueSortField;
15
- /** Filter to values generated by a specific agent variant. If not provided, returns values from all variants. */
15
+ /**
16
+ * Returns values of the fields in this agent variant's scope: its published snapshot plus
17
+ * its staged edits, matched by field. A value is included whichever variant's conversation
18
+ * produced it, and is named as this variant names the field. If not provided, returns
19
+ * values from all variants.
20
+ *
21
+ * To see values from the conversations pinned to a variant, filter conversations by
22
+ * `variantIds` in conversation search or the analytics APIs.
23
+ */
16
24
  variantId?: MavenAGI.EntityIdWithoutAgent;
17
25
  }
@@ -523,11 +523,9 @@ class SegmentsClient {
523
523
  __delete(segmentReferenceId_1) {
524
524
  return __awaiter(this, arguments, void 0, function* (segmentReferenceId, request = {}, requestOptions) {
525
525
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
526
- const { appId, variantReferenceId, variantAppId } = request;
526
+ const { appId } = request;
527
527
  const _queryParams = {
528
528
  appId,
529
- variantReferenceId,
530
- variantAppId,
531
529
  };
532
530
  const _authRequest = yield this._options.authProvider.getAuthRequest();
533
531
  const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
@@ -5,16 +5,4 @@
5
5
  export interface SegmentDeleteRequest {
6
6
  /** The App ID of the segment to delete. If not provided, the ID of the calling app will be used. */
7
7
  appId?: string;
8
- /**
9
- * The reference ID of the agent variant this delete is scoped to. When set, the
10
- * deletion is staged in that variant's working set instead of being applied to the
11
- * agent's live configuration.
12
- *
13
- * Omit this parameter to delete directly from the agent. Variant scoping is not
14
- * active yet: a variant supplied today is accepted and ignored, and the delete applies
15
- * to the agent.
16
- */
17
- variantReferenceId?: string;
18
- /** The App ID of the agent variant named by `variantReferenceId`. If not provided, the ID of the calling app will be used. */
19
- variantAppId?: string;
20
8
  }
@@ -10,12 +10,4 @@ export interface SegmentPatchRequest {
10
10
  precondition?: MavenAGI.Precondition;
11
11
  /** The status of the segment. Segments can only be deactivated if they are not set on any actions or active knowledge bases. */
12
12
  status?: MavenAGI.SegmentStatus;
13
- /**
14
- * The agent variant this patch is scoped to. When set, the patch is staged in that
15
- * variant's working set instead of being applied to the agent's live configuration.
16
- *
17
- * Omit this field to patch the agent directly. Variant scoping is not active yet: a
18
- * variant supplied today is accepted and ignored, and the patch applies to the agent.
19
- */
20
- variantId?: MavenAGI.EntityIdWithoutAgent;
21
13
  }
@@ -22,14 +22,6 @@ import type * as MavenAGI from "../../../index";
22
22
  export interface SegmentRequest extends MavenAGI.SegmentBase {
23
23
  /** ID that uniquely identifies this segment */
24
24
  segmentId: MavenAGI.EntityIdBase;
25
- /**
26
- * The agent variant this write is scoped to. When set, the segment content is staged in
27
- * that variant's working set instead of being applied to the agent's live configuration.
28
- *
29
- * Omit this field to write directly to the agent. Variant scoping is not active yet: a
30
- * variant supplied today is accepted and ignored, and the write applies to the agent.
31
- */
32
- variantId?: MavenAGI.EntityIdWithoutAgent;
33
25
  /** The precondition that must be met for a conversation message to be included in the segment. */
34
26
  precondition: MavenAGI.Precondition;
35
27
  /** Desired status for the segment. If omitted, defaults to ACTIVE. In the future this will become required, so specify ACTIVE or INACTIVE if possible. */
@@ -107,12 +107,10 @@ export declare class TriggersClient {
107
107
  delete(triggerReferenceId: string, requestOptions?: TriggersClient.RequestOptions): core.HttpResponsePromise<void>;
108
108
  private __delete;
109
109
  /**
110
- * @deprecated
111
- *
112
- * Deprecated. Use `PATCH /v1/capabilities/TRIGGER/{referenceId}` with a `status`, which
113
- * publishes and unpublishes any kind of capability the same way.
110
+ * Updates an event trigger. `enabled` and `condition` are the editable fields.
114
111
  *
115
- * Updates an event trigger. Only the enabled field is editable.
112
+ * `PATCH /v1/capabilities/TRIGGER/{referenceId}` with a `status` also turns a trigger on and
113
+ * off, the same way it publishes and unpublishes any kind of capability.
116
114
  *
117
115
  * @param {string} triggerReferenceId - The reference ID of the event trigger to update. All other entity ID fields are inferred from the request.
118
116
  * @param {MavenAGI.PartialUpdateRequest} request
@@ -127,10 +125,8 @@ export declare class TriggersClient {
127
125
  * @throws {@link errors.MavenAGITimeoutError}
128
126
  *
129
127
  * @example
130
- * await client.triggers.partialUpdate("triggerReferenceId", {
131
- * body: {}
132
- * })
128
+ * await client.triggers.partialUpdate("triggerReferenceId")
133
129
  */
134
- partialUpdate(triggerReferenceId: string, request: MavenAGI.PartialUpdateRequest, requestOptions?: TriggersClient.RequestOptions): core.HttpResponsePromise<MavenAGI.EventTriggerResponse>;
130
+ partialUpdate(triggerReferenceId: string, request?: MavenAGI.PartialUpdateRequest, requestOptions?: TriggersClient.RequestOptions): core.HttpResponsePromise<MavenAGI.EventTriggerResponse>;
135
131
  private __partialUpdate;
136
132
  }
@@ -42,6 +42,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
42
42
  step((generator = generator.apply(thisArg, _arguments || [])).next());
43
43
  });
44
44
  };
45
+ var __rest = (this && this.__rest) || function (s, e) {
46
+ var t = {};
47
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
48
+ t[p] = s[p];
49
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
50
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
51
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52
+ t[p[i]] = s[p[i]];
53
+ }
54
+ return t;
55
+ };
45
56
  Object.defineProperty(exports, "__esModule", { value: true });
46
57
  exports.TriggersClient = void 0;
47
58
  const BaseClient_1 = require("../../../../BaseClient");
@@ -468,12 +479,10 @@ class TriggersClient {
468
479
  });
469
480
  }
470
481
  /**
471
- * @deprecated
472
- *
473
- * Deprecated. Use `PATCH /v1/capabilities/TRIGGER/{referenceId}` with a `status`, which
474
- * publishes and unpublishes any kind of capability the same way.
482
+ * Updates an event trigger. `enabled` and `condition` are the editable fields.
475
483
  *
476
- * Updates an event trigger. Only the enabled field is editable.
484
+ * `PATCH /v1/capabilities/TRIGGER/{referenceId}` with a `status` also turns a trigger on and
485
+ * off, the same way it publishes and unpublishes any kind of capability.
477
486
  *
478
487
  * @param {string} triggerReferenceId - The reference ID of the event trigger to update. All other entity ID fields are inferred from the request.
479
488
  * @param {MavenAGI.PartialUpdateRequest} request
@@ -488,17 +497,15 @@ class TriggersClient {
488
497
  * @throws {@link errors.MavenAGITimeoutError}
489
498
  *
490
499
  * @example
491
- * await client.triggers.partialUpdate("triggerReferenceId", {
492
- * body: {}
493
- * })
500
+ * await client.triggers.partialUpdate("triggerReferenceId")
494
501
  */
495
- partialUpdate(triggerReferenceId, request, requestOptions) {
502
+ partialUpdate(triggerReferenceId, request = {}, requestOptions) {
496
503
  return core.HttpResponsePromise.fromPromise(this.__partialUpdate(triggerReferenceId, request, requestOptions));
497
504
  }
498
- __partialUpdate(triggerReferenceId, request, requestOptions) {
499
- return __awaiter(this, void 0, void 0, function* () {
505
+ __partialUpdate(triggerReferenceId_1) {
506
+ return __awaiter(this, arguments, void 0, function* (triggerReferenceId, request = {}, requestOptions) {
500
507
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
501
- const { appId, body: _body } = request;
508
+ const { appId } = request, _body = __rest(request, ["appId"]);
502
509
  const _queryParams = {
503
510
  appId,
504
511
  };
@@ -511,14 +518,14 @@ class TriggersClient {
511
518
  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/triggers/${core.url.encodePathParam(triggerReferenceId)}`),
512
519
  method: "PATCH",
513
520
  headers: _headers,
514
- contentType: "application/json",
521
+ contentType: "application/merge-patch+json",
515
522
  queryString: core.url
516
523
  .queryBuilder()
517
524
  .addMany(_queryParams)
518
525
  .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
519
526
  .build(),
520
527
  requestType: "json",
521
- body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.TriggerPartialUpdate.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
528
+ body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.PartialUpdateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
522
529
  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,
523
530
  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,
524
531
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -1,12 +1,13 @@
1
1
  import type * as MavenAGI from "../../../../index";
2
2
  /**
3
3
  * @example
4
- * {
5
- * body: {}
6
- * }
4
+ * {}
7
5
  */
8
6
  export interface PartialUpdateRequest {
9
7
  /** The App ID of the trigger to update. If not provided, the ID of the calling app will be used. */
10
8
  appId?: string;
11
- body: MavenAGI.TriggerPartialUpdate;
9
+ /** Whether the trigger will be called by Maven. */
10
+ enabled?: boolean;
11
+ /** Narrows which events fire this trigger. Omitted leaves the current condition alone; an explicit null removes it, so the trigger fires for every event again. */
12
+ condition?: MavenAGI.EventCondition | null;
12
13
  }
@@ -11,4 +11,12 @@ export interface EventTriggerBase {
11
11
  * Inbox triggers fire when an inbox item is created or updated.
12
12
  */
13
13
  type: MavenAGI.EventTriggerType;
14
+ /**
15
+ * Narrows which events fire this trigger. Without one the trigger fires for every event on
16
+ * the agent. Re-registering writes whatever condition the request carries, so omitting it
17
+ * removes one; PATCH changes or removes a condition without re-registering.
18
+ *
19
+ * Only allowed on `EVENT_CREATED`; the other trigger types reject it.
20
+ */
21
+ condition?: MavenAGI.EventCondition;
14
22
  }
@@ -4,4 +4,3 @@ export * from "./EventTriggerResponse";
4
4
  export * from "./EventTriggersSearchRequest";
5
5
  export * from "./EventTriggersSearchResponse";
6
6
  export * from "./TriggerField";
7
- export * from "./TriggerPartialUpdate";
@@ -20,4 +20,3 @@ __exportStar(require("./EventTriggerResponse"), exports);
20
20
  __exportStar(require("./EventTriggersSearchRequest"), exports);
21
21
  __exportStar(require("./EventTriggersSearchResponse"), exports);
22
22
  __exportStar(require("./TriggerField"), exports);
23
- __exportStar(require("./TriggerPartialUpdate"), exports);
@@ -59,4 +59,6 @@ export interface AgentUser {
59
59
  * If two apps create users with the same identifying properties, they will be merged into a single agent user.
60
60
  */
61
61
  users: MavenAGI.AppUserSummary[];
62
+ /** Latest successful values of the agent user's intelligent fields. */
63
+ intelligentFieldValues?: MavenAGI.IntelligentFieldValueResponse[];
62
64
  }