retell-sdk 4.66.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (550) hide show
  1. package/CHANGELOG.md +4 -1346
  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 +553 -107
  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 +754 -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,18 +1,20 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../resource';
4
- import * as Core from '../core';
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+ import { path } from '../internal/utils/path';
5
7
 
6
8
  export class McpTool extends APIResource {
7
9
  /**
8
10
  * Get MCP tools for a specific agent
9
11
  */
10
12
  getMcpTools(
11
- agentId: string,
13
+ agentID: string,
12
14
  query: McpToolGetMcpToolsParams,
13
- options?: Core.RequestOptions,
14
- ): Core.APIPromise<McpToolGetMcpToolsResponse> {
15
- return this._client.get(`/get-mcp-tools/${agentId}`, { query, ...options });
15
+ options?: RequestOptions,
16
+ ): APIPromise<McpToolGetMcpToolsResponse> {
17
+ return this._client.get(path`/get-mcp-tools/${agentID}`, { query, ...options });
16
18
  }
17
19
  }
18
20
 
@@ -41,6 +43,11 @@ export interface McpToolGetMcpToolsParams {
41
43
  */
42
44
  mcp_id: string;
43
45
 
46
+ /**
47
+ * The ID of the component if the MCP server is configured under a component.
48
+ */
49
+ component_id?: string;
50
+
44
51
  /**
45
52
  * Optional version of the agent to use for this request. Default to latest
46
53
  * version.
@@ -1,7 +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 * 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';
5
8
 
6
9
  export class PhoneNumber extends APIResource {
7
10
  /**
@@ -13,7 +16,7 @@ export class PhoneNumber extends APIResource {
13
16
  * await client.phoneNumber.create();
14
17
  * ```
15
18
  */
16
- create(body: PhoneNumberCreateParams, options?: Core.RequestOptions): Core.APIPromise<PhoneNumberResponse> {
19
+ create(body: PhoneNumberCreateParams, options?: RequestOptions): APIPromise<PhoneNumberResponse> {
17
20
  return this._client.post('/create-phone-number', { body, ...options });
18
21
  }
19
22
 
@@ -26,8 +29,8 @@ export class PhoneNumber extends APIResource {
26
29
  * await client.phoneNumber.retrieve('+14157774444');
27
30
  * ```
28
31
  */
29
- retrieve(phoneNumber: string, options?: Core.RequestOptions): Core.APIPromise<PhoneNumberResponse> {
30
- return this._client.get(`/get-phone-number/${phoneNumber}`, options);
32
+ retrieve(phoneNumber: string, options?: RequestOptions): APIPromise<PhoneNumberResponse> {
33
+ return this._client.get(path`/get-phone-number/${phoneNumber}`, options);
31
34
  }
32
35
 
33
36
  /**
@@ -48,9 +51,9 @@ export class PhoneNumber extends APIResource {
48
51
  update(
49
52
  phoneNumber: string,
50
53
  body: PhoneNumberUpdateParams,
51
- options?: Core.RequestOptions,
52
- ): Core.APIPromise<PhoneNumberResponse> {
53
- return this._client.patch(`/update-phone-number/${phoneNumber}`, { body, ...options });
54
+ options?: RequestOptions,
55
+ ): APIPromise<PhoneNumberResponse> {
56
+ return this._client.patch(path`/update-phone-number/${phoneNumber}`, { body, ...options });
54
57
  }
55
58
 
56
59
  /**
@@ -62,7 +65,7 @@ export class PhoneNumber extends APIResource {
62
65
  * await client.phoneNumber.list();
63
66
  * ```
64
67
  */
65
- list(options?: Core.RequestOptions): Core.APIPromise<PhoneNumberListResponse> {
68
+ list(options?: RequestOptions): APIPromise<PhoneNumberListResponse> {
66
69
  return this._client.get('/list-phone-numbers', options);
67
70
  }
68
71
 
@@ -74,10 +77,10 @@ export class PhoneNumber extends APIResource {
74
77
  * await client.phoneNumber.delete('+14157774444');
75
78
  * ```
76
79
  */
77
- delete(phoneNumber: string, options?: Core.RequestOptions): Core.APIPromise<void> {
78
- return this._client.delete(`/delete-phone-number/${phoneNumber}`, {
80
+ delete(phoneNumber: string, options?: RequestOptions): APIPromise<void> {
81
+ return this._client.delete(path`/delete-phone-number/${phoneNumber}`, {
79
82
  ...options,
80
- headers: { Accept: '*/*', ...options?.headers },
83
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
81
84
  });
82
85
  }
83
86
 
@@ -94,7 +97,7 @@ export class PhoneNumber extends APIResource {
94
97
  * );
95
98
  * ```
96
99
  */
97
- import(body: PhoneNumberImportParams, options?: Core.RequestOptions): Core.APIPromise<PhoneNumberResponse> {
100
+ import(body: PhoneNumberImportParams, options?: RequestOptions): APIPromise<PhoneNumberResponse> {
98
101
  return this._client.post('/import-phone-number', { body, ...options });
99
102
  }
100
103
  }
@@ -112,12 +115,37 @@ export interface PhoneNumberResponse {
112
115
  */
113
116
  phone_number: string;
114
117
 
118
+ /**
119
+ * Type of the phone number.
120
+ */
121
+ phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom';
122
+
123
+ /**
124
+ * List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed.
125
+ * If not set or empty, calls from all countries are allowed.
126
+ */
127
+ allowed_inbound_country_list?: Array<string> | null;
128
+
129
+ /**
130
+ * List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If
131
+ * not set or empty, calls to all countries are allowed.
132
+ */
133
+ allowed_outbound_country_list?: Array<string> | null;
134
+
115
135
  /**
116
136
  * Area code of the number to obtain. Format is a 3 digit integer. Currently only
117
137
  * supports US area code.
118
138
  */
119
139
  area_code?: number;
120
140
 
141
+ /**
142
+ * Enterprise only. Phone number to transfer inbound calls to when organization is
143
+ * in outage mode. Can be either a Retell phone number or an external number.
144
+ * Cannot be the same as this phone number, and cannot be a number that already has
145
+ * its own fallback configured (prevents nested forwarding).
146
+ */
147
+ fallback_number?: string | null;
148
+
121
149
  /**
122
150
  * Unique id of agent to bind to the number. The number will automatically use the
123
151
  * agent when receiving inbound calls. If null, this number would not accept
@@ -131,6 +159,28 @@ export interface PhoneNumberResponse {
131
159
  */
132
160
  inbound_agent_version?: number | null;
133
161
 
162
+ /**
163
+ * Inbound agents to bind to the number with weights. If set and non-empty, one
164
+ * agent will be picked randomly for each inbound call, with probability
165
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
166
+ * fallback to inbound_agent_id.
167
+ */
168
+ inbound_agents?: Array<PhoneNumberResponse.InboundAgent> | null;
169
+
170
+ /**
171
+ * Inbound SMS agents to bind to the number with weights. If set and non-empty, one
172
+ * agent will be picked randomly for each inbound SMS, with probability
173
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
174
+ * fallback to inbound_sms_agent_id.
175
+ */
176
+ inbound_sms_agents?: Array<PhoneNumberResponse.InboundSMSAgent> | null;
177
+
178
+ /**
179
+ * If set, will send a webhook for inbound SMS, where you can override agent id,
180
+ * set dynamic variables and other fields specific to that chat.
181
+ */
182
+ inbound_sms_webhook_url?: string | null;
183
+
134
184
  /**
135
185
  * If set, will send a webhook for inbound calls, where you can to override agent
136
186
  * id, set dynamic variables and other fields specific to that call.
@@ -156,19 +206,112 @@ export interface PhoneNumberResponse {
156
206
  outbound_agent_version?: number | null;
157
207
 
158
208
  /**
159
- * Pretty printed phone number, provided for your reference.
209
+ * Outbound agents to bind to the number with weights. If set and non-empty, one
210
+ * agent will be picked randomly for each outbound call, with probability
211
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
212
+ * fallback to outbound_agent_id.
160
213
  */
161
- phone_number_pretty?: string;
214
+ outbound_agents?: Array<PhoneNumberResponse.OutboundAgent> | null;
162
215
 
163
216
  /**
164
- * Type of the phone number.
217
+ * Outbound SMS agents to bind to the number with weights. If set and non-empty,
218
+ * one agent will be picked randomly for each outbound SMS, with probability
219
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
220
+ * fallback to outbound_sms_agent_id.
165
221
  */
166
- phone_number_type?: 'retell-twilio' | 'retell-telnyx' | 'custom';
222
+ outbound_sms_agents?: Array<PhoneNumberResponse.OutboundSMSAgent> | null;
223
+
224
+ /**
225
+ * Pretty printed phone number, provided for your reference.
226
+ */
227
+ phone_number_pretty?: string;
228
+
229
+ sip_outbound_trunk_config?: PhoneNumberResponse.SipOutboundTrunkConfig | null;
230
+ }
231
+
232
+ export namespace PhoneNumberResponse {
233
+ export interface InboundAgent {
234
+ agent_id: string;
235
+
236
+ /**
237
+ * The weight of the agent. When used in a list of agents, the total weights must
238
+ * add up to 1.
239
+ */
240
+ weight: number;
241
+
242
+ agent_version?: number;
243
+ }
244
+
245
+ export interface InboundSMSAgent {
246
+ agent_id: string;
247
+
248
+ /**
249
+ * The weight of the agent. When used in a list of agents, the total weights must
250
+ * add up to 1.
251
+ */
252
+ weight: number;
253
+
254
+ agent_version?: number;
255
+ }
256
+
257
+ export interface OutboundAgent {
258
+ agent_id: string;
259
+
260
+ /**
261
+ * The weight of the agent. When used in a list of agents, the total weights must
262
+ * add up to 1.
263
+ */
264
+ weight: number;
265
+
266
+ agent_version?: number;
267
+ }
268
+
269
+ export interface OutboundSMSAgent {
270
+ agent_id: string;
271
+
272
+ /**
273
+ * The weight of the agent. When used in a list of agents, the total weights must
274
+ * add up to 1.
275
+ */
276
+ weight: number;
277
+
278
+ agent_version?: number;
279
+ }
280
+
281
+ export interface SipOutboundTrunkConfig {
282
+ /**
283
+ * The username used for authenticating the SIP trunk for the phone number.
284
+ */
285
+ auth_username?: string | null;
286
+
287
+ /**
288
+ * The termination URI for the SIP trunk for the phone number.
289
+ */
290
+ termination_uri?: string | null;
291
+
292
+ /**
293
+ * Outbound transport protocol for the SIP trunk for the phone number. Valid values
294
+ * are "TLS", "TCP" and "UDP". Default is "TCP".
295
+ */
296
+ transport?: string | null;
297
+ }
167
298
  }
168
299
 
169
300
  export type PhoneNumberListResponse = Array<PhoneNumberResponse>;
170
301
 
171
302
  export interface PhoneNumberCreateParams {
303
+ /**
304
+ * List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed.
305
+ * If not set or empty, calls from all countries are allowed.
306
+ */
307
+ allowed_inbound_country_list?: Array<string> | null;
308
+
309
+ /**
310
+ * List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If
311
+ * not set or empty, calls to all countries are allowed.
312
+ */
313
+ allowed_outbound_country_list?: Array<string> | null;
314
+
172
315
  /**
173
316
  * Area code of the number to obtain. Format is a 3 digit integer. Currently only
174
317
  * supports US area code.
@@ -181,6 +324,14 @@ export interface PhoneNumberCreateParams {
181
324
  */
182
325
  country_code?: 'US' | 'CA';
183
326
 
327
+ /**
328
+ * Enterprise only. Phone number to transfer inbound calls to when organization is
329
+ * in outage mode. Can be either a Retell phone number or an external number.
330
+ * Cannot be the same as this phone number, and cannot be a number that already has
331
+ * its own fallback configured (prevents nested forwarding).
332
+ */
333
+ fallback_number?: string | null;
334
+
184
335
  /**
185
336
  * Unique id of agent to bind to the number. The number will automatically use the
186
337
  * agent when receiving inbound calls. If null, this number would not accept
@@ -194,6 +345,14 @@ export interface PhoneNumberCreateParams {
194
345
  */
195
346
  inbound_agent_version?: number | null;
196
347
 
348
+ /**
349
+ * Inbound agents to bind to the number with weights. If set and non-empty, one
350
+ * agent will be picked randomly for each inbound call, with probability
351
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
352
+ * fallback to inbound_agent_id.
353
+ */
354
+ inbound_agents?: Array<PhoneNumberCreateParams.InboundAgent> | null;
355
+
197
356
  /**
198
357
  * If set, will send a webhook for inbound calls, where you can to override agent
199
358
  * id, set dynamic variables and other fields specific to that call.
@@ -223,6 +382,14 @@ export interface PhoneNumberCreateParams {
223
382
  */
224
383
  outbound_agent_version?: number | null;
225
384
 
385
+ /**
386
+ * Outbound agents to bind to the number with weights. If set and non-empty, one
387
+ * agent will be picked randomly for each outbound call, with probability
388
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
389
+ * fallback to outbound_agent_id.
390
+ */
391
+ outbound_agents?: Array<PhoneNumberCreateParams.OutboundAgent> | null;
392
+
226
393
  /**
227
394
  * The number you are trying to purchase in E.164 format of the number (+country
228
395
  * code then number with no space and no special characters).
@@ -233,9 +400,74 @@ export interface PhoneNumberCreateParams {
233
400
  * Whether to purchase a toll-free number. Toll-free numbers incur higher costs.
234
401
  */
235
402
  toll_free?: boolean;
403
+
404
+ /**
405
+ * Outbound transport protocol to use for the phone number. Valid values are "TLS",
406
+ * "TCP" and "UDP". Default is "TCP".
407
+ */
408
+ transport?: string | null;
409
+ }
410
+
411
+ export namespace PhoneNumberCreateParams {
412
+ export interface InboundAgent {
413
+ agent_id: string;
414
+
415
+ /**
416
+ * The weight of the agent. When used in a list of agents, the total weights must
417
+ * add up to 1.
418
+ */
419
+ weight: number;
420
+
421
+ agent_version?: number;
422
+ }
423
+
424
+ export interface OutboundAgent {
425
+ agent_id: string;
426
+
427
+ /**
428
+ * The weight of the agent. When used in a list of agents, the total weights must
429
+ * add up to 1.
430
+ */
431
+ weight: number;
432
+
433
+ agent_version?: number;
434
+ }
236
435
  }
237
436
 
238
437
  export interface PhoneNumberUpdateParams {
438
+ /**
439
+ * List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed.
440
+ * If not set or empty, calls from all countries are allowed.
441
+ */
442
+ allowed_inbound_country_list?: Array<string> | null;
443
+
444
+ /**
445
+ * List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If
446
+ * not set or empty, calls to all countries are allowed.
447
+ */
448
+ allowed_outbound_country_list?: Array<string> | null;
449
+
450
+ /**
451
+ * The password used for authentication for the SIP trunk to update for the phone
452
+ * number.
453
+ */
454
+ auth_password?: string;
455
+
456
+ /**
457
+ * The username used for authentication for the SIP trunk to update for the phone
458
+ * number.
459
+ */
460
+ auth_username?: string;
461
+
462
+ /**
463
+ * Enterprise only. Phone number to transfer inbound calls to when organization is
464
+ * in outage mode. Can be either a Retell phone number or an external number. Set
465
+ * to null to remove. Cannot be the same as this phone number, and cannot be a
466
+ * number that already has its own fallback configured (prevents nested
467
+ * forwarding).
468
+ */
469
+ fallback_number?: string | null;
470
+
239
471
  /**
240
472
  * Unique id of agent to bind to the number. The number will automatically use the
241
473
  * agent when receiving inbound calls. If set to null, this number would not accept
@@ -249,6 +481,28 @@ export interface PhoneNumberUpdateParams {
249
481
  */
250
482
  inbound_agent_version?: number | null;
251
483
 
484
+ /**
485
+ * Inbound agents to bind to the number with weights. If set and non-empty, one
486
+ * agent will be picked randomly for each inbound call, with probability
487
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
488
+ * fallback to inbound_agent_id.
489
+ */
490
+ inbound_agents?: Array<PhoneNumberUpdateParams.InboundAgent> | null;
491
+
492
+ /**
493
+ * Inbound SMS agents to bind to the number with weights. If set and non-empty, one
494
+ * agent will be picked randomly for each inbound SMS, with probability
495
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
496
+ * fallback to inbound_sms_agent_id.
497
+ */
498
+ inbound_sms_agents?: Array<PhoneNumberUpdateParams.InboundSMSAgent> | null;
499
+
500
+ /**
501
+ * If set, will send a webhook for inbound SMS, where you can override agent id,
502
+ * set dynamic variables and other fields specific to that chat.
503
+ */
504
+ inbound_sms_webhook_url?: string | null;
505
+
252
506
  /**
253
507
  * If set, will send a webhook for inbound calls, where you can to override agent
254
508
  * id, set dynamic variables and other fields specific to that call.
@@ -272,6 +526,84 @@ export interface PhoneNumberUpdateParams {
272
526
  * default to latest version.
273
527
  */
274
528
  outbound_agent_version?: number | null;
529
+
530
+ /**
531
+ * Outbound agents to bind to the number with weights. If set and non-empty, one
532
+ * agent will be picked randomly for each outbound call, with probability
533
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
534
+ * fallback to outbound_agent_id.
535
+ */
536
+ outbound_agents?: Array<PhoneNumberUpdateParams.OutboundAgent> | null;
537
+
538
+ /**
539
+ * Outbound SMS agents to bind to the number with weights. If set and non-empty,
540
+ * one agent will be picked randomly for each outbound SMS, with probability
541
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
542
+ * fallback to outbound_sms_agent_id.
543
+ */
544
+ outbound_sms_agents?: Array<PhoneNumberUpdateParams.OutboundSMSAgent> | null;
545
+
546
+ /**
547
+ * The termination uri to update for the phone number. This is used for outbound
548
+ * calls.
549
+ */
550
+ termination_uri?: string;
551
+
552
+ /**
553
+ * Outbound transport protocol to update for the phone number. Valid values are
554
+ * "TLS", "TCP" and "UDP". Default is "TCP".
555
+ */
556
+ transport?: string | null;
557
+ }
558
+
559
+ export namespace PhoneNumberUpdateParams {
560
+ export interface InboundAgent {
561
+ agent_id: string;
562
+
563
+ /**
564
+ * The weight of the agent. When used in a list of agents, the total weights must
565
+ * add up to 1.
566
+ */
567
+ weight: number;
568
+
569
+ agent_version?: number;
570
+ }
571
+
572
+ export interface InboundSMSAgent {
573
+ agent_id: string;
574
+
575
+ /**
576
+ * The weight of the agent. When used in a list of agents, the total weights must
577
+ * add up to 1.
578
+ */
579
+ weight: number;
580
+
581
+ agent_version?: number;
582
+ }
583
+
584
+ export interface OutboundAgent {
585
+ agent_id: string;
586
+
587
+ /**
588
+ * The weight of the agent. When used in a list of agents, the total weights must
589
+ * add up to 1.
590
+ */
591
+ weight: number;
592
+
593
+ agent_version?: number;
594
+ }
595
+
596
+ export interface OutboundSMSAgent {
597
+ agent_id: string;
598
+
599
+ /**
600
+ * The weight of the agent. When used in a list of agents, the total weights must
601
+ * add up to 1.
602
+ */
603
+ weight: number;
604
+
605
+ agent_version?: number;
606
+ }
275
607
  }
276
608
 
277
609
  export interface PhoneNumberImportParams {
@@ -289,6 +621,18 @@ export interface PhoneNumberImportParams {
289
621
  */
290
622
  termination_uri: string;
291
623
 
624
+ /**
625
+ * List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed.
626
+ * If not set or empty, calls from all countries are allowed.
627
+ */
628
+ allowed_inbound_country_list?: Array<string> | null;
629
+
630
+ /**
631
+ * List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If
632
+ * not set or empty, calls to all countries are allowed.
633
+ */
634
+ allowed_outbound_country_list?: Array<string> | null;
635
+
292
636
  /**
293
637
  * Unique id of agent to bind to the number. The number will automatically use the
294
638
  * agent when receiving inbound calls. If null, this number would not accept
@@ -302,6 +646,14 @@ export interface PhoneNumberImportParams {
302
646
  */
303
647
  inbound_agent_version?: number | null;
304
648
 
649
+ /**
650
+ * Inbound agents to bind to the number with weights. If set and non-empty, one
651
+ * agent will be picked randomly for each inbound call, with probability
652
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
653
+ * fallback to inbound_agent_id.
654
+ */
655
+ inbound_agents?: Array<PhoneNumberImportParams.InboundAgent> | null;
656
+
305
657
  /**
306
658
  * If set, will send a webhook for inbound calls, where you can to override agent
307
659
  * id, set dynamic variables and other fields specific to that call.
@@ -318,7 +670,7 @@ export interface PhoneNumberImportParams {
318
670
  * agent when conducting outbound calls. If null, this number would not be able to
319
671
  * initiate outbound call without agent id override.
320
672
  */
321
- outbound_agent_id?: string;
673
+ outbound_agent_id?: string | null;
322
674
 
323
675
  /**
324
676
  * Version of the outbound agent to bind to the number. If not provided, will
@@ -326,6 +678,14 @@ export interface PhoneNumberImportParams {
326
678
  */
327
679
  outbound_agent_version?: number | null;
328
680
 
681
+ /**
682
+ * Outbound agents to bind to the number with weights. If set and non-empty, one
683
+ * agent will be picked randomly for each outbound call, with probability
684
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
685
+ * fallback to outbound_agent_id.
686
+ */
687
+ outbound_agents?: Array<PhoneNumberImportParams.OutboundAgent> | null;
688
+
329
689
  /**
330
690
  * The password used for authentication for the SIP trunk.
331
691
  */
@@ -335,6 +695,38 @@ export interface PhoneNumberImportParams {
335
695
  * The username used for authentication for the SIP trunk.
336
696
  */
337
697
  sip_trunk_auth_username?: string;
698
+
699
+ /**
700
+ * Outbound transport protocol to update for the phone number. Valid values are
701
+ * "TLS", "TCP" and "UDP". Default is "TCP".
702
+ */
703
+ transport?: string | null;
704
+ }
705
+
706
+ export namespace PhoneNumberImportParams {
707
+ export interface InboundAgent {
708
+ agent_id: string;
709
+
710
+ /**
711
+ * The weight of the agent. When used in a list of agents, the total weights must
712
+ * add up to 1.
713
+ */
714
+ weight: number;
715
+
716
+ agent_version?: number;
717
+ }
718
+
719
+ export interface OutboundAgent {
720
+ agent_id: string;
721
+
722
+ /**
723
+ * The weight of the agent. When used in a list of agents, the total weights must
724
+ * add up to 1.
725
+ */
726
+ weight: number;
727
+
728
+ agent_version?: number;
729
+ }
338
730
  }
339
731
 
340
732
  export declare namespace PhoneNumber {