@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,485 lines • 156 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 type UpdateProjectProjectsPasswordProtection = {};
export const UpdateProjectProjectsResponseDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type UpdateProjectProjectsResponseDeploymentType = ClosedEnum<
typeof UpdateProjectProjectsResponseDeploymentType
>;
export type UpdateProjectProjectsPassport = {
deploymentType: UpdateProjectProjectsResponseDeploymentType;
connectorId: string;
};
export type UpdateProjectSandboxUrls = {
inheritDeploymentProtection?: boolean | undefined;
};
export type UpdateProjectProtectionConfig = {
sandboxUrls?: UpdateProjectSandboxUrls | undefined;
};
export const UpdateProjectProjectsFunctionDefaultMemoryType = {
Performance: "performance",
PerformanceXl: "performance_xl",
Standard: "standard",
StandardLegacy: "standard_legacy",
} as const;
export type UpdateProjectProjectsFunctionDefaultMemoryType = ClosedEnum<
typeof UpdateProjectProjectsFunctionDefaultMemoryType
>;
export const UpdateProjectProjectsBuildMachineType = {
Enhanced: "enhanced",
Standard: "standard",
Turbo: "turbo",
} as const;
export type UpdateProjectProjectsBuildMachineType = ClosedEnum<
typeof UpdateProjectProjectsBuildMachineType
>;
export const UpdateProjectProjectsBuildMachineSelection = {
Elastic: "elastic",
Fixed: "fixed",
} as const;
export type UpdateProjectProjectsBuildMachineSelection = ClosedEnum<
typeof UpdateProjectProjectsBuildMachineSelection
>;
export const UpdateProjectProjectsConfiguration = {
SkipNamespaceQueue: "SKIP_NAMESPACE_QUEUE",
WaitForNamespaceQueue: "WAIT_FOR_NAMESPACE_QUEUE",
} as const;
export type UpdateProjectProjectsConfiguration = ClosedEnum<
typeof UpdateProjectProjectsConfiguration
>;
export type UpdateProjectProjectsBuildQueue = {
configuration?: UpdateProjectProjectsConfiguration | undefined;
};
export type UpdateProjectProjectsResourceConfig = {
elasticConcurrencyEnabled?: boolean | undefined;
fluid?: boolean | undefined;
functionDefaultRegions: Array<string>;
functionDefaultTimeout?: number | undefined;
functionDefaultMemoryType?:
| UpdateProjectProjectsFunctionDefaultMemoryType
| undefined;
functionZeroConfigFailover?: boolean | undefined;
buildMachineType?: UpdateProjectProjectsBuildMachineType | undefined;
buildMachineSelection?:
| UpdateProjectProjectsBuildMachineSelection
| undefined;
buildMachineElasticLastUpdated?: number | undefined;
isNSNBDisabled?: boolean | undefined;
buildQueue?: UpdateProjectProjectsBuildQueue | 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 UpdateProjectRollbackDescription = {
/**
* 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 UpdateProjectStages = {
/**
* 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;
};
/**
* Project-level rolling release configuration that defines how deployments should be gradually rolled out
*/
export type UpdateProjectRollingRelease = {
/**
* 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<UpdateProjectStages> | 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;
};
export const UpdateProjectProjectsResponseFunctionDefaultMemoryType = {
Performance: "performance",
PerformanceXl: "performance_xl",
Standard: "standard",
StandardLegacy: "standard_legacy",
} as const;
export type UpdateProjectProjectsResponseFunctionDefaultMemoryType = ClosedEnum<
typeof UpdateProjectProjectsResponseFunctionDefaultMemoryType
>;
export const UpdateProjectProjectsResponseBuildMachineType = {
Enhanced: "enhanced",
Standard: "standard",
Turbo: "turbo",
} as const;
export type UpdateProjectProjectsResponseBuildMachineType = ClosedEnum<
typeof UpdateProjectProjectsResponseBuildMachineType
>;
export const UpdateProjectProjectsResponseBuildMachineSelection = {
Elastic: "elastic",
Fixed: "fixed",
} as const;
export type UpdateProjectProjectsResponseBuildMachineSelection = ClosedEnum<
typeof UpdateProjectProjectsResponseBuildMachineSelection
>;
export const UpdateProjectProjectsResponseConfiguration = {
SkipNamespaceQueue: "SKIP_NAMESPACE_QUEUE",
WaitForNamespaceQueue: "WAIT_FOR_NAMESPACE_QUEUE",
} as const;
export type UpdateProjectProjectsResponseConfiguration = ClosedEnum<
typeof UpdateProjectProjectsResponseConfiguration
>;
export type UpdateProjectProjectsResponseBuildQueue = {
configuration?: UpdateProjectProjectsResponseConfiguration | undefined;
};
export type UpdateProjectDefaultResourceConfig = {
elasticConcurrencyEnabled?: boolean | undefined;
fluid?: boolean | undefined;
functionDefaultRegions: Array<string>;
functionDefaultTimeout?: number | undefined;
functionDefaultMemoryType?:
| UpdateProjectProjectsResponseFunctionDefaultMemoryType
| undefined;
functionZeroConfigFailover?: boolean | undefined;
buildMachineType?: UpdateProjectProjectsResponseBuildMachineType | undefined;
buildMachineSelection?:
| UpdateProjectProjectsResponseBuildMachineSelection
| undefined;
buildMachineElasticLastUpdated?: number | undefined;
isNSNBDisabled?: boolean | undefined;
buildQueue?: UpdateProjectProjectsResponseBuildQueue | undefined;
enableFunctionsBeta?: boolean | undefined;
};
export type UpdateProjectProjectsStaticIps = {
builds: boolean;
enabled: boolean;
regions: Array<string>;
};
export const UpdateProjectProjectsResponse200DeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type UpdateProjectProjectsResponse200DeploymentType = ClosedEnum<
typeof UpdateProjectProjectsResponse200DeploymentType
>;
export const UpdateProjectCve55182MigrationAppliedFrom = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type UpdateProjectCve55182MigrationAppliedFrom = ClosedEnum<
typeof UpdateProjectCve55182MigrationAppliedFrom
>;
export const UpdateProjectApril2026SecurityIncidentMigrationAppliedFrom = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type UpdateProjectApril2026SecurityIncidentMigrationAppliedFrom =
ClosedEnum<typeof UpdateProjectApril2026SecurityIncidentMigrationAppliedFrom>;
export type UpdateProjectProjectsSsoProtection = {
deploymentType: UpdateProjectProjectsResponse200DeploymentType;
cve55182MigrationAppliedFrom?:
| UpdateProjectCve55182MigrationAppliedFrom
| null
| undefined;
april2026SecurityIncidentMigrationAppliedFrom?:
| UpdateProjectApril2026SecurityIncidentMigrationAppliedFrom
| null
| undefined;
};
export type UpdateProjectProjectsAliasAssigned = number | boolean;
export type UpdateProjectProjectsBuilds = {
use: string;
src?: string | undefined;
dest?: string | undefined;
};
export type UpdateProjectProjectsCreator = {
email: string;
githubLogin?: string | undefined;
gitlabLogin?: string | undefined;
uid: string;
username: string;
};
export type UpdateProjectTargets = {
alias?: Array<string> | undefined;
aliasAssigned?: number | boolean | null | undefined;
builds?: Array<UpdateProjectProjectsBuilds> | undefined;
createdAt: number;
createdIn: string;
creator: UpdateProjectProjectsCreator | null;
deploymentHostname: string;
name: string;
forced?: boolean | undefined;
id: string;
meta?: { [k: string]: string } | undefined;
plan: string;
private: boolean;
readyState: string;
requestedAt?: number | undefined;
target?: string | null | undefined;
teamId?: string | null | undefined;
type: string;
url: string;
userId: string;
withCache?: boolean | undefined;
};
export type UpdateProjectPermissions = {
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;
aiGatewayRules?: Array<ACLAction> | undefined;
aiGatewayUsage?: 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;
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;
ciInvocations?: Array<ACLAction> | undefined;
ciLogs?: Array<ACLAction> | undefined;
concurrentBuilds?: Array<ACLAction> | undefined;
connect?: Array<ACLAction> | undefined;
connectConfiguration?: Array<ACLAction> | undefined;
connexClient?: Array<ACLAction> | undefined;
connexClientProject?: Array<ACLAction> | undefined;
connexToken?: Array<ACLAction> | undefined;
buildMachineDefault?: 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;
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;
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;
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;
vercelRun?: 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;
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;
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;
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;
webAnalytics?: Array<ACLAction> | undefined;
};
export type UpdateProjectLastRollbackTarget = {};
export const UpdateProjectJobStatus = {
Failed: "failed",
InProgress: "in-progress",
Pending: "pending",
Skipped: "skipped",
Succeeded: "succeeded",
} as const;
export type UpdateProjectJobStatus = ClosedEnum<typeof UpdateProjectJobStatus>;
export const UpdateProjectProjectsResponseType = {
Promote: "promote",
Rollback: "rollback",
} as const;
export type UpdateProjectProjectsResponseType = ClosedEnum<
typeof UpdateProjectProjectsResponseType
>;
export type UpdateProjectLastAliasRequest = {
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: UpdateProjectJobStatus;
requestedAt: number;
type: UpdateProjectProjectsResponseType;
};
export type UpdateProjectProtectionBypass2 = {
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 UpdateProjectProtectionBypass1 = {
createdAt: number;
createdBy: string;
scope: "integration-automation-bypass";
integrationId: string;
configurationId: string;
};
export type UpdateProjectProtectionBypass =
| UpdateProjectProtectionBypass1
| UpdateProjectProtectionBypass2;
export const UpdateProjectTrustedIpsProjectsDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
Production: "production",
} as const;
export type UpdateProjectTrustedIpsProjectsDeploymentType = ClosedEnum<
typeof UpdateProjectTrustedIpsProjectsDeploymentType
>;
export type UpdateProjectTrustedIps2 = {
deploymentType: UpdateProjectTrustedIpsProjectsDeploymentType;
};
export const UpdateProjectTrustedIpsDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
Production: "production",
} as const;
export type UpdateProjectTrustedIpsDeploymentType = ClosedEnum<
typeof UpdateProjectTrustedIpsDeploymentType
>;
export type UpdateProjectTrustedIpsAddresses = {
value: string;
note?: string | undefined;
};
export const UpdateProjectTrustedIpsProtectionMode = {
Additional: "additional",
Exclusive: "exclusive",
} as const;
export type UpdateProjectTrustedIpsProtectionMode = ClosedEnum<
typeof UpdateProjectTrustedIpsProtectionMode
>;
export type UpdateProjectTrustedIps1 = {
deploymentType: UpdateProjectTrustedIpsDeploymentType;
addresses: Array<UpdateProjectTrustedIpsAddresses>;
protectionMode: UpdateProjectTrustedIpsProtectionMode;
};
export type UpdateProjectProjectsTrustedIps =
| UpdateProjectTrustedIps1
| UpdateProjectTrustedIps2;
export const UpdateProjectFromProjectsResponsePreset = {
AllCustom: "all-custom",
} as const;
export type UpdateProjectFromProjectsResponsePreset = ClosedEnum<
typeof UpdateProjectFromProjectsResponsePreset
>;
/**
* The source envs on the trusted project that are allowed to access `to`.
*/
export type UpdateProjectFrom2 = {
/**
* System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
*/
slugs?: Array<string> | undefined;
preset: UpdateProjectFromProjectsResponsePreset;
};
export const UpdateProjectFromProjectsPreset = {
AllCustom: "all-custom",
} as const;
export type UpdateProjectFromProjectsPreset = ClosedEnum<
typeof UpdateProjectFromProjectsPreset
>;
/**
* The source envs on the trusted project that are allowed to access `to`.
*/
export type UpdateProjectFrom1 = {
/**
* System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
*/
slugs: Array<string>;
preset?: UpdateProjectFromProjectsPreset | undefined;
};
export type UpdateProjectFrom = UpdateProjectFrom1 | UpdateProjectFrom2;
export const UpdateProjectToProjectsResponse200ApplicationJSONResponseBodyPreset =
{
AllCustom: "all-custom",
} as const;
export type UpdateProjectToProjectsResponse200ApplicationJSONResponseBodyPreset =
ClosedEnum<
typeof UpdateProjectToProjectsResponse200ApplicationJSONResponseBodyPreset
>;
/**
* The target envs on the current project that may be accessed.
*/
export type UpdateProjectToProjectsResponse2 = {
/**
* System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
*/
slugs?: Array<string> | undefined;
preset: UpdateProjectToProjectsResponse200ApplicationJSONResponseBodyPreset;
};
export const UpdateProjectToProjectsResponse200ApplicationJSONPreset = {
AllCustom: "all-custom",
} as const;
export type UpdateProjectToProjectsResponse200ApplicationJSONPreset =
ClosedEnum<typeof UpdateProjectToProjectsResponse200ApplicationJSONPreset>;
/**
* The target envs on the current project that may be accessed.
*/
export type UpdateProjectToProjectsResponse1 = {
/**
* System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
*/
slugs: Array<string>;
preset?: UpdateProjectToProjectsResponse200ApplicationJSONPreset | undefined;
};
export type UpdateProjectProjectsResponseTo =
| UpdateProjectToProjectsResponse1
| UpdateProjectToProjectsResponse2;
/**
* Optional overrides for the default same-env-by-slug matching. Provide explicit rules to allow cross-env access or presets.
*/
export type UpdateProjectCustomAllow = {
from: UpdateProjectFrom1 | UpdateProjectFrom2;
to: UpdateProjectToProjectsResponse1 | UpdateProjectToProjectsResponse2;
};
export type UpdateProjectProjectsProjects = {
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<UpdateProjectCustomAllow> | undefined;
};
export const UpdateProjectToProjectsResponse200Preset = {
AllCustom: "all-custom",
} as const;
export type UpdateProjectToProjectsResponse200Preset = ClosedEnum<
typeof UpdateProjectToProjectsResponse200Preset
>;
/**
* The target envs on the current project that may be accessed.
*/
export type UpdateProjectToProjects2 = {
/**
* System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
*/
slugs?: Array<string> | undefined;
preset: UpdateProjectToProjectsResponse200Preset;
};
export const UpdateProjectToProjectsResponsePreset = {
AllCustom: "all-custom",
} as const;
export type UpdateProjectToProjectsResponsePreset = ClosedEnum<
typeof UpdateProjectToProjectsResponsePreset
>;
/**
* The target envs on the current project that may be accessed.
*/
export type UpdateProjectToProjects1 = {
/**
* System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
*/
slugs: Array<string>;
preset?: UpdateProjectToProjectsResponsePreset | undefined;
};
export type UpdateProjectProjectsTo =
| UpdateProjectToProjects1
| UpdateProjectToProjects2;
export type UpdateProjectOidcProviders = {
to: UpdateProjectToProjects1 | UpdateProjectToProjects2;
label?: string | undefined;
claims: { [k: string]: Array<string> };
};
export type UpdateProjectTrustedSources = {
projects?: { [k: string]: UpdateProjectProjectsProjects } | undefined;
oidcProviders?:
| { [k: string]: Array<UpdateProjectOidcProviders> }
| undefined;
};
export type UpdateProjectGitComments = {
/**
* 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 UpdateProjectCreateDeployments = {
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 UpdateProjectCreateDeployments = ClosedEnum<
typeof UpdateProjectCreateDeployments
>;
/**
* 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 UpdateProjectConsolidatedGitCommitStatus = {
/**
* Whether consolidated commit status is enabled.
*/
enabled: boolean;
/**
* Whether to propagate individual deployment failures to the consolidated status.
*/
propagateFailures: boolean;
};
export type UpdateProjectGitProviderOptions = {
/**
* 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: UpdateProjectCreateDeployments;
/**
* 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?:
| UpdateProjectConsolidatedGitCommitStatus
| undefined;
};
export type UpdateProjectWebAnalytics = {
id: string;
disabledAt?: number | undefined;
canceledAt?: number | undefined;
enabledAt?: number | undefined;
hasData?: true | undefined;
};
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction =
{
Challenge: "challenge",
Deny: "deny",
Log: "log",
} as const;
export type UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction =
ClosedEnum<
typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction
>;
export type UpdateProjectVercelRuleset = {
active: boolean;
action?:
| UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction
| undefined;
};
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction =
{
Challenge: "challenge",
Deny: "deny",
Log: "log",
} as const;
export type UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction =
ClosedEnum<
typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction
>;
export type UpdateProjectTrafficSources = {
active: boolean;
action?:
| UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction
| undefined;
};
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesBotFilterAction =
{
Challenge: "challenge",
Deny: "deny",
Log: "log",
} as const;
export type UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesBotFilterAction =
ClosedEnum<
typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesBotFilterAction
>;
export type UpdateProjectBotFilter = {
active: boolean;
action?:
| UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesBotFilterAction
| undefined;
};
export const UpdateProjectProjectsResponse200ApplicationJSONAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
} as const;
export type UpdateProjectProjectsResponse200ApplicationJSONAction = ClosedEnum<
typeof UpdateProjectProjectsResponse200ApplicationJSONAction
>;
export type UpdateProjectAiBots = {
active: boolean;
action?: UpdateProjectProjectsResponse200ApplicationJSONAction | undefined;
};
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAction =
{
Challenge: "challenge",
Deny: "deny",
Log: "log",
} as const;
export type UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAction =
ClosedEnum<
typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAction
>;
export type UpdateProjectOwasp = {
active: boolean;
action?:
| UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAction
| undefined;
};
export type UpdateProjectManagedRules = {
vercelRuleset: UpdateProjectVercelRuleset;
trafficSources: UpdateProjectTrafficSources;
botFilter: UpdateProjectBotFilter;
aiBots: UpdateProjectAiBots;
owasp: UpdateProjectOwasp;
};
export const UpdateProjectLogHeaders2 = {
Wildcard: "*",
} as const;
export type UpdateProjectLogHeaders2 = ClosedEnum<
typeof UpdateProjectLogHeaders2
>;
export type UpdateProjectLogHeaders = Array<string> | UpdateProjectLogHeaders2;
export type UpdateProjectSecurityPlusMetadata = {
updatedAt: number;
/**
* Timestamp when the feature was first enabled. Never changes after initial enablement.
*/
firstEnabledAt?: number | undefined;
};
export type UpdateProjectSecurity = {
attackModeEnabled?: boolean | undefined;
attackModeUpdatedAt?: number | undefined;
firewallEnabled?: boolean | undefined;
firewallUpdatedAt?: number | undefined;
attackModeActiveUntil?: number | null | undefined;
firewallConfigVersion?: number | undefined;
firewallSeawallEnabled?: boolean | undefined;
ja3Enabled?: boolean | undefined;
ja4Enabled?: boolean | undefined;
firewallBypassIps?: Array<string> | undefined;
managedRules?: UpdateProjectManagedRules | null | undefined;
botIdEnabled?: boolean | undefined;
logHeaders?: Array<string> | UpdateProjectLogHeaders2 | undefined;
securityPlus?: boolean | undefined;
securityPlusMetadata?: UpdateProjectSecurityPlusMetadata | 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 UpdateProjectProjectsIssuerMode = {
Global: "global",
Team: "team",
} as const;
/**
* - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com`
*/
export type UpdateProjectProjectsIssuerMode = ClosedEnum<
typeof UpdateProjectProjectsIssuerMode
>;
export type UpdateProjectProjectsOidcTokenConfig = {
/**
* 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?: UpdateProjectProjectsIssuerMode | 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 UpdateProjectSourcesProjects2 = {
provider: "gitlab";
namespace: string;
project?: string | undefined;
};
export const UpdateProjectSourcesProjectsResponse200Provider = {
Bitbucket: "bitbucket",
Github: "github",
} as const;
export type UpdateProjectSourcesProjectsResponse200Provider = ClosedEnum<
typeof UpdateProjectSourcesProjectsResponse200Provider
>;
/**
* 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 UpdateProjectSourcesProjects1 = {
provider: UpdateProjectSourcesProjectsResponse200Provider;
org: string;
repo?: string | undefined;
};
export type UpdateProjectSources =
| (UpdateProjectSourcesProjects1 & { provider: "bitbucket" })
| (UpdateProjectSourcesProjects1 & { provider: "github" })
| UpdateProjectSourcesProjects2;
export type UpdateProjectEnvironmentsProjectsResponse2002 = {
type: "custom";
environmentId: string;
};
export const UpdateProjectEnvironmentsProjectsResponse200Target = {
Preview: "preview",
Production: "production",
} as const;
export type UpdateProjectEnvironmentsProjectsResponse200Target = ClosedEnum<
typeof UpdateProjectEnvironmentsProjectsResponse200Target
>;
export type UpdateProjectEnvironmentsProjectsResponse2001 = {
type: "system";
target: UpdateProjectEnvironmentsProjectsResponse200Target;
};
export type UpdateProjectEnvironments =
| UpdateProjectEnvironmentsProjectsResponse2001
| UpdateProjectEnvironmentsProjectsResponse2002;
/**
* `enabled: true` with empty `sources` is deny-all.
*/
export type UpdateProjectGitSources = {
sources: Array<
| (UpdateProjectSourcesProjects1 & { provider: "bitbucket" })
| (UpdateProjectSourcesProjects1 & { provider: "github" })
| UpdateProjectSourcesProjects2
>;
enabled: boolean;
environments: Array<
| UpdateProjectEnvironmentsProjectsResponse2001
| UpdateProjectEnvironmentsProjectsResponse2002
>;
};
/**
* 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 UpdateProjectProjectsSources = {
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 UpdateProjectProjectsSources = ClosedEnum<
typeof UpdateProjectProjectsSources
>;
export type UpdateProjectEnvironmentsProjectsResponse2 = {
type: "custom";
environmentId: string;
};
export const UpdateProjectEnvironmentsProjectsResponseTarget = {
Preview: "preview",
Production: "production",
} as const;
export type UpdateProjectEnvironmentsProjectsResponseTarget = ClosedEnum<
typeof UpdateProjectEnvironmentsProjectsResponseTarget
>;
export type UpdateProjectEnvironmentsProjectsResponse1 = {
type: "system";
target: UpdateProjectEnvironmentsProjectsResponseTarget;
};
export type UpdateProjectProjectsEnvironments =
| UpdateProjectEnvironmentsProjectsResponse1
| UpdateProjectEnvironmentsProjectsResponse2;
/**
* `enabled: true` with empty `sources` is deny-all.
*/
export type UpdateProjectDeploymentSources = {
sources: Array<UpdateProjectProjectsSources>;
enabled: boolean;
environments: Array<
| UpdateProjectEnvironmentsProjectsResponse1
| UpdateProjectEnvironmentsProjectsResponse2
>;
};
/**
* 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 UpdateProjectProjectsDeploymentPolicy = {
gitSources?: Array<UpdateProjectGitSources> | null | undefined;
deploymentSources?: Array<UpdateProjectDeploymentSources> | null | undefined;
};
export const UpdateProjectFlatRateTier = {
Advanced: "advanced",
Base: "base",
Critical: "critical",
Standard: "standard",
} as const;
export type UpdateProjectFlatRateTier = ClosedEnum<
typeof UpdateProjectFlatRateTier
>;
/**
* Billing mode. Always 'flat' for flat-rate projects.
*/
export const UpdateProjectKind = {
Flat: "flat",
} as const;
/**
* Billing mode. Always 'flat' for flat-rate projects.
*/
export type UpdateProjectKind = ClosedEnum<typeof UpdateProjectKind>;
export type UpdateProjectUsageStatus = {
/**
* Billing mode. Always 'flat' for flat-rate projects.
*/
kind: UpdateProjectKind;
/**
* 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;
/**
* Whether the project is currently throttled.
*/
throttled?: boolean | undefined;
};
export type UpdateProjectFeatures = {
webAnalytics?: boolean | undefined;
};
export type UpdateProjectHistory = {
scanner: string;
reason: string;
by: string;
byId: string;
at: number;
};
export const UpdateProjectProjectsResponse200Action = {
Blocked: "blocked",
} as const;
export type UpdateProjectProjectsResponse200Action = ClosedEnum<
typeof UpdateProjectProjectsResponse200Action
>;
export type UpdateProjectBlock = {
action: UpdateProjectProjectsResponse200Action;
reason: string;
statusCode: number;
createdAt: number;
caseId?: string | undefined;
actor?: string | undefined;
comment?: string | undefined;
ineligibleForAppeal?: boolean | undefined;
isCascading?: boolean | undefined;
};
export type UpdateProjectHasProjectsResponse200Value = {
eq: string;
};
export type UpdateProjectHasProjects2 = {
type: "host";
value: UpdateProjectHasProjectsResponse200Value;
};
export const UpdateProjectHasProjectsKey = {
XVercelIpCountry: "x-vercel-ip-country",
} as const;
export type UpdateProjectHasProjectsKey = ClosedEnum<
typeof UpdateProjectHasProjectsKey
>;
export type UpdateProjectHasProjectsResponseValue = {
eq: string;
};
export type UpdateProjectHasProjects1 = {
type: "header";
key: UpdateProjectHasProjectsKey;
value: UpdateProjectHasProjectsResponseValue;
};
export type UpdateProjectRouteProjectsHas =
| UpdateProjectHasProjects1
| UpdateProjectHasProjects2;
export const UpdateProjectRouteProjectsAction = {
BlockLegalCwc: "block_legal_cwc",
} as const;
export type UpdateProjectRouteProjectsAction = ClosedEnum<
typeof UpdateProjectRouteProjectsAction
>;
export type UpdateProjectRouteProjectsMitigate = {
action: UpdateProjectRouteProjectsAction;
};
export type UpdateProjectRouteProjects2 = {
has: Array<UpdateProjectHasProjects1 | UpdateProjectHasProjects2>;
mitigate: UpdateProjectRouteProjectsMitigate;
src?: string | undefined;
};
export type UpdateProjectRouteProjects1 = {
src: string;
status: number;
};
export type UpdateProjectBlockHistoryProjectsRoute =
| UpdateProjectRouteProjects1
| UpdateProjectRouteProjects2;
export type UpdateProjectBlockHistory4 = {
action: "route-unblocked";
route: UpdateProjectRouteProjects1 | UpdateProjectRouteProjects2;
statusCode?: number | undefined;
createdAt: number;
caseId?: string | undefined;
actor?: string | undefined;
comment?: string | undefined;
ineligibleForAppeal?: boolean | undefined;
isCascading?: boolean | undefined;
};
export type UpdateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue =
{
eq: string;
};
export type UpdateProjectHasProjectsResponse2 = {
type: "host";
value: UpdateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue;
};
export const UpdateProjectHasProjectsResponseKey = {
XVercelIpCountry: "x-vercel-ip-country",
} as const;
export type UpdateProjectHasProjectsResponseKey = ClosedEnum<
typeof UpdateProjectHasProjectsResponseKey
>;
export type UpdateProjectHasProjectsResponse200ApplicationJSONValue = {
eq: string;
};
export type UpdateProjectHasProjectsResponse1 = {
type: "header";
key: UpdateProjectHasProjectsResponseKey;
value: UpdateProjectHasProjectsResponse200ApplicationJSONValue;
};
export type UpdateProjectRouteHas =
| UpdateProjectHasProjectsResponse1
| UpdateProjectHasProjectsResponse2;
export const UpdateProjectRouteAction = {
BlockLegalCwc: "block_legal_cwc",
} as const;
export type UpdateProjectRouteAction = ClosedEnum<
typeof UpdateProjectRouteAction
>;
export type UpdateProjectRouteMitigate = {
action: UpdateProjectRouteAction;
};
export type UpdateProjectRoute2 = {
has: Array<
UpdateProjectHasProjectsResponse1 | UpdateProjectHasProjectsResponse2
>;
mitigate: UpdateProjectRouteMitigate;
src?: string | undefined;
};
export type UpdateProjectRoute1 = {
src: string;
status: number;
};
export type UpdateProjectBlockHistoryRoute =
| UpdateProjectRoute1
| UpdateProjectRoute2;
export type UpdateProjectBlockHistory3 = {
action: "route-blocked";
route: UpdateProjectRoute1 | UpdateProjectRoute2;
reason: string;
createdAt: number;
caseId?: string | undefined;
actor?: string | undefined;
comment?: string | undefined;
ineligibleForAppeal?: boolean | undefined;
isCascading?: boolean | undefined;
};
export type UpdateProjectBlockHistory2 = {
action: "unblocked";
createdAt: number;
caseId?: string | undefined;
actor?: string | undefined;
comment?: string | undefined;
ineligibleForAppeal?: boolean | undefined;
isCascading?: boolean | undefined;
};
export type UpdateProjectBlockHistory1 = {
action: "blocked";
reason: string;
statusCode: number;
createdAt: number;
caseId?: string | undefined;
actor?: string | undefined;
comment?: string | undefined;
ineligibleForAppeal?: boolean | undefined;
isCascading?: boolean | undefined;
};
export type UpdateProjectBlockHistory =
| UpdateProjectBlockHistory1
| UpdateProjectBlockHistory2
| UpdateProjectBlockHistory3
| UpdateProjectBlockHistory4;
export const UpdateProjectProjectsResponseAction = {
AddDeploymentInterstitial: "add-deployment-interstitial",
AddProjectInterstitial: "add-project-interstitial",
RemoveDeploymentInterstitial: "remove-deployment-interstitial",
RemoveProjectInterstitial: "remove-project-interstitial",
} as const;
export type UpdateProjectProjectsResponseAction = ClosedEnum<
typeof UpdateProjectProjectsResponseAction
>;
export type UpdateProjectInterstitialHistory = {
action: UpdateProjectProjectsResponseAction;
createdAt: number;
caseId?: string | undefined;
reason?: string | undefined;
actor?: string | undefined;
comment?: string | undefined;
};
export type UpdateProjectAbuse = {
scanner?: string | undefined;
history: Array<UpdateProjectHistory>;
updatedAt: number;
block?: UpdateProjectBlock | undefined;
blockHistory?:
| Array<
| UpdateProjectBlockHistory1
| UpdateProjectBlockHistory2
| UpdateProjectBlockHistory3
| UpdateProjectBlockHistory4
>
| undefined;
interstitial?: boolean | undefined;
interstitialHistory?: Array<UpdateProjectInterstitialHistory> | undefined;
};
export type UpdateProjectHasProjectsValue = {
eq: string;
};
export type UpdateProjectHas2 = {
type: "host";
value: UpdateProjectHasProjectsValue;
};
export const UpdateProjectHasKey = {
XVercelIpCountry: "x-vercel-ip-country",
} as const;
export type UpdateProjectHasKey = ClosedEnum<typeof UpdateProjectHasKey>;
export type UpdateProjectHasValue = {
eq: string;
};
export type UpdateProjectHas1 = {
type: "header";
key: UpdateProjectHasKey;
value: UpdateProjectHasValue;
};
export type UpdateProjectInternalRoutesHas =
| UpdateProjectHas1
| UpdateProjectHas2;
export const UpdateProjectInternalRoutesAction = {
BlockLegalCwc: "block_legal_cwc",
} as const;
export type UpdateProjectInternalRoutesAction = ClosedEnum<
typeof UpdateProjectInternalRoutesAction
>;
export type UpdateProjectInternalRoutesMitigate = {
action: UpdateProjectInternalRoutesAction;
};
export type UpdateProjectInternalRoutes2 = {
has: Array<UpdateProjectHas1 | UpdateProjectHas2>;
mitigate: UpdateProjectInternalRoutesMitigate;
src?: string | undefined;
};
export type UpdateProjectInternalRoutes1 = {
src: string;
status: number;
};
export type UpdateProjectInternalRoutes =
| UpdateProjectInternalRoutes1
| UpdateProjectInternalRoutes2;
export const UpdateProjectProjectsAction = {
Accept: "accept",
Cancel: "cancel",
Delete: "delete",
} as const;
export type UpdateProjectProjectsAction = ClosedEnum<
typeof UpdateProjectProjectsAction
>;
/** @internal */
export const UpdateProjectProjectsPasswordProtection$inboundSchema: z.ZodType<
UpdateProjectProjectsPasswordProtection,
z.ZodTypeDef,
unknown
> = z.object({});
export function updateProjectProjectsPasswordProtectionFromJSON(
jsonString: string,
): SafeParseResult<
UpdateProjectProjectsPasswordProtection,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UpdateProjectProjectsPasswordProtection$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'UpdateProjectProjectsPasswordProtection' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsResponseDeploymentType$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectProjectsResponseDeploymentType> = z
.nativeEnum(UpdateProjectProjectsResponseDeploymentType);
/** @internal */
export const UpdateProjectProjectsPassport$inboundSchema: z.ZodType<
UpdateProjectProjectsPassport,
z.ZodTypeDef,
unknown
> = z.object({
deploymentType: UpdateProjectProjectsResponseDeploymentType$inboundSchema,
connectorId: types.string(),
});
export function updateProjectProjectsPassportFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProjectsPassport, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectProjectsPassport$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProjectsPassport' from JSON`,
);
}
/** @internal */
export const UpdateProjectSandboxUrls$inboundSchema: z.ZodType<
UpdateProjectSandboxUrls,
z.ZodTypeDef,
unknown
> = z.object({
inheritDeploymentProtection: types.optional(types.boolean()),
});
export function updateProjectSandboxUrlsFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectSandboxUrls, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectSandboxUrls$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectSandboxUrls' from JSON`,
);
}
/** @internal */
export const UpdateProjectProtectionConfig$inboundSchema: z.ZodType<
UpdateProjectProtectionConfig,
z.ZodTypeDef,
unknown
> = z.object({
sandboxUrls: types.optional(
z.lazy(() => UpdateProjectSandboxUrls$inboundSchema),
),
});
export function updateProjectProtectionConfigFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProtectionConfig, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectProtectionConfig$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProtectionConfig' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsFunctionDefaultMemoryType$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectProjectsFunctionDefaultMemoryType> = z
.nativeEnum(UpdateProjectProjectsFunctionDefaultMemoryType);
/** @internal */
export const UpdateProjectProjectsBuildMachineType$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectProjectsBuildMachineType> = z.nativeEnum(
UpdateProjectProjectsBuildMachineType,
);
/** @internal */
export const UpdateProjectProjectsBuildMachineSelection$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectProjectsBuildMachineSelection> = z
.nativeEnum(UpdateProjectProjectsBuildMachineSelection);
/** @internal */
export const UpdateProjectProjectsConfiguration$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectProjectsConfiguration
> = z.nativeEnum(UpdateProjectProjectsConfiguration);
/** @internal */
export const UpdateProjectProjectsBuildQueue$inboundSchema: z.ZodType<
UpdateProjectProjectsBuildQueue,
z.ZodTypeDef,
unknown
> = z.object({
configuration: types.optional(
UpdateProjectProjectsConfiguration$inboundSchema,
),
});
export function updateProjectProjectsBuildQueueFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProjectsBuildQueue, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectProjectsBuildQueue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProjectsBuildQueue' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsResourceConfig$inboundSchema: z.ZodType<
UpdateProjectProjectsResourceConfig,
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(
UpdateProjectProjectsFunctionDefaultMemoryType$inboundSchema,
),
functionZeroConfigFailover: types.optional(types.boolean()),
buildMachineType: types.optional(
UpdateProjectProjectsBuildMachineType$inboundSchema,
),
buildMachineSelection: types.optional(
UpdateProjectProjectsBuildMachineSelection$inboundSchema,
),
buildMachineElasticLastUpdated: types.optional(types.number()),
isNSNBDisabled: types.optional(types.boolean()),
buildQueue: types.optional(
z.lazy(() => UpdateProjectProjectsBuildQueue$inboundSchema),
),
enableFunctionsBeta: types.optional(types.boolean()),
});
export function updateProjectProjectsResourceConfigFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProjectsResourceConfig, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UpdateProjectProjectsResourceConfig$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProjectsResourceConfig' from JSON`,
);
}
/** @internal */
export const UpdateProjectRollbackDescription$inboundSchema: z.ZodType<
UpdateProjectRollbackDescription,
z.ZodTypeDef,
unknown
> = z.object({
userId: types.string(),
username: types.string(),
description: types.string(),
createdAt: types.number(),
});
export function updateProjectRollbackDescriptionFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectRollbackDescription, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectRollbackDescription$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectRollbackDescription' from JSON`,
);
}
/** @internal */
export const UpdateProjectStages$inboundSchema: z.ZodType<
UpdateProjectStages,
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 updateProjectStagesFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectStages, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectStages$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectStages' from JSON`,
);
}
/** @internal */
export const UpdateProjectRollingRelease$inboundSchema: z.ZodType<
UpdateProjectRollingRelease,
z.ZodTypeDef,
unknown
> = z.object({
target: types.string(),
stages: z.nullable(z.array(z.lazy(() => UpdateProjectStages$inboundSchema)))
.optional(),
canaryResponseHeader: types.optional(types.boolean()),
});
export function updateProjectRollingReleaseFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectRollingRelease, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectRollingRelease$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectRollingRelease' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsResponseFunctionDefaultMemoryType$inboundSchema:
z.ZodNativeEnum<
typeof UpdateProjectProjectsResponseFunctionDefaultMemoryType
> = z.nativeEnum(UpdateProjectProjectsResponseFunctionDefaultMemoryType);
/** @internal */
export const UpdateProjectProjectsResponseBuildMachineType$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectProjectsResponseBuildMachineType> = z
.nativeEnum(UpdateProjectProjectsResponseBuildMachineType);
/** @internal */
export const UpdateProjectProjectsResponseBuildMachineSelection$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectProjectsResponseBuildMachineSelection> = z
.nativeEnum(UpdateProjectProjectsResponseBuildMachineSelection);
/** @internal */
export const UpdateProjectProjectsResponseConfiguration$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectProjectsResponseConfiguration> = z
.nativeEnum(UpdateProjectProjectsResponseConfiguration);
/** @internal */
export const UpdateProjectProjectsResponseBuildQueue$inboundSchema: z.ZodType<
UpdateProjectProjectsResponseBuildQueue,
z.ZodTypeDef,
unknown
> = z.object({
configuration: types.optional(
UpdateProjectProjectsResponseConfiguration$inboundSchema,
),
});
export function updateProjectProjectsResponseBuildQueueFromJSON(
jsonString: string,
): SafeParseResult<
UpdateProjectProjectsResponseBuildQueue,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UpdateProjectProjectsResponseBuildQueue$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'UpdateProjectProjectsResponseBuildQueue' from JSON`,
);
}
/** @internal */
export const UpdateProjectDefaultResourceConfig$inboundSchema: z.ZodType<
UpdateProjectDefaultResourceConfig,
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(
UpdateProjectProjectsResponseFunctionDefaultMemoryType$inboundSchema,
),
functionZeroConfigFailover: types.optional(types.boolean()),
buildMachineType: types.optional(
UpdateProjectProjectsResponseBuildMachineType$inboundSchema,
),
buildMachineSelection: types.optional(
UpdateProjectProjectsResponseBuildMachineSelection$inboundSchema,
),
buildMachineElasticLastUpdated: types.optional(types.number()),
isNSNBDisabled: types.optional(types.boolean()),
buildQueue: types.optional(
z.lazy(() => UpdateProjectProjectsResponseBuildQueue$inboundSchema),
),
enableFunctionsBeta: types.optional(types.boolean()),
});
export function updateProjectDefaultResourceConfigFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectDefaultResourceConfig, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UpdateProjectDefaultResourceConfig$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectDefaultResourceConfig' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsStaticIps$inboundSchema: z.ZodType<
UpdateProjectProjectsStaticIps,
z.ZodTypeDef,
unknown
> = z.object({
builds: types.boolean(),
enabled: types.boolean(),
regions: z.array(types.string()),
});
export function updateProjectProjectsStaticIpsFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProjectsStaticIps, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectProjectsStaticIps$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProjectsStaticIps' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsResponse200DeploymentType$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectProjectsResponse200DeploymentType> = z
.nativeEnum(UpdateProjectProjectsResponse200DeploymentType);
/** @internal */
export const UpdateProjectCve55182MigrationAppliedFrom$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectCve55182MigrationAppliedFrom> = z
.nativeEnum(UpdateProjectCve55182MigrationAppliedFrom);
/** @internal */
export const UpdateProjectApril2026SecurityIncidentMigrationAppliedFrom$inboundSchema:
z.ZodNativeEnum<
typeof UpdateProjectApril2026SecurityIncidentMigrationAppliedFrom
> = z.nativeEnum(UpdateProjectApril2026SecurityIncidentMigrationAppliedFrom);
/** @internal */
export const UpdateProjectProjectsSsoProtection$inboundSchema: z.ZodType<
UpdateProjectProjectsSsoProtection,
z.ZodTypeDef,
unknown
> = z.object({
deploymentType: UpdateProjectProjectsResponse200DeploymentType$inboundSchema,
cve55182MigrationAppliedFrom: z.nullable(
UpdateProjectCve55182MigrationAppliedFrom$inboundSchema,
).optional(),
april2026SecurityIncidentMigrationAppliedFrom: z.nullable(
UpdateProjectApril2026SecurityIncidentMigrationAppliedFrom$inboundSchema,
).optional(),
});
export function updateProjectProjectsSsoProtectionFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProjectsSsoProtection, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UpdateProjectProjectsSsoProtection$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProjectsSsoProtection' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsAliasAssigned$inboundSchema: z.ZodType<
UpdateProjectProjectsAliasAssigned,
z.ZodTypeDef,
unknown
> = smartUnion([types.number(), types.boolean()]);
export function updateProjectProjectsAliasAssignedFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProjectsAliasAssigned, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UpdateProjectProjectsAliasAssigned$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProjectsAliasAssigned' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsBuilds$inboundSchema: z.ZodType<
UpdateProjectProjectsBuilds,
z.ZodTypeDef,
unknown
> = z.object({
use: types.string(),
src: types.optional(types.string()),
dest: types.optional(types.string()),
});
export function updateProjectProjectsBuildsFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProjectsBuilds, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectProjectsBuilds$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProjectsBuilds' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsCreator$inboundSchema: z.ZodType<
UpdateProjectProjectsCreator,
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 updateProjectProjectsCreatorFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProjectsCreator, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectProjectsCreator$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProjectsCreator' from JSON`,
);
}
/** @internal */
export const UpdateProjectTargets$inboundSchema: z.ZodType<
UpdateProjectTargets,
z.ZodTypeDef,
unknown
> = z.object({
alias: types.optional(z.array(types.string())),
aliasAssigned: z.nullable(smartUnion([types.number(), types.boolean()]))
.optional(),
builds: types.optional(
z.array(z.lazy(() => UpdateProjectProjectsBuilds$inboundSchema)),
),
createdAt: types.number(),
createdIn: types.string(),
creator: types.nullable(
z.lazy(() => UpdateProjectProjectsCreator$inboundSchema),
),
deploymentHostname: types.string(),
name: types.string(),
forced: types.optional(types.boolean()),
id: types.string(),
meta: types.optional(z.record(types.string())),
plan: types.string(),
private: types.boolean(),
readyState: types.string(),
requestedAt: types.optional(types.number()),
target: z.nullable(types.string()).optional(),
teamId: z.nullable(types.string()).optional(),
type: types.string(),
url: types.string(),
userId: types.string(),
withCache: types.optional(types.boolean()),
});
export function updateProjectTargetsFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectTargets, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectTargets$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectTargets' from JSON`,
);
}
/** @internal */
export const UpdateProjectPermissions$inboundSchema: z.ZodType<
UpdateProjectPermissions,
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)),
aiGatewayRules: types.optional(z.array(ACLAction$inboundSchema)),
aiGatewayUsage: 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)),
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)),
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)),
connexClient: types.optional(z.array(ACLAction$inboundSchema)),
connexClientProject: types.optional(z.array(ACLAction$inboundSchema)),
connexToken: types.optional(z.array(ACLAction$inboundSchema)),
buildMachineDefault: 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),
),
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)),
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)),
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)),
vercelRun: 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),
),
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)),
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)),
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)),
webAnalytics: types.optional(z.array(ACLAction$inboundSchema)),
}).transform((v) => {
return remap$(v, {
"Monitoring": "monitoring",
"NotificationMonitoringAlert": "notificationMonitoringAlert",
"webhook-event": "webhookEvent",
"projectFlagsSdkKey": "projectFlagsSDKKey",
});
});
export function updateProjectPermissionsFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectPermissions, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectPermissions$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectPermissions' from JSON`,
);
}
/** @internal */
export const UpdateProjectLastRollbackTarget$inboundSchema: z.ZodType<
UpdateProjectLastRollbackTarget,
z.ZodTypeDef,
unknown
> = z.object({});
export function updateProjectLastRollbackTargetFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectLastRollbackTarget, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectLastRollbackTarget$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectLastRollbackTarget' from JSON`,
);
}
/** @internal */
export const UpdateProjectJobStatus$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectJobStatus
> = z.nativeEnum(UpdateProjectJobStatus);
/** @internal */
export const UpdateProjectProjectsResponseType$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectProjectsResponseType
> = z.nativeEnum(UpdateProjectProjectsResponseType);
/** @internal */
export const UpdateProjectLastAliasRequest$inboundSchema: z.ZodType<
UpdateProjectLastAliasRequest,
z.ZodTypeDef,
unknown
> = z.object({
fromDeploymentId: types.nullable(types.string()),
toDeploymentId: types.string(),
fromRollingReleaseId: types.optional(types.string()),
jobStatus: UpdateProjectJobStatus$inboundSchema,
requestedAt: types.number(),
type: UpdateProjectProjectsResponseType$inboundSchema,
});
export function updateProjectLastAliasRequestFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectLastAliasRequest, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectLastAliasRequest$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectLastAliasRequest' from JSON`,
);
}
/** @internal */
export const UpdateProjectProtectionBypass2$inboundSchema: z.ZodType<
UpdateProjectProtectionBypass2,
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 updateProjectProtectionBypass2FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProtectionBypass2, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectProtectionBypass2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProtectionBypass2' from JSON`,
);
}
/** @internal */
export const UpdateProjectProtectionBypass1$inboundSchema: z.ZodType<
UpdateProjectProtectionBypass1,
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 updateProjectProtectionBypass1FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProtectionBypass1, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectProtectionBypass1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProtectionBypass1' from JSON`,
);
}
/** @internal */
export const UpdateProjectProtectionBypass$inboundSchema: z.ZodType<
UpdateProjectProtectionBypass,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => UpdateProjectProtectionBypass1$inboundSchema),
z.lazy(() => UpdateProjectProtectionBypass2$inboundSchema),
]);
export function updateProjectProtectionBypassFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProtectionBypass, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectProtectionBypass$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProtectionBypass' from JSON`,
);
}
/** @internal */
export const UpdateProjectTrustedIpsProjectsDeploymentType$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectTrustedIpsProjectsDeploymentType> = z
.nativeEnum(UpdateProjectTrustedIpsProjectsDeploymentType);
/** @internal */
export const UpdateProjectTrustedIps2$inboundSchema: z.ZodType<
UpdateProjectTrustedIps2,
z.ZodTypeDef,
unknown
> = z.object({
deploymentType: UpdateProjectTrustedIpsProjectsDeploymentType$inboundSchema,
});
export function updateProjectTrustedIps2FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectTrustedIps2, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectTrustedIps2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectTrustedIps2' from JSON`,
);
}
/** @internal */
export const UpdateProjectTrustedIpsDeploymentType$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectTrustedIpsDeploymentType> = z.nativeEnum(
UpdateProjectTrustedIpsDeploymentType,
);
/** @internal */
export const UpdateProjectTrustedIpsAddresses$inboundSchema: z.ZodType<
UpdateProjectTrustedIpsAddresses,
z.ZodTypeDef,
unknown
> = z.object({
value: types.string(),
note: types.optional(types.string()),
});
export function updateProjectTrustedIpsAddressesFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectTrustedIpsAddresses, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectTrustedIpsAddresses$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectTrustedIpsAddresses' from JSON`,
);
}
/** @internal */
export const UpdateProjectTrustedIpsProtectionMode$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectTrustedIpsProtectionMode> = z.nativeEnum(
UpdateProjectTrustedIpsProtectionMode,
);
/** @internal */
export const UpdateProjectTrustedIps1$inboundSchema: z.ZodType<
UpdateProjectTrustedIps1,
z.ZodTypeDef,
unknown
> = z.object({
deploymentType: UpdateProjectTrustedIpsDeploymentType$inboundSchema,
addresses: z.array(
z.lazy(() => UpdateProjectTrustedIpsAddresses$inboundSchema),
),
protectionMode: UpdateProjectTrustedIpsProtectionMode$inboundSchema,
});
export function updateProjectTrustedIps1FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectTrustedIps1, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectTrustedIps1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectTrustedIps1' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsTrustedIps$inboundSchema: z.ZodType<
UpdateProjectProjectsTrustedIps,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => UpdateProjectTrustedIps1$inboundSchema),
z.lazy(() => UpdateProjectTrustedIps2$inboundSchema),
]);
export function updateProjectProjectsTrustedIpsFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProjectsTrustedIps, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectProjectsTrustedIps$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProjectsTrustedIps' from JSON`,
);
}
/** @internal */
export const UpdateProjectFromProjectsResponsePreset$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectFromProjectsResponsePreset> = z
.nativeEnum(UpdateProjectFromProjectsResponsePreset);
/** @internal */
export const UpdateProjectFrom2$inboundSchema: z.ZodType<
UpdateProjectFrom2,
z.ZodTypeDef,
unknown
> = z.object({
slugs: types.optional(z.array(types.string())),
preset: UpdateProjectFromProjectsResponsePreset$inboundSchema,
});
export function updateProjectFrom2FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectFrom2, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectFrom2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectFrom2' from JSON`,
);
}
/** @internal */
export const UpdateProjectFromProjectsPreset$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectFromProjectsPreset
> = z.nativeEnum(UpdateProjectFromProjectsPreset);
/** @internal */
export const UpdateProjectFrom1$inboundSchema: z.ZodType<
UpdateProjectFrom1,
z.ZodTypeDef,
unknown
> = z.object({
slugs: z.array(types.string()),
preset: types.optional(UpdateProjectFromProjectsPreset$inboundSchema),
});
export function updateProjectFrom1FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectFrom1, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectFrom1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectFrom1' from JSON`,
);
}
/** @internal */
export const UpdateProjectFrom$inboundSchema: z.ZodType<
UpdateProjectFrom,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => UpdateProjectFrom1$inboundSchema),
z.lazy(() => UpdateProjectFrom2$inboundSchema),
]);
export function updateProjectFromFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectFrom, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectFrom$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectFrom' from JSON`,
);
}
/** @internal */
export const UpdateProjectToProjectsResponse200ApplicationJSONResponseBodyPreset$inboundSchema:
z.ZodNativeEnum<
typeof UpdateProjectToProjectsResponse200ApplicationJSONResponseBodyPreset
> = z.nativeEnum(
UpdateProjectToProjectsResponse200ApplicationJSONResponseBodyPreset,
);
/** @internal */
export const UpdateProjectToProjectsResponse2$inboundSchema: z.ZodType<
UpdateProjectToProjectsResponse2,
z.ZodTypeDef,
unknown
> = z.object({
slugs: types.optional(z.array(types.string())),
preset:
UpdateProjectToProjectsResponse200ApplicationJSONResponseBodyPreset$inboundSchema,
});
export function updateProjectToProjectsResponse2FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectToProjectsResponse2, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectToProjectsResponse2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectToProjectsResponse2' from JSON`,
);
}
/** @internal */
export const UpdateProjectToProjectsResponse200ApplicationJSONPreset$inboundSchema:
z.ZodNativeEnum<
typeof UpdateProjectToProjectsResponse200ApplicationJSONPreset
> = z.nativeEnum(UpdateProjectToProjectsResponse200ApplicationJSONPreset);
/** @internal */
export const UpdateProjectToProjectsResponse1$inboundSchema: z.ZodType<
UpdateProjectToProjectsResponse1,
z.ZodTypeDef,
unknown
> = z.object({
slugs: z.array(types.string()),
preset: types.optional(
UpdateProjectToProjectsResponse200ApplicationJSONPreset$inboundSchema,
),
});
export function updateProjectToProjectsResponse1FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectToProjectsResponse1, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectToProjectsResponse1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectToProjectsResponse1' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsResponseTo$inboundSchema: z.ZodType<
UpdateProjectProjectsResponseTo,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => UpdateProjectToProjectsResponse1$inboundSchema),
z.lazy(() => UpdateProjectToProjectsResponse2$inboundSchema),
]);
export function updateProjectProjectsResponseToFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProjectsResponseTo, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectProjectsResponseTo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProjectsResponseTo' from JSON`,
);
}
/** @internal */
export const UpdateProjectCustomAllow$inboundSchema: z.ZodType<
UpdateProjectCustomAllow,
z.ZodTypeDef,
unknown
> = z.object({
from: smartUnion([
z.lazy(() => UpdateProjectFrom1$inboundSchema),
z.lazy(() => UpdateProjectFrom2$inboundSchema),
]),
to: smartUnion([
z.lazy(() => UpdateProjectToProjectsResponse1$inboundSchema),
z.lazy(() => UpdateProjectToProjectsResponse2$inboundSchema),
]),
});
export function updateProjectCustomAllowFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectCustomAllow, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectCustomAllow$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectCustomAllow' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsProjects$inboundSchema: z.ZodType<
UpdateProjectProjectsProjects,
z.ZodTypeDef,
unknown
> = z.object({
label: types.optional(types.string()),
customAllow: types.optional(
z.array(z.lazy(() => UpdateProjectCustomAllow$inboundSchema)),
),
});
export function updateProjectProjectsProjectsFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProjectsProjects, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectProjectsProjects$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProjectsProjects' from JSON`,
);
}
/** @internal */
export const UpdateProjectToProjectsResponse200Preset$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectToProjectsResponse200Preset> = z
.nativeEnum(UpdateProjectToProjectsResponse200Preset);
/** @internal */
export const UpdateProjectToProjects2$inboundSchema: z.ZodType<
UpdateProjectToProjects2,
z.ZodTypeDef,
unknown
> = z.object({
slugs: types.optional(z.array(types.string())),
preset: UpdateProjectToProjectsResponse200Preset$inboundSchema,
});
export function updateProjectToProjects2FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectToProjects2, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectToProjects2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectToProjects2' from JSON`,
);
}
/** @internal */
export const UpdateProjectToProjectsResponsePreset$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectToProjectsResponsePreset> = z.nativeEnum(
UpdateProjectToProjectsResponsePreset,
);
/** @internal */
export const UpdateProjectToProjects1$inboundSchema: z.ZodType<
UpdateProjectToProjects1,
z.ZodTypeDef,
unknown
> = z.object({
slugs: z.array(types.string()),
preset: types.optional(UpdateProjectToProjectsResponsePreset$inboundSchema),
});
export function updateProjectToProjects1FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectToProjects1, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectToProjects1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectToProjects1' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsTo$inboundSchema: z.ZodType<
UpdateProjectProjectsTo,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => UpdateProjectToProjects1$inboundSchema),
z.lazy(() => UpdateProjectToProjects2$inboundSchema),
]);
export function updateProjectProjectsToFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProjectsTo, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectProjectsTo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProjectsTo' from JSON`,
);
}
/** @internal */
export const UpdateProjectOidcProviders$inboundSchema: z.ZodType<
UpdateProjectOidcProviders,
z.ZodTypeDef,
unknown
> = z.object({
to: smartUnion([
z.lazy(() => UpdateProjectToProjects1$inboundSchema),
z.lazy(() => UpdateProjectToProjects2$inboundSchema),
]),
label: types.optional(types.string()),
claims: z.record(z.array(types.string())),
});
export function updateProjectOidcProvidersFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectOidcProviders, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectOidcProviders$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectOidcProviders' from JSON`,
);
}
/** @internal */
export const UpdateProjectTrustedSources$inboundSchema: z.ZodType<
UpdateProjectTrustedSources,
z.ZodTypeDef,
unknown
> = z.object({
projects: types.optional(
z.record(z.lazy(() => UpdateProjectProjectsProjects$inboundSchema)),
),
oidcProviders: types.optional(
z.record(z.array(z.lazy(() => UpdateProjectOidcProviders$inboundSchema))),
),
});
export function updateProjectTrustedSourcesFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectTrustedSources, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectTrustedSources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectTrustedSources' from JSON`,
);
}
/** @internal */
export const UpdateProjectGitComments$inboundSchema: z.ZodType<
UpdateProjectGitComments,
z.ZodTypeDef,
unknown
> = z.object({
onPullRequest: types.boolean(),
onCommit: types.boolean(),
});
export function updateProjectGitCommentsFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectGitComments, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectGitComments$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectGitComments' from JSON`,
);
}
/** @internal */
export const UpdateProjectCreateDeployments$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectCreateDeployments
> = z.nativeEnum(UpdateProjectCreateDeployments);
/** @internal */
export const UpdateProjectConsolidatedGitCommitStatus$inboundSchema: z.ZodType<
UpdateProjectConsolidatedGitCommitStatus,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
propagateFailures: types.boolean(),
});
export function updateProjectConsolidatedGitCommitStatusFromJSON(
jsonString: string,
): SafeParseResult<
UpdateProjectConsolidatedGitCommitStatus,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UpdateProjectConsolidatedGitCommitStatus$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'UpdateProjectConsolidatedGitCommitStatus' from JSON`,
);
}
/** @internal */
export const UpdateProjectGitProviderOptions$inboundSchema: z.ZodType<
UpdateProjectGitProviderOptions,
z.ZodTypeDef,
unknown
> = z.object({
createDeployments: UpdateProjectCreateDeployments$inboundSchema,
disableRepositoryDispatchEvents: types.optional(types.boolean()),
requireVerifiedCommits: types.optional(types.boolean()),
gitCommitStatus: types.optional(types.boolean()),
consolidatedGitCommitStatus: types.optional(
z.lazy(() => UpdateProjectConsolidatedGitCommitStatus$inboundSchema),
),
});
export function updateProjectGitProviderOptionsFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectGitProviderOptions, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectGitProviderOptions$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectGitProviderOptions' from JSON`,
);
}
/** @internal */
export const UpdateProjectWebAnalytics$inboundSchema: z.ZodType<
UpdateProjectWebAnalytics,
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 updateProjectWebAnalyticsFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectWebAnalytics, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectWebAnalytics$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectWebAnalytics' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction$inboundSchema:
z.ZodNativeEnum<
typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction
> = z.nativeEnum(
UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction,
);
/** @internal */
export const UpdateProjectVercelRuleset$inboundSchema: z.ZodType<
UpdateProjectVercelRuleset,
z.ZodTypeDef,
unknown
> = z.object({
active: types.boolean(),
action: types.optional(
UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction$inboundSchema,
),
});
export function updateProjectVercelRulesetFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectVercelRuleset, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectVercelRuleset$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectVercelRuleset' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction$inboundSchema:
z.ZodNativeEnum<
typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction
> = z.nativeEnum(
UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction,
);
/** @internal */
export const UpdateProjectTrafficSources$inboundSchema: z.ZodType<
UpdateProjectTrafficSources,
z.ZodTypeDef,
unknown
> = z.object({
active: types.boolean(),
action: types.optional(
UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction$inboundSchema,
),
});
export function updateProjectTrafficSourcesFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectTrafficSources, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectTrafficSources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectTrafficSources' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesBotFilterAction$inboundSchema:
z.ZodNativeEnum<
typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesBotFilterAction
> = z.nativeEnum(
UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesBotFilterAction,
);
/** @internal */
export const UpdateProjectBotFilter$inboundSchema: z.ZodType<
UpdateProjectBotFilter,
z.ZodTypeDef,
unknown
> = z.object({
active: types.boolean(),
action: types.optional(
UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesBotFilterAction$inboundSchema,
),
});
export function updateProjectBotFilterFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectBotFilter, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectBotFilter$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectBotFilter' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsResponse200ApplicationJSONAction$inboundSchema:
z.ZodNativeEnum<
typeof UpdateProjectProjectsResponse200ApplicationJSONAction
> = z.nativeEnum(UpdateProjectProjectsResponse200ApplicationJSONAction);
/** @internal */
export const UpdateProjectAiBots$inboundSchema: z.ZodType<
UpdateProjectAiBots,
z.ZodTypeDef,
unknown
> = z.object({
active: types.boolean(),
action: types.optional(
UpdateProjectProjectsResponse200ApplicationJSONAction$inboundSchema,
),
});
export function updateProjectAiBotsFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectAiBots, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectAiBots$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectAiBots' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAction$inboundSchema:
z.ZodNativeEnum<
typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAction
> = z.nativeEnum(
UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAction,
);
/** @internal */
export const UpdateProjectOwasp$inboundSchema: z.ZodType<
UpdateProjectOwasp,
z.ZodTypeDef,
unknown
> = z.object({
active: types.boolean(),
action: types.optional(
UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAction$inboundSchema,
),
});
export function updateProjectOwaspFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectOwasp, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectOwasp$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectOwasp' from JSON`,
);
}
/** @internal */
export const UpdateProjectManagedRules$inboundSchema: z.ZodType<
UpdateProjectManagedRules,
z.ZodTypeDef,
unknown
> = z.object({
vercel_ruleset: z.lazy(() => UpdateProjectVercelRuleset$inboundSchema),
traffic_sources: z.lazy(() => UpdateProjectTrafficSources$inboundSchema),
bot_filter: z.lazy(() => UpdateProjectBotFilter$inboundSchema),
ai_bots: z.lazy(() => UpdateProjectAiBots$inboundSchema),
owasp: z.lazy(() => UpdateProjectOwasp$inboundSchema),
}).transform((v) => {
return remap$(v, {
"vercel_ruleset": "vercelRuleset",
"traffic_sources": "trafficSources",
"bot_filter": "botFilter",
"ai_bots": "aiBots",
});
});
export function updateProjectManagedRulesFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectManagedRules, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectManagedRules$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectManagedRules' from JSON`,
);
}
/** @internal */
export const UpdateProjectLogHeaders2$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectLogHeaders2
> = z.nativeEnum(UpdateProjectLogHeaders2);
/** @internal */
export const UpdateProjectLogHeaders$inboundSchema: z.ZodType<
UpdateProjectLogHeaders,
z.ZodTypeDef,
unknown
> = smartUnion([
z.array(types.string()),
UpdateProjectLogHeaders2$inboundSchema,
]);
export function updateProjectLogHeadersFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectLogHeaders, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectLogHeaders$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectLogHeaders' from JSON`,
);
}
/** @internal */
export const UpdateProjectSecurityPlusMetadata$inboundSchema: z.ZodType<
UpdateProjectSecurityPlusMetadata,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
firstEnabledAt: types.optional(types.number()),
});
export function updateProjectSecurityPlusMetadataFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectSecurityPlusMetadata, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectSecurityPlusMetadata$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectSecurityPlusMetadata' from JSON`,
);
}
/** @internal */
export const UpdateProjectSecurity$inboundSchema: z.ZodType<
UpdateProjectSecurity,
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()),
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(() => UpdateProjectManagedRules$inboundSchema),
).optional(),
botIdEnabled: types.optional(types.boolean()),
log_headers: types.optional(
smartUnion([
z.array(types.string()),
UpdateProjectLogHeaders2$inboundSchema,
]),
),
securityPlus: types.optional(types.boolean()),
securityPlusMetadata: types.optional(
z.lazy(() => UpdateProjectSecurityPlusMetadata$inboundSchema),
),
pageIntegrityEnabled: types.optional(types.boolean()),
}).transform((v) => {
return remap$(v, {
"log_headers": "logHeaders",
});
});
export function updateProjectSecurityFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectSecurity, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectSecurity$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectSecurity' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsIssuerMode$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectProjectsIssuerMode
> = z.nativeEnum(UpdateProjectProjectsIssuerMode);
/** @internal */
export const UpdateProjectProjectsOidcTokenConfig$inboundSchema: z.ZodType<
UpdateProjectProjectsOidcTokenConfig,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.optional(types.boolean()),
issuerMode: types.optional(UpdateProjectProjectsIssuerMode$inboundSchema),
});
export function updateProjectProjectsOidcTokenConfigFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProjectsOidcTokenConfig, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UpdateProjectProjectsOidcTokenConfig$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProjectsOidcTokenConfig' from JSON`,
);
}
/** @internal */
export const UpdateProjectSourcesProjects2$inboundSchema: z.ZodType<
UpdateProjectSourcesProjects2,
z.ZodTypeDef,
unknown
> = z.object({
provider: types.literal("gitlab"),
namespace: types.string(),
project: types.optional(types.string()),
});
export function updateProjectSourcesProjects2FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectSourcesProjects2, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectSourcesProjects2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectSourcesProjects2' from JSON`,
);
}
/** @internal */
export const UpdateProjectSourcesProjectsResponse200Provider$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectSourcesProjectsResponse200Provider> = z
.nativeEnum(UpdateProjectSourcesProjectsResponse200Provider);
/** @internal */
export const UpdateProjectSourcesProjects1$inboundSchema: z.ZodType<
UpdateProjectSourcesProjects1,
z.ZodTypeDef,
unknown
> = z.object({
provider: UpdateProjectSourcesProjectsResponse200Provider$inboundSchema,
org: types.string(),
repo: types.optional(types.string()),
});
export function updateProjectSourcesProjects1FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectSourcesProjects1, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectSourcesProjects1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectSourcesProjects1' from JSON`,
);
}
/** @internal */
export const UpdateProjectSources$inboundSchema: z.ZodType<
UpdateProjectSources,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => UpdateProjectSourcesProjects1$inboundSchema).and(
z.object({ provider: z.literal("bitbucket") }),
),
z.lazy(() => UpdateProjectSourcesProjects1$inboundSchema).and(
z.object({ provider: z.literal("github") }),
),
z.lazy(() => UpdateProjectSourcesProjects2$inboundSchema),
]);
export function updateProjectSourcesFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectSources, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectSources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectSources' from JSON`,
);
}
/** @internal */
export const UpdateProjectEnvironmentsProjectsResponse2002$inboundSchema:
z.ZodType<
UpdateProjectEnvironmentsProjectsResponse2002,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("custom"),
environmentId: types.string(),
});
export function updateProjectEnvironmentsProjectsResponse2002FromJSON(
jsonString: string,
): SafeParseResult<
UpdateProjectEnvironmentsProjectsResponse2002,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UpdateProjectEnvironmentsProjectsResponse2002$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'UpdateProjectEnvironmentsProjectsResponse2002' from JSON`,
);
}
/** @internal */
export const UpdateProjectEnvironmentsProjectsResponse200Target$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectEnvironmentsProjectsResponse200Target> = z
.nativeEnum(UpdateProjectEnvironmentsProjectsResponse200Target);
/** @internal */
export const UpdateProjectEnvironmentsProjectsResponse2001$inboundSchema:
z.ZodType<
UpdateProjectEnvironmentsProjectsResponse2001,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("system"),
target: UpdateProjectEnvironmentsProjectsResponse200Target$inboundSchema,
});
export function updateProjectEnvironmentsProjectsResponse2001FromJSON(
jsonString: string,
): SafeParseResult<
UpdateProjectEnvironmentsProjectsResponse2001,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UpdateProjectEnvironmentsProjectsResponse2001$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'UpdateProjectEnvironmentsProjectsResponse2001' from JSON`,
);
}
/** @internal */
export const UpdateProjectEnvironments$inboundSchema: z.ZodType<
UpdateProjectEnvironments,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => UpdateProjectEnvironmentsProjectsResponse2001$inboundSchema),
z.lazy(() => UpdateProjectEnvironmentsProjectsResponse2002$inboundSchema),
]);
export function updateProjectEnvironmentsFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectEnvironments, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectEnvironments$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectEnvironments' from JSON`,
);
}
/** @internal */
export const UpdateProjectGitSources$inboundSchema: z.ZodType<
UpdateProjectGitSources,
z.ZodTypeDef,
unknown
> = z.object({
sources: z.array(
z.union([
z.lazy(() => UpdateProjectSourcesProjects1$inboundSchema).and(
z.object({ provider: z.literal("bitbucket") }),
),
z.lazy(() => UpdateProjectSourcesProjects1$inboundSchema).and(
z.object({ provider: z.literal("github") }),
),
z.lazy(() => UpdateProjectSourcesProjects2$inboundSchema),
]),
),
enabled: types.boolean(),
environments: z.array(
z.union([
z.lazy(() => UpdateProjectEnvironmentsProjectsResponse2001$inboundSchema),
z.lazy(() => UpdateProjectEnvironmentsProjectsResponse2002$inboundSchema),
]),
),
});
export function updateProjectGitSourcesFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectGitSources, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectGitSources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectGitSources' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsSources$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectProjectsSources
> = z.nativeEnum(UpdateProjectProjectsSources);
/** @internal */
export const UpdateProjectEnvironmentsProjectsResponse2$inboundSchema:
z.ZodType<UpdateProjectEnvironmentsProjectsResponse2, z.ZodTypeDef, unknown> =
z.object({
type: types.literal("custom"),
environmentId: types.string(),
});
export function updateProjectEnvironmentsProjectsResponse2FromJSON(
jsonString: string,
): SafeParseResult<
UpdateProjectEnvironmentsProjectsResponse2,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UpdateProjectEnvironmentsProjectsResponse2$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'UpdateProjectEnvironmentsProjectsResponse2' from JSON`,
);
}
/** @internal */
export const UpdateProjectEnvironmentsProjectsResponseTarget$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectEnvironmentsProjectsResponseTarget> = z
.nativeEnum(UpdateProjectEnvironmentsProjectsResponseTarget);
/** @internal */
export const UpdateProjectEnvironmentsProjectsResponse1$inboundSchema:
z.ZodType<UpdateProjectEnvironmentsProjectsResponse1, z.ZodTypeDef, unknown> =
z.object({
type: types.literal("system"),
target: UpdateProjectEnvironmentsProjectsResponseTarget$inboundSchema,
});
export function updateProjectEnvironmentsProjectsResponse1FromJSON(
jsonString: string,
): SafeParseResult<
UpdateProjectEnvironmentsProjectsResponse1,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UpdateProjectEnvironmentsProjectsResponse1$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'UpdateProjectEnvironmentsProjectsResponse1' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsEnvironments$inboundSchema: z.ZodType<
UpdateProjectProjectsEnvironments,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => UpdateProjectEnvironmentsProjectsResponse1$inboundSchema),
z.lazy(() => UpdateProjectEnvironmentsProjectsResponse2$inboundSchema),
]);
export function updateProjectProjectsEnvironmentsFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProjectsEnvironments, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectProjectsEnvironments$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProjectsEnvironments' from JSON`,
);
}
/** @internal */
export const UpdateProjectDeploymentSources$inboundSchema: z.ZodType<
UpdateProjectDeploymentSources,
z.ZodTypeDef,
unknown
> = z.object({
sources: z.array(UpdateProjectProjectsSources$inboundSchema),
enabled: types.boolean(),
environments: z.array(
z.union([
z.lazy(() => UpdateProjectEnvironmentsProjectsResponse1$inboundSchema),
z.lazy(() => UpdateProjectEnvironmentsProjectsResponse2$inboundSchema),
]),
),
});
export function updateProjectDeploymentSourcesFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectDeploymentSources, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectDeploymentSources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectDeploymentSources' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsDeploymentPolicy$inboundSchema: z.ZodType<
UpdateProjectProjectsDeploymentPolicy,
z.ZodTypeDef,
unknown
> = z.object({
gitSources: z.nullable(
z.array(z.lazy(() => UpdateProjectGitSources$inboundSchema)),
).optional(),
deploymentSources: z.nullable(
z.array(z.lazy(() => UpdateProjectDeploymentSources$inboundSchema)),
).optional(),
});
export function updateProjectProjectsDeploymentPolicyFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectProjectsDeploymentPolicy, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UpdateProjectProjectsDeploymentPolicy$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectProjectsDeploymentPolicy' from JSON`,
);
}
/** @internal */
export const UpdateProjectFlatRateTier$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectFlatRateTier
> = z.nativeEnum(UpdateProjectFlatRateTier);
/** @internal */
export const UpdateProjectKind$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectKind
> = z.nativeEnum(UpdateProjectKind);
/** @internal */
export const UpdateProjectUsageStatus$inboundSchema: z.ZodType<
UpdateProjectUsageStatus,
z.ZodTypeDef,
unknown
> = z.object({
kind: UpdateProjectKind$inboundSchema,
exceededAllowanceUntil: types.optional(types.number()),
bypassThrottleUntil: types.optional(types.number()),
throttled: types.optional(types.boolean()),
});
export function updateProjectUsageStatusFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectUsageStatus, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectUsageStatus$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectUsageStatus' from JSON`,
);
}
/** @internal */
export const UpdateProjectFeatures$inboundSchema: z.ZodType<
UpdateProjectFeatures,
z.ZodTypeDef,
unknown
> = z.object({
webAnalytics: types.optional(types.boolean()),
});
export function updateProjectFeaturesFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectFeatures, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectFeatures$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectFeatures' from JSON`,
);
}
/** @internal */
export const UpdateProjectHistory$inboundSchema: z.ZodType<
UpdateProjectHistory,
z.ZodTypeDef,
unknown
> = z.object({
scanner: types.string(),
reason: types.string(),
by: types.string(),
byId: types.string(),
at: types.number(),
});
export function updateProjectHistoryFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectHistory, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectHistory$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectHistory' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsResponse200Action$inboundSchema:
z.ZodNativeEnum<typeof UpdateProjectProjectsResponse200Action> = z.nativeEnum(
UpdateProjectProjectsResponse200Action,
);
/** @internal */
export const UpdateProjectBlock$inboundSchema: z.ZodType<
UpdateProjectBlock,
z.ZodTypeDef,
unknown
> = z.object({
action: UpdateProjectProjectsResponse200Action$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 updateProjectBlockFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectBlock, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectBlock$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectBlock' from JSON`,
);
}
/** @internal */
export const UpdateProjectHasProjectsResponse200Value$inboundSchema: z.ZodType<
UpdateProjectHasProjectsResponse200Value,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.string(),
});
export function updateProjectHasProjectsResponse200ValueFromJSON(
jsonString: string,
): SafeParseResult<
UpdateProjectHasProjectsResponse200Value,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UpdateProjectHasProjectsResponse200Value$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'UpdateProjectHasProjectsResponse200Value' from JSON`,
);
}
/** @internal */
export const UpdateProjectHasProjects2$inboundSchema: z.ZodType<
UpdateProjectHasProjects2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("host"),
value: z.lazy(() => UpdateProjectHasProjectsResponse200Value$inboundSchema),
});
export function updateProjectHasProjects2FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectHasProjects2, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectHasProjects2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectHasProjects2' from JSON`,
);
}
/** @internal */
export const UpdateProjectHasProjectsKey$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectHasProjectsKey
> = z.nativeEnum(UpdateProjectHasProjectsKey);
/** @internal */
export const UpdateProjectHasProjectsResponseValue$inboundSchema: z.ZodType<
UpdateProjectHasProjectsResponseValue,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.string(),
});
export function updateProjectHasProjectsResponseValueFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectHasProjectsResponseValue, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UpdateProjectHasProjectsResponseValue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectHasProjectsResponseValue' from JSON`,
);
}
/** @internal */
export const UpdateProjectHasProjects1$inboundSchema: z.ZodType<
UpdateProjectHasProjects1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("header"),
key: UpdateProjectHasProjectsKey$inboundSchema,
value: z.lazy(() => UpdateProjectHasProjectsResponseValue$inboundSchema),
});
export function updateProjectHasProjects1FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectHasProjects1, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectHasProjects1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectHasProjects1' from JSON`,
);
}
/** @internal */
export const UpdateProjectRouteProjectsHas$inboundSchema: z.ZodType<
UpdateProjectRouteProjectsHas,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => UpdateProjectHasProjects1$inboundSchema),
z.lazy(() => UpdateProjectHasProjects2$inboundSchema),
]);
export function updateProjectRouteProjectsHasFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectRouteProjectsHas, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectRouteProjectsHas$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectRouteProjectsHas' from JSON`,
);
}
/** @internal */
export const UpdateProjectRouteProjectsAction$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectRouteProjectsAction
> = z.nativeEnum(UpdateProjectRouteProjectsAction);
/** @internal */
export const UpdateProjectRouteProjectsMitigate$inboundSchema: z.ZodType<
UpdateProjectRouteProjectsMitigate,
z.ZodTypeDef,
unknown
> = z.object({
action: UpdateProjectRouteProjectsAction$inboundSchema,
});
export function updateProjectRouteProjectsMitigateFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectRouteProjectsMitigate, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UpdateProjectRouteProjectsMitigate$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectRouteProjectsMitigate' from JSON`,
);
}
/** @internal */
export const UpdateProjectRouteProjects2$inboundSchema: z.ZodType<
UpdateProjectRouteProjects2,
z.ZodTypeDef,
unknown
> = z.object({
has: z.array(
z.union([
z.lazy(() => UpdateProjectHasProjects1$inboundSchema),
z.lazy(() => UpdateProjectHasProjects2$inboundSchema),
]),
),
mitigate: z.lazy(() => UpdateProjectRouteProjectsMitigate$inboundSchema),
src: types.optional(types.string()),
});
export function updateProjectRouteProjects2FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectRouteProjects2, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectRouteProjects2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectRouteProjects2' from JSON`,
);
}
/** @internal */
export const UpdateProjectRouteProjects1$inboundSchema: z.ZodType<
UpdateProjectRouteProjects1,
z.ZodTypeDef,
unknown
> = z.object({
src: types.string(),
status: types.number(),
});
export function updateProjectRouteProjects1FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectRouteProjects1, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectRouteProjects1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectRouteProjects1' from JSON`,
);
}
/** @internal */
export const UpdateProjectBlockHistoryProjectsRoute$inboundSchema: z.ZodType<
UpdateProjectBlockHistoryProjectsRoute,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => UpdateProjectRouteProjects1$inboundSchema),
z.lazy(() => UpdateProjectRouteProjects2$inboundSchema),
]);
export function updateProjectBlockHistoryProjectsRouteFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectBlockHistoryProjectsRoute, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UpdateProjectBlockHistoryProjectsRoute$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectBlockHistoryProjectsRoute' from JSON`,
);
}
/** @internal */
export const UpdateProjectBlockHistory4$inboundSchema: z.ZodType<
UpdateProjectBlockHistory4,
z.ZodTypeDef,
unknown
> = z.object({
action: types.literal("route-unblocked"),
route: smartUnion([
z.lazy(() => UpdateProjectRouteProjects1$inboundSchema),
z.lazy(() => UpdateProjectRouteProjects2$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 updateProjectBlockHistory4FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectBlockHistory4, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectBlockHistory4$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectBlockHistory4' from JSON`,
);
}
/** @internal */
export const UpdateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue$inboundSchema:
z.ZodType<
UpdateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.string(),
});
export function updateProjectHasProjectsResponse200ApplicationJSONResponseBodyValueFromJSON(
jsonString: string,
): SafeParseResult<
UpdateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UpdateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue' from JSON`,
);
}
/** @internal */
export const UpdateProjectHasProjectsResponse2$inboundSchema: z.ZodType<
UpdateProjectHasProjectsResponse2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("host"),
value: z.lazy(() =>
UpdateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue$inboundSchema
),
});
export function updateProjectHasProjectsResponse2FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectHasProjectsResponse2, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectHasProjectsResponse2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectHasProjectsResponse2' from JSON`,
);
}
/** @internal */
export const UpdateProjectHasProjectsResponseKey$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectHasProjectsResponseKey
> = z.nativeEnum(UpdateProjectHasProjectsResponseKey);
/** @internal */
export const UpdateProjectHasProjectsResponse200ApplicationJSONValue$inboundSchema:
z.ZodType<
UpdateProjectHasProjectsResponse200ApplicationJSONValue,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.string(),
});
export function updateProjectHasProjectsResponse200ApplicationJSONValueFromJSON(
jsonString: string,
): SafeParseResult<
UpdateProjectHasProjectsResponse200ApplicationJSONValue,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UpdateProjectHasProjectsResponse200ApplicationJSONValue$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectHasProjectsResponse200ApplicationJSONValue' from JSON`,
);
}
/** @internal */
export const UpdateProjectHasProjectsResponse1$inboundSchema: z.ZodType<
UpdateProjectHasProjectsResponse1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("header"),
key: UpdateProjectHasProjectsResponseKey$inboundSchema,
value: z.lazy(() =>
UpdateProjectHasProjectsResponse200ApplicationJSONValue$inboundSchema
),
});
export function updateProjectHasProjectsResponse1FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectHasProjectsResponse1, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectHasProjectsResponse1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectHasProjectsResponse1' from JSON`,
);
}
/** @internal */
export const UpdateProjectRouteHas$inboundSchema: z.ZodType<
UpdateProjectRouteHas,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => UpdateProjectHasProjectsResponse1$inboundSchema),
z.lazy(() => UpdateProjectHasProjectsResponse2$inboundSchema),
]);
export function updateProjectRouteHasFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectRouteHas, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectRouteHas$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectRouteHas' from JSON`,
);
}
/** @internal */
export const UpdateProjectRouteAction$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectRouteAction
> = z.nativeEnum(UpdateProjectRouteAction);
/** @internal */
export const UpdateProjectRouteMitigate$inboundSchema: z.ZodType<
UpdateProjectRouteMitigate,
z.ZodTypeDef,
unknown
> = z.object({
action: UpdateProjectRouteAction$inboundSchema,
});
export function updateProjectRouteMitigateFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectRouteMitigate, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectRouteMitigate$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectRouteMitigate' from JSON`,
);
}
/** @internal */
export const UpdateProjectRoute2$inboundSchema: z.ZodType<
UpdateProjectRoute2,
z.ZodTypeDef,
unknown
> = z.object({
has: z.array(
z.union([
z.lazy(() => UpdateProjectHasProjectsResponse1$inboundSchema),
z.lazy(() => UpdateProjectHasProjectsResponse2$inboundSchema),
]),
),
mitigate: z.lazy(() => UpdateProjectRouteMitigate$inboundSchema),
src: types.optional(types.string()),
});
export function updateProjectRoute2FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectRoute2, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectRoute2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectRoute2' from JSON`,
);
}
/** @internal */
export const UpdateProjectRoute1$inboundSchema: z.ZodType<
UpdateProjectRoute1,
z.ZodTypeDef,
unknown
> = z.object({
src: types.string(),
status: types.number(),
});
export function updateProjectRoute1FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectRoute1, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectRoute1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectRoute1' from JSON`,
);
}
/** @internal */
export const UpdateProjectBlockHistoryRoute$inboundSchema: z.ZodType<
UpdateProjectBlockHistoryRoute,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => UpdateProjectRoute1$inboundSchema),
z.lazy(() => UpdateProjectRoute2$inboundSchema),
]);
export function updateProjectBlockHistoryRouteFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectBlockHistoryRoute, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectBlockHistoryRoute$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectBlockHistoryRoute' from JSON`,
);
}
/** @internal */
export const UpdateProjectBlockHistory3$inboundSchema: z.ZodType<
UpdateProjectBlockHistory3,
z.ZodTypeDef,
unknown
> = z.object({
action: types.literal("route-blocked"),
route: smartUnion([
z.lazy(() => UpdateProjectRoute1$inboundSchema),
z.lazy(() => UpdateProjectRoute2$inboundSchema),
]),
reason: types.string(),
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 updateProjectBlockHistory3FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectBlockHistory3, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectBlockHistory3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectBlockHistory3' from JSON`,
);
}
/** @internal */
export const UpdateProjectBlockHistory2$inboundSchema: z.ZodType<
UpdateProjectBlockHistory2,
z.ZodTypeDef,
unknown
> = z.object({
action: types.literal("unblocked"),
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 updateProjectBlockHistory2FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectBlockHistory2, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectBlockHistory2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectBlockHistory2' from JSON`,
);
}
/** @internal */
export const UpdateProjectBlockHistory1$inboundSchema: z.ZodType<
UpdateProjectBlockHistory1,
z.ZodTypeDef,
unknown
> = z.object({
action: types.literal("blocked"),
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 updateProjectBlockHistory1FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectBlockHistory1, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectBlockHistory1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectBlockHistory1' from JSON`,
);
}
/** @internal */
export const UpdateProjectBlockHistory$inboundSchema: z.ZodType<
UpdateProjectBlockHistory,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => UpdateProjectBlockHistory1$inboundSchema),
z.lazy(() => UpdateProjectBlockHistory2$inboundSchema),
z.lazy(() => UpdateProjectBlockHistory3$inboundSchema),
z.lazy(() => UpdateProjectBlockHistory4$inboundSchema),
]);
export function updateProjectBlockHistoryFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectBlockHistory, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectBlockHistory$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectBlockHistory' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsResponseAction$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectProjectsResponseAction
> = z.nativeEnum(UpdateProjectProjectsResponseAction);
/** @internal */
export const UpdateProjectInterstitialHistory$inboundSchema: z.ZodType<
UpdateProjectInterstitialHistory,
z.ZodTypeDef,
unknown
> = z.object({
action: UpdateProjectProjectsResponseAction$inboundSchema,
createdAt: types.number(),
caseId: types.optional(types.string()),
reason: types.optional(types.string()),
actor: types.optional(types.string()),
comment: types.optional(types.string()),
});
export function updateProjectInterstitialHistoryFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectInterstitialHistory, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectInterstitialHistory$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectInterstitialHistory' from JSON`,
);
}
/** @internal */
export const UpdateProjectAbuse$inboundSchema: z.ZodType<
UpdateProjectAbuse,
z.ZodTypeDef,
unknown
> = z.object({
scanner: types.optional(types.string()),
history: z.array(z.lazy(() => UpdateProjectHistory$inboundSchema)),
updatedAt: types.number(),
block: types.optional(z.lazy(() => UpdateProjectBlock$inboundSchema)),
blockHistory: types.optional(
z.array(z.union([
z.lazy(() => UpdateProjectBlockHistory1$inboundSchema),
z.lazy(() =>
UpdateProjectBlockHistory2$inboundSchema
),
z.lazy(() => UpdateProjectBlockHistory3$inboundSchema),
z.lazy(() => UpdateProjectBlockHistory4$inboundSchema),
])),
),
interstitial: types.optional(types.boolean()),
interstitialHistory: types.optional(
z.array(z.lazy(() => UpdateProjectInterstitialHistory$inboundSchema)),
),
});
export function updateProjectAbuseFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectAbuse, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectAbuse$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectAbuse' from JSON`,
);
}
/** @internal */
export const UpdateProjectHasProjectsValue$inboundSchema: z.ZodType<
UpdateProjectHasProjectsValue,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.string(),
});
export function updateProjectHasProjectsValueFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectHasProjectsValue, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectHasProjectsValue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectHasProjectsValue' from JSON`,
);
}
/** @internal */
export const UpdateProjectHas2$inboundSchema: z.ZodType<
UpdateProjectHas2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("host"),
value: z.lazy(() => UpdateProjectHasProjectsValue$inboundSchema),
});
export function updateProjectHas2FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectHas2, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectHas2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectHas2' from JSON`,
);
}
/** @internal */
export const UpdateProjectHasKey$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectHasKey
> = z.nativeEnum(UpdateProjectHasKey);
/** @internal */
export const UpdateProjectHasValue$inboundSchema: z.ZodType<
UpdateProjectHasValue,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.string(),
});
export function updateProjectHasValueFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectHasValue, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectHasValue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectHasValue' from JSON`,
);
}
/** @internal */
export const UpdateProjectHas1$inboundSchema: z.ZodType<
UpdateProjectHas1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("header"),
key: UpdateProjectHasKey$inboundSchema,
value: z.lazy(() => UpdateProjectHasValue$inboundSchema),
});
export function updateProjectHas1FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectHas1, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectHas1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectHas1' from JSON`,
);
}
/** @internal */
export const UpdateProjectInternalRoutesHas$inboundSchema: z.ZodType<
UpdateProjectInternalRoutesHas,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => UpdateProjectHas1$inboundSchema),
z.lazy(() => UpdateProjectHas2$inboundSchema),
]);
export function updateProjectInternalRoutesHasFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectInternalRoutesHas, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectInternalRoutesHas$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectInternalRoutesHas' from JSON`,
);
}
/** @internal */
export const UpdateProjectInternalRoutesAction$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectInternalRoutesAction
> = z.nativeEnum(UpdateProjectInternalRoutesAction);
/** @internal */
export const UpdateProjectInternalRoutesMitigate$inboundSchema: z.ZodType<
UpdateProjectInternalRoutesMitigate,
z.ZodTypeDef,
unknown
> = z.object({
action: UpdateProjectInternalRoutesAction$inboundSchema,
});
export function updateProjectInternalRoutesMitigateFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectInternalRoutesMitigate, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UpdateProjectInternalRoutesMitigate$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectInternalRoutesMitigate' from JSON`,
);
}
/** @internal */
export const UpdateProjectInternalRoutes2$inboundSchema: z.ZodType<
UpdateProjectInternalRoutes2,
z.ZodTypeDef,
unknown
> = z.object({
has: z.array(
z.union([
z.lazy(() => UpdateProjectHas1$inboundSchema),
z.lazy(() => UpdateProjectHas2$inboundSchema),
]),
),
mitigate: z.lazy(() => UpdateProjectInternalRoutesMitigate$inboundSchema),
src: types.optional(types.string()),
});
export function updateProjectInternalRoutes2FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectInternalRoutes2, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectInternalRoutes2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectInternalRoutes2' from JSON`,
);
}
/** @internal */
export const UpdateProjectInternalRoutes1$inboundSchema: z.ZodType<
UpdateProjectInternalRoutes1,
z.ZodTypeDef,
unknown
> = z.object({
src: types.string(),
status: types.number(),
});
export function updateProjectInternalRoutes1FromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectInternalRoutes1, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectInternalRoutes1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectInternalRoutes1' from JSON`,
);
}
/** @internal */
export const UpdateProjectInternalRoutes$inboundSchema: z.ZodType<
UpdateProjectInternalRoutes,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => UpdateProjectInternalRoutes1$inboundSchema),
z.lazy(() => UpdateProjectInternalRoutes2$inboundSchema),
]);
export function updateProjectInternalRoutesFromJSON(
jsonString: string,
): SafeParseResult<UpdateProjectInternalRoutes, SDKValidationError> {
return safeParse(
jsonString,
(x) => UpdateProjectInternalRoutes$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UpdateProjectInternalRoutes' from JSON`,
);
}
/** @internal */
export const UpdateProjectProjectsAction$inboundSchema: z.ZodNativeEnum<
typeof UpdateProjectProjectsAction
> = z.nativeEnum(UpdateProjectProjectsAction);