@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>
106 lines • 4.51 kB
TypeScript
import * as z from "zod/v3";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import { Drive } from "./drive.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
/**
* Region where the drive is stored. Defaults to iad1.
*/
export declare const GetOrCreateDriveRegion: {
readonly Iad1: "iad1";
readonly Sfo1: "sfo1";
readonly Cle1: "cle1";
readonly Cdg1: "cdg1";
readonly Fra1: "fra1";
readonly Arn1: "arn1";
readonly Sin1: "sin1";
readonly Pdx1: "pdx1";
readonly Lhr1: "lhr1";
readonly Icn1: "icn1";
readonly Bom1: "bom1";
readonly Cpt1: "cpt1";
readonly Dub1: "dub1";
readonly Gru1: "gru1";
readonly Hkg1: "hkg1";
readonly Syd1: "syd1";
readonly Yul1: "yul1";
readonly Hnd1: "hnd1";
readonly Kix1: "kix1";
};
/**
* Region where the drive is stored. Defaults to iad1.
*/
export type GetOrCreateDriveRegion = ClosedEnum<typeof GetOrCreateDriveRegion>;
export type GetOrCreateDriveRequestBody = {
/**
* The project ID or name to associate the drive with. Required unless using a Vercel OIDC token scoped to a project.
*/
projectId?: string | undefined;
/**
* Maximum drive size in bytes. Defaults to 1 TiB when omitted (1 GiB for Hobby). The maximum quota is 16 TiB. Request a quota above 16 TiB at https://vercel.com/help.
*/
maxSizeBytes?: number | undefined;
/**
* Region where the drive is stored. Defaults to iad1.
*/
region?: GetOrCreateDriveRegion | undefined;
};
export type GetOrCreateDriveRequest = {
/**
* Name for the drive. Must be unique per project and URL-safe (alphanumeric, hyphens, underscores).
*/
name: 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?: GetOrCreateDriveRequestBody | undefined;
};
export type GetOrCreateDriveSandboxesResponseBody = {
/**
* This object contains information related to a Vercel Sandbox Drive.
*/
drive: Drive;
};
export type GetOrCreateDriveResponseBody = {
/**
* This object contains information related to a Vercel Sandbox Drive.
*/
drive: Drive;
};
export type GetOrCreateDriveResponse = GetOrCreateDriveResponseBody | GetOrCreateDriveSandboxesResponseBody;
/** @internal */
export declare const GetOrCreateDriveRegion$outboundSchema: z.ZodNativeEnum<typeof GetOrCreateDriveRegion>;
/** @internal */
export type GetOrCreateDriveRequestBody$Outbound = {
projectId?: string | undefined;
maxSizeBytes?: number | undefined;
region: string;
};
/** @internal */
export declare const GetOrCreateDriveRequestBody$outboundSchema: z.ZodType<GetOrCreateDriveRequestBody$Outbound, z.ZodTypeDef, GetOrCreateDriveRequestBody>;
export declare function getOrCreateDriveRequestBodyToJSON(getOrCreateDriveRequestBody: GetOrCreateDriveRequestBody): string;
/** @internal */
export type GetOrCreateDriveRequest$Outbound = {
name: string;
teamId?: string | undefined;
slug?: string | undefined;
RequestBody?: GetOrCreateDriveRequestBody$Outbound | undefined;
};
/** @internal */
export declare const GetOrCreateDriveRequest$outboundSchema: z.ZodType<GetOrCreateDriveRequest$Outbound, z.ZodTypeDef, GetOrCreateDriveRequest>;
export declare function getOrCreateDriveRequestToJSON(getOrCreateDriveRequest: GetOrCreateDriveRequest): string;
/** @internal */
export declare const GetOrCreateDriveSandboxesResponseBody$inboundSchema: z.ZodType<GetOrCreateDriveSandboxesResponseBody, z.ZodTypeDef, unknown>;
export declare function getOrCreateDriveSandboxesResponseBodyFromJSON(jsonString: string): SafeParseResult<GetOrCreateDriveSandboxesResponseBody, SDKValidationError>;
/** @internal */
export declare const GetOrCreateDriveResponseBody$inboundSchema: z.ZodType<GetOrCreateDriveResponseBody, z.ZodTypeDef, unknown>;
export declare function getOrCreateDriveResponseBodyFromJSON(jsonString: string): SafeParseResult<GetOrCreateDriveResponseBody, SDKValidationError>;
/** @internal */
export declare const GetOrCreateDriveResponse$inboundSchema: z.ZodType<GetOrCreateDriveResponse, z.ZodTypeDef, unknown>;
export declare function getOrCreateDriveResponseFromJSON(jsonString: string): SafeParseResult<GetOrCreateDriveResponse, SDKValidationError>;
//# sourceMappingURL=getorcreatedriveop.d.ts.map