@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-states.mjs","sourceRoot":"","sources":["../../src/resources/tasks/ui-states.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,QAAQ,CACN,KAAa,EACb,MAA6B,EAC7B,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,OAAO,cAAc,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,MAAc,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,MAAM,YAAY,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"ui-states.mjs","sourceRoot":"","sources":["../../src/resources/tasks/ui-states.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,QAAQ,CACN,KAAa,EACb,MAA6B,EAC7B,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,OAAO,cAAc,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,MAAc,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,MAAM,YAAY,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -11,13 +11,24 @@ import type { APIResponseProps } from './internal/parse';
|
|
|
11
11
|
import { getPlatformHeaders } from './internal/detect-platform';
|
|
12
12
|
import * as Shims from './internal/shims';
|
|
13
13
|
import * as Opts from './internal/request-options';
|
|
14
|
-
import
|
|
14
|
+
import { stringifyQuery } from './internal/utils/query';
|
|
15
15
|
import { VERSION } from './version';
|
|
16
16
|
import * as Errors from './core/error';
|
|
17
17
|
import * as Uploads from './core/uploads';
|
|
18
18
|
import * as API from './resources/index';
|
|
19
19
|
import { APIPromise } from './core/api-promise';
|
|
20
|
+
import { AgentListResponse, Agents } from './resources/agents';
|
|
20
21
|
import { AppListParams, AppListResponse, Apps } from './resources/apps';
|
|
22
|
+
import {
|
|
23
|
+
Carrier,
|
|
24
|
+
CarrierCreateParams,
|
|
25
|
+
CarrierDeleteResponse,
|
|
26
|
+
CarrierListParams,
|
|
27
|
+
CarrierListResponse,
|
|
28
|
+
CarrierLookupParams,
|
|
29
|
+
CarrierUpdateParams,
|
|
30
|
+
Carriers,
|
|
31
|
+
} from './resources/carriers';
|
|
21
32
|
import {
|
|
22
33
|
HookGetSampleDataResponse,
|
|
23
34
|
HookListParams,
|
|
@@ -33,6 +44,27 @@ import {
|
|
|
33
44
|
Hooks,
|
|
34
45
|
} from './resources/hooks';
|
|
35
46
|
import { ModelListResponse, Models } from './resources/models';
|
|
47
|
+
import {
|
|
48
|
+
Profile,
|
|
49
|
+
ProfileCreateParams,
|
|
50
|
+
ProfileDeleteResponse,
|
|
51
|
+
ProfileListParams,
|
|
52
|
+
ProfileListResponse,
|
|
53
|
+
ProfileUpdateParams,
|
|
54
|
+
Profiles,
|
|
55
|
+
} from './resources/profiles';
|
|
56
|
+
import {
|
|
57
|
+
Proxies,
|
|
58
|
+
ProxyConfig,
|
|
59
|
+
ProxyCreateParams,
|
|
60
|
+
ProxyCreateResponse,
|
|
61
|
+
ProxyDeleteResponse,
|
|
62
|
+
ProxyListParams,
|
|
63
|
+
ProxyListResponse,
|
|
64
|
+
ProxyRetrieveResponse,
|
|
65
|
+
ProxyUpdateParams,
|
|
66
|
+
ProxyUpdateResponse,
|
|
67
|
+
} from './resources/proxies';
|
|
36
68
|
import {
|
|
37
69
|
CredentialListParams,
|
|
38
70
|
CredentialListResponse,
|
|
@@ -44,6 +76,7 @@ import {
|
|
|
44
76
|
DeviceCreateParams,
|
|
45
77
|
DeviceListParams,
|
|
46
78
|
DeviceListResponse,
|
|
79
|
+
DeviceSetNameParams,
|
|
47
80
|
DeviceTerminateParams,
|
|
48
81
|
Devices,
|
|
49
82
|
} from './resources/devices/devices';
|
|
@@ -58,6 +91,9 @@ import {
|
|
|
58
91
|
TaskRunParams,
|
|
59
92
|
TaskRunResponse,
|
|
60
93
|
TaskRunStreamedParams,
|
|
94
|
+
TaskRunStreamedResponse,
|
|
95
|
+
TaskSendMessageParams,
|
|
96
|
+
TaskSendMessageResponse,
|
|
61
97
|
TaskStatus,
|
|
62
98
|
TaskStopResponse,
|
|
63
99
|
Tasks,
|
|
@@ -262,8 +298,8 @@ export class Mobilerun {
|
|
|
262
298
|
return buildHeaders([{ Authorization: `Bearer ${this.apiKey}` }]);
|
|
263
299
|
}
|
|
264
300
|
|
|
265
|
-
protected stringifyQuery(query: Record<string, unknown>): string {
|
|
266
|
-
return
|
|
301
|
+
protected stringifyQuery(query: object | Record<string, unknown>): string {
|
|
302
|
+
return stringifyQuery(query);
|
|
267
303
|
}
|
|
268
304
|
|
|
269
305
|
private getUserAgent(): string {
|
|
@@ -295,12 +331,13 @@ export class Mobilerun {
|
|
|
295
331
|
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
|
|
296
332
|
|
|
297
333
|
const defaultQuery = this.defaultQuery();
|
|
298
|
-
|
|
299
|
-
|
|
334
|
+
const pathQuery = Object.fromEntries(url.searchParams);
|
|
335
|
+
if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
|
|
336
|
+
query = { ...pathQuery, ...defaultQuery, ...query };
|
|
300
337
|
}
|
|
301
338
|
|
|
302
339
|
if (typeof query === 'object' && query && !Array.isArray(query)) {
|
|
303
|
-
url.search = this.stringifyQuery(query
|
|
340
|
+
url.search = this.stringifyQuery(query);
|
|
304
341
|
}
|
|
305
342
|
|
|
306
343
|
return url.toString();
|
|
@@ -605,9 +642,9 @@ export class Mobilerun {
|
|
|
605
642
|
}
|
|
606
643
|
}
|
|
607
644
|
|
|
608
|
-
// If the API asks us to wait a certain amount of time
|
|
609
|
-
//
|
|
610
|
-
if (
|
|
645
|
+
// If the API asks us to wait a certain amount of time, just do what it
|
|
646
|
+
// says, but otherwise calculate a default
|
|
647
|
+
if (timeoutMillis === undefined) {
|
|
611
648
|
const maxRetries = options.maxRetries ?? this.maxRetries;
|
|
612
649
|
timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
|
|
613
650
|
}
|
|
@@ -739,7 +776,7 @@ export class Mobilerun {
|
|
|
739
776
|
) {
|
|
740
777
|
return {
|
|
741
778
|
bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
|
|
742
|
-
body: this.stringifyQuery(body
|
|
779
|
+
body: this.stringifyQuery(body),
|
|
743
780
|
};
|
|
744
781
|
} else {
|
|
745
782
|
return this.#encoder({ body, headers });
|
|
@@ -765,15 +802,32 @@ export class Mobilerun {
|
|
|
765
802
|
|
|
766
803
|
static toFile = Uploads.toFile;
|
|
767
804
|
|
|
805
|
+
/**
|
|
806
|
+
* Tasks API
|
|
807
|
+
*/
|
|
768
808
|
tasks: API.Tasks = new API.Tasks(this);
|
|
809
|
+
/**
|
|
810
|
+
* Agents API
|
|
811
|
+
*/
|
|
812
|
+
agents: API.Agents = new API.Agents(this);
|
|
813
|
+
proxies: API.Proxies = new API.Proxies(this);
|
|
814
|
+
carriers: API.Carriers = new API.Carriers(this);
|
|
815
|
+
profiles: API.Profiles = new API.Profiles(this);
|
|
769
816
|
devices: API.Devices = new API.Devices(this);
|
|
770
817
|
apps: API.Apps = new API.Apps(this);
|
|
771
818
|
credentials: API.Credentials = new API.Credentials(this);
|
|
819
|
+
/**
|
|
820
|
+
* Webhooks API
|
|
821
|
+
*/
|
|
772
822
|
hooks: API.Hooks = new API.Hooks(this);
|
|
773
823
|
models: API.Models = new API.Models(this);
|
|
774
824
|
}
|
|
775
825
|
|
|
776
826
|
Mobilerun.Tasks = Tasks;
|
|
827
|
+
Mobilerun.Agents = Agents;
|
|
828
|
+
Mobilerun.Proxies = Proxies;
|
|
829
|
+
Mobilerun.Carriers = Carriers;
|
|
830
|
+
Mobilerun.Profiles = Profiles;
|
|
777
831
|
Mobilerun.Devices = Devices;
|
|
778
832
|
Mobilerun.Apps = Apps;
|
|
779
833
|
Mobilerun.Credentials = Credentials;
|
|
@@ -794,10 +848,49 @@ export declare namespace Mobilerun {
|
|
|
794
848
|
type TaskGetStatusResponse as TaskGetStatusResponse,
|
|
795
849
|
type TaskGetTrajectoryResponse as TaskGetTrajectoryResponse,
|
|
796
850
|
type TaskRunResponse as TaskRunResponse,
|
|
851
|
+
type TaskRunStreamedResponse as TaskRunStreamedResponse,
|
|
852
|
+
type TaskSendMessageResponse as TaskSendMessageResponse,
|
|
797
853
|
type TaskStopResponse as TaskStopResponse,
|
|
798
854
|
type TaskListParams as TaskListParams,
|
|
799
855
|
type TaskRunParams as TaskRunParams,
|
|
800
856
|
type TaskRunStreamedParams as TaskRunStreamedParams,
|
|
857
|
+
type TaskSendMessageParams as TaskSendMessageParams,
|
|
858
|
+
};
|
|
859
|
+
|
|
860
|
+
export { Agents as Agents, type AgentListResponse as AgentListResponse };
|
|
861
|
+
|
|
862
|
+
export {
|
|
863
|
+
Proxies as Proxies,
|
|
864
|
+
type ProxyConfig as ProxyConfig,
|
|
865
|
+
type ProxyCreateResponse as ProxyCreateResponse,
|
|
866
|
+
type ProxyRetrieveResponse as ProxyRetrieveResponse,
|
|
867
|
+
type ProxyUpdateResponse as ProxyUpdateResponse,
|
|
868
|
+
type ProxyListResponse as ProxyListResponse,
|
|
869
|
+
type ProxyDeleteResponse as ProxyDeleteResponse,
|
|
870
|
+
type ProxyCreateParams as ProxyCreateParams,
|
|
871
|
+
type ProxyUpdateParams as ProxyUpdateParams,
|
|
872
|
+
type ProxyListParams as ProxyListParams,
|
|
873
|
+
};
|
|
874
|
+
|
|
875
|
+
export {
|
|
876
|
+
Carriers as Carriers,
|
|
877
|
+
type Carrier as Carrier,
|
|
878
|
+
type CarrierListResponse as CarrierListResponse,
|
|
879
|
+
type CarrierDeleteResponse as CarrierDeleteResponse,
|
|
880
|
+
type CarrierCreateParams as CarrierCreateParams,
|
|
881
|
+
type CarrierUpdateParams as CarrierUpdateParams,
|
|
882
|
+
type CarrierListParams as CarrierListParams,
|
|
883
|
+
type CarrierLookupParams as CarrierLookupParams,
|
|
884
|
+
};
|
|
885
|
+
|
|
886
|
+
export {
|
|
887
|
+
Profiles as Profiles,
|
|
888
|
+
type Profile as Profile,
|
|
889
|
+
type ProfileListResponse as ProfileListResponse,
|
|
890
|
+
type ProfileDeleteResponse as ProfileDeleteResponse,
|
|
891
|
+
type ProfileCreateParams as ProfileCreateParams,
|
|
892
|
+
type ProfileUpdateParams as ProfileUpdateParams,
|
|
893
|
+
type ProfileListParams as ProfileListParams,
|
|
801
894
|
};
|
|
802
895
|
|
|
803
896
|
export {
|
|
@@ -807,6 +900,7 @@ export declare namespace Mobilerun {
|
|
|
807
900
|
type DeviceCountResponse as DeviceCountResponse,
|
|
808
901
|
type DeviceCreateParams as DeviceCreateParams,
|
|
809
902
|
type DeviceListParams as DeviceListParams,
|
|
903
|
+
type DeviceSetNameParams as DeviceSetNameParams,
|
|
810
904
|
type DeviceTerminateParams as DeviceTerminateParams,
|
|
811
905
|
};
|
|
812
906
|
|
|
@@ -834,4 +928,12 @@ export declare namespace Mobilerun {
|
|
|
834
928
|
};
|
|
835
929
|
|
|
836
930
|
export { Models as Models, type ModelListResponse as ModelListResponse };
|
|
931
|
+
|
|
932
|
+
export type DeviceCarrier = API.DeviceCarrier;
|
|
933
|
+
export type DeviceIdentifiers = API.DeviceIdentifiers;
|
|
934
|
+
export type DeviceSpec = API.DeviceSpec;
|
|
935
|
+
export type Meta = API.Meta;
|
|
936
|
+
export type Pagination = API.Pagination;
|
|
937
|
+
export type PaginationMeta = API.PaginationMeta;
|
|
938
|
+
export type PermissionSet = API.PermissionSet;
|
|
837
939
|
}
|
|
@@ -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()
|
|
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
|
};
|
package/src/internal/utils.ts
CHANGED
|
@@ -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 { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Agents API
|
|
9
|
+
*/
|
|
10
|
+
export class Agents extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* List all available agents with their default configurations.
|
|
13
|
+
*/
|
|
14
|
+
list(options?: RequestOptions): APIPromise<AgentListResponse> {
|
|
15
|
+
return this._client.get('/agents', options);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type AgentListResponse = Array<AgentListResponse.AgentListResponseItem>;
|
|
20
|
+
|
|
21
|
+
export namespace AgentListResponse {
|
|
22
|
+
export interface AgentListResponseItem {
|
|
23
|
+
id: number;
|
|
24
|
+
|
|
25
|
+
description: string | null;
|
|
26
|
+
|
|
27
|
+
icon: string;
|
|
28
|
+
|
|
29
|
+
llmModel: string;
|
|
30
|
+
|
|
31
|
+
maxSteps: number;
|
|
32
|
+
|
|
33
|
+
name: string;
|
|
34
|
+
|
|
35
|
+
reasoning: boolean;
|
|
36
|
+
|
|
37
|
+
subagentModel: string | null;
|
|
38
|
+
|
|
39
|
+
vision: boolean;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export declare namespace Agents {
|
|
44
|
+
export { type AgentListResponse as AgentListResponse };
|
|
45
|
+
}
|
package/src/resources/apps.ts
CHANGED
|
@@ -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
|
|
|
@@ -18,7 +19,7 @@ export interface AppListResponse {
|
|
|
18
19
|
|
|
19
20
|
items: Array<AppListResponse.Item>;
|
|
20
21
|
|
|
21
|
-
pagination:
|
|
22
|
+
pagination: Shared.Pagination;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
export namespace AppListResponse {
|
|
@@ -291,8 +292,7 @@ export namespace AppListResponse {
|
|
|
291
292
|
| 'YE'
|
|
292
293
|
| 'ZM'
|
|
293
294
|
| 'ZW'
|
|
294
|
-
| 'AX'
|
|
295
|
-
| null;
|
|
295
|
+
| 'AX';
|
|
296
296
|
|
|
297
297
|
createdAt: string | null;
|
|
298
298
|
|
|
@@ -302,7 +302,7 @@ export namespace AppListResponse {
|
|
|
302
302
|
|
|
303
303
|
displayName: string;
|
|
304
304
|
|
|
305
|
-
|
|
305
|
+
expectedFiles: string | number | boolean | { [key: string]: unknown } | Array<unknown> | null;
|
|
306
306
|
|
|
307
307
|
iconURL: string;
|
|
308
308
|
|
|
@@ -320,30 +320,22 @@ export namespace AppListResponse {
|
|
|
320
320
|
|
|
321
321
|
source: 'uploaded' | 'store';
|
|
322
322
|
|
|
323
|
+
status: 'queued' | 'available' | 'failed';
|
|
324
|
+
|
|
325
|
+
stealthTier: 'tier1' | 'tier2' | 'tier3' | null;
|
|
326
|
+
|
|
323
327
|
targetSdk: number | null;
|
|
324
328
|
|
|
329
|
+
type: 'android' | 'ios';
|
|
330
|
+
|
|
325
331
|
updatedAt: string | null;
|
|
326
332
|
|
|
327
333
|
userId: string | null;
|
|
328
334
|
|
|
329
|
-
versionCode: number
|
|
335
|
+
versionCode: number;
|
|
330
336
|
|
|
331
337
|
versionName: string;
|
|
332
338
|
}
|
|
333
|
-
|
|
334
|
-
export interface Pagination {
|
|
335
|
-
hasNext: boolean;
|
|
336
|
-
|
|
337
|
-
hasPrev: boolean;
|
|
338
|
-
|
|
339
|
-
page: number;
|
|
340
|
-
|
|
341
|
-
pages: number;
|
|
342
|
-
|
|
343
|
-
pageSize: number;
|
|
344
|
-
|
|
345
|
-
total: number;
|
|
346
|
-
}
|
|
347
339
|
}
|
|
348
340
|
|
|
349
341
|
export interface AppListParams {
|
|
@@ -0,0 +1,327 @@
|
|
|
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 Carriers extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Create a new carrier
|
|
12
|
+
*/
|
|
13
|
+
create(body: CarrierCreateParams, options?: RequestOptions): APIPromise<Carrier> {
|
|
14
|
+
return this._client.post('/carriers', { body, ...options });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Get carrier by ID
|
|
19
|
+
*/
|
|
20
|
+
retrieve(carrierID: number, options?: RequestOptions): APIPromise<Carrier> {
|
|
21
|
+
return this._client.get(path`/carriers/${carrierID}`, options);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Update a carrier
|
|
26
|
+
*/
|
|
27
|
+
update(carrierID: number, body: CarrierUpdateParams, options?: RequestOptions): APIPromise<Carrier> {
|
|
28
|
+
return this._client.patch(path`/carriers/${carrierID}`, { body, ...options });
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* List carriers with pagination
|
|
33
|
+
*/
|
|
34
|
+
list(
|
|
35
|
+
query: CarrierListParams | null | undefined = {},
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): APIPromise<CarrierListResponse> {
|
|
38
|
+
return this._client.get('/carriers', { query, ...options });
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Delete a carrier
|
|
43
|
+
*/
|
|
44
|
+
delete(carrierID: number, options?: RequestOptions): APIPromise<CarrierDeleteResponse> {
|
|
45
|
+
return this._client.delete(path`/carriers/${carrierID}`, options);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Get carrier by MCC and MNC
|
|
50
|
+
*/
|
|
51
|
+
lookup(query: CarrierLookupParams, options?: RequestOptions): APIPromise<Carrier> {
|
|
52
|
+
return this._client.get('/carriers/lookup', { query, ...options });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface Carrier {
|
|
57
|
+
id: number;
|
|
58
|
+
|
|
59
|
+
company: string;
|
|
60
|
+
|
|
61
|
+
country: string;
|
|
62
|
+
|
|
63
|
+
country_code: string;
|
|
64
|
+
|
|
65
|
+
country_iso: string;
|
|
66
|
+
|
|
67
|
+
created_at: string;
|
|
68
|
+
|
|
69
|
+
detail_url: string;
|
|
70
|
+
|
|
71
|
+
gsm_bands: string;
|
|
72
|
+
|
|
73
|
+
lte_bands: string;
|
|
74
|
+
|
|
75
|
+
mcc: string;
|
|
76
|
+
|
|
77
|
+
mnc: string;
|
|
78
|
+
|
|
79
|
+
mobile_prefix: string;
|
|
80
|
+
|
|
81
|
+
nsn_size: string;
|
|
82
|
+
|
|
83
|
+
number_format: string;
|
|
84
|
+
|
|
85
|
+
operator: string;
|
|
86
|
+
|
|
87
|
+
protocols: string;
|
|
88
|
+
|
|
89
|
+
umts_bands: string;
|
|
90
|
+
|
|
91
|
+
website: string;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* A URL to the JSON Schema for this object.
|
|
95
|
+
*/
|
|
96
|
+
$schema?: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface CarrierListResponse {
|
|
100
|
+
items: Array<Carrier> | null;
|
|
101
|
+
|
|
102
|
+
pagination: Shared.Meta;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* A URL to the JSON Schema for this object.
|
|
106
|
+
*/
|
|
107
|
+
$schema?: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface CarrierDeleteResponse {
|
|
111
|
+
message: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* A URL to the JSON Schema for this object.
|
|
115
|
+
*/
|
|
116
|
+
$schema?: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface CarrierCreateParams {
|
|
120
|
+
/**
|
|
121
|
+
* Country name
|
|
122
|
+
*/
|
|
123
|
+
country: string;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Mobile Country Code
|
|
127
|
+
*/
|
|
128
|
+
mcc: string;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Mobile Network Code
|
|
132
|
+
*/
|
|
133
|
+
mnc: string;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Operator name
|
|
137
|
+
*/
|
|
138
|
+
operator: string;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Company name
|
|
142
|
+
*/
|
|
143
|
+
company?: string;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Country dialing code (e.g., +1)
|
|
147
|
+
*/
|
|
148
|
+
country_code?: string;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* ISO country code
|
|
152
|
+
*/
|
|
153
|
+
country_iso?: string;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* URL to carrier details page
|
|
157
|
+
*/
|
|
158
|
+
detail_url?: string;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Supported GSM bands
|
|
162
|
+
*/
|
|
163
|
+
gsm_bands?: string;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Supported LTE bands
|
|
167
|
+
*/
|
|
168
|
+
lte_bands?: string;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Mobile number prefix
|
|
172
|
+
*/
|
|
173
|
+
mobile_prefix?: string;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* National Significant Number size
|
|
177
|
+
*/
|
|
178
|
+
nsn_size?: string;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Phone number format
|
|
182
|
+
*/
|
|
183
|
+
number_format?: string;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Supported protocols (comma-separated)
|
|
187
|
+
*/
|
|
188
|
+
protocols?: string;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Supported UMTS bands
|
|
192
|
+
*/
|
|
193
|
+
umts_bands?: string;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Company website
|
|
197
|
+
*/
|
|
198
|
+
website?: string;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export interface CarrierUpdateParams {
|
|
202
|
+
/**
|
|
203
|
+
* Company name
|
|
204
|
+
*/
|
|
205
|
+
company?: string;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Country name
|
|
209
|
+
*/
|
|
210
|
+
country?: string;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Country dialing code
|
|
214
|
+
*/
|
|
215
|
+
country_code?: string;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* ISO country code
|
|
219
|
+
*/
|
|
220
|
+
country_iso?: string;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* URL to carrier details
|
|
224
|
+
*/
|
|
225
|
+
detail_url?: string;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Supported GSM bands
|
|
229
|
+
*/
|
|
230
|
+
gsm_bands?: string;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Supported LTE bands
|
|
234
|
+
*/
|
|
235
|
+
lte_bands?: string;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Mobile number prefix
|
|
239
|
+
*/
|
|
240
|
+
mobile_prefix?: string;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* NSN size
|
|
244
|
+
*/
|
|
245
|
+
nsn_size?: string;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Phone number format
|
|
249
|
+
*/
|
|
250
|
+
number_format?: string;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Operator name
|
|
254
|
+
*/
|
|
255
|
+
operator?: string;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Supported protocols
|
|
259
|
+
*/
|
|
260
|
+
protocols?: string;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Supported UMTS bands
|
|
264
|
+
*/
|
|
265
|
+
umts_bands?: string;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Company website
|
|
269
|
+
*/
|
|
270
|
+
website?: string;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export interface CarrierListParams {
|
|
274
|
+
/**
|
|
275
|
+
* Filter by country name
|
|
276
|
+
*/
|
|
277
|
+
country?: string;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Filter by country ISO code
|
|
281
|
+
*/
|
|
282
|
+
countryISO?: string;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Field to order by
|
|
286
|
+
*/
|
|
287
|
+
orderBy?: 'id' | 'mcc' | 'mnc' | 'operator' | 'country' | 'country_iso';
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Order direction
|
|
291
|
+
*/
|
|
292
|
+
orderDir?: 'asc' | 'desc';
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Page number
|
|
296
|
+
*/
|
|
297
|
+
page?: number;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Items per page
|
|
301
|
+
*/
|
|
302
|
+
pageSize?: number;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export interface CarrierLookupParams {
|
|
306
|
+
/**
|
|
307
|
+
* Mobile Country Code
|
|
308
|
+
*/
|
|
309
|
+
mcc: string;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Mobile Network Code
|
|
313
|
+
*/
|
|
314
|
+
mnc: string;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export declare namespace Carriers {
|
|
318
|
+
export {
|
|
319
|
+
type Carrier as Carrier,
|
|
320
|
+
type CarrierListResponse as CarrierListResponse,
|
|
321
|
+
type CarrierDeleteResponse as CarrierDeleteResponse,
|
|
322
|
+
type CarrierCreateParams as CarrierCreateParams,
|
|
323
|
+
type CarrierUpdateParams as CarrierUpdateParams,
|
|
324
|
+
type CarrierListParams as CarrierListParams,
|
|
325
|
+
type CarrierLookupParams as CarrierLookupParams,
|
|
326
|
+
};
|
|
327
|
+
}
|