withruntime 1.1.1 → 1.4.58
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 +5 -2
- package/dist/generated/agentSessions.d.ts +2 -2
- package/dist/generated/agentSessions.js +2 -2
- package/dist/generated/agents.d.ts +2 -2
- package/dist/generated/agents.js +1 -1
- package/dist/generated/apps.d.ts +8 -6
- package/dist/generated/apps.js +10 -6
- package/dist/generated/browsers.d.ts +8 -6
- package/dist/generated/browsers.js +10 -6
- package/dist/generated/builds.d.ts +8 -6
- package/dist/generated/builds.js +10 -6
- package/dist/generated/ci.d.ts +106 -6
- package/dist/generated/ci.js +14 -6
- package/dist/generated/containers.d.ts +8 -6
- package/dist/generated/containers.js +10 -6
- package/dist/generated/desktops.d.ts +8 -6
- package/dist/generated/desktops.js +10 -6
- package/dist/generated/dropins/e2b.d.ts +180 -0
- package/dist/generated/dropins/e2b.js +342 -0
- package/dist/generated/dropins/e2b_code_interpreter.d.ts +180 -0
- package/dist/generated/dropins/e2b_code_interpreter.js +342 -0
- package/dist/generated/dropins/modal.d.ts +195 -0
- package/dist/generated/dropins/modal.js +375 -0
- package/dist/generated/dropins/runtime.d.ts +74 -0
- package/dist/generated/dropins/runtime.js +180 -0
- package/dist/generated/dropins/vercel.d.ts +78 -0
- package/dist/generated/dropins/vercel.js +154 -0
- package/dist/generated/egressIps.d.ts +2 -2
- package/dist/generated/egressIps.js +2 -2
- package/dist/generated/functions.d.ts +8 -6
- package/dist/generated/functions.js +10 -6
- package/dist/generated/identities.d.ts +42 -4
- package/dist/generated/identities.js +60 -0
- package/dist/generated/images.d.ts +3 -0
- package/dist/generated/images.js +4 -0
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/jobs.d.ts +2 -2
- package/dist/generated/jobs.js +1 -1
- package/dist/generated/keys.d.ts +28 -0
- package/dist/generated/keys.js +4 -0
- package/dist/generated/notebooks.d.ts +8 -6
- package/dist/generated/notebooks.js +10 -6
- package/dist/generated/ports.d.ts +2 -0
- package/dist/generated/projects.d.ts +49 -7
- package/dist/generated/projects.js +72 -3
- package/dist/generated/roles.d.ts +43 -5
- package/dist/generated/roles.js +61 -0
- package/dist/generated/routes.js +1 -1
- package/dist/generated/runtime.d.ts +49 -3
- package/dist/generated/runtime.js +235 -26
- package/dist/generated/sandboxes.d.ts +33 -14
- package/dist/generated/sandboxes.js +10 -6
- package/dist/generated/sites.d.ts +8 -6
- package/dist/generated/sites.js +10 -6
- package/dist/generated/snapshots.d.ts +7 -2
- package/dist/generated/snapshots.js +6 -2
- package/dist/generated/usage.d.ts +9 -3
- package/dist/generated/volumes.d.ts +30 -11
- package/dist/generated/volumes.js +19 -6
- package/dist/generated/workspaces.d.ts +8 -6
- package/dist/generated/workspaces.js +10 -6
- package/dist/v2/cli.d.ts +29 -0
- package/dist/v2/cli.js +156 -7
- package/dist/v2/login.d.ts +6 -0
- package/dist/v2/login.js +2 -1
- package/dist/v2/mcp.d.ts +5 -0
- package/dist/v2/mcp.js +196 -35
- package/dist/v2/openapi.json +3053 -1772
- package/dist/v2/shims/base.d.ts +0 -3
- package/dist/v2/shims/base.js +2 -7
- package/dist/v2/shims/blaxel.js +2 -1
- package/dist/v2/shims/daytona.js +3 -2
- package/dist/v2/shims/morph.js +3 -1
- package/dist/v2/shims/vercel.js +2 -1
- package/package.json +3 -2
- package/dist/v2/shims/e2b.d.ts +0 -142
- package/dist/v2/shims/e2b.js +0 -238
package/dist/generated/ci.d.ts
CHANGED
|
@@ -42,6 +42,102 @@ import type { ActRequest } from "./sandboxes.js";
|
|
|
42
42
|
import type { Acted } from "./sandboxes.js";
|
|
43
43
|
import type { RunCode } from "./sandboxes.js";
|
|
44
44
|
import type { CodeRun } from "./sandboxes.js";
|
|
45
|
+
/** A repository to run GitHub Actions jobs on Runtime. */
|
|
46
|
+
export interface CiConnect {
|
|
47
|
+
/** The GitHub repository, `owner/name`. At least 3 characters. At most 200 characters. */
|
|
48
|
+
repository: string;
|
|
49
|
+
}
|
|
50
|
+
/** What a person does before the connect goes on: open the page, then call again. */
|
|
51
|
+
export interface CiNextStep {
|
|
52
|
+
/** The page to open, on Runtime's site. */
|
|
53
|
+
url: string;
|
|
54
|
+
/** What the page asks of them. */
|
|
55
|
+
message: string;
|
|
56
|
+
/** Seconds to wait before calling again. */
|
|
57
|
+
againSeconds: number;
|
|
58
|
+
}
|
|
59
|
+
/** The `runs-on` change, for the caller's own git to commit and push. */
|
|
60
|
+
export interface CiPush {
|
|
61
|
+
/** The branch to push it as. */
|
|
62
|
+
branch: string;
|
|
63
|
+
/** The default branch it is made on. */
|
|
64
|
+
base: string;
|
|
65
|
+
/** The default branch's commit it applies to, the new commit's parent. */
|
|
66
|
+
commit: string;
|
|
67
|
+
/** The commit's message. */
|
|
68
|
+
message: string;
|
|
69
|
+
/** The change, a unified diff of the workflow files against `commit` (`git apply` takes it). */
|
|
70
|
+
patch: string;
|
|
71
|
+
}
|
|
72
|
+
/** A pull request on GitHub. */
|
|
73
|
+
export interface CiPullRequest {
|
|
74
|
+
/** Its number in the repository. */
|
|
75
|
+
number: number;
|
|
76
|
+
/** Its page on GitHub. */
|
|
77
|
+
url: string;
|
|
78
|
+
}
|
|
79
|
+
/** A check of the pull request, on GitHub. */
|
|
80
|
+
export interface CiCheck {
|
|
81
|
+
/** The job's name. */
|
|
82
|
+
name: string;
|
|
83
|
+
/** Its page on GitHub, with its log as it runs. */
|
|
84
|
+
url: string;
|
|
85
|
+
}
|
|
86
|
+
/** One `runs-on` line of a workflow. */
|
|
87
|
+
export interface CiRunsOn {
|
|
88
|
+
/** The workflow's file, from the repository's root. */
|
|
89
|
+
file: string;
|
|
90
|
+
/** Its line number, from 1. */
|
|
91
|
+
line: number;
|
|
92
|
+
/** Its labels as written. */
|
|
93
|
+
from: string;
|
|
94
|
+
/** Its labels in the pull request; omitted when it is left unchanged. */
|
|
95
|
+
to?: string;
|
|
96
|
+
/** Why it is left unchanged. */
|
|
97
|
+
why?: string;
|
|
98
|
+
}
|
|
99
|
+
/** The repository's GitHub Actions jobs over the last days, priced on GitHub and on Runtime. */
|
|
100
|
+
export interface CiUsage {
|
|
101
|
+
/** The days read, up to today. */
|
|
102
|
+
days: number;
|
|
103
|
+
/** The workflow runs in those days. */
|
|
104
|
+
runs: number;
|
|
105
|
+
/** The runs whose jobs were read: the newest, when there were more than are read. */
|
|
106
|
+
read: number;
|
|
107
|
+
/** Minutes GitHub billed for the jobs this pull request moves (each job rounded up to a minute), counted over the runs read and scaled to every run. */
|
|
108
|
+
minutes: number;
|
|
109
|
+
/** What those minutes cost on GitHub, at its published per-minute rates. */
|
|
110
|
+
githubCost: string;
|
|
111
|
+
/** What they cost on Runtime, by the second, at its per-vCPU-minute rate for each runner's size. */
|
|
112
|
+
runtimeCost: string;
|
|
113
|
+
/** Minutes of jobs that stay where they run (macOS, Windows, ARM, other runners). */
|
|
114
|
+
otherMinutes: number;
|
|
115
|
+
}
|
|
116
|
+
/** A repository's connect: where it stands, and once done, its pull request. */
|
|
117
|
+
export interface CiConnection {
|
|
118
|
+
/** Always `ci_connection`. */
|
|
119
|
+
object: "ci_connection" | (string & {});
|
|
120
|
+
/** The repository, `owner/name`. */
|
|
121
|
+
repository: string;
|
|
122
|
+
/** Where it stands: `needs_card`, `needs_install` or `needs_authorization` until a person acts at `next.url`; `needs_push` until the caller's git pushes `push`; then `opened`, or `up_to_date` when nothing is left to change. */
|
|
123
|
+
status: "needs_card" | "needs_install" | "needs_authorization" | "needs_push" | "opened" | "up_to_date" | (string & {});
|
|
124
|
+
/** What it tells a person, with the links they open. */
|
|
125
|
+
message: string;
|
|
126
|
+
/** What a person does next, while one must. */
|
|
127
|
+
next?: CiNextStep;
|
|
128
|
+
/** The change the caller's git commits and pushes, then calls again. */
|
|
129
|
+
push?: CiPush;
|
|
130
|
+
/** The pull request that changes the `runs-on` lines. */
|
|
131
|
+
pullRequest?: CiPullRequest;
|
|
132
|
+
/** Its first check, once GitHub has started one. */
|
|
133
|
+
check?: CiCheck;
|
|
134
|
+
/** Each line the pull request changes. */
|
|
135
|
+
changed: CiRunsOn[];
|
|
136
|
+
/** Each `runs-on` line it leaves as it is, and why. */
|
|
137
|
+
unchanged: CiRunsOn[];
|
|
138
|
+
/** The last 30 days of the repository's jobs, priced on GitHub and on Runtime. */
|
|
139
|
+
usage?: CiUsage;
|
|
140
|
+
}
|
|
45
141
|
/** What get takes in its query. */
|
|
46
142
|
export type CiGetQuery = {
|
|
47
143
|
/** Seconds to wait, at most 60, for its state to differ from `ifState`; it answers once it does, or as it is when the wait ends. At least 0. At most 60. */
|
|
@@ -164,7 +260,7 @@ export declare class CiMachineFiles {
|
|
|
164
260
|
beginFolderUpload(path: string, input?: Omit<FolderUploadBegin, "path">, options?: RequestOptions): Promise<FolderUpload>;
|
|
165
261
|
/** Sends the request's bytes, a part of the archive at its offset, into tar's input as they arrive, of any size, and returns the bytes received in all once tar took them. A part past them is refused 409 `upload_incomplete`, naming them: send the parts in order. */
|
|
166
262
|
writeFolderUpload(upload: string, data: Uint8Array | string, query?: CiWriteFolderUploadQuery & RequestOptions, options?: RequestOptions): Promise<FolderUploadReceived>;
|
|
167
|
-
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said.
|
|
263
|
+
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said. Sent again, it returns how tar ended. An upload no call has named for 10 minutes since its last part or commit is ended. */
|
|
168
264
|
commitFolderUpload(upload: string, options?: RequestOptions): Promise<FolderUnpacked>;
|
|
169
265
|
/** Stops a folder upload's tar; what it unpacked so far stays. */
|
|
170
266
|
abortFolderUpload(upload: string, options?: RequestOptions): Promise<FolderUploadAborted>;
|
|
@@ -172,7 +268,7 @@ export declare class CiMachineFiles {
|
|
|
172
268
|
mkdir(path: string, input?: Omit<FileMkdir, "path">, options?: RequestOptions): Promise<FileMade>;
|
|
173
269
|
/** Moves a file, a link or a directory; refused 409 when something is at its new path, unless overwrite. With sha256 or size, a file written in parts is put in place once whole: its writes ended, then only a file of that size with every byte written and whose bytes hash to it moves; refused 409 `upload_incomplete` or `checksum_mismatch`, nothing moved. With sha256, it is safe to send again: once moved, it returns the same answer while `from` is gone and `to` holds those bytes. */
|
|
174
270
|
rename(input: FileRename, options?: RequestOptions): Promise<FileRenamed>;
|
|
175
|
-
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its ci. A paused ci is woken for it unless wake is false. */
|
|
271
|
+
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its ci. A paused ci is woken for it unless wake is false. A port it serves is shared by a preview (previews.create), not a link. */
|
|
176
272
|
link(path: string, input?: Omit<FileLinkCreate, "path">, options?: RequestOptions): Promise<FileLink>;
|
|
177
273
|
/** Ends every file link made for a CI machine so far; links made after work. */
|
|
178
274
|
revokeLinks(options?: RequestOptions): Promise<FileLinksRevoked>;
|
|
@@ -212,7 +308,7 @@ export declare class CiMachine {
|
|
|
212
308
|
constructor(client: Ci, info: SandboxInfo);
|
|
213
309
|
/** Its id. */
|
|
214
310
|
get id(): string;
|
|
215
|
-
/** Its vCPUs; its product's default when omitted. At least
|
|
311
|
+
/** Its vCPUs, at least every plan's least (a smaller number is taken as it); its product's default when omitted. At least 2. */
|
|
216
312
|
get vcpu(): number | undefined;
|
|
217
313
|
/** Its memory in GB (1 GB is 1,024 MiB); a fraction is taken to the MiB (`1.5`). Its product's default when omitted. At least 1. */
|
|
218
314
|
get memoryGB(): number | undefined;
|
|
@@ -220,7 +316,7 @@ export declare class CiMachine {
|
|
|
220
316
|
get diskGB(): number | undefined;
|
|
221
317
|
/** The image it boots, by name (its newest version), `name:version` or ID; Runtime's default image when omitted. */
|
|
222
318
|
get image(): string | undefined;
|
|
223
|
-
/** The secrets it may get, by name, at most 64: only those of them whose scope admits it; [] none; every one whose scope admits it when omitted. A name with no secret yet takes effect once that secret is created.
|
|
319
|
+
/** The secrets it may get, by name, at most 64: only those of them whose scope admits it; [] none; every one whose scope admits it when omitted. A name with no secret yet takes effect once that secret is created. An update changes it; a fork or a copy of a snapshot keeps it. At most 64 items. */
|
|
224
320
|
get secrets(): string[] | undefined;
|
|
225
321
|
/** The command it starts at every fresh boot and keeps running, as a service: a web server, a runner, a desktop. A wake with its memory kept does not start it again. Its image's when omitted. */
|
|
226
322
|
get start(): MachineStart | undefined;
|
|
@@ -254,6 +350,8 @@ export declare class CiMachine {
|
|
|
254
350
|
get pausedAt(): string | undefined;
|
|
255
351
|
/** A create's answer alone, for a start with a ready check: how its wait went. */
|
|
256
352
|
get ready(): MachineReady | undefined;
|
|
353
|
+
/** For a machine that serves a port of its own (an app, a site or a function on 8080, a container on its image's, a notebook on 8888, a workspace on 8080, a desktop on 6080, a browser's DevTools on 9222): a link that opens it, answered by its create, get and update, none for a key that may not share its ports. It works for 10 minutes; a browser that opens it is given a cookie for that address for a day and sent on to the address without it, so no history keeps a link that still opens it. Another port is shared with previews.create. */
|
|
354
|
+
get url(): string | undefined;
|
|
257
355
|
/** When Runtime deletes it (`deleteAfterSeconds`), finally: it can't be undone, as its delete can't; none: kept until deleted. */
|
|
258
356
|
get deleteAt(): string | undefined;
|
|
259
357
|
/** Whether its delete is refused (409 `delete_protected`) until an update turns this off. */
|
|
@@ -335,7 +433,7 @@ export declare class Ci {
|
|
|
335
433
|
beginFolderUpload(id: string, input: FolderUploadBegin, options?: RequestOptions): Promise<FolderUpload>;
|
|
336
434
|
/** Sends the request's bytes, a part of the archive at its offset, into tar's input as they arrive, of any size, and returns the bytes received in all once tar took them. A part past them is refused 409 `upload_incomplete`, naming them: send the parts in order. */
|
|
337
435
|
writeFolderUpload(id: string, upload: string, data: Uint8Array | string, query?: CiWriteFolderUploadQuery & RequestOptions, options?: RequestOptions): Promise<FolderUploadReceived>;
|
|
338
|
-
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said.
|
|
436
|
+
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said. Sent again, it returns how tar ended. An upload no call has named for 10 minutes since its last part or commit is ended. */
|
|
339
437
|
commitFolderUpload(id: string, upload: string, options?: RequestOptions): Promise<FolderUnpacked>;
|
|
340
438
|
/** Stops a folder upload's tar; what it unpacked so far stays. */
|
|
341
439
|
abortFolderUpload(id: string, upload: string, options?: RequestOptions): Promise<FolderUploadAborted>;
|
|
@@ -343,7 +441,7 @@ export declare class Ci {
|
|
|
343
441
|
mkdir(id: string, input: FileMkdir, options?: RequestOptions): Promise<FileMade>;
|
|
344
442
|
/** Moves a file, a link or a directory; refused 409 when something is at its new path, unless overwrite. With sha256 or size, a file written in parts is put in place once whole: its writes ended, then only a file of that size with every byte written and whose bytes hash to it moves; refused 409 `upload_incomplete` or `checksum_mismatch`, nothing moved. With sha256, it is safe to send again: once moved, it returns the same answer while `from` is gone and `to` holds those bytes. */
|
|
345
443
|
rename(id: string, input: FileRename, options?: RequestOptions): Promise<FileRenamed>;
|
|
346
|
-
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its ci. A paused ci is woken for it unless wake is false. */
|
|
444
|
+
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its ci. A paused ci is woken for it unless wake is false. A port it serves is shared by a preview (previews.create), not a link. */
|
|
347
445
|
link(id: string, input: FileLinkCreate, options?: RequestOptions): Promise<FileLink>;
|
|
348
446
|
/** Ends every file link made for a CI machine so far; links made after work. */
|
|
349
447
|
revokeLinks(id: string, options?: RequestOptions): Promise<FileLinksRevoked>;
|
|
@@ -365,4 +463,6 @@ export declare class Ci {
|
|
|
365
463
|
act(id: string, input: ActRequest, options?: RequestOptions): Promise<Acted>;
|
|
366
464
|
/** Runs a cell of Python in a CI machine as a notebook does, in a Jupyter kernel it keeps running for the cell's `context`: variables, imports and functions stay for the next cell. Returns what it printed, its values and displays (text, HTML, images such as charts), and its exception with its traceback. The context's kernel starts on its first cell. A cell past `timeoutSeconds` is interrupted and its context kept. Refused 409 `kernel_not_installed` when the image has no ipykernel. A paused ci is resumed first. */
|
|
367
465
|
runCode(id: string, input: RunCode, options?: RequestOptions): Promise<CodeRun>;
|
|
466
|
+
/** Runs a GitHub repository's Actions jobs on Runtime, by a pull request "Run CI on Runtime" that changes each `runs-on` line of a GitHub-hosted Linux x64 runner to the Runtime size of its vCPUs, and nothing else, so its own checks run on Runtime. Until Runtime's GitHub App is installed on the repository and connected to this organization, it answers `next`: a page a person opens, then the call is made again. Then it answers `push`, the change as a patch, which the caller's own git commits and pushes as its branch (Runtime's App never writes a workflow); called again, it opens the pull request from that branch. Asked again, it returns the same pull request while it is open. Refused for a public repository: Runtime runs Actions jobs for private repositories only. */
|
|
467
|
+
connect(input: CiConnect, options?: RequestOptions): Promise<CiConnection>;
|
|
368
468
|
}
|
package/dist/generated/ci.js
CHANGED
|
@@ -45,7 +45,7 @@ export class CiMachineFiles {
|
|
|
45
45
|
writeFolderUpload(upload, data, query = {}, options) {
|
|
46
46
|
return this.#c.writeFolderUpload(this.#id, upload, data, query, options);
|
|
47
47
|
}
|
|
48
|
-
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said.
|
|
48
|
+
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said. Sent again, it returns how tar ended. An upload no call has named for 10 minutes since its last part or commit is ended. */
|
|
49
49
|
commitFolderUpload(upload, options) {
|
|
50
50
|
return this.#c.commitFolderUpload(this.#id, upload, options);
|
|
51
51
|
}
|
|
@@ -61,7 +61,7 @@ export class CiMachineFiles {
|
|
|
61
61
|
rename(input, options) {
|
|
62
62
|
return this.#c.rename(this.#id, input, options);
|
|
63
63
|
}
|
|
64
|
-
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its ci. A paused ci is woken for it unless wake is false. */
|
|
64
|
+
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its ci. A paused ci is woken for it unless wake is false. A port it serves is shared by a preview (previews.create), not a link. */
|
|
65
65
|
link(path, input = {}, options) {
|
|
66
66
|
return this.#c.link(this.#id, { ...input, path: path }, options);
|
|
67
67
|
}
|
|
@@ -135,7 +135,7 @@ export class CiMachine {
|
|
|
135
135
|
get id() {
|
|
136
136
|
return this.info.id;
|
|
137
137
|
}
|
|
138
|
-
/** Its vCPUs; its product's default when omitted. At least
|
|
138
|
+
/** Its vCPUs, at least every plan's least (a smaller number is taken as it); its product's default when omitted. At least 2. */
|
|
139
139
|
get vcpu() {
|
|
140
140
|
return this.info.vcpu;
|
|
141
141
|
}
|
|
@@ -151,7 +151,7 @@ export class CiMachine {
|
|
|
151
151
|
get image() {
|
|
152
152
|
return this.info.image;
|
|
153
153
|
}
|
|
154
|
-
/** The secrets it may get, by name, at most 64: only those of them whose scope admits it; [] none; every one whose scope admits it when omitted. A name with no secret yet takes effect once that secret is created.
|
|
154
|
+
/** The secrets it may get, by name, at most 64: only those of them whose scope admits it; [] none; every one whose scope admits it when omitted. A name with no secret yet takes effect once that secret is created. An update changes it; a fork or a copy of a snapshot keeps it. At most 64 items. */
|
|
155
155
|
get secrets() {
|
|
156
156
|
return this.info.secrets;
|
|
157
157
|
}
|
|
@@ -219,6 +219,10 @@ export class CiMachine {
|
|
|
219
219
|
get ready() {
|
|
220
220
|
return this.info.ready;
|
|
221
221
|
}
|
|
222
|
+
/** For a machine that serves a port of its own (an app, a site or a function on 8080, a container on its image's, a notebook on 8888, a workspace on 8080, a desktop on 6080, a browser's DevTools on 9222): a link that opens it, answered by its create, get and update, none for a key that may not share its ports. It works for 10 minutes; a browser that opens it is given a cookie for that address for a day and sent on to the address without it, so no history keeps a link that still opens it. Another port is shared with previews.create. */
|
|
223
|
+
get url() {
|
|
224
|
+
return this.info.url;
|
|
225
|
+
}
|
|
222
226
|
/** When Runtime deletes it (`deleteAfterSeconds`), finally: it can't be undone, as its delete can't; none: kept until deleted. */
|
|
223
227
|
get deleteAt() {
|
|
224
228
|
return this.info.deleteAt;
|
|
@@ -382,7 +386,7 @@ export class Ci {
|
|
|
382
386
|
writeFolderUpload(id, upload, data, query = {}, options) {
|
|
383
387
|
return this.transport.request("PUT", `/v2/ci/${encodeURIComponent(id)}/files/archive/uploads/${encodeURIComponent(upload)}`, { data: toBytes(data), query: { ...query }, options, idempotent: true });
|
|
384
388
|
}
|
|
385
|
-
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said.
|
|
389
|
+
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said. Sent again, it returns how tar ended. An upload no call has named for 10 minutes since its last part or commit is ended. */
|
|
386
390
|
commitFolderUpload(id, upload, options) {
|
|
387
391
|
return this.transport.request("POST", `/v2/ci/${encodeURIComponent(id)}/files/archive/uploads/${encodeURIComponent(upload)}:commit`, { options, idempotent: true });
|
|
388
392
|
}
|
|
@@ -398,7 +402,7 @@ export class Ci {
|
|
|
398
402
|
rename(id, input, options) {
|
|
399
403
|
return this.transport.request("POST", `/v2/ci/${encodeURIComponent(id)}/files:rename`, { body: input, options });
|
|
400
404
|
}
|
|
401
|
-
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its ci. A paused ci is woken for it unless wake is false. */
|
|
405
|
+
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its ci. A paused ci is woken for it unless wake is false. A port it serves is shared by a preview (previews.create), not a link. */
|
|
402
406
|
link(id, input, options) {
|
|
403
407
|
return this.transport.request("POST", `/v2/ci/${encodeURIComponent(id)}/files:link`, { body: input, options });
|
|
404
408
|
}
|
|
@@ -442,4 +446,8 @@ export class Ci {
|
|
|
442
446
|
runCode(id, input, options) {
|
|
443
447
|
return this.transport.request("POST", `/v2/ci/${encodeURIComponent(id)}:runCode`, { body: input, options });
|
|
444
448
|
}
|
|
449
|
+
/** Runs a GitHub repository's Actions jobs on Runtime, by a pull request "Run CI on Runtime" that changes each `runs-on` line of a GitHub-hosted Linux x64 runner to the Runtime size of its vCPUs, and nothing else, so its own checks run on Runtime. Until Runtime's GitHub App is installed on the repository and connected to this organization, it answers `next`: a page a person opens, then the call is made again. Then it answers `push`, the change as a patch, which the caller's own git commits and pushes as its branch (Runtime's App never writes a workflow); called again, it opens the pull request from that branch. Asked again, it returns the same pull request while it is open. Refused for a public repository: Runtime runs Actions jobs for private repositories only. */
|
|
450
|
+
connect(input, options) {
|
|
451
|
+
return this.transport.request("POST", `/v2/ci:connect`, { body: input, options, idempotent: true });
|
|
452
|
+
}
|
|
445
453
|
}
|
|
@@ -164,7 +164,7 @@ export declare class ContainerFiles {
|
|
|
164
164
|
beginFolderUpload(path: string, input?: Omit<FolderUploadBegin, "path">, options?: RequestOptions): Promise<FolderUpload>;
|
|
165
165
|
/** Sends the request's bytes, a part of the archive at its offset, into tar's input as they arrive, of any size, and returns the bytes received in all once tar took them. A part past them is refused 409 `upload_incomplete`, naming them: send the parts in order. */
|
|
166
166
|
writeFolderUpload(upload: string, data: Uint8Array | string, query?: ContainerWriteFolderUploadQuery & RequestOptions, options?: RequestOptions): Promise<FolderUploadReceived>;
|
|
167
|
-
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said.
|
|
167
|
+
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said. Sent again, it returns how tar ended. An upload no call has named for 10 minutes since its last part or commit is ended. */
|
|
168
168
|
commitFolderUpload(upload: string, options?: RequestOptions): Promise<FolderUnpacked>;
|
|
169
169
|
/** Stops a folder upload's tar; what it unpacked so far stays. */
|
|
170
170
|
abortFolderUpload(upload: string, options?: RequestOptions): Promise<FolderUploadAborted>;
|
|
@@ -172,7 +172,7 @@ export declare class ContainerFiles {
|
|
|
172
172
|
mkdir(path: string, input?: Omit<FileMkdir, "path">, options?: RequestOptions): Promise<FileMade>;
|
|
173
173
|
/** Moves a file, a link or a directory; refused 409 when something is at its new path, unless overwrite. With sha256 or size, a file written in parts is put in place once whole: its writes ended, then only a file of that size with every byte written and whose bytes hash to it moves; refused 409 `upload_incomplete` or `checksum_mismatch`, nothing moved. With sha256, it is safe to send again: once moved, it returns the same answer while `from` is gone and `to` holds those bytes. */
|
|
174
174
|
rename(input: FileRename, options?: RequestOptions): Promise<FileRenamed>;
|
|
175
|
-
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its container. A paused container is woken for it unless wake is false. */
|
|
175
|
+
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its container. A paused container is woken for it unless wake is false. A port it serves is shared by a preview (previews.create), not a link. */
|
|
176
176
|
link(path: string, input?: Omit<FileLinkCreate, "path">, options?: RequestOptions): Promise<FileLink>;
|
|
177
177
|
/** Ends every file link made for a container so far; links made after work. */
|
|
178
178
|
revokeLinks(options?: RequestOptions): Promise<FileLinksRevoked>;
|
|
@@ -212,7 +212,7 @@ export declare class Container {
|
|
|
212
212
|
constructor(client: Containers, info: SandboxInfo);
|
|
213
213
|
/** Its id. */
|
|
214
214
|
get id(): string;
|
|
215
|
-
/** Its vCPUs; its product's default when omitted. At least
|
|
215
|
+
/** Its vCPUs, at least every plan's least (a smaller number is taken as it); its product's default when omitted. At least 2. */
|
|
216
216
|
get vcpu(): number | undefined;
|
|
217
217
|
/** Its memory in GB (1 GB is 1,024 MiB); a fraction is taken to the MiB (`1.5`). Its product's default when omitted. At least 1. */
|
|
218
218
|
get memoryGB(): number | undefined;
|
|
@@ -220,7 +220,7 @@ export declare class Container {
|
|
|
220
220
|
get diskGB(): number | undefined;
|
|
221
221
|
/** The image it boots, by name (its newest version), `name:version` or ID; Runtime's default image when omitted. */
|
|
222
222
|
get image(): string | undefined;
|
|
223
|
-
/** The secrets it may get, by name, at most 64: only those of them whose scope admits it; [] none; every one whose scope admits it when omitted. A name with no secret yet takes effect once that secret is created.
|
|
223
|
+
/** The secrets it may get, by name, at most 64: only those of them whose scope admits it; [] none; every one whose scope admits it when omitted. A name with no secret yet takes effect once that secret is created. An update changes it; a fork or a copy of a snapshot keeps it. At most 64 items. */
|
|
224
224
|
get secrets(): string[] | undefined;
|
|
225
225
|
/** The command it starts at every fresh boot and keeps running, as a service: a web server, a runner, a desktop. A wake with its memory kept does not start it again. Its image's when omitted. */
|
|
226
226
|
get start(): MachineStart | undefined;
|
|
@@ -254,6 +254,8 @@ export declare class Container {
|
|
|
254
254
|
get pausedAt(): string | undefined;
|
|
255
255
|
/** A create's answer alone, for a start with a ready check: how its wait went. */
|
|
256
256
|
get ready(): MachineReady | undefined;
|
|
257
|
+
/** For a machine that serves a port of its own (an app, a site or a function on 8080, a container on its image's, a notebook on 8888, a workspace on 8080, a desktop on 6080, a browser's DevTools on 9222): a link that opens it, answered by its create, get and update, none for a key that may not share its ports. It works for 10 minutes; a browser that opens it is given a cookie for that address for a day and sent on to the address without it, so no history keeps a link that still opens it. Another port is shared with previews.create. */
|
|
258
|
+
get url(): string | undefined;
|
|
257
259
|
/** When Runtime deletes it (`deleteAfterSeconds`), finally: it can't be undone, as its delete can't; none: kept until deleted. */
|
|
258
260
|
get deleteAt(): string | undefined;
|
|
259
261
|
/** Whether its delete is refused (409 `delete_protected`) until an update turns this off. */
|
|
@@ -335,7 +337,7 @@ export declare class Containers {
|
|
|
335
337
|
beginFolderUpload(id: string, input: FolderUploadBegin, options?: RequestOptions): Promise<FolderUpload>;
|
|
336
338
|
/** Sends the request's bytes, a part of the archive at its offset, into tar's input as they arrive, of any size, and returns the bytes received in all once tar took them. A part past them is refused 409 `upload_incomplete`, naming them: send the parts in order. */
|
|
337
339
|
writeFolderUpload(id: string, upload: string, data: Uint8Array | string, query?: ContainerWriteFolderUploadQuery & RequestOptions, options?: RequestOptions): Promise<FolderUploadReceived>;
|
|
338
|
-
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said.
|
|
340
|
+
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said. Sent again, it returns how tar ended. An upload no call has named for 10 minutes since its last part or commit is ended. */
|
|
339
341
|
commitFolderUpload(id: string, upload: string, options?: RequestOptions): Promise<FolderUnpacked>;
|
|
340
342
|
/** Stops a folder upload's tar; what it unpacked so far stays. */
|
|
341
343
|
abortFolderUpload(id: string, upload: string, options?: RequestOptions): Promise<FolderUploadAborted>;
|
|
@@ -343,7 +345,7 @@ export declare class Containers {
|
|
|
343
345
|
mkdir(id: string, input: FileMkdir, options?: RequestOptions): Promise<FileMade>;
|
|
344
346
|
/** Moves a file, a link or a directory; refused 409 when something is at its new path, unless overwrite. With sha256 or size, a file written in parts is put in place once whole: its writes ended, then only a file of that size with every byte written and whose bytes hash to it moves; refused 409 `upload_incomplete` or `checksum_mismatch`, nothing moved. With sha256, it is safe to send again: once moved, it returns the same answer while `from` is gone and `to` holds those bytes. */
|
|
345
347
|
rename(id: string, input: FileRename, options?: RequestOptions): Promise<FileRenamed>;
|
|
346
|
-
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its container. A paused container is woken for it unless wake is false. */
|
|
348
|
+
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its container. A paused container is woken for it unless wake is false. A port it serves is shared by a preview (previews.create), not a link. */
|
|
347
349
|
link(id: string, input: FileLinkCreate, options?: RequestOptions): Promise<FileLink>;
|
|
348
350
|
/** Ends every file link made for a container so far; links made after work. */
|
|
349
351
|
revokeLinks(id: string, options?: RequestOptions): Promise<FileLinksRevoked>;
|
|
@@ -45,7 +45,7 @@ export class ContainerFiles {
|
|
|
45
45
|
writeFolderUpload(upload, data, query = {}, options) {
|
|
46
46
|
return this.#c.writeFolderUpload(this.#id, upload, data, query, options);
|
|
47
47
|
}
|
|
48
|
-
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said.
|
|
48
|
+
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said. Sent again, it returns how tar ended. An upload no call has named for 10 minutes since its last part or commit is ended. */
|
|
49
49
|
commitFolderUpload(upload, options) {
|
|
50
50
|
return this.#c.commitFolderUpload(this.#id, upload, options);
|
|
51
51
|
}
|
|
@@ -61,7 +61,7 @@ export class ContainerFiles {
|
|
|
61
61
|
rename(input, options) {
|
|
62
62
|
return this.#c.rename(this.#id, input, options);
|
|
63
63
|
}
|
|
64
|
-
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its container. A paused container is woken for it unless wake is false. */
|
|
64
|
+
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its container. A paused container is woken for it unless wake is false. A port it serves is shared by a preview (previews.create), not a link. */
|
|
65
65
|
link(path, input = {}, options) {
|
|
66
66
|
return this.#c.link(this.#id, { ...input, path: path }, options);
|
|
67
67
|
}
|
|
@@ -135,7 +135,7 @@ export class Container {
|
|
|
135
135
|
get id() {
|
|
136
136
|
return this.info.id;
|
|
137
137
|
}
|
|
138
|
-
/** Its vCPUs; its product's default when omitted. At least
|
|
138
|
+
/** Its vCPUs, at least every plan's least (a smaller number is taken as it); its product's default when omitted. At least 2. */
|
|
139
139
|
get vcpu() {
|
|
140
140
|
return this.info.vcpu;
|
|
141
141
|
}
|
|
@@ -151,7 +151,7 @@ export class Container {
|
|
|
151
151
|
get image() {
|
|
152
152
|
return this.info.image;
|
|
153
153
|
}
|
|
154
|
-
/** The secrets it may get, by name, at most 64: only those of them whose scope admits it; [] none; every one whose scope admits it when omitted. A name with no secret yet takes effect once that secret is created.
|
|
154
|
+
/** The secrets it may get, by name, at most 64: only those of them whose scope admits it; [] none; every one whose scope admits it when omitted. A name with no secret yet takes effect once that secret is created. An update changes it; a fork or a copy of a snapshot keeps it. At most 64 items. */
|
|
155
155
|
get secrets() {
|
|
156
156
|
return this.info.secrets;
|
|
157
157
|
}
|
|
@@ -219,6 +219,10 @@ export class Container {
|
|
|
219
219
|
get ready() {
|
|
220
220
|
return this.info.ready;
|
|
221
221
|
}
|
|
222
|
+
/** For a machine that serves a port of its own (an app, a site or a function on 8080, a container on its image's, a notebook on 8888, a workspace on 8080, a desktop on 6080, a browser's DevTools on 9222): a link that opens it, answered by its create, get and update, none for a key that may not share its ports. It works for 10 minutes; a browser that opens it is given a cookie for that address for a day and sent on to the address without it, so no history keeps a link that still opens it. Another port is shared with previews.create. */
|
|
223
|
+
get url() {
|
|
224
|
+
return this.info.url;
|
|
225
|
+
}
|
|
222
226
|
/** When Runtime deletes it (`deleteAfterSeconds`), finally: it can't be undone, as its delete can't; none: kept until deleted. */
|
|
223
227
|
get deleteAt() {
|
|
224
228
|
return this.info.deleteAt;
|
|
@@ -382,7 +386,7 @@ export class Containers {
|
|
|
382
386
|
writeFolderUpload(id, upload, data, query = {}, options) {
|
|
383
387
|
return this.transport.request("PUT", `/v2/containers/${encodeURIComponent(id)}/files/archive/uploads/${encodeURIComponent(upload)}`, { data: toBytes(data), query: { ...query }, options, idempotent: true });
|
|
384
388
|
}
|
|
385
|
-
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said.
|
|
389
|
+
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said. Sent again, it returns how tar ended. An upload no call has named for 10 minutes since its last part or commit is ended. */
|
|
386
390
|
commitFolderUpload(id, upload, options) {
|
|
387
391
|
return this.transport.request("POST", `/v2/containers/${encodeURIComponent(id)}/files/archive/uploads/${encodeURIComponent(upload)}:commit`, { options, idempotent: true });
|
|
388
392
|
}
|
|
@@ -398,7 +402,7 @@ export class Containers {
|
|
|
398
402
|
rename(id, input, options) {
|
|
399
403
|
return this.transport.request("POST", `/v2/containers/${encodeURIComponent(id)}/files:rename`, { body: input, options });
|
|
400
404
|
}
|
|
401
|
-
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its container. A paused container is woken for it unless wake is false. */
|
|
405
|
+
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its container. A paused container is woken for it unless wake is false. A port it serves is shared by a preview (previews.create), not a link. */
|
|
402
406
|
link(id, input, options) {
|
|
403
407
|
return this.transport.request("POST", `/v2/containers/${encodeURIComponent(id)}/files:link`, { body: input, options });
|
|
404
408
|
}
|
|
@@ -164,7 +164,7 @@ export declare class DesktopFiles {
|
|
|
164
164
|
beginFolderUpload(path: string, input?: Omit<FolderUploadBegin, "path">, options?: RequestOptions): Promise<FolderUpload>;
|
|
165
165
|
/** Sends the request's bytes, a part of the archive at its offset, into tar's input as they arrive, of any size, and returns the bytes received in all once tar took them. A part past them is refused 409 `upload_incomplete`, naming them: send the parts in order. */
|
|
166
166
|
writeFolderUpload(upload: string, data: Uint8Array | string, query?: DesktopWriteFolderUploadQuery & RequestOptions, options?: RequestOptions): Promise<FolderUploadReceived>;
|
|
167
|
-
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said.
|
|
167
|
+
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said. Sent again, it returns how tar ended. An upload no call has named for 10 minutes since its last part or commit is ended. */
|
|
168
168
|
commitFolderUpload(upload: string, options?: RequestOptions): Promise<FolderUnpacked>;
|
|
169
169
|
/** Stops a folder upload's tar; what it unpacked so far stays. */
|
|
170
170
|
abortFolderUpload(upload: string, options?: RequestOptions): Promise<FolderUploadAborted>;
|
|
@@ -172,7 +172,7 @@ export declare class DesktopFiles {
|
|
|
172
172
|
mkdir(path: string, input?: Omit<FileMkdir, "path">, options?: RequestOptions): Promise<FileMade>;
|
|
173
173
|
/** Moves a file, a link or a directory; refused 409 when something is at its new path, unless overwrite. With sha256 or size, a file written in parts is put in place once whole: its writes ended, then only a file of that size with every byte written and whose bytes hash to it moves; refused 409 `upload_incomplete` or `checksum_mismatch`, nothing moved. With sha256, it is safe to send again: once moved, it returns the same answer while `from` is gone and `to` holds those bytes. */
|
|
174
174
|
rename(input: FileRename, options?: RequestOptions): Promise<FileRenamed>;
|
|
175
|
-
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its desktop. A paused desktop is woken for it unless wake is false. */
|
|
175
|
+
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its desktop. A paused desktop is woken for it unless wake is false. A port it serves is shared by a preview (previews.create), not a link. */
|
|
176
176
|
link(path: string, input?: Omit<FileLinkCreate, "path">, options?: RequestOptions): Promise<FileLink>;
|
|
177
177
|
/** Ends every file link made for a desktop so far; links made after work. */
|
|
178
178
|
revokeLinks(options?: RequestOptions): Promise<FileLinksRevoked>;
|
|
@@ -212,7 +212,7 @@ export declare class Desktop {
|
|
|
212
212
|
constructor(client: Desktops, info: SandboxInfo);
|
|
213
213
|
/** Its id. */
|
|
214
214
|
get id(): string;
|
|
215
|
-
/** Its vCPUs; its product's default when omitted. At least
|
|
215
|
+
/** Its vCPUs, at least every plan's least (a smaller number is taken as it); its product's default when omitted. At least 2. */
|
|
216
216
|
get vcpu(): number | undefined;
|
|
217
217
|
/** Its memory in GB (1 GB is 1,024 MiB); a fraction is taken to the MiB (`1.5`). Its product's default when omitted. At least 1. */
|
|
218
218
|
get memoryGB(): number | undefined;
|
|
@@ -220,7 +220,7 @@ export declare class Desktop {
|
|
|
220
220
|
get diskGB(): number | undefined;
|
|
221
221
|
/** The image it boots, by name (its newest version), `name:version` or ID; Runtime's default image when omitted. */
|
|
222
222
|
get image(): string | undefined;
|
|
223
|
-
/** The secrets it may get, by name, at most 64: only those of them whose scope admits it; [] none; every one whose scope admits it when omitted. A name with no secret yet takes effect once that secret is created.
|
|
223
|
+
/** The secrets it may get, by name, at most 64: only those of them whose scope admits it; [] none; every one whose scope admits it when omitted. A name with no secret yet takes effect once that secret is created. An update changes it; a fork or a copy of a snapshot keeps it. At most 64 items. */
|
|
224
224
|
get secrets(): string[] | undefined;
|
|
225
225
|
/** The command it starts at every fresh boot and keeps running, as a service: a web server, a runner, a desktop. A wake with its memory kept does not start it again. Its image's when omitted. */
|
|
226
226
|
get start(): MachineStart | undefined;
|
|
@@ -254,6 +254,8 @@ export declare class Desktop {
|
|
|
254
254
|
get pausedAt(): string | undefined;
|
|
255
255
|
/** A create's answer alone, for a start with a ready check: how its wait went. */
|
|
256
256
|
get ready(): MachineReady | undefined;
|
|
257
|
+
/** For a machine that serves a port of its own (an app, a site or a function on 8080, a container on its image's, a notebook on 8888, a workspace on 8080, a desktop on 6080, a browser's DevTools on 9222): a link that opens it, answered by its create, get and update, none for a key that may not share its ports. It works for 10 minutes; a browser that opens it is given a cookie for that address for a day and sent on to the address without it, so no history keeps a link that still opens it. Another port is shared with previews.create. */
|
|
258
|
+
get url(): string | undefined;
|
|
257
259
|
/** When Runtime deletes it (`deleteAfterSeconds`), finally: it can't be undone, as its delete can't; none: kept until deleted. */
|
|
258
260
|
get deleteAt(): string | undefined;
|
|
259
261
|
/** Whether its delete is refused (409 `delete_protected`) until an update turns this off. */
|
|
@@ -335,7 +337,7 @@ export declare class Desktops {
|
|
|
335
337
|
beginFolderUpload(id: string, input: FolderUploadBegin, options?: RequestOptions): Promise<FolderUpload>;
|
|
336
338
|
/** Sends the request's bytes, a part of the archive at its offset, into tar's input as they arrive, of any size, and returns the bytes received in all once tar took them. A part past them is refused 409 `upload_incomplete`, naming them: send the parts in order. */
|
|
337
339
|
writeFolderUpload(id: string, upload: string, data: Uint8Array | string, query?: DesktopWriteFolderUploadQuery & RequestOptions, options?: RequestOptions): Promise<FolderUploadReceived>;
|
|
338
|
-
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said.
|
|
340
|
+
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said. Sent again, it returns how tar ended. An upload no call has named for 10 minutes since its last part or commit is ended. */
|
|
339
341
|
commitFolderUpload(id: string, upload: string, options?: RequestOptions): Promise<FolderUnpacked>;
|
|
340
342
|
/** Stops a folder upload's tar; what it unpacked so far stays. */
|
|
341
343
|
abortFolderUpload(id: string, upload: string, options?: RequestOptions): Promise<FolderUploadAborted>;
|
|
@@ -343,7 +345,7 @@ export declare class Desktops {
|
|
|
343
345
|
mkdir(id: string, input: FileMkdir, options?: RequestOptions): Promise<FileMade>;
|
|
344
346
|
/** Moves a file, a link or a directory; refused 409 when something is at its new path, unless overwrite. With sha256 or size, a file written in parts is put in place once whole: its writes ended, then only a file of that size with every byte written and whose bytes hash to it moves; refused 409 `upload_incomplete` or `checksum_mismatch`, nothing moved. With sha256, it is safe to send again: once moved, it returns the same answer while `from` is gone and `to` holds those bytes. */
|
|
345
347
|
rename(id: string, input: FileRename, options?: RequestOptions): Promise<FileRenamed>;
|
|
346
|
-
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its desktop. A paused desktop is woken for it unless wake is false. */
|
|
348
|
+
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its desktop. A paused desktop is woken for it unless wake is false. A port it serves is shared by a preview (previews.create), not a link. */
|
|
347
349
|
link(id: string, input: FileLinkCreate, options?: RequestOptions): Promise<FileLink>;
|
|
348
350
|
/** Ends every file link made for a desktop so far; links made after work. */
|
|
349
351
|
revokeLinks(id: string, options?: RequestOptions): Promise<FileLinksRevoked>;
|
|
@@ -45,7 +45,7 @@ export class DesktopFiles {
|
|
|
45
45
|
writeFolderUpload(upload, data, query = {}, options) {
|
|
46
46
|
return this.#c.writeFolderUpload(this.#id, upload, data, query, options);
|
|
47
47
|
}
|
|
48
|
-
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said.
|
|
48
|
+
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said. Sent again, it returns how tar ended. An upload no call has named for 10 minutes since its last part or commit is ended. */
|
|
49
49
|
commitFolderUpload(upload, options) {
|
|
50
50
|
return this.#c.commitFolderUpload(this.#id, upload, options);
|
|
51
51
|
}
|
|
@@ -61,7 +61,7 @@ export class DesktopFiles {
|
|
|
61
61
|
rename(input, options) {
|
|
62
62
|
return this.#c.rename(this.#id, input, options);
|
|
63
63
|
}
|
|
64
|
-
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its desktop. A paused desktop is woken for it unless wake is false. */
|
|
64
|
+
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its desktop. A paused desktop is woken for it unless wake is false. A port it serves is shared by a preview (previews.create), not a link. */
|
|
65
65
|
link(path, input = {}, options) {
|
|
66
66
|
return this.#c.link(this.#id, { ...input, path: path }, options);
|
|
67
67
|
}
|
|
@@ -135,7 +135,7 @@ export class Desktop {
|
|
|
135
135
|
get id() {
|
|
136
136
|
return this.info.id;
|
|
137
137
|
}
|
|
138
|
-
/** Its vCPUs; its product's default when omitted. At least
|
|
138
|
+
/** Its vCPUs, at least every plan's least (a smaller number is taken as it); its product's default when omitted. At least 2. */
|
|
139
139
|
get vcpu() {
|
|
140
140
|
return this.info.vcpu;
|
|
141
141
|
}
|
|
@@ -151,7 +151,7 @@ export class Desktop {
|
|
|
151
151
|
get image() {
|
|
152
152
|
return this.info.image;
|
|
153
153
|
}
|
|
154
|
-
/** The secrets it may get, by name, at most 64: only those of them whose scope admits it; [] none; every one whose scope admits it when omitted. A name with no secret yet takes effect once that secret is created.
|
|
154
|
+
/** The secrets it may get, by name, at most 64: only those of them whose scope admits it; [] none; every one whose scope admits it when omitted. A name with no secret yet takes effect once that secret is created. An update changes it; a fork or a copy of a snapshot keeps it. At most 64 items. */
|
|
155
155
|
get secrets() {
|
|
156
156
|
return this.info.secrets;
|
|
157
157
|
}
|
|
@@ -219,6 +219,10 @@ export class Desktop {
|
|
|
219
219
|
get ready() {
|
|
220
220
|
return this.info.ready;
|
|
221
221
|
}
|
|
222
|
+
/** For a machine that serves a port of its own (an app, a site or a function on 8080, a container on its image's, a notebook on 8888, a workspace on 8080, a desktop on 6080, a browser's DevTools on 9222): a link that opens it, answered by its create, get and update, none for a key that may not share its ports. It works for 10 minutes; a browser that opens it is given a cookie for that address for a day and sent on to the address without it, so no history keeps a link that still opens it. Another port is shared with previews.create. */
|
|
223
|
+
get url() {
|
|
224
|
+
return this.info.url;
|
|
225
|
+
}
|
|
222
226
|
/** When Runtime deletes it (`deleteAfterSeconds`), finally: it can't be undone, as its delete can't; none: kept until deleted. */
|
|
223
227
|
get deleteAt() {
|
|
224
228
|
return this.info.deleteAt;
|
|
@@ -382,7 +386,7 @@ export class Desktops {
|
|
|
382
386
|
writeFolderUpload(id, upload, data, query = {}, options) {
|
|
383
387
|
return this.transport.request("PUT", `/v2/desktops/${encodeURIComponent(id)}/files/archive/uploads/${encodeURIComponent(upload)}`, { data: toBytes(data), query: { ...query }, options, idempotent: true });
|
|
384
388
|
}
|
|
385
|
-
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said.
|
|
389
|
+
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said. Sent again, it returns how tar ended. An upload no call has named for 10 minutes since its last part or commit is ended. */
|
|
386
390
|
commitFolderUpload(id, upload, options) {
|
|
387
391
|
return this.transport.request("POST", `/v2/desktops/${encodeURIComponent(id)}/files/archive/uploads/${encodeURIComponent(upload)}:commit`, { options, idempotent: true });
|
|
388
392
|
}
|
|
@@ -398,7 +402,7 @@ export class Desktops {
|
|
|
398
402
|
rename(id, input, options) {
|
|
399
403
|
return this.transport.request("POST", `/v2/desktops/${encodeURIComponent(id)}/files:rename`, { body: input, options });
|
|
400
404
|
}
|
|
401
|
-
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its desktop. A paused desktop is woken for it unless wake is false. */
|
|
405
|
+
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its desktop. A paused desktop is woken for it unless wake is false. A port it serves is shared by a preview (previews.create), not a link. */
|
|
402
406
|
link(id, input, options) {
|
|
403
407
|
return this.transport.request("POST", `/v2/desktops/${encodeURIComponent(id)}/files:link`, { body: input, options });
|
|
404
408
|
}
|