@bctrl/sdk 1.0.4 → 1.0.6
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/README.md +72 -72
- package/dist/account.d.ts +43 -0
- package/dist/account.js +100 -0
- package/dist/accountTypes.d.ts +126 -0
- package/dist/accountTypes.js +1 -0
- package/dist/ai.d.ts +23 -0
- package/dist/ai.js +51 -0
- package/dist/aiTypes.d.ts +97 -0
- package/dist/aiTypes.js +1 -0
- package/dist/bctrl.d.ts +35 -3
- package/dist/bctrl.js +74 -6
- package/dist/browserExtensionTypes.d.ts +45 -0
- package/dist/browserExtensionTypes.js +1 -0
- package/dist/browserExtensions.d.ts +14 -0
- package/dist/browserExtensions.js +53 -0
- package/dist/files.d.ts +6 -24
- package/dist/files.js +9 -56
- package/dist/help.d.ts +7 -0
- package/dist/help.js +9 -0
- package/dist/http.d.ts +12 -1
- package/dist/http.js +73 -10
- package/dist/index.d.ts +17 -6
- package/dist/index.js +15 -5
- package/dist/invocations.d.ts +83 -48
- package/dist/invocations.js +141 -102
- package/dist/node.d.ts +12 -0
- package/dist/node.js +11 -0
- package/dist/proxies.d.ts +21 -0
- package/dist/proxies.js +55 -0
- package/dist/proxyTypes.d.ts +119 -0
- package/dist/proxyTypes.js +1 -0
- package/dist/runs.d.ts +35 -31
- package/dist/runs.js +95 -38
- package/dist/runtimes.d.ts +41 -40
- package/dist/runtimes.js +115 -61
- package/dist/schemas.d.ts +7 -0
- package/dist/schemas.js +36 -0
- package/dist/spaces.d.ts +20 -32
- package/dist/spaces.js +48 -36
- package/dist/toolCallTypes.d.ts +41 -0
- package/dist/toolCallTypes.js +1 -0
- package/dist/toolCalls.d.ts +9 -0
- package/dist/toolCalls.js +16 -0
- package/dist/tools.d.ts +23 -0
- package/dist/tools.js +49 -0
- package/dist/toolsetTypes.d.ts +32 -0
- package/dist/toolsetTypes.js +1 -0
- package/dist/toolsets.d.ts +12 -0
- package/dist/toolsets.js +31 -0
- package/dist/types.d.ts +586 -167
- package/dist/utils.d.ts +2 -1
- package/dist/utils.js +28 -3
- package/dist/vault.d.ts +14 -0
- package/dist/vault.js +37 -0
- package/dist/vaultTypes.d.ts +73 -0
- package/dist/vaultTypes.js +1 -0
- package/package.json +46 -37
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
export type V1ProxyProtocol = 'http' | 'socks5';
|
|
2
|
+
export type V1ProxyDnsResolution = 'local' | 'proxy';
|
|
3
|
+
export type V1ProxyType = 'custom' | 'managed-rotating' | 'managed-static';
|
|
4
|
+
export type V1ManagedRotatingPreference = 'balanced' | 'speed' | 'quality' | 'coverage';
|
|
5
|
+
export type V1ManagedRotatingRotation = 'sticky' | 'rotating';
|
|
6
|
+
export type V1ManagedRotatingDevice = 'windows' | 'macos' | 'linux' | 'android' | 'ios';
|
|
7
|
+
export interface V1ProxyBase {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
subaccountId?: string | null;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
}
|
|
14
|
+
export interface V1ManagedRotatingProxyConfig {
|
|
15
|
+
protocol?: V1ProxyProtocol;
|
|
16
|
+
dnsResolution?: V1ProxyDnsResolution;
|
|
17
|
+
ipFamily?: 'dual-stack' | 'ipv4-only';
|
|
18
|
+
preference?: V1ManagedRotatingPreference;
|
|
19
|
+
rotation?: V1ManagedRotatingRotation;
|
|
20
|
+
stickyKey?: string;
|
|
21
|
+
country?: string;
|
|
22
|
+
region?: string;
|
|
23
|
+
state?: string;
|
|
24
|
+
city?: string;
|
|
25
|
+
isp?: string;
|
|
26
|
+
geoStrict?: boolean;
|
|
27
|
+
device?: V1ManagedRotatingDevice;
|
|
28
|
+
deviceStrict?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export type V1Proxy = (V1ProxyBase & {
|
|
31
|
+
type: 'custom';
|
|
32
|
+
protocol: V1ProxyProtocol;
|
|
33
|
+
dnsResolution?: V1ProxyDnsResolution;
|
|
34
|
+
host: string;
|
|
35
|
+
port: number;
|
|
36
|
+
username?: string | null;
|
|
37
|
+
hasPassword: boolean;
|
|
38
|
+
}) | (V1ProxyBase & V1ManagedRotatingProxyConfig & {
|
|
39
|
+
type: 'managed-rotating';
|
|
40
|
+
}) | (V1ProxyBase & {
|
|
41
|
+
type: 'managed-static';
|
|
42
|
+
status: 'provisioning' | 'active' | 'expired' | 'renewal_failed';
|
|
43
|
+
poolId: string;
|
|
44
|
+
autoRenew: boolean;
|
|
45
|
+
assignedIp?: string;
|
|
46
|
+
location?: {
|
|
47
|
+
country: string;
|
|
48
|
+
city?: string;
|
|
49
|
+
};
|
|
50
|
+
expiresAt?: string;
|
|
51
|
+
renewsAt?: string | null;
|
|
52
|
+
pricing?: {
|
|
53
|
+
priceCredits: number;
|
|
54
|
+
termDays: number;
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
export type V1ProxyCreateRequest = {
|
|
58
|
+
type: 'custom';
|
|
59
|
+
name?: string;
|
|
60
|
+
url?: string;
|
|
61
|
+
protocol?: V1ProxyProtocol;
|
|
62
|
+
dnsResolution?: V1ProxyDnsResolution;
|
|
63
|
+
host?: string;
|
|
64
|
+
port?: number;
|
|
65
|
+
username?: string;
|
|
66
|
+
password?: string;
|
|
67
|
+
} | ({
|
|
68
|
+
type: 'managed-rotating';
|
|
69
|
+
name?: string;
|
|
70
|
+
} & V1ManagedRotatingProxyConfig) | {
|
|
71
|
+
type: 'managed-static';
|
|
72
|
+
name?: string;
|
|
73
|
+
poolId: string;
|
|
74
|
+
autoRenew?: boolean;
|
|
75
|
+
};
|
|
76
|
+
export interface V1ProxyUpdateRequest extends Partial<V1ManagedRotatingProxyConfig> {
|
|
77
|
+
name?: string;
|
|
78
|
+
url?: string;
|
|
79
|
+
protocol?: V1ProxyProtocol;
|
|
80
|
+
dnsResolution?: V1ProxyDnsResolution;
|
|
81
|
+
host?: string;
|
|
82
|
+
port?: number;
|
|
83
|
+
username?: string | null;
|
|
84
|
+
password?: string | null;
|
|
85
|
+
autoRenew?: boolean;
|
|
86
|
+
}
|
|
87
|
+
interface V1ProxyPageQuery {
|
|
88
|
+
cursor?: string;
|
|
89
|
+
limit?: number;
|
|
90
|
+
}
|
|
91
|
+
export interface V1ProxyListQuery extends V1ProxyPageQuery {
|
|
92
|
+
}
|
|
93
|
+
export interface V1ProxyDeleteResponse {
|
|
94
|
+
id: string;
|
|
95
|
+
deleted: true;
|
|
96
|
+
}
|
|
97
|
+
export interface V1ProxyTestResponse {
|
|
98
|
+
ok: boolean;
|
|
99
|
+
latencyMs?: number;
|
|
100
|
+
error?: string;
|
|
101
|
+
httpStatus?: number | null;
|
|
102
|
+
exitIp?: string | null;
|
|
103
|
+
country?: string | null;
|
|
104
|
+
}
|
|
105
|
+
export interface V1ProxyPool {
|
|
106
|
+
id: string;
|
|
107
|
+
label: string;
|
|
108
|
+
country: string;
|
|
109
|
+
category: 'tickets' | 'sneakers' | 'social' | 'retail';
|
|
110
|
+
termDays: number;
|
|
111
|
+
priceCredits: number;
|
|
112
|
+
availableCount: number;
|
|
113
|
+
}
|
|
114
|
+
export interface V1ProxyPoolListQuery extends V1ProxyPageQuery {
|
|
115
|
+
country?: string;
|
|
116
|
+
category?: V1ProxyPool['category'];
|
|
117
|
+
available?: boolean;
|
|
118
|
+
}
|
|
119
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/runs.d.ts
CHANGED
|
@@ -1,40 +1,44 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { type V1HttpClient, type V1IdempotencyOptions } from './http.js';
|
|
2
|
+
import type { V1ListEnvelope, V1File, V1InvocationSummary, V1Run, V1RunEvent, V1RunEventsListQuery, V1RunListQuery, V1RunLiveRequest, V1RunLiveResponse, V1RunRecordingRequest, V1RunRecordingResponse, V1RunActivityItem, V1RunActivityListQuery, V1RunFilesExportRequest, V1RunFilesListQuery, V1RunInvocationsListQuery, V1RunUsage } from './types.js';
|
|
3
|
+
export declare class V1RunsClient {
|
|
4
|
+
private readonly http;
|
|
5
|
+
readonly events: V1RunEventsNamespaceClient;
|
|
6
|
+
readonly activity: V1RunActivityNamespaceClient;
|
|
7
|
+
readonly files: V1RunFilesNamespaceClient;
|
|
8
|
+
readonly invocations: V1RunInvocationsNamespaceClient;
|
|
9
|
+
constructor(http: V1HttpClient);
|
|
10
|
+
list(query?: V1RunListQuery): Promise<V1ListEnvelope<V1Run>>;
|
|
11
|
+
iter(query?: V1RunListQuery): AsyncGenerator<V1Run, void, undefined>;
|
|
12
|
+
get(id: string): Promise<V1Run>;
|
|
13
|
+
usage(id: string): Promise<V1RunUsage>;
|
|
14
|
+
live(id: string, request?: V1RunLiveRequest): Promise<V1RunLiveResponse>;
|
|
15
|
+
recording(id: string, request?: V1RunRecordingRequest): Promise<V1RunRecordingResponse>;
|
|
16
|
+
}
|
|
17
|
+
export declare class V1RunEventsNamespaceClient {
|
|
5
18
|
private readonly http;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
wait(request?: V1RunEventsWaitRequest): Promise<V1RunEventsWaitResponse>;
|
|
11
|
-
streamUrl(query?: Pick<V1RunEventsListQuery, 'type' | 'category' | 'connectionId'>): string;
|
|
19
|
+
constructor(http: V1HttpClient);
|
|
20
|
+
list(runId: string, query?: V1RunEventsListQuery): Promise<V1ListEnvelope<V1RunEvent>>;
|
|
21
|
+
iter(runId: string, query?: V1RunEventsListQuery): AsyncGenerator<V1RunEvent, void, undefined>;
|
|
22
|
+
streamUrl(runId: string, query?: Pick<V1RunEventsListQuery, 'type' | 'status' | 'pageId' | 'contextId'>): string;
|
|
12
23
|
}
|
|
13
|
-
export declare class
|
|
24
|
+
export declare class V1RunActivityNamespaceClient {
|
|
14
25
|
private readonly http;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
constructor(http: V1HttpClient);
|
|
27
|
+
list(runId: string, query?: V1RunActivityListQuery): Promise<V1ListEnvelope<V1RunActivityItem>>;
|
|
28
|
+
iter(runId: string, query?: V1RunActivityListQuery): AsyncGenerator<V1RunActivityItem, void, undefined>;
|
|
29
|
+
streamUrl(runId: string, query?: V1RunActivityListQuery): string;
|
|
19
30
|
}
|
|
20
|
-
export declare class
|
|
31
|
+
export declare class V1RunFilesNamespaceClient {
|
|
21
32
|
private readonly http;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
constructor(http: V1HttpClient, data: V1Run | V1RuntimeStartRun);
|
|
27
|
-
get id(): string;
|
|
28
|
-
refresh(): Promise<V1RunResource>;
|
|
29
|
-
live(request?: V1RunLiveRequest): Promise<V1RunLiveResponse>;
|
|
30
|
-
recording(request?: V1RunRecordingRequest): Promise<V1RunRecordingResponse>;
|
|
31
|
-
usage(): Promise<V1RunUsage>;
|
|
33
|
+
constructor(http: V1HttpClient);
|
|
34
|
+
list(runId: string, query?: V1RunFilesListQuery): Promise<V1ListEnvelope<V1File>>;
|
|
35
|
+
iter(runId: string, query?: V1RunFilesListQuery): AsyncGenerator<V1File, void, undefined>;
|
|
36
|
+
export(runId: string, request?: V1RunFilesExportRequest, options?: V1IdempotencyOptions): Promise<V1File>;
|
|
32
37
|
}
|
|
33
|
-
export declare class
|
|
38
|
+
export declare class V1RunInvocationsNamespaceClient {
|
|
34
39
|
private readonly http;
|
|
35
40
|
constructor(http: V1HttpClient);
|
|
36
|
-
list(query?:
|
|
37
|
-
iter(query?:
|
|
38
|
-
get(
|
|
39
|
-
usage(id: string): Promise<V1RunUsage>;
|
|
41
|
+
list(runId: string, query?: V1RunInvocationsListQuery): Promise<V1ListEnvelope<V1InvocationSummary>>;
|
|
42
|
+
iter(runId: string, query?: V1RunInvocationsListQuery): AsyncGenerator<V1InvocationSummary, void, undefined>;
|
|
43
|
+
get(runId: string, invocationId: string): Promise<import("./types.js").V1Invocation>;
|
|
40
44
|
}
|
package/dist/runs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { v1IdempotencyHeaders } from './http.js';
|
|
1
2
|
import { iterateV1Pages } from './pagination.js';
|
|
2
|
-
|
|
3
|
-
export class V1RunEventsClient {
|
|
3
|
+
class V1RunEventsClient {
|
|
4
4
|
http;
|
|
5
5
|
runId;
|
|
6
6
|
constructor(http, runId) {
|
|
@@ -13,12 +13,6 @@ export class V1RunEventsClient {
|
|
|
13
13
|
iter(query = {}) {
|
|
14
14
|
return iterateV1Pages(query, (pageQuery) => this.list(pageQuery));
|
|
15
15
|
}
|
|
16
|
-
wait(request) {
|
|
17
|
-
return this.http.request(`/runs/${encodeURIComponent(this.runId)}/events/wait`, {
|
|
18
|
-
method: 'POST',
|
|
19
|
-
body: request ?? {},
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
16
|
streamUrl(query = {}) {
|
|
23
17
|
const url = new URL(`${this.http.baseUrl}/runs/${encodeURIComponent(this.runId)}/events/stream`);
|
|
24
18
|
for (const [key, value] of Object.entries(query)) {
|
|
@@ -35,7 +29,7 @@ export class V1RunEventsClient {
|
|
|
35
29
|
return url.toString();
|
|
36
30
|
}
|
|
37
31
|
}
|
|
38
|
-
|
|
32
|
+
class V1RunActivityClient {
|
|
39
33
|
http;
|
|
40
34
|
runId;
|
|
41
35
|
constructor(http, runId) {
|
|
@@ -43,63 +37,126 @@ export class V1RunCommandsClient {
|
|
|
43
37
|
this.runId = runId;
|
|
44
38
|
}
|
|
45
39
|
list(query = {}) {
|
|
46
|
-
return this.http.request(`/runs/${encodeURIComponent(this.runId)}/
|
|
40
|
+
return this.http.request(`/runs/${encodeURIComponent(this.runId)}/activity`, { query });
|
|
47
41
|
}
|
|
48
42
|
iter(query = {}) {
|
|
49
43
|
return iterateV1Pages(query, (pageQuery) => this.list(pageQuery));
|
|
50
44
|
}
|
|
45
|
+
streamUrl(query = {}) {
|
|
46
|
+
const url = new URL(`${this.http.baseUrl}/runs/${encodeURIComponent(this.runId)}/activity/stream`);
|
|
47
|
+
for (const [key, value] of Object.entries(query)) {
|
|
48
|
+
if (value === undefined)
|
|
49
|
+
continue;
|
|
50
|
+
if (Array.isArray(value)) {
|
|
51
|
+
for (const item of value)
|
|
52
|
+
url.searchParams.append(key, String(item));
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
url.searchParams.set(key, String(value));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return url.toString();
|
|
59
|
+
}
|
|
51
60
|
}
|
|
52
|
-
export class
|
|
61
|
+
export class V1RunsClient {
|
|
53
62
|
http;
|
|
54
|
-
data;
|
|
55
63
|
events;
|
|
56
|
-
|
|
64
|
+
activity;
|
|
57
65
|
files;
|
|
58
|
-
|
|
66
|
+
invocations;
|
|
67
|
+
constructor(http) {
|
|
59
68
|
this.http = http;
|
|
60
|
-
this.
|
|
61
|
-
this.
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
69
|
+
this.events = new V1RunEventsNamespaceClient(http);
|
|
70
|
+
this.activity = new V1RunActivityNamespaceClient(http);
|
|
71
|
+
this.files = new V1RunFilesNamespaceClient(http);
|
|
72
|
+
this.invocations = new V1RunInvocationsNamespaceClient(http);
|
|
73
|
+
}
|
|
74
|
+
list(query = {}) {
|
|
75
|
+
return this.http.request('/runs', { query });
|
|
76
|
+
}
|
|
77
|
+
iter(query = {}) {
|
|
78
|
+
return iterateV1Pages(query, (pageQuery) => this.list(pageQuery));
|
|
64
79
|
}
|
|
65
|
-
get
|
|
66
|
-
return this.
|
|
80
|
+
get(id) {
|
|
81
|
+
return this.http.request(`/runs/${encodeURIComponent(id)}`);
|
|
67
82
|
}
|
|
68
|
-
|
|
69
|
-
return
|
|
83
|
+
usage(id) {
|
|
84
|
+
return this.http.request(`/runs/${encodeURIComponent(id)}/usage`);
|
|
70
85
|
}
|
|
71
|
-
live(request) {
|
|
72
|
-
return this.http.request(`/runs/${encodeURIComponent(
|
|
86
|
+
live(id, request) {
|
|
87
|
+
return this.http.request(`/runs/${encodeURIComponent(id)}/live`, {
|
|
73
88
|
method: 'POST',
|
|
74
89
|
body: request ?? {},
|
|
75
90
|
});
|
|
76
91
|
}
|
|
77
|
-
recording(request) {
|
|
78
|
-
return this.http.request(`/runs/${encodeURIComponent(
|
|
92
|
+
recording(id, request) {
|
|
93
|
+
return this.http.request(`/runs/${encodeURIComponent(id)}/recording`, {
|
|
79
94
|
method: 'POST',
|
|
80
95
|
body: request ?? {},
|
|
81
96
|
});
|
|
82
97
|
}
|
|
83
|
-
|
|
84
|
-
|
|
98
|
+
}
|
|
99
|
+
export class V1RunEventsNamespaceClient {
|
|
100
|
+
http;
|
|
101
|
+
constructor(http) {
|
|
102
|
+
this.http = http;
|
|
103
|
+
}
|
|
104
|
+
list(runId, query = {}) {
|
|
105
|
+
return new V1RunEventsClient(this.http, runId).list(query);
|
|
106
|
+
}
|
|
107
|
+
iter(runId, query = {}) {
|
|
108
|
+
return new V1RunEventsClient(this.http, runId).iter(query);
|
|
109
|
+
}
|
|
110
|
+
streamUrl(runId, query = {}) {
|
|
111
|
+
return new V1RunEventsClient(this.http, runId).streamUrl(query);
|
|
85
112
|
}
|
|
86
113
|
}
|
|
87
|
-
export class
|
|
114
|
+
export class V1RunActivityNamespaceClient {
|
|
88
115
|
http;
|
|
89
116
|
constructor(http) {
|
|
90
117
|
this.http = http;
|
|
91
118
|
}
|
|
92
|
-
list(query = {}) {
|
|
93
|
-
return this.http.
|
|
119
|
+
list(runId, query = {}) {
|
|
120
|
+
return new V1RunActivityClient(this.http, runId).list(query);
|
|
94
121
|
}
|
|
95
|
-
iter(query = {}) {
|
|
96
|
-
return
|
|
122
|
+
iter(runId, query = {}) {
|
|
123
|
+
return new V1RunActivityClient(this.http, runId).iter(query);
|
|
97
124
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
return new V1RunResource(this.http, run);
|
|
125
|
+
streamUrl(runId, query = {}) {
|
|
126
|
+
return new V1RunActivityClient(this.http, runId).streamUrl(query);
|
|
101
127
|
}
|
|
102
|
-
|
|
103
|
-
|
|
128
|
+
}
|
|
129
|
+
export class V1RunFilesNamespaceClient {
|
|
130
|
+
http;
|
|
131
|
+
constructor(http) {
|
|
132
|
+
this.http = http;
|
|
133
|
+
}
|
|
134
|
+
list(runId, query = {}) {
|
|
135
|
+
return this.http.request(`/runs/${encodeURIComponent(runId)}/files`, { query });
|
|
136
|
+
}
|
|
137
|
+
iter(runId, query = {}) {
|
|
138
|
+
return iterateV1Pages(query, (pageQuery) => this.list(runId, pageQuery));
|
|
139
|
+
}
|
|
140
|
+
export(runId, request = {}, options) {
|
|
141
|
+
return this.http.request(`/runs/${encodeURIComponent(runId)}/files/export`, {
|
|
142
|
+
method: 'POST',
|
|
143
|
+
body: request,
|
|
144
|
+
headers: v1IdempotencyHeaders(options),
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
export class V1RunInvocationsNamespaceClient {
|
|
149
|
+
http;
|
|
150
|
+
constructor(http) {
|
|
151
|
+
this.http = http;
|
|
152
|
+
}
|
|
153
|
+
list(runId, query = {}) {
|
|
154
|
+
return this.http.request(`/runs/${encodeURIComponent(runId)}/invocations`, { query });
|
|
155
|
+
}
|
|
156
|
+
iter(runId, query = {}) {
|
|
157
|
+
return iterateV1Pages(query, (pageQuery) => this.list(runId, pageQuery));
|
|
158
|
+
}
|
|
159
|
+
get(runId, invocationId) {
|
|
160
|
+
return this.http.request(`/runs/${encodeURIComponent(runId)}/invocations/${encodeURIComponent(invocationId)}`);
|
|
104
161
|
}
|
|
105
162
|
}
|
package/dist/runtimes.d.ts
CHANGED
|
@@ -1,49 +1,50 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
runtime: V1RuntimeResource;
|
|
7
|
-
run: V1RunResource;
|
|
8
|
-
browser: V1RuntimeStartBrowser;
|
|
9
|
-
};
|
|
10
|
-
export declare class V1RuntimeRunsClient {
|
|
1
|
+
import { type V1HttpClient, type V1IdempotencyOptions } from './http.js';
|
|
2
|
+
import { V1RuntimeInvocationsNamespaceClient } from './invocations.js';
|
|
3
|
+
import type { V1ListEnvelope, V1File, V1Runtime, V1RuntimeCreateRequest, V1RuntimeDeleteResponse, V1RuntimeFileCollectRequest, V1RuntimeFilesListQuery, V1RuntimeFileStageRequest, V1RuntimeFileUploadRequest, V1RuntimeStagedFile, V1RuntimeListQuery, V1RuntimeRunListQuery, V1RuntimeStartResponse, V1RuntimeStopResponse, V1RuntimeTarget, V1RuntimeTargetCreateRequest, V1RuntimeUpdateRequest, V1RunSummary, V1SpaceRuntimeCreateRequest } from './types.js';
|
|
4
|
+
export type V1RuntimeStartResult = V1RuntimeStartResponse;
|
|
5
|
+
export declare class V1RuntimesClient {
|
|
11
6
|
private readonly http;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
readonly files: V1RuntimeFilesNamespaceClient;
|
|
8
|
+
readonly runs: V1RuntimeRunsNamespaceClient;
|
|
9
|
+
readonly invocations: V1RuntimeInvocationsNamespaceClient;
|
|
10
|
+
readonly targets: V1RuntimeTargetsNamespaceClient;
|
|
11
|
+
constructor(http: V1HttpClient);
|
|
12
|
+
list(query?: V1RuntimeListQuery): Promise<V1ListEnvelope<V1Runtime>>;
|
|
13
|
+
iter(query?: V1RuntimeListQuery): AsyncGenerator<V1Runtime, void, undefined>;
|
|
14
|
+
create(request: V1RuntimeCreateRequest): Promise<V1Runtime>;
|
|
15
|
+
createInSpace(spaceId: string, request: V1SpaceRuntimeCreateRequest): Promise<V1Runtime>;
|
|
16
|
+
update(id: string, request: V1RuntimeUpdateRequest): Promise<V1Runtime>;
|
|
17
|
+
delete(id: string, options?: {
|
|
18
|
+
force?: boolean;
|
|
19
|
+
}): Promise<V1RuntimeDeleteResponse>;
|
|
20
|
+
get(id: string): Promise<V1Runtime>;
|
|
21
|
+
stop(id: string): Promise<V1RuntimeStopResponse>;
|
|
22
|
+
start(id: string, options?: V1IdempotencyOptions): Promise<V1RuntimeStartResult>;
|
|
16
23
|
}
|
|
17
|
-
export declare class
|
|
24
|
+
export declare class V1RuntimeRunsNamespaceClient {
|
|
18
25
|
private readonly http;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
stage(request: V1RuntimeFileStageRequest): Promise<V1RuntimeStagedFile>;
|
|
23
|
-
collect(request: V1RuntimeFileCollectRequest): Promise<V1File>;
|
|
26
|
+
constructor(http: V1HttpClient);
|
|
27
|
+
list(runtimeId: string, query?: V1RuntimeRunListQuery): Promise<V1ListEnvelope<V1RunSummary>>;
|
|
28
|
+
iter(runtimeId: string, query?: V1RuntimeRunListQuery): AsyncGenerator<V1RunSummary, void, undefined>;
|
|
24
29
|
}
|
|
25
|
-
export declare class
|
|
30
|
+
export declare class V1RuntimeFilesNamespaceClient {
|
|
26
31
|
private readonly http;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
get activeRunId(): string | null;
|
|
34
|
-
refresh(): Promise<V1RuntimeResource>;
|
|
35
|
-
start(): Promise<V1RuntimeStartResult>;
|
|
36
|
-
stop(): Promise<V1Runtime>;
|
|
37
|
-
run(): Promise<V1RunResource>;
|
|
32
|
+
constructor(http: V1HttpClient);
|
|
33
|
+
list(runtimeId: string, query?: V1RuntimeFilesListQuery): Promise<V1ListEnvelope<V1File>>;
|
|
34
|
+
iter(runtimeId: string, query?: V1RuntimeFilesListQuery): AsyncGenerator<V1File, void, undefined>;
|
|
35
|
+
upload(runtimeId: string, request: V1RuntimeFileUploadRequest): Promise<V1RuntimeStagedFile>;
|
|
36
|
+
stage(runtimeId: string, request: V1RuntimeFileStageRequest): Promise<V1RuntimeStagedFile>;
|
|
37
|
+
collect(runtimeId: string, request: V1RuntimeFileCollectRequest): Promise<V1File>;
|
|
38
38
|
}
|
|
39
|
-
export declare class
|
|
39
|
+
export declare class V1RuntimeTargetsNamespaceClient {
|
|
40
40
|
private readonly http;
|
|
41
41
|
constructor(http: V1HttpClient);
|
|
42
|
-
list(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
list(runtimeId: string): Promise<V1ListEnvelope<V1RuntimeTarget>>;
|
|
43
|
+
create(runtimeId: string, request?: V1RuntimeTargetCreateRequest): Promise<V1RuntimeTarget>;
|
|
44
|
+
get(runtimeId: string, targetId: string): Promise<V1RuntimeTarget>;
|
|
45
|
+
activate(runtimeId: string, targetId: string): Promise<V1RuntimeTarget>;
|
|
46
|
+
delete(runtimeId: string, targetId: string): Promise<{
|
|
47
|
+
id: string;
|
|
48
|
+
deleted: boolean;
|
|
49
|
+
}>;
|
|
49
50
|
}
|