@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,173 @@
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
+ * Get proxy connection state
55
+ */
56
+ status(
57
+ deviceID: string,
58
+ params: ProxyStatusParams | null | undefined = {},
59
+ options?: RequestOptions,
60
+ ): APIPromise<ProxyStatusResponse> {
61
+ const { 'X-Device-Display-ID': xDeviceDisplayID } = params ?? {};
62
+ return this._client.get(path`/devices/${deviceID}/proxy`, {
63
+ ...options,
64
+ headers: buildHeaders([
65
+ {
66
+ ...(xDeviceDisplayID?.toString() != null ?
67
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
68
+ : undefined),
69
+ },
70
+ options?.headers,
71
+ ]),
72
+ });
73
+ }
74
+ }
75
+
76
+ export interface ProxyStatusResponse {
77
+ connected: boolean;
78
+
79
+ /**
80
+ * Active proxy name
81
+ */
82
+ name: string | null;
83
+
84
+ /**
85
+ * Active proxy protocol (socks5 or wireguard).
86
+ */
87
+ protocol: string | null;
88
+
89
+ /**
90
+ * A URL to the JSON Schema for this object.
91
+ */
92
+ $schema?: string;
93
+ }
94
+
95
+ export interface ProxyConnectParams {
96
+ /**
97
+ * @deprecated Body param
98
+ */
99
+ host?: string;
100
+
101
+ /**
102
+ * Body param: Proxy name (used for wireguard tunnel name)
103
+ */
104
+ name?: string;
105
+
106
+ /**
107
+ * @deprecated Body param
108
+ */
109
+ password?: string;
110
+
111
+ /**
112
+ * @deprecated Body param
113
+ */
114
+ port?: number;
115
+
116
+ /**
117
+ * Body param
118
+ */
119
+ smartIp?: boolean;
120
+
121
+ /**
122
+ * Body param: SOCKS5 proxy configuration (required for socks5).
123
+ */
124
+ socks5?: ProxyConnectParams.Socks5;
125
+
126
+ /**
127
+ * @deprecated Body param
128
+ */
129
+ user?: string;
130
+
131
+ /**
132
+ * Body param: WireGuard tunnel configuration file content (required for
133
+ * wireguard).
134
+ */
135
+ wireguard?: string;
136
+
137
+ /**
138
+ * Header param
139
+ */
140
+ 'X-Device-Display-ID'?: number;
141
+ }
142
+
143
+ export namespace ProxyConnectParams {
144
+ /**
145
+ * SOCKS5 proxy configuration (required for socks5).
146
+ */
147
+ export interface Socks5 {
148
+ host: string;
149
+
150
+ port: number;
151
+
152
+ password?: string;
153
+
154
+ user?: string;
155
+ }
156
+ }
157
+
158
+ export interface ProxyDisconnectParams {
159
+ 'X-Device-Display-ID'?: number;
160
+ }
161
+
162
+ export interface ProxyStatusParams {
163
+ 'X-Device-Display-ID'?: number;
164
+ }
165
+
166
+ export declare namespace Proxy {
167
+ export {
168
+ type ProxyStatusResponse as ProxyStatusResponse,
169
+ type ProxyConnectParams as ProxyConnectParams,
170
+ type ProxyDisconnectParams as ProxyDisconnectParams,
171
+ type ProxyStatusParams as ProxyStatusParams,
172
+ };
173
+ }
@@ -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,114 @@
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 timezone
12
+ */
13
+ setTimezone(deviceID: string, params: TimeSetTimezoneParams, options?: RequestOptions): APIPromise<void> {
14
+ const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
15
+ return this._client.post(path`/devices/${deviceID}/timezone`, {
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
+ * Device time
32
+ */
33
+ time(
34
+ deviceID: string,
35
+ params: TimeTimeParams | null | undefined = {},
36
+ options?: RequestOptions,
37
+ ): APIPromise<string> {
38
+ const { 'X-Device-Display-ID': xDeviceDisplayID } = params ?? {};
39
+ return this._client.get(path`/devices/${deviceID}/time`, {
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
+ * Get device timezone
54
+ */
55
+ timezone(
56
+ deviceID: string,
57
+ params: TimeTimezoneParams | null | undefined = {},
58
+ options?: RequestOptions,
59
+ ): APIPromise<TimeTimezoneResponse> {
60
+ const { 'X-Device-Display-ID': xDeviceDisplayID } = params ?? {};
61
+ return this._client.get(path`/devices/${deviceID}/timezone`, {
62
+ ...options,
63
+ headers: buildHeaders([
64
+ {
65
+ ...(xDeviceDisplayID?.toString() != null ?
66
+ { 'X-Device-Display-ID': xDeviceDisplayID?.toString() }
67
+ : undefined),
68
+ },
69
+ options?.headers,
70
+ ]),
71
+ });
72
+ }
73
+ }
74
+
75
+ export type TimeTimeResponse = string;
76
+
77
+ export interface TimeTimezoneResponse {
78
+ timezone: string | null;
79
+
80
+ /**
81
+ * A URL to the JSON Schema for this object.
82
+ */
83
+ $schema?: string;
84
+ }
85
+
86
+ export interface TimeSetTimezoneParams {
87
+ /**
88
+ * Body param
89
+ */
90
+ timezone: string;
91
+
92
+ /**
93
+ * Header param
94
+ */
95
+ 'X-Device-Display-ID'?: number;
96
+ }
97
+
98
+ export interface TimeTimeParams {
99
+ 'X-Device-Display-ID'?: number;
100
+ }
101
+
102
+ export interface TimeTimezoneParams {
103
+ 'X-Device-Display-ID'?: number;
104
+ }
105
+
106
+ export declare namespace Time {
107
+ export {
108
+ type TimeTimeResponse as TimeTimeResponse,
109
+ type TimeTimezoneResponse as TimeTimezoneResponse,
110
+ type TimeSetTimezoneParams as TimeSetTimezoneParams,
111
+ type TimeTimeParams as TimeTimeParams,
112
+ type TimeTimezoneParams as TimeTimezoneParams,
113
+ };
114
+ }
@@ -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>;
@@ -1,6 +1,18 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ export * from './shared';
4
+ export { Agents, type AgentListResponse } from './agents';
3
5
  export { Apps, type AppListResponse, type AppListParams } from './apps';
6
+ export {
7
+ Carriers,
8
+ type Carrier,
9
+ type CarrierListResponse,
10
+ type CarrierDeleteResponse,
11
+ type CarrierCreateParams,
12
+ type CarrierUpdateParams,
13
+ type CarrierListParams,
14
+ type CarrierLookupParams,
15
+ } from './carriers';
4
16
  export {
5
17
  Credentials,
6
18
  type CredentialListResponse,
@@ -13,6 +25,7 @@ export {
13
25
  type DeviceCountResponse,
14
26
  type DeviceCreateParams,
15
27
  type DeviceListParams,
28
+ type DeviceSetNameParams,
16
29
  type DeviceTerminateParams,
17
30
  } from './devices/devices';
18
31
  export {
@@ -30,6 +43,27 @@ export {
30
43
  type HookSubscribeParams,
31
44
  } from './hooks';
32
45
  export { Models, type ModelListResponse } from './models';
46
+ export {
47
+ Profiles,
48
+ type Profile,
49
+ type ProfileListResponse,
50
+ type ProfileDeleteResponse,
51
+ type ProfileCreateParams,
52
+ type ProfileUpdateParams,
53
+ type ProfileListParams,
54
+ } from './profiles';
55
+ export {
56
+ Proxies,
57
+ type ProxyConfig,
58
+ type ProxyCreateResponse,
59
+ type ProxyRetrieveResponse,
60
+ type ProxyUpdateResponse,
61
+ type ProxyListResponse,
62
+ type ProxyDeleteResponse,
63
+ type ProxyCreateParams,
64
+ type ProxyUpdateParams,
65
+ type ProxyListParams,
66
+ } from './proxies';
33
67
  export {
34
68
  Tasks,
35
69
  type PackageCredentials,
@@ -41,8 +75,11 @@ export {
41
75
  type TaskGetStatusResponse,
42
76
  type TaskGetTrajectoryResponse,
43
77
  type TaskRunResponse,
78
+ type TaskRunStreamedResponse,
79
+ type TaskSendMessageResponse,
44
80
  type TaskStopResponse,
45
81
  type TaskListParams,
46
82
  type TaskRunParams,
47
83
  type TaskRunStreamedParams,
84
+ type TaskSendMessageParams,
48
85
  } from './tasks/tasks';
@@ -0,0 +1,133 @@
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 { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ export class Profiles extends APIResource {
10
+ /**
11
+ * Create a new device profile
12
+ */
13
+ create(body: ProfileCreateParams, options?: RequestOptions): APIPromise<Profile> {
14
+ return this._client.post('/profiles', { body, ...options });
15
+ }
16
+
17
+ /**
18
+ * Get device profile by ID
19
+ */
20
+ retrieve(profileID: string, options?: RequestOptions): APIPromise<Profile> {
21
+ return this._client.get(path`/profiles/${profileID}`, options);
22
+ }
23
+
24
+ /**
25
+ * Update a device profile
26
+ */
27
+ update(profileID: string, body: ProfileUpdateParams, options?: RequestOptions): APIPromise<Profile> {
28
+ return this._client.put(path`/profiles/${profileID}`, { body, ...options });
29
+ }
30
+
31
+ /**
32
+ * List device profiles
33
+ */
34
+ list(
35
+ query: ProfileListParams | null | undefined = {},
36
+ options?: RequestOptions,
37
+ ): APIPromise<ProfileListResponse> {
38
+ return this._client.get('/profiles', { query, ...options });
39
+ }
40
+
41
+ /**
42
+ * Delete a device profile
43
+ */
44
+ delete(profileID: string, options?: RequestOptions): APIPromise<ProfileDeleteResponse> {
45
+ return this._client.delete(path`/profiles/${profileID}`, options);
46
+ }
47
+ }
48
+
49
+ export interface Profile {
50
+ id: string;
51
+
52
+ createdAt: string;
53
+
54
+ name: string;
55
+
56
+ spec: Shared.DeviceSpec;
57
+
58
+ updatedAt: string;
59
+
60
+ userId: string;
61
+
62
+ /**
63
+ * A URL to the JSON Schema for this object.
64
+ */
65
+ $schema?: string;
66
+ }
67
+
68
+ export interface ProfileListResponse {
69
+ items: Array<Profile> | null;
70
+
71
+ pagination: Shared.Meta;
72
+
73
+ /**
74
+ * A URL to the JSON Schema for this object.
75
+ */
76
+ $schema?: string;
77
+ }
78
+
79
+ export interface ProfileDeleteResponse {
80
+ message: string;
81
+
82
+ /**
83
+ * A URL to the JSON Schema for this object.
84
+ */
85
+ $schema?: string;
86
+ }
87
+
88
+ export interface ProfileCreateParams {
89
+ /**
90
+ * Profile name
91
+ */
92
+ name: string;
93
+
94
+ /**
95
+ * Device specification
96
+ */
97
+ spec: Shared.DeviceSpec;
98
+ }
99
+
100
+ export interface ProfileUpdateParams {
101
+ /**
102
+ * Profile name
103
+ */
104
+ name: string;
105
+
106
+ /**
107
+ * Device specification
108
+ */
109
+ spec: Shared.DeviceSpec;
110
+ }
111
+
112
+ export interface ProfileListParams {
113
+ name?: string;
114
+
115
+ orderBy?: 'name' | 'created_at' | 'updated_at';
116
+
117
+ orderByDirection?: 'asc' | 'desc';
118
+
119
+ page?: number;
120
+
121
+ pageSize?: number;
122
+ }
123
+
124
+ export declare namespace Profiles {
125
+ export {
126
+ type Profile as Profile,
127
+ type ProfileListResponse as ProfileListResponse,
128
+ type ProfileDeleteResponse as ProfileDeleteResponse,
129
+ type ProfileCreateParams as ProfileCreateParams,
130
+ type ProfileUpdateParams as ProfileUpdateParams,
131
+ type ProfileListParams as ProfileListParams,
132
+ };
133
+ }