@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>
158 lines • 6.53 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 GetCustomEnvironmentRequest = {
/**
* The unique project identifier or the project name
*/
idOrName: string;
/**
* The unique custom environment identifier within the project
*/
environmentSlugOrId: 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;
};
/**
* The type of environment (production, preview, or development)
*/
export declare const GetCustomEnvironmentType: {
readonly Development: "development";
readonly Preview: "preview";
readonly Production: "production";
};
/**
* The type of environment (production, preview, or development)
*/
export type GetCustomEnvironmentType = ClosedEnum<typeof GetCustomEnvironmentType>;
/**
* The type of matching to perform
*/
export declare const GetCustomEnvironmentEnvironmentType: {
readonly EndsWith: "endsWith";
readonly Equals: "equals";
readonly StartsWith: "startsWith";
};
/**
* The type of matching to perform
*/
export type GetCustomEnvironmentEnvironmentType = ClosedEnum<typeof GetCustomEnvironmentEnvironmentType>;
/**
* Configuration for matching git branches to this environment
*/
export type GetCustomEnvironmentBranchMatcher = {
/**
* The type of matching to perform
*/
type: GetCustomEnvironmentEnvironmentType;
/**
* The pattern to match against branch names
*/
pattern: string;
};
/**
* A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`.
*/
export type GetCustomEnvironmentVerification = {
type: string;
domain: string;
value: string;
reason: string;
};
/**
* List of domains associated with this environment
*/
export type GetCustomEnvironmentDomains = {
name: string;
apexName: string;
projectId: string;
redirect?: string | null | undefined;
redirectStatusCode?: number | null | undefined;
gitBranch?: string | null | undefined;
customEnvironmentId?: string | null | undefined;
updatedAt?: number | undefined;
createdAt?: number | undefined;
/**
* `true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed.
*/
verified: boolean;
/**
* A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`.
*/
verification?: Array<GetCustomEnvironmentVerification> | undefined;
};
/**
* Internal representation of a custom environment with all required properties
*/
export type GetCustomEnvironmentResponseBody = {
/**
* Unique identifier for the custom environment (format: env_*)
*/
id: string;
/**
* URL-friendly name of the environment
*/
slug: string;
/**
* The type of environment (production, preview, or development)
*/
type: GetCustomEnvironmentType;
/**
* Optional description of the environment's purpose
*/
description?: string | undefined;
/**
* Configuration for matching git branches to this environment
*/
branchMatcher?: GetCustomEnvironmentBranchMatcher | undefined;
/**
* List of domains associated with this environment
*/
domains?: Array<GetCustomEnvironmentDomains> | undefined;
/**
* List of aliases for the current deployment
*/
currentDeploymentAliases?: Array<string> | undefined;
/**
* Timestamp when the environment was created
*/
createdAt: number;
/**
* Timestamp when the environment was last updated
*/
updatedAt: number;
};
/** @internal */
export type GetCustomEnvironmentRequest$Outbound = {
idOrName: string;
environmentSlugOrId: string;
teamId?: string | undefined;
slug?: string | undefined;
};
/** @internal */
export declare const GetCustomEnvironmentRequest$outboundSchema: z.ZodType<GetCustomEnvironmentRequest$Outbound, z.ZodTypeDef, GetCustomEnvironmentRequest>;
export declare function getCustomEnvironmentRequestToJSON(getCustomEnvironmentRequest: GetCustomEnvironmentRequest): string;
/** @internal */
export declare const GetCustomEnvironmentType$inboundSchema: z.ZodNativeEnum<typeof GetCustomEnvironmentType>;
/** @internal */
export declare const GetCustomEnvironmentEnvironmentType$inboundSchema: z.ZodNativeEnum<typeof GetCustomEnvironmentEnvironmentType>;
/** @internal */
export declare const GetCustomEnvironmentBranchMatcher$inboundSchema: z.ZodType<GetCustomEnvironmentBranchMatcher, z.ZodTypeDef, unknown>;
export declare function getCustomEnvironmentBranchMatcherFromJSON(jsonString: string): SafeParseResult<GetCustomEnvironmentBranchMatcher, SDKValidationError>;
/** @internal */
export declare const GetCustomEnvironmentVerification$inboundSchema: z.ZodType<GetCustomEnvironmentVerification, z.ZodTypeDef, unknown>;
export declare function getCustomEnvironmentVerificationFromJSON(jsonString: string): SafeParseResult<GetCustomEnvironmentVerification, SDKValidationError>;
/** @internal */
export declare const GetCustomEnvironmentDomains$inboundSchema: z.ZodType<GetCustomEnvironmentDomains, z.ZodTypeDef, unknown>;
export declare function getCustomEnvironmentDomainsFromJSON(jsonString: string): SafeParseResult<GetCustomEnvironmentDomains, SDKValidationError>;
/** @internal */
export declare const GetCustomEnvironmentResponseBody$inboundSchema: z.ZodType<GetCustomEnvironmentResponseBody, z.ZodTypeDef, unknown>;
export declare function getCustomEnvironmentResponseBodyFromJSON(jsonString: string): SafeParseResult<GetCustomEnvironmentResponseBody, SDKValidationError>;
//# sourceMappingURL=getcustomenvironmentop.d.ts.map