@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>
4,569 lines • 159 kB
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { remap as remap$ } from "../lib/primitives.js";
import { safeParse } from "../lib/schemas.js";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
import { ACLAction, ACLAction$inboundSchema } from "./aclaction.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export const CreateProjectProjectsDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type CreateProjectProjectsDeploymentType = ClosedEnum<
typeof CreateProjectProjectsDeploymentType
>;
export type CreateProjectPassport = {
deploymentType: CreateProjectProjectsDeploymentType;
connectorId: string;
};
export type SandboxUrls = {
inheritDeploymentProtection?: boolean | undefined;
};
export type ProtectionConfig = {
sandboxUrls?: SandboxUrls | undefined;
};
export const CreateProjectRegion = {
Arn1: "arn1",
Bom1: "bom1",
Cdg1: "cdg1",
Cle1: "cle1",
Cpt1: "cpt1",
Dub1: "dub1",
Fra1: "fra1",
Gru1: "gru1",
Hkg1: "hkg1",
Hnd1: "hnd1",
Iad1: "iad1",
Icn1: "icn1",
Kix1: "kix1",
Lhr1: "lhr1",
Pdx1: "pdx1",
Sfo1: "sfo1",
Sin1: "sin1",
Syd1: "syd1",
Yul1: "yul1",
} as const;
export type CreateProjectRegion = ClosedEnum<typeof CreateProjectRegion>;
export const CreateProjectProjectsFailoverRegions = {
Arn1: "arn1",
Bom1: "bom1",
Cdg1: "cdg1",
Cle1: "cle1",
Cpt1: "cpt1",
Dub1: "dub1",
Fra1: "fra1",
Gru1: "gru1",
Hkg1: "hkg1",
Hnd1: "hnd1",
Iad1: "iad1",
Icn1: "icn1",
Kix1: "kix1",
Lhr1: "lhr1",
Pdx1: "pdx1",
Sfo1: "sfo1",
Sin1: "sin1",
Syd1: "syd1",
Yul1: "yul1",
} as const;
export type CreateProjectProjectsFailoverRegions = ClosedEnum<
typeof CreateProjectProjectsFailoverRegions
>;
export type CreateProjectSandbox = {
region?: CreateProjectRegion | undefined;
failoverRegions?: Array<CreateProjectProjectsFailoverRegions> | undefined;
};
export const CreateProjectFunctionDefaultMemoryType = {
Performance: "performance",
PerformanceXl: "performance_xl",
Standard: "standard",
StandardLegacy: "standard_legacy",
} as const;
export type CreateProjectFunctionDefaultMemoryType = ClosedEnum<
typeof CreateProjectFunctionDefaultMemoryType
>;
export const CreateProjectBuildMachineType = {
Basic: "basic",
Enhanced: "enhanced",
Standard: "standard",
Turbo: "turbo",
} as const;
export type CreateProjectBuildMachineType = ClosedEnum<
typeof CreateProjectBuildMachineType
>;
export const CreateProjectBuildMachineSelection = {
Elastic: "elastic",
Fixed: "fixed",
} as const;
export type CreateProjectBuildMachineSelection = ClosedEnum<
typeof CreateProjectBuildMachineSelection
>;
export const CreateProjectBuildMachineElasticReason = {
BasicFloor: "basic-floor",
BuildTimeoutFailure: "build-timeout-failure",
EnospcFailure: "enospc-failure",
EnterpriseFloor: "enterprise-floor",
HighPeakDisk: "high-peak-disk",
HighPeakMemory: "high-peak-memory",
LongBuildDuration: "long-build-duration",
OomFailure: "oom-failure",
ShortBuildDuration: "short-build-duration",
SustainedHighCpu: "sustained-high-cpu",
} as const;
export type CreateProjectBuildMachineElasticReason = ClosedEnum<
typeof CreateProjectBuildMachineElasticReason
>;
export const CreateProjectProjectsConfiguration = {
SkipNamespaceQueue: "SKIP_NAMESPACE_QUEUE",
WaitForNamespaceQueue: "WAIT_FOR_NAMESPACE_QUEUE",
} as const;
export type CreateProjectProjectsConfiguration = ClosedEnum<
typeof CreateProjectProjectsConfiguration
>;
export type CreateProjectProjectsBuildQueue = {
configuration?: CreateProjectProjectsConfiguration | undefined;
};
export type CreateProjectProjectsResourceConfig = {
elasticConcurrencyEnabled?: boolean | undefined;
fluid?: boolean | undefined;
functionDefaultRegions: Array<string>;
functionDefaultTimeout?: number | undefined;
functionDefaultMemoryType?:
| CreateProjectFunctionDefaultMemoryType
| undefined;
functionZeroConfigFailover?: boolean | undefined;
buildMachineType?: CreateProjectBuildMachineType | undefined;
buildMachineSelection?: CreateProjectBuildMachineSelection | undefined;
buildMachineElasticLastUpdated?: number | undefined;
buildMachineElasticReason?:
| CreateProjectBuildMachineElasticReason
| undefined;
isNSNBDisabled?: boolean | undefined;
buildQueue?: CreateProjectProjectsBuildQueue | undefined;
enableFunctionsBeta?: boolean | undefined;
};
/**
* Description of why a project was rolled back, and by whom. Note that lastAliasRequest contains the from/to details of the rollback.
*/
export type CreateProjectRollbackDescription = {
/**
* The user who rolled back the project.
*/
userId: string;
/**
* The username of the user who rolled back the project.
*/
username: string;
/**
* User-supplied explanation of why they rolled back the project. Limited to 250 characters.
*/
description: string;
/**
* Timestamp of when the rollback was requested.
*/
createdAt: number;
};
/**
* An array of all the stages required during a deployment release. Each stage defines a target percentage and advancement rules. The final stage must always have targetPercentage: 100.
*/
export type Stages = {
/**
* The percentage of traffic to serve to the canary deployment (0-100)
*/
targetPercentage: number;
/**
* Whether or not this stage requires manual approval to proceed
*/
requireApproval?: boolean | undefined;
/**
* Duration in minutes for automatic advancement to the next stage
*/
duration?: number | undefined;
/**
* Whether to linearly shift traffic over the duration of this stage
*/
linearShift?: boolean | undefined;
};
/**
* The metric this check evaluates.
*/
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType =
{
ErrorRate5xx: "error-rate-5xx",
} as const;
/**
* The metric this check evaluates.
*/
export type CreateProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType =
ClosedEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType
>;
/**
* The checks to evaluate. An empty array means nothing is evaluated.
*/
export type CreateProjectChecks = {
/**
* The metric this check evaluates.
*/
type:
CreateProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType;
/**
* Minimum number of requests required in the window before the check can fail. Below this, the check is inconclusive rather than failing, so low-traffic stages don't gate on noise. Defaults to `100` when omitted.
*/
minSampleSize?: number | undefined;
/**
* Response status codes to ignore entirely — dropped from both the numerator (errors) and the denominator (total requests). Defaults to `[]` when omitted.
*/
excludeStatusCodes?: Array<number> | undefined;
/**
* Request paths to ignore entirely — dropped from both the numerator (errors) and the denominator (total requests). Matched exactly against the request path with any query string removed; no prefix or glob matching. Defaults to `[]` when omitted.
*/
excludePaths?: Array<string> | undefined;
/**
* Seconds of ingest lag to allow for: the query's upper bound is `now() - this value`, so the check never reads a window that is still filling. Defaults to `30` when omitted.
*/
ingestWatermarkSeconds?: number | undefined;
};
/**
* What to do when the gate trips: pause the rollout, or roll it back.
*/
export const CreateProjectProjectsResponse200ApplicationJSONAction = {
Pause: "pause",
Rollback: "rollback",
} as const;
/**
* What to do when the gate trips: pause the rollout, or roll it back.
*/
export type CreateProjectProjectsResponse200ApplicationJSONAction = ClosedEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONAction
>;
/**
* Automated gating configuration. Omitted (the default) means no gating is configured, which is equivalent to `enabled: false`.
*/
export type Gate = {
/**
* Whether automated gating is enabled for this project's rollouts.
*/
enabled: boolean;
/**
* The checks to evaluate. An empty array means nothing is evaluated.
*/
checks: Array<CreateProjectChecks>;
/**
* How many failing evaluations within {@link windowSize} trip the gate. Defaults to `3` when omitted.
*/
failureThreshold?: number | undefined;
/**
* How many of the most recent evaluations {@link failureThreshold} is counted against. Defaults to `5` when omitted.
*/
windowSize?: number | undefined;
/**
* What to do when the gate trips: pause the rollout, or roll it back.
*/
action: CreateProjectProjectsResponse200ApplicationJSONAction;
/**
* When true, a tripped gate is only reported — {@link action} is not taken.
*/
dryRun: boolean;
};
/**
* Project-level rolling release configuration that defines how deployments should be gradually rolled out
*/
export type RollingRelease = {
/**
* The environment that the release targets, currently only supports production. Adding in case we want to configure with alias groups or custom environments.
*/
target: string;
/**
* An array of all the stages required during a deployment release. Each stage defines a target percentage and advancement rules. The final stage must always have targetPercentage: 100.
*/
stages?: Array<Stages> | null | undefined;
/**
* Whether the request served by a canary deployment should return a header indicating a canary was served. Defaults to `false` when omitted.
*/
canaryResponseHeader?: boolean | undefined;
/**
* Automated gating configuration. Omitted (the default) means no gating is configured, which is equivalent to `enabled: false`.
*/
gate?: Gate | undefined;
};
export const CreateProjectProjectsFunctionDefaultMemoryType = {
Performance: "performance",
PerformanceXl: "performance_xl",
Standard: "standard",
StandardLegacy: "standard_legacy",
} as const;
export type CreateProjectProjectsFunctionDefaultMemoryType = ClosedEnum<
typeof CreateProjectProjectsFunctionDefaultMemoryType
>;
export const CreateProjectProjectsBuildMachineType = {
Basic: "basic",
Enhanced: "enhanced",
Standard: "standard",
Turbo: "turbo",
} as const;
export type CreateProjectProjectsBuildMachineType = ClosedEnum<
typeof CreateProjectProjectsBuildMachineType
>;
export const CreateProjectProjectsBuildMachineSelection = {
Elastic: "elastic",
Fixed: "fixed",
} as const;
export type CreateProjectProjectsBuildMachineSelection = ClosedEnum<
typeof CreateProjectProjectsBuildMachineSelection
>;
export const CreateProjectProjectsBuildMachineElasticReason = {
BasicFloor: "basic-floor",
BuildTimeoutFailure: "build-timeout-failure",
EnospcFailure: "enospc-failure",
EnterpriseFloor: "enterprise-floor",
HighPeakDisk: "high-peak-disk",
HighPeakMemory: "high-peak-memory",
LongBuildDuration: "long-build-duration",
OomFailure: "oom-failure",
ShortBuildDuration: "short-build-duration",
SustainedHighCpu: "sustained-high-cpu",
} as const;
export type CreateProjectProjectsBuildMachineElasticReason = ClosedEnum<
typeof CreateProjectProjectsBuildMachineElasticReason
>;
export const CreateProjectProjectsResponseConfiguration = {
SkipNamespaceQueue: "SKIP_NAMESPACE_QUEUE",
WaitForNamespaceQueue: "WAIT_FOR_NAMESPACE_QUEUE",
} as const;
export type CreateProjectProjectsResponseConfiguration = ClosedEnum<
typeof CreateProjectProjectsResponseConfiguration
>;
export type CreateProjectProjectsResponseBuildQueue = {
configuration?: CreateProjectProjectsResponseConfiguration | undefined;
};
export type DefaultResourceConfig = {
elasticConcurrencyEnabled?: boolean | undefined;
fluid?: boolean | undefined;
functionDefaultRegions: Array<string>;
functionDefaultTimeout?: number | undefined;
functionDefaultMemoryType?:
| CreateProjectProjectsFunctionDefaultMemoryType
| undefined;
functionZeroConfigFailover?: boolean | undefined;
buildMachineType?: CreateProjectProjectsBuildMachineType | undefined;
buildMachineSelection?:
| CreateProjectProjectsBuildMachineSelection
| undefined;
buildMachineElasticLastUpdated?: number | undefined;
buildMachineElasticReason?:
| CreateProjectProjectsBuildMachineElasticReason
| undefined;
isNSNBDisabled?: boolean | undefined;
buildQueue?: CreateProjectProjectsResponseBuildQueue | undefined;
enableFunctionsBeta?: boolean | undefined;
};
export type CreateProjectStaticIps = {
builds: boolean;
enabled: boolean;
regions: Array<string>;
};
export const CreateProjectProjectsResponseDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type CreateProjectProjectsResponseDeploymentType = ClosedEnum<
typeof CreateProjectProjectsResponseDeploymentType
>;
export const CreateProjectCve55182MigrationAppliedFrom = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type CreateProjectCve55182MigrationAppliedFrom = ClosedEnum<
typeof CreateProjectCve55182MigrationAppliedFrom
>;
export const CreateProjectApril2026SecurityIncidentMigrationAppliedFrom = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type CreateProjectApril2026SecurityIncidentMigrationAppliedFrom =
ClosedEnum<typeof CreateProjectApril2026SecurityIncidentMigrationAppliedFrom>;
export type CreateProjectProjectsSsoProtection = {
deploymentType: CreateProjectProjectsResponseDeploymentType;
cve55182MigrationAppliedFrom?:
| CreateProjectCve55182MigrationAppliedFrom
| null
| undefined;
april2026SecurityIncidentMigrationAppliedFrom?:
| CreateProjectApril2026SecurityIncidentMigrationAppliedFrom
| null
| undefined;
};
export type CreateProjectAliasAssigned = number | boolean;
export type CreateProjectProjectsAliasError = {
code: string;
message: string;
};
/**
* The type of matching to perform
*/
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType =
{
EndsWith: "endsWith",
Equals: "equals",
StartsWith: "startsWith",
} as const;
/**
* The type of matching to perform
*/
export type CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType =
ClosedEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType
>;
export type CreateProjectProjectsResponseBranchMatcher = {
/**
* The type of matching to perform
*/
type: CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType;
/**
* The pattern to match against branch names
*/
pattern: string;
};
export type CreateProjectProjectsBuilds = {
use: string;
src?: string | undefined;
dest?: string | undefined;
};
export const CreateProjectProjectsChecksConclusion = {
Canceled: "canceled",
Failed: "failed",
Skipped: "skipped",
Succeeded: "succeeded",
} as const;
export type CreateProjectProjectsChecksConclusion = ClosedEnum<
typeof CreateProjectProjectsChecksConclusion
>;
export const CreateProjectProjectsChecksState = {
Completed: "completed",
Registered: "registered",
Running: "running",
} as const;
export type CreateProjectProjectsChecksState = ClosedEnum<
typeof CreateProjectProjectsChecksState
>;
export type CreateProjectProjectsResponseCreator = {
email: string;
githubLogin?: string | undefined;
gitlabLogin?: string | undefined;
uid: string;
username: string;
};
export type CreateProjectProjectsOidcTokenClaims = {
iss: string;
sub: string;
scope: string;
aud: string;
owner: string;
ownerId: string;
project: string;
projectId: string;
environment: string;
customEnvironmentId?: string | undefined;
mfeGroupIds?: Array<string> | undefined;
plan?: string | undefined;
};
export const CreateProjectProjectsPlan = {
Enterprise: "enterprise",
Hobby: "hobby",
Pro: "pro",
} as const;
export type CreateProjectProjectsPlan = ClosedEnum<
typeof CreateProjectProjectsPlan
>;
export const CreateProjectProjectsReadyState = {
Blocked: "BLOCKED",
Building: "BUILDING",
Canceled: "CANCELED",
Error: "ERROR",
Initializing: "INITIALIZING",
Queued: "QUEUED",
Ready: "READY",
} as const;
export type CreateProjectProjectsReadyState = ClosedEnum<
typeof CreateProjectProjectsReadyState
>;
export const CreateProjectProjectsReadySubstate = {
Promoted: "PROMOTED",
Rolling: "ROLLING",
Staged: "STAGED",
} as const;
export type CreateProjectProjectsReadySubstate = ClosedEnum<
typeof CreateProjectProjectsReadySubstate
>;
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodyType = {
Lambdas: "LAMBDAS",
} as const;
export type CreateProjectProjectsResponse200ApplicationJSONResponseBodyType =
ClosedEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodyType
>;
export type CreateProjectTargets = {
id: string;
alias?: Array<string> | undefined;
aliasAssigned?: number | boolean | null | undefined;
aliasError?: CreateProjectProjectsAliasError | null | undefined;
aliasFinal?: string | null | undefined;
automaticAliases?: Array<string> | undefined;
branchMatcher?: CreateProjectProjectsResponseBranchMatcher | undefined;
buildingAt?: number | undefined;
builds?: Array<CreateProjectProjectsBuilds> | undefined;
checksConclusion?: CreateProjectProjectsChecksConclusion | undefined;
checksState?: CreateProjectProjectsChecksState | undefined;
connectBuildsEnabled?: boolean | undefined;
connectConfigurationId?: string | undefined;
createdAt: number;
createdIn: string;
creator: CreateProjectProjectsResponseCreator | null;
deletedAt?: number | undefined;
deploymentHostname: string;
forced?: boolean | undefined;
name: string;
meta?: { [k: string]: string } | undefined;
monorepoManager?: string | null | undefined;
oidcTokenClaims?: CreateProjectProjectsOidcTokenClaims | undefined;
plan: CreateProjectProjectsPlan;
/**
* Whether or not preview comments are enabled for the deployment
*/
previewCommentsEnabled?: boolean | undefined;
private: boolean;
readyAt?: number | undefined;
readyState: CreateProjectProjectsReadyState;
readySubstate?: CreateProjectProjectsReadySubstate | undefined;
requestedAt?: number | undefined;
target?: string | null | undefined;
teamId?: string | null | undefined;
type: CreateProjectProjectsResponse200ApplicationJSONResponseBodyType;
url: string;
/**
* Present for user creators; omitted for app/integration/system creators.
*/
userId?: string | undefined;
withCache?: boolean | undefined;
};
export type CreateProjectPermissions = {
oauth2Connection?: Array<ACLAction> | undefined;
user?: Array<ACLAction> | undefined;
userConnection?: Array<ACLAction> | undefined;
userMfaConfiguration?: Array<ACLAction> | undefined;
userPreference?: Array<ACLAction> | undefined;
userSudo?: Array<ACLAction> | undefined;
webAuthn?: Array<ACLAction> | undefined;
accessGroup?: Array<ACLAction> | undefined;
agent?: Array<ACLAction> | undefined;
aiGatewayApiKey?: Array<ACLAction> | undefined;
aiGatewayApiKeyBypassAll?: Array<ACLAction> | undefined;
aiGatewayApiKeyOwnedBySelf?: Array<ACLAction> | undefined;
aiGatewayApiKeySpendAttribution?: Array<ACLAction> | undefined;
aiGatewayApiKeyZdrExemption?: Array<ACLAction> | undefined;
aiGatewayBudget?: Array<ACLAction> | undefined;
aiGatewayCredits?: Array<ACLAction> | undefined;
aiGatewayPrivateModels?: Array<ACLAction> | undefined;
aiGatewayGuardrails?: Array<ACLAction> | undefined;
aiGatewayRules?: Array<ACLAction> | undefined;
aiGatewaySettings?: Array<ACLAction> | undefined;
aiGatewayTranscripts?: Array<ACLAction> | undefined;
aiGatewayTranscriptsSettings?: Array<ACLAction> | undefined;
aiGatewayUsage?: Array<ACLAction> | undefined;
aiGatewayVirtualModelConfigs?: Array<ACLAction> | undefined;
alerts?: Array<ACLAction> | undefined;
alertRules?: Array<ACLAction> | undefined;
aliasGlobal?: Array<ACLAction> | undefined;
analyticsSampling?: Array<ACLAction> | undefined;
analyticsUsage?: Array<ACLAction> | undefined;
apiKey?: Array<ACLAction> | undefined;
apiKeyAiGateway?: Array<ACLAction> | undefined;
apiKeyOwnedBySelf?: Array<ACLAction> | undefined;
oauth2Application?: Array<ACLAction> | undefined;
vercelAppInstallation?: Array<ACLAction> | undefined;
vercelAppInstallationRequest?: Array<ACLAction> | undefined;
auditLog?: Array<ACLAction> | undefined;
automation?: Array<ACLAction> | undefined;
billingAddress?: Array<ACLAction> | undefined;
billingInformation?: Array<ACLAction> | undefined;
billingInvoice?: Array<ACLAction> | undefined;
billingInvoiceEmailRecipient?: Array<ACLAction> | undefined;
billingInvoiceLanguage?: Array<ACLAction> | undefined;
billingPlan?: Array<ACLAction> | undefined;
billingPurchaseOrder?: Array<ACLAction> | undefined;
billingRefund?: Array<ACLAction> | undefined;
billingTaxId?: Array<ACLAction> | undefined;
blob?: Array<ACLAction> | undefined;
blobStoreTokenSet?: Array<ACLAction> | undefined;
budget?: Array<ACLAction> | undefined;
cacheArtifact?: Array<ACLAction> | undefined;
cacheArtifactUsageEvent?: Array<ACLAction> | undefined;
codeChecks?: Array<ACLAction> | undefined;
codeOwners?: Array<ACLAction> | undefined;
ciInvocations?: Array<ACLAction> | undefined;
ciLogs?: Array<ACLAction> | undefined;
concurrentBuilds?: Array<ACLAction> | undefined;
connect?: Array<ACLAction> | undefined;
connectConfiguration?: Array<ACLAction> | undefined;
connectLogs?: Array<ACLAction> | undefined;
connexClient?: Array<ACLAction> | undefined;
connexClientProject?: Array<ACLAction> | undefined;
connexContact?: Array<ACLAction> | undefined;
connexInstallation?: Array<ACLAction> | undefined;
connexToken?: Array<ACLAction> | undefined;
buildMachineDefault?: Array<ACLAction> | undefined;
cursorOriginInstallation?: Array<ACLAction> | undefined;
dataCacheBillingSettings?: Array<ACLAction> | undefined;
defaultDeploymentProtection?: Array<ACLAction> | undefined;
deploymentPolicy?: Array<ACLAction> | undefined;
domain?: Array<ACLAction> | undefined;
domainAcceptDelegation?: Array<ACLAction> | undefined;
domainAuthCodes?: Array<ACLAction> | undefined;
domainCertificate?: Array<ACLAction> | undefined;
domainCheckConfig?: Array<ACLAction> | undefined;
domainMove?: Array<ACLAction> | undefined;
domainPurchase?: Array<ACLAction> | undefined;
domainRecord?: Array<ACLAction> | undefined;
domainTransferIn?: Array<ACLAction> | undefined;
drain?: Array<ACLAction> | undefined;
edgeConfig?: Array<ACLAction> | undefined;
edgeConfigItem?: Array<ACLAction> | undefined;
edgeConfigSchema?: Array<ACLAction> | undefined;
edgeConfigToken?: Array<ACLAction> | undefined;
endpointVerification?: Array<ACLAction> | undefined;
event?: Array<ACLAction> | undefined;
fileUpload?: Array<ACLAction> | undefined;
flagsExplorerSubscription?: Array<ACLAction> | undefined;
gitRepository?: Array<ACLAction> | undefined;
imageOptimizationNewPrice?: Array<ACLAction> | undefined;
integration?: Array<ACLAction> | undefined;
integrationAccount?: Array<ACLAction> | undefined;
integrationConfiguration?: Array<ACLAction> | undefined;
integrationConfigurationProjects?: Array<ACLAction> | undefined;
integrationConfigurationRole?: Array<ACLAction> | undefined;
integrationConfigurationTransfer?: Array<ACLAction> | undefined;
integrationDeploymentAction?: Array<ACLAction> | undefined;
integrationEvent?: Array<ACLAction> | undefined;
integrationLog?: Array<ACLAction> | undefined;
integrationResource?: Array<ACLAction> | undefined;
integrationResourceData?: Array<ACLAction> | undefined;
integrationResourceReplCommand?: Array<ACLAction> | undefined;
integrationResourceSecrets?: Array<ACLAction> | undefined;
integrationSSOSession?: Array<ACLAction> | undefined;
integrationStrict?: Array<ACLAction> | undefined;
integrationStoreTokenSet?: Array<ACLAction> | undefined;
integrationVercelConfigurationOverride?: Array<ACLAction> | undefined;
integrationPullRequest?: Array<ACLAction> | undefined;
ipBlocking?: Array<ACLAction> | undefined;
jobGlobal?: Array<ACLAction> | undefined;
kmsIssuer?: Array<ACLAction> | undefined;
kmsProjectGrant?: Array<ACLAction> | undefined;
logDrain?: Array<ACLAction> | undefined;
marketplaceBillingData?: Array<ACLAction> | undefined;
marketplaceExperimentationEdgeConfigData?: Array<ACLAction> | undefined;
marketplaceExperimentationItem?: Array<ACLAction> | undefined;
marketplaceFlexCommit?: Array<ACLAction> | undefined;
marketplaceInstallationMember?: Array<ACLAction> | undefined;
marketplaceInvoice?: Array<ACLAction> | undefined;
marketplaceSettings?: Array<ACLAction> | undefined;
monitoring?: Array<ACLAction> | undefined;
monitoringAlert?: Array<ACLAction> | undefined;
monitoringChart?: Array<ACLAction> | undefined;
monitoringQuery?: Array<ACLAction> | undefined;
monitoringSettings?: Array<ACLAction> | undefined;
notificationCustomerBudget?: Array<ACLAction> | undefined;
notificationDeploymentFailed?: Array<ACLAction> | undefined;
notificationDomainConfiguration?: Array<ACLAction> | undefined;
notificationDomainExpire?: Array<ACLAction> | undefined;
notificationDomainMoved?: Array<ACLAction> | undefined;
notificationDomainPurchase?: Array<ACLAction> | undefined;
notificationDomainRenewal?: Array<ACLAction> | undefined;
notificationDomainTransfer?: Array<ACLAction> | undefined;
notificationDomainUnverified?: Array<ACLAction> | undefined;
notificationMonitoringAlert?: Array<ACLAction> | undefined;
notificationPaymentFailed?: Array<ACLAction> | undefined;
notificationPreferences?: Array<ACLAction> | undefined;
notificationStatementOfReasons?: Array<ACLAction> | undefined;
notificationUsageAlert?: Array<ACLAction> | undefined;
oidcFederationPolicy?: Array<ACLAction> | undefined;
observabilityConfiguration?: Array<ACLAction> | undefined;
observabilityFunnel?: Array<ACLAction> | undefined;
observabilityNotebook?: Array<ACLAction> | undefined;
openTelemetryEndpoint?: Array<ACLAction> | undefined;
ownEvent?: Array<ACLAction> | undefined;
organization?: Array<ACLAction> | undefined;
organizationDomain?: Array<ACLAction> | undefined;
organizationTeam?: Array<ACLAction> | undefined;
passwordProtectionInvoiceItem?: Array<ACLAction> | undefined;
paymentMethod?: Array<ACLAction> | undefined;
permissions?: Array<ACLAction> | undefined;
postgres?: Array<ACLAction> | undefined;
postgresStoreTokenSet?: Array<ACLAction> | undefined;
previewDeploymentSuffix?: Array<ACLAction> | undefined;
privateCloudAccount?: Array<ACLAction> | undefined;
projectTransferIn?: Array<ACLAction> | undefined;
projectTransferRequest?: Array<ACLAction> | undefined;
proTrialOnboarding?: Array<ACLAction> | undefined;
rateLimit?: Array<ACLAction> | undefined;
redis?: Array<ACLAction> | undefined;
redisStoreTokenSet?: Array<ACLAction> | undefined;
remoteCaching?: Array<ACLAction> | undefined;
repository?: Array<ACLAction> | undefined;
samlConfig?: Array<ACLAction> | undefined;
secret?: Array<ACLAction> | undefined;
securityConfig?: Array<ACLAction> | undefined;
sensitiveEnvironmentVariablePolicy?: Array<ACLAction> | undefined;
sharedEnvVars?: Array<ACLAction> | undefined;
sharedEnvVarsProduction?: Array<ACLAction> | undefined;
space?: Array<ACLAction> | undefined;
spaceRun?: Array<ACLAction> | undefined;
storeIsLocked?: Array<ACLAction> | undefined;
storeTokenSetSensitive?: Array<ACLAction> | undefined;
storeTransfer?: Array<ACLAction> | undefined;
supportCase?: Array<ACLAction> | undefined;
supportCaseComment?: Array<ACLAction> | undefined;
team?: Array<ACLAction> | undefined;
teamAccessRequest?: Array<ACLAction> | undefined;
teamFellowMembership?: Array<ACLAction> | undefined;
teamGitExclusivity?: Array<ACLAction> | undefined;
teamInvite?: Array<ACLAction> | undefined;
teamInviteCode?: Array<ACLAction> | undefined;
teamInviteLink?: Array<ACLAction> | undefined;
teamJoin?: Array<ACLAction> | undefined;
teamMemberMfaStatus?: Array<ACLAction> | undefined;
teamMicrofrontends?: Array<ACLAction> | undefined;
teamOwnMembership?: Array<ACLAction> | undefined;
teamOwnMembershipDisconnectSAML?: Array<ACLAction> | undefined;
teamSudo?: Array<ACLAction> | undefined;
teamTokenInvalidation?: Array<ACLAction> | undefined;
token?: Array<ACLAction> | undefined;
toolbarComment?: Array<ACLAction> | undefined;
usage?: Array<ACLAction> | undefined;
usageCycle?: Array<ACLAction> | undefined;
vcrRepository?: Array<ACLAction> | undefined;
vpcPeeringConnection?: Array<ACLAction> | undefined;
webAnalyticsPlan?: Array<ACLAction> | undefined;
webhook?: Array<ACLAction> | undefined;
webhookEvent?: Array<ACLAction> | undefined;
aliasProject?: Array<ACLAction> | undefined;
aliasProtectionBypass?: Array<ACLAction> | undefined;
bulkRedirects?: Array<ACLAction> | undefined;
buildMachine?: Array<ACLAction> | undefined;
connectConfigurationLink?: Array<ACLAction> | undefined;
dataCacheNamespace?: Array<ACLAction> | undefined;
deployment?: Array<ACLAction> | undefined;
deploymentBuildLogs?: Array<ACLAction> | undefined;
deploymentCheck?: Array<ACLAction> | undefined;
deploymentCheckPreview?: Array<ACLAction> | undefined;
deploymentCheckReRunFromProductionBranch?: Array<ACLAction> | undefined;
deploymentProductionGit?: Array<ACLAction> | undefined;
deploymentV0?: Array<ACLAction> | undefined;
deploymentPreview?: Array<ACLAction> | undefined;
deploymentPrivate?: Array<ACLAction> | undefined;
deploymentPromote?: Array<ACLAction> | undefined;
deploymentRollback?: Array<ACLAction> | undefined;
edgeCacheNamespace?: Array<ACLAction> | undefined;
environments?: Array<ACLAction> | undefined;
job?: Array<ACLAction> | undefined;
logs?: Array<ACLAction> | undefined;
logsPreset?: Array<ACLAction> | undefined;
observabilityData?: Array<ACLAction> | undefined;
onDemandBuild?: Array<ACLAction> | undefined;
onDemandConcurrency?: Array<ACLAction> | undefined;
optionsAllowlist?: Array<ACLAction> | undefined;
passwordProtection?: Array<ACLAction> | undefined;
privateLinkEndpoint?: Array<ACLAction> | undefined;
productionAliasProtectionBypass?: Array<ACLAction> | undefined;
productionShareableLink?: Array<ACLAction> | undefined;
project?: Array<ACLAction> | undefined;
projectAccessGroup?: Array<ACLAction> | undefined;
projectAnalyticsSampling?: Array<ACLAction> | undefined;
projectAnalyticsUsage?: Array<ACLAction> | undefined;
projectCheck?: Array<ACLAction> | undefined;
projectCheckRun?: Array<ACLAction> | undefined;
projectDeploymentExpiration?: Array<ACLAction> | undefined;
projectDeploymentHook?: Array<ACLAction> | undefined;
projectDeploymentProtectionStrict?: Array<ACLAction> | undefined;
projectDomain?: Array<ACLAction> | undefined;
projectDomainCheckConfig?: Array<ACLAction> | undefined;
projectDomainMove?: Array<ACLAction> | undefined;
projectDomainVerify?: Array<ACLAction> | undefined;
projectEvent?: Array<ACLAction> | undefined;
projectEnvVars?: Array<ACLAction> | undefined;
projectEnvVarsProduction?: Array<ACLAction> | undefined;
projectEnvVarsUnownedByIntegration?: Array<ACLAction> | undefined;
projectFlags?: Array<ACLAction> | undefined;
projectFlagsProduction?: Array<ACLAction> | undefined;
projectFlagsSDKKey?: Array<ACLAction> | undefined;
projectFromV0?: Array<ACLAction> | undefined;
projectId?: Array<ACLAction> | undefined;
projectIntegrationConfiguration?: Array<ACLAction> | undefined;
projectLink?: Array<ACLAction> | undefined;
projectMember?: Array<ACLAction> | undefined;
projectMonitoring?: Array<ACLAction> | undefined;
projectOIDCToken?: Array<ACLAction> | undefined;
projectPermissions?: Array<ACLAction> | undefined;
projectProductionBranch?: Array<ACLAction> | undefined;
projectProtectionBypass?: Array<ACLAction> | undefined;
projectRollingRelease?: Array<ACLAction> | undefined;
projectRoutes?: Array<ACLAction> | undefined;
projectSupportCase?: Array<ACLAction> | undefined;
projectSupportCaseComment?: Array<ACLAction> | undefined;
projectTier?: Array<ACLAction> | undefined;
projectTransfer?: Array<ACLAction> | undefined;
projectTransferOut?: Array<ACLAction> | undefined;
projectUsage?: Array<ACLAction> | undefined;
pageIntegrity?: Array<ACLAction> | undefined;
seawallConfig?: Array<ACLAction> | undefined;
securityPlusConfiguration?: Array<ACLAction> | undefined;
shareableLink?: Array<ACLAction> | undefined;
shareableLinkStrict?: Array<ACLAction> | undefined;
sharedEnvVarConnection?: Array<ACLAction> | undefined;
skewProtection?: Array<ACLAction> | undefined;
analytics?: Array<ACLAction> | undefined;
trustedIps?: Array<ACLAction> | undefined;
trustedSources?: Array<ACLAction> | undefined;
v0Chat?: Array<ACLAction> | undefined;
vercelAuth?: Array<ACLAction> | undefined;
vercelRun?: Array<ACLAction> | undefined;
webAnalytics?: Array<ACLAction> | undefined;
workflowRunData?: Array<ACLAction> | undefined;
};
export type LastRollbackTarget = {};
export const JobStatus = {
Failed: "failed",
InProgress: "in-progress",
Pending: "pending",
Skipped: "skipped",
Succeeded: "succeeded",
} as const;
export type JobStatus = ClosedEnum<typeof JobStatus>;
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodyLastAliasRequestType =
{
Promote: "promote",
Rollback: "rollback",
} as const;
export type CreateProjectProjectsResponse200ApplicationJSONResponseBodyLastAliasRequestType =
ClosedEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodyLastAliasRequestType
>;
export type LastAliasRequest = {
fromDeploymentId: string | null;
toDeploymentId: string;
/**
* If rolling back from a rolling release, fromDeploymentId captures the "base" of that rolling release, and fromRollingReleaseId captures the "target" of that rolling release.
*/
fromRollingReleaseId?: string | undefined;
jobStatus: JobStatus;
requestedAt: number;
type:
CreateProjectProjectsResponse200ApplicationJSONResponseBodyLastAliasRequestType;
};
export type ProtectionBypass2 = {
createdAt: number;
createdBy: string;
scope: "automation-bypass";
/**
* When there was only one bypass, it was automatically set as an env var on deployments. With multiple bypasses, there is always one bypass that is selected as the default, and gets set as an env var on deployments. As this is a new field, undefined means that the bypass is the env var. If there are any automation bypasses, exactly one must be the env var.
*/
isEnvVar?: boolean | undefined;
/**
* Optional note about the bypass to be displayed in the UI
*/
note?: string | undefined;
};
export type ProtectionBypass1 = {
createdAt: number;
createdBy: string;
scope: "integration-automation-bypass";
integrationId: string;
configurationId: string;
};
export type ProtectionBypass = ProtectionBypass1 | ProtectionBypass2;
export const CreateProjectTrustedIpsDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
Production: "production",
} as const;
export type CreateProjectTrustedIpsDeploymentType = ClosedEnum<
typeof CreateProjectTrustedIpsDeploymentType
>;
export type TrustedIps2 = {
deploymentType: CreateProjectTrustedIpsDeploymentType;
};
export const TrustedIpsDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
Production: "production",
} as const;
export type TrustedIpsDeploymentType = ClosedEnum<
typeof TrustedIpsDeploymentType
>;
export type CreateProjectTrustedIpsAddresses = {
value: string;
note?: string | undefined;
};
export const CreateProjectTrustedIpsProtectionMode = {
Additional: "additional",
Exclusive: "exclusive",
} as const;
export type CreateProjectTrustedIpsProtectionMode = ClosedEnum<
typeof CreateProjectTrustedIpsProtectionMode
>;
export type TrustedIps1 = {
deploymentType: TrustedIpsDeploymentType;
addresses: Array<CreateProjectTrustedIpsAddresses>;
protectionMode: CreateProjectTrustedIpsProtectionMode;
};
export type CreateProjectTrustedIps = TrustedIps1 | TrustedIps2;
export const CreateProjectFromPreset = {
AllCustom: "all-custom",
} as const;
export type CreateProjectFromPreset = ClosedEnum<
typeof CreateProjectFromPreset
>;
/**
* The source envs on the trusted project that are allowed to access `to`.
*/
export type CreateProjectFrom2 = {
/**
* System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
*/
slugs?: Array<string> | undefined;
preset: CreateProjectFromPreset;
};
export const CreateProjectFromProjectsPreset = {
AllCustom: "all-custom",
} as const;
export type CreateProjectFromProjectsPreset = ClosedEnum<
typeof CreateProjectFromProjectsPreset
>;
/**
* The source envs on the trusted project that are allowed to access `to`.
*/
export type CreateProjectFrom1 = {
/**
* System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
*/
slugs: Array<string>;
preset?: CreateProjectFromProjectsPreset | undefined;
};
export type CreateProjectFrom = CreateProjectFrom1 | CreateProjectFrom2;
export const CreateProjectToProjectsResponse200Preset = {
AllCustom: "all-custom",
} as const;
export type CreateProjectToProjectsResponse200Preset = ClosedEnum<
typeof CreateProjectToProjectsResponse200Preset
>;
/**
* The target envs on the current project that may be accessed.
*/
export type CreateProjectToProjects2 = {
/**
* System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
*/
slugs?: Array<string> | undefined;
preset: CreateProjectToProjectsResponse200Preset;
};
export const CreateProjectToProjectsResponsePreset = {
AllCustom: "all-custom",
} as const;
export type CreateProjectToProjectsResponsePreset = ClosedEnum<
typeof CreateProjectToProjectsResponsePreset
>;
/**
* The target envs on the current project that may be accessed.
*/
export type CreateProjectToProjects1 = {
/**
* System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
*/
slugs: Array<string>;
preset?: CreateProjectToProjectsResponsePreset | undefined;
};
export type CreateProjectProjectsTo =
| CreateProjectToProjects1
| CreateProjectToProjects2;
/**
* Optional overrides for the default same-env-by-slug matching. Provide explicit rules to allow cross-env access or presets.
*/
export type CreateProjectCustomAllow = {
from: CreateProjectFrom1 | CreateProjectFrom2;
to: CreateProjectToProjects1 | CreateProjectToProjects2;
};
export type CreateProjectProjects = {
label?: string | undefined;
/**
* Optional overrides for the default same-env-by-slug matching. Provide explicit rules to allow cross-env access or presets.
*/
customAllow?: Array<CreateProjectCustomAllow> | undefined;
};
export const CreateProjectToProjectsPreset = {
AllCustom: "all-custom",
} as const;
export type CreateProjectToProjectsPreset = ClosedEnum<
typeof CreateProjectToProjectsPreset
>;
/**
* The target envs on the current project that may be accessed.
*/
export type CreateProjectTo2 = {
/**
* System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
*/
slugs?: Array<string> | undefined;
preset: CreateProjectToProjectsPreset;
};
export const CreateProjectToPreset = {
AllCustom: "all-custom",
} as const;
export type CreateProjectToPreset = ClosedEnum<typeof CreateProjectToPreset>;
/**
* The target envs on the current project that may be accessed.
*/
export type CreateProjectTo1 = {
/**
* System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
*/
slugs: Array<string>;
preset?: CreateProjectToPreset | undefined;
};
export type CreateProjectTo = CreateProjectTo1 | CreateProjectTo2;
export type CreateProjectOidcProviders = {
to: CreateProjectTo1 | CreateProjectTo2;
label?: string | undefined;
claims: { [k: string]: Array<string> };
};
export type CreateProjectTrustedSources = {
/**
* Allow same-team Vercel CI access to preview deployments built from the CI run's repository, using the deployment source rather than the current project repository link. Defaults to enabled when not stored; omitted or null Trusted Sources updates preserve the stored value.
*/
enableVercelCiSameRepository?: boolean | undefined;
projects?: { [k: string]: CreateProjectProjects } | undefined;
oidcProviders?:
| { [k: string]: Array<CreateProjectOidcProviders> }
| undefined;
};
export type CreateProjectGitComments = {
/**
* Whether the Vercel bot should comment on PRs
*/
onPullRequest: boolean;
/**
* Whether the Vercel bot should comment on commits
*/
onCommit: boolean;
};
/**
* Whether the Vercel bot should automatically create GitHub deployments https://docs.github.com/en/rest/deployments/deployments#about-deployments NOTE: repository-dispatch events should be used instead
*/
export const CreateProjectCreateDeployments = {
Disabled: "disabled",
Enabled: "enabled",
} as const;
/**
* Whether the Vercel bot should automatically create GitHub deployments https://docs.github.com/en/rest/deployments/deployments#about-deployments NOTE: repository-dispatch events should be used instead
*/
export type CreateProjectCreateDeployments = ClosedEnum<
typeof CreateProjectCreateDeployments
>;
/**
* Configuration for consolidated git commit status reporting. When enabled, Vercel will post a single consolidated commit status instead of individual statuses for each deployment.
*/
export type CreateProjectConsolidatedGitCommitStatus = {
/**
* Whether consolidated commit status is enabled.
*/
enabled: boolean;
/**
* Whether to propagate individual deployment failures to the consolidated status.
*/
propagateFailures: boolean;
};
export type GitProviderOptions = {
/**
* Whether the Vercel bot should automatically create GitHub deployments https://docs.github.com/en/rest/deployments/deployments#about-deployments NOTE: repository-dispatch events should be used instead
*/
createDeployments: CreateProjectCreateDeployments;
/**
* Whether the Vercel bot should not automatically create GitHub repository-dispatch events on deployment events. https://vercel.com/docs/git/vercel-for-github#repository-dispatch-events - `true`: disable repository-dispatch events for this project (explicit override of the team setting). - `false`: enable repository-dispatch events for this project (explicit override of the team setting). - absent: inherit from `team.disableRepositoryDispatchEvents`.
*/
disableRepositoryDispatchEvents?: boolean | undefined;
/**
* Whether the project requires commits to be signed & verified before deployments will be created. - `true`: require verified commits for this project (explicit override of the team setting). - `false`: do not require verified commits (explicit override of the team setting). - absent: inherit from `team.requireVerifiedCommits`.
*/
requireVerifiedCommits?: boolean | undefined;
/**
* Whether Vercel should post commit statuses for this project. When omitted, commit statuses remain enabled.
*/
gitCommitStatus?: boolean | undefined;
/**
* Configuration for consolidated git commit status reporting. When enabled, Vercel will post a single consolidated commit status instead of individual statuses for each deployment.
*/
consolidatedGitCommitStatus?:
| CreateProjectConsolidatedGitCommitStatus
| undefined;
};
export type CreateProjectWebAnalytics = {
id: string;
disabledAt?: number | undefined;
canceledAt?: number | undefined;
enabledAt?: number | undefined;
hasData?: true | undefined;
};
export const CreateProjectProjectsAction = {
Allow: "allow",
Bypass: "bypass",
Challenge: "challenge",
Deny: "deny",
Log: "log",
RateLimit: "rate_limit",
Redirect: "redirect",
} as const;
export type CreateProjectProjectsAction = ClosedEnum<
typeof CreateProjectProjectsAction
>;
export const CreateProjectAlgo = {
FixedWindow: "fixed_window",
TokenBucket: "token_bucket",
} as const;
export type CreateProjectAlgo = ClosedEnum<typeof CreateProjectAlgo>;
export type CreateProjectRateLimit = {
algo: CreateProjectAlgo;
window: number;
limit: number;
keys: Array<string>;
};
export type CreateProjectRedirect = {
location: string;
permanent: boolean;
};
export const CreateProjectLogHeadersProjects2 = {
Wildcard: "*",
} as const;
export type CreateProjectLogHeadersProjects2 = ClosedEnum<
typeof CreateProjectLogHeadersProjects2
>;
export type CreateProjectProjectsLogHeaders =
| Array<string>
| CreateProjectLogHeadersProjects2;
export type CreateProjectRulesets = {
action: CreateProjectProjectsAction;
rateLimit?: CreateProjectRateLimit | null | undefined;
redirect?: CreateProjectRedirect | null | undefined;
actionDuration?: string | null | undefined;
bypassSystem?: boolean | null | undefined;
logHeaders?: Array<string> | CreateProjectLogHeadersProjects2 | undefined;
};
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction =
{
Challenge: "challenge",
Deny: "deny",
Log: "log",
} as const;
export type CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction =
ClosedEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction
>;
export type CreateProjectVercelRuleset = {
active: boolean;
action?:
| CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction
| undefined;
};
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesTrafficSourcesAction =
{
Challenge: "challenge",
Deny: "deny",
Log: "log",
} as const;
export type CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesTrafficSourcesAction =
ClosedEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesTrafficSourcesAction
>;
export type CreateProjectTrafficSources = {
active: boolean;
action?:
| CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesTrafficSourcesAction
| undefined;
};
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesBotFilterAction =
{
Challenge: "challenge",
Deny: "deny",
Log: "log",
} as const;
export type CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesBotFilterAction =
ClosedEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesBotFilterAction
>;
export type BotFilter = {
active: boolean;
action?:
| CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesBotFilterAction
| undefined;
};
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodyAction =
{
Challenge: "challenge",
Deny: "deny",
Log: "log",
} as const;
export type CreateProjectProjectsResponse200ApplicationJSONResponseBodyAction =
ClosedEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodyAction
>;
export type CreateProjectAiBots = {
active: boolean;
action?:
| CreateProjectProjectsResponse200ApplicationJSONResponseBodyAction
| undefined;
};
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction =
{
Challenge: "challenge",
Deny: "deny",
Log: "log",
} as const;
export type CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction =
ClosedEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction
>;
export type CreateProjectOwasp = {
active: boolean;
action?:
| CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction
| undefined;
};
export type CreateProjectManagedRules = {
vercelRuleset: CreateProjectVercelRuleset;
trafficSources: CreateProjectTrafficSources;
botFilter: BotFilter;
aiBots: CreateProjectAiBots;
owasp: CreateProjectOwasp;
};
export const CreateProjectLogHeaders2 = {
Wildcard: "*",
} as const;
export type CreateProjectLogHeaders2 = ClosedEnum<
typeof CreateProjectLogHeaders2
>;
export type CreateProjectLogHeaders = Array<string> | CreateProjectLogHeaders2;
export type SecurityPlusMetadata = {
updatedAt: number;
/**
* Timestamp when the feature was first enabled. Never changes after initial enablement.
*/
firstEnabledAt?: number | undefined;
};
export type CreateProjectSecurity = {
attackModeEnabled?: boolean | undefined;
attackModeUpdatedAt?: number | undefined;
firewallEnabled?: boolean | undefined;
firewallUpdatedAt?: number | undefined;
attackModeActiveUntil?: number | null | undefined;
firewallConfigVersion?: number | undefined;
rulesets?: { [k: string]: CreateProjectRulesets } | undefined;
firewallSeawallEnabled?: boolean | undefined;
ja3Enabled?: boolean | undefined;
ja4Enabled?: boolean | undefined;
firewallBypassIps?: Array<string> | undefined;
managedRules?: CreateProjectManagedRules | null | undefined;
botIdEnabled?: boolean | undefined;
logHeaders?: Array<string> | CreateProjectLogHeaders2 | undefined;
securityPlus?: boolean | undefined;
securityPlusMetadata?: SecurityPlusMetadata | undefined;
/**
* Whether Page Integrity is enabled for this project. Used by the metadata service to gate DynamoDB lookups against the page-integrity-inventory table.
*/
pageIntegrityEnabled?: boolean | undefined;
};
/**
* - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com`
*/
export const CreateProjectProjectsIssuerMode = {
Global: "global",
Team: "team",
} as const;
/**
* - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com`
*/
export type CreateProjectProjectsIssuerMode = ClosedEnum<
typeof CreateProjectProjectsIssuerMode
>;
export type CreateProjectOidcTokenConfig = {
/**
* Whether or not to generate OpenID Connect JSON Web Tokens.
*/
enabled?: boolean | undefined;
/**
* - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com`
*/
issuerMode?: CreateProjectProjectsIssuerMode | undefined;
};
/**
* Allowlist entry for GitLab, which uses nested groups rather than a flat org/repo. `namespace` is the full group path (e.g. `group` or `group/subgroup`); `project` is the leaf project name. Omit `project` to match any project under the namespace. Namespace is matched case-insensitively.
*/
export type CreateProjectSources2 = {
provider: "gitlab";
namespace: string;
project?: string | undefined;
};
export const CreateProjectSourcesProjectsProvider = {
Bitbucket: "bitbucket",
Github: "github",
} as const;
export type CreateProjectSourcesProjectsProvider = ClosedEnum<
typeof CreateProjectSourcesProjectsProvider
>;
/**
* Allowlist entry for GitHub and Bitbucket, whose repos are identified by a flat `org`/`repo` (Bitbucket's workspace/owner maps to `org`, its repo slug to `repo`). Omit `repo` to match any repo in the org. Org is matched case-insensitively.
*/
export type CreateProjectSources1 = {
provider: CreateProjectSourcesProjectsProvider;
org: string;
repo?: string | undefined;
};
export type CreateProjectSources =
| (CreateProjectSources1 & { provider: "bitbucket" })
| (CreateProjectSources1 & { provider: "github" })
| CreateProjectSources2;
export type CreateProjectEnvironmentsProjects2 = {
type: "custom";
environmentId: string;
};
export const CreateProjectEnvironmentsProjectsTarget = {
Preview: "preview",
Production: "production",
} as const;
export type CreateProjectEnvironmentsProjectsTarget = ClosedEnum<
typeof CreateProjectEnvironmentsProjectsTarget
>;
export type CreateProjectEnvironments1 = {
type: "system";
target: CreateProjectEnvironmentsProjectsTarget;
};
export type CreateProjectEnvironments =
| CreateProjectEnvironments1
| CreateProjectEnvironmentsProjects2;
/**
* `enabled: true` with empty `sources` is deny-all.
*/
export type CreateProjectGitSources = {
sources: Array<
| (CreateProjectSources1 & { provider: "bitbucket" })
| (CreateProjectSources1 & { provider: "github" })
| CreateProjectSources2
>;
enabled: boolean;
environments: Array<
CreateProjectEnvironments1 | CreateProjectEnvironmentsProjects2
>;
};
/**
* Customer-configurable deployment sources. Every deploy classifies to exactly one. JSON schema in `packages/deployment-policy/schemas/body.ts` enumerates exactly these values. - `'git'` — git provider webhook. - `'cli'` — Vercel CLI (legacy classic-token CLI and SIWV CLI both). - `'rest-api'` — direct user/team-token REST upload. Does NOT cover deploy hooks, Marketplace integrations, or first-party app tokens. - `'deploy-hook'` — project deploy-hook URL. The URL is the credential. - `'integration'` — third-party Marketplace actor: Marketplace integration token, user-delegated OAuth from a Marketplace app, or an unrecognized third-party Vercel App. First-party Vercel Apps are never `'integration'`. - `'v0'` — the v0 product surface (entitlement-gated). v0 deploys through the CLI under the hood, but classifies as its own source so a team can allow or deny v0 independently of `'cli'`. First-party Vercel apps (Toolbar, etc.) classify as `'first-party'` — see `ClassifiedSource` in `./checks`. They're not in this union because they aren't customer-configurable; they bypass `checkDeploymentSources` entirely. v0 is intentionally NOT among them: like the CLI, it's a real product surface and is policy-controllable.
*/
export const CreateProjectProjectsSources = {
Cli: "cli",
DeployHook: "deploy-hook",
Git: "git",
Integration: "integration",
RestApi: "rest-api",
V0: "v0",
} as const;
/**
* Customer-configurable deployment sources. Every deploy classifies to exactly one. JSON schema in `packages/deployment-policy/schemas/body.ts` enumerates exactly these values. - `'git'` — git provider webhook. - `'cli'` — Vercel CLI (legacy classic-token CLI and SIWV CLI both). - `'rest-api'` — direct user/team-token REST upload. Does NOT cover deploy hooks, Marketplace integrations, or first-party app tokens. - `'deploy-hook'` — project deploy-hook URL. The URL is the credential. - `'integration'` — third-party Marketplace actor: Marketplace integration token, user-delegated OAuth from a Marketplace app, or an unrecognized third-party Vercel App. First-party Vercel Apps are never `'integration'`. - `'v0'` — the v0 product surface (entitlement-gated). v0 deploys through the CLI under the hood, but classifies as its own source so a team can allow or deny v0 independently of `'cli'`. First-party Vercel apps (Toolbar, etc.) classify as `'first-party'` — see `ClassifiedSource` in `./checks`. They're not in this union because they aren't customer-configurable; they bypass `checkDeploymentSources` entirely. v0 is intentionally NOT among them: like the CLI, it's a real product surface and is policy-controllable.
*/
export type CreateProjectProjectsSources = ClosedEnum<
typeof CreateProjectProjectsSources
>;
export type CreateProjectEnvironments2 = {
type: "custom";
environmentId: string;
};
export const CreateProjectEnvironmentsTarget = {
Preview: "preview",
Production: "production",
} as const;
export type CreateProjectEnvironmentsTarget = ClosedEnum<
typeof CreateProjectEnvironmentsTarget
>;
export type CreateProjectEnvironmentsProjects1 = {
type: "system";
target: CreateProjectEnvironmentsTarget;
};
export type CreateProjectProjectsEnvironments =
| CreateProjectEnvironmentsProjects1
| CreateProjectEnvironments2;
/**
* `enabled: true` with empty `sources` is deny-all.
*/
export type CreateProjectDeploymentSources = {
sources: Array<CreateProjectProjectsSources>;
enabled: boolean;
environments: Array<
CreateProjectEnvironmentsProjects1 | CreateProjectEnvironments2
>;
};
/**
* 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.
*/
export type CreateProjectDeploymentPolicy = {
gitSources?: Array<CreateProjectGitSources> | null | undefined;
deploymentSources?: Array<CreateProjectDeploymentSources> | null | undefined;
};
export const CreateProjectTier = {
Advanced: "advanced",
Critical: "critical",
Priority: "priority",
} as const;
export type CreateProjectTier = ClosedEnum<typeof CreateProjectTier>;
/**
* Billing mode. Always 'flat' for flat-rate projects.
*/
export const CreateProjectKind = {
Flat: "flat",
} as const;
/**
* Billing mode. Always 'flat' for flat-rate projects.
*/
export type CreateProjectKind = ClosedEnum<typeof CreateProjectKind>;
export type UsageStatus = {
/**
* Billing mode. Always 'flat' for flat-rate projects.
*/
kind: CreateProjectKind;
/**
* Timestamp until which the project has exceeded its CDN allowance.
*/
exceededAllowanceUntil?: number | undefined;
/**
* Timestamp until which throttling is bypassed (project pays list rates for overage).
*/
bypassThrottleUntil?: number | undefined;
/**
* Per-project throttle, set explicitly for this project (e.g. via the per-project Flat Rate CDN endpoint).
*/
throttled?: boolean | undefined;
/**
* Synced from `team.billing.usageStatus.throttled`. When `true`, the team has throttled all of its projects regardless of `throttled`. The effective throttle the CDN enforces is `throttled || teamThrottled`.
*/
teamThrottled?: boolean | undefined;
};
export type Features = {
webAnalytics?: boolean | undefined;
};
export type CreateProjectHistory = {
scanner: string;
reason: string;
by: string;
byId: string;
at: number;
};
export const CreateProjectProjectsResponseAction = {
Blocked: "blocked",
} as const;
export type CreateProjectProjectsResponseAction = ClosedEnum<
typeof CreateProjectProjectsResponseAction
>;
export type Block = {
action: CreateProjectProjectsResponseAction;
reason: string;
statusCode: number;
createdAt: number;
caseId?: string | undefined;
actor?: string | undefined;
comment?: string | undefined;
ineligibleForAppeal?: boolean | undefined;
isCascading?: boolean | undefined;
};
export type CreateProjectHasProjectsResponse200Value = {
eq: string;
};
export type CreateProjectHasProjects2 = {
type: "host";
value: CreateProjectHasProjectsResponse200Value;
};
export const CreateProjectHasProjectsKey = {
XVercelIpCountry: "x-vercel-ip-country",
} as const;
export type CreateProjectHasProjectsKey = ClosedEnum<
typeof CreateProjectHasProjectsKey
>;
export type CreateProjectHasProjectsResponseValue = {
eq: string;
};
export type CreateProjectHasProjects1 = {
type: "header";
key: CreateProjectHasProjectsKey;
value: CreateProjectHasProjectsResponseValue;
};
export type CreateProjectRouteHas =
| CreateProjectHasProjects1
| CreateProjectHasProjects2;
export const CreateProjectRouteAction = {
BlockLegalCwc: "block_legal_cwc",
} as const;
export type CreateProjectRouteAction = ClosedEnum<
typeof CreateProjectRouteAction
>;
export type CreateProjectRouteMitigate = {
action: CreateProjectRouteAction;
};
export type CreateProjectRoute2 = {
has: Array<CreateProjectHasProjects1 | CreateProjectHasProjects2>;
mitigate: CreateProjectRouteMitigate;
src?: string | undefined;
};
export type CreateProjectRoute1 = {
src: string;
status: number;
expiry?: number | undefined;
};
export type CreateProjectBlockHistoryRoute =
| CreateProjectRoute1
| CreateProjectRoute2;
export type BlockHistory4 = {
action: "route-unblocked";
route: CreateProjectRoute1 | CreateProjectRoute2;
statusCode?: number | undefined;
createdAt: number;
caseId?: string | undefined;
actor?: string | undefined;
comment?: string | undefined;
ineligibleForAppeal?: boolean | undefined;
isCascading?: boolean | undefined;
};
export type CreateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue =
{
eq: string;
};
export type CreateProjectHasProjectsResponse2 = {
type: "host";
value: CreateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue;
};
export const CreateProjectHasProjectsResponseKey = {
XVercelIpCountry: "x-vercel-ip-country",
} as const;
export type CreateProjectHasProjectsResponseKey = ClosedEnum<
typeof CreateProjectHasProjectsResponseKey
>;
export type CreateProjectHasProjectsResponse200ApplicationJSONValue = {
eq: string;
};
export type CreateProjectHasProjectsResponse1 = {
type: "header";
key: CreateProjectHasProjectsResponseKey;
value: CreateProjectHasProjectsResponse200ApplicationJSONValue;
};
/** @internal */
export const CreateProjectProjectsDeploymentType$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectProjectsDeploymentType
> = z.nativeEnum(CreateProjectProjectsDeploymentType);
/** @internal */
export const CreateProjectPassport$inboundSchema: z.ZodType<
CreateProjectPassport,
z.ZodTypeDef,
unknown
> = z.object({
deploymentType: CreateProjectProjectsDeploymentType$inboundSchema,
connectorId: types.string(),
});
export function createProjectPassportFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectPassport, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectPassport$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectPassport' from JSON`,
);
}
/** @internal */
export const SandboxUrls$inboundSchema: z.ZodType<
SandboxUrls,
z.ZodTypeDef,
unknown
> = z.object({
inheritDeploymentProtection: types.optional(types.boolean()),
});
export function sandboxUrlsFromJSON(
jsonString: string,
): SafeParseResult<SandboxUrls, SDKValidationError> {
return safeParse(
jsonString,
(x) => SandboxUrls$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'SandboxUrls' from JSON`,
);
}
/** @internal */
export const ProtectionConfig$inboundSchema: z.ZodType<
ProtectionConfig,
z.ZodTypeDef,
unknown
> = z.object({
sandboxUrls: types.optional(z.lazy(() => SandboxUrls$inboundSchema)),
});
export function protectionConfigFromJSON(
jsonString: string,
): SafeParseResult<ProtectionConfig, SDKValidationError> {
return safeParse(
jsonString,
(x) => ProtectionConfig$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ProtectionConfig' from JSON`,
);
}
/** @internal */
export const CreateProjectRegion$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectRegion
> = z.nativeEnum(CreateProjectRegion);
/** @internal */
export const CreateProjectProjectsFailoverRegions$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectProjectsFailoverRegions> = z.nativeEnum(
CreateProjectProjectsFailoverRegions,
);
/** @internal */
export const CreateProjectSandbox$inboundSchema: z.ZodType<
CreateProjectSandbox,
z.ZodTypeDef,
unknown
> = z.object({
region: types.optional(CreateProjectRegion$inboundSchema),
failoverRegions: types.optional(
z.array(CreateProjectProjectsFailoverRegions$inboundSchema),
),
});
export function createProjectSandboxFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectSandbox, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectSandbox$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectSandbox' from JSON`,
);
}
/** @internal */
export const CreateProjectFunctionDefaultMemoryType$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectFunctionDefaultMemoryType> = z.nativeEnum(
CreateProjectFunctionDefaultMemoryType,
);
/** @internal */
export const CreateProjectBuildMachineType$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectBuildMachineType
> = z.nativeEnum(CreateProjectBuildMachineType);
/** @internal */
export const CreateProjectBuildMachineSelection$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectBuildMachineSelection
> = z.nativeEnum(CreateProjectBuildMachineSelection);
/** @internal */
export const CreateProjectBuildMachineElasticReason$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectBuildMachineElasticReason> = z.nativeEnum(
CreateProjectBuildMachineElasticReason,
);
/** @internal */
export const CreateProjectProjectsConfiguration$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectProjectsConfiguration
> = z.nativeEnum(CreateProjectProjectsConfiguration);
/** @internal */
export const CreateProjectProjectsBuildQueue$inboundSchema: z.ZodType<
CreateProjectProjectsBuildQueue,
z.ZodTypeDef,
unknown
> = z.object({
configuration: types.optional(
CreateProjectProjectsConfiguration$inboundSchema,
),
});
export function createProjectProjectsBuildQueueFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectProjectsBuildQueue, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectProjectsBuildQueue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectProjectsBuildQueue' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsResourceConfig$inboundSchema: z.ZodType<
CreateProjectProjectsResourceConfig,
z.ZodTypeDef,
unknown
> = z.object({
elasticConcurrencyEnabled: types.optional(types.boolean()),
fluid: types.optional(types.boolean()),
functionDefaultRegions: z.array(types.string()),
functionDefaultTimeout: types.optional(types.number()),
functionDefaultMemoryType: types.optional(
CreateProjectFunctionDefaultMemoryType$inboundSchema,
),
functionZeroConfigFailover: types.optional(types.boolean()),
buildMachineType: types.optional(CreateProjectBuildMachineType$inboundSchema),
buildMachineSelection: types.optional(
CreateProjectBuildMachineSelection$inboundSchema,
),
buildMachineElasticLastUpdated: types.optional(types.number()),
buildMachineElasticReason: types.optional(
CreateProjectBuildMachineElasticReason$inboundSchema,
),
isNSNBDisabled: types.optional(types.boolean()),
buildQueue: types.optional(
z.lazy(() => CreateProjectProjectsBuildQueue$inboundSchema),
),
enableFunctionsBeta: types.optional(types.boolean()),
});
export function createProjectProjectsResourceConfigFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectProjectsResourceConfig, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateProjectProjectsResourceConfig$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectProjectsResourceConfig' from JSON`,
);
}
/** @internal */
export const CreateProjectRollbackDescription$inboundSchema: z.ZodType<
CreateProjectRollbackDescription,
z.ZodTypeDef,
unknown
> = z.object({
userId: types.string(),
username: types.string(),
description: types.string(),
createdAt: types.number(),
});
export function createProjectRollbackDescriptionFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectRollbackDescription, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectRollbackDescription$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectRollbackDescription' from JSON`,
);
}
/** @internal */
export const Stages$inboundSchema: z.ZodType<Stages, z.ZodTypeDef, unknown> = z
.object({
targetPercentage: types.number(),
requireApproval: types.optional(types.boolean()),
duration: types.optional(types.number()),
linearShift: types.optional(types.boolean()),
});
export function stagesFromJSON(
jsonString: string,
): SafeParseResult<Stages, SDKValidationError> {
return safeParse(
jsonString,
(x) => Stages$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Stages' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType$inboundSchema:
z.ZodNativeEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType
> = z.nativeEnum(
CreateProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType,
);
/** @internal */
export const CreateProjectChecks$inboundSchema: z.ZodType<
CreateProjectChecks,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType$inboundSchema,
minSampleSize: types.optional(types.number()),
excludeStatusCodes: types.optional(z.array(types.number())),
excludePaths: types.optional(z.array(types.string())),
ingestWatermarkSeconds: types.optional(types.number()),
});
export function createProjectChecksFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectChecks, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectChecks$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectChecks' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsResponse200ApplicationJSONAction$inboundSchema:
z.ZodNativeEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONAction
> = z.nativeEnum(CreateProjectProjectsResponse200ApplicationJSONAction);
/** @internal */
export const Gate$inboundSchema: z.ZodType<Gate, z.ZodTypeDef, unknown> = z
.object({
enabled: types.boolean(),
checks: z.array(z.lazy(() => CreateProjectChecks$inboundSchema)),
failureThreshold: types.optional(types.number()),
windowSize: types.optional(types.number()),
action: CreateProjectProjectsResponse200ApplicationJSONAction$inboundSchema,
dryRun: types.boolean(),
});
export function gateFromJSON(
jsonString: string,
): SafeParseResult<Gate, SDKValidationError> {
return safeParse(
jsonString,
(x) => Gate$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Gate' from JSON`,
);
}
/** @internal */
export const RollingRelease$inboundSchema: z.ZodType<
RollingRelease,
z.ZodTypeDef,
unknown
> = z.object({
target: types.string(),
stages: z.nullable(z.array(z.lazy(() => Stages$inboundSchema))).optional(),
canaryResponseHeader: types.optional(types.boolean()),
gate: types.optional(z.lazy(() => Gate$inboundSchema)),
});
export function rollingReleaseFromJSON(
jsonString: string,
): SafeParseResult<RollingRelease, SDKValidationError> {
return safeParse(
jsonString,
(x) => RollingRelease$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RollingRelease' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsFunctionDefaultMemoryType$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectProjectsFunctionDefaultMemoryType> = z
.nativeEnum(CreateProjectProjectsFunctionDefaultMemoryType);
/** @internal */
export const CreateProjectProjectsBuildMachineType$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectProjectsBuildMachineType> = z.nativeEnum(
CreateProjectProjectsBuildMachineType,
);
/** @internal */
export const CreateProjectProjectsBuildMachineSelection$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectProjectsBuildMachineSelection> = z
.nativeEnum(CreateProjectProjectsBuildMachineSelection);
/** @internal */
export const CreateProjectProjectsBuildMachineElasticReason$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectProjectsBuildMachineElasticReason> = z
.nativeEnum(CreateProjectProjectsBuildMachineElasticReason);
/** @internal */
export const CreateProjectProjectsResponseConfiguration$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectProjectsResponseConfiguration> = z
.nativeEnum(CreateProjectProjectsResponseConfiguration);
/** @internal */
export const CreateProjectProjectsResponseBuildQueue$inboundSchema: z.ZodType<
CreateProjectProjectsResponseBuildQueue,
z.ZodTypeDef,
unknown
> = z.object({
configuration: types.optional(
CreateProjectProjectsResponseConfiguration$inboundSchema,
),
});
export function createProjectProjectsResponseBuildQueueFromJSON(
jsonString: string,
): SafeParseResult<
CreateProjectProjectsResponseBuildQueue,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateProjectProjectsResponseBuildQueue$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateProjectProjectsResponseBuildQueue' from JSON`,
);
}
/** @internal */
export const DefaultResourceConfig$inboundSchema: z.ZodType<
DefaultResourceConfig,
z.ZodTypeDef,
unknown
> = z.object({
elasticConcurrencyEnabled: types.optional(types.boolean()),
fluid: types.optional(types.boolean()),
functionDefaultRegions: z.array(types.string()),
functionDefaultTimeout: types.optional(types.number()),
functionDefaultMemoryType: types.optional(
CreateProjectProjectsFunctionDefaultMemoryType$inboundSchema,
),
functionZeroConfigFailover: types.optional(types.boolean()),
buildMachineType: types.optional(
CreateProjectProjectsBuildMachineType$inboundSchema,
),
buildMachineSelection: types.optional(
CreateProjectProjectsBuildMachineSelection$inboundSchema,
),
buildMachineElasticLastUpdated: types.optional(types.number()),
buildMachineElasticReason: types.optional(
CreateProjectProjectsBuildMachineElasticReason$inboundSchema,
),
isNSNBDisabled: types.optional(types.boolean()),
buildQueue: types.optional(
z.lazy(() => CreateProjectProjectsResponseBuildQueue$inboundSchema),
),
enableFunctionsBeta: types.optional(types.boolean()),
});
export function defaultResourceConfigFromJSON(
jsonString: string,
): SafeParseResult<DefaultResourceConfig, SDKValidationError> {
return safeParse(
jsonString,
(x) => DefaultResourceConfig$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'DefaultResourceConfig' from JSON`,
);
}
/** @internal */
export const CreateProjectStaticIps$inboundSchema: z.ZodType<
CreateProjectStaticIps,
z.ZodTypeDef,
unknown
> = z.object({
builds: types.boolean(),
enabled: types.boolean(),
regions: z.array(types.string()),
});
export function createProjectStaticIpsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectStaticIps, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectStaticIps$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectStaticIps' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsResponseDeploymentType$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectProjectsResponseDeploymentType> = z
.nativeEnum(CreateProjectProjectsResponseDeploymentType);
/** @internal */
export const CreateProjectCve55182MigrationAppliedFrom$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectCve55182MigrationAppliedFrom> = z
.nativeEnum(CreateProjectCve55182MigrationAppliedFrom);
/** @internal */
export const CreateProjectApril2026SecurityIncidentMigrationAppliedFrom$inboundSchema:
z.ZodNativeEnum<
typeof CreateProjectApril2026SecurityIncidentMigrationAppliedFrom
> = z.nativeEnum(CreateProjectApril2026SecurityIncidentMigrationAppliedFrom);
/** @internal */
export const CreateProjectProjectsSsoProtection$inboundSchema: z.ZodType<
CreateProjectProjectsSsoProtection,
z.ZodTypeDef,
unknown
> = z.object({
deploymentType: CreateProjectProjectsResponseDeploymentType$inboundSchema,
cve55182MigrationAppliedFrom: z.nullable(
CreateProjectCve55182MigrationAppliedFrom$inboundSchema,
).optional(),
april2026SecurityIncidentMigrationAppliedFrom: z.nullable(
CreateProjectApril2026SecurityIncidentMigrationAppliedFrom$inboundSchema,
).optional(),
});
export function createProjectProjectsSsoProtectionFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectProjectsSsoProtection, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateProjectProjectsSsoProtection$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectProjectsSsoProtection' from JSON`,
);
}
/** @internal */
export const CreateProjectAliasAssigned$inboundSchema: z.ZodType<
CreateProjectAliasAssigned,
z.ZodTypeDef,
unknown
> = smartUnion([types.number(), types.boolean()]);
export function createProjectAliasAssignedFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectAliasAssigned, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectAliasAssigned$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectAliasAssigned' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsAliasError$inboundSchema: z.ZodType<
CreateProjectProjectsAliasError,
z.ZodTypeDef,
unknown
> = z.object({
code: types.string(),
message: types.string(),
});
export function createProjectProjectsAliasErrorFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectProjectsAliasError, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectProjectsAliasError$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectProjectsAliasError' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType$inboundSchema:
z.ZodNativeEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType
> = z.nativeEnum(
CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType,
);
/** @internal */
export const CreateProjectProjectsResponseBranchMatcher$inboundSchema:
z.ZodType<CreateProjectProjectsResponseBranchMatcher, z.ZodTypeDef, unknown> =
z.object({
type:
CreateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType$inboundSchema,
pattern: types.string(),
});
export function createProjectProjectsResponseBranchMatcherFromJSON(
jsonString: string,
): SafeParseResult<
CreateProjectProjectsResponseBranchMatcher,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateProjectProjectsResponseBranchMatcher$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateProjectProjectsResponseBranchMatcher' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsBuilds$inboundSchema: z.ZodType<
CreateProjectProjectsBuilds,
z.ZodTypeDef,
unknown
> = z.object({
use: types.string(),
src: types.optional(types.string()),
dest: types.optional(types.string()),
});
export function createProjectProjectsBuildsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectProjectsBuilds, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectProjectsBuilds$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectProjectsBuilds' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsChecksConclusion$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectProjectsChecksConclusion> = z.nativeEnum(
CreateProjectProjectsChecksConclusion,
);
/** @internal */
export const CreateProjectProjectsChecksState$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectProjectsChecksState
> = z.nativeEnum(CreateProjectProjectsChecksState);
/** @internal */
export const CreateProjectProjectsResponseCreator$inboundSchema: z.ZodType<
CreateProjectProjectsResponseCreator,
z.ZodTypeDef,
unknown
> = z.object({
email: types.string(),
githubLogin: types.optional(types.string()),
gitlabLogin: types.optional(types.string()),
uid: types.string(),
username: types.string(),
});
export function createProjectProjectsResponseCreatorFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectProjectsResponseCreator, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateProjectProjectsResponseCreator$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectProjectsResponseCreator' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsOidcTokenClaims$inboundSchema: z.ZodType<
CreateProjectProjectsOidcTokenClaims,
z.ZodTypeDef,
unknown
> = z.object({
iss: types.string(),
sub: types.string(),
scope: types.string(),
aud: types.string(),
owner: types.string(),
owner_id: types.string(),
project: types.string(),
project_id: types.string(),
environment: types.string(),
custom_environment_id: types.optional(types.string()),
mfe_group_ids: types.optional(z.array(types.string())),
plan: types.optional(types.string()),
}).transform((v) => {
return remap$(v, {
"owner_id": "ownerId",
"project_id": "projectId",
"custom_environment_id": "customEnvironmentId",
"mfe_group_ids": "mfeGroupIds",
});
});
export function createProjectProjectsOidcTokenClaimsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectProjectsOidcTokenClaims, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateProjectProjectsOidcTokenClaims$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectProjectsOidcTokenClaims' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsPlan$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectProjectsPlan
> = z.nativeEnum(CreateProjectProjectsPlan);
/** @internal */
export const CreateProjectProjectsReadyState$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectProjectsReadyState
> = z.nativeEnum(CreateProjectProjectsReadyState);
/** @internal */
export const CreateProjectProjectsReadySubstate$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectProjectsReadySubstate
> = z.nativeEnum(CreateProjectProjectsReadySubstate);
/** @internal */
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodyType$inboundSchema:
z.ZodNativeEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodyType
> = z.nativeEnum(
CreateProjectProjectsResponse200ApplicationJSONResponseBodyType,
);
/** @internal */
export const CreateProjectTargets$inboundSchema: z.ZodType<
CreateProjectTargets,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
alias: types.optional(z.array(types.string())),
aliasAssigned: z.nullable(smartUnion([types.number(), types.boolean()]))
.optional(),
aliasError: z.nullable(
z.lazy(() => CreateProjectProjectsAliasError$inboundSchema),
).optional(),
aliasFinal: z.nullable(types.string()).optional(),
automaticAliases: types.optional(z.array(types.string())),
branchMatcher: types.optional(
z.lazy(() => CreateProjectProjectsResponseBranchMatcher$inboundSchema),
),
buildingAt: types.optional(types.number()),
builds: types.optional(
z.array(z.lazy(() => CreateProjectProjectsBuilds$inboundSchema)),
),
checksConclusion: types.optional(
CreateProjectProjectsChecksConclusion$inboundSchema,
),
checksState: types.optional(CreateProjectProjectsChecksState$inboundSchema),
connectBuildsEnabled: types.optional(types.boolean()),
connectConfigurationId: types.optional(types.string()),
createdAt: types.number(),
createdIn: types.string(),
creator: types.nullable(
z.lazy(() => CreateProjectProjectsResponseCreator$inboundSchema),
),
deletedAt: types.optional(types.number()),
deploymentHostname: types.string(),
forced: types.optional(types.boolean()),
name: types.string(),
meta: types.optional(z.record(types.string())),
monorepoManager: z.nullable(types.string()).optional(),
oidcTokenClaims: types.optional(
z.lazy(() => CreateProjectProjectsOidcTokenClaims$inboundSchema),
),
plan: CreateProjectProjectsPlan$inboundSchema,
previewCommentsEnabled: types.optional(types.boolean()),
private: types.boolean(),
readyAt: types.optional(types.number()),
readyState: CreateProjectProjectsReadyState$inboundSchema,
readySubstate: types.optional(
CreateProjectProjectsReadySubstate$inboundSchema,
),
requestedAt: types.optional(types.number()),
target: z.nullable(types.string()).optional(),
teamId: z.nullable(types.string()).optional(),
type:
CreateProjectProjectsResponse200ApplicationJSONResponseBodyType$inboundSchema,
url: types.string(),
userId: types.optional(types.string()),
withCache: types.optional(types.boolean()),
});
export function createProjectTargetsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectTargets, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectTargets$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectTargets' from JSON`,
);
}
/** @internal */
export const CreateProjectPermissions$inboundSchema: z.ZodType<
CreateProjectPermissions,
z.ZodTypeDef,
unknown
> = z.object({
oauth2Connection: types.optional(z.array(ACLAction$inboundSchema)),
user: types.optional(z.array(ACLAction$inboundSchema)),
userConnection: types.optional(z.array(ACLAction$inboundSchema)),
userMfaConfiguration: types.optional(z.array(ACLAction$inboundSchema)),
userPreference: types.optional(z.array(ACLAction$inboundSchema)),
userSudo: types.optional(z.array(ACLAction$inboundSchema)),
webAuthn: types.optional(z.array(ACLAction$inboundSchema)),
accessGroup: types.optional(z.array(ACLAction$inboundSchema)),
agent: types.optional(z.array(ACLAction$inboundSchema)),
aiGatewayApiKey: types.optional(z.array(ACLAction$inboundSchema)),
aiGatewayApiKeyBypassAll: types.optional(z.array(ACLAction$inboundSchema)),
aiGatewayApiKeyOwnedBySelf: types.optional(z.array(ACLAction$inboundSchema)),
aiGatewayApiKeySpendAttribution: types.optional(
z.array(ACLAction$inboundSchema),
),
aiGatewayApiKeyZdrExemption: types.optional(z.array(ACLAction$inboundSchema)),
aiGatewayBudget: types.optional(z.array(ACLAction$inboundSchema)),
aiGatewayCredits: types.optional(z.array(ACLAction$inboundSchema)),
aiGatewayPrivateModels: types.optional(z.array(ACLAction$inboundSchema)),
aiGatewayGuardrails: types.optional(z.array(ACLAction$inboundSchema)),
aiGatewayRules: types.optional(z.array(ACLAction$inboundSchema)),
aiGatewaySettings: types.optional(z.array(ACLAction$inboundSchema)),
aiGatewayTranscripts: types.optional(z.array(ACLAction$inboundSchema)),
aiGatewayTranscriptsSettings: types.optional(
z.array(ACLAction$inboundSchema),
),
aiGatewayUsage: types.optional(z.array(ACLAction$inboundSchema)),
aiGatewayVirtualModelConfigs: types.optional(
z.array(ACLAction$inboundSchema),
),
alerts: types.optional(z.array(ACLAction$inboundSchema)),
alertRules: types.optional(z.array(ACLAction$inboundSchema)),
aliasGlobal: types.optional(z.array(ACLAction$inboundSchema)),
analyticsSampling: types.optional(z.array(ACLAction$inboundSchema)),
analyticsUsage: types.optional(z.array(ACLAction$inboundSchema)),
apiKey: types.optional(z.array(ACLAction$inboundSchema)),
apiKeyAiGateway: types.optional(z.array(ACLAction$inboundSchema)),
apiKeyOwnedBySelf: types.optional(z.array(ACLAction$inboundSchema)),
oauth2Application: types.optional(z.array(ACLAction$inboundSchema)),
vercelAppInstallation: types.optional(z.array(ACLAction$inboundSchema)),
vercelAppInstallationRequest: types.optional(
z.array(ACLAction$inboundSchema),
),
auditLog: types.optional(z.array(ACLAction$inboundSchema)),
automation: types.optional(z.array(ACLAction$inboundSchema)),
billingAddress: types.optional(z.array(ACLAction$inboundSchema)),
billingInformation: types.optional(z.array(ACLAction$inboundSchema)),
billingInvoice: types.optional(z.array(ACLAction$inboundSchema)),
billingInvoiceEmailRecipient: types.optional(
z.array(ACLAction$inboundSchema),
),
billingInvoiceLanguage: types.optional(z.array(ACLAction$inboundSchema)),
billingPlan: types.optional(z.array(ACLAction$inboundSchema)),
billingPurchaseOrder: types.optional(z.array(ACLAction$inboundSchema)),
billingRefund: types.optional(z.array(ACLAction$inboundSchema)),
billingTaxId: types.optional(z.array(ACLAction$inboundSchema)),
blob: types.optional(z.array(ACLAction$inboundSchema)),
blobStoreTokenSet: types.optional(z.array(ACLAction$inboundSchema)),
budget: types.optional(z.array(ACLAction$inboundSchema)),
cacheArtifact: types.optional(z.array(ACLAction$inboundSchema)),
cacheArtifactUsageEvent: types.optional(z.array(ACLAction$inboundSchema)),
codeChecks: types.optional(z.array(ACLAction$inboundSchema)),
codeOwners: types.optional(z.array(ACLAction$inboundSchema)),
ciInvocations: types.optional(z.array(ACLAction$inboundSchema)),
ciLogs: types.optional(z.array(ACLAction$inboundSchema)),
concurrentBuilds: types.optional(z.array(ACLAction$inboundSchema)),
connect: types.optional(z.array(ACLAction$inboundSchema)),
connectConfiguration: types.optional(z.array(ACLAction$inboundSchema)),
connectLogs: types.optional(z.array(ACLAction$inboundSchema)),
connexClient: types.optional(z.array(ACLAction$inboundSchema)),
connexClientProject: types.optional(z.array(ACLAction$inboundSchema)),
connexContact: types.optional(z.array(ACLAction$inboundSchema)),
connexInstallation: types.optional(z.array(ACLAction$inboundSchema)),
connexToken: types.optional(z.array(ACLAction$inboundSchema)),
buildMachineDefault: types.optional(z.array(ACLAction$inboundSchema)),
cursorOriginInstallation: types.optional(z.array(ACLAction$inboundSchema)),
dataCacheBillingSettings: types.optional(z.array(ACLAction$inboundSchema)),
defaultDeploymentProtection: types.optional(z.array(ACLAction$inboundSchema)),
deploymentPolicy: types.optional(z.array(ACLAction$inboundSchema)),
domain: types.optional(z.array(ACLAction$inboundSchema)),
domainAcceptDelegation: types.optional(z.array(ACLAction$inboundSchema)),
domainAuthCodes: types.optional(z.array(ACLAction$inboundSchema)),
domainCertificate: types.optional(z.array(ACLAction$inboundSchema)),
domainCheckConfig: types.optional(z.array(ACLAction$inboundSchema)),
domainMove: types.optional(z.array(ACLAction$inboundSchema)),
domainPurchase: types.optional(z.array(ACLAction$inboundSchema)),
domainRecord: types.optional(z.array(ACLAction$inboundSchema)),
domainTransferIn: types.optional(z.array(ACLAction$inboundSchema)),
drain: types.optional(z.array(ACLAction$inboundSchema)),
edgeConfig: types.optional(z.array(ACLAction$inboundSchema)),
edgeConfigItem: types.optional(z.array(ACLAction$inboundSchema)),
edgeConfigSchema: types.optional(z.array(ACLAction$inboundSchema)),
edgeConfigToken: types.optional(z.array(ACLAction$inboundSchema)),
endpointVerification: types.optional(z.array(ACLAction$inboundSchema)),
event: types.optional(z.array(ACLAction$inboundSchema)),
fileUpload: types.optional(z.array(ACLAction$inboundSchema)),
flagsExplorerSubscription: types.optional(z.array(ACLAction$inboundSchema)),
gitRepository: types.optional(z.array(ACLAction$inboundSchema)),
imageOptimizationNewPrice: types.optional(z.array(ACLAction$inboundSchema)),
integration: types.optional(z.array(ACLAction$inboundSchema)),
integrationAccount: types.optional(z.array(ACLAction$inboundSchema)),
integrationConfiguration: types.optional(z.array(ACLAction$inboundSchema)),
integrationConfigurationProjects: types.optional(
z.array(ACLAction$inboundSchema),
),
integrationConfigurationRole: types.optional(
z.array(ACLAction$inboundSchema),
),
integrationConfigurationTransfer: types.optional(
z.array(ACLAction$inboundSchema),
),
integrationDeploymentAction: types.optional(z.array(ACLAction$inboundSchema)),
integrationEvent: types.optional(z.array(ACLAction$inboundSchema)),
integrationLog: types.optional(z.array(ACLAction$inboundSchema)),
integrationResource: types.optional(z.array(ACLAction$inboundSchema)),
integrationResourceData: types.optional(z.array(ACLAction$inboundSchema)),
integrationResourceReplCommand: types.optional(
z.array(ACLAction$inboundSchema),
),
integrationResourceSecrets: types.optional(z.array(ACLAction$inboundSchema)),
integrationSSOSession: types.optional(z.array(ACLAction$inboundSchema)),
integrationStrict: types.optional(z.array(ACLAction$inboundSchema)),
integrationStoreTokenSet: types.optional(z.array(ACLAction$inboundSchema)),
integrationVercelConfigurationOverride: types.optional(
z.array(ACLAction$inboundSchema),
),
integrationPullRequest: types.optional(z.array(ACLAction$inboundSchema)),
ipBlocking: types.optional(z.array(ACLAction$inboundSchema)),
jobGlobal: types.optional(z.array(ACLAction$inboundSchema)),
kmsIssuer: types.optional(z.array(ACLAction$inboundSchema)),
kmsProjectGrant: types.optional(z.array(ACLAction$inboundSchema)),
logDrain: types.optional(z.array(ACLAction$inboundSchema)),
marketplaceBillingData: types.optional(z.array(ACLAction$inboundSchema)),
marketplaceExperimentationEdgeConfigData: types.optional(
z.array(ACLAction$inboundSchema),
),
marketplaceExperimentationItem: types.optional(
z.array(ACLAction$inboundSchema),
),
marketplaceFlexCommit: types.optional(z.array(ACLAction$inboundSchema)),
marketplaceInstallationMember: types.optional(
z.array(ACLAction$inboundSchema),
),
marketplaceInvoice: types.optional(z.array(ACLAction$inboundSchema)),
marketplaceSettings: types.optional(z.array(ACLAction$inboundSchema)),
Monitoring: types.optional(z.array(ACLAction$inboundSchema)),
monitoringAlert: types.optional(z.array(ACLAction$inboundSchema)),
monitoringChart: types.optional(z.array(ACLAction$inboundSchema)),
monitoringQuery: types.optional(z.array(ACLAction$inboundSchema)),
monitoringSettings: types.optional(z.array(ACLAction$inboundSchema)),
notificationCustomerBudget: types.optional(z.array(ACLAction$inboundSchema)),
notificationDeploymentFailed: types.optional(
z.array(ACLAction$inboundSchema),
),
notificationDomainConfiguration: types.optional(
z.array(ACLAction$inboundSchema),
),
notificationDomainExpire: types.optional(z.array(ACLAction$inboundSchema)),
notificationDomainMoved: types.optional(z.array(ACLAction$inboundSchema)),
notificationDomainPurchase: types.optional(z.array(ACLAction$inboundSchema)),
notificationDomainRenewal: types.optional(z.array(ACLAction$inboundSchema)),
notificationDomainTransfer: types.optional(z.array(ACLAction$inboundSchema)),
notificationDomainUnverified: types.optional(
z.array(ACLAction$inboundSchema),
),
NotificationMonitoringAlert: types.optional(z.array(ACLAction$inboundSchema)),
notificationPaymentFailed: types.optional(z.array(ACLAction$inboundSchema)),
notificationPreferences: types.optional(z.array(ACLAction$inboundSchema)),
notificationStatementOfReasons: types.optional(
z.array(ACLAction$inboundSchema),
),
notificationUsageAlert: types.optional(z.array(ACLAction$inboundSchema)),
oidcFederationPolicy: types.optional(z.array(ACLAction$inboundSchema)),
observabilityConfiguration: types.optional(z.array(ACLAction$inboundSchema)),
observabilityFunnel: types.optional(z.array(ACLAction$inboundSchema)),
observabilityNotebook: types.optional(z.array(ACLAction$inboundSchema)),
openTelemetryEndpoint: types.optional(z.array(ACLAction$inboundSchema)),
ownEvent: types.optional(z.array(ACLAction$inboundSchema)),
organization: types.optional(z.array(ACLAction$inboundSchema)),
organizationDomain: types.optional(z.array(ACLAction$inboundSchema)),
organizationTeam: types.optional(z.array(ACLAction$inboundSchema)),
passwordProtectionInvoiceItem: types.optional(
z.array(ACLAction$inboundSchema),
),
paymentMethod: types.optional(z.array(ACLAction$inboundSchema)),
permissions: types.optional(z.array(ACLAction$inboundSchema)),
postgres: types.optional(z.array(ACLAction$inboundSchema)),
postgresStoreTokenSet: types.optional(z.array(ACLAction$inboundSchema)),
previewDeploymentSuffix: types.optional(z.array(ACLAction$inboundSchema)),
privateCloudAccount: types.optional(z.array(ACLAction$inboundSchema)),
projectTransferIn: types.optional(z.array(ACLAction$inboundSchema)),
projectTransferRequest: types.optional(z.array(ACLAction$inboundSchema)),
proTrialOnboarding: types.optional(z.array(ACLAction$inboundSchema)),
rateLimit: types.optional(z.array(ACLAction$inboundSchema)),
redis: types.optional(z.array(ACLAction$inboundSchema)),
redisStoreTokenSet: types.optional(z.array(ACLAction$inboundSchema)),
remoteCaching: types.optional(z.array(ACLAction$inboundSchema)),
repository: types.optional(z.array(ACLAction$inboundSchema)),
samlConfig: types.optional(z.array(ACLAction$inboundSchema)),
secret: types.optional(z.array(ACLAction$inboundSchema)),
securityConfig: types.optional(z.array(ACLAction$inboundSchema)),
sensitiveEnvironmentVariablePolicy: types.optional(
z.array(ACLAction$inboundSchema),
),
sharedEnvVars: types.optional(z.array(ACLAction$inboundSchema)),
sharedEnvVarsProduction: types.optional(z.array(ACLAction$inboundSchema)),
space: types.optional(z.array(ACLAction$inboundSchema)),
spaceRun: types.optional(z.array(ACLAction$inboundSchema)),
storeIsLocked: types.optional(z.array(ACLAction$inboundSchema)),
storeTokenSetSensitive: types.optional(z.array(ACLAction$inboundSchema)),
storeTransfer: types.optional(z.array(ACLAction$inboundSchema)),
supportCase: types.optional(z.array(ACLAction$inboundSchema)),
supportCaseComment: types.optional(z.array(ACLAction$inboundSchema)),
team: types.optional(z.array(ACLAction$inboundSchema)),
teamAccessRequest: types.optional(z.array(ACLAction$inboundSchema)),
teamFellowMembership: types.optional(z.array(ACLAction$inboundSchema)),
teamGitExclusivity: types.optional(z.array(ACLAction$inboundSchema)),
teamInvite: types.optional(z.array(ACLAction$inboundSchema)),
teamInviteCode: types.optional(z.array(ACLAction$inboundSchema)),
teamInviteLink: types.optional(z.array(ACLAction$inboundSchema)),
teamJoin: types.optional(z.array(ACLAction$inboundSchema)),
teamMemberMfaStatus: types.optional(z.array(ACLAction$inboundSchema)),
teamMicrofrontends: types.optional(z.array(ACLAction$inboundSchema)),
teamOwnMembership: types.optional(z.array(ACLAction$inboundSchema)),
teamOwnMembershipDisconnectSAML: types.optional(
z.array(ACLAction$inboundSchema),
),
teamSudo: types.optional(z.array(ACLAction$inboundSchema)),
teamTokenInvalidation: types.optional(z.array(ACLAction$inboundSchema)),
token: types.optional(z.array(ACLAction$inboundSchema)),
toolbarComment: types.optional(z.array(ACLAction$inboundSchema)),
usage: types.optional(z.array(ACLAction$inboundSchema)),
usageCycle: types.optional(z.array(ACLAction$inboundSchema)),
vcrRepository: types.optional(z.array(ACLAction$inboundSchema)),
vpcPeeringConnection: types.optional(z.array(ACLAction$inboundSchema)),
webAnalyticsPlan: types.optional(z.array(ACLAction$inboundSchema)),
webhook: types.optional(z.array(ACLAction$inboundSchema)),
"webhook-event": types.optional(z.array(ACLAction$inboundSchema)),
aliasProject: types.optional(z.array(ACLAction$inboundSchema)),
aliasProtectionBypass: types.optional(z.array(ACLAction$inboundSchema)),
bulkRedirects: types.optional(z.array(ACLAction$inboundSchema)),
buildMachine: types.optional(z.array(ACLAction$inboundSchema)),
connectConfigurationLink: types.optional(z.array(ACLAction$inboundSchema)),
dataCacheNamespace: types.optional(z.array(ACLAction$inboundSchema)),
deployment: types.optional(z.array(ACLAction$inboundSchema)),
deploymentBuildLogs: types.optional(z.array(ACLAction$inboundSchema)),
deploymentCheck: types.optional(z.array(ACLAction$inboundSchema)),
deploymentCheckPreview: types.optional(z.array(ACLAction$inboundSchema)),
deploymentCheckReRunFromProductionBranch: types.optional(
z.array(ACLAction$inboundSchema),
),
deploymentProductionGit: types.optional(z.array(ACLAction$inboundSchema)),
deploymentV0: types.optional(z.array(ACLAction$inboundSchema)),
deploymentPreview: types.optional(z.array(ACLAction$inboundSchema)),
deploymentPrivate: types.optional(z.array(ACLAction$inboundSchema)),
deploymentPromote: types.optional(z.array(ACLAction$inboundSchema)),
deploymentRollback: types.optional(z.array(ACLAction$inboundSchema)),
edgeCacheNamespace: types.optional(z.array(ACLAction$inboundSchema)),
environments: types.optional(z.array(ACLAction$inboundSchema)),
job: types.optional(z.array(ACLAction$inboundSchema)),
logs: types.optional(z.array(ACLAction$inboundSchema)),
logsPreset: types.optional(z.array(ACLAction$inboundSchema)),
observabilityData: types.optional(z.array(ACLAction$inboundSchema)),
onDemandBuild: types.optional(z.array(ACLAction$inboundSchema)),
onDemandConcurrency: types.optional(z.array(ACLAction$inboundSchema)),
optionsAllowlist: types.optional(z.array(ACLAction$inboundSchema)),
passwordProtection: types.optional(z.array(ACLAction$inboundSchema)),
privateLinkEndpoint: types.optional(z.array(ACLAction$inboundSchema)),
productionAliasProtectionBypass: types.optional(
z.array(ACLAction$inboundSchema),
),
productionShareableLink: types.optional(z.array(ACLAction$inboundSchema)),
project: types.optional(z.array(ACLAction$inboundSchema)),
projectAccessGroup: types.optional(z.array(ACLAction$inboundSchema)),
projectAnalyticsSampling: types.optional(z.array(ACLAction$inboundSchema)),
projectAnalyticsUsage: types.optional(z.array(ACLAction$inboundSchema)),
projectCheck: types.optional(z.array(ACLAction$inboundSchema)),
projectCheckRun: types.optional(z.array(ACLAction$inboundSchema)),
projectDeploymentExpiration: types.optional(z.array(ACLAction$inboundSchema)),
projectDeploymentHook: types.optional(z.array(ACLAction$inboundSchema)),
projectDeploymentProtectionStrict: types.optional(
z.array(ACLAction$inboundSchema),
),
projectDomain: types.optional(z.array(ACLAction$inboundSchema)),
projectDomainCheckConfig: types.optional(z.array(ACLAction$inboundSchema)),
projectDomainMove: types.optional(z.array(ACLAction$inboundSchema)),
projectDomainVerify: types.optional(z.array(ACLAction$inboundSchema)),
projectEvent: types.optional(z.array(ACLAction$inboundSchema)),
projectEnvVars: types.optional(z.array(ACLAction$inboundSchema)),
projectEnvVarsProduction: types.optional(z.array(ACLAction$inboundSchema)),
projectEnvVarsUnownedByIntegration: types.optional(
z.array(ACLAction$inboundSchema),
),
projectFlags: types.optional(z.array(ACLAction$inboundSchema)),
projectFlagsProduction: types.optional(z.array(ACLAction$inboundSchema)),
projectFlagsSdkKey: types.optional(z.array(ACLAction$inboundSchema)),
projectFromV0: types.optional(z.array(ACLAction$inboundSchema)),
projectId: types.optional(z.array(ACLAction$inboundSchema)),
projectIntegrationConfiguration: types.optional(
z.array(ACLAction$inboundSchema),
),
projectLink: types.optional(z.array(ACLAction$inboundSchema)),
projectMember: types.optional(z.array(ACLAction$inboundSchema)),
projectMonitoring: types.optional(z.array(ACLAction$inboundSchema)),
projectOIDCToken: types.optional(z.array(ACLAction$inboundSchema)),
projectPermissions: types.optional(z.array(ACLAction$inboundSchema)),
projectProductionBranch: types.optional(z.array(ACLAction$inboundSchema)),
projectProtectionBypass: types.optional(z.array(ACLAction$inboundSchema)),
projectRollingRelease: types.optional(z.array(ACLAction$inboundSchema)),
projectRoutes: types.optional(z.array(ACLAction$inboundSchema)),
projectSupportCase: types.optional(z.array(ACLAction$inboundSchema)),
projectSupportCaseComment: types.optional(z.array(ACLAction$inboundSchema)),
projectTier: types.optional(z.array(ACLAction$inboundSchema)),
projectTransfer: types.optional(z.array(ACLAction$inboundSchema)),
projectTransferOut: types.optional(z.array(ACLAction$inboundSchema)),
projectUsage: types.optional(z.array(ACLAction$inboundSchema)),
pageIntegrity: types.optional(z.array(ACLAction$inboundSchema)),
seawallConfig: types.optional(z.array(ACLAction$inboundSchema)),
securityPlusConfiguration: types.optional(z.array(ACLAction$inboundSchema)),
shareableLink: types.optional(z.array(ACLAction$inboundSchema)),
shareableLinkStrict: types.optional(z.array(ACLAction$inboundSchema)),
sharedEnvVarConnection: types.optional(z.array(ACLAction$inboundSchema)),
skewProtection: types.optional(z.array(ACLAction$inboundSchema)),
analytics: types.optional(z.array(ACLAction$inboundSchema)),
trustedIps: types.optional(z.array(ACLAction$inboundSchema)),
trustedSources: types.optional(z.array(ACLAction$inboundSchema)),
v0Chat: types.optional(z.array(ACLAction$inboundSchema)),
vercelAuth: types.optional(z.array(ACLAction$inboundSchema)),
vercelRun: types.optional(z.array(ACLAction$inboundSchema)),
webAnalytics: types.optional(z.array(ACLAction$inboundSchema)),
workflowRunData: types.optional(z.array(ACLAction$inboundSchema)),
}).transform((v) => {
return remap$(v, {
"Monitoring": "monitoring",
"NotificationMonitoringAlert": "notificationMonitoringAlert",
"webhook-event": "webhookEvent",
"projectFlagsSdkKey": "projectFlagsSDKKey",
});
});
export function createProjectPermissionsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectPermissions, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectPermissions$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectPermissions' from JSON`,
);
}
/** @internal */
export const LastRollbackTarget$inboundSchema: z.ZodType<
LastRollbackTarget,
z.ZodTypeDef,
unknown
> = z.object({});
export function lastRollbackTargetFromJSON(
jsonString: string,
): SafeParseResult<LastRollbackTarget, SDKValidationError> {
return safeParse(
jsonString,
(x) => LastRollbackTarget$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'LastRollbackTarget' from JSON`,
);
}
/** @internal */
export const JobStatus$inboundSchema: z.ZodNativeEnum<typeof JobStatus> = z
.nativeEnum(JobStatus);
/** @internal */
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodyLastAliasRequestType$inboundSchema:
z.ZodNativeEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodyLastAliasRequestType
> = z.nativeEnum(
CreateProjectProjectsResponse200ApplicationJSONResponseBodyLastAliasRequestType,
);
/** @internal */
export const LastAliasRequest$inboundSchema: z.ZodType<
LastAliasRequest,
z.ZodTypeDef,
unknown
> = z.object({
fromDeploymentId: types.nullable(types.string()),
toDeploymentId: types.string(),
fromRollingReleaseId: types.optional(types.string()),
jobStatus: JobStatus$inboundSchema,
requestedAt: types.number(),
type:
CreateProjectProjectsResponse200ApplicationJSONResponseBodyLastAliasRequestType$inboundSchema,
});
export function lastAliasRequestFromJSON(
jsonString: string,
): SafeParseResult<LastAliasRequest, SDKValidationError> {
return safeParse(
jsonString,
(x) => LastAliasRequest$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'LastAliasRequest' from JSON`,
);
}
/** @internal */
export const ProtectionBypass2$inboundSchema: z.ZodType<
ProtectionBypass2,
z.ZodTypeDef,
unknown
> = z.object({
createdAt: types.number(),
createdBy: types.string(),
scope: types.literal("automation-bypass"),
isEnvVar: types.optional(types.boolean()),
note: types.optional(types.string()),
});
export function protectionBypass2FromJSON(
jsonString: string,
): SafeParseResult<ProtectionBypass2, SDKValidationError> {
return safeParse(
jsonString,
(x) => ProtectionBypass2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ProtectionBypass2' from JSON`,
);
}
/** @internal */
export const ProtectionBypass1$inboundSchema: z.ZodType<
ProtectionBypass1,
z.ZodTypeDef,
unknown
> = z.object({
createdAt: types.number(),
createdBy: types.string(),
scope: types.literal("integration-automation-bypass"),
integrationId: types.string(),
configurationId: types.string(),
});
export function protectionBypass1FromJSON(
jsonString: string,
): SafeParseResult<ProtectionBypass1, SDKValidationError> {
return safeParse(
jsonString,
(x) => ProtectionBypass1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ProtectionBypass1' from JSON`,
);
}
/** @internal */
export const ProtectionBypass$inboundSchema: z.ZodType<
ProtectionBypass,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => ProtectionBypass1$inboundSchema),
z.lazy(() => ProtectionBypass2$inboundSchema),
]);
export function protectionBypassFromJSON(
jsonString: string,
): SafeParseResult<ProtectionBypass, SDKValidationError> {
return safeParse(
jsonString,
(x) => ProtectionBypass$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ProtectionBypass' from JSON`,
);
}
/** @internal */
export const CreateProjectTrustedIpsDeploymentType$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectTrustedIpsDeploymentType> = z.nativeEnum(
CreateProjectTrustedIpsDeploymentType,
);
/** @internal */
export const TrustedIps2$inboundSchema: z.ZodType<
TrustedIps2,
z.ZodTypeDef,
unknown
> = z.object({
deploymentType: CreateProjectTrustedIpsDeploymentType$inboundSchema,
});
export function trustedIps2FromJSON(
jsonString: string,
): SafeParseResult<TrustedIps2, SDKValidationError> {
return safeParse(
jsonString,
(x) => TrustedIps2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TrustedIps2' from JSON`,
);
}
/** @internal */
export const TrustedIpsDeploymentType$inboundSchema: z.ZodNativeEnum<
typeof TrustedIpsDeploymentType
> = z.nativeEnum(TrustedIpsDeploymentType);
/** @internal */
export const CreateProjectTrustedIpsAddresses$inboundSchema: z.ZodType<
CreateProjectTrustedIpsAddresses,
z.ZodTypeDef,
unknown
> = z.object({
value: types.string(),
note: types.optional(types.string()),
});
export function createProjectTrustedIpsAddressesFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectTrustedIpsAddresses, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectTrustedIpsAddresses$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectTrustedIpsAddresses' from JSON`,
);
}
/** @internal */
export const CreateProjectTrustedIpsProtectionMode$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectTrustedIpsProtectionMode> = z.nativeEnum(
CreateProjectTrustedIpsProtectionMode,
);
/** @internal */
export const TrustedIps1$inboundSchema: z.ZodType<
TrustedIps1,
z.ZodTypeDef,
unknown
> = z.object({
deploymentType: TrustedIpsDeploymentType$inboundSchema,
addresses: z.array(
z.lazy(() => CreateProjectTrustedIpsAddresses$inboundSchema),
),
protectionMode: CreateProjectTrustedIpsProtectionMode$inboundSchema,
});
export function trustedIps1FromJSON(
jsonString: string,
): SafeParseResult<TrustedIps1, SDKValidationError> {
return safeParse(
jsonString,
(x) => TrustedIps1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TrustedIps1' from JSON`,
);
}
/** @internal */
export const CreateProjectTrustedIps$inboundSchema: z.ZodType<
CreateProjectTrustedIps,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => TrustedIps1$inboundSchema),
z.lazy(() => TrustedIps2$inboundSchema),
]);
export function createProjectTrustedIpsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectTrustedIps, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectTrustedIps$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectTrustedIps' from JSON`,
);
}
/** @internal */
export const CreateProjectFromPreset$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectFromPreset
> = z.nativeEnum(CreateProjectFromPreset);
/** @internal */
export const CreateProjectFrom2$inboundSchema: z.ZodType<
CreateProjectFrom2,
z.ZodTypeDef,
unknown
> = z.object({
slugs: types.optional(z.array(types.string())),
preset: CreateProjectFromPreset$inboundSchema,
});
export function createProjectFrom2FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectFrom2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectFrom2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectFrom2' from JSON`,
);
}
/** @internal */
export const CreateProjectFromProjectsPreset$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectFromProjectsPreset
> = z.nativeEnum(CreateProjectFromProjectsPreset);
/** @internal */
export const CreateProjectFrom1$inboundSchema: z.ZodType<
CreateProjectFrom1,
z.ZodTypeDef,
unknown
> = z.object({
slugs: z.array(types.string()),
preset: types.optional(CreateProjectFromProjectsPreset$inboundSchema),
});
export function createProjectFrom1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectFrom1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectFrom1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectFrom1' from JSON`,
);
}
/** @internal */
export const CreateProjectFrom$inboundSchema: z.ZodType<
CreateProjectFrom,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => CreateProjectFrom1$inboundSchema),
z.lazy(() => CreateProjectFrom2$inboundSchema),
]);
export function createProjectFromFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectFrom, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectFrom$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectFrom' from JSON`,
);
}
/** @internal */
export const CreateProjectToProjectsResponse200Preset$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectToProjectsResponse200Preset> = z
.nativeEnum(CreateProjectToProjectsResponse200Preset);
/** @internal */
export const CreateProjectToProjects2$inboundSchema: z.ZodType<
CreateProjectToProjects2,
z.ZodTypeDef,
unknown
> = z.object({
slugs: types.optional(z.array(types.string())),
preset: CreateProjectToProjectsResponse200Preset$inboundSchema,
});
export function createProjectToProjects2FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectToProjects2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectToProjects2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectToProjects2' from JSON`,
);
}
/** @internal */
export const CreateProjectToProjectsResponsePreset$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectToProjectsResponsePreset> = z.nativeEnum(
CreateProjectToProjectsResponsePreset,
);
/** @internal */
export const CreateProjectToProjects1$inboundSchema: z.ZodType<
CreateProjectToProjects1,
z.ZodTypeDef,
unknown
> = z.object({
slugs: z.array(types.string()),
preset: types.optional(CreateProjectToProjectsResponsePreset$inboundSchema),
});
export function createProjectToProjects1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectToProjects1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectToProjects1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectToProjects1' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsTo$inboundSchema: z.ZodType<
CreateProjectProjectsTo,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => CreateProjectToProjects1$inboundSchema),
z.lazy(() => CreateProjectToProjects2$inboundSchema),
]);
export function createProjectProjectsToFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectProjectsTo, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectProjectsTo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectProjectsTo' from JSON`,
);
}
/** @internal */
export const CreateProjectCustomAllow$inboundSchema: z.ZodType<
CreateProjectCustomAllow,
z.ZodTypeDef,
unknown
> = z.object({
from: smartUnion([
z.lazy(() => CreateProjectFrom1$inboundSchema),
z.lazy(() => CreateProjectFrom2$inboundSchema),
]),
to: smartUnion([
z.lazy(() => CreateProjectToProjects1$inboundSchema),
z.lazy(() => CreateProjectToProjects2$inboundSchema),
]),
});
export function createProjectCustomAllowFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectCustomAllow, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectCustomAllow$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectCustomAllow' from JSON`,
);
}
/** @internal */
export const CreateProjectProjects$inboundSchema: z.ZodType<
CreateProjectProjects,
z.ZodTypeDef,
unknown
> = z.object({
label: types.optional(types.string()),
customAllow: types.optional(
z.array(z.lazy(() => CreateProjectCustomAllow$inboundSchema)),
),
});
export function createProjectProjectsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectProjects, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectProjects$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectProjects' from JSON`,
);
}
/** @internal */
export const CreateProjectToProjectsPreset$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectToProjectsPreset
> = z.nativeEnum(CreateProjectToProjectsPreset);
/** @internal */
export const CreateProjectTo2$inboundSchema: z.ZodType<
CreateProjectTo2,
z.ZodTypeDef,
unknown
> = z.object({
slugs: types.optional(z.array(types.string())),
preset: CreateProjectToProjectsPreset$inboundSchema,
});
export function createProjectTo2FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectTo2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectTo2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectTo2' from JSON`,
);
}
/** @internal */
export const CreateProjectToPreset$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectToPreset
> = z.nativeEnum(CreateProjectToPreset);
/** @internal */
export const CreateProjectTo1$inboundSchema: z.ZodType<
CreateProjectTo1,
z.ZodTypeDef,
unknown
> = z.object({
slugs: z.array(types.string()),
preset: types.optional(CreateProjectToPreset$inboundSchema),
});
export function createProjectTo1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectTo1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectTo1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectTo1' from JSON`,
);
}
/** @internal */
export const CreateProjectTo$inboundSchema: z.ZodType<
CreateProjectTo,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => CreateProjectTo1$inboundSchema),
z.lazy(() => CreateProjectTo2$inboundSchema),
]);
export function createProjectToFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectTo, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectTo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectTo' from JSON`,
);
}
/** @internal */
export const CreateProjectOidcProviders$inboundSchema: z.ZodType<
CreateProjectOidcProviders,
z.ZodTypeDef,
unknown
> = z.object({
to: smartUnion([
z.lazy(() => CreateProjectTo1$inboundSchema),
z.lazy(() => CreateProjectTo2$inboundSchema),
]),
label: types.optional(types.string()),
claims: z.record(z.array(types.string())),
});
export function createProjectOidcProvidersFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectOidcProviders, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectOidcProviders$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectOidcProviders' from JSON`,
);
}
/** @internal */
export const CreateProjectTrustedSources$inboundSchema: z.ZodType<
CreateProjectTrustedSources,
z.ZodTypeDef,
unknown
> = z.object({
enableVercelCiSameRepository: types.optional(types.boolean()),
projects: types.optional(
z.record(z.lazy(() => CreateProjectProjects$inboundSchema)),
),
oidcProviders: types.optional(
z.record(z.array(z.lazy(() => CreateProjectOidcProviders$inboundSchema))),
),
});
export function createProjectTrustedSourcesFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectTrustedSources, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectTrustedSources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectTrustedSources' from JSON`,
);
}
/** @internal */
export const CreateProjectGitComments$inboundSchema: z.ZodType<
CreateProjectGitComments,
z.ZodTypeDef,
unknown
> = z.object({
onPullRequest: types.boolean(),
onCommit: types.boolean(),
});
export function createProjectGitCommentsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectGitComments, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectGitComments$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectGitComments' from JSON`,
);
}
/** @internal */
export const CreateProjectCreateDeployments$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectCreateDeployments
> = z.nativeEnum(CreateProjectCreateDeployments);
/** @internal */
export const CreateProjectConsolidatedGitCommitStatus$inboundSchema: z.ZodType<
CreateProjectConsolidatedGitCommitStatus,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
propagateFailures: types.boolean(),
});
export function createProjectConsolidatedGitCommitStatusFromJSON(
jsonString: string,
): SafeParseResult<
CreateProjectConsolidatedGitCommitStatus,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateProjectConsolidatedGitCommitStatus$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateProjectConsolidatedGitCommitStatus' from JSON`,
);
}
/** @internal */
export const GitProviderOptions$inboundSchema: z.ZodType<
GitProviderOptions,
z.ZodTypeDef,
unknown
> = z.object({
createDeployments: CreateProjectCreateDeployments$inboundSchema,
disableRepositoryDispatchEvents: types.optional(types.boolean()),
requireVerifiedCommits: types.optional(types.boolean()),
gitCommitStatus: types.optional(types.boolean()),
consolidatedGitCommitStatus: types.optional(
z.lazy(() => CreateProjectConsolidatedGitCommitStatus$inboundSchema),
),
});
export function gitProviderOptionsFromJSON(
jsonString: string,
): SafeParseResult<GitProviderOptions, SDKValidationError> {
return safeParse(
jsonString,
(x) => GitProviderOptions$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GitProviderOptions' from JSON`,
);
}
/** @internal */
export const CreateProjectWebAnalytics$inboundSchema: z.ZodType<
CreateProjectWebAnalytics,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
disabledAt: types.optional(types.number()),
canceledAt: types.optional(types.number()),
enabledAt: types.optional(types.number()),
hasData: types.optional(types.literal(true)),
});
export function createProjectWebAnalyticsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectWebAnalytics, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectWebAnalytics$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectWebAnalytics' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsAction$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectProjectsAction
> = z.nativeEnum(CreateProjectProjectsAction);
/** @internal */
export const CreateProjectAlgo$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectAlgo
> = z.nativeEnum(CreateProjectAlgo);
/** @internal */
export const CreateProjectRateLimit$inboundSchema: z.ZodType<
CreateProjectRateLimit,
z.ZodTypeDef,
unknown
> = z.object({
algo: CreateProjectAlgo$inboundSchema,
window: types.number(),
limit: types.number(),
keys: z.array(types.string()),
});
export function createProjectRateLimitFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectRateLimit, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectRateLimit$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectRateLimit' from JSON`,
);
}
/** @internal */
export const CreateProjectRedirect$inboundSchema: z.ZodType<
CreateProjectRedirect,
z.ZodTypeDef,
unknown
> = z.object({
location: types.string(),
permanent: types.boolean(),
});
export function createProjectRedirectFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectRedirect, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectRedirect$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectRedirect' from JSON`,
);
}
/** @internal */
export const CreateProjectLogHeadersProjects2$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectLogHeadersProjects2
> = z.nativeEnum(CreateProjectLogHeadersProjects2);
/** @internal */
export const CreateProjectProjectsLogHeaders$inboundSchema: z.ZodType<
CreateProjectProjectsLogHeaders,
z.ZodTypeDef,
unknown
> = smartUnion([
z.array(types.string()),
CreateProjectLogHeadersProjects2$inboundSchema,
]);
export function createProjectProjectsLogHeadersFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectProjectsLogHeaders, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectProjectsLogHeaders$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectProjectsLogHeaders' from JSON`,
);
}
/** @internal */
export const CreateProjectRulesets$inboundSchema: z.ZodType<
CreateProjectRulesets,
z.ZodTypeDef,
unknown
> = z.object({
action: CreateProjectProjectsAction$inboundSchema,
rateLimit: z.nullable(z.lazy(() => CreateProjectRateLimit$inboundSchema))
.optional(),
redirect: z.nullable(z.lazy(() => CreateProjectRedirect$inboundSchema))
.optional(),
actionDuration: z.nullable(types.string()).optional(),
bypassSystem: z.nullable(types.boolean()).optional(),
logHeaders: types.optional(
smartUnion([
z.array(types.string()),
CreateProjectLogHeadersProjects2$inboundSchema,
]),
),
});
export function createProjectRulesetsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectRulesets, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectRulesets$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectRulesets' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction$inboundSchema:
z.ZodNativeEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction
> = z.nativeEnum(
CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction,
);
/** @internal */
export const CreateProjectVercelRuleset$inboundSchema: z.ZodType<
CreateProjectVercelRuleset,
z.ZodTypeDef,
unknown
> = z.object({
active: types.boolean(),
action: types.optional(
CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction$inboundSchema,
),
});
export function createProjectVercelRulesetFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectVercelRuleset, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectVercelRuleset$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectVercelRuleset' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesTrafficSourcesAction$inboundSchema:
z.ZodNativeEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesTrafficSourcesAction
> = z.nativeEnum(
CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesTrafficSourcesAction,
);
/** @internal */
export const CreateProjectTrafficSources$inboundSchema: z.ZodType<
CreateProjectTrafficSources,
z.ZodTypeDef,
unknown
> = z.object({
active: types.boolean(),
action: types.optional(
CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesTrafficSourcesAction$inboundSchema,
),
});
export function createProjectTrafficSourcesFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectTrafficSources, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectTrafficSources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectTrafficSources' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesBotFilterAction$inboundSchema:
z.ZodNativeEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesBotFilterAction
> = z.nativeEnum(
CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesBotFilterAction,
);
/** @internal */
export const BotFilter$inboundSchema: z.ZodType<
BotFilter,
z.ZodTypeDef,
unknown
> = z.object({
active: types.boolean(),
action: types.optional(
CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesBotFilterAction$inboundSchema,
),
});
export function botFilterFromJSON(
jsonString: string,
): SafeParseResult<BotFilter, SDKValidationError> {
return safeParse(
jsonString,
(x) => BotFilter$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BotFilter' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodyAction$inboundSchema:
z.ZodNativeEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodyAction
> = z.nativeEnum(
CreateProjectProjectsResponse200ApplicationJSONResponseBodyAction,
);
/** @internal */
export const CreateProjectAiBots$inboundSchema: z.ZodType<
CreateProjectAiBots,
z.ZodTypeDef,
unknown
> = z.object({
active: types.boolean(),
action: types.optional(
CreateProjectProjectsResponse200ApplicationJSONResponseBodyAction$inboundSchema,
),
});
export function createProjectAiBotsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectAiBots, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectAiBots$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectAiBots' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction$inboundSchema:
z.ZodNativeEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction
> = z.nativeEnum(
CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction,
);
/** @internal */
export const CreateProjectOwasp$inboundSchema: z.ZodType<
CreateProjectOwasp,
z.ZodTypeDef,
unknown
> = z.object({
active: types.boolean(),
action: types.optional(
CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction$inboundSchema,
),
});
export function createProjectOwaspFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectOwasp, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectOwasp$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectOwasp' from JSON`,
);
}
/** @internal */
export const CreateProjectManagedRules$inboundSchema: z.ZodType<
CreateProjectManagedRules,
z.ZodTypeDef,
unknown
> = z.object({
vercel_ruleset: z.lazy(() => CreateProjectVercelRuleset$inboundSchema),
traffic_sources: z.lazy(() => CreateProjectTrafficSources$inboundSchema),
bot_filter: z.lazy(() => BotFilter$inboundSchema),
ai_bots: z.lazy(() => CreateProjectAiBots$inboundSchema),
owasp: z.lazy(() => CreateProjectOwasp$inboundSchema),
}).transform((v) => {
return remap$(v, {
"vercel_ruleset": "vercelRuleset",
"traffic_sources": "trafficSources",
"bot_filter": "botFilter",
"ai_bots": "aiBots",
});
});
export function createProjectManagedRulesFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectManagedRules, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectManagedRules$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectManagedRules' from JSON`,
);
}
/** @internal */
export const CreateProjectLogHeaders2$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectLogHeaders2
> = z.nativeEnum(CreateProjectLogHeaders2);
/** @internal */
export const CreateProjectLogHeaders$inboundSchema: z.ZodType<
CreateProjectLogHeaders,
z.ZodTypeDef,
unknown
> = smartUnion([
z.array(types.string()),
CreateProjectLogHeaders2$inboundSchema,
]);
export function createProjectLogHeadersFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectLogHeaders, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectLogHeaders$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectLogHeaders' from JSON`,
);
}
/** @internal */
export const SecurityPlusMetadata$inboundSchema: z.ZodType<
SecurityPlusMetadata,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
firstEnabledAt: types.optional(types.number()),
});
export function securityPlusMetadataFromJSON(
jsonString: string,
): SafeParseResult<SecurityPlusMetadata, SDKValidationError> {
return safeParse(
jsonString,
(x) => SecurityPlusMetadata$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'SecurityPlusMetadata' from JSON`,
);
}
/** @internal */
export const CreateProjectSecurity$inboundSchema: z.ZodType<
CreateProjectSecurity,
z.ZodTypeDef,
unknown
> = z.object({
attackModeEnabled: types.optional(types.boolean()),
attackModeUpdatedAt: types.optional(types.number()),
firewallEnabled: types.optional(types.boolean()),
firewallUpdatedAt: types.optional(types.number()),
attackModeActiveUntil: z.nullable(types.number()).optional(),
firewallConfigVersion: types.optional(types.number()),
rulesets: types.optional(
z.record(z.lazy(() => CreateProjectRulesets$inboundSchema)),
),
firewallSeawallEnabled: types.optional(types.boolean()),
ja3Enabled: types.optional(types.boolean()),
ja4Enabled: types.optional(types.boolean()),
firewallBypassIps: types.optional(z.array(types.string())),
managedRules: z.nullable(
z.lazy(() => CreateProjectManagedRules$inboundSchema),
).optional(),
botIdEnabled: types.optional(types.boolean()),
log_headers: types.optional(
smartUnion([
z.array(types.string()),
CreateProjectLogHeaders2$inboundSchema,
]),
),
securityPlus: types.optional(types.boolean()),
securityPlusMetadata: types.optional(
z.lazy(() => SecurityPlusMetadata$inboundSchema),
),
pageIntegrityEnabled: types.optional(types.boolean()),
}).transform((v) => {
return remap$(v, {
"log_headers": "logHeaders",
});
});
export function createProjectSecurityFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectSecurity, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectSecurity$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectSecurity' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsIssuerMode$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectProjectsIssuerMode
> = z.nativeEnum(CreateProjectProjectsIssuerMode);
/** @internal */
export const CreateProjectOidcTokenConfig$inboundSchema: z.ZodType<
CreateProjectOidcTokenConfig,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.optional(types.boolean()),
issuerMode: types.optional(CreateProjectProjectsIssuerMode$inboundSchema),
});
export function createProjectOidcTokenConfigFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectOidcTokenConfig, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectOidcTokenConfig$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectOidcTokenConfig' from JSON`,
);
}
/** @internal */
export const CreateProjectSources2$inboundSchema: z.ZodType<
CreateProjectSources2,
z.ZodTypeDef,
unknown
> = z.object({
provider: types.literal("gitlab"),
namespace: types.string(),
project: types.optional(types.string()),
});
export function createProjectSources2FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectSources2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectSources2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectSources2' from JSON`,
);
}
/** @internal */
export const CreateProjectSourcesProjectsProvider$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectSourcesProjectsProvider> = z.nativeEnum(
CreateProjectSourcesProjectsProvider,
);
/** @internal */
export const CreateProjectSources1$inboundSchema: z.ZodType<
CreateProjectSources1,
z.ZodTypeDef,
unknown
> = z.object({
provider: CreateProjectSourcesProjectsProvider$inboundSchema,
org: types.string(),
repo: types.optional(types.string()),
});
export function createProjectSources1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectSources1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectSources1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectSources1' from JSON`,
);
}
/** @internal */
export const CreateProjectSources$inboundSchema: z.ZodType<
CreateProjectSources,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => CreateProjectSources1$inboundSchema).and(
z.object({ provider: z.literal("bitbucket") }),
),
z.lazy(() => CreateProjectSources1$inboundSchema).and(
z.object({ provider: z.literal("github") }),
),
z.lazy(() => CreateProjectSources2$inboundSchema),
]);
export function createProjectSourcesFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectSources, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectSources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectSources' from JSON`,
);
}
/** @internal */
export const CreateProjectEnvironmentsProjects2$inboundSchema: z.ZodType<
CreateProjectEnvironmentsProjects2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("custom"),
environmentId: types.string(),
});
export function createProjectEnvironmentsProjects2FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectEnvironmentsProjects2, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateProjectEnvironmentsProjects2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectEnvironmentsProjects2' from JSON`,
);
}
/** @internal */
export const CreateProjectEnvironmentsProjectsTarget$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectEnvironmentsProjectsTarget> = z
.nativeEnum(CreateProjectEnvironmentsProjectsTarget);
/** @internal */
export const CreateProjectEnvironments1$inboundSchema: z.ZodType<
CreateProjectEnvironments1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("system"),
target: CreateProjectEnvironmentsProjectsTarget$inboundSchema,
});
export function createProjectEnvironments1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectEnvironments1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectEnvironments1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectEnvironments1' from JSON`,
);
}
/** @internal */
export const CreateProjectEnvironments$inboundSchema: z.ZodType<
CreateProjectEnvironments,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => CreateProjectEnvironments1$inboundSchema),
z.lazy(() => CreateProjectEnvironmentsProjects2$inboundSchema),
]);
export function createProjectEnvironmentsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectEnvironments, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectEnvironments$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectEnvironments' from JSON`,
);
}
/** @internal */
export const CreateProjectGitSources$inboundSchema: z.ZodType<
CreateProjectGitSources,
z.ZodTypeDef,
unknown
> = z.object({
sources: z.array(
z.union([
z.lazy(() => CreateProjectSources1$inboundSchema).and(
z.object({ provider: z.literal("bitbucket") }),
),
z.lazy(() => CreateProjectSources1$inboundSchema).and(
z.object({ provider: z.literal("github") }),
),
z.lazy(() => CreateProjectSources2$inboundSchema),
]),
),
enabled: types.boolean(),
environments: z.array(
z.union([
z.lazy(() => CreateProjectEnvironments1$inboundSchema),
z.lazy(() => CreateProjectEnvironmentsProjects2$inboundSchema),
]),
),
});
export function createProjectGitSourcesFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectGitSources, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectGitSources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectGitSources' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsSources$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectProjectsSources
> = z.nativeEnum(CreateProjectProjectsSources);
/** @internal */
export const CreateProjectEnvironments2$inboundSchema: z.ZodType<
CreateProjectEnvironments2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("custom"),
environmentId: types.string(),
});
export function createProjectEnvironments2FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectEnvironments2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectEnvironments2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectEnvironments2' from JSON`,
);
}
/** @internal */
export const CreateProjectEnvironmentsTarget$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectEnvironmentsTarget
> = z.nativeEnum(CreateProjectEnvironmentsTarget);
/** @internal */
export const CreateProjectEnvironmentsProjects1$inboundSchema: z.ZodType<
CreateProjectEnvironmentsProjects1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("system"),
target: CreateProjectEnvironmentsTarget$inboundSchema,
});
export function createProjectEnvironmentsProjects1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectEnvironmentsProjects1, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateProjectEnvironmentsProjects1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectEnvironmentsProjects1' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsEnvironments$inboundSchema: z.ZodType<
CreateProjectProjectsEnvironments,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => CreateProjectEnvironmentsProjects1$inboundSchema),
z.lazy(() => CreateProjectEnvironments2$inboundSchema),
]);
export function createProjectProjectsEnvironmentsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectProjectsEnvironments, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectProjectsEnvironments$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectProjectsEnvironments' from JSON`,
);
}
/** @internal */
export const CreateProjectDeploymentSources$inboundSchema: z.ZodType<
CreateProjectDeploymentSources,
z.ZodTypeDef,
unknown
> = z.object({
sources: z.array(CreateProjectProjectsSources$inboundSchema),
enabled: types.boolean(),
environments: z.array(
z.union([
z.lazy(() => CreateProjectEnvironmentsProjects1$inboundSchema),
z.lazy(() => CreateProjectEnvironments2$inboundSchema),
]),
),
});
export function createProjectDeploymentSourcesFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectDeploymentSources, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectDeploymentSources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectDeploymentSources' from JSON`,
);
}
/** @internal */
export const CreateProjectDeploymentPolicy$inboundSchema: z.ZodType<
CreateProjectDeploymentPolicy,
z.ZodTypeDef,
unknown
> = z.object({
gitSources: z.nullable(
z.array(z.lazy(() => CreateProjectGitSources$inboundSchema)),
).optional(),
deploymentSources: z.nullable(
z.array(z.lazy(() => CreateProjectDeploymentSources$inboundSchema)),
).optional(),
});
export function createProjectDeploymentPolicyFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectDeploymentPolicy, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectDeploymentPolicy$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectDeploymentPolicy' from JSON`,
);
}
/** @internal */
export const CreateProjectTier$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectTier
> = z.nativeEnum(CreateProjectTier);
/** @internal */
export const CreateProjectKind$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectKind
> = z.nativeEnum(CreateProjectKind);
/** @internal */
export const UsageStatus$inboundSchema: z.ZodType<
UsageStatus,
z.ZodTypeDef,
unknown
> = z.object({
kind: CreateProjectKind$inboundSchema,
exceededAllowanceUntil: types.optional(types.number()),
bypassThrottleUntil: types.optional(types.number()),
throttled: types.optional(types.boolean()),
teamThrottled: types.optional(types.boolean()),
});
export function usageStatusFromJSON(
jsonString: string,
): SafeParseResult<UsageStatus, SDKValidationError> {
return safeParse(
jsonString,
(x) => UsageStatus$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UsageStatus' from JSON`,
);
}
/** @internal */
export const Features$inboundSchema: z.ZodType<
Features,
z.ZodTypeDef,
unknown
> = z.object({
webAnalytics: types.optional(types.boolean()),
});
export function featuresFromJSON(
jsonString: string,
): SafeParseResult<Features, SDKValidationError> {
return safeParse(
jsonString,
(x) => Features$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Features' from JSON`,
);
}
/** @internal */
export const CreateProjectHistory$inboundSchema: z.ZodType<
CreateProjectHistory,
z.ZodTypeDef,
unknown
> = z.object({
scanner: types.string(),
reason: types.string(),
by: types.string(),
byId: types.string(),
at: types.number(),
});
export function createProjectHistoryFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectHistory, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectHistory$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHistory' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsResponseAction$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectProjectsResponseAction
> = z.nativeEnum(CreateProjectProjectsResponseAction);
/** @internal */
export const Block$inboundSchema: z.ZodType<Block, z.ZodTypeDef, unknown> = z
.object({
action: CreateProjectProjectsResponseAction$inboundSchema,
reason: types.string(),
statusCode: types.number(),
createdAt: types.number(),
caseId: types.optional(types.string()),
actor: types.optional(types.string()),
comment: types.optional(types.string()),
ineligibleForAppeal: types.optional(types.boolean()),
isCascading: types.optional(types.boolean()),
});
export function blockFromJSON(
jsonString: string,
): SafeParseResult<Block, SDKValidationError> {
return safeParse(
jsonString,
(x) => Block$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Block' from JSON`,
);
}
/** @internal */
export const CreateProjectHasProjectsResponse200Value$inboundSchema: z.ZodType<
CreateProjectHasProjectsResponse200Value,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.string(),
});
export function createProjectHasProjectsResponse200ValueFromJSON(
jsonString: string,
): SafeParseResult<
CreateProjectHasProjectsResponse200Value,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateProjectHasProjectsResponse200Value$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateProjectHasProjectsResponse200Value' from JSON`,
);
}
/** @internal */
export const CreateProjectHasProjects2$inboundSchema: z.ZodType<
CreateProjectHasProjects2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("host"),
value: z.lazy(() => CreateProjectHasProjectsResponse200Value$inboundSchema),
});
export function createProjectHasProjects2FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectHasProjects2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectHasProjects2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHasProjects2' from JSON`,
);
}
/** @internal */
export const CreateProjectHasProjectsKey$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectHasProjectsKey
> = z.nativeEnum(CreateProjectHasProjectsKey);
/** @internal */
export const CreateProjectHasProjectsResponseValue$inboundSchema: z.ZodType<
CreateProjectHasProjectsResponseValue,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.string(),
});
export function createProjectHasProjectsResponseValueFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectHasProjectsResponseValue, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateProjectHasProjectsResponseValue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHasProjectsResponseValue' from JSON`,
);
}
/** @internal */
export const CreateProjectHasProjects1$inboundSchema: z.ZodType<
CreateProjectHasProjects1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("header"),
key: CreateProjectHasProjectsKey$inboundSchema,
value: z.lazy(() => CreateProjectHasProjectsResponseValue$inboundSchema),
});
export function createProjectHasProjects1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectHasProjects1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectHasProjects1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHasProjects1' from JSON`,
);
}
/** @internal */
export const CreateProjectRouteHas$inboundSchema: z.ZodType<
CreateProjectRouteHas,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => CreateProjectHasProjects1$inboundSchema),
z.lazy(() => CreateProjectHasProjects2$inboundSchema),
]);
export function createProjectRouteHasFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectRouteHas, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectRouteHas$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectRouteHas' from JSON`,
);
}
/** @internal */
export const CreateProjectRouteAction$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectRouteAction
> = z.nativeEnum(CreateProjectRouteAction);
/** @internal */
export const CreateProjectRouteMitigate$inboundSchema: z.ZodType<
CreateProjectRouteMitigate,
z.ZodTypeDef,
unknown
> = z.object({
action: CreateProjectRouteAction$inboundSchema,
});
export function createProjectRouteMitigateFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectRouteMitigate, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectRouteMitigate$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectRouteMitigate' from JSON`,
);
}
/** @internal */
export const CreateProjectRoute2$inboundSchema: z.ZodType<
CreateProjectRoute2,
z.ZodTypeDef,
unknown
> = z.object({
has: z.array(
z.union([
z.lazy(() => CreateProjectHasProjects1$inboundSchema),
z.lazy(() => CreateProjectHasProjects2$inboundSchema),
]),
),
mitigate: z.lazy(() => CreateProjectRouteMitigate$inboundSchema),
src: types.optional(types.string()),
});
export function createProjectRoute2FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectRoute2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectRoute2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectRoute2' from JSON`,
);
}
/** @internal */
export const CreateProjectRoute1$inboundSchema: z.ZodType<
CreateProjectRoute1,
z.ZodTypeDef,
unknown
> = z.object({
src: types.string(),
status: types.number(),
expiry: types.optional(types.number()),
});
export function createProjectRoute1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectRoute1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectRoute1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectRoute1' from JSON`,
);
}
/** @internal */
export const CreateProjectBlockHistoryRoute$inboundSchema: z.ZodType<
CreateProjectBlockHistoryRoute,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => CreateProjectRoute1$inboundSchema),
z.lazy(() => CreateProjectRoute2$inboundSchema),
]);
export function createProjectBlockHistoryRouteFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectBlockHistoryRoute, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectBlockHistoryRoute$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectBlockHistoryRoute' from JSON`,
);
}
/** @internal */
export const BlockHistory4$inboundSchema: z.ZodType<
BlockHistory4,
z.ZodTypeDef,
unknown
> = z.object({
action: types.literal("route-unblocked"),
route: smartUnion([
z.lazy(() => CreateProjectRoute1$inboundSchema),
z.lazy(() => CreateProjectRoute2$inboundSchema),
]),
statusCode: types.optional(types.number()),
createdAt: types.number(),
caseId: types.optional(types.string()),
actor: types.optional(types.string()),
comment: types.optional(types.string()),
ineligibleForAppeal: types.optional(types.boolean()),
isCascading: types.optional(types.boolean()),
});
export function blockHistory4FromJSON(
jsonString: string,
): SafeParseResult<BlockHistory4, SDKValidationError> {
return safeParse(
jsonString,
(x) => BlockHistory4$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BlockHistory4' from JSON`,
);
}
/** @internal */
export const CreateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue$inboundSchema:
z.ZodType<
CreateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.string(),
});
export function createProjectHasProjectsResponse200ApplicationJSONResponseBodyValueFromJSON(
jsonString: string,
): SafeParseResult<
CreateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue' from JSON`,
);
}
/** @internal */
export const CreateProjectHasProjectsResponse2$inboundSchema: z.ZodType<
CreateProjectHasProjectsResponse2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("host"),
value: z.lazy(() =>
CreateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue$inboundSchema
),
});
export function createProjectHasProjectsResponse2FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectHasProjectsResponse2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectHasProjectsResponse2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHasProjectsResponse2' from JSON`,
);
}
/** @internal */
export const CreateProjectHasProjectsResponseKey$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectHasProjectsResponseKey
> = z.nativeEnum(CreateProjectHasProjectsResponseKey);
/** @internal */
export const CreateProjectHasProjectsResponse200ApplicationJSONValue$inboundSchema:
z.ZodType<
CreateProjectHasProjectsResponse200ApplicationJSONValue,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.string(),
});
export function createProjectHasProjectsResponse200ApplicationJSONValueFromJSON(
jsonString: string,
): SafeParseResult<
CreateProjectHasProjectsResponse200ApplicationJSONValue,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateProjectHasProjectsResponse200ApplicationJSONValue$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHasProjectsResponse200ApplicationJSONValue' from JSON`,
);
}
/** @internal */
export const CreateProjectHasProjectsResponse1$inboundSchema: z.ZodType<
CreateProjectHasProjectsResponse1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("header"),
key: CreateProjectHasProjectsResponseKey$inboundSchema,
value: z.lazy(() =>
CreateProjectHasProjectsResponse200ApplicationJSONValue$inboundSchema
),
});
export function createProjectHasProjectsResponse1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectHasProjectsResponse1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectHasProjectsResponse1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHasProjectsResponse1' from JSON`,
);
}