@roarkanalytics/sdk 2.20.0 → 2.21.1

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 (419) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +83 -45
  3. package/api-promise.d.mts +47 -0
  4. package/api-promise.d.mts.map +1 -0
  5. package/api-promise.d.ts +47 -0
  6. package/api-promise.d.ts.map +1 -0
  7. package/api-promise.js +84 -0
  8. package/api-promise.js.map +1 -0
  9. package/api-promise.mjs +80 -0
  10. package/api-promise.mjs.map +1 -0
  11. package/client.d.mts +201 -0
  12. package/client.d.mts.map +1 -0
  13. package/client.d.ts +201 -0
  14. package/client.d.ts.map +1 -0
  15. package/client.js +454 -0
  16. package/client.js.map +1 -0
  17. package/client.mjs +427 -0
  18. package/client.mjs.map +1 -0
  19. package/error.d.mts +47 -0
  20. package/error.d.mts.map +1 -0
  21. package/error.d.ts +1 -1
  22. package/error.d.ts.map +1 -1
  23. package/error.js +2 -2
  24. package/error.js.map +1 -1
  25. package/error.mjs +1 -1
  26. package/error.mjs.map +1 -1
  27. package/index.d.mts +4 -130
  28. package/index.d.mts.map +1 -0
  29. package/index.d.ts +4 -130
  30. package/index.d.ts.map +1 -1
  31. package/index.js +10 -128
  32. package/index.js.map +1 -1
  33. package/index.mjs +4 -102
  34. package/index.mjs.map +1 -1
  35. package/internal/builtin-types.d.mts +65 -0
  36. package/internal/builtin-types.d.mts.map +1 -0
  37. package/internal/builtin-types.d.ts +65 -0
  38. package/internal/builtin-types.d.ts.map +1 -0
  39. package/internal/builtin-types.js +4 -0
  40. package/internal/builtin-types.js.map +1 -0
  41. package/internal/builtin-types.mjs +3 -0
  42. package/internal/builtin-types.mjs.map +1 -0
  43. package/internal/detect-platform.d.mts +15 -0
  44. package/internal/detect-platform.d.mts.map +1 -0
  45. package/internal/detect-platform.d.ts +15 -0
  46. package/internal/detect-platform.d.ts.map +1 -0
  47. package/internal/detect-platform.js +162 -0
  48. package/internal/detect-platform.js.map +1 -0
  49. package/internal/detect-platform.mjs +157 -0
  50. package/internal/detect-platform.mjs.map +1 -0
  51. package/internal/errors.d.mts +3 -0
  52. package/internal/errors.d.mts.map +1 -0
  53. package/internal/errors.d.ts +3 -0
  54. package/internal/errors.d.ts.map +1 -0
  55. package/internal/errors.js +26 -0
  56. package/internal/errors.js.map +1 -0
  57. package/internal/errors.mjs +21 -0
  58. package/internal/errors.mjs.map +1 -0
  59. package/internal/headers.d.mts +21 -0
  60. package/internal/headers.d.mts.map +1 -0
  61. package/internal/headers.d.ts +21 -0
  62. package/internal/headers.d.ts.map +1 -0
  63. package/internal/headers.js +77 -0
  64. package/internal/headers.js.map +1 -0
  65. package/internal/headers.mjs +72 -0
  66. package/internal/headers.mjs.map +1 -0
  67. package/internal/parse.d.mts +10 -0
  68. package/internal/parse.d.mts.map +1 -0
  69. package/internal/parse.d.ts +10 -0
  70. package/internal/parse.d.ts.map +1 -0
  71. package/internal/parse.js +28 -0
  72. package/internal/parse.js.map +1 -0
  73. package/internal/parse.mjs +24 -0
  74. package/internal/parse.mjs.map +1 -0
  75. package/internal/polyfill/crypto.node.d.ts +10 -0
  76. package/internal/polyfill/crypto.node.js +11 -0
  77. package/internal/polyfill/crypto.node.mjs +2 -0
  78. package/internal/polyfill/file.node.d.ts +9 -0
  79. package/internal/polyfill/file.node.js +17 -0
  80. package/internal/polyfill/file.node.mjs +9 -0
  81. package/internal/qs/formats.d.mts +6 -0
  82. package/internal/qs/formats.d.mts.map +1 -0
  83. package/internal/qs/formats.d.ts.map +1 -1
  84. package/internal/qs/index.d.mts +10 -0
  85. package/internal/qs/index.d.mts.map +1 -0
  86. package/internal/qs/index.d.ts.map +1 -1
  87. package/internal/qs/stringify.d.mts +3 -0
  88. package/internal/qs/stringify.d.mts.map +1 -0
  89. package/internal/qs/stringify.d.ts.map +1 -1
  90. package/internal/qs/types.d.mts +57 -0
  91. package/internal/qs/types.d.mts.map +1 -0
  92. package/internal/qs/utils.d.mts +14 -0
  93. package/internal/qs/utils.d.mts.map +1 -0
  94. package/internal/qs/utils.d.ts.map +1 -1
  95. package/internal/request-options.d.mts +34 -0
  96. package/internal/request-options.d.mts.map +1 -0
  97. package/internal/request-options.d.ts +34 -0
  98. package/internal/request-options.d.ts.map +1 -0
  99. package/internal/request-options.js +39 -0
  100. package/internal/request-options.js.map +1 -0
  101. package/internal/request-options.mjs +34 -0
  102. package/internal/request-options.mjs.map +1 -0
  103. package/internal/shim-types.d.mts +28 -0
  104. package/internal/shim-types.d.ts +28 -0
  105. package/internal/shims.d.mts +61 -0
  106. package/internal/shims.d.mts.map +1 -0
  107. package/internal/shims.d.ts +61 -0
  108. package/internal/shims.d.ts.map +1 -0
  109. package/internal/shims.js +101 -0
  110. package/internal/shims.js.map +1 -0
  111. package/internal/shims.mjs +92 -0
  112. package/internal/shims.mjs.map +1 -0
  113. package/internal/types.d.mts +68 -0
  114. package/internal/types.d.mts.map +1 -0
  115. package/internal/types.d.ts +68 -0
  116. package/internal/types.d.ts.map +1 -0
  117. package/internal/types.js +4 -0
  118. package/internal/types.js.map +1 -0
  119. package/internal/types.mjs +3 -0
  120. package/internal/types.mjs.map +1 -0
  121. package/internal/uploads.d.mts +73 -0
  122. package/internal/uploads.d.mts.map +1 -0
  123. package/internal/uploads.d.ts +73 -0
  124. package/internal/uploads.d.ts.map +1 -0
  125. package/internal/uploads.js +208 -0
  126. package/internal/uploads.js.map +1 -0
  127. package/internal/uploads.mjs +200 -0
  128. package/internal/uploads.mjs.map +1 -0
  129. package/internal/utils/base64.d.mts +3 -0
  130. package/internal/utils/base64.d.mts.map +1 -0
  131. package/internal/utils/base64.d.ts +3 -0
  132. package/internal/utils/base64.d.ts.map +1 -0
  133. package/internal/utils/base64.js +33 -0
  134. package/internal/utils/base64.js.map +1 -0
  135. package/internal/utils/base64.mjs +28 -0
  136. package/internal/utils/base64.mjs.map +1 -0
  137. package/internal/utils/env.d.mts +9 -0
  138. package/internal/utils/env.d.mts.map +1 -0
  139. package/internal/utils/env.d.ts +9 -0
  140. package/internal/utils/env.d.ts.map +1 -0
  141. package/internal/utils/env.js +22 -0
  142. package/internal/utils/env.js.map +1 -0
  143. package/internal/utils/env.mjs +18 -0
  144. package/internal/utils/env.mjs.map +1 -0
  145. package/internal/utils/log.d.mts +4 -0
  146. package/internal/utils/log.d.mts.map +1 -0
  147. package/internal/utils/log.d.ts +4 -0
  148. package/internal/utils/log.d.ts.map +1 -0
  149. package/internal/utils/log.js +47 -0
  150. package/internal/utils/log.js.map +1 -0
  151. package/internal/utils/log.mjs +43 -0
  152. package/internal/utils/log.mjs.map +1 -0
  153. package/internal/utils/sleep.d.mts +2 -0
  154. package/internal/utils/sleep.d.mts.map +1 -0
  155. package/internal/utils/sleep.d.ts +2 -0
  156. package/internal/utils/sleep.d.ts.map +1 -0
  157. package/internal/utils/sleep.js +7 -0
  158. package/internal/utils/sleep.js.map +1 -0
  159. package/internal/utils/sleep.mjs +3 -0
  160. package/internal/utils/sleep.mjs.map +1 -0
  161. package/internal/utils/uuid.d.mts +5 -0
  162. package/internal/utils/uuid.d.mts.map +1 -0
  163. package/internal/utils/uuid.d.ts +5 -0
  164. package/internal/utils/uuid.d.ts.map +1 -0
  165. package/internal/utils/uuid.js +15 -0
  166. package/internal/utils/uuid.js.map +1 -0
  167. package/internal/utils/uuid.mjs +11 -0
  168. package/internal/utils/uuid.mjs.map +1 -0
  169. package/internal/utils/values.d.mts +15 -0
  170. package/internal/utils/values.d.mts.map +1 -0
  171. package/internal/utils/values.d.ts +15 -0
  172. package/internal/utils/values.d.ts.map +1 -0
  173. package/internal/utils/values.js +100 -0
  174. package/internal/utils/values.js.map +1 -0
  175. package/internal/utils/values.mjs +84 -0
  176. package/internal/utils/values.mjs.map +1 -0
  177. package/internal/utils.d.mts +7 -0
  178. package/internal/utils.d.mts.map +1 -0
  179. package/internal/utils.d.ts +7 -0
  180. package/internal/utils.d.ts.map +1 -0
  181. package/{_shims/auto/runtime-bun.js → internal/utils.js} +8 -5
  182. package/internal/utils.js.map +1 -0
  183. package/internal/utils.mjs +8 -0
  184. package/internal/utils.mjs.map +1 -0
  185. package/package.json +83 -66
  186. package/resource.d.mts +6 -0
  187. package/resource.d.mts.map +1 -0
  188. package/resource.d.ts +2 -2
  189. package/resource.d.ts.map +1 -1
  190. package/resource.js.map +1 -1
  191. package/resource.mjs.map +1 -1
  192. package/resources/call.d.mts +1197 -0
  193. package/resources/call.d.mts.map +1 -0
  194. package/resources/call.d.ts +13 -24
  195. package/resources/call.d.ts.map +1 -1
  196. package/resources/call.js +15 -15
  197. package/resources/call.js.map +1 -1
  198. package/resources/call.mjs +15 -15
  199. package/resources/call.mjs.map +1 -1
  200. package/resources/evaluation.d.mts +1295 -0
  201. package/resources/evaluation.d.mts.map +1 -0
  202. package/resources/evaluation.d.ts +13 -26
  203. package/resources/evaluation.d.ts.map +1 -1
  204. package/resources/evaluation.js +13 -13
  205. package/resources/evaluation.js.map +1 -1
  206. package/resources/evaluation.mjs +13 -13
  207. package/resources/evaluation.mjs.map +1 -1
  208. package/resources/health.d.mts +29 -0
  209. package/resources/health.d.mts.map +1 -0
  210. package/resources/health.d.ts +3 -2
  211. package/resources/health.d.ts.map +1 -1
  212. package/resources/health.js.map +1 -1
  213. package/resources/health.mjs.map +1 -1
  214. package/resources/index.d.mts +8 -0
  215. package/resources/index.d.mts.map +1 -0
  216. package/resources/index.d.ts.map +1 -1
  217. package/resources/integrations.d.mts +81 -0
  218. package/resources/integrations.d.mts.map +1 -0
  219. package/resources/integrations.d.ts +8 -40
  220. package/resources/integrations.d.ts.map +1 -1
  221. package/resources/integrations.js +0 -25
  222. package/resources/integrations.js.map +1 -1
  223. package/resources/integrations.mjs +0 -25
  224. package/resources/integrations.mjs.map +1 -1
  225. package/resources/metric.d.mts +75 -0
  226. package/resources/metric.d.mts.map +1 -0
  227. package/resources/metric.d.ts +3 -2
  228. package/resources/metric.d.ts.map +1 -1
  229. package/resources/metric.js.map +1 -1
  230. package/resources/metric.mjs.map +1 -1
  231. package/resources/persona.d.mts +491 -0
  232. package/resources/persona.d.mts.map +1 -0
  233. package/resources/persona.d.ts +13 -51
  234. package/resources/persona.d.ts.map +1 -1
  235. package/resources/persona.js +10 -26
  236. package/resources/persona.js.map +1 -1
  237. package/resources/persona.mjs +10 -26
  238. package/resources/persona.mjs.map +1 -1
  239. package/resources/simulation.d.mts +756 -0
  240. package/resources/simulation.d.mts.map +1 -0
  241. package/resources/simulation.d.ts +11 -58
  242. package/resources/simulation.d.ts.map +1 -1
  243. package/resources/simulation.js +13 -43
  244. package/resources/simulation.js.map +1 -1
  245. package/resources/simulation.mjs +13 -43
  246. package/resources/simulation.mjs.map +1 -1
  247. package/src/api-promise.ts +92 -0
  248. package/src/client.ts +751 -0
  249. package/src/error.ts +1 -1
  250. package/src/index.ts +4 -307
  251. package/src/internal/builtin-types.ts +79 -0
  252. package/src/internal/detect-platform.ts +196 -0
  253. package/src/internal/errors.ts +22 -0
  254. package/src/internal/headers.ts +96 -0
  255. package/src/internal/parse.ts +41 -0
  256. package/src/internal/polyfill/crypto.node.d.ts +10 -0
  257. package/src/internal/polyfill/crypto.node.js +11 -0
  258. package/src/internal/polyfill/crypto.node.mjs +2 -0
  259. package/src/internal/polyfill/file.node.d.ts +9 -0
  260. package/src/internal/polyfill/file.node.js +17 -0
  261. package/src/internal/polyfill/file.node.mjs +9 -0
  262. package/src/internal/request-options.ts +67 -0
  263. package/src/internal/shim-types.d.ts +28 -0
  264. package/src/internal/shims.ts +145 -0
  265. package/src/internal/types.ts +98 -0
  266. package/src/internal/uploads.ts +307 -0
  267. package/src/internal/utils/base64.ts +37 -0
  268. package/src/internal/utils/env.ts +18 -0
  269. package/src/internal/utils/log.ts +49 -0
  270. package/src/internal/utils/sleep.ts +3 -0
  271. package/src/internal/utils/uuid.ts +13 -0
  272. package/src/internal/utils/values.ts +94 -0
  273. package/src/internal/utils.ts +8 -0
  274. package/src/resource.ts +2 -2
  275. package/src/resources/call.ts +22 -42
  276. package/src/resources/evaluation.ts +25 -42
  277. package/src/resources/health.ts +3 -2
  278. package/src/resources/integrations.ts +10 -34
  279. package/src/resources/metric.ts +3 -2
  280. package/src/resources/persona.ts +22 -61
  281. package/src/resources/simulation.ts +22 -84
  282. package/src/tsconfig.json +2 -2
  283. package/src/uploads.ts +1 -255
  284. package/src/version.ts +1 -1
  285. package/uploads.d.mts +2 -0
  286. package/uploads.d.mts.map +1 -0
  287. package/uploads.d.ts +1 -74
  288. package/uploads.d.ts.map +1 -1
  289. package/uploads.js +3 -168
  290. package/uploads.js.map +1 -1
  291. package/uploads.mjs +1 -157
  292. package/uploads.mjs.map +1 -1
  293. package/version.d.mts +2 -0
  294. package/version.d.mts.map +1 -0
  295. package/version.d.ts +1 -1
  296. package/version.js +1 -1
  297. package/version.mjs +1 -1
  298. package/_shims/MultipartBody.d.ts +0 -9
  299. package/_shims/MultipartBody.d.ts.map +0 -1
  300. package/_shims/MultipartBody.js +0 -16
  301. package/_shims/MultipartBody.js.map +0 -1
  302. package/_shims/MultipartBody.mjs +0 -12
  303. package/_shims/MultipartBody.mjs.map +0 -1
  304. package/_shims/README.md +0 -46
  305. package/_shims/auto/runtime-bun.d.ts +0 -5
  306. package/_shims/auto/runtime-bun.d.ts.map +0 -1
  307. package/_shims/auto/runtime-bun.js.map +0 -1
  308. package/_shims/auto/runtime-bun.mjs +0 -2
  309. package/_shims/auto/runtime-bun.mjs.map +0 -1
  310. package/_shims/auto/runtime-node.d.ts +0 -5
  311. package/_shims/auto/runtime-node.d.ts.map +0 -1
  312. package/_shims/auto/runtime-node.js +0 -21
  313. package/_shims/auto/runtime-node.js.map +0 -1
  314. package/_shims/auto/runtime-node.mjs +0 -2
  315. package/_shims/auto/runtime-node.mjs.map +0 -1
  316. package/_shims/auto/runtime.d.ts +0 -5
  317. package/_shims/auto/runtime.d.ts.map +0 -1
  318. package/_shims/auto/runtime.js +0 -21
  319. package/_shims/auto/runtime.js.map +0 -1
  320. package/_shims/auto/runtime.mjs +0 -2
  321. package/_shims/auto/runtime.mjs.map +0 -1
  322. package/_shims/auto/types-node.d.ts +0 -5
  323. package/_shims/auto/types-node.d.ts.map +0 -1
  324. package/_shims/auto/types-node.js +0 -21
  325. package/_shims/auto/types-node.js.map +0 -1
  326. package/_shims/auto/types-node.mjs +0 -2
  327. package/_shims/auto/types-node.mjs.map +0 -1
  328. package/_shims/auto/types.d.ts +0 -101
  329. package/_shims/auto/types.js +0 -3
  330. package/_shims/auto/types.mjs +0 -3
  331. package/_shims/bun-runtime.d.ts +0 -6
  332. package/_shims/bun-runtime.d.ts.map +0 -1
  333. package/_shims/bun-runtime.js +0 -14
  334. package/_shims/bun-runtime.js.map +0 -1
  335. package/_shims/bun-runtime.mjs +0 -10
  336. package/_shims/bun-runtime.mjs.map +0 -1
  337. package/_shims/index.d.ts +0 -83
  338. package/_shims/index.js +0 -17
  339. package/_shims/index.mjs +0 -11
  340. package/_shims/manual-types.d.ts +0 -12
  341. package/_shims/manual-types.js +0 -3
  342. package/_shims/manual-types.mjs +0 -3
  343. package/_shims/node-runtime.d.ts +0 -3
  344. package/_shims/node-runtime.d.ts.map +0 -1
  345. package/_shims/node-runtime.js +0 -89
  346. package/_shims/node-runtime.js.map +0 -1
  347. package/_shims/node-runtime.mjs +0 -56
  348. package/_shims/node-runtime.mjs.map +0 -1
  349. package/_shims/node-types.d.ts +0 -42
  350. package/_shims/node-types.js +0 -3
  351. package/_shims/node-types.mjs +0 -3
  352. package/_shims/registry.d.ts +0 -37
  353. package/_shims/registry.d.ts.map +0 -1
  354. package/_shims/registry.js +0 -41
  355. package/_shims/registry.js.map +0 -1
  356. package/_shims/registry.mjs +0 -37
  357. package/_shims/registry.mjs.map +0 -1
  358. package/_shims/web-runtime.d.ts +0 -5
  359. package/_shims/web-runtime.d.ts.map +0 -1
  360. package/_shims/web-runtime.js +0 -78
  361. package/_shims/web-runtime.js.map +0 -1
  362. package/_shims/web-runtime.mjs +0 -71
  363. package/_shims/web-runtime.mjs.map +0 -1
  364. package/_shims/web-types.d.ts +0 -83
  365. package/_shims/web-types.js +0 -3
  366. package/_shims/web-types.mjs +0 -3
  367. package/core.d.ts +0 -255
  368. package/core.d.ts.map +0 -1
  369. package/core.js +0 -929
  370. package/core.js.map +0 -1
  371. package/core.mjs +0 -897
  372. package/core.mjs.map +0 -1
  373. package/resources.d.ts +0 -2
  374. package/resources.d.ts.map +0 -1
  375. package/resources.js +0 -18
  376. package/resources.js.map +0 -1
  377. package/resources.mjs +0 -2
  378. package/resources.mjs.map +0 -1
  379. package/shims/node.d.ts +0 -30
  380. package/shims/node.d.ts.map +0 -1
  381. package/shims/node.js +0 -31
  382. package/shims/node.js.map +0 -1
  383. package/shims/node.mjs +0 -5
  384. package/shims/node.mjs.map +0 -1
  385. package/shims/web.d.ts +0 -26
  386. package/shims/web.d.ts.map +0 -1
  387. package/shims/web.js +0 -31
  388. package/shims/web.js.map +0 -1
  389. package/shims/web.mjs +0 -5
  390. package/shims/web.mjs.map +0 -1
  391. package/src/_shims/MultipartBody.ts +0 -9
  392. package/src/_shims/README.md +0 -46
  393. package/src/_shims/auto/runtime-bun.ts +0 -4
  394. package/src/_shims/auto/runtime-node.ts +0 -4
  395. package/src/_shims/auto/runtime.ts +0 -4
  396. package/src/_shims/auto/types-node.ts +0 -4
  397. package/src/_shims/auto/types.d.ts +0 -101
  398. package/src/_shims/auto/types.js +0 -3
  399. package/src/_shims/auto/types.mjs +0 -3
  400. package/src/_shims/bun-runtime.ts +0 -14
  401. package/src/_shims/index.d.ts +0 -83
  402. package/src/_shims/index.js +0 -17
  403. package/src/_shims/index.mjs +0 -11
  404. package/src/_shims/manual-types.d.ts +0 -12
  405. package/src/_shims/manual-types.js +0 -3
  406. package/src/_shims/manual-types.mjs +0 -3
  407. package/src/_shims/node-runtime.ts +0 -81
  408. package/src/_shims/node-types.d.ts +0 -42
  409. package/src/_shims/node-types.js +0 -3
  410. package/src/_shims/node-types.mjs +0 -3
  411. package/src/_shims/registry.ts +0 -67
  412. package/src/_shims/web-runtime.ts +0 -103
  413. package/src/_shims/web-types.d.ts +0 -83
  414. package/src/_shims/web-types.js +0 -3
  415. package/src/_shims/web-types.mjs +0 -3
  416. package/src/core.ts +0 -1242
  417. package/src/resources.ts +0 -1
  418. package/src/shims/node.ts +0 -50
  419. package/src/shims/web.ts +0 -50
@@ -0,0 +1,1197 @@
1
+ import { APIResource } from "../resource.mjs";
2
+ import { APIPromise } from "../api-promise.mjs";
3
+ import { RequestOptions } from "../internal/request-options.mjs";
4
+ export declare class Call extends APIResource {
5
+ /**
6
+ * Create a new call with recording, transcript, agents, and customers
7
+ */
8
+ create(body: CallCreateParams, options?: RequestOptions): APIPromise<CallCreateResponse>;
9
+ /**
10
+ * Returns a paginated list of calls for the authenticated project.
11
+ */
12
+ list(query?: CallListParams | null | undefined, options?: RequestOptions): APIPromise<CallListResponse>;
13
+ /**
14
+ * Retrieve an existing call by its unique identifier
15
+ */
16
+ getByID(callID: string, options?: RequestOptions): APIPromise<CallGetByIDResponse>;
17
+ /**
18
+ * Fetch all evaluation run results for a specific call.
19
+ */
20
+ listEvaluationRuns(callID: string, options?: RequestOptions): APIPromise<CallListEvaluationRunsResponse>;
21
+ /**
22
+ * Fetch all call-level metrics for a specific call, including both
23
+ * system-generated and custom metrics. Only returns successfully computed metrics.
24
+ */
25
+ listMetrics(callID: string, query?: CallListMetricsParams | null | undefined, options?: RequestOptions): APIPromise<CallListMetricsResponse>;
26
+ /**
27
+ * Fetch detailed sentiment analysis results for a specific call, including
28
+ * emotional tone, key phrases, and sentiment scores.
29
+ */
30
+ listSentimentRuns(callID: string, options?: RequestOptions): APIPromise<CallListSentimentRunsResponse>;
31
+ }
32
+ export interface CallCreateResponse {
33
+ /**
34
+ * Response after creating a call
35
+ */
36
+ data: CallCreateResponse.Data;
37
+ }
38
+ export declare namespace CallCreateResponse {
39
+ /**
40
+ * Response after creating a call
41
+ */
42
+ interface Data {
43
+ /**
44
+ * Unique identifier for the call
45
+ */
46
+ id: string;
47
+ agents: Array<Data.Agent> | null;
48
+ /**
49
+ * Direction of the call (inbound or outbound)
50
+ */
51
+ callDirection: 'INBOUND' | 'OUTBOUND';
52
+ createdAt: string | null;
53
+ customers: Array<Data.Customer> | null;
54
+ /**
55
+ * ID of the project this call belongs to
56
+ */
57
+ projectId: string;
58
+ /**
59
+ * Timestamp when the call started
60
+ */
61
+ startedAt: string;
62
+ status: 'RINGING' | 'IN_PROGRESS' | 'ENDED' | null;
63
+ }
64
+ namespace Data {
65
+ interface Agent {
66
+ id: string;
67
+ endpoint?: Agent.Endpoint | null;
68
+ }
69
+ namespace Agent {
70
+ interface Endpoint {
71
+ id: string;
72
+ environment: string;
73
+ phoneNumberE164?: string | null;
74
+ }
75
+ }
76
+ interface Customer {
77
+ label?: string | null;
78
+ phoneNumberE164?: string | null;
79
+ }
80
+ }
81
+ }
82
+ export interface CallListResponse {
83
+ data: Array<CallListResponse.Data>;
84
+ pagination: CallListResponse.Pagination;
85
+ }
86
+ export declare namespace CallListResponse {
87
+ /**
88
+ * Response containing call information
89
+ */
90
+ interface Data {
91
+ /**
92
+ * Unique identifier for the call
93
+ */
94
+ id: string;
95
+ /**
96
+ * Direction of the call (inbound or outbound)
97
+ */
98
+ callDirection: 'INBOUND' | 'OUTBOUND';
99
+ /**
100
+ * ID of the project this call belongs to
101
+ */
102
+ projectId: string;
103
+ /**
104
+ * Timestamp when the call started
105
+ */
106
+ startedAt: string;
107
+ /**
108
+ * Agent information
109
+ */
110
+ agents?: Array<Data.Agent> | null;
111
+ /**
112
+ * Timestamp when the call record was created
113
+ */
114
+ createdAt?: string | null;
115
+ /**
116
+ * Customer information
117
+ */
118
+ customers?: Array<Data.Customer> | null;
119
+ /**
120
+ * Duration of the call in milliseconds
121
+ */
122
+ durationMs?: number | null;
123
+ /**
124
+ * Timestamp when the call ended
125
+ */
126
+ endedAt?: string | null;
127
+ /**
128
+ * Status indicating how the call ended
129
+ */
130
+ endedStatus?: 'PARTICIPANTS_DID_NOT_SPEAK' | 'AGENT_DID_NOT_ANSWER' | 'AGENT_DID_NOT_SPEAK' | 'AGENT_STOPPED_SPEAKING' | 'AGENT_ENDED_CALL' | 'AGENT_TRANSFERRED_CALL' | 'AGENT_BUSY' | 'AGENT_ERROR' | 'CUSTOMER_ENDED_CALL' | 'VOICE_MAIL_REACHED' | 'SILENCE_TIME_OUT' | 'PHONE_CALL_PROVIDER_CONNECTION_ERROR' | 'CUSTOMER_DID_NOT_ANSWER' | 'CUSTOMER_DID_NOT_SPEAK' | 'CUSTOMER_STOPPED_SPEAKING' | 'CUSTOMER_BUSY' | 'DIAL_ERROR' | 'MAX_DURATION_REACHED' | 'UNKNOWN' | null;
131
+ /**
132
+ * Custom properties associated with the call
133
+ */
134
+ properties?: Record<string, unknown> | null;
135
+ /**
136
+ * Pre-signed URL to the call recording (expires in 1 hour)
137
+ */
138
+ recordingUrl?: string | null;
139
+ /**
140
+ * ID of the simulation job if this call was generated by a simulation
141
+ */
142
+ simulationJobId?: string | null;
143
+ /**
144
+ * Current status of the call
145
+ */
146
+ status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED' | null;
147
+ /**
148
+ * Auto-generated summary of the call conversation
149
+ */
150
+ summary?: string | null;
151
+ /**
152
+ * ID of the call that superseded this one (if applicable)
153
+ */
154
+ supersededByCallId?: string | null;
155
+ /**
156
+ * Auto-generated title for the call based on content
157
+ */
158
+ title?: string | null;
159
+ /**
160
+ * Timestamp when the call record was last updated
161
+ */
162
+ updatedAt?: string | null;
163
+ }
164
+ namespace Data {
165
+ interface Agent {
166
+ id: string;
167
+ endpoint?: Agent.Endpoint | null;
168
+ }
169
+ namespace Agent {
170
+ interface Endpoint {
171
+ id: string;
172
+ environment: string;
173
+ phoneNumberE164?: string | null;
174
+ }
175
+ }
176
+ interface Customer {
177
+ label?: string | null;
178
+ phoneNumberE164?: string | null;
179
+ }
180
+ }
181
+ interface Pagination {
182
+ /**
183
+ * Whether there are more items to fetch
184
+ */
185
+ hasMore: boolean;
186
+ /**
187
+ * Cursor for the next page of items
188
+ */
189
+ nextCursor: string | null;
190
+ /**
191
+ * Total number of items
192
+ */
193
+ total: number;
194
+ }
195
+ }
196
+ export interface CallGetByIDResponse {
197
+ /**
198
+ * Response containing call information
199
+ */
200
+ data: CallGetByIDResponse.Data;
201
+ }
202
+ export declare namespace CallGetByIDResponse {
203
+ /**
204
+ * Response containing call information
205
+ */
206
+ interface Data {
207
+ /**
208
+ * Unique identifier for the call
209
+ */
210
+ id: string;
211
+ /**
212
+ * Direction of the call (inbound or outbound)
213
+ */
214
+ callDirection: 'INBOUND' | 'OUTBOUND';
215
+ /**
216
+ * ID of the project this call belongs to
217
+ */
218
+ projectId: string;
219
+ /**
220
+ * Timestamp when the call started
221
+ */
222
+ startedAt: string;
223
+ /**
224
+ * Agent information
225
+ */
226
+ agents?: Array<Data.Agent> | null;
227
+ /**
228
+ * Timestamp when the call record was created
229
+ */
230
+ createdAt?: string | null;
231
+ /**
232
+ * Customer information
233
+ */
234
+ customers?: Array<Data.Customer> | null;
235
+ /**
236
+ * Duration of the call in milliseconds
237
+ */
238
+ durationMs?: number | null;
239
+ /**
240
+ * Timestamp when the call ended
241
+ */
242
+ endedAt?: string | null;
243
+ /**
244
+ * Status indicating how the call ended
245
+ */
246
+ endedStatus?: 'PARTICIPANTS_DID_NOT_SPEAK' | 'AGENT_DID_NOT_ANSWER' | 'AGENT_DID_NOT_SPEAK' | 'AGENT_STOPPED_SPEAKING' | 'AGENT_ENDED_CALL' | 'AGENT_TRANSFERRED_CALL' | 'AGENT_BUSY' | 'AGENT_ERROR' | 'CUSTOMER_ENDED_CALL' | 'VOICE_MAIL_REACHED' | 'SILENCE_TIME_OUT' | 'PHONE_CALL_PROVIDER_CONNECTION_ERROR' | 'CUSTOMER_DID_NOT_ANSWER' | 'CUSTOMER_DID_NOT_SPEAK' | 'CUSTOMER_STOPPED_SPEAKING' | 'CUSTOMER_BUSY' | 'DIAL_ERROR' | 'MAX_DURATION_REACHED' | 'UNKNOWN' | null;
247
+ /**
248
+ * Custom properties associated with the call
249
+ */
250
+ properties?: Record<string, unknown> | null;
251
+ /**
252
+ * Pre-signed URL to the call recording (expires in 1 hour)
253
+ */
254
+ recordingUrl?: string | null;
255
+ /**
256
+ * ID of the simulation job if this call was generated by a simulation
257
+ */
258
+ simulationJobId?: string | null;
259
+ /**
260
+ * Current status of the call
261
+ */
262
+ status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED' | null;
263
+ /**
264
+ * Auto-generated summary of the call conversation
265
+ */
266
+ summary?: string | null;
267
+ /**
268
+ * ID of the call that superseded this one (if applicable)
269
+ */
270
+ supersededByCallId?: string | null;
271
+ /**
272
+ * Auto-generated title for the call based on content
273
+ */
274
+ title?: string | null;
275
+ /**
276
+ * Timestamp when the call record was last updated
277
+ */
278
+ updatedAt?: string | null;
279
+ }
280
+ namespace Data {
281
+ interface Agent {
282
+ id: string;
283
+ endpoint?: Agent.Endpoint | null;
284
+ }
285
+ namespace Agent {
286
+ interface Endpoint {
287
+ id: string;
288
+ environment: string;
289
+ phoneNumberE164?: string | null;
290
+ }
291
+ }
292
+ interface Customer {
293
+ label?: string | null;
294
+ phoneNumberE164?: string | null;
295
+ }
296
+ }
297
+ }
298
+ export interface CallListEvaluationRunsResponse {
299
+ /**
300
+ * Evaluation run response payload
301
+ */
302
+ data: Array<CallListEvaluationRunsResponse.Data>;
303
+ }
304
+ export declare namespace CallListEvaluationRunsResponse {
305
+ interface Data {
306
+ /**
307
+ * All block runs for this evaluator, including skipped ones
308
+ */
309
+ blockRuns: Array<Data.BlockRun>;
310
+ evaluator: Data.Evaluator;
311
+ evidence: Array<Data.Evidence>;
312
+ metrics: Array<Data.Metric>;
313
+ /**
314
+ * Status of the evaluator run
315
+ */
316
+ status: 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED';
317
+ /**
318
+ * ID of the evaluator run
319
+ */
320
+ id?: string;
321
+ /**
322
+ * When the evaluator run completed
323
+ */
324
+ completedAt?: string | null;
325
+ /**
326
+ * Result of the evaluator run based on score threshold (IRRELEVANT is mapped to
327
+ * SKIPPED)
328
+ */
329
+ result?: 'SUCCESS' | 'FAILURE' | 'SKIPPED' | null;
330
+ /**
331
+ * Score of the evaluation run (0-1)
332
+ */
333
+ score?: number | null;
334
+ /**
335
+ * When the evaluator run started
336
+ */
337
+ startedAt?: string | null;
338
+ /**
339
+ * Summary of the evaluation run
340
+ */
341
+ summary?: string | null;
342
+ }
343
+ namespace Data {
344
+ interface BlockRun {
345
+ /**
346
+ * ID of the block definition
347
+ */
348
+ blockDefinitionId: string;
349
+ /**
350
+ * Name of the evaluation block
351
+ */
352
+ blockName: string;
353
+ /**
354
+ * ID of the block run instance
355
+ */
356
+ blockRunId: string;
357
+ /**
358
+ * When the block run was created
359
+ */
360
+ createdAt: string;
361
+ /**
362
+ * Reason for the outcome (pass/fail explanation or skip reason)
363
+ */
364
+ reason: string | null;
365
+ /**
366
+ * Result of the block run
367
+ */
368
+ result: 'PASSED' | 'FAILED' | 'SKIPPED' | null;
369
+ /**
370
+ * Score of the block run (0-1)
371
+ */
372
+ score: number | null;
373
+ /**
374
+ * Status of the block run
375
+ */
376
+ status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
377
+ }
378
+ interface Evaluator {
379
+ /**
380
+ * ID of the evaluator
381
+ */
382
+ id: string;
383
+ /**
384
+ * Name of the evaluator
385
+ */
386
+ name: string;
387
+ /**
388
+ * Weight of the evaluator
389
+ */
390
+ weight?: number;
391
+ }
392
+ interface Evidence {
393
+ /**
394
+ * Comment text of the evidence
395
+ */
396
+ commentText: string | null;
397
+ /**
398
+ * Created at of the evidence
399
+ */
400
+ createdAt: string;
401
+ /**
402
+ * Is positive of the evidence
403
+ */
404
+ isPositive: boolean;
405
+ /**
406
+ * Snippet text of the evidence
407
+ */
408
+ snippetText: string;
409
+ }
410
+ interface Metric {
411
+ /**
412
+ * Boolean value of the metric
413
+ */
414
+ booleanValue: boolean | null;
415
+ /**
416
+ * Confidence level of the metric (0-1)
417
+ */
418
+ confidence: number | null;
419
+ /**
420
+ * Created at of the metric
421
+ */
422
+ createdAt: string;
423
+ /**
424
+ * Name of the metric
425
+ */
426
+ name: string;
427
+ /**
428
+ * Numeric value of the metric
429
+ */
430
+ numericValue: number | null;
431
+ /**
432
+ * Reasoning of the metric
433
+ */
434
+ reasoning: string | null;
435
+ /**
436
+ * Role of the metric
437
+ */
438
+ role: string;
439
+ /**
440
+ * Text value of the metric
441
+ */
442
+ textValue: string | null;
443
+ /**
444
+ * Value type of the metric
445
+ */
446
+ valueType: string;
447
+ }
448
+ }
449
+ }
450
+ export interface CallListMetricsResponse {
451
+ /**
452
+ * Call metrics response payload grouped by metric definition
453
+ */
454
+ data: Array<CallListMetricsResponse.Data>;
455
+ }
456
+ export declare namespace CallListMetricsResponse {
457
+ /**
458
+ * Call metric data grouped by metric definition
459
+ */
460
+ interface Data {
461
+ /**
462
+ * Description of what the metric measures
463
+ */
464
+ description: string;
465
+ /**
466
+ * Unique identifier for the metric definition
467
+ */
468
+ metricDefinitionId: string;
469
+ /**
470
+ * Stable metric identifier
471
+ */
472
+ metricId: string;
473
+ /**
474
+ * Name of the metric
475
+ */
476
+ name: string;
477
+ /**
478
+ * Whether metric is global or per-participant
479
+ */
480
+ scope: 'GLOBAL' | 'PER_PARTICIPANT';
481
+ /**
482
+ * Type of value this metric produces
483
+ */
484
+ type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET';
485
+ /**
486
+ * Array of metric values (multiple for PER_PARTICIPANT metrics, or multiple
487
+ * segments/turns)
488
+ */
489
+ values: Array<Data.Value>;
490
+ /**
491
+ * Unit information if applicable
492
+ */
493
+ unit?: Data.Unit;
494
+ }
495
+ namespace Data {
496
+ interface Value {
497
+ /**
498
+ * ISO 8601 timestamp when the metric was computed
499
+ */
500
+ computedAt: string;
501
+ /**
502
+ * Confidence score (0-1) for the computed value. Defaults to 1.0 for deterministic
503
+ * metrics.
504
+ */
505
+ confidence: number;
506
+ /**
507
+ * Context level: CALL (entire call), SEGMENT (single segment), SEGMENT_RANGE
508
+ * (between/across segments)
509
+ */
510
+ context: 'CALL' | 'SEGMENT' | 'SEGMENT_RANGE';
511
+ /**
512
+ * The metric value (type depends on outputType)
513
+ */
514
+ value: number | boolean | string;
515
+ /**
516
+ * Starting segment information (for SEGMENT_RANGE context metrics)
517
+ */
518
+ fromSegment?: Value.FromSegment;
519
+ /**
520
+ * Role of participant (only for PER_PARTICIPANT metrics)
521
+ */
522
+ participantRole?: 'agent' | 'customer';
523
+ /**
524
+ * Segment information (for SEGMENT context metrics)
525
+ */
526
+ segment?: Value.Segment;
527
+ /**
528
+ * Ending segment information (for SEGMENT_RANGE context metrics)
529
+ */
530
+ toSegment?: Value.ToSegment;
531
+ /**
532
+ * Explanation for the metric value (especially useful for AI-computed metrics)
533
+ */
534
+ valueReasoning?: string;
535
+ }
536
+ namespace Value {
537
+ /**
538
+ * Starting segment information (for SEGMENT_RANGE context metrics)
539
+ */
540
+ interface FromSegment {
541
+ /**
542
+ * Starting segment ID
543
+ */
544
+ id: string;
545
+ /**
546
+ * End time offset in milliseconds
547
+ */
548
+ endOffsetMs: number;
549
+ /**
550
+ * Start time offset in milliseconds
551
+ */
552
+ startOffsetMs: number;
553
+ /**
554
+ * Starting segment text content
555
+ */
556
+ text: string;
557
+ }
558
+ /**
559
+ * Segment information (for SEGMENT context metrics)
560
+ */
561
+ interface Segment {
562
+ /**
563
+ * Segment ID
564
+ */
565
+ id: string;
566
+ /**
567
+ * End time offset in milliseconds
568
+ */
569
+ endOffsetMs: number;
570
+ /**
571
+ * Start time offset in milliseconds
572
+ */
573
+ startOffsetMs: number;
574
+ /**
575
+ * Segment text content
576
+ */
577
+ text: string;
578
+ }
579
+ /**
580
+ * Ending segment information (for SEGMENT_RANGE context metrics)
581
+ */
582
+ interface ToSegment {
583
+ /**
584
+ * Ending segment ID
585
+ */
586
+ id: string;
587
+ /**
588
+ * End time offset in milliseconds
589
+ */
590
+ endOffsetMs: number;
591
+ /**
592
+ * Start time offset in milliseconds
593
+ */
594
+ startOffsetMs: number;
595
+ /**
596
+ * Ending segment text content
597
+ */
598
+ text: string;
599
+ }
600
+ }
601
+ /**
602
+ * Unit information if applicable
603
+ */
604
+ interface Unit {
605
+ /**
606
+ * Name of the unit
607
+ */
608
+ name: string;
609
+ /**
610
+ * Symbol for the unit
611
+ */
612
+ symbol: string | null;
613
+ }
614
+ }
615
+ }
616
+ export interface CallListSentimentRunsResponse {
617
+ /**
618
+ * Sentiment run response payload
619
+ */
620
+ data: CallListSentimentRunsResponse.Data;
621
+ }
622
+ export declare namespace CallListSentimentRunsResponse {
623
+ /**
624
+ * Sentiment run response payload
625
+ */
626
+ interface Data {
627
+ /**
628
+ * Status of the sentiment run
629
+ */
630
+ status: string;
631
+ /**
632
+ * NEUTRAL / NEGATIVE / POSITIVE
633
+ */
634
+ averageCategoricalSentiment?: string;
635
+ /**
636
+ * Average sentiment score between 0-1 of the call
637
+ */
638
+ averageSentiment?: number;
639
+ /**
640
+ * Common emotion of the call
641
+ */
642
+ commonEmotion?: string;
643
+ }
644
+ }
645
+ export interface CallCreateParams {
646
+ /**
647
+ * Direction of the call (INBOUND or OUTBOUND)
648
+ */
649
+ callDirection: 'INBOUND' | 'OUTBOUND';
650
+ /**
651
+ * Interface type of the call (PHONE or WEB)
652
+ */
653
+ interfaceType: 'PHONE' | 'WEB';
654
+ /**
655
+ * URL of source recording (must be an accessible WAV, MP3, or MP4 file). Can be a
656
+ * signed URL.
657
+ */
658
+ recordingUrl: string;
659
+ /**
660
+ * When the call started (ISO 8601 format)
661
+ */
662
+ startedAt: string;
663
+ /**
664
+ * Single agent participating in the call. Use this for simpler API when you have
665
+ * only one agent.
666
+ */
667
+ agent?: CallCreateParams.AgentIdentificationByRoarkID | CallCreateParams.AgentIdentificationByName | CallCreateParams.AgentIdentificationByCustomID;
668
+ /**
669
+ * Agents participating in the call. Each agent requires identification and prompt
670
+ * information.
671
+ */
672
+ agents?: Array<CallCreateParams.AgentIdentificationByRoarkID | CallCreateParams.AgentIdentificationByName | CallCreateParams.AgentIdentificationByCustomID>;
673
+ /**
674
+ * Single customer participating in the call. Use this for simpler API when you
675
+ * have only one customer.
676
+ */
677
+ customer?: CallCreateParams.Customer;
678
+ /**
679
+ * Customers participating in the call.
680
+ */
681
+ customers?: Array<CallCreateParams.Customer>;
682
+ /**
683
+ * High-level call end status, indicating how the call terminated
684
+ */
685
+ endedStatus?: 'PARTICIPANTS_DID_NOT_SPEAK' | 'AGENT_DID_NOT_ANSWER' | 'AGENT_DID_NOT_SPEAK' | 'AGENT_STOPPED_SPEAKING' | 'AGENT_ENDED_CALL' | 'AGENT_TRANSFERRED_CALL' | 'AGENT_BUSY' | 'AGENT_ERROR' | 'CUSTOMER_ENDED_CALL' | 'VOICE_MAIL_REACHED' | 'SILENCE_TIME_OUT' | 'PHONE_CALL_PROVIDER_CONNECTION_ERROR' | 'CUSTOMER_DID_NOT_ANSWER' | 'CUSTOMER_DID_NOT_SPEAK' | 'CUSTOMER_STOPPED_SPEAKING' | 'CUSTOMER_BUSY' | 'DIAL_ERROR' | 'MAX_DURATION_REACHED' | 'UNKNOWN';
686
+ /**
687
+ * Custom properties to include with the call. These can be used for filtering and
688
+ * will show in the call details page
689
+ */
690
+ properties?: Record<string, unknown>;
691
+ /**
692
+ * URL of source stereo recording. Must be accessible. Can be a signed URL.
693
+ * Supported formats: WAV, MP3, MP4.
694
+ */
695
+ stereoRecordingUrl?: string;
696
+ /**
697
+ * List of tool invocations made during the call
698
+ */
699
+ toolInvocations?: Array<CallCreateParams.ToolInvocation>;
700
+ /**
701
+ * List of transcript entries made during the call
702
+ */
703
+ transcript?: Array<CallCreateParams.TranscriptEntryAgent | CallCreateParams.TranscriptEntryCustomer>;
704
+ }
705
+ export declare namespace CallCreateParams {
706
+ interface AgentIdentificationByRoarkID {
707
+ /**
708
+ * Existing Roark agent ID
709
+ */
710
+ roarkId: string;
711
+ /**
712
+ * Endpoint configuration for this agent (optional)
713
+ */
714
+ endpoint?: AgentIdentificationByRoarkID.AgentEndpointByID | AgentIdentificationByRoarkID.AgentEndpointByValue;
715
+ /**
716
+ * Agent's prompt configuration (optional)
717
+ */
718
+ prompt?: AgentIdentificationByRoarkID.Prompt;
719
+ }
720
+ namespace AgentIdentificationByRoarkID {
721
+ interface AgentEndpointByID {
722
+ /**
723
+ * Existing Roark endpoint ID
724
+ */
725
+ id: string;
726
+ }
727
+ /**
728
+ * Lookup or create endpoint if one with these values does not exist
729
+ */
730
+ interface AgentEndpointByValue {
731
+ /**
732
+ * Type of endpoint (phone or websocket)
733
+ */
734
+ type: string;
735
+ /**
736
+ * Endpoint value (phone number in E.164 format or websocket URL)
737
+ */
738
+ value: string;
739
+ /**
740
+ * Call direction for this endpoint
741
+ */
742
+ direction?: string;
743
+ }
744
+ /**
745
+ * Agent's prompt configuration (optional)
746
+ */
747
+ interface Prompt {
748
+ /**
749
+ * The agent's system prompt used during this call
750
+ */
751
+ resolvedPrompt: string;
752
+ }
753
+ }
754
+ /**
755
+ * Create a new agent or find existing by customId if provided
756
+ */
757
+ interface AgentIdentificationByName {
758
+ /**
759
+ * Agent name
760
+ */
761
+ name: string;
762
+ /**
763
+ * Agent custom ID
764
+ */
765
+ customId?: string;
766
+ /**
767
+ * Agent description
768
+ */
769
+ description?: string;
770
+ /**
771
+ * Endpoint configuration for this agent (optional)
772
+ */
773
+ endpoint?: AgentIdentificationByName.AgentEndpointByID | AgentIdentificationByName.AgentEndpointByValue;
774
+ /**
775
+ * Agent's prompt configuration (optional)
776
+ */
777
+ prompt?: AgentIdentificationByName.Prompt;
778
+ }
779
+ namespace AgentIdentificationByName {
780
+ interface AgentEndpointByID {
781
+ /**
782
+ * Existing Roark endpoint ID
783
+ */
784
+ id: string;
785
+ }
786
+ /**
787
+ * Lookup or create endpoint if one with these values does not exist
788
+ */
789
+ interface AgentEndpointByValue {
790
+ /**
791
+ * Type of endpoint (phone or websocket)
792
+ */
793
+ type: string;
794
+ /**
795
+ * Endpoint value (phone number in E.164 format or websocket URL)
796
+ */
797
+ value: string;
798
+ /**
799
+ * Call direction for this endpoint
800
+ */
801
+ direction?: string;
802
+ }
803
+ /**
804
+ * Agent's prompt configuration (optional)
805
+ */
806
+ interface Prompt {
807
+ /**
808
+ * The agent's system prompt used during this call
809
+ */
810
+ resolvedPrompt: string;
811
+ }
812
+ }
813
+ interface AgentIdentificationByCustomID {
814
+ /**
815
+ * Existing custom ID for a Roark agent
816
+ */
817
+ customId: string;
818
+ /**
819
+ * Endpoint configuration for this agent (optional)
820
+ */
821
+ endpoint?: AgentIdentificationByCustomID.AgentEndpointByID | AgentIdentificationByCustomID.AgentEndpointByValue;
822
+ /**
823
+ * Agent's prompt configuration (optional)
824
+ */
825
+ prompt?: AgentIdentificationByCustomID.Prompt;
826
+ }
827
+ namespace AgentIdentificationByCustomID {
828
+ interface AgentEndpointByID {
829
+ /**
830
+ * Existing Roark endpoint ID
831
+ */
832
+ id: string;
833
+ }
834
+ /**
835
+ * Lookup or create endpoint if one with these values does not exist
836
+ */
837
+ interface AgentEndpointByValue {
838
+ /**
839
+ * Type of endpoint (phone or websocket)
840
+ */
841
+ type: string;
842
+ /**
843
+ * Endpoint value (phone number in E.164 format or websocket URL)
844
+ */
845
+ value: string;
846
+ /**
847
+ * Call direction for this endpoint
848
+ */
849
+ direction?: string;
850
+ }
851
+ /**
852
+ * Agent's prompt configuration (optional)
853
+ */
854
+ interface Prompt {
855
+ /**
856
+ * The agent's system prompt used during this call
857
+ */
858
+ resolvedPrompt: string;
859
+ }
860
+ }
861
+ interface AgentIdentificationByRoarkID {
862
+ /**
863
+ * Existing Roark agent ID
864
+ */
865
+ roarkId: string;
866
+ /**
867
+ * Endpoint configuration for this agent (optional)
868
+ */
869
+ endpoint?: AgentIdentificationByRoarkID.AgentEndpointByID | AgentIdentificationByRoarkID.AgentEndpointByValue;
870
+ /**
871
+ * Agent's prompt configuration (optional)
872
+ */
873
+ prompt?: AgentIdentificationByRoarkID.Prompt;
874
+ }
875
+ namespace AgentIdentificationByRoarkID {
876
+ interface AgentEndpointByID {
877
+ /**
878
+ * Existing Roark endpoint ID
879
+ */
880
+ id: string;
881
+ }
882
+ /**
883
+ * Lookup or create endpoint if one with these values does not exist
884
+ */
885
+ interface AgentEndpointByValue {
886
+ /**
887
+ * Type of endpoint (phone or websocket)
888
+ */
889
+ type: string;
890
+ /**
891
+ * Endpoint value (phone number in E.164 format or websocket URL)
892
+ */
893
+ value: string;
894
+ /**
895
+ * Call direction for this endpoint
896
+ */
897
+ direction?: string;
898
+ }
899
+ /**
900
+ * Agent's prompt configuration (optional)
901
+ */
902
+ interface Prompt {
903
+ /**
904
+ * The agent's system prompt used during this call
905
+ */
906
+ resolvedPrompt: string;
907
+ }
908
+ }
909
+ /**
910
+ * Create a new agent or find existing by customId if provided
911
+ */
912
+ interface AgentIdentificationByName {
913
+ /**
914
+ * Agent name
915
+ */
916
+ name: string;
917
+ /**
918
+ * Agent custom ID
919
+ */
920
+ customId?: string;
921
+ /**
922
+ * Agent description
923
+ */
924
+ description?: string;
925
+ /**
926
+ * Endpoint configuration for this agent (optional)
927
+ */
928
+ endpoint?: AgentIdentificationByName.AgentEndpointByID | AgentIdentificationByName.AgentEndpointByValue;
929
+ /**
930
+ * Agent's prompt configuration (optional)
931
+ */
932
+ prompt?: AgentIdentificationByName.Prompt;
933
+ }
934
+ namespace AgentIdentificationByName {
935
+ interface AgentEndpointByID {
936
+ /**
937
+ * Existing Roark endpoint ID
938
+ */
939
+ id: string;
940
+ }
941
+ /**
942
+ * Lookup or create endpoint if one with these values does not exist
943
+ */
944
+ interface AgentEndpointByValue {
945
+ /**
946
+ * Type of endpoint (phone or websocket)
947
+ */
948
+ type: string;
949
+ /**
950
+ * Endpoint value (phone number in E.164 format or websocket URL)
951
+ */
952
+ value: string;
953
+ /**
954
+ * Call direction for this endpoint
955
+ */
956
+ direction?: string;
957
+ }
958
+ /**
959
+ * Agent's prompt configuration (optional)
960
+ */
961
+ interface Prompt {
962
+ /**
963
+ * The agent's system prompt used during this call
964
+ */
965
+ resolvedPrompt: string;
966
+ }
967
+ }
968
+ interface AgentIdentificationByCustomID {
969
+ /**
970
+ * Existing custom ID for a Roark agent
971
+ */
972
+ customId: string;
973
+ /**
974
+ * Endpoint configuration for this agent (optional)
975
+ */
976
+ endpoint?: AgentIdentificationByCustomID.AgentEndpointByID | AgentIdentificationByCustomID.AgentEndpointByValue;
977
+ /**
978
+ * Agent's prompt configuration (optional)
979
+ */
980
+ prompt?: AgentIdentificationByCustomID.Prompt;
981
+ }
982
+ namespace AgentIdentificationByCustomID {
983
+ interface AgentEndpointByID {
984
+ /**
985
+ * Existing Roark endpoint ID
986
+ */
987
+ id: string;
988
+ }
989
+ /**
990
+ * Lookup or create endpoint if one with these values does not exist
991
+ */
992
+ interface AgentEndpointByValue {
993
+ /**
994
+ * Type of endpoint (phone or websocket)
995
+ */
996
+ type: string;
997
+ /**
998
+ * Endpoint value (phone number in E.164 format or websocket URL)
999
+ */
1000
+ value: string;
1001
+ /**
1002
+ * Call direction for this endpoint
1003
+ */
1004
+ direction?: string;
1005
+ }
1006
+ /**
1007
+ * Agent's prompt configuration (optional)
1008
+ */
1009
+ interface Prompt {
1010
+ /**
1011
+ * The agent's system prompt used during this call
1012
+ */
1013
+ resolvedPrompt: string;
1014
+ }
1015
+ }
1016
+ /**
1017
+ * Single customer participating in the call. Use this for simpler API when you
1018
+ * have only one customer.
1019
+ */
1020
+ interface Customer {
1021
+ /**
1022
+ * Customer phone number in E.164 format (e.g., +14155551234)
1023
+ */
1024
+ phoneNumberE164: string | null;
1025
+ /**
1026
+ * Label to identify this customer in the transcript (e.g., "speaker-01",
1027
+ * "speaker-02")
1028
+ */
1029
+ label?: string | null;
1030
+ }
1031
+ /**
1032
+ * Customer participating in the call
1033
+ */
1034
+ interface Customer {
1035
+ /**
1036
+ * Customer phone number in E.164 format (e.g., +14155551234)
1037
+ */
1038
+ phoneNumberE164: string | null;
1039
+ /**
1040
+ * Label to identify this customer in the transcript (e.g., "speaker-01",
1041
+ * "speaker-02")
1042
+ */
1043
+ label?: string | null;
1044
+ }
1045
+ interface ToolInvocation {
1046
+ /**
1047
+ * Name of the tool that was invoked
1048
+ */
1049
+ name: string;
1050
+ /**
1051
+ * Parameters provided to the tool during invocation
1052
+ */
1053
+ parameters: Record<string, ToolInvocation.UnionMember0 | unknown>;
1054
+ /**
1055
+ * Result returned by the tool after execution. Can be a string or a JSON object
1056
+ */
1057
+ result: string | Record<string, unknown>;
1058
+ /**
1059
+ * Offset in milliseconds from the start of the call when the tool was invoked
1060
+ */
1061
+ startOffsetMs: number;
1062
+ /**
1063
+ * Metadata about the agent that invoked this tool - used to match which agent from
1064
+ * the agents array this tool invocation belongs to
1065
+ */
1066
+ agent?: ToolInvocation.Agent;
1067
+ /**
1068
+ * Description of when the tool should be invoked
1069
+ */
1070
+ description?: string;
1071
+ /**
1072
+ * Offset in milliseconds from the start of the call when the tool execution
1073
+ * completed. Used to calculate duration of the tool execution
1074
+ */
1075
+ endOffsetMs?: number;
1076
+ }
1077
+ namespace ToolInvocation {
1078
+ interface UnionMember0 {
1079
+ description?: string;
1080
+ type?: 'string' | 'number' | 'boolean';
1081
+ value?: unknown;
1082
+ }
1083
+ /**
1084
+ * Metadata about the agent that invoked this tool - used to match which agent from
1085
+ * the agents array this tool invocation belongs to
1086
+ */
1087
+ interface Agent {
1088
+ /**
1089
+ * The custom ID set on the agent
1090
+ */
1091
+ customId?: string;
1092
+ /**
1093
+ * The Roark ID of the agent
1094
+ */
1095
+ roarkId?: string;
1096
+ }
1097
+ }
1098
+ interface TranscriptEntryAgent {
1099
+ endOffsetMs: number;
1100
+ role: 'AGENT';
1101
+ startOffsetMs: number;
1102
+ text: string;
1103
+ /**
1104
+ * Metadata about the agent that spoke this turn - used to match which agent from
1105
+ * the `agents` array this transcript entry belongs to
1106
+ */
1107
+ agent?: TranscriptEntryAgent.Agent;
1108
+ languageCode?: string;
1109
+ }
1110
+ namespace TranscriptEntryAgent {
1111
+ /**
1112
+ * Metadata about the agent that spoke this turn - used to match which agent from
1113
+ * the `agents` array this transcript entry belongs to
1114
+ */
1115
+ interface Agent {
1116
+ /**
1117
+ * The custom ID set on the agent
1118
+ */
1119
+ customId?: string;
1120
+ /**
1121
+ * The Roark ID of the agent
1122
+ */
1123
+ roarkId?: string;
1124
+ }
1125
+ }
1126
+ interface TranscriptEntryCustomer {
1127
+ endOffsetMs: number;
1128
+ role: 'CUSTOMER';
1129
+ startOffsetMs: number;
1130
+ text: string;
1131
+ /**
1132
+ * Metadata about the customer that spoke this turn - used to match which customer
1133
+ * from the `customers` array this transcript entry belongs to
1134
+ */
1135
+ customer?: TranscriptEntryCustomer.Customer;
1136
+ languageCode?: string;
1137
+ }
1138
+ namespace TranscriptEntryCustomer {
1139
+ /**
1140
+ * Metadata about the customer that spoke this turn - used to match which customer
1141
+ * from the `customers` array this transcript entry belongs to
1142
+ */
1143
+ interface Customer {
1144
+ /**
1145
+ * Label matching the `label` field on the `customers` array when creating the call
1146
+ */
1147
+ label?: string;
1148
+ /**
1149
+ * The phone number of the customer in E.164 format, matching the `phoneNumberE164`
1150
+ * field on the `customers` array when creating the call
1151
+ */
1152
+ phoneNumberE164?: string;
1153
+ }
1154
+ }
1155
+ }
1156
+ export interface CallListParams {
1157
+ /**
1158
+ * Cursor for pagination - use the nextCursor value from a previous response
1159
+ */
1160
+ after?: string;
1161
+ /**
1162
+ * Maximum number of calls to return (default: 20, max: 100)
1163
+ */
1164
+ limit?: number;
1165
+ /**
1166
+ * Search text to filter calls by title, summary, or transcript
1167
+ */
1168
+ searchText?: string;
1169
+ /**
1170
+ * Filter by simulation run plan job ID to get all calls from a specific simulation
1171
+ * batch
1172
+ */
1173
+ simulationRunPlanJobId?: string;
1174
+ /**
1175
+ * Field to sort by (default: createdAt)
1176
+ */
1177
+ sortBy?: 'createdAt' | 'startedAt' | 'endedAt' | 'duration' | 'title' | 'status';
1178
+ /**
1179
+ * Sort direction (default: desc)
1180
+ */
1181
+ sortDirection?: 'asc' | 'desc';
1182
+ /**
1183
+ * Filter by call status
1184
+ */
1185
+ status?: 'RINGING' | 'IN_PROGRESS' | 'ENDED';
1186
+ }
1187
+ export interface CallListMetricsParams {
1188
+ /**
1189
+ * Whether to return a flat list instead of grouped by metric definition (default:
1190
+ * false)
1191
+ */
1192
+ flatten?: string;
1193
+ }
1194
+ export declare namespace Call {
1195
+ export { type CallCreateResponse as CallCreateResponse, type CallListResponse as CallListResponse, type CallGetByIDResponse as CallGetByIDResponse, type CallListEvaluationRunsResponse as CallListEvaluationRunsResponse, type CallListMetricsResponse as CallListMetricsResponse, type CallListSentimentRunsResponse as CallListSentimentRunsResponse, type CallCreateParams as CallCreateParams, type CallListParams as CallListParams, type CallListMetricsParams as CallListMetricsParams, };
1196
+ }
1197
+ //# sourceMappingURL=call.d.mts.map