@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
4,446 lines • 140 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 { SDKValidationError } from "./sdkvalidationerror.js";
/**
* Forces a new deployment even if there is a previous similar deployment. Set to `1` to bypass deployment deduplication and always trigger a fresh build.
*/
export const ForceNew = {
Zero: "0",
One: "1",
} as const;
/**
* Forces a new deployment even if there is a previous similar deployment. Set to `1` to bypass deployment deduplication and always trigger a fresh build.
*/
export type ForceNew = ClosedEnum<typeof ForceNew>;
/**
* Set to `1` to skip framework auto-detection and proceed without confirmation. By default, if Vercel detects a framework that differs from the project setting, the API returns a `400` asking you to confirm. Use this to suppress that check in automated pipelines.
*/
export const SkipAutoDetectionConfirmation = {
Zero: "0",
One: "1",
} as const;
/**
* Set to `1` to skip framework auto-detection and proceed without confirmation. By default, if Vercel detects a framework that differs from the project setting, the API returns a `400` asking you to confirm. Use this to suppress that check in automated pipelines.
*/
export type SkipAutoDetectionConfirmation = ClosedEnum<
typeof SkipAutoDetectionConfirmation
>;
/**
* Used in the case you want to reference a file that was already uploaded
*/
export type UploadedFile = {
/**
* The file path relative to the project root
*/
file: string;
/**
* The file contents hashed with SHA1, used to check the integrity
*/
sha?: string | undefined;
/**
* The file size in bytes
*/
size?: number | undefined;
};
/**
* The file content encoding, it could be either a base64 (useful for images, etc.) of the files or the plain text for source code.
*/
export const Encoding = {
Base64: "base64",
Utf8: "utf-8",
} as const;
/**
* The file content encoding, it could be either a base64 (useful for images, etc.) of the files or the plain text for source code.
*/
export type Encoding = ClosedEnum<typeof Encoding>;
/**
* Used in the case you want to inline a file inside the request
*/
export type InlinedFile = {
/**
* The file content, it could be either a `base64` (useful for images, etc.) of the files or the plain content for source code
*/
data: string;
/**
* The file content encoding, it could be either a base64 (useful for images, etc.) of the files or the plain text for source code.
*/
encoding?: Encoding | undefined;
/**
* The file name including the whole path
*/
file: string;
};
export type Files = InlinedFile | UploadedFile;
/**
* Populates initial git metadata for different git providers.
*/
export type GitMetadata = {
/**
* The git repository's remote origin url
*/
remoteUrl?: string | undefined;
/**
* The name of the author of the commit
*/
commitAuthorName?: string | undefined;
/**
* The email of the author of the commit
*/
commitAuthorEmail?: string | undefined;
/**
* The commit message
*/
commitMessage?: string | undefined;
/**
* The branch on which the commit was made
*/
commitRef?: string | undefined;
/**
* The hash of the commit
*/
commitSha?: string | undefined;
/**
* Whether or not there have been modifications to the working tree since the latest commit
*/
dirty?: boolean | undefined;
/**
* True if process.env.CI was set when deploying
*/
ci?: boolean | undefined;
/**
* The type of CI system used
*/
ciType?: string | undefined;
/**
* The username used for the Git Provider (e.g. GitHub) if their CI (e.g. GitHub Actions) was used, if available
*/
ciGitProviderUsername?: string | undefined;
/**
* The visibility of the Git repository if their CI (e.g. GitHub Actions) was used, if available
*/
ciGitRepoVisibility?: string | undefined;
/**
* Path of the deployed directory relative to the detected git repository root. Empty string when deploying from the repository root.
*/
rootDirectory?: string | undefined;
};
export const CreateDeploymentGitSourceDeploymentsRequestRequestBody9Type = {
CursorOrigin: "cursor-origin",
} as const;
export type CreateDeploymentGitSourceDeploymentsRequestRequestBody9Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsRequestRequestBody9Type
>;
/**
* Deploys from the Cursor Origin repository linked to the target project. The repository ID must match the linked repository; Vercel resolves the owner and repository name from the project link.
*/
export type GitSource9 = {
/**
* The Origin workspace slug. Optional because Vercel resolves it from the linked project.
*/
owner?: string | undefined;
/**
* The branch or Git reference to deploy.
*/
ref: string;
/**
* The Origin repository name. Optional because Vercel resolves it from the linked project.
*/
repo?: string | undefined;
/**
* The stable Origin repository ID. Read it from the `link.repoId` field returned by the project API.
*/
repoId: string;
/**
* The commit SHA to deploy. When omitted, Vercel resolves the latest commit on `ref`.
*/
sha?: string | undefined;
type: CreateDeploymentGitSourceDeploymentsRequestRequestBody9Type;
};
export const CreateDeploymentGitSourceDeploymentsRequestRequestBody8Type = {
Bitbucket: "bitbucket",
} as const;
export type CreateDeploymentGitSourceDeploymentsRequestRequestBody8Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsRequestRequestBody8Type
>;
export type GitSource8 = {
owner: string;
ref: string;
sha?: string | undefined;
slug: string;
type: CreateDeploymentGitSourceDeploymentsRequestRequestBody8Type;
};
export const CreateDeploymentGitSourceDeploymentsRequestRequestBody7Type = {
Bitbucket: "bitbucket",
} as const;
export type CreateDeploymentGitSourceDeploymentsRequestRequestBody7Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsRequestRequestBody7Type
>;
export type GitSource7 = {
ref: string;
repoUuid: string;
sha?: string | undefined;
type: CreateDeploymentGitSourceDeploymentsRequestRequestBody7Type;
workspaceUuid?: string | undefined;
};
export type ProjectId = number | string;
export const CreateDeploymentGitSourceDeploymentsRequestRequestBody6Type = {
Gitlab: "gitlab",
} as const;
export type CreateDeploymentGitSourceDeploymentsRequestRequestBody6Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsRequestRequestBody6Type
>;
export type GitSource6 = {
projectId: number | string;
ref: string;
sha?: string | undefined;
type: CreateDeploymentGitSourceDeploymentsRequestRequestBody6Type;
};
export const CreateDeploymentGitSourceDeploymentsRequestRequestBodyType = {
GithubLimited: "github-limited",
} as const;
export type CreateDeploymentGitSourceDeploymentsRequestRequestBodyType =
ClosedEnum<typeof CreateDeploymentGitSourceDeploymentsRequestRequestBodyType>;
export type GitSource5 = {
org: string;
ref: string;
repo: string;
sha?: string | undefined;
type: CreateDeploymentGitSourceDeploymentsRequestRequestBodyType;
};
export type GitSourceRepoId = number | string;
export const CreateDeploymentGitSourceDeploymentsRequestType = {
GithubLimited: "github-limited",
} as const;
export type CreateDeploymentGitSourceDeploymentsRequestType = ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsRequestType
>;
export type GitSource4 = {
ref: string;
repoId: number | string;
sha?: string | undefined;
type: CreateDeploymentGitSourceDeploymentsRequestType;
};
export const CreateDeploymentGitSourceDeploymentsType = {
Github: "github",
} as const;
export type CreateDeploymentGitSourceDeploymentsType = ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsType
>;
export type GitSource3 = {
org: string;
ref: string;
repo: string;
sha?: string | undefined;
type: CreateDeploymentGitSourceDeploymentsType;
};
export type RepoId = number | string;
export const CreateDeploymentGitSourceType = {
Github: "github",
} as const;
export type CreateDeploymentGitSourceType = ClosedEnum<
typeof CreateDeploymentGitSourceType
>;
export type GitSource2 = {
ref: string;
repoId: number | string;
sha?: string | undefined;
type: CreateDeploymentGitSourceType;
};
export const GitSourceType = {
Vercel: "vercel",
} as const;
export type GitSourceType = ClosedEnum<typeof GitSourceType>;
export type GitSource1 = {
type: GitSourceType;
sha: string;
};
/**
* Defines the Git Repository source to be deployed. This property can not be used in combination with `files`.
*/
export type GitSource =
| GitSource3
| GitSource5
| GitSource8
| GitSource2
| GitSource4
| GitSource6
| GitSource7
| GitSource9
| GitSource1;
/**
* The framework that is being used for this project. When `null` is used no framework is selected
*/
export const Framework = {
Services: "services",
Container: "container",
Blitzjs: "blitzjs",
Nextjs: "nextjs",
Gatsby: "gatsby",
Remix: "remix",
ReactRouter: "react-router",
Astro: "astro",
Hexo: "hexo",
Eleventy: "eleventy",
Docusaurus2: "docusaurus-2",
Docusaurus: "docusaurus",
Preact: "preact",
Solidstart1: "solidstart-1",
Solidstart: "solidstart",
Dojo: "dojo",
Ember: "ember",
Vue: "vue",
Scully: "scully",
IonicAngular: "ionic-angular",
Angular: "angular",
Polymer: "polymer",
Svelte: "svelte",
Sveltekit: "sveltekit",
Sveltekit1: "sveltekit-1",
IonicReact: "ionic-react",
CreateReactApp: "create-react-app",
Gridsome: "gridsome",
Umijs: "umijs",
Sapper: "sapper",
Saber: "saber",
Stencil: "stencil",
Nuxtjs: "nuxtjs",
Redwoodjs: "redwoodjs",
Hugo: "hugo",
Jekyll: "jekyll",
Brunch: "brunch",
Middleman: "middleman",
Zola: "zola",
Hydrogen: "hydrogen",
Vite: "vite",
TanstackStart: "tanstack-start",
TanstackStartLovable: "tanstack-start-lovable",
Vitepress: "vitepress",
Vuepress: "vuepress",
Parcel: "parcel",
Fastapi: "fastapi",
Flask: "flask",
Fasthtml: "fasthtml",
Django: "django",
Ash: "ash",
FactoryEve: "factory-eve",
Eve: "eve",
Sanity: "sanity",
SanityV2: "sanity-v2",
Storybook: "storybook",
Nitro: "nitro",
Hono: "hono",
Express: "express",
H3: "h3",
Koa: "koa",
Nestjs: "nestjs",
Elysia: "elysia",
Fastify: "fastify",
Xmcp: "xmcp",
Python: "python",
Ruby: "ruby",
Rust: "rust",
Axum: "axum",
ActixWeb: "actix-web",
Bun: "bun",
Node: "node",
Go: "go",
Mastra: "mastra",
} as const;
/**
* The framework that is being used for this project. When `null` is used no framework is selected
*/
export type Framework = ClosedEnum<typeof Framework>;
/**
* Override the Node.js version that should be used for this deployment
*/
export const NodeVersion = {
TwentyFourDotX: "24.x",
TwentyTwoDotX: "22.x",
TwentyDotX: "20.x",
EighteenDotX: "18.x",
SixteenDotX: "16.x",
FourteenDotX: "14.x",
TwelveDotX: "12.x",
TenDotX: "10.x",
EightDot10DotX: "8.10.x",
} as const;
/**
* Override the Node.js version that should be used for this deployment
*/
export type NodeVersion = ClosedEnum<typeof NodeVersion>;
/**
* Project settings that will be applied to the deployment. It is required for the first deployment of a project and will be saved for any following deployments
*/
export type ProjectSettings = {
/**
* The build command for this project. When `null` is used this value will be automatically detected
*/
buildCommand?: string | null | undefined;
commandForIgnoringBuildStep?: string | null | undefined;
/**
* The dev command for this project. When `null` is used this value will be automatically detected
*/
devCommand?: string | null | undefined;
/**
* The framework that is being used for this project. When `null` is used no framework is selected
*/
framework?: Framework | null | undefined;
/**
* The install command for this project. When `null` is used this value will be automatically detected
*/
installCommand?: string | null | undefined;
/**
* Override the Node.js version that should be used for this deployment
*/
nodeVersion?: NodeVersion | undefined;
/**
* The output directory of the project. When `null` is used this value will be automatically detected
*/
outputDirectory?: string | null | undefined;
/**
* The name of a directory or relative path to the source code of your project. When `null` is used it will default to the project root
*/
rootDirectory?: string | null | undefined;
/**
* The region to deploy Serverless Functions in this project
*/
serverlessFunctionRegion?: string | null | undefined;
/**
* Opts-out of the message prompting a CLI user to connect a Git repository in `vercel link`.
*
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
*/
skipGitConnectDuringLink?: boolean | undefined;
/**
* Indicates if there are source files outside of the root directory, typically used for monorepos
*/
sourceFilesOutsideRootDirectory?: boolean | undefined;
};
export type CreateDeploymentRequestBody = {
/**
* The slug or ID of a custom environment to deploy to, overriding the default target environment. When omitted, the deployment targets the environment inferred from the branch (production or preview).
*/
customEnvironmentSlugOrId?: string | undefined;
/**
* The ID of an existing deployment to redeploy. All project settings and environment variables are inherited from the original unless explicitly overridden in this request. The redeployment gets a new ID, URL, and build.
*/
deploymentId?: string | undefined;
/**
* The files to include in the deployment. Each entry is either an inlined file (with `data` and `encoding`) or a reference to a previously uploaded file (with `sha` and `size`). Required for non-git deployments. Cannot be used together with `gitSource`.
*/
files?: Array<InlinedFile | UploadedFile> | undefined;
/**
* Available only to Vercel platform accounts. A read-only GitHub access token scoped to the requested repository. Use a token with a lifetime of 24 hours or less that remains valid until source retrieval completes.
*/
gitAccessToken?: string | undefined;
/**
* Populates initial git metadata for different git providers.
*/
gitMetadata?: GitMetadata | undefined;
/**
* Defines the Git Repository source to be deployed. This property can not be used in combination with `files`.
*/
gitSource?:
| GitSource3
| GitSource5
| GitSource8
| GitSource2
| GitSource4
| GitSource6
| GitSource7
| GitSource9
| GitSource1
| undefined;
/**
* An object containing the deployment's metadata. Multiple key-value pairs can be attached to a deployment. For deployments created with a Cursor Origin `gitSource`, Vercel automatically adds `cursorOriginDeployment`, `cursorOriginCommitSha`, `cursorOriginCommitRef`, `cursorOriginCommitMessage`, `cursorOriginCommitAuthorName`, `cursorOriginCommitAuthorEmail` when available, `cursorOriginOwner`, `cursorOriginRepo`, `cursorOriginRepoId`, and `cursorOriginPrId` for pull request deployments.
*/
meta?: { [k: string]: string } | undefined;
/**
* The monorepo manager that is being used for this deployment. When `null` is used no monorepo manager is selected
*/
monorepoManager?: string | null | undefined;
/**
* A string with the project name used in the deployment URL
*/
name: string;
/**
* The target project identifier in which the deployment will be created. When defined, this parameter overrides name
*/
project?: string | undefined;
/**
* Project settings that will be applied to the deployment. It is required for the first deployment of a project and will be saved for any following deployments
*/
projectSettings?: ProjectSettings | undefined;
/**
* Either not defined, `staging`, `production`, or a custom environment identifier. If `staging`, a staging alias in the format `<project>-<team>.vercel.app` will be assigned. If `production`, any aliases defined in `alias` will be assigned. If omitted, the target will be `preview`.
*/
target?: string | undefined;
/**
* When `true` and `deploymentId` is passed in, the sha from the previous deployment's `gitSource` is removed forcing the latest commit to be used.
*/
withLatestCommit?: boolean | undefined;
};
export type CreateDeploymentRequest = {
/**
* Forces a new deployment even if there is a previous similar deployment. Set to `1` to bypass deployment deduplication and always trigger a fresh build.
*/
forceNew?: ForceNew | undefined;
/**
* Set to `1` to skip framework auto-detection and proceed without confirmation. By default, if Vercel detects a framework that differs from the project setting, the API returns a `400` asking you to confirm. Use this to suppress that check in automated pipelines.
*/
skipAutoDetectionConfirmation?: SkipAutoDetectionConfirmation | undefined;
/**
* 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;
requestBody: CreateDeploymentRequestBody;
};
export type ResponseBodyAliasAssignedAt = number | boolean;
export type ResponseBodyBuild = {
env: Array<string>;
};
export type ResponseBodyBuilds = {
use: string;
src?: string | undefined;
config?: { [k: string]: any } | undefined;
};
/**
* Machine type which was purchased/selected for this build. `basic` is the 2vCPU tier, recorded on the deployment so the build pipeline can detect a basic build without consulting the project.
*/
export const ResponseBodyPurchaseType = {
Basic: "basic",
Enhanced: "enhanced",
Standard: "standard",
Turbo: "turbo",
} as const;
/**
* Machine type which was purchased/selected for this build. `basic` is the 2vCPU tier, recorded on the deployment so the build pipeline can detect a basic build without consulting the project.
*/
export type ResponseBodyPurchaseType = ClosedEnum<
typeof ResponseBodyPurchaseType
>;
/**
* The default plan type for the build machine — what the customer is *paying* for on their plan. For most customers, this is standard, but some customers have an entitlement for enhanced builds.
*/
export const ResponseBodyDefaultPurchaseType = {
Basic: "basic",
Enhanced: "enhanced",
Standard: "standard",
} as const;
/**
* The default plan type for the build machine — what the customer is *paying* for on their plan. For most customers, this is standard, but some customers have an entitlement for enhanced builds.
*/
export type ResponseBodyDefaultPurchaseType = ClosedEnum<
typeof ResponseBodyDefaultPurchaseType
>;
/**
* Whether the build ran on a fixed or elastic machine. Used to drive billing for the build.
*/
export const ResponseBodyMachineSelectionType = {
Elastic: "elastic",
Fixed: "fixed",
} as const;
/**
* Whether the build ran on a fixed or elastic machine. Used to drive billing for the build.
*/
export type ResponseBodyMachineSelectionType = ClosedEnum<
typeof ResponseBodyMachineSelectionType
>;
/**
* The setting which selected the build machine when the deployment was created. Frozen here so later project or team changes do not rewrite its history.
*/
export const ResponseBodySelectionSource = {
ElasticAlgorithm: "elastic-algorithm",
PlanDefault: "plan-default",
ProjectSetting: "project-setting",
TeamEntitlement: "team-entitlement",
TeamSetting: "team-setting",
} as const;
/**
* The setting which selected the build machine when the deployment was created. Frozen here so later project or team changes do not rewrite its history.
*/
export type ResponseBodySelectionSource = ClosedEnum<
typeof ResponseBodySelectionSource
>;
/**
* Build machine configuration recorded for this deployment's build. See {@link DeploymentBuildMachine}. Distinct from the team/user `resourceConfig.buildMachine`, which only carries `default`.
*/
export type ResponseBodyBuildMachine = {
/**
* Machine type which was purchased/selected for this build. `basic` is the 2vCPU tier, recorded on the deployment so the build pipeline can detect a basic build without consulting the project.
*/
purchaseType?: ResponseBodyPurchaseType | undefined;
/**
* The default plan type for the build machine — what the customer is *paying* for on their plan. For most customers, this is standard, but some customers have an entitlement for enhanced builds.
*/
defaultPurchaseType?: ResponseBodyDefaultPurchaseType | undefined;
/**
* Whether the build ran on a fixed or elastic machine. Used to drive billing for the build.
*/
machineSelectionType?: ResponseBodyMachineSelectionType | undefined;
/**
* The setting which selected the build machine when the deployment was created. Frozen here so later project or team changes do not rewrite its history.
*/
selectionSource?: ResponseBodySelectionSource | undefined;
/**
* Number of cores the build machine ran with. Set at dispatch time once the build lands on a hive.
*/
cores?: number | undefined;
/**
* Memory, in MiB, the build machine ran with. Set at dispatch time once the build lands on a hive.
*/
memory?: number | undefined;
};
export type ResponseBodyResourceConfig = {
/**
* Build machine configuration recorded for this deployment's build. See {@link DeploymentBuildMachine}. Distinct from the team/user `resourceConfig.buildMachine`, which only carries `default`.
*/
buildMachine?: ResponseBodyBuildMachine | undefined;
};
export const CreateDeploymentResponseBodyDeploymentsNodeVersion = {
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 CreateDeploymentResponseBodyDeploymentsNodeVersion = ClosedEnum<
typeof CreateDeploymentResponseBodyDeploymentsNodeVersion
>;
export const CreateDeploymentResponseBodyFramework = {
ActixWeb: "actix-web",
Angular: "angular",
Ash: "ash",
Astro: "astro",
Axum: "axum",
Blitzjs: "blitzjs",
Brunch: "brunch",
Bun: "bun",
Container: "container",
CreateReactApp: "create-react-app",
Django: "django",
Docusaurus: "docusaurus",
Docusaurus2: "docusaurus-2",
Dojo: "dojo",
Eleventy: "eleventy",
Elysia: "elysia",
Ember: "ember",
Eve: "eve",
Express: "express",
FactoryEve: "factory-eve",
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",
TanstackStartLovable: "tanstack-start-lovable",
Umijs: "umijs",
Vite: "vite",
Vitepress: "vitepress",
Vue: "vue",
Vuepress: "vuepress",
Xmcp: "xmcp",
Zola: "zola",
} as const;
export type CreateDeploymentResponseBodyFramework = ClosedEnum<
typeof CreateDeploymentResponseBodyFramework
>;
export type CreateDeploymentResponseBodySpeedInsights = {
id: string;
enabledAt?: number | undefined;
disabledAt?: number | undefined;
canceledAt?: number | undefined;
hasData?: boolean | undefined;
/**
* When the first free (not Speed Insights Plus) production data point was observed, in ms. Set once by subscriber-analytics-events; projects that already had data before this field shipped get it backfilled on their next batch, so it reads "first free data point observed", not necessarily "first ever".
*/
dataReceivedAt?: number | undefined;
paidAt?: number | undefined;
};
export type CreateDeploymentResponseBodyWebAnalytics = {
id: string;
disabledAt?: number | undefined;
canceledAt?: number | undefined;
enabledAt?: number | undefined;
hasData?: true | undefined;
};
export type CreateDeploymentResponseBodyProjectSettings = {
nodeVersion?: CreateDeploymentResponseBodyDeploymentsNodeVersion | undefined;
buildCommand?: string | null | undefined;
devCommand?: string | null | undefined;
framework?: CreateDeploymentResponseBodyFramework | null | undefined;
commandForIgnoringBuildStep?: string | null | undefined;
installCommand?: string | null | undefined;
outputDirectory?: string | null | undefined;
speedInsights?: CreateDeploymentResponseBodySpeedInsights | undefined;
webAnalytics?: CreateDeploymentResponseBodyWebAnalytics | undefined;
};
export const CreateDeploymentResponseBodyDeploymentsStatus = {
Error: "error",
Pending: "pending",
Ready: "ready",
Skipped: "skipped",
Timeout: "timeout",
} as const;
export type CreateDeploymentResponseBodyDeploymentsStatus = ClosedEnum<
typeof CreateDeploymentResponseBodyDeploymentsStatus
>;
export type ResponseBodyIntegrations = {
status: CreateDeploymentResponseBodyDeploymentsStatus;
startedAt: number;
claimedAt?: number | undefined;
completedAt?: number | undefined;
skippedAt?: number | undefined;
skippedBy?: string | undefined;
};
/**
* Must be `http` or `https`.
*/
export const ResponseBodyProtocol = {
Http: "http",
Https: "https",
} as const;
/**
* Must be `http` or `https`.
*/
export type ResponseBodyProtocol = ClosedEnum<typeof ResponseBodyProtocol>;
export type ResponseBodyRemotePatterns = {
/**
* Must be `http` or `https`.
*/
protocol?: ResponseBodyProtocol | 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 ResponseBodyLocalPatterns = {
/**
* 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 ResponseBodyFormats = {
ImageAvif: "image/avif",
ImageWebp: "image/webp",
} as const;
export type ResponseBodyFormats = ClosedEnum<typeof ResponseBodyFormats>;
export const ResponseBodyContentDispositionType = {
Attachment: "attachment",
Inline: "inline",
} as const;
export type ResponseBodyContentDispositionType = ClosedEnum<
typeof ResponseBodyContentDispositionType
>;
export type ResponseBodyImages = {
sizes?: Array<number> | undefined;
qualities?: Array<number> | undefined;
domains?: Array<string> | undefined;
remotePatterns?: Array<ResponseBodyRemotePatterns> | undefined;
localPatterns?: Array<ResponseBodyLocalPatterns> | undefined;
minimumCacheTTL?: number | undefined;
formats?: Array<ResponseBodyFormats> | undefined;
dangerouslyAllowSVG?: boolean | undefined;
contentSecurityPolicy?: string | undefined;
contentDispositionType?: ResponseBodyContentDispositionType | undefined;
};
/**
* Principal type of the deployment creator.
*/
export const CreateDeploymentResponseBodyDeploymentsType = {
App: "app",
Integration: "integration",
System: "system",
User: "user",
} as const;
/**
* Principal type of the deployment creator.
*/
export type CreateDeploymentResponseBodyDeploymentsType = ClosedEnum<
typeof CreateDeploymentResponseBodyDeploymentsType
>;
/**
* Information about the deployment creator
*/
export type CreateDeploymentResponseBodyCreator = {
/**
* Stable creator id across principal types (user id, app id, integration configuration id, or `system`).
*/
uid: string;
/**
* Principal type of the deployment creator.
*/
type?: CreateDeploymentResponseBodyDeploymentsType | undefined;
/**
* 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 CreateDeploymentResponseBodyDeploymentsResponseReadyState = {
Building: "BUILDING",
Error: "ERROR",
Initializing: "INITIALIZING",
Ready: "READY",
} as const;
export type CreateDeploymentResponseBodyDeploymentsResponseReadyState =
ClosedEnum<typeof CreateDeploymentResponseBodyDeploymentsResponseReadyState>;
export type CreateDeploymentResponseBodyOutput = {
path: string;
functionName: string;
};
/**
* A partial representation of a Build used by the deployment endpoint.
*/
export type CreateDeploymentResponseBodyLambdas = {
id: string;
readyState?:
| CreateDeploymentResponseBodyDeploymentsResponseReadyState
| undefined;
createdAt?: number | undefined;
entrypoint?: string | null | undefined;
readyStateAt?: number | undefined;
output: Array<CreateDeploymentResponseBodyOutput>;
};
export const CreateDeploymentResponseBodyStatus = {
Blocked: "BLOCKED",
Building: "BUILDING",
Canceled: "CANCELED",
Error: "ERROR",
Initializing: "INITIALIZING",
Queued: "QUEUED",
Ready: "READY",
} as const;
export type CreateDeploymentResponseBodyStatus = ClosedEnum<
typeof CreateDeploymentResponseBodyStatus
>;
/**
* The team that owns the deployment if any
*/
export type CreateDeploymentResponseBodyTeam = {
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 CreateDeploymentCustomEnvironment2 = {
id: string;
};
/**
* The type of environment (production, preview, or development)
*/
export const CreateDeploymentCustomEnvironmentType = {
Development: "development",
Preview: "preview",
Production: "production",
} as const;
/**
* The type of environment (production, preview, or development)
*/
export type CreateDeploymentCustomEnvironmentType = ClosedEnum<
typeof CreateDeploymentCustomEnvironmentType
>;
/**
* The type of matching to perform
*/
export const CreateDeploymentCustomEnvironmentDeploymentsType = {
EndsWith: "endsWith",
Equals: "equals",
StartsWith: "startsWith",
} as const;
/**
* The type of matching to perform
*/
export type CreateDeploymentCustomEnvironmentDeploymentsType = ClosedEnum<
typeof CreateDeploymentCustomEnvironmentDeploymentsType
>;
/**
* Configuration for matching git branches to this environment
*/
export type CreateDeploymentCustomEnvironmentBranchMatcher = {
/**
* The type of matching to perform
*/
type: CreateDeploymentCustomEnvironmentDeploymentsType;
/**
* 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 CreateDeploymentCustomEnvironmentVerification = {
type: string;
domain: string;
value: string;
reason: string;
};
/**
* List of domains associated with this environment
*/
export type CreateDeploymentCustomEnvironmentDomains = {
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<CreateDeploymentCustomEnvironmentVerification>
| undefined;
};
/**
* If the deployment was created using a Custom Environment, then this property contains information regarding the environment used.
*/
export type CreateDeploymentCustomEnvironment1 = {
/**
* 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: CreateDeploymentCustomEnvironmentType;
/**
* Optional description of the environment's purpose
*/
description?: string | undefined;
/**
* Configuration for matching git branches to this environment
*/
branchMatcher?: CreateDeploymentCustomEnvironmentBranchMatcher | undefined;
/**
* List of domains associated with this environment
*/
domains?: Array<CreateDeploymentCustomEnvironmentDomains> | 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 CreateDeploymentResponseBodyCustomEnvironment =
| CreateDeploymentCustomEnvironment1
| CreateDeploymentCustomEnvironment2;
export const CreateDeploymentResponseBodyOomReport = {
OutOfMemory: "out-of-memory",
} as const;
export type CreateDeploymentResponseBodyOomReport = ClosedEnum<
typeof CreateDeploymentResponseBodyOomReport
>;
/**
* 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 CreateDeploymentResponseBodyDeploymentsTarget = {
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 CreateDeploymentResponseBodyDeploymentsTarget = ClosedEnum<
typeof CreateDeploymentResponseBodyDeploymentsTarget
>;
/**
* The state of the deployment depending on the process of deploying, or if it is ready or in an error state
*/
export const CreateDeploymentResponseBodyDeploymentsReadyState = {
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 CreateDeploymentResponseBodyDeploymentsReadyState = ClosedEnum<
typeof CreateDeploymentResponseBodyDeploymentsReadyState
>;
/**
* An object that will contain a `code` and a `message` when the aliasing fails, otherwise the value will be `null`
*/
export type CreateDeploymentResponseBodyDeploymentsAliasError = {
code: string;
message: string;
};
export type CreateDeploymentResponseBodyDeploymentsAliasWarning = {
code: string;
message: string;
link?: string | undefined;
action?: string | undefined;
};
export const CreateDeploymentResponseBodyType = {
Lambdas: "LAMBDAS",
} as const;
export type CreateDeploymentResponseBodyType = ClosedEnum<
typeof CreateDeploymentResponseBodyType
>;
export const CreateDeploymentResponseBodyChecksState = {
Completed: "completed",
Registered: "registered",
Running: "running",
} as const;
export type CreateDeploymentResponseBodyChecksState = ClosedEnum<
typeof CreateDeploymentResponseBodyChecksState
>;
export const CreateDeploymentResponseBodyChecksConclusion = {
Canceled: "canceled",
Failed: "failed",
Skipped: "skipped",
Succeeded: "succeeded",
} as const;
export type CreateDeploymentResponseBodyChecksConclusion = ClosedEnum<
typeof CreateDeploymentResponseBodyChecksConclusion
>;
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody219Type =
{
CursorOrigin: "cursor-origin",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody219Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody219Type
>;
export type CreateDeploymentGitSource19 = {
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody219Type;
ref: string;
sha: string;
repoId: string;
owner: string;
repo: string;
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody218Type =
{
Vercel: "vercel",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody218Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody218Type
>;
export type CreateDeploymentGitSource18 = {
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody218Type;
ref: string;
sha: string;
org: string;
repo: string;
repoPushedAt?: number | undefined;
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type =
{
Bitbucket: "bitbucket",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type
>;
export type CreateDeploymentGitSource17 = {
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type;
ref: string;
sha: string;
owner?: string | undefined;
slug?: string | undefined;
workspaceUuid: string;
repoUuid: string;
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type =
{
Gitlab: "gitlab",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type
>;
export type CreateDeploymentGitSource16 = {
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type;
ref: string;
sha: string;
projectId: number;
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type =
{
GithubLimited: "github-limited",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type
>;
export type CreateDeploymentGitSource15 = {
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type;
ref: string;
sha: string;
repoId: number;
org?: string | undefined;
repo?: string | undefined;
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type =
{
GithubCustomHost: "github-custom-host",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type
>;
export type CreateDeploymentGitSource14 = {
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type;
host: string;
ref: string;
sha: string;
repoId: number;
org?: string | undefined;
repo?: string | undefined;
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type =
{
Github: "github",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type
>;
export type CreateDeploymentGitSource13 = {
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type;
ref: string;
sha: string;
repoId: number;
org?: string | undefined;
repo?: string | undefined;
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type =
{
Custom: "custom",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type
>;
/**
* Allows custom git sources (local folder mounted to the container) in test mode
*/
export type CreateDeploymentGitSource12 = {
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type;
ref: string;
sha: string;
gitUrl: string;
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type =
{
CursorOrigin: "cursor-origin",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type
>;
export type CreateDeploymentGitSource11 = {
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type;
/**
* Origin repository id.
*/
repoId: string;
/**
* Owner (namespace) slug.
*/
owner?: string | undefined;
repo?: string | undefined;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type =
{
Vercel: "vercel",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type
>;
export type CreateDeploymentGitSource10 = {
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type;
org?: string | undefined;
repo?: string | undefined;
sha: string;
repoPushedAt?: number | undefined;
ref?: string | null | undefined;
prId?: number | null | undefined;
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type =
{
Bitbucket: "bitbucket",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type
>;
export type CreateDeploymentGitSource9 = {
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type;
owner: string;
slug: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type =
{
Bitbucket: "bitbucket",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type
>;
export type CreateDeploymentGitSource8 = {
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type;
workspaceUuid?: string | undefined;
repoUuid: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type =
{
Gitlab: "gitlab",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type
>;
export type CreateDeploymentGitSourceProjectId = string | number;
export type CreateDeploymentGitSource7 = {
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type;
projectId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type =
{
GithubLimited: "github-limited",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type
>;
export type CreateDeploymentGitSource6 = {
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type;
org: string;
repo: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type =
{
GithubLimited: "github-limited",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type
>;
export type CreateDeploymentGitSourceDeploymentsResponseRepoId =
| string
| number;
export type CreateDeploymentGitSource5 = {
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type;
repoId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType =
{
GithubCustomHost: "github-custom-host",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType
>;
export type CreateDeploymentGitSource4 = {
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType;
host: string;
org: string;
repo: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType =
{
GithubCustomHost: "github-custom-host",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType =
ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType
>;
export type CreateDeploymentGitSourceDeploymentsRepoId = string | number;
export type CreateDeploymentGitSource3 = {
type: CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType;
host: string;
repoId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const CreateDeploymentGitSourceDeploymentsResponse200Type = {
Github: "github",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponse200Type = ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200Type
>;
export type CreateDeploymentGitSource2 = {
type: CreateDeploymentGitSourceDeploymentsResponse200Type;
org: string;
repo: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const CreateDeploymentGitSourceDeploymentsResponseType = {
Github: "github",
} as const;
export type CreateDeploymentGitSourceDeploymentsResponseType = ClosedEnum<
typeof CreateDeploymentGitSourceDeploymentsResponseType
>;
export type CreateDeploymentGitSourceRepoId = string | number;
export type CreateDeploymentGitSource1 = {
type: CreateDeploymentGitSourceDeploymentsResponseType;
repoId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export type CreateDeploymentResponseBodyGitSource =
| CreateDeploymentGitSource19
| CreateDeploymentGitSource14
| CreateDeploymentGitSource17
| CreateDeploymentGitSource18
| CreateDeploymentGitSource4
| CreateDeploymentGitSource12
| CreateDeploymentGitSource13
| CreateDeploymentGitSource15
| CreateDeploymentGitSource16
| CreateDeploymentGitSource2
| CreateDeploymentGitSource3
| CreateDeploymentGitSource6
| CreateDeploymentGitSource9
| CreateDeploymentGitSource1
| CreateDeploymentGitSource5
| CreateDeploymentGitSource7
| CreateDeploymentGitSource8
| CreateDeploymentGitSource10
| CreateDeploymentGitSource11;
/**
* Current provisioning state
*/
export const CreateDeploymentResponseBodyState = {
Complete: "COMPLETE",
Pending: "PENDING",
Timeout: "TIMEOUT",
} as const;
/**
* Current provisioning state
*/
export type CreateDeploymentResponseBodyState = ClosedEnum<
typeof CreateDeploymentResponseBodyState
>;
/**
* 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 CreateDeploymentResponseBodyManualProvisioning = {
/**
* Current provisioning state
*/
state: CreateDeploymentResponseBodyState;
/**
* Timestamp when manual provisioning completed
*/
completedAt?: number | undefined;
};
/**
* If set it overrides the `projectSettings.nodeVersion` for this deployment.
*/
export const CreateDeploymentResponseBodyNodeVersion = {
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 CreateDeploymentResponseBodyNodeVersion = ClosedEnum<
typeof CreateDeploymentResponseBodyNodeVersion
>;
/**
* The public project information associated with the deployment.
*/
export type CreateDeploymentResponseBodyProject = {
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 CreateDeploymentResponseBodyReadySubstate = {
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 CreateDeploymentResponseBodyReadySubstate = ClosedEnum<
typeof CreateDeploymentResponseBodyReadySubstate
>;
/**
* Where was the deployment created from. Best-effort guess for metrics only — not authoritative; do not gate behavior on it.
*/
export const CreateDeploymentResponseBodySource = {
ApiTriggerGitDeploy: "api-trigger-git-deploy",
Cli: "cli",
CloneRepo: "clone/repo",
Drop: "drop",
Git: "git",
GitDeployHook: "git-deploy-hook",
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 CreateDeploymentResponseBodySource = ClosedEnum<
typeof CreateDeploymentResponseBodySource
>;
export type CreateDeploymentResponseBodyOidcTokenClaims = {
iss: string;
sub: string;
scope: string;
aud: string;
owner: string;
ownerId: string;
project: string;
projectId: string;
environment: string;
customEnvironmentId?: string | undefined;
mfeGroupIds?: Array<string> | undefined;
plan?: string | undefined;
};
export const ResponseBodyPlan = {
Enterprise: "enterprise",
Hobby: "hobby",
Pro: "pro",
} as const;
export type ResponseBodyPlan = ClosedEnum<typeof ResponseBodyPlan>;
export type ResponseBodyCrons = {
schedule: string;
path: string;
};
export const AtprotoKinds = {
Account: "account",
Commit: "commit",
Identity: "identity",
Sync: "sync",
} as const;
export type AtprotoKinds = ClosedEnum<typeof AtprotoKinds>;
export type AtprotoSubscription = {
collections: Array<string>;
dids?: Array<string> | undefined;
kinds?: Array<AtprotoKinds> | undefined;
path: string;
};
export type CreateDeploymentAtproto2 = {
enabled: true;
subscription: AtprotoSubscription;
};
export type CreateDeploymentAtproto1 = {
enabled: false;
};
export type ResponseBodyAtproto =
| CreateDeploymentAtproto2
| CreateDeploymentAtproto1;
export const ResponseBodyArchitecture = {
Arm64: "arm64",
X8664: "x86_64",
} as const;
export type ResponseBodyArchitecture = ClosedEnum<
typeof ResponseBodyArchitecture
>;
export const CreateDeploymentMaxDuration2 = {
Max: "max",
} as const;
export type CreateDeploymentMaxDuration2 = ClosedEnum<
typeof CreateDeploymentMaxDuration2
>;
export type ResponseBodyMaxDuration = number | CreateDeploymentMaxDuration2;
export const ResponseBodyMode = {
Strict: "strict",
} as const;
export type ResponseBodyMode = ClosedEnum<typeof ResponseBodyMode>;
export type ResponseBodyAffinity = {
mode: ResponseBodyMode;
};
export type CreateDeploymentExperimentalTriggers3 = {
/**
* Event type - must be "schedule/v1beta" (REQUIRED)
*/
type: "schedule/v1beta";
};
/**
* 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 CreateDeploymentExperimentalTriggers2 = {
/**
* 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 CreateDeploymentExperimentalTriggers1 = {
/**
* 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 ResponseBodyExperimentalTriggers =
| CreateDeploymentExperimentalTriggers1
| CreateDeploymentExperimentalTriggers2
| CreateDeploymentExperimentalTriggers3;
export type ResponseBodyFunctions = {
architecture?: ResponseBodyArchitecture | undefined;
memory?: number | undefined;
maxDuration?: number | CreateDeploymentMaxDuration2 | undefined;
affinity?: ResponseBodyAffinity | undefined;
maxConcurrency?: number | undefined;
regions?: Array<string> | undefined;
functionFailoverRegions?: Array<string> | undefined;
runtime?: string | undefined;
includeFiles?: string | undefined;
excludeFiles?: string | undefined;
experimentalTriggers?:
| Array<
| CreateDeploymentExperimentalTriggers1
| CreateDeploymentExperimentalTriggers2
| CreateDeploymentExperimentalTriggers3
>
| undefined;
supportsCancellation?: boolean | undefined;
};
export type CreateDeploymentRoutes3 = {
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 CreateDeploymentRoutes2 = {
handle: RoutesHandle;
src?: string | undefined;
dest?: string | undefined;
status?: number | undefined;
};
export const CreateDeploymentHasDeploymentsType = {
Cookie: "cookie",
Header: "header",
Query: "query",
} as const;
export type CreateDeploymentHasDeploymentsType = ClosedEnum<
typeof CreateDeploymentHasDeploymentsType
>;
/** @internal */
export const ForceNew$outboundSchema: z.ZodNativeEnum<typeof ForceNew> = z
.nativeEnum(ForceNew);
/** @internal */
export const SkipAutoDetectionConfirmation$outboundSchema: z.ZodNativeEnum<
typeof SkipAutoDetectionConfirmation
> = z.nativeEnum(SkipAutoDetectionConfirmation);
/** @internal */
export type UploadedFile$Outbound = {
file: string;
sha?: string | undefined;
size?: number | undefined;
};
/** @internal */
export const UploadedFile$outboundSchema: z.ZodType<
UploadedFile$Outbound,
z.ZodTypeDef,
UploadedFile
> = z.object({
file: z.string(),
sha: z.string().optional(),
size: z.number().int().optional(),
});
export function uploadedFileToJSON(uploadedFile: UploadedFile): string {
return JSON.stringify(UploadedFile$outboundSchema.parse(uploadedFile));
}
/** @internal */
export const Encoding$outboundSchema: z.ZodNativeEnum<typeof Encoding> = z
.nativeEnum(Encoding);
/** @internal */
export type InlinedFile$Outbound = {
data: string;
encoding?: string | undefined;
file: string;
};
/** @internal */
export const InlinedFile$outboundSchema: z.ZodType<
InlinedFile$Outbound,
z.ZodTypeDef,
InlinedFile
> = z.object({
data: z.string(),
encoding: Encoding$outboundSchema.optional(),
file: z.string(),
});
export function inlinedFileToJSON(inlinedFile: InlinedFile): string {
return JSON.stringify(InlinedFile$outboundSchema.parse(inlinedFile));
}
/** @internal */
export type Files$Outbound = InlinedFile$Outbound | UploadedFile$Outbound;
/** @internal */
export const Files$outboundSchema: z.ZodType<
Files$Outbound,
z.ZodTypeDef,
Files
> = smartUnion([
z.lazy(() => InlinedFile$outboundSchema),
z.lazy(() => UploadedFile$outboundSchema),
]);
export function filesToJSON(files: Files): string {
return JSON.stringify(Files$outboundSchema.parse(files));
}
/** @internal */
export type GitMetadata$Outbound = {
remoteUrl?: string | undefined;
commitAuthorName?: string | undefined;
commitAuthorEmail?: string | undefined;
commitMessage?: string | undefined;
commitRef?: string | undefined;
commitSha?: string | undefined;
dirty?: boolean | undefined;
ci?: boolean | undefined;
ciType?: string | undefined;
ciGitProviderUsername?: string | undefined;
ciGitRepoVisibility?: string | undefined;
rootDirectory?: string | undefined;
};
/** @internal */
export const GitMetadata$outboundSchema: z.ZodType<
GitMetadata$Outbound,
z.ZodTypeDef,
GitMetadata
> = z.object({
remoteUrl: z.string().optional(),
commitAuthorName: z.string().optional(),
commitAuthorEmail: z.string().optional(),
commitMessage: z.string().optional(),
commitRef: z.string().optional(),
commitSha: z.string().optional(),
dirty: z.boolean().optional(),
ci: z.boolean().optional(),
ciType: z.string().optional(),
ciGitProviderUsername: z.string().optional(),
ciGitRepoVisibility: z.string().optional(),
rootDirectory: z.string().optional(),
});
export function gitMetadataToJSON(gitMetadata: GitMetadata): string {
return JSON.stringify(GitMetadata$outboundSchema.parse(gitMetadata));
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsRequestRequestBody9Type$outboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsRequestRequestBody9Type
> = z.nativeEnum(CreateDeploymentGitSourceDeploymentsRequestRequestBody9Type);
/** @internal */
export type GitSource9$Outbound = {
owner?: string | undefined;
ref: string;
repo?: string | undefined;
repoId: string;
sha?: string | undefined;
type: string;
};
/** @internal */
export const GitSource9$outboundSchema: z.ZodType<
GitSource9$Outbound,
z.ZodTypeDef,
GitSource9
> = z.object({
owner: z.string().optional(),
ref: z.string(),
repo: z.string().optional(),
repoId: z.string(),
sha: z.string().optional(),
type:
CreateDeploymentGitSourceDeploymentsRequestRequestBody9Type$outboundSchema,
});
export function gitSource9ToJSON(gitSource9: GitSource9): string {
return JSON.stringify(GitSource9$outboundSchema.parse(gitSource9));
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsRequestRequestBody8Type$outboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsRequestRequestBody8Type
> = z.nativeEnum(CreateDeploymentGitSourceDeploymentsRequestRequestBody8Type);
/** @internal */
export type GitSource8$Outbound = {
owner: string;
ref: string;
sha?: string | undefined;
slug: string;
type: string;
};
/** @internal */
export const GitSource8$outboundSchema: z.ZodType<
GitSource8$Outbound,
z.ZodTypeDef,
GitSource8
> = z.object({
owner: z.string(),
ref: z.string(),
sha: z.string().optional(),
slug: z.string(),
type:
CreateDeploymentGitSourceDeploymentsRequestRequestBody8Type$outboundSchema,
});
export function gitSource8ToJSON(gitSource8: GitSource8): string {
return JSON.stringify(GitSource8$outboundSchema.parse(gitSource8));
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsRequestRequestBody7Type$outboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsRequestRequestBody7Type
> = z.nativeEnum(CreateDeploymentGitSourceDeploymentsRequestRequestBody7Type);
/** @internal */
export type GitSource7$Outbound = {
ref: string;
repoUuid: string;
sha?: string | undefined;
type: string;
workspaceUuid?: string | undefined;
};
/** @internal */
export const GitSource7$outboundSchema: z.ZodType<
GitSource7$Outbound,
z.ZodTypeDef,
GitSource7
> = z.object({
ref: z.string(),
repoUuid: z.string(),
sha: z.string().optional(),
type:
CreateDeploymentGitSourceDeploymentsRequestRequestBody7Type$outboundSchema,
workspaceUuid: z.string().optional(),
});
export function gitSource7ToJSON(gitSource7: GitSource7): string {
return JSON.stringify(GitSource7$outboundSchema.parse(gitSource7));
}
/** @internal */
export type ProjectId$Outbound = number | string;
/** @internal */
export const ProjectId$outboundSchema: z.ZodType<
ProjectId$Outbound,
z.ZodTypeDef,
ProjectId
> = smartUnion([z.number(), z.string()]);
export function projectIdToJSON(projectId: ProjectId): string {
return JSON.stringify(ProjectId$outboundSchema.parse(projectId));
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsRequestRequestBody6Type$outboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsRequestRequestBody6Type
> = z.nativeEnum(CreateDeploymentGitSourceDeploymentsRequestRequestBody6Type);
/** @internal */
export type GitSource6$Outbound = {
projectId: number | string;
ref: string;
sha?: string | undefined;
type: string;
};
/** @internal */
export const GitSource6$outboundSchema: z.ZodType<
GitSource6$Outbound,
z.ZodTypeDef,
GitSource6
> = z.object({
projectId: smartUnion([z.number(), z.string()]),
ref: z.string(),
sha: z.string().optional(),
type:
CreateDeploymentGitSourceDeploymentsRequestRequestBody6Type$outboundSchema,
});
export function gitSource6ToJSON(gitSource6: GitSource6): string {
return JSON.stringify(GitSource6$outboundSchema.parse(gitSource6));
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsRequestRequestBodyType$outboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsRequestRequestBodyType
> = z.nativeEnum(CreateDeploymentGitSourceDeploymentsRequestRequestBodyType);
/** @internal */
export type GitSource5$Outbound = {
org: string;
ref: string;
repo: string;
sha?: string | undefined;
type: string;
};
/** @internal */
export const GitSource5$outboundSchema: z.ZodType<
GitSource5$Outbound,
z.ZodTypeDef,
GitSource5
> = z.object({
org: z.string(),
ref: z.string(),
repo: z.string(),
sha: z.string().optional(),
type:
CreateDeploymentGitSourceDeploymentsRequestRequestBodyType$outboundSchema,
});
export function gitSource5ToJSON(gitSource5: GitSource5): string {
return JSON.stringify(GitSource5$outboundSchema.parse(gitSource5));
}
/** @internal */
export type GitSourceRepoId$Outbound = number | string;
/** @internal */
export const GitSourceRepoId$outboundSchema: z.ZodType<
GitSourceRepoId$Outbound,
z.ZodTypeDef,
GitSourceRepoId
> = smartUnion([z.number(), z.string()]);
export function gitSourceRepoIdToJSON(
gitSourceRepoId: GitSourceRepoId,
): string {
return JSON.stringify(GitSourceRepoId$outboundSchema.parse(gitSourceRepoId));
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsRequestType$outboundSchema:
z.ZodNativeEnum<typeof CreateDeploymentGitSourceDeploymentsRequestType> = z
.nativeEnum(CreateDeploymentGitSourceDeploymentsRequestType);
/** @internal */
export type GitSource4$Outbound = {
ref: string;
repoId: number | string;
sha?: string | undefined;
type: string;
};
/** @internal */
export const GitSource4$outboundSchema: z.ZodType<
GitSource4$Outbound,
z.ZodTypeDef,
GitSource4
> = z.object({
ref: z.string(),
repoId: smartUnion([z.number(), z.string()]),
sha: z.string().optional(),
type: CreateDeploymentGitSourceDeploymentsRequestType$outboundSchema,
});
export function gitSource4ToJSON(gitSource4: GitSource4): string {
return JSON.stringify(GitSource4$outboundSchema.parse(gitSource4));
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsType$outboundSchema:
z.ZodNativeEnum<typeof CreateDeploymentGitSourceDeploymentsType> = z
.nativeEnum(CreateDeploymentGitSourceDeploymentsType);
/** @internal */
export type GitSource3$Outbound = {
org: string;
ref: string;
repo: string;
sha?: string | undefined;
type: string;
};
/** @internal */
export const GitSource3$outboundSchema: z.ZodType<
GitSource3$Outbound,
z.ZodTypeDef,
GitSource3
> = z.object({
org: z.string(),
ref: z.string(),
repo: z.string(),
sha: z.string().optional(),
type: CreateDeploymentGitSourceDeploymentsType$outboundSchema,
});
export function gitSource3ToJSON(gitSource3: GitSource3): string {
return JSON.stringify(GitSource3$outboundSchema.parse(gitSource3));
}
/** @internal */
export type RepoId$Outbound = number | string;
/** @internal */
export const RepoId$outboundSchema: z.ZodType<
RepoId$Outbound,
z.ZodTypeDef,
RepoId
> = smartUnion([z.number(), z.string()]);
export function repoIdToJSON(repoId: RepoId): string {
return JSON.stringify(RepoId$outboundSchema.parse(repoId));
}
/** @internal */
export const CreateDeploymentGitSourceType$outboundSchema: z.ZodNativeEnum<
typeof CreateDeploymentGitSourceType
> = z.nativeEnum(CreateDeploymentGitSourceType);
/** @internal */
export type GitSource2$Outbound = {
ref: string;
repoId: number | string;
sha?: string | undefined;
type: string;
};
/** @internal */
export const GitSource2$outboundSchema: z.ZodType<
GitSource2$Outbound,
z.ZodTypeDef,
GitSource2
> = z.object({
ref: z.string(),
repoId: smartUnion([z.number(), z.string()]),
sha: z.string().optional(),
type: CreateDeploymentGitSourceType$outboundSchema,
});
export function gitSource2ToJSON(gitSource2: GitSource2): string {
return JSON.stringify(GitSource2$outboundSchema.parse(gitSource2));
}
/** @internal */
export const GitSourceType$outboundSchema: z.ZodNativeEnum<
typeof GitSourceType
> = z.nativeEnum(GitSourceType);
/** @internal */
export type GitSource1$Outbound = {
type: string;
sha: string;
};
/** @internal */
export const GitSource1$outboundSchema: z.ZodType<
GitSource1$Outbound,
z.ZodTypeDef,
GitSource1
> = z.object({
type: GitSourceType$outboundSchema,
sha: z.string(),
});
export function gitSource1ToJSON(gitSource1: GitSource1): string {
return JSON.stringify(GitSource1$outboundSchema.parse(gitSource1));
}
/** @internal */
export type GitSource$Outbound =
| GitSource3$Outbound
| GitSource5$Outbound
| GitSource8$Outbound
| GitSource2$Outbound
| GitSource4$Outbound
| GitSource6$Outbound
| GitSource7$Outbound
| GitSource9$Outbound
| GitSource1$Outbound;
/** @internal */
export const GitSource$outboundSchema: z.ZodType<
GitSource$Outbound,
z.ZodTypeDef,
GitSource
> = smartUnion([
z.lazy(() => GitSource3$outboundSchema),
z.lazy(() => GitSource5$outboundSchema),
z.lazy(() => GitSource8$outboundSchema),
z.lazy(() => GitSource2$outboundSchema),
z.lazy(() => GitSource4$outboundSchema),
z.lazy(() => GitSource6$outboundSchema),
z.lazy(() => GitSource7$outboundSchema),
z.lazy(() => GitSource9$outboundSchema),
z.lazy(() => GitSource1$outboundSchema),
]);
export function gitSourceToJSON(gitSource: GitSource): string {
return JSON.stringify(GitSource$outboundSchema.parse(gitSource));
}
/** @internal */
export const Framework$outboundSchema: z.ZodNativeEnum<typeof Framework> = z
.nativeEnum(Framework);
/** @internal */
export const NodeVersion$outboundSchema: z.ZodNativeEnum<typeof NodeVersion> = z
.nativeEnum(NodeVersion);
/** @internal */
export type ProjectSettings$Outbound = {
buildCommand?: string | null | undefined;
commandForIgnoringBuildStep?: string | null | undefined;
devCommand?: string | null | undefined;
framework?: string | null | undefined;
installCommand?: string | null | undefined;
nodeVersion?: string | undefined;
outputDirectory?: string | null | undefined;
rootDirectory?: string | null | undefined;
serverlessFunctionRegion?: string | null | undefined;
skipGitConnectDuringLink?: boolean | undefined;
sourceFilesOutsideRootDirectory?: boolean | undefined;
};
/** @internal */
export const ProjectSettings$outboundSchema: z.ZodType<
ProjectSettings$Outbound,
z.ZodTypeDef,
ProjectSettings
> = z.object({
buildCommand: z.nullable(z.string()).optional(),
commandForIgnoringBuildStep: z.nullable(z.string()).optional(),
devCommand: z.nullable(z.string()).optional(),
framework: z.nullable(Framework$outboundSchema).optional(),
installCommand: z.nullable(z.string()).optional(),
nodeVersion: NodeVersion$outboundSchema.optional(),
outputDirectory: z.nullable(z.string()).optional(),
rootDirectory: z.nullable(z.string()).optional(),
serverlessFunctionRegion: z.nullable(z.string()).optional(),
skipGitConnectDuringLink: z.boolean().optional(),
sourceFilesOutsideRootDirectory: z.boolean().optional(),
});
export function projectSettingsToJSON(
projectSettings: ProjectSettings,
): string {
return JSON.stringify(ProjectSettings$outboundSchema.parse(projectSettings));
}
/** @internal */
export type CreateDeploymentRequestBody$Outbound = {
customEnvironmentSlugOrId?: string | undefined;
deploymentId?: string | undefined;
files?: Array<InlinedFile$Outbound | UploadedFile$Outbound> | undefined;
gitAccessToken?: string | undefined;
gitMetadata?: GitMetadata$Outbound | undefined;
gitSource?:
| GitSource3$Outbound
| GitSource5$Outbound
| GitSource8$Outbound
| GitSource2$Outbound
| GitSource4$Outbound
| GitSource6$Outbound
| GitSource7$Outbound
| GitSource9$Outbound
| GitSource1$Outbound
| undefined;
meta?: { [k: string]: string } | undefined;
monorepoManager?: string | null | undefined;
name: string;
project?: string | undefined;
projectSettings?: ProjectSettings$Outbound | undefined;
target?: string | undefined;
withLatestCommit?: boolean | undefined;
};
/** @internal */
export const CreateDeploymentRequestBody$outboundSchema: z.ZodType<
CreateDeploymentRequestBody$Outbound,
z.ZodTypeDef,
CreateDeploymentRequestBody
> = z.object({
customEnvironmentSlugOrId: z.string().optional(),
deploymentId: z.string().optional(),
files: z.array(
smartUnion([
z.lazy(() => InlinedFile$outboundSchema),
z.lazy(() => UploadedFile$outboundSchema),
]),
).optional(),
gitAccessToken: z.string().optional(),
gitMetadata: z.lazy(() => GitMetadata$outboundSchema).optional(),
gitSource: smartUnion([
z.lazy(() => GitSource3$outboundSchema),
z.lazy(() => GitSource5$outboundSchema),
z.lazy(() => GitSource8$outboundSchema),
z.lazy(() => GitSource2$outboundSchema),
z.lazy(() => GitSource4$outboundSchema),
z.lazy(() => GitSource6$outboundSchema),
z.lazy(() => GitSource7$outboundSchema),
z.lazy(() => GitSource9$outboundSchema),
z.lazy(() => GitSource1$outboundSchema),
]).optional(),
meta: z.record(z.string()).optional(),
monorepoManager: z.nullable(z.string()).optional(),
name: z.string(),
project: z.string().optional(),
projectSettings: z.lazy(() => ProjectSettings$outboundSchema).optional(),
target: z.string().optional(),
withLatestCommit: z.boolean().optional(),
});
export function createDeploymentRequestBodyToJSON(
createDeploymentRequestBody: CreateDeploymentRequestBody,
): string {
return JSON.stringify(
CreateDeploymentRequestBody$outboundSchema.parse(
createDeploymentRequestBody,
),
);
}
/** @internal */
export type CreateDeploymentRequest$Outbound = {
forceNew?: string | undefined;
skipAutoDetectionConfirmation?: string | undefined;
teamId?: string | undefined;
slug?: string | undefined;
RequestBody: CreateDeploymentRequestBody$Outbound;
};
/** @internal */
export const CreateDeploymentRequest$outboundSchema: z.ZodType<
CreateDeploymentRequest$Outbound,
z.ZodTypeDef,
CreateDeploymentRequest
> = z.object({
forceNew: ForceNew$outboundSchema.optional(),
skipAutoDetectionConfirmation: SkipAutoDetectionConfirmation$outboundSchema
.optional(),
teamId: z.string().optional(),
slug: z.string().optional(),
requestBody: z.lazy(() => CreateDeploymentRequestBody$outboundSchema),
}).transform((v) => {
return remap$(v, {
requestBody: "RequestBody",
});
});
export function createDeploymentRequestToJSON(
createDeploymentRequest: CreateDeploymentRequest,
): string {
return JSON.stringify(
CreateDeploymentRequest$outboundSchema.parse(createDeploymentRequest),
);
}
/** @internal */
export const ResponseBodyAliasAssignedAt$inboundSchema: z.ZodType<
ResponseBodyAliasAssignedAt,
z.ZodTypeDef,
unknown
> = smartUnion([types.number(), types.boolean()]);
export function responseBodyAliasAssignedAtFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyAliasAssignedAt, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyAliasAssignedAt$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyAliasAssignedAt' from JSON`,
);
}
/** @internal */
export const ResponseBodyBuild$inboundSchema: z.ZodType<
ResponseBodyBuild,
z.ZodTypeDef,
unknown
> = z.object({
env: z.array(types.string()),
});
export function responseBodyBuildFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyBuild, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyBuild$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyBuild' from JSON`,
);
}
/** @internal */
export const ResponseBodyBuilds$inboundSchema: z.ZodType<
ResponseBodyBuilds,
z.ZodTypeDef,
unknown
> = z.object({
use: types.string(),
src: types.optional(types.string()),
config: types.optional(z.record(z.any())),
});
export function responseBodyBuildsFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyBuilds, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyBuilds$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyBuilds' from JSON`,
);
}
/** @internal */
export const ResponseBodyPurchaseType$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyPurchaseType
> = z.nativeEnum(ResponseBodyPurchaseType);
/** @internal */
export const ResponseBodyDefaultPurchaseType$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyDefaultPurchaseType
> = z.nativeEnum(ResponseBodyDefaultPurchaseType);
/** @internal */
export const ResponseBodyMachineSelectionType$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyMachineSelectionType
> = z.nativeEnum(ResponseBodyMachineSelectionType);
/** @internal */
export const ResponseBodySelectionSource$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodySelectionSource
> = z.nativeEnum(ResponseBodySelectionSource);
/** @internal */
export const ResponseBodyBuildMachine$inboundSchema: z.ZodType<
ResponseBodyBuildMachine,
z.ZodTypeDef,
unknown
> = z.object({
purchaseType: types.optional(ResponseBodyPurchaseType$inboundSchema),
defaultPurchaseType: types.optional(
ResponseBodyDefaultPurchaseType$inboundSchema,
),
machineSelectionType: types.optional(
ResponseBodyMachineSelectionType$inboundSchema,
),
selectionSource: types.optional(ResponseBodySelectionSource$inboundSchema),
cores: types.optional(types.number()),
memory: types.optional(types.number()),
});
export function responseBodyBuildMachineFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyBuildMachine, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyBuildMachine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyBuildMachine' from JSON`,
);
}
/** @internal */
export const ResponseBodyResourceConfig$inboundSchema: z.ZodType<
ResponseBodyResourceConfig,
z.ZodTypeDef,
unknown
> = z.object({
buildMachine: types.optional(
z.lazy(() => ResponseBodyBuildMachine$inboundSchema),
),
});
export function responseBodyResourceConfigFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyResourceConfig, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyResourceConfig$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyResourceConfig' from JSON`,
);
}
/** @internal */
export const CreateDeploymentResponseBodyDeploymentsNodeVersion$inboundSchema:
z.ZodNativeEnum<typeof CreateDeploymentResponseBodyDeploymentsNodeVersion> = z
.nativeEnum(CreateDeploymentResponseBodyDeploymentsNodeVersion);
/** @internal */
export const CreateDeploymentResponseBodyFramework$inboundSchema:
z.ZodNativeEnum<typeof CreateDeploymentResponseBodyFramework> = z.nativeEnum(
CreateDeploymentResponseBodyFramework,
);
/** @internal */
export const CreateDeploymentResponseBodySpeedInsights$inboundSchema: z.ZodType<
CreateDeploymentResponseBodySpeedInsights,
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()),
dataReceivedAt: types.optional(types.number()),
paidAt: types.optional(types.number()),
});
export function createDeploymentResponseBodySpeedInsightsFromJSON(
jsonString: string,
): SafeParseResult<
CreateDeploymentResponseBodySpeedInsights,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentResponseBodySpeedInsights$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateDeploymentResponseBodySpeedInsights' from JSON`,
);
}
/** @internal */
export const CreateDeploymentResponseBodyWebAnalytics$inboundSchema: z.ZodType<
CreateDeploymentResponseBodyWebAnalytics,
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 createDeploymentResponseBodyWebAnalyticsFromJSON(
jsonString: string,
): SafeParseResult<
CreateDeploymentResponseBodyWebAnalytics,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentResponseBodyWebAnalytics$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateDeploymentResponseBodyWebAnalytics' from JSON`,
);
}
/** @internal */
export const CreateDeploymentResponseBodyProjectSettings$inboundSchema:
z.ZodType<
CreateDeploymentResponseBodyProjectSettings,
z.ZodTypeDef,
unknown
> = z.object({
nodeVersion: types.optional(
CreateDeploymentResponseBodyDeploymentsNodeVersion$inboundSchema,
),
buildCommand: z.nullable(types.string()).optional(),
devCommand: z.nullable(types.string()).optional(),
framework: z.nullable(CreateDeploymentResponseBodyFramework$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(() => CreateDeploymentResponseBodySpeedInsights$inboundSchema),
),
webAnalytics: types.optional(
z.lazy(() => CreateDeploymentResponseBodyWebAnalytics$inboundSchema),
),
});
export function createDeploymentResponseBodyProjectSettingsFromJSON(
jsonString: string,
): SafeParseResult<
CreateDeploymentResponseBodyProjectSettings,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentResponseBodyProjectSettings$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateDeploymentResponseBodyProjectSettings' from JSON`,
);
}
/** @internal */
export const CreateDeploymentResponseBodyDeploymentsStatus$inboundSchema:
z.ZodNativeEnum<typeof CreateDeploymentResponseBodyDeploymentsStatus> = z
.nativeEnum(CreateDeploymentResponseBodyDeploymentsStatus);
/** @internal */
export const ResponseBodyIntegrations$inboundSchema: z.ZodType<
ResponseBodyIntegrations,
z.ZodTypeDef,
unknown
> = z.object({
status: CreateDeploymentResponseBodyDeploymentsStatus$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 responseBodyIntegrationsFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyIntegrations, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyIntegrations$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyIntegrations' from JSON`,
);
}
/** @internal */
export const ResponseBodyProtocol$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyProtocol
> = z.nativeEnum(ResponseBodyProtocol);
/** @internal */
export const ResponseBodyRemotePatterns$inboundSchema: z.ZodType<
ResponseBodyRemotePatterns,
z.ZodTypeDef,
unknown
> = z.object({
protocol: types.optional(ResponseBodyProtocol$inboundSchema),
hostname: types.string(),
port: types.optional(types.string()),
pathname: types.optional(types.string()),
search: types.optional(types.string()),
});
export function responseBodyRemotePatternsFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyRemotePatterns, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyRemotePatterns$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyRemotePatterns' from JSON`,
);
}
/** @internal */
export const ResponseBodyLocalPatterns$inboundSchema: z.ZodType<
ResponseBodyLocalPatterns,
z.ZodTypeDef,
unknown
> = z.object({
pathname: types.optional(types.string()),
search: types.optional(types.string()),
});
export function responseBodyLocalPatternsFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyLocalPatterns, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyLocalPatterns$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyLocalPatterns' from JSON`,
);
}
/** @internal */
export const ResponseBodyFormats$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyFormats
> = z.nativeEnum(ResponseBodyFormats);
/** @internal */
export const ResponseBodyContentDispositionType$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyContentDispositionType
> = z.nativeEnum(ResponseBodyContentDispositionType);
/** @internal */
export const ResponseBodyImages$inboundSchema: z.ZodType<
ResponseBodyImages,
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(() => ResponseBodyRemotePatterns$inboundSchema)),
),
localPatterns: types.optional(
z.array(z.lazy(() => ResponseBodyLocalPatterns$inboundSchema)),
),
minimumCacheTTL: types.optional(types.number()),
formats: types.optional(z.array(ResponseBodyFormats$inboundSchema)),
dangerouslyAllowSVG: types.optional(types.boolean()),
contentSecurityPolicy: types.optional(types.string()),
contentDispositionType: types.optional(
ResponseBodyContentDispositionType$inboundSchema,
),
});
export function responseBodyImagesFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyImages, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyImages$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyImages' from JSON`,
);
}
/** @internal */
export const CreateDeploymentResponseBodyDeploymentsType$inboundSchema:
z.ZodNativeEnum<typeof CreateDeploymentResponseBodyDeploymentsType> = z
.nativeEnum(CreateDeploymentResponseBodyDeploymentsType);
/** @internal */
export const CreateDeploymentResponseBodyCreator$inboundSchema: z.ZodType<
CreateDeploymentResponseBodyCreator,
z.ZodTypeDef,
unknown
> = z.object({
uid: types.string(),
type: types.optional(
CreateDeploymentResponseBodyDeploymentsType$inboundSchema,
),
username: types.optional(types.string()),
avatar: types.optional(types.string()),
});
export function createDeploymentResponseBodyCreatorFromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentResponseBodyCreator, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentResponseBodyCreator$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentResponseBodyCreator' from JSON`,
);
}
/** @internal */
export const CreateDeploymentResponseBodyDeploymentsResponseReadyState$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentResponseBodyDeploymentsResponseReadyState
> = z.nativeEnum(CreateDeploymentResponseBodyDeploymentsResponseReadyState);
/** @internal */
export const CreateDeploymentResponseBodyOutput$inboundSchema: z.ZodType<
CreateDeploymentResponseBodyOutput,
z.ZodTypeDef,
unknown
> = z.object({
path: types.string(),
functionName: types.string(),
});
export function createDeploymentResponseBodyOutputFromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentResponseBodyOutput, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentResponseBodyOutput$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentResponseBodyOutput' from JSON`,
);
}
/** @internal */
export const CreateDeploymentResponseBodyLambdas$inboundSchema: z.ZodType<
CreateDeploymentResponseBodyLambdas,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
readyState: types.optional(
CreateDeploymentResponseBodyDeploymentsResponseReadyState$inboundSchema,
),
createdAt: types.optional(types.number()),
entrypoint: z.nullable(types.string()).optional(),
readyStateAt: types.optional(types.number()),
output: z.array(
z.lazy(() => CreateDeploymentResponseBodyOutput$inboundSchema),
),
});
export function createDeploymentResponseBodyLambdasFromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentResponseBodyLambdas, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentResponseBodyLambdas$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentResponseBodyLambdas' from JSON`,
);
}
/** @internal */
export const CreateDeploymentResponseBodyStatus$inboundSchema: z.ZodNativeEnum<
typeof CreateDeploymentResponseBodyStatus
> = z.nativeEnum(CreateDeploymentResponseBodyStatus);
/** @internal */
export const CreateDeploymentResponseBodyTeam$inboundSchema: z.ZodType<
CreateDeploymentResponseBodyTeam,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
slug: types.string(),
avatar: types.optional(types.string()),
});
export function createDeploymentResponseBodyTeamFromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentResponseBodyTeam, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentResponseBodyTeam$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentResponseBodyTeam' from JSON`,
);
}
/** @internal */
export const CreateDeploymentCustomEnvironment2$inboundSchema: z.ZodType<
CreateDeploymentCustomEnvironment2,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
});
export function createDeploymentCustomEnvironment2FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentCustomEnvironment2, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentCustomEnvironment2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentCustomEnvironment2' from JSON`,
);
}
/** @internal */
export const CreateDeploymentCustomEnvironmentType$inboundSchema:
z.ZodNativeEnum<typeof CreateDeploymentCustomEnvironmentType> = z.nativeEnum(
CreateDeploymentCustomEnvironmentType,
);
/** @internal */
export const CreateDeploymentCustomEnvironmentDeploymentsType$inboundSchema:
z.ZodNativeEnum<typeof CreateDeploymentCustomEnvironmentDeploymentsType> = z
.nativeEnum(CreateDeploymentCustomEnvironmentDeploymentsType);
/** @internal */
export const CreateDeploymentCustomEnvironmentBranchMatcher$inboundSchema:
z.ZodType<
CreateDeploymentCustomEnvironmentBranchMatcher,
z.ZodTypeDef,
unknown
> = z.object({
type: CreateDeploymentCustomEnvironmentDeploymentsType$inboundSchema,
pattern: types.string(),
});
export function createDeploymentCustomEnvironmentBranchMatcherFromJSON(
jsonString: string,
): SafeParseResult<
CreateDeploymentCustomEnvironmentBranchMatcher,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentCustomEnvironmentBranchMatcher$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateDeploymentCustomEnvironmentBranchMatcher' from JSON`,
);
}
/** @internal */
export const CreateDeploymentCustomEnvironmentVerification$inboundSchema:
z.ZodType<
CreateDeploymentCustomEnvironmentVerification,
z.ZodTypeDef,
unknown
> = z.object({
type: types.string(),
domain: types.string(),
value: types.string(),
reason: types.string(),
});
export function createDeploymentCustomEnvironmentVerificationFromJSON(
jsonString: string,
): SafeParseResult<
CreateDeploymentCustomEnvironmentVerification,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentCustomEnvironmentVerification$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateDeploymentCustomEnvironmentVerification' from JSON`,
);
}
/** @internal */
export const CreateDeploymentCustomEnvironmentDomains$inboundSchema: z.ZodType<
CreateDeploymentCustomEnvironmentDomains,
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(() =>
CreateDeploymentCustomEnvironmentVerification$inboundSchema
)),
),
});
export function createDeploymentCustomEnvironmentDomainsFromJSON(
jsonString: string,
): SafeParseResult<
CreateDeploymentCustomEnvironmentDomains,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentCustomEnvironmentDomains$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateDeploymentCustomEnvironmentDomains' from JSON`,
);
}
/** @internal */
export const CreateDeploymentCustomEnvironment1$inboundSchema: z.ZodType<
CreateDeploymentCustomEnvironment1,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
slug: types.string(),
type: CreateDeploymentCustomEnvironmentType$inboundSchema,
description: types.optional(types.string()),
branchMatcher: types.optional(
z.lazy(() => CreateDeploymentCustomEnvironmentBranchMatcher$inboundSchema),
),
domains: types.optional(
z.array(
z.lazy(() => CreateDeploymentCustomEnvironmentDomains$inboundSchema),
),
),
currentDeploymentAliases: types.optional(z.array(types.string())),
createdAt: types.number(),
updatedAt: types.number(),
});
export function createDeploymentCustomEnvironment1FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentCustomEnvironment1, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentCustomEnvironment1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentCustomEnvironment1' from JSON`,
);
}
/** @internal */
export const CreateDeploymentResponseBodyCustomEnvironment$inboundSchema:
z.ZodType<
CreateDeploymentResponseBodyCustomEnvironment,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => CreateDeploymentCustomEnvironment1$inboundSchema),
z.lazy(() => CreateDeploymentCustomEnvironment2$inboundSchema),
]);
export function createDeploymentResponseBodyCustomEnvironmentFromJSON(
jsonString: string,
): SafeParseResult<
CreateDeploymentResponseBodyCustomEnvironment,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentResponseBodyCustomEnvironment$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateDeploymentResponseBodyCustomEnvironment' from JSON`,
);
}
/** @internal */
export const CreateDeploymentResponseBodyOomReport$inboundSchema:
z.ZodNativeEnum<typeof CreateDeploymentResponseBodyOomReport> = z.nativeEnum(
CreateDeploymentResponseBodyOomReport,
);
/** @internal */
export const CreateDeploymentResponseBodyDeploymentsTarget$inboundSchema:
z.ZodNativeEnum<typeof CreateDeploymentResponseBodyDeploymentsTarget> = z
.nativeEnum(CreateDeploymentResponseBodyDeploymentsTarget);
/** @internal */
export const CreateDeploymentResponseBodyDeploymentsReadyState$inboundSchema:
z.ZodNativeEnum<typeof CreateDeploymentResponseBodyDeploymentsReadyState> = z
.nativeEnum(CreateDeploymentResponseBodyDeploymentsReadyState);
/** @internal */
export const CreateDeploymentResponseBodyDeploymentsAliasError$inboundSchema:
z.ZodType<
CreateDeploymentResponseBodyDeploymentsAliasError,
z.ZodTypeDef,
unknown
> = z.object({
code: types.string(),
message: types.string(),
});
export function createDeploymentResponseBodyDeploymentsAliasErrorFromJSON(
jsonString: string,
): SafeParseResult<
CreateDeploymentResponseBodyDeploymentsAliasError,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentResponseBodyDeploymentsAliasError$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateDeploymentResponseBodyDeploymentsAliasError' from JSON`,
);
}
/** @internal */
export const CreateDeploymentResponseBodyDeploymentsAliasWarning$inboundSchema:
z.ZodType<
CreateDeploymentResponseBodyDeploymentsAliasWarning,
z.ZodTypeDef,
unknown
> = z.object({
code: types.string(),
message: types.string(),
link: types.optional(types.string()),
action: types.optional(types.string()),
});
export function createDeploymentResponseBodyDeploymentsAliasWarningFromJSON(
jsonString: string,
): SafeParseResult<
CreateDeploymentResponseBodyDeploymentsAliasWarning,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentResponseBodyDeploymentsAliasWarning$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateDeploymentResponseBodyDeploymentsAliasWarning' from JSON`,
);
}
/** @internal */
export const CreateDeploymentResponseBodyType$inboundSchema: z.ZodNativeEnum<
typeof CreateDeploymentResponseBodyType
> = z.nativeEnum(CreateDeploymentResponseBodyType);
/** @internal */
export const CreateDeploymentResponseBodyChecksState$inboundSchema:
z.ZodNativeEnum<typeof CreateDeploymentResponseBodyChecksState> = z
.nativeEnum(CreateDeploymentResponseBodyChecksState);
/** @internal */
export const CreateDeploymentResponseBodyChecksConclusion$inboundSchema:
z.ZodNativeEnum<typeof CreateDeploymentResponseBodyChecksConclusion> = z
.nativeEnum(CreateDeploymentResponseBodyChecksConclusion);
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody219Type$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody219Type
> = z.nativeEnum(
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody219Type,
);
/** @internal */
export const CreateDeploymentGitSource19$inboundSchema: z.ZodType<
CreateDeploymentGitSource19,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody219Type$inboundSchema,
ref: types.string(),
sha: types.string(),
repoId: types.string(),
owner: types.string(),
repo: types.string(),
});
export function createDeploymentGitSource19FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource19, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource19$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource19' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody218Type$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody218Type
> = z.nativeEnum(
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody218Type,
);
/** @internal */
export const CreateDeploymentGitSource18$inboundSchema: z.ZodType<
CreateDeploymentGitSource18,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody218Type$inboundSchema,
ref: types.string(),
sha: types.string(),
org: types.string(),
repo: types.string(),
repoPushedAt: types.optional(types.number()),
});
export function createDeploymentGitSource18FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource18, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource18$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource18' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type
> = z.nativeEnum(
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type,
);
/** @internal */
export const CreateDeploymentGitSource17$inboundSchema: z.ZodType<
CreateDeploymentGitSource17,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type$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 createDeploymentGitSource17FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource17, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource17$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource17' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type
> = z.nativeEnum(
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type,
);
/** @internal */
export const CreateDeploymentGitSource16$inboundSchema: z.ZodType<
CreateDeploymentGitSource16,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type$inboundSchema,
ref: types.string(),
sha: types.string(),
projectId: types.number(),
});
export function createDeploymentGitSource16FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource16, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource16$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource16' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type
> = z.nativeEnum(
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type,
);
/** @internal */
export const CreateDeploymentGitSource15$inboundSchema: z.ZodType<
CreateDeploymentGitSource15,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type$inboundSchema,
ref: types.string(),
sha: types.string(),
repoId: types.number(),
org: types.optional(types.string()),
repo: types.optional(types.string()),
});
export function createDeploymentGitSource15FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource15, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource15$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource15' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type
> = z.nativeEnum(
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type,
);
/** @internal */
export const CreateDeploymentGitSource14$inboundSchema: z.ZodType<
CreateDeploymentGitSource14,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type$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 createDeploymentGitSource14FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource14, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource14$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource14' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type
> = z.nativeEnum(
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type,
);
/** @internal */
export const CreateDeploymentGitSource13$inboundSchema: z.ZodType<
CreateDeploymentGitSource13,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type$inboundSchema,
ref: types.string(),
sha: types.string(),
repoId: types.number(),
org: types.optional(types.string()),
repo: types.optional(types.string()),
});
export function createDeploymentGitSource13FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource13, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource13$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource13' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type
> = z.nativeEnum(
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type,
);
/** @internal */
export const CreateDeploymentGitSource12$inboundSchema: z.ZodType<
CreateDeploymentGitSource12,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type$inboundSchema,
ref: types.string(),
sha: types.string(),
gitUrl: types.string(),
});
export function createDeploymentGitSource12FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource12, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource12$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource12' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type
> = z.nativeEnum(
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type,
);
/** @internal */
export const CreateDeploymentGitSource11$inboundSchema: z.ZodType<
CreateDeploymentGitSource11,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type$inboundSchema,
repoId: types.string(),
owner: types.optional(types.string()),
repo: types.optional(types.string()),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function createDeploymentGitSource11FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource11, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource11$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource11' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type
> = z.nativeEnum(
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type,
);
/** @internal */
export const CreateDeploymentGitSource10$inboundSchema: z.ZodType<
CreateDeploymentGitSource10,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type$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 createDeploymentGitSource10FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource10, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource10$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource10' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type
> = z.nativeEnum(
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type,
);
/** @internal */
export const CreateDeploymentGitSource9$inboundSchema: z.ZodType<
CreateDeploymentGitSource9,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type$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 createDeploymentGitSource9FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource9, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource9$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource9' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type
> = z.nativeEnum(
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type,
);
/** @internal */
export const CreateDeploymentGitSource8$inboundSchema: z.ZodType<
CreateDeploymentGitSource8,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type$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 createDeploymentGitSource8FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource8, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource8$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource8' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type
> = z.nativeEnum(
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type,
);
/** @internal */
export const CreateDeploymentGitSourceProjectId$inboundSchema: z.ZodType<
CreateDeploymentGitSourceProjectId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function createDeploymentGitSourceProjectIdFromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSourceProjectId, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentGitSourceProjectId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSourceProjectId' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSource7$inboundSchema: z.ZodType<
CreateDeploymentGitSource7,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type$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 createDeploymentGitSource7FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource7, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource7$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource7' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type
> = z.nativeEnum(
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type,
);
/** @internal */
export const CreateDeploymentGitSource6$inboundSchema: z.ZodType<
CreateDeploymentGitSource6,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type$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 createDeploymentGitSource6FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource6, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource6$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource6' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type
> = z.nativeEnum(
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type,
);
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponseRepoId$inboundSchema:
z.ZodType<
CreateDeploymentGitSourceDeploymentsResponseRepoId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function createDeploymentGitSourceDeploymentsResponseRepoIdFromJSON(
jsonString: string,
): SafeParseResult<
CreateDeploymentGitSourceDeploymentsResponseRepoId,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentGitSourceDeploymentsResponseRepoId$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateDeploymentGitSourceDeploymentsResponseRepoId' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSource5$inboundSchema: z.ZodType<
CreateDeploymentGitSource5,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type$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 createDeploymentGitSource5FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource5, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource5$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource5' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType
> = z.nativeEnum(
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType,
);
/** @internal */
export const CreateDeploymentGitSource4$inboundSchema: z.ZodType<
CreateDeploymentGitSource4,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType$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 createDeploymentGitSource4FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource4, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource4$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource4' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType$inboundSchema:
z.ZodNativeEnum<
typeof CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType
> = z.nativeEnum(
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType,
);
/** @internal */
export const CreateDeploymentGitSourceDeploymentsRepoId$inboundSchema:
z.ZodType<CreateDeploymentGitSourceDeploymentsRepoId, z.ZodTypeDef, unknown> =
smartUnion([types.string(), types.number()]);
export function createDeploymentGitSourceDeploymentsRepoIdFromJSON(
jsonString: string,
): SafeParseResult<
CreateDeploymentGitSourceDeploymentsRepoId,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentGitSourceDeploymentsRepoId$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateDeploymentGitSourceDeploymentsRepoId' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSource3$inboundSchema: z.ZodType<
CreateDeploymentGitSource3,
z.ZodTypeDef,
unknown
> = z.object({
type:
CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType$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 createDeploymentGitSource3FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource3, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource3' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200Type$inboundSchema:
z.ZodNativeEnum<typeof CreateDeploymentGitSourceDeploymentsResponse200Type> =
z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200Type);
/** @internal */
export const CreateDeploymentGitSource2$inboundSchema: z.ZodType<
CreateDeploymentGitSource2,
z.ZodTypeDef,
unknown
> = z.object({
type: CreateDeploymentGitSourceDeploymentsResponse200Type$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 createDeploymentGitSource2FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource2' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponseType$inboundSchema:
z.ZodNativeEnum<typeof CreateDeploymentGitSourceDeploymentsResponseType> = z
.nativeEnum(CreateDeploymentGitSourceDeploymentsResponseType);
/** @internal */
export const CreateDeploymentGitSourceRepoId$inboundSchema: z.ZodType<
CreateDeploymentGitSourceRepoId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function createDeploymentGitSourceRepoIdFromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSourceRepoId, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSourceRepoId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSourceRepoId' from JSON`,
);
}
/** @internal */
export const CreateDeploymentGitSource1$inboundSchema: z.ZodType<
CreateDeploymentGitSource1,
z.ZodTypeDef,
unknown
> = z.object({
type: CreateDeploymentGitSourceDeploymentsResponseType$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 createDeploymentGitSource1FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentGitSource1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentGitSource1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentGitSource1' from JSON`,
);
}
/** @internal */
export const CreateDeploymentResponseBodyGitSource$inboundSchema: z.ZodType<
CreateDeploymentResponseBodyGitSource,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => CreateDeploymentGitSource19$inboundSchema),
z.lazy(() => CreateDeploymentGitSource14$inboundSchema),
z.lazy(() => CreateDeploymentGitSource17$inboundSchema),
z.lazy(() => CreateDeploymentGitSource18$inboundSchema),
z.lazy(() => CreateDeploymentGitSource4$inboundSchema),
z.lazy(() => CreateDeploymentGitSource12$inboundSchema),
z.lazy(() => CreateDeploymentGitSource13$inboundSchema),
z.lazy(() => CreateDeploymentGitSource15$inboundSchema),
z.lazy(() => CreateDeploymentGitSource16$inboundSchema),
z.lazy(() => CreateDeploymentGitSource2$inboundSchema),
z.lazy(() => CreateDeploymentGitSource3$inboundSchema),
z.lazy(() => CreateDeploymentGitSource6$inboundSchema),
z.lazy(() => CreateDeploymentGitSource9$inboundSchema),
z.lazy(() => CreateDeploymentGitSource1$inboundSchema),
z.lazy(() => CreateDeploymentGitSource5$inboundSchema),
z.lazy(() => CreateDeploymentGitSource7$inboundSchema),
z.lazy(() => CreateDeploymentGitSource8$inboundSchema),
z.lazy(() => CreateDeploymentGitSource10$inboundSchema),
z.lazy(() => CreateDeploymentGitSource11$inboundSchema),
]);
export function createDeploymentResponseBodyGitSourceFromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentResponseBodyGitSource, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentResponseBodyGitSource$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentResponseBodyGitSource' from JSON`,
);
}
/** @internal */
export const CreateDeploymentResponseBodyState$inboundSchema: z.ZodNativeEnum<
typeof CreateDeploymentResponseBodyState
> = z.nativeEnum(CreateDeploymentResponseBodyState);
/** @internal */
export const CreateDeploymentResponseBodyManualProvisioning$inboundSchema:
z.ZodType<
CreateDeploymentResponseBodyManualProvisioning,
z.ZodTypeDef,
unknown
> = z.object({
state: CreateDeploymentResponseBodyState$inboundSchema,
completedAt: types.optional(types.number()),
});
export function createDeploymentResponseBodyManualProvisioningFromJSON(
jsonString: string,
): SafeParseResult<
CreateDeploymentResponseBodyManualProvisioning,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentResponseBodyManualProvisioning$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateDeploymentResponseBodyManualProvisioning' from JSON`,
);
}
/** @internal */
export const CreateDeploymentResponseBodyNodeVersion$inboundSchema:
z.ZodNativeEnum<typeof CreateDeploymentResponseBodyNodeVersion> = z
.nativeEnum(CreateDeploymentResponseBodyNodeVersion);
/** @internal */
export const CreateDeploymentResponseBodyProject$inboundSchema: z.ZodType<
CreateDeploymentResponseBodyProject,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
framework: z.nullable(types.string()).optional(),
});
export function createDeploymentResponseBodyProjectFromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentResponseBodyProject, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentResponseBodyProject$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentResponseBodyProject' from JSON`,
);
}
/** @internal */
export const CreateDeploymentResponseBodyReadySubstate$inboundSchema:
z.ZodNativeEnum<typeof CreateDeploymentResponseBodyReadySubstate> = z
.nativeEnum(CreateDeploymentResponseBodyReadySubstate);
/** @internal */
export const CreateDeploymentResponseBodySource$inboundSchema: z.ZodNativeEnum<
typeof CreateDeploymentResponseBodySource
> = z.nativeEnum(CreateDeploymentResponseBodySource);
/** @internal */
export const CreateDeploymentResponseBodyOidcTokenClaims$inboundSchema:
z.ZodType<
CreateDeploymentResponseBodyOidcTokenClaims,
z.ZodTypeDef,
unknown
> = z.object({
iss: types.string(),
sub: types.string(),
scope: types.string(),
aud: types.string(),
owner: types.string(),
owner_id: types.string(),
project: types.string(),
project_id: types.string(),
environment: types.string(),
custom_environment_id: types.optional(types.string()),
mfe_group_ids: types.optional(z.array(types.string())),
plan: types.optional(types.string()),
}).transform((v) => {
return remap$(v, {
"owner_id": "ownerId",
"project_id": "projectId",
"custom_environment_id": "customEnvironmentId",
"mfe_group_ids": "mfeGroupIds",
});
});
export function createDeploymentResponseBodyOidcTokenClaimsFromJSON(
jsonString: string,
): SafeParseResult<
CreateDeploymentResponseBodyOidcTokenClaims,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentResponseBodyOidcTokenClaims$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'CreateDeploymentResponseBodyOidcTokenClaims' from JSON`,
);
}
/** @internal */
export const ResponseBodyPlan$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyPlan
> = z.nativeEnum(ResponseBodyPlan);
/** @internal */
export const ResponseBodyCrons$inboundSchema: z.ZodType<
ResponseBodyCrons,
z.ZodTypeDef,
unknown
> = z.object({
schedule: types.string(),
path: types.string(),
});
export function responseBodyCronsFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyCrons, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyCrons$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyCrons' from JSON`,
);
}
/** @internal */
export const AtprotoKinds$inboundSchema: z.ZodNativeEnum<typeof AtprotoKinds> =
z.nativeEnum(AtprotoKinds);
/** @internal */
export const AtprotoSubscription$inboundSchema: z.ZodType<
AtprotoSubscription,
z.ZodTypeDef,
unknown
> = z.object({
collections: z.array(types.string()),
dids: types.optional(z.array(types.string())),
kinds: types.optional(z.array(AtprotoKinds$inboundSchema)),
path: types.string(),
});
export function atprotoSubscriptionFromJSON(
jsonString: string,
): SafeParseResult<AtprotoSubscription, SDKValidationError> {
return safeParse(
jsonString,
(x) => AtprotoSubscription$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'AtprotoSubscription' from JSON`,
);
}
/** @internal */
export const CreateDeploymentAtproto2$inboundSchema: z.ZodType<
CreateDeploymentAtproto2,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.literal(true),
subscription: z.lazy(() => AtprotoSubscription$inboundSchema),
});
export function createDeploymentAtproto2FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentAtproto2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentAtproto2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentAtproto2' from JSON`,
);
}
/** @internal */
export const CreateDeploymentAtproto1$inboundSchema: z.ZodType<
CreateDeploymentAtproto1,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.literal(false),
});
export function createDeploymentAtproto1FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentAtproto1, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentAtproto1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentAtproto1' from JSON`,
);
}
/** @internal */
export const ResponseBodyAtproto$inboundSchema: z.ZodType<
ResponseBodyAtproto,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => CreateDeploymentAtproto2$inboundSchema),
z.lazy(() => CreateDeploymentAtproto1$inboundSchema),
]);
export function responseBodyAtprotoFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyAtproto, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyAtproto$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyAtproto' from JSON`,
);
}
/** @internal */
export const ResponseBodyArchitecture$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyArchitecture
> = z.nativeEnum(ResponseBodyArchitecture);
/** @internal */
export const CreateDeploymentMaxDuration2$inboundSchema: z.ZodNativeEnum<
typeof CreateDeploymentMaxDuration2
> = z.nativeEnum(CreateDeploymentMaxDuration2);
/** @internal */
export const ResponseBodyMaxDuration$inboundSchema: z.ZodType<
ResponseBodyMaxDuration,
z.ZodTypeDef,
unknown
> = smartUnion([types.number(), CreateDeploymentMaxDuration2$inboundSchema]);
export function responseBodyMaxDurationFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyMaxDuration, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyMaxDuration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyMaxDuration' from JSON`,
);
}
/** @internal */
export const ResponseBodyMode$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyMode
> = z.nativeEnum(ResponseBodyMode);
/** @internal */
export const ResponseBodyAffinity$inboundSchema: z.ZodType<
ResponseBodyAffinity,
z.ZodTypeDef,
unknown
> = z.object({
mode: ResponseBodyMode$inboundSchema,
});
export function responseBodyAffinityFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyAffinity, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyAffinity$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyAffinity' from JSON`,
);
}
/** @internal */
export const CreateDeploymentExperimentalTriggers3$inboundSchema: z.ZodType<
CreateDeploymentExperimentalTriggers3,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("schedule/v1beta"),
});
export function createDeploymentExperimentalTriggers3FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentExperimentalTriggers3, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentExperimentalTriggers3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentExperimentalTriggers3' from JSON`,
);
}
/** @internal */
export const CreateDeploymentExperimentalTriggers2$inboundSchema: z.ZodType<
CreateDeploymentExperimentalTriggers2,
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 createDeploymentExperimentalTriggers2FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentExperimentalTriggers2, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentExperimentalTriggers2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentExperimentalTriggers2' from JSON`,
);
}
/** @internal */
export const CreateDeploymentExperimentalTriggers1$inboundSchema: z.ZodType<
CreateDeploymentExperimentalTriggers1,
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 createDeploymentExperimentalTriggers1FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentExperimentalTriggers1, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
CreateDeploymentExperimentalTriggers1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentExperimentalTriggers1' from JSON`,
);
}
/** @internal */
export const ResponseBodyExperimentalTriggers$inboundSchema: z.ZodType<
ResponseBodyExperimentalTriggers,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => CreateDeploymentExperimentalTriggers1$inboundSchema),
z.lazy(() => CreateDeploymentExperimentalTriggers2$inboundSchema),
z.lazy(() => CreateDeploymentExperimentalTriggers3$inboundSchema),
]);
export function responseBodyExperimentalTriggersFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyExperimentalTriggers, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyExperimentalTriggers$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyExperimentalTriggers' from JSON`,
);
}
/** @internal */
export const ResponseBodyFunctions$inboundSchema: z.ZodType<
ResponseBodyFunctions,
z.ZodTypeDef,
unknown
> = z.object({
architecture: types.optional(ResponseBodyArchitecture$inboundSchema),
memory: types.optional(types.number()),
maxDuration: types.optional(
smartUnion([types.number(), CreateDeploymentMaxDuration2$inboundSchema]),
),
affinity: types.optional(z.lazy(() => ResponseBodyAffinity$inboundSchema)),
maxConcurrency: types.optional(types.number()),
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(() => CreateDeploymentExperimentalTriggers1$inboundSchema),
z.lazy(() =>
CreateDeploymentExperimentalTriggers2$inboundSchema
),
z.lazy(() => CreateDeploymentExperimentalTriggers3$inboundSchema),
])),
),
supportsCancellation: types.optional(types.boolean()),
});
export function responseBodyFunctionsFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyFunctions, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyFunctions$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyFunctions' from JSON`,
);
}
/** @internal */
export const CreateDeploymentRoutes3$inboundSchema: z.ZodType<
CreateDeploymentRoutes3,
z.ZodTypeDef,
unknown
> = z.object({
src: types.string(),
continue: types.boolean(),
middleware: types.number(),
});
export function createDeploymentRoutes3FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentRoutes3, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentRoutes3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentRoutes3' from JSON`,
);
}
/** @internal */
export const RoutesHandle$inboundSchema: z.ZodNativeEnum<typeof RoutesHandle> =
z.nativeEnum(RoutesHandle);
/** @internal */
export const CreateDeploymentRoutes2$inboundSchema: z.ZodType<
CreateDeploymentRoutes2,
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 createDeploymentRoutes2FromJSON(
jsonString: string,
): SafeParseResult<CreateDeploymentRoutes2, SDKValidationError> {
return safeParse(
jsonString,
(x) => CreateDeploymentRoutes2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'CreateDeploymentRoutes2' from JSON`,
);
}
/** @internal */
export const CreateDeploymentHasDeploymentsType$inboundSchema: z.ZodNativeEnum<
typeof CreateDeploymentHasDeploymentsType
> = z.nativeEnum(CreateDeploymentHasDeploymentsType);