retell-sdk 4.65.0 → 5.0.0

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 (550) hide show
  1. package/CHANGELOG.md +4 -1326
  2. package/LICENSE +1 -1
  3. package/README.md +120 -44
  4. package/api-promise.d.mts +2 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +2 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +2 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +217 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +217 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +513 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +509 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/resource.d.mts +6 -0
  37. package/core/resource.d.mts.map +1 -0
  38. package/core/resource.d.ts +6 -0
  39. package/core/resource.d.ts.map +1 -0
  40. package/core/resource.js +11 -0
  41. package/core/resource.js.map +1 -0
  42. package/core/resource.mjs +7 -0
  43. package/core/resource.mjs.map +1 -0
  44. package/core/uploads.d.mts +3 -0
  45. package/core/uploads.d.mts.map +1 -0
  46. package/core/uploads.d.ts +3 -0
  47. package/core/uploads.d.ts.map +1 -0
  48. package/core/uploads.js +6 -0
  49. package/core/uploads.js.map +1 -0
  50. package/core/uploads.mjs +2 -0
  51. package/core/uploads.mjs.map +1 -0
  52. package/error.d.mts +2 -0
  53. package/error.d.mts.map +1 -0
  54. package/error.d.ts +1 -46
  55. package/error.d.ts.map +1 -1
  56. package/error.js +3 -110
  57. package/error.js.map +1 -1
  58. package/error.mjs +1 -96
  59. package/error.mjs.map +1 -1
  60. package/index.d.mts +6 -151
  61. package/index.d.mts.map +1 -0
  62. package/index.d.ts +5 -150
  63. package/index.d.ts.map +1 -1
  64. package/index.js +12 -150
  65. package/index.js.map +1 -1
  66. package/index.mjs +5 -123
  67. package/index.mjs.map +1 -1
  68. package/internal/builtin-types.d.mts +73 -0
  69. package/internal/builtin-types.d.mts.map +1 -0
  70. package/internal/builtin-types.d.ts +73 -0
  71. package/internal/builtin-types.d.ts.map +1 -0
  72. package/internal/builtin-types.js +4 -0
  73. package/internal/builtin-types.js.map +1 -0
  74. package/internal/builtin-types.mjs +3 -0
  75. package/internal/builtin-types.mjs.map +1 -0
  76. package/internal/detect-platform.d.mts +15 -0
  77. package/internal/detect-platform.d.mts.map +1 -0
  78. package/internal/detect-platform.d.ts +15 -0
  79. package/internal/detect-platform.d.ts.map +1 -0
  80. package/internal/detect-platform.js +162 -0
  81. package/internal/detect-platform.js.map +1 -0
  82. package/internal/detect-platform.mjs +157 -0
  83. package/internal/detect-platform.mjs.map +1 -0
  84. package/internal/errors.d.mts +3 -0
  85. package/internal/errors.d.mts.map +1 -0
  86. package/internal/errors.d.ts +3 -0
  87. package/internal/errors.d.ts.map +1 -0
  88. package/internal/errors.js +41 -0
  89. package/internal/errors.js.map +1 -0
  90. package/internal/errors.mjs +36 -0
  91. package/internal/errors.mjs.map +1 -0
  92. package/internal/headers.d.mts +20 -0
  93. package/internal/headers.d.mts.map +1 -0
  94. package/internal/headers.d.ts +20 -0
  95. package/internal/headers.d.ts.map +1 -0
  96. package/internal/headers.js +79 -0
  97. package/internal/headers.js.map +1 -0
  98. package/internal/headers.mjs +74 -0
  99. package/internal/headers.mjs.map +1 -0
  100. package/internal/parse.d.mts +12 -0
  101. package/internal/parse.d.mts.map +1 -0
  102. package/internal/parse.d.ts +12 -0
  103. package/internal/parse.d.ts.map +1 -0
  104. package/internal/parse.js +40 -0
  105. package/internal/parse.js.map +1 -0
  106. package/internal/parse.mjs +37 -0
  107. package/internal/parse.mjs.map +1 -0
  108. package/internal/request-options.d.mts +75 -0
  109. package/internal/request-options.d.mts.map +1 -0
  110. package/internal/request-options.d.ts +75 -0
  111. package/internal/request-options.d.ts.map +1 -0
  112. package/internal/request-options.js +14 -0
  113. package/internal/request-options.js.map +1 -0
  114. package/internal/request-options.mjs +10 -0
  115. package/internal/request-options.mjs.map +1 -0
  116. package/internal/shim-types.d.mts +17 -0
  117. package/internal/shim-types.d.mts.map +1 -0
  118. package/internal/shim-types.d.ts +17 -0
  119. package/internal/shim-types.d.ts.map +1 -0
  120. package/internal/shim-types.js +4 -0
  121. package/internal/shim-types.js.map +1 -0
  122. package/internal/shim-types.mjs +3 -0
  123. package/internal/shim-types.mjs.map +1 -0
  124. package/internal/shims.d.mts +20 -0
  125. package/internal/shims.d.mts.map +1 -0
  126. package/internal/shims.d.ts +20 -0
  127. package/internal/shims.d.ts.map +1 -0
  128. package/internal/shims.js +92 -0
  129. package/internal/shims.js.map +1 -0
  130. package/internal/shims.mjs +85 -0
  131. package/internal/shims.mjs.map +1 -0
  132. package/internal/to-file.d.mts +45 -0
  133. package/internal/to-file.d.mts.map +1 -0
  134. package/internal/to-file.d.ts +45 -0
  135. package/internal/to-file.d.ts.map +1 -0
  136. package/internal/to-file.js +91 -0
  137. package/internal/to-file.js.map +1 -0
  138. package/internal/to-file.mjs +88 -0
  139. package/internal/to-file.mjs.map +1 -0
  140. package/internal/tslib.js +81 -0
  141. package/internal/tslib.mjs +17 -0
  142. package/internal/types.d.mts +69 -0
  143. package/internal/types.d.mts.map +1 -0
  144. package/internal/types.d.ts +69 -0
  145. package/internal/types.d.ts.map +1 -0
  146. package/internal/types.js +4 -0
  147. package/internal/types.js.map +1 -0
  148. package/internal/types.mjs +3 -0
  149. package/internal/types.mjs.map +1 -0
  150. package/internal/uploads.d.mts +42 -0
  151. package/internal/uploads.d.mts.map +1 -0
  152. package/internal/uploads.d.ts +42 -0
  153. package/internal/uploads.d.ts.map +1 -0
  154. package/internal/uploads.js +141 -0
  155. package/internal/uploads.js.map +1 -0
  156. package/internal/uploads.mjs +131 -0
  157. package/internal/uploads.mjs.map +1 -0
  158. package/internal/utils/base64.d.mts +3 -0
  159. package/internal/utils/base64.d.mts.map +1 -0
  160. package/internal/utils/base64.d.ts +3 -0
  161. package/internal/utils/base64.d.ts.map +1 -0
  162. package/internal/utils/base64.js +38 -0
  163. package/internal/utils/base64.js.map +1 -0
  164. package/internal/utils/base64.mjs +33 -0
  165. package/internal/utils/base64.mjs.map +1 -0
  166. package/internal/utils/bytes.d.mts +4 -0
  167. package/internal/utils/bytes.d.mts.map +1 -0
  168. package/internal/utils/bytes.d.ts +4 -0
  169. package/internal/utils/bytes.d.ts.map +1 -0
  170. package/internal/utils/bytes.js +31 -0
  171. package/internal/utils/bytes.js.map +1 -0
  172. package/internal/utils/bytes.mjs +26 -0
  173. package/internal/utils/bytes.mjs.map +1 -0
  174. package/internal/utils/env.d.mts +9 -0
  175. package/internal/utils/env.d.mts.map +1 -0
  176. package/internal/utils/env.d.ts +9 -0
  177. package/internal/utils/env.d.ts.map +1 -0
  178. package/internal/utils/env.js +22 -0
  179. package/internal/utils/env.js.map +1 -0
  180. package/internal/utils/env.mjs +18 -0
  181. package/internal/utils/env.mjs.map +1 -0
  182. package/internal/utils/log.d.mts +37 -0
  183. package/internal/utils/log.d.mts.map +1 -0
  184. package/internal/utils/log.d.ts +37 -0
  185. package/internal/utils/log.d.ts.map +1 -0
  186. package/internal/utils/log.js +85 -0
  187. package/internal/utils/log.js.map +1 -0
  188. package/internal/utils/log.mjs +79 -0
  189. package/internal/utils/log.mjs.map +1 -0
  190. package/internal/utils/path.d.mts +15 -0
  191. package/internal/utils/path.d.mts.map +1 -0
  192. package/internal/utils/path.d.ts +15 -0
  193. package/internal/utils/path.d.ts.map +1 -0
  194. package/internal/utils/path.js +79 -0
  195. package/internal/utils/path.js.map +1 -0
  196. package/internal/utils/path.mjs +74 -0
  197. package/internal/utils/path.mjs.map +1 -0
  198. package/internal/utils/sleep.d.mts +2 -0
  199. package/internal/utils/sleep.d.mts.map +1 -0
  200. package/internal/utils/sleep.d.ts +2 -0
  201. package/internal/utils/sleep.d.ts.map +1 -0
  202. package/internal/utils/sleep.js +7 -0
  203. package/internal/utils/sleep.js.map +1 -0
  204. package/internal/utils/sleep.mjs +3 -0
  205. package/internal/utils/sleep.mjs.map +1 -0
  206. package/internal/utils/uuid.d.mts +5 -0
  207. package/internal/utils/uuid.d.mts.map +1 -0
  208. package/internal/utils/uuid.d.ts +5 -0
  209. package/internal/utils/uuid.d.ts.map +1 -0
  210. package/internal/utils/uuid.js +19 -0
  211. package/internal/utils/uuid.js.map +1 -0
  212. package/internal/utils/uuid.mjs +15 -0
  213. package/internal/utils/uuid.mjs.map +1 -0
  214. package/internal/utils/values.d.mts +18 -0
  215. package/internal/utils/values.d.mts.map +1 -0
  216. package/internal/utils/values.d.ts +18 -0
  217. package/internal/utils/values.d.ts.map +1 -0
  218. package/internal/utils/values.js +112 -0
  219. package/internal/utils/values.js.map +1 -0
  220. package/internal/utils/values.mjs +94 -0
  221. package/internal/utils/values.mjs.map +1 -0
  222. package/internal/utils.d.mts +7 -0
  223. package/internal/utils.d.mts.map +1 -0
  224. package/internal/utils.d.ts +7 -0
  225. package/internal/utils.d.ts.map +1 -0
  226. package/internal/utils.js +11 -0
  227. package/internal/utils.js.map +1 -0
  228. package/internal/utils.mjs +8 -0
  229. package/internal/utils.mjs.map +1 -0
  230. package/package.json +101 -65
  231. package/resource.d.mts +2 -0
  232. package/resource.d.mts.map +1 -0
  233. package/resource.d.ts +1 -5
  234. package/resource.d.ts.map +1 -1
  235. package/resource.js +3 -8
  236. package/resource.js.map +1 -1
  237. package/resource.mjs +1 -6
  238. package/resource.mjs.map +1 -1
  239. package/resources/agent.d.mts +1803 -0
  240. package/resources/agent.d.mts.map +1 -0
  241. package/resources/agent.d.ts +377 -81
  242. package/resources/agent.d.ts.map +1 -1
  243. package/resources/agent.js +33 -20
  244. package/resources/agent.js.map +1 -1
  245. package/resources/agent.mjs +33 -20
  246. package/resources/agent.mjs.map +1 -1
  247. package/resources/batch-call.d.mts +926 -0
  248. package/resources/batch-call.d.mts.map +1 -0
  249. package/resources/batch-call.d.ts +220 -28
  250. package/resources/batch-call.d.ts.map +1 -1
  251. package/resources/batch-call.js +6 -2
  252. package/resources/batch-call.js.map +1 -1
  253. package/resources/batch-call.mjs +6 -2
  254. package/resources/batch-call.mjs.map +1 -1
  255. package/resources/call.d.mts +4280 -0
  256. package/resources/call.d.mts.map +1 -0
  257. package/resources/call.d.ts +556 -110
  258. package/resources/call.d.ts.map +1 -1
  259. package/resources/call.js +20 -10
  260. package/resources/call.js.map +1 -1
  261. package/resources/call.mjs +20 -10
  262. package/resources/call.mjs.map +1 -1
  263. package/resources/chat-agent.d.mts +836 -0
  264. package/resources/chat-agent.d.mts.map +1 -0
  265. package/resources/chat-agent.d.ts +118 -23
  266. package/resources/chat-agent.d.ts.map +1 -1
  267. package/resources/chat-agent.js +33 -20
  268. package/resources/chat-agent.js.map +1 -1
  269. package/resources/chat-agent.mjs +33 -20
  270. package/resources/chat-agent.mjs.map +1 -1
  271. package/resources/chat.d.mts +607 -0
  272. package/resources/chat.d.mts.map +1 -0
  273. package/resources/chat.d.ts +82 -30
  274. package/resources/chat.d.ts.map +1 -1
  275. package/resources/chat.js +21 -11
  276. package/resources/chat.js.map +1 -1
  277. package/resources/chat.mjs +21 -11
  278. package/resources/chat.mjs.map +1 -1
  279. package/resources/concurrency.d.mts +51 -0
  280. package/resources/concurrency.d.mts.map +1 -0
  281. package/resources/concurrency.d.ts +14 -3
  282. package/resources/concurrency.d.ts.map +1 -1
  283. package/resources/concurrency.js +1 -1
  284. package/resources/concurrency.js.map +1 -1
  285. package/resources/concurrency.mjs +1 -1
  286. package/resources/concurrency.mjs.map +1 -1
  287. package/resources/conversation-flow-component.d.mts +11838 -0
  288. package/resources/conversation-flow-component.d.mts.map +1 -0
  289. package/resources/conversation-flow-component.d.ts +6600 -2597
  290. package/resources/conversation-flow-component.d.ts.map +1 -1
  291. package/resources/conversation-flow-component.js +10 -8
  292. package/resources/conversation-flow-component.js.map +1 -1
  293. package/resources/conversation-flow-component.mjs +10 -8
  294. package/resources/conversation-flow-component.mjs.map +1 -1
  295. package/resources/conversation-flow.d.mts +23851 -0
  296. package/resources/conversation-flow.d.mts.map +1 -0
  297. package/resources/conversation-flow.d.ts +15877 -7958
  298. package/resources/conversation-flow.d.ts.map +1 -1
  299. package/resources/conversation-flow.js +30 -15
  300. package/resources/conversation-flow.js.map +1 -1
  301. package/resources/conversation-flow.mjs +30 -15
  302. package/resources/conversation-flow.mjs.map +1 -1
  303. package/resources/index.d.mts +15 -0
  304. package/resources/index.d.mts.map +1 -0
  305. package/resources/index.d.ts +4 -4
  306. package/resources/index.d.ts.map +1 -1
  307. package/resources/index.js.map +1 -1
  308. package/resources/index.mjs +2 -2
  309. package/resources/index.mjs.map +1 -1
  310. package/resources/knowledge-base.d.mts +228 -0
  311. package/resources/knowledge-base.d.mts.map +1 -0
  312. package/resources/knowledge-base.d.ts +23 -14
  313. package/resources/knowledge-base.d.ts.map +1 -1
  314. package/resources/knowledge-base.js +16 -36
  315. package/resources/knowledge-base.js.map +1 -1
  316. package/resources/knowledge-base.mjs +16 -13
  317. package/resources/knowledge-base.mjs.map +1 -1
  318. package/resources/llm.d.mts +5306 -0
  319. package/resources/llm.d.mts.map +1 -0
  320. package/resources/llm.d.ts +1189 -477
  321. package/resources/llm.d.ts.map +1 -1
  322. package/resources/llm.js +28 -15
  323. package/resources/llm.js.map +1 -1
  324. package/resources/llm.mjs +28 -15
  325. package/resources/llm.mjs.map +1 -1
  326. package/resources/mcp-tool.d.mts +45 -0
  327. package/resources/mcp-tool.d.mts.map +1 -0
  328. package/resources/mcp-tool.d.ts +8 -3
  329. package/resources/mcp-tool.d.ts.map +1 -1
  330. package/resources/mcp-tool.js +4 -3
  331. package/resources/mcp-tool.js.map +1 -1
  332. package/resources/mcp-tool.mjs +4 -3
  333. package/resources/mcp-tool.mjs.map +1 -1
  334. package/resources/phone-number.d.mts +595 -0
  335. package/resources/phone-number.d.mts.map +1 -0
  336. package/resources/phone-number.d.ts +332 -13
  337. package/resources/phone-number.d.ts.map +1 -1
  338. package/resources/phone-number.js +7 -5
  339. package/resources/phone-number.js.map +1 -1
  340. package/resources/phone-number.mjs +7 -5
  341. package/resources/phone-number.mjs.map +1 -1
  342. package/resources/tests.d.mts +561 -0
  343. package/resources/tests.d.mts.map +1 -0
  344. package/resources/tests.d.ts +437 -7
  345. package/resources/tests.d.ts.map +1 -1
  346. package/resources/tests.js +60 -1
  347. package/resources/tests.js.map +1 -1
  348. package/resources/tests.mjs +60 -1
  349. package/resources/tests.mjs.map +1 -1
  350. package/resources/voice.d.mts +130 -0
  351. package/resources/voice.d.mts.map +1 -0
  352. package/resources/voice.d.ts +89 -6
  353. package/resources/voice.d.ts.map +1 -1
  354. package/resources/voice.js +23 -3
  355. package/resources/voice.js.map +1 -1
  356. package/resources/voice.mjs +23 -3
  357. package/resources/voice.mjs.map +1 -1
  358. package/resources.d.mts +2 -0
  359. package/resources.d.mts.map +1 -0
  360. package/resources.d.ts.map +1 -1
  361. package/resources.js +2 -15
  362. package/resources.js.map +1 -1
  363. package/src/api-promise.ts +2 -0
  364. package/src/client.ts +1005 -0
  365. package/src/core/README.md +3 -0
  366. package/src/core/api-promise.ts +92 -0
  367. package/src/core/error.ts +130 -0
  368. package/src/core/resource.ts +11 -0
  369. package/src/core/uploads.ts +2 -0
  370. package/src/error.ts +2 -130
  371. package/src/index.ts +5 -405
  372. package/src/internal/README.md +3 -0
  373. package/src/internal/builtin-types.ts +93 -0
  374. package/src/internal/detect-platform.ts +196 -0
  375. package/src/internal/errors.ts +33 -0
  376. package/src/internal/headers.ts +97 -0
  377. package/src/internal/parse.ts +56 -0
  378. package/src/internal/request-options.ts +91 -0
  379. package/src/internal/shim-types.ts +26 -0
  380. package/src/internal/shims.ts +107 -0
  381. package/src/internal/to-file.ts +154 -0
  382. package/src/internal/types.ts +95 -0
  383. package/src/internal/uploads.ts +187 -0
  384. package/src/internal/utils/base64.ts +40 -0
  385. package/src/internal/utils/bytes.ts +32 -0
  386. package/src/internal/utils/env.ts +18 -0
  387. package/src/internal/utils/log.ts +126 -0
  388. package/src/internal/utils/path.ts +88 -0
  389. package/src/internal/utils/sleep.ts +3 -0
  390. package/src/internal/utils/uuid.ts +17 -0
  391. package/src/internal/utils/values.ts +105 -0
  392. package/src/internal/utils.ts +8 -0
  393. package/src/resource.ts +2 -11
  394. package/src/resources/agent.ts +610 -101
  395. package/src/resources/batch-call.ts +318 -26
  396. package/src/resources/call.ts +835 -111
  397. package/src/resources/chat-agent.ts +191 -41
  398. package/src/resources/chat.ts +108 -40
  399. package/src/resources/concurrency.ts +16 -3
  400. package/src/resources/conversation-flow-component.ts +9469 -4285
  401. package/src/resources/conversation-flow.ts +21572 -11318
  402. package/src/resources/index.ts +25 -2
  403. package/src/resources/knowledge-base.ts +40 -28
  404. package/src/resources/llm.ts +1422 -599
  405. package/src/resources/mcp-tool.ts +13 -6
  406. package/src/resources/phone-number.ts +410 -18
  407. package/src/resources/tests.ts +608 -9
  408. package/src/resources/voice.ts +122 -7
  409. package/src/tsconfig.json +2 -2
  410. package/src/uploads.ts +2 -259
  411. package/src/version.ts +1 -1
  412. package/uploads.d.mts +2 -0
  413. package/uploads.d.mts.map +1 -0
  414. package/uploads.d.ts +1 -74
  415. package/uploads.d.ts.map +1 -1
  416. package/uploads.js +3 -175
  417. package/uploads.js.map +1 -1
  418. package/uploads.mjs +1 -164
  419. package/uploads.mjs.map +1 -1
  420. package/version.d.mts +2 -0
  421. package/version.d.mts.map +1 -0
  422. package/version.d.ts +1 -1
  423. package/version.d.ts.map +1 -1
  424. package/version.js +1 -1
  425. package/version.js.map +1 -1
  426. package/version.mjs +1 -1
  427. package/version.mjs.map +1 -1
  428. package/_shims/MultipartBody.d.ts +0 -9
  429. package/_shims/MultipartBody.d.ts.map +0 -1
  430. package/_shims/MultipartBody.js +0 -16
  431. package/_shims/MultipartBody.js.map +0 -1
  432. package/_shims/MultipartBody.mjs +0 -12
  433. package/_shims/MultipartBody.mjs.map +0 -1
  434. package/_shims/README.md +0 -46
  435. package/_shims/auto/runtime-bun.d.ts +0 -5
  436. package/_shims/auto/runtime-bun.d.ts.map +0 -1
  437. package/_shims/auto/runtime-bun.js +0 -21
  438. package/_shims/auto/runtime-bun.js.map +0 -1
  439. package/_shims/auto/runtime-bun.mjs +0 -2
  440. package/_shims/auto/runtime-bun.mjs.map +0 -1
  441. package/_shims/auto/runtime-node.d.ts +0 -5
  442. package/_shims/auto/runtime-node.d.ts.map +0 -1
  443. package/_shims/auto/runtime-node.js +0 -21
  444. package/_shims/auto/runtime-node.js.map +0 -1
  445. package/_shims/auto/runtime-node.mjs +0 -2
  446. package/_shims/auto/runtime-node.mjs.map +0 -1
  447. package/_shims/auto/runtime.d.ts +0 -5
  448. package/_shims/auto/runtime.d.ts.map +0 -1
  449. package/_shims/auto/runtime.js +0 -21
  450. package/_shims/auto/runtime.js.map +0 -1
  451. package/_shims/auto/runtime.mjs +0 -2
  452. package/_shims/auto/runtime.mjs.map +0 -1
  453. package/_shims/auto/types-node.d.ts +0 -5
  454. package/_shims/auto/types-node.d.ts.map +0 -1
  455. package/_shims/auto/types-node.js +0 -21
  456. package/_shims/auto/types-node.js.map +0 -1
  457. package/_shims/auto/types-node.mjs +0 -2
  458. package/_shims/auto/types-node.mjs.map +0 -1
  459. package/_shims/auto/types.d.ts +0 -101
  460. package/_shims/auto/types.js +0 -3
  461. package/_shims/auto/types.mjs +0 -3
  462. package/_shims/bun-runtime.d.ts +0 -6
  463. package/_shims/bun-runtime.d.ts.map +0 -1
  464. package/_shims/bun-runtime.js +0 -14
  465. package/_shims/bun-runtime.js.map +0 -1
  466. package/_shims/bun-runtime.mjs +0 -10
  467. package/_shims/bun-runtime.mjs.map +0 -1
  468. package/_shims/index.d.ts +0 -83
  469. package/_shims/index.js +0 -17
  470. package/_shims/index.mjs +0 -11
  471. package/_shims/manual-types.d.ts +0 -12
  472. package/_shims/manual-types.js +0 -3
  473. package/_shims/manual-types.mjs +0 -3
  474. package/_shims/node-runtime.d.ts +0 -3
  475. package/_shims/node-runtime.d.ts.map +0 -1
  476. package/_shims/node-runtime.js +0 -89
  477. package/_shims/node-runtime.js.map +0 -1
  478. package/_shims/node-runtime.mjs +0 -56
  479. package/_shims/node-runtime.mjs.map +0 -1
  480. package/_shims/node-types.d.ts +0 -42
  481. package/_shims/node-types.js +0 -3
  482. package/_shims/node-types.mjs +0 -3
  483. package/_shims/registry.d.ts +0 -37
  484. package/_shims/registry.d.ts.map +0 -1
  485. package/_shims/registry.js +0 -41
  486. package/_shims/registry.js.map +0 -1
  487. package/_shims/registry.mjs +0 -37
  488. package/_shims/registry.mjs.map +0 -1
  489. package/_shims/web-runtime.d.ts +0 -5
  490. package/_shims/web-runtime.d.ts.map +0 -1
  491. package/_shims/web-runtime.js +0 -78
  492. package/_shims/web-runtime.js.map +0 -1
  493. package/_shims/web-runtime.mjs +0 -71
  494. package/_shims/web-runtime.mjs.map +0 -1
  495. package/_shims/web-types.d.ts +0 -83
  496. package/_shims/web-types.js +0 -3
  497. package/_shims/web-types.mjs +0 -3
  498. package/core.d.ts +0 -255
  499. package/core.d.ts.map +0 -1
  500. package/core.js +0 -924
  501. package/core.js.map +0 -1
  502. package/core.mjs +0 -892
  503. package/core.mjs.map +0 -1
  504. package/lib/webhook_auth.d.ts +0 -27
  505. package/lib/webhook_auth.d.ts.map +0 -1
  506. package/lib/webhook_auth.js +0 -50
  507. package/lib/webhook_auth.js.map +0 -1
  508. package/lib/webhook_auth.mjs +0 -45
  509. package/lib/webhook_auth.mjs.map +0 -1
  510. package/shims/node.d.ts +0 -30
  511. package/shims/node.d.ts.map +0 -1
  512. package/shims/node.js +0 -31
  513. package/shims/node.js.map +0 -1
  514. package/shims/node.mjs +0 -5
  515. package/shims/node.mjs.map +0 -1
  516. package/shims/web.d.ts +0 -26
  517. package/shims/web.d.ts.map +0 -1
  518. package/shims/web.js +0 -31
  519. package/shims/web.js.map +0 -1
  520. package/shims/web.mjs +0 -5
  521. package/shims/web.mjs.map +0 -1
  522. package/src/_shims/MultipartBody.ts +0 -9
  523. package/src/_shims/README.md +0 -46
  524. package/src/_shims/auto/runtime-bun.ts +0 -4
  525. package/src/_shims/auto/runtime-node.ts +0 -4
  526. package/src/_shims/auto/runtime.ts +0 -4
  527. package/src/_shims/auto/types-node.ts +0 -4
  528. package/src/_shims/auto/types.d.ts +0 -101
  529. package/src/_shims/auto/types.js +0 -3
  530. package/src/_shims/auto/types.mjs +0 -3
  531. package/src/_shims/bun-runtime.ts +0 -14
  532. package/src/_shims/index.d.ts +0 -83
  533. package/src/_shims/index.js +0 -17
  534. package/src/_shims/index.mjs +0 -11
  535. package/src/_shims/manual-types.d.ts +0 -12
  536. package/src/_shims/manual-types.js +0 -3
  537. package/src/_shims/manual-types.mjs +0 -3
  538. package/src/_shims/node-runtime.ts +0 -81
  539. package/src/_shims/node-types.d.ts +0 -42
  540. package/src/_shims/node-types.js +0 -3
  541. package/src/_shims/node-types.mjs +0 -3
  542. package/src/_shims/registry.ts +0 -67
  543. package/src/_shims/web-runtime.ts +0 -103
  544. package/src/_shims/web-types.d.ts +0 -83
  545. package/src/_shims/web-types.js +0 -3
  546. package/src/_shims/web-types.mjs +0 -3
  547. package/src/core.ts +0 -1236
  548. package/src/lib/webhook_auth.ts +0 -69
  549. package/src/shims/node.ts +0 -50
  550. package/src/shims/web.ts +0 -50
@@ -1,8 +1,10 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../resource';
4
- import { isRequestOptions } from '../core';
5
- import * as Core from '../core';
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { buildHeaders } from '../internal/headers';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
6
8
 
7
9
  export class Agent extends APIResource {
8
10
  /**
@@ -19,7 +21,7 @@ export class Agent extends APIResource {
19
21
  * });
20
22
  * ```
21
23
  */
22
- create(body: AgentCreateParams, options?: Core.RequestOptions): Core.APIPromise<AgentResponse> {
24
+ create(body: AgentCreateParams, options?: RequestOptions): APIPromise<AgentResponse> {
23
25
  return this._client.post('/create-agent', { body, ...options });
24
26
  }
25
27
 
@@ -34,20 +36,11 @@ export class Agent extends APIResource {
34
36
  * ```
35
37
  */
36
38
  retrieve(
37
- agentId: string,
38
- query?: AgentRetrieveParams,
39
- options?: Core.RequestOptions,
40
- ): Core.APIPromise<AgentResponse>;
41
- retrieve(agentId: string, options?: Core.RequestOptions): Core.APIPromise<AgentResponse>;
42
- retrieve(
43
- agentId: string,
44
- query: AgentRetrieveParams | Core.RequestOptions = {},
45
- options?: Core.RequestOptions,
46
- ): Core.APIPromise<AgentResponse> {
47
- if (isRequestOptions(query)) {
48
- return this.retrieve(agentId, {}, query);
49
- }
50
- return this._client.get(`/get-agent/${agentId}`, { query, ...options });
39
+ agentID: string,
40
+ query: AgentRetrieveParams | null | undefined = {},
41
+ options?: RequestOptions,
42
+ ): APIPromise<AgentResponse> {
43
+ return this._client.get(path`/get-agent/${agentID}`, { query, ...options });
51
44
  }
52
45
 
53
46
  /**
@@ -61,13 +54,9 @@ export class Agent extends APIResource {
61
54
  * );
62
55
  * ```
63
56
  */
64
- update(
65
- agentId: string,
66
- params: AgentUpdateParams,
67
- options?: Core.RequestOptions,
68
- ): Core.APIPromise<AgentResponse> {
57
+ update(agentID: string, params: AgentUpdateParams, options?: RequestOptions): APIPromise<AgentResponse> {
69
58
  const { version, ...body } = params;
70
- return this._client.patch(`/update-agent/${agentId}`, { query: { version }, body, ...options });
59
+ return this._client.patch(path`/update-agent/${agentID}`, { query: { version }, body, ...options });
71
60
  }
72
61
 
73
62
  /**
@@ -78,15 +67,10 @@ export class Agent extends APIResource {
78
67
  * const agentResponses = await client.agent.list();
79
68
  * ```
80
69
  */
81
- list(query?: AgentListParams, options?: Core.RequestOptions): Core.APIPromise<AgentListResponse>;
82
- list(options?: Core.RequestOptions): Core.APIPromise<AgentListResponse>;
83
70
  list(
84
- query: AgentListParams | Core.RequestOptions = {},
85
- options?: Core.RequestOptions,
86
- ): Core.APIPromise<AgentListResponse> {
87
- if (isRequestOptions(query)) {
88
- return this.list({}, query);
89
- }
71
+ query: AgentListParams | null | undefined = {},
72
+ options?: RequestOptions,
73
+ ): APIPromise<AgentListResponse> {
90
74
  return this._client.get('/list-agents', { query, ...options });
91
75
  }
92
76
 
@@ -100,10 +84,10 @@ export class Agent extends APIResource {
100
84
  * );
101
85
  * ```
102
86
  */
103
- delete(agentId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
104
- return this._client.delete(`/delete-agent/${agentId}`, {
87
+ delete(agentID: string, options?: RequestOptions): APIPromise<void> {
88
+ return this._client.delete(path`/delete-agent/${agentID}`, {
105
89
  ...options,
106
- headers: { Accept: '*/*', ...options?.headers },
90
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
107
91
  });
108
92
  }
109
93
 
@@ -117,8 +101,8 @@ export class Agent extends APIResource {
117
101
  * );
118
102
  * ```
119
103
  */
120
- getVersions(agentId: string, options?: Core.RequestOptions): Core.APIPromise<AgentGetVersionsResponse> {
121
- return this._client.get(`/get-agent-versions/${agentId}`, options);
104
+ getVersions(agentID: string, options?: RequestOptions): APIPromise<AgentGetVersionsResponse> {
105
+ return this._client.get(path`/get-agent-versions/${agentID}`, options);
122
106
  }
123
107
 
124
108
  /**
@@ -132,10 +116,10 @@ export class Agent extends APIResource {
132
116
  * );
133
117
  * ```
134
118
  */
135
- publish(agentId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
136
- return this._client.post(`/publish-agent/${agentId}`, {
119
+ publish(agentID: string, options?: RequestOptions): APIPromise<void> {
120
+ return this._client.post(path`/publish-agent/${agentID}`, {
137
121
  ...options,
138
- headers: { Accept: '*/*', ...options?.headers },
122
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
139
123
  });
140
124
  }
141
125
  }
@@ -162,6 +146,11 @@ export interface AgentResponse {
162
146
  | AgentResponse.ResponseEngineCustomLm
163
147
  | AgentResponse.ResponseEngineConversationFlow;
164
148
 
149
+ /**
150
+ * Version of the agent.
151
+ */
152
+ version: number;
153
+
165
154
  /**
166
155
  * Unique voice id used for the agent. Find list of available voices and their
167
156
  * preview in Dashboard.
@@ -185,24 +174,18 @@ export interface AgentResponse {
185
174
  *
186
175
  * - `coffee-shop`: Coffee shop ambience with people chatting in background.
187
176
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/coffee-shop.wav)
188
- *
189
177
  * - `convention-hall`: Convention hall ambience, with some echo and people
190
178
  * chatting in background.
191
179
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/convention-hall.wav)
192
- *
193
180
  * - `summer-outdoor`: Summer outdoor ambience with cicada chirping.
194
181
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/summer-outdoor.wav)
195
- *
196
182
  * - `mountain-outdoor`: Mountain outdoor ambience with birds singing.
197
183
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/mountain-outdoor.wav)
198
- *
199
184
  * - `static-noise`: Constant static noise.
200
185
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/static-noise.wav)
201
- *
202
186
  * - `call-center`: Call center work noise.
203
187
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/call-center.wav)
204
- *
205
- * Set to `null` to remove ambient sound from this agent.
188
+ * Set to `null` to remove ambient sound from this agent.
206
189
  */
207
190
  ambient_sound?:
208
191
  | 'coffee-shop'
@@ -266,6 +249,11 @@ export interface AgentResponse {
266
249
  */
267
250
  boosted_keywords?: Array<string> | null;
268
251
 
252
+ /**
253
+ * Custom STT configuration. Only used when stt_mode is set to custom.
254
+ */
255
+ custom_stt_config?: AgentResponse.CustomSttConfig;
256
+
269
257
  /**
270
258
  * Granular setting to manage how Retell stores sensitive data (transcripts,
271
259
  * recordings, logs, etc.). This replaces the deprecated
@@ -280,9 +268,10 @@ export interface AgentResponse {
280
268
  data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only';
281
269
 
282
270
  /**
283
- * If set, determines what denoising mode to use. Default to noise-cancellation.
271
+ * If set, determines what denoising mode to use. Use "no-denoise" to bypass all
272
+ * audio denoising. Default to noise-cancellation.
284
273
  */
285
- denoising_mode?: 'noise-cancellation' | 'noise-and-background-speech-cancellation';
274
+ denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation';
286
275
 
287
276
  /**
288
277
  * Controls whether the agent would backchannel (agent interjects the speaker with
@@ -292,6 +281,18 @@ export interface AgentResponse {
292
281
  */
293
282
  enable_backchannel?: boolean;
294
283
 
284
+ /**
285
+ * If set to true, will enable dynamic voice speed adjustment based on the user's
286
+ * speech rate and conversation context. If unset, default value false will apply.
287
+ */
288
+ enable_dynamic_voice_speed?: boolean;
289
+
290
+ /**
291
+ * If set to true, will detect whether the call enters a voicemail. Note that this
292
+ * feature is only available for phone calls.
293
+ */
294
+ enable_voicemail_detection?: boolean;
295
+
295
296
  /**
296
297
  * If users stay silent for a period after agent speech, end the call. The minimum
297
298
  * value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).
@@ -307,6 +308,12 @@ export interface AgentResponse {
307
308
  */
308
309
  fallback_voice_ids?: Array<string> | null;
309
310
 
311
+ /**
312
+ * Configuration for guardrail checks to detect and prevent prohibited topics in
313
+ * agent output and user input.
314
+ */
315
+ guardrail_config?: AgentResponse.GuardrailConfig;
316
+
310
317
  /**
311
318
  * Controls how sensitive the agent is to user interruptions. Value ranging from
312
319
  * [0,1]. Lower value means it will take longer / more words for user to interrupt
@@ -316,16 +323,29 @@ export interface AgentResponse {
316
323
  */
317
324
  interruption_sensitivity?: number;
318
325
 
326
+ /**
327
+ * Whether the agent is public. When set to true, the agent is available for public
328
+ * agent preview link.
329
+ */
330
+ is_public?: boolean | null;
331
+
319
332
  /**
320
333
  * Whether the agent is published.
321
334
  */
322
335
  is_published?: boolean;
323
336
 
337
+ /**
338
+ * If this option is set, the call will try to detect IVR in the first 3 minutes of
339
+ * the call. Actions defined will be applied when the IVR is detected. Set this to
340
+ * null to disable IVR detection.
341
+ */
342
+ ivr_option?: AgentResponse.IvrOption | null;
343
+
324
344
  /**
325
345
  * Specifies what language (and dialect) the speech recognition will operate in.
326
346
  * For instance, selecting `en-GB` optimizes speech recognition for British
327
347
  * English. If unset, will use default value `en-US`. Select `multi` for
328
- * multilingual support, currently this supports Spanish and English.
348
+ * multilingual support.
329
349
  */
330
350
  language?:
331
351
  | 'en-US'
@@ -350,11 +370,11 @@ export interface AgentResponse {
350
370
  | 'nl-BE'
351
371
  | 'pl-PL'
352
372
  | 'tr-TR'
353
- | 'th-TH'
354
373
  | 'vi-VN'
355
374
  | 'ro-RO'
356
375
  | 'bg-BG'
357
376
  | 'ca-ES'
377
+ | 'th-TH'
358
378
  | 'da-DK'
359
379
  | 'fi-FI'
360
380
  | 'el-GR'
@@ -363,6 +383,34 @@ export interface AgentResponse {
363
383
  | 'no-NO'
364
384
  | 'sk-SK'
365
385
  | 'sv-SE'
386
+ | 'lt-LT'
387
+ | 'lv-LV'
388
+ | 'cs-CZ'
389
+ | 'ms-MY'
390
+ | 'af-ZA'
391
+ | 'ar-SA'
392
+ | 'az-AZ'
393
+ | 'bs-BA'
394
+ | 'cy-GB'
395
+ | 'fa-IR'
396
+ | 'fil-PH'
397
+ | 'gl-ES'
398
+ | 'he-IL'
399
+ | 'hr-HR'
400
+ | 'hy-AM'
401
+ | 'is-IS'
402
+ | 'kk-KZ'
403
+ | 'kn-IN'
404
+ | 'mk-MK'
405
+ | 'mr-IN'
406
+ | 'ne-NP'
407
+ | 'sl-SI'
408
+ | 'sr-RS'
409
+ | 'sw-KE'
410
+ | 'ta-IN'
411
+ | 'ur-IN'
412
+ | 'yue-CN'
413
+ | 'uk-UA'
366
414
  | 'multi';
367
415
 
368
416
  /**
@@ -415,12 +463,15 @@ export interface AgentResponse {
415
463
  | 'gpt-4.1-mini'
416
464
  | 'gpt-4.1-nano'
417
465
  | 'gpt-5'
466
+ | 'gpt-5.1'
467
+ | 'gpt-5.2'
418
468
  | 'gpt-5-mini'
419
469
  | 'gpt-5-nano'
420
470
  | 'claude-4.5-sonnet'
421
471
  | 'claude-4.5-haiku'
422
472
  | 'gemini-2.5-flash'
423
473
  | 'gemini-2.5-flash-lite'
474
+ | 'gemini-3.0-flash'
424
475
  | null;
425
476
 
426
477
  /**
@@ -468,16 +519,17 @@ export interface AgentResponse {
468
519
 
469
520
  /**
470
521
  * If set, determines whether speech to text should focus on latency or accuracy.
471
- * Default to fast mode.
522
+ * Default to fast mode. When set to custom, custom_stt_config must be provided.
472
523
  */
473
- stt_mode?: 'fast' | 'accurate';
524
+ stt_mode?: 'fast' | 'accurate' | 'custom';
474
525
 
475
526
  user_dtmf_options?: AgentResponse.UserDtmfOptions | null;
476
527
 
477
528
  /**
478
- * Version of the agent.
529
+ * Optional description of the agent version. Used for your own reference and
530
+ * documentation.
479
531
  */
480
- version?: number;
532
+ version_description?: string | null;
481
533
 
482
534
  /**
483
535
  * If set, determines the vocabulary set to use for transcription. This setting
@@ -487,10 +539,15 @@ export interface AgentResponse {
487
539
  vocab_specialization?: 'general' | 'medical';
488
540
 
489
541
  /**
490
- * Optionally set the voice model used for the selected voice. Currently only
491
- * elevenlab voices have voice model selections. Set to null to remove voice model
492
- * selection, and default ones will apply. Check out the dashboard for details on
493
- * each voice model.
542
+ * Controls the emotional tone of the agent's voice. Currently supported for
543
+ * Cartesia and Minimax TTS providers. If unset, no emotion will be used.
544
+ */
545
+ voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised' | null;
546
+
547
+ /**
548
+ * Select the voice model used for the selected voice. Each provider has a set of
549
+ * available voice models. Set to null to remove voice model selection, and default
550
+ * ones will apply. Check out dashboard for more details of each voice model.
494
551
  */
495
552
  voice_model?:
496
553
  | 'eleven_turbo_v2'
@@ -498,8 +555,14 @@ export interface AgentResponse {
498
555
  | 'eleven_turbo_v2_5'
499
556
  | 'eleven_flash_v2_5'
500
557
  | 'eleven_multilingual_v2'
558
+ | 'sonic-2'
559
+ | 'sonic-3'
560
+ | 'sonic-3-latest'
561
+ | 'sonic-turbo'
501
562
  | 'tts-1'
502
563
  | 'gpt-4o-mini-tts'
564
+ | 'speech-02-turbo'
565
+ | 'speech-2.8-turbo'
503
566
  | null;
504
567
 
505
568
  /**
@@ -517,6 +580,21 @@ export interface AgentResponse {
517
580
  */
518
581
  voice_temperature?: number;
519
582
 
583
+ /**
584
+ * Configures when to stop running voicemail detection, as it becomes unlikely to
585
+ * hit voicemail after a couple minutes, and keep running it will only have
586
+ * negative impact. The minimum value allowed is 5,000 ms (5 s), and maximum value
587
+ * allowed is 180,000 (3 minutes). By default, this is set to 30,000 (30 s).
588
+ */
589
+ voicemail_detection_timeout_ms?: number;
590
+
591
+ /**
592
+ * The message to be played when the call enters a voicemail. Note that this
593
+ * feature is only available for phone calls. If you want to hangup after hitting
594
+ * voicemail, set this to empty string.
595
+ */
596
+ voicemail_message?: string;
597
+
520
598
  /**
521
599
  * If this option is set, the call will try to detect voicemail in the first 3
522
600
  * minutes of the call. Actions defined (hangup, or leave a message) will be
@@ -532,6 +610,21 @@ export interface AgentResponse {
532
610
  */
533
611
  volume?: number;
534
612
 
613
+ /**
614
+ * Which webhook events this agent should receive. If not set, defaults to
615
+ * call_started, call_ended, call_analyzed.
616
+ */
617
+ webhook_events?: Array<
618
+ | 'call_started'
619
+ | 'call_ended'
620
+ | 'call_analyzed'
621
+ | 'transcript_updated'
622
+ | 'transfer_started'
623
+ | 'transfer_bridged'
624
+ | 'transfer_cancelled'
625
+ | 'transfer_ended'
626
+ > | null;
627
+
535
628
  /**
536
629
  * The timeout for the webhook in milliseconds. If not set, default value of 10000
537
630
  * will apply.
@@ -594,6 +687,65 @@ export namespace AgentResponse {
594
687
  version?: number | null;
595
688
  }
596
689
 
690
+ /**
691
+ * Custom STT configuration. Only used when stt_mode is set to custom.
692
+ */
693
+ export interface CustomSttConfig {
694
+ /**
695
+ * Endpointing timeout in milliseconds. Minimum is 100 for azure, 10 for deepgram.
696
+ */
697
+ endpointing_ms: number;
698
+
699
+ /**
700
+ * The STT provider to use.
701
+ */
702
+ provider: 'azure' | 'deepgram';
703
+ }
704
+
705
+ /**
706
+ * Configuration for guardrail checks to detect and prevent prohibited topics in
707
+ * agent output and user input.
708
+ */
709
+ export interface GuardrailConfig {
710
+ /**
711
+ * Selected prohibited user topic categories to check. When user messages contain
712
+ * these topics, the agent will respond with a placeholder message instead of
713
+ * processing the request.
714
+ */
715
+ input_topics?: Array<'platform_integrity_jailbreaking'> | null;
716
+
717
+ /**
718
+ * Selected prohibited agent topic categories to check. When agent messages contain
719
+ * these topics, they will be replaced with a placeholder message.
720
+ */
721
+ output_topics?: Array<
722
+ | 'harassment'
723
+ | 'self_harm'
724
+ | 'sexual_exploitation'
725
+ | 'violence'
726
+ | 'defense_and_national_security'
727
+ | 'illicit_and_harmful_activity'
728
+ | 'gambling'
729
+ | 'regulated_professional_advice'
730
+ | 'child_safety_and_exploitation'
731
+ > | null;
732
+ }
733
+
734
+ /**
735
+ * If this option is set, the call will try to detect IVR in the first 3 minutes of
736
+ * the call. Actions defined will be applied when the IVR is detected. Set this to
737
+ * null to disable IVR detection.
738
+ */
739
+ export interface IvrOption {
740
+ action: IvrOption.Action;
741
+ }
742
+
743
+ export namespace IvrOption {
744
+ export interface Action {
745
+ type: 'hangup';
746
+ }
747
+ }
748
+
597
749
  /**
598
750
  * Configuration for PII scrubbing from transcripts and recordings.
599
751
  */
@@ -615,6 +767,7 @@ export namespace AgentResponse {
615
767
  | 'pin'
616
768
  | 'medical_id'
617
769
  | 'date_of_birth'
770
+ | 'customer_account_number'
618
771
  >;
619
772
 
620
773
  /**
@@ -728,7 +881,7 @@ export namespace AgentResponse {
728
881
 
729
882
  /**
730
883
  * A single key that signals the end of DTMF input. Acceptable values include any
731
- * digit (09), the pound/hash symbol (#), or the asterisk (\*).
884
+ * digit (0-9), the pound/hash symbol (#), or the asterisk (\*).
732
885
  */
733
886
  termination_key?: string | null;
734
887
 
@@ -749,7 +902,8 @@ export namespace AgentResponse {
749
902
  action:
750
903
  | VoicemailOption.VoicemailActionPrompt
751
904
  | VoicemailOption.VoicemailActionStaticText
752
- | VoicemailOption.VoicemailActionHangup;
905
+ | VoicemailOption.VoicemailActionHangup
906
+ | VoicemailOption.VoicemailActionBridgeTransfer;
753
907
  }
754
908
 
755
909
  export namespace VoicemailOption {
@@ -775,6 +929,10 @@ export namespace AgentResponse {
775
929
  export interface VoicemailActionHangup {
776
930
  type: 'hangup';
777
931
  }
932
+
933
+ export interface VoicemailActionBridgeTransfer {
934
+ type: 'bridge_transfer';
935
+ }
778
936
  }
779
937
  }
780
938
 
@@ -816,24 +974,18 @@ export interface AgentCreateParams {
816
974
  *
817
975
  * - `coffee-shop`: Coffee shop ambience with people chatting in background.
818
976
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/coffee-shop.wav)
819
- *
820
977
  * - `convention-hall`: Convention hall ambience, with some echo and people
821
978
  * chatting in background.
822
979
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/convention-hall.wav)
823
- *
824
980
  * - `summer-outdoor`: Summer outdoor ambience with cicada chirping.
825
981
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/summer-outdoor.wav)
826
- *
827
982
  * - `mountain-outdoor`: Mountain outdoor ambience with birds singing.
828
983
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/mountain-outdoor.wav)
829
- *
830
984
  * - `static-noise`: Constant static noise.
831
985
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/static-noise.wav)
832
- *
833
986
  * - `call-center`: Call center work noise.
834
987
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/call-center.wav)
835
- *
836
- * Set to `null` to remove ambient sound from this agent.
988
+ * Set to `null` to remove ambient sound from this agent.
837
989
  */
838
990
  ambient_sound?:
839
991
  | 'coffee-shop'
@@ -897,6 +1049,11 @@ export interface AgentCreateParams {
897
1049
  */
898
1050
  boosted_keywords?: Array<string> | null;
899
1051
 
1052
+ /**
1053
+ * Custom STT configuration. Only used when stt_mode is set to custom.
1054
+ */
1055
+ custom_stt_config?: AgentCreateParams.CustomSttConfig;
1056
+
900
1057
  /**
901
1058
  * Granular setting to manage how Retell stores sensitive data (transcripts,
902
1059
  * recordings, logs, etc.). This replaces the deprecated
@@ -911,9 +1068,10 @@ export interface AgentCreateParams {
911
1068
  data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only';
912
1069
 
913
1070
  /**
914
- * If set, determines what denoising mode to use. Default to noise-cancellation.
1071
+ * If set, determines what denoising mode to use. Use "no-denoise" to bypass all
1072
+ * audio denoising. Default to noise-cancellation.
915
1073
  */
916
- denoising_mode?: 'noise-cancellation' | 'noise-and-background-speech-cancellation';
1074
+ denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation';
917
1075
 
918
1076
  /**
919
1077
  * Controls whether the agent would backchannel (agent interjects the speaker with
@@ -923,6 +1081,18 @@ export interface AgentCreateParams {
923
1081
  */
924
1082
  enable_backchannel?: boolean;
925
1083
 
1084
+ /**
1085
+ * If set to true, will enable dynamic voice speed adjustment based on the user's
1086
+ * speech rate and conversation context. If unset, default value false will apply.
1087
+ */
1088
+ enable_dynamic_voice_speed?: boolean;
1089
+
1090
+ /**
1091
+ * If set to true, will detect whether the call enters a voicemail. Note that this
1092
+ * feature is only available for phone calls.
1093
+ */
1094
+ enable_voicemail_detection?: boolean;
1095
+
926
1096
  /**
927
1097
  * If users stay silent for a period after agent speech, end the call. The minimum
928
1098
  * value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).
@@ -938,6 +1108,12 @@ export interface AgentCreateParams {
938
1108
  */
939
1109
  fallback_voice_ids?: Array<string> | null;
940
1110
 
1111
+ /**
1112
+ * Configuration for guardrail checks to detect and prevent prohibited topics in
1113
+ * agent output and user input.
1114
+ */
1115
+ guardrail_config?: AgentCreateParams.GuardrailConfig;
1116
+
941
1117
  /**
942
1118
  * Controls how sensitive the agent is to user interruptions. Value ranging from
943
1119
  * [0,1]. Lower value means it will take longer / more words for user to interrupt
@@ -947,11 +1123,24 @@ export interface AgentCreateParams {
947
1123
  */
948
1124
  interruption_sensitivity?: number;
949
1125
 
1126
+ /**
1127
+ * Whether the agent is public. When set to true, the agent is available for public
1128
+ * agent preview link.
1129
+ */
1130
+ is_public?: boolean | null;
1131
+
1132
+ /**
1133
+ * If this option is set, the call will try to detect IVR in the first 3 minutes of
1134
+ * the call. Actions defined will be applied when the IVR is detected. Set this to
1135
+ * null to disable IVR detection.
1136
+ */
1137
+ ivr_option?: AgentCreateParams.IvrOption | null;
1138
+
950
1139
  /**
951
1140
  * Specifies what language (and dialect) the speech recognition will operate in.
952
1141
  * For instance, selecting `en-GB` optimizes speech recognition for British
953
1142
  * English. If unset, will use default value `en-US`. Select `multi` for
954
- * multilingual support, currently this supports Spanish and English.
1143
+ * multilingual support.
955
1144
  */
956
1145
  language?:
957
1146
  | 'en-US'
@@ -976,11 +1165,11 @@ export interface AgentCreateParams {
976
1165
  | 'nl-BE'
977
1166
  | 'pl-PL'
978
1167
  | 'tr-TR'
979
- | 'th-TH'
980
1168
  | 'vi-VN'
981
1169
  | 'ro-RO'
982
1170
  | 'bg-BG'
983
1171
  | 'ca-ES'
1172
+ | 'th-TH'
984
1173
  | 'da-DK'
985
1174
  | 'fi-FI'
986
1175
  | 'el-GR'
@@ -989,6 +1178,34 @@ export interface AgentCreateParams {
989
1178
  | 'no-NO'
990
1179
  | 'sk-SK'
991
1180
  | 'sv-SE'
1181
+ | 'lt-LT'
1182
+ | 'lv-LV'
1183
+ | 'cs-CZ'
1184
+ | 'ms-MY'
1185
+ | 'af-ZA'
1186
+ | 'ar-SA'
1187
+ | 'az-AZ'
1188
+ | 'bs-BA'
1189
+ | 'cy-GB'
1190
+ | 'fa-IR'
1191
+ | 'fil-PH'
1192
+ | 'gl-ES'
1193
+ | 'he-IL'
1194
+ | 'hr-HR'
1195
+ | 'hy-AM'
1196
+ | 'is-IS'
1197
+ | 'kk-KZ'
1198
+ | 'kn-IN'
1199
+ | 'mk-MK'
1200
+ | 'mr-IN'
1201
+ | 'ne-NP'
1202
+ | 'sl-SI'
1203
+ | 'sr-RS'
1204
+ | 'sw-KE'
1205
+ | 'ta-IN'
1206
+ | 'ur-IN'
1207
+ | 'yue-CN'
1208
+ | 'uk-UA'
992
1209
  | 'multi';
993
1210
 
994
1211
  /**
@@ -1041,12 +1258,15 @@ export interface AgentCreateParams {
1041
1258
  | 'gpt-4.1-mini'
1042
1259
  | 'gpt-4.1-nano'
1043
1260
  | 'gpt-5'
1261
+ | 'gpt-5.1'
1262
+ | 'gpt-5.2'
1044
1263
  | 'gpt-5-mini'
1045
1264
  | 'gpt-5-nano'
1046
1265
  | 'claude-4.5-sonnet'
1047
1266
  | 'claude-4.5-haiku'
1048
1267
  | 'gemini-2.5-flash'
1049
1268
  | 'gemini-2.5-flash-lite'
1269
+ | 'gemini-3.0-flash'
1050
1270
  | null;
1051
1271
 
1052
1272
  /**
@@ -1094,12 +1314,18 @@ export interface AgentCreateParams {
1094
1314
 
1095
1315
  /**
1096
1316
  * If set, determines whether speech to text should focus on latency or accuracy.
1097
- * Default to fast mode.
1317
+ * Default to fast mode. When set to custom, custom_stt_config must be provided.
1098
1318
  */
1099
- stt_mode?: 'fast' | 'accurate';
1319
+ stt_mode?: 'fast' | 'accurate' | 'custom';
1100
1320
 
1101
1321
  user_dtmf_options?: AgentCreateParams.UserDtmfOptions | null;
1102
1322
 
1323
+ /**
1324
+ * Optional description of the agent version. Used for your own reference and
1325
+ * documentation.
1326
+ */
1327
+ version_description?: string | null;
1328
+
1103
1329
  /**
1104
1330
  * If set, determines the vocabulary set to use for transcription. This setting
1105
1331
  * only applies for English agents, for non English agent, this setting is a no-op.
@@ -1108,10 +1334,15 @@ export interface AgentCreateParams {
1108
1334
  vocab_specialization?: 'general' | 'medical';
1109
1335
 
1110
1336
  /**
1111
- * Optionally set the voice model used for the selected voice. Currently only
1112
- * elevenlab voices have voice model selections. Set to null to remove voice model
1113
- * selection, and default ones will apply. Check out the dashboard for details on
1114
- * each voice model.
1337
+ * Controls the emotional tone of the agent's voice. Currently supported for
1338
+ * Cartesia and Minimax TTS providers. If unset, no emotion will be used.
1339
+ */
1340
+ voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised' | null;
1341
+
1342
+ /**
1343
+ * Select the voice model used for the selected voice. Each provider has a set of
1344
+ * available voice models. Set to null to remove voice model selection, and default
1345
+ * ones will apply. Check out dashboard for more details of each voice model.
1115
1346
  */
1116
1347
  voice_model?:
1117
1348
  | 'eleven_turbo_v2'
@@ -1119,8 +1350,14 @@ export interface AgentCreateParams {
1119
1350
  | 'eleven_turbo_v2_5'
1120
1351
  | 'eleven_flash_v2_5'
1121
1352
  | 'eleven_multilingual_v2'
1353
+ | 'sonic-2'
1354
+ | 'sonic-3'
1355
+ | 'sonic-3-latest'
1356
+ | 'sonic-turbo'
1122
1357
  | 'tts-1'
1123
1358
  | 'gpt-4o-mini-tts'
1359
+ | 'speech-02-turbo'
1360
+ | 'speech-2.8-turbo'
1124
1361
  | null;
1125
1362
 
1126
1363
  /**
@@ -1138,6 +1375,21 @@ export interface AgentCreateParams {
1138
1375
  */
1139
1376
  voice_temperature?: number;
1140
1377
 
1378
+ /**
1379
+ * Configures when to stop running voicemail detection, as it becomes unlikely to
1380
+ * hit voicemail after a couple minutes, and keep running it will only have
1381
+ * negative impact. The minimum value allowed is 5,000 ms (5 s), and maximum value
1382
+ * allowed is 180,000 (3 minutes). By default, this is set to 30,000 (30 s).
1383
+ */
1384
+ voicemail_detection_timeout_ms?: number;
1385
+
1386
+ /**
1387
+ * The message to be played when the call enters a voicemail. Note that this
1388
+ * feature is only available for phone calls. If you want to hangup after hitting
1389
+ * voicemail, set this to empty string.
1390
+ */
1391
+ voicemail_message?: string;
1392
+
1141
1393
  /**
1142
1394
  * If this option is set, the call will try to detect voicemail in the first 3
1143
1395
  * minutes of the call. Actions defined (hangup, or leave a message) will be
@@ -1153,6 +1405,21 @@ export interface AgentCreateParams {
1153
1405
  */
1154
1406
  volume?: number;
1155
1407
 
1408
+ /**
1409
+ * Which webhook events this agent should receive. If not set, defaults to
1410
+ * call_started, call_ended, call_analyzed.
1411
+ */
1412
+ webhook_events?: Array<
1413
+ | 'call_started'
1414
+ | 'call_ended'
1415
+ | 'call_analyzed'
1416
+ | 'transcript_updated'
1417
+ | 'transfer_started'
1418
+ | 'transfer_bridged'
1419
+ | 'transfer_cancelled'
1420
+ | 'transfer_ended'
1421
+ > | null;
1422
+
1156
1423
  /**
1157
1424
  * The timeout for the webhook in milliseconds. If not set, default value of 10000
1158
1425
  * will apply.
@@ -1215,6 +1482,65 @@ export namespace AgentCreateParams {
1215
1482
  version?: number | null;
1216
1483
  }
1217
1484
 
1485
+ /**
1486
+ * Custom STT configuration. Only used when stt_mode is set to custom.
1487
+ */
1488
+ export interface CustomSttConfig {
1489
+ /**
1490
+ * Endpointing timeout in milliseconds. Minimum is 100 for azure, 10 for deepgram.
1491
+ */
1492
+ endpointing_ms: number;
1493
+
1494
+ /**
1495
+ * The STT provider to use.
1496
+ */
1497
+ provider: 'azure' | 'deepgram';
1498
+ }
1499
+
1500
+ /**
1501
+ * Configuration for guardrail checks to detect and prevent prohibited topics in
1502
+ * agent output and user input.
1503
+ */
1504
+ export interface GuardrailConfig {
1505
+ /**
1506
+ * Selected prohibited user topic categories to check. When user messages contain
1507
+ * these topics, the agent will respond with a placeholder message instead of
1508
+ * processing the request.
1509
+ */
1510
+ input_topics?: Array<'platform_integrity_jailbreaking'> | null;
1511
+
1512
+ /**
1513
+ * Selected prohibited agent topic categories to check. When agent messages contain
1514
+ * these topics, they will be replaced with a placeholder message.
1515
+ */
1516
+ output_topics?: Array<
1517
+ | 'harassment'
1518
+ | 'self_harm'
1519
+ | 'sexual_exploitation'
1520
+ | 'violence'
1521
+ | 'defense_and_national_security'
1522
+ | 'illicit_and_harmful_activity'
1523
+ | 'gambling'
1524
+ | 'regulated_professional_advice'
1525
+ | 'child_safety_and_exploitation'
1526
+ > | null;
1527
+ }
1528
+
1529
+ /**
1530
+ * If this option is set, the call will try to detect IVR in the first 3 minutes of
1531
+ * the call. Actions defined will be applied when the IVR is detected. Set this to
1532
+ * null to disable IVR detection.
1533
+ */
1534
+ export interface IvrOption {
1535
+ action: IvrOption.Action;
1536
+ }
1537
+
1538
+ export namespace IvrOption {
1539
+ export interface Action {
1540
+ type: 'hangup';
1541
+ }
1542
+ }
1543
+
1218
1544
  /**
1219
1545
  * Configuration for PII scrubbing from transcripts and recordings.
1220
1546
  */
@@ -1236,6 +1562,7 @@ export namespace AgentCreateParams {
1236
1562
  | 'pin'
1237
1563
  | 'medical_id'
1238
1564
  | 'date_of_birth'
1565
+ | 'customer_account_number'
1239
1566
  >;
1240
1567
 
1241
1568
  /**
@@ -1349,7 +1676,7 @@ export namespace AgentCreateParams {
1349
1676
 
1350
1677
  /**
1351
1678
  * A single key that signals the end of DTMF input. Acceptable values include any
1352
- * digit (09), the pound/hash symbol (#), or the asterisk (\*).
1679
+ * digit (0-9), the pound/hash symbol (#), or the asterisk (\*).
1353
1680
  */
1354
1681
  termination_key?: string | null;
1355
1682
 
@@ -1370,7 +1697,8 @@ export namespace AgentCreateParams {
1370
1697
  action:
1371
1698
  | VoicemailOption.VoicemailActionPrompt
1372
1699
  | VoicemailOption.VoicemailActionStaticText
1373
- | VoicemailOption.VoicemailActionHangup;
1700
+ | VoicemailOption.VoicemailActionHangup
1701
+ | VoicemailOption.VoicemailActionBridgeTransfer;
1374
1702
  }
1375
1703
 
1376
1704
  export namespace VoicemailOption {
@@ -1396,6 +1724,10 @@ export namespace AgentCreateParams {
1396
1724
  export interface VoicemailActionHangup {
1397
1725
  type: 'hangup';
1398
1726
  }
1727
+
1728
+ export interface VoicemailActionBridgeTransfer {
1729
+ type: 'bridge_transfer';
1730
+ }
1399
1731
  }
1400
1732
  }
1401
1733
 
@@ -1431,24 +1763,18 @@ export interface AgentUpdateParams {
1431
1763
  *
1432
1764
  * - `coffee-shop`: Coffee shop ambience with people chatting in background.
1433
1765
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/coffee-shop.wav)
1434
- *
1435
1766
  * - `convention-hall`: Convention hall ambience, with some echo and people
1436
1767
  * chatting in background.
1437
1768
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/convention-hall.wav)
1438
- *
1439
1769
  * - `summer-outdoor`: Summer outdoor ambience with cicada chirping.
1440
1770
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/summer-outdoor.wav)
1441
- *
1442
1771
  * - `mountain-outdoor`: Mountain outdoor ambience with birds singing.
1443
1772
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/mountain-outdoor.wav)
1444
- *
1445
1773
  * - `static-noise`: Constant static noise.
1446
1774
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/static-noise.wav)
1447
- *
1448
1775
  * - `call-center`: Call center work noise.
1449
1776
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/call-center.wav)
1450
- *
1451
- * Set to `null` to remove ambient sound from this agent.
1777
+ * Set to `null` to remove ambient sound from this agent.
1452
1778
  */
1453
1779
  ambient_sound?:
1454
1780
  | 'coffee-shop'
@@ -1512,6 +1838,11 @@ export interface AgentUpdateParams {
1512
1838
  */
1513
1839
  boosted_keywords?: Array<string> | null;
1514
1840
 
1841
+ /**
1842
+ * Body param: Custom STT configuration. Only used when stt_mode is set to custom.
1843
+ */
1844
+ custom_stt_config?: AgentUpdateParams.CustomSttConfig;
1845
+
1515
1846
  /**
1516
1847
  * Body param: Granular setting to manage how Retell stores sensitive data
1517
1848
  * (transcripts, recordings, logs, etc.). This replaces the deprecated
@@ -1526,10 +1857,10 @@ export interface AgentUpdateParams {
1526
1857
  data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only';
1527
1858
 
1528
1859
  /**
1529
- * Body param: If set, determines what denoising mode to use. Default to
1530
- * noise-cancellation.
1860
+ * Body param: If set, determines what denoising mode to use. Use "no-denoise" to
1861
+ * bypass all audio denoising. Default to noise-cancellation.
1531
1862
  */
1532
- denoising_mode?: 'noise-cancellation' | 'noise-and-background-speech-cancellation';
1863
+ denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation';
1533
1864
 
1534
1865
  /**
1535
1866
  * Body param: Controls whether the agent would backchannel (agent interjects the
@@ -1539,6 +1870,19 @@ export interface AgentUpdateParams {
1539
1870
  */
1540
1871
  enable_backchannel?: boolean;
1541
1872
 
1873
+ /**
1874
+ * Body param: If set to true, will enable dynamic voice speed adjustment based on
1875
+ * the user's speech rate and conversation context. If unset, default value false
1876
+ * will apply.
1877
+ */
1878
+ enable_dynamic_voice_speed?: boolean;
1879
+
1880
+ /**
1881
+ * Body param: If set to true, will detect whether the call enters a voicemail.
1882
+ * Note that this feature is only available for phone calls.
1883
+ */
1884
+ enable_voicemail_detection?: boolean;
1885
+
1542
1886
  /**
1543
1887
  * Body param: If users stay silent for a period after agent speech, end the call.
1544
1888
  * The minimum value allowed is 10,000 ms (10 s). By default, this is set to 600000
@@ -1555,6 +1899,12 @@ export interface AgentUpdateParams {
1555
1899
  */
1556
1900
  fallback_voice_ids?: Array<string> | null;
1557
1901
 
1902
+ /**
1903
+ * Body param: Configuration for guardrail checks to detect and prevent prohibited
1904
+ * topics in agent output and user input.
1905
+ */
1906
+ guardrail_config?: AgentUpdateParams.GuardrailConfig;
1907
+
1558
1908
  /**
1559
1909
  * Body param: Controls how sensitive the agent is to user interruptions. Value
1560
1910
  * ranging from [0,1]. Lower value means it will take longer / more words for user
@@ -1564,11 +1914,24 @@ export interface AgentUpdateParams {
1564
1914
  */
1565
1915
  interruption_sensitivity?: number;
1566
1916
 
1917
+ /**
1918
+ * Body param: Whether the agent is public. When set to true, the agent is
1919
+ * available for public agent preview link.
1920
+ */
1921
+ is_public?: boolean | null;
1922
+
1923
+ /**
1924
+ * Body param: If this option is set, the call will try to detect IVR in the first
1925
+ * 3 minutes of the call. Actions defined will be applied when the IVR is detected.
1926
+ * Set this to null to disable IVR detection.
1927
+ */
1928
+ ivr_option?: AgentUpdateParams.IvrOption | null;
1929
+
1567
1930
  /**
1568
1931
  * Body param: Specifies what language (and dialect) the speech recognition will
1569
1932
  * operate in. For instance, selecting `en-GB` optimizes speech recognition for
1570
1933
  * British English. If unset, will use default value `en-US`. Select `multi` for
1571
- * multilingual support, currently this supports Spanish and English.
1934
+ * multilingual support.
1572
1935
  */
1573
1936
  language?:
1574
1937
  | 'en-US'
@@ -1593,11 +1956,11 @@ export interface AgentUpdateParams {
1593
1956
  | 'nl-BE'
1594
1957
  | 'pl-PL'
1595
1958
  | 'tr-TR'
1596
- | 'th-TH'
1597
1959
  | 'vi-VN'
1598
1960
  | 'ro-RO'
1599
1961
  | 'bg-BG'
1600
1962
  | 'ca-ES'
1963
+ | 'th-TH'
1601
1964
  | 'da-DK'
1602
1965
  | 'fi-FI'
1603
1966
  | 'el-GR'
@@ -1606,6 +1969,34 @@ export interface AgentUpdateParams {
1606
1969
  | 'no-NO'
1607
1970
  | 'sk-SK'
1608
1971
  | 'sv-SE'
1972
+ | 'lt-LT'
1973
+ | 'lv-LV'
1974
+ | 'cs-CZ'
1975
+ | 'ms-MY'
1976
+ | 'af-ZA'
1977
+ | 'ar-SA'
1978
+ | 'az-AZ'
1979
+ | 'bs-BA'
1980
+ | 'cy-GB'
1981
+ | 'fa-IR'
1982
+ | 'fil-PH'
1983
+ | 'gl-ES'
1984
+ | 'he-IL'
1985
+ | 'hr-HR'
1986
+ | 'hy-AM'
1987
+ | 'is-IS'
1988
+ | 'kk-KZ'
1989
+ | 'kn-IN'
1990
+ | 'mk-MK'
1991
+ | 'mr-IN'
1992
+ | 'ne-NP'
1993
+ | 'sl-SI'
1994
+ | 'sr-RS'
1995
+ | 'sw-KE'
1996
+ | 'ta-IN'
1997
+ | 'ur-IN'
1998
+ | 'yue-CN'
1999
+ | 'uk-UA'
1609
2000
  | 'multi';
1610
2001
 
1611
2002
  /**
@@ -1658,12 +2049,15 @@ export interface AgentUpdateParams {
1658
2049
  | 'gpt-4.1-mini'
1659
2050
  | 'gpt-4.1-nano'
1660
2051
  | 'gpt-5'
2052
+ | 'gpt-5.1'
2053
+ | 'gpt-5.2'
1661
2054
  | 'gpt-5-mini'
1662
2055
  | 'gpt-5-nano'
1663
2056
  | 'claude-4.5-sonnet'
1664
2057
  | 'claude-4.5-haiku'
1665
2058
  | 'gemini-2.5-flash'
1666
2059
  | 'gemini-2.5-flash-lite'
2060
+ | 'gemini-3.0-flash'
1667
2061
  | null;
1668
2062
 
1669
2063
  /**
@@ -1723,15 +2117,22 @@ export interface AgentUpdateParams {
1723
2117
 
1724
2118
  /**
1725
2119
  * Body param: If set, determines whether speech to text should focus on latency or
1726
- * accuracy. Default to fast mode.
2120
+ * accuracy. Default to fast mode. When set to custom, custom_stt_config must be
2121
+ * provided.
1727
2122
  */
1728
- stt_mode?: 'fast' | 'accurate';
2123
+ stt_mode?: 'fast' | 'accurate' | 'custom';
1729
2124
 
1730
2125
  /**
1731
- * Body param:
2126
+ * Body param
1732
2127
  */
1733
2128
  user_dtmf_options?: AgentUpdateParams.UserDtmfOptions | null;
1734
2129
 
2130
+ /**
2131
+ * Body param: Optional description of the agent version. Used for your own
2132
+ * reference and documentation.
2133
+ */
2134
+ version_description?: string | null;
2135
+
1735
2136
  /**
1736
2137
  * Body param: If set, determines the vocabulary set to use for transcription. This
1737
2138
  * setting only applies for English agents, for non English agent, this setting is
@@ -1739,6 +2140,13 @@ export interface AgentUpdateParams {
1739
2140
  */
1740
2141
  vocab_specialization?: 'general' | 'medical';
1741
2142
 
2143
+ /**
2144
+ * Body param: Controls the emotional tone of the agent's voice. Currently
2145
+ * supported for Cartesia and Minimax TTS providers. If unset, no emotion will be
2146
+ * used.
2147
+ */
2148
+ voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised' | null;
2149
+
1742
2150
  /**
1743
2151
  * Body param: Unique voice id used for the agent. Find list of available voices
1744
2152
  * and their preview in Dashboard.
@@ -1746,10 +2154,10 @@ export interface AgentUpdateParams {
1746
2154
  voice_id?: string;
1747
2155
 
1748
2156
  /**
1749
- * Body param: Optionally set the voice model used for the selected voice.
1750
- * Currently only elevenlab voices have voice model selections. Set to null to
1751
- * remove voice model selection, and default ones will apply. Check out the
1752
- * dashboard for details on each voice model.
2157
+ * Body param: Select the voice model used for the selected voice. Each provider
2158
+ * has a set of available voice models. Set to null to remove voice model
2159
+ * selection, and default ones will apply. Check out dashboard for more details of
2160
+ * each voice model.
1753
2161
  */
1754
2162
  voice_model?:
1755
2163
  | 'eleven_turbo_v2'
@@ -1757,8 +2165,14 @@ export interface AgentUpdateParams {
1757
2165
  | 'eleven_turbo_v2_5'
1758
2166
  | 'eleven_flash_v2_5'
1759
2167
  | 'eleven_multilingual_v2'
2168
+ | 'sonic-2'
2169
+ | 'sonic-3'
2170
+ | 'sonic-3-latest'
2171
+ | 'sonic-turbo'
1760
2172
  | 'tts-1'
1761
2173
  | 'gpt-4o-mini-tts'
2174
+ | 'speech-02-turbo'
2175
+ | 'speech-2.8-turbo'
1762
2176
  | null;
1763
2177
 
1764
2178
  /**
@@ -1776,6 +2190,21 @@ export interface AgentUpdateParams {
1776
2190
  */
1777
2191
  voice_temperature?: number;
1778
2192
 
2193
+ /**
2194
+ * Body param: Configures when to stop running voicemail detection, as it becomes
2195
+ * unlikely to hit voicemail after a couple minutes, and keep running it will only
2196
+ * have negative impact. The minimum value allowed is 5,000 ms (5 s), and maximum
2197
+ * value allowed is 180,000 (3 minutes). By default, this is set to 30,000 (30 s).
2198
+ */
2199
+ voicemail_detection_timeout_ms?: number;
2200
+
2201
+ /**
2202
+ * Body param: The message to be played when the call enters a voicemail. Note that
2203
+ * this feature is only available for phone calls. If you want to hangup after
2204
+ * hitting voicemail, set this to empty string.
2205
+ */
2206
+ voicemail_message?: string;
2207
+
1779
2208
  /**
1780
2209
  * Body param: If this option is set, the call will try to detect voicemail in the
1781
2210
  * first 3 minutes of the call. Actions defined (hangup, or leave a message) will
@@ -1791,6 +2220,21 @@ export interface AgentUpdateParams {
1791
2220
  */
1792
2221
  volume?: number;
1793
2222
 
2223
+ /**
2224
+ * Body param: Which webhook events this agent should receive. If not set, defaults
2225
+ * to call_started, call_ended, call_analyzed.
2226
+ */
2227
+ webhook_events?: Array<
2228
+ | 'call_started'
2229
+ | 'call_ended'
2230
+ | 'call_analyzed'
2231
+ | 'transcript_updated'
2232
+ | 'transfer_started'
2233
+ | 'transfer_bridged'
2234
+ | 'transfer_cancelled'
2235
+ | 'transfer_ended'
2236
+ > | null;
2237
+
1794
2238
  /**
1795
2239
  * Body param: The timeout for the webhook in milliseconds. If not set, default
1796
2240
  * value of 10000 will apply.
@@ -1807,6 +2251,65 @@ export interface AgentUpdateParams {
1807
2251
  }
1808
2252
 
1809
2253
  export namespace AgentUpdateParams {
2254
+ /**
2255
+ * Custom STT configuration. Only used when stt_mode is set to custom.
2256
+ */
2257
+ export interface CustomSttConfig {
2258
+ /**
2259
+ * Endpointing timeout in milliseconds. Minimum is 100 for azure, 10 for deepgram.
2260
+ */
2261
+ endpointing_ms: number;
2262
+
2263
+ /**
2264
+ * The STT provider to use.
2265
+ */
2266
+ provider: 'azure' | 'deepgram';
2267
+ }
2268
+
2269
+ /**
2270
+ * Configuration for guardrail checks to detect and prevent prohibited topics in
2271
+ * agent output and user input.
2272
+ */
2273
+ export interface GuardrailConfig {
2274
+ /**
2275
+ * Selected prohibited user topic categories to check. When user messages contain
2276
+ * these topics, the agent will respond with a placeholder message instead of
2277
+ * processing the request.
2278
+ */
2279
+ input_topics?: Array<'platform_integrity_jailbreaking'> | null;
2280
+
2281
+ /**
2282
+ * Selected prohibited agent topic categories to check. When agent messages contain
2283
+ * these topics, they will be replaced with a placeholder message.
2284
+ */
2285
+ output_topics?: Array<
2286
+ | 'harassment'
2287
+ | 'self_harm'
2288
+ | 'sexual_exploitation'
2289
+ | 'violence'
2290
+ | 'defense_and_national_security'
2291
+ | 'illicit_and_harmful_activity'
2292
+ | 'gambling'
2293
+ | 'regulated_professional_advice'
2294
+ | 'child_safety_and_exploitation'
2295
+ > | null;
2296
+ }
2297
+
2298
+ /**
2299
+ * If this option is set, the call will try to detect IVR in the first 3 minutes of
2300
+ * the call. Actions defined will be applied when the IVR is detected. Set this to
2301
+ * null to disable IVR detection.
2302
+ */
2303
+ export interface IvrOption {
2304
+ action: IvrOption.Action;
2305
+ }
2306
+
2307
+ export namespace IvrOption {
2308
+ export interface Action {
2309
+ type: 'hangup';
2310
+ }
2311
+ }
2312
+
1810
2313
  /**
1811
2314
  * Configuration for PII scrubbing from transcripts and recordings.
1812
2315
  */
@@ -1828,6 +2331,7 @@ export namespace AgentUpdateParams {
1828
2331
  | 'pin'
1829
2332
  | 'medical_id'
1830
2333
  | 'date_of_birth'
2334
+ | 'customer_account_number'
1831
2335
  >;
1832
2336
 
1833
2337
  /**
@@ -1987,7 +2491,7 @@ export namespace AgentUpdateParams {
1987
2491
 
1988
2492
  /**
1989
2493
  * A single key that signals the end of DTMF input. Acceptable values include any
1990
- * digit (09), the pound/hash symbol (#), or the asterisk (\*).
2494
+ * digit (0-9), the pound/hash symbol (#), or the asterisk (\*).
1991
2495
  */
1992
2496
  termination_key?: string | null;
1993
2497
 
@@ -2008,7 +2512,8 @@ export namespace AgentUpdateParams {
2008
2512
  action:
2009
2513
  | VoicemailOption.VoicemailActionPrompt
2010
2514
  | VoicemailOption.VoicemailActionStaticText
2011
- | VoicemailOption.VoicemailActionHangup;
2515
+ | VoicemailOption.VoicemailActionHangup
2516
+ | VoicemailOption.VoicemailActionBridgeTransfer;
2012
2517
  }
2013
2518
 
2014
2519
  export namespace VoicemailOption {
@@ -2034,6 +2539,10 @@ export namespace AgentUpdateParams {
2034
2539
  export interface VoicemailActionHangup {
2035
2540
  type: 'hangup';
2036
2541
  }
2542
+
2543
+ export interface VoicemailActionBridgeTransfer {
2544
+ type: 'bridge_transfer';
2545
+ }
2037
2546
  }
2038
2547
  }
2039
2548