@mobilerun/sdk 5.1.0 → 5.2.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 (374) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/client.d.mts +4 -16
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +4 -16
  5. package/client.d.ts.map +1 -1
  6. package/client.js +0 -12
  7. package/client.js.map +1 -1
  8. package/client.mjs +1 -13
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/apps.d.mts +12 -7
  12. package/resources/apps.d.mts.map +1 -1
  13. package/resources/apps.d.ts +12 -7
  14. package/resources/apps.d.ts.map +1 -1
  15. package/resources/apps.js +0 -4
  16. package/resources/apps.js.map +1 -1
  17. package/resources/apps.mjs +0 -4
  18. package/resources/apps.mjs.map +1 -1
  19. package/resources/carriers.d.mts +0 -3
  20. package/resources/carriers.d.mts.map +1 -1
  21. package/resources/carriers.d.ts +0 -3
  22. package/resources/carriers.d.ts.map +1 -1
  23. package/resources/carriers.js +0 -3
  24. package/resources/carriers.js.map +1 -1
  25. package/resources/carriers.mjs +0 -3
  26. package/resources/carriers.mjs.map +1 -1
  27. package/resources/connect/countries.d.mts +8 -3
  28. package/resources/connect/countries.d.mts.map +1 -1
  29. package/resources/connect/countries.d.ts +8 -3
  30. package/resources/connect/countries.d.ts.map +1 -1
  31. package/resources/connect/countries.js +6 -1
  32. package/resources/connect/countries.js.map +1 -1
  33. package/resources/connect/countries.mjs +6 -1
  34. package/resources/connect/countries.mjs.map +1 -1
  35. package/resources/connect/proxies.d.mts +11 -9
  36. package/resources/connect/proxies.d.mts.map +1 -1
  37. package/resources/connect/proxies.d.ts +11 -9
  38. package/resources/connect/proxies.d.ts.map +1 -1
  39. package/resources/connect/proxies.js +7 -5
  40. package/resources/connect/proxies.js.map +1 -1
  41. package/resources/connect/proxies.mjs +7 -5
  42. package/resources/connect/proxies.mjs.map +1 -1
  43. package/resources/connect/users.d.mts +7 -2
  44. package/resources/connect/users.d.mts.map +1 -1
  45. package/resources/connect/users.d.ts +7 -2
  46. package/resources/connect/users.d.ts.map +1 -1
  47. package/resources/connect/users.js +7 -2
  48. package/resources/connect/users.js.map +1 -1
  49. package/resources/connect/users.mjs +7 -2
  50. package/resources/connect/users.mjs.map +1 -1
  51. package/resources/credentials/credentials.d.mts +3 -4
  52. package/resources/credentials/credentials.d.mts.map +1 -1
  53. package/resources/credentials/credentials.d.ts +3 -4
  54. package/resources/credentials/credentials.d.ts.map +1 -1
  55. package/resources/credentials/credentials.js +3 -4
  56. package/resources/credentials/credentials.js.map +1 -1
  57. package/resources/credentials/credentials.mjs +3 -4
  58. package/resources/credentials/credentials.mjs.map +1 -1
  59. package/resources/credentials/packages/credentials/credentials.d.mts +14 -7
  60. package/resources/credentials/packages/credentials/credentials.d.mts.map +1 -1
  61. package/resources/credentials/packages/credentials/credentials.d.ts +14 -7
  62. package/resources/credentials/packages/credentials/credentials.d.ts.map +1 -1
  63. package/resources/credentials/packages/credentials/credentials.js +7 -6
  64. package/resources/credentials/packages/credentials/credentials.js.map +1 -1
  65. package/resources/credentials/packages/credentials/credentials.mjs +7 -6
  66. package/resources/credentials/packages/credentials/credentials.mjs.map +1 -1
  67. package/resources/credentials/packages/credentials/fields.d.mts +8 -6
  68. package/resources/credentials/packages/credentials/fields.d.mts.map +1 -1
  69. package/resources/credentials/packages/credentials/fields.d.ts +8 -6
  70. package/resources/credentials/packages/credentials/fields.d.ts.map +1 -1
  71. package/resources/credentials/packages/credentials/fields.js +8 -6
  72. package/resources/credentials/packages/credentials/fields.js.map +1 -1
  73. package/resources/credentials/packages/credentials/fields.mjs +8 -6
  74. package/resources/credentials/packages/credentials/fields.mjs.map +1 -1
  75. package/resources/credentials/packages/packages.d.mts +5 -5
  76. package/resources/credentials/packages/packages.d.mts.map +1 -1
  77. package/resources/credentials/packages/packages.d.ts +5 -5
  78. package/resources/credentials/packages/packages.d.ts.map +1 -1
  79. package/resources/credentials/packages/packages.js +5 -5
  80. package/resources/credentials/packages/packages.js.map +1 -1
  81. package/resources/credentials/packages/packages.mjs +5 -5
  82. package/resources/credentials/packages/packages.mjs.map +1 -1
  83. package/resources/devices/actions.d.mts +10 -5
  84. package/resources/devices/actions.d.mts.map +1 -1
  85. package/resources/devices/actions.d.ts +10 -5
  86. package/resources/devices/actions.d.ts.map +1 -1
  87. package/resources/devices/actions.js +10 -5
  88. package/resources/devices/actions.js.map +1 -1
  89. package/resources/devices/actions.mjs +10 -5
  90. package/resources/devices/actions.mjs.map +1 -1
  91. package/resources/devices/apps.d.mts +38 -5
  92. package/resources/devices/apps.d.mts.map +1 -1
  93. package/resources/devices/apps.d.ts +38 -5
  94. package/resources/devices/apps.d.ts.map +1 -1
  95. package/resources/devices/apps.js +21 -5
  96. package/resources/devices/apps.js.map +1 -1
  97. package/resources/devices/apps.mjs +21 -5
  98. package/resources/devices/apps.mjs.map +1 -1
  99. package/resources/devices/devices.d.mts +76 -14
  100. package/resources/devices/devices.d.mts.map +1 -1
  101. package/resources/devices/devices.d.ts +76 -14
  102. package/resources/devices/devices.d.ts.map +1 -1
  103. package/resources/devices/devices.js +28 -12
  104. package/resources/devices/devices.js.map +1 -1
  105. package/resources/devices/devices.mjs +28 -12
  106. package/resources/devices/devices.mjs.map +1 -1
  107. package/resources/devices/esim.d.mts +6 -4
  108. package/resources/devices/esim.d.mts.map +1 -1
  109. package/resources/devices/esim.d.ts +6 -4
  110. package/resources/devices/esim.d.ts.map +1 -1
  111. package/resources/devices/esim.js +6 -4
  112. package/resources/devices/esim.js.map +1 -1
  113. package/resources/devices/esim.mjs +6 -4
  114. package/resources/devices/esim.mjs.map +1 -1
  115. package/resources/devices/files.d.mts +7 -4
  116. package/resources/devices/files.d.mts.map +1 -1
  117. package/resources/devices/files.d.ts +7 -4
  118. package/resources/devices/files.d.ts.map +1 -1
  119. package/resources/devices/files.js +7 -4
  120. package/resources/devices/files.js.map +1 -1
  121. package/resources/devices/files.mjs +7 -4
  122. package/resources/devices/files.mjs.map +1 -1
  123. package/resources/devices/keyboard.d.mts +5 -3
  124. package/resources/devices/keyboard.d.mts.map +1 -1
  125. package/resources/devices/keyboard.d.ts +5 -3
  126. package/resources/devices/keyboard.d.ts.map +1 -1
  127. package/resources/devices/keyboard.js +5 -3
  128. package/resources/devices/keyboard.js.map +1 -1
  129. package/resources/devices/keyboard.mjs +5 -3
  130. package/resources/devices/keyboard.mjs.map +1 -1
  131. package/resources/devices/language.d.mts +4 -2
  132. package/resources/devices/language.d.mts.map +1 -1
  133. package/resources/devices/language.d.ts +4 -2
  134. package/resources/devices/language.d.ts.map +1 -1
  135. package/resources/devices/language.js +4 -2
  136. package/resources/devices/language.js.map +1 -1
  137. package/resources/devices/language.mjs +4 -2
  138. package/resources/devices/language.mjs.map +1 -1
  139. package/resources/devices/location.d.mts +4 -2
  140. package/resources/devices/location.d.mts.map +1 -1
  141. package/resources/devices/location.d.ts +4 -2
  142. package/resources/devices/location.d.ts.map +1 -1
  143. package/resources/devices/location.js +4 -2
  144. package/resources/devices/location.js.map +1 -1
  145. package/resources/devices/location.mjs +4 -2
  146. package/resources/devices/location.mjs.map +1 -1
  147. package/resources/devices/packages.d.mts +2 -1
  148. package/resources/devices/packages.d.mts.map +1 -1
  149. package/resources/devices/packages.d.ts +2 -1
  150. package/resources/devices/packages.d.ts.map +1 -1
  151. package/resources/devices/packages.js +2 -1
  152. package/resources/devices/packages.js.map +1 -1
  153. package/resources/devices/packages.mjs +2 -1
  154. package/resources/devices/packages.mjs.map +1 -1
  155. package/resources/devices/proxy.d.mts +29 -3
  156. package/resources/devices/proxy.d.mts.map +1 -1
  157. package/resources/devices/proxy.d.ts +29 -3
  158. package/resources/devices/proxy.d.ts.map +1 -1
  159. package/resources/devices/proxy.js +7 -3
  160. package/resources/devices/proxy.js.map +1 -1
  161. package/resources/devices/proxy.mjs +7 -3
  162. package/resources/devices/proxy.mjs.map +1 -1
  163. package/resources/devices/state.d.mts +7 -3
  164. package/resources/devices/state.d.mts.map +1 -1
  165. package/resources/devices/state.d.ts +7 -3
  166. package/resources/devices/state.d.ts.map +1 -1
  167. package/resources/devices/state.js +6 -3
  168. package/resources/devices/state.js.map +1 -1
  169. package/resources/devices/state.mjs +6 -3
  170. package/resources/devices/state.mjs.map +1 -1
  171. package/resources/devices/tasks.d.mts +4 -12
  172. package/resources/devices/tasks.d.mts.map +1 -1
  173. package/resources/devices/tasks.d.ts +4 -12
  174. package/resources/devices/tasks.d.ts.map +1 -1
  175. package/resources/devices/tasks.js +2 -4
  176. package/resources/devices/tasks.js.map +1 -1
  177. package/resources/devices/tasks.mjs +2 -4
  178. package/resources/devices/tasks.mjs.map +1 -1
  179. package/resources/devices/timezone.d.mts +4 -2
  180. package/resources/devices/timezone.d.mts.map +1 -1
  181. package/resources/devices/timezone.d.ts +4 -2
  182. package/resources/devices/timezone.d.ts.map +1 -1
  183. package/resources/devices/timezone.js +4 -2
  184. package/resources/devices/timezone.js.map +1 -1
  185. package/resources/devices/timezone.mjs +4 -2
  186. package/resources/devices/timezone.mjs.map +1 -1
  187. package/resources/hooks.d.mts +0 -239
  188. package/resources/hooks.d.mts.map +1 -1
  189. package/resources/hooks.d.ts +0 -239
  190. package/resources/hooks.d.ts.map +1 -1
  191. package/resources/hooks.js +0 -57
  192. package/resources/hooks.js.map +1 -1
  193. package/resources/hooks.mjs +0 -57
  194. package/resources/hooks.mjs.map +1 -1
  195. package/resources/index.d.mts +2 -2
  196. package/resources/index.d.mts.map +1 -1
  197. package/resources/index.d.ts +2 -2
  198. package/resources/index.d.ts.map +1 -1
  199. package/resources/index.js.map +1 -1
  200. package/resources/index.mjs +1 -1
  201. package/resources/index.mjs.map +1 -1
  202. package/resources/profiles.d.mts +69 -6
  203. package/resources/profiles.d.mts.map +1 -1
  204. package/resources/profiles.d.ts +69 -6
  205. package/resources/profiles.d.ts.map +1 -1
  206. package/resources/profiles.js.map +1 -1
  207. package/resources/profiles.mjs.map +1 -1
  208. package/resources/proxies.d.mts +14 -8
  209. package/resources/proxies.d.mts.map +1 -1
  210. package/resources/proxies.d.ts +14 -8
  211. package/resources/proxies.d.ts.map +1 -1
  212. package/resources/proxies.js +14 -8
  213. package/resources/proxies.js.map +1 -1
  214. package/resources/proxies.mjs +14 -8
  215. package/resources/proxies.mjs.map +1 -1
  216. package/resources/shared.d.mts +14 -0
  217. package/resources/shared.d.mts.map +1 -1
  218. package/resources/shared.d.ts +14 -0
  219. package/resources/shared.d.ts.map +1 -1
  220. package/resources/tasks/tasks.d.mts +159 -64
  221. package/resources/tasks/tasks.d.mts.map +1 -1
  222. package/resources/tasks/tasks.d.ts +159 -64
  223. package/resources/tasks/tasks.d.ts.map +1 -1
  224. package/resources/tasks/tasks.js +10 -2
  225. package/resources/tasks/tasks.js.map +1 -1
  226. package/resources/tasks/tasks.mjs +10 -2
  227. package/resources/tasks/tasks.mjs.map +1 -1
  228. package/resources/webhooks/deliveries.d.mts +38 -4
  229. package/resources/webhooks/deliveries.d.mts.map +1 -1
  230. package/resources/webhooks/deliveries.d.ts +38 -4
  231. package/resources/webhooks/deliveries.d.ts.map +1 -1
  232. package/resources/webhooks/deliveries.js +15 -4
  233. package/resources/webhooks/deliveries.js.map +1 -1
  234. package/resources/webhooks/deliveries.mjs +15 -4
  235. package/resources/webhooks/deliveries.mjs.map +1 -1
  236. package/resources/webhooks/webhooks.d.mts +67 -9
  237. package/resources/webhooks/webhooks.d.mts.map +1 -1
  238. package/resources/webhooks/webhooks.d.ts +67 -9
  239. package/resources/webhooks/webhooks.d.ts.map +1 -1
  240. package/resources/webhooks/webhooks.js +26 -8
  241. package/resources/webhooks/webhooks.js.map +1 -1
  242. package/resources/webhooks/webhooks.mjs +26 -8
  243. package/resources/webhooks/webhooks.mjs.map +1 -1
  244. package/resources/workflows/action-catalog.d.mts +5 -2
  245. package/resources/workflows/action-catalog.d.mts.map +1 -1
  246. package/resources/workflows/action-catalog.d.ts +5 -2
  247. package/resources/workflows/action-catalog.d.ts.map +1 -1
  248. package/resources/workflows/action-catalog.js +5 -2
  249. package/resources/workflows/action-catalog.js.map +1 -1
  250. package/resources/workflows/action-catalog.mjs +5 -2
  251. package/resources/workflows/action-catalog.mjs.map +1 -1
  252. package/resources/workflows/actions/actions.d.mts +15 -5
  253. package/resources/workflows/actions/actions.d.mts.map +1 -1
  254. package/resources/workflows/actions/actions.d.ts +15 -5
  255. package/resources/workflows/actions/actions.d.ts.map +1 -1
  256. package/resources/workflows/actions/actions.js +10 -5
  257. package/resources/workflows/actions/actions.js.map +1 -1
  258. package/resources/workflows/actions/actions.mjs +10 -5
  259. package/resources/workflows/actions/actions.mjs.map +1 -1
  260. package/resources/workflows/actions/services.d.mts +5 -2
  261. package/resources/workflows/actions/services.d.mts.map +1 -1
  262. package/resources/workflows/actions/services.d.ts +5 -2
  263. package/resources/workflows/actions/services.d.ts.map +1 -1
  264. package/resources/workflows/actions/services.js +5 -2
  265. package/resources/workflows/actions/services.js.map +1 -1
  266. package/resources/workflows/actions/services.mjs +5 -2
  267. package/resources/workflows/actions/services.mjs.map +1 -1
  268. package/resources/workflows/events/catalog.d.mts +0 -51
  269. package/resources/workflows/events/catalog.d.mts.map +1 -1
  270. package/resources/workflows/events/catalog.d.ts +0 -51
  271. package/resources/workflows/events/catalog.d.ts.map +1 -1
  272. package/resources/workflows/events/catalog.js +0 -12
  273. package/resources/workflows/events/catalog.js.map +1 -1
  274. package/resources/workflows/events/catalog.mjs +0 -12
  275. package/resources/workflows/events/catalog.mjs.map +1 -1
  276. package/resources/workflows/events/events.d.mts +10 -20
  277. package/resources/workflows/events/events.d.mts.map +1 -1
  278. package/resources/workflows/events/events.d.ts +10 -20
  279. package/resources/workflows/events/events.d.ts.map +1 -1
  280. package/resources/workflows/events/events.js.map +1 -1
  281. package/resources/workflows/events/events.mjs +1 -1
  282. package/resources/workflows/events/events.mjs.map +1 -1
  283. package/resources/workflows/events/index.d.mts +1 -1
  284. package/resources/workflows/events/index.d.mts.map +1 -1
  285. package/resources/workflows/events/index.d.ts +1 -1
  286. package/resources/workflows/events/index.d.ts.map +1 -1
  287. package/resources/workflows/events/index.js.map +1 -1
  288. package/resources/workflows/events/index.mjs +1 -1
  289. package/resources/workflows/events/index.mjs.map +1 -1
  290. package/resources/workflows/executions.d.mts +43 -5
  291. package/resources/workflows/executions.d.mts.map +1 -1
  292. package/resources/workflows/executions.d.ts +43 -5
  293. package/resources/workflows/executions.d.ts.map +1 -1
  294. package/resources/workflows/executions.js +8 -3
  295. package/resources/workflows/executions.js.map +1 -1
  296. package/resources/workflows/executions.mjs +8 -3
  297. package/resources/workflows/executions.mjs.map +1 -1
  298. package/resources/workflows/flows/actions.d.mts +12 -4
  299. package/resources/workflows/flows/actions.d.mts.map +1 -1
  300. package/resources/workflows/flows/actions.d.ts +12 -4
  301. package/resources/workflows/flows/actions.d.ts.map +1 -1
  302. package/resources/workflows/flows/actions.js +12 -4
  303. package/resources/workflows/flows/actions.js.map +1 -1
  304. package/resources/workflows/flows/actions.mjs +12 -4
  305. package/resources/workflows/flows/actions.mjs.map +1 -1
  306. package/resources/workflows/flows/flows.d.mts +33 -7
  307. package/resources/workflows/flows/flows.d.mts.map +1 -1
  308. package/resources/workflows/flows/flows.d.ts +33 -7
  309. package/resources/workflows/flows/flows.d.ts.map +1 -1
  310. package/resources/workflows/flows/flows.js +18 -6
  311. package/resources/workflows/flows/flows.js.map +1 -1
  312. package/resources/workflows/flows/flows.mjs +18 -6
  313. package/resources/workflows/flows/flows.mjs.map +1 -1
  314. package/resources/workflows/triggers.d.mts +75 -63
  315. package/resources/workflows/triggers.d.mts.map +1 -1
  316. package/resources/workflows/triggers.d.ts +75 -63
  317. package/resources/workflows/triggers.d.ts.map +1 -1
  318. package/resources/workflows/triggers.js +12 -5
  319. package/resources/workflows/triggers.js.map +1 -1
  320. package/resources/workflows/triggers.mjs +12 -5
  321. package/resources/workflows/triggers.mjs.map +1 -1
  322. package/resources/workflows/workflows.d.mts +15 -0
  323. package/resources/workflows/workflows.d.mts.map +1 -1
  324. package/resources/workflows/workflows.d.ts +15 -0
  325. package/resources/workflows/workflows.d.ts.map +1 -1
  326. package/resources/workflows/workflows.js.map +1 -1
  327. package/resources/workflows/workflows.mjs.map +1 -1
  328. package/src/client.ts +8 -46
  329. package/src/resources/apps.ts +16 -8
  330. package/src/resources/carriers.ts +0 -3
  331. package/src/resources/connect/countries.ts +8 -3
  332. package/src/resources/connect/proxies.ts +11 -9
  333. package/src/resources/connect/users.ts +7 -2
  334. package/src/resources/credentials/credentials.ts +3 -4
  335. package/src/resources/credentials/packages/credentials/credentials.ts +16 -7
  336. package/src/resources/credentials/packages/credentials/fields.ts +8 -6
  337. package/src/resources/credentials/packages/packages.ts +5 -5
  338. package/src/resources/devices/actions.ts +10 -5
  339. package/src/resources/devices/apps.ts +41 -5
  340. package/src/resources/devices/devices.ts +97 -15
  341. package/src/resources/devices/esim.ts +6 -4
  342. package/src/resources/devices/files.ts +7 -4
  343. package/src/resources/devices/keyboard.ts +5 -3
  344. package/src/resources/devices/language.ts +4 -2
  345. package/src/resources/devices/location.ts +4 -2
  346. package/src/resources/devices/packages.ts +2 -1
  347. package/src/resources/devices/proxy.ts +32 -3
  348. package/src/resources/devices/state.ts +8 -3
  349. package/src/resources/devices/tasks.ts +4 -15
  350. package/src/resources/devices/timezone.ts +4 -2
  351. package/src/resources/hooks.ts +1 -333
  352. package/src/resources/index.ts +4 -17
  353. package/src/resources/profiles.ts +105 -6
  354. package/src/resources/proxies.ts +14 -8
  355. package/src/resources/shared.ts +17 -0
  356. package/src/resources/tasks/tasks.ts +198 -78
  357. package/src/resources/webhooks/deliveries.ts +43 -4
  358. package/src/resources/webhooks/webhooks.ts +79 -9
  359. package/src/resources/workflows/action-catalog.ts +5 -2
  360. package/src/resources/workflows/actions/actions.ts +17 -5
  361. package/src/resources/workflows/actions/services.ts +5 -2
  362. package/src/resources/workflows/events/catalog.ts +1 -84
  363. package/src/resources/workflows/events/events.ts +14 -36
  364. package/src/resources/workflows/events/index.ts +1 -7
  365. package/src/resources/workflows/executions.ts +50 -5
  366. package/src/resources/workflows/flows/actions.ts +12 -4
  367. package/src/resources/workflows/flows/flows.ts +41 -7
  368. package/src/resources/workflows/triggers.ts +92 -75
  369. package/src/resources/workflows/workflows.ts +21 -0
  370. package/src/version.ts +1 -1
  371. package/version.d.mts +1 -1
  372. package/version.d.ts +1 -1
  373. package/version.js +1 -1
  374. package/version.mjs +1 -1
@@ -98,26 +98,32 @@ export class Devices extends APIResource {
98
98
  language: LanguageAPI.Language = new LanguageAPI.Language(this._client);
99
99
 
100
100
  /**
101
- * Provision a new device
101
+ * Requests a new device for the authenticated user from the device spec in the
102
+ * request body. Optional query parameters select the canonical device type, target
103
+ * country, billing mode, and a profile to use as the base spec; deprecated
104
+ * device-type aliases remain accepted only during the documented compatibility
105
+ * grace period. The response returns the device and its stream token.
102
106
  */
103
107
  create(params: DeviceCreateParams, options?: RequestOptions): APIPromise<Device> {
104
- const { query_country, deviceType, profileId, ...body } = params;
108
+ const { billing, query_country, deviceType, profileId, ...body } = params;
105
109
  return this._client.post('/devices', {
106
- query: { country: query_country, deviceType, profileId },
110
+ query: { billing, country: query_country, deviceType, profileId },
107
111
  body,
108
112
  ...options,
109
113
  });
110
114
  }
111
115
 
112
116
  /**
113
- * Get device info
117
+ * Returns the current state and metadata for a single device, including its
118
+ * lifecycle state, type, stream URL, billing strategy, and timestamps. A stream
119
+ * token is included while the device is active.
114
120
  */
115
121
  retrieve(deviceID: string, options?: RequestOptions): APIPromise<Device> {
116
122
  return this._client.get(path`/devices/${deviceID}`, options);
117
123
  }
118
124
 
119
125
  /**
120
- * List devices
126
+ * Returns a paginated list of the user's devices along with pagination metadata.
121
127
  */
122
128
  list(
123
129
  query: DeviceListParams | null | undefined = {},
@@ -127,14 +133,16 @@ export class Devices extends APIResource {
127
133
  }
128
134
 
129
135
  /**
130
- * Count claimed devices
136
+ * Returns the number of claimed devices for the user, broken down by device type.
131
137
  */
132
138
  count(options?: RequestOptions): APIPromise<DeviceCountResponse> {
133
139
  return this._client.get('/devices/count', options);
134
140
  }
135
141
 
136
142
  /**
137
- * Device fingerprint snapshot
143
+ * Returns a live snapshot of the device's spoofed identity, including model,
144
+ * display, identifiers, and carrier. Devices without fingerprint support return an
145
+ * unsupported-feature error.
138
146
  */
139
147
  fingerprint(
140
148
  deviceID: string,
@@ -156,7 +164,8 @@ export class Devices extends APIResource {
156
164
  }
157
165
 
158
166
  /**
159
- * Reboot a device
167
+ * Triggers a reboot of the device. The device transitions through its reboot
168
+ * lifecycle and becomes ready again once the restart completes.
160
169
  */
161
170
  reboot(deviceID: string, options?: RequestOptions): APIPromise<void> {
162
171
  return this._client.post(path`/devices/${deviceID}/reboot`, {
@@ -166,7 +175,9 @@ export class Devices extends APIResource {
166
175
  }
167
176
 
168
177
  /**
169
- * Reset a device to a fresh state
178
+ * Resets the device back to a clean state, clearing installed apps and user data
179
+ * accumulated during the session. The device transitions through its reset
180
+ * lifecycle before becoming ready again.
170
181
  */
171
182
  reset(deviceID: string, options?: RequestOptions): APIPromise<void> {
172
183
  return this._client.post(path`/devices/${deviceID}/reset`, {
@@ -176,14 +187,17 @@ export class Devices extends APIResource {
176
187
  }
177
188
 
178
189
  /**
179
- * Update device name
190
+ * Sets the display name for a device from the name in the request body and returns
191
+ * the updated device.
180
192
  */
181
193
  setName(deviceID: string, body: DeviceSetNameParams, options?: RequestOptions): APIPromise<Device> {
182
194
  return this._client.put(path`/devices/${deviceID}/name`, { body, ...options });
183
195
  }
184
196
 
185
197
  /**
186
- * Terminate a device
198
+ * Terminates the device and releases its resources. Termination can be scheduled
199
+ * for a future time or chained from a previous device via the request body, in
200
+ * which case a service key is required.
187
201
  */
188
202
  terminate(deviceID: string, body: DeviceTerminateParams, options?: RequestOptions): APIPromise<void> {
189
203
  return this._client.delete(path`/devices/${deviceID}`, {
@@ -194,7 +208,9 @@ export class Devices extends APIResource {
194
208
  }
195
209
 
196
210
  /**
197
- * Wait for device to be ready
211
+ * Blocks until the device reaches the ready state, then returns the same payload
212
+ * as Get device info. The call returns early with an error if the wait is
213
+ * cancelled or times out.
198
214
  */
199
215
  waitReady(deviceID: string, options?: RequestOptions): APIPromise<Device> {
200
216
  return this._client.get(path`/devices/${deviceID}/wait`, options);
@@ -231,10 +247,19 @@ export interface Device {
231
247
  */
232
248
  $schema?: string;
233
249
 
250
+ billingStrategy?: string;
251
+
252
+ createdBy?: string;
253
+
254
+ ownerId?: string;
255
+
234
256
  providerId?: string;
235
257
 
236
258
  streamToken?: string;
237
259
 
260
+ /**
261
+ * @deprecated Deprecated: use ownerId/createdBy.
262
+ */
238
263
  userId?: string;
239
264
  }
240
265
 
@@ -293,6 +318,14 @@ export namespace DeviceFingerprintResponse {
293
318
  }
294
319
 
295
320
  export interface DeviceCreateParams {
321
+ /**
322
+ * Query param: Billing mode. 'auto' uses a subscription slot when available and
323
+ * otherwise bills per minute; 'subscription' requires an available subscription
324
+ * slot; 'minute' bills per minute. Only cloud phone and cloud emulator devices
325
+ * support per-minute billing.
326
+ */
327
+ billing?: 'auto' | 'subscription' | 'minute';
328
+
296
329
  /**
297
330
  * Query param: ISO 3166-1 alpha-2 country code. If omitted the system picks the
298
331
  * country with the most availability.
@@ -300,9 +333,18 @@ export interface DeviceCreateParams {
300
333
  query_country?: string;
301
334
 
302
335
  /**
303
- * Query param
336
+ * Query param: Deprecated device type aliases are accepted during a compatibility
337
+ * grace period: dedicated_premium_device maps to android_cloud_phone,
338
+ * dedicated_physical_device maps to android_physical_phone, dedicated_ios_device
339
+ * maps to ios_stealth_phone, and dedicated_emulated_device maps to
340
+ * android_emulator.
304
341
  */
305
- deviceType?: 'dedicated_physical_device' | 'dedicated_premium_device' | 'dedicated_ios_device';
342
+ deviceType?:
343
+ | 'android_cloud_phone'
344
+ | 'dedicated_premium_device'
345
+ | 'dedicated_physical_device'
346
+ | 'dedicated_ios_device'
347
+ | 'dedicated_emulated_device';
306
348
 
307
349
  /**
308
350
  * Query param: Profile ID to use as device spec
@@ -367,17 +409,45 @@ export interface DeviceCreateParams {
367
409
 
368
410
  export namespace DeviceCreateParams {
369
411
  export interface Proxy {
412
+ connect?: Proxy.Connect;
413
+
370
414
  name?: string;
371
415
 
372
416
  smartIp?: boolean;
373
417
 
374
418
  socks5?: Shared.Socks5;
375
419
  }
420
+
421
+ export namespace Proxy {
422
+ export interface Connect {
423
+ /**
424
+ * Existing Mobilerun Connect proxy id; its credentials are fetched server-side.
425
+ */
426
+ id?: string;
427
+
428
+ /**
429
+ * ISO 3166-1 alpha-2 country code; provisions (or reuses) a rotating residential
430
+ * Mobilerun Connect proxy for the device.
431
+ */
432
+ country?: string;
433
+ }
434
+ }
376
435
  }
377
436
 
378
437
  export interface DeviceListParams {
379
438
  country?: string;
380
439
 
440
+ /**
441
+ * Filter to devices created by this user id. Mutually exclusive with mine.
442
+ */
443
+ createdBy?: string;
444
+
445
+ /**
446
+ * When true, only return devices created by the calling user (resolved from
447
+ * X-User-ID, never a client-supplied id).
448
+ */
449
+ mine?: boolean;
450
+
381
451
  name?: string;
382
452
 
383
453
  orderBy?: 'id' | 'createdAt' | 'updatedAt' | 'assignedAt';
@@ -399,10 +469,22 @@ export interface DeviceListParams {
399
469
  | 'resetting'
400
470
  | 'terminated'
401
471
  | 'maintenance'
472
+ | 'stopped'
402
473
  | 'unknown'
403
474
  > | null;
404
475
 
405
- type?: 'dedicated_physical_device' | 'dedicated_premium_device' | 'dedicated_ios_device';
476
+ /**
477
+ * Deprecated device type aliases are accepted during a compatibility grace period:
478
+ * dedicated_premium_device maps to android_cloud_phone, dedicated_physical_device
479
+ * maps to android_physical_phone, dedicated_ios_device maps to ios_stealth_phone,
480
+ * and dedicated_emulated_device maps to android_emulator.
481
+ */
482
+ type?:
483
+ | 'android_cloud_phone'
484
+ | 'dedicated_premium_device'
485
+ | 'dedicated_physical_device'
486
+ | 'dedicated_ios_device'
487
+ | 'dedicated_emulated_device';
406
488
  }
407
489
 
408
490
  export interface DeviceFingerprintParams {
@@ -8,7 +8,7 @@ import { path } from '../../internal/utils/path';
8
8
 
9
9
  export class Esim extends APIResource {
10
10
  /**
11
- * List eSIM subscriptions
11
+ * Returns the eSIM subscriptions currently provisioned on the device.
12
12
  */
13
13
  list(
14
14
  deviceID: string,
@@ -30,7 +30,7 @@ export class Esim extends APIResource {
30
30
  }
31
31
 
32
32
  /**
33
- * Configure eSIM (download profile and/or enable subscription)
33
+ * Download profile and/or enable subscription.
34
34
  */
35
35
  activate(
36
36
  deviceID: string,
@@ -53,7 +53,8 @@ export class Esim extends APIResource {
53
53
  }
54
54
 
55
55
  /**
56
- * Enable an eSIM subscription
56
+ * Enables the eSIM subscription identified by the subId in the request body so it
57
+ * becomes the active subscription.
57
58
  */
58
59
  enable(deviceID: string, params: EsimEnableParams, options?: RequestOptions): APIPromise<void> {
59
60
  const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
@@ -73,7 +74,8 @@ export class Esim extends APIResource {
73
74
  }
74
75
 
75
76
  /**
76
- * Delete eSIM subscription
77
+ * Deletes the eSIM subscription identified by the subId query parameter from the
78
+ * device.
77
79
  */
78
80
  remove(deviceID: string, params: EsimRemoveParams, options?: RequestOptions): APIPromise<void> {
79
81
  const { subId, 'X-Device-Display-ID': xDeviceDisplayID } = params;
@@ -11,7 +11,8 @@ import { path } from '../../internal/utils/path';
11
11
 
12
12
  export class Files extends APIResource {
13
13
  /**
14
- * List files
14
+ * Lists the files at the directory path given in the path query parameter,
15
+ * returning each entry's metadata along with the path and total count.
15
16
  */
16
17
  list(deviceID: string, params: FileListParams, options?: RequestOptions): APIPromise<FileListResponse> {
17
18
  const { 'X-Device-Display-ID': xDeviceDisplayID, ...query } = params;
@@ -30,7 +31,7 @@ export class Files extends APIResource {
30
31
  }
31
32
 
32
33
  /**
33
- * Delete file
34
+ * Deletes the file at the path given in the path query parameter from the device.
34
35
  */
35
36
  delete(deviceID: string, params: FileDeleteParams, options?: RequestOptions): APIPromise<void> {
36
37
  const { path: path_, 'X-Device-Display-ID': xDeviceDisplayID } = params;
@@ -50,7 +51,8 @@ export class Files extends APIResource {
50
51
  }
51
52
 
52
53
  /**
53
- * Download file
54
+ * Pulls the file at the given path query parameter from the device and returns its
55
+ * raw bytes as an octet-stream.
54
56
  */
55
57
  download(deviceID: string, params: FileDownloadParams, options?: RequestOptions): APIPromise<string> {
56
58
  const { 'X-Device-Display-ID': xDeviceDisplayID, ...query } = params;
@@ -69,7 +71,8 @@ export class Files extends APIResource {
69
71
  }
70
72
 
71
73
  /**
72
- * Upload file
74
+ * Uploads a file to the device via multipart form data, writing it into the
75
+ * directory given by the path query parameter using the uploaded file's name.
73
76
  */
74
77
  upload(deviceID: string, params: FileUploadParams, options?: RequestOptions): APIPromise<void> {
75
78
  const { path: path_, 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
@@ -8,7 +8,7 @@ import { path } from '../../internal/utils/path';
8
8
 
9
9
  export class Keyboard extends APIResource {
10
10
  /**
11
- * Clear input
11
+ * Clears the contents of the currently focused text input field.
12
12
  */
13
13
  clear(
14
14
  deviceID: string,
@@ -31,7 +31,7 @@ export class Keyboard extends APIResource {
31
31
  }
32
32
 
33
33
  /**
34
- * Input key
34
+ * Sends a single Android key event to the device, identified by its key code.
35
35
  */
36
36
  key(deviceID: string, params: KeyboardKeyParams, options?: RequestOptions): APIPromise<void> {
37
37
  const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
@@ -51,7 +51,9 @@ export class Keyboard extends APIResource {
51
51
  }
52
52
 
53
53
  /**
54
- * Input text
54
+ * Types the given text into the focused input field. Supports optionally clearing
55
+ * the field first and a stealth mode that emulates human typing speed and error
56
+ * rate on supported devices.
55
57
  */
56
58
  write(deviceID: string, params: KeyboardWriteParams, options?: RequestOptions): APIPromise<void> {
57
59
  const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
@@ -8,7 +8,7 @@ import { path } from '../../internal/utils/path';
8
8
 
9
9
  export class Language extends APIResource {
10
10
  /**
11
- * Get device language/locale
11
+ * Returns the device's current language/locale as a BCP-47 locale string.
12
12
  */
13
13
  get(
14
14
  deviceID: string,
@@ -30,7 +30,9 @@ export class Language extends APIResource {
30
30
  }
31
31
 
32
32
  /**
33
- * Set device language/locale
33
+ * Sets the device language/locale to the BCP-47 locale in the request body. An
34
+ * optional restart flag applies the change immediately by restarting the zygote
35
+ * instead of waiting for the next reboot.
34
36
  */
35
37
  set(deviceID: string, params: LanguageSetParams, options?: RequestOptions): APIPromise<void> {
36
38
  const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
@@ -9,7 +9,8 @@ import { path } from '../../internal/utils/path';
9
9
 
10
10
  export class Location extends APIResource {
11
11
  /**
12
- * Get device location
12
+ * Returns the device's current simulated GPS location as latitude and longitude.
13
+ * Devices without geo support return an unsupported-feature error.
13
14
  */
14
15
  get(
15
16
  deviceID: string,
@@ -31,7 +32,8 @@ export class Location extends APIResource {
31
32
  }
32
33
 
33
34
  /**
34
- * Set device location
35
+ * Sets the device's simulated GPS location to the latitude and longitude in the
36
+ * request body. Devices without geo support return an unsupported-feature error.
35
37
  */
36
38
  set(deviceID: string, params: LocationSetParams, options?: RequestOptions): APIPromise<void> {
37
39
  const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
@@ -8,7 +8,8 @@ import { path } from '../../internal/utils/path';
8
8
 
9
9
  export class Packages extends APIResource {
10
10
  /**
11
- * List packages
11
+ * Returns the package names of apps installed on the device. System and protected
12
+ * packages are excluded unless the corresponding query parameters are set.
12
13
  */
13
14
  list(
14
15
  deviceID: string,
@@ -8,7 +8,9 @@ import { path } from '../../internal/utils/path';
8
8
 
9
9
  export class Proxy extends APIResource {
10
10
  /**
11
- * Connect proxy
11
+ * Routes the device's traffic through a SOCKS5 proxy supplied in the request body,
12
+ * replacing any existing connection. A smartIp option can be used to select an IP
13
+ * automatically; the legacy flat host/port/user/password fields remain supported.
12
14
  */
13
15
  connect(deviceID: string, params: ProxyConnectParams, options?: RequestOptions): APIPromise<void> {
14
16
  const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
@@ -28,7 +30,8 @@ export class Proxy extends APIResource {
28
30
  }
29
31
 
30
32
  /**
31
- * Disconnect proxy
33
+ * Disconnects the device's active proxy connection and clears its stored proxy
34
+ * state. Returns successfully if no proxy is connected.
32
35
  */
33
36
  disconnect(
34
37
  deviceID: string,
@@ -51,7 +54,8 @@ export class Proxy extends APIResource {
51
54
  }
52
55
 
53
56
  /**
54
- * Get proxy connection state
57
+ * Returns the device's current proxy connection state, including whether a proxy
58
+ * is connected and its protocol and name.
55
59
  */
56
60
  status(
57
61
  deviceID: string,
@@ -93,6 +97,13 @@ export interface ProxyStatusResponse {
93
97
  }
94
98
 
95
99
  export interface ProxyConnectParams {
100
+ /**
101
+ * Body param: Mobilerun Connect proxy — pass exactly one of id (use an existing
102
+ * proxy's credentials) or country (provision or reuse a rotating residential proxy
103
+ * for the device).
104
+ */
105
+ connect?: ProxyConnectParams.Connect;
106
+
96
107
  /**
97
108
  * @deprecated Body param
98
109
  */
@@ -135,6 +146,24 @@ export interface ProxyConnectParams {
135
146
  }
136
147
 
137
148
  export namespace ProxyConnectParams {
149
+ /**
150
+ * Mobilerun Connect proxy — pass exactly one of id (use an existing proxy's
151
+ * credentials) or country (provision or reuse a rotating residential proxy for the
152
+ * device).
153
+ */
154
+ export interface Connect {
155
+ /**
156
+ * Existing Mobilerun Connect proxy id; its credentials are fetched server-side.
157
+ */
158
+ id?: string;
159
+
160
+ /**
161
+ * ISO 3166-1 alpha-2 country code; provisions (or reuses) a rotating residential
162
+ * Mobilerun Connect proxy for the device.
163
+ */
164
+ country?: string;
165
+ }
166
+
138
167
  /**
139
168
  * SOCKS5 proxy configuration (required for socks5).
140
169
  */
@@ -9,7 +9,8 @@ import { path } from '../../internal/utils/path';
9
9
 
10
10
  export class State extends APIResource {
11
11
  /**
12
- * Take screenshot
12
+ * Captures the device screen and returns it as a PNG image. An optional
13
+ * hideOverlay query parameter excludes the accessibility overlay from the capture.
13
14
  */
14
15
  screenshot(
15
16
  deviceID: string,
@@ -32,7 +33,7 @@ export class State extends APIResource {
32
33
  }
33
34
 
34
35
  /**
35
- * Device time
36
+ * Returns the device's current wall-clock time as an RFC 3339 timestamp.
36
37
  */
37
38
  time(
38
39
  deviceID: string,
@@ -54,7 +55,9 @@ export class State extends APIResource {
54
55
  }
55
56
 
56
57
  /**
57
- * UI state
58
+ * Returns the current accessibility UI state of the device as a structured tree of
59
+ * on-screen elements. An optional filter query reduces the result to interactive
60
+ * elements.
58
61
  */
59
62
  ui(
60
63
  deviceID: string,
@@ -111,6 +114,8 @@ export interface A11YNode {
111
114
  resourceId: string;
112
115
 
113
116
  text: string;
117
+
118
+ isVisibleToUser?: boolean;
114
119
  }
115
120
 
116
121
  export namespace A11YNode {
@@ -2,16 +2,15 @@
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as Shared from '../shared';
5
+ import * as ResourcesTasksAPI from '../tasks/tasks';
5
6
  import { APIPromise } from '../../core/api-promise';
6
7
  import { RequestOptions } from '../../internal/request-options';
7
8
  import { path } from '../../internal/utils/path';
8
9
 
9
- /**
10
- * Device Management
11
- */
12
10
  export class Tasks extends APIResource {
13
11
  /**
14
- * List tasks for a device
12
+ * Returns a paginated list of tasks that have run on the device, along with
13
+ * pagination metadata.
15
14
  */
16
15
  list(
17
16
  deviceID: string,
@@ -23,7 +22,7 @@ export class Tasks extends APIResource {
23
22
  }
24
23
 
25
24
  export interface TaskListResponse {
26
- items: Array<TaskListResponse.Item> | null;
25
+ items: Array<ResourcesTasksAPI.Task> | null;
27
26
 
28
27
  pagination: Shared.Meta;
29
28
 
@@ -33,16 +32,6 @@ export interface TaskListResponse {
33
32
  $schema?: string;
34
33
  }
35
34
 
36
- export namespace TaskListResponse {
37
- export interface Item {
38
- createdAt: string;
39
-
40
- taskId: string;
41
-
42
- updatedAt: string;
43
- }
44
- }
45
-
46
35
  export interface TaskListParams {
47
36
  orderBy?: 'id' | 'createdAt' | 'updatedAt' | 'assignedAt';
48
37
 
@@ -8,7 +8,8 @@ import { path } from '../../internal/utils/path';
8
8
 
9
9
  export class Timezone extends APIResource {
10
10
  /**
11
- * Get device timezone
11
+ * Returns the device's current timezone identifier. Devices that do not support
12
+ * timezone control return an unsupported-feature error.
12
13
  */
13
14
  get(
14
15
  deviceID: string,
@@ -30,7 +31,8 @@ export class Timezone extends APIResource {
30
31
  }
31
32
 
32
33
  /**
33
- * Set device timezone
34
+ * Sets the device timezone to the identifier in the request body. Devices that do
35
+ * not support timezone control return an unsupported-feature error.
34
36
  */
35
37
  set(deviceID: string, params: TimezoneSetParams, options?: RequestOptions): APIPromise<void> {
36
38
  const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;