@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
84 lines • 2.72 kB
TypeScript
import * as z from "zod/v3";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
/**
* The status of the snapshot.
*/
export declare const SnapshotStatus: {
readonly Created: "created";
readonly Deleted: "deleted";
readonly Failed: "failed";
};
/**
* The status of the snapshot.
*/
export type SnapshotStatus = ClosedEnum<typeof SnapshotStatus>;
/**
* The method used to create the snapshot.
*/
export declare const CreationMethod: {
readonly Automatic: "automatic";
readonly Manual: "manual";
};
/**
* The method used to create the snapshot.
*/
export type CreationMethod = ClosedEnum<typeof CreationMethod>;
/**
* This object contains information related to a Snapshot of a Vercel Sandbox session (v2 API).
*/
export type Snapshot = {
/**
* The unique identifier of the snapshot.
*/
id: string;
/**
* The unique identifier of the session from which the snapshot was created.
*/
sourceSessionId: string;
/**
* The region where the snapshot is stored.
*/
region: string;
/**
* The status of the snapshot.
*/
status: SnapshotStatus;
/**
* The size of the snapshot in bytes.
*/
sizeBytes: number;
/**
* The time when the snapshot will expire, in milliseconds since the epoch. If not set, the snapshot does not have any expiration.
*/
expiresAt?: number | undefined;
/**
* The time when the snapshot was created, in milliseconds since the epoch.
*/
createdAt: number;
/**
* The last time the snapshot was updated, in milliseconds since the epoch.
*/
updatedAt: number;
/**
* The last time the snapshot was used (e.g. to resume or create a sandbox), in milliseconds since the epoch. Falls back to `createdAt` for older snapshots that predate this field.
*/
lastUsedAt: number;
/**
* The method used to create the snapshot.
*/
creationMethod?: CreationMethod | undefined;
/**
* The unique identifier of the parent snapshot, if this snapshot was created from another snapshot.
*/
parentId?: string | undefined;
};
/** @internal */
export declare const SnapshotStatus$inboundSchema: z.ZodNativeEnum<typeof SnapshotStatus>;
/** @internal */
export declare const CreationMethod$inboundSchema: z.ZodNativeEnum<typeof CreationMethod>;
/** @internal */
export declare const Snapshot$inboundSchema: z.ZodType<Snapshot, z.ZodTypeDef, unknown>;
export declare function snapshotFromJSON(jsonString: string): SafeParseResult<Snapshot, SDKValidationError>;
//# sourceMappingURL=snapshot.d.ts.map