@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
@@ -1,8 +1,8 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../resource';
4
- import { isRequestOptions } from '../core';
5
- import * as Core from '../core';
4
+ import { APIPromise } from '../api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
6
 
7
7
  export class Evaluation extends APIResource {
8
8
  /**
@@ -10,26 +10,26 @@ export class Evaluation extends APIResource {
10
10
  */
11
11
  createJob(
12
12
  body: EvaluationCreateJobParams,
13
- options?: Core.RequestOptions,
14
- ): Core.APIPromise<EvaluationCreateJobResponse> {
13
+ options?: RequestOptions,
14
+ ): APIPromise<EvaluationCreateJobResponse> {
15
15
  return this._client.post('/v1/evaluation/job', { body, ...options });
16
16
  }
17
17
 
18
18
  /**
19
19
  * Returns a specific evaluator with its blocks and configuration.
20
20
  */
21
- getEvaluatorById(
22
- evaluatorId: string,
23
- options?: Core.RequestOptions,
24
- ): Core.APIPromise<EvaluationGetEvaluatorByIDResponse> {
25
- return this._client.get(`/v1/evaluation/evaluators/${evaluatorId}`, options);
21
+ getEvaluatorByID(
22
+ evaluatorID: string,
23
+ options?: RequestOptions,
24
+ ): APIPromise<EvaluationGetEvaluatorByIDResponse> {
25
+ return this._client.get(`/v1/evaluation/evaluators/${evaluatorID}`, options);
26
26
  }
27
27
 
28
28
  /**
29
29
  * Retrieve details of a specific evaluation job
30
30
  */
31
- getJob(jobId: string, options?: Core.RequestOptions): Core.APIPromise<EvaluationGetJobResponse> {
32
- return this._client.get(`/v1/evaluation/job/${jobId}`, options);
31
+ getJob(jobID: string, options?: RequestOptions): APIPromise<EvaluationGetJobResponse> {
32
+ return this._client.get(`/v1/evaluation/job/${jobID}`, options);
33
33
  }
34
34
 
35
35
  /**
@@ -37,17 +37,9 @@ export class Evaluation extends APIResource {
37
37
  * authenticated project.
38
38
  */
39
39
  listEvaluators(
40
- query?: EvaluationListEvaluatorsParams,
41
- options?: Core.RequestOptions,
42
- ): Core.APIPromise<EvaluationListEvaluatorsResponse>;
43
- listEvaluators(options?: Core.RequestOptions): Core.APIPromise<EvaluationListEvaluatorsResponse>;
44
- listEvaluators(
45
- query: EvaluationListEvaluatorsParams | Core.RequestOptions = {},
46
- options?: Core.RequestOptions,
47
- ): Core.APIPromise<EvaluationListEvaluatorsResponse> {
48
- if (isRequestOptions(query)) {
49
- return this.listEvaluators({}, query);
50
- }
40
+ query: EvaluationListEvaluatorsParams | null | undefined = {},
41
+ options?: RequestOptions,
42
+ ): APIPromise<EvaluationListEvaluatorsResponse> {
51
43
  return this._client.get('/v1/evaluation/evaluators', { query, ...options });
52
44
  }
53
45
 
@@ -55,20 +47,11 @@ export class Evaluation extends APIResource {
55
47
  * Retrieve paginated details of a specific evaluation job runs
56
48
  */
57
49
  listJobRuns(
58
- jobId: string,
59
- query?: EvaluationListJobRunsParams,
60
- options?: Core.RequestOptions,
61
- ): Core.APIPromise<EvaluationListJobRunsResponse>;
62
- listJobRuns(jobId: string, options?: Core.RequestOptions): Core.APIPromise<EvaluationListJobRunsResponse>;
63
- listJobRuns(
64
- jobId: string,
65
- query: EvaluationListJobRunsParams | Core.RequestOptions = {},
66
- options?: Core.RequestOptions,
67
- ): Core.APIPromise<EvaluationListJobRunsResponse> {
68
- if (isRequestOptions(query)) {
69
- return this.listJobRuns(jobId, {}, query);
70
- }
71
- return this._client.get(`/v1/evaluation/job/${jobId}/runs`, { query, ...options });
50
+ jobID: string,
51
+ query: EvaluationListJobRunsParams | null | undefined = {},
52
+ options?: RequestOptions,
53
+ ): APIPromise<EvaluationListJobRunsResponse> {
54
+ return this._client.get(`/v1/evaluation/job/${jobID}/runs`, { query, ...options });
72
55
  }
73
56
  }
74
57
 
@@ -1416,7 +1399,7 @@ export namespace EvaluationCreateJobParams {
1416
1399
  * Custom properties to include with the call. These can be used for filtering and
1417
1400
  * will show in the call details page
1418
1401
  */
1419
- properties?: { [key: string]: unknown };
1402
+ properties?: Record<string, unknown>;
1420
1403
 
1421
1404
  /**
1422
1405
  * Retell call ID if call is being imported from Retell
@@ -1464,12 +1447,12 @@ export namespace EvaluationCreateJobParams {
1464
1447
  /**
1465
1448
  * Parameters provided to the tool during invocation
1466
1449
  */
1467
- parameters: { [key: string]: ToolInvocation.UnionMember0 | unknown };
1450
+ parameters: Record<string, ToolInvocation.UnionMember0 | unknown>;
1468
1451
 
1469
1452
  /**
1470
1453
  * Result returned by the tool after execution. Can be a string or a JSON object
1471
1454
  */
1472
- result: string | { [key: string]: unknown };
1455
+ result: string | Record<string, unknown>;
1473
1456
 
1474
1457
  /**
1475
1458
  * Offset in milliseconds from the start of the call when the tool was invoked
@@ -1577,7 +1560,7 @@ export namespace EvaluationCreateJobParams {
1577
1560
  * Custom properties to include with the call. These can be used for filtering and
1578
1561
  * will show in the call details page
1579
1562
  */
1580
- properties?: { [key: string]: unknown };
1563
+ properties?: Record<string, unknown>;
1581
1564
 
1582
1565
  /**
1583
1566
  * Retell call ID if call is being imported from Retell
@@ -1625,12 +1608,12 @@ export namespace EvaluationCreateJobParams {
1625
1608
  /**
1626
1609
  * Parameters provided to the tool during invocation
1627
1610
  */
1628
- parameters: { [key: string]: ToolInvocation.UnionMember0 | unknown };
1611
+ parameters: Record<string, ToolInvocation.UnionMember0 | unknown>;
1629
1612
 
1630
1613
  /**
1631
1614
  * Result returned by the tool after execution. Can be a string or a JSON object
1632
1615
  */
1633
- result: string | { [key: string]: unknown };
1616
+ result: string | Record<string, unknown>;
1634
1617
 
1635
1618
  /**
1636
1619
  * Offset in milliseconds from the start of the call when the tool was invoked
@@ -1,13 +1,14 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../resource';
4
- import * as Core from '../core';
4
+ import { APIPromise } from '../api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
5
6
 
6
7
  export class Health extends APIResource {
7
8
  /**
8
9
  * Returns the health status of the API and its dependencies
9
10
  */
10
- get(options?: Core.RequestOptions): Core.APIPromise<HealthGetResponse> {
11
+ get(options?: RequestOptions): APIPromise<HealthGetResponse> {
11
12
  return this._client.get('/health', options);
12
13
  }
13
14
  }
@@ -1,51 +1,27 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../resource';
4
- import * as Core from '../core';
4
+ import { APIPromise } from '../api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
5
6
 
6
7
  export class Integrations extends APIResource {
7
8
  /**
8
9
  * Process and upload a Retell call to Roark evaluation
9
- *
10
- * @example
11
- * ```ts
12
- * const response = await client.integrations.createRetellCall(
13
- * { retellCallEndedPayload: { event: 'bar', call: 'bar' } },
14
- * );
15
- * ```
16
10
  */
17
11
  createRetellCall(
18
12
  body: IntegrationCreateRetellCallParams,
19
- options?: Core.RequestOptions,
20
- ): Core.APIPromise<IntegrationCreateRetellCallResponse> {
13
+ options?: RequestOptions,
14
+ ): APIPromise<IntegrationCreateRetellCallResponse> {
21
15
  return this._client.post('/v1/retell/call', { body, ...options });
22
16
  }
23
17
 
24
18
  /**
25
19
  * Process and upload a VAPI call to Roark evaluation
26
- *
27
- * @example
28
- * ```ts
29
- * const response = await client.integrations.createVapiCall({
30
- * vapiEndOfCallReportPayload: {
31
- * call: 'bar',
32
- * type: 'bar',
33
- * status: 'bar',
34
- * assistant: 'bar',
35
- * customer: 'bar',
36
- * phoneNumber: 'bar',
37
- * artifact: 'bar',
38
- * startedAt: 'bar',
39
- * endedAt: 'bar',
40
- * endedReason: 'bar',
41
- * },
42
- * });
43
- * ```
44
20
  */
45
21
  createVapiCall(
46
22
  body: IntegrationCreateVapiCallParams,
47
- options?: Core.RequestOptions,
48
- ): Core.APIPromise<IntegrationCreateVapiCallResponse> {
23
+ options?: RequestOptions,
24
+ ): APIPromise<IntegrationCreateVapiCallResponse> {
49
25
  return this._client.post('/v1/vapi/call', { body, ...options });
50
26
  }
51
27
  }
@@ -92,13 +68,13 @@ export interface IntegrationCreateRetellCallParams {
92
68
  /**
93
69
  * Raw Retell data forwarded directly from the Retell call_ended webhook
94
70
  */
95
- retellCallEndedPayload: { [key: string]: unknown };
71
+ retellCallEndedPayload: Record<string, unknown>;
96
72
 
97
73
  /**
98
74
  * Optional metadata (key-value pairs) to include with the call. Useful for
99
75
  * filtering and display in call details.
100
76
  */
101
- properties?: { [key: string]: unknown };
77
+ properties?: Record<string, unknown>;
102
78
 
103
79
  /**
104
80
  * Skip already imported Retell calls with the same Retell call id.
@@ -110,13 +86,13 @@ export interface IntegrationCreateVapiCallParams {
110
86
  /**
111
87
  * Raw Vapi data forwarded directly from the Vapi end-of-call-report webhook
112
88
  */
113
- vapiEndOfCallReportPayload: { [key: string]: unknown };
89
+ vapiEndOfCallReportPayload: Record<string, unknown>;
114
90
 
115
91
  /**
116
92
  * Optional metadata (key-value pairs) to include with the call. Useful for
117
93
  * filtering and display in call details.
118
94
  */
119
- properties?: { [key: string]: unknown };
95
+ properties?: Record<string, unknown>;
120
96
 
121
97
  /**
122
98
  * Skip already imported Vapi calls with the same Vapi call id.
@@ -1,7 +1,8 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../resource';
4
- import * as Core from '../core';
4
+ import { APIPromise } from '../api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
5
6
 
6
7
  export class Metric extends APIResource {
7
8
  /**
@@ -9,7 +10,7 @@ export class Metric extends APIResource {
9
10
  * system-generated and custom metrics. Only returns metrics from enabled analysis
10
11
  * packages.
11
12
  */
12
- listDefinitions(options?: Core.RequestOptions): Core.APIPromise<MetricListDefinitionsResponse> {
13
+ listDefinitions(options?: RequestOptions): APIPromise<MetricListDefinitionsResponse> {
13
14
  return this._client.get('/v1/metric/definitions', options);
14
15
  }
15
16
  }
@@ -1,82 +1,43 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../resource';
4
- import { isRequestOptions } from '../core';
5
- import * as Core from '../core';
4
+ import { APIPromise } from '../api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
6
 
7
7
  export class Persona extends APIResource {
8
8
  /**
9
9
  * Creates a new persona for the authenticated project.
10
- *
11
- * @example
12
- * ```ts
13
- * const persona = await client.persona.create({
14
- * accent: 'US',
15
- * gender: 'MALE',
16
- * language: 'EN',
17
- * name: 'name',
18
- * });
19
- * ```
20
- */
21
- create(body: PersonaCreateParams, options?: Core.RequestOptions): Core.APIPromise<PersonaCreateResponse> {
10
+ */
11
+ create(body: PersonaCreateParams, options?: RequestOptions): APIPromise<PersonaCreateResponse> {
22
12
  return this._client.post('/v1/persona', { body, ...options });
23
13
  }
24
14
 
25
15
  /**
26
16
  * Updates an existing persona by its ID.
27
- *
28
- * @example
29
- * ```ts
30
- * const persona = await client.persona.update('personaId');
31
- * ```
32
17
  */
33
18
  update(
34
- personaId: string,
35
- body?: PersonaUpdateParams,
36
- options?: Core.RequestOptions,
37
- ): Core.APIPromise<PersonaUpdateResponse>;
38
- update(personaId: string, options?: Core.RequestOptions): Core.APIPromise<PersonaUpdateResponse>;
39
- update(
40
- personaId: string,
41
- body: PersonaUpdateParams | Core.RequestOptions = {},
42
- options?: Core.RequestOptions,
43
- ): Core.APIPromise<PersonaUpdateResponse> {
44
- if (isRequestOptions(body)) {
45
- return this.update(personaId, {}, body);
46
- }
47
- return this._client.put(`/v1/persona/${personaId}`, { body, ...options });
19
+ personaID: string,
20
+ body: PersonaUpdateParams | null | undefined = {},
21
+ options?: RequestOptions,
22
+ ): APIPromise<PersonaUpdateResponse> {
23
+ return this._client.put(`/v1/persona/${personaID}`, { body, ...options });
48
24
  }
49
25
 
50
26
  /**
51
27
  * Returns a paginated list of personas for the authenticated project.
52
- *
53
- * @example
54
- * ```ts
55
- * const personas = await client.persona.list();
56
- * ```
57
- */
58
- list(query?: PersonaListParams, options?: Core.RequestOptions): Core.APIPromise<PersonaListResponse>;
59
- list(options?: Core.RequestOptions): Core.APIPromise<PersonaListResponse>;
28
+ */
60
29
  list(
61
- query: PersonaListParams | Core.RequestOptions = {},
62
- options?: Core.RequestOptions,
63
- ): Core.APIPromise<PersonaListResponse> {
64
- if (isRequestOptions(query)) {
65
- return this.list({}, query);
66
- }
30
+ query: PersonaListParams | null | undefined = {},
31
+ options?: RequestOptions,
32
+ ): APIPromise<PersonaListResponse> {
67
33
  return this._client.get('/v1/persona', { query, ...options });
68
34
  }
69
35
 
70
36
  /**
71
37
  * Returns a specific persona by its ID.
72
- *
73
- * @example
74
- * ```ts
75
- * const response = await client.persona.getById('personaId');
76
- * ```
77
- */
78
- getById(personaId: string, options?: Core.RequestOptions): Core.APIPromise<PersonaGetByIDResponse> {
79
- return this._client.get(`/v1/persona/${personaId}`, options);
38
+ */
39
+ getByID(personaID: string, options?: RequestOptions): APIPromise<PersonaGetByIDResponse> {
40
+ return this._client.get(`/v1/persona/${personaID}`, options);
80
41
  }
81
42
  }
82
43
 
@@ -173,7 +134,7 @@ export namespace PersonaCreateResponse {
173
134
  /**
174
135
  * Additional custom properties about the persona
175
136
  */
176
- properties: { [key: string]: unknown };
137
+ properties: Record<string, unknown>;
177
138
 
178
139
  /**
179
140
  * Speech clarity of the persona
@@ -295,7 +256,7 @@ export namespace PersonaUpdateResponse {
295
256
  /**
296
257
  * Additional custom properties about the persona
297
258
  */
298
- properties: { [key: string]: unknown };
259
+ properties: Record<string, unknown>;
299
260
 
300
261
  /**
301
262
  * Speech clarity of the persona
@@ -419,7 +380,7 @@ export namespace PersonaListResponse {
419
380
  /**
420
381
  * Additional custom properties about the persona
421
382
  */
422
- properties: { [key: string]: unknown };
383
+ properties: Record<string, unknown>;
423
384
 
424
385
  /**
425
386
  * Speech clarity of the persona
@@ -558,7 +519,7 @@ export namespace PersonaGetByIDResponse {
558
519
  /**
559
520
  * Additional custom properties about the persona
560
521
  */
561
- properties: { [key: string]: unknown };
522
+ properties: Record<string, unknown>;
562
523
 
563
524
  /**
564
525
  * Speech clarity of the persona
@@ -670,7 +631,7 @@ export interface PersonaCreateParams {
670
631
  /**
671
632
  * Additional custom properties about the persona
672
633
  */
673
- properties?: { [key: string]: unknown };
634
+ properties?: Record<string, unknown>;
674
635
 
675
636
  /**
676
637
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
@@ -771,7 +732,7 @@ export interface PersonaUpdateParams {
771
732
  /**
772
733
  * Additional custom properties about the persona
773
734
  */
774
- properties?: { [key: string]: unknown };
735
+ properties?: Record<string, unknown>;
775
736
 
776
737
  /**
777
738
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
@@ -1,128 +1,66 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../resource';
4
- import { isRequestOptions } from '../core';
5
- import * as Core from '../core';
4
+ import { APIPromise } from '../api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
6
 
7
7
  export class Simulation extends APIResource {
8
8
  /**
9
9
  * Retrieve details of a simulation plan job including all associated simulation
10
10
  * jobs (calls)
11
- *
12
- * @example
13
- * ```ts
14
- * const response = await client.simulation.getRunPlanJob(
15
- * '7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f',
16
- * );
17
- * ```
18
11
  */
19
- getRunPlanJob(
20
- jobId: unknown,
21
- options?: Core.RequestOptions,
22
- ): Core.APIPromise<SimulationGetRunPlanJobResponse> {
23
- return this._client.get(`/v1/simulation/plan/job/${jobId}`, options);
12
+ getRunPlanJob(jobID: unknown, options?: RequestOptions): APIPromise<SimulationGetRunPlanJobResponse> {
13
+ return this._client.get(`/v1/simulation/plan/job/${jobID}`, options);
24
14
  }
25
15
 
26
16
  /**
27
17
  * Get a individual simulation run directly by its ID. This is generally part of a
28
18
  * larger simulation run plan job.
29
- *
30
- * @example
31
- * ```ts
32
- * const response =
33
- * await client.simulation.getSimulationJobById(
34
- * '7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f',
35
- * );
36
- * ```
37
19
  */
38
- getSimulationJobById(
39
- jobId: unknown,
40
- options?: Core.RequestOptions,
41
- ): Core.APIPromise<SimulationGetSimulationJobByIDResponse> {
42
- return this._client.get(`/v1/simulation/job/${jobId}`, options);
20
+ getSimulationJobByID(
21
+ jobID: unknown,
22
+ options?: RequestOptions,
23
+ ): APIPromise<SimulationGetSimulationJobByIDResponse> {
24
+ return this._client.get(`/v1/simulation/job/${jobID}`, options);
43
25
  }
44
26
 
45
27
  /**
46
28
  * Returns a paginated list of simulation run plan jobs. Filter by status, plan ID,
47
29
  * or label to find specific simulation batches.
48
- *
49
- * @example
50
- * ```ts
51
- * const response = await client.simulation.listRunPlanJobs();
52
- * ```
53
30
  */
54
31
  listRunPlanJobs(
55
- query?: SimulationListRunPlanJobsParams,
56
- options?: Core.RequestOptions,
57
- ): Core.APIPromise<SimulationListRunPlanJobsResponse>;
58
- listRunPlanJobs(options?: Core.RequestOptions): Core.APIPromise<SimulationListRunPlanJobsResponse>;
59
- listRunPlanJobs(
60
- query: SimulationListRunPlanJobsParams | Core.RequestOptions = {},
61
- options?: Core.RequestOptions,
62
- ): Core.APIPromise<SimulationListRunPlanJobsResponse> {
63
- if (isRequestOptions(query)) {
64
- return this.listRunPlanJobs({}, query);
65
- }
32
+ query: SimulationListRunPlanJobsParams | null | undefined = {},
33
+ options?: RequestOptions,
34
+ ): APIPromise<SimulationListRunPlanJobsResponse> {
66
35
  return this._client.get('/v1/simulation/plan/jobs', { query, ...options });
67
36
  }
68
37
 
69
38
  /**
70
39
  * Returns a paginated list of simulation scenarios for the authenticated project.
71
- *
72
- * @example
73
- * ```ts
74
- * const response = await client.simulation.listScenarios();
75
- * ```
76
40
  */
77
41
  listScenarios(
78
- query?: SimulationListScenariosParams,
79
- options?: Core.RequestOptions,
80
- ): Core.APIPromise<SimulationListScenariosResponse>;
81
- listScenarios(options?: Core.RequestOptions): Core.APIPromise<SimulationListScenariosResponse>;
82
- listScenarios(
83
- query: SimulationListScenariosParams | Core.RequestOptions = {},
84
- options?: Core.RequestOptions,
85
- ): Core.APIPromise<SimulationListScenariosResponse> {
86
- if (isRequestOptions(query)) {
87
- return this.listScenarios({}, query);
88
- }
42
+ query: SimulationListScenariosParams | null | undefined = {},
43
+ options?: RequestOptions,
44
+ ): APIPromise<SimulationListScenariosResponse> {
89
45
  return this._client.get('/v1/simulation/scenario', { query, ...options });
90
46
  }
91
47
 
92
48
  /**
93
49
  * Find the matching simulation using the number used by the Roark simulation
94
50
  * agent.
95
- *
96
- * @example
97
- * ```ts
98
- * const response =
99
- * await client.simulation.lookupSimulationJob({
100
- * roarkPhoneNumber: {},
101
- * });
102
- * ```
103
51
  */
104
52
  lookupSimulationJob(
105
53
  query: SimulationLookupSimulationJobParams,
106
- options?: Core.RequestOptions,
107
- ): Core.APIPromise<SimulationLookupSimulationJobResponse> {
54
+ options?: RequestOptions,
55
+ ): APIPromise<SimulationLookupSimulationJobResponse> {
108
56
  return this._client.get('/v1/simulation/job/lookup', { query, ...options });
109
57
  }
110
58
 
111
59
  /**
112
60
  * Create and execute a job for an existing simulation run plan
113
- *
114
- * @example
115
- * ```ts
116
- * const response = await client.simulation.startRunPlanJob(
117
- * '7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f',
118
- * );
119
- * ```
120
61
  */
121
- startRunPlanJob(
122
- planId: unknown,
123
- options?: Core.RequestOptions,
124
- ): Core.APIPromise<SimulationStartRunPlanJobResponse> {
125
- return this._client.post(`/v1/simulation/plan/${planId}/job`, options);
62
+ startRunPlanJob(planID: unknown, options?: RequestOptions): APIPromise<SimulationStartRunPlanJobResponse> {
63
+ return this._client.post(`/v1/simulation/plan/${planID}/job`, options);
126
64
  }
127
65
  }
128
66
 
@@ -345,7 +283,7 @@ export namespace SimulationGetRunPlanJobResponse {
345
283
  /**
346
284
  * Additional custom properties about the persona
347
285
  */
348
- properties: { [key: string]: unknown };
286
+ properties: Record<string, unknown>;
349
287
 
350
288
  /**
351
289
  * Speech clarity of the persona
@@ -572,7 +510,7 @@ export namespace SimulationGetSimulationJobByIDResponse {
572
510
  /**
573
511
  * Additional custom properties about the persona
574
512
  */
575
- properties: { [key: string]: unknown };
513
+ properties: Record<string, unknown>;
576
514
 
577
515
  /**
578
516
  * Speech clarity of the persona
@@ -940,7 +878,7 @@ export namespace SimulationLookupSimulationJobResponse {
940
878
  /**
941
879
  * Additional custom properties about the persona
942
880
  */
943
- properties: { [key: string]: unknown };
881
+ properties: Record<string, unknown>;
944
882
 
945
883
  /**
946
884
  * Speech clarity of the persona
package/src/tsconfig.json CHANGED
@@ -4,8 +4,8 @@
4
4
  // via declaration maps
5
5
  "include": ["index.ts"],
6
6
  "compilerOptions": {
7
- "target": "es2015",
8
- "lib": ["DOM"],
7
+ "target": "ES2015",
8
+ "lib": ["DOM", "DOM.Iterable", "ES2018"],
9
9
  "moduleResolution": "node"
10
10
  }
11
11
  }