mavenagi 1.2.10 → 1.2.12

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 (322) hide show
  1. package/Client.d.ts +6 -0
  2. package/Client.js +32 -22
  3. package/api/resources/auth/client/Client.d.ts +33 -0
  4. package/api/resources/auth/client/Client.js +171 -0
  5. package/api/resources/auth/client/index.d.ts +1 -0
  6. package/api/resources/auth/client/index.js +2 -0
  7. package/api/resources/auth/index.d.ts +2 -0
  8. package/api/resources/auth/index.js +18 -0
  9. package/api/resources/auth/types/SessionTokenRequest.d.ts +3 -0
  10. package/api/resources/auth/types/SessionTokenRequest.js +3 -0
  11. package/api/resources/auth/types/SessionTokenResponse.d.ts +6 -0
  12. package/api/resources/auth/types/SessionTokenResponse.js +3 -0
  13. package/api/resources/auth/types/index.d.ts +2 -0
  14. package/api/resources/auth/types/index.js +18 -0
  15. package/api/resources/commons/types/ActionBase.d.ts +1 -11
  16. package/api/resources/commons/types/ActionParameterType.d.ts +3 -0
  17. package/api/resources/commons/types/ActionParameterType.js +3 -0
  18. package/api/resources/commons/types/ActionProperties.d.ts +13 -0
  19. package/api/resources/commons/types/ActionProperties.js +3 -0
  20. package/api/resources/commons/types/ActionUser.d.ts +46 -0
  21. package/api/resources/commons/types/ActionUser.js +3 -0
  22. package/api/resources/commons/types/EntityType.d.ts +1 -0
  23. package/api/resources/commons/types/EntityType.js +1 -0
  24. package/api/resources/commons/types/EventField.d.ts +1 -0
  25. package/api/resources/commons/types/EventField.js +1 -0
  26. package/api/resources/commons/types/MetadataPrecondition.d.ts +3 -1
  27. package/api/resources/commons/types/PreconditionOperator.d.ts +20 -0
  28. package/api/resources/commons/types/PreconditionOperator.js +20 -0
  29. package/api/resources/commons/types/UserEvent.d.ts +2 -0
  30. package/api/resources/commons/types/index.d.ts +3 -0
  31. package/api/resources/commons/types/index.js +3 -0
  32. package/api/resources/index.d.ts +4 -0
  33. package/api/resources/index.js +5 -1
  34. package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +2 -0
  35. package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +1 -1
  36. package/api/resources/segments/types/SegmentResponse.d.ts +6 -0
  37. package/api/resources/triggers/types/index.d.ts +0 -1
  38. package/api/resources/triggers/types/index.js +0 -1
  39. package/api/resources/websockets/client/Client.d.ts +22 -0
  40. package/api/resources/websockets/client/Client.js +89 -0
  41. package/api/resources/websockets/client/Socket.d.ts +48 -0
  42. package/api/resources/websockets/client/Socket.js +172 -0
  43. package/api/resources/websockets/client/index.d.ts +1 -0
  44. package/api/resources/websockets/client/index.js +2 -0
  45. package/api/resources/websockets/index.d.ts +2 -0
  46. package/api/resources/websockets/index.js +18 -0
  47. package/api/resources/websockets/types/AgentAudioChunk.d.ts +9 -0
  48. package/api/resources/websockets/types/AgentAudioChunk.js +3 -0
  49. package/api/resources/websockets/types/AgentTranscript.d.ts +9 -0
  50. package/api/resources/websockets/types/AgentTranscript.js +3 -0
  51. package/api/resources/websockets/types/AudioFormat.d.ts +7 -0
  52. package/api/resources/websockets/types/AudioFormat.js +10 -0
  53. package/api/resources/websockets/types/Config.d.ts +15 -0
  54. package/api/resources/websockets/types/Config.js +3 -0
  55. package/api/resources/websockets/types/ConversationEnded.d.ts +7 -0
  56. package/api/resources/websockets/types/ConversationEnded.js +3 -0
  57. package/api/resources/websockets/types/ConversationReady.d.ts +6 -0
  58. package/api/resources/websockets/types/ConversationReady.js +3 -0
  59. package/api/resources/websockets/types/Error_.d.ts +9 -0
  60. package/api/resources/websockets/types/Error_.js +3 -0
  61. package/api/resources/websockets/types/ServerEventBase.d.ts +6 -0
  62. package/api/resources/websockets/types/ServerEventBase.js +3 -0
  63. package/api/resources/websockets/types/UserAudioChunk.d.ts +8 -0
  64. package/api/resources/websockets/types/UserAudioChunk.js +3 -0
  65. package/api/resources/websockets/types/UserFinishedSpeaking.d.ts +7 -0
  66. package/api/resources/websockets/types/UserFinishedSpeaking.js +3 -0
  67. package/api/resources/websockets/types/UserStartedSpeaking.d.ts +7 -0
  68. package/api/resources/websockets/types/UserStartedSpeaking.js +3 -0
  69. package/api/resources/websockets/types/UserTranscript.d.ts +9 -0
  70. package/api/resources/websockets/types/UserTranscript.js +3 -0
  71. package/api/resources/websockets/types/index.d.ts +12 -0
  72. package/api/resources/websockets/types/index.js +28 -0
  73. package/core/index.d.ts +1 -0
  74. package/core/index.js +1 -0
  75. package/core/websocket/events.d.ts +36 -0
  76. package/core/websocket/events.js +27 -0
  77. package/core/websocket/index.d.ts +1 -0
  78. package/core/websocket/index.js +17 -0
  79. package/core/websocket/ws.d.ts +147 -0
  80. package/core/websocket/ws.js +444 -0
  81. package/dist/Client.d.ts +6 -0
  82. package/dist/Client.js +32 -22
  83. package/dist/api/resources/auth/client/Client.d.ts +33 -0
  84. package/dist/api/resources/auth/client/Client.js +171 -0
  85. package/dist/api/resources/auth/client/index.d.ts +1 -0
  86. package/dist/api/resources/auth/client/index.js +2 -0
  87. package/dist/api/resources/auth/index.d.ts +2 -0
  88. package/dist/api/resources/auth/index.js +18 -0
  89. package/dist/api/resources/auth/types/SessionTokenRequest.d.ts +3 -0
  90. package/dist/api/resources/auth/types/SessionTokenRequest.js +3 -0
  91. package/dist/api/resources/auth/types/SessionTokenResponse.d.ts +6 -0
  92. package/dist/api/resources/auth/types/SessionTokenResponse.js +3 -0
  93. package/dist/api/resources/auth/types/index.d.ts +2 -0
  94. package/dist/api/resources/auth/types/index.js +18 -0
  95. package/dist/api/resources/commons/types/ActionBase.d.ts +1 -11
  96. package/dist/api/resources/commons/types/ActionParameterType.d.ts +3 -0
  97. package/dist/api/resources/commons/types/ActionParameterType.js +3 -0
  98. package/dist/api/resources/commons/types/ActionProperties.d.ts +13 -0
  99. package/dist/api/resources/commons/types/ActionProperties.js +3 -0
  100. package/dist/api/resources/commons/types/ActionUser.d.ts +46 -0
  101. package/dist/api/resources/commons/types/ActionUser.js +3 -0
  102. package/dist/api/resources/commons/types/EntityType.d.ts +1 -0
  103. package/dist/api/resources/commons/types/EntityType.js +1 -0
  104. package/dist/api/resources/commons/types/EventField.d.ts +1 -0
  105. package/dist/api/resources/commons/types/EventField.js +1 -0
  106. package/dist/api/resources/commons/types/MetadataPrecondition.d.ts +3 -1
  107. package/dist/api/resources/commons/types/PreconditionOperator.d.ts +20 -0
  108. package/dist/api/resources/commons/types/PreconditionOperator.js +20 -0
  109. package/dist/api/resources/commons/types/UserEvent.d.ts +2 -0
  110. package/dist/api/resources/commons/types/index.d.ts +3 -0
  111. package/dist/api/resources/commons/types/index.js +3 -0
  112. package/dist/api/resources/index.d.ts +4 -0
  113. package/dist/api/resources/index.js +5 -1
  114. package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +2 -0
  115. package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +1 -1
  116. package/dist/api/resources/segments/types/SegmentResponse.d.ts +6 -0
  117. package/dist/api/resources/triggers/types/index.d.ts +0 -1
  118. package/dist/api/resources/triggers/types/index.js +0 -1
  119. package/dist/api/resources/websockets/client/Client.d.ts +22 -0
  120. package/dist/api/resources/websockets/client/Client.js +89 -0
  121. package/dist/api/resources/websockets/client/Socket.d.ts +48 -0
  122. package/dist/api/resources/websockets/client/Socket.js +172 -0
  123. package/dist/api/resources/websockets/client/index.d.ts +1 -0
  124. package/dist/api/resources/websockets/client/index.js +2 -0
  125. package/dist/api/resources/websockets/index.d.ts +2 -0
  126. package/dist/api/resources/websockets/index.js +18 -0
  127. package/dist/api/resources/websockets/types/AgentAudioChunk.d.ts +9 -0
  128. package/dist/api/resources/websockets/types/AgentAudioChunk.js +3 -0
  129. package/dist/api/resources/websockets/types/AgentTranscript.d.ts +9 -0
  130. package/dist/api/resources/websockets/types/AgentTranscript.js +3 -0
  131. package/dist/api/resources/websockets/types/AudioFormat.d.ts +7 -0
  132. package/dist/api/resources/websockets/types/AudioFormat.js +10 -0
  133. package/dist/api/resources/websockets/types/Config.d.ts +15 -0
  134. package/dist/api/resources/websockets/types/Config.js +3 -0
  135. package/dist/api/resources/websockets/types/ConversationEnded.d.ts +7 -0
  136. package/dist/api/resources/websockets/types/ConversationEnded.js +3 -0
  137. package/dist/api/resources/websockets/types/ConversationReady.d.ts +6 -0
  138. package/dist/api/resources/websockets/types/ConversationReady.js +3 -0
  139. package/dist/api/resources/websockets/types/Error_.d.ts +9 -0
  140. package/dist/api/resources/websockets/types/Error_.js +3 -0
  141. package/dist/api/resources/websockets/types/ServerEventBase.d.ts +6 -0
  142. package/dist/api/resources/websockets/types/ServerEventBase.js +3 -0
  143. package/dist/api/resources/websockets/types/UserAudioChunk.d.ts +8 -0
  144. package/dist/api/resources/websockets/types/UserAudioChunk.js +3 -0
  145. package/dist/api/resources/websockets/types/UserFinishedSpeaking.d.ts +7 -0
  146. package/dist/api/resources/websockets/types/UserFinishedSpeaking.js +3 -0
  147. package/dist/api/resources/websockets/types/UserStartedSpeaking.d.ts +7 -0
  148. package/dist/api/resources/websockets/types/UserStartedSpeaking.js +3 -0
  149. package/dist/api/resources/websockets/types/UserTranscript.d.ts +9 -0
  150. package/dist/api/resources/websockets/types/UserTranscript.js +3 -0
  151. package/dist/api/resources/websockets/types/index.d.ts +12 -0
  152. package/dist/api/resources/websockets/types/index.js +28 -0
  153. package/dist/core/index.d.ts +1 -0
  154. package/dist/core/index.js +1 -0
  155. package/dist/core/websocket/events.d.ts +36 -0
  156. package/dist/core/websocket/events.js +27 -0
  157. package/dist/core/websocket/index.d.ts +1 -0
  158. package/dist/core/websocket/index.js +17 -0
  159. package/dist/core/websocket/ws.d.ts +147 -0
  160. package/dist/core/websocket/ws.js +444 -0
  161. package/dist/serialization/resources/auth/index.d.ts +1 -0
  162. package/dist/serialization/resources/auth/index.js +17 -0
  163. package/dist/serialization/resources/auth/types/SessionTokenRequest.d.ts +9 -0
  164. package/dist/serialization/resources/auth/types/SessionTokenRequest.js +41 -0
  165. package/dist/serialization/resources/auth/types/SessionTokenResponse.d.ts +10 -0
  166. package/dist/serialization/resources/auth/types/SessionTokenResponse.js +42 -0
  167. package/dist/serialization/resources/auth/types/index.d.ts +2 -0
  168. package/dist/serialization/resources/auth/types/index.js +18 -0
  169. package/dist/serialization/resources/commons/types/ActionBase.d.ts +3 -8
  170. package/dist/serialization/resources/commons/types/ActionBase.js +5 -9
  171. package/dist/serialization/resources/commons/types/ActionParameterType.d.ts +1 -1
  172. package/dist/serialization/resources/commons/types/ActionParameterType.js +1 -0
  173. package/dist/serialization/resources/commons/types/ActionProperties.d.ts +14 -0
  174. package/dist/serialization/resources/commons/types/ActionProperties.js +47 -0
  175. package/dist/serialization/resources/commons/types/ActionUser.d.ts +17 -0
  176. package/dist/serialization/resources/commons/types/ActionUser.js +49 -0
  177. package/dist/serialization/resources/commons/types/EntityType.d.ts +1 -1
  178. package/dist/serialization/resources/commons/types/EntityType.js +1 -0
  179. package/dist/serialization/resources/commons/types/EventField.d.ts +1 -1
  180. package/dist/serialization/resources/commons/types/EventField.js +1 -0
  181. package/dist/serialization/resources/commons/types/MetadataPrecondition.d.ts +1 -0
  182. package/dist/serialization/resources/commons/types/MetadataPrecondition.js +1 -0
  183. package/dist/serialization/resources/commons/types/PreconditionOperator.d.ts +1 -1
  184. package/dist/serialization/resources/commons/types/PreconditionOperator.js +9 -1
  185. package/dist/serialization/resources/commons/types/UserEvent.d.ts +1 -0
  186. package/dist/serialization/resources/commons/types/UserEvent.js +1 -0
  187. package/dist/serialization/resources/commons/types/index.d.ts +3 -0
  188. package/dist/serialization/resources/commons/types/index.js +3 -0
  189. package/dist/serialization/resources/index.d.ts +5 -0
  190. package/dist/serialization/resources/index.js +6 -1
  191. package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -0
  192. package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +1 -0
  193. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +1 -1
  194. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +1 -1
  195. package/dist/serialization/resources/segments/types/SegmentResponse.d.ts +2 -0
  196. package/dist/serialization/resources/segments/types/SegmentResponse.js +2 -0
  197. package/dist/serialization/resources/triggers/types/EventTriggerBase.d.ts +1 -1
  198. package/dist/serialization/resources/triggers/types/EventTriggerBase.js +1 -1
  199. package/dist/serialization/resources/triggers/types/index.d.ts +0 -1
  200. package/dist/serialization/resources/triggers/types/index.js +0 -1
  201. package/dist/serialization/resources/websockets/client/index.d.ts +1 -0
  202. package/dist/serialization/resources/websockets/client/index.js +17 -0
  203. package/dist/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.d.ts +15 -0
  204. package/dist/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.js +56 -0
  205. package/dist/serialization/resources/websockets/client/socket/index.d.ts +1 -0
  206. package/dist/serialization/resources/websockets/client/socket/index.js +5 -0
  207. package/dist/serialization/resources/websockets/index.d.ts +2 -0
  208. package/dist/serialization/resources/websockets/index.js +18 -0
  209. package/dist/serialization/resources/websockets/types/AgentAudioChunk.d.ts +11 -0
  210. package/dist/serialization/resources/websockets/types/AgentAudioChunk.js +45 -0
  211. package/dist/serialization/resources/websockets/types/AgentTranscript.d.ts +11 -0
  212. package/dist/serialization/resources/websockets/types/AgentTranscript.js +45 -0
  213. package/dist/serialization/resources/websockets/types/AudioFormat.d.ts +7 -0
  214. package/dist/serialization/resources/websockets/types/AudioFormat.js +39 -0
  215. package/dist/serialization/resources/websockets/types/Config.d.ts +14 -0
  216. package/dist/serialization/resources/websockets/types/Config.js +46 -0
  217. package/dist/serialization/resources/websockets/types/ConversationEnded.d.ts +10 -0
  218. package/dist/serialization/resources/websockets/types/ConversationEnded.js +44 -0
  219. package/dist/serialization/resources/websockets/types/ConversationReady.d.ts +9 -0
  220. package/dist/serialization/resources/websockets/types/ConversationReady.js +41 -0
  221. package/dist/serialization/resources/websockets/types/Error_.d.ts +12 -0
  222. package/dist/serialization/resources/websockets/types/Error_.js +46 -0
  223. package/dist/serialization/resources/websockets/types/ServerEventBase.d.ts +9 -0
  224. package/dist/serialization/resources/websockets/types/ServerEventBase.js +41 -0
  225. package/dist/serialization/resources/websockets/types/UserAudioChunk.d.ts +10 -0
  226. package/dist/serialization/resources/websockets/types/UserAudioChunk.js +42 -0
  227. package/dist/serialization/resources/websockets/types/UserFinishedSpeaking.d.ts +10 -0
  228. package/dist/serialization/resources/websockets/types/UserFinishedSpeaking.js +44 -0
  229. package/dist/serialization/resources/websockets/types/UserStartedSpeaking.d.ts +10 -0
  230. package/dist/serialization/resources/websockets/types/UserStartedSpeaking.js +44 -0
  231. package/dist/serialization/resources/websockets/types/UserTranscript.d.ts +11 -0
  232. package/dist/serialization/resources/websockets/types/UserTranscript.js +45 -0
  233. package/dist/serialization/resources/websockets/types/index.d.ts +12 -0
  234. package/dist/serialization/resources/websockets/types/index.js +28 -0
  235. package/dist/version.d.ts +1 -1
  236. package/dist/version.js +1 -1
  237. package/package.json +5 -1
  238. package/reference.md +73 -5
  239. package/serialization/resources/auth/index.d.ts +1 -0
  240. package/serialization/resources/auth/index.js +17 -0
  241. package/serialization/resources/auth/types/SessionTokenRequest.d.ts +9 -0
  242. package/serialization/resources/auth/types/SessionTokenRequest.js +41 -0
  243. package/serialization/resources/auth/types/SessionTokenResponse.d.ts +10 -0
  244. package/serialization/resources/auth/types/SessionTokenResponse.js +42 -0
  245. package/serialization/resources/auth/types/index.d.ts +2 -0
  246. package/serialization/resources/auth/types/index.js +18 -0
  247. package/serialization/resources/commons/types/ActionBase.d.ts +3 -8
  248. package/serialization/resources/commons/types/ActionBase.js +5 -9
  249. package/serialization/resources/commons/types/ActionParameterType.d.ts +1 -1
  250. package/serialization/resources/commons/types/ActionParameterType.js +1 -0
  251. package/serialization/resources/commons/types/ActionProperties.d.ts +14 -0
  252. package/serialization/resources/commons/types/ActionProperties.js +47 -0
  253. package/serialization/resources/commons/types/ActionUser.d.ts +17 -0
  254. package/serialization/resources/commons/types/ActionUser.js +49 -0
  255. package/serialization/resources/commons/types/EntityType.d.ts +1 -1
  256. package/serialization/resources/commons/types/EntityType.js +1 -0
  257. package/serialization/resources/commons/types/EventField.d.ts +1 -1
  258. package/serialization/resources/commons/types/EventField.js +1 -0
  259. package/serialization/resources/commons/types/MetadataPrecondition.d.ts +1 -0
  260. package/serialization/resources/commons/types/MetadataPrecondition.js +1 -0
  261. package/serialization/resources/commons/types/PreconditionOperator.d.ts +1 -1
  262. package/serialization/resources/commons/types/PreconditionOperator.js +9 -1
  263. package/serialization/resources/commons/types/UserEvent.d.ts +1 -0
  264. package/serialization/resources/commons/types/UserEvent.js +1 -0
  265. package/serialization/resources/commons/types/index.d.ts +3 -0
  266. package/serialization/resources/commons/types/index.js +3 -0
  267. package/serialization/resources/index.d.ts +5 -0
  268. package/serialization/resources/index.js +6 -1
  269. package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -0
  270. package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +1 -0
  271. package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +1 -1
  272. package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +1 -1
  273. package/serialization/resources/segments/types/SegmentResponse.d.ts +2 -0
  274. package/serialization/resources/segments/types/SegmentResponse.js +2 -0
  275. package/serialization/resources/triggers/types/EventTriggerBase.d.ts +1 -1
  276. package/serialization/resources/triggers/types/EventTriggerBase.js +1 -1
  277. package/serialization/resources/triggers/types/index.d.ts +0 -1
  278. package/serialization/resources/triggers/types/index.js +0 -1
  279. package/serialization/resources/websockets/client/index.d.ts +1 -0
  280. package/serialization/resources/websockets/client/index.js +17 -0
  281. package/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.d.ts +15 -0
  282. package/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.js +56 -0
  283. package/serialization/resources/websockets/client/socket/index.d.ts +1 -0
  284. package/serialization/resources/websockets/client/socket/index.js +5 -0
  285. package/serialization/resources/websockets/index.d.ts +2 -0
  286. package/serialization/resources/websockets/index.js +18 -0
  287. package/serialization/resources/websockets/types/AgentAudioChunk.d.ts +11 -0
  288. package/serialization/resources/websockets/types/AgentAudioChunk.js +45 -0
  289. package/serialization/resources/websockets/types/AgentTranscript.d.ts +11 -0
  290. package/serialization/resources/websockets/types/AgentTranscript.js +45 -0
  291. package/serialization/resources/websockets/types/AudioFormat.d.ts +7 -0
  292. package/serialization/resources/websockets/types/AudioFormat.js +39 -0
  293. package/serialization/resources/websockets/types/Config.d.ts +14 -0
  294. package/serialization/resources/websockets/types/Config.js +46 -0
  295. package/serialization/resources/websockets/types/ConversationEnded.d.ts +10 -0
  296. package/serialization/resources/websockets/types/ConversationEnded.js +44 -0
  297. package/serialization/resources/websockets/types/ConversationReady.d.ts +9 -0
  298. package/serialization/resources/websockets/types/ConversationReady.js +41 -0
  299. package/serialization/resources/websockets/types/Error_.d.ts +12 -0
  300. package/serialization/resources/websockets/types/Error_.js +46 -0
  301. package/serialization/resources/websockets/types/ServerEventBase.d.ts +9 -0
  302. package/serialization/resources/websockets/types/ServerEventBase.js +41 -0
  303. package/serialization/resources/websockets/types/UserAudioChunk.d.ts +10 -0
  304. package/serialization/resources/websockets/types/UserAudioChunk.js +42 -0
  305. package/serialization/resources/websockets/types/UserFinishedSpeaking.d.ts +10 -0
  306. package/serialization/resources/websockets/types/UserFinishedSpeaking.js +44 -0
  307. package/serialization/resources/websockets/types/UserStartedSpeaking.d.ts +10 -0
  308. package/serialization/resources/websockets/types/UserStartedSpeaking.js +44 -0
  309. package/serialization/resources/websockets/types/UserTranscript.d.ts +11 -0
  310. package/serialization/resources/websockets/types/UserTranscript.js +45 -0
  311. package/serialization/resources/websockets/types/index.d.ts +12 -0
  312. package/serialization/resources/websockets/types/index.js +28 -0
  313. package/version.d.ts +1 -1
  314. package/version.js +1 -1
  315. /package/api/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  316. /package/api/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  317. /package/dist/api/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  318. /package/dist/api/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  319. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  320. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  321. /package/serialization/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  322. /package/serialization/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.Websockets = void 0;
47
+ const core = __importStar(require("../../../../core"));
48
+ const headers_1 = require("../../../../core/headers");
49
+ const environments = __importStar(require("../../../../environments"));
50
+ const Socket_1 = require("./Socket");
51
+ class Websockets {
52
+ constructor(_options) {
53
+ this._options = _options;
54
+ }
55
+ connect(args) {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ var _a, _b;
58
+ const { version, headers, debug, reconnectAttempts } = args;
59
+ const _queryParams = {};
60
+ if (version != null) {
61
+ _queryParams.version = version;
62
+ }
63
+ const _headers = (0, headers_1.mergeHeaders)((0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: args.Authorization }), headers);
64
+ const socket = new core.ReconnectingWebSocket({
65
+ url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/realtime/conversations"),
66
+ protocols: [],
67
+ queryParameters: _queryParams,
68
+ headers: _headers,
69
+ options: { debug: debug !== null && debug !== void 0 ? debug : false, maxRetries: reconnectAttempts !== null && reconnectAttempts !== void 0 ? reconnectAttempts : 30 },
70
+ });
71
+ return new Socket_1.WebsocketsSocket({ socket });
72
+ });
73
+ }
74
+ _getAuthorizationHeader() {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ var _a, _b;
77
+ const appId = (_a = (yield core.Supplier.get(this._options.appId))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env.MAVENAGI_APP_ID;
78
+ const appSecret = (_b = (yield core.Supplier.get(this._options.appSecret))) !== null && _b !== void 0 ? _b : process === null || process === void 0 ? void 0 : process.env.MAVENAGI_APP_SECRET;
79
+ if (appId != null && appSecret != null) {
80
+ return core.BasicAuth.toAuthorizationHeader({
81
+ username: appId,
82
+ password: appSecret,
83
+ });
84
+ }
85
+ return undefined;
86
+ });
87
+ }
88
+ }
89
+ exports.Websockets = Websockets;
@@ -0,0 +1,48 @@
1
+ import * as core from "../../../../core";
2
+ import type * as MavenAGI from "../../../index";
3
+ export declare namespace WebsocketsSocket {
4
+ interface Args {
5
+ socket: core.ReconnectingWebSocket;
6
+ }
7
+ type Response = MavenAGI.ConversationReady | MavenAGI.AgentAudioChunk | MavenAGI.UserTranscript | MavenAGI.AgentTranscript | MavenAGI.ConversationEnded | MavenAGI.UserStartedSpeaking | MavenAGI.UserFinishedSpeaking | MavenAGI.Error_;
8
+ type EventHandlers = {
9
+ open?: () => void;
10
+ message?: (message: Response) => void;
11
+ close?: (event: core.CloseEvent) => void;
12
+ error?: (error: Error) => void;
13
+ };
14
+ }
15
+ export declare class WebsocketsSocket {
16
+ readonly socket: core.ReconnectingWebSocket;
17
+ protected readonly eventHandlers: WebsocketsSocket.EventHandlers;
18
+ private handleOpen;
19
+ private handleMessage;
20
+ private handleClose;
21
+ private handleError;
22
+ constructor(args: WebsocketsSocket.Args);
23
+ /** The current state of the connection; this is one of the readyState constants. */
24
+ get readyState(): number;
25
+ /**
26
+ * @param event - The event to attach to.
27
+ * @param callback - The callback to run when the event is triggered.
28
+ * Usage:
29
+ * ```typescript
30
+ * this.on('open', () => {
31
+ * console.log('The websocket is open');
32
+ * });
33
+ * ```
34
+ */
35
+ on<T extends keyof WebsocketsSocket.EventHandlers>(event: T, callback: WebsocketsSocket.EventHandlers[T]): void;
36
+ sendConfig(message: MavenAGI.Config): void;
37
+ sendUserAudioChunk(message: MavenAGI.UserAudioChunk): void;
38
+ /** Connect to the websocket and register event handlers. */
39
+ connect(): WebsocketsSocket;
40
+ /** Close the websocket and unregister event handlers. */
41
+ close(): void;
42
+ /** Returns a promise that resolves when the websocket is open. */
43
+ waitForOpen(): Promise<core.ReconnectingWebSocket>;
44
+ /** Asserts that the websocket is open. */
45
+ private assertSocketIsOpen;
46
+ /** Send a binary payload to the websocket. */
47
+ protected sendBinary(payload: ArrayBufferLike | Blob | ArrayBufferView): void;
48
+ }
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.WebsocketsSocket = void 0;
47
+ const core = __importStar(require("../../../../core"));
48
+ const json_1 = require("../../../../core/json");
49
+ const serializers = __importStar(require("../../../../serialization/index"));
50
+ const Config_1 = require("../../../../serialization/resources/websockets/types/Config");
51
+ const UserAudioChunk_1 = require("../../../../serialization/resources/websockets/types/UserAudioChunk");
52
+ class WebsocketsSocket {
53
+ constructor(args) {
54
+ this.eventHandlers = {};
55
+ this.handleOpen = () => {
56
+ var _a, _b;
57
+ (_b = (_a = this.eventHandlers).open) === null || _b === void 0 ? void 0 : _b.call(_a);
58
+ };
59
+ this.handleMessage = (event) => {
60
+ var _a, _b, _c, _d;
61
+ const data = (0, json_1.fromJson)(event.data);
62
+ const parsedResponse = serializers.WebsocketsSocketResponse.parse(data, {
63
+ unrecognizedObjectKeys: "passthrough",
64
+ allowUnrecognizedUnionMembers: true,
65
+ allowUnrecognizedEnumValues: true,
66
+ });
67
+ if (parsedResponse.ok) {
68
+ (_b = (_a = this.eventHandlers).message) === null || _b === void 0 ? void 0 : _b.call(_a, parsedResponse.value);
69
+ }
70
+ else {
71
+ (_d = (_c = this.eventHandlers).error) === null || _d === void 0 ? void 0 : _d.call(_c, new Error("Received unknown message type"));
72
+ }
73
+ };
74
+ this.handleClose = (event) => {
75
+ var _a, _b;
76
+ (_b = (_a = this.eventHandlers).close) === null || _b === void 0 ? void 0 : _b.call(_a, event);
77
+ };
78
+ this.handleError = (event) => {
79
+ var _a, _b;
80
+ const message = event.message;
81
+ (_b = (_a = this.eventHandlers).error) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(message));
82
+ };
83
+ this.socket = args.socket;
84
+ this.socket.addEventListener("open", this.handleOpen);
85
+ this.socket.addEventListener("message", this.handleMessage);
86
+ this.socket.addEventListener("close", this.handleClose);
87
+ this.socket.addEventListener("error", this.handleError);
88
+ }
89
+ /** The current state of the connection; this is one of the readyState constants. */
90
+ get readyState() {
91
+ return this.socket.readyState;
92
+ }
93
+ /**
94
+ * @param event - The event to attach to.
95
+ * @param callback - The callback to run when the event is triggered.
96
+ * Usage:
97
+ * ```typescript
98
+ * this.on('open', () => {
99
+ * console.log('The websocket is open');
100
+ * });
101
+ * ```
102
+ */
103
+ on(event, callback) {
104
+ this.eventHandlers[event] = callback;
105
+ }
106
+ sendConfig(message) {
107
+ this.assertSocketIsOpen();
108
+ const jsonPayload = Config_1.Config.jsonOrThrow(message, {
109
+ unrecognizedObjectKeys: "passthrough",
110
+ allowUnrecognizedUnionMembers: true,
111
+ allowUnrecognizedEnumValues: true,
112
+ });
113
+ this.socket.send(JSON.stringify(jsonPayload));
114
+ }
115
+ sendUserAudioChunk(message) {
116
+ this.assertSocketIsOpen();
117
+ const jsonPayload = UserAudioChunk_1.UserAudioChunk.jsonOrThrow(message, {
118
+ unrecognizedObjectKeys: "passthrough",
119
+ allowUnrecognizedUnionMembers: true,
120
+ allowUnrecognizedEnumValues: true,
121
+ });
122
+ this.socket.send(JSON.stringify(jsonPayload));
123
+ }
124
+ /** Connect to the websocket and register event handlers. */
125
+ connect() {
126
+ this.socket.reconnect();
127
+ this.socket.addEventListener("open", this.handleOpen);
128
+ this.socket.addEventListener("message", this.handleMessage);
129
+ this.socket.addEventListener("close", this.handleClose);
130
+ this.socket.addEventListener("error", this.handleError);
131
+ return this;
132
+ }
133
+ /** Close the websocket and unregister event handlers. */
134
+ close() {
135
+ this.socket.close();
136
+ this.handleClose({ code: 1000 });
137
+ this.socket.removeEventListener("open", this.handleOpen);
138
+ this.socket.removeEventListener("message", this.handleMessage);
139
+ this.socket.removeEventListener("close", this.handleClose);
140
+ this.socket.removeEventListener("error", this.handleError);
141
+ }
142
+ /** Returns a promise that resolves when the websocket is open. */
143
+ waitForOpen() {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ if (this.socket.readyState === core.ReconnectingWebSocket.OPEN) {
146
+ return this.socket;
147
+ }
148
+ return new Promise((resolve, reject) => {
149
+ this.socket.addEventListener("open", () => {
150
+ resolve(this.socket);
151
+ });
152
+ this.socket.addEventListener("error", (event) => {
153
+ reject(event);
154
+ });
155
+ });
156
+ });
157
+ }
158
+ /** Asserts that the websocket is open. */
159
+ assertSocketIsOpen() {
160
+ if (!this.socket) {
161
+ throw new Error("Socket is not connected.");
162
+ }
163
+ if (this.socket.readyState !== core.ReconnectingWebSocket.OPEN) {
164
+ throw new Error("Socket is not open.");
165
+ }
166
+ }
167
+ /** Send a binary payload to the websocket. */
168
+ sendBinary(payload) {
169
+ this.socket.send(payload);
170
+ }
171
+ }
172
+ exports.WebsocketsSocket = WebsocketsSocket;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./client";
2
+ export * from "./types";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client"), exports);
18
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,9 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * Audio chunk to send into the conversation.
4
+ */
5
+ export interface AgentAudioChunk extends MavenAGI.ServerEventBase {
6
+ type: "agent_audio_chunk";
7
+ /** Base64-encoded AI audio data */
8
+ data: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * Transcribed agent speech
4
+ */
5
+ export interface AgentTranscript extends MavenAGI.ServerEventBase {
6
+ type: "agent_transcript";
7
+ /** Transcribed agent speech */
8
+ text: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export declare const AudioFormat: {
2
+ readonly Pcm44100: "PCM_44100";
3
+ readonly Pcm16000: "PCM_16000";
4
+ readonly Pcm8000: "PCM_8000";
5
+ readonly Mulaw8000: "MULAW_8000";
6
+ };
7
+ export type AudioFormat = (typeof AudioFormat)[keyof typeof AudioFormat];
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.AudioFormat = void 0;
5
+ exports.AudioFormat = {
6
+ Pcm44100: "PCM_44100",
7
+ Pcm16000: "PCM_16000",
8
+ Pcm8000: "PCM_8000",
9
+ Mulaw8000: "MULAW_8000",
10
+ };
@@ -0,0 +1,15 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * Initialize conversation with configuration parameters
4
+ */
5
+ export interface Config {
6
+ type: "config";
7
+ /** The user text to send into the conversation. */
8
+ inputFormat: MavenAGI.AudioFormat;
9
+ /** The user text to send into the conversation. */
10
+ outputFormat: MavenAGI.AudioFormat;
11
+ /** The conversation ID which was created prior to starting this conversation. */
12
+ conversationId: string;
13
+ /** The app ID this conversation ID is associated with. */
14
+ appId: string;
15
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * AI ended the conversation
4
+ */
5
+ export interface ConversationEnded extends MavenAGI.ServerEventBase {
6
+ type: "conversation_ended";
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Conversation created successfully.
3
+ */
4
+ export interface ConversationReady {
5
+ type: "conversation_ready";
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * Error occurred during conversation
4
+ */
5
+ export interface Error_ extends MavenAGI.ServerEventBase {
6
+ type: "error";
7
+ message: string;
8
+ code: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Base event type for all server events.
3
+ */
4
+ export interface ServerEventBase {
5
+ eventId: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Audio chunk to send into the conversation.
3
+ */
4
+ export interface UserAudioChunk {
5
+ type: "user_audio_chunk";
6
+ /** Base64-encoded AI audio data */
7
+ data: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * User finished speaking
4
+ */
5
+ export interface UserFinishedSpeaking extends MavenAGI.ServerEventBase {
6
+ type: "user_finished_speaking";
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * User started speaking
4
+ */
5
+ export interface UserStartedSpeaking extends MavenAGI.ServerEventBase {
6
+ type: "user_started_speaking";
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * Transcribed user speech
4
+ */
5
+ export interface UserTranscript extends MavenAGI.ServerEventBase {
6
+ type: "user_transcript";
7
+ /** Transcribed user speech */
8
+ text: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ export * from "./AgentAudioChunk";
2
+ export * from "./AgentTranscript";
3
+ export * from "./AudioFormat";
4
+ export * from "./Config";
5
+ export * from "./ConversationEnded";
6
+ export * from "./ConversationReady";
7
+ export * from "./Error_";
8
+ export * from "./ServerEventBase";
9
+ export * from "./UserAudioChunk";
10
+ export * from "./UserFinishedSpeaking";
11
+ export * from "./UserStartedSpeaking";
12
+ export * from "./UserTranscript";
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./AgentAudioChunk"), exports);
18
+ __exportStar(require("./AgentTranscript"), exports);
19
+ __exportStar(require("./AudioFormat"), exports);
20
+ __exportStar(require("./Config"), exports);
21
+ __exportStar(require("./ConversationEnded"), exports);
22
+ __exportStar(require("./ConversationReady"), exports);
23
+ __exportStar(require("./Error_"), exports);
24
+ __exportStar(require("./ServerEventBase"), exports);
25
+ __exportStar(require("./UserAudioChunk"), exports);
26
+ __exportStar(require("./UserFinishedSpeaking"), exports);
27
+ __exportStar(require("./UserStartedSpeaking"), exports);
28
+ __exportStar(require("./UserTranscript"), exports);
@@ -7,3 +7,4 @@ export * from "./runtime";
7
7
  export * as serialization from "./schemas";
8
8
  export * from "./stream";
9
9
  export * as url from "./url";
10
+ export * from "./websocket";
@@ -46,3 +46,4 @@ __exportStar(require("./runtime"), exports);
46
46
  exports.serialization = __importStar(require("./schemas"));
47
47
  __exportStar(require("./stream"), exports);
48
48
  exports.url = __importStar(require("./url"));
49
+ __exportStar(require("./websocket"), exports);
@@ -0,0 +1,36 @@
1
+ export declare class Event {
2
+ target: any;
3
+ type: string;
4
+ constructor(type: string, target: any);
5
+ }
6
+ export declare class ErrorEvent extends Event {
7
+ message: string;
8
+ error: Error;
9
+ constructor(error: Error, target: any);
10
+ }
11
+ export declare class CloseEvent extends Event {
12
+ code: number;
13
+ reason: string;
14
+ wasClean: boolean;
15
+ constructor(code: number | undefined, reason: string | undefined, target: any);
16
+ }
17
+ export interface WebSocketEventMap {
18
+ close: CloseEvent;
19
+ error: ErrorEvent;
20
+ message: MessageEvent;
21
+ open: Event;
22
+ }
23
+ export interface WebSocketEventListenerMap {
24
+ close: (event: CloseEvent) => void | {
25
+ handleEvent: (event: CloseEvent) => void;
26
+ };
27
+ error: (event: ErrorEvent) => void | {
28
+ handleEvent: (event: ErrorEvent) => void;
29
+ };
30
+ message: (event: MessageEvent) => void | {
31
+ handleEvent: (event: MessageEvent) => void;
32
+ };
33
+ open: (event: Event) => void | {
34
+ handleEvent: (event: Event) => void;
35
+ };
36
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CloseEvent = exports.ErrorEvent = exports.Event = void 0;
4
+ class Event {
5
+ constructor(type, target) {
6
+ this.target = target;
7
+ this.type = type;
8
+ }
9
+ }
10
+ exports.Event = Event;
11
+ class ErrorEvent extends Event {
12
+ constructor(error, target) {
13
+ super("error", target);
14
+ this.message = error.message;
15
+ this.error = error;
16
+ }
17
+ }
18
+ exports.ErrorEvent = ErrorEvent;
19
+ class CloseEvent extends Event {
20
+ constructor(code = 1000, reason = "", target) {
21
+ super("close", target);
22
+ this.wasClean = true;
23
+ this.code = code;
24
+ this.reason = reason;
25
+ }
26
+ }
27
+ exports.CloseEvent = CloseEvent;
@@ -0,0 +1 @@
1
+ export * from "./ws";