mavenagi 1.2.5 → 1.2.7

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 (265) hide show
  1. package/Client.d.ts +0 -3
  2. package/Client.js +28 -33
  3. package/README.md +21 -21
  4. package/api/resources/analytics/client/Client.d.ts +10 -0
  5. package/api/resources/analytics/client/Client.js +83 -0
  6. package/api/resources/commons/types/AppUserResponse.d.ts +12 -0
  7. package/api/resources/commons/types/ConversationResponse.d.ts +2 -1
  8. package/api/resources/commons/types/ConversationSummary.d.ts +6 -0
  9. package/api/resources/commons/types/UserDataWithReference.d.ts +5 -0
  10. package/api/resources/commons/types/index.d.ts +1 -0
  11. package/api/resources/commons/types/index.js +1 -0
  12. package/api/resources/conversation/client/Client.d.ts +19 -0
  13. package/api/resources/conversation/client/Client.js +94 -0
  14. package/api/resources/conversation/client/requests/SimulationImportRequest.d.ts +5 -0
  15. package/api/resources/conversation/client/requests/index.d.ts +1 -0
  16. package/api/resources/index.d.ts +0 -2
  17. package/api/resources/index.js +1 -3
  18. package/api/resources/knowledge/client/Client.d.ts +24 -0
  19. package/api/resources/knowledge/client/Client.js +104 -0
  20. package/api/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +13 -0
  21. package/api/resources/knowledge/client/requests/index.d.ts +1 -0
  22. package/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -4
  23. package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
  24. package/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +7 -1
  25. package/api/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +4 -0
  26. package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +4 -0
  27. package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +4 -1
  28. package/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +30 -0
  29. package/core/exports.d.ts +1 -0
  30. package/{api/resources/agentCapabilities/index.js → core/exports.js} +1 -2
  31. package/core/file/exports.d.ts +1 -0
  32. package/core/file/file.d.ts +5 -0
  33. package/core/file/file.js +203 -0
  34. package/{dist/serialization/resources/agentCapabilities → core/file}/index.d.ts +1 -0
  35. package/{dist/serialization/resources/agentCapabilities → core/file}/index.js +1 -0
  36. package/core/file/types.d.ts +66 -0
  37. package/core/form-data-utils/FormDataWrapper.d.ts +16 -0
  38. package/core/form-data-utils/FormDataWrapper.js +208 -0
  39. package/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
  40. package/core/form-data-utils/encodeAsFormParameter.js +12 -0
  41. package/core/form-data-utils/index.d.ts +2 -0
  42. package/core/form-data-utils/index.js +20 -0
  43. package/core/index.d.ts +2 -0
  44. package/core/index.js +3 -1
  45. package/dist/Client.d.ts +0 -3
  46. package/dist/Client.js +28 -33
  47. package/dist/api/resources/analytics/client/Client.d.ts +10 -0
  48. package/dist/api/resources/analytics/client/Client.js +83 -0
  49. package/dist/api/resources/commons/types/AppUserResponse.d.ts +12 -0
  50. package/dist/api/resources/commons/types/ConversationResponse.d.ts +2 -1
  51. package/dist/api/resources/commons/types/ConversationSummary.d.ts +6 -0
  52. package/dist/api/resources/commons/types/UserDataWithReference.d.ts +5 -0
  53. package/dist/api/resources/commons/types/index.d.ts +1 -0
  54. package/dist/api/resources/commons/types/index.js +1 -0
  55. package/dist/api/resources/conversation/client/Client.d.ts +19 -0
  56. package/dist/api/resources/conversation/client/Client.js +94 -0
  57. package/dist/api/resources/conversation/client/requests/SimulationImportRequest.d.ts +5 -0
  58. package/dist/api/resources/conversation/client/requests/index.d.ts +1 -0
  59. package/dist/api/resources/index.d.ts +0 -2
  60. package/dist/api/resources/index.js +1 -3
  61. package/dist/api/resources/knowledge/client/Client.d.ts +24 -0
  62. package/dist/api/resources/knowledge/client/Client.js +104 -0
  63. package/dist/api/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +13 -0
  64. package/dist/api/resources/knowledge/client/requests/index.d.ts +1 -0
  65. package/dist/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -4
  66. package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
  67. package/dist/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +7 -1
  68. package/dist/api/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +4 -0
  69. package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +4 -0
  70. package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +4 -1
  71. package/dist/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +30 -0
  72. package/dist/core/exports.d.ts +1 -0
  73. package/dist/{api/resources/agentCapabilities/index.js → core/exports.js} +1 -2
  74. package/dist/core/file/exports.d.ts +1 -0
  75. package/dist/core/file/exports.js +2 -0
  76. package/dist/core/file/file.d.ts +5 -0
  77. package/dist/core/file/file.js +203 -0
  78. package/{serialization/resources/agentCapabilities → dist/core/file}/index.d.ts +1 -0
  79. package/{serialization/resources/agentCapabilities → dist/core/file}/index.js +1 -0
  80. package/dist/core/file/types.d.ts +66 -0
  81. package/dist/core/file/types.js +2 -0
  82. package/dist/core/form-data-utils/FormDataWrapper.d.ts +16 -0
  83. package/dist/core/form-data-utils/FormDataWrapper.js +208 -0
  84. package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
  85. package/dist/core/form-data-utils/encodeAsFormParameter.js +12 -0
  86. package/dist/core/form-data-utils/index.d.ts +2 -0
  87. package/dist/core/form-data-utils/index.js +20 -0
  88. package/dist/core/index.d.ts +2 -0
  89. package/dist/core/index.js +3 -1
  90. package/dist/exports.d.ts +1 -0
  91. package/dist/exports.js +17 -0
  92. package/dist/index.d.ts +1 -0
  93. package/dist/index.js +4 -0
  94. package/dist/serialization/resources/commons/types/AppUserResponse.d.ts +2 -0
  95. package/dist/serialization/resources/commons/types/AppUserResponse.js +2 -0
  96. package/dist/serialization/resources/commons/types/ConversationSummary.d.ts +3 -0
  97. package/dist/serialization/resources/commons/types/ConversationSummary.js +3 -0
  98. package/dist/serialization/resources/commons/types/UserDataWithReference.d.ts +11 -0
  99. package/dist/serialization/resources/{agentCapabilities/types/ExecuteCapabilityRequest.js → commons/types/UserDataWithReference.js} +8 -4
  100. package/dist/serialization/resources/commons/types/index.d.ts +1 -0
  101. package/dist/serialization/resources/commons/types/index.js +1 -0
  102. package/dist/serialization/resources/index.d.ts +0 -2
  103. package/dist/serialization/resources/index.js +1 -3
  104. package/dist/serialization/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +11 -0
  105. package/dist/serialization/resources/{agentCapabilities/types/PatchAgentCapabilityRequest.js → knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +6 -6
  106. package/dist/serialization/resources/knowledge/client/requests/index.d.ts +1 -0
  107. package/dist/serialization/resources/knowledge/client/requests/index.js +3 -1
  108. package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -2
  109. package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +0 -2
  110. package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
  111. package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +1 -1
  112. package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +2 -0
  113. package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +2 -0
  114. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +3 -0
  115. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentFilter.js +3 -0
  116. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +2 -0
  117. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +2 -0
  118. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +4 -0
  119. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +4 -0
  120. package/dist/version.d.ts +1 -1
  121. package/dist/version.js +1 -1
  122. package/exports.d.ts +1 -0
  123. package/exports.js +17 -0
  124. package/index.d.ts +1 -0
  125. package/index.js +4 -0
  126. package/package.json +1 -1
  127. package/reference.md +174 -264
  128. package/serialization/resources/commons/types/AppUserResponse.d.ts +2 -0
  129. package/serialization/resources/commons/types/AppUserResponse.js +2 -0
  130. package/serialization/resources/commons/types/ConversationSummary.d.ts +3 -0
  131. package/serialization/resources/commons/types/ConversationSummary.js +3 -0
  132. package/serialization/resources/commons/types/UserDataWithReference.d.ts +11 -0
  133. package/{dist/serialization/resources/agentCapabilities/types/AgentCapabilityField.js → serialization/resources/commons/types/UserDataWithReference.js} +8 -2
  134. package/serialization/resources/commons/types/index.d.ts +1 -0
  135. package/serialization/resources/commons/types/index.js +1 -0
  136. package/serialization/resources/index.d.ts +0 -2
  137. package/serialization/resources/index.js +1 -3
  138. package/serialization/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +11 -0
  139. package/serialization/resources/{agentCapabilities/types/ExecuteCapabilityRequest.js → knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +6 -4
  140. package/serialization/resources/knowledge/client/requests/index.d.ts +1 -0
  141. package/serialization/resources/knowledge/client/requests/index.js +3 -1
  142. package/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -2
  143. package/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +0 -2
  144. package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
  145. package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +1 -1
  146. package/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +2 -0
  147. package/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +2 -0
  148. package/serialization/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +3 -0
  149. package/serialization/resources/knowledge/types/KnowledgeDocumentFilter.js +3 -0
  150. package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +2 -0
  151. package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +2 -0
  152. package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +4 -0
  153. package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +4 -0
  154. package/version.d.ts +1 -1
  155. package/version.js +1 -1
  156. package/api/resources/agentCapabilities/client/Client.d.ts +0 -101
  157. package/api/resources/agentCapabilities/client/Client.js +0 -450
  158. package/api/resources/agentCapabilities/client/index.d.ts +0 -1
  159. package/api/resources/agentCapabilities/index.d.ts +0 -2
  160. package/api/resources/agentCapabilities/types/ActionCapability.d.ts +0 -13
  161. package/api/resources/agentCapabilities/types/AgentCapability.d.ts +0 -10
  162. package/api/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -12
  163. package/api/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -8
  164. package/api/resources/agentCapabilities/types/AgentCapabilityField.js +0 -11
  165. package/api/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -11
  166. package/api/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -5
  167. package/api/resources/agentCapabilities/types/AgentCapabilityType.js +0 -8
  168. package/api/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -4
  169. package/api/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -4
  170. package/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -5
  171. package/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -3
  172. package/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -8
  173. package/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.js +0 -3
  174. package/api/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -4
  175. package/api/resources/agentCapabilities/types/TriggerCapability.js +0 -3
  176. package/api/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
  177. package/api/resources/agentCapabilities/types/TriggerType.js +0 -10
  178. package/api/resources/agentCapabilities/types/index.d.ts +0 -12
  179. package/api/resources/agentCapabilities/types/index.js +0 -28
  180. package/dist/api/resources/agentCapabilities/client/Client.d.ts +0 -101
  181. package/dist/api/resources/agentCapabilities/client/Client.js +0 -450
  182. package/dist/api/resources/agentCapabilities/client/index.d.ts +0 -1
  183. package/dist/api/resources/agentCapabilities/index.d.ts +0 -2
  184. package/dist/api/resources/agentCapabilities/types/ActionCapability.d.ts +0 -13
  185. package/dist/api/resources/agentCapabilities/types/ActionCapability.js +0 -3
  186. package/dist/api/resources/agentCapabilities/types/AgentCapability.d.ts +0 -10
  187. package/dist/api/resources/agentCapabilities/types/AgentCapability.js +0 -3
  188. package/dist/api/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -12
  189. package/dist/api/resources/agentCapabilities/types/AgentCapabilityBase.js +0 -3
  190. package/dist/api/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -8
  191. package/dist/api/resources/agentCapabilities/types/AgentCapabilityField.js +0 -11
  192. package/dist/api/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -11
  193. package/dist/api/resources/agentCapabilities/types/AgentCapabilityListRequest.js +0 -3
  194. package/dist/api/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -5
  195. package/dist/api/resources/agentCapabilities/types/AgentCapabilityType.js +0 -8
  196. package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -4
  197. package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityRequest.js +0 -3
  198. package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -4
  199. package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityResponse.js +0 -3
  200. package/dist/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -5
  201. package/dist/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -3
  202. package/dist/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -8
  203. package/dist/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.js +0 -3
  204. package/dist/api/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -4
  205. package/dist/api/resources/agentCapabilities/types/TriggerCapability.js +0 -3
  206. package/dist/api/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
  207. package/dist/api/resources/agentCapabilities/types/TriggerType.js +0 -10
  208. package/dist/api/resources/agentCapabilities/types/index.d.ts +0 -12
  209. package/dist/api/resources/agentCapabilities/types/index.js +0 -28
  210. package/dist/serialization/resources/agentCapabilities/types/ActionCapability.d.ts +0 -17
  211. package/dist/serialization/resources/agentCapabilities/types/ActionCapability.js +0 -52
  212. package/dist/serialization/resources/agentCapabilities/types/AgentCapability.d.ts +0 -15
  213. package/dist/serialization/resources/agentCapabilities/types/AgentCapability.js +0 -49
  214. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -15
  215. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityBase.js +0 -47
  216. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -7
  217. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -18
  218. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.js +0 -52
  219. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -7
  220. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityType.js +0 -39
  221. package/dist/serialization/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -9
  222. package/dist/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -10
  223. package/dist/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.js +0 -42
  224. package/dist/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -12
  225. package/dist/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -46
  226. package/dist/serialization/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -11
  227. package/dist/serialization/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -11
  228. package/dist/serialization/resources/agentCapabilities/types/TriggerCapability.js +0 -45
  229. package/dist/serialization/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
  230. package/dist/serialization/resources/agentCapabilities/types/TriggerType.js +0 -39
  231. package/dist/serialization/resources/agentCapabilities/types/index.d.ts +0 -12
  232. package/dist/serialization/resources/agentCapabilities/types/index.js +0 -28
  233. package/serialization/resources/agentCapabilities/types/ActionCapability.d.ts +0 -17
  234. package/serialization/resources/agentCapabilities/types/ActionCapability.js +0 -52
  235. package/serialization/resources/agentCapabilities/types/AgentCapability.d.ts +0 -15
  236. package/serialization/resources/agentCapabilities/types/AgentCapability.js +0 -49
  237. package/serialization/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -15
  238. package/serialization/resources/agentCapabilities/types/AgentCapabilityBase.js +0 -47
  239. package/serialization/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -7
  240. package/serialization/resources/agentCapabilities/types/AgentCapabilityField.js +0 -39
  241. package/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -18
  242. package/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.js +0 -52
  243. package/serialization/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -7
  244. package/serialization/resources/agentCapabilities/types/AgentCapabilityType.js +0 -39
  245. package/serialization/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -9
  246. package/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -10
  247. package/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.js +0 -42
  248. package/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -12
  249. package/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -46
  250. package/serialization/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -11
  251. package/serialization/resources/agentCapabilities/types/PatchAgentCapabilityRequest.js +0 -43
  252. package/serialization/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -11
  253. package/serialization/resources/agentCapabilities/types/TriggerCapability.js +0 -45
  254. package/serialization/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
  255. package/serialization/resources/agentCapabilities/types/TriggerType.js +0 -39
  256. package/serialization/resources/agentCapabilities/types/index.d.ts +0 -12
  257. package/serialization/resources/agentCapabilities/types/index.js +0 -28
  258. /package/api/resources/{agentCapabilities/types/ActionCapability.js → commons/types/UserDataWithReference.js} +0 -0
  259. /package/api/resources/{agentCapabilities/types/AgentCapability.js → conversation/client/requests/SimulationImportRequest.js} +0 -0
  260. /package/api/resources/{agentCapabilities/types/AgentCapabilityBase.js → knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +0 -0
  261. /package/{api/resources/agentCapabilities/client/index.js → core/file/exports.js} +0 -0
  262. /package/{dist/api/resources/agentCapabilities/client/index.js → core/file/types.js} +0 -0
  263. /package/{api/resources/agentCapabilities/types/AgentCapabilityListRequest.js → dist/api/resources/commons/types/UserDataWithReference.js} +0 -0
  264. /package/{api/resources/agentCapabilities/types/ExecuteCapabilityRequest.js → dist/api/resources/conversation/client/requests/SimulationImportRequest.js} +0 -0
  265. /package/{api/resources/agentCapabilities/types/ExecuteCapabilityResponse.js → dist/api/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +0 -0
package/Client.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import * as environments from "./environments";
2
2
  import * as core from "./core";
3
3
  import { Actions } from "./api/resources/actions/client/Client";
4
- import { AgentCapabilities } from "./api/resources/agentCapabilities/client/Client";
5
4
  import { Agents } from "./api/resources/agents/client/Client";
6
5
  import { Analytics } from "./api/resources/analytics/client/Client";
7
6
  import { AppSettings } from "./api/resources/appSettings/client/Client";
@@ -50,7 +49,6 @@ export declare namespace MavenAGIClient {
50
49
  export declare class MavenAGIClient {
51
50
  protected readonly _options: MavenAGIClient.Options;
52
51
  protected _actions: Actions | undefined;
53
- protected _agentCapabilities: AgentCapabilities | undefined;
54
52
  protected _agents: Agents | undefined;
55
53
  protected _analytics: Analytics | undefined;
56
54
  protected _appSettings: AppSettings | undefined;
@@ -66,7 +64,6 @@ export declare class MavenAGIClient {
66
64
  protected _users: Users | undefined;
67
65
  constructor(_options: MavenAGIClient.Options);
68
66
  get actions(): Actions;
69
- get agentCapabilities(): AgentCapabilities;
70
67
  get agents(): Agents;
71
68
  get analytics(): Analytics;
72
69
  get appSettings(): AppSettings;
package/Client.js CHANGED
@@ -38,20 +38,19 @@ exports.MavenAGIClient = void 0;
38
38
  const core = __importStar(require("./core"));
39
39
  const headers_1 = require("./core/headers");
40
40
  const Client_1 = require("./api/resources/actions/client/Client");
41
- const Client_2 = require("./api/resources/agentCapabilities/client/Client");
42
- const Client_3 = require("./api/resources/agents/client/Client");
43
- const Client_4 = require("./api/resources/analytics/client/Client");
44
- const Client_5 = require("./api/resources/appSettings/client/Client");
45
- const Client_6 = require("./api/resources/assets/client/Client");
46
- const Client_7 = require("./api/resources/conversation/client/Client");
47
- const Client_8 = require("./api/resources/events/client/Client");
48
- const Client_9 = require("./api/resources/inbox/client/Client");
49
- const Client_10 = require("./api/resources/knowledge/client/Client");
50
- const Client_11 = require("./api/resources/organizations/client/Client");
51
- const Client_12 = require("./api/resources/segments/client/Client");
52
- const Client_13 = require("./api/resources/translations/client/Client");
53
- const Client_14 = require("./api/resources/triggers/client/Client");
54
- const Client_15 = require("./api/resources/users/client/Client");
41
+ const Client_2 = require("./api/resources/agents/client/Client");
42
+ const Client_3 = require("./api/resources/analytics/client/Client");
43
+ const Client_4 = require("./api/resources/appSettings/client/Client");
44
+ const Client_5 = require("./api/resources/assets/client/Client");
45
+ const Client_6 = require("./api/resources/conversation/client/Client");
46
+ const Client_7 = require("./api/resources/events/client/Client");
47
+ const Client_8 = require("./api/resources/inbox/client/Client");
48
+ const Client_9 = require("./api/resources/knowledge/client/Client");
49
+ const Client_10 = require("./api/resources/organizations/client/Client");
50
+ const Client_11 = require("./api/resources/segments/client/Client");
51
+ const Client_12 = require("./api/resources/translations/client/Client");
52
+ const Client_13 = require("./api/resources/triggers/client/Client");
53
+ const Client_14 = require("./api/resources/users/client/Client");
55
54
  class MavenAGIClient {
56
55
  constructor(_options) {
57
56
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_1.mergeHeaders)({
@@ -59,8 +58,8 @@ class MavenAGIClient {
59
58
  "X-Agent-Id": _options === null || _options === void 0 ? void 0 : _options.agentId,
60
59
  "X-Fern-Language": "JavaScript",
61
60
  "X-Fern-SDK-Name": "mavenagi",
62
- "X-Fern-SDK-Version": "1.2.5",
63
- "User-Agent": "mavenagi/1.2.5",
61
+ "X-Fern-SDK-Version": "1.2.7",
62
+ "User-Agent": "mavenagi/1.2.7",
64
63
  "X-Fern-Runtime": core.RUNTIME.type,
65
64
  "X-Fern-Runtime-Version": core.RUNTIME.version,
66
65
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -69,61 +68,57 @@ class MavenAGIClient {
69
68
  var _a;
70
69
  return ((_a = this._actions) !== null && _a !== void 0 ? _a : (this._actions = new Client_1.Actions(this._options)));
71
70
  }
72
- get agentCapabilities() {
73
- var _a;
74
- return ((_a = this._agentCapabilities) !== null && _a !== void 0 ? _a : (this._agentCapabilities = new Client_2.AgentCapabilities(this._options)));
75
- }
76
71
  get agents() {
77
72
  var _a;
78
- return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Client_3.Agents(this._options)));
73
+ return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Client_2.Agents(this._options)));
79
74
  }
80
75
  get analytics() {
81
76
  var _a;
82
- return ((_a = this._analytics) !== null && _a !== void 0 ? _a : (this._analytics = new Client_4.Analytics(this._options)));
77
+ return ((_a = this._analytics) !== null && _a !== void 0 ? _a : (this._analytics = new Client_3.Analytics(this._options)));
83
78
  }
84
79
  get appSettings() {
85
80
  var _a;
86
- return ((_a = this._appSettings) !== null && _a !== void 0 ? _a : (this._appSettings = new Client_5.AppSettings(this._options)));
81
+ return ((_a = this._appSettings) !== null && _a !== void 0 ? _a : (this._appSettings = new Client_4.AppSettings(this._options)));
87
82
  }
88
83
  get assets() {
89
84
  var _a;
90
- return ((_a = this._assets) !== null && _a !== void 0 ? _a : (this._assets = new Client_6.Assets(this._options)));
85
+ return ((_a = this._assets) !== null && _a !== void 0 ? _a : (this._assets = new Client_5.Assets(this._options)));
91
86
  }
92
87
  get conversation() {
93
88
  var _a;
94
- return ((_a = this._conversation) !== null && _a !== void 0 ? _a : (this._conversation = new Client_7.Conversation(this._options)));
89
+ return ((_a = this._conversation) !== null && _a !== void 0 ? _a : (this._conversation = new Client_6.Conversation(this._options)));
95
90
  }
96
91
  get events() {
97
92
  var _a;
98
- return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new Client_8.Events(this._options)));
93
+ return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new Client_7.Events(this._options)));
99
94
  }
100
95
  get inbox() {
101
96
  var _a;
102
- return ((_a = this._inbox) !== null && _a !== void 0 ? _a : (this._inbox = new Client_9.Inbox(this._options)));
97
+ return ((_a = this._inbox) !== null && _a !== void 0 ? _a : (this._inbox = new Client_8.Inbox(this._options)));
103
98
  }
104
99
  get knowledge() {
105
100
  var _a;
106
- return ((_a = this._knowledge) !== null && _a !== void 0 ? _a : (this._knowledge = new Client_10.Knowledge(this._options)));
101
+ return ((_a = this._knowledge) !== null && _a !== void 0 ? _a : (this._knowledge = new Client_9.Knowledge(this._options)));
107
102
  }
108
103
  get organizations() {
109
104
  var _a;
110
- return ((_a = this._organizations) !== null && _a !== void 0 ? _a : (this._organizations = new Client_11.Organizations(this._options)));
105
+ return ((_a = this._organizations) !== null && _a !== void 0 ? _a : (this._organizations = new Client_10.Organizations(this._options)));
111
106
  }
112
107
  get segments() {
113
108
  var _a;
114
- return ((_a = this._segments) !== null && _a !== void 0 ? _a : (this._segments = new Client_12.Segments(this._options)));
109
+ return ((_a = this._segments) !== null && _a !== void 0 ? _a : (this._segments = new Client_11.Segments(this._options)));
115
110
  }
116
111
  get translations() {
117
112
  var _a;
118
- return ((_a = this._translations) !== null && _a !== void 0 ? _a : (this._translations = new Client_13.Translations(this._options)));
113
+ return ((_a = this._translations) !== null && _a !== void 0 ? _a : (this._translations = new Client_12.Translations(this._options)));
119
114
  }
120
115
  get triggers() {
121
116
  var _a;
122
- return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Client_14.Triggers(this._options)));
117
+ return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Client_13.Triggers(this._options)));
123
118
  }
124
119
  get users() {
125
120
  var _a;
126
- return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_15.Users(this._options)));
121
+ return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_14.Users(this._options)));
127
122
  }
128
123
  }
129
124
  exports.MavenAGIClient = MavenAGIClient;
package/README.md CHANGED
@@ -107,7 +107,7 @@ try {
107
107
  You can consume binary data from endpoints using the `BinaryResponse` type which lets you choose how to consume the data:
108
108
 
109
109
  ```typescript
110
- const response = await client.conversation.export(...);
110
+ const response = await client.analytics.exportConversationTable(...);
111
111
  const stream: ReadableStream<Uint8Array> = response.stream();
112
112
  // const arrayBuffer: ArrayBuffer = await response.arrayBuffer();
113
113
  // const blob: Blob = response.blob();
@@ -133,7 +133,7 @@ import { createWriteStream } from 'fs';
133
133
  import { Readable } from 'stream';
134
134
  import { pipeline } from 'stream/promises';
135
135
 
136
- const response = await client.conversation.export(...);
136
+ const response = await client.analytics.exportConversationTable(...);
137
137
 
138
138
  const stream = response.stream();
139
139
  const nodeStream = Readable.fromWeb(stream);
@@ -152,7 +152,7 @@ await pipeline(nodeStream, writeStream);
152
152
  ```ts
153
153
  import { writeFile } from 'fs/promises';
154
154
 
155
- const response = await client.conversation.export(...);
155
+ const response = await client.analytics.exportConversationTable(...);
156
156
 
157
157
  const arrayBuffer = await response.arrayBuffer();
158
158
  await writeFile('path/to/file', Buffer.from(arrayBuffer));
@@ -168,7 +168,7 @@ await writeFile('path/to/file', Buffer.from(arrayBuffer));
168
168
  ```ts
169
169
  import { writeFile } from 'fs/promises';
170
170
 
171
- const response = await client.conversation.export(...);
171
+ const response = await client.analytics.exportConversationTable(...);
172
172
 
173
173
  const blob = await response.blob();
174
174
  const arrayBuffer = await blob.arrayBuffer();
@@ -185,7 +185,7 @@ await writeFile('output.bin', Buffer.from(arrayBuffer));
185
185
  ```ts
186
186
  import { writeFile } from 'fs/promises';
187
187
 
188
- const response = await client.conversation.export(...);
188
+ const response = await client.analytics.exportConversationTable(...);
189
189
 
190
190
  const bytes = await response.bytes();
191
191
  await writeFile('path/to/file', bytes);
@@ -206,7 +206,7 @@ await writeFile('path/to/file', bytes);
206
206
  <summary>ReadableStream (most-efficient)</summary>
207
207
 
208
208
  ```ts
209
- const response = await client.conversation.export(...);
209
+ const response = await client.analytics.exportConversationTable(...);
210
210
 
211
211
  const stream = response.stream();
212
212
  await Bun.write('path/to/file', stream);
@@ -220,7 +220,7 @@ await Bun.write('path/to/file', stream);
220
220
  <summary>ArrayBuffer</summary>
221
221
 
222
222
  ```ts
223
- const response = await client.conversation.export(...);
223
+ const response = await client.analytics.exportConversationTable(...);
224
224
 
225
225
  const arrayBuffer = await response.arrayBuffer();
226
226
  await Bun.write('path/to/file', arrayBuffer);
@@ -234,7 +234,7 @@ await Bun.write('path/to/file', arrayBuffer);
234
234
  <summary>Blob</summary>
235
235
 
236
236
  ```ts
237
- const response = await client.conversation.export(...);
237
+ const response = await client.analytics.exportConversationTable(...);
238
238
 
239
239
  const blob = await response.blob();
240
240
  await Bun.write('path/to/file', blob);
@@ -248,7 +248,7 @@ await Bun.write('path/to/file', blob);
248
248
  <summary>Bytes (UIntArray8)</summary>
249
249
 
250
250
  ```ts
251
- const response = await client.conversation.export(...);
251
+ const response = await client.analytics.exportConversationTable(...);
252
252
 
253
253
  const bytes = await response.bytes();
254
254
  await Bun.write('path/to/file', bytes);
@@ -269,7 +269,7 @@ await Bun.write('path/to/file', bytes);
269
269
  <summary>ReadableStream (most-efficient)</summary>
270
270
 
271
271
  ```ts
272
- const response = await client.conversation.export(...);
272
+ const response = await client.analytics.exportConversationTable(...);
273
273
 
274
274
  const stream = response.stream();
275
275
  const file = await Deno.open('path/to/file', { write: true, create: true });
@@ -284,7 +284,7 @@ await stream.pipeTo(file.writable);
284
284
  <summary>ArrayBuffer</summary>
285
285
 
286
286
  ```ts
287
- const response = await client.conversation.export(...);
287
+ const response = await client.analytics.exportConversationTable(...);
288
288
 
289
289
  const arrayBuffer = await response.arrayBuffer();
290
290
  await Deno.writeFile('path/to/file', new Uint8Array(arrayBuffer));
@@ -298,7 +298,7 @@ await Deno.writeFile('path/to/file', new Uint8Array(arrayBuffer));
298
298
  <summary>Blob</summary>
299
299
 
300
300
  ```ts
301
- const response = await client.conversation.export(...);
301
+ const response = await client.analytics.exportConversationTable(...);
302
302
 
303
303
  const blob = await response.blob();
304
304
  const arrayBuffer = await blob.arrayBuffer();
@@ -313,7 +313,7 @@ await Deno.writeFile('path/to/file', new Uint8Array(arrayBuffer));
313
313
  <summary>Bytes (UIntArray8)</summary>
314
314
 
315
315
  ```ts
316
- const response = await client.conversation.export(...);
316
+ const response = await client.analytics.exportConversationTable(...);
317
317
 
318
318
  const bytes = await response.bytes();
319
319
  await Deno.writeFile('path/to/file', bytes);
@@ -334,7 +334,7 @@ await Deno.writeFile('path/to/file', bytes);
334
334
  <summary>Blob (most-efficient)</summary>
335
335
 
336
336
  ```ts
337
- const response = await client.conversation.export(...);
337
+ const response = await client.analytics.exportConversationTable(...);
338
338
 
339
339
  const blob = await response.blob();
340
340
  const url = URL.createObjectURL(blob);
@@ -355,7 +355,7 @@ URL.revokeObjectURL(url);
355
355
  <summary>ReadableStream</summary>
356
356
 
357
357
  ```ts
358
- const response = await client.conversation.export(...);
358
+ const response = await client.analytics.exportConversationTable(...);
359
359
 
360
360
  const stream = response.stream();
361
361
  const reader = stream.getReader();
@@ -386,7 +386,7 @@ URL.revokeObjectURL(url);
386
386
  <summary>ArrayBuffer</summary>
387
387
 
388
388
  ```ts
389
- const response = await client.conversation.export(...);
389
+ const response = await client.analytics.exportConversationTable(...);
390
390
 
391
391
  const arrayBuffer = await response.arrayBuffer();
392
392
  const blob = new Blob([arrayBuffer]);
@@ -408,7 +408,7 @@ URL.revokeObjectURL(url);
408
408
  <summary>Bytes (UIntArray8)</summary>
409
409
 
410
410
  ```ts
411
- const response = await client.conversation.export(...);
411
+ const response = await client.analytics.exportConversationTable(...);
412
412
 
413
413
  const bytes = await response.bytes();
414
414
  const blob = new Blob([bytes]);
@@ -439,7 +439,7 @@ URL.revokeObjectURL(url);
439
439
  <summary>ReadableStream</summary>
440
440
 
441
441
  ```ts
442
- const response = await client.conversation.export(...);
442
+ const response = await client.analytics.exportConversationTable(...);
443
443
 
444
444
  const stream = response.stream();
445
445
  const text = await new Response(stream).text();
@@ -453,7 +453,7 @@ const text = await new Response(stream).text();
453
453
  <summary>ArrayBuffer</summary>
454
454
 
455
455
  ```ts
456
- const response = await client.conversation.export(...);
456
+ const response = await client.analytics.exportConversationTable(...);
457
457
 
458
458
  const arrayBuffer = await response.arrayBuffer();
459
459
  const text = new TextDecoder().decode(arrayBuffer);
@@ -467,7 +467,7 @@ const text = new TextDecoder().decode(arrayBuffer);
467
467
  <summary>Blob</summary>
468
468
 
469
469
  ```ts
470
- const response = await client.conversation.export(...);
470
+ const response = await client.analytics.exportConversationTable(...);
471
471
 
472
472
  const blob = await response.blob();
473
473
  const text = await blob.text();
@@ -481,7 +481,7 @@ const text = await blob.text();
481
481
  <summary>Bytes (UIntArray8)</summary>
482
482
 
483
483
  ```ts
484
- const response = await client.conversation.export(...);
484
+ const response = await client.analytics.exportConversationTable(...);
485
485
 
486
486
  const bytes = await response.bytes();
487
487
  const text = new TextDecoder().decode(bytes);
@@ -136,6 +136,16 @@ export declare class Analytics {
136
136
  */
137
137
  getConversationChart(request: MavenAGI.ConversationChartRequest, requestOptions?: Analytics.RequestOptions): core.HttpResponsePromise<MavenAGI.ChartResponse>;
138
138
  private __getConversationChart;
139
+ /**
140
+ * Export the conversation analytics table to a CSV file.
141
+ *
142
+ * This outputs the current table view defined by the request. For most programmatic use cases, prefer `getConversationTable` and format client-side. The CSV format may change and should not be relied upon by code consumers. A maximum of 10,000 rows can be exported at a time.
143
+ * @throws {@link MavenAGI.NotFoundError}
144
+ * @throws {@link MavenAGI.BadRequestError}
145
+ * @throws {@link MavenAGI.ServerError}
146
+ */
147
+ exportConversationTable(request: MavenAGI.ConversationTableRequest, requestOptions?: Analytics.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
148
+ private __exportConversationTable;
139
149
  /**
140
150
  * Retrieves structured feedback data formatted as a table, allowing users to group, filter, and define specific metrics to display as columns.
141
151
  *
@@ -314,6 +314,89 @@ class Analytics {
314
314
  }
315
315
  });
316
316
  }
317
+ /**
318
+ * Export the conversation analytics table to a CSV file.
319
+ *
320
+ * This outputs the current table view defined by the request. For most programmatic use cases, prefer `getConversationTable` and format client-side. The CSV format may change and should not be relied upon by code consumers. A maximum of 10,000 rows can be exported at a time.
321
+ * @throws {@link MavenAGI.NotFoundError}
322
+ * @throws {@link MavenAGI.BadRequestError}
323
+ * @throws {@link MavenAGI.ServerError}
324
+ */
325
+ exportConversationTable(request, requestOptions) {
326
+ return core.HttpResponsePromise.fromPromise(this.__exportConversationTable(request, requestOptions));
327
+ }
328
+ __exportConversationTable(request, requestOptions) {
329
+ return __awaiter(this, void 0, void 0, function* () {
330
+ var _a, _b, _c, _d, _e, _f, _g, _h;
331
+ let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
332
+ Authorization: yield this._getAuthorizationHeader(),
333
+ "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,
334
+ "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,
335
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
336
+ const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
337
+ 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/tables/conversations/export"),
338
+ method: "POST",
339
+ headers: _headers,
340
+ contentType: "application/json",
341
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
342
+ requestType: "json",
343
+ body: serializers.ConversationTableRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
344
+ responseType: "binary-response",
345
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
346
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
347
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
348
+ });
349
+ if (_response.ok) {
350
+ return { data: _response.body, rawResponse: _response.rawResponse };
351
+ }
352
+ if (_response.error.reason === "status-code") {
353
+ switch (_response.error.statusCode) {
354
+ case 404:
355
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
356
+ unrecognizedObjectKeys: "passthrough",
357
+ allowUnrecognizedUnionMembers: true,
358
+ allowUnrecognizedEnumValues: true,
359
+ breadcrumbsPrefix: ["response"],
360
+ }), _response.rawResponse);
361
+ case 400:
362
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
363
+ unrecognizedObjectKeys: "passthrough",
364
+ allowUnrecognizedUnionMembers: true,
365
+ allowUnrecognizedEnumValues: true,
366
+ breadcrumbsPrefix: ["response"],
367
+ }), _response.rawResponse);
368
+ case 500:
369
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
370
+ unrecognizedObjectKeys: "passthrough",
371
+ allowUnrecognizedUnionMembers: true,
372
+ allowUnrecognizedEnumValues: true,
373
+ breadcrumbsPrefix: ["response"],
374
+ }), _response.rawResponse);
375
+ default:
376
+ throw new errors.MavenAGIError({
377
+ statusCode: _response.error.statusCode,
378
+ body: _response.error.body,
379
+ rawResponse: _response.rawResponse,
380
+ });
381
+ }
382
+ }
383
+ switch (_response.error.reason) {
384
+ case "non-json":
385
+ throw new errors.MavenAGIError({
386
+ statusCode: _response.error.statusCode,
387
+ body: _response.error.rawBody,
388
+ rawResponse: _response.rawResponse,
389
+ });
390
+ case "timeout":
391
+ throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/tables/conversations/export.");
392
+ case "unknown":
393
+ throw new errors.MavenAGIError({
394
+ message: _response.error.errorMessage,
395
+ rawResponse: _response.rawResponse,
396
+ });
397
+ }
398
+ });
399
+ }
317
400
  /**
318
401
  * Retrieves structured feedback data formatted as a table, allowing users to group, filter, and define specific metrics to display as columns.
319
402
  *
@@ -27,6 +27,16 @@ import * as MavenAGI from "../../../index";
27
27
  * },
28
28
  * defaultUserData: {
29
29
  * "name": "Joe"
30
+ * },
31
+ * agentUserData: {
32
+ * "name": [{
33
+ * value: "Joe",
34
+ * visibility: MavenAGI.VisibilityType.Visible,
35
+ * userId: {
36
+ * appId: "myapp",
37
+ * referenceId: "user0"
38
+ * }
39
+ * }]
30
40
  * }
31
41
  * }
32
42
  */
@@ -39,4 +49,6 @@ export interface AppUserResponse extends MavenAGI.AppUser {
39
49
  allUserData: Record<string, Record<string, string>>;
40
50
  /** Default data for this user */
41
51
  defaultUserData: Record<string, string>;
52
+ /** All user data for this user, including reverse indexable user data */
53
+ agentUserData: Record<string, MavenAGI.UserDataWithReference[]>;
42
54
  }
@@ -27,7 +27,8 @@ import * as MavenAGI from "../../../index";
27
27
  * userMessageCount: 1,
28
28
  * humanAgents: [],
29
29
  * humanAgentsWithInserts: [],
30
- * users: []
30
+ * users: [],
31
+ * userIdentifiers: []
31
32
  * },
32
33
  * metadata: {},
33
34
  * allMetadata: {},
@@ -33,4 +33,10 @@ export interface ConversationSummary {
33
33
  humanAgentsWithInserts: string[];
34
34
  /** The names of all users that have a message of type `USER` on the conversation. */
35
35
  users: string[];
36
+ /** The user identifiers (typically email addresses or phone numbers) of all users that have a message of type `USER` on the conversation. */
37
+ userIdentifiers: string[];
38
+ /** The text of the last user message in the conversation. */
39
+ lastUserMessage?: string;
40
+ /** The text of the last bot message in the conversation. */
41
+ lastBotMessage?: string;
36
42
  }
@@ -0,0 +1,5 @@
1
+ import * as MavenAGI from "../../../index";
2
+ export interface UserDataWithReference extends MavenAGI.UserData {
3
+ /** Reverse index containing appId and referenceId data that identifies this app user */
4
+ userId: MavenAGI.EntityIdFilter;
5
+ }
@@ -46,6 +46,7 @@ export * from "./AppUserIdentifier";
46
46
  export * from "./AppUserIdentifyingPropertyType";
47
47
  export * from "./AppUser";
48
48
  export * from "./UserData";
49
+ export * from "./UserDataWithReference";
49
50
  export * from "./VisibilityType";
50
51
  export * from "./AppUserRequest";
51
52
  export * from "./AppUserResponse";
@@ -62,6 +62,7 @@ __exportStar(require("./AppUserIdentifier"), exports);
62
62
  __exportStar(require("./AppUserIdentifyingPropertyType"), exports);
63
63
  __exportStar(require("./AppUser"), exports);
64
64
  __exportStar(require("./UserData"), exports);
65
+ __exportStar(require("./UserDataWithReference"), exports);
65
66
  __exportStar(require("./VisibilityType"), exports);
66
67
  __exportStar(require("./AppUserRequest"), exports);
67
68
  __exportStar(require("./AppUserResponse"), exports);
@@ -401,6 +401,25 @@ export declare class Conversation {
401
401
  */
402
402
  export(request: MavenAGI.ConversationsSearchRequest, requestOptions?: Conversation.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
403
403
  private __export;
404
+ /**
405
+ * Import simulation conversations from a CSV file.
406
+ *
407
+ * This CSV format is very simple and only allows for one column: `question`. A header containing this column is required.
408
+ * Each row will generate one simulation conversation, using the provided response config, if present.
409
+ *
410
+ * This API is offered for backwards compatibility.
411
+ * Most API callers should create simulations programmatically to allow for more flexibility.
412
+ *
413
+ * @param {core.file.Uploadable.FileLike} file
414
+ * @param {MavenAGI.SimulationImportRequest} request
415
+ * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
416
+ *
417
+ * @throws {@link MavenAGI.NotFoundError}
418
+ * @throws {@link MavenAGI.BadRequestError}
419
+ * @throws {@link MavenAGI.ServerError}
420
+ */
421
+ importSimulations(file: core.file.Uploadable.FileLike, request: MavenAGI.SimulationImportRequest, requestOptions?: Conversation.RequestOptions): core.HttpResponsePromise<void>;
422
+ private __importSimulations;
404
423
  /**
405
424
  * Deliver a message to a user or conversation.
406
425
  *
@@ -50,6 +50,7 @@ const MavenAGI = __importStar(require("../../../index"));
50
50
  const headers_1 = require("../../../../core/headers");
51
51
  const serializers = __importStar(require("../../../../serialization/index"));
52
52
  const errors = __importStar(require("../../../../errors/index"));
53
+ const json_1 = require("../../../../core/json");
53
54
  class Conversation {
54
55
  constructor(_options) {
55
56
  this._options = _options;
@@ -1635,6 +1636,99 @@ class Conversation {
1635
1636
  }
1636
1637
  });
1637
1638
  }
1639
+ /**
1640
+ * Import simulation conversations from a CSV file.
1641
+ *
1642
+ * This CSV format is very simple and only allows for one column: `question`. A header containing this column is required.
1643
+ * Each row will generate one simulation conversation, using the provided response config, if present.
1644
+ *
1645
+ * This API is offered for backwards compatibility.
1646
+ * Most API callers should create simulations programmatically to allow for more flexibility.
1647
+ *
1648
+ * @param {core.file.Uploadable.FileLike} file
1649
+ * @param {MavenAGI.SimulationImportRequest} request
1650
+ * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
1651
+ *
1652
+ * @throws {@link MavenAGI.NotFoundError}
1653
+ * @throws {@link MavenAGI.BadRequestError}
1654
+ * @throws {@link MavenAGI.ServerError}
1655
+ */
1656
+ importSimulations(file, request, requestOptions) {
1657
+ return core.HttpResponsePromise.fromPromise(this.__importSimulations(file, request, requestOptions));
1658
+ }
1659
+ __importSimulations(file, request, requestOptions) {
1660
+ return __awaiter(this, void 0, void 0, function* () {
1661
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1662
+ const _request = yield core.newFormData();
1663
+ yield _request.appendFile("file", file);
1664
+ if (request.responseConfig != null) {
1665
+ _request.append("responseConfig", (0, json_1.toJson)(serializers.ResponseConfig.jsonOrThrow(request.responseConfig, { unrecognizedObjectKeys: "strip" })));
1666
+ }
1667
+ const _maybeEncodedRequest = yield _request.getRequest();
1668
+ let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ Authorization: yield this._getAuthorizationHeader(), "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, "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 }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1669
+ const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
1670
+ 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/conversations/import_simulations"),
1671
+ method: "POST",
1672
+ headers: _headers,
1673
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1674
+ requestType: "file",
1675
+ duplex: _maybeEncodedRequest.duplex,
1676
+ body: _maybeEncodedRequest.body,
1677
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1678
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1679
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1680
+ });
1681
+ if (_response.ok) {
1682
+ return { data: undefined, rawResponse: _response.rawResponse };
1683
+ }
1684
+ if (_response.error.reason === "status-code") {
1685
+ switch (_response.error.statusCode) {
1686
+ case 404:
1687
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
1688
+ unrecognizedObjectKeys: "passthrough",
1689
+ allowUnrecognizedUnionMembers: true,
1690
+ allowUnrecognizedEnumValues: true,
1691
+ breadcrumbsPrefix: ["response"],
1692
+ }), _response.rawResponse);
1693
+ case 400:
1694
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
1695
+ unrecognizedObjectKeys: "passthrough",
1696
+ allowUnrecognizedUnionMembers: true,
1697
+ allowUnrecognizedEnumValues: true,
1698
+ breadcrumbsPrefix: ["response"],
1699
+ }), _response.rawResponse);
1700
+ case 500:
1701
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
1702
+ unrecognizedObjectKeys: "passthrough",
1703
+ allowUnrecognizedUnionMembers: true,
1704
+ allowUnrecognizedEnumValues: true,
1705
+ breadcrumbsPrefix: ["response"],
1706
+ }), _response.rawResponse);
1707
+ default:
1708
+ throw new errors.MavenAGIError({
1709
+ statusCode: _response.error.statusCode,
1710
+ body: _response.error.body,
1711
+ rawResponse: _response.rawResponse,
1712
+ });
1713
+ }
1714
+ }
1715
+ switch (_response.error.reason) {
1716
+ case "non-json":
1717
+ throw new errors.MavenAGIError({
1718
+ statusCode: _response.error.statusCode,
1719
+ body: _response.error.rawBody,
1720
+ rawResponse: _response.rawResponse,
1721
+ });
1722
+ case "timeout":
1723
+ throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/conversations/import_simulations.");
1724
+ case "unknown":
1725
+ throw new errors.MavenAGIError({
1726
+ message: _response.error.errorMessage,
1727
+ rawResponse: _response.rawResponse,
1728
+ });
1729
+ }
1730
+ });
1731
+ }
1638
1732
  /**
1639
1733
  * Deliver a message to a user or conversation.
1640
1734
  *
@@ -0,0 +1,5 @@
1
+ import * as MavenAGI from "../../../../index";
2
+ export interface SimulationImportRequest {
3
+ /** The response config to use for all of the created simulations. */
4
+ responseConfig?: MavenAGI.ResponseConfig;
5
+ }