UNPKG

@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>

1,584 lines 71.9 kB
/*
 * 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 * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.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",
};
/**
 * 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",
};
/**
 * 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",
};
export const CreateDeploymentGitSourceDeploymentsRequestRequestBody9Type = {
    CursorOrigin: "cursor-origin",
};
export const CreateDeploymentGitSourceDeploymentsRequestRequestBody8Type = {
    Bitbucket: "bitbucket",
};
export const CreateDeploymentGitSourceDeploymentsRequestRequestBody7Type = {
    Bitbucket: "bitbucket",
};
export const CreateDeploymentGitSourceDeploymentsRequestRequestBody6Type = {
    Gitlab: "gitlab",
};
export const CreateDeploymentGitSourceDeploymentsRequestRequestBodyType = {
    GithubLimited: "github-limited",
};
export const CreateDeploymentGitSourceDeploymentsRequestType = {
    GithubLimited: "github-limited",
};
export const CreateDeploymentGitSourceDeploymentsType = {
    Github: "github",
};
export const CreateDeploymentGitSourceType = {
    Github: "github",
};
export const GitSourceType = {
    Vercel: "vercel",
};
/**
 * 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",
};
/**
 * 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",
};
/**
 * 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",
};
/**
 * 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",
};
/**
 * Whether the build ran on a fixed or elastic machine. Used to drive billing for the build.
 */
export const ResponseBodyMachineSelectionType = {
    Elastic: "elastic",
    Fixed: "fixed",
};
/**
 * 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 = {
    DeploymentOverride: "deployment-override",
    ElasticAlgorithm: "elastic-algorithm",
    PlanDefault: "plan-default",
    ProjectSetting: "project-setting",
    TeamEntitlement: "team-entitlement",
    TeamSetting: "team-setting",
};
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",
};
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",
};
export const CreateDeploymentResponseBodyDeploymentsStatus = {
    Error: "error",
    Pending: "pending",
    Ready: "ready",
    Skipped: "skipped",
    Timeout: "timeout",
};
/**
 * Must be `http` or `https`.
 */
export const ResponseBodyProtocol = {
    Http: "http",
    Https: "https",
};
export const ResponseBodyFormats = {
    ImageAvif: "image/avif",
    ImageWebp: "image/webp",
};
export const ResponseBodyContentDispositionType = {
    Attachment: "attachment",
    Inline: "inline",
};
/**
 * Principal type of the deployment creator.
 */
export const CreateDeploymentResponseBodyDeploymentsType = {
    App: "app",
    Integration: "integration",
    System: "system",
    User: "user",
};
export const CreateDeploymentResponseBodyDeploymentsResponseReadyState = {
    Building: "BUILDING",
    Error: "ERROR",
    Initializing: "INITIALIZING",
    Ready: "READY",
};
export const CreateDeploymentResponseBodyStatus = {
    Blocked: "BLOCKED",
    Building: "BUILDING",
    Canceled: "CANCELED",
    Error: "ERROR",
    Initializing: "INITIALIZING",
    Queued: "QUEUED",
    Ready: "READY",
};
/**
 * The type of environment (production, preview, or development)
 */
export const CreateDeploymentCustomEnvironmentType = {
    Development: "development",
    Preview: "preview",
    Production: "production",
};
/**
 * The type of matching to perform
 */
export const CreateDeploymentCustomEnvironmentDeploymentsType = {
    EndsWith: "endsWith",
    Equals: "equals",
    StartsWith: "startsWith",
};
export const CreateDeploymentResponseBodyOomReport = {
    OutOfMemory: "out-of-memory",
};
/**
 * 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",
};
/**
 * 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",
};
export const CreateDeploymentResponseBodyType = {
    Lambdas: "LAMBDAS",
};
export const CreateDeploymentResponseBodyChecksState = {
    Completed: "completed",
    Registered: "registered",
    Running: "running",
};
export const CreateDeploymentResponseBodyChecksConclusion = {
    Canceled: "canceled",
    Failed: "failed",
    Skipped: "skipped",
    Succeeded: "succeeded",
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody219Type = {
    CursorOrigin: "cursor-origin",
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody218Type = {
    Vercel: "vercel",
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type = {
    Bitbucket: "bitbucket",
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type = {
    Gitlab: "gitlab",
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type = {
    GithubLimited: "github-limited",
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type = {
    GithubCustomHost: "github-custom-host",
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type = {
    Github: "github",
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type = {
    Custom: "custom",
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type = {
    CursorOrigin: "cursor-origin",
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type = {
    Vercel: "vercel",
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type = {
    Bitbucket: "bitbucket",
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type = {
    Bitbucket: "bitbucket",
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type = {
    Gitlab: "gitlab",
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type = {
    GithubLimited: "github-limited",
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type = {
    GithubLimited: "github-limited",
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType = {
    GithubCustomHost: "github-custom-host",
};
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType = {
    GithubCustomHost: "github-custom-host",
};
export const CreateDeploymentGitSourceDeploymentsResponse200Type = {
    Github: "github",
};
export const CreateDeploymentGitSourceDeploymentsResponseType = {
    Github: "github",
};
/**
 * Current provisioning state
 */
export const CreateDeploymentResponseBodyState = {
    Complete: "COMPLETE",
    Pending: "PENDING",
    Timeout: "TIMEOUT",
};
/**
 * 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",
};
/**
 * 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",
};
/**
 * 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",
};
export const ResponseBodyPlan = {
    Enterprise: "enterprise",
    Hobby: "hobby",
    Pro: "pro",
};
export const AtprotoKinds = {
    Account: "account",
    Commit: "commit",
    Identity: "identity",
    Sync: "sync",
};
export const ResponseBodyArchitecture = {
    Arm64: "arm64",
    X8664: "x86_64",
};
export const CreateDeploymentMaxDuration2 = {
    Max: "max",
};
export const ResponseBodyMode = {
    Strict: "strict",
};
export const RoutesHandle = {
    Error: "error",
    Filesystem: "filesystem",
    Hit: "hit",
    Miss: "miss",
    Resource: "resource",
    Rewrite: "rewrite",
};
export const CreateDeploymentHasDeploymentsType = {
    Cookie: "cookie",
    Header: "header",
    Query: "query",
};
/** @internal */
export const ForceNew$outboundSchema = z
    .nativeEnum(ForceNew);
/** @internal */
export const SkipAutoDetectionConfirmation$outboundSchema = z.nativeEnum(SkipAutoDetectionConfirmation);
/** @internal */
export const UploadedFile$outboundSchema = z.object({
    file: z.string(),
    sha: z.string().optional(),
    size: z.number().int().optional(),
});
export function uploadedFileToJSON(uploadedFile) {
    return JSON.stringify(UploadedFile$outboundSchema.parse(uploadedFile));
}
/** @internal */
export const Encoding$outboundSchema = z
    .nativeEnum(Encoding);
/** @internal */
export const InlinedFile$outboundSchema = z.object({
    data: z.string(),
    encoding: Encoding$outboundSchema.optional(),
    file: z.string(),
});
export function inlinedFileToJSON(inlinedFile) {
    return JSON.stringify(InlinedFile$outboundSchema.parse(inlinedFile));
}
/** @internal */
export const Files$outboundSchema = smartUnion([
    z.lazy(() => InlinedFile$outboundSchema),
    z.lazy(() => UploadedFile$outboundSchema),
]);
export function filesToJSON(files) {
    return JSON.stringify(Files$outboundSchema.parse(files));
}
/** @internal */
export const GitMetadata$outboundSchema = 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) {
    return JSON.stringify(GitMetadata$outboundSchema.parse(gitMetadata));
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsRequestRequestBody9Type$outboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsRequestRequestBody9Type);
/** @internal */
export const GitSource9$outboundSchema = 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) {
    return JSON.stringify(GitSource9$outboundSchema.parse(gitSource9));
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsRequestRequestBody8Type$outboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsRequestRequestBody8Type);
/** @internal */
export const GitSource8$outboundSchema = z.object({
    owner: z.string(),
    ref: z.string(),
    sha: z.string().optional(),
    slug: z.string(),
    type: CreateDeploymentGitSourceDeploymentsRequestRequestBody8Type$outboundSchema,
});
export function gitSource8ToJSON(gitSource8) {
    return JSON.stringify(GitSource8$outboundSchema.parse(gitSource8));
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsRequestRequestBody7Type$outboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsRequestRequestBody7Type);
/** @internal */
export const GitSource7$outboundSchema = z.object({
    ref: z.string(),
    repoUuid: z.string(),
    sha: z.string().optional(),
    type: CreateDeploymentGitSourceDeploymentsRequestRequestBody7Type$outboundSchema,
    workspaceUuid: z.string().optional(),
});
export function gitSource7ToJSON(gitSource7) {
    return JSON.stringify(GitSource7$outboundSchema.parse(gitSource7));
}
/** @internal */
export const ProjectId$outboundSchema = smartUnion([z.number(), z.string()]);
export function projectIdToJSON(projectId) {
    return JSON.stringify(ProjectId$outboundSchema.parse(projectId));
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsRequestRequestBody6Type$outboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsRequestRequestBody6Type);
/** @internal */
export const GitSource6$outboundSchema = z.object({
    projectId: smartUnion([z.number(), z.string()]),
    ref: z.string(),
    sha: z.string().optional(),
    type: CreateDeploymentGitSourceDeploymentsRequestRequestBody6Type$outboundSchema,
});
export function gitSource6ToJSON(gitSource6) {
    return JSON.stringify(GitSource6$outboundSchema.parse(gitSource6));
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsRequestRequestBodyType$outboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsRequestRequestBodyType);
/** @internal */
export const GitSource5$outboundSchema = z.object({
    org: z.string(),
    ref: z.string(),
    repo: z.string(),
    sha: z.string().optional(),
    type: CreateDeploymentGitSourceDeploymentsRequestRequestBodyType$outboundSchema,
});
export function gitSource5ToJSON(gitSource5) {
    return JSON.stringify(GitSource5$outboundSchema.parse(gitSource5));
}
/** @internal */
export const GitSourceRepoId$outboundSchema = smartUnion([z.number(), z.string()]);
export function gitSourceRepoIdToJSON(gitSourceRepoId) {
    return JSON.stringify(GitSourceRepoId$outboundSchema.parse(gitSourceRepoId));
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsRequestType$outboundSchema = z
    .nativeEnum(CreateDeploymentGitSourceDeploymentsRequestType);
/** @internal */
export const GitSource4$outboundSchema = z.object({
    ref: z.string(),
    repoId: smartUnion([z.number(), z.string()]),
    sha: z.string().optional(),
    type: CreateDeploymentGitSourceDeploymentsRequestType$outboundSchema,
});
export function gitSource4ToJSON(gitSource4) {
    return JSON.stringify(GitSource4$outboundSchema.parse(gitSource4));
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsType$outboundSchema = z
    .nativeEnum(CreateDeploymentGitSourceDeploymentsType);
/** @internal */
export const GitSource3$outboundSchema = z.object({
    org: z.string(),
    ref: z.string(),
    repo: z.string(),
    sha: z.string().optional(),
    type: CreateDeploymentGitSourceDeploymentsType$outboundSchema,
});
export function gitSource3ToJSON(gitSource3) {
    return JSON.stringify(GitSource3$outboundSchema.parse(gitSource3));
}
/** @internal */
export const RepoId$outboundSchema = smartUnion([z.number(), z.string()]);
export function repoIdToJSON(repoId) {
    return JSON.stringify(RepoId$outboundSchema.parse(repoId));
}
/** @internal */
export const CreateDeploymentGitSourceType$outboundSchema = z.nativeEnum(CreateDeploymentGitSourceType);
/** @internal */
export const GitSource2$outboundSchema = z.object({
    ref: z.string(),
    repoId: smartUnion([z.number(), z.string()]),
    sha: z.string().optional(),
    type: CreateDeploymentGitSourceType$outboundSchema,
});
export function gitSource2ToJSON(gitSource2) {
    return JSON.stringify(GitSource2$outboundSchema.parse(gitSource2));
}
/** @internal */
export const GitSourceType$outboundSchema = z.nativeEnum(GitSourceType);
/** @internal */
export const GitSource1$outboundSchema = z.object({
    type: GitSourceType$outboundSchema,
    sha: z.string(),
});
export function gitSource1ToJSON(gitSource1) {
    return JSON.stringify(GitSource1$outboundSchema.parse(gitSource1));
}
/** @internal */
export const GitSource$outboundSchema = 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) {
    return JSON.stringify(GitSource$outboundSchema.parse(gitSource));
}
/** @internal */
export const Framework$outboundSchema = z
    .nativeEnum(Framework);
/** @internal */
export const NodeVersion$outboundSchema = z
    .nativeEnum(NodeVersion);
/** @internal */
export const ProjectSettings$outboundSchema = 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) {
    return JSON.stringify(ProjectSettings$outboundSchema.parse(projectSettings));
}
/** @internal */
export const CreateDeploymentRequestBody$outboundSchema = 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) {
    return JSON.stringify(CreateDeploymentRequestBody$outboundSchema.parse(createDeploymentRequestBody));
}
/** @internal */
export const CreateDeploymentRequest$outboundSchema = 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) {
    return JSON.stringify(CreateDeploymentRequest$outboundSchema.parse(createDeploymentRequest));
}
/** @internal */
export const ResponseBodyAliasAssignedAt$inboundSchema = smartUnion([types.number(), types.boolean()]);
export function responseBodyAliasAssignedAtFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseBodyAliasAssignedAt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyAliasAssignedAt' from JSON`);
}
/** @internal */
export const ResponseBodyBuild$inboundSchema = z.object({
    env: z.array(types.string()),
});
export function responseBodyBuildFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseBodyBuild$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyBuild' from JSON`);
}
/** @internal */
export const ResponseBodyBuilds$inboundSchema = z.object({
    use: types.string(),
    src: types.optional(types.string()),
    config: types.optional(z.record(z.any())),
});
export function responseBodyBuildsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseBodyBuilds$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyBuilds' from JSON`);
}
/** @internal */
export const ResponseBodyPurchaseType$inboundSchema = z.nativeEnum(ResponseBodyPurchaseType);
/** @internal */
export const ResponseBodyDefaultPurchaseType$inboundSchema = z.nativeEnum(ResponseBodyDefaultPurchaseType);
/** @internal */
export const ResponseBodyMachineSelectionType$inboundSchema = z.nativeEnum(ResponseBodyMachineSelectionType);
/** @internal */
export const ResponseBodySelectionSource$inboundSchema = z.nativeEnum(ResponseBodySelectionSource);
/** @internal */
export const ResponseBodyBuildMachine$inboundSchema = 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) {
    return safeParse(jsonString, (x) => ResponseBodyBuildMachine$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyBuildMachine' from JSON`);
}
/** @internal */
export const ResponseBodyResourceConfig$inboundSchema = z.object({
    buildMachine: types.optional(z.lazy(() => ResponseBodyBuildMachine$inboundSchema)),
});
export function responseBodyResourceConfigFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseBodyResourceConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyResourceConfig' from JSON`);
}
/** @internal */
export const CreateDeploymentResponseBodyDeploymentsNodeVersion$inboundSchema = z
    .nativeEnum(CreateDeploymentResponseBodyDeploymentsNodeVersion);
/** @internal */
export const CreateDeploymentResponseBodyFramework$inboundSchema = z.nativeEnum(CreateDeploymentResponseBodyFramework);
/** @internal */
export const CreateDeploymentResponseBodySpeedInsights$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentResponseBodySpeedInsights$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentResponseBodySpeedInsights' from JSON`);
}
/** @internal */
export const CreateDeploymentResponseBodyWebAnalytics$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentResponseBodyWebAnalytics$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentResponseBodyWebAnalytics' from JSON`);
}
/** @internal */
export const CreateDeploymentResponseBodyProjectSettings$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentResponseBodyProjectSettings$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentResponseBodyProjectSettings' from JSON`);
}
/** @internal */
export const CreateDeploymentResponseBodyDeploymentsStatus$inboundSchema = z
    .nativeEnum(CreateDeploymentResponseBodyDeploymentsStatus);
/** @internal */
export const ResponseBodyIntegrations$inboundSchema = 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) {
    return safeParse(jsonString, (x) => ResponseBodyIntegrations$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyIntegrations' from JSON`);
}
/** @internal */
export const ResponseBodyProtocol$inboundSchema = z.nativeEnum(ResponseBodyProtocol);
/** @internal */
export const ResponseBodyRemotePatterns$inboundSchema = 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) {
    return safeParse(jsonString, (x) => ResponseBodyRemotePatterns$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyRemotePatterns' from JSON`);
}
/** @internal */
export const ResponseBodyLocalPatterns$inboundSchema = z.object({
    pathname: types.optional(types.string()),
    search: types.optional(types.string()),
});
export function responseBodyLocalPatternsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseBodyLocalPatterns$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyLocalPatterns' from JSON`);
}
/** @internal */
export const ResponseBodyFormats$inboundSchema = z.nativeEnum(ResponseBodyFormats);
/** @internal */
export const ResponseBodyContentDispositionType$inboundSchema = z.nativeEnum(ResponseBodyContentDispositionType);
/** @internal */
export const ResponseBodyImages$inboundSchema = 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) {
    return safeParse(jsonString, (x) => ResponseBodyImages$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyImages' from JSON`);
}
/** @internal */
export const CreateDeploymentResponseBodyDeploymentsType$inboundSchema = z
    .nativeEnum(CreateDeploymentResponseBodyDeploymentsType);
/** @internal */
export const CreateDeploymentResponseBodyCreator$inboundSchema = z.object({
    uid: types.string(),
    type: types.optional(CreateDeploymentResponseBodyDeploymentsType$inboundSchema),
    username: types.optional(types.string()),
    avatar: types.optional(types.string()),
});
export function createDeploymentResponseBodyCreatorFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentResponseBodyCreator$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentResponseBodyCreator' from JSON`);
}
/** @internal */
export const CreateDeploymentResponseBodyDeploymentsResponseReadyState$inboundSchema = z.nativeEnum(CreateDeploymentResponseBodyDeploymentsResponseReadyState);
/** @internal */
export const CreateDeploymentResponseBodyOutput$inboundSchema = z.object({
    path: types.string(),
    functionName: types.string(),
});
export function createDeploymentResponseBodyOutputFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentResponseBodyOutput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentResponseBodyOutput' from JSON`);
}
/** @internal */
export const CreateDeploymentResponseBodyLambdas$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentResponseBodyLambdas$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentResponseBodyLambdas' from JSON`);
}
/** @internal */
export const CreateDeploymentResponseBodyStatus$inboundSchema = z.nativeEnum(CreateDeploymentResponseBodyStatus);
/** @internal */
export const CreateDeploymentResponseBodyTeam$inboundSchema = z.object({
    id: types.string(),
    name: types.string(),
    slug: types.string(),
    avatar: types.optional(types.string()),
});
export function createDeploymentResponseBodyTeamFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentResponseBodyTeam$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentResponseBodyTeam' from JSON`);
}
/** @internal */
export const CreateDeploymentCustomEnvironment2$inboundSchema = z.object({
    id: types.string(),
});
export function createDeploymentCustomEnvironment2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentCustomEnvironment2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentCustomEnvironment2' from JSON`);
}
/** @internal */
export const CreateDeploymentCustomEnvironmentType$inboundSchema = z.nativeEnum(CreateDeploymentCustomEnvironmentType);
/** @internal */
export const CreateDeploymentCustomEnvironmentDeploymentsType$inboundSchema = z
    .nativeEnum(CreateDeploymentCustomEnvironmentDeploymentsType);
/** @internal */
export const CreateDeploymentCustomEnvironmentBranchMatcher$inboundSchema = z.object({
    type: CreateDeploymentCustomEnvironmentDeploymentsType$inboundSchema,
    pattern: types.string(),
});
export function createDeploymentCustomEnvironmentBranchMatcherFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentCustomEnvironmentBranchMatcher$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentCustomEnvironmentBranchMatcher' from JSON`);
}
/** @internal */
export const CreateDeploymentCustomEnvironmentVerification$inboundSchema = z.object({
    type: types.string(),
    domain: types.string(),
    value: types.string(),
    reason: types.string(),
});
export function createDeploymentCustomEnvironmentVerificationFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentCustomEnvironmentVerification$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentCustomEnvironmentVerification' from JSON`);
}
/** @internal */
export const CreateDeploymentCustomEnvironmentDomains$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentCustomEnvironmentDomains$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentCustomEnvironmentDomains' from JSON`);
}
/** @internal */
export const CreateDeploymentCustomEnvironment1$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentCustomEnvironment1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentCustomEnvironment1' from JSON`);
}
/** @internal */
export const CreateDeploymentResponseBodyCustomEnvironment$inboundSchema = smartUnion([
    z.lazy(() => CreateDeploymentCustomEnvironment1$inboundSchema),
    z.lazy(() => CreateDeploymentCustomEnvironment2$inboundSchema),
]);
export function createDeploymentResponseBodyCustomEnvironmentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentResponseBodyCustomEnvironment$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentResponseBodyCustomEnvironment' from JSON`);
}
/** @internal */
export const CreateDeploymentResponseBodyOomReport$inboundSchema = z.nativeEnum(CreateDeploymentResponseBodyOomReport);
/** @internal */
export const CreateDeploymentResponseBodyDeploymentsTarget$inboundSchema = z
    .nativeEnum(CreateDeploymentResponseBodyDeploymentsTarget);
/** @internal */
export const CreateDeploymentResponseBodyDeploymentsReadyState$inboundSchema = z
    .nativeEnum(CreateDeploymentResponseBodyDeploymentsReadyState);
/** @internal */
export const CreateDeploymentResponseBodyDeploymentsAliasError$inboundSchema = z.object({
    code: types.string(),
    message: types.string(),
});
export function createDeploymentResponseBodyDeploymentsAliasErrorFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentResponseBodyDeploymentsAliasError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentResponseBodyDeploymentsAliasError' from JSON`);
}
/** @internal */
export const CreateDeploymentResponseBodyDeploymentsAliasWarning$inboundSchema = z.object({
    code: types.string(),
    message: types.string(),
    link: types.optional(types.string()),
    action: types.optional(types.string()),
});
export function createDeploymentResponseBodyDeploymentsAliasWarningFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentResponseBodyDeploymentsAliasWarning$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentResponseBodyDeploymentsAliasWarning' from JSON`);
}
/** @internal */
export const CreateDeploymentResponseBodyType$inboundSchema = z.nativeEnum(CreateDeploymentResponseBodyType);
/** @internal */
export const CreateDeploymentResponseBodyChecksState$inboundSchema = z
    .nativeEnum(CreateDeploymentResponseBodyChecksState);
/** @internal */
export const CreateDeploymentResponseBodyChecksConclusion$inboundSchema = z
    .nativeEnum(CreateDeploymentResponseBodyChecksConclusion);
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody219Type$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody219Type);
/** @internal */
export const CreateDeploymentGitSource19$inboundSchema = z.object({
    type: CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody219Type$inboundSchema,
    ref: types.string(),
    sha: types.string(),
    repoId: types.string(),
    owner: types.string(),
    repo: types.string(),
});
export function createDeploymentGitSource19FromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource19$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource19' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody218Type$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody218Type);
/** @internal */
export const CreateDeploymentGitSource18$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource18$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource18' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type);
/** @internal */
export const CreateDeploymentGitSource17$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource17$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource17' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type);
/** @internal */
export const CreateDeploymentGitSource16$inboundSchema = z.object({
    type: CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type$inboundSchema,
    ref: types.string(),
    sha: types.string(),
    projectId: types.number(),
});
export function createDeploymentGitSource16FromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource16$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource16' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type);
/** @internal */
export const CreateDeploymentGitSource15$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource15$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource15' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type);
/** @internal */
export const CreateDeploymentGitSource14$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource14$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource14' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type);
/** @internal */
export const CreateDeploymentGitSource13$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource13$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource13' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type);
/** @internal */
export const CreateDeploymentGitSource12$inboundSchema = z.object({
    type: CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type$inboundSchema,
    ref: types.string(),
    sha: types.string(),
    gitUrl: types.string(),
});
export function createDeploymentGitSource12FromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource12$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource12' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type);
/** @internal */
export const CreateDeploymentGitSource11$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource11$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource11' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type);
/** @internal */
export const CreateDeploymentGitSource10$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource10$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource10' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type);
/** @internal */
export const CreateDeploymentGitSource9$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource9$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource9' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type);
/** @internal */
export const CreateDeploymentGitSource8$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource8$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource8' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type);
/** @internal */
export const CreateDeploymentGitSourceProjectId$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentGitSourceProjectIdFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSourceProjectId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSourceProjectId' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSource7$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource7$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource7' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type);
/** @internal */
export const CreateDeploymentGitSource6$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource6$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource6' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type);
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponseRepoId$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentGitSourceDeploymentsResponseRepoIdFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSourceDeploymentsResponseRepoId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSourceDeploymentsResponseRepoId' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSource5$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource5$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource5' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType);
/** @internal */
export const CreateDeploymentGitSource4$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource4' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200ApplicationJSONType);
/** @internal */
export const CreateDeploymentGitSourceDeploymentsRepoId$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentGitSourceDeploymentsRepoIdFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSourceDeploymentsRepoId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSourceDeploymentsRepoId' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSource3$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource3' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponse200Type$inboundSchema = z.nativeEnum(CreateDeploymentGitSourceDeploymentsResponse200Type);
/** @internal */
export const CreateDeploymentGitSource2$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource2' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSourceDeploymentsResponseType$inboundSchema = z
    .nativeEnum(CreateDeploymentGitSourceDeploymentsResponseType);
/** @internal */
export const CreateDeploymentGitSourceRepoId$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentGitSourceRepoIdFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSourceRepoId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSourceRepoId' from JSON`);
}
/** @internal */
export const CreateDeploymentGitSource1$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentGitSource1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitSource1' from JSON`);
}
/** @internal */
export const CreateDeploymentResponseBodyGitSource$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentResponseBodyGitSource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentResponseBodyGitSource' from JSON`);
}
/** @internal */
export const CreateDeploymentResponseBodyState$inboundSchema = z.nativeEnum(CreateDeploymentResponseBodyState);
/** @internal */
export const CreateDeploymentResponseBodyManualProvisioning$inboundSchema = z.object({
    state: CreateDeploymentResponseBodyState$inboundSchema,
    completedAt: types.optional(types.number()),
});
export function createDeploymentResponseBodyManualProvisioningFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentResponseBodyManualProvisioning$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentResponseBodyManualProvisioning' from JSON`);
}
/** @internal */
export const CreateDeploymentResponseBodyNodeVersion$inboundSchema = z
    .nativeEnum(CreateDeploymentResponseBodyNodeVersion);
/** @internal */
export const CreateDeploymentResponseBodyProject$inboundSchema = z.object({
    id: types.string(),
    name: types.string(),
    framework: z.nullable(types.string()).optional(),
});
export function createDeploymentResponseBodyProjectFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentResponseBodyProject$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentResponseBodyProject' from JSON`);
}
/** @internal */
export const CreateDeploymentResponseBodyReadySubstate$inboundSchema = z
    .nativeEnum(CreateDeploymentResponseBodyReadySubstate);
/** @internal */
export const CreateDeploymentResponseBodySource$inboundSchema = z.nativeEnum(CreateDeploymentResponseBodySource);
/** @internal */
export const CreateDeploymentResponseBodyOidcTokenClaims$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentResponseBodyOidcTokenClaims$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentResponseBodyOidcTokenClaims' from JSON`);
}
/** @internal */
export const ResponseBodyPlan$inboundSchema = z.nativeEnum(ResponseBodyPlan);
/** @internal */
export const ResponseBodyCrons$inboundSchema = z.object({
    schedule: types.string(),
    path: types.string(),
});
export function responseBodyCronsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseBodyCrons$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyCrons' from JSON`);
}
/** @internal */
export const AtprotoKinds$inboundSchema = z.nativeEnum(AtprotoKinds);
/** @internal */
export const AtprotoSubscription$inboundSchema = 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) {
    return safeParse(jsonString, (x) => AtprotoSubscription$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtprotoSubscription' from JSON`);
}
/** @internal */
export const CreateDeploymentAtproto2$inboundSchema = z.object({
    enabled: types.literal(true),
    subscription: z.lazy(() => AtprotoSubscription$inboundSchema),
});
export function createDeploymentAtproto2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentAtproto2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentAtproto2' from JSON`);
}
/** @internal */
export const CreateDeploymentAtproto1$inboundSchema = z.object({
    enabled: types.literal(false),
});
export function createDeploymentAtproto1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentAtproto1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentAtproto1' from JSON`);
}
/** @internal */
export const ResponseBodyAtproto$inboundSchema = smartUnion([
    z.lazy(() => CreateDeploymentAtproto2$inboundSchema),
    z.lazy(() => CreateDeploymentAtproto1$inboundSchema),
]);
export function responseBodyAtprotoFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseBodyAtproto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyAtproto' from JSON`);
}
/** @internal */
export const ResponseBodyArchitecture$inboundSchema = z.nativeEnum(ResponseBodyArchitecture);
/** @internal */
export const CreateDeploymentMaxDuration2$inboundSchema = z.nativeEnum(CreateDeploymentMaxDuration2);
/** @internal */
export const ResponseBodyMaxDuration$inboundSchema = smartUnion([types.number(), CreateDeploymentMaxDuration2$inboundSchema]);
export function responseBodyMaxDurationFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseBodyMaxDuration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyMaxDuration' from JSON`);
}
/** @internal */
export const ResponseBodyMode$inboundSchema = z.nativeEnum(ResponseBodyMode);
/** @internal */
export const ResponseBodyAffinity$inboundSchema = z.object({
    mode: ResponseBodyMode$inboundSchema,
});
export function responseBodyAffinityFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseBodyAffinity$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyAffinity' from JSON`);
}
/** @internal */
export const CreateDeploymentExperimentalTriggers3$inboundSchema = z.object({
    type: types.literal("schedule/v1beta"),
});
export function createDeploymentExperimentalTriggers3FromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentExperimentalTriggers3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentExperimentalTriggers3' from JSON`);
}
/** @internal */
export const CreateDeploymentExperimentalTriggers2$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentExperimentalTriggers2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentExperimentalTriggers2' from JSON`);
}
/** @internal */
export const CreateDeploymentExperimentalTriggers1$inboundSchema = 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) {
    return safeParse(jsonString, (x) => CreateDeploymentExperimentalTriggers1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentExperimentalTriggers1' from JSON`);
}
/** @internal */
export const ResponseBodyExperimentalTriggers$inboundSchema = z.union([
    z.lazy(() => CreateDeploymentExperimentalTriggers1$inboundSchema),
    z.lazy(() => CreateDeploymentExperimentalTriggers2$inboundSchema),
    z.lazy(() => CreateDeploymentExperimentalTriggers3$inboundSchema),
]);
export function responseBodyExperimentalTriggersFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseBodyExperimentalTriggers$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyExperimentalTriggers' from JSON`);
}
/** @internal */
export const ResponseBodyFunctions$inboundSchema = 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) {
    return safeParse(jsonString, (x) => ResponseBodyFunctions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyFunctions' from JSON`);
}
/** @internal */
export const CreateDeploymentRoutes3$inboundSchema = z.object({
    src: types.string(),
    continue: types.boolean(),
    middleware: types.number(),
});
export function createDeploymentRoutes3FromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentRoutes3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentRoutes3' from JSON`);
}
/** @internal */
export const RoutesHandle$inboundSchema = z.nativeEnum(RoutesHandle);
/** @internal */
export const CreateDeploymentRoutes2$inboundSchema = z.object({
    handle: RoutesHandle$inboundSchema,
    src: types.optional(types.string()),
    dest: types.optional(types.string()),
    status: types.optional(types.number()),
});
export function createDeploymentRoutes2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateDeploymentRoutes2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentRoutes2' from JSON`);
}
/** @internal */
export const CreateDeploymentHasDeploymentsType$inboundSchema = z.nativeEnum(CreateDeploymentHasDeploymentsType);
//# sourceMappingURL=createdeploymenthasdeploymentstype.js.map