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
@@ -0,0 +1,595 @@
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 PhoneNumber extends APIResource {
5
+ /**
6
+ * Buy a new phone number & Bind agents
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const phoneNumberResponse =
11
+ * await client.phoneNumber.create();
12
+ * ```
13
+ */
14
+ create(body: PhoneNumberCreateParams, options?: RequestOptions): APIPromise<PhoneNumberResponse>;
15
+ /**
16
+ * Retrieve details of a specific phone number
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * const phoneNumberResponse =
21
+ * await client.phoneNumber.retrieve('+14157774444');
22
+ * ```
23
+ */
24
+ retrieve(phoneNumber: string, options?: RequestOptions): APIPromise<PhoneNumberResponse>;
25
+ /**
26
+ * Update agent bound to a purchased phone number
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const phoneNumberResponse = await client.phoneNumber.update(
31
+ * '+14157774444',
32
+ * {
33
+ * inbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
34
+ * nickname: 'Frontdesk Number',
35
+ * outbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
36
+ * },
37
+ * );
38
+ * ```
39
+ */
40
+ update(phoneNumber: string, body: PhoneNumberUpdateParams, options?: RequestOptions): APIPromise<PhoneNumberResponse>;
41
+ /**
42
+ * List all phone numbers
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * const phoneNumberResponses =
47
+ * await client.phoneNumber.list();
48
+ * ```
49
+ */
50
+ list(options?: RequestOptions): APIPromise<PhoneNumberListResponse>;
51
+ /**
52
+ * Delete an existing phone number
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * await client.phoneNumber.delete('+14157774444');
57
+ * ```
58
+ */
59
+ delete(phoneNumber: string, options?: RequestOptions): APIPromise<void>;
60
+ /**
61
+ * Import a phone number from custom telephony & Bind agents
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * const phoneNumberResponse = await client.phoneNumber.import(
66
+ * {
67
+ * phone_number: '+14157774444',
68
+ * termination_uri: 'someuri.pstn.twilio.com',
69
+ * },
70
+ * );
71
+ * ```
72
+ */
73
+ import(body: PhoneNumberImportParams, options?: RequestOptions): APIPromise<PhoneNumberResponse>;
74
+ }
75
+ export interface PhoneNumberResponse {
76
+ /**
77
+ * Last modification timestamp (milliseconds since epoch). Either the time of last
78
+ * update or creation if no updates available.
79
+ */
80
+ last_modification_timestamp: number;
81
+ /**
82
+ * E.164 format of the number (+country code, then number with no space, no special
83
+ * characters), used as the unique identifier for phone number APIs.
84
+ */
85
+ phone_number: string;
86
+ /**
87
+ * Type of the phone number.
88
+ */
89
+ phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom';
90
+ /**
91
+ * List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed.
92
+ * If not set or empty, calls from all countries are allowed.
93
+ */
94
+ allowed_inbound_country_list?: Array<string> | null;
95
+ /**
96
+ * List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If
97
+ * not set or empty, calls to all countries are allowed.
98
+ */
99
+ allowed_outbound_country_list?: Array<string> | null;
100
+ /**
101
+ * Area code of the number to obtain. Format is a 3 digit integer. Currently only
102
+ * supports US area code.
103
+ */
104
+ area_code?: number;
105
+ /**
106
+ * Enterprise only. Phone number to transfer inbound calls to when organization is
107
+ * in outage mode. Can be either a Retell phone number or an external number.
108
+ * Cannot be the same as this phone number, and cannot be a number that already has
109
+ * its own fallback configured (prevents nested forwarding).
110
+ */
111
+ fallback_number?: string | null;
112
+ /**
113
+ * Unique id of agent to bind to the number. The number will automatically use the
114
+ * agent when receiving inbound calls. If null, this number would not accept
115
+ * inbound call.
116
+ */
117
+ inbound_agent_id?: string | null;
118
+ /**
119
+ * Version of the inbound agent to bind to the number. If not provided, will
120
+ * default to latest version.
121
+ */
122
+ inbound_agent_version?: number | null;
123
+ /**
124
+ * Inbound agents to bind to the number with weights. If set and non-empty, one
125
+ * agent will be picked randomly for each inbound call, with probability
126
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
127
+ * fallback to inbound_agent_id.
128
+ */
129
+ inbound_agents?: Array<PhoneNumberResponse.InboundAgent> | null;
130
+ /**
131
+ * Inbound SMS agents to bind to the number with weights. If set and non-empty, one
132
+ * agent will be picked randomly for each inbound SMS, with probability
133
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
134
+ * fallback to inbound_sms_agent_id.
135
+ */
136
+ inbound_sms_agents?: Array<PhoneNumberResponse.InboundSMSAgent> | null;
137
+ /**
138
+ * If set, will send a webhook for inbound SMS, where you can override agent id,
139
+ * set dynamic variables and other fields specific to that chat.
140
+ */
141
+ inbound_sms_webhook_url?: string | null;
142
+ /**
143
+ * If set, will send a webhook for inbound calls, where you can to override agent
144
+ * id, set dynamic variables and other fields specific to that call.
145
+ */
146
+ inbound_webhook_url?: string | null;
147
+ /**
148
+ * Nickname of the number. This is for your reference only.
149
+ */
150
+ nickname?: string | null;
151
+ /**
152
+ * Unique id of agent to bind to the number. The number will automatically use the
153
+ * agent when conducting outbound calls. If null, this number would not be able to
154
+ * initiate outbound call without agent id override.
155
+ */
156
+ outbound_agent_id?: string | null;
157
+ /**
158
+ * Version of the outbound agent to bind to the number. If not provided, will
159
+ * default to latest version.
160
+ */
161
+ outbound_agent_version?: number | null;
162
+ /**
163
+ * Outbound agents to bind to the number with weights. If set and non-empty, one
164
+ * agent will be picked randomly for each outbound call, with probability
165
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
166
+ * fallback to outbound_agent_id.
167
+ */
168
+ outbound_agents?: Array<PhoneNumberResponse.OutboundAgent> | null;
169
+ /**
170
+ * Outbound SMS agents to bind to the number with weights. If set and non-empty,
171
+ * one agent will be picked randomly for each outbound SMS, with probability
172
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
173
+ * fallback to outbound_sms_agent_id.
174
+ */
175
+ outbound_sms_agents?: Array<PhoneNumberResponse.OutboundSMSAgent> | null;
176
+ /**
177
+ * Pretty printed phone number, provided for your reference.
178
+ */
179
+ phone_number_pretty?: string;
180
+ sip_outbound_trunk_config?: PhoneNumberResponse.SipOutboundTrunkConfig | null;
181
+ }
182
+ export declare namespace PhoneNumberResponse {
183
+ interface InboundAgent {
184
+ agent_id: string;
185
+ /**
186
+ * The weight of the agent. When used in a list of agents, the total weights must
187
+ * add up to 1.
188
+ */
189
+ weight: number;
190
+ agent_version?: number;
191
+ }
192
+ interface InboundSMSAgent {
193
+ agent_id: string;
194
+ /**
195
+ * The weight of the agent. When used in a list of agents, the total weights must
196
+ * add up to 1.
197
+ */
198
+ weight: number;
199
+ agent_version?: number;
200
+ }
201
+ interface OutboundAgent {
202
+ agent_id: string;
203
+ /**
204
+ * The weight of the agent. When used in a list of agents, the total weights must
205
+ * add up to 1.
206
+ */
207
+ weight: number;
208
+ agent_version?: number;
209
+ }
210
+ interface OutboundSMSAgent {
211
+ agent_id: string;
212
+ /**
213
+ * The weight of the agent. When used in a list of agents, the total weights must
214
+ * add up to 1.
215
+ */
216
+ weight: number;
217
+ agent_version?: number;
218
+ }
219
+ interface SipOutboundTrunkConfig {
220
+ /**
221
+ * The username used for authenticating the SIP trunk for the phone number.
222
+ */
223
+ auth_username?: string | null;
224
+ /**
225
+ * The termination URI for the SIP trunk for the phone number.
226
+ */
227
+ termination_uri?: string | null;
228
+ /**
229
+ * Outbound transport protocol for the SIP trunk for the phone number. Valid values
230
+ * are "TLS", "TCP" and "UDP". Default is "TCP".
231
+ */
232
+ transport?: string | null;
233
+ }
234
+ }
235
+ export type PhoneNumberListResponse = Array<PhoneNumberResponse>;
236
+ export interface PhoneNumberCreateParams {
237
+ /**
238
+ * List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed.
239
+ * If not set or empty, calls from all countries are allowed.
240
+ */
241
+ allowed_inbound_country_list?: Array<string> | null;
242
+ /**
243
+ * List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If
244
+ * not set or empty, calls to all countries are allowed.
245
+ */
246
+ allowed_outbound_country_list?: Array<string> | null;
247
+ /**
248
+ * Area code of the number to obtain. Format is a 3 digit integer. Currently only
249
+ * supports US area code.
250
+ */
251
+ area_code?: number;
252
+ /**
253
+ * The ISO 3166-1 alpha-2 country code of the number you are trying to purchase. If
254
+ * left empty, will default to "US".
255
+ */
256
+ country_code?: 'US' | 'CA';
257
+ /**
258
+ * Enterprise only. Phone number to transfer inbound calls to when organization is
259
+ * in outage mode. Can be either a Retell phone number or an external number.
260
+ * Cannot be the same as this phone number, and cannot be a number that already has
261
+ * its own fallback configured (prevents nested forwarding).
262
+ */
263
+ fallback_number?: string | null;
264
+ /**
265
+ * Unique id of agent to bind to the number. The number will automatically use the
266
+ * agent when receiving inbound calls. If null, this number would not accept
267
+ * inbound call.
268
+ */
269
+ inbound_agent_id?: string | null;
270
+ /**
271
+ * Version of the inbound agent to bind to the number. If not provided, will
272
+ * default to latest version.
273
+ */
274
+ inbound_agent_version?: number | null;
275
+ /**
276
+ * Inbound agents to bind to the number with weights. If set and non-empty, one
277
+ * agent will be picked randomly for each inbound call, with probability
278
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
279
+ * fallback to inbound_agent_id.
280
+ */
281
+ inbound_agents?: Array<PhoneNumberCreateParams.InboundAgent> | null;
282
+ /**
283
+ * If set, will send a webhook for inbound calls, where you can to override agent
284
+ * id, set dynamic variables and other fields specific to that call.
285
+ */
286
+ inbound_webhook_url?: string | null;
287
+ /**
288
+ * Nickname of the number. This is for your reference only.
289
+ */
290
+ nickname?: string;
291
+ /**
292
+ * The provider to purchase the phone number from. Default to twilio.
293
+ */
294
+ number_provider?: 'twilio' | 'telnyx';
295
+ /**
296
+ * Unique id of agent to bind to the number. The number will automatically use the
297
+ * agent when conducting outbound calls. If null, this number would not be able to
298
+ * initiate outbound call without agent id override.
299
+ */
300
+ outbound_agent_id?: string | null;
301
+ /**
302
+ * Version of the outbound agent to bind to the number. If not provided, will
303
+ * default to latest version.
304
+ */
305
+ outbound_agent_version?: number | null;
306
+ /**
307
+ * Outbound agents to bind to the number with weights. If set and non-empty, one
308
+ * agent will be picked randomly for each outbound call, with probability
309
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
310
+ * fallback to outbound_agent_id.
311
+ */
312
+ outbound_agents?: Array<PhoneNumberCreateParams.OutboundAgent> | null;
313
+ /**
314
+ * The number you are trying to purchase in E.164 format of the number (+country
315
+ * code then number with no space and no special characters).
316
+ */
317
+ phone_number?: string;
318
+ /**
319
+ * Whether to purchase a toll-free number. Toll-free numbers incur higher costs.
320
+ */
321
+ toll_free?: boolean;
322
+ /**
323
+ * Outbound transport protocol to use for the phone number. Valid values are "TLS",
324
+ * "TCP" and "UDP". Default is "TCP".
325
+ */
326
+ transport?: string | null;
327
+ }
328
+ export declare namespace PhoneNumberCreateParams {
329
+ interface InboundAgent {
330
+ agent_id: string;
331
+ /**
332
+ * The weight of the agent. When used in a list of agents, the total weights must
333
+ * add up to 1.
334
+ */
335
+ weight: number;
336
+ agent_version?: number;
337
+ }
338
+ interface OutboundAgent {
339
+ agent_id: string;
340
+ /**
341
+ * The weight of the agent. When used in a list of agents, the total weights must
342
+ * add up to 1.
343
+ */
344
+ weight: number;
345
+ agent_version?: number;
346
+ }
347
+ }
348
+ export interface PhoneNumberUpdateParams {
349
+ /**
350
+ * List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed.
351
+ * If not set or empty, calls from all countries are allowed.
352
+ */
353
+ allowed_inbound_country_list?: Array<string> | null;
354
+ /**
355
+ * List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If
356
+ * not set or empty, calls to all countries are allowed.
357
+ */
358
+ allowed_outbound_country_list?: Array<string> | null;
359
+ /**
360
+ * The password used for authentication for the SIP trunk to update for the phone
361
+ * number.
362
+ */
363
+ auth_password?: string;
364
+ /**
365
+ * The username used for authentication for the SIP trunk to update for the phone
366
+ * number.
367
+ */
368
+ auth_username?: string;
369
+ /**
370
+ * Enterprise only. Phone number to transfer inbound calls to when organization is
371
+ * in outage mode. Can be either a Retell phone number or an external number. Set
372
+ * to null to remove. Cannot be the same as this phone number, and cannot be a
373
+ * number that already has its own fallback configured (prevents nested
374
+ * forwarding).
375
+ */
376
+ fallback_number?: string | null;
377
+ /**
378
+ * Unique id of agent to bind to the number. The number will automatically use the
379
+ * agent when receiving inbound calls. If set to null, this number would not accept
380
+ * inbound call.
381
+ */
382
+ inbound_agent_id?: string | null;
383
+ /**
384
+ * Version of the inbound agent to bind to the number. If not provided, will
385
+ * default to latest version.
386
+ */
387
+ inbound_agent_version?: number | null;
388
+ /**
389
+ * Inbound agents to bind to the number with weights. If set and non-empty, one
390
+ * agent will be picked randomly for each inbound call, with probability
391
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
392
+ * fallback to inbound_agent_id.
393
+ */
394
+ inbound_agents?: Array<PhoneNumberUpdateParams.InboundAgent> | null;
395
+ /**
396
+ * Inbound SMS agents to bind to the number with weights. If set and non-empty, one
397
+ * agent will be picked randomly for each inbound SMS, with probability
398
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
399
+ * fallback to inbound_sms_agent_id.
400
+ */
401
+ inbound_sms_agents?: Array<PhoneNumberUpdateParams.InboundSMSAgent> | null;
402
+ /**
403
+ * If set, will send a webhook for inbound SMS, where you can override agent id,
404
+ * set dynamic variables and other fields specific to that chat.
405
+ */
406
+ inbound_sms_webhook_url?: string | null;
407
+ /**
408
+ * If set, will send a webhook for inbound calls, where you can to override agent
409
+ * id, set dynamic variables and other fields specific to that call.
410
+ */
411
+ inbound_webhook_url?: string | null;
412
+ /**
413
+ * Nickname of the number. This is for your reference only.
414
+ */
415
+ nickname?: string | null;
416
+ /**
417
+ * Unique id of agent to bind to the number. The number will automatically use the
418
+ * agent when conducting outbound calls. If set to null, this number would not be
419
+ * able to initiate outbound call without agent id override.
420
+ */
421
+ outbound_agent_id?: string | null;
422
+ /**
423
+ * Version of the outbound agent to bind to the number. If not provided, will
424
+ * default to latest version.
425
+ */
426
+ outbound_agent_version?: number | null;
427
+ /**
428
+ * Outbound agents to bind to the number with weights. If set and non-empty, one
429
+ * agent will be picked randomly for each outbound call, with probability
430
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
431
+ * fallback to outbound_agent_id.
432
+ */
433
+ outbound_agents?: Array<PhoneNumberUpdateParams.OutboundAgent> | null;
434
+ /**
435
+ * Outbound SMS agents to bind to the number with weights. If set and non-empty,
436
+ * one agent will be picked randomly for each outbound SMS, with probability
437
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
438
+ * fallback to outbound_sms_agent_id.
439
+ */
440
+ outbound_sms_agents?: Array<PhoneNumberUpdateParams.OutboundSMSAgent> | null;
441
+ /**
442
+ * The termination uri to update for the phone number. This is used for outbound
443
+ * calls.
444
+ */
445
+ termination_uri?: string;
446
+ /**
447
+ * Outbound transport protocol to update for the phone number. Valid values are
448
+ * "TLS", "TCP" and "UDP". Default is "TCP".
449
+ */
450
+ transport?: string | null;
451
+ }
452
+ export declare namespace PhoneNumberUpdateParams {
453
+ interface InboundAgent {
454
+ agent_id: string;
455
+ /**
456
+ * The weight of the agent. When used in a list of agents, the total weights must
457
+ * add up to 1.
458
+ */
459
+ weight: number;
460
+ agent_version?: number;
461
+ }
462
+ interface InboundSMSAgent {
463
+ agent_id: string;
464
+ /**
465
+ * The weight of the agent. When used in a list of agents, the total weights must
466
+ * add up to 1.
467
+ */
468
+ weight: number;
469
+ agent_version?: number;
470
+ }
471
+ interface OutboundAgent {
472
+ agent_id: string;
473
+ /**
474
+ * The weight of the agent. When used in a list of agents, the total weights must
475
+ * add up to 1.
476
+ */
477
+ weight: number;
478
+ agent_version?: number;
479
+ }
480
+ interface OutboundSMSAgent {
481
+ agent_id: string;
482
+ /**
483
+ * The weight of the agent. When used in a list of agents, the total weights must
484
+ * add up to 1.
485
+ */
486
+ weight: number;
487
+ agent_version?: number;
488
+ }
489
+ }
490
+ export interface PhoneNumberImportParams {
491
+ /**
492
+ * The number you are trying to import in E.164 format of the number (+country
493
+ * code, then number with no space, no special characters), used as the unique
494
+ * identifier for phone number APIs.
495
+ */
496
+ phone_number: string;
497
+ /**
498
+ * The termination uri to uniquely identify your elastic SIP trunk. This is used
499
+ * for outbound calls. For Twilio elastic SIP trunks it always end with
500
+ * ".pstn.twilio.com".
501
+ */
502
+ termination_uri: string;
503
+ /**
504
+ * List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed.
505
+ * If not set or empty, calls from all countries are allowed.
506
+ */
507
+ allowed_inbound_country_list?: Array<string> | null;
508
+ /**
509
+ * List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If
510
+ * not set or empty, calls to all countries are allowed.
511
+ */
512
+ allowed_outbound_country_list?: Array<string> | null;
513
+ /**
514
+ * Unique id of agent to bind to the number. The number will automatically use the
515
+ * agent when receiving inbound calls. If null, this number would not accept
516
+ * inbound call.
517
+ */
518
+ inbound_agent_id?: string | null;
519
+ /**
520
+ * Version of the inbound agent to bind to the number. If not provided, will
521
+ * default to latest version.
522
+ */
523
+ inbound_agent_version?: number | null;
524
+ /**
525
+ * Inbound agents to bind to the number with weights. If set and non-empty, one
526
+ * agent will be picked randomly for each inbound call, with probability
527
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
528
+ * fallback to inbound_agent_id.
529
+ */
530
+ inbound_agents?: Array<PhoneNumberImportParams.InboundAgent> | null;
531
+ /**
532
+ * If set, will send a webhook for inbound calls, where you can to override agent
533
+ * id, set dynamic variables and other fields specific to that call.
534
+ */
535
+ inbound_webhook_url?: string | null;
536
+ /**
537
+ * Nickname of the number. This is for your reference only.
538
+ */
539
+ nickname?: string;
540
+ /**
541
+ * Unique id of agent to bind to the number. The number will automatically use the
542
+ * agent when conducting outbound calls. If null, this number would not be able to
543
+ * initiate outbound call without agent id override.
544
+ */
545
+ outbound_agent_id?: string | null;
546
+ /**
547
+ * Version of the outbound agent to bind to the number. If not provided, will
548
+ * default to latest version.
549
+ */
550
+ outbound_agent_version?: number | null;
551
+ /**
552
+ * Outbound agents to bind to the number with weights. If set and non-empty, one
553
+ * agent will be picked randomly for each outbound call, with probability
554
+ * proportional to the weight. Total weights must add up to 1. If not set or empty,
555
+ * fallback to outbound_agent_id.
556
+ */
557
+ outbound_agents?: Array<PhoneNumberImportParams.OutboundAgent> | null;
558
+ /**
559
+ * The password used for authentication for the SIP trunk.
560
+ */
561
+ sip_trunk_auth_password?: string;
562
+ /**
563
+ * The username used for authentication for the SIP trunk.
564
+ */
565
+ sip_trunk_auth_username?: string;
566
+ /**
567
+ * Outbound transport protocol to update for the phone number. Valid values are
568
+ * "TLS", "TCP" and "UDP". Default is "TCP".
569
+ */
570
+ transport?: string | null;
571
+ }
572
+ export declare namespace PhoneNumberImportParams {
573
+ interface InboundAgent {
574
+ agent_id: string;
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
+ agent_version?: number;
581
+ }
582
+ interface OutboundAgent {
583
+ agent_id: string;
584
+ /**
585
+ * The weight of the agent. When used in a list of agents, the total weights must
586
+ * add up to 1.
587
+ */
588
+ weight: number;
589
+ agent_version?: number;
590
+ }
591
+ }
592
+ export declare namespace PhoneNumber {
593
+ export { type PhoneNumberResponse as PhoneNumberResponse, type PhoneNumberListResponse as PhoneNumberListResponse, type PhoneNumberCreateParams as PhoneNumberCreateParams, type PhoneNumberUpdateParams as PhoneNumberUpdateParams, type PhoneNumberImportParams as PhoneNumberImportParams, };
594
+ }
595
+ //# sourceMappingURL=phone-number.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phone-number.d.mts","sourceRoot":"","sources":["../src/resources/phone-number.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAIhG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