@mobilerun/sdk 2.2.0 → 4.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 (261) hide show
  1. package/CHANGELOG.md +513 -0
  2. package/README.md +46 -2
  3. package/client.d.mts +33 -5
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +33 -5
  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/env.js +2 -2
  13. package/internal/utils/env.js.map +1 -1
  14. package/internal/utils/env.mjs +2 -2
  15. package/internal/utils/env.mjs.map +1 -1
  16. package/internal/utils/query.d.mts +2 -0
  17. package/internal/utils/query.d.mts.map +1 -0
  18. package/internal/utils/query.d.ts +2 -0
  19. package/internal/utils/query.d.ts.map +1 -0
  20. package/internal/utils/query.js +10 -0
  21. package/internal/utils/query.js.map +1 -0
  22. package/internal/utils/query.mjs +6 -0
  23. package/internal/utils/query.mjs.map +1 -0
  24. package/internal/utils.d.mts +1 -0
  25. package/internal/utils.d.ts +1 -0
  26. package/internal/utils.js +1 -0
  27. package/internal/utils.js.map +1 -1
  28. package/internal/utils.mjs +1 -0
  29. package/package.json +7 -1
  30. package/resources/agents.d.mts +30 -0
  31. package/resources/agents.d.mts.map +1 -0
  32. package/resources/agents.d.ts +30 -0
  33. package/resources/agents.d.ts.map +1 -0
  34. package/resources/agents.js +18 -0
  35. package/resources/agents.js.map +1 -0
  36. package/resources/agents.mjs +14 -0
  37. package/resources/agents.mjs.map +1 -0
  38. package/resources/apps.d.mts +10 -12
  39. package/resources/apps.d.mts.map +1 -1
  40. package/resources/apps.d.ts +10 -12
  41. package/resources/apps.d.ts.map +1 -1
  42. package/resources/apps.js.map +1 -1
  43. package/resources/apps.mjs.map +1 -1
  44. package/resources/carriers.d.mts +233 -0
  45. package/resources/carriers.d.mts.map +1 -0
  46. package/resources/carriers.d.ts +233 -0
  47. package/resources/carriers.d.ts.map +1 -0
  48. package/resources/carriers.js +46 -0
  49. package/resources/carriers.js.map +1 -0
  50. package/resources/carriers.mjs +42 -0
  51. package/resources/carriers.mjs.map +1 -0
  52. package/resources/credentials/credentials.d.mts +4 -13
  53. package/resources/credentials/credentials.d.mts.map +1 -1
  54. package/resources/credentials/credentials.d.ts +4 -13
  55. package/resources/credentials/credentials.d.ts.map +1 -1
  56. package/resources/credentials/credentials.js.map +1 -1
  57. package/resources/credentials/credentials.mjs.map +1 -1
  58. package/resources/devices/actions.d.mts +37 -1
  59. package/resources/devices/actions.d.mts.map +1 -1
  60. package/resources/devices/actions.d.ts +37 -1
  61. package/resources/devices/actions.d.ts.map +1 -1
  62. package/resources/devices/actions.js +36 -0
  63. package/resources/devices/actions.js.map +1 -1
  64. package/resources/devices/actions.mjs +36 -0
  65. package/resources/devices/actions.mjs.map +1 -1
  66. package/resources/devices/apps.d.mts +4 -0
  67. package/resources/devices/apps.d.mts.map +1 -1
  68. package/resources/devices/apps.d.ts +4 -0
  69. package/resources/devices/apps.d.ts.map +1 -1
  70. package/resources/devices/devices.d.mts +63 -35
  71. package/resources/devices/devices.d.mts.map +1 -1
  72. package/resources/devices/devices.d.ts +63 -35
  73. package/resources/devices/devices.d.ts.map +1 -1
  74. package/resources/devices/devices.js +32 -2
  75. package/resources/devices/devices.js.map +1 -1
  76. package/resources/devices/devices.mjs +33 -3
  77. package/resources/devices/devices.mjs.map +1 -1
  78. package/resources/devices/esim.d.mts +95 -0
  79. package/resources/devices/esim.d.mts.map +1 -0
  80. package/resources/devices/esim.d.ts +95 -0
  81. package/resources/devices/esim.d.ts.map +1 -0
  82. package/resources/devices/esim.js +84 -0
  83. package/resources/devices/esim.js.map +1 -0
  84. package/resources/devices/esim.mjs +80 -0
  85. package/resources/devices/esim.mjs.map +1 -0
  86. package/resources/devices/files.d.mts +108 -0
  87. package/resources/devices/files.d.mts.map +1 -0
  88. package/resources/devices/files.d.ts +108 -0
  89. package/resources/devices/files.d.ts.map +1 -0
  90. package/resources/devices/files.js +87 -0
  91. package/resources/devices/files.js.map +1 -0
  92. package/resources/devices/files.mjs +83 -0
  93. package/resources/devices/files.mjs.map +1 -0
  94. package/resources/devices/index.d.mts +9 -3
  95. package/resources/devices/index.d.mts.map +1 -1
  96. package/resources/devices/index.d.ts +9 -3
  97. package/resources/devices/index.d.ts.map +1 -1
  98. package/resources/devices/index.js +13 -1
  99. package/resources/devices/index.js.map +1 -1
  100. package/resources/devices/index.mjs +7 -1
  101. package/resources/devices/index.mjs.map +1 -1
  102. package/resources/devices/keyboard.d.mts +10 -2
  103. package/resources/devices/keyboard.d.mts.map +1 -1
  104. package/resources/devices/keyboard.d.ts +10 -2
  105. package/resources/devices/keyboard.d.ts.map +1 -1
  106. package/resources/devices/location.d.mts +42 -0
  107. package/resources/devices/location.d.mts.map +1 -0
  108. package/resources/devices/location.d.ts +42 -0
  109. package/resources/devices/location.d.ts.map +1 -0
  110. package/resources/devices/location.js +47 -0
  111. package/resources/devices/location.js.map +1 -0
  112. package/resources/devices/location.mjs +43 -0
  113. package/resources/devices/location.mjs.map +1 -0
  114. package/resources/devices/packages.d.mts +4 -0
  115. package/resources/devices/packages.d.mts.map +1 -1
  116. package/resources/devices/packages.d.ts +4 -0
  117. package/resources/devices/packages.d.ts.map +1 -1
  118. package/resources/devices/profile.d.mts +23 -0
  119. package/resources/devices/profile.d.mts.map +1 -0
  120. package/resources/devices/profile.d.ts +23 -0
  121. package/resources/devices/profile.d.ts.map +1 -0
  122. package/resources/devices/profile.js +30 -0
  123. package/resources/devices/profile.js.map +1 -0
  124. package/resources/devices/profile.mjs +26 -0
  125. package/resources/devices/profile.mjs.map +1 -0
  126. package/resources/devices/proxy.d.mts +92 -0
  127. package/resources/devices/proxy.d.mts.map +1 -0
  128. package/resources/devices/proxy.d.ts +92 -0
  129. package/resources/devices/proxy.d.ts.map +1 -0
  130. package/resources/devices/proxy.js +65 -0
  131. package/resources/devices/proxy.js.map +1 -0
  132. package/resources/devices/proxy.mjs +61 -0
  133. package/resources/devices/proxy.mjs.map +1 -0
  134. package/resources/devices/state.d.mts +8 -19
  135. package/resources/devices/state.d.mts.map +1 -1
  136. package/resources/devices/state.d.ts +8 -19
  137. package/resources/devices/state.d.ts.map +1 -1
  138. package/resources/devices/state.js +0 -17
  139. package/resources/devices/state.js.map +1 -1
  140. package/resources/devices/state.mjs +0 -17
  141. package/resources/devices/state.mjs.map +1 -1
  142. package/resources/devices/tasks.d.mts +2 -9
  143. package/resources/devices/tasks.d.mts.map +1 -1
  144. package/resources/devices/tasks.d.ts +2 -9
  145. package/resources/devices/tasks.d.ts.map +1 -1
  146. package/resources/devices/tasks.js.map +1 -1
  147. package/resources/devices/tasks.mjs.map +1 -1
  148. package/resources/devices/time.d.mts +45 -0
  149. package/resources/devices/time.d.mts.map +1 -0
  150. package/resources/devices/time.d.ts +45 -0
  151. package/resources/devices/time.d.ts.map +1 -0
  152. package/resources/devices/time.js +64 -0
  153. package/resources/devices/time.js.map +1 -0
  154. package/resources/devices/time.mjs +60 -0
  155. package/resources/devices/time.mjs.map +1 -0
  156. package/resources/hooks.d.mts +5 -30
  157. package/resources/hooks.d.mts.map +1 -1
  158. package/resources/hooks.d.ts +5 -30
  159. package/resources/hooks.d.ts.map +1 -1
  160. package/resources/hooks.js +3 -0
  161. package/resources/hooks.js.map +1 -1
  162. package/resources/hooks.mjs +3 -0
  163. package/resources/hooks.mjs.map +1 -1
  164. package/resources/index.d.mts +7 -2
  165. package/resources/index.d.mts.map +1 -1
  166. package/resources/index.d.ts +7 -2
  167. package/resources/index.d.ts.map +1 -1
  168. package/resources/index.js +11 -1
  169. package/resources/index.js.map +1 -1
  170. package/resources/index.mjs +5 -0
  171. package/resources/index.mjs.map +1 -1
  172. package/resources/profiles.d.mts +84 -0
  173. package/resources/profiles.d.mts.map +1 -0
  174. package/resources/profiles.d.ts +84 -0
  175. package/resources/profiles.d.ts.map +1 -0
  176. package/resources/profiles.js +40 -0
  177. package/resources/profiles.js.map +1 -0
  178. package/resources/profiles.mjs +36 -0
  179. package/resources/profiles.mjs.map +1 -0
  180. package/resources/proxies.d.mts +103 -0
  181. package/resources/proxies.d.mts.map +1 -0
  182. package/resources/proxies.d.ts +103 -0
  183. package/resources/proxies.d.ts.map +1 -0
  184. package/resources/proxies.js +40 -0
  185. package/resources/proxies.js.map +1 -0
  186. package/resources/proxies.mjs +36 -0
  187. package/resources/proxies.mjs.map +1 -0
  188. package/resources/shared.d.mts +104 -0
  189. package/resources/shared.d.mts.map +1 -0
  190. package/resources/shared.d.ts +104 -0
  191. package/resources/shared.d.ts.map +1 -0
  192. package/resources/shared.js +4 -0
  193. package/resources/shared.js.map +1 -0
  194. package/resources/shared.mjs +3 -0
  195. package/resources/shared.mjs.map +1 -0
  196. package/resources/tasks/index.d.mts +1 -1
  197. package/resources/tasks/index.d.mts.map +1 -1
  198. package/resources/tasks/index.d.ts +1 -1
  199. package/resources/tasks/index.d.ts.map +1 -1
  200. package/resources/tasks/index.js.map +1 -1
  201. package/resources/tasks/index.mjs.map +1 -1
  202. package/resources/tasks/screenshots.d.mts +3 -0
  203. package/resources/tasks/screenshots.d.mts.map +1 -1
  204. package/resources/tasks/screenshots.d.ts +3 -0
  205. package/resources/tasks/screenshots.d.ts.map +1 -1
  206. package/resources/tasks/screenshots.js +3 -0
  207. package/resources/tasks/screenshots.js.map +1 -1
  208. package/resources/tasks/screenshots.mjs +3 -0
  209. package/resources/tasks/screenshots.mjs.map +1 -1
  210. package/resources/tasks/tasks.d.mts +141 -60
  211. package/resources/tasks/tasks.d.mts.map +1 -1
  212. package/resources/tasks/tasks.d.ts +141 -60
  213. package/resources/tasks/tasks.d.ts.map +1 -1
  214. package/resources/tasks/tasks.js +11 -5
  215. package/resources/tasks/tasks.js.map +1 -1
  216. package/resources/tasks/tasks.mjs +11 -5
  217. package/resources/tasks/tasks.mjs.map +1 -1
  218. package/resources/tasks/ui-states.d.mts +3 -0
  219. package/resources/tasks/ui-states.d.mts.map +1 -1
  220. package/resources/tasks/ui-states.d.ts +3 -0
  221. package/resources/tasks/ui-states.d.ts.map +1 -1
  222. package/resources/tasks/ui-states.js +3 -0
  223. package/resources/tasks/ui-states.js.map +1 -1
  224. package/resources/tasks/ui-states.mjs +3 -0
  225. package/resources/tasks/ui-states.mjs.map +1 -1
  226. package/src/client.ts +112 -10
  227. package/src/internal/utils/env.ts +2 -2
  228. package/src/internal/utils/query.ts +7 -0
  229. package/src/internal/utils.ts +1 -0
  230. package/src/resources/agents.ts +45 -0
  231. package/src/resources/apps.ts +11 -19
  232. package/src/resources/carriers.ts +327 -0
  233. package/src/resources/credentials/credentials.ts +4 -19
  234. package/src/resources/devices/actions.ts +84 -0
  235. package/src/resources/devices/apps.ts +5 -0
  236. package/src/resources/devices/devices.ts +171 -50
  237. package/src/resources/devices/esim.ts +201 -0
  238. package/src/resources/devices/files.ts +221 -0
  239. package/src/resources/devices/index.ts +52 -3
  240. package/src/resources/devices/keyboard.ts +12 -2
  241. package/src/resources/devices/location.ts +91 -0
  242. package/src/resources/devices/packages.ts +5 -0
  243. package/src/resources/devices/profile.ts +45 -0
  244. package/src/resources/devices/proxy.ts +173 -0
  245. package/src/resources/devices/state.ts +10 -44
  246. package/src/resources/devices/tasks.ts +2 -15
  247. package/src/resources/devices/time.ts +114 -0
  248. package/src/resources/hooks.ts +5 -36
  249. package/src/resources/index.ts +37 -0
  250. package/src/resources/profiles.ts +133 -0
  251. package/src/resources/proxies.ts +182 -0
  252. package/src/resources/shared.ts +161 -0
  253. package/src/resources/tasks/index.ts +3 -0
  254. package/src/resources/tasks/screenshots.ts +3 -0
  255. package/src/resources/tasks/tasks.ts +191 -68
  256. package/src/resources/tasks/ui-states.ts +3 -0
  257. package/src/version.ts +1 -1
  258. package/version.d.mts +1 -1
  259. package/version.d.ts +1 -1
  260. package/version.js +1 -1
  261. 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,41 +22,88 @@ import {
13
22
  AppUpdateParams,
14
23
  Apps,
15
24
  } from './apps';
25
+ import * as EsimAPI from './esim';
26
+ import {
27
+ Esim,
28
+ EsimActivateParams,
29
+ EsimActivateResponse,
30
+ EsimEnableParams,
31
+ EsimListParams,
32
+ EsimListResponse,
33
+ EsimRemoveParams,
34
+ } from './esim';
35
+ import * as FilesAPI from './files';
36
+ import {
37
+ FileDeleteParams,
38
+ FileDownloadParams,
39
+ FileDownloadResponse,
40
+ FileInfo,
41
+ FileListParams,
42
+ FileListResponse,
43
+ FileUploadParams,
44
+ Files,
45
+ } from './files';
16
46
  import * as KeyboardAPI from './keyboard';
17
47
  import { Keyboard, KeyboardClearParams, KeyboardKeyParams, KeyboardWriteParams } from './keyboard';
48
+ import * as LocationAPI from './location';
49
+ import { Location, LocationGetParams, LocationGetResponse, LocationSetParams } from './location';
18
50
  import * as PackagesAPI from './packages';
19
51
  import { PackageListParams, PackageListResponse, Packages } from './packages';
52
+ import * as ProfileAPI from './profile';
53
+ import { Profile, ProfileUpdateParams } from './profile';
54
+ import * as ProxyAPI from './proxy';
55
+ import {
56
+ Proxy as ProxyAPIProxy,
57
+ ProxyConnectParams,
58
+ ProxyDisconnectParams,
59
+ ProxyStatusParams,
60
+ ProxyStatusResponse,
61
+ } from './proxy';
20
62
  import * as StateAPI from './state';
21
63
  import {
64
+ Rect,
22
65
  State,
23
66
  StateScreenshotParams,
24
67
  StateScreenshotResponse,
25
- StateTimeParams,
26
- StateTimeResponse,
27
68
  StateUiParams,
28
69
  StateUiResponse,
29
70
  } from './state';
30
71
  import * as TasksAPI from './tasks';
31
72
  import { TaskListParams, TaskListResponse, Tasks } from './tasks';
73
+ import * as TimeAPI from './time';
74
+ import {
75
+ Time,
76
+ TimeSetTimezoneParams,
77
+ TimeTimeParams,
78
+ TimeTimeResponse,
79
+ TimeTimezoneParams,
80
+ TimeTimezoneResponse,
81
+ } from './time';
32
82
  import { APIPromise } from '../../core/api-promise';
33
83
  import { buildHeaders } from '../../internal/headers';
34
84
  import { RequestOptions } from '../../internal/request-options';
35
85
  import { path } from '../../internal/utils/path';
36
86
 
37
87
  export class Devices extends APIResource {
88
+ time: TimeAPI.Time = new TimeAPI.Time(this._client);
89
+ profile: ProfileAPI.Profile = new ProfileAPI.Profile(this._client);
90
+ files: FilesAPI.Files = new FilesAPI.Files(this._client);
91
+ proxy: ProxyAPI.Proxy = new ProxyAPI.Proxy(this._client);
92
+ location: LocationAPI.Location = new LocationAPI.Location(this._client);
38
93
  actions: ActionsAPI.Actions = new ActionsAPI.Actions(this._client);
39
94
  state: StateAPI.State = new StateAPI.State(this._client);
40
95
  apps: AppsAPI.Apps = new AppsAPI.Apps(this._client);
41
96
  packages: PackagesAPI.Packages = new PackagesAPI.Packages(this._client);
42
97
  keyboard: KeyboardAPI.Keyboard = new KeyboardAPI.Keyboard(this._client);
43
98
  tasks: TasksAPI.Tasks = new TasksAPI.Tasks(this._client);
99
+ esim: EsimAPI.Esim = new EsimAPI.Esim(this._client);
44
100
 
45
101
  /**
46
102
  * Provision a new device
47
103
  */
48
104
  create(params: DeviceCreateParams, options?: RequestOptions): APIPromise<Device> {
49
- const { deviceType, provider, ...body } = params;
50
- return this._client.post('/devices', { query: { deviceType, provider }, body, ...options });
105
+ const { deviceType, ...body } = params;
106
+ return this._client.post('/devices', { query: { deviceType }, body, ...options });
51
107
  }
52
108
 
53
109
  /**
@@ -74,6 +130,13 @@ export class Devices extends APIResource {
74
130
  return this._client.get('/devices/count', options);
75
131
  }
76
132
 
133
+ /**
134
+ * Update device name
135
+ */
136
+ setName(deviceID: string, body: DeviceSetNameParams, options?: RequestOptions): APIPromise<Device> {
137
+ return this._client.put(path`/devices/${deviceID}/name`, { body, ...options });
138
+ }
139
+
77
140
  /**
78
141
  * Terminate a device
79
142
  */
@@ -96,34 +159,26 @@ export class Devices extends APIResource {
96
159
  export interface Device {
97
160
  id: string;
98
161
 
99
- apps: Array<string> | null;
162
+ activeTaskId: string;
100
163
 
101
164
  assignedAt: string | null;
102
165
 
103
- country: string;
104
-
105
166
  createdAt: string;
106
167
 
107
- deviceType: string;
108
-
109
- files: Array<string> | null;
110
-
111
168
  name: string;
112
169
 
113
- provider: string;
114
-
115
170
  state: string;
116
171
 
117
172
  stateMessage: string;
118
173
 
119
- streamToken: string;
120
-
121
174
  streamUrl: string;
122
175
 
123
176
  taskCount: number;
124
177
 
125
178
  terminatesAt: string | null;
126
179
 
180
+ type: string;
181
+
127
182
  updatedAt: string;
128
183
 
129
184
  /**
@@ -131,13 +186,17 @@ export interface Device {
131
186
  */
132
187
  $schema?: string;
133
188
 
189
+ providerId?: string;
190
+
191
+ streamToken?: string;
192
+
134
193
  userId?: string;
135
194
  }
136
195
 
137
196
  export interface DeviceListResponse {
138
197
  items: Array<Device> | null;
139
198
 
140
- pagination: DeviceListResponse.Pagination;
199
+ pagination: Shared.Meta;
141
200
 
142
201
  /**
143
202
  * A URL to the JSON Schema for this object.
@@ -145,22 +204,6 @@ export interface DeviceListResponse {
145
204
  $schema?: string;
146
205
  }
147
206
 
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
207
  export type DeviceCountResponse = { [key: string]: number };
165
208
 
166
209
  export interface DeviceCreateParams {
@@ -168,30 +211,30 @@ export interface DeviceCreateParams {
168
211
  * Query param
169
212
  */
170
213
  deviceType?:
171
- | 'device_slot'
172
- | 'dedicated_emulated_device'
173
214
  | 'dedicated_physical_device'
174
- | 'dedicated_premium_device';
215
+ | 'dedicated_premium_device'
216
+ | 'dedicated_emulated_device'
217
+ | 'dedicated_ios_device';
175
218
 
176
219
  /**
177
- * Query param
220
+ * Body param
178
221
  */
179
- provider?: 'limrun' | 'physical' | 'premium' | 'roidrun';
222
+ apps?: Array<string> | null;
180
223
 
181
224
  /**
182
225
  * Body param
183
226
  */
184
- apps?: Array<string> | null;
227
+ carrier?: Shared.DeviceCarrier;
185
228
 
186
229
  /**
187
230
  * Body param
188
231
  */
189
- country?: string;
232
+ files?: Array<string> | null;
190
233
 
191
234
  /**
192
235
  * Body param
193
236
  */
194
- files?: Array<string> | null;
237
+ identifiers?: Shared.DeviceIdentifiers;
195
238
 
196
239
  /**
197
240
  * Body param
@@ -206,13 +249,25 @@ export interface DeviceCreateParams {
206
249
 
207
250
  export namespace DeviceCreateParams {
208
251
  export interface Proxy {
209
- host: string;
252
+ name?: string;
210
253
 
211
- password: string;
254
+ smartIp?: boolean;
212
255
 
213
- port: number;
256
+ socks5?: Proxy.Socks5;
214
257
 
215
- user: string;
258
+ wireguard?: string;
259
+ }
260
+
261
+ export namespace Proxy {
262
+ export interface Socks5 {
263
+ host: string;
264
+
265
+ password: string;
266
+
267
+ port: number;
268
+
269
+ user: string;
270
+ }
216
271
  }
217
272
  }
218
273
 
@@ -229,11 +284,21 @@ export interface DeviceListParams {
229
284
 
230
285
  pageSize?: number;
231
286
 
232
- provider?: 'limrun' | 'personal' | 'remote' | 'roidrun';
287
+ providerId?: string;
233
288
 
234
- state?: Array<'creating' | 'assigned' | 'ready' | 'disconnected' | 'terminated' | 'unknown'> | null;
289
+ state?: Array<
290
+ 'creating' | 'assigned' | 'ready' | 'rebooting' | 'migrating' | 'terminated' | 'maintenance' | 'unknown'
291
+ > | null;
235
292
 
236
- type?: 'device_slot' | 'dedicated_emulated_device' | 'dedicated_physical_device';
293
+ type?:
294
+ | 'dedicated_physical_device'
295
+ | 'dedicated_premium_device'
296
+ | 'dedicated_emulated_device'
297
+ | 'dedicated_ios_device';
298
+ }
299
+
300
+ export interface DeviceSetNameParams {
301
+ name: string;
237
302
  }
238
303
 
239
304
  export interface DeviceTerminateParams {
@@ -242,12 +307,18 @@ export interface DeviceTerminateParams {
242
307
  terminateAt?: string;
243
308
  }
244
309
 
310
+ Devices.Time = Time;
311
+ Devices.Profile = Profile;
312
+ Devices.Files = Files;
313
+ Devices.Proxy = ProxyAPIProxy;
314
+ Devices.Location = Location;
245
315
  Devices.Actions = Actions;
246
316
  Devices.State = State;
247
317
  Devices.Apps = Apps;
248
318
  Devices.Packages = Packages;
249
319
  Devices.Keyboard = Keyboard;
250
320
  Devices.Tasks = Tasks;
321
+ Devices.Esim = Esim;
251
322
 
252
323
  export declare namespace Devices {
253
324
  export {
@@ -256,23 +327,63 @@ export declare namespace Devices {
256
327
  type DeviceCountResponse as DeviceCountResponse,
257
328
  type DeviceCreateParams as DeviceCreateParams,
258
329
  type DeviceListParams as DeviceListParams,
330
+ type DeviceSetNameParams as DeviceSetNameParams,
259
331
  type DeviceTerminateParams as DeviceTerminateParams,
260
332
  };
261
333
 
334
+ export {
335
+ Time as Time,
336
+ type TimeTimeResponse as TimeTimeResponse,
337
+ type TimeTimezoneResponse as TimeTimezoneResponse,
338
+ type TimeSetTimezoneParams as TimeSetTimezoneParams,
339
+ type TimeTimeParams as TimeTimeParams,
340
+ type TimeTimezoneParams as TimeTimezoneParams,
341
+ };
342
+
343
+ export { Profile as Profile, type ProfileUpdateParams as ProfileUpdateParams };
344
+
345
+ export {
346
+ Files as Files,
347
+ type FileInfo as FileInfo,
348
+ type FileListResponse as FileListResponse,
349
+ type FileDownloadResponse as FileDownloadResponse,
350
+ type FileListParams as FileListParams,
351
+ type FileDeleteParams as FileDeleteParams,
352
+ type FileDownloadParams as FileDownloadParams,
353
+ type FileUploadParams as FileUploadParams,
354
+ };
355
+
356
+ export {
357
+ ProxyAPIProxy as Proxy,
358
+ type ProxyStatusResponse as ProxyStatusResponse,
359
+ type ProxyConnectParams as ProxyConnectParams,
360
+ type ProxyDisconnectParams as ProxyDisconnectParams,
361
+ type ProxyStatusParams as ProxyStatusParams,
362
+ };
363
+
364
+ export {
365
+ Location as Location,
366
+ type LocationGetResponse as LocationGetResponse,
367
+ type LocationGetParams as LocationGetParams,
368
+ type LocationSetParams as LocationSetParams,
369
+ };
370
+
262
371
  export {
263
372
  Actions as Actions,
373
+ type ActionOverlayVisibleResponse as ActionOverlayVisibleResponse,
264
374
  type ActionGlobalParams as ActionGlobalParams,
375
+ type ActionOverlayVisibleParams as ActionOverlayVisibleParams,
376
+ type ActionSetOverlayVisibleParams as ActionSetOverlayVisibleParams,
265
377
  type ActionSwipeParams as ActionSwipeParams,
266
378
  type ActionTapParams as ActionTapParams,
267
379
  };
268
380
 
269
381
  export {
270
382
  State as State,
383
+ type Rect as Rect,
271
384
  type StateScreenshotResponse as StateScreenshotResponse,
272
- type StateTimeResponse as StateTimeResponse,
273
385
  type StateUiResponse as StateUiResponse,
274
386
  type StateScreenshotParams as StateScreenshotParams,
275
- type StateTimeParams as StateTimeParams,
276
387
  type StateUiParams as StateUiParams,
277
388
  };
278
389
 
@@ -300,4 +411,14 @@ export declare namespace Devices {
300
411
  };
301
412
 
302
413
  export { Tasks as Tasks, type TaskListResponse as TaskListResponse, type TaskListParams as TaskListParams };
414
+
415
+ export {
416
+ Esim as Esim,
417
+ type EsimListResponse as EsimListResponse,
418
+ type EsimActivateResponse as EsimActivateResponse,
419
+ type EsimListParams as EsimListParams,
420
+ type EsimActivateParams as EsimActivateParams,
421
+ type EsimEnableParams as EsimEnableParams,
422
+ type EsimRemoveParams as EsimRemoveParams,
423
+ };
303
424
  }