@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>
225 lines • 13.7 kB
TypeScript
import * as z from "zod/v3";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import { GetProjectAbuse, GetProjectDefaultResourceConfig, GetProjectDeploymentPolicy, GetProjectFeatures, GetProjectGitComments, GetProjectGitProviderOptions, GetProjectInternalRoutesHas, GetProjectInternalRoutesMitigate, GetProjectLastAliasRequest, GetProjectLastRollbackTarget, GetProjectOidcTokenConfig, GetProjectPermissions, GetProjectProtectionBypass, GetProjectSecurity, GetProjectSsoProtection, GetProjectStaticIps, GetProjectTargets, GetProjectTier, GetProjectTrustedIps, GetProjectTrustedSources, GetProjectUsageStatus, GetProjectWebAnalytics } from "./getprojectinternalroutesmitigate.js";
import { GetProjectAlias, GetProjectAnalytics, GetProjectBlobs, GetProjectConnectConfigurations, GetProjectCreator, GetProjectCrons, GetProjectCustomEnvironments, GetProjectDataCache, GetProjectDeploymentExpiration, GetProjectEnv, GetProjectExpiration, GetProjectFramework, GetProjectIntegrations, GetProjectIpBuckets, GetProjectJobs, GetProjectLatestDeployments, GetProjectLink, GetProjectMicrofrontends, GetProjectNodeVersion, GetProjectOptionsAllowlist, GetProjectPassport, GetProjectPasswordProtection, GetProjectProtectionConfig, GetProjectResourceConfig, GetProjectRollbackDescription, GetProjectRollingRelease, GetProjectSandbox, GetProjectServices, GetProjectSpeedInsights } from "./getprojectrollingrelease.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export type GetProjectInternalRoutes2 = {
has: Array<GetProjectInternalRoutesHas>;
mitigate: GetProjectInternalRoutesMitigate;
src?: string | undefined;
};
export type GetProjectInternalRoutes1 = {
src: string;
status: number;
expiry?: number | undefined;
};
export type GetProjectInternalRoutes = GetProjectInternalRoutes1 | GetProjectInternalRoutes2;
export declare const GetProjectAction: {
readonly Accept: "accept";
readonly Cancel: "cancel";
readonly Delete: "delete";
};
export type GetProjectAction = ClosedEnum<typeof GetProjectAction>;
export type ValuePreviousValue = string | number | boolean;
export type ValueCurrentValue = string | number | boolean;
export type GetProjectValue3 = {
previousValue: string | number | boolean;
currentValue: string | number | boolean;
};
export type GetProjectValue = GetProjectValue3 | string | number | boolean;
export type GetProjectDismissedToasts = {
key: string;
dismissedAt: number;
action: GetProjectAction;
value: GetProjectValue3 | string | number | boolean | null;
};
export declare const GetProjectProjectsEnv: {
readonly Preview: "preview";
readonly Production: "production";
};
export type GetProjectProjectsEnv = ClosedEnum<typeof GetProjectProjectsEnv>;
/**
* Which tracing destination this rule applies to. `internal` is the hidden Vercel production-tracing drain (internal delivery); `external` is any customer-configured drain. Derived from the owning drain's delivery type when project tracing is computed; absent on configs persisted before this field existed.
*/
export declare const GetProjectDestination: {
readonly External: "external";
readonly Internal: "internal";
};
/**
* Which tracing destination this rule applies to. `internal` is the hidden Vercel production-tracing drain (internal delivery); `external` is any customer-configured drain. Derived from the owning drain's delivery type when project tracing is computed; absent on configs persisted before this field existed.
*/
export type GetProjectDestination = ClosedEnum<typeof GetProjectDestination>;
export type GetProjectSamplingRules = {
rate: number;
env?: GetProjectProjectsEnv | undefined;
requestPath?: string | undefined;
/**
* Which tracing destination this rule applies to. `internal` is the hidden Vercel production-tracing drain (internal delivery); `external` is any customer-configured drain. Derived from the owning drain's delivery type when project tracing is computed; absent on configs persisted before this field existed.
*/
destination?: GetProjectDestination | undefined;
};
export type GetProjectTracing = {
domains?: string | undefined;
ignorePaths?: Array<string> | undefined;
samplingRules?: Array<GetProjectSamplingRules> | undefined;
};
/**
* The project information
*/
export type GetProjectResponseBody = {
integrations?: Array<GetProjectIntegrations> | undefined;
accountId: string;
creator?: GetProjectCreator | undefined;
alias: Array<GetProjectAlias>;
analytics?: GetProjectAnalytics | undefined;
appliedCve55182Migration?: boolean | undefined;
speedInsights?: GetProjectSpeedInsights | undefined;
autoExposeSystemEnvs?: boolean | undefined;
autoAssignCustomDomains?: boolean | undefined;
autoAssignCustomDomainsUpdatedBy?: string | undefined;
buildCommand?: string | null | undefined;
commandForIgnoringBuildStep?: string | null | undefined;
connectConfigurations?: Array<GetProjectConnectConfigurations> | null | undefined;
connectConfigurationId?: string | null | undefined;
connectBuildsEnabled?: boolean | undefined;
passiveConnectConfigurationId?: string | null | undefined;
createdAt?: number | undefined;
customerSupportCodeVisibility?: boolean | undefined;
crons?: GetProjectCrons | undefined;
dataCache?: GetProjectDataCache | undefined;
/**
* Retention policies for deployments. These are enforced at the project level, but we also maintain an instance of this at the team level as a default policy that gets applied to new projects.
*/
deploymentExpiration: GetProjectDeploymentExpiration;
expiration?: GetProjectExpiration | undefined;
devCommand?: string | null | undefined;
directoryListing: boolean;
installCommand?: string | null | undefined;
env?: Array<GetProjectEnv> | undefined;
customEnvironments?: Array<GetProjectCustomEnvironments> | undefined;
framework?: GetProjectFramework | null | undefined;
services?: Array<GetProjectServices> | undefined;
gitForkProtection?: boolean | undefined;
gitLFS?: boolean | undefined;
id: string;
ipBuckets?: Array<GetProjectIpBuckets> | undefined;
jobs?: GetProjectJobs | undefined;
latestDeployments?: Array<GetProjectLatestDeployments> | undefined;
link?: GetProjectLink | undefined;
blobs?: GetProjectBlobs | undefined;
microfrontends?: GetProjectMicrofrontends | undefined;
name: string;
nodeVersion: GetProjectNodeVersion;
optionsAllowlist?: GetProjectOptionsAllowlist | null | undefined;
outputDirectory?: string | null | undefined;
passwordProtection?: GetProjectPasswordProtection | null | undefined;
passport?: GetProjectPassport | null | undefined;
protectionConfig?: GetProjectProtectionConfig | undefined;
sandbox?: GetProjectSandbox | undefined;
productionDeploymentsFastLane?: boolean | undefined;
resourceConfig: GetProjectResourceConfig;
/**
* Description of why a project was rolled back, and by whom. Note that lastAliasRequest contains the from/to details of the rollback.
*/
rollbackDescription?: GetProjectRollbackDescription | undefined;
/**
* Project-level rolling release configuration that defines how deployments should be gradually rolled out
*/
rollingRelease?: GetProjectRollingRelease | null | undefined;
defaultResourceConfig: GetProjectDefaultResourceConfig;
rootDirectory?: string | null | undefined;
serverlessFunctionZeroConfigFailover?: boolean | undefined;
skewProtectionBoundaryAt?: number | undefined;
skewProtectionMaxAge?: number | undefined;
skewProtectionAllowedDomains?: Array<string> | undefined;
skipGitConnectDuringLink?: boolean | undefined;
staticIps?: GetProjectStaticIps | undefined;
sourceFilesOutsideRootDirectory?: boolean | undefined;
enableAffectedProjectsDeployments?: boolean | undefined;
enableExternalRewriteCaching?: boolean | undefined;
ssoProtection?: GetProjectSsoProtection | null | undefined;
targets?: {
[k: string]: GetProjectTargets | null;
} | undefined;
transferCompletedAt?: number | undefined;
transferStartedAt?: number | undefined;
transferToAccountId?: string | undefined;
transferredFromAccountId?: string | undefined;
updatedAt?: number | undefined;
live?: boolean | undefined;
enablePreviewFeedback?: boolean | null | undefined;
enableProductionFeedback?: boolean | null | undefined;
permissions?: GetProjectPermissions | undefined;
lastRollbackTarget?: GetProjectLastRollbackTarget | null | undefined;
lastAliasRequest?: GetProjectLastAliasRequest | null | undefined;
protectionBypass?: {
[k: string]: GetProjectProtectionBypass;
} | undefined;
hasActiveBranches?: boolean | undefined;
trustedIps?: GetProjectTrustedIps | null | undefined;
trustedSources?: GetProjectTrustedSources | null | undefined;
gitComments?: GetProjectGitComments | undefined;
gitProviderOptions?: GetProjectGitProviderOptions | undefined;
paused?: boolean | undefined;
concurrencyBucketName?: string | undefined;
webAnalytics?: GetProjectWebAnalytics | undefined;
security?: GetProjectSecurity | undefined;
oidcTokenConfig?: GetProjectOidcTokenConfig | undefined;
/**
* Project shape. `null` on a rule list clears the project's override for that rule type (fall back to team for every env); omitting is equivalent. Setting `deploymentPolicy` itself to `null` clears every override at once. Kept structurally distinct from {@link TeamDeploymentPolicy} so the two storage locations don't share a type by accident.
*/
deploymentPolicy?: GetProjectDeploymentPolicy | null | undefined;
tier?: GetProjectTier | undefined;
usageStatus?: GetProjectUsageStatus | undefined;
features?: GetProjectFeatures | undefined;
v0?: boolean | undefined;
v0Created?: boolean | undefined;
abuse?: GetProjectAbuse | undefined;
internalRoutes?: Array<GetProjectInternalRoutes1 | GetProjectInternalRoutes2> | undefined;
hasDeployments?: boolean | undefined;
dismissedToasts?: Array<GetProjectDismissedToasts> | undefined;
protectedSourcemaps?: boolean | undefined;
tracing?: GetProjectTracing | undefined;
avatar?: string | null | undefined;
};
/** @internal */
export declare const GetProjectInternalRoutes2$inboundSchema: z.ZodType<GetProjectInternalRoutes2, z.ZodTypeDef, unknown>;
export declare function getProjectInternalRoutes2FromJSON(jsonString: string): SafeParseResult<GetProjectInternalRoutes2, SDKValidationError>;
/** @internal */
export declare const GetProjectInternalRoutes1$inboundSchema: z.ZodType<GetProjectInternalRoutes1, z.ZodTypeDef, unknown>;
export declare function getProjectInternalRoutes1FromJSON(jsonString: string): SafeParseResult<GetProjectInternalRoutes1, SDKValidationError>;
/** @internal */
export declare const GetProjectInternalRoutes$inboundSchema: z.ZodType<GetProjectInternalRoutes, z.ZodTypeDef, unknown>;
export declare function getProjectInternalRoutesFromJSON(jsonString: string): SafeParseResult<GetProjectInternalRoutes, SDKValidationError>;
/** @internal */
export declare const GetProjectAction$inboundSchema: z.ZodNativeEnum<typeof GetProjectAction>;
/** @internal */
export declare const ValuePreviousValue$inboundSchema: z.ZodType<ValuePreviousValue, z.ZodTypeDef, unknown>;
export declare function valuePreviousValueFromJSON(jsonString: string): SafeParseResult<ValuePreviousValue, SDKValidationError>;
/** @internal */
export declare const ValueCurrentValue$inboundSchema: z.ZodType<ValueCurrentValue, z.ZodTypeDef, unknown>;
export declare function valueCurrentValueFromJSON(jsonString: string): SafeParseResult<ValueCurrentValue, SDKValidationError>;
/** @internal */
export declare const GetProjectValue3$inboundSchema: z.ZodType<GetProjectValue3, z.ZodTypeDef, unknown>;
export declare function getProjectValue3FromJSON(jsonString: string): SafeParseResult<GetProjectValue3, SDKValidationError>;
/** @internal */
export declare const GetProjectValue$inboundSchema: z.ZodType<GetProjectValue, z.ZodTypeDef, unknown>;
export declare function getProjectValueFromJSON(jsonString: string): SafeParseResult<GetProjectValue, SDKValidationError>;
/** @internal */
export declare const GetProjectDismissedToasts$inboundSchema: z.ZodType<GetProjectDismissedToasts, z.ZodTypeDef, unknown>;
export declare function getProjectDismissedToastsFromJSON(jsonString: string): SafeParseResult<GetProjectDismissedToasts, SDKValidationError>;
/** @internal */
export declare const GetProjectProjectsEnv$inboundSchema: z.ZodNativeEnum<typeof GetProjectProjectsEnv>;
/** @internal */
export declare const GetProjectDestination$inboundSchema: z.ZodNativeEnum<typeof GetProjectDestination>;
/** @internal */
export declare const GetProjectSamplingRules$inboundSchema: z.ZodType<GetProjectSamplingRules, z.ZodTypeDef, unknown>;
export declare function getProjectSamplingRulesFromJSON(jsonString: string): SafeParseResult<GetProjectSamplingRules, SDKValidationError>;
/** @internal */
export declare const GetProjectTracing$inboundSchema: z.ZodType<GetProjectTracing, z.ZodTypeDef, unknown>;
export declare function getProjectTracingFromJSON(jsonString: string): SafeParseResult<GetProjectTracing, SDKValidationError>;
/** @internal */
export declare const GetProjectResponseBody$inboundSchema: z.ZodType<GetProjectResponseBody, z.ZodTypeDef, unknown>;
export declare function getProjectResponseBodyFromJSON(jsonString: string): SafeParseResult<GetProjectResponseBody, SDKValidationError>;
//# sourceMappingURL=getprojectresponsebody.d.ts.map