mavenagi 1.2.70 → 1.2.72

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/BaseClient.js +2 -2
  2. package/api/resources/capabilities/client/Client.d.ts +3 -3
  3. package/api/resources/capabilities/client/Client.js +3 -3
  4. package/api/resources/commons/types/AbsoluteTimeWindow.d.ts +5 -2
  5. package/api/resources/commons/types/ActionEffects.d.ts +18 -0
  6. package/api/resources/commons/types/ActionEffects.js +3 -0
  7. package/api/resources/commons/types/AllUsersConversationAudience.d.ts +1 -0
  8. package/api/resources/commons/types/AllUsersConversationAudience.js +3 -0
  9. package/api/resources/commons/types/ChangeAuthor.d.ts +18 -0
  10. package/api/resources/commons/types/ChangeAuthor.js +3 -0
  11. package/api/resources/commons/types/ConversationAudience.d.ts +19 -0
  12. package/api/resources/commons/types/ConversationAudience.js +3 -0
  13. package/api/resources/commons/types/ConversationAudienceResponse.d.ts +16 -0
  14. package/api/resources/commons/types/ConversationAudienceResponse.js +3 -0
  15. package/api/resources/commons/types/ConversationResponse.d.ts +8 -0
  16. package/api/resources/commons/types/ConversationSetupFields.d.ts +21 -0
  17. package/api/resources/commons/types/ConversationSetupFields.js +3 -0
  18. package/api/resources/commons/types/CrossOrganizationLevelEntityId.d.ts +7 -0
  19. package/api/resources/commons/types/CrossOrganizationLevelEntityId.js +3 -0
  20. package/api/resources/commons/types/FieldCondition.d.ts +3 -2
  21. package/api/resources/commons/types/InitializeConversationResponse.d.ts +3 -0
  22. package/api/resources/commons/types/LeveledEntityId.d.ts +28 -0
  23. package/api/resources/commons/types/LeveledEntityId.js +3 -0
  24. package/api/resources/commons/types/MetadataPrecondition.d.ts +27 -3
  25. package/api/resources/commons/types/OrganizationLevelEntityId.d.ts +9 -0
  26. package/api/resources/commons/types/OrganizationLevelEntityId.js +3 -0
  27. package/api/resources/commons/types/PresenceOperator.d.ts +2 -1
  28. package/api/resources/commons/types/PresenceOperator.js +2 -1
  29. package/api/resources/commons/types/ResolutionStatus.d.ts +9 -5
  30. package/api/resources/commons/types/ResolutionStatus.js +9 -5
  31. package/api/resources/commons/types/SimulationActionBehavior.d.ts +1 -1
  32. package/api/resources/commons/types/SimulationContext.d.ts +6 -24
  33. package/api/resources/commons/types/SimulationFixedResponse.d.ts +14 -0
  34. package/api/resources/commons/types/SimulationFixedResponse.js +3 -0
  35. package/api/resources/commons/types/SimulationSetupFields.d.ts +29 -0
  36. package/api/resources/commons/types/SimulationSetupFields.js +3 -0
  37. package/api/resources/commons/types/TagsPrecondition.d.ts +12 -1
  38. package/api/resources/commons/types/TimePrecondition.d.ts +1 -0
  39. package/api/resources/commons/types/UserDataEffect.d.ts +10 -0
  40. package/api/resources/commons/types/UserDataEffect.js +3 -0
  41. package/api/resources/commons/types/UserDataPatch.d.ts +10 -0
  42. package/api/resources/commons/types/UserDataPatch.js +3 -0
  43. package/api/resources/commons/types/UsersConversationAudience.d.ts +8 -0
  44. package/api/resources/commons/types/UsersConversationAudience.js +3 -0
  45. package/api/resources/commons/types/UsersConversationAudienceResponse.d.ts +9 -0
  46. package/api/resources/commons/types/UsersConversationAudienceResponse.js +3 -0
  47. package/api/resources/commons/types/index.d.ts +15 -0
  48. package/api/resources/commons/types/index.js +15 -0
  49. package/api/resources/conversation/client/Client.d.ts +35 -1
  50. package/api/resources/conversation/client/Client.js +35 -1
  51. package/api/resources/conversation/types/AskRequest.d.ts +4 -1
  52. package/api/resources/conversation/types/BillableFilterField.d.ts +1 -1
  53. package/api/resources/conversation/types/BillableFilterField.js +1 -1
  54. package/api/resources/conversation/types/ConversationRequest.d.ts +26 -16
  55. package/api/resources/conversation/types/DeliverMessageResponse.d.ts +5 -0
  56. package/api/resources/conversation/types/DeliverUserMessageRequest.d.ts +20 -0
  57. package/api/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +4 -0
  58. package/api/resources/knowledge/client/Client.d.ts +14 -0
  59. package/api/resources/knowledge/client/Client.js +14 -0
  60. package/api/resources/knowledge/types/KnowledgeBaseType.d.ts +2 -0
  61. package/api/resources/knowledge/types/KnowledgeBaseType.js +2 -0
  62. package/api/resources/knowledge/types/KnowledgeBaseVersionRequest.d.ts +2 -0
  63. package/package.json +1 -1
  64. package/reference.md +29 -4
  65. package/serialization/resources/commons/types/AbsoluteTimeWindow.d.ts +1 -0
  66. package/serialization/resources/commons/types/AbsoluteTimeWindow.js +1 -0
  67. package/serialization/resources/commons/types/ActionEffects.d.ts +11 -0
  68. package/serialization/resources/commons/types/ActionEffects.js +45 -0
  69. package/serialization/resources/commons/types/AllUsersConversationAudience.d.ts +7 -0
  70. package/serialization/resources/commons/types/AllUsersConversationAudience.js +39 -0
  71. package/serialization/resources/commons/types/ChangeAuthor.d.ts +12 -0
  72. package/serialization/resources/commons/types/ChangeAuthor.js +44 -0
  73. package/serialization/resources/commons/types/ConversationAudience.d.ts +15 -0
  74. package/serialization/resources/commons/types/ConversationAudience.js +49 -0
  75. package/serialization/resources/commons/types/ConversationAudienceResponse.d.ts +15 -0
  76. package/serialization/resources/commons/types/ConversationAudienceResponse.js +49 -0
  77. package/serialization/resources/commons/types/ConversationResponse.d.ts +2 -0
  78. package/serialization/resources/commons/types/ConversationResponse.js +2 -0
  79. package/serialization/resources/commons/types/ConversationSetupFields.d.ts +12 -0
  80. package/serialization/resources/commons/types/ConversationSetupFields.js +44 -0
  81. package/serialization/resources/commons/types/CrossOrganizationLevelEntityId.d.ts +9 -0
  82. package/serialization/resources/commons/types/CrossOrganizationLevelEntityId.js +40 -0
  83. package/serialization/resources/commons/types/LeveledEntityId.d.ts +19 -0
  84. package/serialization/resources/commons/types/LeveledEntityId.js +51 -0
  85. package/serialization/resources/commons/types/MetadataPrecondition.d.ts +2 -0
  86. package/serialization/resources/commons/types/MetadataPrecondition.js +2 -0
  87. package/serialization/resources/commons/types/OrganizationLevelEntityId.d.ts +10 -0
  88. package/serialization/resources/commons/types/OrganizationLevelEntityId.js +44 -0
  89. package/serialization/resources/commons/types/SimulationActionBehavior.d.ts +2 -2
  90. package/serialization/resources/commons/types/SimulationActionBehavior.js +2 -2
  91. package/serialization/resources/commons/types/SimulationContext.d.ts +2 -6
  92. package/serialization/resources/commons/types/SimulationContext.js +5 -7
  93. package/serialization/resources/commons/types/SimulationFixedResponse.d.ts +11 -0
  94. package/serialization/resources/commons/types/SimulationFixedResponse.js +45 -0
  95. package/serialization/resources/commons/types/SimulationSetupFields.d.ts +13 -0
  96. package/serialization/resources/commons/types/SimulationSetupFields.js +45 -0
  97. package/serialization/resources/commons/types/UserDataEffect.d.ts +11 -0
  98. package/serialization/resources/commons/types/UserDataEffect.js +43 -0
  99. package/serialization/resources/commons/types/UserDataPatch.d.ts +11 -0
  100. package/serialization/resources/commons/types/UserDataPatch.js +43 -0
  101. package/serialization/resources/commons/types/UsersConversationAudience.d.ts +10 -0
  102. package/serialization/resources/commons/types/UsersConversationAudience.js +42 -0
  103. package/serialization/resources/commons/types/UsersConversationAudienceResponse.d.ts +10 -0
  104. package/serialization/resources/commons/types/UsersConversationAudienceResponse.js +42 -0
  105. package/serialization/resources/commons/types/index.d.ts +15 -0
  106. package/serialization/resources/commons/types/index.js +15 -0
  107. package/serialization/resources/conversation/types/ConversationRequest.d.ts +4 -5
  108. package/serialization/resources/conversation/types/ConversationRequest.js +7 -6
  109. package/serialization/resources/conversation/types/DeliverMessageResponse.d.ts +2 -0
  110. package/serialization/resources/conversation/types/DeliverMessageResponse.js +2 -0
  111. package/serialization/resources/conversation/types/DeliverUserMessageRequest.d.ts +1 -0
  112. package/serialization/resources/conversation/types/DeliverUserMessageRequest.js +1 -0
  113. package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +3 -0
  114. package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.js +3 -0
  115. package/serialization/resources/knowledge/types/KnowledgeBaseVersionRequest.d.ts +2 -0
  116. package/serialization/resources/knowledge/types/KnowledgeBaseVersionRequest.js +2 -0
  117. package/version.d.ts +1 -1
  118. package/version.js +1 -1
@@ -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,6 @@
1
1
  export * from "./AbsoluteTimeWindow";
2
2
  export * from "./ActionBase";
3
+ export * from "./ActionEffects";
3
4
  export * from "./ActionEnumOption";
4
5
  export * from "./ActionExecutionParamValue";
5
6
  export * from "./ActionExecutionStatus";
@@ -11,6 +12,7 @@ export * from "./ActionProperties";
11
12
  export * from "./ActionResponse";
12
13
  export * from "./ActionUser";
13
14
  export * from "./AdditionalDataKey";
15
+ export * from "./AllUsersConversationAudience";
14
16
  export * from "./AppPrecondition";
15
17
  export * from "./AppUser";
16
18
  export * from "./AppUserIdentifier";
@@ -61,6 +63,7 @@ export * from "./Capability";
61
63
  export * from "./CapabilityBase";
62
64
  export * from "./CapabilityStatus";
63
65
  export * from "./CapabilityType";
66
+ export * from "./ChangeAuthor";
64
67
  export * from "./CharterType";
65
68
  export * from "./ChartSpecSchema";
66
69
  export * from "./CheckboxSettingsSchemaEntry";
@@ -68,6 +71,8 @@ export * from "./ColorSettingsSchemaEntry";
68
71
  export * from "./ComplexArraySettingsSchemaEntry";
69
72
  export * from "./ContextInfo";
70
73
  export * from "./ConversationAnalysis";
74
+ export * from "./ConversationAudience";
75
+ export * from "./ConversationAudienceResponse";
71
76
  export * from "./ConversationExecutedActionPrecondition";
72
77
  export * from "./ConversationInformation";
73
78
  export * from "./ConversationKickoffExecutionResponse";
@@ -82,10 +87,12 @@ export * from "./ConversationPreconditionResponse";
82
87
  export * from "./ConversationPreview";
83
88
  export * from "./ConversationResponse";
84
89
  export * from "./ConversationRound";
90
+ export * from "./ConversationSetupFields";
85
91
  export * from "./ConversationState";
86
92
  export * from "./ConversationStatePrecondition";
87
93
  export * from "./ConversationSummary";
88
94
  export * from "./ConversationValueSource";
95
+ export * from "./CrossOrganizationLevelEntityId";
89
96
  export * from "./CsatInfo";
90
97
  export * from "./CursorPage";
91
98
  export * from "./DayOfMonthDaySelector";
@@ -154,6 +161,7 @@ export * from "./KnowledgeContextByEntities";
154
161
  export * from "./KnowledgeContextByEntityTypes";
155
162
  export * from "./KnowledgeContextFilter";
156
163
  export * from "./LanguageInfo";
164
+ export * from "./LeveledEntityId";
157
165
  export * from "./LlmInclusionStatus";
158
166
  export * from "./LlmPersona";
159
167
  export * from "./MessageStatus";
@@ -183,6 +191,7 @@ export * from "./OAuthSettingsSchemaEntry";
183
191
  export * from "./ObjectCondition";
184
192
  export * from "./Occurrence";
185
193
  export * from "./OneOfSettingsSchemaEntry";
194
+ export * from "./OrganizationLevelEntityId";
186
195
  export * from "./OsInfo";
187
196
  export * from "./OsType";
188
197
  export * from "./Page";
@@ -227,6 +236,8 @@ export * from "./SimulationActionCallApp";
227
236
  export * from "./SimulationActionMock";
228
237
  export * from "./SimulationContext";
229
238
  export * from "./SimulationFilter";
239
+ export * from "./SimulationFixedResponse";
240
+ export * from "./SimulationSetupFields";
230
241
  export * from "./Source";
231
242
  export * from "./SourceInfo";
232
243
  export * from "./SourceType";
@@ -251,6 +262,8 @@ export * from "./TimeWindow";
251
262
  export * from "./UniversalCondition";
252
263
  export * from "./UserConversationMessageType";
253
264
  export * from "./UserData";
265
+ export * from "./UserDataEffect";
266
+ export * from "./UserDataPatch";
254
267
  export * from "./UserDataValueSource";
255
268
  export * from "./UserDataWithReference";
256
269
  export * from "./UserEvent";
@@ -259,6 +272,8 @@ export * from "./UserEventNameCondition";
259
272
  export * from "./UserMessage";
260
273
  export * from "./UserMessageBase";
261
274
  export * from "./UserMessageResponseState";
275
+ export * from "./UsersConversationAudience";
276
+ export * from "./UsersConversationAudienceResponse";
262
277
  export * from "./ValidatedSettingsSchemaEntryBase";
263
278
  export * from "./VisibilityType";
264
279
  export * from "./WeekdaysDaySelector";
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./AbsoluteTimeWindow"), exports);
18
18
  __exportStar(require("./ActionBase"), exports);
19
+ __exportStar(require("./ActionEffects"), exports);
19
20
  __exportStar(require("./ActionEnumOption"), exports);
20
21
  __exportStar(require("./ActionExecutionParamValue"), exports);
21
22
  __exportStar(require("./ActionExecutionStatus"), exports);
@@ -27,6 +28,7 @@ __exportStar(require("./ActionProperties"), exports);
27
28
  __exportStar(require("./ActionResponse"), exports);
28
29
  __exportStar(require("./ActionUser"), exports);
29
30
  __exportStar(require("./AdditionalDataKey"), exports);
31
+ __exportStar(require("./AllUsersConversationAudience"), exports);
30
32
  __exportStar(require("./AppPrecondition"), exports);
31
33
  __exportStar(require("./AppUser"), exports);
32
34
  __exportStar(require("./AppUserIdentifier"), exports);
@@ -77,6 +79,7 @@ __exportStar(require("./Capability"), exports);
77
79
  __exportStar(require("./CapabilityBase"), exports);
78
80
  __exportStar(require("./CapabilityStatus"), exports);
79
81
  __exportStar(require("./CapabilityType"), exports);
82
+ __exportStar(require("./ChangeAuthor"), exports);
80
83
  __exportStar(require("./CharterType"), exports);
81
84
  __exportStar(require("./ChartSpecSchema"), exports);
82
85
  __exportStar(require("./CheckboxSettingsSchemaEntry"), exports);
@@ -84,6 +87,8 @@ __exportStar(require("./ColorSettingsSchemaEntry"), exports);
84
87
  __exportStar(require("./ComplexArraySettingsSchemaEntry"), exports);
85
88
  __exportStar(require("./ContextInfo"), exports);
86
89
  __exportStar(require("./ConversationAnalysis"), exports);
90
+ __exportStar(require("./ConversationAudience"), exports);
91
+ __exportStar(require("./ConversationAudienceResponse"), exports);
87
92
  __exportStar(require("./ConversationExecutedActionPrecondition"), exports);
88
93
  __exportStar(require("./ConversationInformation"), exports);
89
94
  __exportStar(require("./ConversationKickoffExecutionResponse"), exports);
@@ -98,10 +103,12 @@ __exportStar(require("./ConversationPreconditionResponse"), exports);
98
103
  __exportStar(require("./ConversationPreview"), exports);
99
104
  __exportStar(require("./ConversationResponse"), exports);
100
105
  __exportStar(require("./ConversationRound"), exports);
106
+ __exportStar(require("./ConversationSetupFields"), exports);
101
107
  __exportStar(require("./ConversationState"), exports);
102
108
  __exportStar(require("./ConversationStatePrecondition"), exports);
103
109
  __exportStar(require("./ConversationSummary"), exports);
104
110
  __exportStar(require("./ConversationValueSource"), exports);
111
+ __exportStar(require("./CrossOrganizationLevelEntityId"), exports);
105
112
  __exportStar(require("./CsatInfo"), exports);
106
113
  __exportStar(require("./CursorPage"), exports);
107
114
  __exportStar(require("./DayOfMonthDaySelector"), exports);
@@ -170,6 +177,7 @@ __exportStar(require("./KnowledgeContextByEntities"), exports);
170
177
  __exportStar(require("./KnowledgeContextByEntityTypes"), exports);
171
178
  __exportStar(require("./KnowledgeContextFilter"), exports);
172
179
  __exportStar(require("./LanguageInfo"), exports);
180
+ __exportStar(require("./LeveledEntityId"), exports);
173
181
  __exportStar(require("./LlmInclusionStatus"), exports);
174
182
  __exportStar(require("./LlmPersona"), exports);
175
183
  __exportStar(require("./MessageStatus"), exports);
@@ -199,6 +207,7 @@ __exportStar(require("./OAuthSettingsSchemaEntry"), exports);
199
207
  __exportStar(require("./ObjectCondition"), exports);
200
208
  __exportStar(require("./Occurrence"), exports);
201
209
  __exportStar(require("./OneOfSettingsSchemaEntry"), exports);
210
+ __exportStar(require("./OrganizationLevelEntityId"), exports);
202
211
  __exportStar(require("./OsInfo"), exports);
203
212
  __exportStar(require("./OsType"), exports);
204
213
  __exportStar(require("./Page"), exports);
@@ -243,6 +252,8 @@ __exportStar(require("./SimulationActionCallApp"), exports);
243
252
  __exportStar(require("./SimulationActionMock"), exports);
244
253
  __exportStar(require("./SimulationContext"), exports);
245
254
  __exportStar(require("./SimulationFilter"), exports);
255
+ __exportStar(require("./SimulationFixedResponse"), exports);
256
+ __exportStar(require("./SimulationSetupFields"), exports);
246
257
  __exportStar(require("./Source"), exports);
247
258
  __exportStar(require("./SourceInfo"), exports);
248
259
  __exportStar(require("./SourceType"), exports);
@@ -267,6 +278,8 @@ __exportStar(require("./TimeWindow"), exports);
267
278
  __exportStar(require("./UniversalCondition"), exports);
268
279
  __exportStar(require("./UserConversationMessageType"), exports);
269
280
  __exportStar(require("./UserData"), exports);
281
+ __exportStar(require("./UserDataEffect"), exports);
282
+ __exportStar(require("./UserDataPatch"), exports);
270
283
  __exportStar(require("./UserDataValueSource"), exports);
271
284
  __exportStar(require("./UserDataWithReference"), exports);
272
285
  __exportStar(require("./UserEvent"), exports);
@@ -275,6 +288,8 @@ __exportStar(require("./UserEventNameCondition"), exports);
275
288
  __exportStar(require("./UserMessage"), exports);
276
289
  __exportStar(require("./UserMessageBase"), exports);
277
290
  __exportStar(require("./UserMessageResponseState"), exports);
291
+ __exportStar(require("./UsersConversationAudience"), exports);
292
+ __exportStar(require("./UsersConversationAudienceResponse"), exports);
278
293
  __exportStar(require("./ValidatedSettingsSchemaEntryBase"), exports);
279
294
  __exportStar(require("./VisibilityType"), exports);
280
295
  __exportStar(require("./WeekdaysDaySelector"), exports);
@@ -532,6 +532,7 @@ export declare class ConversationClient {
532
532
  *
533
533
  * This CSV format is very simple and only allows for one column: `question`. A header containing this column is required.
534
534
  * Each row will generate one simulation conversation, using the provided response config, if present.
535
+ * The file can have at most 1,000 non-blank rows; a larger file is rejected with a 400.
535
536
  *
536
537
  * This API is offered for backwards compatibility.
537
538
  * Most API callers should create simulations programmatically to allow for more flexibility.
@@ -565,9 +566,20 @@ export declare class ConversationClient {
565
566
  *
566
567
  * A closed conversation (`open` set to false) takes no new messages and returns a 400.
567
568
  *
569
+ * To reach a user rather than a known conversation, send `type: user`. The message goes to one of that
570
+ * user's open conversations, chosen as described on `appIds`. The response's `conversationId` names the
571
+ * conversation it went to.
572
+ *
568
573
  * <Warning>
569
574
  * Currently, messages can only be successfully delivered to conversations with the `ASYNC` capability.
570
- * User message delivery is not yet supported and returns a 400.
575
+ * Delivering to a user only reaches a conversation that already exists; it never starts a new one.
576
+ * </Warning>
577
+ *
578
+ * <Warning>
579
+ * Retrying a delivery is not supported. Sending the same `conversationMessageId` again saves the message, or an
580
+ * `ask`'s reply, only once in a conversation, but calls the app's `handleMessage` hook again each time. With
581
+ * `type: user`, a repeat can also go to a different conversation if the user's conversations changed in between,
582
+ * so the message is saved and delivered twice.
571
583
  * </Warning>
572
584
  *
573
585
  * <Note>**Required permission:** `ask:agent`</Note>
@@ -624,6 +636,28 @@ export declare class ConversationClient {
624
636
  * text: "Tell the user their refund was approved."
625
637
  * }
626
638
  * })
639
+ *
640
+ * @example
641
+ * await client.conversation.deliverMessage({
642
+ * type: "user",
643
+ * userId: {
644
+ * type: "USER",
645
+ * appId: "shop-app",
646
+ * referenceId: "customer-42"
647
+ * },
648
+ * appIds: ["chat-app", "email-app"],
649
+ * content: {
650
+ * contentType: "ask",
651
+ * conversationMessageId: {
652
+ * referenceId: "message-2"
653
+ * },
654
+ * userId: {
655
+ * referenceId: "system-orders"
656
+ * },
657
+ * type: "PROACTIVE",
658
+ * text: "Tell the user their order has shipped."
659
+ * }
660
+ * })
627
661
  */
628
662
  deliverMessage(request: MavenAGI.DeliverMessageRequest, requestOptions?: ConversationClient.RequestOptions): core.HttpResponsePromise<MavenAGI.DeliverMessageResponse>;
629
663
  private __deliverMessage;
@@ -1819,6 +1819,7 @@ class ConversationClient {
1819
1819
  *
1820
1820
  * This CSV format is very simple and only allows for one column: `question`. A header containing this column is required.
1821
1821
  * Each row will generate one simulation conversation, using the provided response config, if present.
1822
+ * The file can have at most 1,000 non-blank rows; a larger file is rejected with a 400.
1822
1823
  *
1823
1824
  * This API is offered for backwards compatibility.
1824
1825
  * Most API callers should create simulations programmatically to allow for more flexibility.
@@ -1929,9 +1930,20 @@ class ConversationClient {
1929
1930
  *
1930
1931
  * A closed conversation (`open` set to false) takes no new messages and returns a 400.
1931
1932
  *
1933
+ * To reach a user rather than a known conversation, send `type: user`. The message goes to one of that
1934
+ * user's open conversations, chosen as described on `appIds`. The response's `conversationId` names the
1935
+ * conversation it went to.
1936
+ *
1932
1937
  * <Warning>
1933
1938
  * Currently, messages can only be successfully delivered to conversations with the `ASYNC` capability.
1934
- * User message delivery is not yet supported and returns a 400.
1939
+ * Delivering to a user only reaches a conversation that already exists; it never starts a new one.
1940
+ * </Warning>
1941
+ *
1942
+ * <Warning>
1943
+ * Retrying a delivery is not supported. Sending the same `conversationMessageId` again saves the message, or an
1944
+ * `ask`'s reply, only once in a conversation, but calls the app's `handleMessage` hook again each time. With
1945
+ * `type: user`, a repeat can also go to a different conversation if the user's conversations changed in between,
1946
+ * so the message is saved and delivered twice.
1935
1947
  * </Warning>
1936
1948
  *
1937
1949
  * <Note>**Required permission:** `ask:agent`</Note>
@@ -1988,6 +2000,28 @@ class ConversationClient {
1988
2000
  * text: "Tell the user their refund was approved."
1989
2001
  * }
1990
2002
  * })
2003
+ *
2004
+ * @example
2005
+ * await client.conversation.deliverMessage({
2006
+ * type: "user",
2007
+ * userId: {
2008
+ * type: "USER",
2009
+ * appId: "shop-app",
2010
+ * referenceId: "customer-42"
2011
+ * },
2012
+ * appIds: ["chat-app", "email-app"],
2013
+ * content: {
2014
+ * contentType: "ask",
2015
+ * conversationMessageId: {
2016
+ * referenceId: "message-2"
2017
+ * },
2018
+ * userId: {
2019
+ * referenceId: "system-orders"
2020
+ * },
2021
+ * type: "PROACTIVE",
2022
+ * text: "Tell the user their order has shipped."
2023
+ * }
2024
+ * })
1991
2025
  */
1992
2026
  deliverMessage(request, requestOptions) {
1993
2027
  return core.HttpResponsePromise.fromPromise(this.__deliverMessage(request, requestOptions));
@@ -76,6 +76,9 @@ import type * as MavenAGI from "../../../index";
76
76
  * }
77
77
  */
78
78
  export interface AskRequest extends MavenAGI.AskRequestBase {
79
- /** Externally supplied ID to uniquely identify the user that created this message */
79
+ /**
80
+ * Externally supplied ID to uniquely identify the user that created this message. On a conversation
81
+ * with a `users` audience, a `USER_MESSAGE` ask from a user outside it is rejected with a 400.
82
+ */
80
83
  userId: MavenAGI.EntityIdBase;
81
84
  }
@@ -2,7 +2,7 @@
2
2
  * Fields used to filter conversations by billing status:
3
3
  * - ELIGIBLE_AND_BILLABLE: Billable conversations with a RESOLVED resolution status. Shown in Agent Designer as "Billable".
4
4
  * - ELIGIBLE_AND_NOT_BILLABLE: Eligible conversations that are not RESOLVED. Shown in Agent Designer as "Not billable". Includes ERROR, IN_PROGRESS, ESCALATED, INCOMPLETE, and NEGATIVE_FEEDBACK.
5
- * - INELIGIBLE: Conversations excluded from billing consideration. Includes CONTENT_SAFETY_FLAGGED, PROMPT_ATTACK_FLAGGED, HANGUP, INELIGIBLE, and UNKNOWN. Shown in Agent Designer as "Not eligible". This differs from the INELIGIBLE resolution status, which covers copilot chat conversations only.
5
+ * - INELIGIBLE: Conversations excluded from billing consideration. Includes CONTENT_SAFETY_FLAGGED, PROMPT_ATTACK_FLAGGED, HANGUP, INELIGIBLE, and UNKNOWN. Shown in Agent Designer as "Not eligible". This differs from the INELIGIBLE resolution status, which covers copilot chat and Advice conversations only.
6
6
  *
7
7
  * Resolution-based pricing bills ELIGIBLE_AND_BILLABLE conversations. Volume-based pricing, used
8
8
  * for Voice and Proactive, bills ELIGIBLE_AND_BILLABLE and ELIGIBLE_AND_NOT_BILLABLE conversations.
@@ -6,7 +6,7 @@ exports.BillableFilterField = void 0;
6
6
  * Fields used to filter conversations by billing status:
7
7
  * - ELIGIBLE_AND_BILLABLE: Billable conversations with a RESOLVED resolution status. Shown in Agent Designer as "Billable".
8
8
  * - ELIGIBLE_AND_NOT_BILLABLE: Eligible conversations that are not RESOLVED. Shown in Agent Designer as "Not billable". Includes ERROR, IN_PROGRESS, ESCALATED, INCOMPLETE, and NEGATIVE_FEEDBACK.
9
- * - INELIGIBLE: Conversations excluded from billing consideration. Includes CONTENT_SAFETY_FLAGGED, PROMPT_ATTACK_FLAGGED, HANGUP, INELIGIBLE, and UNKNOWN. Shown in Agent Designer as "Not eligible". This differs from the INELIGIBLE resolution status, which covers copilot chat conversations only.
9
+ * - INELIGIBLE: Conversations excluded from billing consideration. Includes CONTENT_SAFETY_FLAGGED, PROMPT_ATTACK_FLAGGED, HANGUP, INELIGIBLE, and UNKNOWN. Shown in Agent Designer as "Not eligible". This differs from the INELIGIBLE resolution status, which covers copilot chat and Advice conversations only.
10
10
  *
11
11
  * Resolution-based pricing bills ELIGIBLE_AND_BILLABLE conversations. Volume-based pricing, used
12
12
  * for Voice and Proactive, bills ELIGIBLE_AND_BILLABLE and ELIGIBLE_AND_NOT_BILLABLE conversations.
@@ -11,6 +11,20 @@ import type * as MavenAGI from "../../../index";
11
11
  * @example
12
12
  * {
13
13
  * conversationId: {
14
+ * referenceId: "conversation-1"
15
+ * },
16
+ * audience: {
17
+ * type: "users",
18
+ * userIds: [{
19
+ * referenceId: "user-0"
20
+ * }]
21
+ * },
22
+ * messages: []
23
+ * }
24
+ *
25
+ * @example
26
+ * {
27
+ * conversationId: {
14
28
  * referenceId: "simulation-0"
15
29
  * },
16
30
  * simulationContext: {
@@ -44,7 +58,7 @@ import type * as MavenAGI from "../../../index";
44
58
  * messages: []
45
59
  * }
46
60
  */
47
- export interface ConversationRequest {
61
+ export interface ConversationRequest extends MavenAGI.ConversationSetupFields {
48
62
  /** An externally supplied ID to uniquely identify this conversation */
49
63
  conversationId: MavenAGI.EntityIdBase;
50
64
  /**
@@ -53,8 +67,6 @@ export interface ConversationRequest {
53
67
  * search results unless explicitly included via the `simulationFilter` field.
54
68
  */
55
69
  simulationContext?: MavenAGI.SimulationContext;
56
- /** Optional configurations for responses to this conversation */
57
- responseConfig?: MavenAGI.ResponseConfig;
58
70
  /** The subject of the conversation */
59
71
  subject?: string;
60
72
  /** The url of the conversation */
@@ -63,19 +75,6 @@ export interface ConversationRequest {
63
75
  createdAt?: Date;
64
76
  /** The date and time the conversation was last updated */
65
77
  updatedAt?: Date;
66
- /** The tags of the conversation. Used for filtering in Agent Designer. */
67
- tags?: Set<string>;
68
- /**
69
- * Set of 16 key-value pairs that can be attached to an object. This can be useful for storing
70
- * additional information about the object in a structured format, and querying for objects
71
- * via API or the dashboard.
72
- *
73
- * Keys are strings with a maximum length of 500 characters. Values are strings with a maximum
74
- * length of 512 characters.
75
- *
76
- * The metadata of the conversation supplied by the app which created the conversation.
77
- */
78
- metadata?: Record<string, string>;
79
78
  /** The messages in the conversation */
80
79
  messages: MavenAGI.ConversationMessageRequest[];
81
80
  /**
@@ -91,4 +90,15 @@ export interface ConversationRequest {
91
90
  * back to the end user, only set this to a conversation the current user is entitled to see.
92
91
  */
93
92
  spawnedFromConversationId?: MavenAGI.EntityId;
93
+ /**
94
+ * Who the conversation is for. Omit this field or send `allUsers` for a conversation that any of
95
+ * the agent's users may take part in. Send `users` to restrict the conversation to the listed users.
96
+ * A `USER` message from any other user, sent through `ask`, `askStream`, `appendNewMessages` or
97
+ * this request's `messages` when this request creates the conversation, is rejected with a 400.
98
+ * Initializing an existing conversation saves none of its `messages`.
99
+ *
100
+ * The audience is set when the conversation is created and cannot be changed. Initializing an
101
+ * existing conversation leaves its audience unchanged.
102
+ */
103
+ audience?: MavenAGI.ConversationAudience;
94
104
  }
@@ -1,4 +1,9 @@
1
1
  import type * as MavenAGI from "../../../index";
2
2
  export interface DeliverMessageResponse {
3
3
  status: MavenAGI.DeliveryStatus;
4
+ /**
5
+ * The conversation the message was delivered to, or attempted on when `status` is `FAILED`. Absent when
6
+ * no conversation qualified for a delivery to a user.
7
+ */
8
+ conversationId?: MavenAGI.EntityId;
4
9
  }
@@ -2,4 +2,24 @@ import type * as MavenAGI from "../../../index";
2
2
  export interface DeliverUserMessageRequest extends MavenAGI.DeliverMessageBase {
3
3
  /** The ID of the user to deliver the message to. */
4
4
  userId: MavenAGI.EntityIdWithoutAgent;
5
+ /**
6
+ * The apps whose conversations may receive the message, in order of preference. Omit it to allow any app; an empty list is rejected with a 400.
7
+ *
8
+ * The message goes to a conversation that already exists, is open, has the `ASYNC` capability, is owned
9
+ * by an allowed app, and lists this user in a `users` audience (set by `initialize`'s `audience`). A
10
+ * conversation with an `allUsers` audience, or with none, is never chosen. Apps are tried in the order
11
+ * given, and within an app the most recently updated conversation wins; with `appIds` omitted, the most
12
+ * recently updated conversation of any app wins. An `ask` also skips conversations with `llmEnabled`
13
+ * set to false.
14
+ *
15
+ * The message goes to one conversation only. To reach the user in several apps, send one request per app.
16
+ * Whether an app is installed is not checked when choosing: the message is handed to the chosen
17
+ * conversation's app, and if that app fails to take it, `status` is `FAILED` and no other app is tried.
18
+ *
19
+ * When no conversation qualifies, nothing is delivered and `status` is `FAILED`.
20
+ *
21
+ * Only 20 of a user's open `ASYNC` conversations are considered. If a user has more, an arbitrary 20
22
+ * are, so the most recent one may be missed. Close conversations that no longer take messages.
23
+ */
24
+ appIds?: string[];
5
25
  }
@@ -32,4 +32,8 @@ import type * as MavenAGI from "../../../index";
32
32
  export interface IntelligentFieldResponse extends MavenAGI.IntelligentFieldBase, MavenAGI.CapabilityBase {
33
33
  /** ID that uniquely identifies this intelligent field */
34
34
  fieldId: MavenAGI.EntityId;
35
+ /** Who wrote this version of the field. Absent when no one was recorded. Shown in Agent Designer as "Created by" on a field a variant adds. */
36
+ createdBy?: MavenAGI.ChangeAuthor;
37
+ /** Who last changed this version of the field. Absent when no one was recorded. Shown in Agent Designer as "Modified by" on a field a variant changes. */
38
+ updatedBy?: MavenAGI.ChangeAuthor;
35
39
  }
@@ -226,6 +226,12 @@ export declare class KnowledgeClient {
226
226
  /**
227
227
  * Finalize the latest knowledge base version. Required to indicate the version is complete. Will throw an exception if the latest version is not in progress.
228
228
  *
229
+ * A `FULL` version starts empty and replaces the live documents. Finalizing a `FULL` version
230
+ * with status `SUCCEEDED` (the default when `status` is omitted) succeeds even if no
231
+ * documents were added to it, and once it is processed the knowledge base has no documents.
232
+ * A `PARTIAL` version starts from the live version's documents, so finalizing it keeps the
233
+ * documents it didn't change.
234
+ *
229
235
  * <Note>**Required permission:** `edit:agents`</Note>
230
236
  *
231
237
  * @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to finalize a version for. All other entity ID fields are inferred from the request.
@@ -414,6 +420,10 @@ export declare class KnowledgeClient {
414
420
  /**
415
421
  * Get a knowledge document by its supplied version and document IDs. Response includes document content in markdown format.
416
422
  *
423
+ * The path takes the reference ID of a knowledge base version, not of the knowledge base.
424
+ * `searchKnowledgeDocuments` returns it as `knowledgeBaseVersionId.referenceId` when the
425
+ * document has one.
426
+ *
417
427
  * <Note>**Required permission:** `read:documents`</Note>
418
428
  *
419
429
  * @param {string} knowledgeBaseVersionReferenceId - The reference ID of the knowledge base version that contains the document. All other entity ID fields are inferred from the request.
@@ -439,6 +449,10 @@ export declare class KnowledgeClient {
439
449
  /**
440
450
  * Update mutable knowledge document fields that can be set independently of a knowledge base version.
441
451
  *
452
+ * Unlike `getKnowledgeDocument`, the path takes the knowledge base's reference ID, not a
453
+ * version's. The document is looked up in the knowledge base's live version, so a document
454
+ * that is only in a version still in progress is not found.
455
+ *
442
456
  * For any changes in document content see the `createKnowledgeBaseVersion` and `createKnowledgeDocument` endpoints.
443
457
  *
444
458
  * The `knowledgeBaseAppId` field can be provided to update a knowledge document in a knowledge base owned by a different app.
@@ -907,6 +907,12 @@ class KnowledgeClient {
907
907
  /**
908
908
  * Finalize the latest knowledge base version. Required to indicate the version is complete. Will throw an exception if the latest version is not in progress.
909
909
  *
910
+ * A `FULL` version starts empty and replaces the live documents. Finalizing a `FULL` version
911
+ * with status `SUCCEEDED` (the default when `status` is omitted) succeeds even if no
912
+ * documents were added to it, and once it is processed the knowledge base has no documents.
913
+ * A `PARTIAL` version starts from the live version's documents, so finalizing it keeps the
914
+ * documents it didn't change.
915
+ *
910
916
  * <Note>**Required permission:** `edit:agents`</Note>
911
917
  *
912
918
  * @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to finalize a version for. All other entity ID fields are inferred from the request.
@@ -1588,6 +1594,10 @@ class KnowledgeClient {
1588
1594
  /**
1589
1595
  * Get a knowledge document by its supplied version and document IDs. Response includes document content in markdown format.
1590
1596
  *
1597
+ * The path takes the reference ID of a knowledge base version, not of the knowledge base.
1598
+ * `searchKnowledgeDocuments` returns it as `knowledgeBaseVersionId.referenceId` when the
1599
+ * document has one.
1600
+ *
1591
1601
  * <Note>**Required permission:** `read:documents`</Note>
1592
1602
  *
1593
1603
  * @param {string} knowledgeBaseVersionReferenceId - The reference ID of the knowledge base version that contains the document. All other entity ID fields are inferred from the request.
@@ -1700,6 +1710,10 @@ class KnowledgeClient {
1700
1710
  /**
1701
1711
  * Update mutable knowledge document fields that can be set independently of a knowledge base version.
1702
1712
  *
1713
+ * Unlike `getKnowledgeDocument`, the path takes the knowledge base's reference ID, not a
1714
+ * version's. The document is looked up in the knowledge base's live version, so a document
1715
+ * that is only in a version still in progress is not found.
1716
+ *
1703
1717
  * For any changes in document content see the `createKnowledgeBaseVersion` and `createKnowledgeDocument` endpoints.
1704
1718
  *
1705
1719
  * The `knowledgeBaseAppId` field can be provided to update a knowledge document in a knowledge base owned by a different app.
@@ -8,6 +8,8 @@ export declare const KnowledgeBaseType: {
8
8
  readonly Api: "API";
9
9
  readonly Url: "URL";
10
10
  readonly Manual: "MANUAL";
11
+ /**
12
+ * No longer returned. RSS knowledge bases are `LEGACY`; filtering on `RSS` still matches them. */
11
13
  readonly Rss: "RSS";
12
14
  readonly Legacy: "LEGACY";
13
15
  };
@@ -12,6 +12,8 @@ exports.KnowledgeBaseType = {
12
12
  Api: "API",
13
13
  Url: "URL",
14
14
  Manual: "MANUAL",
15
+ /**
16
+ * No longer returned. RSS knowledge bases are `LEGACY`; filtering on `RSS` still matches them. */
15
17
  Rss: "RSS",
16
18
  Legacy: "LEGACY",
17
19
  };
@@ -8,4 +8,6 @@ import type * as MavenAGI from "../../../index";
8
8
  export interface KnowledgeBaseVersionRequest {
9
9
  /** Indicates whether the completed version constitutes a full or partial refresh of the knowledge base. Deleting and updating documents is only supported for partial refreshes. */
10
10
  type: MavenAGI.KnowledgeBaseVersionType;
11
+ /** The Function versions that build this version. On a version, absent for historical versions and for versions created without them. */
12
+ functionVersions?: MavenAGI.KnowledgeBaseFunctionBindings;
11
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mavenagi",
3
- "version": "1.2.70",
3
+ "version": "1.2.72",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -2353,9 +2353,9 @@ await client.capabilities.deleteCapability("ACTION", "referenceId");
2353
2353
  Run one of an agent's capabilities once, as a simulation, and return what it produced.
2354
2354
 
2355
2355
  The caller supplies everything the capability reads, so it runs in isolation: no
2356
- conversation or agent user has to exist first. The capability is told its mode is
2357
- `SIMULATION`, the same as in a test suite run, so an app that honours it can avoid side
2358
- effects in real systems. Nothing here runs a capability live.
2356
+ conversation or agent user has to exist first. The capability's app is called with mode
2357
+ `SIMULATION`. What the app does in that mode is up to the app, and the platform does not
2358
+ stop it from acting on real systems.
2359
2359
 
2360
2360
  A simulated run is not recorded. It returns its result here and never appears in
2361
2361
  capability execution search.
@@ -4523,9 +4523,20 @@ that owns the conversation receives the message through its `handleMessage` hook
4523
4523
 
4524
4524
  A closed conversation (`open` set to false) takes no new messages and returns a 400.
4525
4525
 
4526
+ To reach a user rather than a known conversation, send `type: user`. The message goes to one of that
4527
+ user's open conversations, chosen as described on `appIds`. The response's `conversationId` names the
4528
+ conversation it went to.
4529
+
4526
4530
  <Warning>
4527
4531
  Currently, messages can only be successfully delivered to conversations with the `ASYNC` capability.
4528
- User message delivery is not yet supported and returns a 400.
4532
+ Delivering to a user only reaches a conversation that already exists; it never starts a new one.
4533
+ </Warning>
4534
+
4535
+ <Warning>
4536
+ Retrying a delivery is not supported. Sending the same `conversationMessageId` again saves the message, or an
4537
+ `ask`'s reply, only once in a conversation, but calls the app's `handleMessage` hook again each time. With
4538
+ `type: user`, a repeat can also go to a different conversation if the user's conversations changed in between,
4539
+ so the message is saved and delivered twice.
4529
4540
  </Warning>
4530
4541
 
4531
4542
  <Note>**Required permission:** `ask:agent`</Note>
@@ -6922,6 +6933,12 @@ await client.knowledge.createKnowledgeBaseVersion("help-center", {
6922
6933
 
6923
6934
  Finalize the latest knowledge base version. Required to indicate the version is complete. Will throw an exception if the latest version is not in progress.
6924
6935
 
6936
+ A `FULL` version starts empty and replaces the live documents. Finalizing a `FULL` version
6937
+ with status `SUCCEEDED` (the default when `status` is omitted) succeeds even if no
6938
+ documents were added to it, and once it is processed the knowledge base has no documents.
6939
+ A `PARTIAL` version starts from the live version's documents, so finalizing it keeps the
6940
+ documents it didn't change.
6941
+
6925
6942
  <Note>**Required permission:** `edit:agents`</Note>
6926
6943
  </dd>
6927
6944
  </dl>
@@ -7414,6 +7431,10 @@ await client.knowledge.deleteKnowledgeDocument("help-center", "getting-started",
7414
7431
 
7415
7432
  Get a knowledge document by its supplied version and document IDs. Response includes document content in markdown format.
7416
7433
 
7434
+ The path takes the reference ID of a knowledge base version, not of the knowledge base.
7435
+ `searchKnowledgeDocuments` returns it as `knowledgeBaseVersionId.referenceId` when the
7436
+ document has one.
7437
+
7417
7438
  <Note>**Required permission:** `read:documents`</Note>
7418
7439
  </dd>
7419
7440
  </dl>
@@ -7497,6 +7518,10 @@ await client.knowledge.getKnowledgeDocument("knowledgeBaseVersionReferenceId", "
7497
7518
 
7498
7519
  Update mutable knowledge document fields that can be set independently of a knowledge base version.
7499
7520
 
7521
+ Unlike `getKnowledgeDocument`, the path takes the knowledge base's reference ID, not a
7522
+ version's. The document is looked up in the knowledge base's live version, so a document
7523
+ that is only in a version still in progress is not found.
7524
+
7500
7525
  For any changes in document content see the `createKnowledgeBaseVersion` and `createKnowledgeDocument` endpoints.
7501
7526
 
7502
7527
  The `knowledgeBaseAppId` field can be provided to update a knowledge document in a knowledge base owned by a different app.
@@ -4,6 +4,7 @@ import type * as serializers from "../../../index";
4
4
  export declare const AbsoluteTimeWindow: core.serialization.ObjectSchema<serializers.AbsoluteTimeWindow.Raw, MavenAGI.AbsoluteTimeWindow>;
5
5
  export declare namespace AbsoluteTimeWindow {
6
6
  interface Raw {
7
+ timezone?: string | null;
7
8
  start?: string | null;
8
9
  end?: string | null;
9
10
  }
@@ -37,6 +37,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.AbsoluteTimeWindow = void 0;
38
38
  const core = __importStar(require("../../../../core"));
39
39
  exports.AbsoluteTimeWindow = core.serialization.object({
40
+ timezone: core.serialization.string().optional(),
40
41
  start: core.serialization.date().optional(),
41
42
  end: core.serialization.date().optional(),
42
43
  });