@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>
70 lines • 3.32 kB
TypeScript
import * as z from "zod/v3";
import { Result as SafeParseResult } from "../types/fp.js";
import { Drive } from "./drive.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
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 100 GiB when omitted.
*/
maxSizeBytes?: number | 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 type GetOrCreateDriveRequestBody$Outbound = {
projectId?: string | undefined;
maxSizeBytes?: number | undefined;
};
/** @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