UNPKG

@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>

66 lines 3.21 kB
import * as z from "zod/v3"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./sdkvalidationerror.js"; import { Session } from "./session.js"; import { Snapshot } from "./snapshot.js"; /** * The number of milliseconds after which the snapshot will expire and be deleted. Use 0 for no expiration. */ export type CreateSessionSnapshotExpiration = any | number; export type CreateSessionSnapshotRequestBody = { /** * The number of milliseconds after which the snapshot will expire and be deleted. Use 0 for no expiration. */ expiration?: any | number | undefined; }; export type CreateSessionSnapshotRequest = { /** * The unique identifier of the session to snapshot. */ sessionId: string; /** * The Team identifier to perform the request on behalf of. */ teamId?: string | undefined; /** * The Team slug to perform the request on behalf of. */ slug?: string | undefined; requestBody?: CreateSessionSnapshotRequestBody | undefined; }; export type CreateSessionSnapshotResponseBody = { /** * This object contains information related to a Snapshot of a Vercel Sandbox session (v2 API). */ snapshot: Snapshot; /** * This object contains information related to a Vercel Sandbox Session. v2 endpoints return "session" instead of "sandbox" as the response wrapper key. */ session: Session; }; /** @internal */ export type CreateSessionSnapshotExpiration$Outbound = any | number; /** @internal */ export declare const CreateSessionSnapshotExpiration$outboundSchema: z.ZodType<CreateSessionSnapshotExpiration$Outbound, z.ZodTypeDef, CreateSessionSnapshotExpiration>; export declare function createSessionSnapshotExpirationToJSON(createSessionSnapshotExpiration: CreateSessionSnapshotExpiration): string; /** @internal */ export type CreateSessionSnapshotRequestBody$Outbound = { expiration?: any | number | undefined; }; /** @internal */ export declare const CreateSessionSnapshotRequestBody$outboundSchema: z.ZodType<CreateSessionSnapshotRequestBody$Outbound, z.ZodTypeDef, CreateSessionSnapshotRequestBody>; export declare function createSessionSnapshotRequestBodyToJSON(createSessionSnapshotRequestBody: CreateSessionSnapshotRequestBody): string; /** @internal */ export type CreateSessionSnapshotRequest$Outbound = { sessionId: string; teamId?: string | undefined; slug?: string | undefined; RequestBody?: CreateSessionSnapshotRequestBody$Outbound | undefined; }; /** @internal */ export declare const CreateSessionSnapshotRequest$outboundSchema: z.ZodType<CreateSessionSnapshotRequest$Outbound, z.ZodTypeDef, CreateSessionSnapshotRequest>; export declare function createSessionSnapshotRequestToJSON(createSessionSnapshotRequest: CreateSessionSnapshotRequest): string; /** @internal */ export declare const CreateSessionSnapshotResponseBody$inboundSchema: z.ZodType<CreateSessionSnapshotResponseBody, z.ZodTypeDef, unknown>; export declare function createSessionSnapshotResponseBodyFromJSON(jsonString: string): SafeParseResult<CreateSessionSnapshotResponseBody, SDKValidationError>; //# sourceMappingURL=createsessionsnapshotop.d.ts.map