@mobilerun/sdk 5.4.0 → 5.6.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 (418) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/client.d.mts +10 -13
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +10 -13
  5. package/client.d.ts.map +1 -1
  6. package/client.js +1 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +2 -4
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/apps.d.mts +23 -12
  12. package/resources/apps.d.mts.map +1 -1
  13. package/resources/apps.d.ts +23 -12
  14. package/resources/apps.d.ts.map +1 -1
  15. package/resources/apps.js +8 -3
  16. package/resources/apps.js.map +1 -1
  17. package/resources/apps.mjs +8 -3
  18. package/resources/apps.mjs.map +1 -1
  19. package/resources/assistant/conversations.d.mts +33 -21
  20. package/resources/assistant/conversations.d.mts.map +1 -1
  21. package/resources/assistant/conversations.d.ts +33 -21
  22. package/resources/assistant/conversations.d.ts.map +1 -1
  23. package/resources/assistant/conversations.js +16 -15
  24. package/resources/assistant/conversations.js.map +1 -1
  25. package/resources/assistant/conversations.mjs +16 -15
  26. package/resources/assistant/conversations.mjs.map +1 -1
  27. package/resources/connect/connect.d.mts +2 -2
  28. package/resources/connect/connect.d.mts.map +1 -1
  29. package/resources/connect/connect.d.ts +2 -2
  30. package/resources/connect/connect.d.ts.map +1 -1
  31. package/resources/connect/connect.js.map +1 -1
  32. package/resources/connect/connect.mjs.map +1 -1
  33. package/resources/connect/index.d.mts +1 -1
  34. package/resources/connect/index.d.mts.map +1 -1
  35. package/resources/connect/index.d.ts +1 -1
  36. package/resources/connect/index.d.ts.map +1 -1
  37. package/resources/connect/index.js.map +1 -1
  38. package/resources/connect/index.mjs.map +1 -1
  39. package/resources/connect/proxies.d.mts +118 -19
  40. package/resources/connect/proxies.d.mts.map +1 -1
  41. package/resources/connect/proxies.d.ts +118 -19
  42. package/resources/connect/proxies.d.ts.map +1 -1
  43. package/resources/connect/proxies.js +19 -0
  44. package/resources/connect/proxies.js.map +1 -1
  45. package/resources/connect/proxies.mjs +19 -0
  46. package/resources/connect/proxies.mjs.map +1 -1
  47. package/resources/devices/apps.d.mts +37 -17
  48. package/resources/devices/apps.d.mts.map +1 -1
  49. package/resources/devices/apps.d.ts +37 -17
  50. package/resources/devices/apps.d.ts.map +1 -1
  51. package/resources/devices/apps.js +15 -14
  52. package/resources/devices/apps.js.map +1 -1
  53. package/resources/devices/apps.mjs +15 -14
  54. package/resources/devices/apps.mjs.map +1 -1
  55. package/resources/devices/browser.d.mts +9 -3
  56. package/resources/devices/browser.d.mts.map +1 -1
  57. package/resources/devices/browser.d.ts +9 -3
  58. package/resources/devices/browser.d.ts.map +1 -1
  59. package/resources/devices/browser.js +9 -3
  60. package/resources/devices/browser.js.map +1 -1
  61. package/resources/devices/browser.mjs +9 -3
  62. package/resources/devices/browser.mjs.map +1 -1
  63. package/resources/devices/devices.d.mts +81 -27
  64. package/resources/devices/devices.d.mts.map +1 -1
  65. package/resources/devices/devices.d.ts +81 -27
  66. package/resources/devices/devices.d.ts.map +1 -1
  67. package/resources/devices/devices.js +24 -11
  68. package/resources/devices/devices.js.map +1 -1
  69. package/resources/devices/devices.mjs +24 -11
  70. package/resources/devices/devices.mjs.map +1 -1
  71. package/resources/devices/index.d.mts +2 -1
  72. package/resources/devices/index.d.mts.map +1 -1
  73. package/resources/devices/index.d.ts +2 -1
  74. package/resources/devices/index.d.ts.map +1 -1
  75. package/resources/devices/index.js +3 -1
  76. package/resources/devices/index.js.map +1 -1
  77. package/resources/devices/index.mjs +1 -0
  78. package/resources/devices/index.mjs.map +1 -1
  79. package/resources/devices/keyboard.d.mts +9 -3
  80. package/resources/devices/keyboard.d.mts.map +1 -1
  81. package/resources/devices/keyboard.d.ts +9 -3
  82. package/resources/devices/keyboard.d.ts.map +1 -1
  83. package/resources/devices/keyboard.js +3 -3
  84. package/resources/devices/keyboard.mjs +3 -3
  85. package/resources/devices/recordings.d.mts +13 -0
  86. package/resources/devices/recordings.d.mts.map +1 -1
  87. package/resources/devices/recordings.d.ts +13 -0
  88. package/resources/devices/recordings.d.ts.map +1 -1
  89. package/resources/devices/traffic-sessions.d.mts +163 -0
  90. package/resources/devices/traffic-sessions.d.mts.map +1 -0
  91. package/resources/devices/traffic-sessions.d.ts +163 -0
  92. package/resources/devices/traffic-sessions.d.ts.map +1 -0
  93. package/resources/devices/traffic-sessions.js +37 -0
  94. package/resources/devices/traffic-sessions.js.map +1 -0
  95. package/resources/devices/traffic-sessions.mjs +33 -0
  96. package/resources/devices/traffic-sessions.mjs.map +1 -0
  97. package/resources/files.d.mts +77 -19
  98. package/resources/files.d.mts.map +1 -1
  99. package/resources/files.d.ts +77 -19
  100. package/resources/files.d.ts.map +1 -1
  101. package/resources/files.js +2 -10
  102. package/resources/files.js.map +1 -1
  103. package/resources/files.mjs +2 -10
  104. package/resources/files.mjs.map +1 -1
  105. package/resources/index.d.mts +5 -6
  106. package/resources/index.d.mts.map +1 -1
  107. package/resources/index.d.ts +5 -6
  108. package/resources/index.d.ts.map +1 -1
  109. package/resources/index.js +1 -3
  110. package/resources/index.js.map +1 -1
  111. package/resources/index.mjs +1 -2
  112. package/resources/index.mjs.map +1 -1
  113. package/resources/mailboxes/connections.d.mts +64 -0
  114. package/resources/mailboxes/connections.d.mts.map +1 -0
  115. package/resources/mailboxes/connections.d.ts +64 -0
  116. package/resources/mailboxes/connections.d.ts.map +1 -0
  117. package/resources/mailboxes/connections.js +42 -0
  118. package/resources/mailboxes/connections.js.map +1 -0
  119. package/resources/mailboxes/connections.mjs +38 -0
  120. package/resources/mailboxes/connections.mjs.map +1 -0
  121. package/resources/mailboxes/index.d.mts +2 -1
  122. package/resources/mailboxes/index.d.mts.map +1 -1
  123. package/resources/mailboxes/index.d.ts +2 -1
  124. package/resources/mailboxes/index.d.ts.map +1 -1
  125. package/resources/mailboxes/index.js +3 -1
  126. package/resources/mailboxes/index.js.map +1 -1
  127. package/resources/mailboxes/index.mjs +1 -0
  128. package/resources/mailboxes/index.mjs.map +1 -1
  129. package/resources/mailboxes/mailboxes.d.mts +107 -50
  130. package/resources/mailboxes/mailboxes.d.mts.map +1 -1
  131. package/resources/mailboxes/mailboxes.d.ts +107 -50
  132. package/resources/mailboxes/mailboxes.d.ts.map +1 -1
  133. package/resources/mailboxes/mailboxes.js +34 -24
  134. package/resources/mailboxes/mailboxes.js.map +1 -1
  135. package/resources/mailboxes/mailboxes.mjs +34 -24
  136. package/resources/mailboxes/mailboxes.mjs.map +1 -1
  137. package/resources/mailboxes/messages.d.mts +2 -2
  138. package/resources/mailboxes/messages.d.ts +2 -2
  139. package/resources/mailboxes/messages.js +2 -2
  140. package/resources/mailboxes/messages.mjs +2 -2
  141. package/resources/messages/conversations.d.mts +4 -15
  142. package/resources/messages/conversations.d.mts.map +1 -1
  143. package/resources/messages/conversations.d.ts +4 -15
  144. package/resources/messages/conversations.d.ts.map +1 -1
  145. package/resources/messages/conversations.js +4 -15
  146. package/resources/messages/conversations.js.map +1 -1
  147. package/resources/messages/conversations.mjs +4 -15
  148. package/resources/messages/conversations.mjs.map +1 -1
  149. package/resources/messages/index.d.mts +1 -1
  150. package/resources/messages/index.d.mts.map +1 -1
  151. package/resources/messages/index.d.ts +1 -1
  152. package/resources/messages/index.d.ts.map +1 -1
  153. package/resources/messages/index.js.map +1 -1
  154. package/resources/messages/index.mjs +1 -1
  155. package/resources/messages/index.mjs.map +1 -1
  156. package/resources/messages/messages.d.mts +28 -5
  157. package/resources/messages/messages.d.mts.map +1 -1
  158. package/resources/messages/messages.d.ts +28 -5
  159. package/resources/messages/messages.d.ts.map +1 -1
  160. package/resources/messages/messages.js +11 -4
  161. package/resources/messages/messages.js.map +1 -1
  162. package/resources/messages/messages.mjs +11 -4
  163. package/resources/messages/messages.mjs.map +1 -1
  164. package/resources/notifications.d.mts +27 -1
  165. package/resources/notifications.d.mts.map +1 -1
  166. package/resources/notifications.d.ts +27 -1
  167. package/resources/notifications.d.ts.map +1 -1
  168. package/resources/notifications.js +17 -0
  169. package/resources/notifications.js.map +1 -1
  170. package/resources/notifications.mjs +17 -0
  171. package/resources/notifications.mjs.map +1 -1
  172. package/resources/numbers/index.d.mts +2 -2
  173. package/resources/numbers/index.d.mts.map +1 -1
  174. package/resources/numbers/index.d.ts +2 -2
  175. package/resources/numbers/index.d.ts.map +1 -1
  176. package/resources/numbers/index.js.map +1 -1
  177. package/resources/numbers/index.mjs +1 -1
  178. package/resources/numbers/index.mjs.map +1 -1
  179. package/resources/numbers/messages.d.mts +60 -1
  180. package/resources/numbers/messages.d.mts.map +1 -1
  181. package/resources/numbers/messages.d.ts +60 -1
  182. package/resources/numbers/messages.d.ts.map +1 -1
  183. package/resources/numbers/messages.js +21 -0
  184. package/resources/numbers/messages.js.map +1 -1
  185. package/resources/numbers/messages.mjs +21 -0
  186. package/resources/numbers/messages.mjs.map +1 -1
  187. package/resources/numbers/numbers.d.mts +167 -46
  188. package/resources/numbers/numbers.d.mts.map +1 -1
  189. package/resources/numbers/numbers.d.ts +167 -46
  190. package/resources/numbers/numbers.d.ts.map +1 -1
  191. package/resources/numbers/numbers.js +25 -40
  192. package/resources/numbers/numbers.js.map +1 -1
  193. package/resources/numbers/numbers.mjs +26 -41
  194. package/resources/numbers/numbers.mjs.map +1 -1
  195. package/resources/store/apps.d.mts +23 -2
  196. package/resources/store/apps.d.mts.map +1 -1
  197. package/resources/store/apps.d.ts +23 -2
  198. package/resources/store/apps.d.ts.map +1 -1
  199. package/resources/tasks/tasks.d.mts +84 -75
  200. package/resources/tasks/tasks.d.mts.map +1 -1
  201. package/resources/tasks/tasks.d.ts +84 -75
  202. package/resources/tasks/tasks.d.ts.map +1 -1
  203. package/resources/tasks/tasks.js +2 -10
  204. package/resources/tasks/tasks.js.map +1 -1
  205. package/resources/tasks/tasks.mjs +2 -10
  206. package/resources/tasks/tasks.mjs.map +1 -1
  207. package/resources/webhooks/deliveries.d.mts +22 -31
  208. package/resources/webhooks/deliveries.d.mts.map +1 -1
  209. package/resources/webhooks/deliveries.d.ts +22 -31
  210. package/resources/webhooks/deliveries.d.ts.map +1 -1
  211. package/resources/webhooks/deliveries.js +4 -30
  212. package/resources/webhooks/deliveries.js.map +1 -1
  213. package/resources/webhooks/deliveries.mjs +4 -30
  214. package/resources/webhooks/deliveries.mjs.map +1 -1
  215. package/resources/webhooks/index.d.mts +1 -0
  216. package/resources/webhooks/index.d.mts.map +1 -1
  217. package/resources/webhooks/index.d.ts +1 -0
  218. package/resources/webhooks/index.d.ts.map +1 -1
  219. package/resources/webhooks/index.js +3 -1
  220. package/resources/webhooks/index.js.map +1 -1
  221. package/resources/webhooks/index.mjs +1 -0
  222. package/resources/webhooks/index.mjs.map +1 -1
  223. package/resources/webhooks/integrations.d.mts +77 -0
  224. package/resources/webhooks/integrations.d.mts.map +1 -0
  225. package/resources/webhooks/integrations.d.ts +77 -0
  226. package/resources/webhooks/integrations.d.ts.map +1 -0
  227. package/resources/webhooks/integrations.js +26 -0
  228. package/resources/webhooks/integrations.js.map +1 -0
  229. package/resources/webhooks/integrations.mjs +22 -0
  230. package/resources/webhooks/integrations.mjs.map +1 -0
  231. package/resources/webhooks/webhooks.d.mts +280 -71
  232. package/resources/webhooks/webhooks.d.mts.map +1 -1
  233. package/resources/webhooks/webhooks.d.ts +280 -71
  234. package/resources/webhooks/webhooks.d.ts.map +1 -1
  235. package/resources/webhooks/webhooks.js +27 -60
  236. package/resources/webhooks/webhooks.js.map +1 -1
  237. package/resources/webhooks/webhooks.mjs +27 -60
  238. package/resources/webhooks/webhooks.mjs.map +1 -1
  239. package/resources/workflows/action-catalog.d.mts +7 -3
  240. package/resources/workflows/action-catalog.d.mts.map +1 -1
  241. package/resources/workflows/action-catalog.d.ts +7 -3
  242. package/resources/workflows/action-catalog.d.ts.map +1 -1
  243. package/resources/workflows/actions/actions.d.mts +9 -5
  244. package/resources/workflows/actions/actions.d.mts.map +1 -1
  245. package/resources/workflows/actions/actions.d.ts +9 -5
  246. package/resources/workflows/actions/actions.d.ts.map +1 -1
  247. package/resources/workflows/actions/actions.js +4 -0
  248. package/resources/workflows/actions/actions.js.map +1 -1
  249. package/resources/workflows/actions/actions.mjs +4 -0
  250. package/resources/workflows/actions/actions.mjs.map +1 -1
  251. package/resources/workflows/events.d.mts +66 -4
  252. package/resources/workflows/events.d.mts.map +1 -1
  253. package/resources/workflows/events.d.ts +66 -4
  254. package/resources/workflows/events.d.ts.map +1 -1
  255. package/resources/workflows/executions/executions.d.mts +334 -0
  256. package/resources/workflows/executions/executions.d.mts.map +1 -0
  257. package/resources/workflows/executions/executions.d.ts +334 -0
  258. package/resources/workflows/executions/executions.d.ts.map +1 -0
  259. package/resources/workflows/executions/executions.js +49 -0
  260. package/resources/workflows/executions/executions.js.map +1 -0
  261. package/resources/workflows/executions/executions.mjs +44 -0
  262. package/resources/workflows/executions/executions.mjs.map +1 -0
  263. package/resources/workflows/executions/index.d.mts +3 -0
  264. package/resources/workflows/executions/index.d.mts.map +1 -0
  265. package/resources/workflows/executions/index.d.ts +3 -0
  266. package/resources/workflows/executions/index.d.ts.map +1 -0
  267. package/resources/workflows/executions/index.js +9 -0
  268. package/resources/workflows/executions/index.js.map +1 -0
  269. package/resources/workflows/executions/index.mjs +4 -0
  270. package/resources/workflows/executions/index.mjs.map +1 -0
  271. package/resources/workflows/executions/screenshots.d.mts +18 -0
  272. package/resources/workflows/executions/screenshots.d.mts.map +1 -0
  273. package/resources/workflows/executions/screenshots.d.ts +18 -0
  274. package/resources/workflows/executions/screenshots.d.ts.map +1 -0
  275. package/resources/workflows/executions/screenshots.js +23 -0
  276. package/resources/workflows/executions/screenshots.js.map +1 -0
  277. package/resources/workflows/executions/screenshots.mjs +19 -0
  278. package/resources/workflows/executions/screenshots.mjs.map +1 -0
  279. package/resources/workflows/executions.d.mts +1 -190
  280. package/resources/workflows/executions.d.mts.map +1 -1
  281. package/resources/workflows/executions.d.ts +1 -190
  282. package/resources/workflows/executions.d.ts.map +1 -1
  283. package/resources/workflows/executions.js +2 -36
  284. package/resources/workflows/executions.js.map +1 -1
  285. package/resources/workflows/executions.mjs +1 -34
  286. package/resources/workflows/executions.mjs.map +1 -1
  287. package/resources/workflows/flows/actions.d.mts +58 -0
  288. package/resources/workflows/flows/actions.d.mts.map +1 -1
  289. package/resources/workflows/flows/actions.d.ts +58 -0
  290. package/resources/workflows/flows/actions.d.ts.map +1 -1
  291. package/resources/workflows/flows/actions.js +4 -0
  292. package/resources/workflows/flows/actions.js.map +1 -1
  293. package/resources/workflows/flows/actions.mjs +4 -0
  294. package/resources/workflows/flows/actions.mjs.map +1 -1
  295. package/resources/workflows/flows/flows.d.mts +666 -15
  296. package/resources/workflows/flows/flows.d.mts.map +1 -1
  297. package/resources/workflows/flows/flows.d.ts +666 -15
  298. package/resources/workflows/flows/flows.d.ts.map +1 -1
  299. package/resources/workflows/flows/flows.js +86 -1
  300. package/resources/workflows/flows/flows.js.map +1 -1
  301. package/resources/workflows/flows/flows.mjs +86 -1
  302. package/resources/workflows/flows/flows.mjs.map +1 -1
  303. package/resources/workflows/flows/index.d.mts +1 -1
  304. package/resources/workflows/flows/index.d.mts.map +1 -1
  305. package/resources/workflows/flows/index.d.ts +1 -1
  306. package/resources/workflows/flows/index.d.ts.map +1 -1
  307. package/resources/workflows/flows/index.js.map +1 -1
  308. package/resources/workflows/flows/index.mjs.map +1 -1
  309. package/resources/workflows/index.d.mts +2 -2
  310. package/resources/workflows/index.d.mts.map +1 -1
  311. package/resources/workflows/index.d.ts +2 -2
  312. package/resources/workflows/index.d.ts.map +1 -1
  313. package/resources/workflows/index.js +4 -4
  314. package/resources/workflows/index.js.map +1 -1
  315. package/resources/workflows/index.mjs +1 -1
  316. package/resources/workflows/index.mjs.map +1 -1
  317. package/resources/workflows/triggers.d.mts +118 -6
  318. package/resources/workflows/triggers.d.mts.map +1 -1
  319. package/resources/workflows/triggers.d.ts +118 -6
  320. package/resources/workflows/triggers.d.ts.map +1 -1
  321. package/resources/workflows/triggers.js +14 -0
  322. package/resources/workflows/triggers.js.map +1 -1
  323. package/resources/workflows/triggers.mjs +14 -0
  324. package/resources/workflows/triggers.mjs.map +1 -1
  325. package/resources/workflows/workflows.d.mts +4 -4
  326. package/resources/workflows/workflows.d.mts.map +1 -1
  327. package/resources/workflows/workflows.d.ts +4 -4
  328. package/resources/workflows/workflows.d.ts.map +1 -1
  329. package/resources/workflows/workflows.js +2 -2
  330. package/resources/workflows/workflows.js.map +1 -1
  331. package/resources/workflows/workflows.mjs +2 -2
  332. package/resources/workflows/workflows.mjs.map +1 -1
  333. package/src/client.ts +22 -42
  334. package/src/resources/apps.ts +24 -12
  335. package/src/resources/assistant/conversations.ts +50 -31
  336. package/src/resources/connect/connect.ts +6 -0
  337. package/src/resources/connect/index.ts +3 -0
  338. package/src/resources/connect/proxies.ts +146 -18
  339. package/src/resources/devices/apps.ts +41 -17
  340. package/src/resources/devices/browser.ts +9 -3
  341. package/src/resources/devices/devices.ts +138 -34
  342. package/src/resources/devices/index.ts +13 -0
  343. package/src/resources/devices/keyboard.ts +10 -3
  344. package/src/resources/devices/recordings.ts +14 -0
  345. package/src/resources/devices/traffic-sessions.ts +282 -0
  346. package/src/resources/files.ts +122 -29
  347. package/src/resources/index.ts +13 -20
  348. package/src/resources/mailboxes/connections.ts +91 -0
  349. package/src/resources/mailboxes/index.ts +7 -0
  350. package/src/resources/mailboxes/mailboxes.ts +190 -49
  351. package/src/resources/mailboxes/messages.ts +2 -2
  352. package/src/resources/messages/conversations.ts +4 -15
  353. package/src/resources/messages/index.ts +6 -1
  354. package/src/resources/messages/messages.ts +57 -5
  355. package/src/resources/notifications.ts +37 -0
  356. package/src/resources/numbers/index.ts +9 -1
  357. package/src/resources/numbers/messages.ts +92 -1
  358. package/src/resources/numbers/numbers.ts +197 -55
  359. package/src/resources/store/apps.ts +291 -2
  360. package/src/resources/tasks/tasks.ts +126 -93
  361. package/src/resources/webhooks/deliveries.ts +26 -31
  362. package/src/resources/webhooks/index.ts +6 -0
  363. package/src/resources/webhooks/integrations.ts +107 -0
  364. package/src/resources/webhooks/webhooks.ts +328 -71
  365. package/src/resources/workflows/action-catalog.ts +11 -3
  366. package/src/resources/workflows/actions/actions.ts +9 -5
  367. package/src/resources/workflows/events.ts +86 -4
  368. package/src/resources/workflows/executions/executions.ts +514 -0
  369. package/src/resources/workflows/executions/index.ts +12 -0
  370. package/src/resources/workflows/executions/screenshots.ts +34 -0
  371. package/src/resources/workflows/executions.ts +1 -296
  372. package/src/resources/workflows/flows/actions.ts +72 -0
  373. package/src/resources/workflows/flows/flows.ts +1058 -129
  374. package/src/resources/workflows/flows/index.ts +12 -0
  375. package/src/resources/workflows/index.ts +13 -1
  376. package/src/resources/workflows/triggers.ts +140 -6
  377. package/src/resources/workflows/workflows.ts +34 -10
  378. package/src/version.ts +1 -1
  379. package/version.d.mts +1 -1
  380. package/version.d.ts +1 -1
  381. package/version.js +1 -1
  382. package/version.mjs +1 -1
  383. package/resources/esims/esims.d.mts +0 -566
  384. package/resources/esims/esims.d.mts.map +0 -1
  385. package/resources/esims/esims.d.ts +0 -566
  386. package/resources/esims/esims.d.ts.map +0 -1
  387. package/resources/esims/esims.js +0 -205
  388. package/resources/esims/esims.js.map +0 -1
  389. package/resources/esims/esims.mjs +0 -200
  390. package/resources/esims/esims.mjs.map +0 -1
  391. package/resources/esims/index.d.mts +0 -3
  392. package/resources/esims/index.d.mts.map +0 -1
  393. package/resources/esims/index.d.ts +0 -3
  394. package/resources/esims/index.d.ts.map +0 -1
  395. package/resources/esims/index.js +0 -9
  396. package/resources/esims/index.js.map +0 -1
  397. package/resources/esims/index.mjs +0 -4
  398. package/resources/esims/index.mjs.map +0 -1
  399. package/resources/esims/messages.d.mts +0 -106
  400. package/resources/esims/messages.d.mts.map +0 -1
  401. package/resources/esims/messages.d.ts +0 -106
  402. package/resources/esims/messages.d.ts.map +0 -1
  403. package/resources/esims/messages.js +0 -37
  404. package/resources/esims/messages.js.map +0 -1
  405. package/resources/esims/messages.mjs +0 -33
  406. package/resources/esims/messages.mjs.map +0 -1
  407. package/resources/esims.d.mts +0 -2
  408. package/resources/esims.d.mts.map +0 -1
  409. package/resources/esims.d.ts +0 -2
  410. package/resources/esims.d.ts.map +0 -1
  411. package/resources/esims.js +0 -6
  412. package/resources/esims.js.map +0 -1
  413. package/resources/esims.mjs +0 -3
  414. package/resources/esims.mjs.map +0 -1
  415. package/src/resources/esims/esims.ts +0 -1019
  416. package/src/resources/esims/index.ts +0 -28
  417. package/src/resources/esims/messages.ts +0 -187
  418. package/src/resources/esims.ts +0 -3
@@ -1,22 +1,21 @@
1
1
  import { APIResource } from "../../core/resource.js";
2
2
  import * as Shared from "../shared.js";
3
3
  import * as MessagesAPI from "./messages.js";
4
- import { MessageListParams, MessageListResponse, Messages } from "./messages.js";
4
+ import { MessageListParams, MessageListResponse, MessageSendParams, MessageSendResponse, Messages } from "./messages.js";
5
5
  import { APIPromise } from "../../core/api-promise.js";
6
6
  import { RequestOptions } from "../../internal/request-options.js";
7
7
  export declare class Numbers extends APIResource {
8
8
  messages: MessagesAPI.Messages;
9
9
  /**
10
- * Starts a Mobilerun Phone purchase for the authenticated owner. Accepted requests
11
- * always return the same asynchronous envelope; poll GET /numbers/phones/{id} for
12
- * its business state. `purpose` and `country` are mutually exclusive.
10
+ * Starts a phone-number purchase. Poll the returned phone number for status
11
+ * updates. `purpose` and `country` cannot be combined.
13
12
  *
14
13
  * @example
15
14
  * ```ts
16
15
  * const number = await client.numbers.create();
17
16
  * ```
18
17
  */
19
- create(params?: NumberCreateParams | null | undefined, options?: RequestOptions): APIPromise<NumberCreateResponse>;
18
+ create(body?: NumberCreateParams | null | undefined, options?: RequestOptions): APIPromise<NumberCreateResponse>;
20
19
  /**
21
20
  * Retrieves a single phone number.
22
21
  *
@@ -29,11 +28,8 @@ export declare class Numbers extends APIResource {
29
28
  */
30
29
  retrieve(id: string, options?: RequestOptions): APIPromise<NumberRetrieveResponse>;
31
30
  /**
32
- * Updates the phone number's user-defined display label. Omitting `label` leaves
33
- * it unchanged; setting it to null or an empty string clears it. The label is
34
- * capped at 100 characters, is display-only, and never affects routing. It also
35
- * seeds the billing entity name when set at purchase time; a later change here
36
- * does not rename the already-created billing entity.
31
+ * Updates the display label. Omitting `label` leaves it unchanged; null or an
32
+ * empty string clears it.
37
33
  *
38
34
  * @example
39
35
  * ```ts
@@ -44,8 +40,7 @@ export declare class Numbers extends APIResource {
44
40
  */
45
41
  update(id: string, body?: NumberUpdateParams | null | undefined, options?: RequestOptions): APIPromise<NumberUpdateResponse>;
46
42
  /**
47
- * Lists phone numbers owned by the authenticated user — both BYO (`user`) and
48
- * provisioned (`mobilerun`) numbers.
43
+ * Lists the caller's phone numbers.
49
44
  *
50
45
  * @example
51
46
  * ```ts
@@ -54,23 +49,9 @@ export declare class Numbers extends APIResource {
54
49
  */
55
50
  list(query?: NumberListParams | null | undefined, options?: RequestOptions): APIPromise<NumberListResponse>;
56
51
  /**
57
- * Cancels a Mobilerun Phone. The outcome depends on the number's current state:
58
- *
59
- * - If the number is still awaiting payment and no payment for it is currently
60
- * being processed, the checkout is closed immediately and the number is retired.
61
- * - If the number is on the standard paid plan and already paid and in service,
62
- * cancellation is scheduled for the end of the current billing period rather
63
- * than taking effect immediately. The number stays usable through the period
64
- * already paid for, with no partial refund. Calling this again while a
65
- * cancellation is already scheduled is a no-op that returns the same result. The
66
- * response's `state` reflects this as `cancel_scheduled` with
67
- * `cancelAtPeriodEnd: true`; `currentPeriodEnd` is populated once billing
68
- * confirms the cancellation.
69
- *
70
- * Any other state (already refunding, a permanent billing failure, a payment
71
- * currently being processed, an included-plan number, or a non-hosted/BYO number)
72
- * returns 409 `not_cancellable`. Returns 404 if the number doesn't exist or isn't
73
- * owned by the caller.
52
+ * Cancels a pending purchase or schedules cancellation of an active paid phone
53
+ * number. Repeating a scheduled cancellation is safe. Returns 409 when
54
+ * cancellation is not available.
74
55
  *
75
56
  * @example
76
57
  * ```ts
@@ -81,8 +62,19 @@ export declare class Numbers extends APIResource {
81
62
  */
82
63
  delete(id: string, options?: RequestOptions): APIPromise<NumberDeleteResponse>;
83
64
  /**
84
- * Lists the countries currently offered for a dedicated Mobilerun Phone, with live
85
- * stock status. Pass `country` as the `country` field on POST /numbers/phones.
65
+ * Returns included phone capacity for a country. Creating a phone is
66
+ * authoritative.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * const response = await client.numbers.capacity({
71
+ * country: 'de',
72
+ * });
73
+ * ```
74
+ */
75
+ capacity(query: NumberCapacityParams, options?: RequestOptions): APIPromise<NumberCapacityResponse>;
76
+ /**
77
+ * Lists available countries and current phone-number availability.
86
78
  *
87
79
  * @example
88
80
  * ```ts
@@ -116,8 +108,18 @@ export interface NumberRetrieveResponse {
116
108
  export declare namespace NumberRetrieveResponse {
117
109
  interface Data {
118
110
  id: string;
111
+ /**
112
+ * Actions currently available for this phone number.
113
+ */
114
+ actions: Data.Actions;
119
115
  cancelAtPeriodEnd: boolean;
116
+ /**
117
+ * @deprecated Deprecated: use `actions.cancel`
118
+ */
120
119
  cancellable: boolean;
120
+ /**
121
+ * @deprecated Deprecated: use `actions.send`
122
+ */
121
123
  canSend: boolean;
122
124
  capabilities: Array<'sms' | 'voice'> | null;
123
125
  checkoutUrl: string | null;
@@ -130,6 +132,24 @@ export declare namespace NumberRetrieveResponse {
130
132
  state: 'awaiting_payment' | 'provisioning' | 'active' | 'cancel_scheduled' | 'expired' | 'failed';
131
133
  updatedAt: string | null;
132
134
  }
135
+ namespace Data {
136
+ /**
137
+ * Actions currently available for this phone number.
138
+ */
139
+ interface Actions {
140
+ /**
141
+ * True when DELETE /numbers/phones/{id} would currently succeed.
142
+ */
143
+ cancel: boolean;
144
+ /**
145
+ * True when this number passes the send gate of POST
146
+ * /numbers/phones/{id}/messages: self-service sending is switched on and the
147
+ * number is active and able to send SMS. Daily and burst limits and recipient/body
148
+ * checks still apply; the send endpoint stays the final judge.
149
+ */
150
+ send: boolean;
151
+ }
152
+ }
133
153
  }
134
154
  export interface NumberUpdateResponse {
135
155
  data: NumberUpdateResponse.Data;
@@ -137,8 +157,18 @@ export interface NumberUpdateResponse {
137
157
  export declare namespace NumberUpdateResponse {
138
158
  interface Data {
139
159
  id: string;
160
+ /**
161
+ * Actions currently available for this phone number.
162
+ */
163
+ actions: Data.Actions;
140
164
  cancelAtPeriodEnd: boolean;
165
+ /**
166
+ * @deprecated Deprecated: use `actions.cancel`
167
+ */
141
168
  cancellable: boolean;
169
+ /**
170
+ * @deprecated Deprecated: use `actions.send`
171
+ */
142
172
  canSend: boolean;
143
173
  capabilities: Array<'sms' | 'voice'> | null;
144
174
  checkoutUrl: string | null;
@@ -151,6 +181,24 @@ export declare namespace NumberUpdateResponse {
151
181
  state: 'awaiting_payment' | 'provisioning' | 'active' | 'cancel_scheduled' | 'expired' | 'failed';
152
182
  updatedAt: string | null;
153
183
  }
184
+ namespace Data {
185
+ /**
186
+ * Actions currently available for this phone number.
187
+ */
188
+ interface Actions {
189
+ /**
190
+ * True when DELETE /numbers/phones/{id} would currently succeed.
191
+ */
192
+ cancel: boolean;
193
+ /**
194
+ * True when this number passes the send gate of POST
195
+ * /numbers/phones/{id}/messages: self-service sending is switched on and the
196
+ * number is active and able to send SMS. Daily and burst limits and recipient/body
197
+ * checks still apply; the send endpoint stays the final judge.
198
+ */
199
+ send: boolean;
200
+ }
201
+ }
154
202
  }
155
203
  export interface NumberListResponse {
156
204
  items: Array<NumberListResponse.Item>;
@@ -159,8 +207,18 @@ export interface NumberListResponse {
159
207
  export declare namespace NumberListResponse {
160
208
  interface Item {
161
209
  id: string;
210
+ /**
211
+ * Actions currently available for this phone number.
212
+ */
213
+ actions: Item.Actions;
162
214
  cancelAtPeriodEnd: boolean;
215
+ /**
216
+ * @deprecated Deprecated: use `actions.cancel`
217
+ */
163
218
  cancellable: boolean;
219
+ /**
220
+ * @deprecated Deprecated: use `actions.send`
221
+ */
164
222
  canSend: boolean;
165
223
  capabilities: Array<'sms' | 'voice'> | null;
166
224
  checkoutUrl: string | null;
@@ -173,6 +231,24 @@ export declare namespace NumberListResponse {
173
231
  state: 'awaiting_payment' | 'provisioning' | 'active' | 'cancel_scheduled' | 'expired' | 'failed';
174
232
  updatedAt: string | null;
175
233
  }
234
+ namespace Item {
235
+ /**
236
+ * Actions currently available for this phone number.
237
+ */
238
+ interface Actions {
239
+ /**
240
+ * True when DELETE /numbers/phones/{id} would currently succeed.
241
+ */
242
+ cancel: boolean;
243
+ /**
244
+ * True when this number passes the send gate of POST
245
+ * /numbers/phones/{id}/messages: self-service sending is switched on and the
246
+ * number is active and able to send SMS. Daily and burst limits and recipient/body
247
+ * checks still apply; the send endpoint stays the final judge.
248
+ */
249
+ send: boolean;
250
+ }
251
+ }
176
252
  }
177
253
  export interface NumberDeleteResponse {
178
254
  data: NumberDeleteResponse.Data;
@@ -180,8 +256,18 @@ export interface NumberDeleteResponse {
180
256
  export declare namespace NumberDeleteResponse {
181
257
  interface Data {
182
258
  id: string;
259
+ /**
260
+ * Actions currently available for this phone number.
261
+ */
262
+ actions: Data.Actions;
183
263
  cancelAtPeriodEnd: boolean;
264
+ /**
265
+ * @deprecated Deprecated: use `actions.cancel`
266
+ */
184
267
  cancellable: boolean;
268
+ /**
269
+ * @deprecated Deprecated: use `actions.send`
270
+ */
185
271
  canSend: boolean;
186
272
  capabilities: Array<'sms' | 'voice'> | null;
187
273
  checkoutUrl: string | null;
@@ -194,6 +280,39 @@ export declare namespace NumberDeleteResponse {
194
280
  state: 'awaiting_payment' | 'provisioning' | 'active' | 'cancel_scheduled' | 'expired' | 'failed';
195
281
  updatedAt: string | null;
196
282
  }
283
+ namespace Data {
284
+ /**
285
+ * Actions currently available for this phone number.
286
+ */
287
+ interface Actions {
288
+ /**
289
+ * True when DELETE /numbers/phones/{id} would currently succeed.
290
+ */
291
+ cancel: boolean;
292
+ /**
293
+ * True when this number passes the send gate of POST
294
+ * /numbers/phones/{id}/messages: self-service sending is switched on and the
295
+ * number is active and able to send SMS. Daily and burst limits and recipient/body
296
+ * checks still apply; the send endpoint stays the final judge.
297
+ */
298
+ send: boolean;
299
+ }
300
+ }
301
+ }
302
+ export interface NumberCapacityResponse {
303
+ data: NumberCapacityResponse.Data;
304
+ }
305
+ export declare namespace NumberCapacityResponse {
306
+ interface Data {
307
+ included: number;
308
+ /**
309
+ * @deprecated Deprecated — always equal to `remaining`. Migrate to `remaining`;
310
+ * this field will be removed in a future revision.
311
+ */
312
+ includedRemaining: number;
313
+ remaining: number;
314
+ status: 'available' | 'exhausted' | 'not_included';
315
+ }
197
316
  }
198
317
  export interface NumberCountriesResponse {
199
318
  data: NumberCountriesResponse.Data;
@@ -227,29 +346,25 @@ export declare namespace NumberPurposesResponse {
227
346
  }
228
347
  export interface NumberCreateParams {
229
348
  /**
230
- * Body param: Prefer a free package seat ('included', default) or force the paid
231
- * checkout ('rent')
349
+ * Use included capacity when available, require included capacity without paid
350
+ * fallback (included_only), or start a paid checkout (rent).
232
351
  */
233
- billingPreference?: 'included' | 'rent';
352
+ billingPreference?: 'included' | 'included_only' | 'rent';
234
353
  /**
235
- * Body param: Optional ISO 3166-1 alpha-2 country code from GET
236
- * /numbers/countries. Cannot be combined with `purpose`.
354
+ * Optional ISO 3166-1 alpha-2 country code from GET /numbers/phones/countries.
355
+ * Cannot be combined with `purpose`.
237
356
  */
238
357
  country?: string;
239
358
  /**
240
- * Body param: User-defined display label — NFC-normalized, up to 100 GRAPHEMES
241
- * (not UTF-16 code units; an emoji/flag may span several). Display-only, never
242
- * used for routing. Also seeds the billing entity name at purchase.
359
+ * User-defined display label — NFC-normalized, up to 100 GRAPHEMES (not UTF-16
360
+ * code units; an emoji/flag may span several). Display-only, never used for
361
+ * routing. Also seeds the billing entity name at purchase.
243
362
  */
244
363
  label?: string | null;
245
364
  /**
246
- * Body param: Optional Mobilerun Phone purpose slug from GET /numbers/purposes.
365
+ * Optional purpose from GET /numbers/phones/purposes.
247
366
  */
248
367
  purpose?: string;
249
- /**
250
- * Header param: Optional request idempotency key.
251
- */
252
- 'Idempotency-Key'?: string;
253
368
  }
254
369
  export interface NumberUpdateParams {
255
370
  /**
@@ -263,8 +378,14 @@ export interface NumberListParams {
263
378
  page?: number;
264
379
  pageSize?: number;
265
380
  }
381
+ export interface NumberCapacityParams {
382
+ /**
383
+ * ISO 3166-1 alpha-2 country code from GET /numbers/phones/countries.
384
+ */
385
+ country: string;
386
+ }
266
387
  export declare namespace Numbers {
267
- export { type NumberCreateResponse as NumberCreateResponse, type NumberRetrieveResponse as NumberRetrieveResponse, type NumberUpdateResponse as NumberUpdateResponse, type NumberListResponse as NumberListResponse, type NumberDeleteResponse as NumberDeleteResponse, type NumberCountriesResponse as NumberCountriesResponse, type NumberPurposesResponse as NumberPurposesResponse, type NumberCreateParams as NumberCreateParams, type NumberUpdateParams as NumberUpdateParams, type NumberListParams as NumberListParams, };
268
- export { Messages as Messages, type MessageListResponse as MessageListResponse, type MessageListParams as MessageListParams, };
388
+ export { type NumberCreateResponse as NumberCreateResponse, type NumberRetrieveResponse as NumberRetrieveResponse, type NumberUpdateResponse as NumberUpdateResponse, type NumberListResponse as NumberListResponse, type NumberDeleteResponse as NumberDeleteResponse, type NumberCapacityResponse as NumberCapacityResponse, type NumberCountriesResponse as NumberCountriesResponse, type NumberPurposesResponse as NumberPurposesResponse, type NumberCreateParams as NumberCreateParams, type NumberUpdateParams as NumberUpdateParams, type NumberListParams as NumberListParams, type NumberCapacityParams as NumberCapacityParams, };
389
+ export { Messages as Messages, type MessageListResponse as MessageListResponse, type MessageSendResponse as MessageSendResponse, type MessageListParams as MessageListParams, type MessageSendParams as MessageSendParams, };
269
390
  }
270
391
  //# sourceMappingURL=numbers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../../src/resources/numbers/numbers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,WAAW,sB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AAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;IAEF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -6,7 +6,6 @@ const tslib_1 = require("../../internal/tslib.js");
6
6
  const resource_1 = require("../../core/resource.js");
7
7
  const MessagesAPI = tslib_1.__importStar(require("./messages.js"));
8
8
  const messages_1 = require("./messages.js");
9
- const headers_1 = require("../../internal/headers.js");
10
9
  const path_1 = require("../../internal/utils/path.js");
11
10
  class Numbers extends resource_1.APIResource {
12
11
  constructor() {
@@ -14,25 +13,16 @@ class Numbers extends resource_1.APIResource {
14
13
  this.messages = new MessagesAPI.Messages(this._client);
15
14
  }
16
15
  /**
17
- * Starts a Mobilerun Phone purchase for the authenticated owner. Accepted requests
18
- * always return the same asynchronous envelope; poll GET /numbers/phones/{id} for
19
- * its business state. `purpose` and `country` are mutually exclusive.
16
+ * Starts a phone-number purchase. Poll the returned phone number for status
17
+ * updates. `purpose` and `country` cannot be combined.
20
18
  *
21
19
  * @example
22
20
  * ```ts
23
21
  * const number = await client.numbers.create();
24
22
  * ```
25
23
  */
26
- create(params = {}, options) {
27
- const { 'Idempotency-Key': idempotencyKey, ...body } = params ?? {};
28
- return this._client.post('/numbers/phones', {
29
- body,
30
- ...options,
31
- headers: (0, headers_1.buildHeaders)([
32
- { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
33
- options?.headers,
34
- ]),
35
- });
24
+ create(body = {}, options) {
25
+ return this._client.post('/numbers/phones', { body, ...options });
36
26
  }
37
27
  /**
38
28
  * Retrieves a single phone number.
@@ -48,11 +38,8 @@ class Numbers extends resource_1.APIResource {
48
38
  return this._client.get((0, path_1.path) `/numbers/phones/${id}`, options);
49
39
  }
50
40
  /**
51
- * Updates the phone number's user-defined display label. Omitting `label` leaves
52
- * it unchanged; setting it to null or an empty string clears it. The label is
53
- * capped at 100 characters, is display-only, and never affects routing. It also
54
- * seeds the billing entity name when set at purchase time; a later change here
55
- * does not rename the already-created billing entity.
41
+ * Updates the display label. Omitting `label` leaves it unchanged; null or an
42
+ * empty string clears it.
56
43
  *
57
44
  * @example
58
45
  * ```ts
@@ -65,8 +52,7 @@ class Numbers extends resource_1.APIResource {
65
52
  return this._client.patch((0, path_1.path) `/numbers/phones/${id}`, { body, ...options });
66
53
  }
67
54
  /**
68
- * Lists phone numbers owned by the authenticated user — both BYO (`user`) and
69
- * provisioned (`mobilerun`) numbers.
55
+ * Lists the caller's phone numbers.
70
56
  *
71
57
  * @example
72
58
  * ```ts
@@ -77,23 +63,9 @@ class Numbers extends resource_1.APIResource {
77
63
  return this._client.get('/numbers/phones', { query, ...options });
78
64
  }
79
65
  /**
80
- * Cancels a Mobilerun Phone. The outcome depends on the number's current state:
81
- *
82
- * - If the number is still awaiting payment and no payment for it is currently
83
- * being processed, the checkout is closed immediately and the number is retired.
84
- * - If the number is on the standard paid plan and already paid and in service,
85
- * cancellation is scheduled for the end of the current billing period rather
86
- * than taking effect immediately. The number stays usable through the period
87
- * already paid for, with no partial refund. Calling this again while a
88
- * cancellation is already scheduled is a no-op that returns the same result. The
89
- * response's `state` reflects this as `cancel_scheduled` with
90
- * `cancelAtPeriodEnd: true`; `currentPeriodEnd` is populated once billing
91
- * confirms the cancellation.
92
- *
93
- * Any other state (already refunding, a permanent billing failure, a payment
94
- * currently being processed, an included-plan number, or a non-hosted/BYO number)
95
- * returns 409 `not_cancellable`. Returns 404 if the number doesn't exist or isn't
96
- * owned by the caller.
66
+ * Cancels a pending purchase or schedules cancellation of an active paid phone
67
+ * number. Repeating a scheduled cancellation is safe. Returns 409 when
68
+ * cancellation is not available.
97
69
  *
98
70
  * @example
99
71
  * ```ts
@@ -106,8 +78,21 @@ class Numbers extends resource_1.APIResource {
106
78
  return this._client.delete((0, path_1.path) `/numbers/phones/${id}`, options);
107
79
  }
108
80
  /**
109
- * Lists the countries currently offered for a dedicated Mobilerun Phone, with live
110
- * stock status. Pass `country` as the `country` field on POST /numbers/phones.
81
+ * Returns included phone capacity for a country. Creating a phone is
82
+ * authoritative.
83
+ *
84
+ * @example
85
+ * ```ts
86
+ * const response = await client.numbers.capacity({
87
+ * country: 'de',
88
+ * });
89
+ * ```
90
+ */
91
+ capacity(query, options) {
92
+ return this._client.get('/numbers/phones/capacity', { query, ...options });
93
+ }
94
+ /**
95
+ * Lists available countries and current phone-number availability.
111
96
  *
112
97
  * @example
113
98
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"numbers.js","sourceRoot":"","sources":["../../src/resources/numbers/numbers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,mEAA0C;AAC1C,4CAA8E;AAE9E,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IA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EAAA,mBAAmB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,mBAAmB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,KAA2B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,OAAwB;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF;AAzHD,0BAyHC;AA0YD,OAAO,CAAC,QAAQ,GAAG,mBAAQ,CAAC"}
@@ -1,8 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { APIResource } from "../../core/resource.mjs";
3
3
  import * as MessagesAPI from "./messages.mjs";
4
- import { Messages } from "./messages.mjs";
5
- import { buildHeaders } from "../../internal/headers.mjs";
4
+ import { Messages, } from "./messages.mjs";
6
5
  import { path } from "../../internal/utils/path.mjs";
7
6
  export class Numbers extends APIResource {
8
7
  constructor() {
@@ -10,25 +9,16 @@ export class Numbers extends APIResource {
10
9
  this.messages = new MessagesAPI.Messages(this._client);
11
10
  }
12
11
  /**
13
- * Starts a Mobilerun Phone purchase for the authenticated owner. Accepted requests
14
- * always return the same asynchronous envelope; poll GET /numbers/phones/{id} for
15
- * its business state. `purpose` and `country` are mutually exclusive.
12
+ * Starts a phone-number purchase. Poll the returned phone number for status
13
+ * updates. `purpose` and `country` cannot be combined.
16
14
  *
17
15
  * @example
18
16
  * ```ts
19
17
  * const number = await client.numbers.create();
20
18
  * ```
21
19
  */
22
- create(params = {}, options) {
23
- const { 'Idempotency-Key': idempotencyKey, ...body } = params ?? {};
24
- return this._client.post('/numbers/phones', {
25
- body,
26
- ...options,
27
- headers: buildHeaders([
28
- { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
29
- options?.headers,
30
- ]),
31
- });
20
+ create(body = {}, options) {
21
+ return this._client.post('/numbers/phones', { body, ...options });
32
22
  }
33
23
  /**
34
24
  * Retrieves a single phone number.
@@ -44,11 +34,8 @@ export class Numbers extends APIResource {
44
34
  return this._client.get(path `/numbers/phones/${id}`, options);
45
35
  }
46
36
  /**
47
- * Updates the phone number's user-defined display label. Omitting `label` leaves
48
- * it unchanged; setting it to null or an empty string clears it. The label is
49
- * capped at 100 characters, is display-only, and never affects routing. It also
50
- * seeds the billing entity name when set at purchase time; a later change here
51
- * does not rename the already-created billing entity.
37
+ * Updates the display label. Omitting `label` leaves it unchanged; null or an
38
+ * empty string clears it.
52
39
  *
53
40
  * @example
54
41
  * ```ts
@@ -61,8 +48,7 @@ export class Numbers extends APIResource {
61
48
  return this._client.patch(path `/numbers/phones/${id}`, { body, ...options });
62
49
  }
63
50
  /**
64
- * Lists phone numbers owned by the authenticated user — both BYO (`user`) and
65
- * provisioned (`mobilerun`) numbers.
51
+ * Lists the caller's phone numbers.
66
52
  *
67
53
  * @example
68
54
  * ```ts
@@ -73,23 +59,9 @@ export class Numbers extends APIResource {
73
59
  return this._client.get('/numbers/phones', { query, ...options });
74
60
  }
75
61
  /**
76
- * Cancels a Mobilerun Phone. The outcome depends on the number's current state:
77
- *
78
- * - If the number is still awaiting payment and no payment for it is currently
79
- * being processed, the checkout is closed immediately and the number is retired.
80
- * - If the number is on the standard paid plan and already paid and in service,
81
- * cancellation is scheduled for the end of the current billing period rather
82
- * than taking effect immediately. The number stays usable through the period
83
- * already paid for, with no partial refund. Calling this again while a
84
- * cancellation is already scheduled is a no-op that returns the same result. The
85
- * response's `state` reflects this as `cancel_scheduled` with
86
- * `cancelAtPeriodEnd: true`; `currentPeriodEnd` is populated once billing
87
- * confirms the cancellation.
88
- *
89
- * Any other state (already refunding, a permanent billing failure, a payment
90
- * currently being processed, an included-plan number, or a non-hosted/BYO number)
91
- * returns 409 `not_cancellable`. Returns 404 if the number doesn't exist or isn't
92
- * owned by the caller.
62
+ * Cancels a pending purchase or schedules cancellation of an active paid phone
63
+ * number. Repeating a scheduled cancellation is safe. Returns 409 when
64
+ * cancellation is not available.
93
65
  *
94
66
  * @example
95
67
  * ```ts
@@ -102,8 +74,21 @@ export class Numbers extends APIResource {
102
74
  return this._client.delete(path `/numbers/phones/${id}`, options);
103
75
  }
104
76
  /**
105
- * Lists the countries currently offered for a dedicated Mobilerun Phone, with live
106
- * stock status. Pass `country` as the `country` field on POST /numbers/phones.
77
+ * Returns included phone capacity for a country. Creating a phone is
78
+ * authoritative.
79
+ *
80
+ * @example
81
+ * ```ts
82
+ * const response = await client.numbers.capacity({
83
+ * country: 'de',
84
+ * });
85
+ * ```
86
+ */
87
+ capacity(query, options) {
88
+ return this._client.get('/numbers/phones/capacity', { query, ...options });
89
+ }
90
+ /**
91
+ * Lists available countries and current phone-number availability.
107
92
  *
108
93
  * @example
109
94
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"numbers.mjs","sourceRoot":"","sources":["../../src/resources/numbers/numbers.ts"],"names":[],"mappings":"AAAA,sFAAs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