mavenagi 1.0.15 → 1.1.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 (371) hide show
  1. package/Client.d.ts +3 -4
  2. package/Client.js +51 -12
  3. package/README.md +14 -1
  4. package/api/resources/actions/client/Client.d.ts +9 -4
  5. package/api/resources/actions/client/Client.js +68 -39
  6. package/api/resources/agents/client/Client.d.ts +9 -4
  7. package/api/resources/agents/client/Client.js +76 -44
  8. package/api/resources/analytics/client/Client.d.ts +9 -4
  9. package/api/resources/analytics/client/Client.js +76 -40
  10. package/api/resources/analytics/types/ConversationTableResponse.d.ts +3 -3
  11. package/api/resources/appSettings/client/Client.d.ts +9 -4
  12. package/api/resources/appSettings/client/Client.js +76 -44
  13. package/api/resources/appSettings/client/index.d.ts +1 -0
  14. package/api/resources/commons/errors/BadRequestError.d.ts +2 -1
  15. package/api/resources/commons/errors/BadRequestError.js +2 -1
  16. package/api/resources/commons/errors/NotFoundError.d.ts +2 -1
  17. package/api/resources/commons/errors/NotFoundError.js +2 -1
  18. package/api/resources/commons/errors/ServerError.d.ts +2 -1
  19. package/api/resources/commons/errors/ServerError.js +2 -1
  20. package/api/resources/commons/types/AppUserRequest.d.ts +2 -2
  21. package/api/resources/commons/types/AppUserResponse.d.ts +2 -2
  22. package/api/resources/commons/types/ConversationResponse.d.ts +2 -1
  23. package/api/resources/commons/types/InboxItemFixType.d.ts +14 -0
  24. package/{dist/api/resources/realtime/types/AudioFormat.js → api/resources/commons/types/InboxItemFixType.js} +4 -4
  25. package/api/resources/commons/types/UserMessageAttachment.d.ts +16 -0
  26. package/api/resources/commons/types/index.d.ts +1 -0
  27. package/api/resources/commons/types/index.js +1 -0
  28. package/api/resources/conversation/client/Client.d.ts +43 -58
  29. package/api/resources/conversation/client/Client.js +342 -281
  30. package/api/resources/conversation/client/index.d.ts +1 -0
  31. package/api/resources/conversation/types/Attachment.d.ts +18 -1
  32. package/api/resources/conversation/types/ConversationMessageRequest.d.ts +2 -0
  33. package/api/resources/conversation/types/index.d.ts +0 -1
  34. package/api/resources/conversation/types/index.js +0 -1
  35. package/api/resources/events/client/Client.d.ts +5 -2
  36. package/api/resources/events/client/Client.js +26 -16
  37. package/api/resources/inbox/client/Client.d.ts +21 -10
  38. package/api/resources/inbox/client/Client.js +126 -67
  39. package/api/resources/inbox/client/index.d.ts +1 -0
  40. package/api/resources/inbox/client/requests/InboxItemFixRequest.d.ts +7 -1
  41. package/api/resources/inbox/client/requests/InboxItemIgnoreRequest.d.ts +7 -1
  42. package/api/resources/inbox/client/requests/InboxItemRequest.d.ts +7 -1
  43. package/api/resources/inbox/types/ApplyInboxItemFixRequest.d.ts +2 -0
  44. package/api/resources/inbox/types/InboxSearchRequest.d.ts +4 -0
  45. package/api/resources/index.d.ts +0 -2
  46. package/api/resources/index.js +1 -3
  47. package/api/resources/knowledge/client/Client.d.ts +17 -8
  48. package/api/resources/knowledge/client/Client.js +168 -87
  49. package/api/resources/organizations/client/Client.d.ts +7 -3
  50. package/api/resources/organizations/client/Client.js +51 -28
  51. package/api/resources/translations/client/Client.d.ts +5 -2
  52. package/api/resources/translations/client/Client.js +26 -16
  53. package/api/resources/triggers/client/Client.d.ts +13 -6
  54. package/api/resources/triggers/client/Client.js +118 -63
  55. package/api/resources/triggers/client/index.d.ts +1 -0
  56. package/api/resources/users/client/Client.d.ts +11 -6
  57. package/api/resources/users/client/Client.js +72 -43
  58. package/api/resources/users/client/index.d.ts +1 -0
  59. package/core/auth/BasicAuth.js +3 -3
  60. package/core/base64.d.ts +2 -0
  61. package/core/base64.js +26 -0
  62. package/core/fetcher/APIResponse.d.ts +10 -0
  63. package/core/fetcher/BinaryResponse.d.ts +20 -0
  64. package/core/fetcher/BinaryResponse.js +17 -0
  65. package/core/fetcher/Fetcher.d.ts +3 -2
  66. package/core/fetcher/Fetcher.js +32 -12
  67. package/core/fetcher/Headers.d.ts +2 -0
  68. package/core/fetcher/Headers.js +84 -0
  69. package/core/fetcher/HttpResponsePromise.d.ts +58 -0
  70. package/core/fetcher/HttpResponsePromise.js +103 -0
  71. package/core/fetcher/RawResponse.d.ts +29 -0
  72. package/core/fetcher/RawResponse.js +44 -0
  73. package/core/fetcher/ResponseWithBody.d.ts +4 -0
  74. package/core/fetcher/ResponseWithBody.js +6 -0
  75. package/core/fetcher/createRequestUrl.d.ts +1 -1
  76. package/core/fetcher/createRequestUrl.js +3 -7
  77. package/core/fetcher/getErrorResponseBody.d.ts +1 -0
  78. package/core/fetcher/getErrorResponseBody.js +44 -0
  79. package/core/fetcher/getFetchFn.d.ts +1 -4
  80. package/core/fetcher/getFetchFn.js +1 -52
  81. package/core/fetcher/getResponseBody.js +34 -33
  82. package/core/fetcher/index.d.ts +4 -0
  83. package/core/fetcher/index.js +7 -1
  84. package/core/headers.d.ts +3 -0
  85. package/core/headers.js +29 -0
  86. package/core/index.d.ts +3 -2
  87. package/core/index.js +4 -3
  88. package/core/runtime/runtime.js +0 -1
  89. package/core/{streaming-fetcher → stream}/Stream.d.ts +1 -2
  90. package/core/url/index.d.ts +2 -0
  91. package/core/url/index.js +7 -0
  92. package/core/url/join.d.ts +1 -0
  93. package/core/url/join.js +49 -0
  94. package/core/url/qs.d.ts +6 -0
  95. package/core/url/qs.js +64 -0
  96. package/dist/Client.d.ts +3 -4
  97. package/dist/Client.js +51 -12
  98. package/dist/api/resources/actions/client/Client.d.ts +9 -4
  99. package/dist/api/resources/actions/client/Client.js +68 -39
  100. package/dist/api/resources/agents/client/Client.d.ts +9 -4
  101. package/dist/api/resources/agents/client/Client.js +76 -44
  102. package/dist/api/resources/analytics/client/Client.d.ts +9 -4
  103. package/dist/api/resources/analytics/client/Client.js +76 -40
  104. package/dist/api/resources/analytics/types/ConversationTableResponse.d.ts +3 -3
  105. package/dist/api/resources/appSettings/client/Client.d.ts +9 -4
  106. package/dist/api/resources/appSettings/client/Client.js +76 -44
  107. package/dist/api/resources/appSettings/client/index.d.ts +1 -0
  108. package/dist/api/resources/commons/errors/BadRequestError.d.ts +2 -1
  109. package/dist/api/resources/commons/errors/BadRequestError.js +2 -1
  110. package/dist/api/resources/commons/errors/NotFoundError.d.ts +2 -1
  111. package/dist/api/resources/commons/errors/NotFoundError.js +2 -1
  112. package/dist/api/resources/commons/errors/ServerError.d.ts +2 -1
  113. package/dist/api/resources/commons/errors/ServerError.js +2 -1
  114. package/dist/api/resources/commons/types/AppUserRequest.d.ts +2 -2
  115. package/dist/api/resources/commons/types/AppUserResponse.d.ts +2 -2
  116. package/dist/api/resources/commons/types/ConversationResponse.d.ts +2 -1
  117. package/dist/api/resources/commons/types/InboxItemFixType.d.ts +14 -0
  118. package/{api/resources/realtime/types/AudioFormat.js → dist/api/resources/commons/types/InboxItemFixType.js} +4 -4
  119. package/dist/api/resources/commons/types/UserMessageAttachment.d.ts +16 -0
  120. package/dist/api/resources/commons/types/index.d.ts +1 -0
  121. package/dist/api/resources/commons/types/index.js +1 -0
  122. package/dist/api/resources/conversation/client/Client.d.ts +43 -58
  123. package/dist/api/resources/conversation/client/Client.js +342 -281
  124. package/dist/api/resources/conversation/client/index.d.ts +1 -0
  125. package/dist/api/resources/conversation/types/Attachment.d.ts +18 -1
  126. package/dist/api/resources/conversation/types/ConversationMessageRequest.d.ts +2 -0
  127. package/dist/api/resources/conversation/types/index.d.ts +0 -1
  128. package/dist/api/resources/conversation/types/index.js +0 -1
  129. package/dist/api/resources/events/client/Client.d.ts +5 -2
  130. package/dist/api/resources/events/client/Client.js +26 -16
  131. package/dist/api/resources/inbox/client/Client.d.ts +21 -10
  132. package/dist/api/resources/inbox/client/Client.js +126 -67
  133. package/dist/api/resources/inbox/client/index.d.ts +1 -0
  134. package/dist/api/resources/inbox/client/requests/InboxItemFixRequest.d.ts +7 -1
  135. package/dist/api/resources/inbox/client/requests/InboxItemIgnoreRequest.d.ts +7 -1
  136. package/dist/api/resources/inbox/client/requests/InboxItemRequest.d.ts +7 -1
  137. package/dist/api/resources/inbox/types/ApplyInboxItemFixRequest.d.ts +2 -0
  138. package/dist/api/resources/inbox/types/InboxSearchRequest.d.ts +4 -0
  139. package/dist/api/resources/index.d.ts +0 -2
  140. package/dist/api/resources/index.js +1 -3
  141. package/dist/api/resources/knowledge/client/Client.d.ts +17 -8
  142. package/dist/api/resources/knowledge/client/Client.js +168 -87
  143. package/dist/api/resources/organizations/client/Client.d.ts +7 -3
  144. package/dist/api/resources/organizations/client/Client.js +51 -28
  145. package/dist/api/resources/translations/client/Client.d.ts +5 -2
  146. package/dist/api/resources/translations/client/Client.js +26 -16
  147. package/dist/api/resources/triggers/client/Client.d.ts +13 -6
  148. package/dist/api/resources/triggers/client/Client.js +118 -63
  149. package/dist/api/resources/triggers/client/index.d.ts +1 -0
  150. package/dist/api/resources/users/client/Client.d.ts +11 -6
  151. package/dist/api/resources/users/client/Client.js +72 -43
  152. package/dist/api/resources/users/client/index.d.ts +1 -0
  153. package/dist/core/auth/BasicAuth.js +3 -3
  154. package/dist/core/base64.d.ts +2 -0
  155. package/dist/core/base64.js +26 -0
  156. package/dist/core/fetcher/APIResponse.d.ts +10 -0
  157. package/dist/core/fetcher/BinaryResponse.d.ts +20 -0
  158. package/dist/core/fetcher/BinaryResponse.js +17 -0
  159. package/dist/core/fetcher/Fetcher.d.ts +3 -2
  160. package/dist/core/fetcher/Fetcher.js +32 -12
  161. package/dist/core/fetcher/Headers.d.ts +2 -0
  162. package/dist/core/fetcher/Headers.js +84 -0
  163. package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
  164. package/dist/core/fetcher/HttpResponsePromise.js +103 -0
  165. package/dist/core/fetcher/RawResponse.d.ts +29 -0
  166. package/dist/core/fetcher/RawResponse.js +44 -0
  167. package/dist/core/fetcher/ResponseWithBody.d.ts +4 -0
  168. package/dist/core/fetcher/ResponseWithBody.js +6 -0
  169. package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
  170. package/dist/core/fetcher/createRequestUrl.js +3 -7
  171. package/dist/core/fetcher/getErrorResponseBody.d.ts +1 -0
  172. package/dist/core/fetcher/getErrorResponseBody.js +44 -0
  173. package/dist/core/fetcher/getFetchFn.d.ts +1 -4
  174. package/dist/core/fetcher/getFetchFn.js +1 -52
  175. package/dist/core/fetcher/getResponseBody.js +34 -33
  176. package/dist/core/fetcher/index.d.ts +4 -0
  177. package/dist/core/fetcher/index.js +7 -1
  178. package/dist/core/headers.d.ts +3 -0
  179. package/dist/core/headers.js +29 -0
  180. package/dist/core/index.d.ts +3 -2
  181. package/dist/core/index.js +4 -3
  182. package/dist/core/runtime/runtime.js +0 -1
  183. package/dist/core/{streaming-fetcher → stream}/Stream.d.ts +1 -2
  184. package/dist/core/url/index.d.ts +2 -0
  185. package/dist/core/url/index.js +7 -0
  186. package/dist/core/url/join.d.ts +1 -0
  187. package/dist/core/url/join.js +49 -0
  188. package/dist/core/url/qs.d.ts +6 -0
  189. package/dist/core/url/qs.js +64 -0
  190. package/dist/errors/MavenAGIError.d.ts +4 -1
  191. package/dist/errors/MavenAGIError.js +4 -7
  192. package/dist/index.d.ts +2 -2
  193. package/dist/index.js +5 -5
  194. package/dist/serialization/resources/commons/types/InboxItemFixType.d.ts +10 -0
  195. package/{serialization/resources/realtime/types/AudioFormat.js → dist/serialization/resources/commons/types/InboxItemFixType.js} +2 -2
  196. package/dist/serialization/resources/commons/types/UserMessageAttachment.d.ts +2 -0
  197. package/dist/serialization/resources/commons/types/UserMessageAttachment.js +2 -0
  198. package/dist/serialization/resources/commons/types/index.d.ts +1 -0
  199. package/dist/serialization/resources/commons/types/index.js +1 -0
  200. package/dist/serialization/resources/conversation/types/Attachment.d.ts +1 -0
  201. package/dist/serialization/resources/conversation/types/Attachment.js +1 -0
  202. package/dist/serialization/resources/conversation/types/ConversationMessageRequest.d.ts +2 -0
  203. package/dist/serialization/resources/conversation/types/ConversationMessageRequest.js +2 -0
  204. package/dist/serialization/resources/conversation/types/index.d.ts +0 -1
  205. package/dist/serialization/resources/conversation/types/index.js +0 -1
  206. package/dist/serialization/resources/inbox/types/ApplyInboxItemFixRequest.d.ts +2 -0
  207. package/dist/serialization/resources/inbox/types/ApplyInboxItemFixRequest.js +2 -0
  208. package/dist/serialization/resources/inbox/types/InboxSearchRequest.d.ts +2 -0
  209. package/dist/serialization/resources/inbox/types/InboxSearchRequest.js +2 -0
  210. package/dist/serialization/resources/index.d.ts +0 -2
  211. package/dist/serialization/resources/index.js +1 -3
  212. package/dist/version.d.ts +1 -1
  213. package/dist/version.js +1 -1
  214. package/errors/MavenAGIError.d.ts +4 -1
  215. package/errors/MavenAGIError.js +4 -7
  216. package/index.d.ts +2 -2
  217. package/index.js +5 -5
  218. package/jest.config.mjs +6 -1
  219. package/package.json +13 -21
  220. package/reference.md +16 -98
  221. package/scripts/rename-to-esm-files.js +10 -2
  222. package/serialization/resources/commons/types/InboxItemFixType.d.ts +10 -0
  223. package/{dist/serialization/resources/realtime/types/AudioFormat.js → serialization/resources/commons/types/InboxItemFixType.js} +2 -2
  224. package/serialization/resources/commons/types/UserMessageAttachment.d.ts +2 -0
  225. package/serialization/resources/commons/types/UserMessageAttachment.js +2 -0
  226. package/serialization/resources/commons/types/index.d.ts +1 -0
  227. package/serialization/resources/commons/types/index.js +1 -0
  228. package/serialization/resources/conversation/types/Attachment.d.ts +1 -0
  229. package/serialization/resources/conversation/types/Attachment.js +1 -0
  230. package/serialization/resources/conversation/types/ConversationMessageRequest.d.ts +2 -0
  231. package/serialization/resources/conversation/types/ConversationMessageRequest.js +2 -0
  232. package/serialization/resources/conversation/types/index.d.ts +0 -1
  233. package/serialization/resources/conversation/types/index.js +0 -1
  234. package/serialization/resources/inbox/types/ApplyInboxItemFixRequest.d.ts +2 -0
  235. package/serialization/resources/inbox/types/ApplyInboxItemFixRequest.js +2 -0
  236. package/serialization/resources/inbox/types/InboxSearchRequest.d.ts +2 -0
  237. package/serialization/resources/inbox/types/InboxSearchRequest.js +2 -0
  238. package/serialization/resources/index.d.ts +0 -2
  239. package/serialization/resources/index.js +1 -3
  240. package/version.d.ts +1 -1
  241. package/version.js +1 -1
  242. package/api/resources/conversation/types/GenerateObjectRequest.d.ts +0 -8
  243. package/api/resources/conversation/types/GenerateObjectRequest.js +0 -5
  244. package/api/resources/realtime/client/Client.d.ts +0 -36
  245. package/api/resources/realtime/client/Client.js +0 -90
  246. package/api/resources/realtime/client/Socket.d.ts +0 -41
  247. package/api/resources/realtime/client/Socket.js +0 -155
  248. package/api/resources/realtime/client/index.d.ts +0 -1
  249. package/api/resources/realtime/client/index.js +0 -2
  250. package/api/resources/realtime/index.d.ts +0 -2
  251. package/api/resources/realtime/index.js +0 -18
  252. package/api/resources/realtime/types/AudioFormat.d.ts +0 -8
  253. package/api/resources/realtime/types/AudioPublishEvent.d.ts +0 -6
  254. package/api/resources/realtime/types/AudioPublishEvent.js +0 -5
  255. package/api/resources/realtime/types/AudioSubscribeEvent.d.ts +0 -6
  256. package/api/resources/realtime/types/AudioSubscribeEvent.js +0 -5
  257. package/api/resources/realtime/types/ControlEvent.d.ts +0 -9
  258. package/api/resources/realtime/types/ControlEvent.js +0 -5
  259. package/api/resources/realtime/types/HangUpPublishEvent.d.ts +0 -6
  260. package/api/resources/realtime/types/HangUpPublishEvent.js +0 -5
  261. package/api/resources/realtime/types/MessageBase.d.ts +0 -6
  262. package/api/resources/realtime/types/MessageBase.js +0 -5
  263. package/api/resources/realtime/types/PublishEvent.d.ts +0 -16
  264. package/api/resources/realtime/types/PublishEvent.js +0 -5
  265. package/api/resources/realtime/types/SubscribeEvent.d.ts +0 -25
  266. package/api/resources/realtime/types/SubscribeEvent.js +0 -5
  267. package/api/resources/realtime/types/index.d.ts +0 -8
  268. package/api/resources/realtime/types/index.js +0 -24
  269. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
  270. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
  271. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
  272. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
  273. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
  274. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
  275. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
  276. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
  277. package/core/websocket/events.d.ts +0 -36
  278. package/core/websocket/events.js +0 -27
  279. package/core/websocket/index.d.ts +0 -1
  280. package/core/websocket/index.js +0 -17
  281. package/core/websocket/ws.d.ts +0 -137
  282. package/core/websocket/ws.js +0 -452
  283. package/dist/api/resources/conversation/types/GenerateObjectRequest.d.ts +0 -8
  284. package/dist/api/resources/conversation/types/GenerateObjectRequest.js +0 -5
  285. package/dist/api/resources/realtime/client/Client.d.ts +0 -36
  286. package/dist/api/resources/realtime/client/Client.js +0 -90
  287. package/dist/api/resources/realtime/client/Socket.d.ts +0 -41
  288. package/dist/api/resources/realtime/client/Socket.js +0 -155
  289. package/dist/api/resources/realtime/client/index.d.ts +0 -1
  290. package/dist/api/resources/realtime/client/index.js +0 -2
  291. package/dist/api/resources/realtime/index.d.ts +0 -2
  292. package/dist/api/resources/realtime/index.js +0 -18
  293. package/dist/api/resources/realtime/types/AudioFormat.d.ts +0 -8
  294. package/dist/api/resources/realtime/types/AudioPublishEvent.d.ts +0 -6
  295. package/dist/api/resources/realtime/types/AudioPublishEvent.js +0 -5
  296. package/dist/api/resources/realtime/types/AudioSubscribeEvent.d.ts +0 -6
  297. package/dist/api/resources/realtime/types/AudioSubscribeEvent.js +0 -5
  298. package/dist/api/resources/realtime/types/ControlEvent.d.ts +0 -9
  299. package/dist/api/resources/realtime/types/ControlEvent.js +0 -5
  300. package/dist/api/resources/realtime/types/HangUpPublishEvent.d.ts +0 -6
  301. package/dist/api/resources/realtime/types/HangUpPublishEvent.js +0 -5
  302. package/dist/api/resources/realtime/types/MessageBase.d.ts +0 -6
  303. package/dist/api/resources/realtime/types/MessageBase.js +0 -5
  304. package/dist/api/resources/realtime/types/PublishEvent.d.ts +0 -16
  305. package/dist/api/resources/realtime/types/PublishEvent.js +0 -5
  306. package/dist/api/resources/realtime/types/SubscribeEvent.d.ts +0 -25
  307. package/dist/api/resources/realtime/types/SubscribeEvent.js +0 -5
  308. package/dist/api/resources/realtime/types/index.d.ts +0 -8
  309. package/dist/api/resources/realtime/types/index.js +0 -24
  310. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
  311. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
  312. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
  313. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
  314. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
  315. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
  316. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
  317. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
  318. package/dist/core/websocket/events.d.ts +0 -36
  319. package/dist/core/websocket/events.js +0 -27
  320. package/dist/core/websocket/index.d.ts +0 -1
  321. package/dist/core/websocket/index.js +0 -17
  322. package/dist/core/websocket/ws.d.ts +0 -137
  323. package/dist/core/websocket/ws.js +0 -452
  324. package/dist/serialization/resources/conversation/types/GenerateObjectRequest.d.ts +0 -13
  325. package/dist/serialization/resources/conversation/types/GenerateObjectRequest.js +0 -46
  326. package/dist/serialization/resources/realtime/index.d.ts +0 -1
  327. package/dist/serialization/resources/realtime/index.js +0 -17
  328. package/dist/serialization/resources/realtime/types/AudioFormat.d.ts +0 -10
  329. package/dist/serialization/resources/realtime/types/AudioPublishEvent.d.ts +0 -12
  330. package/dist/serialization/resources/realtime/types/AudioPublishEvent.js +0 -43
  331. package/dist/serialization/resources/realtime/types/AudioSubscribeEvent.d.ts +0 -12
  332. package/dist/serialization/resources/realtime/types/AudioSubscribeEvent.js +0 -43
  333. package/dist/serialization/resources/realtime/types/ControlEvent.d.ts +0 -15
  334. package/dist/serialization/resources/realtime/types/ControlEvent.js +0 -48
  335. package/dist/serialization/resources/realtime/types/HangUpPublishEvent.d.ts +0 -12
  336. package/dist/serialization/resources/realtime/types/HangUpPublishEvent.js +0 -43
  337. package/dist/serialization/resources/realtime/types/MessageBase.d.ts +0 -12
  338. package/dist/serialization/resources/realtime/types/MessageBase.js +0 -43
  339. package/dist/serialization/resources/realtime/types/PublishEvent.d.ts +0 -18
  340. package/dist/serialization/resources/realtime/types/PublishEvent.js +0 -51
  341. package/dist/serialization/resources/realtime/types/SubscribeEvent.d.ts +0 -27
  342. package/dist/serialization/resources/realtime/types/SubscribeEvent.js +0 -54
  343. package/dist/serialization/resources/realtime/types/index.d.ts +0 -8
  344. package/dist/serialization/resources/realtime/types/index.js +0 -24
  345. package/serialization/resources/conversation/types/GenerateObjectRequest.d.ts +0 -13
  346. package/serialization/resources/conversation/types/GenerateObjectRequest.js +0 -46
  347. package/serialization/resources/realtime/index.d.ts +0 -1
  348. package/serialization/resources/realtime/index.js +0 -17
  349. package/serialization/resources/realtime/types/AudioFormat.d.ts +0 -10
  350. package/serialization/resources/realtime/types/AudioPublishEvent.d.ts +0 -12
  351. package/serialization/resources/realtime/types/AudioPublishEvent.js +0 -43
  352. package/serialization/resources/realtime/types/AudioSubscribeEvent.d.ts +0 -12
  353. package/serialization/resources/realtime/types/AudioSubscribeEvent.js +0 -43
  354. package/serialization/resources/realtime/types/ControlEvent.d.ts +0 -15
  355. package/serialization/resources/realtime/types/ControlEvent.js +0 -48
  356. package/serialization/resources/realtime/types/HangUpPublishEvent.d.ts +0 -12
  357. package/serialization/resources/realtime/types/HangUpPublishEvent.js +0 -43
  358. package/serialization/resources/realtime/types/MessageBase.d.ts +0 -12
  359. package/serialization/resources/realtime/types/MessageBase.js +0 -43
  360. package/serialization/resources/realtime/types/PublishEvent.d.ts +0 -18
  361. package/serialization/resources/realtime/types/PublishEvent.js +0 -51
  362. package/serialization/resources/realtime/types/SubscribeEvent.d.ts +0 -27
  363. package/serialization/resources/realtime/types/SubscribeEvent.js +0 -54
  364. package/serialization/resources/realtime/types/index.d.ts +0 -8
  365. package/serialization/resources/realtime/types/index.js +0 -24
  366. /package/core/{streaming-fetcher → stream}/Stream.js +0 -0
  367. /package/core/{streaming-fetcher → stream}/index.d.ts +0 -0
  368. /package/core/{streaming-fetcher → stream}/index.js +0 -0
  369. /package/dist/core/{streaming-fetcher → stream}/Stream.js +0 -0
  370. /package/dist/core/{streaming-fetcher → stream}/index.d.ts +0 -0
  371. /package/dist/core/{streaming-fetcher → stream}/index.js +0 -0
@@ -14,7 +14,7 @@ import * as MavenAGI from "../../../index";
14
14
  * },
15
15
  * [MavenAGI.ConversationField.CreatedAt]: {
16
16
  * type: "dateTime",
17
- * value: "2023-10-01T00:00:00Z"
17
+ * value: new Date("2023-10-01T00:00:00.000Z")
18
18
  * }
19
19
  * },
20
20
  * data: {
@@ -39,7 +39,7 @@ import * as MavenAGI from "../../../index";
39
39
  * },
40
40
  * [MavenAGI.ConversationField.CreatedAt]: {
41
41
  * type: "dateTime",
42
- * value: "2023-10-01T00:00:00Z"
42
+ * value: new Date("2023-10-01T00:00:00.000Z")
43
43
  * }
44
44
  * },
45
45
  * data: {
@@ -85,7 +85,7 @@ import * as MavenAGI from "../../../index";
85
85
  * },
86
86
  * [MavenAGI.ConversationField.CreatedAt]: {
87
87
  * type: "dateTime",
88
- * value: "2023-10-02T00:00:00Z"
88
+ * value: new Date("2023-10-02T00:00:00.000Z")
89
89
  * }
90
90
  * },
91
91
  * data: {
@@ -15,6 +15,8 @@ export declare namespace AppSettings {
15
15
  organizationId: core.Supplier<string>;
16
16
  /** Override the X-Agent-Id header */
17
17
  agentId: core.Supplier<string>;
18
+ /** Additional headers to include in requests. */
19
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
18
20
  fetcher?: core.FetchFunction;
19
21
  }
20
22
  interface RequestOptions {
@@ -29,7 +31,7 @@ export declare namespace AppSettings {
29
31
  /** Override the X-Agent-Id header */
30
32
  agentId?: string;
31
33
  /** Additional headers to include in the request. */
32
- headers?: Record<string, string>;
34
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
33
35
  }
34
36
  }
35
37
  export declare class AppSettings {
@@ -54,7 +56,8 @@ export declare class AppSettings {
54
56
  * index: "index"
55
57
  * })
56
58
  */
57
- search(request: MavenAGI.SearchAppSettingsRequest, requestOptions?: AppSettings.RequestOptions): Promise<MavenAGI.SearchAppSettingsResponse>;
59
+ search(request: MavenAGI.SearchAppSettingsRequest, requestOptions?: AppSettings.RequestOptions): core.HttpResponsePromise<MavenAGI.SearchAppSettingsResponse>;
60
+ private __search;
58
61
  /**
59
62
  * Get app settings set during installation
60
63
  *
@@ -67,7 +70,8 @@ export declare class AppSettings {
67
70
  * @example
68
71
  * await client.appSettings.get()
69
72
  */
70
- get(requestOptions?: AppSettings.RequestOptions): Promise<Record<string, unknown>>;
73
+ get(requestOptions?: AppSettings.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
74
+ private __get;
71
75
  /**
72
76
  * Update app settings. Performs a merge of the provided settings with the existing app settings.
73
77
  *
@@ -91,6 +95,7 @@ export declare class AppSettings {
91
95
  * }
92
96
  * })
93
97
  */
94
- update(request: Record<string, unknown>, requestOptions?: AppSettings.RequestOptions): Promise<Record<string, unknown>>;
98
+ update(request: Record<string, unknown>, requestOptions?: AppSettings.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
99
+ private __update;
95
100
  protected _getAuthorizationHeader(): Promise<string | undefined>;
96
101
  }
@@ -44,15 +44,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
44
44
  step((generator = generator.apply(thisArg, _arguments || [])).next());
45
45
  });
46
46
  };
47
- var __importDefault = (this && this.__importDefault) || function (mod) {
48
- return (mod && mod.__esModule) ? mod : { "default": mod };
49
- };
50
47
  Object.defineProperty(exports, "__esModule", { value: true });
51
48
  exports.AppSettings = void 0;
52
49
  const environments = __importStar(require("../../../../environments"));
53
50
  const core = __importStar(require("../../../../core"));
54
51
  const MavenAGI = __importStar(require("../../../index"));
55
- const url_join_1 = __importDefault(require("url-join"));
52
+ const headers_1 = require("../../../../core/headers");
56
53
  const serializers = __importStar(require("../../../../serialization/index"));
57
54
  const errors = __importStar(require("../../../../errors/index"));
58
55
  class AppSettings {
@@ -79,29 +76,37 @@ class AppSettings {
79
76
  * })
80
77
  */
81
78
  search(request, requestOptions) {
79
+ return core.HttpResponsePromise.fromPromise(this.__search(request, requestOptions));
80
+ }
81
+ __search(request, requestOptions) {
82
82
  return __awaiter(this, void 0, void 0, function* () {
83
- var _a, _b, _c;
83
+ var _a, _b, _c, _d;
84
84
  const { index } = request;
85
85
  const _queryParams = {};
86
86
  _queryParams["index"] = index;
87
87
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
88
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, "v1/app-settings/search"),
88
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, "v1/app-settings/search"),
89
89
  method: "GET",
90
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
91
- contentType: "application/json",
90
+ headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
91
+ Authorization: yield this._getAuthorizationHeader(),
92
+ "X-Organization-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId,
93
+ "X-Agent-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId,
94
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
92
95
  queryParameters: _queryParams,
93
- requestType: "json",
94
96
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
95
97
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
96
98
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
97
99
  });
98
100
  if (_response.ok) {
99
- return serializers.SearchAppSettingsResponse.parseOrThrow(_response.body, {
100
- unrecognizedObjectKeys: "passthrough",
101
- allowUnrecognizedUnionMembers: true,
102
- allowUnrecognizedEnumValues: true,
103
- breadcrumbsPrefix: ["response"],
104
- });
101
+ return {
102
+ data: serializers.SearchAppSettingsResponse.parseOrThrow(_response.body, {
103
+ unrecognizedObjectKeys: "passthrough",
104
+ allowUnrecognizedUnionMembers: true,
105
+ allowUnrecognizedEnumValues: true,
106
+ breadcrumbsPrefix: ["response"],
107
+ }),
108
+ rawResponse: _response.rawResponse,
109
+ };
105
110
  }
106
111
  if (_response.error.reason === "status-code") {
107
112
  switch (_response.error.statusCode) {
@@ -111,25 +116,26 @@ class AppSettings {
111
116
  allowUnrecognizedUnionMembers: true,
112
117
  allowUnrecognizedEnumValues: true,
113
118
  breadcrumbsPrefix: ["response"],
114
- }));
119
+ }), _response.rawResponse);
115
120
  case 400:
116
121
  throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
117
122
  unrecognizedObjectKeys: "passthrough",
118
123
  allowUnrecognizedUnionMembers: true,
119
124
  allowUnrecognizedEnumValues: true,
120
125
  breadcrumbsPrefix: ["response"],
121
- }));
126
+ }), _response.rawResponse);
122
127
  case 500:
123
128
  throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
124
129
  unrecognizedObjectKeys: "passthrough",
125
130
  allowUnrecognizedUnionMembers: true,
126
131
  allowUnrecognizedEnumValues: true,
127
132
  breadcrumbsPrefix: ["response"],
128
- }));
133
+ }), _response.rawResponse);
129
134
  default:
130
135
  throw new errors.MavenAGIError({
131
136
  statusCode: _response.error.statusCode,
132
137
  body: _response.error.body,
138
+ rawResponse: _response.rawResponse,
133
139
  });
134
140
  }
135
141
  }
@@ -138,12 +144,14 @@ class AppSettings {
138
144
  throw new errors.MavenAGIError({
139
145
  statusCode: _response.error.statusCode,
140
146
  body: _response.error.rawBody,
147
+ rawResponse: _response.rawResponse,
141
148
  });
142
149
  case "timeout":
143
150
  throw new errors.MavenAGITimeoutError("Timeout exceeded when calling GET /v1/app-settings/search.");
144
151
  case "unknown":
145
152
  throw new errors.MavenAGIError({
146
153
  message: _response.error.errorMessage,
154
+ rawResponse: _response.rawResponse,
147
155
  });
148
156
  }
149
157
  });
@@ -161,25 +169,33 @@ class AppSettings {
161
169
  * await client.appSettings.get()
162
170
  */
163
171
  get(requestOptions) {
172
+ return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));
173
+ }
174
+ __get(requestOptions) {
164
175
  return __awaiter(this, void 0, void 0, function* () {
165
- var _a, _b, _c;
176
+ var _a, _b, _c, _d;
166
177
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
167
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, "v1/app-settings"),
178
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, "v1/app-settings"),
168
179
  method: "GET",
169
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
170
- contentType: "application/json",
171
- requestType: "json",
180
+ headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
181
+ Authorization: yield this._getAuthorizationHeader(),
182
+ "X-Organization-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId,
183
+ "X-Agent-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId,
184
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
172
185
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
173
186
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
174
187
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
175
188
  });
176
189
  if (_response.ok) {
177
- return serializers.appSettings.get.Response.parseOrThrow(_response.body, {
178
- unrecognizedObjectKeys: "passthrough",
179
- allowUnrecognizedUnionMembers: true,
180
- allowUnrecognizedEnumValues: true,
181
- breadcrumbsPrefix: ["response"],
182
- });
190
+ return {
191
+ data: serializers.appSettings.get.Response.parseOrThrow(_response.body, {
192
+ unrecognizedObjectKeys: "passthrough",
193
+ allowUnrecognizedUnionMembers: true,
194
+ allowUnrecognizedEnumValues: true,
195
+ breadcrumbsPrefix: ["response"],
196
+ }),
197
+ rawResponse: _response.rawResponse,
198
+ };
183
199
  }
184
200
  if (_response.error.reason === "status-code") {
185
201
  switch (_response.error.statusCode) {
@@ -189,25 +205,26 @@ class AppSettings {
189
205
  allowUnrecognizedUnionMembers: true,
190
206
  allowUnrecognizedEnumValues: true,
191
207
  breadcrumbsPrefix: ["response"],
192
- }));
208
+ }), _response.rawResponse);
193
209
  case 400:
194
210
  throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
195
211
  unrecognizedObjectKeys: "passthrough",
196
212
  allowUnrecognizedUnionMembers: true,
197
213
  allowUnrecognizedEnumValues: true,
198
214
  breadcrumbsPrefix: ["response"],
199
- }));
215
+ }), _response.rawResponse);
200
216
  case 500:
201
217
  throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
202
218
  unrecognizedObjectKeys: "passthrough",
203
219
  allowUnrecognizedUnionMembers: true,
204
220
  allowUnrecognizedEnumValues: true,
205
221
  breadcrumbsPrefix: ["response"],
206
- }));
222
+ }), _response.rawResponse);
207
223
  default:
208
224
  throw new errors.MavenAGIError({
209
225
  statusCode: _response.error.statusCode,
210
226
  body: _response.error.body,
227
+ rawResponse: _response.rawResponse,
211
228
  });
212
229
  }
213
230
  }
@@ -216,12 +233,14 @@ class AppSettings {
216
233
  throw new errors.MavenAGIError({
217
234
  statusCode: _response.error.statusCode,
218
235
  body: _response.error.rawBody,
236
+ rawResponse: _response.rawResponse,
219
237
  });
220
238
  case "timeout":
221
239
  throw new errors.MavenAGITimeoutError("Timeout exceeded when calling GET /v1/app-settings.");
222
240
  case "unknown":
223
241
  throw new errors.MavenAGIError({
224
242
  message: _response.error.errorMessage,
243
+ rawResponse: _response.rawResponse,
225
244
  });
226
245
  }
227
246
  });
@@ -250,12 +269,19 @@ class AppSettings {
250
269
  * })
251
270
  */
252
271
  update(request, requestOptions) {
272
+ return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));
273
+ }
274
+ __update(request, requestOptions) {
253
275
  return __awaiter(this, void 0, void 0, function* () {
254
- var _a, _b, _c;
276
+ var _a, _b, _c, _d;
255
277
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
256
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, "v1/app-settings"),
278
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MavenAGIEnvironment.Production, "v1/app-settings"),
257
279
  method: "PATCH",
258
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.15", "User-Agent": "mavenagi/1.0.15", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
280
+ headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
281
+ Authorization: yield this._getAuthorizationHeader(),
282
+ "X-Organization-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId,
283
+ "X-Agent-Id": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId,
284
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
259
285
  contentType: "application/json",
260
286
  requestType: "json",
261
287
  body: serializers.appSettings.update.Request.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -264,12 +290,15 @@ class AppSettings {
264
290
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
265
291
  });
266
292
  if (_response.ok) {
267
- return serializers.appSettings.update.Response.parseOrThrow(_response.body, {
268
- unrecognizedObjectKeys: "passthrough",
269
- allowUnrecognizedUnionMembers: true,
270
- allowUnrecognizedEnumValues: true,
271
- breadcrumbsPrefix: ["response"],
272
- });
293
+ return {
294
+ data: serializers.appSettings.update.Response.parseOrThrow(_response.body, {
295
+ unrecognizedObjectKeys: "passthrough",
296
+ allowUnrecognizedUnionMembers: true,
297
+ allowUnrecognizedEnumValues: true,
298
+ breadcrumbsPrefix: ["response"],
299
+ }),
300
+ rawResponse: _response.rawResponse,
301
+ };
273
302
  }
274
303
  if (_response.error.reason === "status-code") {
275
304
  switch (_response.error.statusCode) {
@@ -279,25 +308,26 @@ class AppSettings {
279
308
  allowUnrecognizedUnionMembers: true,
280
309
  allowUnrecognizedEnumValues: true,
281
310
  breadcrumbsPrefix: ["response"],
282
- }));
311
+ }), _response.rawResponse);
283
312
  case 400:
284
313
  throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
285
314
  unrecognizedObjectKeys: "passthrough",
286
315
  allowUnrecognizedUnionMembers: true,
287
316
  allowUnrecognizedEnumValues: true,
288
317
  breadcrumbsPrefix: ["response"],
289
- }));
318
+ }), _response.rawResponse);
290
319
  case 500:
291
320
  throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
292
321
  unrecognizedObjectKeys: "passthrough",
293
322
  allowUnrecognizedUnionMembers: true,
294
323
  allowUnrecognizedEnumValues: true,
295
324
  breadcrumbsPrefix: ["response"],
296
- }));
325
+ }), _response.rawResponse);
297
326
  default:
298
327
  throw new errors.MavenAGIError({
299
328
  statusCode: _response.error.statusCode,
300
329
  body: _response.error.body,
330
+ rawResponse: _response.rawResponse,
301
331
  });
302
332
  }
303
333
  }
@@ -306,12 +336,14 @@ class AppSettings {
306
336
  throw new errors.MavenAGIError({
307
337
  statusCode: _response.error.statusCode,
308
338
  body: _response.error.rawBody,
339
+ rawResponse: _response.rawResponse,
309
340
  });
310
341
  case "timeout":
311
342
  throw new errors.MavenAGITimeoutError("Timeout exceeded when calling PATCH /v1/app-settings.");
312
343
  case "unknown":
313
344
  throw new errors.MavenAGIError({
314
345
  message: _response.error.errorMessage,
346
+ rawResponse: _response.rawResponse,
315
347
  });
316
348
  }
317
349
  });
@@ -1 +1,2 @@
1
+ export {};
1
2
  export * from "./requests";
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as errors from "../../../../errors/index";
5
5
  import * as MavenAGI from "../../../index";
6
+ import * as core from "../../../../core";
6
7
  export declare class BadRequestError extends errors.MavenAGIError {
7
- constructor(body: MavenAGI.ErrorMessage);
8
+ constructor(body: MavenAGI.ErrorMessage, rawResponse?: core.RawResponse);
8
9
  }
@@ -39,11 +39,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.BadRequestError = void 0;
40
40
  const errors = __importStar(require("../../../../errors/index"));
41
41
  class BadRequestError extends errors.MavenAGIError {
42
- constructor(body) {
42
+ constructor(body, rawResponse) {
43
43
  super({
44
44
  message: "BadRequestError",
45
45
  statusCode: 400,
46
46
  body: body,
47
+ rawResponse: rawResponse,
47
48
  });
48
49
  Object.setPrototypeOf(this, BadRequestError.prototype);
49
50
  }
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as errors from "../../../../errors/index";
5
5
  import * as MavenAGI from "../../../index";
6
+ import * as core from "../../../../core";
6
7
  export declare class NotFoundError extends errors.MavenAGIError {
7
- constructor(body: MavenAGI.ErrorMessage);
8
+ constructor(body: MavenAGI.ErrorMessage, rawResponse?: core.RawResponse);
8
9
  }
@@ -39,11 +39,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.NotFoundError = void 0;
40
40
  const errors = __importStar(require("../../../../errors/index"));
41
41
  class NotFoundError extends errors.MavenAGIError {
42
- constructor(body) {
42
+ constructor(body, rawResponse) {
43
43
  super({
44
44
  message: "NotFoundError",
45
45
  statusCode: 404,
46
46
  body: body,
47
+ rawResponse: rawResponse,
47
48
  });
48
49
  Object.setPrototypeOf(this, NotFoundError.prototype);
49
50
  }
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as errors from "../../../../errors/index";
5
5
  import * as MavenAGI from "../../../index";
6
+ import * as core from "../../../../core";
6
7
  export declare class ServerError extends errors.MavenAGIError {
7
- constructor(body: MavenAGI.ErrorMessage);
8
+ constructor(body: MavenAGI.ErrorMessage, rawResponse?: core.RawResponse);
8
9
  }
@@ -39,11 +39,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.ServerError = void 0;
40
40
  const errors = __importStar(require("../../../../errors/index"));
41
41
  class ServerError extends errors.MavenAGIError {
42
- constructor(body) {
42
+ constructor(body, rawResponse) {
43
43
  super({
44
44
  message: "ServerError",
45
45
  statusCode: 500,
46
46
  body: body,
47
+ rawResponse: rawResponse,
47
48
  });
48
49
  Object.setPrototypeOf(this, ServerError.prototype);
49
50
  }
@@ -8,10 +8,10 @@ import * as MavenAGI from "../../../index";
8
8
  * userId: {
9
9
  * referenceId: "user-0"
10
10
  * },
11
- * identifiers: new Set([{
11
+ * identifiers: [{
12
12
  * value: "joe@myapp.com",
13
13
  * type: MavenAGI.AppUserIdentifyingPropertyType.Email
14
- * }]),
14
+ * }],
15
15
  * data: {
16
16
  * "name": {
17
17
  * value: "Joe",
@@ -12,10 +12,10 @@ import * as MavenAGI from "../../../index";
12
12
  * agentId: "support",
13
13
  * type: MavenAGI.EntityType.UserProfile
14
14
  * },
15
- * identifiers: new Set([{
15
+ * identifiers: [{
16
16
  * value: "joe@myapp.com",
17
17
  * type: MavenAGI.AppUserIdentifyingPropertyType.Email
18
- * }]),
18
+ * }],
19
19
  * data: {
20
20
  * "name": {
21
21
  * value: "Joe",
@@ -46,7 +46,8 @@ import * as MavenAGI from "../../../index";
46
46
  * },
47
47
  * text: "How do I reset my password?",
48
48
  * attachments: [{
49
- * url: "https://example.com/attachment-0"
49
+ * url: "https://example.com/attachment-0",
50
+ * type: "image/png"
50
51
  * }]
51
52
  * }, {
52
53
  * type: "bot",
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type InboxItemFixType =
5
+ /**
6
+ * The inbox item fix is to deactivate a knowledge base document. */
7
+ "REMOVE_DOCUMENT"
8
+ /**
9
+ * The inbox item fix is to add a new knowledge base document. */
10
+ | "ADD_DOCUMENT";
11
+ export declare const InboxItemFixType: {
12
+ readonly RemoveDocument: "REMOVE_DOCUMENT";
13
+ readonly AddDocument: "ADD_DOCUMENT";
14
+ };
@@ -3,8 +3,8 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.AudioFormat = void 0;
7
- exports.AudioFormat = {
8
- Pcm16: "PCM16",
9
- G711Ulaw: "G711_ULAW",
6
+ exports.InboxItemFixType = void 0;
7
+ exports.InboxItemFixType = {
8
+ RemoveDocument: "REMOVE_DOCUMENT",
9
+ AddDocument: "ADD_DOCUMENT",
10
10
  };
@@ -2,6 +2,22 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface UserMessageAttachment {
5
+ /**
6
+ * The mime-type of the attachment. Supported types are:
7
+ * - image/jpeg
8
+ * - image/jpg
9
+ * - image/png
10
+ * - image/gif
11
+ * - image/webp
12
+ * - application/pdf
13
+ * - audio/aac
14
+ * - audio/mpeg
15
+ * - audio/mp4
16
+ * - video/mp4
17
+ */
18
+ type: string;
5
19
  /** The URL to access the attachment, The URL will be valid for 20 minutes. */
6
20
  url: string;
21
+ /** An optional name for the attachment. */
22
+ name?: string;
7
23
  }
@@ -66,6 +66,7 @@ export * from "./KnowledgeBaseInformation";
66
66
  export * from "./DocumentInformation";
67
67
  export * from "./InboxItemStatus";
68
68
  export * from "./InboxItemType";
69
+ export * from "./InboxItemFixType";
69
70
  export * from "./InboxItem";
70
71
  export * from "./InboxItemBase";
71
72
  export * from "./InboxItemKnowledgeBaseAlert";
@@ -82,6 +82,7 @@ __exportStar(require("./KnowledgeBaseInformation"), exports);
82
82
  __exportStar(require("./DocumentInformation"), exports);
83
83
  __exportStar(require("./InboxItemStatus"), exports);
84
84
  __exportStar(require("./InboxItemType"), exports);
85
+ __exportStar(require("./InboxItemFixType"), exports);
85
86
  __exportStar(require("./InboxItem"), exports);
86
87
  __exportStar(require("./InboxItemBase"), exports);
87
88
  __exportStar(require("./InboxItemKnowledgeBaseAlert"), exports);