retell-sdk 4.66.0 → 5.1.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 +7 -1341
  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 +374 -78
  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 +219 -27
  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 +529 -95
  395. package/src/resources/batch-call.ts +291 -24
  396. package/src/resources/call.ts +757 -105
  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,11 +323,24 @@ 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
@@ -363,6 +383,9 @@ export interface AgentResponse {
363
383
  | 'no-NO'
364
384
  | 'sk-SK'
365
385
  | 'sv-SE'
386
+ | 'lt-LT'
387
+ | 'lv-LV'
388
+ | 'cs-CZ'
366
389
  | 'ms-MY'
367
390
  | 'af-ZA'
368
391
  | 'ar-SA'
@@ -440,12 +463,15 @@ export interface AgentResponse {
440
463
  | 'gpt-4.1-mini'
441
464
  | 'gpt-4.1-nano'
442
465
  | 'gpt-5'
466
+ | 'gpt-5.1'
467
+ | 'gpt-5.2'
443
468
  | 'gpt-5-mini'
444
469
  | 'gpt-5-nano'
445
470
  | 'claude-4.5-sonnet'
446
471
  | 'claude-4.5-haiku'
447
472
  | 'gemini-2.5-flash'
448
473
  | 'gemini-2.5-flash-lite'
474
+ | 'gemini-3.0-flash'
449
475
  | null;
450
476
 
451
477
  /**
@@ -493,16 +519,17 @@ export interface AgentResponse {
493
519
 
494
520
  /**
495
521
  * If set, determines whether speech to text should focus on latency or accuracy.
496
- * Default to fast mode.
522
+ * Default to fast mode. When set to custom, custom_stt_config must be provided.
497
523
  */
498
- stt_mode?: 'fast' | 'accurate';
524
+ stt_mode?: 'fast' | 'accurate' | 'custom';
499
525
 
500
526
  user_dtmf_options?: AgentResponse.UserDtmfOptions | null;
501
527
 
502
528
  /**
503
- * Version of the agent.
529
+ * Optional description of the agent version. Used for your own reference and
530
+ * documentation.
504
531
  */
505
- version?: number;
532
+ version_description?: string | null;
506
533
 
507
534
  /**
508
535
  * If set, determines the vocabulary set to use for transcription. This setting
@@ -512,10 +539,15 @@ export interface AgentResponse {
512
539
  vocab_specialization?: 'general' | 'medical';
513
540
 
514
541
  /**
515
- * Optionally set the voice model used for the selected voice. Currently only
516
- * elevenlab voices have voice model selections. Set to null to remove voice model
517
- * selection, and default ones will apply. Check out the dashboard for details on
518
- * 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.
519
551
  */
520
552
  voice_model?:
521
553
  | 'eleven_turbo_v2'
@@ -523,8 +555,14 @@ export interface AgentResponse {
523
555
  | 'eleven_turbo_v2_5'
524
556
  | 'eleven_flash_v2_5'
525
557
  | 'eleven_multilingual_v2'
558
+ | 'sonic-2'
559
+ | 'sonic-3'
560
+ | 'sonic-3-latest'
561
+ | 'sonic-turbo'
526
562
  | 'tts-1'
527
563
  | 'gpt-4o-mini-tts'
564
+ | 'speech-02-turbo'
565
+ | 'speech-2.8-turbo'
528
566
  | null;
529
567
 
530
568
  /**
@@ -542,6 +580,21 @@ export interface AgentResponse {
542
580
  */
543
581
  voice_temperature?: number;
544
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
+
545
598
  /**
546
599
  * If this option is set, the call will try to detect voicemail in the first 3
547
600
  * minutes of the call. Actions defined (hangup, or leave a message) will be
@@ -557,6 +610,21 @@ export interface AgentResponse {
557
610
  */
558
611
  volume?: number;
559
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
+
560
628
  /**
561
629
  * The timeout for the webhook in milliseconds. If not set, default value of 10000
562
630
  * will apply.
@@ -619,6 +687,65 @@ export namespace AgentResponse {
619
687
  version?: number | null;
620
688
  }
621
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
+
622
749
  /**
623
750
  * Configuration for PII scrubbing from transcripts and recordings.
624
751
  */
@@ -640,6 +767,7 @@ export namespace AgentResponse {
640
767
  | 'pin'
641
768
  | 'medical_id'
642
769
  | 'date_of_birth'
770
+ | 'customer_account_number'
643
771
  >;
644
772
 
645
773
  /**
@@ -753,7 +881,7 @@ export namespace AgentResponse {
753
881
 
754
882
  /**
755
883
  * A single key that signals the end of DTMF input. Acceptable values include any
756
- * digit (09), the pound/hash symbol (#), or the asterisk (\*).
884
+ * digit (0-9), the pound/hash symbol (#), or the asterisk (\*).
757
885
  */
758
886
  termination_key?: string | null;
759
887
 
@@ -774,7 +902,8 @@ export namespace AgentResponse {
774
902
  action:
775
903
  | VoicemailOption.VoicemailActionPrompt
776
904
  | VoicemailOption.VoicemailActionStaticText
777
- | VoicemailOption.VoicemailActionHangup;
905
+ | VoicemailOption.VoicemailActionHangup
906
+ | VoicemailOption.VoicemailActionBridgeTransfer;
778
907
  }
779
908
 
780
909
  export namespace VoicemailOption {
@@ -800,6 +929,10 @@ export namespace AgentResponse {
800
929
  export interface VoicemailActionHangup {
801
930
  type: 'hangup';
802
931
  }
932
+
933
+ export interface VoicemailActionBridgeTransfer {
934
+ type: 'bridge_transfer';
935
+ }
803
936
  }
804
937
  }
805
938
 
@@ -841,24 +974,18 @@ export interface AgentCreateParams {
841
974
  *
842
975
  * - `coffee-shop`: Coffee shop ambience with people chatting in background.
843
976
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/coffee-shop.wav)
844
- *
845
977
  * - `convention-hall`: Convention hall ambience, with some echo and people
846
978
  * chatting in background.
847
979
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/convention-hall.wav)
848
- *
849
980
  * - `summer-outdoor`: Summer outdoor ambience with cicada chirping.
850
981
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/summer-outdoor.wav)
851
- *
852
982
  * - `mountain-outdoor`: Mountain outdoor ambience with birds singing.
853
983
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/mountain-outdoor.wav)
854
- *
855
984
  * - `static-noise`: Constant static noise.
856
985
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/static-noise.wav)
857
- *
858
986
  * - `call-center`: Call center work noise.
859
987
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/call-center.wav)
860
- *
861
- * Set to `null` to remove ambient sound from this agent.
988
+ * Set to `null` to remove ambient sound from this agent.
862
989
  */
863
990
  ambient_sound?:
864
991
  | 'coffee-shop'
@@ -922,6 +1049,11 @@ export interface AgentCreateParams {
922
1049
  */
923
1050
  boosted_keywords?: Array<string> | null;
924
1051
 
1052
+ /**
1053
+ * Custom STT configuration. Only used when stt_mode is set to custom.
1054
+ */
1055
+ custom_stt_config?: AgentCreateParams.CustomSttConfig;
1056
+
925
1057
  /**
926
1058
  * Granular setting to manage how Retell stores sensitive data (transcripts,
927
1059
  * recordings, logs, etc.). This replaces the deprecated
@@ -936,9 +1068,10 @@ export interface AgentCreateParams {
936
1068
  data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only';
937
1069
 
938
1070
  /**
939
- * 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.
940
1073
  */
941
- denoising_mode?: 'noise-cancellation' | 'noise-and-background-speech-cancellation';
1074
+ denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation';
942
1075
 
943
1076
  /**
944
1077
  * Controls whether the agent would backchannel (agent interjects the speaker with
@@ -948,6 +1081,18 @@ export interface AgentCreateParams {
948
1081
  */
949
1082
  enable_backchannel?: boolean;
950
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
+
951
1096
  /**
952
1097
  * If users stay silent for a period after agent speech, end the call. The minimum
953
1098
  * value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).
@@ -963,6 +1108,12 @@ export interface AgentCreateParams {
963
1108
  */
964
1109
  fallback_voice_ids?: Array<string> | null;
965
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
+
966
1117
  /**
967
1118
  * Controls how sensitive the agent is to user interruptions. Value ranging from
968
1119
  * [0,1]. Lower value means it will take longer / more words for user to interrupt
@@ -972,6 +1123,19 @@ export interface AgentCreateParams {
972
1123
  */
973
1124
  interruption_sensitivity?: number;
974
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
+
975
1139
  /**
976
1140
  * Specifies what language (and dialect) the speech recognition will operate in.
977
1141
  * For instance, selecting `en-GB` optimizes speech recognition for British
@@ -1014,6 +1178,9 @@ export interface AgentCreateParams {
1014
1178
  | 'no-NO'
1015
1179
  | 'sk-SK'
1016
1180
  | 'sv-SE'
1181
+ | 'lt-LT'
1182
+ | 'lv-LV'
1183
+ | 'cs-CZ'
1017
1184
  | 'ms-MY'
1018
1185
  | 'af-ZA'
1019
1186
  | 'ar-SA'
@@ -1091,12 +1258,15 @@ export interface AgentCreateParams {
1091
1258
  | 'gpt-4.1-mini'
1092
1259
  | 'gpt-4.1-nano'
1093
1260
  | 'gpt-5'
1261
+ | 'gpt-5.1'
1262
+ | 'gpt-5.2'
1094
1263
  | 'gpt-5-mini'
1095
1264
  | 'gpt-5-nano'
1096
1265
  | 'claude-4.5-sonnet'
1097
1266
  | 'claude-4.5-haiku'
1098
1267
  | 'gemini-2.5-flash'
1099
1268
  | 'gemini-2.5-flash-lite'
1269
+ | 'gemini-3.0-flash'
1100
1270
  | null;
1101
1271
 
1102
1272
  /**
@@ -1144,12 +1314,18 @@ export interface AgentCreateParams {
1144
1314
 
1145
1315
  /**
1146
1316
  * If set, determines whether speech to text should focus on latency or accuracy.
1147
- * Default to fast mode.
1317
+ * Default to fast mode. When set to custom, custom_stt_config must be provided.
1148
1318
  */
1149
- stt_mode?: 'fast' | 'accurate';
1319
+ stt_mode?: 'fast' | 'accurate' | 'custom';
1150
1320
 
1151
1321
  user_dtmf_options?: AgentCreateParams.UserDtmfOptions | null;
1152
1322
 
1323
+ /**
1324
+ * Optional description of the agent version. Used for your own reference and
1325
+ * documentation.
1326
+ */
1327
+ version_description?: string | null;
1328
+
1153
1329
  /**
1154
1330
  * If set, determines the vocabulary set to use for transcription. This setting
1155
1331
  * only applies for English agents, for non English agent, this setting is a no-op.
@@ -1158,10 +1334,15 @@ export interface AgentCreateParams {
1158
1334
  vocab_specialization?: 'general' | 'medical';
1159
1335
 
1160
1336
  /**
1161
- * Optionally set the voice model used for the selected voice. Currently only
1162
- * elevenlab voices have voice model selections. Set to null to remove voice model
1163
- * selection, and default ones will apply. Check out the dashboard for details on
1164
- * 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.
1165
1346
  */
1166
1347
  voice_model?:
1167
1348
  | 'eleven_turbo_v2'
@@ -1169,8 +1350,14 @@ export interface AgentCreateParams {
1169
1350
  | 'eleven_turbo_v2_5'
1170
1351
  | 'eleven_flash_v2_5'
1171
1352
  | 'eleven_multilingual_v2'
1353
+ | 'sonic-2'
1354
+ | 'sonic-3'
1355
+ | 'sonic-3-latest'
1356
+ | 'sonic-turbo'
1172
1357
  | 'tts-1'
1173
1358
  | 'gpt-4o-mini-tts'
1359
+ | 'speech-02-turbo'
1360
+ | 'speech-2.8-turbo'
1174
1361
  | null;
1175
1362
 
1176
1363
  /**
@@ -1188,6 +1375,21 @@ export interface AgentCreateParams {
1188
1375
  */
1189
1376
  voice_temperature?: number;
1190
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
+
1191
1393
  /**
1192
1394
  * If this option is set, the call will try to detect voicemail in the first 3
1193
1395
  * minutes of the call. Actions defined (hangup, or leave a message) will be
@@ -1203,6 +1405,21 @@ export interface AgentCreateParams {
1203
1405
  */
1204
1406
  volume?: number;
1205
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
+
1206
1423
  /**
1207
1424
  * The timeout for the webhook in milliseconds. If not set, default value of 10000
1208
1425
  * will apply.
@@ -1265,6 +1482,65 @@ export namespace AgentCreateParams {
1265
1482
  version?: number | null;
1266
1483
  }
1267
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
+
1268
1544
  /**
1269
1545
  * Configuration for PII scrubbing from transcripts and recordings.
1270
1546
  */
@@ -1286,6 +1562,7 @@ export namespace AgentCreateParams {
1286
1562
  | 'pin'
1287
1563
  | 'medical_id'
1288
1564
  | 'date_of_birth'
1565
+ | 'customer_account_number'
1289
1566
  >;
1290
1567
 
1291
1568
  /**
@@ -1399,7 +1676,7 @@ export namespace AgentCreateParams {
1399
1676
 
1400
1677
  /**
1401
1678
  * A single key that signals the end of DTMF input. Acceptable values include any
1402
- * digit (09), the pound/hash symbol (#), or the asterisk (\*).
1679
+ * digit (0-9), the pound/hash symbol (#), or the asterisk (\*).
1403
1680
  */
1404
1681
  termination_key?: string | null;
1405
1682
 
@@ -1420,7 +1697,8 @@ export namespace AgentCreateParams {
1420
1697
  action:
1421
1698
  | VoicemailOption.VoicemailActionPrompt
1422
1699
  | VoicemailOption.VoicemailActionStaticText
1423
- | VoicemailOption.VoicemailActionHangup;
1700
+ | VoicemailOption.VoicemailActionHangup
1701
+ | VoicemailOption.VoicemailActionBridgeTransfer;
1424
1702
  }
1425
1703
 
1426
1704
  export namespace VoicemailOption {
@@ -1446,6 +1724,10 @@ export namespace AgentCreateParams {
1446
1724
  export interface VoicemailActionHangup {
1447
1725
  type: 'hangup';
1448
1726
  }
1727
+
1728
+ export interface VoicemailActionBridgeTransfer {
1729
+ type: 'bridge_transfer';
1730
+ }
1449
1731
  }
1450
1732
  }
1451
1733
 
@@ -1481,24 +1763,18 @@ export interface AgentUpdateParams {
1481
1763
  *
1482
1764
  * - `coffee-shop`: Coffee shop ambience with people chatting in background.
1483
1765
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/coffee-shop.wav)
1484
- *
1485
1766
  * - `convention-hall`: Convention hall ambience, with some echo and people
1486
1767
  * chatting in background.
1487
1768
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/convention-hall.wav)
1488
- *
1489
1769
  * - `summer-outdoor`: Summer outdoor ambience with cicada chirping.
1490
1770
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/summer-outdoor.wav)
1491
- *
1492
1771
  * - `mountain-outdoor`: Mountain outdoor ambience with birds singing.
1493
1772
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/mountain-outdoor.wav)
1494
- *
1495
1773
  * - `static-noise`: Constant static noise.
1496
1774
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/static-noise.wav)
1497
- *
1498
1775
  * - `call-center`: Call center work noise.
1499
1776
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/call-center.wav)
1500
- *
1501
- * Set to `null` to remove ambient sound from this agent.
1777
+ * Set to `null` to remove ambient sound from this agent.
1502
1778
  */
1503
1779
  ambient_sound?:
1504
1780
  | 'coffee-shop'
@@ -1562,6 +1838,11 @@ export interface AgentUpdateParams {
1562
1838
  */
1563
1839
  boosted_keywords?: Array<string> | null;
1564
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
+
1565
1846
  /**
1566
1847
  * Body param: Granular setting to manage how Retell stores sensitive data
1567
1848
  * (transcripts, recordings, logs, etc.). This replaces the deprecated
@@ -1576,10 +1857,10 @@ export interface AgentUpdateParams {
1576
1857
  data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only';
1577
1858
 
1578
1859
  /**
1579
- * Body param: If set, determines what denoising mode to use. Default to
1580
- * 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.
1581
1862
  */
1582
- denoising_mode?: 'noise-cancellation' | 'noise-and-background-speech-cancellation';
1863
+ denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation';
1583
1864
 
1584
1865
  /**
1585
1866
  * Body param: Controls whether the agent would backchannel (agent interjects the
@@ -1589,6 +1870,19 @@ export interface AgentUpdateParams {
1589
1870
  */
1590
1871
  enable_backchannel?: boolean;
1591
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
+
1592
1886
  /**
1593
1887
  * Body param: If users stay silent for a period after agent speech, end the call.
1594
1888
  * The minimum value allowed is 10,000 ms (10 s). By default, this is set to 600000
@@ -1605,6 +1899,12 @@ export interface AgentUpdateParams {
1605
1899
  */
1606
1900
  fallback_voice_ids?: Array<string> | null;
1607
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
+
1608
1908
  /**
1609
1909
  * Body param: Controls how sensitive the agent is to user interruptions. Value
1610
1910
  * ranging from [0,1]. Lower value means it will take longer / more words for user
@@ -1614,6 +1914,19 @@ export interface AgentUpdateParams {
1614
1914
  */
1615
1915
  interruption_sensitivity?: number;
1616
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
+
1617
1930
  /**
1618
1931
  * Body param: Specifies what language (and dialect) the speech recognition will
1619
1932
  * operate in. For instance, selecting `en-GB` optimizes speech recognition for
@@ -1656,6 +1969,9 @@ export interface AgentUpdateParams {
1656
1969
  | 'no-NO'
1657
1970
  | 'sk-SK'
1658
1971
  | 'sv-SE'
1972
+ | 'lt-LT'
1973
+ | 'lv-LV'
1974
+ | 'cs-CZ'
1659
1975
  | 'ms-MY'
1660
1976
  | 'af-ZA'
1661
1977
  | 'ar-SA'
@@ -1733,12 +2049,15 @@ export interface AgentUpdateParams {
1733
2049
  | 'gpt-4.1-mini'
1734
2050
  | 'gpt-4.1-nano'
1735
2051
  | 'gpt-5'
2052
+ | 'gpt-5.1'
2053
+ | 'gpt-5.2'
1736
2054
  | 'gpt-5-mini'
1737
2055
  | 'gpt-5-nano'
1738
2056
  | 'claude-4.5-sonnet'
1739
2057
  | 'claude-4.5-haiku'
1740
2058
  | 'gemini-2.5-flash'
1741
2059
  | 'gemini-2.5-flash-lite'
2060
+ | 'gemini-3.0-flash'
1742
2061
  | null;
1743
2062
 
1744
2063
  /**
@@ -1798,15 +2117,22 @@ export interface AgentUpdateParams {
1798
2117
 
1799
2118
  /**
1800
2119
  * Body param: If set, determines whether speech to text should focus on latency or
1801
- * accuracy. Default to fast mode.
2120
+ * accuracy. Default to fast mode. When set to custom, custom_stt_config must be
2121
+ * provided.
1802
2122
  */
1803
- stt_mode?: 'fast' | 'accurate';
2123
+ stt_mode?: 'fast' | 'accurate' | 'custom';
1804
2124
 
1805
2125
  /**
1806
- * Body param:
2126
+ * Body param
1807
2127
  */
1808
2128
  user_dtmf_options?: AgentUpdateParams.UserDtmfOptions | null;
1809
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
+
1810
2136
  /**
1811
2137
  * Body param: If set, determines the vocabulary set to use for transcription. This
1812
2138
  * setting only applies for English agents, for non English agent, this setting is
@@ -1814,6 +2140,13 @@ export interface AgentUpdateParams {
1814
2140
  */
1815
2141
  vocab_specialization?: 'general' | 'medical';
1816
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
+
1817
2150
  /**
1818
2151
  * Body param: Unique voice id used for the agent. Find list of available voices
1819
2152
  * and their preview in Dashboard.
@@ -1821,10 +2154,10 @@ export interface AgentUpdateParams {
1821
2154
  voice_id?: string;
1822
2155
 
1823
2156
  /**
1824
- * Body param: Optionally set the voice model used for the selected voice.
1825
- * Currently only elevenlab voices have voice model selections. Set to null to
1826
- * remove voice model selection, and default ones will apply. Check out the
1827
- * 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.
1828
2161
  */
1829
2162
  voice_model?:
1830
2163
  | 'eleven_turbo_v2'
@@ -1832,8 +2165,14 @@ export interface AgentUpdateParams {
1832
2165
  | 'eleven_turbo_v2_5'
1833
2166
  | 'eleven_flash_v2_5'
1834
2167
  | 'eleven_multilingual_v2'
2168
+ | 'sonic-2'
2169
+ | 'sonic-3'
2170
+ | 'sonic-3-latest'
2171
+ | 'sonic-turbo'
1835
2172
  | 'tts-1'
1836
2173
  | 'gpt-4o-mini-tts'
2174
+ | 'speech-02-turbo'
2175
+ | 'speech-2.8-turbo'
1837
2176
  | null;
1838
2177
 
1839
2178
  /**
@@ -1851,6 +2190,21 @@ export interface AgentUpdateParams {
1851
2190
  */
1852
2191
  voice_temperature?: number;
1853
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
+
1854
2208
  /**
1855
2209
  * Body param: If this option is set, the call will try to detect voicemail in the
1856
2210
  * first 3 minutes of the call. Actions defined (hangup, or leave a message) will
@@ -1866,6 +2220,21 @@ export interface AgentUpdateParams {
1866
2220
  */
1867
2221
  volume?: number;
1868
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
+
1869
2238
  /**
1870
2239
  * Body param: The timeout for the webhook in milliseconds. If not set, default
1871
2240
  * value of 10000 will apply.
@@ -1882,6 +2251,65 @@ export interface AgentUpdateParams {
1882
2251
  }
1883
2252
 
1884
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
+
1885
2313
  /**
1886
2314
  * Configuration for PII scrubbing from transcripts and recordings.
1887
2315
  */
@@ -1903,6 +2331,7 @@ export namespace AgentUpdateParams {
1903
2331
  | 'pin'
1904
2332
  | 'medical_id'
1905
2333
  | 'date_of_birth'
2334
+ | 'customer_account_number'
1906
2335
  >;
1907
2336
 
1908
2337
  /**
@@ -2062,7 +2491,7 @@ export namespace AgentUpdateParams {
2062
2491
 
2063
2492
  /**
2064
2493
  * A single key that signals the end of DTMF input. Acceptable values include any
2065
- * digit (09), the pound/hash symbol (#), or the asterisk (\*).
2494
+ * digit (0-9), the pound/hash symbol (#), or the asterisk (\*).
2066
2495
  */
2067
2496
  termination_key?: string | null;
2068
2497
 
@@ -2083,7 +2512,8 @@ export namespace AgentUpdateParams {
2083
2512
  action:
2084
2513
  | VoicemailOption.VoicemailActionPrompt
2085
2514
  | VoicemailOption.VoicemailActionStaticText
2086
- | VoicemailOption.VoicemailActionHangup;
2515
+ | VoicemailOption.VoicemailActionHangup
2516
+ | VoicemailOption.VoicemailActionBridgeTransfer;
2087
2517
  }
2088
2518
 
2089
2519
  export namespace VoicemailOption {
@@ -2109,6 +2539,10 @@ export namespace AgentUpdateParams {
2109
2539
  export interface VoicemailActionHangup {
2110
2540
  type: 'hangup';
2111
2541
  }
2542
+
2543
+ export interface VoicemailActionBridgeTransfer {
2544
+ type: 'bridge_transfer';
2545
+ }
2112
2546
  }
2113
2547
  }
2114
2548