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
@@ -0,0 +1,836 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { RequestOptions } from "../internal/request-options.mjs";
4
+ export declare class ChatAgent extends APIResource {
5
+ /**
6
+ * Create a new chat agent
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const chatAgentResponse = await client.chatAgent.create({
11
+ * response_engine: {
12
+ * llm_id: 'llm_234sdertfsdsfsdf',
13
+ * type: 'retell-llm',
14
+ * },
15
+ * });
16
+ * ```
17
+ */
18
+ create(body: ChatAgentCreateParams, options?: RequestOptions): APIPromise<ChatAgentResponse>;
19
+ /**
20
+ * Retrieve details of a specific chat agent
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const chatAgentResponse = await client.chatAgent.retrieve(
25
+ * '16b980523634a6dc504898cda492e939',
26
+ * );
27
+ * ```
28
+ */
29
+ retrieve(agentID: string, query?: ChatAgentRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<ChatAgentResponse>;
30
+ /**
31
+ * Update an existing chat agent
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const chatAgentResponse = await client.chatAgent.update(
36
+ * '16b980523634a6dc504898cda492e939',
37
+ * );
38
+ * ```
39
+ */
40
+ update(agentID: string, params: ChatAgentUpdateParams, options?: RequestOptions): APIPromise<ChatAgentResponse>;
41
+ /**
42
+ * List all chat agents
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * const chatAgentResponses = await client.chatAgent.list();
47
+ * ```
48
+ */
49
+ list(query?: ChatAgentListParams | null | undefined, options?: RequestOptions): APIPromise<ChatAgentListResponse>;
50
+ /**
51
+ * Delete an existing chat agent
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * await client.chatAgent.delete(
56
+ * 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
57
+ * );
58
+ * ```
59
+ */
60
+ delete(agentID: string, options?: RequestOptions): APIPromise<void>;
61
+ /**
62
+ * Get all versions of a chat agent
63
+ *
64
+ * @example
65
+ * ```ts
66
+ * const chatAgentResponses =
67
+ * await client.chatAgent.getVersions(
68
+ * '16b980523634a6dc504898cda492e939',
69
+ * );
70
+ * ```
71
+ */
72
+ getVersions(agentID: string, options?: RequestOptions): APIPromise<ChatAgentGetVersionsResponse>;
73
+ /**
74
+ * Publish the latest version of the chat agent and create a new draft chat agent
75
+ * with newer version.
76
+ *
77
+ * @example
78
+ * ```ts
79
+ * await client.chatAgent.publish(
80
+ * '16b980523634a6dc504898cda492e939',
81
+ * );
82
+ * ```
83
+ */
84
+ publish(agentID: string, options?: RequestOptions): APIPromise<void>;
85
+ }
86
+ export interface ChatAgentResponse {
87
+ /**
88
+ * Unique id of chat agent.
89
+ */
90
+ agent_id: string;
91
+ /**
92
+ * Last modification timestamp (milliseconds since epoch). Either the time of last
93
+ * update or creation if no updates available.
94
+ */
95
+ last_modification_timestamp: number;
96
+ /**
97
+ * The Response Engine to attach to the agent. It is used to generate responses for
98
+ * the agent. You need to create a Response Engine first before attaching it to an
99
+ * agent.
100
+ */
101
+ response_engine: ChatAgentResponse.ResponseEngineRetellLm | ChatAgentResponse.ResponseEngineCustomLm | ChatAgentResponse.ResponseEngineConversationFlow;
102
+ /**
103
+ * The name of the chat agent. Only used for your own reference.
104
+ */
105
+ agent_name?: string | null;
106
+ /**
107
+ * The prompt to use for post call analysis to evaluate whether the call is
108
+ * successful. Set to null to use the default prompt.
109
+ */
110
+ analysis_successful_prompt?: string | null;
111
+ /**
112
+ * The prompt to use for post call analysis to summarize the call. Set to null to
113
+ * use the default prompt.
114
+ */
115
+ analysis_summary_prompt?: string | null;
116
+ /**
117
+ * Message to display when the chat is automatically closed.
118
+ */
119
+ auto_close_message?: string | null;
120
+ /**
121
+ * Controls what data is stored for this agent. "everything" stores all data
122
+ * including transcripts and recordings. "everything_except_pii" stores data but
123
+ * excludes PII when possible based on PII configuration. "basic_attributes_only"
124
+ * stores only basic metadata. If not set, defaults to "everything".
125
+ */
126
+ data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only' | null;
127
+ /**
128
+ * If users stay silent for a period after agent speech, end the chat. The minimum
129
+ * value allowed is 120,000 ms (2 minutes). The maximum value allowed is
130
+ * 259,200,000 ms (72 hours). By default, this is set to 3,600,000 (1 hour).
131
+ */
132
+ end_chat_after_silence_ms?: number;
133
+ /**
134
+ * Configuration for guardrail checks to detect and prevent prohibited topics in
135
+ * agent output and user input.
136
+ */
137
+ guardrail_config?: ChatAgentResponse.GuardrailConfig;
138
+ /**
139
+ * Whether the agent is public. When set to true, the agent is available for public
140
+ * agent preview link.
141
+ */
142
+ is_public?: boolean | null;
143
+ /**
144
+ * Whether the chat agent is published.
145
+ */
146
+ is_published?: boolean;
147
+ /**
148
+ * Specifies what language (and dialect) the chat will operate in. For instance,
149
+ * selecting `en-GB` optimizes for British English. If unset, will use default
150
+ * value `en-US`. Select `multi` for multilingual support, currently this supports
151
+ * Spanish and English.
152
+ */
153
+ language?: 'en-US' | 'en-IN' | 'en-GB' | 'en-AU' | 'en-NZ' | 'de-DE' | 'es-ES' | 'es-419' | 'hi-IN' | 'fr-FR' | 'fr-CA' | 'ja-JP' | 'pt-PT' | 'pt-BR' | 'zh-CN' | 'ru-RU' | 'it-IT' | 'ko-KR' | 'nl-NL' | 'nl-BE' | 'pl-PL' | 'tr-TR' | 'th-TH' | 'vi-VN' | 'ro-RO' | 'bg-BG' | 'ca-ES' | 'da-DK' | 'fi-FI' | 'el-GR' | 'hu-HU' | 'id-ID' | 'no-NO' | 'sk-SK' | 'sv-SE' | 'lt-LT' | 'lv-LV' | 'cs-CZ' | 'multi';
154
+ /**
155
+ * Whether this agent opts in to signed url for public log. If not set, default
156
+ * value of false will apply.
157
+ */
158
+ opt_in_signed_url?: boolean;
159
+ /**
160
+ * Configuration for PII scrubbing from transcripts and recordings.
161
+ */
162
+ pii_config?: ChatAgentResponse.PiiConfig;
163
+ /**
164
+ * Post chat analysis data to extract from the chat. This data will augment the
165
+ * pre-defined variables extracted in the chat analysis. This will be available
166
+ * after the chat ends.
167
+ */
168
+ post_chat_analysis_data?: Array<ChatAgentResponse.StringAnalysisData | ChatAgentResponse.EnumAnalysisData | ChatAgentResponse.BooleanAnalysisData | ChatAgentResponse.NumberAnalysisData> | null;
169
+ /**
170
+ * The model to use for post chat analysis. Default to gpt-4.1-mini.
171
+ */
172
+ post_chat_analysis_model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5-mini' | 'gpt-5-nano' | 'claude-4.5-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash' | null;
173
+ /**
174
+ * The expiration time for the signed url in milliseconds. Only applicable when
175
+ * opt_in_signed_url is true. If not set, default value of 86400000 (24 hours) will
176
+ * apply.
177
+ */
178
+ signed_url_expiration_ms?: number | null;
179
+ /**
180
+ * The version of the chat agent.
181
+ */
182
+ version?: number;
183
+ /**
184
+ * Which webhook events this agent should receive. If not set, defaults to
185
+ * chat_started, chat_ended, chat_analyzed.
186
+ */
187
+ webhook_events?: Array<'chat_started' | 'chat_ended' | 'chat_analyzed'> | null;
188
+ /**
189
+ * The timeout for the webhook in milliseconds. If not set, default value of 10000
190
+ * will apply.
191
+ */
192
+ webhook_timeout_ms?: number;
193
+ /**
194
+ * The webhook for agent to listen to chat events. See what events it would get at
195
+ * [webhook doc](/features/webhook). If set, will binds webhook events for this
196
+ * agent to the specified url, and will ignore the account level webhook for this
197
+ * agent. Set to `null` to remove webhook url from this agent.
198
+ */
199
+ webhook_url?: string | null;
200
+ }
201
+ export declare namespace ChatAgentResponse {
202
+ interface ResponseEngineRetellLm {
203
+ /**
204
+ * id of the Retell LLM Response Engine.
205
+ */
206
+ llm_id: string;
207
+ /**
208
+ * type of the Response Engine.
209
+ */
210
+ type: 'retell-llm';
211
+ /**
212
+ * Version of the Retell LLM Response Engine.
213
+ */
214
+ version?: number | null;
215
+ }
216
+ interface ResponseEngineCustomLm {
217
+ /**
218
+ * LLM websocket url of the custom LLM.
219
+ */
220
+ llm_websocket_url: string;
221
+ /**
222
+ * type of the Response Engine.
223
+ */
224
+ type: 'custom-llm';
225
+ }
226
+ interface ResponseEngineConversationFlow {
227
+ /**
228
+ * ID of the Conversation Flow Response Engine.
229
+ */
230
+ conversation_flow_id: string;
231
+ /**
232
+ * type of the Response Engine.
233
+ */
234
+ type: 'conversation-flow';
235
+ /**
236
+ * Version of the Conversation Flow Response Engine.
237
+ */
238
+ version?: number | null;
239
+ }
240
+ /**
241
+ * Configuration for guardrail checks to detect and prevent prohibited topics in
242
+ * agent output and user input.
243
+ */
244
+ interface GuardrailConfig {
245
+ /**
246
+ * Selected prohibited user topic categories to check. When user messages contain
247
+ * these topics, the agent will respond with a placeholder message instead of
248
+ * processing the request.
249
+ */
250
+ input_topics?: Array<'platform_integrity_jailbreaking'> | null;
251
+ /**
252
+ * Selected prohibited agent topic categories to check. When agent messages contain
253
+ * these topics, they will be replaced with a placeholder message.
254
+ */
255
+ output_topics?: Array<'harassment' | 'self_harm' | 'sexual_exploitation' | 'violence' | 'defense_and_national_security' | 'illicit_and_harmful_activity' | 'gambling' | 'regulated_professional_advice' | 'child_safety_and_exploitation'> | null;
256
+ }
257
+ /**
258
+ * Configuration for PII scrubbing from transcripts and recordings.
259
+ */
260
+ interface PiiConfig {
261
+ /**
262
+ * List of PII categories to scrub from transcripts and recordings.
263
+ */
264
+ categories: Array<'person_name' | 'address' | 'email' | 'phone_number' | 'ssn' | 'passport' | 'driver_license' | 'credit_card' | 'bank_account' | 'password' | 'pin' | 'medical_id' | 'date_of_birth' | 'customer_account_number'>;
265
+ /**
266
+ * The processing mode for PII scrubbing. Currently only post-call is supported.
267
+ */
268
+ mode: 'post_call';
269
+ }
270
+ interface StringAnalysisData {
271
+ /**
272
+ * Description of the variable.
273
+ */
274
+ description: string;
275
+ /**
276
+ * Name of the variable.
277
+ */
278
+ name: string;
279
+ /**
280
+ * Type of the variable to extract.
281
+ */
282
+ type: 'string';
283
+ /**
284
+ * Examples of the variable value to teach model the style and syntax.
285
+ */
286
+ examples?: Array<string>;
287
+ }
288
+ interface EnumAnalysisData {
289
+ /**
290
+ * The possible values of the variable, must be non empty array.
291
+ */
292
+ choices: Array<string>;
293
+ /**
294
+ * Description of the variable.
295
+ */
296
+ description: string;
297
+ /**
298
+ * Name of the variable.
299
+ */
300
+ name: string;
301
+ /**
302
+ * Type of the variable to extract.
303
+ */
304
+ type: 'enum';
305
+ }
306
+ interface BooleanAnalysisData {
307
+ /**
308
+ * Description of the variable.
309
+ */
310
+ description: string;
311
+ /**
312
+ * Name of the variable.
313
+ */
314
+ name: string;
315
+ /**
316
+ * Type of the variable to extract.
317
+ */
318
+ type: 'boolean';
319
+ }
320
+ interface NumberAnalysisData {
321
+ /**
322
+ * Description of the variable.
323
+ */
324
+ description: string;
325
+ /**
326
+ * Name of the variable.
327
+ */
328
+ name: string;
329
+ /**
330
+ * Type of the variable to extract.
331
+ */
332
+ type: 'number';
333
+ }
334
+ }
335
+ export type ChatAgentListResponse = Array<ChatAgentResponse>;
336
+ export type ChatAgentGetVersionsResponse = Array<ChatAgentResponse>;
337
+ export interface ChatAgentCreateParams {
338
+ /**
339
+ * The Response Engine to attach to the agent. It is used to generate responses for
340
+ * the agent. You need to create a Response Engine first before attaching it to an
341
+ * agent.
342
+ */
343
+ response_engine: ChatAgentCreateParams.ResponseEngineRetellLm | ChatAgentCreateParams.ResponseEngineCustomLm | ChatAgentCreateParams.ResponseEngineConversationFlow;
344
+ /**
345
+ * The name of the chat agent. Only used for your own reference.
346
+ */
347
+ agent_name?: string | null;
348
+ /**
349
+ * The prompt to use for post call analysis to evaluate whether the call is
350
+ * successful. Set to null to use the default prompt.
351
+ */
352
+ analysis_successful_prompt?: string | null;
353
+ /**
354
+ * The prompt to use for post call analysis to summarize the call. Set to null to
355
+ * use the default prompt.
356
+ */
357
+ analysis_summary_prompt?: string | null;
358
+ /**
359
+ * Message to display when the chat is automatically closed.
360
+ */
361
+ auto_close_message?: string | null;
362
+ /**
363
+ * Controls what data is stored for this agent. "everything" stores all data
364
+ * including transcripts and recordings. "everything_except_pii" stores data but
365
+ * excludes PII when possible based on PII configuration. "basic_attributes_only"
366
+ * stores only basic metadata. If not set, defaults to "everything".
367
+ */
368
+ data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only' | null;
369
+ /**
370
+ * If users stay silent for a period after agent speech, end the chat. The minimum
371
+ * value allowed is 120,000 ms (2 minutes). The maximum value allowed is
372
+ * 259,200,000 ms (72 hours). By default, this is set to 3,600,000 (1 hour).
373
+ */
374
+ end_chat_after_silence_ms?: number;
375
+ /**
376
+ * Configuration for guardrail checks to detect and prevent prohibited topics in
377
+ * agent output and user input.
378
+ */
379
+ guardrail_config?: ChatAgentCreateParams.GuardrailConfig;
380
+ /**
381
+ * Whether the agent is public. When set to true, the agent is available for public
382
+ * agent preview link.
383
+ */
384
+ is_public?: boolean | null;
385
+ /**
386
+ * Specifies what language (and dialect) the chat will operate in. For instance,
387
+ * selecting `en-GB` optimizes for British English. If unset, will use default
388
+ * value `en-US`. Select `multi` for multilingual support, currently this supports
389
+ * Spanish and English.
390
+ */
391
+ language?: 'en-US' | 'en-IN' | 'en-GB' | 'en-AU' | 'en-NZ' | 'de-DE' | 'es-ES' | 'es-419' | 'hi-IN' | 'fr-FR' | 'fr-CA' | 'ja-JP' | 'pt-PT' | 'pt-BR' | 'zh-CN' | 'ru-RU' | 'it-IT' | 'ko-KR' | 'nl-NL' | 'nl-BE' | 'pl-PL' | 'tr-TR' | 'th-TH' | 'vi-VN' | 'ro-RO' | 'bg-BG' | 'ca-ES' | 'da-DK' | 'fi-FI' | 'el-GR' | 'hu-HU' | 'id-ID' | 'no-NO' | 'sk-SK' | 'sv-SE' | 'lt-LT' | 'lv-LV' | 'cs-CZ' | 'multi';
392
+ /**
393
+ * Whether this agent opts in to signed url for public log. If not set, default
394
+ * value of false will apply.
395
+ */
396
+ opt_in_signed_url?: boolean;
397
+ /**
398
+ * Configuration for PII scrubbing from transcripts and recordings.
399
+ */
400
+ pii_config?: ChatAgentCreateParams.PiiConfig;
401
+ /**
402
+ * Post chat analysis data to extract from the chat. This data will augment the
403
+ * pre-defined variables extracted in the chat analysis. This will be available
404
+ * after the chat ends.
405
+ */
406
+ post_chat_analysis_data?: Array<ChatAgentCreateParams.StringAnalysisData | ChatAgentCreateParams.EnumAnalysisData | ChatAgentCreateParams.BooleanAnalysisData | ChatAgentCreateParams.NumberAnalysisData> | null;
407
+ /**
408
+ * The model to use for post chat analysis. Default to gpt-4.1-mini.
409
+ */
410
+ post_chat_analysis_model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5-mini' | 'gpt-5-nano' | 'claude-4.5-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash' | null;
411
+ /**
412
+ * The expiration time for the signed url in milliseconds. Only applicable when
413
+ * opt_in_signed_url is true. If not set, default value of 86400000 (24 hours) will
414
+ * apply.
415
+ */
416
+ signed_url_expiration_ms?: number | null;
417
+ /**
418
+ * Which webhook events this agent should receive. If not set, defaults to
419
+ * chat_started, chat_ended, chat_analyzed.
420
+ */
421
+ webhook_events?: Array<'chat_started' | 'chat_ended' | 'chat_analyzed'> | null;
422
+ /**
423
+ * The timeout for the webhook in milliseconds. If not set, default value of 10000
424
+ * will apply.
425
+ */
426
+ webhook_timeout_ms?: number;
427
+ /**
428
+ * The webhook for agent to listen to chat events. See what events it would get at
429
+ * [webhook doc](/features/webhook). If set, will binds webhook events for this
430
+ * agent to the specified url, and will ignore the account level webhook for this
431
+ * agent. Set to `null` to remove webhook url from this agent.
432
+ */
433
+ webhook_url?: string | null;
434
+ }
435
+ export declare namespace ChatAgentCreateParams {
436
+ interface ResponseEngineRetellLm {
437
+ /**
438
+ * id of the Retell LLM Response Engine.
439
+ */
440
+ llm_id: string;
441
+ /**
442
+ * type of the Response Engine.
443
+ */
444
+ type: 'retell-llm';
445
+ /**
446
+ * Version of the Retell LLM Response Engine.
447
+ */
448
+ version?: number | null;
449
+ }
450
+ interface ResponseEngineCustomLm {
451
+ /**
452
+ * LLM websocket url of the custom LLM.
453
+ */
454
+ llm_websocket_url: string;
455
+ /**
456
+ * type of the Response Engine.
457
+ */
458
+ type: 'custom-llm';
459
+ }
460
+ interface ResponseEngineConversationFlow {
461
+ /**
462
+ * ID of the Conversation Flow Response Engine.
463
+ */
464
+ conversation_flow_id: string;
465
+ /**
466
+ * type of the Response Engine.
467
+ */
468
+ type: 'conversation-flow';
469
+ /**
470
+ * Version of the Conversation Flow Response Engine.
471
+ */
472
+ version?: number | null;
473
+ }
474
+ /**
475
+ * Configuration for guardrail checks to detect and prevent prohibited topics in
476
+ * agent output and user input.
477
+ */
478
+ interface GuardrailConfig {
479
+ /**
480
+ * Selected prohibited user topic categories to check. When user messages contain
481
+ * these topics, the agent will respond with a placeholder message instead of
482
+ * processing the request.
483
+ */
484
+ input_topics?: Array<'platform_integrity_jailbreaking'> | null;
485
+ /**
486
+ * Selected prohibited agent topic categories to check. When agent messages contain
487
+ * these topics, they will be replaced with a placeholder message.
488
+ */
489
+ output_topics?: Array<'harassment' | 'self_harm' | 'sexual_exploitation' | 'violence' | 'defense_and_national_security' | 'illicit_and_harmful_activity' | 'gambling' | 'regulated_professional_advice' | 'child_safety_and_exploitation'> | null;
490
+ }
491
+ /**
492
+ * Configuration for PII scrubbing from transcripts and recordings.
493
+ */
494
+ interface PiiConfig {
495
+ /**
496
+ * List of PII categories to scrub from transcripts and recordings.
497
+ */
498
+ categories: Array<'person_name' | 'address' | 'email' | 'phone_number' | 'ssn' | 'passport' | 'driver_license' | 'credit_card' | 'bank_account' | 'password' | 'pin' | 'medical_id' | 'date_of_birth' | 'customer_account_number'>;
499
+ /**
500
+ * The processing mode for PII scrubbing. Currently only post-call is supported.
501
+ */
502
+ mode: 'post_call';
503
+ }
504
+ interface StringAnalysisData {
505
+ /**
506
+ * Description of the variable.
507
+ */
508
+ description: string;
509
+ /**
510
+ * Name of the variable.
511
+ */
512
+ name: string;
513
+ /**
514
+ * Type of the variable to extract.
515
+ */
516
+ type: 'string';
517
+ /**
518
+ * Examples of the variable value to teach model the style and syntax.
519
+ */
520
+ examples?: Array<string>;
521
+ }
522
+ interface EnumAnalysisData {
523
+ /**
524
+ * The possible values of the variable, must be non empty array.
525
+ */
526
+ choices: Array<string>;
527
+ /**
528
+ * Description of the variable.
529
+ */
530
+ description: string;
531
+ /**
532
+ * Name of the variable.
533
+ */
534
+ name: string;
535
+ /**
536
+ * Type of the variable to extract.
537
+ */
538
+ type: 'enum';
539
+ }
540
+ interface BooleanAnalysisData {
541
+ /**
542
+ * Description of the variable.
543
+ */
544
+ description: string;
545
+ /**
546
+ * Name of the variable.
547
+ */
548
+ name: string;
549
+ /**
550
+ * Type of the variable to extract.
551
+ */
552
+ type: 'boolean';
553
+ }
554
+ interface NumberAnalysisData {
555
+ /**
556
+ * Description of the variable.
557
+ */
558
+ description: string;
559
+ /**
560
+ * Name of the variable.
561
+ */
562
+ name: string;
563
+ /**
564
+ * Type of the variable to extract.
565
+ */
566
+ type: 'number';
567
+ }
568
+ }
569
+ export interface ChatAgentRetrieveParams {
570
+ /**
571
+ * Optional version of the API to use for this request. If not provided, will
572
+ * default to latest version.
573
+ */
574
+ version?: number;
575
+ }
576
+ export interface ChatAgentUpdateParams {
577
+ /**
578
+ * Query param: Optional version of the API to use for this request. Default to
579
+ * latest version.
580
+ */
581
+ version?: number;
582
+ /**
583
+ * Body param: The name of the chat agent. Only used for your own reference.
584
+ */
585
+ agent_name?: string | null;
586
+ /**
587
+ * Body param: The prompt to use for post call analysis to evaluate whether the
588
+ * call is successful. Set to null to use the default prompt.
589
+ */
590
+ analysis_successful_prompt?: string | null;
591
+ /**
592
+ * Body param: The prompt to use for post call analysis to summarize the call. Set
593
+ * to null to use the default prompt.
594
+ */
595
+ analysis_summary_prompt?: string | null;
596
+ /**
597
+ * Body param: Message to display when the chat is automatically closed.
598
+ */
599
+ auto_close_message?: string | null;
600
+ /**
601
+ * Body param: Controls what data is stored for this agent. "everything" stores all
602
+ * data including transcripts and recordings. "everything_except_pii" stores data
603
+ * but excludes PII when possible based on PII configuration.
604
+ * "basic_attributes_only" stores only basic metadata. If not set, defaults to
605
+ * "everything".
606
+ */
607
+ data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only' | null;
608
+ /**
609
+ * Body param: If users stay silent for a period after agent speech, end the chat.
610
+ * The minimum value allowed is 120,000 ms (2 minutes). The maximum value allowed
611
+ * is 259,200,000 ms (72 hours). By default, this is set to 3,600,000 (1 hour).
612
+ */
613
+ end_chat_after_silence_ms?: number;
614
+ /**
615
+ * Body param: Configuration for guardrail checks to detect and prevent prohibited
616
+ * topics in agent output and user input.
617
+ */
618
+ guardrail_config?: ChatAgentUpdateParams.GuardrailConfig;
619
+ /**
620
+ * Body param: Whether the agent is public. When set to true, the agent is
621
+ * available for public agent preview link.
622
+ */
623
+ is_public?: boolean | null;
624
+ /**
625
+ * Body param: Specifies what language (and dialect) the chat will operate in. For
626
+ * instance, selecting `en-GB` optimizes for British English. If unset, will use
627
+ * default value `en-US`. Select `multi` for multilingual support, currently this
628
+ * supports Spanish and English.
629
+ */
630
+ language?: 'en-US' | 'en-IN' | 'en-GB' | 'en-AU' | 'en-NZ' | 'de-DE' | 'es-ES' | 'es-419' | 'hi-IN' | 'fr-FR' | 'fr-CA' | 'ja-JP' | 'pt-PT' | 'pt-BR' | 'zh-CN' | 'ru-RU' | 'it-IT' | 'ko-KR' | 'nl-NL' | 'nl-BE' | 'pl-PL' | 'tr-TR' | 'th-TH' | 'vi-VN' | 'ro-RO' | 'bg-BG' | 'ca-ES' | 'da-DK' | 'fi-FI' | 'el-GR' | 'hu-HU' | 'id-ID' | 'no-NO' | 'sk-SK' | 'sv-SE' | 'lt-LT' | 'lv-LV' | 'cs-CZ' | 'multi';
631
+ /**
632
+ * Body param: Whether this agent opts in to signed url for public log. If not set,
633
+ * default value of false will apply.
634
+ */
635
+ opt_in_signed_url?: boolean;
636
+ /**
637
+ * Body param: Configuration for PII scrubbing from transcripts and recordings.
638
+ */
639
+ pii_config?: ChatAgentUpdateParams.PiiConfig;
640
+ /**
641
+ * Body param: Post chat analysis data to extract from the chat. This data will
642
+ * augment the pre-defined variables extracted in the chat analysis. This will be
643
+ * available after the chat ends.
644
+ */
645
+ post_chat_analysis_data?: Array<ChatAgentUpdateParams.StringAnalysisData | ChatAgentUpdateParams.EnumAnalysisData | ChatAgentUpdateParams.BooleanAnalysisData | ChatAgentUpdateParams.NumberAnalysisData> | null;
646
+ /**
647
+ * Body param: The model to use for post chat analysis. Default to gpt-4.1-mini.
648
+ */
649
+ post_chat_analysis_model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5-mini' | 'gpt-5-nano' | 'claude-4.5-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash' | null;
650
+ /**
651
+ * Body param: The Response Engine to attach to the agent. It is used to generate
652
+ * responses for the agent. You need to create a Response Engine first before
653
+ * attaching it to an agent.
654
+ */
655
+ response_engine?: ChatAgentUpdateParams.ResponseEngineRetellLm | ChatAgentUpdateParams.ResponseEngineCustomLm | ChatAgentUpdateParams.ResponseEngineConversationFlow;
656
+ /**
657
+ * Body param: The expiration time for the signed url in milliseconds. Only
658
+ * applicable when opt_in_signed_url is true. If not set, default value of 86400000
659
+ * (24 hours) will apply.
660
+ */
661
+ signed_url_expiration_ms?: number | null;
662
+ /**
663
+ * Body param: Which webhook events this agent should receive. If not set, defaults
664
+ * to chat_started, chat_ended, chat_analyzed.
665
+ */
666
+ webhook_events?: Array<'chat_started' | 'chat_ended' | 'chat_analyzed'> | null;
667
+ /**
668
+ * Body param: The timeout for the webhook in milliseconds. If not set, default
669
+ * value of 10000 will apply.
670
+ */
671
+ webhook_timeout_ms?: number;
672
+ /**
673
+ * Body param: The webhook for agent to listen to chat events. See what events it
674
+ * would get at [webhook doc](/features/webhook). If set, will binds webhook events
675
+ * for this agent to the specified url, and will ignore the account level webhook
676
+ * for this agent. Set to `null` to remove webhook url from this agent.
677
+ */
678
+ webhook_url?: string | null;
679
+ }
680
+ export declare namespace ChatAgentUpdateParams {
681
+ /**
682
+ * Configuration for guardrail checks to detect and prevent prohibited topics in
683
+ * agent output and user input.
684
+ */
685
+ interface GuardrailConfig {
686
+ /**
687
+ * Selected prohibited user topic categories to check. When user messages contain
688
+ * these topics, the agent will respond with a placeholder message instead of
689
+ * processing the request.
690
+ */
691
+ input_topics?: Array<'platform_integrity_jailbreaking'> | null;
692
+ /**
693
+ * Selected prohibited agent topic categories to check. When agent messages contain
694
+ * these topics, they will be replaced with a placeholder message.
695
+ */
696
+ output_topics?: Array<'harassment' | 'self_harm' | 'sexual_exploitation' | 'violence' | 'defense_and_national_security' | 'illicit_and_harmful_activity' | 'gambling' | 'regulated_professional_advice' | 'child_safety_and_exploitation'> | null;
697
+ }
698
+ /**
699
+ * Configuration for PII scrubbing from transcripts and recordings.
700
+ */
701
+ interface PiiConfig {
702
+ /**
703
+ * List of PII categories to scrub from transcripts and recordings.
704
+ */
705
+ categories: Array<'person_name' | 'address' | 'email' | 'phone_number' | 'ssn' | 'passport' | 'driver_license' | 'credit_card' | 'bank_account' | 'password' | 'pin' | 'medical_id' | 'date_of_birth' | 'customer_account_number'>;
706
+ /**
707
+ * The processing mode for PII scrubbing. Currently only post-call is supported.
708
+ */
709
+ mode: 'post_call';
710
+ }
711
+ interface StringAnalysisData {
712
+ /**
713
+ * Description of the variable.
714
+ */
715
+ description: string;
716
+ /**
717
+ * Name of the variable.
718
+ */
719
+ name: string;
720
+ /**
721
+ * Type of the variable to extract.
722
+ */
723
+ type: 'string';
724
+ /**
725
+ * Examples of the variable value to teach model the style and syntax.
726
+ */
727
+ examples?: Array<string>;
728
+ }
729
+ interface EnumAnalysisData {
730
+ /**
731
+ * The possible values of the variable, must be non empty array.
732
+ */
733
+ choices: Array<string>;
734
+ /**
735
+ * Description of the variable.
736
+ */
737
+ description: string;
738
+ /**
739
+ * Name of the variable.
740
+ */
741
+ name: string;
742
+ /**
743
+ * Type of the variable to extract.
744
+ */
745
+ type: 'enum';
746
+ }
747
+ interface BooleanAnalysisData {
748
+ /**
749
+ * Description of the variable.
750
+ */
751
+ description: string;
752
+ /**
753
+ * Name of the variable.
754
+ */
755
+ name: string;
756
+ /**
757
+ * Type of the variable to extract.
758
+ */
759
+ type: 'boolean';
760
+ }
761
+ interface NumberAnalysisData {
762
+ /**
763
+ * Description of the variable.
764
+ */
765
+ description: string;
766
+ /**
767
+ * Name of the variable.
768
+ */
769
+ name: string;
770
+ /**
771
+ * Type of the variable to extract.
772
+ */
773
+ type: 'number';
774
+ }
775
+ interface ResponseEngineRetellLm {
776
+ /**
777
+ * id of the Retell LLM Response Engine.
778
+ */
779
+ llm_id: string;
780
+ /**
781
+ * type of the Response Engine.
782
+ */
783
+ type: 'retell-llm';
784
+ /**
785
+ * Version of the Retell LLM Response Engine.
786
+ */
787
+ version?: number | null;
788
+ }
789
+ interface ResponseEngineCustomLm {
790
+ /**
791
+ * LLM websocket url of the custom LLM.
792
+ */
793
+ llm_websocket_url: string;
794
+ /**
795
+ * type of the Response Engine.
796
+ */
797
+ type: 'custom-llm';
798
+ }
799
+ interface ResponseEngineConversationFlow {
800
+ /**
801
+ * ID of the Conversation Flow Response Engine.
802
+ */
803
+ conversation_flow_id: string;
804
+ /**
805
+ * type of the Response Engine.
806
+ */
807
+ type: 'conversation-flow';
808
+ /**
809
+ * Version of the Conversation Flow Response Engine.
810
+ */
811
+ version?: number | null;
812
+ }
813
+ }
814
+ export interface ChatAgentListParams {
815
+ /**
816
+ * A limit on the number of objects to be returned. Limit can range between 1 and
817
+ * 1000, and the default is 1000.
818
+ */
819
+ limit?: number;
820
+ /**
821
+ * The pagination key to continue fetching the next page of agents. Pagination key
822
+ * is represented by a agent id, pagination key and version pair is exclusive (not
823
+ * included in the fetched page). If not set, will start from the beginning.
824
+ */
825
+ pagination_key?: string;
826
+ /**
827
+ * Specifies the version of the agent associated with the pagination_key. When
828
+ * paginating, both the pagination_key and its version must be provided to ensure
829
+ * consistent ordering and to fetch the next page correctly.
830
+ */
831
+ pagination_key_version?: number;
832
+ }
833
+ export declare namespace ChatAgent {
834
+ export { type ChatAgentResponse as ChatAgentResponse, type ChatAgentListResponse as ChatAgentListResponse, type ChatAgentGetVersionsResponse as ChatAgentGetVersionsResponse, type ChatAgentCreateParams as ChatAgentCreateParams, type ChatAgentRetrieveParams as ChatAgentRetrieveParams, type ChatAgentUpdateParams as ChatAgentUpdateParams, type ChatAgentListParams as ChatAgentListParams, };
835
+ }
836
+ //# sourceMappingURL=chat-agent.d.mts.map