mavenagi 0.0.0-alpha.2 → 0.0.0-alpha.4

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 (404) hide show
  1. package/Client.d.ts +9 -0
  2. package/Client.js +15 -0
  3. package/README.md +63 -39
  4. package/api/resources/actions/client/Client.d.ts +123 -0
  5. package/api/resources/actions/client/Client.js +564 -0
  6. package/api/resources/actions/client/index.d.ts +1 -0
  7. package/api/resources/actions/client/index.js +1 -0
  8. package/api/resources/actions/index.d.ts +2 -0
  9. package/api/resources/actions/index.js +2 -0
  10. package/api/resources/actions/types/Action.d.ts +23 -0
  11. package/api/resources/actions/types/ActionParameter.d.ts +8 -0
  12. package/api/resources/actions/types/ActionSetBase.d.ts +9 -0
  13. package/api/resources/actions/types/ActionSetRequest.d.ts +6 -0
  14. package/api/resources/actions/types/ActionSetResponse.d.ts +6 -0
  15. package/api/resources/actions/types/ActionSetResponse.js +4 -0
  16. package/api/resources/actions/types/index.d.ts +5 -0
  17. package/api/resources/actions/types/index.js +5 -0
  18. package/api/resources/commons/errors/{AgentNotFoundError.d.ts → BadRequestError.d.ts} +1 -1
  19. package/api/resources/{conversation/errors/EmptyConversationError.js → commons/errors/BadRequestError.js} +3 -3
  20. package/{dist/api/resources/commons/errors/AgentNotFoundError.d.ts → api/resources/commons/errors/NotFoundError.d.ts} +1 -1
  21. package/{dist/api/resources/commons/errors/AgentNotFoundError.js → api/resources/commons/errors/NotFoundError.js} +3 -3
  22. package/{dist/api/resources/conversation/errors/EmptyConversationError.d.ts → api/resources/commons/errors/ServerError.d.ts} +1 -1
  23. package/api/resources/commons/errors/ServerError.js +14 -0
  24. package/api/resources/commons/errors/index.d.ts +3 -1
  25. package/api/resources/commons/errors/index.js +3 -1
  26. package/api/resources/commons/types/AppUser.d.ts +10 -0
  27. package/api/resources/commons/types/AppUser.js +4 -0
  28. package/api/resources/commons/types/AppUserIdentification.d.ts +8 -0
  29. package/api/resources/commons/types/AppUserIdentification.js +4 -0
  30. package/api/resources/commons/types/AppUserIdentifyingProperty.d.ts +9 -0
  31. package/api/resources/commons/types/AppUserIdentifyingProperty.js +4 -0
  32. package/api/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +8 -0
  33. package/api/resources/commons/types/AppUserIdentifyingPropertyType.js +7 -0
  34. package/api/resources/commons/types/Feedback.d.ts +16 -0
  35. package/api/resources/commons/types/Feedback.js +4 -0
  36. package/api/resources/{conversation → commons}/types/FeedbackType.d.ts +3 -1
  37. package/{dist/api/resources/conversation → api/resources/commons}/types/FeedbackType.js +2 -0
  38. package/api/resources/commons/types/User.d.ts +1 -0
  39. package/api/resources/commons/types/index.d.ts +6 -0
  40. package/api/resources/commons/types/index.js +6 -0
  41. package/api/resources/conversation/client/Client.d.ts +69 -31
  42. package/api/resources/conversation/client/Client.js +223 -111
  43. package/api/resources/conversation/index.d.ts +0 -1
  44. package/api/resources/conversation/index.js +0 -1
  45. package/api/resources/conversation/types/ActionExecutionRequest.d.ts +10 -0
  46. package/api/resources/conversation/types/ActionExecutionRequest.js +4 -0
  47. package/api/resources/conversation/types/ActionExecutionResponse.d.ts +7 -0
  48. package/api/resources/conversation/types/ActionExecutionResponse.js +4 -0
  49. package/api/resources/conversation/types/AskRequest.d.ts +2 -0
  50. package/api/resources/conversation/types/BotActionFormResponse.d.ts +1 -0
  51. package/api/resources/conversation/types/Capability.d.ts +8 -0
  52. package/api/resources/conversation/types/Capability.js +7 -0
  53. package/api/resources/conversation/types/ConversationBase.d.ts +2 -0
  54. package/api/resources/conversation/types/FeedbackRequest.d.ts +1 -8
  55. package/api/resources/conversation/types/ResponseConfig.d.ts +12 -0
  56. package/api/resources/conversation/types/ResponseConfig.js +4 -0
  57. package/api/resources/conversation/types/ResponseLength.d.ts +9 -0
  58. package/api/resources/conversation/types/ResponseLength.js +8 -0
  59. package/api/resources/conversation/types/UserMessage.d.ts +1 -0
  60. package/api/resources/conversation/types/index.d.ts +5 -1
  61. package/api/resources/conversation/types/index.js +5 -1
  62. package/api/resources/index.d.ts +5 -2
  63. package/api/resources/index.js +5 -2
  64. package/api/resources/knowledge/client/Client.d.ts +52 -40
  65. package/api/resources/knowledge/client/Client.js +191 -129
  66. package/api/resources/knowledge/index.d.ts +0 -1
  67. package/api/resources/knowledge/index.js +0 -1
  68. package/api/resources/knowledge/types/{KnowledgeDocument.d.ts → BaseKnowledgeDocument.d.ts} +1 -3
  69. package/api/resources/knowledge/types/BaseKnowledgeDocument.js +4 -0
  70. package/api/resources/knowledge/types/KnowledgeBaseType.d.ts +1 -1
  71. package/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +1 -1
  72. package/api/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +11 -0
  73. package/api/resources/knowledge/types/KnowledgeDocumentContentType.js +7 -0
  74. package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +9 -0
  75. package/api/resources/knowledge/types/KnowledgeDocumentRequest.js +4 -0
  76. package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +8 -0
  77. package/api/resources/knowledge/types/KnowledgeDocumentResponse.js +4 -0
  78. package/api/resources/knowledge/types/index.d.ts +4 -2
  79. package/api/resources/knowledge/types/index.js +4 -2
  80. package/api/resources/triggers/client/Client.d.ts +72 -0
  81. package/api/resources/triggers/client/Client.js +298 -0
  82. package/api/resources/triggers/client/index.d.ts +1 -0
  83. package/api/resources/triggers/client/index.js +1 -0
  84. package/api/resources/triggers/index.d.ts +2 -0
  85. package/api/resources/triggers/index.js +2 -0
  86. package/api/resources/triggers/types/EventTrigger.d.ts +12 -0
  87. package/api/resources/triggers/types/EventTrigger.js +4 -0
  88. package/api/resources/triggers/types/EventTriggerType.d.ts +8 -0
  89. package/api/resources/triggers/types/EventTriggerType.js +7 -0
  90. package/api/resources/triggers/types/index.d.ts +2 -0
  91. package/api/resources/triggers/types/index.js +2 -0
  92. package/api/resources/user/client/Client.d.ts +62 -0
  93. package/api/resources/user/client/Client.js +220 -0
  94. package/api/resources/user/client/index.d.ts +1 -0
  95. package/api/resources/user/client/index.js +1 -0
  96. package/api/resources/user/index.d.ts +1 -0
  97. package/api/resources/user/index.js +1 -0
  98. package/core/index.d.ts +1 -1
  99. package/core/index.js +1 -1
  100. package/dist/Client.d.ts +9 -0
  101. package/dist/Client.js +15 -0
  102. package/dist/api/resources/actions/client/Client.d.ts +123 -0
  103. package/dist/api/resources/actions/client/Client.js +564 -0
  104. package/dist/api/resources/actions/client/index.d.ts +1 -0
  105. package/dist/api/resources/actions/client/index.js +1 -0
  106. package/dist/api/resources/actions/index.d.ts +2 -0
  107. package/dist/api/resources/actions/index.js +2 -0
  108. package/dist/api/resources/actions/types/Action.d.ts +23 -0
  109. package/dist/api/resources/actions/types/Action.js +4 -0
  110. package/dist/api/resources/actions/types/ActionParameter.d.ts +8 -0
  111. package/dist/api/resources/actions/types/ActionParameter.js +4 -0
  112. package/dist/api/resources/actions/types/ActionSetBase.d.ts +9 -0
  113. package/dist/api/resources/actions/types/ActionSetBase.js +4 -0
  114. package/dist/api/resources/actions/types/ActionSetRequest.d.ts +6 -0
  115. package/dist/api/resources/actions/types/ActionSetRequest.js +4 -0
  116. package/dist/api/resources/actions/types/ActionSetResponse.d.ts +6 -0
  117. package/dist/api/resources/actions/types/ActionSetResponse.js +4 -0
  118. package/dist/api/resources/actions/types/index.d.ts +5 -0
  119. package/dist/api/resources/actions/types/index.js +5 -0
  120. package/{api/resources/conversation/errors/EmptyConversationError.d.ts → dist/api/resources/commons/errors/BadRequestError.d.ts} +1 -1
  121. package/dist/api/resources/{knowledge/errors/VersionInProgressError.js → commons/errors/BadRequestError.js} +3 -3
  122. package/dist/api/resources/commons/errors/NotFoundError.d.ts +8 -0
  123. package/{api/resources/commons/errors/AgentNotFoundError.js → dist/api/resources/commons/errors/NotFoundError.js} +3 -3
  124. package/dist/api/resources/commons/errors/ServerError.d.ts +8 -0
  125. package/dist/api/resources/commons/errors/ServerError.js +14 -0
  126. package/dist/api/resources/commons/errors/index.d.ts +3 -1
  127. package/dist/api/resources/commons/errors/index.js +3 -1
  128. package/dist/api/resources/commons/types/AppUser.d.ts +10 -0
  129. package/dist/api/resources/commons/types/AppUser.js +4 -0
  130. package/dist/api/resources/commons/types/AppUserIdentification.d.ts +8 -0
  131. package/dist/api/resources/commons/types/AppUserIdentification.js +4 -0
  132. package/dist/api/resources/commons/types/AppUserIdentifyingProperty.d.ts +9 -0
  133. package/dist/api/resources/commons/types/AppUserIdentifyingProperty.js +4 -0
  134. package/dist/api/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +8 -0
  135. package/dist/api/resources/commons/types/AppUserIdentifyingPropertyType.js +7 -0
  136. package/dist/api/resources/commons/types/Feedback.d.ts +16 -0
  137. package/dist/api/resources/commons/types/Feedback.js +4 -0
  138. package/dist/api/resources/{conversation → commons}/types/FeedbackType.d.ts +3 -1
  139. package/{api/resources/conversation → dist/api/resources/commons}/types/FeedbackType.js +2 -0
  140. package/dist/api/resources/commons/types/User.d.ts +1 -0
  141. package/dist/api/resources/commons/types/index.d.ts +6 -0
  142. package/dist/api/resources/commons/types/index.js +6 -0
  143. package/dist/api/resources/conversation/client/Client.d.ts +69 -31
  144. package/dist/api/resources/conversation/client/Client.js +223 -111
  145. package/dist/api/resources/conversation/index.d.ts +0 -1
  146. package/dist/api/resources/conversation/index.js +0 -1
  147. package/dist/api/resources/conversation/types/ActionExecutionRequest.d.ts +10 -0
  148. package/dist/api/resources/conversation/types/ActionExecutionRequest.js +4 -0
  149. package/dist/api/resources/conversation/types/ActionExecutionResponse.d.ts +7 -0
  150. package/dist/api/resources/conversation/types/ActionExecutionResponse.js +4 -0
  151. package/dist/api/resources/conversation/types/AskRequest.d.ts +2 -0
  152. package/dist/api/resources/conversation/types/BotActionFormResponse.d.ts +1 -0
  153. package/dist/api/resources/conversation/types/Capability.d.ts +8 -0
  154. package/dist/api/resources/conversation/types/Capability.js +7 -0
  155. package/dist/api/resources/conversation/types/ConversationBase.d.ts +2 -0
  156. package/dist/api/resources/conversation/types/FeedbackRequest.d.ts +1 -8
  157. package/dist/api/resources/conversation/types/ResponseConfig.d.ts +12 -0
  158. package/dist/api/resources/conversation/types/ResponseConfig.js +4 -0
  159. package/dist/api/resources/conversation/types/ResponseLength.d.ts +9 -0
  160. package/dist/api/resources/conversation/types/ResponseLength.js +8 -0
  161. package/dist/api/resources/conversation/types/UserMessage.d.ts +1 -0
  162. package/dist/api/resources/conversation/types/index.d.ts +5 -1
  163. package/dist/api/resources/conversation/types/index.js +5 -1
  164. package/dist/api/resources/index.d.ts +5 -2
  165. package/dist/api/resources/index.js +5 -2
  166. package/dist/api/resources/knowledge/client/Client.d.ts +52 -40
  167. package/dist/api/resources/knowledge/client/Client.js +191 -129
  168. package/dist/api/resources/knowledge/index.d.ts +0 -1
  169. package/dist/api/resources/knowledge/index.js +0 -1
  170. package/dist/api/resources/knowledge/types/{KnowledgeDocument.d.ts → BaseKnowledgeDocument.d.ts} +1 -3
  171. package/dist/api/resources/knowledge/types/BaseKnowledgeDocument.js +4 -0
  172. package/dist/api/resources/knowledge/types/KnowledgeBaseType.d.ts +1 -1
  173. package/dist/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +1 -1
  174. package/dist/api/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +11 -0
  175. package/dist/api/resources/knowledge/types/KnowledgeDocumentContentType.js +7 -0
  176. package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +9 -0
  177. package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.js +4 -0
  178. package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +8 -0
  179. package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.js +4 -0
  180. package/dist/api/resources/knowledge/types/index.d.ts +4 -2
  181. package/dist/api/resources/knowledge/types/index.js +4 -2
  182. package/dist/api/resources/triggers/client/Client.d.ts +72 -0
  183. package/dist/api/resources/triggers/client/Client.js +298 -0
  184. package/dist/api/resources/triggers/client/index.d.ts +1 -0
  185. package/dist/api/resources/triggers/client/index.js +1 -0
  186. package/dist/api/resources/triggers/index.d.ts +2 -0
  187. package/dist/api/resources/triggers/index.js +2 -0
  188. package/dist/api/resources/triggers/types/EventTrigger.d.ts +12 -0
  189. package/dist/api/resources/triggers/types/EventTrigger.js +4 -0
  190. package/dist/api/resources/triggers/types/EventTriggerType.d.ts +8 -0
  191. package/dist/api/resources/triggers/types/EventTriggerType.js +7 -0
  192. package/dist/api/resources/triggers/types/index.d.ts +2 -0
  193. package/dist/api/resources/triggers/types/index.js +2 -0
  194. package/dist/api/resources/user/client/Client.d.ts +62 -0
  195. package/dist/api/resources/user/client/Client.js +220 -0
  196. package/dist/api/resources/user/client/index.d.ts +1 -0
  197. package/dist/api/resources/user/client/index.js +1 -0
  198. package/dist/api/resources/user/index.d.ts +1 -0
  199. package/dist/api/resources/user/index.js +1 -0
  200. package/dist/core/index.d.ts +1 -1
  201. package/dist/core/index.js +1 -1
  202. package/dist/serialization/resources/actions/index.d.ts +1 -0
  203. package/dist/serialization/resources/actions/index.js +1 -0
  204. package/dist/serialization/resources/actions/types/Action.d.ts +21 -0
  205. package/dist/serialization/resources/actions/types/Action.js +16 -0
  206. package/dist/serialization/resources/actions/types/ActionParameter.d.ts +14 -0
  207. package/dist/serialization/resources/actions/types/ActionParameter.js +9 -0
  208. package/dist/serialization/resources/{knowledge/types/IdBody.d.ts → actions/types/ActionSetBase.d.ts} +4 -3
  209. package/dist/serialization/resources/actions/types/ActionSetBase.js +8 -0
  210. package/dist/serialization/resources/actions/types/ActionSetRequest.d.ts +12 -0
  211. package/dist/serialization/resources/actions/types/ActionSetRequest.js +6 -0
  212. package/dist/serialization/resources/actions/types/ActionSetResponse.d.ts +12 -0
  213. package/dist/serialization/resources/actions/types/ActionSetResponse.js +6 -0
  214. package/dist/serialization/resources/actions/types/index.d.ts +5 -0
  215. package/dist/serialization/resources/actions/types/index.js +5 -0
  216. package/dist/serialization/resources/commons/types/AppUser.d.ts +15 -0
  217. package/dist/serialization/resources/commons/types/AppUser.js +10 -0
  218. package/dist/serialization/resources/commons/types/AppUserIdentification.d.ts +13 -0
  219. package/dist/serialization/resources/commons/types/AppUserIdentification.js +8 -0
  220. package/dist/serialization/resources/commons/types/AppUserIdentifyingProperty.d.ts +14 -0
  221. package/dist/serialization/resources/commons/types/AppUserIdentifyingProperty.js +9 -0
  222. package/dist/serialization/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +10 -0
  223. package/dist/serialization/resources/{knowledge/types/IdBody.js → commons/types/AppUserIdentifyingPropertyType.js} +1 -3
  224. package/dist/serialization/resources/commons/types/Feedback.d.ts +17 -0
  225. package/dist/serialization/resources/commons/types/Feedback.js +12 -0
  226. package/dist/serialization/resources/{conversation → commons}/types/FeedbackType.d.ts +1 -1
  227. package/dist/serialization/resources/{conversation → commons}/types/FeedbackType.js +1 -1
  228. package/dist/serialization/resources/commons/types/User.d.ts +1 -0
  229. package/dist/serialization/resources/commons/types/User.js +1 -0
  230. package/dist/serialization/resources/commons/types/index.d.ts +6 -0
  231. package/dist/serialization/resources/commons/types/index.js +6 -0
  232. package/dist/serialization/resources/conversation/types/ActionExecutionRequest.d.ts +15 -0
  233. package/dist/serialization/resources/conversation/types/ActionExecutionRequest.js +10 -0
  234. package/dist/serialization/resources/conversation/types/ActionExecutionResponse.d.ts +12 -0
  235. package/dist/serialization/resources/conversation/types/ActionExecutionResponse.js +7 -0
  236. package/dist/serialization/resources/conversation/types/AskRequest.d.ts +2 -0
  237. package/dist/serialization/resources/conversation/types/AskRequest.js +2 -0
  238. package/dist/serialization/resources/conversation/types/BotActionFormResponse.d.ts +1 -0
  239. package/dist/serialization/resources/conversation/types/BotActionFormResponse.js +1 -0
  240. package/dist/serialization/resources/conversation/types/Capability.d.ts +10 -0
  241. package/{serialization/resources/knowledge/types/IdBody.js → dist/serialization/resources/conversation/types/Capability.js} +1 -3
  242. package/dist/serialization/resources/conversation/types/ConversationBase.d.ts +2 -0
  243. package/dist/serialization/resources/conversation/types/ConversationBase.js +2 -0
  244. package/dist/serialization/resources/conversation/types/FeedbackRequest.d.ts +2 -6
  245. package/dist/serialization/resources/conversation/types/FeedbackRequest.js +2 -7
  246. package/dist/serialization/resources/conversation/types/ResponseConfig.d.ts +16 -0
  247. package/dist/serialization/resources/conversation/types/ResponseConfig.js +11 -0
  248. package/dist/serialization/resources/conversation/types/ResponseLength.d.ts +10 -0
  249. package/dist/serialization/resources/conversation/types/ResponseLength.js +5 -0
  250. package/dist/serialization/resources/conversation/types/index.d.ts +5 -1
  251. package/dist/serialization/resources/conversation/types/index.js +5 -1
  252. package/dist/serialization/resources/index.d.ts +4 -0
  253. package/dist/serialization/resources/index.js +4 -0
  254. package/dist/serialization/resources/knowledge/types/{KnowledgeDocument.d.ts → BaseKnowledgeDocument.d.ts} +4 -5
  255. package/{serialization/resources/knowledge/types/KnowledgeDocument.js → dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.js} +3 -4
  256. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +10 -0
  257. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentContentType.js +5 -0
  258. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +15 -0
  259. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +12 -0
  260. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +13 -0
  261. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +10 -0
  262. package/dist/serialization/resources/knowledge/types/index.d.ts +4 -2
  263. package/dist/serialization/resources/knowledge/types/index.js +4 -2
  264. package/dist/serialization/resources/triggers/index.d.ts +1 -0
  265. package/dist/serialization/resources/triggers/index.js +1 -0
  266. package/dist/serialization/resources/triggers/types/EventTrigger.d.ts +15 -0
  267. package/dist/serialization/resources/triggers/types/EventTrigger.js +10 -0
  268. package/dist/serialization/resources/triggers/types/EventTriggerType.d.ts +10 -0
  269. package/dist/serialization/resources/triggers/types/EventTriggerType.js +5 -0
  270. package/dist/serialization/resources/triggers/types/index.d.ts +2 -0
  271. package/dist/serialization/resources/triggers/types/index.js +2 -0
  272. package/package.json +1 -1
  273. package/serialization/resources/actions/index.d.ts +1 -0
  274. package/serialization/resources/actions/index.js +1 -0
  275. package/serialization/resources/actions/types/Action.d.ts +21 -0
  276. package/serialization/resources/actions/types/Action.js +16 -0
  277. package/serialization/resources/actions/types/ActionParameter.d.ts +14 -0
  278. package/serialization/resources/actions/types/ActionParameter.js +9 -0
  279. package/serialization/resources/{knowledge/types/IdBody.d.ts → actions/types/ActionSetBase.d.ts} +4 -3
  280. package/serialization/resources/actions/types/ActionSetBase.js +8 -0
  281. package/serialization/resources/actions/types/ActionSetRequest.d.ts +12 -0
  282. package/serialization/resources/actions/types/ActionSetRequest.js +6 -0
  283. package/serialization/resources/actions/types/ActionSetResponse.d.ts +12 -0
  284. package/serialization/resources/actions/types/ActionSetResponse.js +6 -0
  285. package/serialization/resources/actions/types/index.d.ts +5 -0
  286. package/serialization/resources/actions/types/index.js +5 -0
  287. package/serialization/resources/commons/types/AppUser.d.ts +15 -0
  288. package/serialization/resources/commons/types/AppUser.js +10 -0
  289. package/serialization/resources/commons/types/AppUserIdentification.d.ts +13 -0
  290. package/serialization/resources/commons/types/AppUserIdentification.js +8 -0
  291. package/serialization/resources/commons/types/AppUserIdentifyingProperty.d.ts +14 -0
  292. package/serialization/resources/commons/types/AppUserIdentifyingProperty.js +9 -0
  293. package/serialization/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +10 -0
  294. package/serialization/resources/commons/types/AppUserIdentifyingPropertyType.js +5 -0
  295. package/serialization/resources/commons/types/Feedback.d.ts +17 -0
  296. package/serialization/resources/commons/types/Feedback.js +12 -0
  297. package/serialization/resources/{conversation → commons}/types/FeedbackType.d.ts +1 -1
  298. package/serialization/resources/{conversation → commons}/types/FeedbackType.js +1 -1
  299. package/serialization/resources/commons/types/User.d.ts +1 -0
  300. package/serialization/resources/commons/types/User.js +1 -0
  301. package/serialization/resources/commons/types/index.d.ts +6 -0
  302. package/serialization/resources/commons/types/index.js +6 -0
  303. package/serialization/resources/conversation/types/ActionExecutionRequest.d.ts +15 -0
  304. package/serialization/resources/conversation/types/ActionExecutionRequest.js +10 -0
  305. package/serialization/resources/conversation/types/ActionExecutionResponse.d.ts +12 -0
  306. package/serialization/resources/conversation/types/ActionExecutionResponse.js +7 -0
  307. package/serialization/resources/conversation/types/AskRequest.d.ts +2 -0
  308. package/serialization/resources/conversation/types/AskRequest.js +2 -0
  309. package/serialization/resources/conversation/types/BotActionFormResponse.d.ts +1 -0
  310. package/serialization/resources/conversation/types/BotActionFormResponse.js +1 -0
  311. package/serialization/resources/conversation/types/Capability.d.ts +10 -0
  312. package/serialization/resources/conversation/types/Capability.js +5 -0
  313. package/serialization/resources/conversation/types/ConversationBase.d.ts +2 -0
  314. package/serialization/resources/conversation/types/ConversationBase.js +2 -0
  315. package/serialization/resources/conversation/types/FeedbackRequest.d.ts +2 -6
  316. package/serialization/resources/conversation/types/FeedbackRequest.js +2 -7
  317. package/serialization/resources/conversation/types/ResponseConfig.d.ts +16 -0
  318. package/serialization/resources/conversation/types/ResponseConfig.js +11 -0
  319. package/serialization/resources/conversation/types/ResponseLength.d.ts +10 -0
  320. package/serialization/resources/conversation/types/ResponseLength.js +5 -0
  321. package/serialization/resources/conversation/types/index.d.ts +5 -1
  322. package/serialization/resources/conversation/types/index.js +5 -1
  323. package/serialization/resources/index.d.ts +4 -0
  324. package/serialization/resources/index.js +4 -0
  325. package/serialization/resources/knowledge/types/{KnowledgeDocument.d.ts → BaseKnowledgeDocument.d.ts} +4 -5
  326. package/{dist/serialization/resources/knowledge/types/KnowledgeDocument.js → serialization/resources/knowledge/types/BaseKnowledgeDocument.js} +3 -4
  327. package/serialization/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +10 -0
  328. package/serialization/resources/knowledge/types/KnowledgeDocumentContentType.js +5 -0
  329. package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +15 -0
  330. package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +12 -0
  331. package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +13 -0
  332. package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +10 -0
  333. package/serialization/resources/knowledge/types/index.d.ts +4 -2
  334. package/serialization/resources/knowledge/types/index.js +4 -2
  335. package/serialization/resources/triggers/index.d.ts +1 -0
  336. package/serialization/resources/triggers/index.js +1 -0
  337. package/serialization/resources/triggers/types/EventTrigger.d.ts +15 -0
  338. package/serialization/resources/triggers/types/EventTrigger.js +10 -0
  339. package/serialization/resources/triggers/types/EventTriggerType.d.ts +10 -0
  340. package/serialization/resources/triggers/types/EventTriggerType.js +5 -0
  341. package/serialization/resources/triggers/types/index.d.ts +2 -0
  342. package/serialization/resources/triggers/types/index.js +2 -0
  343. package/api/resources/conversation/errors/ConversationAlreadyExistsError.d.ts +0 -8
  344. package/api/resources/conversation/errors/ConversationAlreadyExistsError.js +0 -14
  345. package/api/resources/conversation/errors/ConversationMessageNotFoundError.d.ts +0 -8
  346. package/api/resources/conversation/errors/ConversationMessageNotFoundError.js +0 -14
  347. package/api/resources/conversation/errors/ConversationNotFoundError.d.ts +0 -8
  348. package/api/resources/conversation/errors/ConversationNotFoundError.js +0 -14
  349. package/api/resources/conversation/errors/InvalidConversationIdError.d.ts +0 -8
  350. package/api/resources/conversation/errors/InvalidConversationIdError.js +0 -14
  351. package/api/resources/conversation/errors/InvalidConversationMessageIdError.d.ts +0 -8
  352. package/api/resources/conversation/errors/InvalidConversationMessageIdError.js +0 -14
  353. package/api/resources/conversation/errors/InvalidFeedbackTypeError.d.ts +0 -8
  354. package/api/resources/conversation/errors/InvalidFeedbackTypeError.js +0 -14
  355. package/api/resources/conversation/errors/index.d.ts +0 -7
  356. package/api/resources/conversation/errors/index.js +0 -7
  357. package/api/resources/knowledge/errors/DocumentCreationError.d.ts +0 -7
  358. package/api/resources/knowledge/errors/DocumentCreationError.js +0 -13
  359. package/api/resources/knowledge/errors/DocumentNotFoundError.d.ts +0 -8
  360. package/api/resources/knowledge/errors/DocumentNotFoundError.js +0 -14
  361. package/api/resources/knowledge/errors/IneligibleKnowledgeBaseError.d.ts +0 -8
  362. package/api/resources/knowledge/errors/IneligibleKnowledgeBaseError.js +0 -14
  363. package/api/resources/knowledge/errors/KnowledgeBaseNotFoundError.d.ts +0 -8
  364. package/api/resources/knowledge/errors/KnowledgeBaseNotFoundError.js +0 -14
  365. package/api/resources/knowledge/errors/VersionInProgressError.d.ts +0 -8
  366. package/api/resources/knowledge/errors/VersionInProgressError.js +0 -14
  367. package/api/resources/knowledge/errors/VersionNotInProgressError.d.ts +0 -8
  368. package/api/resources/knowledge/errors/VersionNotInProgressError.js +0 -14
  369. package/api/resources/knowledge/errors/index.d.ts +0 -6
  370. package/api/resources/knowledge/errors/index.js +0 -6
  371. package/api/resources/knowledge/types/IdBody.d.ts +0 -6
  372. package/dist/api/resources/conversation/errors/ConversationAlreadyExistsError.d.ts +0 -8
  373. package/dist/api/resources/conversation/errors/ConversationAlreadyExistsError.js +0 -14
  374. package/dist/api/resources/conversation/errors/ConversationMessageNotFoundError.d.ts +0 -8
  375. package/dist/api/resources/conversation/errors/ConversationMessageNotFoundError.js +0 -14
  376. package/dist/api/resources/conversation/errors/ConversationNotFoundError.d.ts +0 -8
  377. package/dist/api/resources/conversation/errors/ConversationNotFoundError.js +0 -14
  378. package/dist/api/resources/conversation/errors/EmptyConversationError.js +0 -14
  379. package/dist/api/resources/conversation/errors/InvalidConversationIdError.d.ts +0 -8
  380. package/dist/api/resources/conversation/errors/InvalidConversationIdError.js +0 -14
  381. package/dist/api/resources/conversation/errors/InvalidConversationMessageIdError.d.ts +0 -8
  382. package/dist/api/resources/conversation/errors/InvalidConversationMessageIdError.js +0 -14
  383. package/dist/api/resources/conversation/errors/InvalidFeedbackTypeError.d.ts +0 -8
  384. package/dist/api/resources/conversation/errors/InvalidFeedbackTypeError.js +0 -14
  385. package/dist/api/resources/conversation/errors/index.d.ts +0 -7
  386. package/dist/api/resources/conversation/errors/index.js +0 -7
  387. package/dist/api/resources/knowledge/errors/DocumentCreationError.d.ts +0 -7
  388. package/dist/api/resources/knowledge/errors/DocumentCreationError.js +0 -13
  389. package/dist/api/resources/knowledge/errors/DocumentNotFoundError.d.ts +0 -8
  390. package/dist/api/resources/knowledge/errors/DocumentNotFoundError.js +0 -14
  391. package/dist/api/resources/knowledge/errors/IneligibleKnowledgeBaseError.d.ts +0 -8
  392. package/dist/api/resources/knowledge/errors/IneligibleKnowledgeBaseError.js +0 -14
  393. package/dist/api/resources/knowledge/errors/KnowledgeBaseNotFoundError.d.ts +0 -8
  394. package/dist/api/resources/knowledge/errors/KnowledgeBaseNotFoundError.js +0 -14
  395. package/dist/api/resources/knowledge/errors/VersionInProgressError.d.ts +0 -8
  396. package/dist/api/resources/knowledge/errors/VersionNotInProgressError.d.ts +0 -8
  397. package/dist/api/resources/knowledge/errors/VersionNotInProgressError.js +0 -14
  398. package/dist/api/resources/knowledge/errors/index.d.ts +0 -6
  399. package/dist/api/resources/knowledge/errors/index.js +0 -6
  400. package/dist/api/resources/knowledge/types/IdBody.d.ts +0 -6
  401. /package/api/resources/{knowledge/types/IdBody.js → actions/types/Action.js} +0 -0
  402. /package/api/resources/{knowledge/types/KnowledgeDocument.js → actions/types/ActionParameter.js} +0 -0
  403. /package/{dist/api/resources/knowledge/types/IdBody.js → api/resources/actions/types/ActionSetBase.js} +0 -0
  404. /package/{dist/api/resources/knowledge/types/KnowledgeDocument.js → api/resources/actions/types/ActionSetRequest.js} +0 -0
@@ -26,21 +26,24 @@ export class Conversation {
26
26
  * @param {MavenAGI.ConversationRequest} request
27
27
  * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
28
28
  *
29
- * @throws {@link MavenAGI.ConversationAlreadyExistsError}
30
- * @throws {@link MavenAGI.InvalidConversationIdError}
31
- * @throws {@link MavenAGI.InvalidConversationMessageIdError}
32
- * @throws {@link MavenAGI.EmptyConversationError}
33
- * @throws {@link MavenAGI.AgentNotFoundError}
29
+ * @throws {@link MavenAGI.NotFoundError}
30
+ * @throws {@link MavenAGI.BadRequestError}
31
+ * @throws {@link MavenAGI.ServerError}
34
32
  *
35
33
  * @example
36
- * await mavenAgi.conversation.initialize({
34
+ * await client.conversation.initialize({
37
35
  * messages: [{}],
38
36
  * id: "string",
39
- * context: {}
37
+ * context: {},
38
+ * responseConfig: {
39
+ * capabilities: [MavenAGI.Capability.Markdown],
40
+ * isCopilot: true,
41
+ * responseLength: MavenAGI.ResponseLength.Short
42
+ * }
40
43
  * })
41
44
  */
42
45
  initialize(request, requestOptions) {
43
- var _a, _b, _c;
46
+ var _a, _b;
44
47
  return __awaiter(this, void 0, void 0, function* () {
45
48
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
46
49
  url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/conversations"),
@@ -51,7 +54,7 @@ export class Conversation {
51
54
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
52
55
  "X-Fern-Language": "JavaScript",
53
56
  "X-Fern-SDK-Name": "mavenagi",
54
- "X-Fern-SDK-Version": "0.0.0-alpha.2",
57
+ "X-Fern-SDK-Version": "0.0.0-alpha.4",
55
58
  "X-Fern-Runtime": core.RUNTIME.type,
56
59
  "X-Fern-Runtime-Version": core.RUNTIME.version,
57
60
  },
@@ -70,37 +73,23 @@ export class Conversation {
70
73
  });
71
74
  }
72
75
  if (_response.error.reason === "status-code") {
73
- switch ((_c = _response.error.body) === null || _c === void 0 ? void 0 : _c["errorName"]) {
74
- case "ConversationAlreadyExistsError":
75
- throw new MavenAGI.ConversationAlreadyExistsError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
76
- unrecognizedObjectKeys: "passthrough",
77
- allowUnrecognizedUnionMembers: true,
78
- allowUnrecognizedEnumValues: true,
79
- breadcrumbsPrefix: ["response"],
80
- }));
81
- case "InvalidConversationIdError":
82
- throw new MavenAGI.InvalidConversationIdError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
76
+ switch (_response.error.statusCode) {
77
+ case 404:
78
+ throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
83
79
  unrecognizedObjectKeys: "passthrough",
84
80
  allowUnrecognizedUnionMembers: true,
85
81
  allowUnrecognizedEnumValues: true,
86
82
  breadcrumbsPrefix: ["response"],
87
83
  }));
88
- case "InvalidConversationMessageIdError":
89
- throw new MavenAGI.InvalidConversationMessageIdError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
84
+ case 400:
85
+ throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
90
86
  unrecognizedObjectKeys: "passthrough",
91
87
  allowUnrecognizedUnionMembers: true,
92
88
  allowUnrecognizedEnumValues: true,
93
89
  breadcrumbsPrefix: ["response"],
94
90
  }));
95
- case "EmptyConversationError":
96
- throw new MavenAGI.EmptyConversationError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
97
- unrecognizedObjectKeys: "passthrough",
98
- allowUnrecognizedUnionMembers: true,
99
- allowUnrecognizedEnumValues: true,
100
- breadcrumbsPrefix: ["response"],
101
- }));
102
- case "AgentNotFoundError":
103
- throw new MavenAGI.AgentNotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
91
+ case 500:
92
+ throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
104
93
  unrecognizedObjectKeys: "passthrough",
105
94
  allowUnrecognizedUnionMembers: true,
106
95
  allowUnrecognizedEnumValues: true,
@@ -131,17 +120,18 @@ export class Conversation {
131
120
  /**
132
121
  * Get a conversation
133
122
  *
134
- * @param {string} conversationId - The ID of a conversation to get
123
+ * @param {string} conversationId - The ID of the conversation to get
135
124
  * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
136
125
  *
137
- * @throws {@link MavenAGI.ConversationNotFoundError}
138
- * @throws {@link MavenAGI.AgentNotFoundError}
126
+ * @throws {@link MavenAGI.NotFoundError}
127
+ * @throws {@link MavenAGI.BadRequestError}
128
+ * @throws {@link MavenAGI.ServerError}
139
129
  *
140
130
  * @example
141
- * await mavenAgi.conversation.get("string")
131
+ * await client.conversation.get("string")
142
132
  */
143
133
  get(conversationId, requestOptions) {
144
- var _a, _b, _c;
134
+ var _a, _b;
145
135
  return __awaiter(this, void 0, void 0, function* () {
146
136
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
147
137
  url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}`),
@@ -152,7 +142,7 @@ export class Conversation {
152
142
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
153
143
  "X-Fern-Language": "JavaScript",
154
144
  "X-Fern-SDK-Name": "mavenagi",
155
- "X-Fern-SDK-Version": "0.0.0-alpha.2",
145
+ "X-Fern-SDK-Version": "0.0.0-alpha.4",
156
146
  "X-Fern-Runtime": core.RUNTIME.type,
157
147
  "X-Fern-Runtime-Version": core.RUNTIME.version,
158
148
  },
@@ -170,16 +160,23 @@ export class Conversation {
170
160
  });
171
161
  }
172
162
  if (_response.error.reason === "status-code") {
173
- switch ((_c = _response.error.body) === null || _c === void 0 ? void 0 : _c["errorName"]) {
174
- case "ConversationNotFoundError":
175
- throw new MavenAGI.ConversationNotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
163
+ switch (_response.error.statusCode) {
164
+ case 404:
165
+ throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
176
166
  unrecognizedObjectKeys: "passthrough",
177
167
  allowUnrecognizedUnionMembers: true,
178
168
  allowUnrecognizedEnumValues: true,
179
169
  breadcrumbsPrefix: ["response"],
180
170
  }));
181
- case "AgentNotFoundError":
182
- throw new MavenAGI.AgentNotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
171
+ case 400:
172
+ throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
173
+ unrecognizedObjectKeys: "passthrough",
174
+ allowUnrecognizedUnionMembers: true,
175
+ allowUnrecognizedEnumValues: true,
176
+ breadcrumbsPrefix: ["response"],
177
+ }));
178
+ case 500:
179
+ throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
183
180
  unrecognizedObjectKeys: "passthrough",
184
181
  allowUnrecognizedUnionMembers: true,
185
182
  allowUnrecognizedEnumValues: true,
@@ -214,12 +211,12 @@ export class Conversation {
214
211
  * @param {MavenAGI.ConversationMessageRequest[]} request
215
212
  * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
216
213
  *
217
- * @throws {@link MavenAGI.ConversationNotFoundError}
218
- * @throws {@link MavenAGI.InvalidConversationMessageIdError}
219
- * @throws {@link MavenAGI.AgentNotFoundError}
214
+ * @throws {@link MavenAGI.NotFoundError}
215
+ * @throws {@link MavenAGI.BadRequestError}
216
+ * @throws {@link MavenAGI.ServerError}
220
217
  *
221
218
  * @example
222
- * await mavenAgi.conversation.appendNewMessages("string", [{
219
+ * await client.conversation.appendNewMessages("string", [{
223
220
  * text: "string",
224
221
  * userMessageType: MavenAGI.UserConversationMessageType.User,
225
222
  * id: "string",
@@ -227,7 +224,7 @@ export class Conversation {
227
224
  * }])
228
225
  */
229
226
  appendNewMessages(conversationId, request, requestOptions) {
230
- var _a, _b, _c;
227
+ var _a, _b;
231
228
  return __awaiter(this, void 0, void 0, function* () {
232
229
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
233
230
  url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/messages`),
@@ -238,7 +235,7 @@ export class Conversation {
238
235
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
239
236
  "X-Fern-Language": "JavaScript",
240
237
  "X-Fern-SDK-Name": "mavenagi",
241
- "X-Fern-SDK-Version": "0.0.0-alpha.2",
238
+ "X-Fern-SDK-Version": "0.0.0-alpha.4",
242
239
  "X-Fern-Runtime": core.RUNTIME.type,
243
240
  "X-Fern-Runtime-Version": core.RUNTIME.version,
244
241
  },
@@ -259,23 +256,23 @@ export class Conversation {
259
256
  });
260
257
  }
261
258
  if (_response.error.reason === "status-code") {
262
- switch ((_c = _response.error.body) === null || _c === void 0 ? void 0 : _c["errorName"]) {
263
- case "ConversationNotFoundError":
264
- throw new MavenAGI.ConversationNotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
259
+ switch (_response.error.statusCode) {
260
+ case 404:
261
+ throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
265
262
  unrecognizedObjectKeys: "passthrough",
266
263
  allowUnrecognizedUnionMembers: true,
267
264
  allowUnrecognizedEnumValues: true,
268
265
  breadcrumbsPrefix: ["response"],
269
266
  }));
270
- case "InvalidConversationMessageIdError":
271
- throw new MavenAGI.InvalidConversationMessageIdError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
267
+ case 400:
268
+ throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
272
269
  unrecognizedObjectKeys: "passthrough",
273
270
  allowUnrecognizedUnionMembers: true,
274
271
  allowUnrecognizedEnumValues: true,
275
272
  breadcrumbsPrefix: ["response"],
276
273
  }));
277
- case "AgentNotFoundError":
278
- throw new MavenAGI.AgentNotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
274
+ case 500:
275
+ throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
279
276
  unrecognizedObjectKeys: "passthrough",
280
277
  allowUnrecognizedUnionMembers: true,
281
278
  allowUnrecognizedEnumValues: true,
@@ -310,18 +307,20 @@ export class Conversation {
310
307
  * @param {MavenAGI.AskRequest} request
311
308
  * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
312
309
  *
313
- * @throws {@link MavenAGI.InvalidConversationIdError}
314
- * @throws {@link MavenAGI.AgentNotFoundError}
310
+ * @throws {@link MavenAGI.NotFoundError}
311
+ * @throws {@link MavenAGI.BadRequestError}
312
+ * @throws {@link MavenAGI.ServerError}
315
313
  *
316
314
  * @example
317
- * await mavenAgi.conversation.ask("string", {
315
+ * await client.conversation.ask("string", {
318
316
  * id: "string",
319
317
  * text: "string",
320
- * context: {}
318
+ * context: {},
319
+ * responseConfig: {}
321
320
  * })
322
321
  */
323
322
  ask(conversationId, request, requestOptions) {
324
- var _a, _b, _c;
323
+ var _a, _b;
325
324
  return __awaiter(this, void 0, void 0, function* () {
326
325
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
327
326
  url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/ask`),
@@ -332,7 +331,7 @@ export class Conversation {
332
331
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
333
332
  "X-Fern-Language": "JavaScript",
334
333
  "X-Fern-SDK-Name": "mavenagi",
335
- "X-Fern-SDK-Version": "0.0.0-alpha.2",
334
+ "X-Fern-SDK-Version": "0.0.0-alpha.4",
336
335
  "X-Fern-Runtime": core.RUNTIME.type,
337
336
  "X-Fern-Runtime-Version": core.RUNTIME.version,
338
337
  },
@@ -351,16 +350,23 @@ export class Conversation {
351
350
  });
352
351
  }
353
352
  if (_response.error.reason === "status-code") {
354
- switch ((_c = _response.error.body) === null || _c === void 0 ? void 0 : _c["errorName"]) {
355
- case "InvalidConversationIdError":
356
- throw new MavenAGI.InvalidConversationIdError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
353
+ switch (_response.error.statusCode) {
354
+ case 404:
355
+ throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
356
+ unrecognizedObjectKeys: "passthrough",
357
+ allowUnrecognizedUnionMembers: true,
358
+ allowUnrecognizedEnumValues: true,
359
+ breadcrumbsPrefix: ["response"],
360
+ }));
361
+ case 400:
362
+ throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
357
363
  unrecognizedObjectKeys: "passthrough",
358
364
  allowUnrecognizedUnionMembers: true,
359
365
  allowUnrecognizedEnumValues: true,
360
366
  breadcrumbsPrefix: ["response"],
361
367
  }));
362
- case "AgentNotFoundError":
363
- throw new MavenAGI.AgentNotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
368
+ case 500:
369
+ throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
364
370
  unrecognizedObjectKeys: "passthrough",
365
371
  allowUnrecognizedUnionMembers: true,
366
372
  allowUnrecognizedEnumValues: true,
@@ -392,7 +398,7 @@ export class Conversation {
392
398
  * Ask a question
393
399
  */
394
400
  askStream(conversationId, request, requestOptions) {
395
- var _a, _b, _c;
401
+ var _a, _b;
396
402
  return __awaiter(this, void 0, void 0, function* () {
397
403
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
398
404
  url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/ask_stream`),
@@ -403,7 +409,7 @@ export class Conversation {
403
409
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
404
410
  "X-Fern-Language": "JavaScript",
405
411
  "X-Fern-SDK-Name": "mavenagi",
406
- "X-Fern-SDK-Version": "0.0.0-alpha.2",
412
+ "X-Fern-SDK-Version": "0.0.0-alpha.4",
407
413
  "X-Fern-Runtime": core.RUNTIME.type,
408
414
  "X-Fern-Runtime-Version": core.RUNTIME.version,
409
415
  },
@@ -433,9 +439,23 @@ export class Conversation {
433
439
  });
434
440
  }
435
441
  if (_response.error.reason === "status-code") {
436
- switch ((_c = _response.error.body) === null || _c === void 0 ? void 0 : _c["errorName"]) {
437
- case "AgentNotFoundError":
438
- throw new MavenAGI.AgentNotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
442
+ switch (_response.error.statusCode) {
443
+ case 404:
444
+ throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
445
+ unrecognizedObjectKeys: "passthrough",
446
+ allowUnrecognizedUnionMembers: true,
447
+ allowUnrecognizedEnumValues: true,
448
+ breadcrumbsPrefix: ["response"],
449
+ }));
450
+ case 400:
451
+ throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
452
+ unrecognizedObjectKeys: "passthrough",
453
+ allowUnrecognizedUnionMembers: true,
454
+ allowUnrecognizedEnumValues: true,
455
+ breadcrumbsPrefix: ["response"],
456
+ }));
457
+ case 500:
458
+ throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
439
459
  unrecognizedObjectKeys: "passthrough",
440
460
  allowUnrecognizedUnionMembers: true,
441
461
  allowUnrecognizedEnumValues: true,
@@ -470,19 +490,17 @@ export class Conversation {
470
490
  * @param {MavenAGI.GenerateMavenSuggestionsRequest} request
471
491
  * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
472
492
  *
473
- * @throws {@link MavenAGI.InvalidConversationIdError}
474
- * @throws {@link MavenAGI.ConversationNotFoundError}
475
- * @throws {@link MavenAGI.ConversationMessageNotFoundError}
476
- * @throws {@link MavenAGI.InvalidConversationMessageIdError}
477
- * @throws {@link MavenAGI.AgentNotFoundError}
493
+ * @throws {@link MavenAGI.NotFoundError}
494
+ * @throws {@link MavenAGI.BadRequestError}
495
+ * @throws {@link MavenAGI.ServerError}
478
496
  *
479
497
  * @example
480
- * await mavenAgi.conversation.generateMavenSuggestions("string", {
498
+ * await client.conversation.generateMavenSuggestions("string", {
481
499
  * messageIds: ["string"]
482
500
  * })
483
501
  */
484
502
  generateMavenSuggestions(conversationId, request, requestOptions) {
485
- var _a, _b, _c;
503
+ var _a, _b;
486
504
  return __awaiter(this, void 0, void 0, function* () {
487
505
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
488
506
  url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/generate_maven_suggestions`),
@@ -493,7 +511,7 @@ export class Conversation {
493
511
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
494
512
  "X-Fern-Language": "JavaScript",
495
513
  "X-Fern-SDK-Name": "mavenagi",
496
- "X-Fern-SDK-Version": "0.0.0-alpha.2",
514
+ "X-Fern-SDK-Version": "0.0.0-alpha.4",
497
515
  "X-Fern-Runtime": core.RUNTIME.type,
498
516
  "X-Fern-Runtime-Version": core.RUNTIME.version,
499
517
  },
@@ -514,37 +532,112 @@ export class Conversation {
514
532
  });
515
533
  }
516
534
  if (_response.error.reason === "status-code") {
517
- switch ((_c = _response.error.body) === null || _c === void 0 ? void 0 : _c["errorName"]) {
518
- case "InvalidConversationIdError":
519
- throw new MavenAGI.InvalidConversationIdError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
535
+ switch (_response.error.statusCode) {
536
+ case 404:
537
+ throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
520
538
  unrecognizedObjectKeys: "passthrough",
521
539
  allowUnrecognizedUnionMembers: true,
522
540
  allowUnrecognizedEnumValues: true,
523
541
  breadcrumbsPrefix: ["response"],
524
542
  }));
525
- case "ConversationNotFoundError":
526
- throw new MavenAGI.ConversationNotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
543
+ case 400:
544
+ throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
527
545
  unrecognizedObjectKeys: "passthrough",
528
546
  allowUnrecognizedUnionMembers: true,
529
547
  allowUnrecognizedEnumValues: true,
530
548
  breadcrumbsPrefix: ["response"],
531
549
  }));
532
- case "ConversationMessageNotFoundError":
533
- throw new MavenAGI.ConversationMessageNotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
550
+ case 500:
551
+ throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
552
+ unrecognizedObjectKeys: "passthrough",
553
+ allowUnrecognizedUnionMembers: true,
554
+ allowUnrecognizedEnumValues: true,
555
+ breadcrumbsPrefix: ["response"],
556
+ }));
557
+ default:
558
+ throw new errors.MavenAGIError({
559
+ statusCode: _response.error.statusCode,
560
+ body: _response.error.body,
561
+ });
562
+ }
563
+ }
564
+ switch (_response.error.reason) {
565
+ case "non-json":
566
+ throw new errors.MavenAGIError({
567
+ statusCode: _response.error.statusCode,
568
+ body: _response.error.rawBody,
569
+ });
570
+ case "timeout":
571
+ throw new errors.MavenAGITimeoutError();
572
+ case "unknown":
573
+ throw new errors.MavenAGIError({
574
+ message: _response.error.errorMessage,
575
+ });
576
+ }
577
+ });
578
+ }
579
+ /**
580
+ * Create feedback
581
+ *
582
+ * @param {MavenAGI.FeedbackRequest} request
583
+ * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
584
+ *
585
+ * @throws {@link MavenAGI.NotFoundError}
586
+ * @throws {@link MavenAGI.BadRequestError}
587
+ * @throws {@link MavenAGI.ServerError}
588
+ *
589
+ * @example
590
+ * await client.conversation.createFeedback({
591
+ * id: "string",
592
+ * conversationId: "string",
593
+ * conversationMessageId: "string",
594
+ * type: MavenAGI.FeedbackType.ThumbsUp,
595
+ * text: "string"
596
+ * })
597
+ */
598
+ createFeedback(request, requestOptions) {
599
+ var _a, _b;
600
+ return __awaiter(this, void 0, void 0, function* () {
601
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
602
+ url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/conversations/feedback"),
603
+ method: "POST",
604
+ headers: {
605
+ Authorization: yield this._getAuthorizationHeader(),
606
+ "X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
607
+ "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
608
+ "X-Fern-Language": "JavaScript",
609
+ "X-Fern-SDK-Name": "mavenagi",
610
+ "X-Fern-SDK-Version": "0.0.0-alpha.4",
611
+ "X-Fern-Runtime": core.RUNTIME.type,
612
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
613
+ },
614
+ contentType: "application/json",
615
+ body: yield serializers.FeedbackRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
616
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
617
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
618
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
619
+ });
620
+ if (_response.ok) {
621
+ return;
622
+ }
623
+ if (_response.error.reason === "status-code") {
624
+ switch (_response.error.statusCode) {
625
+ case 404:
626
+ throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
534
627
  unrecognizedObjectKeys: "passthrough",
535
628
  allowUnrecognizedUnionMembers: true,
536
629
  allowUnrecognizedEnumValues: true,
537
630
  breadcrumbsPrefix: ["response"],
538
631
  }));
539
- case "InvalidConversationMessageIdError":
540
- throw new MavenAGI.InvalidConversationMessageIdError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
632
+ case 400:
633
+ throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
541
634
  unrecognizedObjectKeys: "passthrough",
542
635
  allowUnrecognizedUnionMembers: true,
543
636
  allowUnrecognizedEnumValues: true,
544
637
  breadcrumbsPrefix: ["response"],
545
638
  }));
546
- case "AgentNotFoundError":
547
- throw new MavenAGI.AgentNotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
639
+ case 500:
640
+ throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
548
641
  unrecognizedObjectKeys: "passthrough",
549
642
  allowUnrecognizedUnionMembers: true,
550
643
  allowUnrecognizedEnumValues: true,
@@ -573,27 +666,41 @@ export class Conversation {
573
666
  });
574
667
  }
575
668
  /**
576
- * Create feedback
669
+ * Submit a filled out action form
577
670
  *
578
- * @param {MavenAGI.FeedbackRequest} request
671
+ * @param {string} conversationId - The ID of a conversation the form being submitted belongs to
672
+ * @param {MavenAGI.ActionExecutionRequest} request
579
673
  * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
580
674
  *
581
- * @throws {@link MavenAGI.InvalidFeedbackTypeError}
582
- * @throws {@link MavenAGI.ConversationMessageNotFoundError}
583
- * @throws {@link MavenAGI.AgentNotFoundError}
675
+ * @throws {@link MavenAGI.NotFoundError}
676
+ * @throws {@link MavenAGI.BadRequestError}
677
+ * @throws {@link MavenAGI.ServerError}
584
678
  *
585
679
  * @example
586
- * await mavenAgi.conversation.createFeedback({
587
- * conversationMessageId: "string",
588
- * text: "string",
589
- * type: MavenAGI.FeedbackType.ThumbsUp
680
+ * await client.conversation.submitActionForm("string", {
681
+ * actionFormId: "string",
682
+ * userContext: {
683
+ * name: "string",
684
+ * id: {
685
+ * "string": "string"
686
+ * },
687
+ * email: "string",
688
+ * context: {
689
+ * "string": "string"
690
+ * }
691
+ * },
692
+ * parameters: {
693
+ * "string": {
694
+ * "key": "value"
695
+ * }
696
+ * }
590
697
  * })
591
698
  */
592
- createFeedback(request, requestOptions) {
593
- var _a, _b, _c;
699
+ submitActionForm(conversationId, request, requestOptions) {
700
+ var _a, _b;
594
701
  return __awaiter(this, void 0, void 0, function* () {
595
702
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
596
- url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/conversations/feedback"),
703
+ url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/submit-form`),
597
704
  method: "POST",
598
705
  headers: {
599
706
  Authorization: yield this._getAuthorizationHeader(),
@@ -601,37 +708,42 @@ export class Conversation {
601
708
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
602
709
  "X-Fern-Language": "JavaScript",
603
710
  "X-Fern-SDK-Name": "mavenagi",
604
- "X-Fern-SDK-Version": "0.0.0-alpha.2",
711
+ "X-Fern-SDK-Version": "0.0.0-alpha.4",
605
712
  "X-Fern-Runtime": core.RUNTIME.type,
606
713
  "X-Fern-Runtime-Version": core.RUNTIME.version,
607
714
  },
608
715
  contentType: "application/json",
609
- body: yield serializers.FeedbackRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
716
+ body: yield serializers.ActionExecutionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
610
717
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
611
718
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
612
719
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
613
720
  });
614
721
  if (_response.ok) {
615
- return;
722
+ return yield serializers.ActionExecutionResponse.parseOrThrow(_response.body, {
723
+ unrecognizedObjectKeys: "passthrough",
724
+ allowUnrecognizedUnionMembers: true,
725
+ allowUnrecognizedEnumValues: true,
726
+ breadcrumbsPrefix: ["response"],
727
+ });
616
728
  }
617
729
  if (_response.error.reason === "status-code") {
618
- switch ((_c = _response.error.body) === null || _c === void 0 ? void 0 : _c["errorName"]) {
619
- case "InvalidFeedbackTypeError":
620
- throw new MavenAGI.InvalidFeedbackTypeError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
730
+ switch (_response.error.statusCode) {
731
+ case 404:
732
+ throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
621
733
  unrecognizedObjectKeys: "passthrough",
622
734
  allowUnrecognizedUnionMembers: true,
623
735
  allowUnrecognizedEnumValues: true,
624
736
  breadcrumbsPrefix: ["response"],
625
737
  }));
626
- case "ConversationMessageNotFoundError":
627
- throw new MavenAGI.ConversationMessageNotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
738
+ case 400:
739
+ throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
628
740
  unrecognizedObjectKeys: "passthrough",
629
741
  allowUnrecognizedUnionMembers: true,
630
742
  allowUnrecognizedEnumValues: true,
631
743
  breadcrumbsPrefix: ["response"],
632
744
  }));
633
- case "AgentNotFoundError":
634
- throw new MavenAGI.AgentNotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
745
+ case 500:
746
+ throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
635
747
  unrecognizedObjectKeys: "passthrough",
636
748
  allowUnrecognizedUnionMembers: true,
637
749
  allowUnrecognizedEnumValues: true,
@@ -1,3 +1,2 @@
1
1
  export * from "./types";
2
- export * from "./errors";
3
2
  export * from "./client";
@@ -1,3 +1,2 @@
1
1
  export * from "./types";
2
- export * from "./errors";
3
2
  export * from "./client";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as MavenAGI from "../../../index";
5
+ export interface ActionExecutionRequest {
6
+ actionFormId: string;
7
+ userContext: MavenAGI.User;
8
+ /** Map of parameter names to values */
9
+ parameters: Record<string, unknown>;
10
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ActionExecutionResponse {
5
+ /** The result of the action execution in markdown format. */
6
+ response: string;
7
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -9,4 +9,6 @@ export interface AskRequest {
9
9
  text: string;
10
10
  /** The context of the message */
11
11
  context?: MavenAGI.ConversationMessageContext;
12
+ /** Optional configuration for responses to this conversation. Only applies to new conversations. */
13
+ responseConfig?: MavenAGI.ResponseConfig;
12
14
  }
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as MavenAGI from "../../../index";
5
5
  export interface BotActionFormResponse {
6
+ id: string;
6
7
  formLabel: string;
7
8
  fields: MavenAGI.ActionFormField[];
8
9
  submitLabel: string;