@mobilerun/sdk 2.2.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +243 -0
- package/README.md +44 -0
- package/client.d.mts +32 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +32 -3
- 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/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 +29 -0
- package/resources/agents.d.mts.map +1 -0
- package/resources/agents.d.ts +29 -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 +40 -38
- package/resources/devices/devices.d.mts.map +1 -1
- package/resources/devices/devices.d.ts +40 -38
- package/resources/devices/devices.d.ts.map +1 -1
- package/resources/devices/devices.js +22 -2
- package/resources/devices/devices.js.map +1 -1
- package/resources/devices/devices.mjs +23 -3
- package/resources/devices/devices.mjs.map +1 -1
- 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 +7 -2
- package/resources/devices/index.d.mts.map +1 -1
- package/resources/devices/index.d.ts +7 -2
- package/resources/devices/index.d.ts.map +1 -1
- package/resources/devices/index.js +11 -1
- package/resources/devices/index.js.map +1 -1
- package/resources/devices/index.mjs +6 -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 +61 -0
- package/resources/devices/proxy.d.mts.map +1 -0
- package/resources/devices/proxy.d.ts +61 -0
- package/resources/devices/proxy.d.ts.map +1 -0
- package/resources/devices/proxy.js +48 -0
- package/resources/devices/proxy.js.map +1 -0
- package/resources/devices/proxy.mjs +44 -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 +59 -0
- package/resources/devices/time.d.mts.map +1 -0
- package/resources/devices/time.d.ts +59 -0
- package/resources/devices/time.d.ts.map +1 -0
- package/resources/devices/time.js +83 -0
- package/resources/devices/time.js.map +1 -0
- package/resources/devices/time.mjs +79 -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 +6 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -1
- 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 +72 -0
- package/resources/proxies.d.mts.map +1 -0
- package/resources/proxies.d.ts +72 -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 +95 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +95 -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 +89 -59
- package/resources/tasks/tasks.d.mts.map +1 -1
- package/resources/tasks/tasks.d.ts +89 -59
- 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 +109 -10
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils.ts +1 -0
- package/src/resources/agents.ts +43 -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 +107 -61
- package/src/resources/devices/files.ts +221 -0
- package/src/resources/devices/index.ts +37 -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 +115 -0
- package/src/resources/devices/state.ts +10 -44
- package/src/resources/devices/tasks.ts +2 -15
- package/src/resources/devices/time.ts +147 -0
- package/src/resources/hooks.ts +5 -36
- package/src/resources/index.ts +35 -0
- package/src/resources/profiles.ts +133 -0
- package/src/resources/proxies.ts +130 -0
- package/src/resources/shared.ts +149 -0
- package/src/resources/tasks/index.ts +3 -0
- package/src/resources/tasks/screenshots.ts +3 -0
- package/src/resources/tasks/tasks.ts +112 -67
- 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
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,26 @@ 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
|
+
ProxyListResponse,
|
|
63
|
+
ProxyRetrieveResponse,
|
|
64
|
+
ProxyUpdateParams,
|
|
65
|
+
ProxyUpdateResponse,
|
|
66
|
+
} from './resources/proxies';
|
|
36
67
|
import {
|
|
37
68
|
CredentialListParams,
|
|
38
69
|
CredentialListResponse,
|
|
@@ -58,6 +89,9 @@ import {
|
|
|
58
89
|
TaskRunParams,
|
|
59
90
|
TaskRunResponse,
|
|
60
91
|
TaskRunStreamedParams,
|
|
92
|
+
TaskRunStreamedResponse,
|
|
93
|
+
TaskSendMessageParams,
|
|
94
|
+
TaskSendMessageResponse,
|
|
61
95
|
TaskStatus,
|
|
62
96
|
TaskStopResponse,
|
|
63
97
|
Tasks,
|
|
@@ -262,8 +296,8 @@ export class Mobilerun {
|
|
|
262
296
|
return buildHeaders([{ Authorization: `Bearer ${this.apiKey}` }]);
|
|
263
297
|
}
|
|
264
298
|
|
|
265
|
-
protected stringifyQuery(query: Record<string, unknown>): string {
|
|
266
|
-
return
|
|
299
|
+
protected stringifyQuery(query: object | Record<string, unknown>): string {
|
|
300
|
+
return stringifyQuery(query);
|
|
267
301
|
}
|
|
268
302
|
|
|
269
303
|
private getUserAgent(): string {
|
|
@@ -295,12 +329,13 @@ export class Mobilerun {
|
|
|
295
329
|
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
|
|
296
330
|
|
|
297
331
|
const defaultQuery = this.defaultQuery();
|
|
298
|
-
|
|
299
|
-
|
|
332
|
+
const pathQuery = Object.fromEntries(url.searchParams);
|
|
333
|
+
if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
|
|
334
|
+
query = { ...pathQuery, ...defaultQuery, ...query };
|
|
300
335
|
}
|
|
301
336
|
|
|
302
337
|
if (typeof query === 'object' && query && !Array.isArray(query)) {
|
|
303
|
-
url.search = this.stringifyQuery(query
|
|
338
|
+
url.search = this.stringifyQuery(query);
|
|
304
339
|
}
|
|
305
340
|
|
|
306
341
|
return url.toString();
|
|
@@ -605,9 +640,9 @@ export class Mobilerun {
|
|
|
605
640
|
}
|
|
606
641
|
}
|
|
607
642
|
|
|
608
|
-
// If the API asks us to wait a certain amount of time
|
|
609
|
-
//
|
|
610
|
-
if (
|
|
643
|
+
// If the API asks us to wait a certain amount of time, just do what it
|
|
644
|
+
// says, but otherwise calculate a default
|
|
645
|
+
if (timeoutMillis === undefined) {
|
|
611
646
|
const maxRetries = options.maxRetries ?? this.maxRetries;
|
|
612
647
|
timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
|
|
613
648
|
}
|
|
@@ -739,7 +774,7 @@ export class Mobilerun {
|
|
|
739
774
|
) {
|
|
740
775
|
return {
|
|
741
776
|
bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
|
|
742
|
-
body: this.stringifyQuery(body
|
|
777
|
+
body: this.stringifyQuery(body),
|
|
743
778
|
};
|
|
744
779
|
} else {
|
|
745
780
|
return this.#encoder({ body, headers });
|
|
@@ -765,15 +800,32 @@ export class Mobilerun {
|
|
|
765
800
|
|
|
766
801
|
static toFile = Uploads.toFile;
|
|
767
802
|
|
|
803
|
+
/**
|
|
804
|
+
* Tasks API
|
|
805
|
+
*/
|
|
768
806
|
tasks: API.Tasks = new API.Tasks(this);
|
|
807
|
+
/**
|
|
808
|
+
* Agents API
|
|
809
|
+
*/
|
|
810
|
+
agents: API.Agents = new API.Agents(this);
|
|
811
|
+
proxies: API.Proxies = new API.Proxies(this);
|
|
812
|
+
carriers: API.Carriers = new API.Carriers(this);
|
|
813
|
+
profiles: API.Profiles = new API.Profiles(this);
|
|
769
814
|
devices: API.Devices = new API.Devices(this);
|
|
770
815
|
apps: API.Apps = new API.Apps(this);
|
|
771
816
|
credentials: API.Credentials = new API.Credentials(this);
|
|
817
|
+
/**
|
|
818
|
+
* Webhooks API
|
|
819
|
+
*/
|
|
772
820
|
hooks: API.Hooks = new API.Hooks(this);
|
|
773
821
|
models: API.Models = new API.Models(this);
|
|
774
822
|
}
|
|
775
823
|
|
|
776
824
|
Mobilerun.Tasks = Tasks;
|
|
825
|
+
Mobilerun.Agents = Agents;
|
|
826
|
+
Mobilerun.Proxies = Proxies;
|
|
827
|
+
Mobilerun.Carriers = Carriers;
|
|
828
|
+
Mobilerun.Profiles = Profiles;
|
|
777
829
|
Mobilerun.Devices = Devices;
|
|
778
830
|
Mobilerun.Apps = Apps;
|
|
779
831
|
Mobilerun.Credentials = Credentials;
|
|
@@ -794,10 +846,48 @@ export declare namespace Mobilerun {
|
|
|
794
846
|
type TaskGetStatusResponse as TaskGetStatusResponse,
|
|
795
847
|
type TaskGetTrajectoryResponse as TaskGetTrajectoryResponse,
|
|
796
848
|
type TaskRunResponse as TaskRunResponse,
|
|
849
|
+
type TaskRunStreamedResponse as TaskRunStreamedResponse,
|
|
850
|
+
type TaskSendMessageResponse as TaskSendMessageResponse,
|
|
797
851
|
type TaskStopResponse as TaskStopResponse,
|
|
798
852
|
type TaskListParams as TaskListParams,
|
|
799
853
|
type TaskRunParams as TaskRunParams,
|
|
800
854
|
type TaskRunStreamedParams as TaskRunStreamedParams,
|
|
855
|
+
type TaskSendMessageParams as TaskSendMessageParams,
|
|
856
|
+
};
|
|
857
|
+
|
|
858
|
+
export { Agents as Agents, type AgentListResponse as AgentListResponse };
|
|
859
|
+
|
|
860
|
+
export {
|
|
861
|
+
Proxies as Proxies,
|
|
862
|
+
type ProxyConfig as ProxyConfig,
|
|
863
|
+
type ProxyCreateResponse as ProxyCreateResponse,
|
|
864
|
+
type ProxyRetrieveResponse as ProxyRetrieveResponse,
|
|
865
|
+
type ProxyUpdateResponse as ProxyUpdateResponse,
|
|
866
|
+
type ProxyListResponse as ProxyListResponse,
|
|
867
|
+
type ProxyDeleteResponse as ProxyDeleteResponse,
|
|
868
|
+
type ProxyCreateParams as ProxyCreateParams,
|
|
869
|
+
type ProxyUpdateParams as ProxyUpdateParams,
|
|
870
|
+
};
|
|
871
|
+
|
|
872
|
+
export {
|
|
873
|
+
Carriers as Carriers,
|
|
874
|
+
type Carrier as Carrier,
|
|
875
|
+
type CarrierListResponse as CarrierListResponse,
|
|
876
|
+
type CarrierDeleteResponse as CarrierDeleteResponse,
|
|
877
|
+
type CarrierCreateParams as CarrierCreateParams,
|
|
878
|
+
type CarrierUpdateParams as CarrierUpdateParams,
|
|
879
|
+
type CarrierListParams as CarrierListParams,
|
|
880
|
+
type CarrierLookupParams as CarrierLookupParams,
|
|
881
|
+
};
|
|
882
|
+
|
|
883
|
+
export {
|
|
884
|
+
Profiles as Profiles,
|
|
885
|
+
type Profile as Profile,
|
|
886
|
+
type ProfileListResponse as ProfileListResponse,
|
|
887
|
+
type ProfileDeleteResponse as ProfileDeleteResponse,
|
|
888
|
+
type ProfileCreateParams as ProfileCreateParams,
|
|
889
|
+
type ProfileUpdateParams as ProfileUpdateParams,
|
|
890
|
+
type ProfileListParams as ProfileListParams,
|
|
801
891
|
};
|
|
802
892
|
|
|
803
893
|
export {
|
|
@@ -834,4 +924,13 @@ export declare namespace Mobilerun {
|
|
|
834
924
|
};
|
|
835
925
|
|
|
836
926
|
export { Models as Models, type ModelListResponse as ModelListResponse };
|
|
927
|
+
|
|
928
|
+
export type Config = API.Config;
|
|
929
|
+
export type DeviceCarrier = API.DeviceCarrier;
|
|
930
|
+
export type DeviceIdentifiers = API.DeviceIdentifiers;
|
|
931
|
+
export type DeviceSpec = API.DeviceSpec;
|
|
932
|
+
export type Meta = API.Meta;
|
|
933
|
+
export type Pagination = API.Pagination;
|
|
934
|
+
export type PaginationMeta = API.PaginationMeta;
|
|
935
|
+
export type PermissionSet = API.PermissionSet;
|
|
837
936
|
}
|
package/src/internal/utils.ts
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
vision: boolean;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export declare namespace Agents {
|
|
42
|
+
export { type AgentListResponse as AgentListResponse };
|
|
43
|
+
}
|
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
|
+
}
|
|
@@ -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 * as PackagesAPI from './packages/packages';
|
|
5
6
|
import {
|
|
6
7
|
PackageCreateParams,
|
|
@@ -8,7 +9,7 @@ import {
|
|
|
8
9
|
PackageListResponse,
|
|
9
10
|
Packages,
|
|
10
11
|
} from './packages/packages';
|
|
11
|
-
import * as
|
|
12
|
+
import * as PackagesCredentialsAPI from './packages/credentials/credentials';
|
|
12
13
|
import { APIPromise } from '../../core/api-promise';
|
|
13
14
|
import { RequestOptions } from '../../internal/request-options';
|
|
14
15
|
|
|
@@ -27,25 +28,9 @@ export class Credentials extends APIResource {
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export interface CredentialListResponse {
|
|
30
|
-
items: Array<
|
|
31
|
+
items: Array<PackagesCredentialsAPI.Credential>;
|
|
31
32
|
|
|
32
|
-
pagination:
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export namespace CredentialListResponse {
|
|
36
|
-
export interface Pagination {
|
|
37
|
-
hasNext: boolean;
|
|
38
|
-
|
|
39
|
-
hasPrev: boolean;
|
|
40
|
-
|
|
41
|
-
page: number;
|
|
42
|
-
|
|
43
|
-
pages: number;
|
|
44
|
-
|
|
45
|
-
pageSize: number;
|
|
46
|
-
|
|
47
|
-
total: number;
|
|
48
|
-
}
|
|
33
|
+
pagination: Shared.Pagination;
|
|
49
34
|
}
|
|
50
35
|
|
|
51
36
|
export interface CredentialListParams {
|