@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
@@ -0,0 +1,201 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { buildHeaders } from '../../internal/headers';
6
+ import { RequestOptions } from '../../internal/request-options';
7
+ import { path } from '../../internal/utils/path';
8
+
9
+ export class Esim extends APIResource {
10
+ /**
11
+ * List eSIM subscriptions
12
+ */
13
+ list(
14
+ deviceID: string,
15
+ params: EsimListParams | null | undefined = {},
16
+ options?: RequestOptions,
17
+ ): APIPromise<EsimListResponse | null> {
18
+ const { 'X-Device-Display-ID': xDeviceDisplayID } = params ?? {};
19
+ return this._client.get(path`/devices/${deviceID}/esim`, {
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
+ * Configure eSIM (download profile and/or enable subscription)
34
+ */
35
+ activate(
36
+ deviceID: string,
37
+ params: EsimActivateParams,
38
+ options?: RequestOptions,
39
+ ): APIPromise<EsimActivateResponse> {
40
+ const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
41
+ return this._client.post(path`/devices/${deviceID}/esim`, {
42
+ body,
43
+ ...options,
44
+ headers: buildHeaders([
45
+ {
46
+ ...(xDeviceDisplayID?.toString() != null ?
47
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
48
+ : undefined),
49
+ },
50
+ options?.headers,
51
+ ]),
52
+ });
53
+ }
54
+
55
+ /**
56
+ * Enable an eSIM subscription
57
+ */
58
+ enable(deviceID: string, params: EsimEnableParams, options?: RequestOptions): APIPromise<void> {
59
+ const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
60
+ return this._client.put(path`/devices/${deviceID}/esim`, {
61
+ body,
62
+ ...options,
63
+ headers: buildHeaders([
64
+ {
65
+ Accept: '*/*',
66
+ ...(xDeviceDisplayID?.toString() != null ?
67
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
68
+ : undefined),
69
+ },
70
+ options?.headers,
71
+ ]),
72
+ });
73
+ }
74
+
75
+ /**
76
+ * Delete eSIM subscription
77
+ */
78
+ remove(deviceID: string, params: EsimRemoveParams, options?: RequestOptions): APIPromise<void> {
79
+ const { subId, 'X-Device-Display-ID': xDeviceDisplayID } = params;
80
+ return this._client.delete(path`/devices/${deviceID}/esim`, {
81
+ query: { subId },
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
+ }
94
+ }
95
+
96
+ export type EsimListResponse = Array<EsimListResponse.EsimListResponseItem>;
97
+
98
+ export namespace EsimListResponse {
99
+ export interface EsimListResponseItem {
100
+ carrier: string;
101
+
102
+ displayName: string;
103
+
104
+ iccid: string;
105
+
106
+ isEmbedded: boolean;
107
+
108
+ slot: number;
109
+
110
+ subId: number;
111
+
112
+ type: string;
113
+
114
+ /**
115
+ * A URL to the JSON Schema for this object.
116
+ */
117
+ $schema?: string;
118
+ }
119
+ }
120
+
121
+ export interface EsimActivateResponse {
122
+ carrier: string;
123
+
124
+ displayName: string;
125
+
126
+ iccid: string;
127
+
128
+ isEmbedded: boolean;
129
+
130
+ slot: number;
131
+
132
+ subId: number;
133
+
134
+ type: string;
135
+
136
+ /**
137
+ * A URL to the JSON Schema for this object.
138
+ */
139
+ $schema?: string;
140
+ }
141
+
142
+ export interface EsimListParams {
143
+ 'X-Device-Display-ID'?: number;
144
+ }
145
+
146
+ export interface EsimActivateParams {
147
+ /**
148
+ * Body param
149
+ */
150
+ enable: boolean;
151
+
152
+ /**
153
+ * Body param
154
+ */
155
+ matchingId: string;
156
+
157
+ /**
158
+ * Body param
159
+ */
160
+ smDpAddr: string;
161
+
162
+ /**
163
+ * Header param
164
+ */
165
+ 'X-Device-Display-ID'?: number;
166
+ }
167
+
168
+ export interface EsimEnableParams {
169
+ /**
170
+ * Body param
171
+ */
172
+ subId: number;
173
+
174
+ /**
175
+ * Header param
176
+ */
177
+ 'X-Device-Display-ID'?: number;
178
+ }
179
+
180
+ export interface EsimRemoveParams {
181
+ /**
182
+ * Query param
183
+ */
184
+ subId: number;
185
+
186
+ /**
187
+ * Header param
188
+ */
189
+ 'X-Device-Display-ID'?: number;
190
+ }
191
+
192
+ export declare namespace Esim {
193
+ export {
194
+ type EsimListResponse as EsimListResponse,
195
+ type EsimActivateResponse as EsimActivateResponse,
196
+ type EsimListParams as EsimListParams,
197
+ type EsimActivateParams as EsimActivateParams,
198
+ type EsimEnableParams as EsimEnableParams,
199
+ type EsimRemoveParams as EsimRemoveParams,
200
+ };
201
+ }
@@ -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
+ }
@@ -1,6 +1,14 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export { Actions, type ActionGlobalParams, type ActionSwipeParams, type ActionTapParams } from './actions';
3
+ export {
4
+ Actions,
5
+ type ActionOverlayVisibleResponse,
6
+ type ActionGlobalParams,
7
+ type ActionOverlayVisibleParams,
8
+ type ActionSetOverlayVisibleParams,
9
+ type ActionSwipeParams,
10
+ type ActionTapParams,
11
+ } from './actions';
4
12
  export {
5
13
  Apps,
6
14
  type AppListResponse,
@@ -17,22 +25,63 @@ export {
17
25
  type DeviceCountResponse,
18
26
  type DeviceCreateParams,
19
27
  type DeviceListParams,
28
+ type DeviceSetNameParams,
20
29
  type DeviceTerminateParams,
21
30
  } from './devices';
31
+ export {
32
+ Esim,
33
+ type EsimListResponse,
34
+ type EsimActivateResponse,
35
+ type EsimListParams,
36
+ type EsimActivateParams,
37
+ type EsimEnableParams,
38
+ type EsimRemoveParams,
39
+ } from './esim';
40
+ export {
41
+ Files,
42
+ type FileInfo,
43
+ type FileListResponse,
44
+ type FileDownloadResponse,
45
+ type FileListParams,
46
+ type FileDeleteParams,
47
+ type FileDownloadParams,
48
+ type FileUploadParams,
49
+ } from './files';
22
50
  export {
23
51
  Keyboard,
24
52
  type KeyboardClearParams,
25
53
  type KeyboardKeyParams,
26
54
  type KeyboardWriteParams,
27
55
  } from './keyboard';
56
+ export {
57
+ Location,
58
+ type LocationGetResponse,
59
+ type LocationGetParams,
60
+ type LocationSetParams,
61
+ } from './location';
28
62
  export { Packages, type PackageListResponse, type PackageListParams } from './packages';
63
+ export { Profile, type ProfileUpdateParams } from './profile';
64
+ export {
65
+ Proxy,
66
+ type ProxyStatusResponse,
67
+ type ProxyConnectParams,
68
+ type ProxyDisconnectParams,
69
+ type ProxyStatusParams,
70
+ } from './proxy';
29
71
  export {
30
72
  State,
73
+ type Rect,
31
74
  type StateScreenshotResponse,
32
- type StateTimeResponse,
33
75
  type StateUiResponse,
34
76
  type StateScreenshotParams,
35
- type StateTimeParams,
36
77
  type StateUiParams,
37
78
  } from './state';
38
79
  export { Tasks, type TaskListResponse, type TaskListParams } from './tasks';
80
+ export {
81
+ Time,
82
+ type TimeTimeResponse,
83
+ type TimeTimezoneResponse,
84
+ type TimeSetTimezoneParams,
85
+ type TimeTimeParams,
86
+ type TimeTimezoneParams,
87
+ } from './time';
@@ -91,12 +91,22 @@ export interface KeyboardWriteParams {
91
91
  /**
92
92
  * Body param
93
93
  */
94
- clear: boolean;
94
+ text: string;
95
95
 
96
96
  /**
97
97
  * Body param
98
98
  */
99
- text: string;
99
+ clear?: boolean;
100
+
101
+ /**
102
+ * Body param
103
+ */
104
+ stealth?: boolean;
105
+
106
+ /**
107
+ * Body param: Words per minute for stealth typing. 0 uses portal default.
108
+ */
109
+ wpm?: number;
100
110
 
101
111
  /**
102
112
  * Header param
@@ -0,0 +1,91 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { buildHeaders } from '../../internal/headers';
6
+ import { RequestOptions } from '../../internal/request-options';
7
+ import { path } from '../../internal/utils/path';
8
+
9
+ export class Location extends APIResource {
10
+ /**
11
+ * Get device location
12
+ */
13
+ get(
14
+ deviceID: string,
15
+ params: LocationGetParams | null | undefined = {},
16
+ options?: RequestOptions,
17
+ ): APIPromise<LocationGetResponse> {
18
+ const { 'X-Device-Display-ID': xDeviceDisplayID } = params ?? {};
19
+ return this._client.get(path`/devices/${deviceID}/location`, {
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
+ * Set device location
34
+ */
35
+ set(deviceID: string, params: LocationSetParams, options?: RequestOptions): APIPromise<void> {
36
+ const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
37
+ return this._client.post(path`/devices/${deviceID}/location`, {
38
+ body,
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
+ export interface LocationGetResponse {
54
+ latitude: number;
55
+
56
+ longitude: number;
57
+
58
+ /**
59
+ * A URL to the JSON Schema for this object.
60
+ */
61
+ $schema?: string;
62
+ }
63
+
64
+ export interface LocationGetParams {
65
+ 'X-Device-Display-ID'?: number;
66
+ }
67
+
68
+ export interface LocationSetParams {
69
+ /**
70
+ * Body param
71
+ */
72
+ latitude: number;
73
+
74
+ /**
75
+ * Body param
76
+ */
77
+ longitude: number;
78
+
79
+ /**
80
+ * Header param
81
+ */
82
+ 'X-Device-Display-ID'?: number;
83
+ }
84
+
85
+ export declare namespace Location {
86
+ export {
87
+ type LocationGetResponse as LocationGetResponse,
88
+ type LocationGetParams as LocationGetParams,
89
+ type LocationSetParams as LocationSetParams,
90
+ };
91
+ }
@@ -34,6 +34,11 @@ export class Packages extends APIResource {
34
34
  export type PackageListResponse = Array<string>;
35
35
 
36
36
  export interface PackageListParams {
37
+ /**
38
+ * Query param
39
+ */
40
+ includeProtectedPackages?: boolean;
41
+
37
42
  /**
38
43
  * Query param
39
44
  */
@@ -0,0 +1,45 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { buildHeaders } from '../../internal/headers';
6
+ import { RequestOptions } from '../../internal/request-options';
7
+ import { path } from '../../internal/utils/path';
8
+
9
+ export class Profile extends APIResource {
10
+ /**
11
+ * Apply a profile to a device
12
+ */
13
+ update(deviceID: string, params: ProfileUpdateParams, options?: RequestOptions): APIPromise<void> {
14
+ const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
15
+ return this._client.put(path`/devices/${deviceID}/profile`, {
16
+ body,
17
+ ...options,
18
+ headers: buildHeaders([
19
+ {
20
+ Accept: '*/*',
21
+ ...(xDeviceDisplayID?.toString() != null ?
22
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
23
+ : undefined),
24
+ },
25
+ options?.headers,
26
+ ]),
27
+ });
28
+ }
29
+ }
30
+
31
+ export interface ProfileUpdateParams {
32
+ /**
33
+ * Body param: ID of the profile to apply
34
+ */
35
+ profileId: string;
36
+
37
+ /**
38
+ * Header param
39
+ */
40
+ 'X-Device-Display-ID'?: number;
41
+ }
42
+
43
+ export declare namespace Profile {
44
+ export { type ProfileUpdateParams as ProfileUpdateParams };
45
+ }