@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>
5,410 lines • 171 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 { FlagJSONValue, FlagJSONValue$inboundSchema } from "./flagjsonvalue.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export type CancelDeploymentRequest = {
/**
* The unique identifier of the deployment.
*/
id: string;
/**
* The Team identifier to perform the request on behalf of.
*/
teamId?: string | undefined;
/**
* The Team slug to perform the request on behalf of.
*/
slug?: string | undefined;
};
export type CancelDeploymentAliasAssignedAt = number | boolean;
export type CancelDeploymentBuild = {
env: Array<string>;
};
export type CancelDeploymentBuilds = {
use: string;
src?: string | undefined;
config?: { [k: string]: any } | undefined;
};
export const CancelDeploymentDeploymentsNodeVersion = {
TenDotX: "10.x",
TwelveDotX: "12.x",
FourteenDotX: "14.x",
SixteenDotX: "16.x",
EighteenDotX: "18.x",
TwentyDotX: "20.x",
TwentyTwoDotX: "22.x",
TwentyFourDotX: "24.x",
EightDot10DotX: "8.10.x",
} as const;
export type CancelDeploymentDeploymentsNodeVersion = ClosedEnum<
typeof CancelDeploymentDeploymentsNodeVersion
>;
export const CancelDeploymentFramework = {
ActixWeb: "actix-web",
Angular: "angular",
Ash: "ash",
Astro: "astro",
Axum: "axum",
Blitzjs: "blitzjs",
Brunch: "brunch",
Bun: "bun",
CreateReactApp: "create-react-app",
Django: "django",
Docusaurus: "docusaurus",
Docusaurus2: "docusaurus-2",
Dojo: "dojo",
Eleventy: "eleventy",
Elysia: "elysia",
Ember: "ember",
Eve: "eve",
Express: "express",
Fastapi: "fastapi",
Fasthtml: "fasthtml",
Fastify: "fastify",
Flask: "flask",
Gatsby: "gatsby",
Go: "go",
Gridsome: "gridsome",
H3: "h3",
Hexo: "hexo",
Hono: "hono",
Hugo: "hugo",
Hydrogen: "hydrogen",
IonicAngular: "ionic-angular",
IonicReact: "ionic-react",
Jekyll: "jekyll",
Koa: "koa",
Mastra: "mastra",
Middleman: "middleman",
Nestjs: "nestjs",
Nextjs: "nextjs",
Nitro: "nitro",
Node: "node",
Nuxtjs: "nuxtjs",
Parcel: "parcel",
Polymer: "polymer",
Preact: "preact",
Python: "python",
ReactRouter: "react-router",
Redwoodjs: "redwoodjs",
Remix: "remix",
Ruby: "ruby",
Rust: "rust",
Saber: "saber",
Sanity: "sanity",
SanityV2: "sanity-v2",
Sapper: "sapper",
Scully: "scully",
Services: "services",
Solidstart: "solidstart",
Solidstart1: "solidstart-1",
Stencil: "stencil",
Storybook: "storybook",
Svelte: "svelte",
Sveltekit: "sveltekit",
Sveltekit1: "sveltekit-1",
TanstackStart: "tanstack-start",
Umijs: "umijs",
Vite: "vite",
Vitepress: "vitepress",
Vue: "vue",
Vuepress: "vuepress",
Xmcp: "xmcp",
Zola: "zola",
} as const;
export type CancelDeploymentFramework = ClosedEnum<
typeof CancelDeploymentFramework
>;
export type CancelDeploymentSpeedInsights = {
id: string;
enabledAt?: number | undefined;
disabledAt?: number | undefined;
canceledAt?: number | undefined;
hasData?: boolean | undefined;
paidAt?: number | undefined;
};
export type CancelDeploymentWebAnalytics = {
id: string;
disabledAt?: number | undefined;
canceledAt?: number | undefined;
enabledAt?: number | undefined;
hasData?: true | undefined;
};
export type CancelDeploymentProjectSettings = {
nodeVersion?: CancelDeploymentDeploymentsNodeVersion | undefined;
buildCommand?: string | null | undefined;
devCommand?: string | null | undefined;
framework?: CancelDeploymentFramework | null | undefined;
commandForIgnoringBuildStep?: string | null | undefined;
installCommand?: string | null | undefined;
outputDirectory?: string | null | undefined;
speedInsights?: CancelDeploymentSpeedInsights | undefined;
webAnalytics?: CancelDeploymentWebAnalytics | undefined;
};
export const CancelDeploymentDeploymentsStatus = {
Error: "error",
Pending: "pending",
Ready: "ready",
Skipped: "skipped",
Timeout: "timeout",
} as const;
export type CancelDeploymentDeploymentsStatus = ClosedEnum<
typeof CancelDeploymentDeploymentsStatus
>;
export type CancelDeploymentIntegrations = {
status: CancelDeploymentDeploymentsStatus;
startedAt: number;
claimedAt?: number | undefined;
completedAt?: number | undefined;
skippedAt?: number | undefined;
skippedBy?: string | undefined;
};
/**
* Must be `http` or `https`.
*/
export const CancelDeploymentProtocol = {
Http: "http",
Https: "https",
} as const;
/**
* Must be `http` or `https`.
*/
export type CancelDeploymentProtocol = ClosedEnum<
typeof CancelDeploymentProtocol
>;
export type CancelDeploymentRemotePatterns = {
/**
* Must be `http` or `https`.
*/
protocol?: CancelDeploymentProtocol | undefined;
/**
* Can be literal or wildcard. Single `*` matches a single subdomain. Double `**` matches any number of subdomains.
*/
hostname: string;
/**
* Can be literal port such as `8080` or empty string meaning no port.
*/
port?: string | undefined;
/**
* Can be literal or wildcard. Single `*` matches a single path segment. Double `**` matches any number of path segments.
*/
pathname?: string | undefined;
/**
* Can be literal query string such as `?v=1` or empty string meaning no query string.
*/
search?: string | undefined;
};
export type CancelDeploymentLocalPatterns = {
/**
* Can be literal or wildcard. Single `*` matches a single path segment. Double `**` matches any number of path segments.
*/
pathname?: string | undefined;
/**
* Can be literal query string such as `?v=1` or empty string meaning no query string.
*/
search?: string | undefined;
};
export const CancelDeploymentFormats = {
ImageAvif: "image/avif",
ImageWebp: "image/webp",
} as const;
export type CancelDeploymentFormats = ClosedEnum<
typeof CancelDeploymentFormats
>;
export const CancelDeploymentContentDispositionType = {
Attachment: "attachment",
Inline: "inline",
} as const;
export type CancelDeploymentContentDispositionType = ClosedEnum<
typeof CancelDeploymentContentDispositionType
>;
export type CancelDeploymentImages = {
sizes?: Array<number> | undefined;
qualities?: Array<number> | undefined;
domains?: Array<string> | undefined;
remotePatterns?: Array<CancelDeploymentRemotePatterns> | undefined;
localPatterns?: Array<CancelDeploymentLocalPatterns> | undefined;
minimumCacheTTL?: number | undefined;
formats?: Array<CancelDeploymentFormats> | undefined;
dangerouslyAllowSVG?: boolean | undefined;
contentSecurityPolicy?: string | undefined;
contentDispositionType?: CancelDeploymentContentDispositionType | undefined;
};
/**
* Information about the deployment creator
*/
export type CancelDeploymentCreator = {
/**
* The ID of the user that created the deployment
*/
uid: string;
/**
* The username of the user that created the deployment
*/
username?: string | undefined;
/**
* The avatar of the user that created the deployment
*/
avatar?: string | undefined;
};
export const CancelDeploymentDeploymentsReadyState = {
Building: "BUILDING",
Error: "ERROR",
Initializing: "INITIALIZING",
Ready: "READY",
} as const;
export type CancelDeploymentDeploymentsReadyState = ClosedEnum<
typeof CancelDeploymentDeploymentsReadyState
>;
export type CancelDeploymentOutput = {
path: string;
functionName: string;
};
/**
* A partial representation of a Build used by the deployment endpoint.
*/
export type CancelDeploymentLambdas = {
id: string;
createdAt?: number | undefined;
readyState?: CancelDeploymentDeploymentsReadyState | undefined;
entrypoint?: string | null | undefined;
readyStateAt?: number | undefined;
output: Array<CancelDeploymentOutput>;
};
export const CancelDeploymentStatus = {
Blocked: "BLOCKED",
Building: "BUILDING",
Canceled: "CANCELED",
Error: "ERROR",
Initializing: "INITIALIZING",
Queued: "QUEUED",
Ready: "READY",
} as const;
export type CancelDeploymentStatus = ClosedEnum<typeof CancelDeploymentStatus>;
/**
* The team that owns the deployment if any
*/
export type CancelDeploymentTeam = {
id: string;
name: string;
slug: string;
avatar?: string | undefined;
};
/**
* If the deployment was created using a Custom Environment, then this property contains information regarding the environment used.
*/
export type CancelDeploymentCustomEnvironment2 = {
id: string;
};
/**
* The type of environment (production, preview, or development)
*/
export const CancelDeploymentCustomEnvironmentType = {
Development: "development",
Preview: "preview",
Production: "production",
} as const;
/**
* The type of environment (production, preview, or development)
*/
export type CancelDeploymentCustomEnvironmentType = ClosedEnum<
typeof CancelDeploymentCustomEnvironmentType
>;
/**
* The type of matching to perform
*/
export const CancelDeploymentCustomEnvironmentDeploymentsType = {
EndsWith: "endsWith",
Equals: "equals",
StartsWith: "startsWith",
} as const;
/**
* The type of matching to perform
*/
export type CancelDeploymentCustomEnvironmentDeploymentsType = ClosedEnum<
typeof CancelDeploymentCustomEnvironmentDeploymentsType
>;
/**
* Configuration for matching git branches to this environment
*/
export type CustomEnvironmentBranchMatcher = {
/**
* The type of matching to perform
*/
type: CancelDeploymentCustomEnvironmentDeploymentsType;
/**
* The pattern to match against branch names
*/
pattern: string;
};
/**
* A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`.
*/
export type CustomEnvironmentVerification = {
type: string;
domain: string;
value: string;
reason: string;
};
/**
* List of domains associated with this environment
*/
export type CustomEnvironmentDomains = {
name: string;
apexName: string;
projectId: string;
redirect?: string | null | undefined;
redirectStatusCode?: number | null | undefined;
gitBranch?: string | null | undefined;
customEnvironmentId?: string | null | undefined;
updatedAt?: number | undefined;
createdAt?: number | undefined;
/**
* `true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed.
*/
verified: boolean;
/**
* A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`.
*/
verification?: Array<CustomEnvironmentVerification> | undefined;
};
/**
* If the deployment was created using a Custom Environment, then this property contains information regarding the environment used.
*/
export type CancelDeploymentCustomEnvironment1 = {
/**
* Unique identifier for the custom environment (format: env_*)
*/
id: string;
/**
* URL-friendly name of the environment
*/
slug: string;
/**
* The type of environment (production, preview, or development)
*/
type: CancelDeploymentCustomEnvironmentType;
/**
* Optional description of the environment's purpose
*/
description?: string | undefined;
/**
* Configuration for matching git branches to this environment
*/
branchMatcher?: CustomEnvironmentBranchMatcher | undefined;
/**
* List of domains associated with this environment
*/
domains?: Array<CustomEnvironmentDomains> | undefined;
/**
* List of aliases for the current deployment
*/
currentDeploymentAliases?: Array<string> | undefined;
/**
* Timestamp when the environment was created
*/
createdAt: number;
/**
* Timestamp when the environment was last updated
*/
updatedAt: number;
};
export type CancelDeploymentCustomEnvironment =
| CancelDeploymentCustomEnvironment1
| CancelDeploymentCustomEnvironment2;
export const CancelDeploymentOomReport = {
OutOfMemory: "out-of-memory",
} as const;
export type CancelDeploymentOomReport = ClosedEnum<
typeof CancelDeploymentOomReport
>;
export type CancelDeploymentAliasWarning = {
code: string;
message: string;
link?: string | undefined;
action?: string | undefined;
};
/**
* The state of the deployment depending on the process of deploying, or if it is ready or in an error state
*/
export const CancelDeploymentReadyState = {
Blocked: "BLOCKED",
Building: "BUILDING",
Canceled: "CANCELED",
Error: "ERROR",
Initializing: "INITIALIZING",
Queued: "QUEUED",
Ready: "READY",
} as const;
/**
* The state of the deployment depending on the process of deploying, or if it is ready or in an error state
*/
export type CancelDeploymentReadyState = ClosedEnum<
typeof CancelDeploymentReadyState
>;
export const CancelDeploymentType = {
Lambdas: "LAMBDAS",
} as const;
export type CancelDeploymentType = ClosedEnum<typeof CancelDeploymentType>;
/**
* An object that will contain a `code` and a `message` when the aliasing fails, otherwise the value will be `null`
*/
export type CancelDeploymentAliasError = {
code: string;
message: string;
};
export const CancelDeploymentChecksState = {
Completed: "completed",
Registered: "registered",
Running: "running",
} as const;
export type CancelDeploymentChecksState = ClosedEnum<
typeof CancelDeploymentChecksState
>;
export const CancelDeploymentChecksConclusion = {
Canceled: "canceled",
Failed: "failed",
Skipped: "skipped",
Succeeded: "succeeded",
} as const;
export type CancelDeploymentChecksConclusion = ClosedEnum<
typeof CancelDeploymentChecksConclusion
>;
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody17Type =
{
Vercel: "vercel",
} as const;
export type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody17Type =
ClosedEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody17Type
>;
export type GitSource17 = {
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody17Type;
ref: string;
sha: string;
org: string;
repo: string;
repoPushedAt?: number | undefined;
};
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody16Type =
{
Bitbucket: "bitbucket",
} as const;
export type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody16Type =
ClosedEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody16Type
>;
export type GitSource16 = {
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody16Type;
ref: string;
sha: string;
owner?: string | undefined;
slug?: string | undefined;
workspaceUuid: string;
repoUuid: string;
};
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody15Type =
{
Gitlab: "gitlab",
} as const;
export type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody15Type =
ClosedEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody15Type
>;
export type GitSource15 = {
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody15Type;
ref: string;
sha: string;
projectId: number;
};
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody14Type =
{
GithubLimited: "github-limited",
} as const;
export type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody14Type =
ClosedEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody14Type
>;
export type GitSource14 = {
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody14Type;
ref: string;
sha: string;
repoId: number;
org?: string | undefined;
repo?: string | undefined;
};
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody13Type =
{
GithubCustomHost: "github-custom-host",
} as const;
export type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody13Type =
ClosedEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody13Type
>;
export type GitSource13 = {
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody13Type;
host: string;
ref: string;
sha: string;
repoId: number;
org?: string | undefined;
repo?: string | undefined;
};
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody12Type =
{
Github: "github",
} as const;
export type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody12Type =
ClosedEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody12Type
>;
export type GitSource12 = {
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody12Type;
ref: string;
sha: string;
repoId: number;
org?: string | undefined;
repo?: string | undefined;
};
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type =
{
Custom: "custom",
} as const;
export type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type =
ClosedEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type
>;
/**
* Allows custom git sources (local folder mounted to the container) in test mode
*/
export type GitSource11 = {
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type;
ref: string;
sha: string;
gitUrl: string;
};
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody10Type =
{
Vercel: "vercel",
} as const;
export type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody10Type =
ClosedEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody10Type
>;
export type GitSource10 = {
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody10Type;
org?: string | undefined;
repo?: string | undefined;
sha: string;
repoPushedAt?: number | undefined;
ref?: string | null | undefined;
prId?: number | null | undefined;
};
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type =
{
Bitbucket: "bitbucket",
} as const;
export type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type =
ClosedEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type
>;
export type GitSource9 = {
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type;
owner: string;
slug: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type =
{
Bitbucket: "bitbucket",
} as const;
export type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type =
ClosedEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type
>;
export type CancelDeploymentGitSource8 = {
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type;
workspaceUuid?: string | undefined;
repoUuid: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type =
{
Gitlab: "gitlab",
} as const;
export type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type =
ClosedEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type
>;
export type CancelDeploymentGitSourceProjectId = string | number;
export type CancelDeploymentGitSource7 = {
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type;
projectId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType =
{
GithubLimited: "github-limited",
} as const;
export type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType =
ClosedEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType
>;
export type CancelDeploymentGitSource6 = {
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType;
org: string;
repo: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType =
{
GithubLimited: "github-limited",
} as const;
export type CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType =
ClosedEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType
>;
export type CancelDeploymentGitSourceDeploymentsResponseRepoId =
| string
| number;
export type CancelDeploymentGitSource5 = {
type: CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType;
repoId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const CancelDeploymentGitSourceDeploymentsResponse200Type = {
GithubCustomHost: "github-custom-host",
} as const;
export type CancelDeploymentGitSourceDeploymentsResponse200Type = ClosedEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200Type
>;
export type CancelDeploymentGitSource4 = {
type: CancelDeploymentGitSourceDeploymentsResponse200Type;
host: string;
org: string;
repo: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const CancelDeploymentGitSourceDeploymentsResponseType = {
GithubCustomHost: "github-custom-host",
} as const;
export type CancelDeploymentGitSourceDeploymentsResponseType = ClosedEnum<
typeof CancelDeploymentGitSourceDeploymentsResponseType
>;
export type CancelDeploymentGitSourceDeploymentsRepoId = string | number;
export type CancelDeploymentGitSource3 = {
type: CancelDeploymentGitSourceDeploymentsResponseType;
host: string;
repoId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const CancelDeploymentGitSourceDeploymentsType = {
Github: "github",
} as const;
export type CancelDeploymentGitSourceDeploymentsType = ClosedEnum<
typeof CancelDeploymentGitSourceDeploymentsType
>;
export type CancelDeploymentGitSource2 = {
type: CancelDeploymentGitSourceDeploymentsType;
org: string;
repo: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const CancelDeploymentGitSourceType = {
Github: "github",
} as const;
export type CancelDeploymentGitSourceType = ClosedEnum<
typeof CancelDeploymentGitSourceType
>;
export type CancelDeploymentGitSourceRepoId = string | number;
export type CancelDeploymentGitSource1 = {
type: CancelDeploymentGitSourceType;
repoId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export type CancelDeploymentGitSource =
| GitSource13
| GitSource16
| GitSource17
| CancelDeploymentGitSource4
| GitSource11
| GitSource12
| GitSource14
| GitSource15
| CancelDeploymentGitSource2
| CancelDeploymentGitSource3
| CancelDeploymentGitSource6
| GitSource9
| CancelDeploymentGitSource1
| CancelDeploymentGitSource5
| CancelDeploymentGitSource7
| CancelDeploymentGitSource8
| GitSource10;
/**
* Current provisioning state
*/
export const CancelDeploymentState = {
Complete: "COMPLETE",
Pending: "PENDING",
Timeout: "TIMEOUT",
} as const;
/**
* Current provisioning state
*/
export type CancelDeploymentState = ClosedEnum<typeof CancelDeploymentState>;
/**
* Present when deployment was created with manual provisioning enabled, either explicitly or via the experimental BYOC git flow. The deployment stays in INITIALIZING until /continue is called.
*/
export type CancelDeploymentManualProvisioning = {
/**
* Current provisioning state
*/
state: CancelDeploymentState;
/**
* Timestamp when manual provisioning completed
*/
completedAt?: number | undefined;
};
/**
* If set it overrides the `projectSettings.nodeVersion` for this deployment.
*/
export const CancelDeploymentNodeVersion = {
TenDotX: "10.x",
TwelveDotX: "12.x",
FourteenDotX: "14.x",
SixteenDotX: "16.x",
EighteenDotX: "18.x",
TwentyDotX: "20.x",
TwentyTwoDotX: "22.x",
TwentyFourDotX: "24.x",
EightDot10DotX: "8.10.x",
} as const;
/**
* If set it overrides the `projectSettings.nodeVersion` for this deployment.
*/
export type CancelDeploymentNodeVersion = ClosedEnum<
typeof CancelDeploymentNodeVersion
>;
/**
* The public project information associated with the deployment.
*/
export type CancelDeploymentProject = {
id: string;
name: string;
framework?: string | null | undefined;
};
/**
* Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - ROLLING: in the process of having production traffic gradually transitioned. - PROMOTED: has seen production traffic
*/
export const CancelDeploymentReadySubstate = {
Promoted: "PROMOTED",
Rolling: "ROLLING",
Staged: "STAGED",
} as const;
/**
* Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - ROLLING: in the process of having production traffic gradually transitioned. - PROMOTED: has seen production traffic
*/
export type CancelDeploymentReadySubstate = ClosedEnum<
typeof CancelDeploymentReadySubstate
>;
/**
* Where was the deployment created from. Best-effort guess for metrics only — not authoritative; do not gate behavior on it.
*/
export const CancelDeploymentSource = {
ApiTriggerGitDeploy: "api-trigger-git-deploy",
Cli: "cli",
CloneRepo: "clone/repo",
Drop: "drop",
Git: "git",
Import: "import",
ImportRepo: "import/repo",
Redeploy: "redeploy",
V0Web: "v0-web",
} as const;
/**
* Where was the deployment created from. Best-effort guess for metrics only — not authoritative; do not gate behavior on it.
*/
export type CancelDeploymentSource = ClosedEnum<typeof CancelDeploymentSource>;
/**
* If defined, either `staging` if a staging alias in the format `<project>.<team>.now.sh` was assigned upon creation, or `production` if the aliases from `alias` were assigned. `null` value indicates the "preview" deployment.
*/
export const CancelDeploymentTarget = {
Production: "production",
Staging: "staging",
} as const;
/**
* If defined, either `staging` if a staging alias in the format `<project>.<team>.now.sh` was assigned upon creation, or `production` if the aliases from `alias` were assigned. `null` value indicates the "preview" deployment.
*/
export type CancelDeploymentTarget = ClosedEnum<typeof CancelDeploymentTarget>;
export type CancelDeploymentOidcTokenClaims = {
iss: string;
sub: string;
scope: string;
aud: string;
owner: string;
ownerId: string;
project: string;
projectId: string;
environment: string;
customEnvironmentId?: string | undefined;
plan?: string | undefined;
};
export const CancelDeploymentPlan = {
Enterprise: "enterprise",
Hobby: "hobby",
Pro: "pro",
} as const;
export type CancelDeploymentPlan = ClosedEnum<typeof CancelDeploymentPlan>;
/**
* The external platform that created the deployment (e.g. its display name).
*/
export type CancelDeploymentDeploymentsSource = {
/**
* Display name of the platform.
*/
name: string;
};
/**
* Whether the value is an opaque identifier or a URL.
*/
export const CancelDeploymentDeploymentsType = {
Id: "id",
Url: "url",
} as const;
/**
* Whether the value is an opaque identifier or a URL.
*/
export type CancelDeploymentDeploymentsType = ClosedEnum<
typeof CancelDeploymentDeploymentsType
>;
/**
* Reference back to the entity on the platform that initiated the deployment.
*/
export type CancelDeploymentOrigin = {
/**
* Whether the value is an opaque identifier or a URL.
*/
type: CancelDeploymentDeploymentsType;
/**
* The identifier or URL pointing to the originating entity.
*/
value: string;
};
/**
* The user on the external platform who triggered the deployment.
*/
export type CancelDeploymentDeploymentsCreator = {
/**
* Display name of the platform user.
*/
name: string;
/**
* URL of the platform user's avatar image.
*/
avatar?: string | undefined;
};
/**
* Metadata about the source platform that triggered the deployment. Allows us to map a deployment back to a platform (e.g. the chat that created it)
*/
export type CancelDeploymentPlatform = {
/**
* The external platform that created the deployment (e.g. its display name).
*/
source: CancelDeploymentDeploymentsSource;
/**
* Reference back to the entity on the platform that initiated the deployment.
*/
origin: CancelDeploymentOrigin;
/**
* The user on the external platform who triggered the deployment.
*/
creator: CancelDeploymentDeploymentsCreator;
/**
* Arbitrary key-value metadata provided by the platform.
*/
meta?: { [k: string]: string } | undefined;
};
export type CancelDeploymentCrons = {
schedule: string;
path: string;
};
export const CancelDeploymentArchitecture = {
Arm64: "arm64",
X8664: "x86_64",
} as const;
export type CancelDeploymentArchitecture = ClosedEnum<
typeof CancelDeploymentArchitecture
>;
export const CancelDeploymentMaxDuration2 = {
Max: "max",
} as const;
export type CancelDeploymentMaxDuration2 = ClosedEnum<
typeof CancelDeploymentMaxDuration2
>;
export type CancelDeploymentMaxDuration = number | CancelDeploymentMaxDuration2;
/**
* Queue trigger input event for v2beta (from vercel.json config). Consumer name is implicitly derived from the function path. Only one trigger per function is allowed.
*/
export type CancelDeploymentExperimentalTriggers2 = {
/**
* Event type - must be "queue/v2beta" (REQUIRED)
*/
type: "queue/v2beta";
/**
* Name of the queue topic to consume from (REQUIRED)
*/
topic: string;
/**
* Maximum number of delivery attempts for message processing (OPTIONAL) This represents the total number of times a message can be delivered, not the number of retries. Must be at least 1 if specified. Behavior when not specified depends on the server's default configuration.
*/
maxDeliveries?: number | undefined;
/**
* Delay in seconds before retrying failed executions (OPTIONAL) Behavior when not specified depends on the server's default configuration.
*/
retryAfterSeconds?: number | undefined;
/**
* Initial delay in seconds before first execution attempt (OPTIONAL) Must be 0 or greater. Use 0 for no initial delay. Behavior when not specified depends on the server's default configuration.
*/
initialDelaySeconds?: number | undefined;
/**
* Maximum number of concurrent executions for this consumer (OPTIONAL) Must be at least 1 if specified. Behavior when not specified depends on the server's default configuration.
*/
maxConcurrency?: number | undefined;
};
/**
* Queue trigger input event for v1beta (from vercel.json config). Requires explicit consumer name.
*/
export type CancelDeploymentExperimentalTriggers1 = {
/**
* Event type - must be "queue/v1beta" (REQUIRED)
*/
type: "queue/v1beta";
/**
* Name of the consumer group for this trigger (REQUIRED)
*/
consumer: string;
/**
* Name of the queue topic to consume from (REQUIRED)
*/
topic: string;
/**
* Maximum number of delivery attempts for message processing (OPTIONAL) This represents the total number of times a message can be delivered, not the number of retries. Must be at least 1 if specified. Behavior when not specified depends on the server's default configuration.
*/
maxDeliveries?: number | undefined;
/**
* Delay in seconds before retrying failed executions (OPTIONAL) Behavior when not specified depends on the server's default configuration.
*/
retryAfterSeconds?: number | undefined;
/**
* Initial delay in seconds before first execution attempt (OPTIONAL) Must be 0 or greater. Use 0 for no initial delay. Behavior when not specified depends on the server's default configuration.
*/
initialDelaySeconds?: number | undefined;
/**
* Maximum number of concurrent executions for this consumer (OPTIONAL) Must be at least 1 if specified. Behavior when not specified depends on the server's default configuration.
*/
maxConcurrency?: number | undefined;
};
export type CancelDeploymentExperimentalTriggers =
| CancelDeploymentExperimentalTriggers1
| CancelDeploymentExperimentalTriggers2;
export type CancelDeploymentFunctions = {
architecture?: CancelDeploymentArchitecture | undefined;
memory?: number | undefined;
maxDuration?: number | CancelDeploymentMaxDuration2 | undefined;
regions?: Array<string> | undefined;
functionFailoverRegions?: Array<string> | undefined;
runtime?: string | undefined;
includeFiles?: string | undefined;
excludeFiles?: string | undefined;
experimentalTriggers?:
| Array<
| CancelDeploymentExperimentalTriggers1
| CancelDeploymentExperimentalTriggers2
>
| undefined;
supportsCancellation?: boolean | undefined;
};
export type CancelDeploymentRoutes3 = {
src: string;
continue: boolean;
middleware: number;
};
export const RoutesHandle = {
Error: "error",
Filesystem: "filesystem",
Hit: "hit",
Miss: "miss",
Resource: "resource",
Rewrite: "rewrite",
} as const;
export type RoutesHandle = ClosedEnum<typeof RoutesHandle>;
export type CancelDeploymentRoutes2 = {
handle: RoutesHandle;
src?: string | undefined;
dest?: string | undefined;
status?: number | undefined;
};
export const CancelDeploymentHasDeploymentsType = {
Cookie: "cookie",
Header: "header",
Query: "query",
} as const;
export type CancelDeploymentHasDeploymentsType = ClosedEnum<
typeof CancelDeploymentHasDeploymentsType
>;
export type CancelDeploymentValueDeploymentsEq = string | number;
export type CancelDeploymentValueDeployments2 = {
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
re?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type CancelDeploymentHasDeploymentsValue =
| string
| CancelDeploymentValueDeployments2;
export type CancelDeploymentHas2 = {
type: CancelDeploymentHasDeploymentsType;
key: string;
value?: string | CancelDeploymentValueDeployments2 | undefined;
};
export type CancelDeploymentValueEq = string | number;
export type CancelDeploymentValue2 = {
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
re?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type CancelDeploymentHasValue = string | CancelDeploymentValue2;
export type CancelDeploymentHas1 = {
type: "host";
value: string | CancelDeploymentValue2;
};
export type RoutesHas =
| CancelDeploymentHas1
| (CancelDeploymentHas2 & { type: "cookie" })
| (CancelDeploymentHas2 & { type: "header" })
| (CancelDeploymentHas2 & { type: "query" });
export const CancelDeploymentMissingDeploymentsType = {
Cookie: "cookie",
Header: "header",
Query: "query",
} as const;
export type CancelDeploymentMissingDeploymentsType = ClosedEnum<
typeof CancelDeploymentMissingDeploymentsType
>;
export type CancelDeploymentValueDeploymentsResponse200Eq = string | number;
export type CancelDeploymentValueDeploymentsResponse2002 = {
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
re?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type CancelDeploymentMissingDeploymentsValue =
| string
| CancelDeploymentValueDeploymentsResponse2002;
export type CancelDeploymentMissing2 = {
type: CancelDeploymentMissingDeploymentsType;
key: string;
value?: string | CancelDeploymentValueDeploymentsResponse2002 | undefined;
};
export type CancelDeploymentValueDeploymentsResponseEq = string | number;
export type CancelDeploymentValueDeploymentsResponse2 = {
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
re?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type CancelDeploymentMissingValue =
| string
| CancelDeploymentValueDeploymentsResponse2;
export type CancelDeploymentMissing1 = {
type: "host";
value: string | CancelDeploymentValueDeploymentsResponse2;
};
export type RoutesMissing =
| CancelDeploymentMissing1
| (CancelDeploymentMissing2 & { type: "cookie" })
| (CancelDeploymentMissing2 & { type: "header" })
| (CancelDeploymentMissing2 & { type: "query" });
export const CancelDeploymentRoutesAction = {
Challenge: "challenge",
Deny: "deny",
} as const;
export type CancelDeploymentRoutesAction = ClosedEnum<
typeof CancelDeploymentRoutesAction
>;
export type RoutesMitigate = {
action: CancelDeploymentRoutesAction;
};
export const CancelDeploymentRoutesType = {
RequestHeaders: "request.headers",
RequestQuery: "request.query",
ResponseHeaders: "response.headers",
} as const;
export type CancelDeploymentRoutesType = ClosedEnum<
typeof CancelDeploymentRoutesType
>;
export const RoutesOp = {
Append: "append",
Delete: "delete",
Set: "set",
} as const;
export type RoutesOp = ClosedEnum<typeof RoutesOp>;
export type CancelDeploymentKeyEq = string | number;
export type CancelDeploymentKey2 = {
eq?: string | number | undefined;
neq?: string | undefined;
inc?: Array<string> | undefined;
ninc?: Array<string> | undefined;
pre?: string | undefined;
suf?: string | undefined;
gt?: number | undefined;
gte?: number | undefined;
lt?: number | undefined;
lte?: number | undefined;
};
export type RoutesKey = string | CancelDeploymentKey2;
export type CancelDeploymentRoutesTarget = {
key: string | CancelDeploymentKey2;
};
export type RoutesArgs = string | Array<string>;
export type RoutesTransforms = {
type: CancelDeploymentRoutesType;
op: RoutesOp;
target: CancelDeploymentRoutesTarget;
args?: string | Array<string> | undefined;
env?: Array<string> | undefined;
};
export type RoutesLocale = {
redirect?: { [k: string]: string } | undefined;
cookie?: string | undefined;
};
export const CancelDeploymentDestinationType = {
Service: "service",
} as const;
export type CancelDeploymentDestinationType = ClosedEnum<
typeof CancelDeploymentDestinationType
>;
export type CancelDeploymentDestination2 = {
type: CancelDeploymentDestinationType;
service: string;
/**
* Routing-only path used to select a route inside the target service.
*/
path?: string | undefined;
};
export type RoutesDestination = CancelDeploymentDestination2 | string;
export type CancelDeploymentRoutes1 = {
src: string;
dest?: string | undefined;
headers?: { [k: string]: string } | undefined;
methods?: Array<string> | undefined;
continue?: boolean | undefined;
override?: boolean | undefined;
caseSensitive?: boolean | undefined;
check?: boolean | undefined;
important?: boolean | undefined;
status?: number | undefined;
has?:
| Array<
| CancelDeploymentHas1
| (CancelDeploymentHas2 & { type: "cookie" })
| (CancelDeploymentHas2 & { type: "header" })
| (CancelDeploymentHas2 & { type: "query" })
>
| undefined;
missing?:
| Array<
| CancelDeploymentMissing1
| (CancelDeploymentMissing2 & { type: "cookie" })
| (CancelDeploymentMissing2 & { type: "header" })
| (CancelDeploymentMissing2 & { type: "query" })
>
| undefined;
mitigate?: RoutesMitigate | undefined;
transforms?: Array<RoutesTransforms> | undefined;
env?: Array<string> | undefined;
locale?: RoutesLocale | undefined;
/**
* Aliases for `src`, `dest`, and `status`. These provide consistency with the `rewrites`, `redirects`, and `headers` fields which use `source`, `destination`, and `statusCode`. During normalization, the string forms are converted to their canonical forms (`src`, `dest`, `status`) and stripped from the route object. `destination` may also be a service-targeted object, in which case routing is delegated into the named service's internal route table and the object is preserved as-is (not folded into `dest`).
*/
source?: string | undefined;
destination?: CancelDeploymentDestination2 | string | undefined;
statusCode?: number | undefined;
/**
* A middleware key within the `output` key under the build result. Overrides a `middleware` definition.
*/
middlewarePath?: string | undefined;
/**
* The original middleware matchers.
*/
middlewareRawSrc?: Array<string> | undefined;
/**
* A middleware index in the `middleware` key under the build result
*/
middleware?: number | undefined;
respectOriginCacheControl?: boolean | undefined;
};
export type CancelDeploymentRoutes =
| CancelDeploymentRoutes3
| CancelDeploymentRoutes1
| CancelDeploymentRoutes2;
export const CancelDeploymentGitRepoDeploymentsResponse200OwnerType = {
Team: "team",
User: "user",
} as const;
export type CancelDeploymentGitRepoDeploymentsResponse200OwnerType = ClosedEnum<
typeof CancelDeploymentGitRepoDeploymentsResponse200OwnerType
>;
export type CancelDeploymentGitRepo4 = {
org: string;
repo: string;
type: "vercel";
path: string;
defaultBranch: string;
name: string;
private: boolean;
ownerType: CancelDeploymentGitRepoDeploymentsResponse200OwnerType;
};
export const CancelDeploymentGitRepoDeploymentsResponseOwnerType = {
Team: "team",
User: "user",
} as const;
export type CancelDeploymentGitRepoDeploymentsResponseOwnerType = ClosedEnum<
typeof CancelDeploymentGitRepoDeploymentsResponseOwnerType
>;
export type CancelDeploymentGitRepo3 = {
owner: string;
repoUuid: string;
slug: string;
type: "bitbucket";
workspaceUuid: string;
path: string;
defaultBranch: string;
name: string;
private: boolean;
ownerType: CancelDeploymentGitRepoDeploymentsResponseOwnerType;
};
export const CancelDeploymentGitRepoDeploymentsOwnerType = {
Team: "team",
User: "user",
} as const;
export type CancelDeploymentGitRepoDeploymentsOwnerType = ClosedEnum<
typeof CancelDeploymentGitRepoDeploymentsOwnerType
>;
export type CancelDeploymentGitRepo2 = {
org: string;
repo: string;
repoId: number;
type: "github";
repoOwnerId: number;
path: string;
defaultBranch: string;
name: string;
private: boolean;
ownerType: CancelDeploymentGitRepoDeploymentsOwnerType;
};
export const CancelDeploymentGitRepoOwnerType = {
Team: "team",
User: "user",
} as const;
export type CancelDeploymentGitRepoOwnerType = ClosedEnum<
typeof CancelDeploymentGitRepoOwnerType
>;
export type CancelDeploymentGitRepo1 = {
namespace: string;
projectId: number;
type: "gitlab";
url: string;
path: string;
defaultBranch: string;
name: string;
private: boolean;
ownerType: CancelDeploymentGitRepoOwnerType;
};
export type CancelDeploymentGitRepo =
| CancelDeploymentGitRepo1
| CancelDeploymentGitRepo2
| CancelDeploymentGitRepo3
| CancelDeploymentGitRepo4;
/**
* Flags defined in the Build Output API, used by this deployment. Primarily used by the Toolbar to know about the used flags.
*/
export type CancelDeploymentFlags2 = {};
export type FlagsOptions = {
value: FlagJSONValue | null;
label?: string | undefined;
};
export type FlagsDefinitions = {
options?: Array<FlagsOptions> | undefined;
url?: string | undefined;
description?: string | undefined;
};
/**
* Flags defined in the Build Output API, used by this deployment. Primarily used by the Toolbar to know about the used flags.
*/
export type CancelDeploymentFlags1 = {
definitions: { [k: string]: FlagsDefinitions };
};
export type CancelDeploymentFlags =
| CancelDeploymentFlags1
| Array<CancelDeploymentFlags2>;
/**
* The result of the microfrontends config upload during deployment creation / build. Only set for default app deployments. The config upload is attempted during deployment create, and then again during the build. If the config is not in the root directory, or the deployment is prebuilt, the config cannot be uploaded during deployment create. The upload during deployment build finds the config even if it's not in the root directory, as it has access to all files. Uploading the config during create is ideal, as then all child deployments are guaranteed to have access to the default app deployment config even if the default app has not yet started building. If the config is not uploaded, the child app will show as building until the config has been uploaded during the default app build. - `success` - The config was uploaded successfully, either when the deployment was created or during the build. - `waiting_on_build` - The config could not be uploaded during deployment create, will be attempted again during the build. - `no_config` - No config was found. Only set once the build has not found the config in any of the deployment's files. - `undefined` - Legacy deployments, or there was an error uploading the config during deployment create.
*/
export const MicrofrontendsMfeConfigUploadState = {
NoConfig: "no_config",
Success: "success",
WaitingOnBuild: "waiting_on_build",
} as const;
/**
* The result of the microfrontends config upload during deployment creation / build. Only set for default app deployments. The config upload is attempted during deployment create, and then again during the build. If the config is not in the root directory, or the deployment is prebuilt, the config cannot be uploaded during deployment create. The upload during deployment build finds the config even if it's not in the root directory, as it has access to all files. Uploading the config during create is ideal, as then all child deployments are guaranteed to have access to the default app deployment config even if the default app has not yet started building. If the config is not uploaded, the child app will show as building until the config has been uploaded during the default app build. - `success` - The config was uploaded successfully, either when the deployment was created or during the build. - `waiting_on_build` - The config could not be uploaded during deployment create, will be attempted again during the build. - `no_config` - No config was found. Only set once the build has not found the config in any of the deployment's files. - `undefined` - Legacy deployments, or there was an error uploading the config during deployment create.
*/
export type MicrofrontendsMfeConfigUploadState = ClosedEnum<
typeof MicrofrontendsMfeConfigUploadState
>;
export type CancelDeploymentMicrofrontends2 = {
isDefaultApp: true;
/**
* The result of the microfrontends config upload during deployment creation / build. Only set for default app deployments. The config upload is attempted during deployment create, and then again during the build. If the config is not in the root directory, or the deployment is prebuilt, the config cannot be uploaded during deployment create. The upload during deployment build finds the config even if it's not in the root directory, as it has access to all files. Uploading the config during create is ideal, as then all child deployments are guaranteed to have access to the default app deployment config even if the default app has not yet started building. If the config is not uploaded, the child app will show as building until the config has been uploaded during the default app build. - `success` - The config was uploaded successfully, either when the deployment was created or during the build. - `waiting_on_build` - The config could not be uploaded during deployment create, will be attempted again during the build. - `no_config` - No config was found. Only set once the build has not found the config in any of the deployment's files. - `undefined` - Legacy deployments, or there was an error uploading the config during deployment create.
*/
mfeConfigUploadState?: MicrofrontendsMfeConfigUploadState | undefined;
/**
* The project name of the default app of this deployment's microfrontends group.
*/
defaultAppProjectName: string;
/**
* A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI.
*/
defaultRoute?: string | undefined;
/**
* The group of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together.
*/
groupIds: Array<string>;
};
export type CancelDeploymentMicrofrontends1 = {
isDefaultApp?: false | undefined;
/**
* The project name of the default app of this deployment's microfrontends group.
*/
defaultAppProjectName: string;
/**
* A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI.
*/
defaultRoute?: string | undefined;
/**
* The group of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together.
*/
groupIds: Array<string>;
};
export type CancelDeploymentMicrofrontends =
| CancelDeploymentMicrofrontends2
| CancelDeploymentMicrofrontends1;
export const CancelDeploymentFunctionType = {
Fluid: "fluid",
Standard: "standard",
} as const;
export type CancelDeploymentFunctionType = ClosedEnum<
typeof CancelDeploymentFunctionType
>;
export const CancelDeploymentFunctionMemoryType = {
Performance: "performance",
PerformanceXl: "performance_xl",
Standard: "standard",
StandardLegacy: "standard_legacy",
} as const;
export type CancelDeploymentFunctionMemoryType = ClosedEnum<
typeof CancelDeploymentFunctionMemoryType
>;
/**
* Build resource configuration snapshot for this deployment.
*/
export const CancelDeploymentConfiguration = {
SkipNamespaceQueue: "SKIP_NAMESPACE_QUEUE",
WaitForNamespaceQueue: "WAIT_FOR_NAMESPACE_QUEUE",
} as const;
/**
* Build resource configuration snapshot for this deployment.
*/
export type CancelDeploymentConfiguration = ClosedEnum<
typeof CancelDeploymentConfiguration
>;
/**
* Build resource configuration snapshot for this deployment.
*/
export type CancelDeploymentBuildQueue = {
/**
* Build resource configuration snapshot for this deployment.
*/
configuration?: CancelDeploymentConfiguration | undefined;
};
/**
* When elastic concurrency is used for this deployment, a value is set. The value tells the reason where the setting was coming from. - TEAM_SETTING: Inherited from team settings - PROJECT_SETTING: Inherited from project settings - SKIP_QUEUE: Manually triggered by user to skip the queues
*/
export const CancelDeploymentElasticConcurrency = {
ProjectSetting: "PROJECT_SETTING",
SkipQueue: "SKIP_QUEUE",
TeamSetting: "TEAM_SETTING",
} as const;
/**
* When elastic concurrency is used for this deployment, a value is set. The value tells the reason where the setting was coming from. - TEAM_SETTING: Inherited from team settings - PROJECT_SETTING: Inherited from project settings - SKIP_QUEUE: Manually triggered by user to skip the queues
*/
export type CancelDeploymentElasticConcurrency = ClosedEnum<
typeof CancelDeploymentElasticConcurrency
>;
/**
* Machine type that was used for the build.
*/
export const CancelDeploymentPurchaseType = {
Enhanced: "enhanced",
Standard: "standard",
Turbo: "turbo",
} as const;
/**
* Machine type that was used for the build.
*/
export type CancelDeploymentPurchaseType = ClosedEnum<
typeof CancelDeploymentPurchaseType
>;
export type CancelDeploymentBuildMachine = {
/**
* Machine type that was used for the build.
*/
purchaseType?: CancelDeploymentPurchaseType | null | undefined;
};
/**
* Build resource configuration snapshot for this deployment.
*/
export type CancelDeploymentResourceConfig = {
/**
* Build resource configuration snapshot for this deployment.
*/
buildQueue?: CancelDeploymentBuildQueue | undefined;
/**
* When elastic concurrency is used for this deployment, a value is set. The value tells the reason where the setting was coming from. - TEAM_SETTING: Inherited from team settings - PROJECT_SETTING: Inherited from project settings - SKIP_QUEUE: Manually triggered by user to skip the queues
*/
elasticConcurrency?: CancelDeploymentElasticConcurrency | undefined;
buildMachine?: CancelDeploymentBuildMachine | undefined;
};
/**
* Since February 2025 the configuration must include snapshot data at the time of deployment creation to capture properties for the /deployments/:id/config endpoint utilized for displaying Deployment Configuration on the frontend This is optional because older deployments may not have this data captured
*/
export type CancelDeploymentConfig = {
version?: number | undefined;
functionType: CancelDeploymentFunctionType;
functionMemoryType: CancelDeploymentFunctionMemoryType;
functionTimeout: number | null;
secureComputePrimaryRegion: string | null;
secureComputeFallbackRegion: string | null;
isUsingActiveCPU?: boolean | undefined;
/**
* Build resource configuration snapshot for this deployment.
*/
resourceConfig?: CancelDeploymentResourceConfig | undefined;
};
export const CancelDeploymentDeploymentsState = {
Failed: "failed",
Pending: "pending",
Succeeded: "succeeded",
} as const;
export type CancelDeploymentDeploymentsState = ClosedEnum<
typeof CancelDeploymentDeploymentsState
>;
/**
* Condensed check data. Retrieve individual check and check run data using api-checks v2 routes.
*/
export type CancelDeploymentDeploymentAlias = {
state: CancelDeploymentDeploymentsState;
startedAt: number;
completedAt?: number | undefined;
};
export type CancelDeploymentChecks = {
/**
* Condensed check data. Retrieve individual check and check run data using api-checks v2 routes.
*/
deploymentAlias: CancelDeploymentDeploymentAlias;
};
/**
* The NSNB decision code for the seat block. TODO: We should consolidate block types.
*/
export const CancelDeploymentBlockCode = {
CommitAuthorRequired: "COMMIT_AUTHOR_REQUIRED",
TeamAccessRequired: "TEAM_ACCESS_REQUIRED",
} as const;
/**
* The NSNB decision code for the seat block. TODO: We should consolidate block types.
*/
export type CancelDeploymentBlockCode = ClosedEnum<
typeof CancelDeploymentBlockCode
>;
export type CancelDeploymentGitUserId = string | number;
/**
* The git provider type associated with gitUserId.
*/
export const CancelDeploymentGitProvider = {
Bitbucket: "bitbucket",
Github: "github",
Gitlab: "gitlab",
} as const;
/**
* The git provider type associated with gitUserId.
*/
export type CancelDeploymentGitProvider = ClosedEnum<
typeof CancelDeploymentGitProvider
>;
/**
* NSNB Blocked metadata
*/
export type CancelDeploymentSeatBlock = {
/**
* The NSNB decision code for the seat block. TODO: We should consolidate block types.
*/
blockCode: CancelDeploymentBlockCode;
/**
* The blocked vercel user ID.
*/
userId?: string | undefined;
/**
* Determines if the user was verified during the block. In the git integration case, the commit sender was the author.
*/
isVerified?: boolean | undefined;
gitUserId?: string | number | undefined;
/**
* The git provider type associated with gitUserId.
*/
gitProvider?: CancelDeploymentGitProvider | undefined;
};
/**
* Commit metadata from the git commit author
*/
export type CancelDeploymentCommitMeta = {
/**
* Email from git commit author
*/
email?: string | undefined;
/**
* Name from git commit author
*/
name?: string | undefined;
/**
* Whether the commit was signed/verified (GitHub only, others return undefined)
*/
isVerified?: boolean | undefined;
};
export type CancelDeploymentId = string | number;
/**
* Git provider user associated with the commit author email (only set if resolved)
*/
export type CancelDeploymentGitUser = {
id: string | number;
/**
* Git provider username/login
*/
login: string;
/**
* User type
*/
type?: string | undefined;
/**
* The git provider (github, gitlab, bitbucket)
*/
provider?: string | undefined;
};
/**
* Vercel user linked to the git provider account (only set if resolved)
*/
export type CancelDeploymentVercelUser = {
/**
* Vercel user ID
*/
id: string;
/**
* Vercel username
*/
username: string;
/**
* Team roles at time of deployment
*/
teamRoles?: Array<string> | undefined;
};
/**
* Attribution metadata for the deployment, linking commit author to git and Vercel users. Only populated when the `enable-deployment-attribution` flag is enabled.
*/
export type CancelDeploymentAttribution = {
/**
* Commit metadata from the git commit author
*/
commitMeta?: CancelDeploymentCommitMeta | undefined;
/**
* Git provider user associated with the commit author email (only set if resolved)
*/
gitUser?: CancelDeploymentGitUser | undefined;
/**
* Vercel user linked to the git provider account (only set if resolved)
*/
vercelUser?: CancelDeploymentVercelUser | undefined;
};
/**
* The private deployment representation of a Deployment.
*/
export type CancelDeploymentResponseBody = {
aliasAssignedAt?: number | boolean | null | undefined;
alwaysRefuseToBuild?: boolean | undefined;
build: CancelDeploymentBuild;
buildArtifactUrls?: Array<string> | undefined;
builds?: Array<CancelDeploymentBuilds> | undefined;
env: Array<string>;
inspectorUrl: string | null;
isInConcurrentBuildsQueue: boolean;
isInSystemBuildsQueue: boolean;
projectSettings: CancelDeploymentProjectSettings;
integrations?: CancelDeploymentIntegrations | undefined;
images?: CancelDeploymentImages | undefined;
/**
* A list of all the aliases (default aliases, staging aliases and production aliases) that were assigned upon deployment creation
*/
alias?: Array<string> | undefined;
/**
* A boolean that will be true when the aliases from the alias property were assigned successfully
*/
aliasAssigned: boolean;
bootedAt: number;
buildingAt: number;
/**
* Since April 2025 it necessary for On-Demand Concurrency Minutes calculation
*/
buildContainerFinishedAt?: number | undefined;
buildSkipped: boolean;
/**
* Information about the deployment creator
*/
creator: CancelDeploymentCreator;
initReadyAt?: number | undefined;
isFirstBranchDeployment?: boolean | undefined;
lambdas?: Array<CancelDeploymentLambdas> | undefined;
/**
* A boolean representing if the deployment is public or not. By default this is `false`
*/
public: boolean;
ready?: number | undefined;
status: CancelDeploymentStatus;
/**
* The team that owns the deployment if any
*/
team?: CancelDeploymentTeam | undefined;
/**
* An array of domains that were provided by the user when creating the Deployment.
*/
userAliases?: Array<string> | undefined;
/**
* Whether or not preview comments are enabled for the deployment
*/
previewCommentsEnabled?: boolean | undefined;
ttyBuildLogs?: boolean | undefined;
customEnvironment?:
| CancelDeploymentCustomEnvironment1
| CancelDeploymentCustomEnvironment2
| undefined;
oomReport?: CancelDeploymentOomReport | undefined;
readyStateReason?: string | undefined;
aliasWarning?: CancelDeploymentAliasWarning | null | undefined;
/**
* A string holding the unique ID of the deployment
*/
id: string;
/**
* A number containing the date when the deployment was created in milliseconds
*/
createdAt: number;
/**
* The state of the deployment depending on the process of deploying, or if it is ready or in an error state
*/
readyState: CancelDeploymentReadyState;
/**
* The name of the project associated with the deployment at the time that the deployment was created
*/
name: string;
type: CancelDeploymentType;
errorMessage?: string | null | undefined;
/**
* An object that will contain a `code` and a `message` when the aliasing fails, otherwise the value will be `null`
*/
aliasError?: CancelDeploymentAliasError | null | undefined;
aliasFinal?: string | null | undefined;
/**
* applies to custom domains only, defaults to `true`
*/
autoAssignCustomDomains?: boolean | undefined;
automaticAliases?: Array<string> | undefined;
buildErrorAt?: number | undefined;
checksState?: CancelDeploymentChecksState | undefined;
checksConclusion?: CancelDeploymentChecksConclusion | undefined;
/**
* A number containing the date when the deployment was deleted at milliseconds
*/
deletedAt?: number | null | undefined;
/**
* Computed field that is only available for deployments with a microfrontend configuration.
*/
defaultRoute?: string | undefined;
canceledAt?: number | undefined;
errorCode?: string | undefined;
errorLink?: string | undefined;
errorStep?: string | undefined;
/**
* Since November 2023 this field defines a set of regions that we will deploy the lambda to passively Lambdas will be deployed to these regions but only invoked if all of the primary `regions` are marked as out of service
*/
passiveRegions?: Array<string> | undefined;
gitSource?:
| GitSource13
| GitSource16
| GitSource17
| CancelDeploymentGitSource4
| GitSource11
| GitSource12
| GitSource14
| GitSource15
| CancelDeploymentGitSource2
| CancelDeploymentGitSource3
| CancelDeploymentGitSource6
| GitSource9
| CancelDeploymentGitSource1
| CancelDeploymentGitSource5
| CancelDeploymentGitSource7
| CancelDeploymentGitSource8
| GitSource10
| undefined;
/**
* Present when deployment was created with manual provisioning enabled, either explicitly or via the experimental BYOC git flow. The deployment stays in INITIALIZING until /continue is called.
*/
manualProvisioning?: CancelDeploymentManualProvisioning | undefined;
meta: { [k: string]: string };
originCacheRegion?: string | undefined;
/**
* If set it overrides the `projectSettings.nodeVersion` for this deployment.
*/
nodeVersion?: CancelDeploymentNodeVersion | undefined;
/**
* The public project information associated with the deployment.
*/
project?: CancelDeploymentProject | undefined;
prebuilt?: boolean | undefined;
/**
* Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - ROLLING: in the process of having production traffic gradually transitioned. - PROMOTED: has seen production traffic
*/
readySubstate?: CancelDeploymentReadySubstate | undefined;
/**
* The regions the deployment exists in
*/
regions: Array<string>;
/**
* flag to indicate if the deployment was deleted by retention policy
*/
softDeletedByRetention?: boolean | undefined;
/**
* Where was the deployment created from. Best-effort guess for metrics only — not authoritative; do not gate behavior on it.
*/
source?: CancelDeploymentSource | undefined;
/**
* If defined, either `staging` if a staging alias in the format `<project>.<team>.now.sh` was assigned upon creation, or `production` if the aliases from `alias` were assigned. `null` value indicates the "preview" deployment.
*/
target?: CancelDeploymentTarget | null | undefined;
/**
* A number containing the date when the deployment was undeleted at milliseconds
*/
undeletedAt?: number | undefined;
/**
* A string with the unique URL of the deployment
*/
url: string;
/**
* Since January 2025 User-configured deployment ID for skew protection with pre-built deployments. This is set when users configure a custom deploymentId in their next.config.js file. This allows Next.js to use skew protection even when deployments are pre-built outside of Vercel's build system.
*/
userConfiguredDeploymentId?: string | undefined;
/**
* The platform version that was used to create the deployment.
*/
version: number;
oidcTokenClaims?: CancelDeploymentOidcTokenClaims | undefined;
projectId: string;
plan: CancelDeploymentPlan;
/**
* Metadata about the source platform that triggered the deployment. Allows us to map a deployment back to a platform (e.g. the chat that created it)
*/
platform?: CancelDeploymentPlatform | undefined;
connectBuildsEnabled?: boolean | undefined;
connectConfigurationId?: string | undefined;
createdIn: string;
crons?: Array<CancelDeploymentCrons> | undefined;
functions?: { [k: string]: CancelDeploymentFunctions } | null | undefined;
monorepoManager?: string | null | undefined;
ownerId: string;
/**
* Since November 2023 this field defines a Secure Compute network that will only be used to deploy passive lambdas to (as in passiveRegions)
*/
passiveConnectConfigurationId?: string | undefined;
routes:
| Array<
| CancelDeploymentRoutes3
| CancelDeploymentRoutes1
| CancelDeploymentRoutes2
>
| null;
gitRepo?:
| CancelDeploymentGitRepo1
| CancelDeploymentGitRepo2
| CancelDeploymentGitRepo3
| CancelDeploymentGitRepo4
| null
| undefined;
flags?: CancelDeploymentFlags1 | Array<CancelDeploymentFlags2> | undefined;
microfrontends?:
| CancelDeploymentMicrofrontends2
| CancelDeploymentMicrofrontends1
| undefined;
/**
* Since February 2025 the configuration must include snapshot data at the time of deployment creation to capture properties for the /deployments/:id/config endpoint utilized for displaying Deployment Configuration on the frontend This is optional because older deployments may not have this data captured
*/
config?: CancelDeploymentConfig | undefined;
checks?: CancelDeploymentChecks | undefined;
/**
* NSNB Blocked metadata
*/
seatBlock?: CancelDeploymentSeatBlock | undefined;
/**
* Attribution metadata for the deployment, linking commit author to git and Vercel users. Only populated when the `enable-deployment-attribution` flag is enabled.
*/
attribution?: CancelDeploymentAttribution | undefined;
};
/** @internal */
export type CancelDeploymentRequest$Outbound = {
id: string;
teamId?: string | undefined;
slug?: string | undefined;
};
/** @internal */
export const CancelDeploymentRequest$outboundSchema: z.ZodType<
CancelDeploymentRequest$Outbound,
z.ZodTypeDef,
CancelDeploymentRequest
> = z.object({
id: z.string(),
teamId: z.string().optional(),
slug: z.string().optional(),
});
export function cancelDeploymentRequestToJSON(
cancelDeploymentRequest: CancelDeploymentRequest,
): string {
return JSON.stringify(
CancelDeploymentRequest$outboundSchema.parse(cancelDeploymentRequest),
);
}
/** @internal */
export const CancelDeploymentAliasAssignedAt$inboundSchema: z.ZodType<
CancelDeploymentAliasAssignedAt,
z.ZodTypeDef,
unknown
> = smartUnion([types.number(), types.boolean()]);
export function cancelDeploymentAliasAssignedAtFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentAliasAssignedAt, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentAliasAssignedAt$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentAliasAssignedAt' from JSON`,
);
}
/** @internal */
export const CancelDeploymentBuild$inboundSchema: z.ZodType<
CancelDeploymentBuild,
z.ZodTypeDef,
unknown
> = z.object({
env: z.array(types.string()),
});
export function cancelDeploymentBuildFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentBuild, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentBuild$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentBuild' from JSON`,
);
}
/** @internal */
export const CancelDeploymentBuilds$inboundSchema: z.ZodType<
CancelDeploymentBuilds,
z.ZodTypeDef,
unknown
> = z.object({
use: types.string(),
src: types.optional(types.string()),
config: types.optional(z.record(z.any())),
});
export function cancelDeploymentBuildsFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentBuilds, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentBuilds$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentBuilds' from JSON`,
);
}
/** @internal */
export const CancelDeploymentDeploymentsNodeVersion$inboundSchema:
z.ZodNativeEnum<typeof CancelDeploymentDeploymentsNodeVersion> = z.nativeEnum(
CancelDeploymentDeploymentsNodeVersion,
);
/** @internal */
export const CancelDeploymentFramework$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentFramework
> = z.nativeEnum(CancelDeploymentFramework);
/** @internal */
export const CancelDeploymentSpeedInsights$inboundSchema: z.ZodType<
CancelDeploymentSpeedInsights,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
enabledAt: types.optional(types.number()),
disabledAt: types.optional(types.number()),
canceledAt: types.optional(types.number()),
hasData: types.optional(types.boolean()),
paidAt: types.optional(types.number()),
});
export function cancelDeploymentSpeedInsightsFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentSpeedInsights, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentSpeedInsights$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentSpeedInsights' from JSON`,
);
}
/** @internal */
export const CancelDeploymentWebAnalytics$inboundSchema: z.ZodType<
CancelDeploymentWebAnalytics,
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 cancelDeploymentWebAnalyticsFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentWebAnalytics, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentWebAnalytics$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentWebAnalytics' from JSON`,
);
}
/** @internal */
export const CancelDeploymentProjectSettings$inboundSchema: z.ZodType<
CancelDeploymentProjectSettings,
z.ZodTypeDef,
unknown
> = z.object({
nodeVersion: types.optional(
CancelDeploymentDeploymentsNodeVersion$inboundSchema,
),
buildCommand: z.nullable(types.string()).optional(),
devCommand: z.nullable(types.string()).optional(),
framework: z.nullable(CancelDeploymentFramework$inboundSchema).optional(),
commandForIgnoringBuildStep: z.nullable(types.string()).optional(),
installCommand: z.nullable(types.string()).optional(),
outputDirectory: z.nullable(types.string()).optional(),
speedInsights: types.optional(
z.lazy(() => CancelDeploymentSpeedInsights$inboundSchema),
),
webAnalytics: types.optional(
z.lazy(() => CancelDeploymentWebAnalytics$inboundSchema),
),
});
export function cancelDeploymentProjectSettingsFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentProjectSettings, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentProjectSettings$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentProjectSettings' from JSON`,
);
}
/** @internal */
export const CancelDeploymentDeploymentsStatus$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentDeploymentsStatus
> = z.nativeEnum(CancelDeploymentDeploymentsStatus);
/** @internal */
export const CancelDeploymentIntegrations$inboundSchema: z.ZodType<
CancelDeploymentIntegrations,
z.ZodTypeDef,
unknown
> = z.object({
status: CancelDeploymentDeploymentsStatus$inboundSchema,
startedAt: types.number(),
claimedAt: types.optional(types.number()),
completedAt: types.optional(types.number()),
skippedAt: types.optional(types.number()),
skippedBy: types.optional(types.string()),
});
export function cancelDeploymentIntegrationsFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentIntegrations, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentIntegrations$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentIntegrations' from JSON`,
);
}
/** @internal */
export const CancelDeploymentProtocol$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentProtocol
> = z.nativeEnum(CancelDeploymentProtocol);
/** @internal */
export const CancelDeploymentRemotePatterns$inboundSchema: z.ZodType<
CancelDeploymentRemotePatterns,
z.ZodTypeDef,
unknown
> = z.object({
protocol: types.optional(CancelDeploymentProtocol$inboundSchema),
hostname: types.string(),
port: types.optional(types.string()),
pathname: types.optional(types.string()),
search: types.optional(types.string()),
});
export function cancelDeploymentRemotePatternsFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentRemotePatterns, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentRemotePatterns$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentRemotePatterns' from JSON`,
);
}
/** @internal */
export const CancelDeploymentLocalPatterns$inboundSchema: z.ZodType<
CancelDeploymentLocalPatterns,
z.ZodTypeDef,
unknown
> = z.object({
pathname: types.optional(types.string()),
search: types.optional(types.string()),
});
export function cancelDeploymentLocalPatternsFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentLocalPatterns, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentLocalPatterns$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentLocalPatterns' from JSON`,
);
}
/** @internal */
export const CancelDeploymentFormats$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentFormats
> = z.nativeEnum(CancelDeploymentFormats);
/** @internal */
export const CancelDeploymentContentDispositionType$inboundSchema:
z.ZodNativeEnum<typeof CancelDeploymentContentDispositionType> = z.nativeEnum(
CancelDeploymentContentDispositionType,
);
/** @internal */
export const CancelDeploymentImages$inboundSchema: z.ZodType<
CancelDeploymentImages,
z.ZodTypeDef,
unknown
> = z.object({
sizes: types.optional(z.array(types.number())),
qualities: types.optional(z.array(types.number())),
domains: types.optional(z.array(types.string())),
remotePatterns: types.optional(
z.array(z.lazy(() => CancelDeploymentRemotePatterns$inboundSchema)),
),
localPatterns: types.optional(
z.array(z.lazy(() => CancelDeploymentLocalPatterns$inboundSchema)),
),
minimumCacheTTL: types.optional(types.number()),
formats: types.optional(z.array(CancelDeploymentFormats$inboundSchema)),
dangerouslyAllowSVG: types.optional(types.boolean()),
contentSecurityPolicy: types.optional(types.string()),
contentDispositionType: types.optional(
CancelDeploymentContentDispositionType$inboundSchema,
),
});
export function cancelDeploymentImagesFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentImages, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentImages$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentImages' from JSON`,
);
}
/** @internal */
export const CancelDeploymentCreator$inboundSchema: z.ZodType<
CancelDeploymentCreator,
z.ZodTypeDef,
unknown
> = z.object({
uid: types.string(),
username: types.optional(types.string()),
avatar: types.optional(types.string()),
});
export function cancelDeploymentCreatorFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentCreator, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentCreator$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentCreator' from JSON`,
);
}
/** @internal */
export const CancelDeploymentDeploymentsReadyState$inboundSchema:
z.ZodNativeEnum<typeof CancelDeploymentDeploymentsReadyState> = z.nativeEnum(
CancelDeploymentDeploymentsReadyState,
);
/** @internal */
export const CancelDeploymentOutput$inboundSchema: z.ZodType<
CancelDeploymentOutput,
z.ZodTypeDef,
unknown
> = z.object({
path: types.string(),
functionName: types.string(),
});
export function cancelDeploymentOutputFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentOutput, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentOutput$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentOutput' from JSON`,
);
}
/** @internal */
export const CancelDeploymentLambdas$inboundSchema: z.ZodType<
CancelDeploymentLambdas,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
createdAt: types.optional(types.number()),
readyState: types.optional(
CancelDeploymentDeploymentsReadyState$inboundSchema,
),
entrypoint: z.nullable(types.string()).optional(),
readyStateAt: types.optional(types.number()),
output: z.array(z.lazy(() => CancelDeploymentOutput$inboundSchema)),
});
export function cancelDeploymentLambdasFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentLambdas, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentLambdas$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentLambdas' from JSON`,
);
}
/** @internal */
export const CancelDeploymentStatus$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentStatus
> = z.nativeEnum(CancelDeploymentStatus);
/** @internal */
export const CancelDeploymentTeam$inboundSchema: z.ZodType<
CancelDeploymentTeam,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
slug: types.string(),
avatar: types.optional(types.string()),
});
export function cancelDeploymentTeamFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentTeam, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentTeam$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentTeam' from JSON`,
);
}
/** @internal */
export const CancelDeploymentCustomEnvironment2$inboundSchema: z.ZodType<
CancelDeploymentCustomEnvironment2,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
});
export function cancelDeploymentCustomEnvironment2FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentCustomEnvironment2, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CancelDeploymentCustomEnvironment2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentCustomEnvironment2' from JSON`,
);
}
/** @internal */
export const CancelDeploymentCustomEnvironmentType$inboundSchema:
z.ZodNativeEnum<typeof CancelDeploymentCustomEnvironmentType> = z.nativeEnum(
CancelDeploymentCustomEnvironmentType,
);
/** @internal */
export const CancelDeploymentCustomEnvironmentDeploymentsType$inboundSchema:
z.ZodNativeEnum<typeof CancelDeploymentCustomEnvironmentDeploymentsType> = z
.nativeEnum(CancelDeploymentCustomEnvironmentDeploymentsType);
/** @internal */
export const CustomEnvironmentBranchMatcher$inboundSchema: z.ZodType<
CustomEnvironmentBranchMatcher,
z.ZodTypeDef,
unknown
> = z.object({
type: CancelDeploymentCustomEnvironmentDeploymentsType$inboundSchema,
pattern: types.string(),
});
export function customEnvironmentBranchMatcherFromJSON(
jsonString: string,
): SafeParseResult<CustomEnvironmentBranchMatcher, SDKValidationError> {
return safeParse(
jsonString,
(x) => CustomEnvironmentBranchMatcher$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CustomEnvironmentBranchMatcher' from JSON`,
);
}
/** @internal */
export const CustomEnvironmentVerification$inboundSchema: z.ZodType<
CustomEnvironmentVerification,
z.ZodTypeDef,
unknown
> = z.object({
type: types.string(),
domain: types.string(),
value: types.string(),
reason: types.string(),
});
export function customEnvironmentVerificationFromJSON(
jsonString: string,
): SafeParseResult<CustomEnvironmentVerification, SDKValidationError> {
return safeParse(
jsonString,
(x) => CustomEnvironmentVerification$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CustomEnvironmentVerification' from JSON`,
);
}
/** @internal */
export const CustomEnvironmentDomains$inboundSchema: z.ZodType<
CustomEnvironmentDomains,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
apexName: types.string(),
projectId: types.string(),
redirect: z.nullable(types.string()).optional(),
redirectStatusCode: z.nullable(types.number()).optional(),
gitBranch: z.nullable(types.string()).optional(),
customEnvironmentId: z.nullable(types.string()).optional(),
updatedAt: types.optional(types.number()),
createdAt: types.optional(types.number()),
verified: types.boolean(),
verification: types.optional(
z.array(z.lazy(() => CustomEnvironmentVerification$inboundSchema)),
),
});
export function customEnvironmentDomainsFromJSON(
jsonString: string,
): SafeParseResult<CustomEnvironmentDomains, SDKValidationError> {
return safeParse(
jsonString,
(x) => CustomEnvironmentDomains$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CustomEnvironmentDomains' from JSON`,
);
}
/** @internal */
export const CancelDeploymentCustomEnvironment1$inboundSchema: z.ZodType<
CancelDeploymentCustomEnvironment1,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
slug: types.string(),
type: CancelDeploymentCustomEnvironmentType$inboundSchema,
description: types.optional(types.string()),
branchMatcher: types.optional(
z.lazy(() => CustomEnvironmentBranchMatcher$inboundSchema),
),
domains: types.optional(
z.array(z.lazy(() => CustomEnvironmentDomains$inboundSchema)),
),
currentDeploymentAliases: types.optional(z.array(types.string())),
createdAt: types.number(),
updatedAt: types.number(),
});
export function cancelDeploymentCustomEnvironment1FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentCustomEnvironment1, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CancelDeploymentCustomEnvironment1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentCustomEnvironment1' from JSON`,
);
}
/** @internal */
export const CancelDeploymentCustomEnvironment$inboundSchema: z.ZodType<
CancelDeploymentCustomEnvironment,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => CancelDeploymentCustomEnvironment1$inboundSchema),
z.lazy(() => CancelDeploymentCustomEnvironment2$inboundSchema),
]);
export function cancelDeploymentCustomEnvironmentFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentCustomEnvironment, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentCustomEnvironment$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentCustomEnvironment' from JSON`,
);
}
/** @internal */
export const CancelDeploymentOomReport$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentOomReport
> = z.nativeEnum(CancelDeploymentOomReport);
/** @internal */
export const CancelDeploymentAliasWarning$inboundSchema: z.ZodType<
CancelDeploymentAliasWarning,
z.ZodTypeDef,
unknown
> = z.object({
code: types.string(),
message: types.string(),
link: types.optional(types.string()),
action: types.optional(types.string()),
});
export function cancelDeploymentAliasWarningFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentAliasWarning, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentAliasWarning$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentAliasWarning' from JSON`,
);
}
/** @internal */
export const CancelDeploymentReadyState$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentReadyState
> = z.nativeEnum(CancelDeploymentReadyState);
/** @internal */
export const CancelDeploymentType$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentType
> = z.nativeEnum(CancelDeploymentType);
/** @internal */
export const CancelDeploymentAliasError$inboundSchema: z.ZodType<
CancelDeploymentAliasError,
z.ZodTypeDef,
unknown
> = z.object({
code: types.string(),
message: types.string(),
});
export function cancelDeploymentAliasErrorFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentAliasError, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentAliasError$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentAliasError' from JSON`,
);
}
/** @internal */
export const CancelDeploymentChecksState$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentChecksState
> = z.nativeEnum(CancelDeploymentChecksState);
/** @internal */
export const CancelDeploymentChecksConclusion$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentChecksConclusion
> = z.nativeEnum(CancelDeploymentChecksConclusion);
/** @internal */
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody17Type$inboundSchema:
z.ZodNativeEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody17Type
> = z.nativeEnum(
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody17Type,
);
/** @internal */
export const GitSource17$inboundSchema: z.ZodType<
GitSource17,
z.ZodTypeDef,
unknown
> = z.object({
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody17Type$inboundSchema,
ref: types.string(),
sha: types.string(),
org: types.string(),
repo: types.string(),
repoPushedAt: types.optional(types.number()),
});
export function gitSource17FromJSON(
jsonString: string,
): SafeParseResult<GitSource17, SDKValidationError> {
return safeParse(
jsonString,
(x) => GitSource17$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GitSource17' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody16Type$inboundSchema:
z.ZodNativeEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody16Type
> = z.nativeEnum(
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody16Type,
);
/** @internal */
export const GitSource16$inboundSchema: z.ZodType<
GitSource16,
z.ZodTypeDef,
unknown
> = z.object({
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody16Type$inboundSchema,
ref: types.string(),
sha: types.string(),
owner: types.optional(types.string()),
slug: types.optional(types.string()),
workspaceUuid: types.string(),
repoUuid: types.string(),
});
export function gitSource16FromJSON(
jsonString: string,
): SafeParseResult<GitSource16, SDKValidationError> {
return safeParse(
jsonString,
(x) => GitSource16$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GitSource16' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody15Type$inboundSchema:
z.ZodNativeEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody15Type
> = z.nativeEnum(
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody15Type,
);
/** @internal */
export const GitSource15$inboundSchema: z.ZodType<
GitSource15,
z.ZodTypeDef,
unknown
> = z.object({
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody15Type$inboundSchema,
ref: types.string(),
sha: types.string(),
projectId: types.number(),
});
export function gitSource15FromJSON(
jsonString: string,
): SafeParseResult<GitSource15, SDKValidationError> {
return safeParse(
jsonString,
(x) => GitSource15$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GitSource15' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody14Type$inboundSchema:
z.ZodNativeEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody14Type
> = z.nativeEnum(
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody14Type,
);
/** @internal */
export const GitSource14$inboundSchema: z.ZodType<
GitSource14,
z.ZodTypeDef,
unknown
> = z.object({
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody14Type$inboundSchema,
ref: types.string(),
sha: types.string(),
repoId: types.number(),
org: types.optional(types.string()),
repo: types.optional(types.string()),
});
export function gitSource14FromJSON(
jsonString: string,
): SafeParseResult<GitSource14, SDKValidationError> {
return safeParse(
jsonString,
(x) => GitSource14$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GitSource14' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody13Type$inboundSchema:
z.ZodNativeEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody13Type
> = z.nativeEnum(
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody13Type,
);
/** @internal */
export const GitSource13$inboundSchema: z.ZodType<
GitSource13,
z.ZodTypeDef,
unknown
> = z.object({
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody13Type$inboundSchema,
host: types.string(),
ref: types.string(),
sha: types.string(),
repoId: types.number(),
org: types.optional(types.string()),
repo: types.optional(types.string()),
});
export function gitSource13FromJSON(
jsonString: string,
): SafeParseResult<GitSource13, SDKValidationError> {
return safeParse(
jsonString,
(x) => GitSource13$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GitSource13' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody12Type$inboundSchema:
z.ZodNativeEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody12Type
> = z.nativeEnum(
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody12Type,
);
/** @internal */
export const GitSource12$inboundSchema: z.ZodType<
GitSource12,
z.ZodTypeDef,
unknown
> = z.object({
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody12Type$inboundSchema,
ref: types.string(),
sha: types.string(),
repoId: types.number(),
org: types.optional(types.string()),
repo: types.optional(types.string()),
});
export function gitSource12FromJSON(
jsonString: string,
): SafeParseResult<GitSource12, SDKValidationError> {
return safeParse(
jsonString,
(x) => GitSource12$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GitSource12' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type$inboundSchema:
z.ZodNativeEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type
> = z.nativeEnum(
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type,
);
/** @internal */
export const GitSource11$inboundSchema: z.ZodType<
GitSource11,
z.ZodTypeDef,
unknown
> = z.object({
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type$inboundSchema,
ref: types.string(),
sha: types.string(),
gitUrl: types.string(),
});
export function gitSource11FromJSON(
jsonString: string,
): SafeParseResult<GitSource11, SDKValidationError> {
return safeParse(
jsonString,
(x) => GitSource11$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GitSource11' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody10Type$inboundSchema:
z.ZodNativeEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody10Type
> = z.nativeEnum(
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody10Type,
);
/** @internal */
export const GitSource10$inboundSchema: z.ZodType<
GitSource10,
z.ZodTypeDef,
unknown
> = z.object({
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody10Type$inboundSchema,
org: types.optional(types.string()),
repo: types.optional(types.string()),
sha: types.string(),
repoPushedAt: types.optional(types.number()),
ref: z.nullable(types.string()).optional(),
prId: z.nullable(types.number()).optional(),
});
export function gitSource10FromJSON(
jsonString: string,
): SafeParseResult<GitSource10, SDKValidationError> {
return safeParse(
jsonString,
(x) => GitSource10$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GitSource10' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type$inboundSchema:
z.ZodNativeEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type
> = z.nativeEnum(
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type,
);
/** @internal */
export const GitSource9$inboundSchema: z.ZodType<
GitSource9,
z.ZodTypeDef,
unknown
> = z.object({
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody9Type$inboundSchema,
owner: types.string(),
slug: types.string(),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function gitSource9FromJSON(
jsonString: string,
): SafeParseResult<GitSource9, SDKValidationError> {
return safeParse(
jsonString,
(x) => GitSource9$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GitSource9' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type$inboundSchema:
z.ZodNativeEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type
> = z.nativeEnum(
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type,
);
/** @internal */
export const CancelDeploymentGitSource8$inboundSchema: z.ZodType<
CancelDeploymentGitSource8,
z.ZodTypeDef,
unknown
> = z.object({
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody8Type$inboundSchema,
workspaceUuid: types.optional(types.string()),
repoUuid: types.string(),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function cancelDeploymentGitSource8FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitSource8, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentGitSource8$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitSource8' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type$inboundSchema:
z.ZodNativeEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type
> = z.nativeEnum(
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type,
);
/** @internal */
export const CancelDeploymentGitSourceProjectId$inboundSchema: z.ZodType<
CancelDeploymentGitSourceProjectId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function cancelDeploymentGitSourceProjectIdFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitSourceProjectId, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CancelDeploymentGitSourceProjectId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitSourceProjectId' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSource7$inboundSchema: z.ZodType<
CancelDeploymentGitSource7,
z.ZodTypeDef,
unknown
> = z.object({
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody7Type$inboundSchema,
projectId: smartUnion([types.string(), types.number()]),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function cancelDeploymentGitSource7FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitSource7, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentGitSource7$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitSource7' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType$inboundSchema:
z.ZodNativeEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType
> = z.nativeEnum(
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType,
);
/** @internal */
export const CancelDeploymentGitSource6$inboundSchema: z.ZodType<
CancelDeploymentGitSource6,
z.ZodTypeDef,
unknown
> = z.object({
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType$inboundSchema,
org: types.string(),
repo: types.string(),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function cancelDeploymentGitSource6FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitSource6, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentGitSource6$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitSource6' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType$inboundSchema:
z.ZodNativeEnum<
typeof CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType
> = z.nativeEnum(
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType,
);
/** @internal */
export const CancelDeploymentGitSourceDeploymentsResponseRepoId$inboundSchema:
z.ZodType<
CancelDeploymentGitSourceDeploymentsResponseRepoId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function cancelDeploymentGitSourceDeploymentsResponseRepoIdFromJSON(
jsonString: string,
): SafeParseResult<
CancelDeploymentGitSourceDeploymentsResponseRepoId,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CancelDeploymentGitSourceDeploymentsResponseRepoId$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CancelDeploymentGitSourceDeploymentsResponseRepoId' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSource5$inboundSchema: z.ZodType<
CancelDeploymentGitSource5,
z.ZodTypeDef,
unknown
> = z.object({
type:
CancelDeploymentGitSourceDeploymentsResponse200ApplicationJSONType$inboundSchema,
repoId: smartUnion([types.string(), types.number()]),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function cancelDeploymentGitSource5FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitSource5, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentGitSource5$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitSource5' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSourceDeploymentsResponse200Type$inboundSchema:
z.ZodNativeEnum<typeof CancelDeploymentGitSourceDeploymentsResponse200Type> =
z.nativeEnum(CancelDeploymentGitSourceDeploymentsResponse200Type);
/** @internal */
export const CancelDeploymentGitSource4$inboundSchema: z.ZodType<
CancelDeploymentGitSource4,
z.ZodTypeDef,
unknown
> = z.object({
type: CancelDeploymentGitSourceDeploymentsResponse200Type$inboundSchema,
host: types.string(),
org: types.string(),
repo: types.string(),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function cancelDeploymentGitSource4FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitSource4, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentGitSource4$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitSource4' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSourceDeploymentsResponseType$inboundSchema:
z.ZodNativeEnum<typeof CancelDeploymentGitSourceDeploymentsResponseType> = z
.nativeEnum(CancelDeploymentGitSourceDeploymentsResponseType);
/** @internal */
export const CancelDeploymentGitSourceDeploymentsRepoId$inboundSchema:
z.ZodType<CancelDeploymentGitSourceDeploymentsRepoId, z.ZodTypeDef, unknown> =
smartUnion([types.string(), types.number()]);
export function cancelDeploymentGitSourceDeploymentsRepoIdFromJSON(
jsonString: string,
): SafeParseResult<
CancelDeploymentGitSourceDeploymentsRepoId,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CancelDeploymentGitSourceDeploymentsRepoId$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CancelDeploymentGitSourceDeploymentsRepoId' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSource3$inboundSchema: z.ZodType<
CancelDeploymentGitSource3,
z.ZodTypeDef,
unknown
> = z.object({
type: CancelDeploymentGitSourceDeploymentsResponseType$inboundSchema,
host: types.string(),
repoId: smartUnion([types.string(), types.number()]),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function cancelDeploymentGitSource3FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitSource3, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentGitSource3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitSource3' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSourceDeploymentsType$inboundSchema:
z.ZodNativeEnum<typeof CancelDeploymentGitSourceDeploymentsType> = z
.nativeEnum(CancelDeploymentGitSourceDeploymentsType);
/** @internal */
export const CancelDeploymentGitSource2$inboundSchema: z.ZodType<
CancelDeploymentGitSource2,
z.ZodTypeDef,
unknown
> = z.object({
type: CancelDeploymentGitSourceDeploymentsType$inboundSchema,
org: types.string(),
repo: types.string(),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function cancelDeploymentGitSource2FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitSource2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentGitSource2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitSource2' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSourceType$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentGitSourceType
> = z.nativeEnum(CancelDeploymentGitSourceType);
/** @internal */
export const CancelDeploymentGitSourceRepoId$inboundSchema: z.ZodType<
CancelDeploymentGitSourceRepoId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function cancelDeploymentGitSourceRepoIdFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitSourceRepoId, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentGitSourceRepoId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitSourceRepoId' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSource1$inboundSchema: z.ZodType<
CancelDeploymentGitSource1,
z.ZodTypeDef,
unknown
> = z.object({
type: CancelDeploymentGitSourceType$inboundSchema,
repoId: smartUnion([types.string(), types.number()]),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function cancelDeploymentGitSource1FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitSource1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentGitSource1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitSource1' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitSource$inboundSchema: z.ZodType<
CancelDeploymentGitSource,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => GitSource13$inboundSchema),
z.lazy(() => GitSource16$inboundSchema),
z.lazy(() => GitSource17$inboundSchema),
z.lazy(() => CancelDeploymentGitSource4$inboundSchema),
z.lazy(() => GitSource11$inboundSchema),
z.lazy(() => GitSource12$inboundSchema),
z.lazy(() => GitSource14$inboundSchema),
z.lazy(() => GitSource15$inboundSchema),
z.lazy(() => CancelDeploymentGitSource2$inboundSchema),
z.lazy(() => CancelDeploymentGitSource3$inboundSchema),
z.lazy(() => CancelDeploymentGitSource6$inboundSchema),
z.lazy(() => GitSource9$inboundSchema),
z.lazy(() => CancelDeploymentGitSource1$inboundSchema),
z.lazy(() => CancelDeploymentGitSource5$inboundSchema),
z.lazy(() => CancelDeploymentGitSource7$inboundSchema),
z.lazy(() => CancelDeploymentGitSource8$inboundSchema),
z.lazy(() => GitSource10$inboundSchema),
]);
export function cancelDeploymentGitSourceFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitSource, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentGitSource$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitSource' from JSON`,
);
}
/** @internal */
export const CancelDeploymentState$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentState
> = z.nativeEnum(CancelDeploymentState);
/** @internal */
export const CancelDeploymentManualProvisioning$inboundSchema: z.ZodType<
CancelDeploymentManualProvisioning,
z.ZodTypeDef,
unknown
> = z.object({
state: CancelDeploymentState$inboundSchema,
completedAt: types.optional(types.number()),
});
export function cancelDeploymentManualProvisioningFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentManualProvisioning, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CancelDeploymentManualProvisioning$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentManualProvisioning' from JSON`,
);
}
/** @internal */
export const CancelDeploymentNodeVersion$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentNodeVersion
> = z.nativeEnum(CancelDeploymentNodeVersion);
/** @internal */
export const CancelDeploymentProject$inboundSchema: z.ZodType<
CancelDeploymentProject,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
framework: z.nullable(types.string()).optional(),
});
export function cancelDeploymentProjectFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentProject, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentProject$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentProject' from JSON`,
);
}
/** @internal */
export const CancelDeploymentReadySubstate$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentReadySubstate
> = z.nativeEnum(CancelDeploymentReadySubstate);
/** @internal */
export const CancelDeploymentSource$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentSource
> = z.nativeEnum(CancelDeploymentSource);
/** @internal */
export const CancelDeploymentTarget$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentTarget
> = z.nativeEnum(CancelDeploymentTarget);
/** @internal */
export const CancelDeploymentOidcTokenClaims$inboundSchema: z.ZodType<
CancelDeploymentOidcTokenClaims,
z.ZodTypeDef,
unknown
> = z.object({
iss: types.string(),
sub: types.string(),
scope: types.string(),
aud: types.string(),
owner: types.string(),
owner_id: types.string(),
project: types.string(),
project_id: types.string(),
environment: types.string(),
custom_environment_id: types.optional(types.string()),
plan: types.optional(types.string()),
}).transform((v) => {
return remap$(v, {
"owner_id": "ownerId",
"project_id": "projectId",
"custom_environment_id": "customEnvironmentId",
});
});
export function cancelDeploymentOidcTokenClaimsFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentOidcTokenClaims, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentOidcTokenClaims$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentOidcTokenClaims' from JSON`,
);
}
/** @internal */
export const CancelDeploymentPlan$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentPlan
> = z.nativeEnum(CancelDeploymentPlan);
/** @internal */
export const CancelDeploymentDeploymentsSource$inboundSchema: z.ZodType<
CancelDeploymentDeploymentsSource,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
});
export function cancelDeploymentDeploymentsSourceFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentDeploymentsSource, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentDeploymentsSource$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentDeploymentsSource' from JSON`,
);
}
/** @internal */
export const CancelDeploymentDeploymentsType$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentDeploymentsType
> = z.nativeEnum(CancelDeploymentDeploymentsType);
/** @internal */
export const CancelDeploymentOrigin$inboundSchema: z.ZodType<
CancelDeploymentOrigin,
z.ZodTypeDef,
unknown
> = z.object({
type: CancelDeploymentDeploymentsType$inboundSchema,
value: types.string(),
});
export function cancelDeploymentOriginFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentOrigin, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentOrigin$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentOrigin' from JSON`,
);
}
/** @internal */
export const CancelDeploymentDeploymentsCreator$inboundSchema: z.ZodType<
CancelDeploymentDeploymentsCreator,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
avatar: types.optional(types.string()),
});
export function cancelDeploymentDeploymentsCreatorFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentDeploymentsCreator, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CancelDeploymentDeploymentsCreator$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentDeploymentsCreator' from JSON`,
);
}
/** @internal */
export const CancelDeploymentPlatform$inboundSchema: z.ZodType<
CancelDeploymentPlatform,
z.ZodTypeDef,
unknown
> = z.object({
source: z.lazy(() => CancelDeploymentDeploymentsSource$inboundSchema),
origin: z.lazy(() => CancelDeploymentOrigin$inboundSchema),
creator: z.lazy(() => CancelDeploymentDeploymentsCreator$inboundSchema),
meta: types.optional(z.record(types.string())),
});
export function cancelDeploymentPlatformFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentPlatform, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentPlatform$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentPlatform' from JSON`,
);
}
/** @internal */
export const CancelDeploymentCrons$inboundSchema: z.ZodType<
CancelDeploymentCrons,
z.ZodTypeDef,
unknown
> = z.object({
schedule: types.string(),
path: types.string(),
});
export function cancelDeploymentCronsFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentCrons, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentCrons$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentCrons' from JSON`,
);
}
/** @internal */
export const CancelDeploymentArchitecture$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentArchitecture
> = z.nativeEnum(CancelDeploymentArchitecture);
/** @internal */
export const CancelDeploymentMaxDuration2$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentMaxDuration2
> = z.nativeEnum(CancelDeploymentMaxDuration2);
/** @internal */
export const CancelDeploymentMaxDuration$inboundSchema: z.ZodType<
CancelDeploymentMaxDuration,
z.ZodTypeDef,
unknown
> = smartUnion([types.number(), CancelDeploymentMaxDuration2$inboundSchema]);
export function cancelDeploymentMaxDurationFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentMaxDuration, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentMaxDuration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentMaxDuration' from JSON`,
);
}
/** @internal */
export const CancelDeploymentExperimentalTriggers2$inboundSchema: z.ZodType<
CancelDeploymentExperimentalTriggers2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("queue/v2beta"),
topic: types.string(),
maxDeliveries: types.optional(types.number()),
retryAfterSeconds: types.optional(types.number()),
initialDelaySeconds: types.optional(types.number()),
maxConcurrency: types.optional(types.number()),
});
export function cancelDeploymentExperimentalTriggers2FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentExperimentalTriggers2, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CancelDeploymentExperimentalTriggers2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentExperimentalTriggers2' from JSON`,
);
}
/** @internal */
export const CancelDeploymentExperimentalTriggers1$inboundSchema: z.ZodType<
CancelDeploymentExperimentalTriggers1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("queue/v1beta"),
consumer: types.string(),
topic: types.string(),
maxDeliveries: types.optional(types.number()),
retryAfterSeconds: types.optional(types.number()),
initialDelaySeconds: types.optional(types.number()),
maxConcurrency: types.optional(types.number()),
});
export function cancelDeploymentExperimentalTriggers1FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentExperimentalTriggers1, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CancelDeploymentExperimentalTriggers1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentExperimentalTriggers1' from JSON`,
);
}
/** @internal */
export const CancelDeploymentExperimentalTriggers$inboundSchema: z.ZodType<
CancelDeploymentExperimentalTriggers,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => CancelDeploymentExperimentalTriggers1$inboundSchema),
z.lazy(() => CancelDeploymentExperimentalTriggers2$inboundSchema),
]);
export function cancelDeploymentExperimentalTriggersFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentExperimentalTriggers, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CancelDeploymentExperimentalTriggers$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentExperimentalTriggers' from JSON`,
);
}
/** @internal */
export const CancelDeploymentFunctions$inboundSchema: z.ZodType<
CancelDeploymentFunctions,
z.ZodTypeDef,
unknown
> = z.object({
architecture: types.optional(CancelDeploymentArchitecture$inboundSchema),
memory: types.optional(types.number()),
maxDuration: types.optional(
smartUnion([types.number(), CancelDeploymentMaxDuration2$inboundSchema]),
),
regions: types.optional(z.array(types.string())),
functionFailoverRegions: types.optional(z.array(types.string())),
runtime: types.optional(types.string()),
includeFiles: types.optional(types.string()),
excludeFiles: types.optional(types.string()),
experimentalTriggers: types.optional(
z.array(z.union([
z.lazy(() => CancelDeploymentExperimentalTriggers1$inboundSchema),
z.lazy(() =>
CancelDeploymentExperimentalTriggers2$inboundSchema
),
])),
),
supportsCancellation: types.optional(types.boolean()),
});
export function cancelDeploymentFunctionsFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentFunctions, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentFunctions$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentFunctions' from JSON`,
);
}
/** @internal */
export const CancelDeploymentRoutes3$inboundSchema: z.ZodType<
CancelDeploymentRoutes3,
z.ZodTypeDef,
unknown
> = z.object({
src: types.string(),
continue: types.boolean(),
middleware: types.number(),
});
export function cancelDeploymentRoutes3FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentRoutes3, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentRoutes3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentRoutes3' from JSON`,
);
}
/** @internal */
export const RoutesHandle$inboundSchema: z.ZodNativeEnum<typeof RoutesHandle> =
z.nativeEnum(RoutesHandle);
/** @internal */
export const CancelDeploymentRoutes2$inboundSchema: z.ZodType<
CancelDeploymentRoutes2,
z.ZodTypeDef,
unknown
> = z.object({
handle: RoutesHandle$inboundSchema,
src: types.optional(types.string()),
dest: types.optional(types.string()),
status: types.optional(types.number()),
});
export function cancelDeploymentRoutes2FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentRoutes2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentRoutes2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentRoutes2' from JSON`,
);
}
/** @internal */
export const CancelDeploymentHasDeploymentsType$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentHasDeploymentsType
> = z.nativeEnum(CancelDeploymentHasDeploymentsType);
/** @internal */
export const CancelDeploymentValueDeploymentsEq$inboundSchema: z.ZodType<
CancelDeploymentValueDeploymentsEq,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function cancelDeploymentValueDeploymentsEqFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentValueDeploymentsEq, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CancelDeploymentValueDeploymentsEq$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentValueDeploymentsEq' from JSON`,
);
}
/** @internal */
export const CancelDeploymentValueDeployments2$inboundSchema: z.ZodType<
CancelDeploymentValueDeployments2,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function cancelDeploymentValueDeployments2FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentValueDeployments2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentValueDeployments2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentValueDeployments2' from JSON`,
);
}
/** @internal */
export const CancelDeploymentHasDeploymentsValue$inboundSchema: z.ZodType<
CancelDeploymentHasDeploymentsValue,
z.ZodTypeDef,
unknown
> = smartUnion([
types.string(),
z.lazy(() => CancelDeploymentValueDeployments2$inboundSchema),
]);
export function cancelDeploymentHasDeploymentsValueFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentHasDeploymentsValue, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CancelDeploymentHasDeploymentsValue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentHasDeploymentsValue' from JSON`,
);
}
/** @internal */
export const CancelDeploymentHas2$inboundSchema: z.ZodType<
CancelDeploymentHas2,
z.ZodTypeDef,
unknown
> = z.object({
type: CancelDeploymentHasDeploymentsType$inboundSchema,
key: types.string(),
value: types.optional(
smartUnion([
types.string(),
z.lazy(() => CancelDeploymentValueDeployments2$inboundSchema),
]),
),
});
export function cancelDeploymentHas2FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentHas2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentHas2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentHas2' from JSON`,
);
}
/** @internal */
export const CancelDeploymentValueEq$inboundSchema: z.ZodType<
CancelDeploymentValueEq,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function cancelDeploymentValueEqFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentValueEq, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentValueEq$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentValueEq' from JSON`,
);
}
/** @internal */
export const CancelDeploymentValue2$inboundSchema: z.ZodType<
CancelDeploymentValue2,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function cancelDeploymentValue2FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentValue2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentValue2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentValue2' from JSON`,
);
}
/** @internal */
export const CancelDeploymentHasValue$inboundSchema: z.ZodType<
CancelDeploymentHasValue,
z.ZodTypeDef,
unknown
> = smartUnion([
types.string(),
z.lazy(() => CancelDeploymentValue2$inboundSchema),
]);
export function cancelDeploymentHasValueFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentHasValue, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentHasValue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentHasValue' from JSON`,
);
}
/** @internal */
export const CancelDeploymentHas1$inboundSchema: z.ZodType<
CancelDeploymentHas1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
z.lazy(() => CancelDeploymentValue2$inboundSchema),
]),
});
export function cancelDeploymentHas1FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentHas1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentHas1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentHas1' from JSON`,
);
}
/** @internal */
export const RoutesHas$inboundSchema: z.ZodType<
RoutesHas,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => CancelDeploymentHas1$inboundSchema),
z.lazy(() => CancelDeploymentHas2$inboundSchema).and(
z.object({ type: z.literal("cookie") }),
),
z.lazy(() => CancelDeploymentHas2$inboundSchema).and(
z.object({ type: z.literal("header") }),
),
z.lazy(() => CancelDeploymentHas2$inboundSchema).and(
z.object({ type: z.literal("query") }),
),
]);
export function routesHasFromJSON(
jsonString: string,
): SafeParseResult<RoutesHas, SDKValidationError> {
return safeParse(
jsonString,
(x) => RoutesHas$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RoutesHas' from JSON`,
);
}
/** @internal */
export const CancelDeploymentMissingDeploymentsType$inboundSchema:
z.ZodNativeEnum<typeof CancelDeploymentMissingDeploymentsType> = z.nativeEnum(
CancelDeploymentMissingDeploymentsType,
);
/** @internal */
export const CancelDeploymentValueDeploymentsResponse200Eq$inboundSchema:
z.ZodType<
CancelDeploymentValueDeploymentsResponse200Eq,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function cancelDeploymentValueDeploymentsResponse200EqFromJSON(
jsonString: string,
): SafeParseResult<
CancelDeploymentValueDeploymentsResponse200Eq,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CancelDeploymentValueDeploymentsResponse200Eq$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CancelDeploymentValueDeploymentsResponse200Eq' from JSON`,
);
}
/** @internal */
export const CancelDeploymentValueDeploymentsResponse2002$inboundSchema:
z.ZodType<
CancelDeploymentValueDeploymentsResponse2002,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function cancelDeploymentValueDeploymentsResponse2002FromJSON(
jsonString: string,
): SafeParseResult<
CancelDeploymentValueDeploymentsResponse2002,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CancelDeploymentValueDeploymentsResponse2002$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CancelDeploymentValueDeploymentsResponse2002' from JSON`,
);
}
/** @internal */
export const CancelDeploymentMissingDeploymentsValue$inboundSchema: z.ZodType<
CancelDeploymentMissingDeploymentsValue,
z.ZodTypeDef,
unknown
> = smartUnion([
types.string(),
z.lazy(() => CancelDeploymentValueDeploymentsResponse2002$inboundSchema),
]);
export function cancelDeploymentMissingDeploymentsValueFromJSON(
jsonString: string,
): SafeParseResult<
CancelDeploymentMissingDeploymentsValue,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CancelDeploymentMissingDeploymentsValue$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CancelDeploymentMissingDeploymentsValue' from JSON`,
);
}
/** @internal */
export const CancelDeploymentMissing2$inboundSchema: z.ZodType<
CancelDeploymentMissing2,
z.ZodTypeDef,
unknown
> = z.object({
type: CancelDeploymentMissingDeploymentsType$inboundSchema,
key: types.string(),
value: types.optional(
smartUnion([
types.string(),
z.lazy(() => CancelDeploymentValueDeploymentsResponse2002$inboundSchema),
]),
),
});
export function cancelDeploymentMissing2FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentMissing2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentMissing2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentMissing2' from JSON`,
);
}
/** @internal */
export const CancelDeploymentValueDeploymentsResponseEq$inboundSchema:
z.ZodType<CancelDeploymentValueDeploymentsResponseEq, z.ZodTypeDef, unknown> =
smartUnion([types.string(), types.number()]);
export function cancelDeploymentValueDeploymentsResponseEqFromJSON(
jsonString: string,
): SafeParseResult<
CancelDeploymentValueDeploymentsResponseEq,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CancelDeploymentValueDeploymentsResponseEq$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CancelDeploymentValueDeploymentsResponseEq' from JSON`,
);
}
/** @internal */
export const CancelDeploymentValueDeploymentsResponse2$inboundSchema: z.ZodType<
CancelDeploymentValueDeploymentsResponse2,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
re: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function cancelDeploymentValueDeploymentsResponse2FromJSON(
jsonString: string,
): SafeParseResult<
CancelDeploymentValueDeploymentsResponse2,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CancelDeploymentValueDeploymentsResponse2$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CancelDeploymentValueDeploymentsResponse2' from JSON`,
);
}
/** @internal */
export const CancelDeploymentMissingValue$inboundSchema: z.ZodType<
CancelDeploymentMissingValue,
z.ZodTypeDef,
unknown
> = smartUnion([
types.string(),
z.lazy(() => CancelDeploymentValueDeploymentsResponse2$inboundSchema),
]);
export function cancelDeploymentMissingValueFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentMissingValue, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentMissingValue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentMissingValue' from JSON`,
);
}
/** @internal */
export const CancelDeploymentMissing1$inboundSchema: z.ZodType<
CancelDeploymentMissing1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
z.lazy(() => CancelDeploymentValueDeploymentsResponse2$inboundSchema),
]),
});
export function cancelDeploymentMissing1FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentMissing1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentMissing1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentMissing1' from JSON`,
);
}
/** @internal */
export const RoutesMissing$inboundSchema: z.ZodType<
RoutesMissing,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => CancelDeploymentMissing1$inboundSchema),
z.lazy(() => CancelDeploymentMissing2$inboundSchema).and(
z.object({ type: z.literal("cookie") }),
),
z.lazy(() => CancelDeploymentMissing2$inboundSchema).and(
z.object({ type: z.literal("header") }),
),
z.lazy(() => CancelDeploymentMissing2$inboundSchema).and(
z.object({ type: z.literal("query") }),
),
]);
export function routesMissingFromJSON(
jsonString: string,
): SafeParseResult<RoutesMissing, SDKValidationError> {
return safeParse(
jsonString,
(x) => RoutesMissing$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RoutesMissing' from JSON`,
);
}
/** @internal */
export const CancelDeploymentRoutesAction$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentRoutesAction
> = z.nativeEnum(CancelDeploymentRoutesAction);
/** @internal */
export const RoutesMitigate$inboundSchema: z.ZodType<
RoutesMitigate,
z.ZodTypeDef,
unknown
> = z.object({
action: CancelDeploymentRoutesAction$inboundSchema,
});
export function routesMitigateFromJSON(
jsonString: string,
): SafeParseResult<RoutesMitigate, SDKValidationError> {
return safeParse(
jsonString,
(x) => RoutesMitigate$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RoutesMitigate' from JSON`,
);
}
/** @internal */
export const CancelDeploymentRoutesType$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentRoutesType
> = z.nativeEnum(CancelDeploymentRoutesType);
/** @internal */
export const RoutesOp$inboundSchema: z.ZodNativeEnum<typeof RoutesOp> = z
.nativeEnum(RoutesOp);
/** @internal */
export const CancelDeploymentKeyEq$inboundSchema: z.ZodType<
CancelDeploymentKeyEq,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function cancelDeploymentKeyEqFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentKeyEq, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentKeyEq$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentKeyEq' from JSON`,
);
}
/** @internal */
export const CancelDeploymentKey2$inboundSchema: z.ZodType<
CancelDeploymentKey2,
z.ZodTypeDef,
unknown
> = z.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function cancelDeploymentKey2FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentKey2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentKey2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentKey2' from JSON`,
);
}
/** @internal */
export const RoutesKey$inboundSchema: z.ZodType<
RoutesKey,
z.ZodTypeDef,
unknown
> = smartUnion([
types.string(),
z.lazy(() => CancelDeploymentKey2$inboundSchema),
]);
export function routesKeyFromJSON(
jsonString: string,
): SafeParseResult<RoutesKey, SDKValidationError> {
return safeParse(
jsonString,
(x) => RoutesKey$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RoutesKey' from JSON`,
);
}
/** @internal */
export const CancelDeploymentRoutesTarget$inboundSchema: z.ZodType<
CancelDeploymentRoutesTarget,
z.ZodTypeDef,
unknown
> = z.object({
key: smartUnion([
types.string(),
z.lazy(() => CancelDeploymentKey2$inboundSchema),
]),
});
export function cancelDeploymentRoutesTargetFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentRoutesTarget, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentRoutesTarget$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentRoutesTarget' from JSON`,
);
}
/** @internal */
export const RoutesArgs$inboundSchema: z.ZodType<
RoutesArgs,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), z.array(types.string())]);
export function routesArgsFromJSON(
jsonString: string,
): SafeParseResult<RoutesArgs, SDKValidationError> {
return safeParse(
jsonString,
(x) => RoutesArgs$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RoutesArgs' from JSON`,
);
}
/** @internal */
export const RoutesTransforms$inboundSchema: z.ZodType<
RoutesTransforms,
z.ZodTypeDef,
unknown
> = z.object({
type: CancelDeploymentRoutesType$inboundSchema,
op: RoutesOp$inboundSchema,
target: z.lazy(() => CancelDeploymentRoutesTarget$inboundSchema),
args: types.optional(smartUnion([types.string(), z.array(types.string())])),
env: types.optional(z.array(types.string())),
});
export function routesTransformsFromJSON(
jsonString: string,
): SafeParseResult<RoutesTransforms, SDKValidationError> {
return safeParse(
jsonString,
(x) => RoutesTransforms$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RoutesTransforms' from JSON`,
);
}
/** @internal */
export const RoutesLocale$inboundSchema: z.ZodType<
RoutesLocale,
z.ZodTypeDef,
unknown
> = z.object({
redirect: types.optional(z.record(types.string())),
cookie: types.optional(types.string()),
});
export function routesLocaleFromJSON(
jsonString: string,
): SafeParseResult<RoutesLocale, SDKValidationError> {
return safeParse(
jsonString,
(x) => RoutesLocale$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RoutesLocale' from JSON`,
);
}
/** @internal */
export const CancelDeploymentDestinationType$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentDestinationType
> = z.nativeEnum(CancelDeploymentDestinationType);
/** @internal */
export const CancelDeploymentDestination2$inboundSchema: z.ZodType<
CancelDeploymentDestination2,
z.ZodTypeDef,
unknown
> = z.object({
type: CancelDeploymentDestinationType$inboundSchema,
service: types.string(),
path: types.optional(types.string()),
});
export function cancelDeploymentDestination2FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentDestination2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentDestination2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentDestination2' from JSON`,
);
}
/** @internal */
export const RoutesDestination$inboundSchema: z.ZodType<
RoutesDestination,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => CancelDeploymentDestination2$inboundSchema),
types.string(),
]);
export function routesDestinationFromJSON(
jsonString: string,
): SafeParseResult<RoutesDestination, SDKValidationError> {
return safeParse(
jsonString,
(x) => RoutesDestination$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RoutesDestination' from JSON`,
);
}
/** @internal */
export const CancelDeploymentRoutes1$inboundSchema: z.ZodType<
CancelDeploymentRoutes1,
z.ZodTypeDef,
unknown
> = z.object({
src: types.string(),
dest: types.optional(types.string()),
headers: types.optional(z.record(types.string())),
methods: types.optional(z.array(types.string())),
continue: types.optional(types.boolean()),
override: types.optional(types.boolean()),
caseSensitive: types.optional(types.boolean()),
check: types.optional(types.boolean()),
important: types.optional(types.boolean()),
status: types.optional(types.number()),
has: types.optional(
z.array(z.union([
z.lazy(() => CancelDeploymentHas1$inboundSchema),
z.lazy(() =>
CancelDeploymentHas2$inboundSchema
).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CancelDeploymentHas2$inboundSchema).and(
z.object({ type: z.literal("header") }),
),
z.lazy(() => CancelDeploymentHas2$inboundSchema).and(
z.object({ type: z.literal("query") }),
),
])),
),
missing: types.optional(
z.array(z.union([
z.lazy(() => CancelDeploymentMissing1$inboundSchema),
z.lazy(() =>
CancelDeploymentMissing2$inboundSchema
).and(z.object({ type: z.literal("cookie") })),
z.lazy(() => CancelDeploymentMissing2$inboundSchema).and(
z.object({ type: z.literal("header") }),
),
z.lazy(() => CancelDeploymentMissing2$inboundSchema).and(
z.object({ type: z.literal("query") }),
),
])),
),
mitigate: types.optional(z.lazy(() => RoutesMitigate$inboundSchema)),
transforms: types.optional(
z.array(z.lazy(() => RoutesTransforms$inboundSchema)),
),
env: types.optional(z.array(types.string())),
locale: types.optional(z.lazy(() => RoutesLocale$inboundSchema)),
source: types.optional(types.string()),
destination: types.optional(
smartUnion([
z.lazy(() => CancelDeploymentDestination2$inboundSchema),
types.string(),
]),
),
statusCode: types.optional(types.number()),
middlewarePath: types.optional(types.string()),
middlewareRawSrc: types.optional(z.array(types.string())),
middleware: types.optional(types.number()),
respectOriginCacheControl: types.optional(types.boolean()),
});
export function cancelDeploymentRoutes1FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentRoutes1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentRoutes1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentRoutes1' from JSON`,
);
}
/** @internal */
export const CancelDeploymentRoutes$inboundSchema: z.ZodType<
CancelDeploymentRoutes,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => CancelDeploymentRoutes3$inboundSchema),
z.lazy(() => CancelDeploymentRoutes1$inboundSchema),
z.lazy(() => CancelDeploymentRoutes2$inboundSchema),
]);
export function cancelDeploymentRoutesFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentRoutes, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentRoutes$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentRoutes' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitRepoDeploymentsResponse200OwnerType$inboundSchema:
z.ZodNativeEnum<
typeof CancelDeploymentGitRepoDeploymentsResponse200OwnerType
> = z.nativeEnum(CancelDeploymentGitRepoDeploymentsResponse200OwnerType);
/** @internal */
export const CancelDeploymentGitRepo4$inboundSchema: z.ZodType<
CancelDeploymentGitRepo4,
z.ZodTypeDef,
unknown
> = z.object({
org: types.string(),
repo: types.string(),
type: types.literal("vercel"),
path: types.string(),
defaultBranch: types.string(),
name: types.string(),
private: types.boolean(),
ownerType:
CancelDeploymentGitRepoDeploymentsResponse200OwnerType$inboundSchema,
});
export function cancelDeploymentGitRepo4FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitRepo4, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentGitRepo4$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitRepo4' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitRepoDeploymentsResponseOwnerType$inboundSchema:
z.ZodNativeEnum<typeof CancelDeploymentGitRepoDeploymentsResponseOwnerType> =
z.nativeEnum(CancelDeploymentGitRepoDeploymentsResponseOwnerType);
/** @internal */
export const CancelDeploymentGitRepo3$inboundSchema: z.ZodType<
CancelDeploymentGitRepo3,
z.ZodTypeDef,
unknown
> = z.object({
owner: types.string(),
repoUuid: types.string(),
slug: types.string(),
type: types.literal("bitbucket"),
workspaceUuid: types.string(),
path: types.string(),
defaultBranch: types.string(),
name: types.string(),
private: types.boolean(),
ownerType: CancelDeploymentGitRepoDeploymentsResponseOwnerType$inboundSchema,
});
export function cancelDeploymentGitRepo3FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitRepo3, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentGitRepo3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitRepo3' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitRepoDeploymentsOwnerType$inboundSchema:
z.ZodNativeEnum<typeof CancelDeploymentGitRepoDeploymentsOwnerType> = z
.nativeEnum(CancelDeploymentGitRepoDeploymentsOwnerType);
/** @internal */
export const CancelDeploymentGitRepo2$inboundSchema: z.ZodType<
CancelDeploymentGitRepo2,
z.ZodTypeDef,
unknown
> = z.object({
org: types.string(),
repo: types.string(),
repoId: types.number(),
type: types.literal("github"),
repoOwnerId: types.number(),
path: types.string(),
defaultBranch: types.string(),
name: types.string(),
private: types.boolean(),
ownerType: CancelDeploymentGitRepoDeploymentsOwnerType$inboundSchema,
});
export function cancelDeploymentGitRepo2FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitRepo2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentGitRepo2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitRepo2' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitRepoOwnerType$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentGitRepoOwnerType
> = z.nativeEnum(CancelDeploymentGitRepoOwnerType);
/** @internal */
export const CancelDeploymentGitRepo1$inboundSchema: z.ZodType<
CancelDeploymentGitRepo1,
z.ZodTypeDef,
unknown
> = z.object({
namespace: types.string(),
projectId: types.number(),
type: types.literal("gitlab"),
url: types.string(),
path: types.string(),
defaultBranch: types.string(),
name: types.string(),
private: types.boolean(),
ownerType: CancelDeploymentGitRepoOwnerType$inboundSchema,
});
export function cancelDeploymentGitRepo1FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitRepo1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentGitRepo1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitRepo1' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitRepo$inboundSchema: z.ZodType<
CancelDeploymentGitRepo,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => CancelDeploymentGitRepo1$inboundSchema),
z.lazy(() => CancelDeploymentGitRepo2$inboundSchema),
z.lazy(() => CancelDeploymentGitRepo3$inboundSchema),
z.lazy(() => CancelDeploymentGitRepo4$inboundSchema),
]);
export function cancelDeploymentGitRepoFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitRepo, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentGitRepo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitRepo' from JSON`,
);
}
/** @internal */
export const CancelDeploymentFlags2$inboundSchema: z.ZodType<
CancelDeploymentFlags2,
z.ZodTypeDef,
unknown
> = z.object({});
export function cancelDeploymentFlags2FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentFlags2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentFlags2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentFlags2' from JSON`,
);
}
/** @internal */
export const FlagsOptions$inboundSchema: z.ZodType<
FlagsOptions,
z.ZodTypeDef,
unknown
> = z.object({
value: types.nullable(FlagJSONValue$inboundSchema),
label: types.optional(types.string()),
});
export function flagsOptionsFromJSON(
jsonString: string,
): SafeParseResult<FlagsOptions, SDKValidationError> {
return safeParse(
jsonString,
(x) => FlagsOptions$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FlagsOptions' from JSON`,
);
}
/** @internal */
export const FlagsDefinitions$inboundSchema: z.ZodType<
FlagsDefinitions,
z.ZodTypeDef,
unknown
> = z.object({
options: types.optional(z.array(z.lazy(() => FlagsOptions$inboundSchema))),
url: types.optional(types.string()),
description: types.optional(types.string()),
});
export function flagsDefinitionsFromJSON(
jsonString: string,
): SafeParseResult<FlagsDefinitions, SDKValidationError> {
return safeParse(
jsonString,
(x) => FlagsDefinitions$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'FlagsDefinitions' from JSON`,
);
}
/** @internal */
export const CancelDeploymentFlags1$inboundSchema: z.ZodType<
CancelDeploymentFlags1,
z.ZodTypeDef,
unknown
> = z.object({
definitions: z.record(z.lazy(() => FlagsDefinitions$inboundSchema)),
});
export function cancelDeploymentFlags1FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentFlags1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentFlags1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentFlags1' from JSON`,
);
}
/** @internal */
export const CancelDeploymentFlags$inboundSchema: z.ZodType<
CancelDeploymentFlags,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => CancelDeploymentFlags1$inboundSchema),
z.array(z.lazy(() => CancelDeploymentFlags2$inboundSchema)),
]);
export function cancelDeploymentFlagsFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentFlags, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentFlags$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentFlags' from JSON`,
);
}
/** @internal */
export const MicrofrontendsMfeConfigUploadState$inboundSchema: z.ZodNativeEnum<
typeof MicrofrontendsMfeConfigUploadState
> = z.nativeEnum(MicrofrontendsMfeConfigUploadState);
/** @internal */
export const CancelDeploymentMicrofrontends2$inboundSchema: z.ZodType<
CancelDeploymentMicrofrontends2,
z.ZodTypeDef,
unknown
> = z.object({
isDefaultApp: types.literal(true),
mfeConfigUploadState: types.optional(
MicrofrontendsMfeConfigUploadState$inboundSchema,
),
defaultAppProjectName: types.string(),
defaultRoute: types.optional(types.string()),
groupIds: z.array(types.string()),
});
export function cancelDeploymentMicrofrontends2FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentMicrofrontends2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentMicrofrontends2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentMicrofrontends2' from JSON`,
);
}
/** @internal */
export const CancelDeploymentMicrofrontends1$inboundSchema: z.ZodType<
CancelDeploymentMicrofrontends1,
z.ZodTypeDef,
unknown
> = z.object({
isDefaultApp: types.optional(types.literal(false)),
defaultAppProjectName: types.string(),
defaultRoute: types.optional(types.string()),
groupIds: z.array(types.string()),
});
export function cancelDeploymentMicrofrontends1FromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentMicrofrontends1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentMicrofrontends1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentMicrofrontends1' from JSON`,
);
}
/** @internal */
export const CancelDeploymentMicrofrontends$inboundSchema: z.ZodType<
CancelDeploymentMicrofrontends,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => CancelDeploymentMicrofrontends2$inboundSchema),
z.lazy(() => CancelDeploymentMicrofrontends1$inboundSchema),
]);
export function cancelDeploymentMicrofrontendsFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentMicrofrontends, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentMicrofrontends$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentMicrofrontends' from JSON`,
);
}
/** @internal */
export const CancelDeploymentFunctionType$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentFunctionType
> = z.nativeEnum(CancelDeploymentFunctionType);
/** @internal */
export const CancelDeploymentFunctionMemoryType$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentFunctionMemoryType
> = z.nativeEnum(CancelDeploymentFunctionMemoryType);
/** @internal */
export const CancelDeploymentConfiguration$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentConfiguration
> = z.nativeEnum(CancelDeploymentConfiguration);
/** @internal */
export const CancelDeploymentBuildQueue$inboundSchema: z.ZodType<
CancelDeploymentBuildQueue,
z.ZodTypeDef,
unknown
> = z.object({
configuration: types.optional(CancelDeploymentConfiguration$inboundSchema),
});
export function cancelDeploymentBuildQueueFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentBuildQueue, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentBuildQueue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentBuildQueue' from JSON`,
);
}
/** @internal */
export const CancelDeploymentElasticConcurrency$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentElasticConcurrency
> = z.nativeEnum(CancelDeploymentElasticConcurrency);
/** @internal */
export const CancelDeploymentPurchaseType$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentPurchaseType
> = z.nativeEnum(CancelDeploymentPurchaseType);
/** @internal */
export const CancelDeploymentBuildMachine$inboundSchema: z.ZodType<
CancelDeploymentBuildMachine,
z.ZodTypeDef,
unknown
> = z.object({
purchaseType: z.nullable(CancelDeploymentPurchaseType$inboundSchema)
.optional(),
});
export function cancelDeploymentBuildMachineFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentBuildMachine, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentBuildMachine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentBuildMachine' from JSON`,
);
}
/** @internal */
export const CancelDeploymentResourceConfig$inboundSchema: z.ZodType<
CancelDeploymentResourceConfig,
z.ZodTypeDef,
unknown
> = z.object({
buildQueue: types.optional(
z.lazy(() => CancelDeploymentBuildQueue$inboundSchema),
),
elasticConcurrency: types.optional(
CancelDeploymentElasticConcurrency$inboundSchema,
),
buildMachine: types.optional(
z.lazy(() => CancelDeploymentBuildMachine$inboundSchema),
),
});
export function cancelDeploymentResourceConfigFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentResourceConfig, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentResourceConfig$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentResourceConfig' from JSON`,
);
}
/** @internal */
export const CancelDeploymentConfig$inboundSchema: z.ZodType<
CancelDeploymentConfig,
z.ZodTypeDef,
unknown
> = z.object({
version: types.optional(types.number()),
functionType: CancelDeploymentFunctionType$inboundSchema,
functionMemoryType: CancelDeploymentFunctionMemoryType$inboundSchema,
functionTimeout: types.nullable(types.number()),
secureComputePrimaryRegion: types.nullable(types.string()),
secureComputeFallbackRegion: types.nullable(types.string()),
isUsingActiveCPU: types.optional(types.boolean()),
resourceConfig: types.optional(
z.lazy(() => CancelDeploymentResourceConfig$inboundSchema),
),
});
export function cancelDeploymentConfigFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentConfig, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentConfig$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentConfig' from JSON`,
);
}
/** @internal */
export const CancelDeploymentDeploymentsState$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentDeploymentsState
> = z.nativeEnum(CancelDeploymentDeploymentsState);
/** @internal */
export const CancelDeploymentDeploymentAlias$inboundSchema: z.ZodType<
CancelDeploymentDeploymentAlias,
z.ZodTypeDef,
unknown
> = z.object({
state: CancelDeploymentDeploymentsState$inboundSchema,
startedAt: types.number(),
completedAt: types.optional(types.number()),
});
export function cancelDeploymentDeploymentAliasFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentDeploymentAlias, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentDeploymentAlias$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentDeploymentAlias' from JSON`,
);
}
/** @internal */
export const CancelDeploymentChecks$inboundSchema: z.ZodType<
CancelDeploymentChecks,
z.ZodTypeDef,
unknown
> = z.object({
"deployment-alias": z.lazy(() =>
CancelDeploymentDeploymentAlias$inboundSchema
),
}).transform((v) => {
return remap$(v, {
"deployment-alias": "deploymentAlias",
});
});
export function cancelDeploymentChecksFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentChecks, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentChecks$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentChecks' from JSON`,
);
}
/** @internal */
export const CancelDeploymentBlockCode$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentBlockCode
> = z.nativeEnum(CancelDeploymentBlockCode);
/** @internal */
export const CancelDeploymentGitUserId$inboundSchema: z.ZodType<
CancelDeploymentGitUserId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function cancelDeploymentGitUserIdFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitUserId, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentGitUserId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitUserId' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitProvider$inboundSchema: z.ZodNativeEnum<
typeof CancelDeploymentGitProvider
> = z.nativeEnum(CancelDeploymentGitProvider);
/** @internal */
export const CancelDeploymentSeatBlock$inboundSchema: z.ZodType<
CancelDeploymentSeatBlock,
z.ZodTypeDef,
unknown
> = z.object({
blockCode: CancelDeploymentBlockCode$inboundSchema,
userId: types.optional(types.string()),
isVerified: types.optional(types.boolean()),
gitUserId: types.optional(smartUnion([types.string(), types.number()])),
gitProvider: types.optional(CancelDeploymentGitProvider$inboundSchema),
});
export function cancelDeploymentSeatBlockFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentSeatBlock, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentSeatBlock$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentSeatBlock' from JSON`,
);
}
/** @internal */
export const CancelDeploymentCommitMeta$inboundSchema: z.ZodType<
CancelDeploymentCommitMeta,
z.ZodTypeDef,
unknown
> = z.object({
email: types.optional(types.string()),
name: types.optional(types.string()),
isVerified: types.optional(types.boolean()),
});
export function cancelDeploymentCommitMetaFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentCommitMeta, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentCommitMeta$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentCommitMeta' from JSON`,
);
}
/** @internal */
export const CancelDeploymentId$inboundSchema: z.ZodType<
CancelDeploymentId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function cancelDeploymentIdFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentId, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentId' from JSON`,
);
}
/** @internal */
export const CancelDeploymentGitUser$inboundSchema: z.ZodType<
CancelDeploymentGitUser,
z.ZodTypeDef,
unknown
> = z.object({
id: smartUnion([types.string(), types.number()]),
login: types.string(),
type: types.optional(types.string()),
provider: types.optional(types.string()),
});
export function cancelDeploymentGitUserFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentGitUser, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentGitUser$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentGitUser' from JSON`,
);
}
/** @internal */
export const CancelDeploymentVercelUser$inboundSchema: z.ZodType<
CancelDeploymentVercelUser,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
username: types.string(),
teamRoles: types.optional(z.array(types.string())),
});
export function cancelDeploymentVercelUserFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentVercelUser, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentVercelUser$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentVercelUser' from JSON`,
);
}
/** @internal */
export const CancelDeploymentAttribution$inboundSchema: z.ZodType<
CancelDeploymentAttribution,
z.ZodTypeDef,
unknown
> = z.object({
commitMeta: types.optional(
z.lazy(() => CancelDeploymentCommitMeta$inboundSchema),
),
gitUser: types.optional(z.lazy(() => CancelDeploymentGitUser$inboundSchema)),
vercelUser: types.optional(
z.lazy(() => CancelDeploymentVercelUser$inboundSchema),
),
});
export function cancelDeploymentAttributionFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentAttribution, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentAttribution$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentAttribution' from JSON`,
);
}
/** @internal */
export const CancelDeploymentResponseBody$inboundSchema: z.ZodType<
CancelDeploymentResponseBody,
z.ZodTypeDef,
unknown
> = z.object({
aliasAssignedAt: z.nullable(smartUnion([types.number(), types.boolean()]))
.optional(),
alwaysRefuseToBuild: types.optional(types.boolean()),
build: z.lazy(() => CancelDeploymentBuild$inboundSchema),
buildArtifactUrls: types.optional(z.array(types.string())),
builds: types.optional(
z.array(z.lazy(() => CancelDeploymentBuilds$inboundSchema)),
),
env: z.array(types.string()),
inspectorUrl: types.nullable(types.string()),
isInConcurrentBuildsQueue: types.boolean(),
isInSystemBuildsQueue: types.boolean(),
projectSettings: z.lazy(() => CancelDeploymentProjectSettings$inboundSchema),
integrations: types.optional(
z.lazy(() => CancelDeploymentIntegrations$inboundSchema),
),
images: types.optional(z.lazy(() => CancelDeploymentImages$inboundSchema)),
alias: types.optional(z.array(types.string())),
aliasAssigned: types.boolean(),
bootedAt: types.number(),
buildingAt: types.number(),
buildContainerFinishedAt: types.optional(types.number()),
buildSkipped: types.boolean(),
creator: z.lazy(() => CancelDeploymentCreator$inboundSchema),
initReadyAt: types.optional(types.number()),
isFirstBranchDeployment: types.optional(types.boolean()),
lambdas: types.optional(
z.array(z.lazy(() => CancelDeploymentLambdas$inboundSchema)),
),
public: types.boolean(),
ready: types.optional(types.number()),
status: CancelDeploymentStatus$inboundSchema,
team: types.optional(z.lazy(() => CancelDeploymentTeam$inboundSchema)),
userAliases: types.optional(z.array(types.string())),
previewCommentsEnabled: types.optional(types.boolean()),
ttyBuildLogs: types.optional(types.boolean()),
customEnvironment: types.optional(
smartUnion([
z.lazy(() => CancelDeploymentCustomEnvironment1$inboundSchema),
z.lazy(() => CancelDeploymentCustomEnvironment2$inboundSchema),
]),
),
oomReport: types.optional(CancelDeploymentOomReport$inboundSchema),
readyStateReason: types.optional(types.string()),
aliasWarning: z.nullable(
z.lazy(() => CancelDeploymentAliasWarning$inboundSchema),
).optional(),
id: types.string(),
createdAt: types.number(),
readyState: CancelDeploymentReadyState$inboundSchema,
name: types.string(),
type: CancelDeploymentType$inboundSchema,
errorMessage: z.nullable(types.string()).optional(),
aliasError: z.nullable(z.lazy(() => CancelDeploymentAliasError$inboundSchema))
.optional(),
aliasFinal: z.nullable(types.string()).optional(),
autoAssignCustomDomains: types.optional(types.boolean()),
automaticAliases: types.optional(z.array(types.string())),
buildErrorAt: types.optional(types.number()),
checksState: types.optional(CancelDeploymentChecksState$inboundSchema),
checksConclusion: types.optional(
CancelDeploymentChecksConclusion$inboundSchema,
),
deletedAt: z.nullable(types.number()).optional(),
defaultRoute: types.optional(types.string()),
canceledAt: types.optional(types.number()),
errorCode: types.optional(types.string()),
errorLink: types.optional(types.string()),
errorStep: types.optional(types.string()),
passiveRegions: types.optional(z.array(types.string())),
gitSource: types.optional(
smartUnion([
z.lazy(() => GitSource13$inboundSchema),
z.lazy(() => GitSource16$inboundSchema),
z.lazy(() => GitSource17$inboundSchema),
z.lazy(() => CancelDeploymentGitSource4$inboundSchema),
z.lazy(() => GitSource11$inboundSchema),
z.lazy(() => GitSource12$inboundSchema),
z.lazy(() => GitSource14$inboundSchema),
z.lazy(() => GitSource15$inboundSchema),
z.lazy(() => CancelDeploymentGitSource2$inboundSchema),
z.lazy(() => CancelDeploymentGitSource3$inboundSchema),
z.lazy(() => CancelDeploymentGitSource6$inboundSchema),
z.lazy(() => GitSource9$inboundSchema),
z.lazy(() => CancelDeploymentGitSource1$inboundSchema),
z.lazy(() => CancelDeploymentGitSource5$inboundSchema),
z.lazy(() => CancelDeploymentGitSource7$inboundSchema),
z.lazy(() => CancelDeploymentGitSource8$inboundSchema),
z.lazy(() => GitSource10$inboundSchema),
]),
),
manualProvisioning: types.optional(
z.lazy(() => CancelDeploymentManualProvisioning$inboundSchema),
),
meta: z.record(types.string()),
originCacheRegion: types.optional(types.string()),
nodeVersion: types.optional(CancelDeploymentNodeVersion$inboundSchema),
project: types.optional(z.lazy(() => CancelDeploymentProject$inboundSchema)),
prebuilt: types.optional(types.boolean()),
readySubstate: types.optional(CancelDeploymentReadySubstate$inboundSchema),
regions: z.array(types.string()),
softDeletedByRetention: types.optional(types.boolean()),
source: types.optional(CancelDeploymentSource$inboundSchema),
target: z.nullable(CancelDeploymentTarget$inboundSchema).optional(),
undeletedAt: types.optional(types.number()),
url: types.string(),
userConfiguredDeploymentId: types.optional(types.string()),
version: types.number(),
oidcTokenClaims: types.optional(
z.lazy(() => CancelDeploymentOidcTokenClaims$inboundSchema),
),
projectId: types.string(),
plan: CancelDeploymentPlan$inboundSchema,
platform: types.optional(
z.lazy(() => CancelDeploymentPlatform$inboundSchema),
),
connectBuildsEnabled: types.optional(types.boolean()),
connectConfigurationId: types.optional(types.string()),
createdIn: types.string(),
crons: types.optional(
z.array(z.lazy(() => CancelDeploymentCrons$inboundSchema)),
),
functions: z.nullable(
z.record(z.lazy(() => CancelDeploymentFunctions$inboundSchema)),
).optional(),
monorepoManager: z.nullable(types.string()).optional(),
ownerId: types.string(),
passiveConnectConfigurationId: types.optional(types.string()),
routes: types.nullable(
z.array(smartUnion([
z.lazy(() => CancelDeploymentRoutes3$inboundSchema),
z.lazy(() =>
CancelDeploymentRoutes1$inboundSchema
),
z.lazy(() => CancelDeploymentRoutes2$inboundSchema),
])),
),
gitRepo: z.nullable(
z.union([
z.lazy(() => CancelDeploymentGitRepo1$inboundSchema),
z.lazy(() => CancelDeploymentGitRepo2$inboundSchema),
z.lazy(() => CancelDeploymentGitRepo3$inboundSchema),
z.lazy(() => CancelDeploymentGitRepo4$inboundSchema),
]),
).optional(),
flags: types.optional(
smartUnion([
z.lazy(() => CancelDeploymentFlags1$inboundSchema),
z.array(z.lazy(() => CancelDeploymentFlags2$inboundSchema)),
]),
),
microfrontends: types.optional(
smartUnion([
z.lazy(() => CancelDeploymentMicrofrontends2$inboundSchema),
z.lazy(() => CancelDeploymentMicrofrontends1$inboundSchema),
]),
),
config: types.optional(z.lazy(() => CancelDeploymentConfig$inboundSchema)),
checks: types.optional(z.lazy(() => CancelDeploymentChecks$inboundSchema)),
seatBlock: types.optional(
z.lazy(() => CancelDeploymentSeatBlock$inboundSchema),
),
attribution: types.optional(
z.lazy(() => CancelDeploymentAttribution$inboundSchema),
),
});
export function cancelDeploymentResponseBodyFromJSON(
jsonString: string,
): SafeParseResult<CancelDeploymentResponseBody, SDKValidationError> {
return safeParse(
jsonString,
(x) => CancelDeploymentResponseBody$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CancelDeploymentResponseBody' from JSON`,
);
}