@roarkanalytics/sdk 2.21.0 → 2.21.2

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