mavenagi 1.2.10 → 1.2.11

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 (296) 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/UserEvent.d.ts +2 -0
  27. package/api/resources/commons/types/index.d.ts +3 -0
  28. package/api/resources/commons/types/index.js +3 -0
  29. package/api/resources/index.d.ts +4 -0
  30. package/api/resources/index.js +5 -1
  31. package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +1 -1
  32. package/api/resources/triggers/types/index.d.ts +0 -1
  33. package/api/resources/triggers/types/index.js +0 -1
  34. package/api/resources/websockets/client/Client.d.ts +22 -0
  35. package/api/resources/websockets/client/Client.js +89 -0
  36. package/api/resources/websockets/client/Socket.d.ts +48 -0
  37. package/api/resources/websockets/client/Socket.js +172 -0
  38. package/api/resources/websockets/client/index.d.ts +1 -0
  39. package/api/resources/websockets/client/index.js +2 -0
  40. package/api/resources/websockets/index.d.ts +2 -0
  41. package/api/resources/websockets/index.js +18 -0
  42. package/api/resources/websockets/types/AgentAudioChunk.d.ts +9 -0
  43. package/api/resources/websockets/types/AgentAudioChunk.js +3 -0
  44. package/api/resources/websockets/types/AgentTranscript.d.ts +9 -0
  45. package/api/resources/websockets/types/AgentTranscript.js +3 -0
  46. package/api/resources/websockets/types/AudioFormat.d.ts +7 -0
  47. package/api/resources/websockets/types/AudioFormat.js +10 -0
  48. package/api/resources/websockets/types/Config.d.ts +15 -0
  49. package/api/resources/websockets/types/Config.js +3 -0
  50. package/api/resources/websockets/types/ConversationEnded.d.ts +7 -0
  51. package/api/resources/websockets/types/ConversationEnded.js +3 -0
  52. package/api/resources/websockets/types/ConversationReady.d.ts +6 -0
  53. package/api/resources/websockets/types/ConversationReady.js +3 -0
  54. package/api/resources/websockets/types/Error_.d.ts +9 -0
  55. package/api/resources/websockets/types/Error_.js +3 -0
  56. package/api/resources/websockets/types/ServerEventBase.d.ts +6 -0
  57. package/api/resources/websockets/types/ServerEventBase.js +3 -0
  58. package/api/resources/websockets/types/UserAudioChunk.d.ts +8 -0
  59. package/api/resources/websockets/types/UserAudioChunk.js +3 -0
  60. package/api/resources/websockets/types/UserFinishedSpeaking.d.ts +7 -0
  61. package/api/resources/websockets/types/UserFinishedSpeaking.js +3 -0
  62. package/api/resources/websockets/types/UserStartedSpeaking.d.ts +7 -0
  63. package/api/resources/websockets/types/UserStartedSpeaking.js +3 -0
  64. package/api/resources/websockets/types/UserTranscript.d.ts +9 -0
  65. package/api/resources/websockets/types/UserTranscript.js +3 -0
  66. package/api/resources/websockets/types/index.d.ts +12 -0
  67. package/api/resources/websockets/types/index.js +28 -0
  68. package/core/index.d.ts +1 -0
  69. package/core/index.js +1 -0
  70. package/core/websocket/events.d.ts +36 -0
  71. package/core/websocket/events.js +27 -0
  72. package/core/websocket/index.d.ts +1 -0
  73. package/core/websocket/index.js +17 -0
  74. package/core/websocket/ws.d.ts +147 -0
  75. package/core/websocket/ws.js +444 -0
  76. package/dist/Client.d.ts +6 -0
  77. package/dist/Client.js +32 -22
  78. package/dist/api/resources/auth/client/Client.d.ts +33 -0
  79. package/dist/api/resources/auth/client/Client.js +171 -0
  80. package/dist/api/resources/auth/client/index.d.ts +1 -0
  81. package/dist/api/resources/auth/client/index.js +2 -0
  82. package/dist/api/resources/auth/index.d.ts +2 -0
  83. package/dist/api/resources/auth/index.js +18 -0
  84. package/dist/api/resources/auth/types/SessionTokenRequest.d.ts +3 -0
  85. package/dist/api/resources/auth/types/SessionTokenRequest.js +3 -0
  86. package/dist/api/resources/auth/types/SessionTokenResponse.d.ts +6 -0
  87. package/dist/api/resources/auth/types/SessionTokenResponse.js +3 -0
  88. package/dist/api/resources/auth/types/index.d.ts +2 -0
  89. package/dist/api/resources/auth/types/index.js +18 -0
  90. package/dist/api/resources/commons/types/ActionBase.d.ts +1 -11
  91. package/dist/api/resources/commons/types/ActionParameterType.d.ts +3 -0
  92. package/dist/api/resources/commons/types/ActionParameterType.js +3 -0
  93. package/dist/api/resources/commons/types/ActionProperties.d.ts +13 -0
  94. package/dist/api/resources/commons/types/ActionProperties.js +3 -0
  95. package/dist/api/resources/commons/types/ActionUser.d.ts +46 -0
  96. package/dist/api/resources/commons/types/ActionUser.js +3 -0
  97. package/dist/api/resources/commons/types/EntityType.d.ts +1 -0
  98. package/dist/api/resources/commons/types/EntityType.js +1 -0
  99. package/dist/api/resources/commons/types/EventField.d.ts +1 -0
  100. package/dist/api/resources/commons/types/EventField.js +1 -0
  101. package/dist/api/resources/commons/types/UserEvent.d.ts +2 -0
  102. package/dist/api/resources/commons/types/index.d.ts +3 -0
  103. package/dist/api/resources/commons/types/index.js +3 -0
  104. package/dist/api/resources/index.d.ts +4 -0
  105. package/dist/api/resources/index.js +5 -1
  106. package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +1 -1
  107. package/dist/api/resources/triggers/types/index.d.ts +0 -1
  108. package/dist/api/resources/triggers/types/index.js +0 -1
  109. package/dist/api/resources/websockets/client/Client.d.ts +22 -0
  110. package/dist/api/resources/websockets/client/Client.js +89 -0
  111. package/dist/api/resources/websockets/client/Socket.d.ts +48 -0
  112. package/dist/api/resources/websockets/client/Socket.js +172 -0
  113. package/dist/api/resources/websockets/client/index.d.ts +1 -0
  114. package/dist/api/resources/websockets/client/index.js +2 -0
  115. package/dist/api/resources/websockets/index.d.ts +2 -0
  116. package/dist/api/resources/websockets/index.js +18 -0
  117. package/dist/api/resources/websockets/types/AgentAudioChunk.d.ts +9 -0
  118. package/dist/api/resources/websockets/types/AgentAudioChunk.js +3 -0
  119. package/dist/api/resources/websockets/types/AgentTranscript.d.ts +9 -0
  120. package/dist/api/resources/websockets/types/AgentTranscript.js +3 -0
  121. package/dist/api/resources/websockets/types/AudioFormat.d.ts +7 -0
  122. package/dist/api/resources/websockets/types/AudioFormat.js +10 -0
  123. package/dist/api/resources/websockets/types/Config.d.ts +15 -0
  124. package/dist/api/resources/websockets/types/Config.js +3 -0
  125. package/dist/api/resources/websockets/types/ConversationEnded.d.ts +7 -0
  126. package/dist/api/resources/websockets/types/ConversationEnded.js +3 -0
  127. package/dist/api/resources/websockets/types/ConversationReady.d.ts +6 -0
  128. package/dist/api/resources/websockets/types/ConversationReady.js +3 -0
  129. package/dist/api/resources/websockets/types/Error_.d.ts +9 -0
  130. package/dist/api/resources/websockets/types/Error_.js +3 -0
  131. package/dist/api/resources/websockets/types/ServerEventBase.d.ts +6 -0
  132. package/dist/api/resources/websockets/types/ServerEventBase.js +3 -0
  133. package/dist/api/resources/websockets/types/UserAudioChunk.d.ts +8 -0
  134. package/dist/api/resources/websockets/types/UserAudioChunk.js +3 -0
  135. package/dist/api/resources/websockets/types/UserFinishedSpeaking.d.ts +7 -0
  136. package/dist/api/resources/websockets/types/UserFinishedSpeaking.js +3 -0
  137. package/dist/api/resources/websockets/types/UserStartedSpeaking.d.ts +7 -0
  138. package/dist/api/resources/websockets/types/UserStartedSpeaking.js +3 -0
  139. package/dist/api/resources/websockets/types/UserTranscript.d.ts +9 -0
  140. package/dist/api/resources/websockets/types/UserTranscript.js +3 -0
  141. package/dist/api/resources/websockets/types/index.d.ts +12 -0
  142. package/dist/api/resources/websockets/types/index.js +28 -0
  143. package/dist/core/index.d.ts +1 -0
  144. package/dist/core/index.js +1 -0
  145. package/dist/core/websocket/events.d.ts +36 -0
  146. package/dist/core/websocket/events.js +27 -0
  147. package/dist/core/websocket/index.d.ts +1 -0
  148. package/dist/core/websocket/index.js +17 -0
  149. package/dist/core/websocket/ws.d.ts +147 -0
  150. package/dist/core/websocket/ws.js +444 -0
  151. package/dist/serialization/resources/auth/index.d.ts +1 -0
  152. package/dist/serialization/resources/auth/index.js +17 -0
  153. package/dist/serialization/resources/auth/types/SessionTokenRequest.d.ts +9 -0
  154. package/dist/serialization/resources/auth/types/SessionTokenRequest.js +41 -0
  155. package/dist/serialization/resources/auth/types/SessionTokenResponse.d.ts +10 -0
  156. package/dist/serialization/resources/auth/types/SessionTokenResponse.js +42 -0
  157. package/dist/serialization/resources/auth/types/index.d.ts +2 -0
  158. package/dist/serialization/resources/auth/types/index.js +18 -0
  159. package/dist/serialization/resources/commons/types/ActionBase.d.ts +3 -8
  160. package/dist/serialization/resources/commons/types/ActionBase.js +5 -9
  161. package/dist/serialization/resources/commons/types/ActionParameterType.d.ts +1 -1
  162. package/dist/serialization/resources/commons/types/ActionParameterType.js +1 -0
  163. package/dist/serialization/resources/commons/types/ActionProperties.d.ts +14 -0
  164. package/dist/serialization/resources/commons/types/ActionProperties.js +47 -0
  165. package/dist/serialization/resources/commons/types/ActionUser.d.ts +17 -0
  166. package/dist/serialization/resources/commons/types/ActionUser.js +49 -0
  167. package/dist/serialization/resources/commons/types/EntityType.d.ts +1 -1
  168. package/dist/serialization/resources/commons/types/EntityType.js +1 -0
  169. package/dist/serialization/resources/commons/types/EventField.d.ts +1 -1
  170. package/dist/serialization/resources/commons/types/EventField.js +1 -0
  171. package/dist/serialization/resources/commons/types/UserEvent.d.ts +1 -0
  172. package/dist/serialization/resources/commons/types/UserEvent.js +1 -0
  173. package/dist/serialization/resources/commons/types/index.d.ts +3 -0
  174. package/dist/serialization/resources/commons/types/index.js +3 -0
  175. package/dist/serialization/resources/index.d.ts +5 -0
  176. package/dist/serialization/resources/index.js +6 -1
  177. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +1 -1
  178. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +1 -1
  179. package/dist/serialization/resources/triggers/types/EventTriggerBase.d.ts +1 -1
  180. package/dist/serialization/resources/triggers/types/EventTriggerBase.js +1 -1
  181. package/dist/serialization/resources/triggers/types/index.d.ts +0 -1
  182. package/dist/serialization/resources/triggers/types/index.js +0 -1
  183. package/dist/serialization/resources/websockets/client/index.d.ts +1 -0
  184. package/dist/serialization/resources/websockets/client/index.js +17 -0
  185. package/dist/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.d.ts +15 -0
  186. package/dist/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.js +56 -0
  187. package/dist/serialization/resources/websockets/client/socket/index.d.ts +1 -0
  188. package/dist/serialization/resources/websockets/client/socket/index.js +5 -0
  189. package/dist/serialization/resources/websockets/index.d.ts +2 -0
  190. package/dist/serialization/resources/websockets/index.js +18 -0
  191. package/dist/serialization/resources/websockets/types/AgentAudioChunk.d.ts +11 -0
  192. package/dist/serialization/resources/websockets/types/AgentAudioChunk.js +45 -0
  193. package/dist/serialization/resources/websockets/types/AgentTranscript.d.ts +11 -0
  194. package/dist/serialization/resources/websockets/types/AgentTranscript.js +45 -0
  195. package/dist/serialization/resources/websockets/types/AudioFormat.d.ts +7 -0
  196. package/dist/serialization/resources/websockets/types/AudioFormat.js +39 -0
  197. package/dist/serialization/resources/websockets/types/Config.d.ts +14 -0
  198. package/dist/serialization/resources/websockets/types/Config.js +46 -0
  199. package/dist/serialization/resources/websockets/types/ConversationEnded.d.ts +10 -0
  200. package/dist/serialization/resources/websockets/types/ConversationEnded.js +44 -0
  201. package/dist/serialization/resources/websockets/types/ConversationReady.d.ts +9 -0
  202. package/dist/serialization/resources/websockets/types/ConversationReady.js +41 -0
  203. package/dist/serialization/resources/websockets/types/Error_.d.ts +12 -0
  204. package/dist/serialization/resources/websockets/types/Error_.js +46 -0
  205. package/dist/serialization/resources/websockets/types/ServerEventBase.d.ts +9 -0
  206. package/dist/serialization/resources/websockets/types/ServerEventBase.js +41 -0
  207. package/dist/serialization/resources/websockets/types/UserAudioChunk.d.ts +10 -0
  208. package/dist/serialization/resources/websockets/types/UserAudioChunk.js +42 -0
  209. package/dist/serialization/resources/websockets/types/UserFinishedSpeaking.d.ts +10 -0
  210. package/dist/serialization/resources/websockets/types/UserFinishedSpeaking.js +44 -0
  211. package/dist/serialization/resources/websockets/types/UserStartedSpeaking.d.ts +10 -0
  212. package/dist/serialization/resources/websockets/types/UserStartedSpeaking.js +44 -0
  213. package/dist/serialization/resources/websockets/types/UserTranscript.d.ts +11 -0
  214. package/dist/serialization/resources/websockets/types/UserTranscript.js +45 -0
  215. package/dist/serialization/resources/websockets/types/index.d.ts +12 -0
  216. package/dist/serialization/resources/websockets/types/index.js +28 -0
  217. package/dist/version.d.ts +1 -1
  218. package/dist/version.js +1 -1
  219. package/package.json +5 -1
  220. package/reference.md +73 -5
  221. package/serialization/resources/auth/index.d.ts +1 -0
  222. package/serialization/resources/auth/index.js +17 -0
  223. package/serialization/resources/auth/types/SessionTokenRequest.d.ts +9 -0
  224. package/serialization/resources/auth/types/SessionTokenRequest.js +41 -0
  225. package/serialization/resources/auth/types/SessionTokenResponse.d.ts +10 -0
  226. package/serialization/resources/auth/types/SessionTokenResponse.js +42 -0
  227. package/serialization/resources/auth/types/index.d.ts +2 -0
  228. package/serialization/resources/auth/types/index.js +18 -0
  229. package/serialization/resources/commons/types/ActionBase.d.ts +3 -8
  230. package/serialization/resources/commons/types/ActionBase.js +5 -9
  231. package/serialization/resources/commons/types/ActionParameterType.d.ts +1 -1
  232. package/serialization/resources/commons/types/ActionParameterType.js +1 -0
  233. package/serialization/resources/commons/types/ActionProperties.d.ts +14 -0
  234. package/serialization/resources/commons/types/ActionProperties.js +47 -0
  235. package/serialization/resources/commons/types/ActionUser.d.ts +17 -0
  236. package/serialization/resources/commons/types/ActionUser.js +49 -0
  237. package/serialization/resources/commons/types/EntityType.d.ts +1 -1
  238. package/serialization/resources/commons/types/EntityType.js +1 -0
  239. package/serialization/resources/commons/types/EventField.d.ts +1 -1
  240. package/serialization/resources/commons/types/EventField.js +1 -0
  241. package/serialization/resources/commons/types/UserEvent.d.ts +1 -0
  242. package/serialization/resources/commons/types/UserEvent.js +1 -0
  243. package/serialization/resources/commons/types/index.d.ts +3 -0
  244. package/serialization/resources/commons/types/index.js +3 -0
  245. package/serialization/resources/index.d.ts +5 -0
  246. package/serialization/resources/index.js +6 -1
  247. package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +1 -1
  248. package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +1 -1
  249. package/serialization/resources/triggers/types/EventTriggerBase.d.ts +1 -1
  250. package/serialization/resources/triggers/types/EventTriggerBase.js +1 -1
  251. package/serialization/resources/triggers/types/index.d.ts +0 -1
  252. package/serialization/resources/triggers/types/index.js +0 -1
  253. package/serialization/resources/websockets/client/index.d.ts +1 -0
  254. package/serialization/resources/websockets/client/index.js +17 -0
  255. package/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.d.ts +15 -0
  256. package/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.js +56 -0
  257. package/serialization/resources/websockets/client/socket/index.d.ts +1 -0
  258. package/serialization/resources/websockets/client/socket/index.js +5 -0
  259. package/serialization/resources/websockets/index.d.ts +2 -0
  260. package/serialization/resources/websockets/index.js +18 -0
  261. package/serialization/resources/websockets/types/AgentAudioChunk.d.ts +11 -0
  262. package/serialization/resources/websockets/types/AgentAudioChunk.js +45 -0
  263. package/serialization/resources/websockets/types/AgentTranscript.d.ts +11 -0
  264. package/serialization/resources/websockets/types/AgentTranscript.js +45 -0
  265. package/serialization/resources/websockets/types/AudioFormat.d.ts +7 -0
  266. package/serialization/resources/websockets/types/AudioFormat.js +39 -0
  267. package/serialization/resources/websockets/types/Config.d.ts +14 -0
  268. package/serialization/resources/websockets/types/Config.js +46 -0
  269. package/serialization/resources/websockets/types/ConversationEnded.d.ts +10 -0
  270. package/serialization/resources/websockets/types/ConversationEnded.js +44 -0
  271. package/serialization/resources/websockets/types/ConversationReady.d.ts +9 -0
  272. package/serialization/resources/websockets/types/ConversationReady.js +41 -0
  273. package/serialization/resources/websockets/types/Error_.d.ts +12 -0
  274. package/serialization/resources/websockets/types/Error_.js +46 -0
  275. package/serialization/resources/websockets/types/ServerEventBase.d.ts +9 -0
  276. package/serialization/resources/websockets/types/ServerEventBase.js +41 -0
  277. package/serialization/resources/websockets/types/UserAudioChunk.d.ts +10 -0
  278. package/serialization/resources/websockets/types/UserAudioChunk.js +42 -0
  279. package/serialization/resources/websockets/types/UserFinishedSpeaking.d.ts +10 -0
  280. package/serialization/resources/websockets/types/UserFinishedSpeaking.js +44 -0
  281. package/serialization/resources/websockets/types/UserStartedSpeaking.d.ts +10 -0
  282. package/serialization/resources/websockets/types/UserStartedSpeaking.js +44 -0
  283. package/serialization/resources/websockets/types/UserTranscript.d.ts +11 -0
  284. package/serialization/resources/websockets/types/UserTranscript.js +45 -0
  285. package/serialization/resources/websockets/types/index.d.ts +12 -0
  286. package/serialization/resources/websockets/types/index.js +28 -0
  287. package/version.d.ts +1 -1
  288. package/version.js +1 -1
  289. /package/api/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  290. /package/api/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  291. /package/dist/api/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  292. /package/dist/api/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  293. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  294. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  295. /package/serialization/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  296. /package/serialization/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
package/Client.d.ts CHANGED
@@ -3,6 +3,7 @@ import { Agents } from "./api/resources/agents/client/Client";
3
3
  import { Analytics } from "./api/resources/analytics/client/Client";
4
4
  import { AppSettings } from "./api/resources/appSettings/client/Client";
5
5
  import { Assets } from "./api/resources/assets/client/Client";
6
+ import { Auth } from "./api/resources/auth/client/Client";
6
7
  import { Conversation } from "./api/resources/conversation/client/Client";
7
8
  import { Customers } from "./api/resources/customers/client/Client";
8
9
  import { Events } from "./api/resources/events/client/Client";
@@ -13,6 +14,7 @@ import { Segments } from "./api/resources/segments/client/Client";
13
14
  import { Translations } from "./api/resources/translations/client/Client";
14
15
  import { Triggers } from "./api/resources/triggers/client/Client";
15
16
  import { Users } from "./api/resources/users/client/Client";
17
+ import { Websockets } from "./api/resources/websockets/client/Client";
16
18
  import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient";
17
19
  export declare namespace MavenAGIClient {
18
20
  interface Options extends BaseClientOptions {
@@ -27,6 +29,7 @@ export declare class MavenAGIClient {
27
29
  protected _analytics: Analytics | undefined;
28
30
  protected _appSettings: AppSettings | undefined;
29
31
  protected _assets: Assets | undefined;
32
+ protected _auth: Auth | undefined;
30
33
  protected _conversation: Conversation | undefined;
31
34
  protected _customers: Customers | undefined;
32
35
  protected _events: Events | undefined;
@@ -37,12 +40,14 @@ export declare class MavenAGIClient {
37
40
  protected _translations: Translations | undefined;
38
41
  protected _triggers: Triggers | undefined;
39
42
  protected _users: Users | undefined;
43
+ protected _websockets: Websockets | undefined;
40
44
  constructor(_options: MavenAGIClient.Options);
41
45
  get actions(): Actions;
42
46
  get agents(): Agents;
43
47
  get analytics(): Analytics;
44
48
  get appSettings(): AppSettings;
45
49
  get assets(): Assets;
50
+ get auth(): Auth;
46
51
  get conversation(): Conversation;
47
52
  get customers(): Customers;
48
53
  get events(): Events;
@@ -53,4 +58,5 @@ export declare class MavenAGIClient {
53
58
  get translations(): Translations;
54
59
  get triggers(): Triggers;
55
60
  get users(): Users;
61
+ get websockets(): Websockets;
56
62
  }
package/Client.js CHANGED
@@ -40,16 +40,18 @@ const Client_2 = require("./api/resources/agents/client/Client");
40
40
  const Client_3 = require("./api/resources/analytics/client/Client");
41
41
  const Client_4 = require("./api/resources/appSettings/client/Client");
42
42
  const Client_5 = require("./api/resources/assets/client/Client");
43
- const Client_6 = require("./api/resources/conversation/client/Client");
44
- const Client_7 = require("./api/resources/customers/client/Client");
45
- const Client_8 = require("./api/resources/events/client/Client");
46
- const Client_9 = require("./api/resources/inbox/client/Client");
47
- const Client_10 = require("./api/resources/knowledge/client/Client");
48
- const Client_11 = require("./api/resources/organizations/client/Client");
49
- const Client_12 = require("./api/resources/segments/client/Client");
50
- const Client_13 = require("./api/resources/translations/client/Client");
51
- const Client_14 = require("./api/resources/triggers/client/Client");
52
- const Client_15 = require("./api/resources/users/client/Client");
43
+ const Client_6 = require("./api/resources/auth/client/Client");
44
+ const Client_7 = require("./api/resources/conversation/client/Client");
45
+ const Client_8 = require("./api/resources/customers/client/Client");
46
+ const Client_9 = require("./api/resources/events/client/Client");
47
+ const Client_10 = require("./api/resources/inbox/client/Client");
48
+ const Client_11 = require("./api/resources/knowledge/client/Client");
49
+ const Client_12 = require("./api/resources/organizations/client/Client");
50
+ const Client_13 = require("./api/resources/segments/client/Client");
51
+ const Client_14 = require("./api/resources/translations/client/Client");
52
+ const Client_15 = require("./api/resources/triggers/client/Client");
53
+ const Client_16 = require("./api/resources/users/client/Client");
54
+ const Client_17 = require("./api/resources/websockets/client/Client");
53
55
  const core = __importStar(require("./core"));
54
56
  const headers_1 = require("./core/headers");
55
57
  class MavenAGIClient {
@@ -59,8 +61,8 @@ class MavenAGIClient {
59
61
  "X-Agent-Id": _options === null || _options === void 0 ? void 0 : _options.agentId,
60
62
  "X-Fern-Language": "JavaScript",
61
63
  "X-Fern-SDK-Name": "mavenagi",
62
- "X-Fern-SDK-Version": "1.2.10",
63
- "User-Agent": "mavenagi/1.2.10",
64
+ "X-Fern-SDK-Version": "1.2.11",
65
+ "User-Agent": "mavenagi/1.2.11",
64
66
  "X-Fern-Runtime": core.RUNTIME.type,
65
67
  "X-Fern-Runtime-Version": core.RUNTIME.version,
66
68
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -85,45 +87,53 @@ class MavenAGIClient {
85
87
  var _a;
86
88
  return ((_a = this._assets) !== null && _a !== void 0 ? _a : (this._assets = new Client_5.Assets(this._options)));
87
89
  }
90
+ get auth() {
91
+ var _a;
92
+ return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new Client_6.Auth(this._options)));
93
+ }
88
94
  get conversation() {
89
95
  var _a;
90
- return ((_a = this._conversation) !== null && _a !== void 0 ? _a : (this._conversation = new Client_6.Conversation(this._options)));
96
+ return ((_a = this._conversation) !== null && _a !== void 0 ? _a : (this._conversation = new Client_7.Conversation(this._options)));
91
97
  }
92
98
  get customers() {
93
99
  var _a;
94
- return ((_a = this._customers) !== null && _a !== void 0 ? _a : (this._customers = new Client_7.Customers(this._options)));
100
+ return ((_a = this._customers) !== null && _a !== void 0 ? _a : (this._customers = new Client_8.Customers(this._options)));
95
101
  }
96
102
  get events() {
97
103
  var _a;
98
- return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new Client_8.Events(this._options)));
104
+ return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new Client_9.Events(this._options)));
99
105
  }
100
106
  get inbox() {
101
107
  var _a;
102
- return ((_a = this._inbox) !== null && _a !== void 0 ? _a : (this._inbox = new Client_9.Inbox(this._options)));
108
+ return ((_a = this._inbox) !== null && _a !== void 0 ? _a : (this._inbox = new Client_10.Inbox(this._options)));
103
109
  }
104
110
  get knowledge() {
105
111
  var _a;
106
- return ((_a = this._knowledge) !== null && _a !== void 0 ? _a : (this._knowledge = new Client_10.Knowledge(this._options)));
112
+ return ((_a = this._knowledge) !== null && _a !== void 0 ? _a : (this._knowledge = new Client_11.Knowledge(this._options)));
107
113
  }
108
114
  get organizations() {
109
115
  var _a;
110
- return ((_a = this._organizations) !== null && _a !== void 0 ? _a : (this._organizations = new Client_11.Organizations(this._options)));
116
+ return ((_a = this._organizations) !== null && _a !== void 0 ? _a : (this._organizations = new Client_12.Organizations(this._options)));
111
117
  }
112
118
  get segments() {
113
119
  var _a;
114
- return ((_a = this._segments) !== null && _a !== void 0 ? _a : (this._segments = new Client_12.Segments(this._options)));
120
+ return ((_a = this._segments) !== null && _a !== void 0 ? _a : (this._segments = new Client_13.Segments(this._options)));
115
121
  }
116
122
  get translations() {
117
123
  var _a;
118
- return ((_a = this._translations) !== null && _a !== void 0 ? _a : (this._translations = new Client_13.Translations(this._options)));
124
+ return ((_a = this._translations) !== null && _a !== void 0 ? _a : (this._translations = new Client_14.Translations(this._options)));
119
125
  }
120
126
  get triggers() {
121
127
  var _a;
122
- return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Client_14.Triggers(this._options)));
128
+ return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Client_15.Triggers(this._options)));
123
129
  }
124
130
  get users() {
125
131
  var _a;
126
- return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_15.Users(this._options)));
132
+ return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_16.Users(this._options)));
133
+ }
134
+ get websockets() {
135
+ var _a;
136
+ return ((_a = this._websockets) !== null && _a !== void 0 ? _a : (this._websockets = new Client_17.Websockets(this._options)));
127
137
  }
128
138
  }
129
139
  exports.MavenAGIClient = MavenAGIClient;
@@ -0,0 +1,33 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient";
2
+ import * as core from "../../../../core";
3
+ import * as MavenAGI from "../../../index";
4
+ export declare namespace Auth {
5
+ interface Options extends BaseClientOptions {
6
+ }
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class Auth {
11
+ protected readonly _options: Auth.Options;
12
+ constructor(_options: Auth.Options);
13
+ /**
14
+ * Creates a short-lived session token that can be used to authenticate
15
+ * WebSocket connections. Session tokens are useful for client-side applications where
16
+ * you don’t want to expose your API key.
17
+ *
18
+ * @param {MavenAGI.SessionTokenRequest} request
19
+ * @param {Auth.RequestOptions} requestOptions - Request-specific configuration.
20
+ *
21
+ * @throws {@link MavenAGI.NotFoundError}
22
+ * @throws {@link MavenAGI.BadRequestError}
23
+ * @throws {@link MavenAGI.ServerError}
24
+ *
25
+ * @example
26
+ * await client.auth.sessionToken({
27
+ * ttlSeconds: 3600
28
+ * })
29
+ */
30
+ sessionToken(request: MavenAGI.SessionTokenRequest, requestOptions?: Auth.RequestOptions): core.HttpResponsePromise<MavenAGI.SessionTokenResponse>;
31
+ private __sessionToken;
32
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
33
+ }
@@ -0,0 +1,171 @@
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.Auth = void 0;
47
+ const core = __importStar(require("../../../../core"));
48
+ const headers_1 = require("../../../../core/headers");
49
+ const environments = __importStar(require("../../../../environments"));
50
+ const errors = __importStar(require("../../../../errors/index"));
51
+ const serializers = __importStar(require("../../../../serialization/index"));
52
+ const MavenAGI = __importStar(require("../../../index"));
53
+ class Auth {
54
+ constructor(_options) {
55
+ this._options = _options;
56
+ }
57
+ /**
58
+ * Creates a short-lived session token that can be used to authenticate
59
+ * WebSocket connections. Session tokens are useful for client-side applications where
60
+ * you don’t want to expose your API key.
61
+ *
62
+ * @param {MavenAGI.SessionTokenRequest} request
63
+ * @param {Auth.RequestOptions} requestOptions - Request-specific configuration.
64
+ *
65
+ * @throws {@link MavenAGI.NotFoundError}
66
+ * @throws {@link MavenAGI.BadRequestError}
67
+ * @throws {@link MavenAGI.ServerError}
68
+ *
69
+ * @example
70
+ * await client.auth.sessionToken({
71
+ * ttlSeconds: 3600
72
+ * })
73
+ */
74
+ sessionToken(request, requestOptions) {
75
+ return core.HttpResponsePromise.fromPromise(this.__sessionToken(request, requestOptions));
76
+ }
77
+ __sessionToken(request, requestOptions) {
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
80
+ const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
81
+ Authorization: yield this._getAuthorizationHeader(),
82
+ "X-Organization-Id": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationId,
83
+ "X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
84
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
85
+ const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
86
+ url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, "/v1/auth/session-token"),
87
+ method: "POST",
88
+ headers: _headers,
89
+ contentType: "application/json",
90
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
91
+ requestType: "json",
92
+ body: serializers.SessionTokenRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
93
+ timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
94
+ maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
95
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
96
+ });
97
+ if (_response.ok) {
98
+ return {
99
+ data: serializers.SessionTokenResponse.parseOrThrow(_response.body, {
100
+ unrecognizedObjectKeys: "passthrough",
101
+ allowUnrecognizedUnionMembers: true,
102
+ allowUnrecognizedEnumValues: true,
103
+ breadcrumbsPrefix: ["response"],
104
+ }),
105
+ rawResponse: _response.rawResponse,
106
+ };
107
+ }
108
+ if (_response.error.reason === "status-code") {
109
+ switch (_response.error.statusCode) {
110
+ case 404:
111
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
112
+ unrecognizedObjectKeys: "passthrough",
113
+ allowUnrecognizedUnionMembers: true,
114
+ allowUnrecognizedEnumValues: true,
115
+ breadcrumbsPrefix: ["response"],
116
+ }), _response.rawResponse);
117
+ case 400:
118
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
119
+ unrecognizedObjectKeys: "passthrough",
120
+ allowUnrecognizedUnionMembers: true,
121
+ allowUnrecognizedEnumValues: true,
122
+ breadcrumbsPrefix: ["response"],
123
+ }), _response.rawResponse);
124
+ case 500:
125
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
126
+ unrecognizedObjectKeys: "passthrough",
127
+ allowUnrecognizedUnionMembers: true,
128
+ allowUnrecognizedEnumValues: true,
129
+ breadcrumbsPrefix: ["response"],
130
+ }), _response.rawResponse);
131
+ default:
132
+ throw new errors.MavenAGIError({
133
+ statusCode: _response.error.statusCode,
134
+ body: _response.error.body,
135
+ rawResponse: _response.rawResponse,
136
+ });
137
+ }
138
+ }
139
+ switch (_response.error.reason) {
140
+ case "non-json":
141
+ throw new errors.MavenAGIError({
142
+ statusCode: _response.error.statusCode,
143
+ body: _response.error.rawBody,
144
+ rawResponse: _response.rawResponse,
145
+ });
146
+ case "timeout":
147
+ throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/auth/session-token.");
148
+ case "unknown":
149
+ throw new errors.MavenAGIError({
150
+ message: _response.error.errorMessage,
151
+ rawResponse: _response.rawResponse,
152
+ });
153
+ }
154
+ });
155
+ }
156
+ _getAuthorizationHeader() {
157
+ return __awaiter(this, void 0, void 0, function* () {
158
+ var _a, _b;
159
+ 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;
160
+ 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;
161
+ if (appId != null && appSecret != null) {
162
+ return core.BasicAuth.toAuthorizationHeader({
163
+ username: appId,
164
+ password: appSecret,
165
+ });
166
+ }
167
+ return undefined;
168
+ });
169
+ }
170
+ }
171
+ exports.Auth = Auth;
@@ -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,3 @@
1
+ export interface SessionTokenRequest {
2
+ ttlSeconds: number;
3
+ }
@@ -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
+ export interface SessionTokenResponse {
2
+ /** The session token to use for authentication. */
3
+ sessionToken: string;
4
+ /** When the session token expires. */
5
+ expiresAt: Date;
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,2 @@
1
+ export * from "./SessionTokenRequest";
2
+ export * from "./SessionTokenResponse";
@@ -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("./SessionTokenRequest"), exports);
18
+ __exportStar(require("./SessionTokenResponse"), exports);
@@ -1,17 +1,7 @@
1
1
  import type * as MavenAGI from "../../../index";
2
- export interface ActionBase {
2
+ export interface ActionBase extends MavenAGI.ActionProperties {
3
3
  /** The name of the action. This is displayed to the end user as part of forms when user interaction is required. It is also used to help Maven decide if the action is relevant to a conversation. */
4
4
  name: string;
5
5
  /** The description of the action. Must be less than 1024 characters. This helps Maven decide if the action is relevant to a conversation and is not displayed directly to the end user. Descriptions are used by the LLM. */
6
6
  description: string;
7
- /** Whether the action requires user interaction to execute. If false, and all of the required action parameters are known, the LLM may call the action automatically. If true, an conversations ask call will return a BotActionFormResponse which must be submitted by an API caller. API callers must display a button with the buttonName label to confirm the user's intent. */
8
- userInteractionRequired: boolean;
9
- /** When user interaction is required, the name of the button that is shown to the end user to confirm execution of the action. Defaults to "Submit" if not supplied. */
10
- buttonName?: string;
11
- /** The preconditions that must be met for an action to be relevant to a conversation. Can be used to restrict actions to certain types of users. */
12
- precondition?: MavenAGI.Precondition;
13
- /** The parameters that the action uses as input. An action will only be executed when all of the required parameters are provided. During execution, actions all have access to the full Conversation and User objects. Parameter values may be inferred from the user's conversation by the LLM. */
14
- userFormParameters: MavenAGI.ActionParameter[];
15
- /** The ISO 639-1 code for the language used in all fields of this action. Will be derived using the description's text if not specified. */
16
- language?: string;
17
7
  }
@@ -23,6 +23,9 @@ export declare const ActionParameterType: {
23
23
  /**
24
24
  * Email parameter type; must be a valid email address */
25
25
  readonly Email: "EMAIL";
26
+ /**
27
+ * Phone number parameter type; must be a valid phone number (E.164 or regional format) */
28
+ readonly Phone: "PHONE";
26
29
  /**
27
30
  * Schema parameter type for complex structured data that adheres to a JSON schema definition. When this type is used this should be the only action parameter (all other parameters should be omitted), the `schema` field must be set and `enumOptions` should not be used. */
28
31
  readonly Schema: "SCHEMA";
@@ -27,6 +27,9 @@ exports.ActionParameterType = {
27
27
  /**
28
28
  * Email parameter type; must be a valid email address */
29
29
  Email: "EMAIL",
30
+ /**
31
+ * Phone number parameter type; must be a valid phone number (E.164 or regional format) */
32
+ Phone: "PHONE",
30
33
  /**
31
34
  * Schema parameter type for complex structured data that adheres to a JSON schema definition. When this type is used this should be the only action parameter (all other parameters should be omitted), the `schema` field must be set and `enumOptions` should not be used. */
32
35
  Schema: "SCHEMA",
@@ -0,0 +1,13 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ export interface ActionProperties {
3
+ /** Whether the action requires user interaction to execute. If false, and all of the required action parameters are known, the LLM may call the action automatically. If true, an conversations ask call will return a BotActionFormResponse which must be submitted by an API caller. API callers must display a button with the buttonName label to confirm the user's intent. */
4
+ userInteractionRequired: boolean;
5
+ /** When user interaction is required, the name of the button that is shown to the end user to confirm execution of the action. Defaults to "Submit" if not supplied. */
6
+ buttonName?: string;
7
+ /** The preconditions that must be met for an action to be relevant to a conversation. Can be used to restrict actions to certain types of users. */
8
+ precondition?: MavenAGI.Precondition;
9
+ /** The parameters that the action uses as input. An action will only be executed when all of the required parameters are provided. During execution, actions all have access to the full Conversation and User objects. Parameter values may be inferred from the user's conversation by the LLM. */
10
+ userFormParameters: MavenAGI.ActionParameter[];
11
+ /** The ISO 639-1 code for the language used in all fields of this action. Will be derived using the description's text if not specified. */
12
+ language?: string;
13
+ }
@@ -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,46 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * @example
4
+ * {
5
+ * userId: {
6
+ * referenceId: "user0"
7
+ * },
8
+ * agentUserId: "aus_1234567890",
9
+ * userIdentifiers: [{
10
+ * value: "joe@joe.com",
11
+ * type: MavenAGI.AppUserIdentifyingPropertyType.Email
12
+ * }],
13
+ * allUserData: {
14
+ * "myapp": {
15
+ * "name": "Joe"
16
+ * }
17
+ * },
18
+ * defaultUserData: {
19
+ * "name": "Joe"
20
+ * },
21
+ * agentUserData: {
22
+ * "name": [{
23
+ * value: "Joe",
24
+ * visibility: MavenAGI.VisibilityType.Visible,
25
+ * userId: {
26
+ * appId: "myapp",
27
+ * referenceId: "user0"
28
+ * }
29
+ * }]
30
+ * }
31
+ * }
32
+ */
33
+ export interface ActionUser {
34
+ /** A user ID that can be used to store user information. Will only be undefined on legacy surfaces. */
35
+ userId?: MavenAGI.EntityIdBase;
36
+ /** The ID of the agent user that the userId is associated with */
37
+ agentUserId?: string;
38
+ /** All known identifiers for the user who is executing the action. */
39
+ userIdentifiers: MavenAGI.AppUserIdentifier[];
40
+ /** Data from all apps */
41
+ allUserData: Record<string, Record<string, string>>;
42
+ /** Default data for this user */
43
+ defaultUserData: Record<string, string>;
44
+ /** All user data for this user, including reverse indexable user data */
45
+ agentUserData: Record<string, MavenAGI.UserDataWithReference[]>;
46
+ }
@@ -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 });
@@ -15,5 +15,6 @@ export declare const EntityType: {
15
15
  readonly InboxItemFix: "INBOX_ITEM_FIX";
16
16
  readonly Segment: "SEGMENT";
17
17
  readonly Customer: "CUSTOMER";
18
+ readonly IntelligentField: "INTELLIGENT_FIELD";
18
19
  };
19
20
  export type EntityType = (typeof EntityType)[keyof typeof EntityType];
@@ -19,4 +19,5 @@ exports.EntityType = {
19
19
  InboxItemFix: "INBOX_ITEM_FIX",
20
20
  Segment: "SEGMENT",
21
21
  Customer: "CUSTOMER",
22
+ IntelligentField: "INTELLIGENT_FIELD",
22
23
  };
@@ -15,5 +15,6 @@ export declare const EventField: {
15
15
  readonly SourceGeoCountry: "SOURCE_GEO_COUNTRY";
16
16
  readonly UserReferenceId: "USER_REFERENCE_ID";
17
17
  readonly AgentUserId: "AGENT_USER_ID";
18
+ readonly Timestamp: "TIMESTAMP";
18
19
  };
19
20
  export type EventField = (typeof EventField)[keyof typeof EventField];
@@ -19,4 +19,5 @@ exports.EventField = {
19
19
  SourceGeoCountry: "SOURCE_GEO_COUNTRY",
20
20
  UserReferenceId: "USER_REFERENCE_ID",
21
21
  AgentUserId: "AGENT_USER_ID",
22
+ Timestamp: "TIMESTAMP",
22
23
  };
@@ -2,6 +2,8 @@ import type * as MavenAGI from "../../../index";
2
2
  export interface UserEvent extends MavenAGI.EventBaseNoId {
3
3
  /** The unique ID of the event */
4
4
  id: MavenAGI.EntityId;
5
+ /** The date and time the event was created */
6
+ createdAt?: Date;
5
7
  /** The name of the event */
6
8
  eventName: MavenAGI.UserEventName;
7
9
  /** Information about the user who triggered the event */
@@ -5,7 +5,9 @@ export * from "./ActionFormField";
5
5
  export * from "./ActionOAuthConfiguration";
6
6
  export * from "./ActionParameter";
7
7
  export * from "./ActionParameterType";
8
+ export * from "./ActionProperties";
8
9
  export * from "./ActionResponse";
10
+ export * from "./ActionUser";
9
11
  export * from "./AppPrecondition";
10
12
  export * from "./AppUser";
11
13
  export * from "./AppUserIdentifier";
@@ -70,6 +72,7 @@ export * from "./EventRequest";
70
72
  export * from "./EventResponse";
71
73
  export * from "./EventsSearchRequest";
72
74
  export * from "./EventsSearchResponse";
75
+ export * from "./EventTriggerType";
73
76
  export * from "./EventType";
74
77
  export * from "./EventUserInfo";
75
78
  export * from "./EventUserInfoBase";
@@ -21,7 +21,9 @@ __exportStar(require("./ActionFormField"), exports);
21
21
  __exportStar(require("./ActionOAuthConfiguration"), exports);
22
22
  __exportStar(require("./ActionParameter"), exports);
23
23
  __exportStar(require("./ActionParameterType"), exports);
24
+ __exportStar(require("./ActionProperties"), exports);
24
25
  __exportStar(require("./ActionResponse"), exports);
26
+ __exportStar(require("./ActionUser"), exports);
25
27
  __exportStar(require("./AppPrecondition"), exports);
26
28
  __exportStar(require("./AppUser"), exports);
27
29
  __exportStar(require("./AppUserIdentifier"), exports);
@@ -86,6 +88,7 @@ __exportStar(require("./EventRequest"), exports);
86
88
  __exportStar(require("./EventResponse"), exports);
87
89
  __exportStar(require("./EventsSearchRequest"), exports);
88
90
  __exportStar(require("./EventsSearchResponse"), exports);
91
+ __exportStar(require("./EventTriggerType"), exports);
89
92
  __exportStar(require("./EventType"), exports);
90
93
  __exportStar(require("./EventUserInfo"), exports);
91
94
  __exportStar(require("./EventUserInfoBase"), exports);