@mobilerun/sdk 3.0.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 (98) hide show
  1. package/CHANGELOG.md +270 -0
  2. package/README.md +2 -2
  3. package/client.d.mts +4 -5
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +4 -5
  6. package/client.d.ts.map +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs.map +1 -1
  9. package/internal/utils/env.js +2 -2
  10. package/internal/utils/env.js.map +1 -1
  11. package/internal/utils/env.mjs +2 -2
  12. package/internal/utils/env.mjs.map +1 -1
  13. package/package.json +1 -1
  14. package/resources/agents.d.mts +1 -0
  15. package/resources/agents.d.mts.map +1 -1
  16. package/resources/agents.d.ts +1 -0
  17. package/resources/agents.d.ts.map +1 -1
  18. package/resources/devices/devices.d.mts +39 -13
  19. package/resources/devices/devices.d.mts.map +1 -1
  20. package/resources/devices/devices.d.ts +39 -13
  21. package/resources/devices/devices.d.ts.map +1 -1
  22. package/resources/devices/devices.js +10 -0
  23. package/resources/devices/devices.js.map +1 -1
  24. package/resources/devices/devices.mjs +12 -2
  25. package/resources/devices/devices.mjs.map +1 -1
  26. package/resources/devices/esim.d.mts +95 -0
  27. package/resources/devices/esim.d.mts.map +1 -0
  28. package/resources/devices/esim.d.ts +95 -0
  29. package/resources/devices/esim.d.ts.map +1 -0
  30. package/resources/devices/esim.js +84 -0
  31. package/resources/devices/esim.js.map +1 -0
  32. package/resources/devices/esim.mjs +80 -0
  33. package/resources/devices/esim.mjs.map +1 -0
  34. package/resources/devices/index.d.mts +4 -3
  35. package/resources/devices/index.d.mts.map +1 -1
  36. package/resources/devices/index.d.ts +4 -3
  37. package/resources/devices/index.d.ts.map +1 -1
  38. package/resources/devices/index.js +3 -1
  39. package/resources/devices/index.js.map +1 -1
  40. package/resources/devices/index.mjs +2 -1
  41. package/resources/devices/index.mjs.map +1 -1
  42. package/resources/devices/proxy.d.mts +40 -9
  43. package/resources/devices/proxy.d.mts.map +1 -1
  44. package/resources/devices/proxy.d.ts +40 -9
  45. package/resources/devices/proxy.d.ts.map +1 -1
  46. package/resources/devices/proxy.js +17 -0
  47. package/resources/devices/proxy.js.map +1 -1
  48. package/resources/devices/proxy.mjs +17 -0
  49. package/resources/devices/proxy.mjs.map +1 -1
  50. package/resources/devices/time.d.mts +2 -16
  51. package/resources/devices/time.d.mts.map +1 -1
  52. package/resources/devices/time.d.ts +2 -16
  53. package/resources/devices/time.d.ts.map +1 -1
  54. package/resources/devices/time.js +0 -19
  55. package/resources/devices/time.js.map +1 -1
  56. package/resources/devices/time.mjs +0 -19
  57. package/resources/devices/time.mjs.map +1 -1
  58. package/resources/index.d.mts +2 -2
  59. package/resources/index.d.mts.map +1 -1
  60. package/resources/index.d.ts +2 -2
  61. package/resources/index.d.ts.map +1 -1
  62. package/resources/index.js.map +1 -1
  63. package/resources/index.mjs.map +1 -1
  64. package/resources/proxies.d.mts +52 -21
  65. package/resources/proxies.d.mts.map +1 -1
  66. package/resources/proxies.d.ts +52 -21
  67. package/resources/proxies.d.ts.map +1 -1
  68. package/resources/proxies.js +2 -2
  69. package/resources/proxies.js.map +1 -1
  70. package/resources/proxies.mjs +2 -2
  71. package/resources/proxies.mjs.map +1 -1
  72. package/resources/shared.d.mts +17 -8
  73. package/resources/shared.d.mts.map +1 -1
  74. package/resources/shared.d.ts +17 -8
  75. package/resources/shared.d.ts.map +1 -1
  76. package/resources/tasks/tasks.d.mts +55 -4
  77. package/resources/tasks/tasks.d.mts.map +1 -1
  78. package/resources/tasks/tasks.d.ts +55 -4
  79. package/resources/tasks/tasks.d.ts.map +1 -1
  80. package/resources/tasks/tasks.js.map +1 -1
  81. package/resources/tasks/tasks.mjs.map +1 -1
  82. package/src/client.ts +4 -1
  83. package/src/internal/utils/env.ts +2 -2
  84. package/src/resources/agents.ts +2 -0
  85. package/src/resources/devices/devices.ts +88 -13
  86. package/src/resources/devices/esim.ts +201 -0
  87. package/src/resources/devices/index.ts +17 -2
  88. package/src/resources/devices/proxy.ts +67 -9
  89. package/src/resources/devices/time.ts +1 -34
  90. package/src/resources/index.ts +2 -0
  91. package/src/resources/proxies.ts +73 -21
  92. package/src/resources/shared.ts +24 -12
  93. package/src/resources/tasks/tasks.ts +81 -3
  94. package/src/version.ts +1 -1
  95. package/version.d.mts +1 -1
  96. package/version.d.ts +1 -1
  97. package/version.js +1 -1
  98. package/version.mjs +1 -1
package/src/client.ts CHANGED
@@ -59,6 +59,7 @@ import {
59
59
  ProxyCreateParams,
60
60
  ProxyCreateResponse,
61
61
  ProxyDeleteResponse,
62
+ ProxyListParams,
62
63
  ProxyListResponse,
63
64
  ProxyRetrieveResponse,
64
65
  ProxyUpdateParams,
@@ -75,6 +76,7 @@ import {
75
76
  DeviceCreateParams,
76
77
  DeviceListParams,
77
78
  DeviceListResponse,
79
+ DeviceSetNameParams,
78
80
  DeviceTerminateParams,
79
81
  Devices,
80
82
  } from './resources/devices/devices';
@@ -867,6 +869,7 @@ export declare namespace Mobilerun {
867
869
  type ProxyDeleteResponse as ProxyDeleteResponse,
868
870
  type ProxyCreateParams as ProxyCreateParams,
869
871
  type ProxyUpdateParams as ProxyUpdateParams,
872
+ type ProxyListParams as ProxyListParams,
870
873
  };
871
874
 
872
875
  export {
@@ -897,6 +900,7 @@ export declare namespace Mobilerun {
897
900
  type DeviceCountResponse as DeviceCountResponse,
898
901
  type DeviceCreateParams as DeviceCreateParams,
899
902
  type DeviceListParams as DeviceListParams,
903
+ type DeviceSetNameParams as DeviceSetNameParams,
900
904
  type DeviceTerminateParams as DeviceTerminateParams,
901
905
  };
902
906
 
@@ -925,7 +929,6 @@ export declare namespace Mobilerun {
925
929
 
926
930
  export { Models as Models, type ModelListResponse as ModelListResponse };
927
931
 
928
- export type Config = API.Config;
929
932
  export type DeviceCarrier = API.DeviceCarrier;
930
933
  export type DeviceIdentifiers = API.DeviceIdentifiers;
931
934
  export type DeviceSpec = API.DeviceSpec;
@@ -9,10 +9,10 @@
9
9
  */
10
10
  export const readEnv = (env: string): string | undefined => {
11
11
  if (typeof (globalThis as any).process !== 'undefined') {
12
- return (globalThis as any).process.env?.[env]?.trim() ?? undefined;
12
+ return (globalThis as any).process.env?.[env]?.trim() || undefined;
13
13
  }
14
14
  if (typeof (globalThis as any).Deno !== 'undefined') {
15
- return (globalThis as any).Deno.env?.get?.(env)?.trim();
15
+ return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined;
16
16
  }
17
17
  return undefined;
18
18
  };
@@ -34,6 +34,8 @@ export namespace AgentListResponse {
34
34
 
35
35
  reasoning: boolean;
36
36
 
37
+ subagentModel: string | null;
38
+
37
39
  vision: boolean;
38
40
  }
39
41
  }
@@ -22,6 +22,16 @@ import {
22
22
  AppUpdateParams,
23
23
  Apps,
24
24
  } from './apps';
25
+ import * as EsimAPI from './esim';
26
+ import {
27
+ Esim,
28
+ EsimActivateParams,
29
+ EsimActivateResponse,
30
+ EsimEnableParams,
31
+ EsimListParams,
32
+ EsimListResponse,
33
+ EsimRemoveParams,
34
+ } from './esim';
25
35
  import * as FilesAPI from './files';
26
36
  import {
27
37
  FileDeleteParams,
@@ -42,7 +52,13 @@ import { PackageListParams, PackageListResponse, Packages } from './packages';
42
52
  import * as ProfileAPI from './profile';
43
53
  import { Profile, ProfileUpdateParams } from './profile';
44
54
  import * as ProxyAPI from './proxy';
45
- import { Proxy, ProxyConnectParams, ProxyDisconnectParams } from './proxy';
55
+ import {
56
+ Proxy as ProxyAPIProxy,
57
+ ProxyConnectParams,
58
+ ProxyDisconnectParams,
59
+ ProxyStatusParams,
60
+ ProxyStatusResponse,
61
+ } from './proxy';
46
62
  import * as StateAPI from './state';
47
63
  import {
48
64
  Rect,
@@ -57,7 +73,6 @@ import { TaskListParams, TaskListResponse, Tasks } from './tasks';
57
73
  import * as TimeAPI from './time';
58
74
  import {
59
75
  Time,
60
- TimeSetTimeParams,
61
76
  TimeSetTimezoneParams,
62
77
  TimeTimeParams,
63
78
  TimeTimeResponse,
@@ -81,6 +96,7 @@ export class Devices extends APIResource {
81
96
  packages: PackagesAPI.Packages = new PackagesAPI.Packages(this._client);
82
97
  keyboard: KeyboardAPI.Keyboard = new KeyboardAPI.Keyboard(this._client);
83
98
  tasks: TasksAPI.Tasks = new TasksAPI.Tasks(this._client);
99
+ esim: EsimAPI.Esim = new EsimAPI.Esim(this._client);
84
100
 
85
101
  /**
86
102
  * Provision a new device
@@ -114,6 +130,13 @@ export class Devices extends APIResource {
114
130
  return this._client.get('/devices/count', options);
115
131
  }
116
132
 
133
+ /**
134
+ * Update device name
135
+ */
136
+ setName(deviceID: string, body: DeviceSetNameParams, options?: RequestOptions): APIPromise<Device> {
137
+ return this._client.put(path`/devices/${deviceID}/name`, { body, ...options });
138
+ }
139
+
117
140
  /**
118
141
  * Terminate a device
119
142
  */
@@ -136,6 +159,8 @@ export class Devices extends APIResource {
136
159
  export interface Device {
137
160
  id: string;
138
161
 
162
+ activeTaskId: string;
163
+
139
164
  assignedAt: string | null;
140
165
 
141
166
  createdAt: string;
@@ -161,6 +186,8 @@ export interface Device {
161
186
  */
162
187
  $schema?: string;
163
188
 
189
+ providerId?: string;
190
+
164
191
  streamToken?: string;
165
192
 
166
193
  userId?: string;
@@ -183,7 +210,11 @@ export interface DeviceCreateParams {
183
210
  /**
184
211
  * Query param
185
212
  */
186
- deviceType?: 'dedicated_physical_device' | 'dedicated_premium_device' | 'dedicated_emulated_device';
213
+ deviceType?:
214
+ | 'dedicated_physical_device'
215
+ | 'dedicated_premium_device'
216
+ | 'dedicated_emulated_device'
217
+ | 'dedicated_ios_device';
187
218
 
188
219
  /**
189
220
  * Body param
@@ -213,12 +244,31 @@ export interface DeviceCreateParams {
213
244
  /**
214
245
  * Body param
215
246
  */
216
- proxy?: Shared.Config;
247
+ proxy?: DeviceCreateParams.Proxy;
248
+ }
217
249
 
218
- /**
219
- * Body param
220
- */
221
- smartIp?: boolean;
250
+ export namespace DeviceCreateParams {
251
+ export interface Proxy {
252
+ name?: string;
253
+
254
+ smartIp?: boolean;
255
+
256
+ socks5?: Proxy.Socks5;
257
+
258
+ wireguard?: string;
259
+ }
260
+
261
+ export namespace Proxy {
262
+ export interface Socks5 {
263
+ host: string;
264
+
265
+ password: string;
266
+
267
+ port: number;
268
+
269
+ user: string;
270
+ }
271
+ }
222
272
  }
223
273
 
224
274
  export interface DeviceListParams {
@@ -234,9 +284,21 @@ export interface DeviceListParams {
234
284
 
235
285
  pageSize?: number;
236
286
 
237
- state?: Array<'creating' | 'assigned' | 'ready' | 'disconnected' | 'terminated' | 'unknown'> | null;
287
+ providerId?: string;
238
288
 
239
- type?: 'dedicated_physical_device' | 'dedicated_premium_device' | 'dedicated_emulated_device';
289
+ state?: Array<
290
+ 'creating' | 'assigned' | 'ready' | 'rebooting' | 'migrating' | 'terminated' | 'maintenance' | 'unknown'
291
+ > | null;
292
+
293
+ type?:
294
+ | 'dedicated_physical_device'
295
+ | 'dedicated_premium_device'
296
+ | 'dedicated_emulated_device'
297
+ | 'dedicated_ios_device';
298
+ }
299
+
300
+ export interface DeviceSetNameParams {
301
+ name: string;
240
302
  }
241
303
 
242
304
  export interface DeviceTerminateParams {
@@ -248,7 +310,7 @@ export interface DeviceTerminateParams {
248
310
  Devices.Time = Time;
249
311
  Devices.Profile = Profile;
250
312
  Devices.Files = Files;
251
- Devices.Proxy = Proxy;
313
+ Devices.Proxy = ProxyAPIProxy;
252
314
  Devices.Location = Location;
253
315
  Devices.Actions = Actions;
254
316
  Devices.State = State;
@@ -256,6 +318,7 @@ Devices.Apps = Apps;
256
318
  Devices.Packages = Packages;
257
319
  Devices.Keyboard = Keyboard;
258
320
  Devices.Tasks = Tasks;
321
+ Devices.Esim = Esim;
259
322
 
260
323
  export declare namespace Devices {
261
324
  export {
@@ -264,6 +327,7 @@ export declare namespace Devices {
264
327
  type DeviceCountResponse as DeviceCountResponse,
265
328
  type DeviceCreateParams as DeviceCreateParams,
266
329
  type DeviceListParams as DeviceListParams,
330
+ type DeviceSetNameParams as DeviceSetNameParams,
267
331
  type DeviceTerminateParams as DeviceTerminateParams,
268
332
  };
269
333
 
@@ -271,7 +335,6 @@ export declare namespace Devices {
271
335
  Time as Time,
272
336
  type TimeTimeResponse as TimeTimeResponse,
273
337
  type TimeTimezoneResponse as TimeTimezoneResponse,
274
- type TimeSetTimeParams as TimeSetTimeParams,
275
338
  type TimeSetTimezoneParams as TimeSetTimezoneParams,
276
339
  type TimeTimeParams as TimeTimeParams,
277
340
  type TimeTimezoneParams as TimeTimezoneParams,
@@ -291,9 +354,11 @@ export declare namespace Devices {
291
354
  };
292
355
 
293
356
  export {
294
- Proxy as Proxy,
357
+ ProxyAPIProxy as Proxy,
358
+ type ProxyStatusResponse as ProxyStatusResponse,
295
359
  type ProxyConnectParams as ProxyConnectParams,
296
360
  type ProxyDisconnectParams as ProxyDisconnectParams,
361
+ type ProxyStatusParams as ProxyStatusParams,
297
362
  };
298
363
 
299
364
  export {
@@ -346,4 +411,14 @@ export declare namespace Devices {
346
411
  };
347
412
 
348
413
  export { Tasks as Tasks, type TaskListResponse as TaskListResponse, type TaskListParams as TaskListParams };
414
+
415
+ export {
416
+ Esim as Esim,
417
+ type EsimListResponse as EsimListResponse,
418
+ type EsimActivateResponse as EsimActivateResponse,
419
+ type EsimListParams as EsimListParams,
420
+ type EsimActivateParams as EsimActivateParams,
421
+ type EsimEnableParams as EsimEnableParams,
422
+ type EsimRemoveParams as EsimRemoveParams,
423
+ };
349
424
  }
@@ -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
+ }
@@ -25,8 +25,18 @@ export {
25
25
  type DeviceCountResponse,
26
26
  type DeviceCreateParams,
27
27
  type DeviceListParams,
28
+ type DeviceSetNameParams,
28
29
  type DeviceTerminateParams,
29
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';
30
40
  export {
31
41
  Files,
32
42
  type FileInfo,
@@ -51,7 +61,13 @@ export {
51
61
  } from './location';
52
62
  export { Packages, type PackageListResponse, type PackageListParams } from './packages';
53
63
  export { Profile, type ProfileUpdateParams } from './profile';
54
- export { Proxy, type ProxyConnectParams, type ProxyDisconnectParams } from './proxy';
64
+ export {
65
+ Proxy,
66
+ type ProxyStatusResponse,
67
+ type ProxyConnectParams,
68
+ type ProxyDisconnectParams,
69
+ type ProxyStatusParams,
70
+ } from './proxy';
55
71
  export {
56
72
  State,
57
73
  type Rect,
@@ -65,7 +81,6 @@ export {
65
81
  Time,
66
82
  type TimeTimeResponse,
67
83
  type TimeTimezoneResponse,
68
- type TimeSetTimeParams,
69
84
  type TimeSetTimezoneParams,
70
85
  type TimeTimeParams,
71
86
  type TimeTimezoneParams,
@@ -49,6 +49,47 @@ export class Proxy extends APIResource {
49
49
  ]),
50
50
  });
51
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;
52
93
  }
53
94
 
54
95
  export interface ProxyConnectParams {
@@ -57,6 +98,11 @@ export interface ProxyConnectParams {
57
98
  */
58
99
  host?: string;
59
100
 
101
+ /**
102
+ * Body param: Proxy name (used for wireguard tunnel name)
103
+ */
104
+ name?: string;
105
+
60
106
  /**
61
107
  * @deprecated Body param
62
108
  */
@@ -68,20 +114,26 @@ export interface ProxyConnectParams {
68
114
  port?: number;
69
115
 
70
116
  /**
71
- * Body param: Preferred new format.
117
+ * Body param
72
118
  */
73
- proxy?: ProxyConnectParams.Proxy;
119
+ smartIp?: boolean;
74
120
 
75
121
  /**
76
- * Body param
122
+ * Body param: SOCKS5 proxy configuration (required for socks5).
77
123
  */
78
- smartIp?: boolean;
124
+ socks5?: ProxyConnectParams.Socks5;
79
125
 
80
126
  /**
81
127
  * @deprecated Body param
82
128
  */
83
129
  user?: string;
84
130
 
131
+ /**
132
+ * Body param: WireGuard tunnel configuration file content (required for
133
+ * wireguard).
134
+ */
135
+ wireguard?: string;
136
+
85
137
  /**
86
138
  * Header param
87
139
  */
@@ -90,16 +142,16 @@ export interface ProxyConnectParams {
90
142
 
91
143
  export namespace ProxyConnectParams {
92
144
  /**
93
- * Preferred new format.
145
+ * SOCKS5 proxy configuration (required for socks5).
94
146
  */
95
- export interface Proxy {
147
+ export interface Socks5 {
96
148
  host: string;
97
149
 
98
- password: string;
99
-
100
150
  port: number;
101
151
 
102
- user: string;
152
+ password?: string;
153
+
154
+ user?: string;
103
155
  }
104
156
  }
105
157
 
@@ -107,9 +159,15 @@ export interface ProxyDisconnectParams {
107
159
  'X-Device-Display-ID'?: number;
108
160
  }
109
161
 
162
+ export interface ProxyStatusParams {
163
+ 'X-Device-Display-ID'?: number;
164
+ }
165
+
110
166
  export declare namespace Proxy {
111
167
  export {
168
+ type ProxyStatusResponse as ProxyStatusResponse,
112
169
  type ProxyConnectParams as ProxyConnectParams,
113
170
  type ProxyDisconnectParams as ProxyDisconnectParams,
171
+ type ProxyStatusParams as ProxyStatusParams,
114
172
  };
115
173
  }
@@ -7,26 +7,6 @@ import { RequestOptions } from '../../internal/request-options';
7
7
  import { path } from '../../internal/utils/path';
8
8
 
9
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
10
  /**
31
11
  * Set device timezone
32
12
  */
@@ -95,7 +75,7 @@ export class Time extends APIResource {
95
75
  export type TimeTimeResponse = string;
96
76
 
97
77
  export interface TimeTimezoneResponse {
98
- timezone: string;
78
+ timezone: string | null;
99
79
 
100
80
  /**
101
81
  * A URL to the JSON Schema for this object.
@@ -103,18 +83,6 @@ export interface TimeTimezoneResponse {
103
83
  $schema?: string;
104
84
  }
105
85
 
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
86
  export interface TimeSetTimezoneParams {
119
87
  /**
120
88
  * Body param
@@ -139,7 +107,6 @@ export declare namespace Time {
139
107
  export {
140
108
  type TimeTimeResponse as TimeTimeResponse,
141
109
  type TimeTimezoneResponse as TimeTimezoneResponse,
142
- type TimeSetTimeParams as TimeSetTimeParams,
143
110
  type TimeSetTimezoneParams as TimeSetTimezoneParams,
144
111
  type TimeTimeParams as TimeTimeParams,
145
112
  type TimeTimezoneParams as TimeTimezoneParams,