@mobilerun/sdk 2.1.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/CHANGELOG.md +253 -0
  2. package/README.md +44 -0
  3. package/client.d.mts +32 -3
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +32 -3
  6. package/client.d.ts.map +1 -1
  7. package/client.js +29 -7
  8. package/client.js.map +1 -1
  9. package/client.mjs +29 -7
  10. package/client.mjs.map +1 -1
  11. package/internal/tslib.js +6 -6
  12. package/internal/utils/query.d.mts +2 -0
  13. package/internal/utils/query.d.mts.map +1 -0
  14. package/internal/utils/query.d.ts +2 -0
  15. package/internal/utils/query.d.ts.map +1 -0
  16. package/internal/utils/query.js +10 -0
  17. package/internal/utils/query.js.map +1 -0
  18. package/internal/utils/query.mjs +6 -0
  19. package/internal/utils/query.mjs.map +1 -0
  20. package/internal/utils.d.mts +1 -0
  21. package/internal/utils.d.ts +1 -0
  22. package/internal/utils.js +1 -0
  23. package/internal/utils.js.map +1 -1
  24. package/internal/utils.mjs +1 -0
  25. package/package.json +7 -1
  26. package/resources/agents.d.mts +29 -0
  27. package/resources/agents.d.mts.map +1 -0
  28. package/resources/agents.d.ts +29 -0
  29. package/resources/agents.d.ts.map +1 -0
  30. package/resources/agents.js +18 -0
  31. package/resources/agents.js.map +1 -0
  32. package/resources/agents.mjs +14 -0
  33. package/resources/agents.mjs.map +1 -0
  34. package/resources/apps.d.mts +10 -12
  35. package/resources/apps.d.mts.map +1 -1
  36. package/resources/apps.d.ts +10 -12
  37. package/resources/apps.d.ts.map +1 -1
  38. package/resources/apps.js.map +1 -1
  39. package/resources/apps.mjs.map +1 -1
  40. package/resources/carriers.d.mts +233 -0
  41. package/resources/carriers.d.mts.map +1 -0
  42. package/resources/carriers.d.ts +233 -0
  43. package/resources/carriers.d.ts.map +1 -0
  44. package/resources/carriers.js +46 -0
  45. package/resources/carriers.js.map +1 -0
  46. package/resources/carriers.mjs +42 -0
  47. package/resources/carriers.mjs.map +1 -0
  48. package/resources/credentials/credentials.d.mts +4 -13
  49. package/resources/credentials/credentials.d.mts.map +1 -1
  50. package/resources/credentials/credentials.d.ts +4 -13
  51. package/resources/credentials/credentials.d.ts.map +1 -1
  52. package/resources/credentials/credentials.js.map +1 -1
  53. package/resources/credentials/credentials.mjs.map +1 -1
  54. package/resources/devices/actions.d.mts +37 -1
  55. package/resources/devices/actions.d.mts.map +1 -1
  56. package/resources/devices/actions.d.ts +37 -1
  57. package/resources/devices/actions.d.ts.map +1 -1
  58. package/resources/devices/actions.js +36 -0
  59. package/resources/devices/actions.js.map +1 -1
  60. package/resources/devices/actions.mjs +36 -0
  61. package/resources/devices/actions.mjs.map +1 -1
  62. package/resources/devices/apps.d.mts +4 -0
  63. package/resources/devices/apps.d.mts.map +1 -1
  64. package/resources/devices/apps.d.ts +4 -0
  65. package/resources/devices/apps.d.ts.map +1 -1
  66. package/resources/devices/devices.d.mts +40 -38
  67. package/resources/devices/devices.d.mts.map +1 -1
  68. package/resources/devices/devices.d.ts +40 -38
  69. package/resources/devices/devices.d.ts.map +1 -1
  70. package/resources/devices/devices.js +22 -2
  71. package/resources/devices/devices.js.map +1 -1
  72. package/resources/devices/devices.mjs +23 -3
  73. package/resources/devices/devices.mjs.map +1 -1
  74. package/resources/devices/files.d.mts +108 -0
  75. package/resources/devices/files.d.mts.map +1 -0
  76. package/resources/devices/files.d.ts +108 -0
  77. package/resources/devices/files.d.ts.map +1 -0
  78. package/resources/devices/files.js +87 -0
  79. package/resources/devices/files.js.map +1 -0
  80. package/resources/devices/files.mjs +83 -0
  81. package/resources/devices/files.mjs.map +1 -0
  82. package/resources/devices/index.d.mts +7 -2
  83. package/resources/devices/index.d.mts.map +1 -1
  84. package/resources/devices/index.d.ts +7 -2
  85. package/resources/devices/index.d.ts.map +1 -1
  86. package/resources/devices/index.js +11 -1
  87. package/resources/devices/index.js.map +1 -1
  88. package/resources/devices/index.mjs +6 -1
  89. package/resources/devices/index.mjs.map +1 -1
  90. package/resources/devices/keyboard.d.mts +10 -2
  91. package/resources/devices/keyboard.d.mts.map +1 -1
  92. package/resources/devices/keyboard.d.ts +10 -2
  93. package/resources/devices/keyboard.d.ts.map +1 -1
  94. package/resources/devices/location.d.mts +42 -0
  95. package/resources/devices/location.d.mts.map +1 -0
  96. package/resources/devices/location.d.ts +42 -0
  97. package/resources/devices/location.d.ts.map +1 -0
  98. package/resources/devices/location.js +47 -0
  99. package/resources/devices/location.js.map +1 -0
  100. package/resources/devices/location.mjs +43 -0
  101. package/resources/devices/location.mjs.map +1 -0
  102. package/resources/devices/packages.d.mts +4 -0
  103. package/resources/devices/packages.d.mts.map +1 -1
  104. package/resources/devices/packages.d.ts +4 -0
  105. package/resources/devices/packages.d.ts.map +1 -1
  106. package/resources/devices/profile.d.mts +23 -0
  107. package/resources/devices/profile.d.mts.map +1 -0
  108. package/resources/devices/profile.d.ts +23 -0
  109. package/resources/devices/profile.d.ts.map +1 -0
  110. package/resources/devices/profile.js +30 -0
  111. package/resources/devices/profile.js.map +1 -0
  112. package/resources/devices/profile.mjs +26 -0
  113. package/resources/devices/profile.mjs.map +1 -0
  114. package/resources/devices/proxy.d.mts +61 -0
  115. package/resources/devices/proxy.d.mts.map +1 -0
  116. package/resources/devices/proxy.d.ts +61 -0
  117. package/resources/devices/proxy.d.ts.map +1 -0
  118. package/resources/devices/proxy.js +48 -0
  119. package/resources/devices/proxy.js.map +1 -0
  120. package/resources/devices/proxy.mjs +44 -0
  121. package/resources/devices/proxy.mjs.map +1 -0
  122. package/resources/devices/state.d.mts +8 -19
  123. package/resources/devices/state.d.mts.map +1 -1
  124. package/resources/devices/state.d.ts +8 -19
  125. package/resources/devices/state.d.ts.map +1 -1
  126. package/resources/devices/state.js +0 -17
  127. package/resources/devices/state.js.map +1 -1
  128. package/resources/devices/state.mjs +0 -17
  129. package/resources/devices/state.mjs.map +1 -1
  130. package/resources/devices/tasks.d.mts +2 -9
  131. package/resources/devices/tasks.d.mts.map +1 -1
  132. package/resources/devices/tasks.d.ts +2 -9
  133. package/resources/devices/tasks.d.ts.map +1 -1
  134. package/resources/devices/tasks.js.map +1 -1
  135. package/resources/devices/tasks.mjs.map +1 -1
  136. package/resources/devices/time.d.mts +59 -0
  137. package/resources/devices/time.d.mts.map +1 -0
  138. package/resources/devices/time.d.ts +59 -0
  139. package/resources/devices/time.d.ts.map +1 -0
  140. package/resources/devices/time.js +83 -0
  141. package/resources/devices/time.js.map +1 -0
  142. package/resources/devices/time.mjs +79 -0
  143. package/resources/devices/time.mjs.map +1 -0
  144. package/resources/hooks.d.mts +5 -30
  145. package/resources/hooks.d.mts.map +1 -1
  146. package/resources/hooks.d.ts +5 -30
  147. package/resources/hooks.d.ts.map +1 -1
  148. package/resources/hooks.js +3 -0
  149. package/resources/hooks.js.map +1 -1
  150. package/resources/hooks.mjs +3 -0
  151. package/resources/hooks.mjs.map +1 -1
  152. package/resources/index.d.mts +6 -1
  153. package/resources/index.d.mts.map +1 -1
  154. package/resources/index.d.ts +6 -1
  155. package/resources/index.d.ts.map +1 -1
  156. package/resources/index.js +11 -1
  157. package/resources/index.js.map +1 -1
  158. package/resources/index.mjs +5 -0
  159. package/resources/index.mjs.map +1 -1
  160. package/resources/profiles.d.mts +84 -0
  161. package/resources/profiles.d.mts.map +1 -0
  162. package/resources/profiles.d.ts +84 -0
  163. package/resources/profiles.d.ts.map +1 -0
  164. package/resources/profiles.js +40 -0
  165. package/resources/profiles.js.map +1 -0
  166. package/resources/profiles.mjs +36 -0
  167. package/resources/profiles.mjs.map +1 -0
  168. package/resources/proxies.d.mts +72 -0
  169. package/resources/proxies.d.mts.map +1 -0
  170. package/resources/proxies.d.ts +72 -0
  171. package/resources/proxies.d.ts.map +1 -0
  172. package/resources/proxies.js +40 -0
  173. package/resources/proxies.js.map +1 -0
  174. package/resources/proxies.mjs +36 -0
  175. package/resources/proxies.mjs.map +1 -0
  176. package/resources/shared.d.mts +95 -0
  177. package/resources/shared.d.mts.map +1 -0
  178. package/resources/shared.d.ts +95 -0
  179. package/resources/shared.d.ts.map +1 -0
  180. package/resources/shared.js +4 -0
  181. package/resources/shared.js.map +1 -0
  182. package/resources/shared.mjs +3 -0
  183. package/resources/shared.mjs.map +1 -0
  184. package/resources/tasks/index.d.mts +1 -1
  185. package/resources/tasks/index.d.mts.map +1 -1
  186. package/resources/tasks/index.d.ts +1 -1
  187. package/resources/tasks/index.d.ts.map +1 -1
  188. package/resources/tasks/index.js.map +1 -1
  189. package/resources/tasks/index.mjs.map +1 -1
  190. package/resources/tasks/screenshots.d.mts +3 -0
  191. package/resources/tasks/screenshots.d.mts.map +1 -1
  192. package/resources/tasks/screenshots.d.ts +3 -0
  193. package/resources/tasks/screenshots.d.ts.map +1 -1
  194. package/resources/tasks/screenshots.js +3 -0
  195. package/resources/tasks/screenshots.js.map +1 -1
  196. package/resources/tasks/screenshots.mjs +3 -0
  197. package/resources/tasks/screenshots.mjs.map +1 -1
  198. package/resources/tasks/tasks.d.mts +105 -106
  199. package/resources/tasks/tasks.d.mts.map +1 -1
  200. package/resources/tasks/tasks.d.ts +105 -106
  201. package/resources/tasks/tasks.d.ts.map +1 -1
  202. package/resources/tasks/tasks.js +11 -5
  203. package/resources/tasks/tasks.js.map +1 -1
  204. package/resources/tasks/tasks.mjs +11 -5
  205. package/resources/tasks/tasks.mjs.map +1 -1
  206. package/resources/tasks/ui-states.d.mts +3 -0
  207. package/resources/tasks/ui-states.d.mts.map +1 -1
  208. package/resources/tasks/ui-states.d.ts +3 -0
  209. package/resources/tasks/ui-states.d.ts.map +1 -1
  210. package/resources/tasks/ui-states.js +3 -0
  211. package/resources/tasks/ui-states.js.map +1 -1
  212. package/resources/tasks/ui-states.mjs +3 -0
  213. package/resources/tasks/ui-states.mjs.map +1 -1
  214. package/src/client.ts +113 -10
  215. package/src/internal/utils/query.ts +7 -0
  216. package/src/internal/utils.ts +1 -0
  217. package/src/resources/agents.ts +43 -0
  218. package/src/resources/apps.ts +11 -19
  219. package/src/resources/carriers.ts +327 -0
  220. package/src/resources/credentials/credentials.ts +4 -19
  221. package/src/resources/devices/actions.ts +84 -0
  222. package/src/resources/devices/apps.ts +5 -0
  223. package/src/resources/devices/devices.ts +107 -61
  224. package/src/resources/devices/files.ts +221 -0
  225. package/src/resources/devices/index.ts +37 -3
  226. package/src/resources/devices/keyboard.ts +12 -2
  227. package/src/resources/devices/location.ts +91 -0
  228. package/src/resources/devices/packages.ts +5 -0
  229. package/src/resources/devices/profile.ts +45 -0
  230. package/src/resources/devices/proxy.ts +115 -0
  231. package/src/resources/devices/state.ts +10 -44
  232. package/src/resources/devices/tasks.ts +2 -15
  233. package/src/resources/devices/time.ts +147 -0
  234. package/src/resources/hooks.ts +5 -36
  235. package/src/resources/index.ts +37 -0
  236. package/src/resources/profiles.ts +133 -0
  237. package/src/resources/proxies.ts +130 -0
  238. package/src/resources/shared.ts +149 -0
  239. package/src/resources/tasks/index.ts +5 -0
  240. package/src/resources/tasks/screenshots.ts +3 -0
  241. package/src/resources/tasks/tasks.ts +134 -130
  242. package/src/resources/tasks/ui-states.ts +3 -0
  243. package/src/version.ts +1 -1
  244. package/version.d.mts +1 -1
  245. package/version.d.ts +1 -1
  246. package/version.js +1 -1
  247. package/version.mjs +1 -1
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
+ import * as Shared from '../shared';
4
5
  import * as PackagesAPI from './packages/packages';
5
6
  import {
6
7
  PackageCreateParams,
@@ -8,7 +9,7 @@ import {
8
9
  PackageListResponse,
9
10
  Packages,
10
11
  } from './packages/packages';
11
- import * as CredentialsCredentialsAPI from './packages/credentials/credentials';
12
+ import * as PackagesCredentialsAPI from './packages/credentials/credentials';
12
13
  import { APIPromise } from '../../core/api-promise';
13
14
  import { RequestOptions } from '../../internal/request-options';
14
15
 
@@ -27,25 +28,9 @@ export class Credentials extends APIResource {
27
28
  }
28
29
 
29
30
  export interface CredentialListResponse {
30
- items: Array<CredentialsCredentialsAPI.Credential>;
31
+ items: Array<PackagesCredentialsAPI.Credential>;
31
32
 
32
- pagination: CredentialListResponse.Pagination;
33
- }
34
-
35
- export namespace CredentialListResponse {
36
- export interface Pagination {
37
- hasNext: boolean;
38
-
39
- hasPrev: boolean;
40
-
41
- page: number;
42
-
43
- pages: number;
44
-
45
- pageSize: number;
46
-
47
- total: number;
48
- }
33
+ pagination: Shared.Pagination;
49
34
  }
50
35
 
51
36
  export interface CredentialListParams {
@@ -27,6 +27,52 @@ export class Actions extends APIResource {
27
27
  });
28
28
  }
29
29
 
30
+ /**
31
+ * Check if overlay is visible
32
+ */
33
+ overlayVisible(
34
+ deviceID: string,
35
+ params: ActionOverlayVisibleParams | null | undefined = {},
36
+ options?: RequestOptions,
37
+ ): APIPromise<ActionOverlayVisibleResponse> {
38
+ const { 'X-Device-Display-ID': xDeviceDisplayID } = params ?? {};
39
+ return this._client.get(path`/devices/${deviceID}/overlay`, {
40
+ ...options,
41
+ headers: buildHeaders([
42
+ {
43
+ ...(xDeviceDisplayID?.toString() != null ?
44
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
45
+ : undefined),
46
+ },
47
+ options?.headers,
48
+ ]),
49
+ });
50
+ }
51
+
52
+ /**
53
+ * Set overlay visibility
54
+ */
55
+ setOverlayVisible(
56
+ deviceID: string,
57
+ params: ActionSetOverlayVisibleParams,
58
+ options?: RequestOptions,
59
+ ): APIPromise<void> {
60
+ const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
61
+ return this._client.post(path`/devices/${deviceID}/overlay`, {
62
+ body,
63
+ ...options,
64
+ headers: buildHeaders([
65
+ {
66
+ Accept: '*/*',
67
+ ...(xDeviceDisplayID?.toString() != null ?
68
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
69
+ : undefined),
70
+ },
71
+ options?.headers,
72
+ ]),
73
+ });
74
+ }
75
+
30
76
  /**
31
77
  * Swipe
32
78
  */
@@ -68,6 +114,15 @@ export class Actions extends APIResource {
68
114
  }
69
115
  }
70
116
 
117
+ export interface ActionOverlayVisibleResponse {
118
+ visible: boolean;
119
+
120
+ /**
121
+ * A URL to the JSON Schema for this object.
122
+ */
123
+ $schema?: string;
124
+ }
125
+
71
126
  export interface ActionGlobalParams {
72
127
  /**
73
128
  * Body param
@@ -80,6 +135,22 @@ export interface ActionGlobalParams {
80
135
  'X-Device-Display-ID'?: number;
81
136
  }
82
137
 
138
+ export interface ActionOverlayVisibleParams {
139
+ 'X-Device-Display-ID'?: number;
140
+ }
141
+
142
+ export interface ActionSetOverlayVisibleParams {
143
+ /**
144
+ * Body param
145
+ */
146
+ visible: boolean;
147
+
148
+ /**
149
+ * Header param
150
+ */
151
+ 'X-Device-Display-ID'?: number;
152
+ }
153
+
83
154
  export interface ActionSwipeParams {
84
155
  /**
85
156
  * Body param: Swipe duration in milliseconds
@@ -106,6 +177,11 @@ export interface ActionSwipeParams {
106
177
  */
107
178
  startY: number;
108
179
 
180
+ /**
181
+ * Body param
182
+ */
183
+ stealth?: boolean;
184
+
109
185
  /**
110
186
  * Header param
111
187
  */
@@ -123,6 +199,11 @@ export interface ActionTapParams {
123
199
  */
124
200
  y: number;
125
201
 
202
+ /**
203
+ * Body param
204
+ */
205
+ stealth?: boolean;
206
+
126
207
  /**
127
208
  * Header param
128
209
  */
@@ -131,7 +212,10 @@ export interface ActionTapParams {
131
212
 
132
213
  export declare namespace Actions {
133
214
  export {
215
+ type ActionOverlayVisibleResponse as ActionOverlayVisibleResponse,
134
216
  type ActionGlobalParams as ActionGlobalParams,
217
+ type ActionOverlayVisibleParams as ActionOverlayVisibleParams,
218
+ type ActionSetOverlayVisibleParams as ActionSetOverlayVisibleParams,
135
219
  type ActionSwipeParams as ActionSwipeParams,
136
220
  type ActionTapParams as ActionTapParams,
137
221
  };
@@ -140,6 +140,11 @@ export interface AppUpdateParams {
140
140
  }
141
141
 
142
142
  export interface AppListParams {
143
+ /**
144
+ * Query param
145
+ */
146
+ includeProtectedApps?: boolean;
147
+
143
148
  /**
144
149
  * Query param
145
150
  */
@@ -1,8 +1,17 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
+ import * as Shared from '../shared';
4
5
  import * as ActionsAPI from './actions';
5
- import { ActionGlobalParams, ActionSwipeParams, ActionTapParams, Actions } from './actions';
6
+ import {
7
+ ActionGlobalParams,
8
+ ActionOverlayVisibleParams,
9
+ ActionOverlayVisibleResponse,
10
+ ActionSetOverlayVisibleParams,
11
+ ActionSwipeParams,
12
+ ActionTapParams,
13
+ Actions,
14
+ } from './actions';
6
15
  import * as AppsAPI from './apps';
7
16
  import {
8
17
  AppDeleteParams,
@@ -13,28 +22,59 @@ import {
13
22
  AppUpdateParams,
14
23
  Apps,
15
24
  } from './apps';
25
+ import * as FilesAPI from './files';
26
+ import {
27
+ FileDeleteParams,
28
+ FileDownloadParams,
29
+ FileDownloadResponse,
30
+ FileInfo,
31
+ FileListParams,
32
+ FileListResponse,
33
+ FileUploadParams,
34
+ Files,
35
+ } from './files';
16
36
  import * as KeyboardAPI from './keyboard';
17
37
  import { Keyboard, KeyboardClearParams, KeyboardKeyParams, KeyboardWriteParams } from './keyboard';
38
+ import * as LocationAPI from './location';
39
+ import { Location, LocationGetParams, LocationGetResponse, LocationSetParams } from './location';
18
40
  import * as PackagesAPI from './packages';
19
41
  import { PackageListParams, PackageListResponse, Packages } from './packages';
42
+ import * as ProfileAPI from './profile';
43
+ import { Profile, ProfileUpdateParams } from './profile';
44
+ import * as ProxyAPI from './proxy';
45
+ import { Proxy, ProxyConnectParams, ProxyDisconnectParams } from './proxy';
20
46
  import * as StateAPI from './state';
21
47
  import {
48
+ Rect,
22
49
  State,
23
50
  StateScreenshotParams,
24
51
  StateScreenshotResponse,
25
- StateTimeParams,
26
- StateTimeResponse,
27
52
  StateUiParams,
28
53
  StateUiResponse,
29
54
  } from './state';
30
55
  import * as TasksAPI from './tasks';
31
56
  import { TaskListParams, TaskListResponse, Tasks } from './tasks';
57
+ import * as TimeAPI from './time';
58
+ import {
59
+ Time,
60
+ TimeSetTimeParams,
61
+ TimeSetTimezoneParams,
62
+ TimeTimeParams,
63
+ TimeTimeResponse,
64
+ TimeTimezoneParams,
65
+ TimeTimezoneResponse,
66
+ } from './time';
32
67
  import { APIPromise } from '../../core/api-promise';
33
68
  import { buildHeaders } from '../../internal/headers';
34
69
  import { RequestOptions } from '../../internal/request-options';
35
70
  import { path } from '../../internal/utils/path';
36
71
 
37
72
  export class Devices extends APIResource {
73
+ time: TimeAPI.Time = new TimeAPI.Time(this._client);
74
+ profile: ProfileAPI.Profile = new ProfileAPI.Profile(this._client);
75
+ files: FilesAPI.Files = new FilesAPI.Files(this._client);
76
+ proxy: ProxyAPI.Proxy = new ProxyAPI.Proxy(this._client);
77
+ location: LocationAPI.Location = new LocationAPI.Location(this._client);
38
78
  actions: ActionsAPI.Actions = new ActionsAPI.Actions(this._client);
39
79
  state: StateAPI.State = new StateAPI.State(this._client);
40
80
  apps: AppsAPI.Apps = new AppsAPI.Apps(this._client);
@@ -46,8 +86,8 @@ export class Devices extends APIResource {
46
86
  * Provision a new device
47
87
  */
48
88
  create(params: DeviceCreateParams, options?: RequestOptions): APIPromise<Device> {
49
- const { deviceType, provider, ...body } = params;
50
- return this._client.post('/devices', { query: { deviceType, provider }, body, ...options });
89
+ const { deviceType, ...body } = params;
90
+ return this._client.post('/devices', { query: { deviceType }, body, ...options });
51
91
  }
52
92
 
53
93
  /**
@@ -96,34 +136,24 @@ export class Devices extends APIResource {
96
136
  export interface Device {
97
137
  id: string;
98
138
 
99
- apps: Array<string> | null;
100
-
101
139
  assignedAt: string | null;
102
140
 
103
- country: string;
104
-
105
141
  createdAt: string;
106
142
 
107
- deviceType: string;
108
-
109
- files: Array<string> | null;
110
-
111
143
  name: string;
112
144
 
113
- provider: string;
114
-
115
145
  state: string;
116
146
 
117
147
  stateMessage: string;
118
148
 
119
- streamToken: string;
120
-
121
149
  streamUrl: string;
122
150
 
123
151
  taskCount: number;
124
152
 
125
153
  terminatesAt: string | null;
126
154
 
155
+ type: string;
156
+
127
157
  updatedAt: string;
128
158
 
129
159
  /**
@@ -131,13 +161,15 @@ export interface Device {
131
161
  */
132
162
  $schema?: string;
133
163
 
164
+ streamToken?: string;
165
+
134
166
  userId?: string;
135
167
  }
136
168
 
137
169
  export interface DeviceListResponse {
138
170
  items: Array<Device> | null;
139
171
 
140
- pagination: DeviceListResponse.Pagination;
172
+ pagination: Shared.Meta;
141
173
 
142
174
  /**
143
175
  * A URL to the JSON Schema for this object.
@@ -145,53 +177,33 @@ export interface DeviceListResponse {
145
177
  $schema?: string;
146
178
  }
147
179
 
148
- export namespace DeviceListResponse {
149
- export interface Pagination {
150
- hasNext: boolean;
151
-
152
- hasPrev: boolean;
153
-
154
- page: number;
155
-
156
- pages: number;
157
-
158
- pageSize: number;
159
-
160
- total: number;
161
- }
162
- }
163
-
164
180
  export type DeviceCountResponse = { [key: string]: number };
165
181
 
166
182
  export interface DeviceCreateParams {
167
183
  /**
168
184
  * Query param
169
185
  */
170
- deviceType?:
171
- | 'device_slot'
172
- | 'dedicated_emulated_device'
173
- | 'dedicated_physical_device'
174
- | 'dedicated_premium_device';
186
+ deviceType?: 'dedicated_physical_device' | 'dedicated_premium_device' | 'dedicated_emulated_device';
175
187
 
176
188
  /**
177
- * Query param
189
+ * Body param
178
190
  */
179
- provider?: 'limrun' | 'physical' | 'premium' | 'roidrun';
191
+ apps?: Array<string> | null;
180
192
 
181
193
  /**
182
194
  * Body param
183
195
  */
184
- apps?: Array<string> | null;
196
+ carrier?: Shared.DeviceCarrier;
185
197
 
186
198
  /**
187
199
  * Body param
188
200
  */
189
- country?: string;
201
+ files?: Array<string> | null;
190
202
 
191
203
  /**
192
204
  * Body param
193
205
  */
194
- files?: Array<string> | null;
206
+ identifiers?: Shared.DeviceIdentifiers;
195
207
 
196
208
  /**
197
209
  * Body param
@@ -201,19 +213,12 @@ export interface DeviceCreateParams {
201
213
  /**
202
214
  * Body param
203
215
  */
204
- proxy?: DeviceCreateParams.Proxy;
205
- }
206
-
207
- export namespace DeviceCreateParams {
208
- export interface Proxy {
209
- host: string;
210
-
211
- password: string;
212
-
213
- port: number;
216
+ proxy?: Shared.Config;
214
217
 
215
- user: string;
216
- }
218
+ /**
219
+ * Body param
220
+ */
221
+ smartIp?: boolean;
217
222
  }
218
223
 
219
224
  export interface DeviceListParams {
@@ -229,11 +234,9 @@ export interface DeviceListParams {
229
234
 
230
235
  pageSize?: number;
231
236
 
232
- provider?: 'limrun' | 'personal' | 'remote' | 'roidrun';
233
-
234
237
  state?: Array<'creating' | 'assigned' | 'ready' | 'disconnected' | 'terminated' | 'unknown'> | null;
235
238
 
236
- type?: 'device_slot' | 'dedicated_emulated_device' | 'dedicated_physical_device';
239
+ type?: 'dedicated_physical_device' | 'dedicated_premium_device' | 'dedicated_emulated_device';
237
240
  }
238
241
 
239
242
  export interface DeviceTerminateParams {
@@ -242,6 +245,11 @@ export interface DeviceTerminateParams {
242
245
  terminateAt?: string;
243
246
  }
244
247
 
248
+ Devices.Time = Time;
249
+ Devices.Profile = Profile;
250
+ Devices.Files = Files;
251
+ Devices.Proxy = Proxy;
252
+ Devices.Location = Location;
245
253
  Devices.Actions = Actions;
246
254
  Devices.State = State;
247
255
  Devices.Apps = Apps;
@@ -259,20 +267,58 @@ export declare namespace Devices {
259
267
  type DeviceTerminateParams as DeviceTerminateParams,
260
268
  };
261
269
 
270
+ export {
271
+ Time as Time,
272
+ type TimeTimeResponse as TimeTimeResponse,
273
+ type TimeTimezoneResponse as TimeTimezoneResponse,
274
+ type TimeSetTimeParams as TimeSetTimeParams,
275
+ type TimeSetTimezoneParams as TimeSetTimezoneParams,
276
+ type TimeTimeParams as TimeTimeParams,
277
+ type TimeTimezoneParams as TimeTimezoneParams,
278
+ };
279
+
280
+ export { Profile as Profile, type ProfileUpdateParams as ProfileUpdateParams };
281
+
282
+ export {
283
+ Files as Files,
284
+ type FileInfo as FileInfo,
285
+ type FileListResponse as FileListResponse,
286
+ type FileDownloadResponse as FileDownloadResponse,
287
+ type FileListParams as FileListParams,
288
+ type FileDeleteParams as FileDeleteParams,
289
+ type FileDownloadParams as FileDownloadParams,
290
+ type FileUploadParams as FileUploadParams,
291
+ };
292
+
293
+ export {
294
+ Proxy as Proxy,
295
+ type ProxyConnectParams as ProxyConnectParams,
296
+ type ProxyDisconnectParams as ProxyDisconnectParams,
297
+ };
298
+
299
+ export {
300
+ Location as Location,
301
+ type LocationGetResponse as LocationGetResponse,
302
+ type LocationGetParams as LocationGetParams,
303
+ type LocationSetParams as LocationSetParams,
304
+ };
305
+
262
306
  export {
263
307
  Actions as Actions,
308
+ type ActionOverlayVisibleResponse as ActionOverlayVisibleResponse,
264
309
  type ActionGlobalParams as ActionGlobalParams,
310
+ type ActionOverlayVisibleParams as ActionOverlayVisibleParams,
311
+ type ActionSetOverlayVisibleParams as ActionSetOverlayVisibleParams,
265
312
  type ActionSwipeParams as ActionSwipeParams,
266
313
  type ActionTapParams as ActionTapParams,
267
314
  };
268
315
 
269
316
  export {
270
317
  State as State,
318
+ type Rect as Rect,
271
319
  type StateScreenshotResponse as StateScreenshotResponse,
272
- type StateTimeResponse as StateTimeResponse,
273
320
  type StateUiResponse as StateUiResponse,
274
321
  type StateScreenshotParams as StateScreenshotParams,
275
- type StateTimeParams as StateTimeParams,
276
322
  type StateUiParams as StateUiParams,
277
323
  };
278
324
 
@@ -0,0 +1,221 @@
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 { type Uploadable } from '../../core/uploads';
7
+ import { buildHeaders } from '../../internal/headers';
8
+ import { RequestOptions } from '../../internal/request-options';
9
+ import { multipartFormRequestOptions } from '../../internal/uploads';
10
+ import { path } from '../../internal/utils/path';
11
+
12
+ export class Files extends APIResource {
13
+ /**
14
+ * List files
15
+ */
16
+ list(deviceID: string, params: FileListParams, options?: RequestOptions): APIPromise<FileListResponse> {
17
+ const { 'X-Device-Display-ID': xDeviceDisplayID, ...query } = params;
18
+ return this._client.get(path`/devices/${deviceID}/files`, {
19
+ query,
20
+ ...options,
21
+ headers: buildHeaders([
22
+ {
23
+ ...(xDeviceDisplayID?.toString() != null ?
24
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
25
+ : undefined),
26
+ },
27
+ options?.headers,
28
+ ]),
29
+ });
30
+ }
31
+
32
+ /**
33
+ * Delete file
34
+ */
35
+ delete(deviceID: string, params: FileDeleteParams, options?: RequestOptions): APIPromise<void> {
36
+ const { path: path_, 'X-Device-Display-ID': xDeviceDisplayID } = params;
37
+ return this._client.delete(path`/devices/${deviceID}/files`, {
38
+ query: { path: path_ },
39
+ ...options,
40
+ headers: buildHeaders([
41
+ {
42
+ Accept: '*/*',
43
+ ...(xDeviceDisplayID?.toString() != null ?
44
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
45
+ : undefined),
46
+ },
47
+ options?.headers,
48
+ ]),
49
+ });
50
+ }
51
+
52
+ /**
53
+ * Download file
54
+ */
55
+ download(deviceID: string, params: FileDownloadParams, options?: RequestOptions): APIPromise<string> {
56
+ const { 'X-Device-Display-ID': xDeviceDisplayID, ...query } = params;
57
+ return this._client.get(path`/devices/${deviceID}/files/download`, {
58
+ query,
59
+ ...options,
60
+ headers: buildHeaders([
61
+ {
62
+ ...(xDeviceDisplayID?.toString() != null ?
63
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
64
+ : undefined),
65
+ },
66
+ options?.headers,
67
+ ]),
68
+ });
69
+ }
70
+
71
+ /**
72
+ * Upload file
73
+ */
74
+ upload(deviceID: string, params: FileUploadParams, options?: RequestOptions): APIPromise<void> {
75
+ const { path: path_, 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
76
+ return this._client.post(
77
+ path`/devices/${deviceID}/files`,
78
+ multipartFormRequestOptions(
79
+ {
80
+ query: { path: path_ },
81
+ body,
82
+ ...options,
83
+ headers: buildHeaders([
84
+ {
85
+ Accept: '*/*',
86
+ ...(xDeviceDisplayID?.toString() != null ?
87
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
88
+ : undefined),
89
+ },
90
+ options?.headers,
91
+ ]),
92
+ },
93
+ this._client,
94
+ ),
95
+ );
96
+ }
97
+ }
98
+
99
+ export interface FileInfo {
100
+ extendedAttributes: boolean;
101
+
102
+ group: string;
103
+
104
+ hardLinks: number;
105
+
106
+ modifiedAt: string;
107
+
108
+ name: string;
109
+
110
+ owner: string;
111
+
112
+ permissions: FileInfo.Permissions;
113
+
114
+ size: number;
115
+
116
+ type: string;
117
+
118
+ symlinkTarget?: string;
119
+ }
120
+
121
+ export namespace FileInfo {
122
+ export interface Permissions {
123
+ group: Shared.PermissionSet;
124
+
125
+ others: Shared.PermissionSet;
126
+
127
+ owner: Shared.PermissionSet;
128
+
129
+ special: Permissions.Special;
130
+ }
131
+
132
+ export namespace Permissions {
133
+ export interface Special {
134
+ setGid: boolean;
135
+
136
+ setUid: boolean;
137
+
138
+ sticky: boolean;
139
+ }
140
+ }
141
+ }
142
+
143
+ export interface FileListResponse {
144
+ files: Array<FileInfo> | null;
145
+
146
+ path: string;
147
+
148
+ total: number;
149
+
150
+ /**
151
+ * A URL to the JSON Schema for this object.
152
+ */
153
+ $schema?: string;
154
+ }
155
+
156
+ export type FileDownloadResponse = string;
157
+
158
+ export interface FileListParams {
159
+ /**
160
+ * Query param
161
+ */
162
+ path: string;
163
+
164
+ /**
165
+ * Header param
166
+ */
167
+ 'X-Device-Display-ID'?: number;
168
+ }
169
+
170
+ export interface FileDeleteParams {
171
+ /**
172
+ * Query param
173
+ */
174
+ path: string;
175
+
176
+ /**
177
+ * Header param
178
+ */
179
+ 'X-Device-Display-ID'?: number;
180
+ }
181
+
182
+ export interface FileDownloadParams {
183
+ /**
184
+ * Query param
185
+ */
186
+ path: string;
187
+
188
+ /**
189
+ * Header param
190
+ */
191
+ 'X-Device-Display-ID'?: number;
192
+ }
193
+
194
+ export interface FileUploadParams {
195
+ /**
196
+ * Query param
197
+ */
198
+ path: string;
199
+
200
+ /**
201
+ * Body param
202
+ */
203
+ file: Uploadable;
204
+
205
+ /**
206
+ * Header param
207
+ */
208
+ 'X-Device-Display-ID'?: number;
209
+ }
210
+
211
+ export declare namespace Files {
212
+ export {
213
+ type FileInfo as FileInfo,
214
+ type FileListResponse as FileListResponse,
215
+ type FileDownloadResponse as FileDownloadResponse,
216
+ type FileListParams as FileListParams,
217
+ type FileDeleteParams as FileDeleteParams,
218
+ type FileDownloadParams as FileDownloadParams,
219
+ type FileUploadParams as FileUploadParams,
220
+ };
221
+ }