@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>
53 lines • 2.19 kB
TypeScript
import * as z from "zod/v3";
import { Result as SafeParseResult } from "../types/fp.js";
import { AuthToken } from "./authtoken.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export type CreateAuthTokenRequestBody = {
name: string;
expiresAt?: number | undefined;
};
export type CreateAuthTokenRequest = {
/**
* 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: CreateAuthTokenRequestBody;
};
/**
* Successful response.
*/
export type CreateAuthTokenResponseBody = {
/**
* Authentication token metadata.
*/
token: AuthToken;
/**
* The authentication token's actual value. This token is only provided in this response, and can never be retrieved again in the future. Be sure to save it somewhere safe!
*/
bearerToken: string;
};
/** @internal */
export type CreateAuthTokenRequestBody$Outbound = {
name: string;
expiresAt?: number | undefined;
};
/** @internal */
export declare const CreateAuthTokenRequestBody$outboundSchema: z.ZodType<CreateAuthTokenRequestBody$Outbound, z.ZodTypeDef, CreateAuthTokenRequestBody>;
export declare function createAuthTokenRequestBodyToJSON(createAuthTokenRequestBody: CreateAuthTokenRequestBody): string;
/** @internal */
export type CreateAuthTokenRequest$Outbound = {
teamId?: string | undefined;
slug?: string | undefined;
RequestBody: CreateAuthTokenRequestBody$Outbound;
};
/** @internal */
export declare const CreateAuthTokenRequest$outboundSchema: z.ZodType<CreateAuthTokenRequest$Outbound, z.ZodTypeDef, CreateAuthTokenRequest>;
export declare function createAuthTokenRequestToJSON(createAuthTokenRequest: CreateAuthTokenRequest): string;
/** @internal */
export declare const CreateAuthTokenResponseBody$inboundSchema: z.ZodType<CreateAuthTokenResponseBody, z.ZodTypeDef, unknown>;
export declare function createAuthTokenResponseBodyFromJSON(jsonString: string): SafeParseResult<CreateAuthTokenResponseBody, SDKValidationError>;
//# sourceMappingURL=createauthtokenop.d.ts.map