@vercel/sandbox 2.0.0-beta.4 → 2.0.0-beta.7
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 +40 -1
- package/dist/api-client/api-client.d.ts +210 -146
- package/dist/api-client/api-client.js +58 -56
- package/dist/api-client/api-client.js.map +1 -1
- package/dist/api-client/api-error.d.ts +6 -4
- package/dist/api-client/api-error.js +4 -3
- package/dist/api-client/api-error.js.map +1 -1
- package/dist/api-client/base-client.js +24 -9
- package/dist/api-client/base-client.js.map +1 -1
- package/dist/api-client/validators.d.ts +1333 -1275
- package/dist/api-client/validators.js +28 -32
- package/dist/api-client/validators.js.map +1 -1
- package/dist/command.d.ts +9 -9
- package/dist/command.js +10 -10
- package/dist/sandbox.d.ts +167 -105
- package/dist/sandbox.js +71 -47
- package/dist/sandbox.js.map +1 -1
- package/dist/session.d.ts +7 -7
- package/dist/session.js +53 -47
- package/dist/session.js.map +1 -1
- package/dist/snapshot.d.ts +5 -5
- package/dist/snapshot.js +5 -4
- package/dist/snapshot.js.map +1 -1
- package/dist/utils/convert-sandbox.d.ts +3 -3
- package/dist/utils/convert-sandbox.js +3 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/sandbox.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SessionMetaData, SandboxRouteData, SandboxMetaData } from "./api-client";
|
|
2
2
|
import { APIClient } from "./api-client";
|
|
3
3
|
import { type Credentials } from "./utils/get-credentials";
|
|
4
4
|
import { type WithPrivate } from "./utils/types";
|
|
@@ -7,7 +7,7 @@ import type { RUNTIMES } from "./constants";
|
|
|
7
7
|
import { Session, type RunCommandParams } from "./session";
|
|
8
8
|
import type { Command, CommandFinished } from "./command";
|
|
9
9
|
import type { Snapshot } from "./snapshot";
|
|
10
|
-
import type {
|
|
10
|
+
import type { ConvertedSession } from "./utils/convert-sandbox";
|
|
11
11
|
import type { NetworkPolicy } from "./network-policy";
|
|
12
12
|
export type { NetworkPolicy };
|
|
13
13
|
/** @inline */
|
|
@@ -82,12 +82,17 @@ export interface BaseCreateSandboxParams {
|
|
|
82
82
|
* await sandbox.runCommand("node", ["app.js"]);
|
|
83
83
|
*/
|
|
84
84
|
env?: Record<string, string>;
|
|
85
|
+
/**
|
|
86
|
+
* Key-value tags to associate with the sandbox. Maximum 5 tags.
|
|
87
|
+
* @example { env: "staging", team: "infra" }
|
|
88
|
+
*/
|
|
89
|
+
tags?: Record<string, string>;
|
|
85
90
|
/**
|
|
86
91
|
* An AbortSignal to cancel sandbox creation.
|
|
87
92
|
*/
|
|
88
93
|
signal?: AbortSignal;
|
|
89
94
|
/**
|
|
90
|
-
*
|
|
95
|
+
* Enable or disable automatic restore of the filesystem between sessions.
|
|
91
96
|
*/
|
|
92
97
|
persistent?: boolean;
|
|
93
98
|
}
|
|
@@ -120,14 +125,18 @@ interface GetSandboxParams {
|
|
|
120
125
|
export declare class Sandbox {
|
|
121
126
|
private readonly client;
|
|
122
127
|
private readonly projectId;
|
|
128
|
+
/**
|
|
129
|
+
* In-flight resume promise, used to deduplicate concurrent resume calls.
|
|
130
|
+
*/
|
|
131
|
+
private resumePromise;
|
|
123
132
|
/**
|
|
124
133
|
* Internal Session instance for the current VM.
|
|
125
134
|
*/
|
|
126
135
|
private session;
|
|
127
136
|
/**
|
|
128
|
-
* Internal metadata about the
|
|
137
|
+
* Internal metadata about the sandbox.
|
|
129
138
|
*/
|
|
130
|
-
private
|
|
139
|
+
private sandbox;
|
|
131
140
|
/**
|
|
132
141
|
* The name of this sandbox.
|
|
133
142
|
*/
|
|
@@ -144,17 +153,17 @@ export declare class Sandbox {
|
|
|
144
153
|
/**
|
|
145
154
|
* The region this sandbox runs in.
|
|
146
155
|
*/
|
|
147
|
-
get region(): string;
|
|
156
|
+
get region(): string | undefined;
|
|
148
157
|
/**
|
|
149
158
|
* Number of virtual CPUs allocated.
|
|
150
159
|
*/
|
|
151
|
-
get vcpus(): number;
|
|
160
|
+
get vcpus(): number | undefined;
|
|
152
161
|
/**
|
|
153
162
|
* Memory allocated in MB.
|
|
154
163
|
*/
|
|
155
|
-
get memory(): number;
|
|
164
|
+
get memory(): number | undefined;
|
|
156
165
|
/** Runtime identifier (e.g. "node24", "python3.13"). */
|
|
157
|
-
get runtime(): string;
|
|
166
|
+
get runtime(): string | undefined;
|
|
158
167
|
/**
|
|
159
168
|
* Cumulative egress bytes across all sessions.
|
|
160
169
|
*/
|
|
@@ -186,11 +195,15 @@ export declare class Sandbox {
|
|
|
186
195
|
/**
|
|
187
196
|
* The status of the current session.
|
|
188
197
|
*/
|
|
189
|
-
get status():
|
|
198
|
+
get status(): SessionMetaData["status"];
|
|
190
199
|
/**
|
|
191
200
|
* The default timeout of this sandbox in milliseconds.
|
|
192
201
|
*/
|
|
193
|
-
get timeout(): number;
|
|
202
|
+
get timeout(): number | undefined;
|
|
203
|
+
/**
|
|
204
|
+
* Key-value tags attached to the sandbox.
|
|
205
|
+
*/
|
|
206
|
+
get tags(): Record<string, string> | undefined;
|
|
194
207
|
/**
|
|
195
208
|
* The default network policy of this sandbox.
|
|
196
209
|
*/
|
|
@@ -219,57 +232,55 @@ export declare class Sandbox {
|
|
|
219
232
|
* It returns both the sandboxes and the pagination metadata to allow getting
|
|
220
233
|
* the next page of results.
|
|
221
234
|
*/
|
|
222
|
-
static list(params?: Partial<Parameters<APIClient["
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
region: string;
|
|
228
|
-
runtime: string;
|
|
229
|
-
timeout: number;
|
|
230
|
-
status: "aborted" | "pending" | "running" | "stopping" | "stopped" | "failed" | "snapshotting";
|
|
231
|
-
createdAt: number;
|
|
232
|
-
updatedAt: number;
|
|
233
|
-
name: string;
|
|
234
|
-
persistent: boolean;
|
|
235
|
-
currentSandboxId: string;
|
|
236
|
-
networkPolicy?: import("zod").objectInputType<{
|
|
237
|
-
mode: import("zod").ZodLiteral<"allow-all">;
|
|
238
|
-
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectInputType<{
|
|
239
|
-
mode: import("zod").ZodLiteral<"deny-all">;
|
|
240
|
-
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectInputType<{
|
|
241
|
-
mode: import("zod").ZodLiteral<"custom">;
|
|
242
|
-
allowedDomains: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
243
|
-
allowedCIDRs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
244
|
-
deniedCIDRs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
245
|
-
injectionRules: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
246
|
-
domain: import("zod").ZodString;
|
|
247
|
-
headers: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
248
|
-
headerNames: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
249
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
250
|
-
domain: string;
|
|
251
|
-
headers?: Record<string, string> | undefined;
|
|
252
|
-
headerNames?: string[] | undefined;
|
|
253
|
-
}, {
|
|
254
|
-
domain: string;
|
|
255
|
-
headers?: Record<string, string> | undefined;
|
|
256
|
-
headerNames?: string[] | undefined;
|
|
257
|
-
}>, "many">>;
|
|
258
|
-
}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
|
259
|
-
totalEgressBytes?: number | undefined;
|
|
260
|
-
totalIngressBytes?: number | undefined;
|
|
261
|
-
totalActiveCpuDurationMs?: number | undefined;
|
|
262
|
-
totalDurationMs?: number | undefined;
|
|
263
|
-
currentSnapshotId?: string | undefined;
|
|
264
|
-
}[];
|
|
265
|
-
pagination: {
|
|
266
|
-
count: number;
|
|
267
|
-
next: string | null;
|
|
268
|
-
total: number;
|
|
269
|
-
};
|
|
235
|
+
static list(params?: Partial<Parameters<APIClient["listSandboxes"]>[0]> & Partial<Credentials> & WithFetchOptions): Promise<{
|
|
236
|
+
pagination: {
|
|
237
|
+
count: number;
|
|
238
|
+
next: string | null;
|
|
239
|
+
total: number;
|
|
270
240
|
};
|
|
271
|
-
|
|
272
|
-
|
|
241
|
+
sandboxes: {
|
|
242
|
+
status: "aborted" | "pending" | "running" | "stopping" | "stopped" | "failed" | "snapshotting";
|
|
243
|
+
createdAt: number;
|
|
244
|
+
updatedAt: number;
|
|
245
|
+
name: string;
|
|
246
|
+
persistent: boolean;
|
|
247
|
+
currentSessionId: string;
|
|
248
|
+
memory?: number | undefined;
|
|
249
|
+
vcpus?: number | undefined;
|
|
250
|
+
region?: string | undefined;
|
|
251
|
+
runtime?: string | undefined;
|
|
252
|
+
timeout?: number | undefined;
|
|
253
|
+
cwd?: string | undefined;
|
|
254
|
+
networkPolicy?: import("zod").objectInputType<{
|
|
255
|
+
mode: import("zod").ZodLiteral<"allow-all">;
|
|
256
|
+
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectInputType<{
|
|
257
|
+
mode: import("zod").ZodLiteral<"deny-all">;
|
|
258
|
+
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectInputType<{
|
|
259
|
+
mode: import("zod").ZodLiteral<"custom">;
|
|
260
|
+
allowedDomains: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
261
|
+
allowedCIDRs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
262
|
+
deniedCIDRs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
263
|
+
injectionRules: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
264
|
+
domain: import("zod").ZodString;
|
|
265
|
+
headers: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
266
|
+
headerNames: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
267
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
268
|
+
domain: string;
|
|
269
|
+
headers?: Record<string, string> | undefined;
|
|
270
|
+
headerNames?: string[] | undefined;
|
|
271
|
+
}, {
|
|
272
|
+
domain: string;
|
|
273
|
+
headers?: Record<string, string> | undefined;
|
|
274
|
+
headerNames?: string[] | undefined;
|
|
275
|
+
}>, "many">>;
|
|
276
|
+
}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
|
277
|
+
totalEgressBytes?: number | undefined;
|
|
278
|
+
totalIngressBytes?: number | undefined;
|
|
279
|
+
totalActiveCpuDurationMs?: number | undefined;
|
|
280
|
+
totalDurationMs?: number | undefined;
|
|
281
|
+
currentSnapshotId?: string | undefined;
|
|
282
|
+
tags?: Record<string, string> | undefined;
|
|
283
|
+
}[];
|
|
273
284
|
}>;
|
|
274
285
|
/**
|
|
275
286
|
* Create a new sandbox.
|
|
@@ -291,11 +302,11 @@ export declare class Sandbox {
|
|
|
291
302
|
* @returns A promise resolving to the {@link Sandbox}.
|
|
292
303
|
*/
|
|
293
304
|
static get(params: WithPrivate<GetSandboxParams | (GetSandboxParams & Credentials)> & WithFetchOptions): Promise<Sandbox>;
|
|
294
|
-
constructor({ client, routes, session,
|
|
305
|
+
constructor({ client, routes, session, sandbox, projectId, }: {
|
|
295
306
|
client: APIClient;
|
|
296
307
|
routes: SandboxRouteData[];
|
|
297
|
-
session:
|
|
298
|
-
|
|
308
|
+
session: SessionMetaData;
|
|
309
|
+
sandbox: SandboxMetaData;
|
|
299
310
|
projectId: string;
|
|
300
311
|
});
|
|
301
312
|
/**
|
|
@@ -305,9 +316,10 @@ export declare class Sandbox {
|
|
|
305
316
|
*/
|
|
306
317
|
currentSession(): Session;
|
|
307
318
|
/**
|
|
308
|
-
* Resume this sandbox by creating a new session via `
|
|
319
|
+
* Resume this sandbox by creating a new session via `getSandbox`.
|
|
309
320
|
*/
|
|
310
321
|
private resume;
|
|
322
|
+
private doResume;
|
|
311
323
|
/**
|
|
312
324
|
* Poll until the current session reaches a terminal state, then resume.
|
|
313
325
|
*/
|
|
@@ -442,12 +454,12 @@ export declare class Sandbox {
|
|
|
442
454
|
* @param opts - Optional parameters.
|
|
443
455
|
* @param opts.signal - An AbortSignal to cancel the operation.
|
|
444
456
|
* @param opts.blocking - If true, poll until the sandbox has fully stopped and return the final state.
|
|
445
|
-
* @returns The sandbox
|
|
457
|
+
* @returns The sandbox at the time the stop was acknowledged, or after fully stopped if `blocking` is true.
|
|
446
458
|
*/
|
|
447
459
|
stop(opts?: {
|
|
448
460
|
signal?: AbortSignal;
|
|
449
461
|
blocking?: boolean;
|
|
450
|
-
}): Promise<
|
|
462
|
+
}): Promise<ConvertedSession>;
|
|
451
463
|
/**
|
|
452
464
|
* Update the network policy for this sandbox.
|
|
453
465
|
*
|
|
@@ -519,7 +531,7 @@ export declare class Sandbox {
|
|
|
519
531
|
signal?: AbortSignal;
|
|
520
532
|
}): Promise<Snapshot>;
|
|
521
533
|
/**
|
|
522
|
-
* Update the
|
|
534
|
+
* Update the sandbox configuration.
|
|
523
535
|
*
|
|
524
536
|
* @param params - Fields to update.
|
|
525
537
|
* @param opts - Optional abort signal.
|
|
@@ -531,21 +543,21 @@ export declare class Sandbox {
|
|
|
531
543
|
};
|
|
532
544
|
timeout?: number;
|
|
533
545
|
networkPolicy?: NetworkPolicy;
|
|
546
|
+
tags?: Record<string, string>;
|
|
534
547
|
}, opts?: {
|
|
535
548
|
signal?: AbortSignal;
|
|
536
549
|
}): Promise<void>;
|
|
537
550
|
/**
|
|
538
|
-
* Delete this
|
|
551
|
+
* Delete this sandbox.
|
|
539
552
|
*
|
|
540
553
|
* After deletion the instance becomes inert — all further API calls will
|
|
541
554
|
* throw immediately.
|
|
542
555
|
*/
|
|
543
556
|
delete(opts?: {
|
|
544
|
-
preserveSnapshots?: boolean;
|
|
545
557
|
signal?: AbortSignal;
|
|
546
558
|
}): Promise<void>;
|
|
547
559
|
/**
|
|
548
|
-
* List sessions (VMs) that have been created for this
|
|
560
|
+
* List sessions (VMs) that have been created for this sandbox.
|
|
549
561
|
*
|
|
550
562
|
* @param params - Optional pagination parameters.
|
|
551
563
|
* @returns The list of sessions and pagination metadata.
|
|
@@ -555,32 +567,40 @@ export declare class Sandbox {
|
|
|
555
567
|
since?: number | Date;
|
|
556
568
|
until?: number | Date;
|
|
557
569
|
signal?: AbortSignal;
|
|
558
|
-
}): Promise<
|
|
559
|
-
|
|
560
|
-
id:
|
|
561
|
-
memory:
|
|
562
|
-
vcpus:
|
|
563
|
-
region:
|
|
564
|
-
runtime:
|
|
565
|
-
timeout:
|
|
566
|
-
status: "
|
|
567
|
-
requestedAt:
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
interactivePort
|
|
579
|
-
networkPolicy
|
|
570
|
+
}): Promise<{
|
|
571
|
+
sessions: import("zod").objectInputType<{
|
|
572
|
+
id: import("zod").ZodString;
|
|
573
|
+
memory: import("zod").ZodNumber;
|
|
574
|
+
vcpus: import("zod").ZodNumber;
|
|
575
|
+
region: import("zod").ZodString;
|
|
576
|
+
runtime: import("zod").ZodString;
|
|
577
|
+
timeout: import("zod").ZodNumber;
|
|
578
|
+
status: import("zod").ZodEnum<["pending", "running", "stopping", "stopped", "failed", "aborted", "snapshotting"]>;
|
|
579
|
+
requestedAt: import("zod").ZodNumber;
|
|
580
|
+
startedAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
581
|
+
requestedStopAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
582
|
+
stoppedAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
583
|
+
abortedAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
584
|
+
duration: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
585
|
+
sourceSnapshotId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
586
|
+
snapshottedAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
587
|
+
createdAt: import("zod").ZodNumber;
|
|
588
|
+
cwd: import("zod").ZodString;
|
|
589
|
+
updatedAt: import("zod").ZodNumber;
|
|
590
|
+
interactivePort: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
591
|
+
networkPolicy: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodObject<{
|
|
580
592
|
mode: import("zod").ZodLiteral<"allow-all">;
|
|
581
|
-
}, import("zod").ZodTypeAny,
|
|
593
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
594
|
+
mode: import("zod").ZodLiteral<"allow-all">;
|
|
595
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
596
|
+
mode: import("zod").ZodLiteral<"allow-all">;
|
|
597
|
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
|
582
598
|
mode: import("zod").ZodLiteral<"deny-all">;
|
|
583
|
-
}, import("zod").ZodTypeAny,
|
|
599
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
600
|
+
mode: import("zod").ZodLiteral<"deny-all">;
|
|
601
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
602
|
+
mode: import("zod").ZodLiteral<"deny-all">;
|
|
603
|
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
|
584
604
|
mode: import("zod").ZodLiteral<"custom">;
|
|
585
605
|
allowedDomains: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
586
606
|
allowedCIDRs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
@@ -598,21 +618,63 @@ export declare class Sandbox {
|
|
|
598
618
|
headers?: Record<string, string> | undefined;
|
|
599
619
|
headerNames?: string[] | undefined;
|
|
600
620
|
}>, "many">>;
|
|
601
|
-
}, import("zod").ZodTypeAny, "
|
|
602
|
-
|
|
603
|
-
|
|
621
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
622
|
+
mode: import("zod").ZodLiteral<"custom">;
|
|
623
|
+
allowedDomains: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
624
|
+
allowedCIDRs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
625
|
+
deniedCIDRs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
626
|
+
injectionRules: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
627
|
+
domain: import("zod").ZodString;
|
|
628
|
+
headers: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
629
|
+
headerNames: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
630
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
631
|
+
domain: string;
|
|
632
|
+
headers?: Record<string, string> | undefined;
|
|
633
|
+
headerNames?: string[] | undefined;
|
|
634
|
+
}, {
|
|
635
|
+
domain: string;
|
|
636
|
+
headers?: Record<string, string> | undefined;
|
|
637
|
+
headerNames?: string[] | undefined;
|
|
638
|
+
}>, "many">>;
|
|
639
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
640
|
+
mode: import("zod").ZodLiteral<"custom">;
|
|
641
|
+
allowedDomains: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
642
|
+
allowedCIDRs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
643
|
+
deniedCIDRs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
644
|
+
injectionRules: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
645
|
+
domain: import("zod").ZodString;
|
|
646
|
+
headers: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
647
|
+
headerNames: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
648
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
649
|
+
domain: string;
|
|
650
|
+
headers?: Record<string, string> | undefined;
|
|
651
|
+
headerNames?: string[] | undefined;
|
|
652
|
+
}, {
|
|
653
|
+
domain: string;
|
|
654
|
+
headers?: Record<string, string> | undefined;
|
|
655
|
+
headerNames?: string[] | undefined;
|
|
656
|
+
}>, "many">>;
|
|
657
|
+
}, import("zod").ZodTypeAny, "passthrough">>]>>;
|
|
658
|
+
activeCpuDurationMs: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
659
|
+
networkTransfer: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
660
|
+
ingress: import("zod").ZodNumber;
|
|
661
|
+
egress: import("zod").ZodNumber;
|
|
662
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
604
663
|
ingress: number;
|
|
605
664
|
egress: number;
|
|
606
|
-
}
|
|
607
|
-
|
|
665
|
+
}, {
|
|
666
|
+
ingress: number;
|
|
667
|
+
egress: number;
|
|
668
|
+
}>>;
|
|
669
|
+
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
608
670
|
pagination: {
|
|
609
671
|
count: number;
|
|
610
672
|
next: number | null;
|
|
611
673
|
prev: number | null;
|
|
612
674
|
};
|
|
613
|
-
}
|
|
675
|
+
}>;
|
|
614
676
|
/**
|
|
615
|
-
* List snapshots that belong to this
|
|
677
|
+
* List snapshots that belong to this sandbox.
|
|
616
678
|
*
|
|
617
679
|
* @param params - Optional pagination parameters.
|
|
618
680
|
* @returns The list of snapshots and pagination metadata.
|
|
@@ -622,7 +684,7 @@ export declare class Sandbox {
|
|
|
622
684
|
since?: number | Date;
|
|
623
685
|
until?: number | Date;
|
|
624
686
|
signal?: AbortSignal;
|
|
625
|
-
}): Promise<
|
|
687
|
+
}): Promise<{
|
|
626
688
|
pagination: {
|
|
627
689
|
count: number;
|
|
628
690
|
next: number | null;
|
|
@@ -634,9 +696,9 @@ export declare class Sandbox {
|
|
|
634
696
|
status: "failed" | "created" | "deleted";
|
|
635
697
|
createdAt: number;
|
|
636
698
|
updatedAt: number;
|
|
637
|
-
|
|
699
|
+
sourceSessionId: string;
|
|
638
700
|
sizeBytes: number;
|
|
639
701
|
expiresAt?: number | undefined;
|
|
640
702
|
}[];
|
|
641
|
-
}
|
|
703
|
+
}>;
|
|
642
704
|
}
|