@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>
298 lines • 11.9 kB
TypeScript
import * as z from "zod/v3";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export type GetAliasRequest = {
/**
* Get the alias only if it was created after the provided timestamp
*/
from?: number | undefined;
/**
* The alias or alias ID to be retrieved
*/
idOrAlias: string;
/**
* Get the alias only if it is assigned to the provided project ID
*/
projectId?: string | undefined;
/**
* Get the alias only if it was created after this JavaScript timestamp
*/
since?: number | undefined;
/**
* Get the alias only if it was created before this JavaScript timestamp
*/
until?: number | 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;
};
/**
* Information of the user who created the alias
*/
export type GetAliasCreator = {
/**
* ID of the user who created the alias
*/
uid: string;
/**
* Email of the user who created the alias
*/
email?: string | undefined;
/**
* Username of the user who created the alias
*/
username?: string | undefined;
};
/**
* A map with the deployment ID, URL and metadata
*/
export type GetAliasDeployment = {
/**
* The deployment unique identifier
*/
id: string;
/**
* The deployment unique URL
*/
url?: string | undefined;
/**
* The deployment metadata
*/
meta?: string | undefined;
};
/**
* The protection bypass for the alias
*/
export type ProtectionBypass4 = {
createdAt: number;
lastUpdatedAt: number;
lastUpdatedBy: string;
scope: "email_invite";
};
/**
* The protection bypass for the alias
*/
export type ProtectionBypass3 = {
createdAt: number;
createdBy: string;
scope: "alias-protection-override";
};
export declare const ProtectionBypassAccess: {
readonly Granted: "granted";
readonly Requested: "requested";
};
export type ProtectionBypassAccess = ClosedEnum<typeof ProtectionBypassAccess>;
/**
* The protection bypass for the alias
*/
export type GetAliasProtectionBypass2 = {
createdAt: number;
lastUpdatedAt: number;
lastUpdatedBy: string;
access: ProtectionBypassAccess;
scope: "user";
};
/**
* The protection bypass for the alias
*/
export type GetAliasProtectionBypass1 = {
createdAt: number;
createdBy: string;
scope: "shareable-link";
expires?: number | undefined;
};
export type GetAliasProtectionBypass = GetAliasProtectionBypass1 | GetAliasProtectionBypass2 | ProtectionBypass3 | ProtectionBypass4;
export type GetAliasDefaultApp = {
projectId: string;
};
/**
* A list of the deployment routing information for each project.
*/
export type Applications3 = {
/**
* This is the deployment for the same commit, it could be a cancelled deployment. The proxy will fallback to the branchDeploymentId and then the fallbackDeploymentId.
*/
deploymentId?: string | undefined;
/**
* This is the latest non-cancelled deployment of the branch alias at the time the commit alias was created. It is possible there is no deployment for the branch, or this was set before the deployment was canceled, in which case this will point to a cancelled deployment, in either case the proxy will fallback to the fallbackDeploymentId.
*/
branchDeploymentId?: string | undefined;
/**
* This is the deployment of the fallback host at the time the commit alias was created. It is possible for this to be a deleted deployment, in which case the proxy will show that the deployment is deleted. It will not use the fallbackHost, as a future deployment on the fallback host could be invalid for this deployment, and it could lead to confusion / incorrect behavior for the commit alias.
*/
fallbackDeploymentId?: string | undefined;
/**
* Temporary for backwards compatibility. Can remove when metadata change is released
*/
fallbackHost?: string | undefined;
branchAlias?: string | undefined;
/**
* The project ID of the microfrontends application.
*/
projectId: string;
};
/**
* A list of the deployment routing information for each project.
*/
export type GetAliasApplications2 = {
/**
* This is always set. For branch aliases, it's used as the fallback if there is no deployment for the branch.
*/
fallbackHost: string;
/**
* Could point to a branch without a deployment if the project was never deployed. The proxy will fallback to the fallbackHost if there is no deployment.
*/
branchAlias: string;
/**
* The project ID of the microfrontends application.
*/
projectId: string;
};
/**
* A list of the deployment routing information for each project.
*/
export type GetAliasApplications1 = {
/**
* This is always set. In production it is used as a pointer to each apps production deployment. For pre-production, it's used as the fallback if there is no deployment for the branch.
*/
fallbackHost: string;
/**
* The project ID of the microfrontends application.
*/
projectId: string;
};
export type GetAliasApplications = Array<GetAliasApplications1> | Array<GetAliasApplications2> | Array<Applications3>;
/**
* The microfrontends for the alias including the routing configuration
*/
export type GetAliasMicrofrontends = {
defaultApp: GetAliasDefaultApp;
applications: Array<GetAliasApplications1> | Array<GetAliasApplications2> | Array<Applications3>;
};
/**
* The alias information
*/
export type GetAliasResponseBody = {
/**
* The alias name, it could be a `.vercel.app` subdomain or a custom domain
*/
alias: string;
/**
* The date when the alias was created
*/
created: Date;
/**
* The date when the alias was created in milliseconds since the UNIX epoch
*/
createdAt?: number | null | undefined;
/**
* Information of the user who created the alias
*/
creator?: GetAliasCreator | undefined;
/**
* The date when the alias was deleted in milliseconds since the UNIX epoch
*/
deletedAt?: number | null | undefined;
/**
* A map with the deployment ID, URL and metadata
*/
deployment?: GetAliasDeployment | undefined;
/**
* The deployment ID
*/
deploymentId: string | null;
/**
* The unique identifier of the project
*/
projectId: string | null;
/**
* Target destination domain for redirect when the alias is a redirect
*/
redirect?: string | null | undefined;
/**
* Status code to be used on redirect
*/
redirectStatusCode?: number | null | undefined;
/**
* The unique identifier of the alias
*/
uid: string;
/**
* The date when the alias was updated in milliseconds since the UNIX epoch
*/
updatedAt?: number | null | undefined;
/**
* The protection bypass for the alias
*/
protectionBypass?: {
[k: string]: GetAliasProtectionBypass1 | GetAliasProtectionBypass2 | ProtectionBypass3 | ProtectionBypass4;
} | undefined;
/**
* The microfrontends for the alias including the routing configuration
*/
microfrontends?: GetAliasMicrofrontends | undefined;
};
/** @internal */
export type GetAliasRequest$Outbound = {
from?: number | undefined;
idOrAlias: string;
projectId?: string | undefined;
since?: number | undefined;
until?: number | undefined;
teamId?: string | undefined;
slug?: string | undefined;
};
/** @internal */
export declare const GetAliasRequest$outboundSchema: z.ZodType<GetAliasRequest$Outbound, z.ZodTypeDef, GetAliasRequest>;
export declare function getAliasRequestToJSON(getAliasRequest: GetAliasRequest): string;
/** @internal */
export declare const GetAliasCreator$inboundSchema: z.ZodType<GetAliasCreator, z.ZodTypeDef, unknown>;
export declare function getAliasCreatorFromJSON(jsonString: string): SafeParseResult<GetAliasCreator, SDKValidationError>;
/** @internal */
export declare const GetAliasDeployment$inboundSchema: z.ZodType<GetAliasDeployment, z.ZodTypeDef, unknown>;
export declare function getAliasDeploymentFromJSON(jsonString: string): SafeParseResult<GetAliasDeployment, SDKValidationError>;
/** @internal */
export declare const ProtectionBypass4$inboundSchema: z.ZodType<ProtectionBypass4, z.ZodTypeDef, unknown>;
export declare function protectionBypass4FromJSON(jsonString: string): SafeParseResult<ProtectionBypass4, SDKValidationError>;
/** @internal */
export declare const ProtectionBypass3$inboundSchema: z.ZodType<ProtectionBypass3, z.ZodTypeDef, unknown>;
export declare function protectionBypass3FromJSON(jsonString: string): SafeParseResult<ProtectionBypass3, SDKValidationError>;
/** @internal */
export declare const ProtectionBypassAccess$inboundSchema: z.ZodNativeEnum<typeof ProtectionBypassAccess>;
/** @internal */
export declare const GetAliasProtectionBypass2$inboundSchema: z.ZodType<GetAliasProtectionBypass2, z.ZodTypeDef, unknown>;
export declare function getAliasProtectionBypass2FromJSON(jsonString: string): SafeParseResult<GetAliasProtectionBypass2, SDKValidationError>;
/** @internal */
export declare const GetAliasProtectionBypass1$inboundSchema: z.ZodType<GetAliasProtectionBypass1, z.ZodTypeDef, unknown>;
export declare function getAliasProtectionBypass1FromJSON(jsonString: string): SafeParseResult<GetAliasProtectionBypass1, SDKValidationError>;
/** @internal */
export declare const GetAliasProtectionBypass$inboundSchema: z.ZodType<GetAliasProtectionBypass, z.ZodTypeDef, unknown>;
export declare function getAliasProtectionBypassFromJSON(jsonString: string): SafeParseResult<GetAliasProtectionBypass, SDKValidationError>;
/** @internal */
export declare const GetAliasDefaultApp$inboundSchema: z.ZodType<GetAliasDefaultApp, z.ZodTypeDef, unknown>;
export declare function getAliasDefaultAppFromJSON(jsonString: string): SafeParseResult<GetAliasDefaultApp, SDKValidationError>;
/** @internal */
export declare const Applications3$inboundSchema: z.ZodType<Applications3, z.ZodTypeDef, unknown>;
export declare function applications3FromJSON(jsonString: string): SafeParseResult<Applications3, SDKValidationError>;
/** @internal */
export declare const GetAliasApplications2$inboundSchema: z.ZodType<GetAliasApplications2, z.ZodTypeDef, unknown>;
export declare function getAliasApplications2FromJSON(jsonString: string): SafeParseResult<GetAliasApplications2, SDKValidationError>;
/** @internal */
export declare const GetAliasApplications1$inboundSchema: z.ZodType<GetAliasApplications1, z.ZodTypeDef, unknown>;
export declare function getAliasApplications1FromJSON(jsonString: string): SafeParseResult<GetAliasApplications1, SDKValidationError>;
/** @internal */
export declare const GetAliasApplications$inboundSchema: z.ZodType<GetAliasApplications, z.ZodTypeDef, unknown>;
export declare function getAliasApplicationsFromJSON(jsonString: string): SafeParseResult<GetAliasApplications, SDKValidationError>;
/** @internal */
export declare const GetAliasMicrofrontends$inboundSchema: z.ZodType<GetAliasMicrofrontends, z.ZodTypeDef, unknown>;
export declare function getAliasMicrofrontendsFromJSON(jsonString: string): SafeParseResult<GetAliasMicrofrontends, SDKValidationError>;
/** @internal */
export declare const GetAliasResponseBody$inboundSchema: z.ZodType<GetAliasResponseBody, z.ZodTypeDef, unknown>;
export declare function getAliasResponseBodyFromJSON(jsonString: string): SafeParseResult<GetAliasResponseBody, SDKValidationError>;
//# sourceMappingURL=getaliasop.d.ts.map