@mobilerun/sdk 2.2.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 +243 -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 +89 -59
  199. package/resources/tasks/tasks.d.mts.map +1 -1
  200. package/resources/tasks/tasks.d.ts +89 -59
  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 +109 -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 +35 -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 +3 -0
  240. package/src/resources/tasks/screenshots.ts +3 -0
  241. package/src/resources/tasks/tasks.ts +112 -67
  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,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,
@@ -19,20 +27,46 @@ export {
19
27
  type DeviceListParams,
20
28
  type DeviceTerminateParams,
21
29
  } from './devices';
30
+ export {
31
+ Files,
32
+ type FileInfo,
33
+ type FileListResponse,
34
+ type FileDownloadResponse,
35
+ type FileListParams,
36
+ type FileDeleteParams,
37
+ type FileDownloadParams,
38
+ type FileUploadParams,
39
+ } from './files';
22
40
  export {
23
41
  Keyboard,
24
42
  type KeyboardClearParams,
25
43
  type KeyboardKeyParams,
26
44
  type KeyboardWriteParams,
27
45
  } from './keyboard';
46
+ export {
47
+ Location,
48
+ type LocationGetResponse,
49
+ type LocationGetParams,
50
+ type LocationSetParams,
51
+ } from './location';
28
52
  export { Packages, type PackageListResponse, type PackageListParams } from './packages';
53
+ export { Profile, type ProfileUpdateParams } from './profile';
54
+ export { Proxy, type ProxyConnectParams, type ProxyDisconnectParams } from './proxy';
29
55
  export {
30
56
  State,
57
+ type Rect,
31
58
  type StateScreenshotResponse,
32
- type StateTimeResponse,
33
59
  type StateUiResponse,
34
60
  type StateScreenshotParams,
35
- type StateTimeParams,
36
61
  type StateUiParams,
37
62
  } from './state';
38
63
  export { Tasks, type TaskListResponse, type TaskListParams } from './tasks';
64
+ export {
65
+ Time,
66
+ type TimeTimeResponse,
67
+ type TimeTimezoneResponse,
68
+ type TimeSetTimeParams,
69
+ type TimeSetTimezoneParams,
70
+ type TimeTimeParams,
71
+ type TimeTimezoneParams,
72
+ } 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
+ }
@@ -0,0 +1,115 @@
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 Proxy extends APIResource {
10
+ /**
11
+ * Connect proxy
12
+ */
13
+ connect(deviceID: string, params: ProxyConnectParams, options?: RequestOptions): APIPromise<void> {
14
+ const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
15
+ return this._client.post(path`/devices/${deviceID}/proxy`, {
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
+ * Disconnect proxy
32
+ */
33
+ disconnect(
34
+ deviceID: string,
35
+ params: ProxyDisconnectParams | null | undefined = {},
36
+ options?: RequestOptions,
37
+ ): APIPromise<void> {
38
+ const { 'X-Device-Display-ID': xDeviceDisplayID } = params ?? {};
39
+ return this._client.delete(path`/devices/${deviceID}/proxy`, {
40
+ ...options,
41
+ headers: buildHeaders([
42
+ {
43
+ Accept: '*/*',
44
+ ...(xDeviceDisplayID?.toString() != null ?
45
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
46
+ : undefined),
47
+ },
48
+ options?.headers,
49
+ ]),
50
+ });
51
+ }
52
+ }
53
+
54
+ export interface ProxyConnectParams {
55
+ /**
56
+ * @deprecated Body param
57
+ */
58
+ host?: string;
59
+
60
+ /**
61
+ * @deprecated Body param
62
+ */
63
+ password?: string;
64
+
65
+ /**
66
+ * @deprecated Body param
67
+ */
68
+ port?: number;
69
+
70
+ /**
71
+ * Body param: Preferred new format.
72
+ */
73
+ proxy?: ProxyConnectParams.Proxy;
74
+
75
+ /**
76
+ * Body param
77
+ */
78
+ smartIp?: boolean;
79
+
80
+ /**
81
+ * @deprecated Body param
82
+ */
83
+ user?: string;
84
+
85
+ /**
86
+ * Header param
87
+ */
88
+ 'X-Device-Display-ID'?: number;
89
+ }
90
+
91
+ export namespace ProxyConnectParams {
92
+ /**
93
+ * Preferred new format.
94
+ */
95
+ export interface Proxy {
96
+ host: string;
97
+
98
+ password: string;
99
+
100
+ port: number;
101
+
102
+ user: string;
103
+ }
104
+ }
105
+
106
+ export interface ProxyDisconnectParams {
107
+ 'X-Device-Display-ID'?: number;
108
+ }
109
+
110
+ export declare namespace Proxy {
111
+ export {
112
+ type ProxyConnectParams as ProxyConnectParams,
113
+ type ProxyDisconnectParams as ProxyDisconnectParams,
114
+ };
115
+ }
@@ -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 StateAPI from './state';
4
5
  import { APIPromise } from '../../core/api-promise';
5
6
  import { buildHeaders } from '../../internal/headers';
6
7
  import { RequestOptions } from '../../internal/request-options';
@@ -30,28 +31,6 @@ export class State extends APIResource {
30
31
  });
31
32
  }
32
33
 
33
- /**
34
- * Device time
35
- */
36
- time(
37
- deviceID: string,
38
- params: StateTimeParams | null | undefined = {},
39
- options?: RequestOptions,
40
- ): APIPromise<string> {
41
- const { 'X-Device-Display-ID': xDeviceDisplayID } = params ?? {};
42
- return this._client.get(path`/devices/${deviceID}/time`, {
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
34
  /**
56
35
  * UI state
57
36
  */
@@ -76,9 +55,13 @@ export class State extends APIResource {
76
55
  }
77
56
  }
78
57
 
79
- export type StateScreenshotResponse = string;
58
+ export interface Rect {
59
+ height: number;
60
+
61
+ width: number;
62
+ }
80
63
 
81
- export type StateTimeResponse = string;
64
+ export type StateScreenshotResponse = string;
82
65
 
83
66
  export interface StateUiResponse {
84
67
  a11y_tree: unknown;
@@ -99,9 +82,9 @@ export namespace StateUiResponse {
99
82
 
100
83
  filtering_params: DeviceContext.FilteringParams;
101
84
 
102
- screen_bounds: DeviceContext.ScreenBounds;
85
+ screen_bounds: StateAPI.Rect;
103
86
 
104
- screenSize: DeviceContext.ScreenSize;
87
+ screenSize: StateAPI.Rect;
105
88
  }
106
89
 
107
90
  export namespace DeviceContext {
@@ -122,18 +105,6 @@ export namespace StateUiResponse {
122
105
 
123
106
  overlay_offset: number;
124
107
  }
125
-
126
- export interface ScreenBounds {
127
- height: number;
128
-
129
- width: number;
130
- }
131
-
132
- export interface ScreenSize {
133
- height: number;
134
-
135
- width: number;
136
- }
137
108
  }
138
109
 
139
110
  export interface PhoneState {
@@ -173,10 +144,6 @@ export interface StateScreenshotParams {
173
144
  'X-Device-Display-ID'?: number;
174
145
  }
175
146
 
176
- export interface StateTimeParams {
177
- 'X-Device-Display-ID'?: number;
178
- }
179
-
180
147
  export interface StateUiParams {
181
148
  /**
182
149
  * Query param
@@ -191,11 +158,10 @@ export interface StateUiParams {
191
158
 
192
159
  export declare namespace State {
193
160
  export {
161
+ type Rect as Rect,
194
162
  type StateScreenshotResponse as StateScreenshotResponse,
195
- type StateTimeResponse as StateTimeResponse,
196
163
  type StateUiResponse as StateUiResponse,
197
164
  type StateScreenshotParams as StateScreenshotParams,
198
- type StateTimeParams as StateTimeParams,
199
165
  type StateUiParams as StateUiParams,
200
166
  };
201
167
  }
@@ -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 { APIPromise } from '../../core/api-promise';
5
6
  import { RequestOptions } from '../../internal/request-options';
6
7
  import { path } from '../../internal/utils/path';
@@ -21,7 +22,7 @@ export class Tasks extends APIResource {
21
22
  export interface TaskListResponse {
22
23
  items: Array<TaskListResponse.Item> | null;
23
24
 
24
- pagination: TaskListResponse.Pagination;
25
+ pagination: Shared.Meta;
25
26
 
26
27
  /**
27
28
  * A URL to the JSON Schema for this object.
@@ -37,20 +38,6 @@ export namespace TaskListResponse {
37
38
 
38
39
  updatedAt: string;
39
40
  }
40
-
41
- export interface Pagination {
42
- hasNext: boolean;
43
-
44
- hasPrev: boolean;
45
-
46
- page: number;
47
-
48
- pages: number;
49
-
50
- pageSize: number;
51
-
52
- total: number;
53
- }
54
41
  }
55
42
 
56
43
  export interface TaskListParams {
@@ -0,0 +1,147 @@
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 Time extends APIResource {
10
+ /**
11
+ * Set device time
12
+ */
13
+ setTime(deviceID: string, params: TimeSetTimeParams, options?: RequestOptions): APIPromise<void> {
14
+ const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
15
+ return this._client.post(path`/devices/${deviceID}/time`, {
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
+ * Set device timezone
32
+ */
33
+ setTimezone(deviceID: string, params: TimeSetTimezoneParams, options?: RequestOptions): APIPromise<void> {
34
+ const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
35
+ return this._client.post(path`/devices/${deviceID}/timezone`, {
36
+ body,
37
+ ...options,
38
+ headers: buildHeaders([
39
+ {
40
+ Accept: '*/*',
41
+ ...(xDeviceDisplayID?.toString() != null ?
42
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
43
+ : undefined),
44
+ },
45
+ options?.headers,
46
+ ]),
47
+ });
48
+ }
49
+
50
+ /**
51
+ * Device time
52
+ */
53
+ time(
54
+ deviceID: string,
55
+ params: TimeTimeParams | null | undefined = {},
56
+ options?: RequestOptions,
57
+ ): APIPromise<string> {
58
+ const { 'X-Device-Display-ID': xDeviceDisplayID } = params ?? {};
59
+ return this._client.get(path`/devices/${deviceID}/time`, {
60
+ ...options,
61
+ headers: buildHeaders([
62
+ {
63
+ ...(xDeviceDisplayID?.toString() != null ?
64
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
65
+ : undefined),
66
+ },
67
+ options?.headers,
68
+ ]),
69
+ });
70
+ }
71
+
72
+ /**
73
+ * Get device timezone
74
+ */
75
+ timezone(
76
+ deviceID: string,
77
+ params: TimeTimezoneParams | null | undefined = {},
78
+ options?: RequestOptions,
79
+ ): APIPromise<TimeTimezoneResponse> {
80
+ const { 'X-Device-Display-ID': xDeviceDisplayID } = params ?? {};
81
+ return this._client.get(path`/devices/${deviceID}/timezone`, {
82
+ ...options,
83
+ headers: buildHeaders([
84
+ {
85
+ ...(xDeviceDisplayID?.toString() != null ?
86
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
87
+ : undefined),
88
+ },
89
+ options?.headers,
90
+ ]),
91
+ });
92
+ }
93
+ }
94
+
95
+ export type TimeTimeResponse = string;
96
+
97
+ export interface TimeTimezoneResponse {
98
+ timezone: string;
99
+
100
+ /**
101
+ * A URL to the JSON Schema for this object.
102
+ */
103
+ $schema?: string;
104
+ }
105
+
106
+ export interface TimeSetTimeParams {
107
+ /**
108
+ * Body param
109
+ */
110
+ time: string;
111
+
112
+ /**
113
+ * Header param
114
+ */
115
+ 'X-Device-Display-ID'?: number;
116
+ }
117
+
118
+ export interface TimeSetTimezoneParams {
119
+ /**
120
+ * Body param
121
+ */
122
+ timezone: string;
123
+
124
+ /**
125
+ * Header param
126
+ */
127
+ 'X-Device-Display-ID'?: number;
128
+ }
129
+
130
+ export interface TimeTimeParams {
131
+ 'X-Device-Display-ID'?: number;
132
+ }
133
+
134
+ export interface TimeTimezoneParams {
135
+ 'X-Device-Display-ID'?: number;
136
+ }
137
+
138
+ export declare namespace Time {
139
+ export {
140
+ type TimeTimeResponse as TimeTimeResponse,
141
+ type TimeTimezoneResponse as TimeTimezoneResponse,
142
+ type TimeSetTimeParams as TimeSetTimeParams,
143
+ type TimeSetTimezoneParams as TimeSetTimezoneParams,
144
+ type TimeTimeParams as TimeTimeParams,
145
+ type TimeTimezoneParams as TimeTimezoneParams,
146
+ };
147
+ }
@@ -1,11 +1,15 @@
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 TasksAPI from './tasks/tasks';
5
6
  import { APIPromise } from '../core/api-promise';
6
7
  import { RequestOptions } from '../internal/request-options';
7
8
  import { path } from '../internal/utils/path';
8
9
 
10
+ /**
11
+ * Webhooks API
12
+ */
9
13
  export class Hooks extends APIResource {
10
14
  /**
11
15
  * Get a hook subscription by id.
@@ -122,7 +126,7 @@ export interface HookListResponse {
122
126
  /**
123
127
  * Pagination metadata
124
128
  */
125
- pagination: HookListResponse.Pagination;
129
+ pagination: Shared.PaginationMeta;
126
130
  }
127
131
 
128
132
  export namespace HookListResponse {
@@ -143,41 +147,6 @@ export namespace HookListResponse {
143
147
 
144
148
  updatedAt?: string;
145
149
  }
146
-
147
- /**
148
- * Pagination metadata
149
- */
150
- export interface Pagination {
151
- /**
152
- * Whether there is a next page
153
- */
154
- hasNext: boolean;
155
-
156
- /**
157
- * Whether there is a previous page
158
- */
159
- hasPrev: boolean;
160
-
161
- /**
162
- * Current page number (1-based)
163
- */
164
- page: number;
165
-
166
- /**
167
- * Total number of pages
168
- */
169
- pages: number;
170
-
171
- /**
172
- * Number of items per page
173
- */
174
- pageSize: number;
175
-
176
- /**
177
- * Total number of items
178
- */
179
- total: number;
180
- }
181
150
  }
182
151
 
183
152
  export type HookGetSampleDataResponse = Array<HookGetSampleDataResponse.HookGetSampleDataResponseItem>;