mavenagi 1.0.5 → 1.0.6

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 (341) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +17 -12
  3. package/README.md +30 -13
  4. package/api/resources/actions/client/Client.js +3 -3
  5. package/api/resources/analytics/client/Client.d.ts +78 -0
  6. package/api/resources/analytics/client/Client.js +174 -0
  7. package/api/resources/analytics/client/index.d.ts +1 -0
  8. package/api/resources/analytics/client/index.js +2 -0
  9. package/api/resources/analytics/index.d.ts +2 -0
  10. package/api/resources/analytics/index.js +18 -0
  11. package/api/resources/analytics/types/Average.d.ts +9 -0
  12. package/api/resources/analytics/types/Average.js +5 -0
  13. package/api/resources/analytics/types/BasicMetric.d.ts +8 -0
  14. package/api/resources/analytics/types/BasicMetric.js +5 -0
  15. package/api/resources/analytics/types/ColumnDefinition.d.ts +10 -0
  16. package/api/resources/analytics/types/ColumnDefinition.js +5 -0
  17. package/api/resources/analytics/types/ConversationAnalyticsRequest.d.ts +8 -0
  18. package/api/resources/analytics/types/ConversationAnalyticsRequest.js +5 -0
  19. package/api/resources/analytics/types/ConversationRow.d.ts +13 -0
  20. package/api/resources/analytics/types/ConversationRow.js +5 -0
  21. package/api/resources/analytics/types/ConversationTableRequest.d.ts +50 -0
  22. package/api/resources/analytics/types/ConversationTableRequest.js +5 -0
  23. package/api/resources/analytics/types/ConversationTableResponse.d.ts +129 -0
  24. package/api/resources/analytics/types/ConversationTableResponse.js +5 -0
  25. package/api/resources/analytics/types/Count.d.ts +8 -0
  26. package/api/resources/analytics/types/Count.js +5 -0
  27. package/api/resources/analytics/types/DistinctCount.d.ts +10 -0
  28. package/api/resources/analytics/types/DistinctCount.js +5 -0
  29. package/api/resources/analytics/types/GroupBy.d.ts +12 -0
  30. package/api/resources/analytics/types/GroupBy.js +5 -0
  31. package/api/resources/analytics/types/Max.d.ts +9 -0
  32. package/api/resources/analytics/types/Max.js +5 -0
  33. package/api/resources/analytics/types/Median.d.ts +9 -0
  34. package/api/resources/analytics/types/Median.js +5 -0
  35. package/api/resources/analytics/types/Metric.d.ts +35 -0
  36. package/api/resources/analytics/types/Metric.js +5 -0
  37. package/api/resources/analytics/types/Min.d.ts +9 -0
  38. package/api/resources/analytics/types/Min.js +5 -0
  39. package/api/resources/analytics/types/Percentile.d.ts +11 -0
  40. package/api/resources/analytics/types/Percentile.js +5 -0
  41. package/api/resources/analytics/types/Sum.d.ts +9 -0
  42. package/api/resources/analytics/types/Sum.js +5 -0
  43. package/api/resources/analytics/types/index.d.ts +16 -0
  44. package/api/resources/analytics/types/index.js +32 -0
  45. package/api/resources/analyticsCommons/index.d.ts +1 -0
  46. package/api/resources/analyticsCommons/index.js +17 -0
  47. package/api/resources/analyticsCommons/types/CellData.d.ts +32 -0
  48. package/api/resources/analyticsCommons/types/CellData.js +5 -0
  49. package/api/resources/analyticsCommons/types/FieldValue.d.ts +33 -0
  50. package/api/resources/analyticsCommons/types/FieldValue.js +5 -0
  51. package/api/resources/analyticsCommons/types/Range.d.ts +9 -0
  52. package/api/resources/analyticsCommons/types/Range.js +5 -0
  53. package/api/resources/analyticsCommons/types/TimeInterval.d.ts +11 -0
  54. package/api/resources/analyticsCommons/types/TimeInterval.js +13 -0
  55. package/api/resources/analyticsCommons/types/index.d.ts +4 -0
  56. package/api/resources/analyticsCommons/types/index.js +20 -0
  57. package/api/resources/appSettings/client/Client.js +1 -1
  58. package/api/resources/commons/types/ConversationPrecondition.d.ts +4 -1
  59. package/api/resources/commons/types/ConversationResponse.d.ts +10 -1
  60. package/api/resources/commons/types/ConversationSummary.d.ts +10 -0
  61. package/api/resources/commons/types/ConversationSummary.js +5 -0
  62. package/api/resources/commons/types/EntityId.d.ts +6 -7
  63. package/api/resources/commons/types/EntityIdFilter.d.ts +7 -0
  64. package/api/resources/commons/types/EntityIdFilter.js +5 -0
  65. package/api/resources/commons/types/EntityIdWithoutAgent.d.ts +13 -0
  66. package/api/resources/commons/types/EntityIdWithoutAgent.js +5 -0
  67. package/api/resources/commons/types/ResponseConfigPrecondition.d.ts +11 -0
  68. package/api/resources/commons/types/ResponseConfigPrecondition.js +5 -0
  69. package/api/resources/commons/types/index.d.ts +4 -0
  70. package/api/resources/commons/types/index.js +4 -0
  71. package/api/resources/conversation/client/Client.d.ts +47 -4
  72. package/api/resources/conversation/client/Client.js +124 -14
  73. package/api/resources/conversation/client/requests/ConversationDeleteRequest.d.ts +19 -0
  74. package/api/resources/conversation/client/requests/ConversationDeleteRequest.js +5 -0
  75. package/api/resources/conversation/client/requests/index.d.ts +1 -0
  76. package/api/resources/conversation/types/AskRequest.d.ts +1 -1
  77. package/api/resources/conversation/types/ConversationField.d.ts +26 -0
  78. package/api/resources/conversation/types/ConversationField.js +28 -0
  79. package/api/resources/conversation/types/ConversationFilter.d.ts +21 -0
  80. package/api/resources/conversation/types/ConversationFilter.js +5 -0
  81. package/api/resources/conversation/types/Quality.d.ts +9 -0
  82. package/api/resources/conversation/types/Quality.js +11 -0
  83. package/api/resources/conversation/types/QualityReason.d.ts +15 -0
  84. package/api/resources/conversation/types/QualityReason.js +17 -0
  85. package/api/resources/conversation/types/index.d.ts +4 -0
  86. package/api/resources/conversation/types/index.js +4 -0
  87. package/api/resources/index.d.ts +4 -0
  88. package/api/resources/index.js +5 -1
  89. package/api/resources/knowledge/client/Client.js +7 -7
  90. package/api/resources/translations/client/Client.js +1 -1
  91. package/api/resources/triggers/client/Client.js +3 -3
  92. package/api/resources/users/client/Client.js +2 -2
  93. package/dist/Client.d.ts +3 -0
  94. package/dist/Client.js +17 -12
  95. package/dist/api/resources/actions/client/Client.js +3 -3
  96. package/dist/api/resources/analytics/client/Client.d.ts +78 -0
  97. package/dist/api/resources/analytics/client/Client.js +174 -0
  98. package/dist/api/resources/analytics/client/index.d.ts +1 -0
  99. package/dist/api/resources/analytics/client/index.js +2 -0
  100. package/dist/api/resources/analytics/index.d.ts +2 -0
  101. package/dist/api/resources/analytics/index.js +18 -0
  102. package/dist/api/resources/analytics/types/Average.d.ts +9 -0
  103. package/dist/api/resources/analytics/types/Average.js +5 -0
  104. package/dist/api/resources/analytics/types/BasicMetric.d.ts +8 -0
  105. package/dist/api/resources/analytics/types/BasicMetric.js +5 -0
  106. package/dist/api/resources/analytics/types/ColumnDefinition.d.ts +10 -0
  107. package/dist/api/resources/analytics/types/ColumnDefinition.js +5 -0
  108. package/dist/api/resources/analytics/types/ConversationAnalyticsRequest.d.ts +8 -0
  109. package/dist/api/resources/analytics/types/ConversationAnalyticsRequest.js +5 -0
  110. package/dist/api/resources/analytics/types/ConversationRow.d.ts +13 -0
  111. package/dist/api/resources/analytics/types/ConversationRow.js +5 -0
  112. package/dist/api/resources/analytics/types/ConversationTableRequest.d.ts +50 -0
  113. package/dist/api/resources/analytics/types/ConversationTableRequest.js +5 -0
  114. package/dist/api/resources/analytics/types/ConversationTableResponse.d.ts +129 -0
  115. package/dist/api/resources/analytics/types/ConversationTableResponse.js +5 -0
  116. package/dist/api/resources/analytics/types/Count.d.ts +8 -0
  117. package/dist/api/resources/analytics/types/Count.js +5 -0
  118. package/dist/api/resources/analytics/types/DistinctCount.d.ts +10 -0
  119. package/dist/api/resources/analytics/types/DistinctCount.js +5 -0
  120. package/dist/api/resources/analytics/types/GroupBy.d.ts +12 -0
  121. package/dist/api/resources/analytics/types/GroupBy.js +5 -0
  122. package/dist/api/resources/analytics/types/Max.d.ts +9 -0
  123. package/dist/api/resources/analytics/types/Max.js +5 -0
  124. package/dist/api/resources/analytics/types/Median.d.ts +9 -0
  125. package/dist/api/resources/analytics/types/Median.js +5 -0
  126. package/dist/api/resources/analytics/types/Metric.d.ts +35 -0
  127. package/dist/api/resources/analytics/types/Metric.js +5 -0
  128. package/dist/api/resources/analytics/types/Min.d.ts +9 -0
  129. package/dist/api/resources/analytics/types/Min.js +5 -0
  130. package/dist/api/resources/analytics/types/Percentile.d.ts +11 -0
  131. package/dist/api/resources/analytics/types/Percentile.js +5 -0
  132. package/dist/api/resources/analytics/types/Sum.d.ts +9 -0
  133. package/dist/api/resources/analytics/types/Sum.js +5 -0
  134. package/dist/api/resources/analytics/types/index.d.ts +16 -0
  135. package/dist/api/resources/analytics/types/index.js +32 -0
  136. package/dist/api/resources/analyticsCommons/index.d.ts +1 -0
  137. package/dist/api/resources/analyticsCommons/index.js +17 -0
  138. package/dist/api/resources/analyticsCommons/types/CellData.d.ts +32 -0
  139. package/dist/api/resources/analyticsCommons/types/CellData.js +5 -0
  140. package/dist/api/resources/analyticsCommons/types/FieldValue.d.ts +33 -0
  141. package/dist/api/resources/analyticsCommons/types/FieldValue.js +5 -0
  142. package/dist/api/resources/analyticsCommons/types/Range.d.ts +9 -0
  143. package/dist/api/resources/analyticsCommons/types/Range.js +5 -0
  144. package/dist/api/resources/analyticsCommons/types/TimeInterval.d.ts +11 -0
  145. package/dist/api/resources/analyticsCommons/types/TimeInterval.js +13 -0
  146. package/dist/api/resources/analyticsCommons/types/index.d.ts +4 -0
  147. package/dist/api/resources/analyticsCommons/types/index.js +20 -0
  148. package/dist/api/resources/appSettings/client/Client.js +1 -1
  149. package/dist/api/resources/commons/types/ConversationPrecondition.d.ts +4 -1
  150. package/dist/api/resources/commons/types/ConversationResponse.d.ts +10 -1
  151. package/dist/api/resources/commons/types/ConversationSummary.d.ts +10 -0
  152. package/dist/api/resources/commons/types/ConversationSummary.js +5 -0
  153. package/dist/api/resources/commons/types/EntityId.d.ts +6 -7
  154. package/dist/api/resources/commons/types/EntityIdFilter.d.ts +7 -0
  155. package/dist/api/resources/commons/types/EntityIdFilter.js +5 -0
  156. package/dist/api/resources/commons/types/EntityIdWithoutAgent.d.ts +13 -0
  157. package/dist/api/resources/commons/types/EntityIdWithoutAgent.js +5 -0
  158. package/dist/api/resources/commons/types/ResponseConfigPrecondition.d.ts +11 -0
  159. package/dist/api/resources/commons/types/ResponseConfigPrecondition.js +5 -0
  160. package/dist/api/resources/commons/types/index.d.ts +4 -0
  161. package/dist/api/resources/commons/types/index.js +4 -0
  162. package/dist/api/resources/conversation/client/Client.d.ts +47 -4
  163. package/dist/api/resources/conversation/client/Client.js +124 -14
  164. package/dist/api/resources/conversation/client/requests/ConversationDeleteRequest.d.ts +19 -0
  165. package/dist/api/resources/conversation/client/requests/ConversationDeleteRequest.js +5 -0
  166. package/dist/api/resources/conversation/client/requests/index.d.ts +1 -0
  167. package/dist/api/resources/conversation/types/AskRequest.d.ts +1 -1
  168. package/dist/api/resources/conversation/types/ConversationField.d.ts +26 -0
  169. package/dist/api/resources/conversation/types/ConversationField.js +28 -0
  170. package/dist/api/resources/conversation/types/ConversationFilter.d.ts +21 -0
  171. package/dist/api/resources/conversation/types/ConversationFilter.js +5 -0
  172. package/dist/api/resources/conversation/types/Quality.d.ts +9 -0
  173. package/dist/api/resources/conversation/types/Quality.js +11 -0
  174. package/dist/api/resources/conversation/types/QualityReason.d.ts +15 -0
  175. package/dist/api/resources/conversation/types/QualityReason.js +17 -0
  176. package/dist/api/resources/conversation/types/index.d.ts +4 -0
  177. package/dist/api/resources/conversation/types/index.js +4 -0
  178. package/dist/api/resources/index.d.ts +4 -0
  179. package/dist/api/resources/index.js +5 -1
  180. package/dist/api/resources/knowledge/client/Client.js +7 -7
  181. package/dist/api/resources/translations/client/Client.js +1 -1
  182. package/dist/api/resources/triggers/client/Client.js +3 -3
  183. package/dist/api/resources/users/client/Client.js +2 -2
  184. package/dist/serialization/resources/analytics/index.d.ts +1 -0
  185. package/dist/serialization/resources/analytics/index.js +17 -0
  186. package/dist/serialization/resources/analytics/types/Average.d.ts +12 -0
  187. package/dist/serialization/resources/analytics/types/Average.js +34 -0
  188. package/dist/serialization/resources/analytics/types/BasicMetric.d.ts +13 -0
  189. package/dist/serialization/resources/analytics/types/BasicMetric.js +34 -0
  190. package/dist/serialization/resources/analytics/types/ColumnDefinition.d.ts +14 -0
  191. package/dist/serialization/resources/analytics/types/ColumnDefinition.js +35 -0
  192. package/dist/serialization/resources/analytics/types/ConversationAnalyticsRequest.d.ts +13 -0
  193. package/dist/serialization/resources/analytics/types/ConversationAnalyticsRequest.js +34 -0
  194. package/dist/serialization/resources/analytics/types/ConversationRow.d.ts +16 -0
  195. package/dist/serialization/resources/analytics/types/ConversationRow.js +37 -0
  196. package/dist/serialization/resources/analytics/types/ConversationTableRequest.d.ts +18 -0
  197. package/dist/serialization/resources/analytics/types/ConversationTableRequest.js +41 -0
  198. package/dist/serialization/resources/analytics/types/ConversationTableResponse.d.ts +14 -0
  199. package/dist/serialization/resources/analytics/types/ConversationTableResponse.js +35 -0
  200. package/dist/serialization/resources/analytics/types/Count.d.ts +11 -0
  201. package/dist/serialization/resources/analytics/types/Count.js +31 -0
  202. package/dist/serialization/resources/analytics/types/DistinctCount.d.ts +12 -0
  203. package/dist/serialization/resources/analytics/types/DistinctCount.js +32 -0
  204. package/dist/serialization/resources/analytics/types/GroupBy.d.ts +16 -0
  205. package/dist/serialization/resources/analytics/types/GroupBy.js +37 -0
  206. package/dist/serialization/resources/analytics/types/Max.d.ts +12 -0
  207. package/dist/serialization/resources/analytics/types/Max.js +34 -0
  208. package/dist/serialization/resources/analytics/types/Median.d.ts +12 -0
  209. package/dist/serialization/resources/analytics/types/Median.js +34 -0
  210. package/dist/serialization/resources/analytics/types/Metric.d.ts +42 -0
  211. package/dist/serialization/resources/analytics/types/Metric.js +53 -0
  212. package/dist/serialization/resources/analytics/types/Min.d.ts +12 -0
  213. package/dist/serialization/resources/analytics/types/Min.js +34 -0
  214. package/dist/serialization/resources/analytics/types/Percentile.d.ts +13 -0
  215. package/dist/serialization/resources/analytics/types/Percentile.js +36 -0
  216. package/dist/serialization/resources/analytics/types/Sum.d.ts +12 -0
  217. package/dist/serialization/resources/analytics/types/Sum.js +34 -0
  218. package/dist/serialization/resources/analytics/types/index.d.ts +16 -0
  219. package/dist/serialization/resources/analytics/types/index.js +32 -0
  220. package/dist/serialization/resources/analyticsCommons/index.d.ts +1 -0
  221. package/dist/serialization/resources/analyticsCommons/index.js +17 -0
  222. package/dist/serialization/resources/analyticsCommons/types/CellData.d.ts +30 -0
  223. package/dist/serialization/resources/analyticsCommons/types/CellData.js +52 -0
  224. package/dist/serialization/resources/analyticsCommons/types/FieldValue.d.ts +38 -0
  225. package/dist/serialization/resources/analyticsCommons/types/FieldValue.js +56 -0
  226. package/dist/serialization/resources/analyticsCommons/types/Range.d.ts +13 -0
  227. package/dist/serialization/resources/analyticsCommons/types/Range.js +34 -0
  228. package/dist/serialization/resources/analyticsCommons/types/TimeInterval.d.ts +10 -0
  229. package/dist/serialization/resources/analyticsCommons/types/TimeInterval.js +31 -0
  230. package/dist/serialization/resources/analyticsCommons/types/index.d.ts +4 -0
  231. package/dist/serialization/resources/analyticsCommons/types/index.js +20 -0
  232. package/dist/serialization/resources/commons/types/ConversationPrecondition.d.ts +5 -1
  233. package/dist/serialization/resources/commons/types/ConversationPrecondition.js +2 -0
  234. package/dist/serialization/resources/commons/types/ConversationResponse.d.ts +3 -0
  235. package/dist/serialization/resources/commons/types/ConversationResponse.js +3 -0
  236. package/dist/serialization/resources/commons/types/ConversationSummary.d.ts +14 -0
  237. package/dist/serialization/resources/commons/types/ConversationSummary.js +35 -0
  238. package/dist/serialization/resources/commons/types/EntityId.d.ts +2 -5
  239. package/dist/serialization/resources/commons/types/EntityId.js +2 -5
  240. package/dist/serialization/resources/commons/types/EntityIdFilter.d.ts +13 -0
  241. package/dist/serialization/resources/commons/types/EntityIdFilter.js +34 -0
  242. package/dist/serialization/resources/commons/types/EntityIdWithoutAgent.d.ts +15 -0
  243. package/dist/serialization/resources/commons/types/EntityIdWithoutAgent.js +38 -0
  244. package/dist/serialization/resources/commons/types/ResponseConfigPrecondition.d.ts +18 -0
  245. package/dist/serialization/resources/commons/types/ResponseConfigPrecondition.js +41 -0
  246. package/dist/serialization/resources/commons/types/index.d.ts +4 -0
  247. package/dist/serialization/resources/commons/types/index.js +4 -0
  248. package/dist/serialization/resources/conversation/types/ConversationField.d.ts +10 -0
  249. package/dist/serialization/resources/conversation/types/ConversationField.js +52 -0
  250. package/dist/serialization/resources/conversation/types/ConversationFilter.d.ts +32 -0
  251. package/dist/serialization/resources/conversation/types/ConversationFilter.js +53 -0
  252. package/dist/serialization/resources/conversation/types/Quality.d.ts +10 -0
  253. package/dist/serialization/resources/conversation/types/Quality.js +35 -0
  254. package/dist/serialization/resources/conversation/types/QualityReason.d.ts +10 -0
  255. package/dist/serialization/resources/conversation/types/QualityReason.js +41 -0
  256. package/dist/serialization/resources/conversation/types/index.d.ts +4 -0
  257. package/dist/serialization/resources/conversation/types/index.js +4 -0
  258. package/dist/serialization/resources/index.d.ts +4 -0
  259. package/dist/serialization/resources/index.js +5 -1
  260. package/dist/version.d.ts +1 -1
  261. package/dist/version.js +1 -1
  262. package/package.json +1 -1
  263. package/reference.md +203 -4
  264. package/serialization/resources/analytics/index.d.ts +1 -0
  265. package/serialization/resources/analytics/index.js +17 -0
  266. package/serialization/resources/analytics/types/Average.d.ts +12 -0
  267. package/serialization/resources/analytics/types/Average.js +34 -0
  268. package/serialization/resources/analytics/types/BasicMetric.d.ts +13 -0
  269. package/serialization/resources/analytics/types/BasicMetric.js +34 -0
  270. package/serialization/resources/analytics/types/ColumnDefinition.d.ts +14 -0
  271. package/serialization/resources/analytics/types/ColumnDefinition.js +35 -0
  272. package/serialization/resources/analytics/types/ConversationAnalyticsRequest.d.ts +13 -0
  273. package/serialization/resources/analytics/types/ConversationAnalyticsRequest.js +34 -0
  274. package/serialization/resources/analytics/types/ConversationRow.d.ts +16 -0
  275. package/serialization/resources/analytics/types/ConversationRow.js +37 -0
  276. package/serialization/resources/analytics/types/ConversationTableRequest.d.ts +18 -0
  277. package/serialization/resources/analytics/types/ConversationTableRequest.js +41 -0
  278. package/serialization/resources/analytics/types/ConversationTableResponse.d.ts +14 -0
  279. package/serialization/resources/analytics/types/ConversationTableResponse.js +35 -0
  280. package/serialization/resources/analytics/types/Count.d.ts +11 -0
  281. package/serialization/resources/analytics/types/Count.js +31 -0
  282. package/serialization/resources/analytics/types/DistinctCount.d.ts +12 -0
  283. package/serialization/resources/analytics/types/DistinctCount.js +32 -0
  284. package/serialization/resources/analytics/types/GroupBy.d.ts +16 -0
  285. package/serialization/resources/analytics/types/GroupBy.js +37 -0
  286. package/serialization/resources/analytics/types/Max.d.ts +12 -0
  287. package/serialization/resources/analytics/types/Max.js +34 -0
  288. package/serialization/resources/analytics/types/Median.d.ts +12 -0
  289. package/serialization/resources/analytics/types/Median.js +34 -0
  290. package/serialization/resources/analytics/types/Metric.d.ts +42 -0
  291. package/serialization/resources/analytics/types/Metric.js +53 -0
  292. package/serialization/resources/analytics/types/Min.d.ts +12 -0
  293. package/serialization/resources/analytics/types/Min.js +34 -0
  294. package/serialization/resources/analytics/types/Percentile.d.ts +13 -0
  295. package/serialization/resources/analytics/types/Percentile.js +36 -0
  296. package/serialization/resources/analytics/types/Sum.d.ts +12 -0
  297. package/serialization/resources/analytics/types/Sum.js +34 -0
  298. package/serialization/resources/analytics/types/index.d.ts +16 -0
  299. package/serialization/resources/analytics/types/index.js +32 -0
  300. package/serialization/resources/analyticsCommons/index.d.ts +1 -0
  301. package/serialization/resources/analyticsCommons/index.js +17 -0
  302. package/serialization/resources/analyticsCommons/types/CellData.d.ts +30 -0
  303. package/serialization/resources/analyticsCommons/types/CellData.js +52 -0
  304. package/serialization/resources/analyticsCommons/types/FieldValue.d.ts +38 -0
  305. package/serialization/resources/analyticsCommons/types/FieldValue.js +56 -0
  306. package/serialization/resources/analyticsCommons/types/Range.d.ts +13 -0
  307. package/serialization/resources/analyticsCommons/types/Range.js +34 -0
  308. package/serialization/resources/analyticsCommons/types/TimeInterval.d.ts +10 -0
  309. package/serialization/resources/analyticsCommons/types/TimeInterval.js +31 -0
  310. package/serialization/resources/analyticsCommons/types/index.d.ts +4 -0
  311. package/serialization/resources/analyticsCommons/types/index.js +20 -0
  312. package/serialization/resources/commons/types/ConversationPrecondition.d.ts +5 -1
  313. package/serialization/resources/commons/types/ConversationPrecondition.js +2 -0
  314. package/serialization/resources/commons/types/ConversationResponse.d.ts +3 -0
  315. package/serialization/resources/commons/types/ConversationResponse.js +3 -0
  316. package/serialization/resources/commons/types/ConversationSummary.d.ts +14 -0
  317. package/serialization/resources/commons/types/ConversationSummary.js +35 -0
  318. package/serialization/resources/commons/types/EntityId.d.ts +2 -5
  319. package/serialization/resources/commons/types/EntityId.js +2 -5
  320. package/serialization/resources/commons/types/EntityIdFilter.d.ts +13 -0
  321. package/serialization/resources/commons/types/EntityIdFilter.js +34 -0
  322. package/serialization/resources/commons/types/EntityIdWithoutAgent.d.ts +15 -0
  323. package/serialization/resources/commons/types/EntityIdWithoutAgent.js +38 -0
  324. package/serialization/resources/commons/types/ResponseConfigPrecondition.d.ts +18 -0
  325. package/serialization/resources/commons/types/ResponseConfigPrecondition.js +41 -0
  326. package/serialization/resources/commons/types/index.d.ts +4 -0
  327. package/serialization/resources/commons/types/index.js +4 -0
  328. package/serialization/resources/conversation/types/ConversationField.d.ts +10 -0
  329. package/serialization/resources/conversation/types/ConversationField.js +52 -0
  330. package/serialization/resources/conversation/types/ConversationFilter.d.ts +32 -0
  331. package/serialization/resources/conversation/types/ConversationFilter.js +53 -0
  332. package/serialization/resources/conversation/types/Quality.d.ts +10 -0
  333. package/serialization/resources/conversation/types/Quality.js +35 -0
  334. package/serialization/resources/conversation/types/QualityReason.d.ts +10 -0
  335. package/serialization/resources/conversation/types/QualityReason.js +41 -0
  336. package/serialization/resources/conversation/types/index.d.ts +4 -0
  337. package/serialization/resources/conversation/types/index.js +4 -0
  338. package/serialization/resources/index.d.ts +4 -0
  339. package/serialization/resources/index.js +5 -1
  340. package/version.d.ts +1 -1
  341. package/version.js +1 -1
package/Client.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  import * as environments from "./environments";
5
5
  import * as core from "./core";
6
6
  import { Actions } from "./api/resources/actions/client/Client";
7
+ import { Analytics } from "./api/resources/analytics/client/Client";
7
8
  import { AppSettings } from "./api/resources/appSettings/client/Client";
8
9
  import { Conversation } from "./api/resources/conversation/client/Client";
9
10
  import { Knowledge } from "./api/resources/knowledge/client/Client";
@@ -39,6 +40,7 @@ export declare namespace MavenAGIClient {
39
40
  export declare class MavenAGIClient {
40
41
  protected readonly _options: MavenAGIClient.Options;
41
42
  protected _actions: Actions | undefined;
43
+ protected _analytics: Analytics | undefined;
42
44
  protected _appSettings: AppSettings | undefined;
43
45
  protected _conversation: Conversation | undefined;
44
46
  protected _knowledge: Knowledge | undefined;
@@ -47,6 +49,7 @@ export declare class MavenAGIClient {
47
49
  protected _users: Users | undefined;
48
50
  constructor(_options: MavenAGIClient.Options);
49
51
  get actions(): Actions;
52
+ get analytics(): Analytics;
50
53
  get appSettings(): AppSettings;
51
54
  get conversation(): Conversation;
52
55
  get knowledge(): Knowledge;
package/Client.js CHANGED
@@ -5,12 +5,13 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.MavenAGIClient = void 0;
7
7
  const Client_1 = require("./api/resources/actions/client/Client");
8
- const Client_2 = require("./api/resources/appSettings/client/Client");
9
- const Client_3 = require("./api/resources/conversation/client/Client");
10
- const Client_4 = require("./api/resources/knowledge/client/Client");
11
- const Client_5 = require("./api/resources/translations/client/Client");
12
- const Client_6 = require("./api/resources/triggers/client/Client");
13
- const Client_7 = require("./api/resources/users/client/Client");
8
+ const Client_2 = require("./api/resources/analytics/client/Client");
9
+ const Client_3 = require("./api/resources/appSettings/client/Client");
10
+ const Client_4 = require("./api/resources/conversation/client/Client");
11
+ const Client_5 = require("./api/resources/knowledge/client/Client");
12
+ const Client_6 = require("./api/resources/translations/client/Client");
13
+ const Client_7 = require("./api/resources/triggers/client/Client");
14
+ const Client_8 = require("./api/resources/users/client/Client");
14
15
  class MavenAGIClient {
15
16
  constructor(_options) {
16
17
  this._options = _options;
@@ -19,29 +20,33 @@ class MavenAGIClient {
19
20
  var _a;
20
21
  return ((_a = this._actions) !== null && _a !== void 0 ? _a : (this._actions = new Client_1.Actions(this._options)));
21
22
  }
23
+ get analytics() {
24
+ var _a;
25
+ return ((_a = this._analytics) !== null && _a !== void 0 ? _a : (this._analytics = new Client_2.Analytics(this._options)));
26
+ }
22
27
  get appSettings() {
23
28
  var _a;
24
- return ((_a = this._appSettings) !== null && _a !== void 0 ? _a : (this._appSettings = new Client_2.AppSettings(this._options)));
29
+ return ((_a = this._appSettings) !== null && _a !== void 0 ? _a : (this._appSettings = new Client_3.AppSettings(this._options)));
25
30
  }
26
31
  get conversation() {
27
32
  var _a;
28
- return ((_a = this._conversation) !== null && _a !== void 0 ? _a : (this._conversation = new Client_3.Conversation(this._options)));
33
+ return ((_a = this._conversation) !== null && _a !== void 0 ? _a : (this._conversation = new Client_4.Conversation(this._options)));
29
34
  }
30
35
  get knowledge() {
31
36
  var _a;
32
- return ((_a = this._knowledge) !== null && _a !== void 0 ? _a : (this._knowledge = new Client_4.Knowledge(this._options)));
37
+ return ((_a = this._knowledge) !== null && _a !== void 0 ? _a : (this._knowledge = new Client_5.Knowledge(this._options)));
33
38
  }
34
39
  get translations() {
35
40
  var _a;
36
- return ((_a = this._translations) !== null && _a !== void 0 ? _a : (this._translations = new Client_5.Translations(this._options)));
41
+ return ((_a = this._translations) !== null && _a !== void 0 ? _a : (this._translations = new Client_6.Translations(this._options)));
37
42
  }
38
43
  get triggers() {
39
44
  var _a;
40
- return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Client_6.Triggers(this._options)));
45
+ return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Client_7.Triggers(this._options)));
41
46
  }
42
47
  get users() {
43
48
  var _a;
44
- return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_7.Users(this._options)));
49
+ return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_8.Users(this._options)));
45
50
  }
46
51
  }
47
52
  exports.MavenAGIClient = MavenAGIClient;
package/README.md CHANGED
@@ -28,19 +28,36 @@ const client = new MavenAGIClient({
28
28
  organizationId: "YOUR_ORGANIZATION_ID",
29
29
  agentId: "YOUR_AGENT_ID",
30
30
  });
31
- await client.conversation.initialize({
32
- conversationId: {
33
- referenceId: "referenceId",
31
+ await client.analytics.getConversationTable({
32
+ conversationFilter: {
33
+ languages: ["en", "es"],
34
34
  },
35
- messages: [
35
+ timeGrouping: "DAY",
36
+ fieldGroupings: [
36
37
  {
37
- conversationMessageId: {
38
- referenceId: "referenceId",
38
+ field: "Category",
39
+ },
40
+ ],
41
+ columnDefinitions: [
42
+ {
43
+ header: "count",
44
+ metric: {
45
+ type: "count",
46
+ },
47
+ },
48
+ {
49
+ header: "avg_first_response_time",
50
+ metric: {
51
+ type: "average",
52
+ targetField: "FirstResponseTime",
39
53
  },
40
54
  },
41
55
  {
42
- conversationMessageId: {
43
- referenceId: "referenceId",
56
+ header: "percentile_handle_time",
57
+ metric: {
58
+ type: "percentile",
59
+ targetField: "HandleTime",
60
+ percentiles: [25, 75],
44
61
  },
45
62
  },
46
63
  ],
@@ -107,7 +124,7 @@ will be thrown.
107
124
  import { MavenAGIError } from "mavenagi";
108
125
 
109
126
  try {
110
- await client.conversation.initialize(...);
127
+ await client.analytics.getConversationTable(...);
111
128
  } catch (err) {
112
129
  if (err instanceof MavenAGIError) {
113
130
  console.log(err.statusCode);
@@ -124,7 +141,7 @@ try {
124
141
  If you would like to send additional headers as part of the request, use the `headers` request option.
125
142
 
126
143
  ```typescript
127
- const response = await client.conversation.initialize(..., {
144
+ const response = await client.analytics.getConversationTable(..., {
128
145
  headers: {
129
146
  'X-Custom-Header': 'custom value'
130
147
  }
@@ -146,7 +163,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret
146
163
  Use the `maxRetries` request option to configure this behavior.
147
164
 
148
165
  ```typescript
149
- const response = await client.conversation.initialize(..., {
166
+ const response = await client.analytics.getConversationTable(..., {
150
167
  maxRetries: 0 // override maxRetries at the request level
151
168
  });
152
169
  ```
@@ -156,7 +173,7 @@ const response = await client.conversation.initialize(..., {
156
173
  The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
157
174
 
158
175
  ```typescript
159
- const response = await client.conversation.initialize(..., {
176
+ const response = await client.analytics.getConversationTable(..., {
160
177
  timeoutInSeconds: 30 // override timeout to 30s
161
178
  });
162
179
  ```
@@ -167,7 +184,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa
167
184
 
168
185
  ```typescript
169
186
  const controller = new AbortController();
170
- const response = await client.conversation.initialize(..., {
187
+ const response = await client.analytics.getConversationTable(..., {
171
188
  abortSignal: controller.signal
172
189
  });
173
190
  controller.abort(); // aborts the request
@@ -87,7 +87,7 @@ class Actions {
87
87
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
88
88
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/actions"),
89
89
  method: "PUT",
90
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.5", "User-Agent": "mavenagi/1.0.5", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
90
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.6", "User-Agent": "mavenagi/1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
91
91
  contentType: "application/json",
92
92
  requestType: "json",
93
93
  body: serializers.ActionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -167,7 +167,7 @@ class Actions {
167
167
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
168
168
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/actions/${encodeURIComponent(actionReferenceId)}`),
169
169
  method: "GET",
170
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.5", "User-Agent": "mavenagi/1.0.5", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
170
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.6", "User-Agent": "mavenagi/1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
171
171
  contentType: "application/json",
172
172
  requestType: "json",
173
173
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -246,7 +246,7 @@ class Actions {
246
246
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
247
247
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/actions/${encodeURIComponent(actionReferenceId)}`),
248
248
  method: "DELETE",
249
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.5", "User-Agent": "mavenagi/1.0.5", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
249
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.6", "User-Agent": "mavenagi/1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
250
250
  contentType: "application/json",
251
251
  requestType: "json",
252
252
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -0,0 +1,78 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments";
5
+ import * as core from "../../../../core";
6
+ import * as MavenAGI from "../../../index";
7
+ export declare namespace Analytics {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
10
+ appId?: core.Supplier<string | undefined>;
11
+ appSecret?: core.Supplier<string | undefined>;
12
+ /** Override the X-Organization-Id header */
13
+ organizationId: core.Supplier<string>;
14
+ /** Override the X-Agent-Id header */
15
+ agentId: core.Supplier<string>;
16
+ fetcher?: core.FetchFunction;
17
+ }
18
+ interface RequestOptions {
19
+ /** The maximum time to wait for a response in seconds. */
20
+ timeoutInSeconds?: number;
21
+ /** The number of times to retry the request. Defaults to 2. */
22
+ maxRetries?: number;
23
+ /** A hook to abort the request. */
24
+ abortSignal?: AbortSignal;
25
+ /** Override the X-Organization-Id header */
26
+ organizationId?: string;
27
+ /** Override the X-Agent-Id header */
28
+ agentId?: string;
29
+ /** Additional headers to include in the request. */
30
+ headers?: Record<string, string>;
31
+ }
32
+ }
33
+ export declare class Analytics {
34
+ protected readonly _options: Analytics.Options;
35
+ constructor(_options: Analytics.Options);
36
+ /**
37
+ * Retrieves structured conversation data formatted as a table, allowing users to group, filter, and define specific metrics to display as columns.
38
+ *
39
+ * @param {MavenAGI.ConversationTableRequest} request
40
+ * @param {Analytics.RequestOptions} requestOptions - Request-specific configuration.
41
+ *
42
+ * @throws {@link MavenAGI.NotFoundError}
43
+ * @throws {@link MavenAGI.BadRequestError}
44
+ * @throws {@link MavenAGI.ServerError}
45
+ *
46
+ * @example
47
+ * await client.analytics.getConversationTable({
48
+ * conversationFilter: {
49
+ * languages: ["en", "es"]
50
+ * },
51
+ * timeGrouping: "DAY",
52
+ * fieldGroupings: [{
53
+ * field: "Category"
54
+ * }],
55
+ * columnDefinitions: [{
56
+ * header: "count",
57
+ * metric: {
58
+ * type: "count"
59
+ * }
60
+ * }, {
61
+ * header: "avg_first_response_time",
62
+ * metric: {
63
+ * type: "average",
64
+ * targetField: "FirstResponseTime"
65
+ * }
66
+ * }, {
67
+ * header: "percentile_handle_time",
68
+ * metric: {
69
+ * type: "percentile",
70
+ * targetField: "HandleTime",
71
+ * percentiles: [25, 75]
72
+ * }
73
+ * }]
74
+ * })
75
+ */
76
+ getConversationTable(request: MavenAGI.ConversationTableRequest, requestOptions?: Analytics.RequestOptions): Promise<MavenAGI.ConversationTableResponse>;
77
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
78
+ }
@@ -0,0 +1,174 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.Analytics = void 0;
42
+ const environments = __importStar(require("../../../../environments"));
43
+ const core = __importStar(require("../../../../core"));
44
+ const MavenAGI = __importStar(require("../../../index"));
45
+ const serializers = __importStar(require("../../../../serialization/index"));
46
+ const url_join_1 = __importDefault(require("url-join"));
47
+ const errors = __importStar(require("../../../../errors/index"));
48
+ class Analytics {
49
+ constructor(_options) {
50
+ this._options = _options;
51
+ }
52
+ /**
53
+ * Retrieves structured conversation data formatted as a table, allowing users to group, filter, and define specific metrics to display as columns.
54
+ *
55
+ * @param {MavenAGI.ConversationTableRequest} request
56
+ * @param {Analytics.RequestOptions} requestOptions - Request-specific configuration.
57
+ *
58
+ * @throws {@link MavenAGI.NotFoundError}
59
+ * @throws {@link MavenAGI.BadRequestError}
60
+ * @throws {@link MavenAGI.ServerError}
61
+ *
62
+ * @example
63
+ * await client.analytics.getConversationTable({
64
+ * conversationFilter: {
65
+ * languages: ["en", "es"]
66
+ * },
67
+ * timeGrouping: "DAY",
68
+ * fieldGroupings: [{
69
+ * field: "Category"
70
+ * }],
71
+ * columnDefinitions: [{
72
+ * header: "count",
73
+ * metric: {
74
+ * type: "count"
75
+ * }
76
+ * }, {
77
+ * header: "avg_first_response_time",
78
+ * metric: {
79
+ * type: "average",
80
+ * targetField: "FirstResponseTime"
81
+ * }
82
+ * }, {
83
+ * header: "percentile_handle_time",
84
+ * metric: {
85
+ * type: "percentile",
86
+ * targetField: "HandleTime",
87
+ * percentiles: [25, 75]
88
+ * }
89
+ * }]
90
+ * })
91
+ */
92
+ getConversationTable(request, requestOptions) {
93
+ var _a, _b;
94
+ return __awaiter(this, void 0, void 0, function* () {
95
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
96
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/tables/conversations"),
97
+ method: "POST",
98
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.6", "User-Agent": "mavenagi/1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
99
+ contentType: "application/json",
100
+ requestType: "json",
101
+ body: serializers.ConversationTableRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
102
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
103
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
104
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
105
+ });
106
+ if (_response.ok) {
107
+ return serializers.ConversationTableResponse.parseOrThrow(_response.body, {
108
+ unrecognizedObjectKeys: "passthrough",
109
+ allowUnrecognizedUnionMembers: true,
110
+ allowUnrecognizedEnumValues: true,
111
+ breadcrumbsPrefix: ["response"],
112
+ });
113
+ }
114
+ if (_response.error.reason === "status-code") {
115
+ switch (_response.error.statusCode) {
116
+ case 404:
117
+ throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
118
+ unrecognizedObjectKeys: "passthrough",
119
+ allowUnrecognizedUnionMembers: true,
120
+ allowUnrecognizedEnumValues: true,
121
+ breadcrumbsPrefix: ["response"],
122
+ }));
123
+ case 400:
124
+ throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
125
+ unrecognizedObjectKeys: "passthrough",
126
+ allowUnrecognizedUnionMembers: true,
127
+ allowUnrecognizedEnumValues: true,
128
+ breadcrumbsPrefix: ["response"],
129
+ }));
130
+ case 500:
131
+ throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
132
+ unrecognizedObjectKeys: "passthrough",
133
+ allowUnrecognizedUnionMembers: true,
134
+ allowUnrecognizedEnumValues: true,
135
+ breadcrumbsPrefix: ["response"],
136
+ }));
137
+ default:
138
+ throw new errors.MavenAGIError({
139
+ statusCode: _response.error.statusCode,
140
+ body: _response.error.body,
141
+ });
142
+ }
143
+ }
144
+ switch (_response.error.reason) {
145
+ case "non-json":
146
+ throw new errors.MavenAGIError({
147
+ statusCode: _response.error.statusCode,
148
+ body: _response.error.rawBody,
149
+ });
150
+ case "timeout":
151
+ throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/tables/conversations.");
152
+ case "unknown":
153
+ throw new errors.MavenAGIError({
154
+ message: _response.error.errorMessage,
155
+ });
156
+ }
157
+ });
158
+ }
159
+ _getAuthorizationHeader() {
160
+ var _a, _b;
161
+ return __awaiter(this, void 0, void 0, function* () {
162
+ 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"];
163
+ 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"];
164
+ if (appId != null && appSecret != null) {
165
+ return core.BasicAuth.toAuthorizationHeader({
166
+ username: appId,
167
+ password: appSecret,
168
+ });
169
+ }
170
+ return undefined;
171
+ });
172
+ }
173
+ }
174
+ exports.Analytics = Analytics;
@@ -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 "./types";
2
+ export * from "./client";
@@ -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("./types"), exports);
18
+ __exportStar(require("./client"), exports);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as MavenAGI from "../../../index";
5
+ /**
6
+ * Calculates the average value of the specified field.
7
+ */
8
+ export interface Average extends MavenAGI.BasicMetric {
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as MavenAGI from "../../../index";
5
+ export interface BasicMetric {
6
+ /** Field to apply the metric to. The field should be numeric for all metrics except for Count (no field) and DistinctCount. */
7
+ targetField: MavenAGI.ConversationField;
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as MavenAGI from "../../../index";
5
+ export interface ColumnDefinition {
6
+ /** Unique column header, serving as the key for corresponding metric values. */
7
+ header: string;
8
+ /** The metric calculated for this column, stored in the row data under the specified header. */
9
+ metric: MavenAGI.Metric;
10
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as MavenAGI from "../../../index";
5
+ export interface ConversationAnalyticsRequest {
6
+ /** Optional filter applied to refine the conversation data before processing. */
7
+ conversationFilter?: MavenAGI.ConversationFilter;
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as MavenAGI from "../../../index";
5
+ export interface ConversationRow {
6
+ /**
7
+ * A unique identifier for each row, consisting of field names mapped to their respective values.
8
+ * This includes time groupings and any specified field groupings.
9
+ */
10
+ identifier: Record<MavenAGI.ConversationField, MavenAGI.FieldValue | undefined>;
11
+ /** The actual row data, where keys represent column headers and values contain the respective metric results. */
12
+ data: Record<string, MavenAGI.CellData>;
13
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,50 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as MavenAGI from "../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * conversationFilter: {
9
+ * languages: ["en", "es"]
10
+ * },
11
+ * timeGrouping: MavenAGI.TimeInterval.Day,
12
+ * fieldGroupings: [{
13
+ * field: MavenAGI.ConversationField.Category
14
+ * }],
15
+ * columnDefinitions: [{
16
+ * header: "count",
17
+ * metric: {
18
+ * type: "count"
19
+ * }
20
+ * }, {
21
+ * header: "avg_first_response_time",
22
+ * metric: {
23
+ * type: "average",
24
+ * targetField: MavenAGI.ConversationField.FirstResponseTime
25
+ * }
26
+ * }, {
27
+ * header: "percentile_handle_time",
28
+ * metric: {
29
+ * type: "percentile",
30
+ * targetField: MavenAGI.ConversationField.HandleTime,
31
+ * percentiles: [25, 75]
32
+ * }
33
+ * }]
34
+ * }
35
+ */
36
+ export interface ConversationTableRequest extends MavenAGI.ConversationAnalyticsRequest {
37
+ /**
38
+ * Defines the time interval for grouping data. If specified, data is grouped accordingly based on the time they were created.
39
+ * Example: If set to "DAY," data will be aggregated by day.
40
+ */
41
+ timeGrouping?: MavenAGI.TimeInterval;
42
+ /**
43
+ * Specifies the fields by which data should be grouped. Each unique combination forms a row.
44
+ * If multiple fields are provided, the result is grouped by their unique value combinations.
45
+ * If empty, all data is aggregated into a single row.
46
+ */
47
+ fieldGroupings: MavenAGI.GroupBy[];
48
+ /** Specifies the metrics to be displayed as columns. Column headers act as keys, with computed metric values as their mapped values. There needs to be at least one column definition in the table request. */
49
+ columnDefinitions: MavenAGI.ColumnDefinition[];
50
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });