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>

129 lines 4.84 kB
import * as z from "zod/v3"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { NamedSandbox } from "./namedsandbox.js"; import { SDKValidationError } from "./sdkvalidationerror.js"; /** * Field to sort by. */ export declare const QueryParamSortBy: { readonly CreatedAt: "createdAt"; readonly Name: "name"; readonly StatusUpdatedAt: "statusUpdatedAt"; readonly CurrentSnapshotId: "currentSnapshotId"; }; /** * Field to sort by. */ export type QueryParamSortBy = ClosedEnum<typeof QueryParamSortBy>; /** * Sort direction. Defaults to desc. */ export declare const QueryParamSortOrder: { readonly Asc: "asc"; readonly Desc: "desc"; }; /** * Sort direction. Defaults to desc. */ export type QueryParamSortOrder = ClosedEnum<typeof QueryParamSortOrder>; /** * Filter named sandboxes by status. Only valid when sortBy is createdAt. */ export declare const QueryParamStatus: { readonly Running: "running"; readonly Stopping: "stopping"; readonly Stopped: "stopped"; }; /** * Filter named sandboxes by status. Only valid when sortBy is createdAt. */ export type QueryParamStatus = ClosedEnum<typeof QueryParamStatus>; /** * Filter sandboxes by tag. Format: \"key:value\". Only one tag filter is supported at a time. */ export type QueryParamTags = string | Array<string>; export type ListNamedSandboxesRequest = { /** * The unique identifier or name of the project to list named sandboxes for. */ project?: string | undefined; /** * Maximum number of named sandboxes to return in the response. Used for pagination. */ limit?: number | undefined; /** * Field to sort by. */ sortBy?: QueryParamSortBy | undefined; /** * Filter named sandboxes whose name starts with this prefix. Only valid when sortBy=name. */ namePrefix?: string | undefined; /** * Opaque pagination cursor from a previous response. */ cursor?: string | undefined; /** * Sort direction. Defaults to desc. */ sortOrder?: QueryParamSortOrder | undefined; /** * Filter named sandboxes by status. Only valid when sortBy is createdAt. */ status?: QueryParamStatus | undefined; /** * Filter sandboxes by tag. Format: \"key:value\". Only one tag filter is supported at a time. */ tags?: string | Array<string> | undefined; /** * 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; }; export type ListNamedSandboxesPagination = { count: number; next: string | null; }; export type ListNamedSandboxesResponseBody = { sandboxes: Array<NamedSandbox>; pagination: ListNamedSandboxesPagination; }; /** @internal */ export declare const QueryParamSortBy$outboundSchema: z.ZodNativeEnum<typeof QueryParamSortBy>; /** @internal */ export declare const QueryParamSortOrder$outboundSchema: z.ZodNativeEnum<typeof QueryParamSortOrder>; /** @internal */ export declare const QueryParamStatus$outboundSchema: z.ZodNativeEnum<typeof QueryParamStatus>; /** @internal */ export type QueryParamTags$Outbound = string | Array<string>; /** @internal */ export declare const QueryParamTags$outboundSchema: z.ZodType<QueryParamTags$Outbound, z.ZodTypeDef, QueryParamTags>; export declare function queryParamTagsToJSON(queryParamTags: QueryParamTags): string; /** @internal */ export type ListNamedSandboxesRequest$Outbound = { project?: string | undefined; limit: number; sortBy: string; namePrefix?: string | undefined; cursor?: string | undefined; sortOrder: string; status?: string | undefined; tags?: string | Array<string> | undefined; teamId?: string | undefined; slug?: string | undefined; }; /** @internal */ export declare const ListNamedSandboxesRequest$outboundSchema: z.ZodType<ListNamedSandboxesRequest$Outbound, z.ZodTypeDef, ListNamedSandboxesRequest>; export declare function listNamedSandboxesRequestToJSON(listNamedSandboxesRequest: ListNamedSandboxesRequest): string; /** @internal */ export declare const ListNamedSandboxesPagination$inboundSchema: z.ZodType<ListNamedSandboxesPagination, z.ZodTypeDef, unknown>; export declare function listNamedSandboxesPaginationFromJSON(jsonString: string): SafeParseResult<ListNamedSandboxesPagination, SDKValidationError>; /** @internal */ export declare const ListNamedSandboxesResponseBody$inboundSchema: z.ZodType<ListNamedSandboxesResponseBody, z.ZodTypeDef, unknown>; export declare function listNamedSandboxesResponseBodyFromJSON(jsonString: string): SafeParseResult<ListNamedSandboxesResponseBody, SDKValidationError>; //# sourceMappingURL=listnamedsandboxesop.d.ts.map