@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>
3,077 lines • 96.1 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 {
Analytics,
Analytics$inboundSchema,
CreateProjectConnectConfigurations,
CreateProjectConnectConfigurations$inboundSchema,
CreateProjectCrons,
CreateProjectCrons$inboundSchema,
CreateProjectDataCache,
CreateProjectDataCache$inboundSchema,
CreateProjectEnv,
CreateProjectEnv$inboundSchema,
CreateProjectExpiration,
CreateProjectExpiration$inboundSchema,
CreateProjectFrom,
CreateProjectFrom$inboundSchema,
CreateProjectIpBuckets,
CreateProjectIpBuckets$inboundSchema,
CreateProjectMicrofrontends,
CreateProjectMicrofrontends$inboundSchema,
CreateProjectNodeVersion,
CreateProjectNodeVersion$inboundSchema,
CreateProjectOptionsAllowlist,
CreateProjectOptionsAllowlist$inboundSchema,
CreateProjectPassport,
CreateProjectPassport$inboundSchema,
CreateProjectPasswordProtection,
CreateProjectPasswordProtection$inboundSchema,
CreateProjectPermissions,
CreateProjectPermissions$inboundSchema,
CreateProjectProjectsFramework,
CreateProjectProjectsFramework$inboundSchema,
CreateProjectProjectsResourceConfig,
CreateProjectProjectsResourceConfig$inboundSchema,
CreateProjectProjectsSsoProtection,
CreateProjectProjectsSsoProtection$inboundSchema,
CreateProjectRollbackDescription,
CreateProjectRollbackDescription$inboundSchema,
CreateProjectStaticIps,
CreateProjectStaticIps$inboundSchema,
CreateProjectTargets,
CreateProjectTargets$inboundSchema,
CreateProjectToProjects2,
CreateProjectToProjects2$inboundSchema,
CreateProjectToProjectsResponsePreset,
CreateProjectToProjectsResponsePreset$inboundSchema,
CreateProjectTrustedIps,
CreateProjectTrustedIps$inboundSchema,
CustomEnvironments,
CustomEnvironments$inboundSchema,
DefaultResourceConfig,
DefaultResourceConfig$inboundSchema,
DeploymentExpiration,
DeploymentExpiration$inboundSchema,
Jobs,
Jobs$inboundSchema,
LastAliasRequest,
LastAliasRequest$inboundSchema,
LastRollbackTarget,
LastRollbackTarget$inboundSchema,
LatestDeployments,
LatestDeployments$inboundSchema,
Link,
Link$inboundSchema,
ProtectionBypass,
ProtectionBypass$inboundSchema,
ProtectionConfig,
ProtectionConfig$inboundSchema,
RollingRelease,
RollingRelease$inboundSchema,
Services,
Services$inboundSchema,
SpeedInsights,
SpeedInsights$inboundSchema,
} from "./createprojecttoprojectsresponsepreset.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
/**
* The target envs on the current project that may be accessed.
*/
export type CreateProjectToProjects1 = {
/**
* System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
*/
slugs: Array<string>;
preset?: CreateProjectToProjectsResponsePreset | undefined;
};
export type CreateProjectProjectsTo =
| CreateProjectToProjects1
| CreateProjectToProjects2;
/**
* Optional overrides for the default same-env-by-slug matching. Provide explicit rules to allow cross-env access or presets.
*/
export type CreateProjectCustomAllow = {
from: CreateProjectFrom;
to: CreateProjectToProjects1 | CreateProjectToProjects2;
};
export type CreateProjectProjects = {
label?: string | undefined;
/**
* Optional overrides for the default same-env-by-slug matching. Provide explicit rules to allow cross-env access or presets.
*/
customAllow?: Array<CreateProjectCustomAllow> | undefined;
};
export const CreateProjectToProjectsPreset = {
AllCustom: "all-custom",
} as const;
export type CreateProjectToProjectsPreset = ClosedEnum<
typeof CreateProjectToProjectsPreset
>;
/**
* The target envs on the current project that may be accessed.
*/
export type CreateProjectTo2 = {
/**
* System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
*/
slugs?: Array<string> | undefined;
preset: CreateProjectToProjectsPreset;
};
export const CreateProjectToPreset = {
AllCustom: "all-custom",
} as const;
export type CreateProjectToPreset = ClosedEnum<typeof CreateProjectToPreset>;
/**
* The target envs on the current project that may be accessed.
*/
export type CreateProjectTo1 = {
/**
* System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
*/
slugs: Array<string>;
preset?: CreateProjectToPreset | undefined;
};
export type CreateProjectTo = CreateProjectTo1 | CreateProjectTo2;
export type CreateProjectOidcProviders = {
to: CreateProjectTo1 | CreateProjectTo2;
label?: string | undefined;
claims: { [k: string]: Array<string> };
};
export type CreateProjectTrustedSources = {
projects?: { [k: string]: CreateProjectProjects } | undefined;
oidcProviders?:
| { [k: string]: Array<CreateProjectOidcProviders> }
| undefined;
};
export type CreateProjectGitComments = {
/**
* Whether the Vercel bot should comment on PRs
*/
onPullRequest: boolean;
/**
* Whether the Vercel bot should comment on commits
*/
onCommit: boolean;
};
/**
* Whether the Vercel bot should automatically create GitHub deployments https://docs.github.com/en/rest/deployments/deployments#about-deployments NOTE: repository-dispatch events should be used instead
*/
export const CreateProjectCreateDeployments = {
Disabled: "disabled",
Enabled: "enabled",
} as const;
/**
* Whether the Vercel bot should automatically create GitHub deployments https://docs.github.com/en/rest/deployments/deployments#about-deployments NOTE: repository-dispatch events should be used instead
*/
export type CreateProjectCreateDeployments = ClosedEnum<
typeof CreateProjectCreateDeployments
>;
/**
* Configuration for consolidated git commit status reporting. When enabled, Vercel will post a single consolidated commit status instead of individual statuses for each deployment.
*/
export type CreateProjectConsolidatedGitCommitStatus = {
/**
* Whether consolidated commit status is enabled.
*/
enabled: boolean;
/**
* Whether to propagate individual deployment failures to the consolidated status.
*/
propagateFailures: boolean;
};
export type GitProviderOptions = {
/**
* Whether the Vercel bot should automatically create GitHub deployments https://docs.github.com/en/rest/deployments/deployments#about-deployments NOTE: repository-dispatch events should be used instead
*/
createDeployments: CreateProjectCreateDeployments;
/**
* Whether the Vercel bot should not automatically create GitHub repository-dispatch events on deployment events. https://vercel.com/docs/git/vercel-for-github#repository-dispatch-events - `true`: disable repository-dispatch events for this project (explicit override of the team setting). - `false`: enable repository-dispatch events for this project (explicit override of the team setting). - absent: inherit from `team.disableRepositoryDispatchEvents`.
*/
disableRepositoryDispatchEvents?: boolean | undefined;
/**
* Whether the project requires commits to be signed & verified before deployments will be created. - `true`: require verified commits for this project (explicit override of the team setting). - `false`: do not require verified commits (explicit override of the team setting). - absent: inherit from `team.requireVerifiedCommits`.
*/
requireVerifiedCommits?: boolean | undefined;
/**
* Whether Vercel should post commit statuses for this project. When omitted, commit statuses remain enabled.
*/
gitCommitStatus?: boolean | undefined;
/**
* Configuration for consolidated git commit status reporting. When enabled, Vercel will post a single consolidated commit status instead of individual statuses for each deployment.
*/
consolidatedGitCommitStatus?:
| CreateProjectConsolidatedGitCommitStatus
| undefined;
};
export type CreateProjectWebAnalytics = {
id: string;
disabledAt?: number | undefined;
canceledAt?: number | undefined;
enabledAt?: number | undefined;
hasData?: true | undefined;
};
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodyAction =
{
Challenge: "challenge",
Deny: "deny",
Log: "log",
} as const;
export type CreateProjectProjectsResponse200ApplicationJSONResponseBodyAction =
ClosedEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodyAction
>;
export type CreateProjectVercelRuleset = {
active: boolean;
action?:
| CreateProjectProjectsResponse200ApplicationJSONResponseBodyAction
| undefined;
};
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction =
{
Challenge: "challenge",
Deny: "deny",
Log: "log",
} as const;
export type CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction =
ClosedEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction
>;
export type CreateProjectTrafficSources = {
active: boolean;
action?:
| CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction
| undefined;
};
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction =
{
Challenge: "challenge",
Deny: "deny",
Log: "log",
} as const;
export type CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction =
ClosedEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction
>;
export type BotFilter = {
active: boolean;
action?:
| CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction
| undefined;
};
export const CreateProjectProjectsResponse200Action = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
} as const;
export type CreateProjectProjectsResponse200Action = ClosedEnum<
typeof CreateProjectProjectsResponse200Action
>;
export type CreateProjectAiBots = {
active: boolean;
action?: CreateProjectProjectsResponse200Action | undefined;
};
export const CreateProjectProjectsResponse200ApplicationJSONAction = {
Challenge: "challenge",
Deny: "deny",
Log: "log",
} as const;
export type CreateProjectProjectsResponse200ApplicationJSONAction = ClosedEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONAction
>;
export type CreateProjectOwasp = {
active: boolean;
action?: CreateProjectProjectsResponse200ApplicationJSONAction | undefined;
};
export type CreateProjectManagedRules = {
vercelRuleset: CreateProjectVercelRuleset;
trafficSources: CreateProjectTrafficSources;
botFilter: BotFilter;
aiBots: CreateProjectAiBots;
owasp: CreateProjectOwasp;
};
export const CreateProjectLogHeaders2 = {
Wildcard: "*",
} as const;
export type CreateProjectLogHeaders2 = ClosedEnum<
typeof CreateProjectLogHeaders2
>;
export type CreateProjectLogHeaders = Array<string> | CreateProjectLogHeaders2;
export type SecurityPlusMetadata = {
updatedAt: number;
/**
* Timestamp when the feature was first enabled. Never changes after initial enablement.
*/
firstEnabledAt?: number | undefined;
};
export type CreateProjectSecurity = {
attackModeEnabled?: boolean | undefined;
attackModeUpdatedAt?: number | undefined;
firewallEnabled?: boolean | undefined;
firewallUpdatedAt?: number | undefined;
attackModeActiveUntil?: number | null | undefined;
firewallConfigVersion?: number | undefined;
firewallSeawallEnabled?: boolean | undefined;
ja3Enabled?: boolean | undefined;
ja4Enabled?: boolean | undefined;
firewallBypassIps?: Array<string> | undefined;
managedRules?: CreateProjectManagedRules | null | undefined;
botIdEnabled?: boolean | undefined;
logHeaders?: Array<string> | CreateProjectLogHeaders2 | undefined;
securityPlus?: boolean | undefined;
securityPlusMetadata?: SecurityPlusMetadata | undefined;
/**
* Whether Page Integrity is enabled for this project. Used by the metadata service to gate DynamoDB lookups against the page-integrity-inventory table.
*/
pageIntegrityEnabled?: boolean | undefined;
};
/**
* - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com`
*/
export const CreateProjectProjectsIssuerMode = {
Global: "global",
Team: "team",
} as const;
/**
* - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com`
*/
export type CreateProjectProjectsIssuerMode = ClosedEnum<
typeof CreateProjectProjectsIssuerMode
>;
export type CreateProjectOidcTokenConfig = {
/**
* Whether or not to generate OpenID Connect JSON Web Tokens.
*/
enabled?: boolean | undefined;
/**
* - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com`
*/
issuerMode?: CreateProjectProjectsIssuerMode | undefined;
};
/**
* Allowlist entry for GitLab, which uses nested groups rather than a flat org/repo. `namespace` is the full group path (e.g. `group` or `group/subgroup`); `project` is the leaf project name. Omit `project` to match any project under the namespace. Namespace is matched case-insensitively.
*/
export type CreateProjectSources2 = {
provider: "gitlab";
namespace: string;
project?: string | undefined;
};
export const CreateProjectSourcesProjectsProvider = {
Bitbucket: "bitbucket",
Github: "github",
} as const;
export type CreateProjectSourcesProjectsProvider = ClosedEnum<
typeof CreateProjectSourcesProjectsProvider
>;
/**
* Allowlist entry for GitHub and Bitbucket, whose repos are identified by a flat `org`/`repo` (Bitbucket's workspace/owner maps to `org`, its repo slug to `repo`). Omit `repo` to match any repo in the org. Org is matched case-insensitively.
*/
export type CreateProjectSources1 = {
provider: CreateProjectSourcesProjectsProvider;
org: string;
repo?: string | undefined;
};
export type CreateProjectSources =
| (CreateProjectSources1 & { provider: "bitbucket" })
| (CreateProjectSources1 & { provider: "github" })
| CreateProjectSources2;
export type CreateProjectEnvironmentsProjects2 = {
type: "custom";
environmentId: string;
};
export const CreateProjectEnvironmentsProjectsTarget = {
Preview: "preview",
Production: "production",
} as const;
export type CreateProjectEnvironmentsProjectsTarget = ClosedEnum<
typeof CreateProjectEnvironmentsProjectsTarget
>;
export type CreateProjectEnvironmentsProjects1 = {
type: "system";
target: CreateProjectEnvironmentsProjectsTarget;
};
export type CreateProjectEnvironments =
| CreateProjectEnvironmentsProjects1
| CreateProjectEnvironmentsProjects2;
/**
* `enabled: true` with empty `sources` is deny-all.
*/
export type CreateProjectGitSources = {
sources: Array<
| (CreateProjectSources1 & { provider: "bitbucket" })
| (CreateProjectSources1 & { provider: "github" })
| CreateProjectSources2
>;
enabled: boolean;
environments: Array<
CreateProjectEnvironmentsProjects1 | CreateProjectEnvironmentsProjects2
>;
};
/**
* Customer-configurable deployment sources. Every deploy classifies to exactly one. JSON schema in `packages/deployment-policy/schemas/body.ts` enumerates exactly these values. - `'git'` — git provider webhook. - `'cli'` — Vercel CLI (legacy classic-token CLI and SIWV CLI both). - `'rest-api'` — direct user/team-token REST upload. Does NOT cover deploy hooks, Marketplace integrations, or first-party app tokens. - `'deploy-hook'` — project deploy-hook URL. The URL is the credential. - `'integration'` — third-party Marketplace actor: Marketplace integration token, user-delegated OAuth from a Marketplace app, or an unrecognized third-party Vercel App. First-party Vercel Apps are never `'integration'`. - `'v0'` — the v0 product surface (entitlement-gated). v0 deploys through the CLI under the hood, but classifies as its own source so a team can allow or deny v0 independently of `'cli'`. First-party Vercel apps (Toolbar, etc.) classify as `'first-party'` — see `ClassifiedSource` in `./checks`. They're not in this union because they aren't customer-configurable; they bypass `checkDeploymentSources` entirely. v0 is intentionally NOT among them: like the CLI, it's a real product surface and is policy-controllable.
*/
export const CreateProjectProjectsSources = {
Cli: "cli",
DeployHook: "deploy-hook",
Git: "git",
Integration: "integration",
RestApi: "rest-api",
V0: "v0",
} as const;
/**
* Customer-configurable deployment sources. Every deploy classifies to exactly one. JSON schema in `packages/deployment-policy/schemas/body.ts` enumerates exactly these values. - `'git'` — git provider webhook. - `'cli'` — Vercel CLI (legacy classic-token CLI and SIWV CLI both). - `'rest-api'` — direct user/team-token REST upload. Does NOT cover deploy hooks, Marketplace integrations, or first-party app tokens. - `'deploy-hook'` — project deploy-hook URL. The URL is the credential. - `'integration'` — third-party Marketplace actor: Marketplace integration token, user-delegated OAuth from a Marketplace app, or an unrecognized third-party Vercel App. First-party Vercel Apps are never `'integration'`. - `'v0'` — the v0 product surface (entitlement-gated). v0 deploys through the CLI under the hood, but classifies as its own source so a team can allow or deny v0 independently of `'cli'`. First-party Vercel apps (Toolbar, etc.) classify as `'first-party'` — see `ClassifiedSource` in `./checks`. They're not in this union because they aren't customer-configurable; they bypass `checkDeploymentSources` entirely. v0 is intentionally NOT among them: like the CLI, it's a real product surface and is policy-controllable.
*/
export type CreateProjectProjectsSources = ClosedEnum<
typeof CreateProjectProjectsSources
>;
export type CreateProjectEnvironments2 = {
type: "custom";
environmentId: string;
};
export const CreateProjectEnvironmentsTarget = {
Preview: "preview",
Production: "production",
} as const;
export type CreateProjectEnvironmentsTarget = ClosedEnum<
typeof CreateProjectEnvironmentsTarget
>;
export type CreateProjectEnvironments1 = {
type: "system";
target: CreateProjectEnvironmentsTarget;
};
export type CreateProjectProjectsEnvironments =
| CreateProjectEnvironments1
| CreateProjectEnvironments2;
/**
* `enabled: true` with empty `sources` is deny-all.
*/
export type CreateProjectDeploymentSources = {
sources: Array<CreateProjectProjectsSources>;
enabled: boolean;
environments: Array<CreateProjectEnvironments1 | CreateProjectEnvironments2>;
};
/**
* Project shape. `null` on a rule list clears the project's override for that rule type (fall back to team for every env); omitting is equivalent. Setting `deploymentPolicy` itself to `null` clears every override at once. Kept structurally distinct from {@link TeamDeploymentPolicy} so the two storage locations don't share a type by accident.
*/
export type CreateProjectDeploymentPolicy = {
gitSources?: Array<CreateProjectGitSources> | null | undefined;
deploymentSources?: Array<CreateProjectDeploymentSources> | null | undefined;
};
export const FlatRateTier = {
Advanced: "advanced",
Base: "base",
Critical: "critical",
Standard: "standard",
} as const;
export type FlatRateTier = ClosedEnum<typeof FlatRateTier>;
/**
* Billing mode. Always 'flat' for flat-rate projects.
*/
export const CreateProjectKind = {
Flat: "flat",
} as const;
/**
* Billing mode. Always 'flat' for flat-rate projects.
*/
export type CreateProjectKind = ClosedEnum<typeof CreateProjectKind>;
export type UsageStatus = {
/**
* Billing mode. Always 'flat' for flat-rate projects.
*/
kind: CreateProjectKind;
/**
* Timestamp until which the project has exceeded its CDN allowance.
*/
exceededAllowanceUntil?: number | undefined;
/**
* Timestamp until which throttling is bypassed (project pays list rates for overage).
*/
bypassThrottleUntil?: number | undefined;
/**
* Whether the project is currently throttled.
*/
throttled?: boolean | undefined;
};
export type Features = {
webAnalytics?: boolean | undefined;
};
export type CreateProjectHistory = {
scanner: string;
reason: string;
by: string;
byId: string;
at: number;
};
export const CreateProjectProjectsResponseAction = {
Blocked: "blocked",
} as const;
export type CreateProjectProjectsResponseAction = ClosedEnum<
typeof CreateProjectProjectsResponseAction
>;
export type Block = {
action: CreateProjectProjectsResponseAction;
reason: string;
statusCode: number;
createdAt: number;
caseId?: string | undefined;
actor?: string | undefined;
comment?: string | undefined;
ineligibleForAppeal?: boolean | undefined;
isCascading?: boolean | undefined;
};
export type CreateProjectHasProjectsResponse200Value = {
eq: string;
};
export type CreateProjectHasProjects2 = {
type: "host";
value: CreateProjectHasProjectsResponse200Value;
};
export const CreateProjectHasProjectsKey = {
XVercelIpCountry: "x-vercel-ip-country",
} as const;
export type CreateProjectHasProjectsKey = ClosedEnum<
typeof CreateProjectHasProjectsKey
>;
export type CreateProjectHasProjectsResponseValue = {
eq: string;
};
export type CreateProjectHasProjects1 = {
type: "header";
key: CreateProjectHasProjectsKey;
value: CreateProjectHasProjectsResponseValue;
};
export type CreateProjectRouteHas =
| CreateProjectHasProjects1
| CreateProjectHasProjects2;
export const CreateProjectRouteAction = {
BlockLegalCwc: "block_legal_cwc",
} as const;
export type CreateProjectRouteAction = ClosedEnum<
typeof CreateProjectRouteAction
>;
export type CreateProjectRouteMitigate = {
action: CreateProjectRouteAction;
};
export type CreateProjectRoute2 = {
has: Array<CreateProjectHasProjects1 | CreateProjectHasProjects2>;
mitigate: CreateProjectRouteMitigate;
src?: string | undefined;
};
export type CreateProjectRoute1 = {
src: string;
status: number;
};
export type CreateProjectBlockHistoryRoute =
| CreateProjectRoute1
| CreateProjectRoute2;
export type BlockHistory4 = {
action: "route-unblocked";
route: CreateProjectRoute1 | CreateProjectRoute2;
statusCode?: number | undefined;
createdAt: number;
caseId?: string | undefined;
actor?: string | undefined;
comment?: string | undefined;
ineligibleForAppeal?: boolean | undefined;
isCascading?: boolean | undefined;
};
export type CreateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue =
{
eq: string;
};
export type CreateProjectHasProjectsResponse2 = {
type: "host";
value: CreateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue;
};
export const CreateProjectHasKey = {
XVercelIpCountry: "x-vercel-ip-country",
} as const;
export type CreateProjectHasKey = ClosedEnum<typeof CreateProjectHasKey>;
export type CreateProjectHasProjectsResponse200ApplicationJSONValue = {
eq: string;
};
export type CreateProjectHasProjectsResponse1 = {
type: "header";
key: CreateProjectHasKey;
value: CreateProjectHasProjectsResponse200ApplicationJSONValue;
};
export type RouteHas =
| CreateProjectHasProjectsResponse1
| CreateProjectHasProjectsResponse2;
export const RouteAction = {
BlockLegalCwc: "block_legal_cwc",
} as const;
export type RouteAction = ClosedEnum<typeof RouteAction>;
export type RouteMitigate = {
action: RouteAction;
};
export type Route2 = {
has: Array<
CreateProjectHasProjectsResponse1 | CreateProjectHasProjectsResponse2
>;
mitigate: RouteMitigate;
src?: string | undefined;
};
export type Route1 = {
src: string;
status: number;
};
export type BlockHistoryRoute = Route1 | Route2;
export type BlockHistory3 = {
action: "route-blocked";
route: Route1 | Route2;
reason: string;
createdAt: number;
caseId?: string | undefined;
actor?: string | undefined;
comment?: string | undefined;
ineligibleForAppeal?: boolean | undefined;
isCascading?: boolean | undefined;
};
export type BlockHistory2 = {
action: "unblocked";
createdAt: number;
caseId?: string | undefined;
actor?: string | undefined;
comment?: string | undefined;
ineligibleForAppeal?: boolean | undefined;
isCascading?: boolean | undefined;
};
export type BlockHistory1 = {
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 CreateProjectBlockHistory =
| BlockHistory1
| BlockHistory2
| BlockHistory3
| BlockHistory4;
export const CreateProjectProjectsAction = {
AddDeploymentInterstitial: "add-deployment-interstitial",
AddProjectInterstitial: "add-project-interstitial",
RemoveDeploymentInterstitial: "remove-deployment-interstitial",
RemoveProjectInterstitial: "remove-project-interstitial",
} as const;
export type CreateProjectProjectsAction = ClosedEnum<
typeof CreateProjectProjectsAction
>;
export type InterstitialHistory = {
action: CreateProjectProjectsAction;
createdAt: number;
caseId?: string | undefined;
reason?: string | undefined;
actor?: string | undefined;
comment?: string | undefined;
};
export type CreateProjectAbuse = {
scanner?: string | undefined;
history: Array<CreateProjectHistory>;
updatedAt: number;
block?: Block | undefined;
blockHistory?:
| Array<BlockHistory1 | BlockHistory2 | BlockHistory3 | BlockHistory4>
| undefined;
interstitial?: boolean | undefined;
interstitialHistory?: Array<InterstitialHistory> | undefined;
};
export type CreateProjectHasProjectsValue = {
eq: string;
};
export type CreateProjectHas2 = {
type: "host";
value: CreateProjectHasProjectsValue;
};
export const HasKey = {
XVercelIpCountry: "x-vercel-ip-country",
} as const;
export type HasKey = ClosedEnum<typeof HasKey>;
export type CreateProjectHasValue = {
eq: string;
};
export type CreateProjectHas1 = {
type: "header";
key: HasKey;
value: CreateProjectHasValue;
};
export type InternalRoutesHas = CreateProjectHas1 | CreateProjectHas2;
export const InternalRoutesAction = {
BlockLegalCwc: "block_legal_cwc",
} as const;
export type InternalRoutesAction = ClosedEnum<typeof InternalRoutesAction>;
export type InternalRoutesMitigate = {
action: InternalRoutesAction;
};
export type InternalRoutes2 = {
has: Array<CreateProjectHas1 | CreateProjectHas2>;
mitigate: InternalRoutesMitigate;
src?: string | undefined;
};
export type InternalRoutes1 = {
src: string;
status: number;
};
export type InternalRoutes = InternalRoutes1 | InternalRoutes2;
export const CreateProjectAction = {
Accept: "accept",
Cancel: "cancel",
Delete: "delete",
} as const;
export type CreateProjectAction = ClosedEnum<typeof CreateProjectAction>;
export type ValuePreviousValue = string | number | boolean;
export type ValueCurrentValue = string | number | boolean;
export type Value3 = {
previousValue: string | number | boolean;
currentValue: string | number | boolean;
};
export type CreateProjectValue = Value3 | string | number | boolean;
export type CreateProjectDismissedToasts = {
key: string;
dismissedAt: number;
action: CreateProjectAction;
value: Value3 | string | number | boolean | null;
};
export const CreateProjectProjectsEnv = {
Preview: "preview",
Production: "production",
} as const;
export type CreateProjectProjectsEnv = ClosedEnum<
typeof CreateProjectProjectsEnv
>;
export type CreateProjectSamplingRules = {
rate: number;
env?: CreateProjectProjectsEnv | undefined;
requestPath?: string | undefined;
};
export type CreateProjectTracing = {
domains?: string | undefined;
ignorePaths?: Array<string> | undefined;
samplingRules?: Array<CreateProjectSamplingRules> | undefined;
};
/**
* The project was successfuly created
*/
export type CreateProjectResponseBody = {
accountId: string;
analytics?: Analytics | undefined;
appliedCve55182Migration?: boolean | undefined;
speedInsights?: SpeedInsights | undefined;
autoExposeSystemEnvs?: boolean | undefined;
autoAssignCustomDomains?: boolean | undefined;
autoAssignCustomDomainsUpdatedBy?: string | undefined;
buildCommand?: string | null | undefined;
commandForIgnoringBuildStep?: string | null | undefined;
connectConfigurations?:
| Array<CreateProjectConnectConfigurations>
| null
| undefined;
connectConfigurationId?: string | null | undefined;
connectBuildsEnabled?: boolean | undefined;
passiveConnectConfigurationId?: string | null | undefined;
createdAt?: number | undefined;
customerSupportCodeVisibility?: boolean | undefined;
crons?: CreateProjectCrons | undefined;
dataCache?: CreateProjectDataCache | undefined;
/**
* Retention policies for deployments. These are enforced at the project level, but we also maintain an instance of this at the team level as a default policy that gets applied to new projects.
*/
deploymentExpiration: DeploymentExpiration;
expiration?: CreateProjectExpiration | undefined;
devCommand?: string | null | undefined;
directoryListing: boolean;
installCommand?: string | null | undefined;
env?: Array<CreateProjectEnv> | undefined;
customEnvironments?: Array<CustomEnvironments> | undefined;
framework?: CreateProjectProjectsFramework | null | undefined;
services?: Array<Services> | undefined;
gitForkProtection?: boolean | undefined;
gitLFS?: boolean | undefined;
id: string;
ipBuckets?: Array<CreateProjectIpBuckets> | undefined;
jobs?: Jobs | undefined;
latestDeployments?: Array<LatestDeployments> | undefined;
link?: Link | undefined;
microfrontends?: CreateProjectMicrofrontends | undefined;
name: string;
nodeVersion: CreateProjectNodeVersion;
optionsAllowlist?: CreateProjectOptionsAllowlist | null | undefined;
outputDirectory?: string | null | undefined;
passwordProtection?: CreateProjectPasswordProtection | null | undefined;
passport?: CreateProjectPassport | null | undefined;
protectionConfig?: ProtectionConfig | undefined;
productionDeploymentsFastLane?: boolean | undefined;
resourceConfig: CreateProjectProjectsResourceConfig;
/**
* Description of why a project was rolled back, and by whom. Note that lastAliasRequest contains the from/to details of the rollback.
*/
rollbackDescription?: CreateProjectRollbackDescription | undefined;
/**
* Project-level rolling release configuration that defines how deployments should be gradually rolled out
*/
rollingRelease?: RollingRelease | null | undefined;
defaultResourceConfig: DefaultResourceConfig;
rootDirectory?: string | null | undefined;
serverlessFunctionZeroConfigFailover?: boolean | undefined;
skewProtectionBoundaryAt?: number | undefined;
skewProtectionMaxAge?: number | undefined;
skewProtectionAllowedDomains?: Array<string> | undefined;
skipGitConnectDuringLink?: boolean | undefined;
staticIps?: CreateProjectStaticIps | undefined;
sourceFilesOutsideRootDirectory?: boolean | undefined;
enableAffectedProjectsDeployments?: boolean | undefined;
enableExternalRewriteCaching?: boolean | undefined;
ssoProtection?: CreateProjectProjectsSsoProtection | null | undefined;
targets?: { [k: string]: CreateProjectTargets | null } | undefined;
transferCompletedAt?: number | undefined;
transferStartedAt?: number | undefined;
transferToAccountId?: string | undefined;
transferredFromAccountId?: string | undefined;
updatedAt?: number | undefined;
live?: boolean | undefined;
enablePreviewFeedback?: boolean | null | undefined;
enableProductionFeedback?: boolean | null | undefined;
permissions?: CreateProjectPermissions | undefined;
lastRollbackTarget?: LastRollbackTarget | null | undefined;
lastAliasRequest?: LastAliasRequest | null | undefined;
protectionBypass?: { [k: string]: ProtectionBypass } | undefined;
hasActiveBranches?: boolean | undefined;
trustedIps?: CreateProjectTrustedIps | null | undefined;
trustedSources?: CreateProjectTrustedSources | null | undefined;
gitComments?: CreateProjectGitComments | undefined;
gitProviderOptions?: GitProviderOptions | undefined;
paused?: boolean | undefined;
concurrencyBucketName?: string | undefined;
webAnalytics?: CreateProjectWebAnalytics | undefined;
security?: CreateProjectSecurity | undefined;
oidcTokenConfig?: CreateProjectOidcTokenConfig | undefined;
/**
* Project shape. `null` on a rule list clears the project's override for that rule type (fall back to team for every env); omitting is equivalent. Setting `deploymentPolicy` itself to `null` clears every override at once. Kept structurally distinct from {@link TeamDeploymentPolicy} so the two storage locations don't share a type by accident.
*/
deploymentPolicy?: CreateProjectDeploymentPolicy | null | undefined;
tier?: string | undefined;
flatRateTier?: FlatRateTier | undefined;
usageStatus?: UsageStatus | undefined;
features?: Features | undefined;
v0?: boolean | undefined;
v0Created?: boolean | undefined;
abuse?: CreateProjectAbuse | undefined;
internalRoutes?: Array<InternalRoutes1 | InternalRoutes2> | undefined;
hasDeployments?: boolean | undefined;
dismissedToasts?: Array<CreateProjectDismissedToasts> | undefined;
protectedSourcemaps?: boolean | undefined;
tracing?: CreateProjectTracing | undefined;
avatar?: string | null | undefined;
};
/** @internal */
export const CreateProjectToProjects1$inboundSchema: z.ZodType<
CreateProjectToProjects1,
z.ZodTypeDef,
unknown
> = z.object({
slugs: z.array(types.string()),
preset: types.optional(CreateProjectToProjectsResponsePreset$inboundSchema),
});
export function createProjectToProjects1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectToProjects1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectToProjects1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectToProjects1' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsTo$inboundSchema: z.ZodType<
CreateProjectProjectsTo,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => CreateProjectToProjects1$inboundSchema),
CreateProjectToProjects2$inboundSchema,
]);
export function createProjectProjectsToFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectProjectsTo, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectProjectsTo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectProjectsTo' from JSON`,
);
}
/** @internal */
export const CreateProjectCustomAllow$inboundSchema: z.ZodType<
CreateProjectCustomAllow,
z.ZodTypeDef,
unknown
> = z.object({
from: CreateProjectFrom$inboundSchema,
to: smartUnion([
z.lazy(() => CreateProjectToProjects1$inboundSchema),
CreateProjectToProjects2$inboundSchema,
]),
});
export function createProjectCustomAllowFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectCustomAllow, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectCustomAllow$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectCustomAllow' from JSON`,
);
}
/** @internal */
export const CreateProjectProjects$inboundSchema: z.ZodType<
CreateProjectProjects,
z.ZodTypeDef,
unknown
> = z.object({
label: types.optional(types.string()),
customAllow: types.optional(
z.array(z.lazy(() => CreateProjectCustomAllow$inboundSchema)),
),
});
export function createProjectProjectsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectProjects, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectProjects$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectProjects' from JSON`,
);
}
/** @internal */
export const CreateProjectToProjectsPreset$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectToProjectsPreset
> = z.nativeEnum(CreateProjectToProjectsPreset);
/** @internal */
export const CreateProjectTo2$inboundSchema: z.ZodType<
CreateProjectTo2,
z.ZodTypeDef,
unknown
> = z.object({
slugs: types.optional(z.array(types.string())),
preset: CreateProjectToProjectsPreset$inboundSchema,
});
export function createProjectTo2FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectTo2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectTo2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectTo2' from JSON`,
);
}
/** @internal */
export const CreateProjectToPreset$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectToPreset
> = z.nativeEnum(CreateProjectToPreset);
/** @internal */
export const CreateProjectTo1$inboundSchema: z.ZodType<
CreateProjectTo1,
z.ZodTypeDef,
unknown
> = z.object({
slugs: z.array(types.string()),
preset: types.optional(CreateProjectToPreset$inboundSchema),
});
export function createProjectTo1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectTo1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectTo1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectTo1' from JSON`,
);
}
/** @internal */
export const CreateProjectTo$inboundSchema: z.ZodType<
CreateProjectTo,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => CreateProjectTo1$inboundSchema),
z.lazy(() => CreateProjectTo2$inboundSchema),
]);
export function createProjectToFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectTo, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectTo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectTo' from JSON`,
);
}
/** @internal */
export const CreateProjectOidcProviders$inboundSchema: z.ZodType<
CreateProjectOidcProviders,
z.ZodTypeDef,
unknown
> = z.object({
to: smartUnion([
z.lazy(() => CreateProjectTo1$inboundSchema),
z.lazy(() => CreateProjectTo2$inboundSchema),
]),
label: types.optional(types.string()),
claims: z.record(z.array(types.string())),
});
export function createProjectOidcProvidersFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectOidcProviders, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectOidcProviders$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectOidcProviders' from JSON`,
);
}
/** @internal */
export const CreateProjectTrustedSources$inboundSchema: z.ZodType<
CreateProjectTrustedSources,
z.ZodTypeDef,
unknown
> = z.object({
projects: types.optional(
z.record(z.lazy(() => CreateProjectProjects$inboundSchema)),
),
oidcProviders: types.optional(
z.record(z.array(z.lazy(() => CreateProjectOidcProviders$inboundSchema))),
),
});
export function createProjectTrustedSourcesFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectTrustedSources, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectTrustedSources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectTrustedSources' from JSON`,
);
}
/** @internal */
export const CreateProjectGitComments$inboundSchema: z.ZodType<
CreateProjectGitComments,
z.ZodTypeDef,
unknown
> = z.object({
onPullRequest: types.boolean(),
onCommit: types.boolean(),
});
export function createProjectGitCommentsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectGitComments, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectGitComments$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectGitComments' from JSON`,
);
}
/** @internal */
export const CreateProjectCreateDeployments$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectCreateDeployments
> = z.nativeEnum(CreateProjectCreateDeployments);
/** @internal */
export const CreateProjectConsolidatedGitCommitStatus$inboundSchema: z.ZodType<
CreateProjectConsolidatedGitCommitStatus,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
propagateFailures: types.boolean(),
});
export function createProjectConsolidatedGitCommitStatusFromJSON(
jsonString: string,
): SafeParseResult<
CreateProjectConsolidatedGitCommitStatus,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateProjectConsolidatedGitCommitStatus$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateProjectConsolidatedGitCommitStatus' from JSON`,
);
}
/** @internal */
export const GitProviderOptions$inboundSchema: z.ZodType<
GitProviderOptions,
z.ZodTypeDef,
unknown
> = z.object({
createDeployments: CreateProjectCreateDeployments$inboundSchema,
disableRepositoryDispatchEvents: types.optional(types.boolean()),
requireVerifiedCommits: types.optional(types.boolean()),
gitCommitStatus: types.optional(types.boolean()),
consolidatedGitCommitStatus: types.optional(
z.lazy(() => CreateProjectConsolidatedGitCommitStatus$inboundSchema),
),
});
export function gitProviderOptionsFromJSON(
jsonString: string,
): SafeParseResult<GitProviderOptions, SDKValidationError> {
return safeParse(
jsonString,
(x) => GitProviderOptions$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GitProviderOptions' from JSON`,
);
}
/** @internal */
export const CreateProjectWebAnalytics$inboundSchema: z.ZodType<
CreateProjectWebAnalytics,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
disabledAt: types.optional(types.number()),
canceledAt: types.optional(types.number()),
enabledAt: types.optional(types.number()),
hasData: types.optional(types.literal(true)),
});
export function createProjectWebAnalyticsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectWebAnalytics, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectWebAnalytics$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectWebAnalytics' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodyAction$inboundSchema:
z.ZodNativeEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodyAction
> = z.nativeEnum(
CreateProjectProjectsResponse200ApplicationJSONResponseBodyAction,
);
/** @internal */
export const CreateProjectVercelRuleset$inboundSchema: z.ZodType<
CreateProjectVercelRuleset,
z.ZodTypeDef,
unknown
> = z.object({
active: types.boolean(),
action: types.optional(
CreateProjectProjectsResponse200ApplicationJSONResponseBodyAction$inboundSchema,
),
});
export function createProjectVercelRulesetFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectVercelRuleset, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectVercelRuleset$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectVercelRuleset' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction$inboundSchema:
z.ZodNativeEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction
> = z.nativeEnum(
CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction,
);
/** @internal */
export const CreateProjectTrafficSources$inboundSchema: z.ZodType<
CreateProjectTrafficSources,
z.ZodTypeDef,
unknown
> = z.object({
active: types.boolean(),
action: types.optional(
CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityAction$inboundSchema,
),
});
export function createProjectTrafficSourcesFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectTrafficSources, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectTrafficSources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectTrafficSources' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction$inboundSchema:
z.ZodNativeEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction
> = z.nativeEnum(
CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction,
);
/** @internal */
export const BotFilter$inboundSchema: z.ZodType<
BotFilter,
z.ZodTypeDef,
unknown
> = z.object({
active: types.boolean(),
action: types.optional(
CreateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesAction$inboundSchema,
),
});
export function botFilterFromJSON(
jsonString: string,
): SafeParseResult<BotFilter, SDKValidationError> {
return safeParse(
jsonString,
(x) => BotFilter$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BotFilter' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsResponse200Action$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectProjectsResponse200Action> = z.nativeEnum(
CreateProjectProjectsResponse200Action,
);
/** @internal */
export const CreateProjectAiBots$inboundSchema: z.ZodType<
CreateProjectAiBots,
z.ZodTypeDef,
unknown
> = z.object({
active: types.boolean(),
action: types.optional(CreateProjectProjectsResponse200Action$inboundSchema),
});
export function createProjectAiBotsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectAiBots, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectAiBots$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectAiBots' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsResponse200ApplicationJSONAction$inboundSchema:
z.ZodNativeEnum<
typeof CreateProjectProjectsResponse200ApplicationJSONAction
> = z.nativeEnum(CreateProjectProjectsResponse200ApplicationJSONAction);
/** @internal */
export const CreateProjectOwasp$inboundSchema: z.ZodType<
CreateProjectOwasp,
z.ZodTypeDef,
unknown
> = z.object({
active: types.boolean(),
action: types.optional(
CreateProjectProjectsResponse200ApplicationJSONAction$inboundSchema,
),
});
export function createProjectOwaspFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectOwasp, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectOwasp$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectOwasp' from JSON`,
);
}
/** @internal */
export const CreateProjectManagedRules$inboundSchema: z.ZodType<
CreateProjectManagedRules,
z.ZodTypeDef,
unknown
> = z.object({
vercel_ruleset: z.lazy(() => CreateProjectVercelRuleset$inboundSchema),
traffic_sources: z.lazy(() => CreateProjectTrafficSources$inboundSchema),
bot_filter: z.lazy(() => BotFilter$inboundSchema),
ai_bots: z.lazy(() => CreateProjectAiBots$inboundSchema),
owasp: z.lazy(() => CreateProjectOwasp$inboundSchema),
}).transform((v) => {
return remap$(v, {
"vercel_ruleset": "vercelRuleset",
"traffic_sources": "trafficSources",
"bot_filter": "botFilter",
"ai_bots": "aiBots",
});
});
export function createProjectManagedRulesFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectManagedRules, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectManagedRules$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectManagedRules' from JSON`,
);
}
/** @internal */
export const CreateProjectLogHeaders2$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectLogHeaders2
> = z.nativeEnum(CreateProjectLogHeaders2);
/** @internal */
export const CreateProjectLogHeaders$inboundSchema: z.ZodType<
CreateProjectLogHeaders,
z.ZodTypeDef,
unknown
> = smartUnion([
z.array(types.string()),
CreateProjectLogHeaders2$inboundSchema,
]);
export function createProjectLogHeadersFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectLogHeaders, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectLogHeaders$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectLogHeaders' from JSON`,
);
}
/** @internal */
export const SecurityPlusMetadata$inboundSchema: z.ZodType<
SecurityPlusMetadata,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
firstEnabledAt: types.optional(types.number()),
});
export function securityPlusMetadataFromJSON(
jsonString: string,
): SafeParseResult<SecurityPlusMetadata, SDKValidationError> {
return safeParse(
jsonString,
(x) => SecurityPlusMetadata$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'SecurityPlusMetadata' from JSON`,
);
}
/** @internal */
export const CreateProjectSecurity$inboundSchema: z.ZodType<
CreateProjectSecurity,
z.ZodTypeDef,
unknown
> = z.object({
attackModeEnabled: types.optional(types.boolean()),
attackModeUpdatedAt: types.optional(types.number()),
firewallEnabled: types.optional(types.boolean()),
firewallUpdatedAt: types.optional(types.number()),
attackModeActiveUntil: z.nullable(types.number()).optional(),
firewallConfigVersion: types.optional(types.number()),
firewallSeawallEnabled: types.optional(types.boolean()),
ja3Enabled: types.optional(types.boolean()),
ja4Enabled: types.optional(types.boolean()),
firewallBypassIps: types.optional(z.array(types.string())),
managedRules: z.nullable(
z.lazy(() => CreateProjectManagedRules$inboundSchema),
).optional(),
botIdEnabled: types.optional(types.boolean()),
log_headers: types.optional(
smartUnion([
z.array(types.string()),
CreateProjectLogHeaders2$inboundSchema,
]),
),
securityPlus: types.optional(types.boolean()),
securityPlusMetadata: types.optional(
z.lazy(() => SecurityPlusMetadata$inboundSchema),
),
pageIntegrityEnabled: types.optional(types.boolean()),
}).transform((v) => {
return remap$(v, {
"log_headers": "logHeaders",
});
});
export function createProjectSecurityFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectSecurity, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectSecurity$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectSecurity' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsIssuerMode$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectProjectsIssuerMode
> = z.nativeEnum(CreateProjectProjectsIssuerMode);
/** @internal */
export const CreateProjectOidcTokenConfig$inboundSchema: z.ZodType<
CreateProjectOidcTokenConfig,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.optional(types.boolean()),
issuerMode: types.optional(CreateProjectProjectsIssuerMode$inboundSchema),
});
export function createProjectOidcTokenConfigFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectOidcTokenConfig, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectOidcTokenConfig$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectOidcTokenConfig' from JSON`,
);
}
/** @internal */
export const CreateProjectSources2$inboundSchema: z.ZodType<
CreateProjectSources2,
z.ZodTypeDef,
unknown
> = z.object({
provider: types.literal("gitlab"),
namespace: types.string(),
project: types.optional(types.string()),
});
export function createProjectSources2FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectSources2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectSources2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectSources2' from JSON`,
);
}
/** @internal */
export const CreateProjectSourcesProjectsProvider$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectSourcesProjectsProvider> = z.nativeEnum(
CreateProjectSourcesProjectsProvider,
);
/** @internal */
export const CreateProjectSources1$inboundSchema: z.ZodType<
CreateProjectSources1,
z.ZodTypeDef,
unknown
> = z.object({
provider: CreateProjectSourcesProjectsProvider$inboundSchema,
org: types.string(),
repo: types.optional(types.string()),
});
export function createProjectSources1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectSources1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectSources1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectSources1' from JSON`,
);
}
/** @internal */
export const CreateProjectSources$inboundSchema: z.ZodType<
CreateProjectSources,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => CreateProjectSources1$inboundSchema).and(
z.object({ provider: z.literal("bitbucket") }),
),
z.lazy(() => CreateProjectSources1$inboundSchema).and(
z.object({ provider: z.literal("github") }),
),
z.lazy(() => CreateProjectSources2$inboundSchema),
]);
export function createProjectSourcesFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectSources, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectSources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectSources' from JSON`,
);
}
/** @internal */
export const CreateProjectEnvironmentsProjects2$inboundSchema: z.ZodType<
CreateProjectEnvironmentsProjects2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("custom"),
environmentId: types.string(),
});
export function createProjectEnvironmentsProjects2FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectEnvironmentsProjects2, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateProjectEnvironmentsProjects2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectEnvironmentsProjects2' from JSON`,
);
}
/** @internal */
export const CreateProjectEnvironmentsProjectsTarget$inboundSchema:
z.ZodNativeEnum<typeof CreateProjectEnvironmentsProjectsTarget> = z
.nativeEnum(CreateProjectEnvironmentsProjectsTarget);
/** @internal */
export const CreateProjectEnvironmentsProjects1$inboundSchema: z.ZodType<
CreateProjectEnvironmentsProjects1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("system"),
target: CreateProjectEnvironmentsProjectsTarget$inboundSchema,
});
export function createProjectEnvironmentsProjects1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectEnvironmentsProjects1, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateProjectEnvironmentsProjects1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectEnvironmentsProjects1' from JSON`,
);
}
/** @internal */
export const CreateProjectEnvironments$inboundSchema: z.ZodType<
CreateProjectEnvironments,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => CreateProjectEnvironmentsProjects1$inboundSchema),
z.lazy(() => CreateProjectEnvironmentsProjects2$inboundSchema),
]);
export function createProjectEnvironmentsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectEnvironments, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectEnvironments$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectEnvironments' from JSON`,
);
}
/** @internal */
export const CreateProjectGitSources$inboundSchema: z.ZodType<
CreateProjectGitSources,
z.ZodTypeDef,
unknown
> = z.object({
sources: z.array(
z.union([
z.lazy(() => CreateProjectSources1$inboundSchema).and(
z.object({ provider: z.literal("bitbucket") }),
),
z.lazy(() => CreateProjectSources1$inboundSchema).and(
z.object({ provider: z.literal("github") }),
),
z.lazy(() => CreateProjectSources2$inboundSchema),
]),
),
enabled: types.boolean(),
environments: z.array(
z.union([
z.lazy(() => CreateProjectEnvironmentsProjects1$inboundSchema),
z.lazy(() => CreateProjectEnvironmentsProjects2$inboundSchema),
]),
),
});
export function createProjectGitSourcesFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectGitSources, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectGitSources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectGitSources' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsSources$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectProjectsSources
> = z.nativeEnum(CreateProjectProjectsSources);
/** @internal */
export const CreateProjectEnvironments2$inboundSchema: z.ZodType<
CreateProjectEnvironments2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("custom"),
environmentId: types.string(),
});
export function createProjectEnvironments2FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectEnvironments2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectEnvironments2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectEnvironments2' from JSON`,
);
}
/** @internal */
export const CreateProjectEnvironmentsTarget$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectEnvironmentsTarget
> = z.nativeEnum(CreateProjectEnvironmentsTarget);
/** @internal */
export const CreateProjectEnvironments1$inboundSchema: z.ZodType<
CreateProjectEnvironments1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("system"),
target: CreateProjectEnvironmentsTarget$inboundSchema,
});
export function createProjectEnvironments1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectEnvironments1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectEnvironments1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectEnvironments1' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsEnvironments$inboundSchema: z.ZodType<
CreateProjectProjectsEnvironments,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => CreateProjectEnvironments1$inboundSchema),
z.lazy(() => CreateProjectEnvironments2$inboundSchema),
]);
export function createProjectProjectsEnvironmentsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectProjectsEnvironments, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectProjectsEnvironments$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectProjectsEnvironments' from JSON`,
);
}
/** @internal */
export const CreateProjectDeploymentSources$inboundSchema: z.ZodType<
CreateProjectDeploymentSources,
z.ZodTypeDef,
unknown
> = z.object({
sources: z.array(CreateProjectProjectsSources$inboundSchema),
enabled: types.boolean(),
environments: z.array(
z.union([
z.lazy(() => CreateProjectEnvironments1$inboundSchema),
z.lazy(() => CreateProjectEnvironments2$inboundSchema),
]),
),
});
export function createProjectDeploymentSourcesFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectDeploymentSources, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectDeploymentSources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectDeploymentSources' from JSON`,
);
}
/** @internal */
export const CreateProjectDeploymentPolicy$inboundSchema: z.ZodType<
CreateProjectDeploymentPolicy,
z.ZodTypeDef,
unknown
> = z.object({
gitSources: z.nullable(
z.array(z.lazy(() => CreateProjectGitSources$inboundSchema)),
).optional(),
deploymentSources: z.nullable(
z.array(z.lazy(() => CreateProjectDeploymentSources$inboundSchema)),
).optional(),
});
export function createProjectDeploymentPolicyFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectDeploymentPolicy, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectDeploymentPolicy$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectDeploymentPolicy' from JSON`,
);
}
/** @internal */
export const FlatRateTier$inboundSchema: z.ZodNativeEnum<typeof FlatRateTier> =
z.nativeEnum(FlatRateTier);
/** @internal */
export const CreateProjectKind$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectKind
> = z.nativeEnum(CreateProjectKind);
/** @internal */
export const UsageStatus$inboundSchema: z.ZodType<
UsageStatus,
z.ZodTypeDef,
unknown
> = z.object({
kind: CreateProjectKind$inboundSchema,
exceededAllowanceUntil: types.optional(types.number()),
bypassThrottleUntil: types.optional(types.number()),
throttled: types.optional(types.boolean()),
});
export function usageStatusFromJSON(
jsonString: string,
): SafeParseResult<UsageStatus, SDKValidationError> {
return safeParse(
jsonString,
(x) => UsageStatus$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UsageStatus' from JSON`,
);
}
/** @internal */
export const Features$inboundSchema: z.ZodType<
Features,
z.ZodTypeDef,
unknown
> = z.object({
webAnalytics: types.optional(types.boolean()),
});
export function featuresFromJSON(
jsonString: string,
): SafeParseResult<Features, SDKValidationError> {
return safeParse(
jsonString,
(x) => Features$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Features' from JSON`,
);
}
/** @internal */
export const CreateProjectHistory$inboundSchema: z.ZodType<
CreateProjectHistory,
z.ZodTypeDef,
unknown
> = z.object({
scanner: types.string(),
reason: types.string(),
by: types.string(),
byId: types.string(),
at: types.number(),
});
export function createProjectHistoryFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectHistory, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectHistory$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHistory' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsResponseAction$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectProjectsResponseAction
> = z.nativeEnum(CreateProjectProjectsResponseAction);
/** @internal */
export const Block$inboundSchema: z.ZodType<Block, z.ZodTypeDef, unknown> = z
.object({
action: CreateProjectProjectsResponseAction$inboundSchema,
reason: types.string(),
statusCode: types.number(),
createdAt: types.number(),
caseId: types.optional(types.string()),
actor: types.optional(types.string()),
comment: types.optional(types.string()),
ineligibleForAppeal: types.optional(types.boolean()),
isCascading: types.optional(types.boolean()),
});
export function blockFromJSON(
jsonString: string,
): SafeParseResult<Block, SDKValidationError> {
return safeParse(
jsonString,
(x) => Block$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Block' from JSON`,
);
}
/** @internal */
export const CreateProjectHasProjectsResponse200Value$inboundSchema: z.ZodType<
CreateProjectHasProjectsResponse200Value,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.string(),
});
export function createProjectHasProjectsResponse200ValueFromJSON(
jsonString: string,
): SafeParseResult<
CreateProjectHasProjectsResponse200Value,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateProjectHasProjectsResponse200Value$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateProjectHasProjectsResponse200Value' from JSON`,
);
}
/** @internal */
export const CreateProjectHasProjects2$inboundSchema: z.ZodType<
CreateProjectHasProjects2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("host"),
value: z.lazy(() => CreateProjectHasProjectsResponse200Value$inboundSchema),
});
export function createProjectHasProjects2FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectHasProjects2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectHasProjects2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHasProjects2' from JSON`,
);
}
/** @internal */
export const CreateProjectHasProjectsKey$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectHasProjectsKey
> = z.nativeEnum(CreateProjectHasProjectsKey);
/** @internal */
export const CreateProjectHasProjectsResponseValue$inboundSchema: z.ZodType<
CreateProjectHasProjectsResponseValue,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.string(),
});
export function createProjectHasProjectsResponseValueFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectHasProjectsResponseValue, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateProjectHasProjectsResponseValue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHasProjectsResponseValue' from JSON`,
);
}
/** @internal */
export const CreateProjectHasProjects1$inboundSchema: z.ZodType<
CreateProjectHasProjects1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("header"),
key: CreateProjectHasProjectsKey$inboundSchema,
value: z.lazy(() => CreateProjectHasProjectsResponseValue$inboundSchema),
});
export function createProjectHasProjects1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectHasProjects1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectHasProjects1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHasProjects1' from JSON`,
);
}
/** @internal */
export const CreateProjectRouteHas$inboundSchema: z.ZodType<
CreateProjectRouteHas,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => CreateProjectHasProjects1$inboundSchema),
z.lazy(() => CreateProjectHasProjects2$inboundSchema),
]);
export function createProjectRouteHasFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectRouteHas, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectRouteHas$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectRouteHas' from JSON`,
);
}
/** @internal */
export const CreateProjectRouteAction$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectRouteAction
> = z.nativeEnum(CreateProjectRouteAction);
/** @internal */
export const CreateProjectRouteMitigate$inboundSchema: z.ZodType<
CreateProjectRouteMitigate,
z.ZodTypeDef,
unknown
> = z.object({
action: CreateProjectRouteAction$inboundSchema,
});
export function createProjectRouteMitigateFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectRouteMitigate, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectRouteMitigate$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectRouteMitigate' from JSON`,
);
}
/** @internal */
export const CreateProjectRoute2$inboundSchema: z.ZodType<
CreateProjectRoute2,
z.ZodTypeDef,
unknown
> = z.object({
has: z.array(
z.union([
z.lazy(() => CreateProjectHasProjects1$inboundSchema),
z.lazy(() => CreateProjectHasProjects2$inboundSchema),
]),
),
mitigate: z.lazy(() => CreateProjectRouteMitigate$inboundSchema),
src: types.optional(types.string()),
});
export function createProjectRoute2FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectRoute2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectRoute2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectRoute2' from JSON`,
);
}
/** @internal */
export const CreateProjectRoute1$inboundSchema: z.ZodType<
CreateProjectRoute1,
z.ZodTypeDef,
unknown
> = z.object({
src: types.string(),
status: types.number(),
});
export function createProjectRoute1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectRoute1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectRoute1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectRoute1' from JSON`,
);
}
/** @internal */
export const CreateProjectBlockHistoryRoute$inboundSchema: z.ZodType<
CreateProjectBlockHistoryRoute,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => CreateProjectRoute1$inboundSchema),
z.lazy(() => CreateProjectRoute2$inboundSchema),
]);
export function createProjectBlockHistoryRouteFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectBlockHistoryRoute, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectBlockHistoryRoute$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectBlockHistoryRoute' from JSON`,
);
}
/** @internal */
export const BlockHistory4$inboundSchema: z.ZodType<
BlockHistory4,
z.ZodTypeDef,
unknown
> = z.object({
action: types.literal("route-unblocked"),
route: smartUnion([
z.lazy(() => CreateProjectRoute1$inboundSchema),
z.lazy(() => CreateProjectRoute2$inboundSchema),
]),
statusCode: types.optional(types.number()),
createdAt: types.number(),
caseId: types.optional(types.string()),
actor: types.optional(types.string()),
comment: types.optional(types.string()),
ineligibleForAppeal: types.optional(types.boolean()),
isCascading: types.optional(types.boolean()),
});
export function blockHistory4FromJSON(
jsonString: string,
): SafeParseResult<BlockHistory4, SDKValidationError> {
return safeParse(
jsonString,
(x) => BlockHistory4$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BlockHistory4' from JSON`,
);
}
/** @internal */
export const CreateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue$inboundSchema:
z.ZodType<
CreateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.string(),
});
export function createProjectHasProjectsResponse200ApplicationJSONResponseBodyValueFromJSON(
jsonString: string,
): SafeParseResult<
CreateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue' from JSON`,
);
}
/** @internal */
export const CreateProjectHasProjectsResponse2$inboundSchema: z.ZodType<
CreateProjectHasProjectsResponse2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("host"),
value: z.lazy(() =>
CreateProjectHasProjectsResponse200ApplicationJSONResponseBodyValue$inboundSchema
),
});
export function createProjectHasProjectsResponse2FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectHasProjectsResponse2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectHasProjectsResponse2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHasProjectsResponse2' from JSON`,
);
}
/** @internal */
export const CreateProjectHasKey$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectHasKey
> = z.nativeEnum(CreateProjectHasKey);
/** @internal */
export const CreateProjectHasProjectsResponse200ApplicationJSONValue$inboundSchema:
z.ZodType<
CreateProjectHasProjectsResponse200ApplicationJSONValue,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.string(),
});
export function createProjectHasProjectsResponse200ApplicationJSONValueFromJSON(
jsonString: string,
): SafeParseResult<
CreateProjectHasProjectsResponse200ApplicationJSONValue,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateProjectHasProjectsResponse200ApplicationJSONValue$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHasProjectsResponse200ApplicationJSONValue' from JSON`,
);
}
/** @internal */
export const CreateProjectHasProjectsResponse1$inboundSchema: z.ZodType<
CreateProjectHasProjectsResponse1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("header"),
key: CreateProjectHasKey$inboundSchema,
value: z.lazy(() =>
CreateProjectHasProjectsResponse200ApplicationJSONValue$inboundSchema
),
});
export function createProjectHasProjectsResponse1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectHasProjectsResponse1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectHasProjectsResponse1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHasProjectsResponse1' from JSON`,
);
}
/** @internal */
export const RouteHas$inboundSchema: z.ZodType<
RouteHas,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => CreateProjectHasProjectsResponse1$inboundSchema),
z.lazy(() => CreateProjectHasProjectsResponse2$inboundSchema),
]);
export function routeHasFromJSON(
jsonString: string,
): SafeParseResult<RouteHas, SDKValidationError> {
return safeParse(
jsonString,
(x) => RouteHas$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RouteHas' from JSON`,
);
}
/** @internal */
export const RouteAction$inboundSchema: z.ZodNativeEnum<typeof RouteAction> = z
.nativeEnum(RouteAction);
/** @internal */
export const RouteMitigate$inboundSchema: z.ZodType<
RouteMitigate,
z.ZodTypeDef,
unknown
> = z.object({
action: RouteAction$inboundSchema,
});
export function routeMitigateFromJSON(
jsonString: string,
): SafeParseResult<RouteMitigate, SDKValidationError> {
return safeParse(
jsonString,
(x) => RouteMitigate$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RouteMitigate' from JSON`,
);
}
/** @internal */
export const Route2$inboundSchema: z.ZodType<Route2, z.ZodTypeDef, unknown> = z
.object({
has: z.array(
z.union([
z.lazy(() => CreateProjectHasProjectsResponse1$inboundSchema),
z.lazy(() => CreateProjectHasProjectsResponse2$inboundSchema),
]),
),
mitigate: z.lazy(() => RouteMitigate$inboundSchema),
src: types.optional(types.string()),
});
export function route2FromJSON(
jsonString: string,
): SafeParseResult<Route2, SDKValidationError> {
return safeParse(
jsonString,
(x) => Route2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Route2' from JSON`,
);
}
/** @internal */
export const Route1$inboundSchema: z.ZodType<Route1, z.ZodTypeDef, unknown> = z
.object({
src: types.string(),
status: types.number(),
});
export function route1FromJSON(
jsonString: string,
): SafeParseResult<Route1, SDKValidationError> {
return safeParse(
jsonString,
(x) => Route1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Route1' from JSON`,
);
}
/** @internal */
export const BlockHistoryRoute$inboundSchema: z.ZodType<
BlockHistoryRoute,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => Route1$inboundSchema),
z.lazy(() => Route2$inboundSchema),
]);
export function blockHistoryRouteFromJSON(
jsonString: string,
): SafeParseResult<BlockHistoryRoute, SDKValidationError> {
return safeParse(
jsonString,
(x) => BlockHistoryRoute$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BlockHistoryRoute' from JSON`,
);
}
/** @internal */
export const BlockHistory3$inboundSchema: z.ZodType<
BlockHistory3,
z.ZodTypeDef,
unknown
> = z.object({
action: types.literal("route-blocked"),
route: smartUnion([
z.lazy(() => Route1$inboundSchema),
z.lazy(() => Route2$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 blockHistory3FromJSON(
jsonString: string,
): SafeParseResult<BlockHistory3, SDKValidationError> {
return safeParse(
jsonString,
(x) => BlockHistory3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BlockHistory3' from JSON`,
);
}
/** @internal */
export const BlockHistory2$inboundSchema: z.ZodType<
BlockHistory2,
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 blockHistory2FromJSON(
jsonString: string,
): SafeParseResult<BlockHistory2, SDKValidationError> {
return safeParse(
jsonString,
(x) => BlockHistory2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BlockHistory2' from JSON`,
);
}
/** @internal */
export const BlockHistory1$inboundSchema: z.ZodType<
BlockHistory1,
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 blockHistory1FromJSON(
jsonString: string,
): SafeParseResult<BlockHistory1, SDKValidationError> {
return safeParse(
jsonString,
(x) => BlockHistory1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BlockHistory1' from JSON`,
);
}
/** @internal */
export const CreateProjectBlockHistory$inboundSchema: z.ZodType<
CreateProjectBlockHistory,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => BlockHistory1$inboundSchema),
z.lazy(() => BlockHistory2$inboundSchema),
z.lazy(() => BlockHistory3$inboundSchema),
z.lazy(() => BlockHistory4$inboundSchema),
]);
export function createProjectBlockHistoryFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectBlockHistory, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectBlockHistory$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectBlockHistory' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsAction$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectProjectsAction
> = z.nativeEnum(CreateProjectProjectsAction);
/** @internal */
export const InterstitialHistory$inboundSchema: z.ZodType<
InterstitialHistory,
z.ZodTypeDef,
unknown
> = z.object({
action: CreateProjectProjectsAction$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 interstitialHistoryFromJSON(
jsonString: string,
): SafeParseResult<InterstitialHistory, SDKValidationError> {
return safeParse(
jsonString,
(x) => InterstitialHistory$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'InterstitialHistory' from JSON`,
);
}
/** @internal */
export const CreateProjectAbuse$inboundSchema: z.ZodType<
CreateProjectAbuse,
z.ZodTypeDef,
unknown
> = z.object({
scanner: types.optional(types.string()),
history: z.array(z.lazy(() => CreateProjectHistory$inboundSchema)),
updatedAt: types.number(),
block: types.optional(z.lazy(() => Block$inboundSchema)),
blockHistory: types.optional(
z.array(z.union([
z.lazy(() => BlockHistory1$inboundSchema),
z.lazy(() =>
BlockHistory2$inboundSchema
),
z.lazy(() => BlockHistory3$inboundSchema),
z.lazy(() => BlockHistory4$inboundSchema),
])),
),
interstitial: types.optional(types.boolean()),
interstitialHistory: types.optional(
z.array(z.lazy(() => InterstitialHistory$inboundSchema)),
),
});
export function createProjectAbuseFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectAbuse, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectAbuse$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectAbuse' from JSON`,
);
}
/** @internal */
export const CreateProjectHasProjectsValue$inboundSchema: z.ZodType<
CreateProjectHasProjectsValue,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.string(),
});
export function createProjectHasProjectsValueFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectHasProjectsValue, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectHasProjectsValue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHasProjectsValue' from JSON`,
);
}
/** @internal */
export const CreateProjectHas2$inboundSchema: z.ZodType<
CreateProjectHas2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("host"),
value: z.lazy(() => CreateProjectHasProjectsValue$inboundSchema),
});
export function createProjectHas2FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectHas2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectHas2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHas2' from JSON`,
);
}
/** @internal */
export const HasKey$inboundSchema: z.ZodNativeEnum<typeof HasKey> = z
.nativeEnum(HasKey);
/** @internal */
export const CreateProjectHasValue$inboundSchema: z.ZodType<
CreateProjectHasValue,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.string(),
});
export function createProjectHasValueFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectHasValue, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectHasValue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHasValue' from JSON`,
);
}
/** @internal */
export const CreateProjectHas1$inboundSchema: z.ZodType<
CreateProjectHas1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("header"),
key: HasKey$inboundSchema,
value: z.lazy(() => CreateProjectHasValue$inboundSchema),
});
export function createProjectHas1FromJSON(
jsonString: string,
): SafeParseResult<CreateProjectHas1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectHas1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectHas1' from JSON`,
);
}
/** @internal */
export const InternalRoutesHas$inboundSchema: z.ZodType<
InternalRoutesHas,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => CreateProjectHas1$inboundSchema),
z.lazy(() => CreateProjectHas2$inboundSchema),
]);
export function internalRoutesHasFromJSON(
jsonString: string,
): SafeParseResult<InternalRoutesHas, SDKValidationError> {
return safeParse(
jsonString,
(x) => InternalRoutesHas$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'InternalRoutesHas' from JSON`,
);
}
/** @internal */
export const InternalRoutesAction$inboundSchema: z.ZodNativeEnum<
typeof InternalRoutesAction
> = z.nativeEnum(InternalRoutesAction);
/** @internal */
export const InternalRoutesMitigate$inboundSchema: z.ZodType<
InternalRoutesMitigate,
z.ZodTypeDef,
unknown
> = z.object({
action: InternalRoutesAction$inboundSchema,
});
export function internalRoutesMitigateFromJSON(
jsonString: string,
): SafeParseResult<InternalRoutesMitigate, SDKValidationError> {
return safeParse(
jsonString,
(x) => InternalRoutesMitigate$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'InternalRoutesMitigate' from JSON`,
);
}
/** @internal */
export const InternalRoutes2$inboundSchema: z.ZodType<
InternalRoutes2,
z.ZodTypeDef,
unknown
> = z.object({
has: z.array(
z.union([
z.lazy(() => CreateProjectHas1$inboundSchema),
z.lazy(() => CreateProjectHas2$inboundSchema),
]),
),
mitigate: z.lazy(() => InternalRoutesMitigate$inboundSchema),
src: types.optional(types.string()),
});
export function internalRoutes2FromJSON(
jsonString: string,
): SafeParseResult<InternalRoutes2, SDKValidationError> {
return safeParse(
jsonString,
(x) => InternalRoutes2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'InternalRoutes2' from JSON`,
);
}
/** @internal */
export const InternalRoutes1$inboundSchema: z.ZodType<
InternalRoutes1,
z.ZodTypeDef,
unknown
> = z.object({
src: types.string(),
status: types.number(),
});
export function internalRoutes1FromJSON(
jsonString: string,
): SafeParseResult<InternalRoutes1, SDKValidationError> {
return safeParse(
jsonString,
(x) => InternalRoutes1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'InternalRoutes1' from JSON`,
);
}
/** @internal */
export const InternalRoutes$inboundSchema: z.ZodType<
InternalRoutes,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => InternalRoutes1$inboundSchema),
z.lazy(() => InternalRoutes2$inboundSchema),
]);
export function internalRoutesFromJSON(
jsonString: string,
): SafeParseResult<InternalRoutes, SDKValidationError> {
return safeParse(
jsonString,
(x) => InternalRoutes$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'InternalRoutes' from JSON`,
);
}
/** @internal */
export const CreateProjectAction$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectAction
> = z.nativeEnum(CreateProjectAction);
/** @internal */
export const ValuePreviousValue$inboundSchema: z.ZodType<
ValuePreviousValue,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number(), types.boolean()]);
export function valuePreviousValueFromJSON(
jsonString: string,
): SafeParseResult<ValuePreviousValue, SDKValidationError> {
return safeParse(
jsonString,
(x) => ValuePreviousValue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ValuePreviousValue' from JSON`,
);
}
/** @internal */
export const ValueCurrentValue$inboundSchema: z.ZodType<
ValueCurrentValue,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number(), types.boolean()]);
export function valueCurrentValueFromJSON(
jsonString: string,
): SafeParseResult<ValueCurrentValue, SDKValidationError> {
return safeParse(
jsonString,
(x) => ValueCurrentValue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ValueCurrentValue' from JSON`,
);
}
/** @internal */
export const Value3$inboundSchema: z.ZodType<Value3, z.ZodTypeDef, unknown> = z
.object({
previousValue: smartUnion([
types.string(),
types.number(),
types.boolean(),
]),
currentValue: smartUnion([types.string(), types.number(), types.boolean()]),
});
export function value3FromJSON(
jsonString: string,
): SafeParseResult<Value3, SDKValidationError> {
return safeParse(
jsonString,
(x) => Value3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Value3' from JSON`,
);
}
/** @internal */
export const CreateProjectValue$inboundSchema: z.ZodType<
CreateProjectValue,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => Value3$inboundSchema),
types.string(),
types.number(),
types.boolean(),
]);
export function createProjectValueFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectValue, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectValue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectValue' from JSON`,
);
}
/** @internal */
export const CreateProjectDismissedToasts$inboundSchema: z.ZodType<
CreateProjectDismissedToasts,
z.ZodTypeDef,
unknown
> = z.object({
key: types.string(),
dismissedAt: types.number(),
action: CreateProjectAction$inboundSchema,
value: types.nullable(
smartUnion([
z.lazy(() => Value3$inboundSchema),
types.string(),
types.number(),
types.boolean(),
]),
),
});
export function createProjectDismissedToastsFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectDismissedToasts, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectDismissedToasts$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectDismissedToasts' from JSON`,
);
}
/** @internal */
export const CreateProjectProjectsEnv$inboundSchema: z.ZodNativeEnum<
typeof CreateProjectProjectsEnv
> = z.nativeEnum(CreateProjectProjectsEnv);
/** @internal */
export const CreateProjectSamplingRules$inboundSchema: z.ZodType<
CreateProjectSamplingRules,
z.ZodTypeDef,
unknown
> = z.object({
rate: types.number(),
env: types.optional(CreateProjectProjectsEnv$inboundSchema),
requestPath: types.optional(types.string()),
});
export function createProjectSamplingRulesFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectSamplingRules, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectSamplingRules$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectSamplingRules' from JSON`,
);
}
/** @internal */
export const CreateProjectTracing$inboundSchema: z.ZodType<
CreateProjectTracing,
z.ZodTypeDef,
unknown
> = z.object({
domains: types.optional(types.string()),
ignorePaths: types.optional(z.array(types.string())),
samplingRules: types.optional(
z.array(z.lazy(() => CreateProjectSamplingRules$inboundSchema)),
),
});
export function createProjectTracingFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectTracing, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectTracing$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectTracing' from JSON`,
);
}
/** @internal */
export const CreateProjectResponseBody$inboundSchema: z.ZodType<
CreateProjectResponseBody,
z.ZodTypeDef,
unknown
> = z.object({
accountId: types.string(),
analytics: types.optional(Analytics$inboundSchema),
appliedCve55182Migration: types.optional(types.boolean()),
speedInsights: types.optional(SpeedInsights$inboundSchema),
autoExposeSystemEnvs: types.optional(types.boolean()),
autoAssignCustomDomains: types.optional(types.boolean()),
autoAssignCustomDomainsUpdatedBy: types.optional(types.string()),
buildCommand: z.nullable(types.string()).optional(),
commandForIgnoringBuildStep: z.nullable(types.string()).optional(),
connectConfigurations: z.nullable(
z.array(CreateProjectConnectConfigurations$inboundSchema),
).optional(),
connectConfigurationId: z.nullable(types.string()).optional(),
connectBuildsEnabled: types.optional(types.boolean()),
passiveConnectConfigurationId: z.nullable(types.string()).optional(),
createdAt: types.optional(types.number()),
customerSupportCodeVisibility: types.optional(types.boolean()),
crons: types.optional(CreateProjectCrons$inboundSchema),
dataCache: types.optional(CreateProjectDataCache$inboundSchema),
deploymentExpiration: DeploymentExpiration$inboundSchema,
expiration: types.optional(CreateProjectExpiration$inboundSchema),
devCommand: z.nullable(types.string()).optional(),
directoryListing: types.boolean(),
installCommand: z.nullable(types.string()).optional(),
env: types.optional(z.array(CreateProjectEnv$inboundSchema)),
customEnvironments: types.optional(z.array(CustomEnvironments$inboundSchema)),
framework: z.nullable(CreateProjectProjectsFramework$inboundSchema)
.optional(),
services: types.optional(z.array(Services$inboundSchema)),
gitForkProtection: types.optional(types.boolean()),
gitLFS: types.optional(types.boolean()),
id: types.string(),
ipBuckets: types.optional(z.array(CreateProjectIpBuckets$inboundSchema)),
jobs: types.optional(Jobs$inboundSchema),
latestDeployments: types.optional(z.array(LatestDeployments$inboundSchema)),
link: types.optional(Link$inboundSchema),
microfrontends: types.optional(CreateProjectMicrofrontends$inboundSchema),
name: types.string(),
nodeVersion: CreateProjectNodeVersion$inboundSchema,
optionsAllowlist: z.nullable(CreateProjectOptionsAllowlist$inboundSchema)
.optional(),
outputDirectory: z.nullable(types.string()).optional(),
passwordProtection: z.nullable(CreateProjectPasswordProtection$inboundSchema)
.optional(),
passport: z.nullable(CreateProjectPassport$inboundSchema).optional(),
protectionConfig: types.optional(ProtectionConfig$inboundSchema),
productionDeploymentsFastLane: types.optional(types.boolean()),
resourceConfig: CreateProjectProjectsResourceConfig$inboundSchema,
rollbackDescription: types.optional(
CreateProjectRollbackDescription$inboundSchema,
),
rollingRelease: z.nullable(RollingRelease$inboundSchema).optional(),
defaultResourceConfig: DefaultResourceConfig$inboundSchema,
rootDirectory: z.nullable(types.string()).optional(),
serverlessFunctionZeroConfigFailover: types.optional(types.boolean()),
skewProtectionBoundaryAt: types.optional(types.number()),
skewProtectionMaxAge: types.optional(types.number()),
skewProtectionAllowedDomains: types.optional(z.array(types.string())),
skipGitConnectDuringLink: types.optional(types.boolean()),
staticIps: types.optional(CreateProjectStaticIps$inboundSchema),
sourceFilesOutsideRootDirectory: types.optional(types.boolean()),
enableAffectedProjectsDeployments: types.optional(types.boolean()),
enableExternalRewriteCaching: types.optional(types.boolean()),
ssoProtection: z.nullable(CreateProjectProjectsSsoProtection$inboundSchema)
.optional(),
targets: types.optional(
z.record(types.nullable(CreateProjectTargets$inboundSchema)),
),
transferCompletedAt: types.optional(types.number()),
transferStartedAt: types.optional(types.number()),
transferToAccountId: types.optional(types.string()),
transferredFromAccountId: types.optional(types.string()),
updatedAt: types.optional(types.number()),
live: types.optional(types.boolean()),
enablePreviewFeedback: z.nullable(types.boolean()).optional(),
enableProductionFeedback: z.nullable(types.boolean()).optional(),
permissions: types.optional(CreateProjectPermissions$inboundSchema),
lastRollbackTarget: z.nullable(LastRollbackTarget$inboundSchema).optional(),
lastAliasRequest: z.nullable(LastAliasRequest$inboundSchema).optional(),
protectionBypass: types.optional(z.record(ProtectionBypass$inboundSchema)),
hasActiveBranches: types.optional(types.boolean()),
trustedIps: z.nullable(CreateProjectTrustedIps$inboundSchema).optional(),
trustedSources: z.nullable(
z.lazy(() => CreateProjectTrustedSources$inboundSchema),
).optional(),
gitComments: types.optional(
z.lazy(() => CreateProjectGitComments$inboundSchema),
),
gitProviderOptions: types.optional(
z.lazy(() => GitProviderOptions$inboundSchema),
),
paused: types.optional(types.boolean()),
concurrencyBucketName: types.optional(types.string()),
webAnalytics: types.optional(
z.lazy(() => CreateProjectWebAnalytics$inboundSchema),
),
security: types.optional(z.lazy(() => CreateProjectSecurity$inboundSchema)),
oidcTokenConfig: types.optional(
z.lazy(() => CreateProjectOidcTokenConfig$inboundSchema),
),
deploymentPolicy: z.nullable(
z.lazy(() => CreateProjectDeploymentPolicy$inboundSchema),
).optional(),
tier: types.optional(types.string()),
flatRateTier: types.optional(FlatRateTier$inboundSchema),
usageStatus: types.optional(z.lazy(() => UsageStatus$inboundSchema)),
features: types.optional(z.lazy(() => Features$inboundSchema)),
v0: types.optional(types.boolean()),
v0Created: types.optional(types.boolean()),
abuse: types.optional(z.lazy(() => CreateProjectAbuse$inboundSchema)),
internalRoutes: types.optional(
z.array(smartUnion([
z.lazy(() => InternalRoutes1$inboundSchema),
z.lazy(() =>
InternalRoutes2$inboundSchema
),
])),
),
hasDeployments: types.optional(types.boolean()),
dismissedToasts: types.optional(
z.array(z.lazy(() => CreateProjectDismissedToasts$inboundSchema)),
),
protectedSourcemaps: types.optional(types.boolean()),
tracing: types.optional(z.lazy(() => CreateProjectTracing$inboundSchema)),
avatar: z.nullable(types.string()).optional(),
});
export function createProjectResponseBodyFromJSON(
jsonString: string,
): SafeParseResult<CreateProjectResponseBody, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateProjectResponseBody$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateProjectResponseBody' from JSON`,
);
}