mavenagi 0.0.0-alpha.12 → 0.0.0-alpha.15

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 (215) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +5 -0
  3. package/README.md +8 -1
  4. package/api/resources/actions/client/Client.js +3 -3
  5. package/api/resources/appSettings/client/Client.d.ts +47 -0
  6. package/api/resources/appSettings/client/Client.js +124 -0
  7. package/api/resources/appSettings/client/index.d.ts +1 -0
  8. package/api/resources/appSettings/client/index.js +1 -0
  9. package/api/resources/appSettings/index.d.ts +1 -0
  10. package/api/resources/appSettings/index.js +1 -0
  11. package/api/resources/commons/types/AppUser.d.ts +3 -2
  12. package/api/resources/commons/types/AppUserIdentifier.d.ts +1 -1
  13. package/api/resources/commons/types/AppUserRequest.d.ts +19 -1
  14. package/api/resources/commons/types/AppUserResponse.d.ts +34 -2
  15. package/api/resources/commons/types/Feedback.d.ts +12 -0
  16. package/api/resources/commons/types/UserData.d.ts +1 -1
  17. package/api/resources/commons/types/index.d.ts +4 -2
  18. package/api/resources/commons/types/index.js +4 -2
  19. package/api/resources/conversation/client/Client.d.ts +21 -19
  20. package/api/resources/conversation/client/Client.js +35 -28
  21. package/api/resources/conversation/types/AskRequest.d.ts +2 -4
  22. package/api/resources/conversation/types/ConversationBase.d.ts +12 -0
  23. package/api/resources/conversation/types/ConversationMessageBase.d.ts +4 -3
  24. package/api/resources/conversation/types/ConversationRequest.d.ts +0 -2
  25. package/api/resources/conversation/types/ConversationResponse.d.ts +0 -2
  26. package/api/resources/conversation/types/SubmitActionFormRequest.d.ts +1 -3
  27. package/api/resources/conversation/types/UserMessageBase.d.ts +2 -0
  28. package/api/resources/conversation/types/index.d.ts +0 -2
  29. package/api/resources/conversation/types/index.js +0 -2
  30. package/api/resources/index.d.ts +1 -0
  31. package/api/resources/index.js +1 -0
  32. package/api/resources/knowledge/client/Client.js +7 -7
  33. package/api/resources/triggers/client/Client.js +3 -3
  34. package/api/resources/triggers/types/index.d.ts +0 -3
  35. package/api/resources/triggers/types/index.js +0 -3
  36. package/api/resources/users/client/Client.d.ts +18 -14
  37. package/api/resources/users/client/Client.js +21 -17
  38. package/dist/Client.d.ts +3 -0
  39. package/dist/Client.js +5 -0
  40. package/dist/api/resources/actions/client/Client.js +3 -3
  41. package/dist/api/resources/appSettings/client/Client.d.ts +47 -0
  42. package/dist/api/resources/appSettings/client/Client.js +124 -0
  43. package/dist/api/resources/appSettings/client/index.d.ts +1 -0
  44. package/dist/api/resources/appSettings/client/index.js +1 -0
  45. package/dist/api/resources/appSettings/index.d.ts +1 -0
  46. package/dist/api/resources/appSettings/index.js +1 -0
  47. package/dist/api/resources/commons/types/AppUser.d.ts +3 -2
  48. package/dist/api/resources/commons/types/AppUserIdentifier.d.ts +1 -1
  49. package/dist/api/resources/commons/types/AppUserRequest.d.ts +19 -1
  50. package/dist/api/resources/commons/types/AppUserResponse.d.ts +34 -2
  51. package/dist/api/resources/commons/types/Feedback.d.ts +12 -0
  52. package/dist/api/resources/commons/types/UserData.d.ts +1 -1
  53. package/dist/api/resources/commons/types/index.d.ts +4 -2
  54. package/dist/api/resources/commons/types/index.js +4 -2
  55. package/dist/api/resources/conversation/client/Client.d.ts +21 -19
  56. package/dist/api/resources/conversation/client/Client.js +35 -28
  57. package/dist/api/resources/conversation/types/AskRequest.d.ts +2 -4
  58. package/dist/api/resources/conversation/types/ConversationBase.d.ts +12 -0
  59. package/dist/api/resources/conversation/types/ConversationMessageBase.d.ts +4 -3
  60. package/dist/api/resources/conversation/types/ConversationRequest.d.ts +0 -2
  61. package/dist/api/resources/conversation/types/ConversationResponse.d.ts +0 -2
  62. package/dist/api/resources/conversation/types/SubmitActionFormRequest.d.ts +1 -3
  63. package/dist/api/resources/conversation/types/UserMessageBase.d.ts +2 -0
  64. package/dist/api/resources/conversation/types/index.d.ts +0 -2
  65. package/dist/api/resources/conversation/types/index.js +0 -2
  66. package/dist/api/resources/index.d.ts +1 -0
  67. package/dist/api/resources/index.js +1 -0
  68. package/dist/api/resources/knowledge/client/Client.js +7 -7
  69. package/dist/api/resources/triggers/client/Client.js +3 -3
  70. package/dist/api/resources/triggers/types/index.d.ts +0 -3
  71. package/dist/api/resources/triggers/types/index.js +0 -3
  72. package/dist/api/resources/users/client/Client.d.ts +18 -14
  73. package/dist/api/resources/users/client/Client.js +21 -17
  74. package/dist/serialization/resources/appSettings/client/get.d.ts +9 -0
  75. package/dist/serialization/resources/appSettings/client/get.js +5 -0
  76. package/dist/serialization/resources/appSettings/client/index.d.ts +1 -0
  77. package/dist/serialization/resources/appSettings/client/index.js +1 -0
  78. package/dist/serialization/resources/appSettings/index.d.ts +1 -0
  79. package/dist/serialization/resources/appSettings/index.js +1 -0
  80. package/dist/serialization/resources/commons/types/AppUser.d.ts +3 -3
  81. package/dist/serialization/resources/commons/types/AppUser.js +3 -3
  82. package/dist/serialization/resources/commons/types/AppUserIdentifier.d.ts +1 -1
  83. package/dist/serialization/resources/commons/types/AppUserIdentifier.js +1 -1
  84. package/dist/serialization/resources/commons/types/AppUserRequest.d.ts +1 -1
  85. package/dist/serialization/resources/commons/types/AppUserRequest.js +1 -1
  86. package/dist/serialization/resources/commons/types/AppUserResponse.d.ts +2 -1
  87. package/dist/serialization/resources/commons/types/AppUserResponse.js +2 -1
  88. package/{serialization/resources/triggers → dist/serialization/resources/commons}/types/EventTriggerResponse.d.ts +1 -1
  89. package/{serialization/resources/triggers → dist/serialization/resources/commons}/types/EventTriggerResponse.js +1 -1
  90. package/dist/serialization/resources/commons/types/Feedback.d.ts +16 -0
  91. package/dist/serialization/resources/commons/types/Feedback.js +13 -0
  92. package/dist/serialization/resources/commons/types/UserData.d.ts +1 -1
  93. package/dist/serialization/resources/commons/types/UserData.js +1 -1
  94. package/dist/serialization/resources/commons/types/index.d.ts +4 -2
  95. package/dist/serialization/resources/commons/types/index.js +4 -2
  96. package/dist/serialization/resources/conversation/types/AskRequest.d.ts +1 -4
  97. package/dist/serialization/resources/conversation/types/AskRequest.js +1 -4
  98. package/dist/serialization/resources/conversation/types/ConversationBase.d.ts +6 -0
  99. package/dist/serialization/resources/conversation/types/ConversationBase.js +6 -0
  100. package/dist/serialization/resources/conversation/types/ConversationMessageBase.d.ts +2 -2
  101. package/dist/serialization/resources/conversation/types/ConversationMessageBase.js +2 -2
  102. package/dist/serialization/resources/conversation/types/ConversationRequest.d.ts +0 -2
  103. package/dist/serialization/resources/conversation/types/ConversationRequest.js +0 -2
  104. package/dist/serialization/resources/conversation/types/ConversationResponse.d.ts +0 -2
  105. package/dist/serialization/resources/conversation/types/ConversationResponse.js +0 -2
  106. package/dist/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts +0 -2
  107. package/dist/serialization/resources/conversation/types/SubmitActionFormRequest.js +0 -2
  108. package/dist/serialization/resources/conversation/types/UserMessageBase.d.ts +2 -0
  109. package/dist/serialization/resources/conversation/types/UserMessageBase.js +2 -0
  110. package/dist/serialization/resources/conversation/types/index.d.ts +0 -2
  111. package/dist/serialization/resources/conversation/types/index.js +0 -2
  112. package/dist/serialization/resources/index.d.ts +1 -0
  113. package/dist/serialization/resources/index.js +1 -0
  114. package/dist/serialization/resources/triggers/types/EventTriggerRequest.d.ts +1 -1
  115. package/dist/serialization/resources/triggers/types/EventTriggerRequest.js +1 -1
  116. package/dist/serialization/resources/triggers/types/index.d.ts +0 -3
  117. package/dist/serialization/resources/triggers/types/index.js +0 -3
  118. package/package.json +1 -1
  119. package/reference.md +100 -34
  120. package/serialization/resources/appSettings/client/get.d.ts +9 -0
  121. package/serialization/resources/appSettings/client/get.js +5 -0
  122. package/serialization/resources/appSettings/client/index.d.ts +1 -0
  123. package/serialization/resources/appSettings/client/index.js +1 -0
  124. package/serialization/resources/appSettings/index.d.ts +1 -0
  125. package/serialization/resources/appSettings/index.js +1 -0
  126. package/serialization/resources/commons/types/AppUser.d.ts +3 -3
  127. package/serialization/resources/commons/types/AppUser.js +3 -3
  128. package/serialization/resources/commons/types/AppUserIdentifier.d.ts +1 -1
  129. package/serialization/resources/commons/types/AppUserIdentifier.js +1 -1
  130. package/serialization/resources/commons/types/AppUserRequest.d.ts +1 -1
  131. package/serialization/resources/commons/types/AppUserRequest.js +1 -1
  132. package/serialization/resources/commons/types/AppUserResponse.d.ts +2 -1
  133. package/serialization/resources/commons/types/AppUserResponse.js +2 -1
  134. package/{dist/serialization/resources/triggers → serialization/resources/commons}/types/EventTriggerResponse.d.ts +1 -1
  135. package/{dist/serialization/resources/triggers → serialization/resources/commons}/types/EventTriggerResponse.js +1 -1
  136. package/serialization/resources/commons/types/Feedback.d.ts +16 -0
  137. package/serialization/resources/commons/types/Feedback.js +13 -0
  138. package/serialization/resources/commons/types/UserData.d.ts +1 -1
  139. package/serialization/resources/commons/types/UserData.js +1 -1
  140. package/serialization/resources/commons/types/index.d.ts +4 -2
  141. package/serialization/resources/commons/types/index.js +4 -2
  142. package/serialization/resources/conversation/types/AskRequest.d.ts +1 -4
  143. package/serialization/resources/conversation/types/AskRequest.js +1 -4
  144. package/serialization/resources/conversation/types/ConversationBase.d.ts +6 -0
  145. package/serialization/resources/conversation/types/ConversationBase.js +6 -0
  146. package/serialization/resources/conversation/types/ConversationMessageBase.d.ts +2 -2
  147. package/serialization/resources/conversation/types/ConversationMessageBase.js +2 -2
  148. package/serialization/resources/conversation/types/ConversationRequest.d.ts +0 -2
  149. package/serialization/resources/conversation/types/ConversationRequest.js +0 -2
  150. package/serialization/resources/conversation/types/ConversationResponse.d.ts +0 -2
  151. package/serialization/resources/conversation/types/ConversationResponse.js +0 -2
  152. package/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts +0 -2
  153. package/serialization/resources/conversation/types/SubmitActionFormRequest.js +0 -2
  154. package/serialization/resources/conversation/types/UserMessageBase.d.ts +2 -0
  155. package/serialization/resources/conversation/types/UserMessageBase.js +2 -0
  156. package/serialization/resources/conversation/types/index.d.ts +0 -2
  157. package/serialization/resources/conversation/types/index.js +0 -2
  158. package/serialization/resources/index.d.ts +1 -0
  159. package/serialization/resources/index.js +1 -0
  160. package/serialization/resources/triggers/types/EventTriggerRequest.d.ts +1 -1
  161. package/serialization/resources/triggers/types/EventTriggerRequest.js +1 -1
  162. package/serialization/resources/triggers/types/index.d.ts +0 -3
  163. package/serialization/resources/triggers/types/index.js +0 -3
  164. package/api/resources/commons/types/AppUserIdentification.d.ts +0 -8
  165. package/api/resources/commons/types/User.d.ts +0 -10
  166. package/api/resources/conversation/types/ConversationContext.d.ts +0 -20
  167. package/api/resources/conversation/types/ConversationContext.js +0 -4
  168. package/api/resources/conversation/types/ConversationMessageContext.d.ts +0 -12
  169. package/api/resources/conversation/types/ConversationMessageContext.js +0 -4
  170. package/dist/api/resources/commons/types/AppUserIdentification.d.ts +0 -8
  171. package/dist/api/resources/commons/types/AppUserIdentification.js +0 -4
  172. package/dist/api/resources/commons/types/User.d.ts +0 -10
  173. package/dist/api/resources/commons/types/User.js +0 -4
  174. package/dist/api/resources/conversation/types/ConversationContext.d.ts +0 -20
  175. package/dist/api/resources/conversation/types/ConversationContext.js +0 -4
  176. package/dist/api/resources/conversation/types/ConversationMessageContext.d.ts +0 -12
  177. package/dist/api/resources/conversation/types/ConversationMessageContext.js +0 -4
  178. package/dist/serialization/resources/commons/types/AppUserIdentification.d.ts +0 -13
  179. package/dist/serialization/resources/commons/types/AppUserIdentification.js +0 -8
  180. package/dist/serialization/resources/commons/types/User.d.ts +0 -15
  181. package/dist/serialization/resources/commons/types/User.js +0 -10
  182. package/dist/serialization/resources/conversation/types/ConversationContext.d.ts +0 -20
  183. package/dist/serialization/resources/conversation/types/ConversationContext.js +0 -15
  184. package/dist/serialization/resources/conversation/types/ConversationMessageContext.d.ts +0 -16
  185. package/dist/serialization/resources/conversation/types/ConversationMessageContext.js +0 -11
  186. package/serialization/resources/commons/types/AppUserIdentification.d.ts +0 -13
  187. package/serialization/resources/commons/types/AppUserIdentification.js +0 -8
  188. package/serialization/resources/commons/types/User.d.ts +0 -15
  189. package/serialization/resources/commons/types/User.js +0 -10
  190. package/serialization/resources/conversation/types/ConversationContext.d.ts +0 -20
  191. package/serialization/resources/conversation/types/ConversationContext.js +0 -15
  192. package/serialization/resources/conversation/types/ConversationMessageContext.d.ts +0 -16
  193. package/serialization/resources/conversation/types/ConversationMessageContext.js +0 -11
  194. /package/api/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
  195. /package/api/resources/{triggers → commons}/types/EventTriggerBase.js +0 -0
  196. /package/api/resources/{triggers → commons}/types/EventTriggerResponse.d.ts +0 -0
  197. /package/api/resources/{triggers → commons}/types/EventTriggerResponse.js +0 -0
  198. /package/api/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  199. /package/api/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  200. /package/api/resources/commons/types/{AppUserIdentification.js → Feedback.js} +0 -0
  201. /package/dist/api/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
  202. /package/dist/api/resources/{triggers → commons}/types/EventTriggerBase.js +0 -0
  203. /package/dist/api/resources/{triggers → commons}/types/EventTriggerResponse.d.ts +0 -0
  204. /package/dist/api/resources/{triggers → commons}/types/EventTriggerResponse.js +0 -0
  205. /package/dist/api/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  206. /package/dist/api/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  207. /package/{api/resources/commons/types/User.js → dist/api/resources/commons/types/Feedback.js} +0 -0
  208. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
  209. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerBase.js +0 -0
  210. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  211. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  212. /package/serialization/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
  213. /package/serialization/resources/{triggers → commons}/types/EventTriggerBase.js +0 -0
  214. /package/serialization/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  215. /package/serialization/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
@@ -21,7 +21,7 @@ export class Conversation {
21
21
  this._options = _options;
22
22
  }
23
23
  /**
24
- * Pre-populate a new conversation with messages
24
+ * Initialize a new conversation. Only required if the ask request wishes to supply conversation level data or when syncing to external systems.
25
25
  *
26
26
  * @param {MavenAGI.ConversationRequest} request
27
27
  * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
@@ -36,11 +36,18 @@ export class Conversation {
36
36
  * referenceId: "string"
37
37
  * },
38
38
  * messages: [{}],
39
- * context: {},
40
39
  * responseConfig: {
41
40
  * capabilities: [MavenAGI.Capability.Markdown],
42
41
  * isCopilot: true,
43
42
  * responseLength: MavenAGI.ResponseLength.Short
43
+ * },
44
+ * subject: "string",
45
+ * url: "string",
46
+ * createdAt: new Date("2024-01-15T09:30:00.000Z"),
47
+ * updatedAt: new Date("2024-01-15T09:30:00.000Z"),
48
+ * tags: new Set(["string"]),
49
+ * metadata: {
50
+ * "string": "string"
44
51
  * }
45
52
  * })
46
53
  */
@@ -56,7 +63,7 @@ export class Conversation {
56
63
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
57
64
  "X-Fern-Language": "JavaScript",
58
65
  "X-Fern-SDK-Name": "mavenagi",
59
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
66
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
60
67
  "X-Fern-Runtime": core.RUNTIME.type,
61
68
  "X-Fern-Runtime-Version": core.RUNTIME.version,
62
69
  },
@@ -145,7 +152,7 @@ export class Conversation {
145
152
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
146
153
  "X-Fern-Language": "JavaScript",
147
154
  "X-Fern-SDK-Name": "mavenagi",
148
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
155
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
149
156
  "X-Fern-Runtime": core.RUNTIME.type,
150
157
  "X-Fern-Runtime-Version": core.RUNTIME.version,
151
158
  },
@@ -224,9 +231,13 @@ export class Conversation {
224
231
  * conversationMessageId: {
225
232
  * referenceId: "string"
226
233
  * },
234
+ * userId: {
235
+ * referenceId: "string"
236
+ * },
227
237
  * text: "string",
228
238
  * userMessageType: MavenAGI.UserConversationMessageType.User,
229
- * context: {}
239
+ * createdAt: new Date("2024-01-15T09:30:00.000Z"),
240
+ * updatedAt: new Date("2024-01-15T09:30:00.000Z")
230
241
  * }])
231
242
  */
232
243
  appendNewMessages(conversationId, request, requestOptions) {
@@ -241,7 +252,7 @@ export class Conversation {
241
252
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
242
253
  "X-Fern-Language": "JavaScript",
243
254
  "X-Fern-SDK-Name": "mavenagi",
244
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
255
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
245
256
  "X-Fern-Runtime": core.RUNTIME.type,
246
257
  "X-Fern-Runtime-Version": core.RUNTIME.version,
247
258
  },
@@ -308,7 +319,7 @@ export class Conversation {
308
319
  });
309
320
  }
310
321
  /**
311
- * Ask a question in a conversation
322
+ * Ask a question
312
323
  *
313
324
  * @param {string} conversationId - The ID of a new or existing conversation to use as context for the question
314
325
  * @param {MavenAGI.AskRequest} request
@@ -323,9 +334,10 @@ export class Conversation {
323
334
  * conversationMessageId: {
324
335
  * referenceId: "string"
325
336
  * },
326
- * text: "string",
327
- * context: {},
328
- * responseConfig: {}
337
+ * userId: {
338
+ * referenceId: "string"
339
+ * },
340
+ * text: "string"
329
341
  * })
330
342
  */
331
343
  ask(conversationId, request, requestOptions) {
@@ -340,7 +352,7 @@ export class Conversation {
340
352
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
341
353
  "X-Fern-Language": "JavaScript",
342
354
  "X-Fern-SDK-Name": "mavenagi",
343
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
355
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
344
356
  "X-Fern-Runtime": core.RUNTIME.type,
345
357
  "X-Fern-Runtime-Version": core.RUNTIME.version,
346
358
  },
@@ -419,7 +431,7 @@ export class Conversation {
419
431
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
420
432
  "X-Fern-Language": "JavaScript",
421
433
  "X-Fern-SDK-Name": "mavenagi",
422
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
434
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
423
435
  "X-Fern-Runtime": core.RUNTIME.type,
424
436
  "X-Fern-Runtime-Version": core.RUNTIME.version,
425
437
  },
@@ -524,7 +536,7 @@ export class Conversation {
524
536
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
525
537
  "X-Fern-Language": "JavaScript",
526
538
  "X-Fern-SDK-Name": "mavenagi",
527
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
539
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
528
540
  "X-Fern-Runtime": core.RUNTIME.type,
529
541
  "X-Fern-Runtime-Version": core.RUNTIME.version,
530
542
  },
@@ -625,7 +637,7 @@ export class Conversation {
625
637
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
626
638
  "X-Fern-Language": "JavaScript",
627
639
  "X-Fern-SDK-Name": "mavenagi",
628
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
640
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
629
641
  "X-Fern-Runtime": core.RUNTIME.type,
630
642
  "X-Fern-Runtime-Version": core.RUNTIME.version,
631
643
  },
@@ -637,7 +649,12 @@ export class Conversation {
637
649
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
638
650
  });
639
651
  if (_response.ok) {
640
- return;
652
+ return serializers.Feedback.parseOrThrow(_response.body, {
653
+ unrecognizedObjectKeys: "passthrough",
654
+ allowUnrecognizedUnionMembers: true,
655
+ allowUnrecognizedEnumValues: true,
656
+ breadcrumbsPrefix: ["response"],
657
+ });
641
658
  }
642
659
  if (_response.error.reason === "status-code") {
643
660
  switch (_response.error.statusCode) {
@@ -698,16 +715,6 @@ export class Conversation {
698
715
  * @example
699
716
  * await client.conversation.submitActionForm("string", {
700
717
  * actionFormId: "string",
701
- * userContext: {
702
- * name: "string",
703
- * id: {
704
- * "string": "string"
705
- * },
706
- * email: "string",
707
- * context: {
708
- * "string": "string"
709
- * }
710
- * },
711
718
  * parameters: {
712
719
  * "string": {
713
720
  * "key": "value"
@@ -727,7 +734,7 @@ export class Conversation {
727
734
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
728
735
  "X-Fern-Language": "JavaScript",
729
736
  "X-Fern-SDK-Name": "mavenagi",
730
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
737
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
731
738
  "X-Fern-Runtime": core.RUNTIME.type,
732
739
  "X-Fern-Runtime-Version": core.RUNTIME.version,
733
740
  },
@@ -792,7 +799,7 @@ export class Conversation {
792
799
  });
793
800
  }
794
801
  /**
795
- * Add metadata to an existing conversation's Context. If a metadata field already exists, it will be overwritten.
802
+ * Add metadata to an existing conversation. If a metadata field already exists, it will be overwritten.
796
803
  *
797
804
  * @param {string} conversationId - The ID of a conversation the metadata being added belongs to
798
805
  * @param {Record<string, string>} request
@@ -819,7 +826,7 @@ export class Conversation {
819
826
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
820
827
  "X-Fern-Language": "JavaScript",
821
828
  "X-Fern-SDK-Name": "mavenagi",
822
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
829
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
823
830
  "X-Fern-Runtime": core.RUNTIME.type,
824
831
  "X-Fern-Runtime-Version": core.RUNTIME.version,
825
832
  },
@@ -5,10 +5,8 @@ import * as MavenAGI from "../../../index";
5
5
  export interface AskRequest {
6
6
  /** Externally supplied ID to uniquely identify this message within the conversation */
7
7
  conversationMessageId: MavenAGI.EntityIdBase;
8
+ /** Externally supplied ID to uniquely identify the user that created this message */
9
+ userId: MavenAGI.EntityIdBase;
8
10
  /** The text of the message */
9
11
  text: string;
10
- /** The context of the message */
11
- context?: MavenAGI.ConversationMessageContext;
12
- /** Optional configuration for responses to this conversation. Only applies to new conversations. */
13
- responseConfig?: MavenAGI.ResponseConfig;
14
12
  }
@@ -5,4 +5,16 @@ import * as MavenAGI from "../../../index";
5
5
  export interface ConversationBase {
6
6
  /** Optional configurations for responses to this conversation */
7
7
  responseConfig?: MavenAGI.ResponseConfig;
8
+ /** The subject of the conversation */
9
+ subject?: string;
10
+ /** The url of the conversation */
11
+ url?: string;
12
+ /** The date and time the conversation was created */
13
+ createdAt?: Date;
14
+ /** The date and time the conversation was last updated */
15
+ updatedAt?: Date;
16
+ /** The tags of the conversation. Used for filtering in Agent Designer. */
17
+ tags?: Set<string>;
18
+ /** The metadata of the conversation. */
19
+ metadata?: Record<string, string>;
8
20
  }
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as MavenAGI from "../../../index";
5
4
  export interface ConversationMessageBase {
6
- /** The context of the message */
7
- context?: MavenAGI.ConversationMessageContext;
5
+ /** The date and time the conversation was created */
6
+ createdAt?: Date;
7
+ /** The date and time the conversation was last updated */
8
+ updatedAt?: Date;
8
9
  }
@@ -7,6 +7,4 @@ export interface ConversationRequest extends MavenAGI.ConversationBase {
7
7
  conversationId: MavenAGI.EntityIdBase;
8
8
  /** The messages in the conversation */
9
9
  messages: MavenAGI.ConversationMessageRequest[];
10
- /** The context of the conversation */
11
- context?: MavenAGI.ConversationContext;
12
10
  }
@@ -7,6 +7,4 @@ export interface ConversationResponse extends MavenAGI.ConversationBase {
7
7
  conversationId: MavenAGI.EntityId;
8
8
  /** The messages in the conversation */
9
9
  messages: MavenAGI.ConversationMessageResponse[];
10
- /** The context of the conversation */
11
- context: MavenAGI.ConversationContext;
12
10
  }
@@ -1,10 +1,8 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as MavenAGI from "../../../index";
5
4
  export interface SubmitActionFormRequest {
6
5
  actionFormId: string;
7
- userContext: MavenAGI.User;
8
- /** Map of parameter names to values */
6
+ /** Map of parameter IDs to values provided by the user. All required action fields must be provided. */
9
7
  parameters: Record<string, unknown>;
10
8
  }
@@ -3,6 +3,8 @@
3
3
  */
4
4
  import * as MavenAGI from "../../../index";
5
5
  export interface UserMessageBase extends MavenAGI.ConversationMessageBase {
6
+ /** ID that uniquely identifies the user that created this message */
7
+ userId: MavenAGI.EntityIdBase;
6
8
  /** The text of the message. Cannot be empty */
7
9
  text: string;
8
10
  userMessageType: MavenAGI.UserConversationMessageType;
@@ -18,8 +18,6 @@ export * from "./BotTextResponse";
18
18
  export * from "./BotActionFormResponse";
19
19
  export * from "./ActionFormField";
20
20
  export * from "./SubmitActionFormRequest";
21
- export * from "./ConversationContext";
22
- export * from "./ConversationMessageContext";
23
21
  export * from "./UserConversationMessageType";
24
22
  export * from "./BotConversationMessageType";
25
23
  export * from "./FeedbackRequest";
@@ -18,8 +18,6 @@ export * from "./BotTextResponse";
18
18
  export * from "./BotActionFormResponse";
19
19
  export * from "./ActionFormField";
20
20
  export * from "./SubmitActionFormRequest";
21
- export * from "./ConversationContext";
22
- export * from "./ConversationMessageContext";
23
21
  export * from "./UserConversationMessageType";
24
22
  export * from "./BotConversationMessageType";
25
23
  export * from "./FeedbackRequest";
@@ -9,4 +9,5 @@ export * from "./knowledge/types";
9
9
  export * as triggers from "./triggers";
10
10
  export * from "./triggers/types";
11
11
  export * from "./commons/errors";
12
+ export * as appSettings from "./appSettings";
12
13
  export * as users from "./users";
@@ -9,4 +9,5 @@ export * from "./knowledge/types";
9
9
  export * as triggers from "./triggers";
10
10
  export * from "./triggers/types";
11
11
  export * from "./commons/errors";
12
+ export * as appSettings from "./appSettings";
12
13
  export * as users from "./users";
@@ -51,7 +51,7 @@ export class Knowledge {
51
51
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
52
52
  "X-Fern-Language": "JavaScript",
53
53
  "X-Fern-SDK-Name": "mavenagi",
54
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
54
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
55
55
  "X-Fern-Runtime": core.RUNTIME.type,
56
56
  "X-Fern-Runtime-Version": core.RUNTIME.version,
57
57
  },
@@ -140,7 +140,7 @@ export class Knowledge {
140
140
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
141
141
  "X-Fern-Language": "JavaScript",
142
142
  "X-Fern-SDK-Name": "mavenagi",
143
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
143
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
144
144
  "X-Fern-Runtime": core.RUNTIME.type,
145
145
  "X-Fern-Runtime-Version": core.RUNTIME.version,
146
146
  },
@@ -231,7 +231,7 @@ export class Knowledge {
231
231
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
232
232
  "X-Fern-Language": "JavaScript",
233
233
  "X-Fern-SDK-Name": "mavenagi",
234
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
234
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
235
235
  "X-Fern-Runtime": core.RUNTIME.type,
236
236
  "X-Fern-Runtime-Version": core.RUNTIME.version,
237
237
  },
@@ -320,7 +320,7 @@ export class Knowledge {
320
320
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
321
321
  "X-Fern-Language": "JavaScript",
322
322
  "X-Fern-SDK-Name": "mavenagi",
323
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
323
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
324
324
  "X-Fern-Runtime": core.RUNTIME.type,
325
325
  "X-Fern-Runtime-Version": core.RUNTIME.version,
326
326
  },
@@ -411,7 +411,7 @@ export class Knowledge {
411
411
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
412
412
  "X-Fern-Language": "JavaScript",
413
413
  "X-Fern-SDK-Name": "mavenagi",
414
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
414
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
415
415
  "X-Fern-Runtime": core.RUNTIME.type,
416
416
  "X-Fern-Runtime-Version": core.RUNTIME.version,
417
417
  },
@@ -508,7 +508,7 @@ export class Knowledge {
508
508
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
509
509
  "X-Fern-Language": "JavaScript",
510
510
  "X-Fern-SDK-Name": "mavenagi",
511
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
511
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
512
512
  "X-Fern-Runtime": core.RUNTIME.type,
513
513
  "X-Fern-Runtime-Version": core.RUNTIME.version,
514
514
  },
@@ -598,7 +598,7 @@ export class Knowledge {
598
598
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
599
599
  "X-Fern-Language": "JavaScript",
600
600
  "X-Fern-SDK-Name": "mavenagi",
601
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
601
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
602
602
  "X-Fern-Runtime": core.RUNTIME.type,
603
603
  "X-Fern-Runtime-Version": core.RUNTIME.version,
604
604
  },
@@ -51,7 +51,7 @@ export class Triggers {
51
51
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
52
52
  "X-Fern-Language": "JavaScript",
53
53
  "X-Fern-SDK-Name": "mavenagi",
54
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
54
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
55
55
  "X-Fern-Runtime": core.RUNTIME.type,
56
56
  "X-Fern-Runtime-Version": core.RUNTIME.version,
57
57
  },
@@ -140,7 +140,7 @@ export class Triggers {
140
140
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
141
141
  "X-Fern-Language": "JavaScript",
142
142
  "X-Fern-SDK-Name": "mavenagi",
143
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
143
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
144
144
  "X-Fern-Runtime": core.RUNTIME.type,
145
145
  "X-Fern-Runtime-Version": core.RUNTIME.version,
146
146
  },
@@ -228,7 +228,7 @@ export class Triggers {
228
228
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
229
229
  "X-Fern-Language": "JavaScript",
230
230
  "X-Fern-SDK-Name": "mavenagi",
231
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
231
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
232
232
  "X-Fern-Runtime": core.RUNTIME.type,
233
233
  "X-Fern-Runtime-Version": core.RUNTIME.version,
234
234
  },
@@ -1,4 +1 @@
1
- export * from "./EventTriggerBase";
2
1
  export * from "./EventTriggerRequest";
3
- export * from "./EventTriggerResponse";
4
- export * from "./EventTriggerType";
@@ -1,4 +1 @@
1
- export * from "./EventTriggerBase";
2
1
  export * from "./EventTriggerRequest";
3
- export * from "./EventTriggerResponse";
4
- export * from "./EventTriggerType";
@@ -32,7 +32,7 @@ export declare class Users {
32
32
  protected readonly _options: Users.Options;
33
33
  constructor(_options: Users.Options);
34
34
  /**
35
- * Create a new user or update an existing one
35
+ * Update a user or create it if it doesn't exist.
36
36
  *
37
37
  * @param {MavenAGI.AppUserRequest} request
38
38
  * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
@@ -42,23 +42,27 @@ export declare class Users {
42
42
  * @throws {@link MavenAGI.ServerError}
43
43
  *
44
44
  * @example
45
- * await client.users.upsertAppUser({
46
- * appUserId: {
47
- * referenceId: "string"
45
+ * await client.users.createOrUpdate({
46
+ * userId: {
47
+ * referenceId: "user-0"
48
48
  * },
49
- * userIdentifiers: {
50
- * identifiers: new Set([{}])
51
- * },
52
- * metadata: {
53
- * "string": {}
49
+ * identifiers: new Set([{
50
+ * value: "joe@myapp.com",
51
+ * type: MavenAGI.AppUserIdentifyingPropertyType.Email
52
+ * }]),
53
+ * data: {
54
+ * "name": {
55
+ * value: "Joe",
56
+ * visibility: MavenAGI.VisibilityType.Visible
57
+ * }
54
58
  * }
55
59
  * })
56
60
  */
57
- upsertAppUser(request: MavenAGI.AppUserRequest, requestOptions?: Users.RequestOptions): Promise<MavenAGI.AppUserResponse>;
61
+ createOrUpdate(request: MavenAGI.AppUserRequest, requestOptions?: Users.RequestOptions): Promise<MavenAGI.AppUserResponse>;
58
62
  /**
59
- * Get a user
63
+ * Get a user by its supplied ID
60
64
  *
61
- * @param {string} userId - Externally supplied unique ID of the user
65
+ * @param {string} userId - The reference ID of the user to get. All other entity ID fields are inferred from the request.
62
66
  * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
63
67
  *
64
68
  * @throws {@link MavenAGI.NotFoundError}
@@ -66,8 +70,8 @@ export declare class Users {
66
70
  * @throws {@link MavenAGI.ServerError}
67
71
  *
68
72
  * @example
69
- * await client.users.getAppUser("string")
73
+ * await client.users.get("user-0")
70
74
  */
71
- getAppUser(userId: string, requestOptions?: Users.RequestOptions): Promise<MavenAGI.AppUserResponse>;
75
+ get(userId: string, requestOptions?: Users.RequestOptions): Promise<MavenAGI.AppUserResponse>;
72
76
  protected _getAuthorizationHeader(): Promise<string | undefined>;
73
77
  }
@@ -21,7 +21,7 @@ export class Users {
21
21
  this._options = _options;
22
22
  }
23
23
  /**
24
- * Create a new user or update an existing one
24
+ * Update a user or create it if it doesn't exist.
25
25
  *
26
26
  * @param {MavenAGI.AppUserRequest} request
27
27
  * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
@@ -31,19 +31,23 @@ export class Users {
31
31
  * @throws {@link MavenAGI.ServerError}
32
32
  *
33
33
  * @example
34
- * await client.users.upsertAppUser({
35
- * appUserId: {
36
- * referenceId: "string"
34
+ * await client.users.createOrUpdate({
35
+ * userId: {
36
+ * referenceId: "user-0"
37
37
  * },
38
- * userIdentifiers: {
39
- * identifiers: new Set([{}])
40
- * },
41
- * metadata: {
42
- * "string": {}
38
+ * identifiers: new Set([{
39
+ * value: "joe@myapp.com",
40
+ * type: MavenAGI.AppUserIdentifyingPropertyType.Email
41
+ * }]),
42
+ * data: {
43
+ * "name": {
44
+ * value: "Joe",
45
+ * visibility: MavenAGI.VisibilityType.Visible
46
+ * }
43
47
  * }
44
48
  * })
45
49
  */
46
- upsertAppUser(request, requestOptions) {
50
+ createOrUpdate(request, requestOptions) {
47
51
  var _a, _b;
48
52
  return __awaiter(this, void 0, void 0, function* () {
49
53
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -55,7 +59,7 @@ export class Users {
55
59
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
56
60
  "X-Fern-Language": "JavaScript",
57
61
  "X-Fern-SDK-Name": "mavenagi",
58
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
62
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
59
63
  "X-Fern-Runtime": core.RUNTIME.type,
60
64
  "X-Fern-Runtime-Version": core.RUNTIME.version,
61
65
  },
@@ -120,9 +124,9 @@ export class Users {
120
124
  });
121
125
  }
122
126
  /**
123
- * Get a user
127
+ * Get a user by its supplied ID
124
128
  *
125
- * @param {string} userId - Externally supplied unique ID of the user
129
+ * @param {string} userId - The reference ID of the user to get. All other entity ID fields are inferred from the request.
126
130
  * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
127
131
  *
128
132
  * @throws {@link MavenAGI.NotFoundError}
@@ -130,13 +134,13 @@ export class Users {
130
134
  * @throws {@link MavenAGI.ServerError}
131
135
  *
132
136
  * @example
133
- * await client.users.getAppUser("string")
137
+ * await client.users.get("user-0")
134
138
  */
135
- getAppUser(userId, requestOptions) {
139
+ get(userId, requestOptions) {
136
140
  var _a, _b;
137
141
  return __awaiter(this, void 0, void 0, function* () {
138
142
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
139
- url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/users/agent_user/${encodeURIComponent(userId)}`),
143
+ url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/users/${encodeURIComponent(userId)}`),
140
144
  method: "GET",
141
145
  headers: {
142
146
  Authorization: yield this._getAuthorizationHeader(),
@@ -144,7 +148,7 @@ export class Users {
144
148
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
145
149
  "X-Fern-Language": "JavaScript",
146
150
  "X-Fern-SDK-Name": "mavenagi",
147
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
151
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
148
152
  "X-Fern-Runtime": core.RUNTIME.type,
149
153
  "X-Fern-Runtime-Version": core.RUNTIME.version,
150
154
  },
package/dist/Client.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  import * as environments from "./environments";
5
5
  import * as core from "./core";
6
6
  import { Actions } from "./api/resources/actions/client/Client";
7
+ import { AppSettings } from "./api/resources/appSettings/client/Client";
7
8
  import { Conversation } from "./api/resources/conversation/client/Client";
8
9
  import { Knowledge } from "./api/resources/knowledge/client/Client";
9
10
  import { Triggers } from "./api/resources/triggers/client/Client";
@@ -37,6 +38,8 @@ export declare class MavenAGIClient {
37
38
  constructor(_options: MavenAGIClient.Options);
38
39
  protected _actions: Actions | undefined;
39
40
  get actions(): Actions;
41
+ protected _appSettings: AppSettings | undefined;
42
+ get appSettings(): AppSettings;
40
43
  protected _conversation: Conversation | undefined;
41
44
  get conversation(): Conversation;
42
45
  protected _knowledge: Knowledge | undefined;
package/dist/Client.js CHANGED
@@ -2,6 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import { Actions } from "./api/resources/actions/client/Client";
5
+ import { AppSettings } from "./api/resources/appSettings/client/Client";
5
6
  import { Conversation } from "./api/resources/conversation/client/Client";
6
7
  import { Knowledge } from "./api/resources/knowledge/client/Client";
7
8
  import { Triggers } from "./api/resources/triggers/client/Client";
@@ -14,6 +15,10 @@ export class MavenAGIClient {
14
15
  var _a;
15
16
  return ((_a = this._actions) !== null && _a !== void 0 ? _a : (this._actions = new Actions(this._options)));
16
17
  }
18
+ get appSettings() {
19
+ var _a;
20
+ return ((_a = this._appSettings) !== null && _a !== void 0 ? _a : (this._appSettings = new AppSettings(this._options)));
21
+ }
17
22
  get conversation() {
18
23
  var _a;
19
24
  return ((_a = this._conversation) !== null && _a !== void 0 ? _a : (this._conversation = new Conversation(this._options)));
@@ -56,7 +56,7 @@ export class Actions {
56
56
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
57
57
  "X-Fern-Language": "JavaScript",
58
58
  "X-Fern-SDK-Name": "mavenagi",
59
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
59
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
60
60
  "X-Fern-Runtime": core.RUNTIME.type,
61
61
  "X-Fern-Runtime-Version": core.RUNTIME.version,
62
62
  },
@@ -145,7 +145,7 @@ export class Actions {
145
145
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
146
146
  "X-Fern-Language": "JavaScript",
147
147
  "X-Fern-SDK-Name": "mavenagi",
148
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
148
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
149
149
  "X-Fern-Runtime": core.RUNTIME.type,
150
150
  "X-Fern-Runtime-Version": core.RUNTIME.version,
151
151
  },
@@ -233,7 +233,7 @@ export class Actions {
233
233
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
234
234
  "X-Fern-Language": "JavaScript",
235
235
  "X-Fern-SDK-Name": "mavenagi",
236
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
236
+ "X-Fern-SDK-Version": "0.0.0-alpha.15",
237
237
  "X-Fern-Runtime": core.RUNTIME.type,
238
238
  "X-Fern-Runtime-Version": core.RUNTIME.version,
239
239
  },