@mobilerun/sdk 5.3.0 → 5.5.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 (274) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +5 -5
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +5 -5
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/apps.d.mts +10 -2
  12. package/resources/apps.d.mts.map +1 -1
  13. package/resources/apps.d.ts +10 -2
  14. package/resources/apps.d.ts.map +1 -1
  15. package/resources/apps.js +3 -1
  16. package/resources/apps.js.map +1 -1
  17. package/resources/apps.mjs +3 -1
  18. package/resources/apps.mjs.map +1 -1
  19. package/resources/assistant/conversations.d.mts +26 -4
  20. package/resources/assistant/conversations.d.mts.map +1 -1
  21. package/resources/assistant/conversations.d.ts +26 -4
  22. package/resources/assistant/conversations.d.ts.map +1 -1
  23. package/resources/assistant/conversations.js +12 -4
  24. package/resources/assistant/conversations.js.map +1 -1
  25. package/resources/assistant/conversations.mjs +12 -4
  26. package/resources/assistant/conversations.mjs.map +1 -1
  27. package/resources/connect/proxies.d.mts +36 -20
  28. package/resources/connect/proxies.d.mts.map +1 -1
  29. package/resources/connect/proxies.d.ts +36 -20
  30. package/resources/connect/proxies.d.ts.map +1 -1
  31. package/resources/connect/proxies.js +10 -2
  32. package/resources/connect/proxies.js.map +1 -1
  33. package/resources/connect/proxies.mjs +10 -2
  34. package/resources/connect/proxies.mjs.map +1 -1
  35. package/resources/devices/apps.d.mts +37 -17
  36. package/resources/devices/apps.d.mts.map +1 -1
  37. package/resources/devices/apps.d.ts +37 -17
  38. package/resources/devices/apps.d.ts.map +1 -1
  39. package/resources/devices/apps.js +15 -14
  40. package/resources/devices/apps.js.map +1 -1
  41. package/resources/devices/apps.mjs +15 -14
  42. package/resources/devices/apps.mjs.map +1 -1
  43. package/resources/devices/devices.d.mts +29 -4
  44. package/resources/devices/devices.d.mts.map +1 -1
  45. package/resources/devices/devices.d.ts +29 -4
  46. package/resources/devices/devices.d.ts.map +1 -1
  47. package/resources/devices/devices.js +7 -4
  48. package/resources/devices/devices.js.map +1 -1
  49. package/resources/devices/devices.mjs +7 -4
  50. package/resources/devices/devices.mjs.map +1 -1
  51. package/resources/devices/index.d.mts +1 -0
  52. package/resources/devices/index.d.mts.map +1 -1
  53. package/resources/devices/index.d.ts +1 -0
  54. package/resources/devices/index.d.ts.map +1 -1
  55. package/resources/devices/index.js +3 -1
  56. package/resources/devices/index.js.map +1 -1
  57. package/resources/devices/index.mjs +1 -0
  58. package/resources/devices/index.mjs.map +1 -1
  59. package/resources/devices/keyboard.d.mts +9 -3
  60. package/resources/devices/keyboard.d.mts.map +1 -1
  61. package/resources/devices/keyboard.d.ts +9 -3
  62. package/resources/devices/keyboard.d.ts.map +1 -1
  63. package/resources/devices/keyboard.js +3 -3
  64. package/resources/devices/keyboard.mjs +3 -3
  65. package/resources/devices/recordings.d.mts +11 -0
  66. package/resources/devices/recordings.d.mts.map +1 -1
  67. package/resources/devices/recordings.d.ts +11 -0
  68. package/resources/devices/recordings.d.ts.map +1 -1
  69. package/resources/devices/traffic-sessions.d.mts +173 -0
  70. package/resources/devices/traffic-sessions.d.mts.map +1 -0
  71. package/resources/devices/traffic-sessions.d.ts +173 -0
  72. package/resources/devices/traffic-sessions.d.ts.map +1 -0
  73. package/resources/devices/traffic-sessions.js +43 -0
  74. package/resources/devices/traffic-sessions.js.map +1 -0
  75. package/resources/devices/traffic-sessions.mjs +39 -0
  76. package/resources/devices/traffic-sessions.mjs.map +1 -0
  77. package/resources/files.d.mts +72 -0
  78. package/resources/files.d.mts.map +1 -1
  79. package/resources/files.d.ts +72 -0
  80. package/resources/files.d.ts.map +1 -1
  81. package/resources/index.d.mts +2 -2
  82. package/resources/index.d.mts.map +1 -1
  83. package/resources/index.d.ts +2 -2
  84. package/resources/index.d.ts.map +1 -1
  85. package/resources/index.js +3 -3
  86. package/resources/index.js.map +1 -1
  87. package/resources/index.mjs +1 -1
  88. package/resources/index.mjs.map +1 -1
  89. package/resources/mailboxes/index.d.mts +3 -0
  90. package/resources/mailboxes/index.d.mts.map +1 -0
  91. package/resources/mailboxes/index.d.ts +3 -0
  92. package/resources/mailboxes/index.d.ts.map +1 -0
  93. package/resources/{esims → mailboxes}/index.js +3 -3
  94. package/resources/mailboxes/index.js.map +1 -0
  95. package/resources/{esims → mailboxes}/index.mjs +1 -1
  96. package/resources/mailboxes/index.mjs.map +1 -0
  97. package/resources/mailboxes/mailboxes.d.mts +374 -0
  98. package/resources/mailboxes/mailboxes.d.mts.map +1 -0
  99. package/resources/mailboxes/mailboxes.d.ts +374 -0
  100. package/resources/mailboxes/mailboxes.d.ts.map +1 -0
  101. package/resources/mailboxes/mailboxes.js +139 -0
  102. package/resources/mailboxes/mailboxes.js.map +1 -0
  103. package/resources/mailboxes/mailboxes.mjs +134 -0
  104. package/resources/mailboxes/mailboxes.mjs.map +1 -0
  105. package/resources/mailboxes/messages.d.mts +82 -0
  106. package/resources/mailboxes/messages.d.mts.map +1 -0
  107. package/resources/mailboxes/messages.d.ts +82 -0
  108. package/resources/mailboxes/messages.d.ts.map +1 -0
  109. package/resources/mailboxes/messages.js +39 -0
  110. package/resources/mailboxes/messages.js.map +1 -0
  111. package/resources/mailboxes/messages.mjs +35 -0
  112. package/resources/mailboxes/messages.mjs.map +1 -0
  113. package/resources/mailboxes.d.mts +2 -0
  114. package/resources/mailboxes.d.mts.map +1 -0
  115. package/resources/mailboxes.d.ts +2 -0
  116. package/resources/mailboxes.d.ts.map +1 -0
  117. package/resources/{esims.js → mailboxes.js} +2 -2
  118. package/resources/mailboxes.js.map +1 -0
  119. package/resources/{esims.mjs → mailboxes.mjs} +2 -2
  120. package/resources/mailboxes.mjs.map +1 -0
  121. package/resources/messages/conversations.d.mts +4 -15
  122. package/resources/messages/conversations.d.mts.map +1 -1
  123. package/resources/messages/conversations.d.ts +4 -15
  124. package/resources/messages/conversations.d.ts.map +1 -1
  125. package/resources/messages/conversations.js +4 -15
  126. package/resources/messages/conversations.js.map +1 -1
  127. package/resources/messages/conversations.mjs +4 -15
  128. package/resources/messages/conversations.mjs.map +1 -1
  129. package/resources/messages/messages.d.mts +2 -4
  130. package/resources/messages/messages.d.mts.map +1 -1
  131. package/resources/messages/messages.d.ts +2 -4
  132. package/resources/messages/messages.d.ts.map +1 -1
  133. package/resources/messages/messages.js +2 -4
  134. package/resources/messages/messages.js.map +1 -1
  135. package/resources/messages/messages.mjs +2 -4
  136. package/resources/messages/messages.mjs.map +1 -1
  137. package/resources/numbers/index.d.mts +1 -1
  138. package/resources/numbers/index.d.mts.map +1 -1
  139. package/resources/numbers/index.d.ts +1 -1
  140. package/resources/numbers/index.d.ts.map +1 -1
  141. package/resources/numbers/index.js.map +1 -1
  142. package/resources/numbers/index.mjs.map +1 -1
  143. package/resources/numbers/numbers.d.mts +48 -35
  144. package/resources/numbers/numbers.d.mts.map +1 -1
  145. package/resources/numbers/numbers.d.ts +48 -35
  146. package/resources/numbers/numbers.d.ts.map +1 -1
  147. package/resources/numbers/numbers.js +23 -29
  148. package/resources/numbers/numbers.js.map +1 -1
  149. package/resources/numbers/numbers.mjs +23 -29
  150. package/resources/numbers/numbers.mjs.map +1 -1
  151. package/resources/tasks/tasks.d.mts +80 -32
  152. package/resources/tasks/tasks.d.mts.map +1 -1
  153. package/resources/tasks/tasks.d.ts +80 -32
  154. package/resources/tasks/tasks.d.ts.map +1 -1
  155. package/resources/tasks/tasks.js.map +1 -1
  156. package/resources/tasks/tasks.mjs.map +1 -1
  157. package/resources/webhooks/webhooks.d.mts +1 -0
  158. package/resources/webhooks/webhooks.d.mts.map +1 -1
  159. package/resources/webhooks/webhooks.d.ts +1 -0
  160. package/resources/webhooks/webhooks.d.ts.map +1 -1
  161. package/resources/webhooks/webhooks.js.map +1 -1
  162. package/resources/webhooks/webhooks.mjs.map +1 -1
  163. package/resources/workflows/events.d.mts +18 -0
  164. package/resources/workflows/events.d.mts.map +1 -1
  165. package/resources/workflows/events.d.ts +18 -0
  166. package/resources/workflows/events.d.ts.map +1 -1
  167. package/resources/workflows/executions.d.mts +84 -5
  168. package/resources/workflows/executions.d.mts.map +1 -1
  169. package/resources/workflows/executions.d.ts +84 -5
  170. package/resources/workflows/executions.d.ts.map +1 -1
  171. package/resources/workflows/executions.js +3 -2
  172. package/resources/workflows/executions.js.map +1 -1
  173. package/resources/workflows/executions.mjs +3 -2
  174. package/resources/workflows/executions.mjs.map +1 -1
  175. package/resources/workflows/flows/actions.d.mts +19 -0
  176. package/resources/workflows/flows/actions.d.mts.map +1 -1
  177. package/resources/workflows/flows/actions.d.ts +19 -0
  178. package/resources/workflows/flows/actions.d.ts.map +1 -1
  179. package/resources/workflows/flows/flows.d.mts +142 -2
  180. package/resources/workflows/flows/flows.d.mts.map +1 -1
  181. package/resources/workflows/flows/flows.d.ts +142 -2
  182. package/resources/workflows/flows/flows.d.ts.map +1 -1
  183. package/resources/workflows/flows/flows.js +11 -1
  184. package/resources/workflows/flows/flows.js.map +1 -1
  185. package/resources/workflows/flows/flows.mjs +11 -1
  186. package/resources/workflows/flows/flows.mjs.map +1 -1
  187. package/resources/workflows/flows/index.d.mts +1 -1
  188. package/resources/workflows/flows/index.d.mts.map +1 -1
  189. package/resources/workflows/flows/index.d.ts +1 -1
  190. package/resources/workflows/flows/index.d.ts.map +1 -1
  191. package/resources/workflows/flows/index.js.map +1 -1
  192. package/resources/workflows/flows/index.mjs.map +1 -1
  193. package/resources/workflows/index.d.mts +1 -1
  194. package/resources/workflows/index.d.mts.map +1 -1
  195. package/resources/workflows/index.d.ts +1 -1
  196. package/resources/workflows/index.d.ts.map +1 -1
  197. package/resources/workflows/index.js.map +1 -1
  198. package/resources/workflows/index.mjs.map +1 -1
  199. package/resources/workflows/triggers.d.mts +17 -3
  200. package/resources/workflows/triggers.d.mts.map +1 -1
  201. package/resources/workflows/triggers.d.ts +17 -3
  202. package/resources/workflows/triggers.d.ts.map +1 -1
  203. package/resources/workflows/workflows.d.mts +2 -2
  204. package/resources/workflows/workflows.d.mts.map +1 -1
  205. package/resources/workflows/workflows.d.ts +2 -2
  206. package/resources/workflows/workflows.d.ts.map +1 -1
  207. package/resources/workflows/workflows.js.map +1 -1
  208. package/resources/workflows/workflows.mjs.map +1 -1
  209. package/src/client.ts +40 -40
  210. package/src/resources/apps.ts +11 -2
  211. package/src/resources/assistant/conversations.ts +38 -4
  212. package/src/resources/connect/proxies.ts +49 -21
  213. package/src/resources/devices/apps.ts +41 -17
  214. package/src/resources/devices/devices.ts +58 -4
  215. package/src/resources/devices/index.ts +11 -0
  216. package/src/resources/devices/keyboard.ts +10 -3
  217. package/src/resources/devices/recordings.ts +12 -0
  218. package/src/resources/devices/traffic-sessions.ts +299 -0
  219. package/src/resources/files.ts +114 -0
  220. package/src/resources/index.ts +19 -19
  221. package/src/resources/mailboxes/index.ts +26 -0
  222. package/src/resources/mailboxes/mailboxes.ts +637 -0
  223. package/src/resources/mailboxes/messages.ts +134 -0
  224. package/src/resources/{esims.ts → mailboxes.ts} +1 -1
  225. package/src/resources/messages/conversations.ts +4 -15
  226. package/src/resources/messages/messages.ts +2 -4
  227. package/src/resources/numbers/index.ts +2 -0
  228. package/src/resources/numbers/numbers.ts +58 -34
  229. package/src/resources/tasks/tasks.ts +120 -40
  230. package/src/resources/webhooks/webhooks.ts +2 -0
  231. package/src/resources/workflows/events.ts +24 -0
  232. package/src/resources/workflows/executions.ts +121 -5
  233. package/src/resources/workflows/flows/actions.ts +26 -0
  234. package/src/resources/workflows/flows/flows.ts +182 -1
  235. package/src/resources/workflows/flows/index.ts +1 -0
  236. package/src/resources/workflows/index.ts +1 -0
  237. package/src/resources/workflows/triggers.ts +19 -3
  238. package/src/resources/workflows/workflows.ts +2 -0
  239. package/src/version.ts +1 -1
  240. package/version.d.mts +1 -1
  241. package/version.d.ts +1 -1
  242. package/version.js +1 -1
  243. package/version.mjs +1 -1
  244. package/resources/esims/esims.d.mts +0 -566
  245. package/resources/esims/esims.d.mts.map +0 -1
  246. package/resources/esims/esims.d.ts +0 -566
  247. package/resources/esims/esims.d.ts.map +0 -1
  248. package/resources/esims/esims.js +0 -205
  249. package/resources/esims/esims.js.map +0 -1
  250. package/resources/esims/esims.mjs +0 -200
  251. package/resources/esims/esims.mjs.map +0 -1
  252. package/resources/esims/index.d.mts +0 -3
  253. package/resources/esims/index.d.mts.map +0 -1
  254. package/resources/esims/index.d.ts +0 -3
  255. package/resources/esims/index.d.ts.map +0 -1
  256. package/resources/esims/index.js.map +0 -1
  257. package/resources/esims/index.mjs.map +0 -1
  258. package/resources/esims/messages.d.mts +0 -106
  259. package/resources/esims/messages.d.mts.map +0 -1
  260. package/resources/esims/messages.d.ts +0 -106
  261. package/resources/esims/messages.d.ts.map +0 -1
  262. package/resources/esims/messages.js +0 -37
  263. package/resources/esims/messages.js.map +0 -1
  264. package/resources/esims/messages.mjs +0 -33
  265. package/resources/esims/messages.mjs.map +0 -1
  266. package/resources/esims.d.mts +0 -2
  267. package/resources/esims.d.mts.map +0 -1
  268. package/resources/esims.d.ts +0 -2
  269. package/resources/esims.d.ts.map +0 -1
  270. package/resources/esims.js.map +0 -1
  271. package/resources/esims.mjs.map +0 -1
  272. package/src/resources/esims/esims.ts +0 -1019
  273. package/src/resources/esims/index.ts +0 -28
  274. package/src/resources/esims/messages.ts +0 -187
@@ -79,15 +79,16 @@ export class Apps extends APIResource {
79
79
 
80
80
  /**
81
81
  * Requests an app install on the device. The request body must supply exactly one
82
- * of an Android packageName or an iOS bundleId; protected packages are rejected.
83
- * background (default false) selects the response contract: false installs inline
84
- * and returns the outcome directly (200 on success, an error status on failure);
85
- * true accepts the request and runs the download + install in the background,
86
- * returning 202 immediately — poll list-app-installs for the backend's view of
87
- * that attempt's status. Refuses with 409 once 2 other installs are already
88
- * running on the device, in either mode; a repeat request for an app that already
89
- * has an install running is also refused with 409 rather than superseding it —
90
- * retry once that attempt reaches a terminal state.
82
+ * of an Android packageName or an iOS bundleId; optional country and versionCode
83
+ * select an exact regional uploaded Android version, and protected packages are
84
+ * rejected. background (default false) selects the response contract: false
85
+ * installs inline and returns the outcome directly (200 on success, an error
86
+ * status on failure); true accepts the request and runs the download + install in
87
+ * the background, returning 202 immediately — poll list-app-installs for the
88
+ * backend's view of that attempt's status. Refuses with 409 once 2 other installs
89
+ * are already running on the device, in either mode; a repeat request for an app
90
+ * that already has an install running is also refused with 409 rather than
91
+ * superseding it — retry once that attempt reaches a terminal state.
91
92
  */
92
93
  install(deviceID: string, params: AppInstallParams, options?: RequestOptions): APIPromise<void> {
93
94
  const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
@@ -107,11 +108,11 @@ export class Apps extends APIResource {
107
108
  }
108
109
 
109
110
  /**
110
- * Reports the backend's view of background app-install attempts on this device —
111
- * status reflects the install ATTEMPT, not device ground truth; list-apps remains
112
- * authoritative for what is actually installed. Records are in-memory and lost on
113
- * service restart; terminal records are kept ~15 minutes. Not gated on device
114
- * readiness, so it also answers while the device is offline or crashed.
111
+ * Reports the backend's durable view of background app-install attempts on this
112
+ * device — status reflects the install ATTEMPT, not device ground truth; list-apps
113
+ * remains authoritative for what is actually installed. Terminal and projected
114
+ * timeout records are kept ~15 minutes. Not gated on device readiness, so it also
115
+ * answers while the device is offline or crashed.
115
116
  */
116
117
  listInstalls(
117
118
  deviceID: string,
@@ -249,10 +250,9 @@ export namespace AppListInstallsResponse {
249
250
  updatedAt: string;
250
251
 
251
252
  /**
252
- * Closed set: download_failed, adb_install_failed, panic, timeout, failed. Only
253
- * present when status is failed.
253
+ * Only present when status is failed.
254
254
  */
255
- errorClass?: string;
255
+ errorClass?: 'download_failed' | 'adb_install_failed' | 'panic' | 'timeout' | 'failed';
256
256
  }
257
257
  }
258
258
 
@@ -318,11 +318,23 @@ export declare namespace AppInstallParams {
318
318
  */
319
319
  background?: boolean;
320
320
 
321
+ /**
322
+ * Body param: Optional ISO 3166-1 alpha-2 country of the uploaded app version
323
+ * (e.g. MY or SG).
324
+ */
325
+ country?: string;
326
+
321
327
  /**
322
328
  * Body param: Android package name (e.g. com.example.app)
323
329
  */
324
330
  packageName?: string;
325
331
 
332
+ /**
333
+ * Body param: Optional exact app-library version code. Use with country when
334
+ * multiple regional versions share an identifier.
335
+ */
336
+ versionCode?: number;
337
+
326
338
  /**
327
339
  * Header param
328
340
  */
@@ -347,6 +359,18 @@ export declare namespace AppInstallParams {
347
359
  */
348
360
  bundleId?: string;
349
361
 
362
+ /**
363
+ * Body param: Optional ISO 3166-1 alpha-2 country of the uploaded app version
364
+ * (e.g. MY or SG).
365
+ */
366
+ country?: string;
367
+
368
+ /**
369
+ * Body param: Optional exact app-library version code. Use with country when
370
+ * multiple regional versions share an identifier.
371
+ */
372
+ versionCode?: number;
373
+
350
374
  /**
351
375
  * Header param
352
376
  */
@@ -102,6 +102,18 @@ import * as TasksAPI from './tasks';
102
102
  import { TaskListParams, TaskListResponse, Tasks } from './tasks';
103
103
  import * as TimezoneAPI from './timezone';
104
104
  import { Timezone, TimezoneGetParams, TimezoneGetResponse, TimezoneSetParams } from './timezone';
105
+ import * as TrafficSessionsAPI from './traffic-sessions';
106
+ import {
107
+ TrafficSessionCreateParams,
108
+ TrafficSessionCreateResponse,
109
+ TrafficSessionDeleteParams,
110
+ TrafficSessionDeleteResponse,
111
+ TrafficSessionListParams,
112
+ TrafficSessionListResponse,
113
+ TrafficSessionRetrieveParams,
114
+ TrafficSessionRetrieveResponse,
115
+ TrafficSessions,
116
+ } from './traffic-sessions';
105
117
  import * as EsimAPI from './esim/esim';
106
118
  import {
107
119
  Esim,
@@ -140,6 +152,7 @@ export class Devices extends APIResource {
140
152
  kiosk: KioskAPI.Kiosk = new KioskAPI.Kiosk(this._client);
141
153
  mediaSessions: MediaSessionsAPI.MediaSessions = new MediaSessionsAPI.MediaSessions(this._client);
142
154
  recordings: RecordingsAPI.Recordings = new RecordingsAPI.Recordings(this._client);
155
+ trafficSessions: TrafficSessionsAPI.TrafficSessions = new TrafficSessionsAPI.TrafficSessions(this._client);
143
156
 
144
157
  /**
145
158
  * Requests a new device for the authenticated user from the device spec in the
@@ -231,10 +244,9 @@ export class Devices extends APIResource {
231
244
  }
232
245
 
233
246
  /**
234
- * Wakes a parked device: capacity is preflighted (the device's data may be
235
- * replicated to another node if its home is full), the device starts running
236
- * again, and per-minute billing resumes. On a device that is not parked this is a
237
- * no-op ready transition.
247
+ * Wakes a parked device: backend readiness and any required capacity are
248
+ * preflighted, the same device starts running again, and per-minute billing
249
+ * resumes. On a device that is not parked this is a no-op ready transition.
238
250
  */
239
251
  resume(deviceID: string, options?: RequestOptions): APIPromise<void> {
240
252
  return this._client.post(path`/devices/${deviceID}/resume`, {
@@ -315,6 +327,11 @@ export interface DeviceCreateResponse {
315
327
 
316
328
  name: string;
317
329
 
330
+ /**
331
+ * Operating system the device runs.
332
+ */
333
+ platform: 'android' | 'ios';
334
+
318
335
  state: string;
319
336
 
320
337
  stateMessage: string;
@@ -361,6 +378,11 @@ export interface DeviceRetrieveResponse {
361
378
 
362
379
  name: string;
363
380
 
381
+ /**
382
+ * Operating system the device runs.
383
+ */
384
+ platform: 'android' | 'ios';
385
+
364
386
  state: string;
365
387
 
366
388
  stateMessage: string;
@@ -419,6 +441,11 @@ export namespace DeviceListResponse {
419
441
 
420
442
  name: string;
421
443
 
444
+ /**
445
+ * Operating system the device runs.
446
+ */
447
+ platform: 'android' | 'ios';
448
+
422
449
  state: string;
423
450
 
424
451
  stateMessage: string;
@@ -543,6 +570,8 @@ export namespace DeviceRetrieveCapabilitiesResponse {
543
570
 
544
571
  proxy: boolean;
545
572
 
573
+ recording: boolean;
574
+
546
575
  reset: boolean;
547
576
 
548
577
  shell: boolean;
@@ -554,6 +583,8 @@ export namespace DeviceRetrieveCapabilitiesResponse {
554
583
  stream: boolean;
555
584
 
556
585
  time: boolean;
586
+
587
+ trafficInspection: boolean;
557
588
  }
558
589
  }
559
590
 
@@ -568,6 +599,11 @@ export interface DeviceSetNameResponse {
568
599
 
569
600
  name: string;
570
601
 
602
+ /**
603
+ * Operating system the device runs.
604
+ */
605
+ platform: 'android' | 'ios';
606
+
571
607
  state: string;
572
608
 
573
609
  stateMessage: string;
@@ -614,6 +650,11 @@ export interface DeviceWaitReadyResponse {
614
650
 
615
651
  name: string;
616
652
 
653
+ /**
654
+ * Operating system the device runs.
655
+ */
656
+ platform: 'android' | 'ios';
657
+
617
658
  state: string;
618
659
 
619
660
  stateMessage: string;
@@ -862,6 +903,7 @@ Devices.Browser = Browser;
862
903
  Devices.Kiosk = Kiosk;
863
904
  Devices.MediaSessions = MediaSessions;
864
905
  Devices.Recordings = Recordings;
906
+ Devices.TrafficSessions = TrafficSessions;
865
907
 
866
908
  export declare namespace Devices {
867
909
  export {
@@ -1029,4 +1071,16 @@ export declare namespace Devices {
1029
1071
  type RecordingTrajectoryParams as RecordingTrajectoryParams,
1030
1072
  type RecordingVideoParams as RecordingVideoParams,
1031
1073
  };
1074
+
1075
+ export {
1076
+ TrafficSessions as TrafficSessions,
1077
+ type TrafficSessionCreateResponse as TrafficSessionCreateResponse,
1078
+ type TrafficSessionRetrieveResponse as TrafficSessionRetrieveResponse,
1079
+ type TrafficSessionListResponse as TrafficSessionListResponse,
1080
+ type TrafficSessionDeleteResponse as TrafficSessionDeleteResponse,
1081
+ type TrafficSessionCreateParams as TrafficSessionCreateParams,
1082
+ type TrafficSessionRetrieveParams as TrafficSessionRetrieveParams,
1083
+ type TrafficSessionListParams as TrafficSessionListParams,
1084
+ type TrafficSessionDeleteParams as TrafficSessionDeleteParams,
1085
+ };
1032
1086
  }
@@ -135,3 +135,14 @@ export {
135
135
  type TimezoneGetParams,
136
136
  type TimezoneSetParams,
137
137
  } from './timezone';
138
+ export {
139
+ TrafficSessions,
140
+ type TrafficSessionCreateResponse,
141
+ type TrafficSessionRetrieveResponse,
142
+ type TrafficSessionListResponse,
143
+ type TrafficSessionDeleteResponse,
144
+ type TrafficSessionCreateParams,
145
+ type TrafficSessionRetrieveParams,
146
+ type TrafficSessionListParams,
147
+ type TrafficSessionDeleteParams,
148
+ } from './traffic-sessions';
@@ -51,9 +51,9 @@ export class Keyboard extends APIResource {
51
51
  }
52
52
 
53
53
  /**
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.
54
+ * Types text into the focused input field. The optional completionMode defaults to
55
+ * accepted for backwards-compatible low latency; committed additionally waits for
56
+ * the complete text or a quiescent UI state.
57
57
  */
58
58
  write(deviceID: string, params: KeyboardWriteParams, options?: RequestOptions): APIPromise<void> {
59
59
  const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
@@ -100,6 +100,13 @@ export interface KeyboardWriteParams {
100
100
  */
101
101
  clear?: boolean;
102
102
 
103
+ /**
104
+ * Body param: Completion guarantee. accepted returns after the input provider
105
+ * accepts the operation; committed additionally waits for the focused UI state to
106
+ * contain the complete text or become quiescent.
107
+ */
108
+ completionMode?: 'accepted' | 'committed';
109
+
103
110
  /**
104
111
  * Body param: Per-character mistake rate for humantouch typing. -1 uses server
105
112
  * default.
@@ -320,8 +320,20 @@ export interface RecordingDeleteParams {
320
320
  export interface RecordingStartParams {
321
321
  name?: string;
322
322
 
323
+ /**
324
+ * Capture quality from 1 (lowest) to 10 (full stream quality). Defaults to the
325
+ * device's full quality. Honored by devices recording through the portal stream
326
+ * bridge.
327
+ */
328
+ quality?: number;
329
+
323
330
  retentionDays?: number;
324
331
 
332
+ /**
333
+ * Artifacts to capture: trajectory (input actions), video, and audio (captured
334
+ * into the video artifact, so it requires video; honored by portal stream-bridge
335
+ * recorders). Defaults to trajectory and video.
336
+ */
325
337
  types?: Array<string> | null;
326
338
  }
327
339
 
@@ -0,0 +1,299 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as Shared from '../shared';
5
+ import { APIPromise } from '../../core/api-promise';
6
+ import { buildHeaders } from '../../internal/headers';
7
+ import { RequestOptions } from '../../internal/request-options';
8
+ import { path } from '../../internal/utils/path';
9
+
10
+ export class TrafficSessions extends APIResource {
11
+ /**
12
+ * Starts one live-only decoded HTTP/1.1, HTTP/2, HTTP/3 and WebSocket traffic
13
+ * session.
14
+ */
15
+ create(
16
+ deviceID: string,
17
+ params: TrafficSessionCreateParams,
18
+ options?: RequestOptions,
19
+ ): APIPromise<TrafficSessionCreateResponse> {
20
+ const { 'Idempotency-Key': idempotencyKey, ...body } = params;
21
+ return this._client.post(path`/devices/${deviceID}/traffic/sessions`, {
22
+ body,
23
+ ...options,
24
+ headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
25
+ });
26
+ }
27
+
28
+ /**
29
+ * Returns status and the device stream credential for a live session.
30
+ */
31
+ retrieve(
32
+ sessionID: string,
33
+ params: TrafficSessionRetrieveParams,
34
+ options?: RequestOptions,
35
+ ): APIPromise<TrafficSessionRetrieveResponse> {
36
+ const { deviceId } = params;
37
+ return this._client.get(path`/devices/${deviceId}/traffic/sessions/${sessionID}`, options);
38
+ }
39
+
40
+ /**
41
+ * List device traffic sessions
42
+ */
43
+ list(
44
+ deviceID: string,
45
+ query: TrafficSessionListParams | null | undefined = {},
46
+ options?: RequestOptions,
47
+ ): APIPromise<TrafficSessionListResponse> {
48
+ return this._client.get(path`/devices/${deviceID}/traffic/sessions`, { query, ...options });
49
+ }
50
+
51
+ /**
52
+ * Stop device traffic inspection
53
+ */
54
+ delete(
55
+ sessionID: string,
56
+ params: TrafficSessionDeleteParams,
57
+ options?: RequestOptions,
58
+ ): APIPromise<TrafficSessionDeleteResponse> {
59
+ const { deviceId } = params;
60
+ return this._client.delete(path`/devices/${deviceId}/traffic/sessions/${sessionID}`, options);
61
+ }
62
+ }
63
+
64
+ export interface TrafficSessionCreateResponse {
65
+ id: string;
66
+
67
+ createdAt: string;
68
+
69
+ deviceId: string;
70
+
71
+ expiresAt: string;
72
+
73
+ maxBodyBytes: number;
74
+
75
+ retention: 'none';
76
+
77
+ state: 'starting' | 'active' | 'stopping' | 'stopped' | 'failed' | 'expired';
78
+
79
+ /**
80
+ * A URL to the JSON Schema for this object.
81
+ */
82
+ $schema?: string;
83
+
84
+ error?: TrafficSessionCreateResponse.Error;
85
+
86
+ startedAt?: string;
87
+
88
+ stoppedAt?: string;
89
+
90
+ stream?: TrafficSessionCreateResponse.Stream;
91
+ }
92
+
93
+ export namespace TrafficSessionCreateResponse {
94
+ export interface Error {
95
+ code: string;
96
+
97
+ message: string;
98
+ }
99
+
100
+ export interface Stream {
101
+ token: string;
102
+
103
+ protocol: string;
104
+
105
+ url: string;
106
+ }
107
+ }
108
+
109
+ export interface TrafficSessionRetrieveResponse {
110
+ id: string;
111
+
112
+ createdAt: string;
113
+
114
+ deviceId: string;
115
+
116
+ expiresAt: string;
117
+
118
+ maxBodyBytes: number;
119
+
120
+ retention: 'none';
121
+
122
+ state: 'starting' | 'active' | 'stopping' | 'stopped' | 'failed' | 'expired';
123
+
124
+ /**
125
+ * A URL to the JSON Schema for this object.
126
+ */
127
+ $schema?: string;
128
+
129
+ error?: TrafficSessionRetrieveResponse.Error;
130
+
131
+ startedAt?: string;
132
+
133
+ stoppedAt?: string;
134
+
135
+ stream?: TrafficSessionRetrieveResponse.Stream;
136
+ }
137
+
138
+ export namespace TrafficSessionRetrieveResponse {
139
+ export interface Error {
140
+ code: string;
141
+
142
+ message: string;
143
+ }
144
+
145
+ export interface Stream {
146
+ token: string;
147
+
148
+ protocol: string;
149
+
150
+ url: string;
151
+ }
152
+ }
153
+
154
+ export interface TrafficSessionListResponse {
155
+ items: Array<TrafficSessionListResponse.Item> | null;
156
+
157
+ pagination: Shared.Meta;
158
+
159
+ /**
160
+ * A URL to the JSON Schema for this object.
161
+ */
162
+ $schema?: string;
163
+ }
164
+
165
+ export namespace TrafficSessionListResponse {
166
+ export interface Item {
167
+ id: string;
168
+
169
+ createdAt: string;
170
+
171
+ deviceId: string;
172
+
173
+ expiresAt: string;
174
+
175
+ maxBodyBytes: number;
176
+
177
+ retention: 'none';
178
+
179
+ state: 'starting' | 'active' | 'stopping' | 'stopped' | 'failed' | 'expired';
180
+
181
+ /**
182
+ * A URL to the JSON Schema for this object.
183
+ */
184
+ $schema?: string;
185
+
186
+ error?: Item.Error;
187
+
188
+ startedAt?: string;
189
+
190
+ stoppedAt?: string;
191
+
192
+ stream?: Item.Stream;
193
+ }
194
+
195
+ export namespace Item {
196
+ export interface Error {
197
+ code: string;
198
+
199
+ message: string;
200
+ }
201
+
202
+ export interface Stream {
203
+ token: string;
204
+
205
+ protocol: string;
206
+
207
+ url: string;
208
+ }
209
+ }
210
+ }
211
+
212
+ export interface TrafficSessionDeleteResponse {
213
+ id: string;
214
+
215
+ createdAt: string;
216
+
217
+ deviceId: string;
218
+
219
+ expiresAt: string;
220
+
221
+ maxBodyBytes: number;
222
+
223
+ retention: 'none';
224
+
225
+ state: 'starting' | 'active' | 'stopping' | 'stopped' | 'failed' | 'expired';
226
+
227
+ /**
228
+ * A URL to the JSON Schema for this object.
229
+ */
230
+ $schema?: string;
231
+
232
+ error?: TrafficSessionDeleteResponse.Error;
233
+
234
+ startedAt?: string;
235
+
236
+ stoppedAt?: string;
237
+
238
+ stream?: TrafficSessionDeleteResponse.Stream;
239
+ }
240
+
241
+ export namespace TrafficSessionDeleteResponse {
242
+ export interface Error {
243
+ code: string;
244
+
245
+ message: string;
246
+ }
247
+
248
+ export interface Stream {
249
+ token: string;
250
+
251
+ protocol: string;
252
+
253
+ url: string;
254
+ }
255
+ }
256
+
257
+ export interface TrafficSessionCreateParams {
258
+ /**
259
+ * Header param
260
+ */
261
+ 'Idempotency-Key': string;
262
+
263
+ /**
264
+ * Body param
265
+ */
266
+ expiresInSeconds?: number;
267
+
268
+ /**
269
+ * Body param
270
+ */
271
+ maxBodyBytes?: number;
272
+ }
273
+
274
+ export interface TrafficSessionRetrieveParams {
275
+ deviceId: string;
276
+ }
277
+
278
+ export interface TrafficSessionListParams {
279
+ page?: number;
280
+
281
+ pageSize?: number;
282
+ }
283
+
284
+ export interface TrafficSessionDeleteParams {
285
+ deviceId: string;
286
+ }
287
+
288
+ export declare namespace TrafficSessions {
289
+ export {
290
+ type TrafficSessionCreateResponse as TrafficSessionCreateResponse,
291
+ type TrafficSessionRetrieveResponse as TrafficSessionRetrieveResponse,
292
+ type TrafficSessionListResponse as TrafficSessionListResponse,
293
+ type TrafficSessionDeleteResponse as TrafficSessionDeleteResponse,
294
+ type TrafficSessionCreateParams as TrafficSessionCreateParams,
295
+ type TrafficSessionRetrieveParams as TrafficSessionRetrieveParams,
296
+ type TrafficSessionListParams as TrafficSessionListParams,
297
+ type TrafficSessionDeleteParams as TrafficSessionDeleteParams,
298
+ };
299
+ }