mavenagi 0.0.0-alpha.8 → 1.0.0

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 (621) hide show
  1. package/Client.d.ts +15 -0
  2. package/Client.js +10 -0
  3. package/README.md +81 -22
  4. package/api/resources/actions/client/Client.d.ts +21 -4
  5. package/api/resources/actions/client/Client.js +33 -19
  6. package/api/resources/actions/types/ActionBase.d.ts +2 -2
  7. package/api/resources/actions/types/ActionRequest.d.ts +12 -4
  8. package/api/resources/actions/types/ActionResponse.d.ts +12 -4
  9. package/api/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +10 -0
  10. package/api/resources/actions/types/ConversationPrecondition.d.ts +16 -0
  11. package/api/resources/actions/types/MetadataPrecondition.d.ts +10 -0
  12. package/api/resources/actions/types/Precondition.d.ts +31 -0
  13. package/api/resources/actions/types/PreconditionBase.d.ts +8 -0
  14. package/api/resources/actions/types/PreconditionGroup.d.ts +8 -0
  15. package/api/resources/actions/types/PreconditionGroupOperator.d.ts +8 -0
  16. package/api/resources/actions/types/PreconditionGroupOperator.js +7 -0
  17. package/api/resources/actions/types/PreconditionOperator.d.ts +7 -0
  18. package/api/resources/actions/types/PreconditionOperator.js +6 -0
  19. package/api/resources/actions/types/TagsPrecondition.d.ts +8 -0
  20. package/api/resources/actions/types/index.d.ts +9 -1
  21. package/api/resources/actions/types/index.js +9 -1
  22. package/api/resources/appSettings/client/Client.d.ts +47 -0
  23. package/api/resources/appSettings/client/Client.js +125 -0
  24. package/api/resources/appSettings/client/index.d.ts +1 -0
  25. package/api/resources/appSettings/client/index.js +1 -0
  26. package/api/resources/appSettings/index.d.ts +1 -0
  27. package/api/resources/appSettings/index.js +1 -0
  28. package/api/resources/commons/types/AppUser.d.ts +3 -4
  29. package/api/resources/commons/types/AppUserIdentifier.d.ts +1 -1
  30. package/api/resources/commons/types/AppUserRequest.d.ts +22 -1
  31. package/api/resources/commons/types/AppUserResponse.d.ts +38 -1
  32. package/api/resources/commons/types/EntityType.d.ts +3 -1
  33. package/api/resources/commons/types/EntityType.js +2 -0
  34. package/api/resources/commons/types/Feedback.d.ts +32 -8
  35. package/api/resources/commons/types/FeedbackBase.d.ts +10 -0
  36. package/api/resources/commons/types/UserData.d.ts +10 -0
  37. package/api/resources/commons/types/VisibilityType.d.ts +9 -0
  38. package/api/resources/commons/types/VisibilityType.js +8 -0
  39. package/api/resources/commons/types/index.d.ts +6 -2
  40. package/api/resources/commons/types/index.js +6 -2
  41. package/api/resources/conversation/client/Client.d.ts +82 -36
  42. package/api/resources/conversation/client/Client.js +230 -91
  43. package/api/resources/conversation/client/index.d.ts +1 -1
  44. package/api/resources/conversation/client/index.js +1 -1
  45. package/api/resources/conversation/client/requests/ConversationGetRequest.d.ts +15 -0
  46. package/api/resources/conversation/client/requests/index.d.ts +1 -0
  47. package/api/resources/conversation/client/requests/index.js +1 -0
  48. package/api/resources/conversation/types/ActionFormField.d.ts +1 -0
  49. package/api/resources/conversation/types/AskRequest.d.ts +21 -5
  50. package/api/resources/conversation/types/AskStreamActionEvent.d.ts +6 -0
  51. package/api/resources/conversation/types/AskStreamStartEvent.d.ts +2 -1
  52. package/api/resources/conversation/types/AskStreamTextEvent.d.ts +1 -0
  53. package/api/resources/conversation/types/Attachment.d.ts +9 -0
  54. package/api/resources/conversation/types/BotChartResponse.d.ts +11 -0
  55. package/api/resources/conversation/types/BotChartResponse.js +4 -0
  56. package/api/resources/conversation/types/BotMessage.d.ts +2 -0
  57. package/api/resources/conversation/types/BotResponse.d.ts +4 -1
  58. package/api/resources/conversation/types/BotResponseMetadata.d.ts +2 -0
  59. package/api/resources/conversation/types/Capability.d.ts +15 -1
  60. package/api/resources/conversation/types/Capability.js +2 -0
  61. package/api/resources/conversation/types/CategorizationResponse.d.ts +6 -0
  62. package/api/resources/conversation/types/CategorizationResponse.js +4 -0
  63. package/api/resources/conversation/types/ChartSpecSchema.d.ts +7 -0
  64. package/api/resources/conversation/types/ChartSpecSchema.js +6 -0
  65. package/api/resources/conversation/types/ConversationAnalysis.d.ts +16 -0
  66. package/api/resources/conversation/types/ConversationAnalysis.js +4 -0
  67. package/api/resources/conversation/types/ConversationBase.d.ts +12 -2
  68. package/api/resources/conversation/types/ConversationMessageBase.d.ts +4 -5
  69. package/api/resources/conversation/types/ConversationMessageRequest.d.ts +3 -1
  70. package/api/resources/conversation/types/ConversationRequest.d.ts +2 -2
  71. package/api/resources/conversation/types/ConversationResponse.d.ts +53 -2
  72. package/api/resources/conversation/types/FeedbackRequest.d.ts +24 -1
  73. package/api/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +2 -1
  74. package/api/resources/conversation/types/ResponseConfig.d.ts +4 -4
  75. package/api/resources/conversation/types/Sentiment.d.ts +14 -0
  76. package/api/resources/conversation/types/Sentiment.js +10 -0
  77. package/api/resources/conversation/types/StreamResponse.d.ts +4 -1
  78. package/api/resources/conversation/types/SubmitActionFormRequest.d.ts +1 -3
  79. package/api/resources/conversation/types/UserMessage.d.ts +5 -4
  80. package/api/resources/conversation/types/UserMessageBase.d.ts +11 -0
  81. package/api/resources/conversation/types/UserMessageBase.js +4 -0
  82. package/api/resources/conversation/types/index.d.ts +8 -2
  83. package/api/resources/conversation/types/index.js +8 -2
  84. package/api/resources/index.d.ts +4 -0
  85. package/api/resources/index.js +4 -0
  86. package/api/resources/knowledge/client/Client.d.ts +13 -4
  87. package/api/resources/knowledge/client/Client.js +55 -41
  88. package/api/resources/translations/client/Client.d.ts +52 -0
  89. package/api/resources/translations/client/Client.js +130 -0
  90. package/api/resources/translations/client/index.d.ts +1 -0
  91. package/api/resources/translations/client/index.js +1 -0
  92. package/api/resources/translations/index.d.ts +2 -0
  93. package/api/resources/translations/index.js +2 -0
  94. package/api/resources/translations/types/TranslationRequest.d.ts +16 -0
  95. package/api/resources/translations/types/TranslationRequest.js +4 -0
  96. package/api/resources/translations/types/TranslationResponse.d.ts +13 -0
  97. package/api/resources/translations/types/TranslationResponse.js +4 -0
  98. package/api/resources/translations/types/index.d.ts +2 -0
  99. package/api/resources/translations/types/index.js +2 -0
  100. package/api/resources/triggers/client/Client.d.ts +11 -2
  101. package/api/resources/triggers/client/Client.js +23 -17
  102. package/api/resources/triggers/types/index.d.ts +0 -3
  103. package/api/resources/triggers/types/index.js +0 -3
  104. package/api/resources/users/client/Client.d.ts +27 -12
  105. package/api/resources/users/client/Client.js +33 -23
  106. package/core/fetcher/Fetcher.d.ts +4 -1
  107. package/core/fetcher/Fetcher.js +18 -159
  108. package/core/fetcher/createRequestUrl.d.ts +1 -0
  109. package/core/fetcher/createRequestUrl.js +6 -0
  110. package/core/fetcher/getFetchFn.d.ts +4 -0
  111. package/core/fetcher/getFetchFn.js +32 -0
  112. package/core/fetcher/getRequestBody.d.ts +7 -0
  113. package/core/fetcher/getRequestBody.js +19 -0
  114. package/core/fetcher/getResponseBody.d.ts +1 -0
  115. package/core/fetcher/getResponseBody.js +48 -0
  116. package/core/fetcher/makeRequest.d.ts +1 -0
  117. package/core/fetcher/makeRequest.js +38 -0
  118. package/core/fetcher/requestWithRetries.d.ts +1 -0
  119. package/core/fetcher/requestWithRetries.js +28 -0
  120. package/core/fetcher/signals.d.ts +12 -0
  121. package/core/fetcher/signals.js +32 -0
  122. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  123. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +243 -0
  124. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
  125. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +120 -0
  126. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  127. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +225 -0
  128. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  129. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +23 -0
  130. package/core/runtime/runtime.d.ts +1 -0
  131. package/core/runtime/runtime.js +1 -0
  132. package/core/schemas/Schema.d.ts +8 -4
  133. package/core/schemas/Schema.js +1 -0
  134. package/core/schemas/builders/bigint/bigint.d.ts +2 -0
  135. package/core/schemas/builders/bigint/bigint.js +46 -0
  136. package/core/schemas/builders/bigint/index.d.ts +1 -0
  137. package/core/schemas/builders/bigint/index.js +1 -0
  138. package/core/schemas/builders/index.d.ts +1 -0
  139. package/core/schemas/builders/index.js +1 -0
  140. package/core/schemas/builders/lazy/lazy.d.ts +2 -2
  141. package/core/schemas/builders/lazy/lazy.js +8 -19
  142. package/core/schemas/builders/lazy/lazyObject.js +1 -10
  143. package/core/schemas/builders/list/list.js +31 -44
  144. package/core/schemas/builders/object/object.js +90 -111
  145. package/core/schemas/builders/object/types.d.ts +2 -2
  146. package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
  147. package/core/schemas/builders/record/record.js +49 -60
  148. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  149. package/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
  150. package/core/schemas/builders/set/set.js +6 -15
  151. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
  152. package/core/schemas/builders/union/union.js +51 -62
  153. package/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
  154. package/core/schemas/utils/maybeSkipValidation.js +3 -12
  155. package/dist/Client.d.ts +15 -0
  156. package/dist/Client.js +10 -0
  157. package/dist/api/resources/actions/client/Client.d.ts +21 -4
  158. package/dist/api/resources/actions/client/Client.js +33 -19
  159. package/dist/api/resources/actions/types/ActionBase.d.ts +2 -2
  160. package/dist/api/resources/actions/types/ActionRequest.d.ts +12 -4
  161. package/dist/api/resources/actions/types/ActionResponse.d.ts +12 -4
  162. package/dist/api/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +10 -0
  163. package/dist/api/resources/actions/types/ConversationExecutedActionPrecondition.js +4 -0
  164. package/dist/api/resources/actions/types/ConversationPrecondition.d.ts +16 -0
  165. package/dist/api/resources/actions/types/ConversationPrecondition.js +4 -0
  166. package/dist/api/resources/actions/types/MetadataPrecondition.d.ts +10 -0
  167. package/dist/api/resources/actions/types/MetadataPrecondition.js +4 -0
  168. package/dist/api/resources/actions/types/Precondition.d.ts +31 -0
  169. package/dist/api/resources/actions/types/Precondition.js +4 -0
  170. package/dist/api/resources/actions/types/PreconditionBase.d.ts +8 -0
  171. package/dist/api/resources/actions/types/PreconditionBase.js +4 -0
  172. package/dist/api/resources/actions/types/PreconditionGroup.d.ts +8 -0
  173. package/dist/api/resources/actions/types/PreconditionGroup.js +4 -0
  174. package/dist/api/resources/actions/types/PreconditionGroupOperator.d.ts +8 -0
  175. package/dist/api/resources/actions/types/PreconditionGroupOperator.js +7 -0
  176. package/dist/api/resources/actions/types/PreconditionOperator.d.ts +7 -0
  177. package/dist/api/resources/actions/types/PreconditionOperator.js +6 -0
  178. package/dist/api/resources/actions/types/TagsPrecondition.d.ts +8 -0
  179. package/dist/api/resources/actions/types/TagsPrecondition.js +4 -0
  180. package/dist/api/resources/actions/types/index.d.ts +9 -1
  181. package/dist/api/resources/actions/types/index.js +9 -1
  182. package/dist/api/resources/appSettings/client/Client.d.ts +47 -0
  183. package/dist/api/resources/appSettings/client/Client.js +125 -0
  184. package/dist/api/resources/appSettings/client/index.d.ts +1 -0
  185. package/dist/api/resources/appSettings/client/index.js +1 -0
  186. package/dist/api/resources/appSettings/index.d.ts +1 -0
  187. package/dist/api/resources/appSettings/index.js +1 -0
  188. package/dist/api/resources/commons/types/AppUser.d.ts +3 -4
  189. package/dist/api/resources/commons/types/AppUserIdentifier.d.ts +1 -1
  190. package/dist/api/resources/commons/types/AppUserRequest.d.ts +22 -1
  191. package/dist/api/resources/commons/types/AppUserResponse.d.ts +38 -1
  192. package/dist/api/resources/commons/types/EntityType.d.ts +3 -1
  193. package/dist/api/resources/commons/types/EntityType.js +2 -0
  194. package/dist/api/resources/commons/types/EventTriggerBase.js +4 -0
  195. package/dist/api/resources/commons/types/EventTriggerResponse.js +4 -0
  196. package/dist/api/resources/commons/types/Feedback.d.ts +32 -8
  197. package/dist/api/resources/commons/types/FeedbackBase.d.ts +10 -0
  198. package/dist/api/resources/commons/types/FeedbackBase.js +4 -0
  199. package/dist/api/resources/commons/types/UserData.d.ts +10 -0
  200. package/dist/api/resources/commons/types/UserData.js +4 -0
  201. package/dist/api/resources/commons/types/VisibilityType.d.ts +9 -0
  202. package/dist/api/resources/commons/types/VisibilityType.js +8 -0
  203. package/dist/api/resources/commons/types/index.d.ts +6 -2
  204. package/dist/api/resources/commons/types/index.js +6 -2
  205. package/dist/api/resources/conversation/client/Client.d.ts +82 -36
  206. package/dist/api/resources/conversation/client/Client.js +230 -91
  207. package/dist/api/resources/conversation/client/index.d.ts +1 -1
  208. package/dist/api/resources/conversation/client/index.js +1 -1
  209. package/dist/api/resources/conversation/client/requests/ConversationGetRequest.d.ts +15 -0
  210. package/dist/api/resources/conversation/client/requests/ConversationGetRequest.js +4 -0
  211. package/dist/api/resources/conversation/client/requests/index.d.ts +1 -0
  212. package/dist/api/resources/conversation/client/requests/index.js +1 -0
  213. package/dist/api/resources/conversation/types/ActionFormField.d.ts +1 -0
  214. package/dist/api/resources/conversation/types/AskRequest.d.ts +21 -5
  215. package/dist/api/resources/conversation/types/AskStreamActionEvent.d.ts +6 -0
  216. package/dist/api/resources/conversation/types/AskStreamActionEvent.js +4 -0
  217. package/dist/api/resources/conversation/types/AskStreamStartEvent.d.ts +2 -1
  218. package/dist/api/resources/conversation/types/AskStreamTextEvent.d.ts +1 -0
  219. package/dist/api/resources/conversation/types/Attachment.d.ts +9 -0
  220. package/dist/api/resources/conversation/types/Attachment.js +4 -0
  221. package/dist/api/resources/conversation/types/BotChartResponse.d.ts +11 -0
  222. package/dist/api/resources/conversation/types/BotChartResponse.js +4 -0
  223. package/dist/api/resources/conversation/types/BotMessage.d.ts +2 -0
  224. package/dist/api/resources/conversation/types/BotResponse.d.ts +4 -1
  225. package/dist/api/resources/conversation/types/BotResponseMetadata.d.ts +2 -0
  226. package/dist/api/resources/conversation/types/Capability.d.ts +15 -1
  227. package/dist/api/resources/conversation/types/Capability.js +2 -0
  228. package/dist/api/resources/conversation/types/CategorizationResponse.d.ts +6 -0
  229. package/dist/api/resources/conversation/types/CategorizationResponse.js +4 -0
  230. package/dist/api/resources/conversation/types/ChartSpecSchema.d.ts +7 -0
  231. package/dist/api/resources/conversation/types/ChartSpecSchema.js +6 -0
  232. package/dist/api/resources/conversation/types/ConversationAnalysis.d.ts +16 -0
  233. package/dist/api/resources/conversation/types/ConversationAnalysis.js +4 -0
  234. package/dist/api/resources/conversation/types/ConversationBase.d.ts +12 -2
  235. package/dist/api/resources/conversation/types/ConversationMessageBase.d.ts +4 -5
  236. package/dist/api/resources/conversation/types/ConversationMessageRequest.d.ts +3 -1
  237. package/dist/api/resources/conversation/types/ConversationRequest.d.ts +2 -2
  238. package/dist/api/resources/conversation/types/ConversationResponse.d.ts +53 -2
  239. package/dist/api/resources/conversation/types/FeedbackRequest.d.ts +24 -1
  240. package/dist/api/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +2 -1
  241. package/dist/api/resources/conversation/types/ResponseConfig.d.ts +4 -4
  242. package/dist/api/resources/conversation/types/Sentiment.d.ts +14 -0
  243. package/dist/api/resources/conversation/types/Sentiment.js +10 -0
  244. package/dist/api/resources/conversation/types/StreamResponse.d.ts +4 -1
  245. package/dist/api/resources/conversation/types/SubmitActionFormRequest.d.ts +1 -3
  246. package/dist/api/resources/conversation/types/UserMessage.d.ts +5 -4
  247. package/dist/api/resources/conversation/types/UserMessageBase.d.ts +11 -0
  248. package/dist/api/resources/conversation/types/UserMessageBase.js +4 -0
  249. package/dist/api/resources/conversation/types/index.d.ts +8 -2
  250. package/dist/api/resources/conversation/types/index.js +8 -2
  251. package/dist/api/resources/index.d.ts +4 -0
  252. package/dist/api/resources/index.js +4 -0
  253. package/dist/api/resources/knowledge/client/Client.d.ts +13 -4
  254. package/dist/api/resources/knowledge/client/Client.js +55 -41
  255. package/dist/api/resources/translations/client/Client.d.ts +52 -0
  256. package/dist/api/resources/translations/client/Client.js +130 -0
  257. package/dist/api/resources/translations/client/index.d.ts +1 -0
  258. package/dist/api/resources/translations/client/index.js +1 -0
  259. package/dist/api/resources/translations/index.d.ts +2 -0
  260. package/dist/api/resources/translations/index.js +2 -0
  261. package/dist/api/resources/translations/types/TranslationRequest.d.ts +16 -0
  262. package/dist/api/resources/translations/types/TranslationRequest.js +4 -0
  263. package/dist/api/resources/translations/types/TranslationResponse.d.ts +13 -0
  264. package/dist/api/resources/translations/types/TranslationResponse.js +4 -0
  265. package/dist/api/resources/translations/types/index.d.ts +2 -0
  266. package/dist/api/resources/translations/types/index.js +2 -0
  267. package/dist/api/resources/triggers/client/Client.d.ts +11 -2
  268. package/dist/api/resources/triggers/client/Client.js +23 -17
  269. package/dist/api/resources/triggers/types/index.d.ts +0 -3
  270. package/dist/api/resources/triggers/types/index.js +0 -3
  271. package/dist/api/resources/users/client/Client.d.ts +27 -12
  272. package/dist/api/resources/users/client/Client.js +33 -23
  273. package/dist/core/fetcher/Fetcher.d.ts +4 -1
  274. package/dist/core/fetcher/Fetcher.js +18 -159
  275. package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
  276. package/dist/core/fetcher/createRequestUrl.js +6 -0
  277. package/dist/core/fetcher/getFetchFn.d.ts +4 -0
  278. package/dist/core/fetcher/getFetchFn.js +32 -0
  279. package/dist/core/fetcher/getRequestBody.d.ts +7 -0
  280. package/dist/core/fetcher/getRequestBody.js +19 -0
  281. package/dist/core/fetcher/getResponseBody.d.ts +1 -0
  282. package/dist/core/fetcher/getResponseBody.js +48 -0
  283. package/dist/core/fetcher/makeRequest.d.ts +1 -0
  284. package/dist/core/fetcher/makeRequest.js +38 -0
  285. package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
  286. package/dist/core/fetcher/requestWithRetries.js +28 -0
  287. package/dist/core/fetcher/signals.d.ts +12 -0
  288. package/dist/core/fetcher/signals.js +32 -0
  289. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  290. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +243 -0
  291. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
  292. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +120 -0
  293. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  294. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +225 -0
  295. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  296. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +23 -0
  297. package/dist/core/runtime/runtime.d.ts +1 -0
  298. package/dist/core/runtime/runtime.js +1 -0
  299. package/dist/core/schemas/Schema.d.ts +8 -4
  300. package/dist/core/schemas/Schema.js +1 -0
  301. package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
  302. package/dist/core/schemas/builders/bigint/bigint.js +46 -0
  303. package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
  304. package/dist/core/schemas/builders/bigint/index.js +1 -0
  305. package/dist/core/schemas/builders/index.d.ts +1 -0
  306. package/dist/core/schemas/builders/index.js +1 -0
  307. package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
  308. package/dist/core/schemas/builders/lazy/lazy.js +8 -19
  309. package/dist/core/schemas/builders/lazy/lazyObject.js +1 -10
  310. package/dist/core/schemas/builders/list/list.js +31 -44
  311. package/dist/core/schemas/builders/object/object.js +90 -111
  312. package/dist/core/schemas/builders/object/types.d.ts +2 -2
  313. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
  314. package/dist/core/schemas/builders/record/record.js +49 -60
  315. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  316. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
  317. package/dist/core/schemas/builders/set/set.js +6 -15
  318. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
  319. package/dist/core/schemas/builders/union/union.js +51 -62
  320. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
  321. package/dist/core/schemas/utils/maybeSkipValidation.js +3 -12
  322. package/dist/serialization/resources/actions/types/ActionBase.d.ts +1 -2
  323. package/dist/serialization/resources/actions/types/ActionBase.js +2 -2
  324. package/dist/serialization/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +14 -0
  325. package/dist/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +11 -0
  326. package/dist/serialization/resources/actions/types/ConversationPrecondition.d.ts +22 -0
  327. package/dist/serialization/resources/actions/types/ConversationPrecondition.js +17 -0
  328. package/dist/serialization/resources/actions/types/MetadataPrecondition.d.ts +14 -0
  329. package/dist/serialization/resources/actions/types/MetadataPrecondition.js +11 -0
  330. package/dist/serialization/resources/actions/types/Precondition.d.ts +22 -0
  331. package/dist/serialization/resources/actions/types/Precondition.js +19 -0
  332. package/dist/serialization/resources/actions/types/PreconditionBase.d.ts +13 -0
  333. package/dist/serialization/resources/actions/types/PreconditionBase.js +8 -0
  334. package/dist/serialization/resources/actions/types/PreconditionGroup.d.ts +14 -0
  335. package/dist/serialization/resources/actions/types/PreconditionGroup.js +10 -0
  336. package/dist/serialization/resources/actions/types/PreconditionGroupOperator.d.ts +10 -0
  337. package/dist/serialization/resources/actions/types/PreconditionGroupOperator.js +5 -0
  338. package/dist/serialization/resources/actions/types/PreconditionOperator.d.ts +10 -0
  339. package/dist/serialization/resources/actions/types/PreconditionOperator.js +5 -0
  340. package/dist/serialization/resources/actions/types/TagsPrecondition.d.ts +13 -0
  341. package/dist/serialization/resources/actions/types/TagsPrecondition.js +10 -0
  342. package/dist/serialization/resources/actions/types/index.d.ts +9 -1
  343. package/dist/serialization/resources/actions/types/index.js +9 -1
  344. package/dist/serialization/resources/appSettings/client/get.d.ts +9 -0
  345. package/dist/serialization/resources/appSettings/client/get.js +5 -0
  346. package/dist/serialization/resources/appSettings/client/index.d.ts +1 -0
  347. package/dist/serialization/resources/appSettings/client/index.js +1 -0
  348. package/dist/serialization/resources/appSettings/index.d.ts +1 -0
  349. package/dist/serialization/resources/appSettings/index.js +1 -0
  350. package/dist/serialization/resources/commons/types/AppUser.d.ts +4 -4
  351. package/dist/serialization/resources/commons/types/AppUser.js +4 -4
  352. package/dist/serialization/resources/commons/types/AppUserIdentifier.d.ts +1 -1
  353. package/dist/serialization/resources/commons/types/AppUserIdentifier.js +1 -1
  354. package/dist/serialization/resources/commons/types/AppUserRequest.d.ts +4 -1
  355. package/dist/serialization/resources/commons/types/AppUserRequest.js +7 -1
  356. package/dist/serialization/resources/commons/types/AppUserResponse.d.ts +6 -1
  357. package/dist/serialization/resources/commons/types/AppUserResponse.js +9 -1
  358. package/dist/serialization/resources/commons/types/EntityType.d.ts +1 -1
  359. package/dist/serialization/resources/commons/types/EntityType.js +2 -0
  360. package/dist/serialization/resources/{triggers → commons}/types/EventTriggerResponse.d.ts +1 -1
  361. package/dist/serialization/resources/{triggers → commons}/types/EventTriggerResponse.js +1 -1
  362. package/dist/serialization/resources/commons/types/Feedback.d.ts +6 -7
  363. package/dist/serialization/resources/commons/types/Feedback.js +9 -8
  364. package/dist/serialization/resources/commons/types/FeedbackBase.d.ts +14 -0
  365. package/dist/serialization/resources/commons/types/FeedbackBase.js +9 -0
  366. package/dist/serialization/resources/commons/types/UserData.d.ts +14 -0
  367. package/dist/serialization/resources/commons/types/UserData.js +9 -0
  368. package/dist/serialization/resources/commons/types/VisibilityType.d.ts +10 -0
  369. package/dist/serialization/resources/commons/types/VisibilityType.js +5 -0
  370. package/dist/serialization/resources/commons/types/index.d.ts +6 -2
  371. package/dist/serialization/resources/commons/types/index.js +6 -2
  372. package/dist/serialization/resources/conversation/types/ActionFormField.d.ts +1 -0
  373. package/dist/serialization/resources/conversation/types/ActionFormField.js +1 -0
  374. package/dist/serialization/resources/conversation/types/AskRequest.d.ts +5 -5
  375. package/dist/serialization/resources/conversation/types/AskRequest.js +5 -5
  376. package/dist/serialization/resources/conversation/types/AskStreamActionEvent.d.ts +12 -0
  377. package/dist/serialization/resources/conversation/types/AskStreamActionEvent.js +6 -0
  378. package/dist/serialization/resources/conversation/types/AskStreamStartEvent.d.ts +2 -1
  379. package/dist/serialization/resources/conversation/types/AskStreamStartEvent.js +2 -1
  380. package/dist/serialization/resources/{actions/types/Preconditions.d.ts → conversation/types/Attachment.d.ts} +4 -3
  381. package/dist/serialization/resources/conversation/types/Attachment.js +8 -0
  382. package/dist/serialization/resources/conversation/types/BotChartResponse.d.ts +15 -0
  383. package/dist/serialization/resources/conversation/types/BotChartResponse.js +10 -0
  384. package/dist/serialization/resources/conversation/types/BotMessage.d.ts +2 -0
  385. package/dist/serialization/resources/conversation/types/BotMessage.js +2 -0
  386. package/dist/serialization/resources/conversation/types/BotResponse.d.ts +5 -1
  387. package/dist/serialization/resources/conversation/types/BotResponse.js +2 -0
  388. package/dist/serialization/resources/conversation/types/BotResponseMetadata.d.ts +1 -0
  389. package/dist/serialization/resources/conversation/types/BotResponseMetadata.js +1 -0
  390. package/dist/serialization/resources/conversation/types/Capability.d.ts +1 -1
  391. package/dist/serialization/resources/conversation/types/Capability.js +1 -1
  392. package/dist/serialization/resources/conversation/types/CategorizationResponse.d.ts +12 -0
  393. package/dist/serialization/resources/conversation/types/CategorizationResponse.js +7 -0
  394. package/dist/serialization/resources/conversation/types/ChartSpecSchema.d.ts +10 -0
  395. package/dist/serialization/resources/conversation/types/ChartSpecSchema.js +5 -0
  396. package/dist/serialization/resources/conversation/types/ConversationAnalysis.d.ts +17 -0
  397. package/dist/serialization/resources/conversation/types/ConversationAnalysis.js +12 -0
  398. package/dist/serialization/resources/conversation/types/ConversationBase.d.ts +6 -1
  399. package/dist/serialization/resources/conversation/types/ConversationBase.js +6 -1
  400. package/dist/serialization/resources/conversation/types/ConversationMessageBase.d.ts +2 -3
  401. package/dist/serialization/resources/conversation/types/ConversationMessageBase.js +2 -3
  402. package/dist/serialization/resources/conversation/types/ConversationMessageRequest.d.ts +4 -2
  403. package/dist/serialization/resources/conversation/types/ConversationMessageRequest.js +7 -2
  404. package/dist/serialization/resources/conversation/types/ConversationRequest.d.ts +2 -2
  405. package/dist/serialization/resources/conversation/types/ConversationRequest.js +2 -2
  406. package/dist/serialization/resources/conversation/types/ConversationResponse.d.ts +4 -2
  407. package/dist/serialization/resources/conversation/types/ConversationResponse.js +4 -2
  408. package/dist/serialization/resources/conversation/types/FeedbackRequest.d.ts +7 -2
  409. package/dist/serialization/resources/conversation/types/FeedbackRequest.js +10 -2
  410. package/dist/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +2 -1
  411. package/dist/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.js +2 -1
  412. package/dist/serialization/resources/conversation/types/ResponseConfig.d.ts +3 -3
  413. package/dist/serialization/resources/conversation/types/ResponseConfig.js +3 -3
  414. package/dist/serialization/resources/conversation/types/Sentiment.d.ts +10 -0
  415. package/dist/serialization/resources/conversation/types/Sentiment.js +5 -0
  416. package/dist/serialization/resources/conversation/types/StreamResponse.d.ts +5 -1
  417. package/dist/serialization/resources/conversation/types/StreamResponse.js +2 -0
  418. package/dist/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts +0 -2
  419. package/dist/serialization/resources/conversation/types/SubmitActionFormRequest.js +0 -2
  420. package/dist/serialization/resources/conversation/types/UserMessage.d.ts +5 -5
  421. package/dist/serialization/resources/conversation/types/UserMessage.js +5 -5
  422. package/dist/serialization/resources/conversation/types/UserMessageBase.d.ts +17 -0
  423. package/dist/serialization/resources/conversation/types/UserMessageBase.js +14 -0
  424. package/dist/serialization/resources/conversation/types/index.d.ts +8 -2
  425. package/dist/serialization/resources/conversation/types/index.js +8 -2
  426. package/dist/serialization/resources/index.d.ts +3 -0
  427. package/dist/serialization/resources/index.js +3 -0
  428. package/dist/serialization/resources/translations/index.d.ts +1 -0
  429. package/dist/serialization/resources/translations/index.js +1 -0
  430. package/dist/serialization/resources/translations/types/TranslationRequest.d.ts +13 -0
  431. package/dist/serialization/resources/translations/types/TranslationRequest.js +8 -0
  432. package/dist/serialization/resources/translations/types/TranslationResponse.d.ts +12 -0
  433. package/dist/serialization/resources/translations/types/TranslationResponse.js +7 -0
  434. package/dist/serialization/resources/translations/types/index.d.ts +2 -0
  435. package/dist/serialization/resources/translations/types/index.js +2 -0
  436. package/dist/serialization/resources/triggers/types/EventTriggerRequest.d.ts +1 -1
  437. package/dist/serialization/resources/triggers/types/EventTriggerRequest.js +1 -1
  438. package/dist/serialization/resources/triggers/types/index.d.ts +0 -3
  439. package/dist/serialization/resources/triggers/types/index.js +0 -3
  440. package/dist/version.d.ts +1 -0
  441. package/dist/version.js +1 -0
  442. package/package.json +12 -2
  443. package/reference.md +1953 -0
  444. package/serialization/resources/actions/types/ActionBase.d.ts +1 -2
  445. package/serialization/resources/actions/types/ActionBase.js +2 -2
  446. package/serialization/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +14 -0
  447. package/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +11 -0
  448. package/serialization/resources/actions/types/ConversationPrecondition.d.ts +22 -0
  449. package/serialization/resources/actions/types/ConversationPrecondition.js +17 -0
  450. package/serialization/resources/actions/types/MetadataPrecondition.d.ts +14 -0
  451. package/serialization/resources/actions/types/MetadataPrecondition.js +11 -0
  452. package/serialization/resources/actions/types/Precondition.d.ts +22 -0
  453. package/serialization/resources/actions/types/Precondition.js +19 -0
  454. package/serialization/resources/actions/types/PreconditionBase.d.ts +13 -0
  455. package/serialization/resources/actions/types/PreconditionBase.js +8 -0
  456. package/serialization/resources/actions/types/PreconditionGroup.d.ts +14 -0
  457. package/serialization/resources/actions/types/PreconditionGroup.js +10 -0
  458. package/serialization/resources/actions/types/PreconditionGroupOperator.d.ts +10 -0
  459. package/serialization/resources/actions/types/PreconditionGroupOperator.js +5 -0
  460. package/serialization/resources/actions/types/PreconditionOperator.d.ts +10 -0
  461. package/serialization/resources/actions/types/PreconditionOperator.js +5 -0
  462. package/serialization/resources/actions/types/TagsPrecondition.d.ts +13 -0
  463. package/serialization/resources/actions/types/TagsPrecondition.js +10 -0
  464. package/serialization/resources/actions/types/index.d.ts +9 -1
  465. package/serialization/resources/actions/types/index.js +9 -1
  466. package/serialization/resources/appSettings/client/get.d.ts +9 -0
  467. package/serialization/resources/appSettings/client/get.js +5 -0
  468. package/serialization/resources/appSettings/client/index.d.ts +1 -0
  469. package/serialization/resources/appSettings/client/index.js +1 -0
  470. package/serialization/resources/appSettings/index.d.ts +1 -0
  471. package/serialization/resources/appSettings/index.js +1 -0
  472. package/serialization/resources/commons/types/AppUser.d.ts +4 -4
  473. package/serialization/resources/commons/types/AppUser.js +4 -4
  474. package/serialization/resources/commons/types/AppUserIdentifier.d.ts +1 -1
  475. package/serialization/resources/commons/types/AppUserIdentifier.js +1 -1
  476. package/serialization/resources/commons/types/AppUserRequest.d.ts +4 -1
  477. package/serialization/resources/commons/types/AppUserRequest.js +7 -1
  478. package/serialization/resources/commons/types/AppUserResponse.d.ts +6 -1
  479. package/serialization/resources/commons/types/AppUserResponse.js +9 -1
  480. package/serialization/resources/commons/types/EntityType.d.ts +1 -1
  481. package/serialization/resources/commons/types/EntityType.js +2 -0
  482. package/serialization/resources/{triggers → commons}/types/EventTriggerResponse.d.ts +1 -1
  483. package/serialization/resources/{triggers → commons}/types/EventTriggerResponse.js +1 -1
  484. package/serialization/resources/commons/types/Feedback.d.ts +6 -7
  485. package/serialization/resources/commons/types/Feedback.js +9 -8
  486. package/serialization/resources/commons/types/FeedbackBase.d.ts +14 -0
  487. package/serialization/resources/commons/types/FeedbackBase.js +9 -0
  488. package/serialization/resources/commons/types/UserData.d.ts +14 -0
  489. package/serialization/resources/commons/types/UserData.js +9 -0
  490. package/serialization/resources/commons/types/VisibilityType.d.ts +10 -0
  491. package/serialization/resources/commons/types/VisibilityType.js +5 -0
  492. package/serialization/resources/commons/types/index.d.ts +6 -2
  493. package/serialization/resources/commons/types/index.js +6 -2
  494. package/serialization/resources/conversation/types/ActionFormField.d.ts +1 -0
  495. package/serialization/resources/conversation/types/ActionFormField.js +1 -0
  496. package/serialization/resources/conversation/types/AskRequest.d.ts +5 -5
  497. package/serialization/resources/conversation/types/AskRequest.js +5 -5
  498. package/serialization/resources/conversation/types/AskStreamActionEvent.d.ts +12 -0
  499. package/serialization/resources/conversation/types/AskStreamActionEvent.js +6 -0
  500. package/serialization/resources/conversation/types/AskStreamStartEvent.d.ts +2 -1
  501. package/serialization/resources/conversation/types/AskStreamStartEvent.js +2 -1
  502. package/serialization/resources/{actions/types/Preconditions.d.ts → conversation/types/Attachment.d.ts} +4 -3
  503. package/serialization/resources/conversation/types/Attachment.js +8 -0
  504. package/serialization/resources/conversation/types/BotChartResponse.d.ts +15 -0
  505. package/serialization/resources/conversation/types/BotChartResponse.js +10 -0
  506. package/serialization/resources/conversation/types/BotMessage.d.ts +2 -0
  507. package/serialization/resources/conversation/types/BotMessage.js +2 -0
  508. package/serialization/resources/conversation/types/BotResponse.d.ts +5 -1
  509. package/serialization/resources/conversation/types/BotResponse.js +2 -0
  510. package/serialization/resources/conversation/types/BotResponseMetadata.d.ts +1 -0
  511. package/serialization/resources/conversation/types/BotResponseMetadata.js +1 -0
  512. package/serialization/resources/conversation/types/Capability.d.ts +1 -1
  513. package/serialization/resources/conversation/types/Capability.js +1 -1
  514. package/serialization/resources/conversation/types/CategorizationResponse.d.ts +12 -0
  515. package/serialization/resources/conversation/types/CategorizationResponse.js +7 -0
  516. package/serialization/resources/conversation/types/ChartSpecSchema.d.ts +10 -0
  517. package/serialization/resources/conversation/types/ChartSpecSchema.js +5 -0
  518. package/serialization/resources/conversation/types/ConversationAnalysis.d.ts +17 -0
  519. package/serialization/resources/conversation/types/ConversationAnalysis.js +12 -0
  520. package/serialization/resources/conversation/types/ConversationBase.d.ts +6 -1
  521. package/serialization/resources/conversation/types/ConversationBase.js +6 -1
  522. package/serialization/resources/conversation/types/ConversationMessageBase.d.ts +2 -3
  523. package/serialization/resources/conversation/types/ConversationMessageBase.js +2 -3
  524. package/serialization/resources/conversation/types/ConversationMessageRequest.d.ts +4 -2
  525. package/serialization/resources/conversation/types/ConversationMessageRequest.js +7 -2
  526. package/serialization/resources/conversation/types/ConversationRequest.d.ts +2 -2
  527. package/serialization/resources/conversation/types/ConversationRequest.js +2 -2
  528. package/serialization/resources/conversation/types/ConversationResponse.d.ts +4 -2
  529. package/serialization/resources/conversation/types/ConversationResponse.js +4 -2
  530. package/serialization/resources/conversation/types/FeedbackRequest.d.ts +7 -2
  531. package/serialization/resources/conversation/types/FeedbackRequest.js +10 -2
  532. package/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +2 -1
  533. package/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.js +2 -1
  534. package/serialization/resources/conversation/types/ResponseConfig.d.ts +3 -3
  535. package/serialization/resources/conversation/types/ResponseConfig.js +3 -3
  536. package/serialization/resources/conversation/types/Sentiment.d.ts +10 -0
  537. package/serialization/resources/conversation/types/Sentiment.js +5 -0
  538. package/serialization/resources/conversation/types/StreamResponse.d.ts +5 -1
  539. package/serialization/resources/conversation/types/StreamResponse.js +2 -0
  540. package/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts +0 -2
  541. package/serialization/resources/conversation/types/SubmitActionFormRequest.js +0 -2
  542. package/serialization/resources/conversation/types/UserMessage.d.ts +5 -5
  543. package/serialization/resources/conversation/types/UserMessage.js +5 -5
  544. package/serialization/resources/conversation/types/UserMessageBase.d.ts +17 -0
  545. package/serialization/resources/conversation/types/UserMessageBase.js +14 -0
  546. package/serialization/resources/conversation/types/index.d.ts +8 -2
  547. package/serialization/resources/conversation/types/index.js +8 -2
  548. package/serialization/resources/index.d.ts +3 -0
  549. package/serialization/resources/index.js +3 -0
  550. package/serialization/resources/translations/index.d.ts +1 -0
  551. package/serialization/resources/translations/index.js +1 -0
  552. package/serialization/resources/translations/types/TranslationRequest.d.ts +13 -0
  553. package/serialization/resources/translations/types/TranslationRequest.js +8 -0
  554. package/serialization/resources/translations/types/TranslationResponse.d.ts +12 -0
  555. package/serialization/resources/translations/types/TranslationResponse.js +7 -0
  556. package/serialization/resources/translations/types/index.d.ts +2 -0
  557. package/serialization/resources/translations/types/index.js +2 -0
  558. package/serialization/resources/triggers/types/EventTriggerRequest.d.ts +1 -1
  559. package/serialization/resources/triggers/types/EventTriggerRequest.js +1 -1
  560. package/serialization/resources/triggers/types/index.d.ts +0 -3
  561. package/serialization/resources/triggers/types/index.js +0 -3
  562. package/version.d.ts +1 -0
  563. package/version.js +1 -0
  564. package/api/resources/actions/types/Preconditions.d.ts +0 -7
  565. package/api/resources/commons/types/AppUserIdentification.d.ts +0 -8
  566. package/api/resources/commons/types/User.d.ts +0 -10
  567. package/api/resources/conversation/types/ConversationContext.d.ts +0 -20
  568. package/api/resources/conversation/types/ConversationMessageContext.d.ts +0 -12
  569. package/dist/api/resources/actions/types/Preconditions.d.ts +0 -7
  570. package/dist/api/resources/commons/types/AppUserIdentification.d.ts +0 -8
  571. package/dist/api/resources/commons/types/User.d.ts +0 -10
  572. package/dist/api/resources/conversation/types/ConversationContext.d.ts +0 -20
  573. package/dist/api/resources/conversation/types/ConversationMessageContext.d.ts +0 -12
  574. package/dist/serialization/resources/actions/types/Preconditions.js +0 -7
  575. package/dist/serialization/resources/commons/types/AppUserIdentification.d.ts +0 -13
  576. package/dist/serialization/resources/commons/types/AppUserIdentification.js +0 -8
  577. package/dist/serialization/resources/commons/types/User.d.ts +0 -15
  578. package/dist/serialization/resources/commons/types/User.js +0 -10
  579. package/dist/serialization/resources/conversation/types/ConversationContext.d.ts +0 -20
  580. package/dist/serialization/resources/conversation/types/ConversationContext.js +0 -15
  581. package/dist/serialization/resources/conversation/types/ConversationMessageContext.d.ts +0 -16
  582. package/dist/serialization/resources/conversation/types/ConversationMessageContext.js +0 -11
  583. package/serialization/resources/actions/types/Preconditions.js +0 -7
  584. package/serialization/resources/commons/types/AppUserIdentification.d.ts +0 -13
  585. package/serialization/resources/commons/types/AppUserIdentification.js +0 -8
  586. package/serialization/resources/commons/types/User.d.ts +0 -15
  587. package/serialization/resources/commons/types/User.js +0 -10
  588. package/serialization/resources/conversation/types/ConversationContext.d.ts +0 -20
  589. package/serialization/resources/conversation/types/ConversationContext.js +0 -15
  590. package/serialization/resources/conversation/types/ConversationMessageContext.d.ts +0 -16
  591. package/serialization/resources/conversation/types/ConversationMessageContext.js +0 -11
  592. /package/api/resources/actions/types/{Preconditions.js → ConversationExecutedActionPrecondition.js} +0 -0
  593. /package/api/resources/{commons/types/AppUserIdentification.js → actions/types/ConversationPrecondition.js} +0 -0
  594. /package/api/resources/{commons/types/User.js → actions/types/MetadataPrecondition.js} +0 -0
  595. /package/api/resources/{conversation/types/ConversationContext.js → actions/types/Precondition.js} +0 -0
  596. /package/api/resources/{conversation/types/ConversationMessageContext.js → actions/types/PreconditionBase.js} +0 -0
  597. /package/api/resources/{triggers/types/EventTriggerBase.js → actions/types/PreconditionGroup.js} +0 -0
  598. /package/api/resources/{triggers/types/EventTriggerResponse.js → actions/types/TagsPrecondition.js} +0 -0
  599. /package/api/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
  600. /package/{dist/api/resources/triggers → api/resources/commons}/types/EventTriggerBase.js +0 -0
  601. /package/api/resources/{triggers → commons}/types/EventTriggerResponse.d.ts +0 -0
  602. /package/{dist/api/resources/triggers → api/resources/commons}/types/EventTriggerResponse.js +0 -0
  603. /package/api/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  604. /package/api/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  605. /package/{dist/api/resources/actions/types/Preconditions.js → api/resources/commons/types/FeedbackBase.js} +0 -0
  606. /package/{dist/api/resources/commons/types/AppUserIdentification.js → api/resources/commons/types/UserData.js} +0 -0
  607. /package/{dist/api/resources/commons/types/User.js → api/resources/conversation/client/requests/ConversationGetRequest.js} +0 -0
  608. /package/{dist/api/resources/conversation/types/ConversationContext.js → api/resources/conversation/types/AskStreamActionEvent.js} +0 -0
  609. /package/{dist/api/resources/conversation/types/ConversationMessageContext.js → api/resources/conversation/types/Attachment.js} +0 -0
  610. /package/dist/api/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
  611. /package/dist/api/resources/{triggers → commons}/types/EventTriggerResponse.d.ts +0 -0
  612. /package/dist/api/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  613. /package/dist/api/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  614. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
  615. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerBase.js +0 -0
  616. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  617. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  618. /package/serialization/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
  619. /package/serialization/resources/{triggers → commons}/types/EventTriggerBase.js +0 -0
  620. /package/serialization/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  621. /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.
@@ -32,13 +32,22 @@ export class Conversation {
32
32
  *
33
33
  * @example
34
34
  * await client.conversation.initialize({
35
+ * conversationId: {
36
+ * referenceId: "string"
37
+ * },
35
38
  * messages: [{}],
36
- * context: {},
37
- * id: "string",
38
39
  * responseConfig: {
39
- * capabilities: [MavenAGI.Capability.Markdown],
40
+ * capabilities: ["MARKDOWN"],
40
41
  * isCopilot: true,
41
- * responseLength: MavenAGI.ResponseLength.Short
42
+ * 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"
42
51
  * }
43
52
  * })
44
53
  */
@@ -54,18 +63,20 @@ export class Conversation {
54
63
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
55
64
  "X-Fern-Language": "JavaScript",
56
65
  "X-Fern-SDK-Name": "mavenagi",
57
- "X-Fern-SDK-Version": "0.0.0-alpha.8",
66
+ "X-Fern-SDK-Version": "1.0.0",
67
+ "User-Agent": "mavenagi/1.0.0",
58
68
  "X-Fern-Runtime": core.RUNTIME.type,
59
69
  "X-Fern-Runtime-Version": core.RUNTIME.version,
60
70
  },
61
71
  contentType: "application/json",
62
- body: yield serializers.ConversationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
72
+ requestType: "json",
73
+ body: serializers.ConversationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
63
74
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
64
75
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
65
76
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
66
77
  });
67
78
  if (_response.ok) {
68
- return yield serializers.ConversationResponse.parseOrThrow(_response.body, {
79
+ return serializers.ConversationResponse.parseOrThrow(_response.body, {
69
80
  unrecognizedObjectKeys: "passthrough",
70
81
  allowUnrecognizedUnionMembers: true,
71
82
  allowUnrecognizedEnumValues: true,
@@ -75,21 +86,21 @@ export class Conversation {
75
86
  if (_response.error.reason === "status-code") {
76
87
  switch (_response.error.statusCode) {
77
88
  case 404:
78
- throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
89
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
79
90
  unrecognizedObjectKeys: "passthrough",
80
91
  allowUnrecognizedUnionMembers: true,
81
92
  allowUnrecognizedEnumValues: true,
82
93
  breadcrumbsPrefix: ["response"],
83
94
  }));
84
95
  case 400:
85
- throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
96
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
86
97
  unrecognizedObjectKeys: "passthrough",
87
98
  allowUnrecognizedUnionMembers: true,
88
99
  allowUnrecognizedEnumValues: true,
89
100
  breadcrumbsPrefix: ["response"],
90
101
  }));
91
102
  case 500:
92
- throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
103
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
93
104
  unrecognizedObjectKeys: "passthrough",
94
105
  allowUnrecognizedUnionMembers: true,
95
106
  allowUnrecognizedEnumValues: true,
@@ -121,6 +132,7 @@ export class Conversation {
121
132
  * Get a conversation
122
133
  *
123
134
  * @param {string} conversationId - The ID of the conversation to get
135
+ * @param {MavenAGI.ConversationGetRequest} request
124
136
  * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
125
137
  *
126
138
  * @throws {@link MavenAGI.NotFoundError}
@@ -128,11 +140,18 @@ export class Conversation {
128
140
  * @throws {@link MavenAGI.ServerError}
129
141
  *
130
142
  * @example
131
- * await client.conversation.get("string")
143
+ * await client.conversation.get("string", {
144
+ * appId: "string"
145
+ * })
132
146
  */
133
- get(conversationId, requestOptions) {
147
+ get(conversationId, request = {}, requestOptions) {
134
148
  var _a, _b;
135
149
  return __awaiter(this, void 0, void 0, function* () {
150
+ const { appId } = request;
151
+ const _queryParams = {};
152
+ if (appId != null) {
153
+ _queryParams["appId"] = appId;
154
+ }
136
155
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
137
156
  url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}`),
138
157
  method: "GET",
@@ -142,17 +161,20 @@ export class Conversation {
142
161
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
143
162
  "X-Fern-Language": "JavaScript",
144
163
  "X-Fern-SDK-Name": "mavenagi",
145
- "X-Fern-SDK-Version": "0.0.0-alpha.8",
164
+ "X-Fern-SDK-Version": "1.0.0",
165
+ "User-Agent": "mavenagi/1.0.0",
146
166
  "X-Fern-Runtime": core.RUNTIME.type,
147
167
  "X-Fern-Runtime-Version": core.RUNTIME.version,
148
168
  },
149
169
  contentType: "application/json",
170
+ queryParameters: _queryParams,
171
+ requestType: "json",
150
172
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
151
173
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
152
174
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
153
175
  });
154
176
  if (_response.ok) {
155
- return yield serializers.ConversationResponse.parseOrThrow(_response.body, {
177
+ return serializers.ConversationResponse.parseOrThrow(_response.body, {
156
178
  unrecognizedObjectKeys: "passthrough",
157
179
  allowUnrecognizedUnionMembers: true,
158
180
  allowUnrecognizedEnumValues: true,
@@ -162,21 +184,21 @@ export class Conversation {
162
184
  if (_response.error.reason === "status-code") {
163
185
  switch (_response.error.statusCode) {
164
186
  case 404:
165
- throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
187
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
166
188
  unrecognizedObjectKeys: "passthrough",
167
189
  allowUnrecognizedUnionMembers: true,
168
190
  allowUnrecognizedEnumValues: true,
169
191
  breadcrumbsPrefix: ["response"],
170
192
  }));
171
193
  case 400:
172
- throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
194
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
173
195
  unrecognizedObjectKeys: "passthrough",
174
196
  allowUnrecognizedUnionMembers: true,
175
197
  allowUnrecognizedEnumValues: true,
176
198
  breadcrumbsPrefix: ["response"],
177
199
  }));
178
200
  case 500:
179
- throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
201
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
180
202
  unrecognizedObjectKeys: "passthrough",
181
203
  allowUnrecognizedUnionMembers: true,
182
204
  allowUnrecognizedEnumValues: true,
@@ -217,10 +239,16 @@ export class Conversation {
217
239
  *
218
240
  * @example
219
241
  * await client.conversation.appendNewMessages("string", [{
242
+ * conversationMessageId: {
243
+ * referenceId: "string"
244
+ * },
245
+ * userId: {
246
+ * referenceId: "string"
247
+ * },
220
248
  * text: "string",
221
- * userMessageType: MavenAGI.UserConversationMessageType.User,
222
- * id: "string",
223
- * context: {}
249
+ * userMessageType: "USER",
250
+ * createdAt: new Date("2024-01-15T09:30:00.000Z"),
251
+ * updatedAt: new Date("2024-01-15T09:30:00.000Z")
224
252
  * }])
225
253
  */
226
254
  appendNewMessages(conversationId, request, requestOptions) {
@@ -235,12 +263,14 @@ export class Conversation {
235
263
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
236
264
  "X-Fern-Language": "JavaScript",
237
265
  "X-Fern-SDK-Name": "mavenagi",
238
- "X-Fern-SDK-Version": "0.0.0-alpha.8",
266
+ "X-Fern-SDK-Version": "1.0.0",
267
+ "User-Agent": "mavenagi/1.0.0",
239
268
  "X-Fern-Runtime": core.RUNTIME.type,
240
269
  "X-Fern-Runtime-Version": core.RUNTIME.version,
241
270
  },
242
271
  contentType: "application/json",
243
- body: yield serializers.conversation.appendNewMessages.Request.jsonOrThrow(request, {
272
+ requestType: "json",
273
+ body: serializers.conversation.appendNewMessages.Request.jsonOrThrow(request, {
244
274
  unrecognizedObjectKeys: "strip",
245
275
  }),
246
276
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -248,7 +278,7 @@ export class Conversation {
248
278
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
249
279
  });
250
280
  if (_response.ok) {
251
- return yield serializers.ConversationResponse.parseOrThrow(_response.body, {
281
+ return serializers.ConversationResponse.parseOrThrow(_response.body, {
252
282
  unrecognizedObjectKeys: "passthrough",
253
283
  allowUnrecognizedUnionMembers: true,
254
284
  allowUnrecognizedEnumValues: true,
@@ -258,21 +288,21 @@ export class Conversation {
258
288
  if (_response.error.reason === "status-code") {
259
289
  switch (_response.error.statusCode) {
260
290
  case 404:
261
- throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
291
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
262
292
  unrecognizedObjectKeys: "passthrough",
263
293
  allowUnrecognizedUnionMembers: true,
264
294
  allowUnrecognizedEnumValues: true,
265
295
  breadcrumbsPrefix: ["response"],
266
296
  }));
267
297
  case 400:
268
- throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
298
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
269
299
  unrecognizedObjectKeys: "passthrough",
270
300
  allowUnrecognizedUnionMembers: true,
271
301
  allowUnrecognizedEnumValues: true,
272
302
  breadcrumbsPrefix: ["response"],
273
303
  }));
274
304
  case 500:
275
- throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
305
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
276
306
  unrecognizedObjectKeys: "passthrough",
277
307
  allowUnrecognizedUnionMembers: true,
278
308
  allowUnrecognizedEnumValues: true,
@@ -301,7 +331,7 @@ export class Conversation {
301
331
  });
302
332
  }
303
333
  /**
304
- * Ask a question in a conversation
334
+ * Ask a question
305
335
  *
306
336
  * @param {string} conversationId - The ID of a new or existing conversation to use as context for the question
307
337
  * @param {MavenAGI.AskRequest} request
@@ -312,11 +342,18 @@ export class Conversation {
312
342
  * @throws {@link MavenAGI.ServerError}
313
343
  *
314
344
  * @example
315
- * await client.conversation.ask("string", {
316
- * id: "string",
317
- * text: "string",
318
- * context: {},
319
- * responseConfig: {}
345
+ * await client.conversation.ask("conversation-0", {
346
+ * conversationMessageId: {
347
+ * referenceId: "message-0"
348
+ * },
349
+ * userId: {
350
+ * referenceId: "user-0"
351
+ * },
352
+ * text: "How do I reset my password?",
353
+ * attachments: [{
354
+ * type: "image/png",
355
+ * content: "iVBORw0KGgo..."
356
+ * }]
320
357
  * })
321
358
  */
322
359
  ask(conversationId, request, requestOptions) {
@@ -331,18 +368,20 @@ export class Conversation {
331
368
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
332
369
  "X-Fern-Language": "JavaScript",
333
370
  "X-Fern-SDK-Name": "mavenagi",
334
- "X-Fern-SDK-Version": "0.0.0-alpha.8",
371
+ "X-Fern-SDK-Version": "1.0.0",
372
+ "User-Agent": "mavenagi/1.0.0",
335
373
  "X-Fern-Runtime": core.RUNTIME.type,
336
374
  "X-Fern-Runtime-Version": core.RUNTIME.version,
337
375
  },
338
376
  contentType: "application/json",
339
- body: yield serializers.AskRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
377
+ requestType: "json",
378
+ body: serializers.AskRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
340
379
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
341
380
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
342
381
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
343
382
  });
344
383
  if (_response.ok) {
345
- return yield serializers.ConversationResponse.parseOrThrow(_response.body, {
384
+ return serializers.ConversationResponse.parseOrThrow(_response.body, {
346
385
  unrecognizedObjectKeys: "passthrough",
347
386
  allowUnrecognizedUnionMembers: true,
348
387
  allowUnrecognizedEnumValues: true,
@@ -352,21 +391,21 @@ export class Conversation {
352
391
  if (_response.error.reason === "status-code") {
353
392
  switch (_response.error.statusCode) {
354
393
  case 404:
355
- throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
394
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
356
395
  unrecognizedObjectKeys: "passthrough",
357
396
  allowUnrecognizedUnionMembers: true,
358
397
  allowUnrecognizedEnumValues: true,
359
398
  breadcrumbsPrefix: ["response"],
360
399
  }));
361
400
  case 400:
362
- throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
401
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
363
402
  unrecognizedObjectKeys: "passthrough",
364
403
  allowUnrecognizedUnionMembers: true,
365
404
  allowUnrecognizedEnumValues: true,
366
405
  breadcrumbsPrefix: ["response"],
367
406
  }));
368
407
  case 500:
369
- throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
408
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
370
409
  unrecognizedObjectKeys: "passthrough",
371
410
  allowUnrecognizedUnionMembers: true,
372
411
  allowUnrecognizedEnumValues: true,
@@ -395,7 +434,7 @@ export class Conversation {
395
434
  });
396
435
  }
397
436
  /**
398
- * Ask a question
437
+ * Ask a question with a streaming response. The response will be sent as a stream of events. The text portions of stream responses should be concatenated to form the full response text. Action and metadata events should overwrite past data and do not need concatenation.
399
438
  */
400
439
  askStream(conversationId, request, requestOptions) {
401
440
  var _a, _b;
@@ -409,13 +448,15 @@ export class Conversation {
409
448
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
410
449
  "X-Fern-Language": "JavaScript",
411
450
  "X-Fern-SDK-Name": "mavenagi",
412
- "X-Fern-SDK-Version": "0.0.0-alpha.8",
451
+ "X-Fern-SDK-Version": "1.0.0",
452
+ "User-Agent": "mavenagi/1.0.0",
413
453
  "X-Fern-Runtime": core.RUNTIME.type,
414
454
  "X-Fern-Runtime-Version": core.RUNTIME.version,
415
455
  },
416
456
  contentType: "application/json",
417
- body: yield serializers.AskRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
418
- responseType: "streaming",
457
+ requestType: "json",
458
+ body: serializers.AskRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
459
+ responseType: "sse",
419
460
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
420
461
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
421
462
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -424,7 +465,7 @@ export class Conversation {
424
465
  return new core.Stream({
425
466
  stream: _response.body,
426
467
  parse: (data) => __awaiter(this, void 0, void 0, function* () {
427
- return yield serializers.StreamResponse.parseOrThrow(data, {
468
+ return serializers.StreamResponse.parseOrThrow(data, {
428
469
  unrecognizedObjectKeys: "passthrough",
429
470
  allowUnrecognizedUnionMembers: true,
430
471
  allowUnrecognizedEnumValues: true,
@@ -441,21 +482,21 @@ export class Conversation {
441
482
  if (_response.error.reason === "status-code") {
442
483
  switch (_response.error.statusCode) {
443
484
  case 404:
444
- throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
485
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
445
486
  unrecognizedObjectKeys: "passthrough",
446
487
  allowUnrecognizedUnionMembers: true,
447
488
  allowUnrecognizedEnumValues: true,
448
489
  breadcrumbsPrefix: ["response"],
449
490
  }));
450
491
  case 400:
451
- throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
492
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
452
493
  unrecognizedObjectKeys: "passthrough",
453
494
  allowUnrecognizedUnionMembers: true,
454
495
  allowUnrecognizedEnumValues: true,
455
496
  breadcrumbsPrefix: ["response"],
456
497
  }));
457
498
  case 500:
458
- throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
499
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
459
500
  unrecognizedObjectKeys: "passthrough",
460
501
  allowUnrecognizedUnionMembers: true,
461
502
  allowUnrecognizedEnumValues: true,
@@ -496,7 +537,9 @@ export class Conversation {
496
537
  *
497
538
  * @example
498
539
  * await client.conversation.generateMavenSuggestions("string", {
499
- * messageIds: ["string"]
540
+ * conversationMessageIds: [{
541
+ * referenceId: "string"
542
+ * }]
500
543
  * })
501
544
  */
502
545
  generateMavenSuggestions(conversationId, request, requestOptions) {
@@ -511,20 +554,109 @@ export class Conversation {
511
554
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
512
555
  "X-Fern-Language": "JavaScript",
513
556
  "X-Fern-SDK-Name": "mavenagi",
514
- "X-Fern-SDK-Version": "0.0.0-alpha.8",
557
+ "X-Fern-SDK-Version": "1.0.0",
558
+ "User-Agent": "mavenagi/1.0.0",
515
559
  "X-Fern-Runtime": core.RUNTIME.type,
516
560
  "X-Fern-Runtime-Version": core.RUNTIME.version,
517
561
  },
518
562
  contentType: "application/json",
519
- body: yield serializers.GenerateMavenSuggestionsRequest.jsonOrThrow(request, {
520
- unrecognizedObjectKeys: "strip",
521
- }),
563
+ requestType: "json",
564
+ body: serializers.GenerateMavenSuggestionsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
565
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
566
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
567
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
568
+ });
569
+ if (_response.ok) {
570
+ return serializers.ConversationResponse.parseOrThrow(_response.body, {
571
+ unrecognizedObjectKeys: "passthrough",
572
+ allowUnrecognizedUnionMembers: true,
573
+ allowUnrecognizedEnumValues: true,
574
+ breadcrumbsPrefix: ["response"],
575
+ });
576
+ }
577
+ if (_response.error.reason === "status-code") {
578
+ switch (_response.error.statusCode) {
579
+ case 404:
580
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
581
+ unrecognizedObjectKeys: "passthrough",
582
+ allowUnrecognizedUnionMembers: true,
583
+ allowUnrecognizedEnumValues: true,
584
+ breadcrumbsPrefix: ["response"],
585
+ }));
586
+ case 400:
587
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
588
+ unrecognizedObjectKeys: "passthrough",
589
+ allowUnrecognizedUnionMembers: true,
590
+ allowUnrecognizedEnumValues: true,
591
+ breadcrumbsPrefix: ["response"],
592
+ }));
593
+ case 500:
594
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
595
+ unrecognizedObjectKeys: "passthrough",
596
+ allowUnrecognizedUnionMembers: true,
597
+ allowUnrecognizedEnumValues: true,
598
+ breadcrumbsPrefix: ["response"],
599
+ }));
600
+ default:
601
+ throw new errors.MavenAGIError({
602
+ statusCode: _response.error.statusCode,
603
+ body: _response.error.body,
604
+ });
605
+ }
606
+ }
607
+ switch (_response.error.reason) {
608
+ case "non-json":
609
+ throw new errors.MavenAGIError({
610
+ statusCode: _response.error.statusCode,
611
+ body: _response.error.rawBody,
612
+ });
613
+ case "timeout":
614
+ throw new errors.MavenAGITimeoutError();
615
+ case "unknown":
616
+ throw new errors.MavenAGIError({
617
+ message: _response.error.errorMessage,
618
+ });
619
+ }
620
+ });
621
+ }
622
+ /**
623
+ * Uses an LLM flow to categorize the conversation. Experimental.
624
+ *
625
+ * @param {string} conversationId - The ID of the conversation to categorize
626
+ * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
627
+ *
628
+ * @throws {@link MavenAGI.NotFoundError}
629
+ * @throws {@link MavenAGI.BadRequestError}
630
+ * @throws {@link MavenAGI.ServerError}
631
+ *
632
+ * @example
633
+ * await client.conversation.categorize("string")
634
+ */
635
+ categorize(conversationId, requestOptions) {
636
+ var _a, _b;
637
+ return __awaiter(this, void 0, void 0, function* () {
638
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
639
+ url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/categorize`),
640
+ method: "POST",
641
+ headers: {
642
+ Authorization: yield this._getAuthorizationHeader(),
643
+ "X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
644
+ "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
645
+ "X-Fern-Language": "JavaScript",
646
+ "X-Fern-SDK-Name": "mavenagi",
647
+ "X-Fern-SDK-Version": "1.0.0",
648
+ "User-Agent": "mavenagi/1.0.0",
649
+ "X-Fern-Runtime": core.RUNTIME.type,
650
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
651
+ },
652
+ contentType: "application/json",
653
+ requestType: "json",
522
654
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
523
655
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
524
656
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
525
657
  });
526
658
  if (_response.ok) {
527
- return yield serializers.ConversationResponse.parseOrThrow(_response.body, {
659
+ return serializers.CategorizationResponse.parseOrThrow(_response.body, {
528
660
  unrecognizedObjectKeys: "passthrough",
529
661
  allowUnrecognizedUnionMembers: true,
530
662
  allowUnrecognizedEnumValues: true,
@@ -534,21 +666,21 @@ export class Conversation {
534
666
  if (_response.error.reason === "status-code") {
535
667
  switch (_response.error.statusCode) {
536
668
  case 404:
537
- throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
669
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
538
670
  unrecognizedObjectKeys: "passthrough",
539
671
  allowUnrecognizedUnionMembers: true,
540
672
  allowUnrecognizedEnumValues: true,
541
673
  breadcrumbsPrefix: ["response"],
542
674
  }));
543
675
  case 400:
544
- throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
676
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
545
677
  unrecognizedObjectKeys: "passthrough",
546
678
  allowUnrecognizedUnionMembers: true,
547
679
  allowUnrecognizedEnumValues: true,
548
680
  breadcrumbsPrefix: ["response"],
549
681
  }));
550
682
  case 500:
551
- throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
683
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
552
684
  unrecognizedObjectKeys: "passthrough",
553
685
  allowUnrecognizedUnionMembers: true,
554
686
  allowUnrecognizedEnumValues: true,
@@ -577,7 +709,7 @@ export class Conversation {
577
709
  });
578
710
  }
579
711
  /**
580
- * Create feedback
712
+ * Update feedback or create it if it doesn't exist
581
713
  *
582
714
  * @param {MavenAGI.FeedbackRequest} request
583
715
  * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
@@ -588,11 +720,17 @@ export class Conversation {
588
720
  *
589
721
  * @example
590
722
  * await client.conversation.createFeedback({
591
- * id: "string",
592
- * conversationId: "string",
593
- * conversationMessageId: "string",
594
- * type: MavenAGI.FeedbackType.ThumbsUp,
595
- * text: "string"
723
+ * feedbackId: {
724
+ * referenceId: "feedback-0"
725
+ * },
726
+ * conversationId: {
727
+ * referenceId: "conversation-0"
728
+ * },
729
+ * conversationMessageId: {
730
+ * referenceId: "message-1"
731
+ * },
732
+ * type: "THUMBS_UP",
733
+ * text: "Great answer!"
596
734
  * })
597
735
  */
598
736
  createFeedback(request, requestOptions) {
@@ -607,37 +745,44 @@ export class Conversation {
607
745
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
608
746
  "X-Fern-Language": "JavaScript",
609
747
  "X-Fern-SDK-Name": "mavenagi",
610
- "X-Fern-SDK-Version": "0.0.0-alpha.8",
748
+ "X-Fern-SDK-Version": "1.0.0",
749
+ "User-Agent": "mavenagi/1.0.0",
611
750
  "X-Fern-Runtime": core.RUNTIME.type,
612
751
  "X-Fern-Runtime-Version": core.RUNTIME.version,
613
752
  },
614
753
  contentType: "application/json",
615
- body: yield serializers.FeedbackRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
754
+ requestType: "json",
755
+ body: serializers.FeedbackRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
616
756
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
617
757
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
618
758
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
619
759
  });
620
760
  if (_response.ok) {
621
- return;
761
+ return serializers.Feedback.parseOrThrow(_response.body, {
762
+ unrecognizedObjectKeys: "passthrough",
763
+ allowUnrecognizedUnionMembers: true,
764
+ allowUnrecognizedEnumValues: true,
765
+ breadcrumbsPrefix: ["response"],
766
+ });
622
767
  }
623
768
  if (_response.error.reason === "status-code") {
624
769
  switch (_response.error.statusCode) {
625
770
  case 404:
626
- throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
771
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
627
772
  unrecognizedObjectKeys: "passthrough",
628
773
  allowUnrecognizedUnionMembers: true,
629
774
  allowUnrecognizedEnumValues: true,
630
775
  breadcrumbsPrefix: ["response"],
631
776
  }));
632
777
  case 400:
633
- throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
778
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
634
779
  unrecognizedObjectKeys: "passthrough",
635
780
  allowUnrecognizedUnionMembers: true,
636
781
  allowUnrecognizedEnumValues: true,
637
782
  breadcrumbsPrefix: ["response"],
638
783
  }));
639
784
  case 500:
640
- throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
785
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
641
786
  unrecognizedObjectKeys: "passthrough",
642
787
  allowUnrecognizedUnionMembers: true,
643
788
  allowUnrecognizedEnumValues: true,
@@ -679,16 +824,6 @@ export class Conversation {
679
824
  * @example
680
825
  * await client.conversation.submitActionForm("string", {
681
826
  * actionFormId: "string",
682
- * userContext: {
683
- * name: "string",
684
- * id: {
685
- * "string": "string"
686
- * },
687
- * email: "string",
688
- * context: {
689
- * "string": "string"
690
- * }
691
- * },
692
827
  * parameters: {
693
828
  * "string": {
694
829
  * "key": "value"
@@ -708,18 +843,20 @@ export class Conversation {
708
843
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
709
844
  "X-Fern-Language": "JavaScript",
710
845
  "X-Fern-SDK-Name": "mavenagi",
711
- "X-Fern-SDK-Version": "0.0.0-alpha.8",
846
+ "X-Fern-SDK-Version": "1.0.0",
847
+ "User-Agent": "mavenagi/1.0.0",
712
848
  "X-Fern-Runtime": core.RUNTIME.type,
713
849
  "X-Fern-Runtime-Version": core.RUNTIME.version,
714
850
  },
715
851
  contentType: "application/json",
716
- body: yield serializers.SubmitActionFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
852
+ requestType: "json",
853
+ body: serializers.SubmitActionFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
717
854
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
718
855
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
719
856
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
720
857
  });
721
858
  if (_response.ok) {
722
- return yield serializers.ConversationResponse.parseOrThrow(_response.body, {
859
+ return serializers.ConversationResponse.parseOrThrow(_response.body, {
723
860
  unrecognizedObjectKeys: "passthrough",
724
861
  allowUnrecognizedUnionMembers: true,
725
862
  allowUnrecognizedEnumValues: true,
@@ -729,21 +866,21 @@ export class Conversation {
729
866
  if (_response.error.reason === "status-code") {
730
867
  switch (_response.error.statusCode) {
731
868
  case 404:
732
- throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
869
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
733
870
  unrecognizedObjectKeys: "passthrough",
734
871
  allowUnrecognizedUnionMembers: true,
735
872
  allowUnrecognizedEnumValues: true,
736
873
  breadcrumbsPrefix: ["response"],
737
874
  }));
738
875
  case 400:
739
- throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
876
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
740
877
  unrecognizedObjectKeys: "passthrough",
741
878
  allowUnrecognizedUnionMembers: true,
742
879
  allowUnrecognizedEnumValues: true,
743
880
  breadcrumbsPrefix: ["response"],
744
881
  }));
745
882
  case 500:
746
- throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
883
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
747
884
  unrecognizedObjectKeys: "passthrough",
748
885
  allowUnrecognizedUnionMembers: true,
749
886
  allowUnrecognizedEnumValues: true,
@@ -772,7 +909,7 @@ export class Conversation {
772
909
  });
773
910
  }
774
911
  /**
775
- * Add metadata to an existing conversation's Context. If a metadata field already exists, it will be overwritten.
912
+ * Add metadata to an existing conversation. If a metadata field already exists, it will be overwritten.
776
913
  *
777
914
  * @param {string} conversationId - The ID of a conversation the metadata being added belongs to
778
915
  * @param {Record<string, string>} request
@@ -799,12 +936,14 @@ export class Conversation {
799
936
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
800
937
  "X-Fern-Language": "JavaScript",
801
938
  "X-Fern-SDK-Name": "mavenagi",
802
- "X-Fern-SDK-Version": "0.0.0-alpha.8",
939
+ "X-Fern-SDK-Version": "1.0.0",
940
+ "User-Agent": "mavenagi/1.0.0",
803
941
  "X-Fern-Runtime": core.RUNTIME.type,
804
942
  "X-Fern-Runtime-Version": core.RUNTIME.version,
805
943
  },
806
944
  contentType: "application/json",
807
- body: yield serializers.conversation.addConversationMetadata.Request.jsonOrThrow(request, {
945
+ requestType: "json",
946
+ body: serializers.conversation.addConversationMetadata.Request.jsonOrThrow(request, {
808
947
  unrecognizedObjectKeys: "strip",
809
948
  }),
810
949
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -812,7 +951,7 @@ export class Conversation {
812
951
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
813
952
  });
814
953
  if (_response.ok) {
815
- return yield serializers.conversation.addConversationMetadata.Response.parseOrThrow(_response.body, {
954
+ return serializers.conversation.addConversationMetadata.Response.parseOrThrow(_response.body, {
816
955
  unrecognizedObjectKeys: "passthrough",
817
956
  allowUnrecognizedUnionMembers: true,
818
957
  allowUnrecognizedEnumValues: true,
@@ -822,21 +961,21 @@ export class Conversation {
822
961
  if (_response.error.reason === "status-code") {
823
962
  switch (_response.error.statusCode) {
824
963
  case 404:
825
- throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
964
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
826
965
  unrecognizedObjectKeys: "passthrough",
827
966
  allowUnrecognizedUnionMembers: true,
828
967
  allowUnrecognizedEnumValues: true,
829
968
  breadcrumbsPrefix: ["response"],
830
969
  }));
831
970
  case 400:
832
- throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
971
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
833
972
  unrecognizedObjectKeys: "passthrough",
834
973
  allowUnrecognizedUnionMembers: true,
835
974
  allowUnrecognizedEnumValues: true,
836
975
  breadcrumbsPrefix: ["response"],
837
976
  }));
838
977
  case 500:
839
- throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
978
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
840
979
  unrecognizedObjectKeys: "passthrough",
841
980
  allowUnrecognizedUnionMembers: true,
842
981
  allowUnrecognizedEnumValues: true,