@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.
- package/CHANGELOG.md +513 -0
- package/README.md +46 -2
- package/client.d.mts +33 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +33 -5
- package/client.d.ts.map +1 -1
- package/client.js +29 -7
- package/client.js.map +1 -1
- package/client.mjs +29 -7
- package/client.mjs.map +1 -1
- package/internal/tslib.js +6 -6
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +7 -1
- package/resources/agents.d.mts +30 -0
- package/resources/agents.d.mts.map +1 -0
- package/resources/agents.d.ts +30 -0
- package/resources/agents.d.ts.map +1 -0
- package/resources/agents.js +18 -0
- package/resources/agents.js.map +1 -0
- package/resources/agents.mjs +14 -0
- package/resources/agents.mjs.map +1 -0
- package/resources/apps.d.mts +10 -12
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +10 -12
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs.map +1 -1
- package/resources/carriers.d.mts +233 -0
- package/resources/carriers.d.mts.map +1 -0
- package/resources/carriers.d.ts +233 -0
- package/resources/carriers.d.ts.map +1 -0
- package/resources/carriers.js +46 -0
- package/resources/carriers.js.map +1 -0
- package/resources/carriers.mjs +42 -0
- package/resources/carriers.mjs.map +1 -0
- package/resources/credentials/credentials.d.mts +4 -13
- package/resources/credentials/credentials.d.mts.map +1 -1
- package/resources/credentials/credentials.d.ts +4 -13
- package/resources/credentials/credentials.d.ts.map +1 -1
- package/resources/credentials/credentials.js.map +1 -1
- package/resources/credentials/credentials.mjs.map +1 -1
- package/resources/devices/actions.d.mts +37 -1
- package/resources/devices/actions.d.mts.map +1 -1
- package/resources/devices/actions.d.ts +37 -1
- package/resources/devices/actions.d.ts.map +1 -1
- package/resources/devices/actions.js +36 -0
- package/resources/devices/actions.js.map +1 -1
- package/resources/devices/actions.mjs +36 -0
- package/resources/devices/actions.mjs.map +1 -1
- package/resources/devices/apps.d.mts +4 -0
- package/resources/devices/apps.d.mts.map +1 -1
- package/resources/devices/apps.d.ts +4 -0
- package/resources/devices/apps.d.ts.map +1 -1
- package/resources/devices/devices.d.mts +63 -35
- package/resources/devices/devices.d.mts.map +1 -1
- package/resources/devices/devices.d.ts +63 -35
- package/resources/devices/devices.d.ts.map +1 -1
- package/resources/devices/devices.js +32 -2
- package/resources/devices/devices.js.map +1 -1
- package/resources/devices/devices.mjs +33 -3
- package/resources/devices/devices.mjs.map +1 -1
- package/resources/devices/esim.d.mts +95 -0
- package/resources/devices/esim.d.mts.map +1 -0
- package/resources/devices/esim.d.ts +95 -0
- package/resources/devices/esim.d.ts.map +1 -0
- package/resources/devices/esim.js +84 -0
- package/resources/devices/esim.js.map +1 -0
- package/resources/devices/esim.mjs +80 -0
- package/resources/devices/esim.mjs.map +1 -0
- package/resources/devices/files.d.mts +108 -0
- package/resources/devices/files.d.mts.map +1 -0
- package/resources/devices/files.d.ts +108 -0
- package/resources/devices/files.d.ts.map +1 -0
- package/resources/devices/files.js +87 -0
- package/resources/devices/files.js.map +1 -0
- package/resources/devices/files.mjs +83 -0
- package/resources/devices/files.mjs.map +1 -0
- package/resources/devices/index.d.mts +9 -3
- package/resources/devices/index.d.mts.map +1 -1
- package/resources/devices/index.d.ts +9 -3
- package/resources/devices/index.d.ts.map +1 -1
- package/resources/devices/index.js +13 -1
- package/resources/devices/index.js.map +1 -1
- package/resources/devices/index.mjs +7 -1
- package/resources/devices/index.mjs.map +1 -1
- package/resources/devices/keyboard.d.mts +10 -2
- package/resources/devices/keyboard.d.mts.map +1 -1
- package/resources/devices/keyboard.d.ts +10 -2
- package/resources/devices/keyboard.d.ts.map +1 -1
- package/resources/devices/location.d.mts +42 -0
- package/resources/devices/location.d.mts.map +1 -0
- package/resources/devices/location.d.ts +42 -0
- package/resources/devices/location.d.ts.map +1 -0
- package/resources/devices/location.js +47 -0
- package/resources/devices/location.js.map +1 -0
- package/resources/devices/location.mjs +43 -0
- package/resources/devices/location.mjs.map +1 -0
- package/resources/devices/packages.d.mts +4 -0
- package/resources/devices/packages.d.mts.map +1 -1
- package/resources/devices/packages.d.ts +4 -0
- package/resources/devices/packages.d.ts.map +1 -1
- package/resources/devices/profile.d.mts +23 -0
- package/resources/devices/profile.d.mts.map +1 -0
- package/resources/devices/profile.d.ts +23 -0
- package/resources/devices/profile.d.ts.map +1 -0
- package/resources/devices/profile.js +30 -0
- package/resources/devices/profile.js.map +1 -0
- package/resources/devices/profile.mjs +26 -0
- package/resources/devices/profile.mjs.map +1 -0
- package/resources/devices/proxy.d.mts +92 -0
- package/resources/devices/proxy.d.mts.map +1 -0
- package/resources/devices/proxy.d.ts +92 -0
- package/resources/devices/proxy.d.ts.map +1 -0
- package/resources/devices/proxy.js +65 -0
- package/resources/devices/proxy.js.map +1 -0
- package/resources/devices/proxy.mjs +61 -0
- package/resources/devices/proxy.mjs.map +1 -0
- package/resources/devices/state.d.mts +8 -19
- package/resources/devices/state.d.mts.map +1 -1
- package/resources/devices/state.d.ts +8 -19
- package/resources/devices/state.d.ts.map +1 -1
- package/resources/devices/state.js +0 -17
- package/resources/devices/state.js.map +1 -1
- package/resources/devices/state.mjs +0 -17
- package/resources/devices/state.mjs.map +1 -1
- package/resources/devices/tasks.d.mts +2 -9
- package/resources/devices/tasks.d.mts.map +1 -1
- package/resources/devices/tasks.d.ts +2 -9
- package/resources/devices/tasks.d.ts.map +1 -1
- package/resources/devices/tasks.js.map +1 -1
- package/resources/devices/tasks.mjs.map +1 -1
- package/resources/devices/time.d.mts +45 -0
- package/resources/devices/time.d.mts.map +1 -0
- package/resources/devices/time.d.ts +45 -0
- package/resources/devices/time.d.ts.map +1 -0
- package/resources/devices/time.js +64 -0
- package/resources/devices/time.js.map +1 -0
- package/resources/devices/time.mjs +60 -0
- package/resources/devices/time.mjs.map +1 -0
- package/resources/hooks.d.mts +5 -30
- package/resources/hooks.d.mts.map +1 -1
- package/resources/hooks.d.ts +5 -30
- package/resources/hooks.d.ts.map +1 -1
- package/resources/hooks.js +3 -0
- package/resources/hooks.js.map +1 -1
- package/resources/hooks.mjs +3 -0
- package/resources/hooks.mjs.map +1 -1
- package/resources/index.d.mts +7 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -0
- package/resources/index.mjs.map +1 -1
- package/resources/profiles.d.mts +84 -0
- package/resources/profiles.d.mts.map +1 -0
- package/resources/profiles.d.ts +84 -0
- package/resources/profiles.d.ts.map +1 -0
- package/resources/profiles.js +40 -0
- package/resources/profiles.js.map +1 -0
- package/resources/profiles.mjs +36 -0
- package/resources/profiles.mjs.map +1 -0
- package/resources/proxies.d.mts +103 -0
- package/resources/proxies.d.mts.map +1 -0
- package/resources/proxies.d.ts +103 -0
- package/resources/proxies.d.ts.map +1 -0
- package/resources/proxies.js +40 -0
- package/resources/proxies.js.map +1 -0
- package/resources/proxies.mjs +36 -0
- package/resources/proxies.mjs.map +1 -0
- package/resources/shared.d.mts +104 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +104 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/tasks/index.d.mts +1 -1
- package/resources/tasks/index.d.mts.map +1 -1
- package/resources/tasks/index.d.ts +1 -1
- package/resources/tasks/index.d.ts.map +1 -1
- package/resources/tasks/index.js.map +1 -1
- package/resources/tasks/index.mjs.map +1 -1
- package/resources/tasks/screenshots.d.mts +3 -0
- package/resources/tasks/screenshots.d.mts.map +1 -1
- package/resources/tasks/screenshots.d.ts +3 -0
- package/resources/tasks/screenshots.d.ts.map +1 -1
- package/resources/tasks/screenshots.js +3 -0
- package/resources/tasks/screenshots.js.map +1 -1
- package/resources/tasks/screenshots.mjs +3 -0
- package/resources/tasks/screenshots.mjs.map +1 -1
- package/resources/tasks/tasks.d.mts +141 -60
- package/resources/tasks/tasks.d.mts.map +1 -1
- package/resources/tasks/tasks.d.ts +141 -60
- package/resources/tasks/tasks.d.ts.map +1 -1
- package/resources/tasks/tasks.js +11 -5
- package/resources/tasks/tasks.js.map +1 -1
- package/resources/tasks/tasks.mjs +11 -5
- package/resources/tasks/tasks.mjs.map +1 -1
- package/resources/tasks/ui-states.d.mts +3 -0
- package/resources/tasks/ui-states.d.mts.map +1 -1
- package/resources/tasks/ui-states.d.ts +3 -0
- package/resources/tasks/ui-states.d.ts.map +1 -1
- package/resources/tasks/ui-states.js +3 -0
- package/resources/tasks/ui-states.js.map +1 -1
- package/resources/tasks/ui-states.mjs +3 -0
- package/resources/tasks/ui-states.mjs.map +1 -1
- package/src/client.ts +112 -10
- package/src/internal/utils/env.ts +2 -2
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils.ts +1 -0
- package/src/resources/agents.ts +45 -0
- package/src/resources/apps.ts +11 -19
- package/src/resources/carriers.ts +327 -0
- package/src/resources/credentials/credentials.ts +4 -19
- package/src/resources/devices/actions.ts +84 -0
- package/src/resources/devices/apps.ts +5 -0
- package/src/resources/devices/devices.ts +171 -50
- package/src/resources/devices/esim.ts +201 -0
- package/src/resources/devices/files.ts +221 -0
- package/src/resources/devices/index.ts +52 -3
- package/src/resources/devices/keyboard.ts +12 -2
- package/src/resources/devices/location.ts +91 -0
- package/src/resources/devices/packages.ts +5 -0
- package/src/resources/devices/profile.ts +45 -0
- package/src/resources/devices/proxy.ts +173 -0
- package/src/resources/devices/state.ts +10 -44
- package/src/resources/devices/tasks.ts +2 -15
- package/src/resources/devices/time.ts +114 -0
- package/src/resources/hooks.ts +5 -36
- package/src/resources/index.ts +37 -0
- package/src/resources/profiles.ts +133 -0
- package/src/resources/proxies.ts +182 -0
- package/src/resources/shared.ts +161 -0
- package/src/resources/tasks/index.ts +3 -0
- package/src/resources/tasks/screenshots.ts +3 -0
- package/src/resources/tasks/tasks.ts +191 -68
- package/src/resources/tasks/ui-states.ts +3 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- 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 {
|
|
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
|
-
|
|
94
|
+
text: string;
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
97
|
* Body param
|
|
98
98
|
*/
|
|
99
|
-
|
|
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
|
+
}
|
|
@@ -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
|
+
}
|