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>

5,185 lines 177 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 { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
import { ACLAction, ACLAction$inboundSchema } from "./aclaction.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
import {
  UpdateProjectProjectsResponse200ApplicationJSONResponseBodyCustomEnvironmentsType,
  UpdateProjectProjectsResponse200ApplicationJSONResponseBodyCustomEnvironmentsType$inboundSchema,
  UpdateProjectProjectsType,
  UpdateProjectProjectsType$inboundSchema,
} from "./updateprojectprojectsresponse200applicationjsonresponsebodycustomenvironmentstype.js";

/**
 * Configuration for matching git branches to this environment
 */
export type UpdateProjectBranchMatcher = {
  /**
   * The type of matching to perform
   */
  type:
    UpdateProjectProjectsResponse200ApplicationJSONResponseBodyCustomEnvironmentsType;
  /**
   * 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 UpdateProjectVerification = {
  type: string;
  domain: string;
  value: string;
  reason: string;
};

/**
 * List of domains associated with this environment
 */
export type UpdateProjectDomains = {
  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<UpdateProjectVerification> | undefined;
};

/**
 * Internal representation of a custom environment with all required properties
 */
export type UpdateProjectCustomEnvironments = {
  /**
   * 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: UpdateProjectProjectsType;
  /**
   * Optional description of the environment's purpose
   */
  description?: string | undefined;
  /**
   * Configuration for matching git branches to this environment
   */
  branchMatcher?: UpdateProjectBranchMatcher | undefined;
  /**
   * List of domains associated with this environment
   */
  domains?: Array<UpdateProjectDomains> | 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 const UpdateProjectProjectsFramework = {
  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 UpdateProjectProjectsFramework = ClosedEnum<
  typeof UpdateProjectProjectsFramework
>;

/**
 * Service kind (Service.type). Omitted for schemas that do not define one.
 */
export const UpdateProjectServiceType = {
  Cron: "cron",
  Job: "job",
  Web: "web",
  Worker: "worker",
} as const;
/**
 * Service kind (Service.type). Omitted for schemas that do not define one.
 */
export type UpdateProjectServiceType = ClosedEnum<
  typeof UpdateProjectServiceType
>;

/**
 * Framework slug, when the service has one (omitted otherwise).
 */
export const UpdateProjectProjectsResponseFramework = {
  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;
/**
 * Framework slug, when the service has one (omitted otherwise).
 */
export type UpdateProjectProjectsResponseFramework = ClosedEnum<
  typeof UpdateProjectProjectsResponseFramework
>;

export type UpdateProjectServices = {
  /**
   * Service name from the deployment (Service.name).
   */
  serviceName: string;
  /**
   * Service kind (Service.type). Omitted for schemas that do not define one.
   */
  serviceType?: UpdateProjectServiceType | undefined;
  /**
   * Framework slug, when the service has one (omitted otherwise).
   */
  framework?: UpdateProjectProjectsResponseFramework | undefined;
  /**
   * Generic runtime, e.g. 'node' | 'python' | 'go' | 'ruby' | 'rust' (Service.runtime). Omitted for static builds.
   */
  runtime?: string | undefined;
};

export type UpdateProjectIpBuckets = {
  bucket: string;
  default?: boolean | undefined;
  supportUntil?: number | undefined;
};

export type UpdateProjectLint = {
  targets: Array<string>;
};

export type UpdateProjectTypecheck = {
  targets: Array<string>;
};

export type UpdateProjectMfeConfigPresent = {
  targets: Array<string>;
};

export type UpdateProjectJobs = {
  lint?: UpdateProjectLint | undefined;
  typecheck?: UpdateProjectTypecheck | undefined;
  mfeConfigPresent?: UpdateProjectMfeConfigPresent | undefined;
};

export type UpdateProjectAliasAssigned = number | boolean;

export type UpdateProjectAliasError = {
  code: string;
  message: string;
};

/**
 * The type of matching to perform
 */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType = {
  EndsWith: "endsWith",
  Equals: "equals",
  StartsWith: "startsWith",
} as const;
/**
 * The type of matching to perform
 */
export type UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType =
  ClosedEnum<
    typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType
  >;

export type UpdateProjectProjectsBranchMatcher = {
  /**
   * The type of matching to perform
   */
  type: UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType;
  /**
   * The pattern to match against branch names
   */
  pattern: string;
};

export type UpdateProjectBuilds = {
  use: string;
  src?: string | undefined;
  dest?: string | undefined;
};

export const UpdateProjectChecksConclusion = {
  Canceled: "canceled",
  Failed: "failed",
  Skipped: "skipped",
  Succeeded: "succeeded",
} as const;
export type UpdateProjectChecksConclusion = ClosedEnum<
  typeof UpdateProjectChecksConclusion
>;

export const UpdateProjectChecksState = {
  Completed: "completed",
  Registered: "registered",
  Running: "running",
} as const;
export type UpdateProjectChecksState = ClosedEnum<
  typeof UpdateProjectChecksState
>;

export type UpdateProjectProjectsCreator = {
  email: string;
  githubLogin?: string | undefined;
  gitlabLogin?: string | undefined;
  uid: string;
  username: string;
};

export type UpdateProjectOidcTokenClaims = {
  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 UpdateProjectPlan = {
  Enterprise: "enterprise",
  Hobby: "hobby",
  Pro: "pro",
} as const;
export type UpdateProjectPlan = ClosedEnum<typeof UpdateProjectPlan>;

export const UpdateProjectReadyState = {
  Blocked: "BLOCKED",
  Building: "BUILDING",
  Canceled: "CANCELED",
  Error: "ERROR",
  Initializing: "INITIALIZING",
  Queued: "QUEUED",
  Ready: "READY",
} as const;
export type UpdateProjectReadyState = ClosedEnum<
  typeof UpdateProjectReadyState
>;

export const UpdateProjectReadySubstate = {
  Promoted: "PROMOTED",
  Rolling: "ROLLING",
  Staged: "STAGED",
} as const;
export type UpdateProjectReadySubstate = ClosedEnum<
  typeof UpdateProjectReadySubstate
>;

export const UpdateProjectProjectsResponseType = {
  Lambdas: "LAMBDAS",
} as const;
export type UpdateProjectProjectsResponseType = ClosedEnum<
  typeof UpdateProjectProjectsResponseType
>;

export type UpdateProjectLatestDeployments = {
  id: string;
  alias?: Array<string> | undefined;
  aliasAssigned?: number | boolean | null | undefined;
  aliasError?: UpdateProjectAliasError | null | undefined;
  aliasFinal?: string | null | undefined;
  automaticAliases?: Array<string> | undefined;
  branchMatcher?: UpdateProjectProjectsBranchMatcher | undefined;
  buildingAt?: number | undefined;
  builds?: Array<UpdateProjectBuilds> | undefined;
  checksConclusion?: UpdateProjectChecksConclusion | undefined;
  checksState?: UpdateProjectChecksState | undefined;
  connectBuildsEnabled?: boolean | undefined;
  connectConfigurationId?: string | undefined;
  createdAt: number;
  createdIn: string;
  creator: UpdateProjectProjectsCreator | null;
  deletedAt?: number | undefined;
  deploymentHostname: string;
  forced?: boolean | undefined;
  name: string;
  meta?: { [k: string]: string } | undefined;
  monorepoManager?: string | null | undefined;
  oidcTokenClaims?: UpdateProjectOidcTokenClaims | undefined;
  plan: UpdateProjectPlan;
  /**
   * Whether or not preview comments are enabled for the deployment
   */
  previewCommentsEnabled?: boolean | undefined;
  private: boolean;
  readyAt?: number | undefined;
  readyState: UpdateProjectReadyState;
  readySubstate?: UpdateProjectReadySubstate | undefined;
  requestedAt?: number | undefined;
  target?: string | null | undefined;
  teamId?: string | null | undefined;
  type: UpdateProjectProjectsResponseType;
  url: string;
  /**
   * Present for user creators; omitted for app/integration/system creators.
   */
  userId?: string | undefined;
  withCache?: boolean | undefined;
};

export type UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooks =
  {
    createdAt?: number | undefined;
    id: string;
    name: string;
    ref: string;
    url: string;
  };

export type UpdateProjectLink8 = {
  /**
   * Owner (namespace) slug, e.g. `acme`.
   */
  owner: string;
  repo: string;
  /**
   * Origin repository id.
   */
  repoId: string;
  /**
   * Origin namespace id (`ns_…`) of the owner.
   */
  ownerId: string;
  type: "cursor-origin";
  createdAt?: number | undefined;
  deployHooks: Array<
    UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooks
  >;
  gitCredentialId: string;
  updatedAt?: number | undefined;
  sourceless?: boolean | undefined;
  productionBranch: string;
};

export type UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooks =
  {
    createdAt?: number | undefined;
    id: string;
    name: string;
    ref: string;
    url: string;
  };

export type UpdateProjectLink7 = {
  org: string;
  repo: string;
  repoId: string;
  type: "v0";
  createdAt?: number | undefined;
  deployHooks: Array<
    UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooks
  >;
  gitCredentialId: string;
  updatedAt?: number | undefined;
  sourceless?: boolean | undefined;
  productionBranch: string;
};

export type UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooks =
  {
    createdAt?: number | undefined;
    id: string;
    name: string;
    ref: string;
    url: string;
  };

export type UpdateProjectLink6 = {
  org: string;
  repo: string;
  repoId: string;
  type: "vercel";
  createdAt?: number | undefined;
  deployHooks: Array<
    UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooks
  >;
  gitCredentialId: string;
  updatedAt?: number | undefined;
  sourceless?: boolean | undefined;
  productionBranch: string;
};

export type UpdateProjectLinkProjectsResponse200ApplicationJSONDeployHooks = {
  createdAt?: number | undefined;
  id: string;
  name: string;
  ref: string;
  url: string;
};

export type UpdateProjectLink5 = {
  name: string;
  slug: string;
  owner: string;
  type: "bitbucket";
  uuid: string;
  workspaceUuid: string;
  createdAt?: number | undefined;
  deployHooks: Array<
    UpdateProjectLinkProjectsResponse200ApplicationJSONDeployHooks
  >;
  gitCredentialId: string;
  updatedAt?: number | undefined;
  sourceless?: boolean | undefined;
  productionBranch: string;
};

export type UpdateProjectLinkProjectsResponse200DeployHooks = {
  createdAt?: number | undefined;
  id: string;
  name: string;
  ref: string;
  url: string;
};

export type UpdateProjectLink4 = {
  projectId: string;
  projectName: string;
  projectNameWithNamespace: string;
  projectNamespace: string;
  /**
   * A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes. This is the id of the top level group that a namespace belongs to. Gitlab supports group nesting (up to 20 levels).
   */
  projectOwnerId?: number | undefined;
  projectUrl: string;
  type: "gitlab";
  createdAt?: number | undefined;
  deployHooks: Array<UpdateProjectLinkProjectsResponse200DeployHooks>;
  gitCredentialId: string;
  updatedAt?: number | undefined;
  sourceless?: boolean | undefined;
  productionBranch: string;
};

export type UpdateProjectLinkProjectsResponseDeployHooks = {
  createdAt?: number | undefined;
  id: string;
  name: string;
  ref: string;
  url: string;
};

export type UpdateProjectLink3 = {
  org: string;
  /**
   * A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes.
   */
  repoOwnerId?: number | undefined;
  repo?: string | undefined;
  repoId?: number | undefined;
  type: "github-custom-host";
  host: string;
  createdAt?: number | undefined;
  deployHooks: Array<UpdateProjectLinkProjectsResponseDeployHooks>;
  gitCredentialId: string;
  updatedAt?: number | undefined;
  sourceless?: boolean | undefined;
  productionBranch: string;
};

export type UpdateProjectLinkProjectsDeployHooks = {
  createdAt?: number | undefined;
  id: string;
  name: string;
  ref: string;
  url: string;
};

export type UpdateProjectLink2 = {
  type: "github-limited";
  repo?: string | undefined;
  repoId?: number | undefined;
  createdAt?: number | undefined;
  updatedAt?: number | undefined;
  org: string;
  /**
   * A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes.
   */
  repoOwnerId?: number | undefined;
  deployHooks: Array<UpdateProjectLinkProjectsDeployHooks>;
  gitCredentialId: string;
  sourceless?: boolean | undefined;
  productionBranch: string;
};

export type UpdateProjectLinkDeployHooks = {
  createdAt?: number | undefined;
  id: string;
  name: string;
  ref: string;
  url: string;
};

export type UpdateProjectLink1 = {
  org: string;
  /**
   * A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes.
   */
  repoOwnerId?: number | undefined;
  repo?: string | undefined;
  repoId?: number | undefined;
  type: "github";
  createdAt?: number | undefined;
  deployHooks: Array<UpdateProjectLinkDeployHooks>;
  gitCredentialId: string;
  updatedAt?: number | undefined;
  sourceless?: boolean | undefined;
  productionBranch: string;
};

export type UpdateProjectLink =
  | UpdateProjectLink1
  | UpdateProjectLink2
  | UpdateProjectLink3
  | UpdateProjectLink4
  | UpdateProjectLink5
  | UpdateProjectLink6
  | UpdateProjectLink7
  | UpdateProjectLink8;

export type UpdateProjectBlobs = {
  /**
   * Marks the team-level, Vercel-managed default blob project (`vercel-blob-default-project`) that orphan blob stores are scoped to when connected without an explicit project. Set only by internal storage flows and immutable after creation — guards rely on it to protect the connected stores from being lost when the project is deleted or transferred.
   */
  isDefaultApp?: boolean | undefined;
};

export type UpdateProjectMicrofrontends3 = {
  updatedAt: number;
  groupIds: Array<any>;
  enabled: false;
  freeProjectForLegacyLimits?: boolean | undefined;
};

export type UpdateProjectMicrofrontends2 = {
  isDefaultApp?: false | undefined;
  /**
   * Whether observability data should be routed to this microfrontend project or a root project.
   */
  routeObservabilityToThisProject?: boolean | undefined;
  /**
   * Whether to add microfrontends routing to aliases. This means domains in this project will route as a microfrontend.
   */
  doNotRouteWithMicrofrontendsRouting?: boolean | undefined;
  /**
   * Timestamp when the microfrontends settings were last updated.
   */
  updatedAt: number;
  /**
   * The group IDs of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together.
   */
  groupIds: Array<string>;
  /**
   * Whether microfrontends are enabled for this project.
   */
  enabled: true;
  /**
   * A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI. Includes the leading slash, e.g. `/docs`
   */
  defaultRoute?: string | undefined;
  /**
   * Whether the project was part of the legacy limits for hobby and pro-trial before billing was added. This field is only set when the team is upgraded to a paid plan and we are backfilling the subscription status. We cap the subscription to 2 projects and set this field for the 3rd project. When this field is set, the project is not charged for and we do not call any billing APIs for this project.
   */
  freeProjectForLegacyLimits?: boolean | undefined;
};

export type UpdateProjectMicrofrontends1 = {
  isDefaultApp: true;
  /**
   * Timestamp when the microfrontends settings were last updated.
   */
  updatedAt: number;
  /**
   * The group IDs of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together.
   */
  groupIds: Array<string>;
  /**
   * Whether microfrontends are enabled for this project.
   */
  enabled: true;
  /**
   * A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI. Includes the leading slash, e.g. `/docs`
   */
  defaultRoute?: string | undefined;
  /**
   * Whether the project was part of the legacy limits for hobby and pro-trial before billing was added. This field is only set when the team is upgraded to a paid plan and we are backfilling the subscription status. We cap the subscription to 2 projects and set this field for the 3rd project. When this field is set, the project is not charged for and we do not call any billing APIs for this project.
   */
  freeProjectForLegacyLimits?: boolean | undefined;
};

export type UpdateProjectMicrofrontends =
  | UpdateProjectMicrofrontends1
  | UpdateProjectMicrofrontends2
  | UpdateProjectMicrofrontends3;

export const UpdateProjectProjectsNodeVersion = {
  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 UpdateProjectProjectsNodeVersion = ClosedEnum<
  typeof UpdateProjectProjectsNodeVersion
>;

export type UpdateProjectProjectsPaths = {
  value: string;
};

export type UpdateProjectProjectsOptionsAllowlist = {
  paths: Array<UpdateProjectProjectsPaths>;
};

export type UpdateProjectProjectsPasswordProtection = {};

export const UpdateProjectProjectsResponseDeploymentType = {
  All: "all",
  AllExceptCustomDomains: "all_except_custom_domains",
  Preview: "preview",
  ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type UpdateProjectProjectsResponseDeploymentType = ClosedEnum<
  typeof UpdateProjectProjectsResponseDeploymentType
>;

export type UpdateProjectProjectsPassport = {
  deploymentType: UpdateProjectProjectsResponseDeploymentType;
  connectorId: string;
};

export type UpdateProjectSandboxUrls = {
  inheritDeploymentProtection?: boolean | undefined;
};

export type UpdateProjectProtectionConfig = {
  sandboxUrls?: UpdateProjectSandboxUrls | undefined;
};

export const UpdateProjectProjectsRegion = {
  Arn1: "arn1",
  Bom1: "bom1",
  Cdg1: "cdg1",
  Cle1: "cle1",
  Cpt1: "cpt1",
  Dub1: "dub1",
  Fra1: "fra1",
  Gru1: "gru1",
  Hkg1: "hkg1",
  Hnd1: "hnd1",
  Iad1: "iad1",
  Icn1: "icn1",
  Kix1: "kix1",
  Lhr1: "lhr1",
  Pdx1: "pdx1",
  Sfo1: "sfo1",
  Sin1: "sin1",
  Syd1: "syd1",
  Yul1: "yul1",
} as const;
export type UpdateProjectProjectsRegion = ClosedEnum<
  typeof UpdateProjectProjectsRegion
>;

export const UpdateProjectProjectsFailoverRegions = {
  Arn1: "arn1",
  Bom1: "bom1",
  Cdg1: "cdg1",
  Cle1: "cle1",
  Cpt1: "cpt1",
  Dub1: "dub1",
  Fra1: "fra1",
  Gru1: "gru1",
  Hkg1: "hkg1",
  Hnd1: "hnd1",
  Iad1: "iad1",
  Icn1: "icn1",
  Kix1: "kix1",
  Lhr1: "lhr1",
  Pdx1: "pdx1",
  Sfo1: "sfo1",
  Sin1: "sin1",
  Syd1: "syd1",
  Yul1: "yul1",
} as const;
export type UpdateProjectProjectsFailoverRegions = ClosedEnum<
  typeof UpdateProjectProjectsFailoverRegions
>;

export type UpdateProjectProjectsSandbox = {
  region?: UpdateProjectProjectsRegion | undefined;
  failoverRegions?: Array<UpdateProjectProjectsFailoverRegions> | undefined;
};

export const UpdateProjectProjectsFunctionDefaultMemoryType = {
  Performance: "performance",
  PerformanceXl: "performance_xl",
  Standard: "standard",
  StandardLegacy: "standard_legacy",
} as const;
export type UpdateProjectProjectsFunctionDefaultMemoryType = ClosedEnum<
  typeof UpdateProjectProjectsFunctionDefaultMemoryType
>;

export const UpdateProjectProjectsBuildMachineType = {
  Basic: "basic",
  Enhanced: "enhanced",
  Standard: "standard",
  Turbo: "turbo",
} as const;
export type UpdateProjectProjectsBuildMachineType = ClosedEnum<
  typeof UpdateProjectProjectsBuildMachineType
>;

export const UpdateProjectProjectsBuildMachineSelection = {
  Elastic: "elastic",
  Fixed: "fixed",
} as const;
export type UpdateProjectProjectsBuildMachineSelection = ClosedEnum<
  typeof UpdateProjectProjectsBuildMachineSelection
>;

export const UpdateProjectProjectsBuildMachineElasticReason = {
  BasicFloor: "basic-floor",
  BuildTimeoutFailure: "build-timeout-failure",
  EnospcFailure: "enospc-failure",
  EnterpriseFloor: "enterprise-floor",
  HighPeakDisk: "high-peak-disk",
  HighPeakMemory: "high-peak-memory",
  LongBuildDuration: "long-build-duration",
  OomFailure: "oom-failure",
  ShortBuildDuration: "short-build-duration",
  SustainedHighCpu: "sustained-high-cpu",
} as const;
export type UpdateProjectProjectsBuildMachineElasticReason = ClosedEnum<
  typeof UpdateProjectProjectsBuildMachineElasticReason
>;

export const UpdateProjectProjectsConfiguration = {
  SkipNamespaceQueue: "SKIP_NAMESPACE_QUEUE",
  WaitForNamespaceQueue: "WAIT_FOR_NAMESPACE_QUEUE",
} as const;
export type UpdateProjectProjectsConfiguration = ClosedEnum<
  typeof UpdateProjectProjectsConfiguration
>;

export type UpdateProjectProjectsBuildQueue = {
  configuration?: UpdateProjectProjectsConfiguration | undefined;
};

export type UpdateProjectProjectsResourceConfig = {
  elasticConcurrencyEnabled?: boolean | undefined;
  fluid?: boolean | undefined;
  functionDefaultRegions: Array<string>;
  functionDefaultTimeout?: number | undefined;
  functionDefaultMemoryType?:
    | UpdateProjectProjectsFunctionDefaultMemoryType
    | undefined;
  functionZeroConfigFailover?: boolean | undefined;
  buildMachineType?: UpdateProjectProjectsBuildMachineType | undefined;
  buildMachineSelection?:
    | UpdateProjectProjectsBuildMachineSelection
    | undefined;
  buildMachineElasticLastUpdated?: number | undefined;
  buildMachineElasticReason?:
    | UpdateProjectProjectsBuildMachineElasticReason
    | undefined;
  isNSNBDisabled?: boolean | undefined;
  buildQueue?: UpdateProjectProjectsBuildQueue | undefined;
  enableFunctionsBeta?: boolean | undefined;
};

/**
 * Description of why a project was rolled back, and by whom. Note that lastAliasRequest contains the from/to details of the rollback.
 */
export type UpdateProjectRollbackDescription = {
  /**
   * The user who rolled back the project.
   */
  userId: string;
  /**
   * The username of the user who rolled back the project.
   */
  username: string;
  /**
   * User-supplied explanation of why they rolled back the project. Limited to 250 characters.
   */
  description: string;
  /**
   * Timestamp of when the rollback was requested.
   */
  createdAt: number;
};

/**
 * An array of all the stages required during a deployment release. Each stage defines a target percentage and advancement rules. The final stage must always have targetPercentage: 100.
 */
export type UpdateProjectStages = {
  /**
   * The percentage of traffic to serve to the canary deployment (0-100)
   */
  targetPercentage: number;
  /**
   * Whether or not this stage requires manual approval to proceed
   */
  requireApproval?: boolean | undefined;
  /**
   * Duration in minutes for automatic advancement to the next stage
   */
  duration?: number | undefined;
  /**
   * Whether to linearly shift traffic over the duration of this stage
   */
  linearShift?: boolean | undefined;
};

/**
 * The metric this check evaluates.
 */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType =
  {
    ErrorRate5xx: "error-rate-5xx",
  } as const;
/**
 * The metric this check evaluates.
 */
export type UpdateProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType =
  ClosedEnum<
    typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType
  >;

/**
 * The checks to evaluate. An empty array means nothing is evaluated.
 */
export type UpdateProjectChecks = {
  /**
   * The metric this check evaluates.
   */
  type:
    UpdateProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType;
  /**
   * Minimum number of requests required in the window before the check can fail. Below this, the check is inconclusive rather than failing, so low-traffic stages don't gate on noise. Defaults to `100` when omitted.
   */
  minSampleSize?: number | undefined;
  /**
   * Response status codes to ignore entirely — dropped from both the numerator (errors) and the denominator (total requests). Defaults to `[]` when omitted.
   */
  excludeStatusCodes?: Array<number> | undefined;
  /**
   * Request paths to ignore entirely — dropped from both the numerator (errors) and the denominator (total requests). Matched exactly against the request path with any query string removed; no prefix or glob matching. Defaults to `[]` when omitted.
   */
  excludePaths?: Array<string> | undefined;
  /**
   * Seconds of ingest lag to allow for: the query's upper bound is `now() - this value`, so the check never reads a window that is still filling. Defaults to `30` when omitted.
   */
  ingestWatermarkSeconds?: number | undefined;
};

/**
 * What to do when the gate trips: pause the rollout, or roll it back.
 */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAction =
  {
    Pause: "pause",
    Rollback: "rollback",
  } as const;
/**
 * What to do when the gate trips: pause the rollout, or roll it back.
 */
export type UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAction =
  ClosedEnum<
    typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAction
  >;

/**
 * Automated gating configuration. Omitted (the default) means no gating is configured, which is equivalent to `enabled: false`.
 */
export type UpdateProjectGate = {
  /**
   * Whether automated gating is enabled for this project's rollouts.
   */
  enabled: boolean;
  /**
   * The checks to evaluate. An empty array means nothing is evaluated.
   */
  checks: Array<UpdateProjectChecks>;
  /**
   * How many failing evaluations within {@link windowSize} trip the gate. Defaults to `3` when omitted.
   */
  failureThreshold?: number | undefined;
  /**
   * How many of the most recent evaluations {@link failureThreshold} is counted against. Defaults to `5` when omitted.
   */
  windowSize?: number | undefined;
  /**
   * What to do when the gate trips: pause the rollout, or roll it back.
   */
  action: UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAction;
  /**
   * When true, a tripped gate is only reported — {@link action} is not taken.
   */
  dryRun: boolean;
};

/**
 * Project-level rolling release configuration that defines how deployments should be gradually rolled out
 */
export type UpdateProjectRollingRelease = {
  /**
   * The environment that the release targets, currently only supports production. Adding in case we want to configure with alias groups or custom environments.
   */
  target: string;
  /**
   * An array of all the stages required during a deployment release. Each stage defines a target percentage and advancement rules. The final stage must always have targetPercentage: 100.
   */
  stages?: Array<UpdateProjectStages> | null | undefined;
  /**
   * Whether the request served by a canary deployment should return a header indicating a canary was served. Defaults to `false` when omitted.
   */
  canaryResponseHeader?: boolean | undefined;
  /**
   * Automated gating configuration. Omitted (the default) means no gating is configured, which is equivalent to `enabled: false`.
   */
  gate?: UpdateProjectGate | undefined;
};

export const UpdateProjectProjectsResponseFunctionDefaultMemoryType = {
  Performance: "performance",
  PerformanceXl: "performance_xl",
  Standard: "standard",
  StandardLegacy: "standard_legacy",
} as const;
export type UpdateProjectProjectsResponseFunctionDefaultMemoryType = ClosedEnum<
  typeof UpdateProjectProjectsResponseFunctionDefaultMemoryType
>;

export const UpdateProjectProjectsResponseBuildMachineType = {
  Basic: "basic",
  Enhanced: "enhanced",
  Standard: "standard",
  Turbo: "turbo",
} as const;
export type UpdateProjectProjectsResponseBuildMachineType = ClosedEnum<
  typeof UpdateProjectProjectsResponseBuildMachineType
>;

export const UpdateProjectProjectsResponseBuildMachineSelection = {
  Elastic: "elastic",
  Fixed: "fixed",
} as const;
export type UpdateProjectProjectsResponseBuildMachineSelection = ClosedEnum<
  typeof UpdateProjectProjectsResponseBuildMachineSelection
>;

export const UpdateProjectProjectsResponseBuildMachineElasticReason = {
  BasicFloor: "basic-floor",
  BuildTimeoutFailure: "build-timeout-failure",
  EnospcFailure: "enospc-failure",
  EnterpriseFloor: "enterprise-floor",
  HighPeakDisk: "high-peak-disk",
  HighPeakMemory: "high-peak-memory",
  LongBuildDuration: "long-build-duration",
  OomFailure: "oom-failure",
  ShortBuildDuration: "short-build-duration",
  SustainedHighCpu: "sustained-high-cpu",
} as const;
export type UpdateProjectProjectsResponseBuildMachineElasticReason = ClosedEnum<
  typeof UpdateProjectProjectsResponseBuildMachineElasticReason
>;

export const UpdateProjectProjectsResponseConfiguration = {
  SkipNamespaceQueue: "SKIP_NAMESPACE_QUEUE",
  WaitForNamespaceQueue: "WAIT_FOR_NAMESPACE_QUEUE",
} as const;
export type UpdateProjectProjectsResponseConfiguration = ClosedEnum<
  typeof UpdateProjectProjectsResponseConfiguration
>;

export type UpdateProjectProjectsResponseBuildQueue = {
  configuration?: UpdateProjectProjectsResponseConfiguration | undefined;
};

export type UpdateProjectDefaultResourceConfig = {
  elasticConcurrencyEnabled?: boolean | undefined;
  fluid?: boolean | undefined;
  functionDefaultRegions: Array<string>;
  functionDefaultTimeout?: number | undefined;
  functionDefaultMemoryType?:
    | UpdateProjectProjectsResponseFunctionDefaultMemoryType
    | undefined;
  functionZeroConfigFailover?: boolean | undefined;
  buildMachineType?: UpdateProjectProjectsResponseBuildMachineType | undefined;
  buildMachineSelection?:
    | UpdateProjectProjectsResponseBuildMachineSelection
    | undefined;
  buildMachineElasticLastUpdated?: number | undefined;
  buildMachineElasticReason?:
    | UpdateProjectProjectsResponseBuildMachineElasticReason
    | undefined;
  isNSNBDisabled?: boolean | undefined;
  buildQueue?: UpdateProjectProjectsResponseBuildQueue | undefined;
  enableFunctionsBeta?: boolean | undefined;
};

export type UpdateProjectProjectsStaticIps = {
  builds: boolean;
  enabled: boolean;
  regions: Array<string>;
};

export const UpdateProjectProjectsResponse200DeploymentType = {
  All: "all",
  AllExceptCustomDomains: "all_except_custom_domains",
  Preview: "preview",
  ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type UpdateProjectProjectsResponse200DeploymentType = ClosedEnum<
  typeof UpdateProjectProjectsResponse200DeploymentType
>;

export const UpdateProjectCve55182MigrationAppliedFrom = {
  All: "all",
  AllExceptCustomDomains: "all_except_custom_domains",
  Preview: "preview",
  ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type UpdateProjectCve55182MigrationAppliedFrom = ClosedEnum<
  typeof UpdateProjectCve55182MigrationAppliedFrom
>;

export const UpdateProjectApril2026SecurityIncidentMigrationAppliedFrom = {
  All: "all",
  AllExceptCustomDomains: "all_except_custom_domains",
  Preview: "preview",
  ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type UpdateProjectApril2026SecurityIncidentMigrationAppliedFrom =
  ClosedEnum<typeof UpdateProjectApril2026SecurityIncidentMigrationAppliedFrom>;

export type UpdateProjectProjectsSsoProtection = {
  deploymentType: UpdateProjectProjectsResponse200DeploymentType;
  cve55182MigrationAppliedFrom?:
    | UpdateProjectCve55182MigrationAppliedFrom
    | null
    | undefined;
  april2026SecurityIncidentMigrationAppliedFrom?:
    | UpdateProjectApril2026SecurityIncidentMigrationAppliedFrom
    | null
    | undefined;
};

export type UpdateProjectProjectsAliasAssigned = number | boolean;

export type UpdateProjectProjectsAliasError = {
  code: string;
  message: string;
};

/**
 * The type of matching to perform
 */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType =
  {
    EndsWith: "endsWith",
    Equals: "equals",
    StartsWith: "startsWith",
  } as const;
/**
 * The type of matching to perform
 */
export type UpdateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType =
  ClosedEnum<
    typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType
  >;

export type UpdateProjectProjectsResponseBranchMatcher = {
  /**
   * The type of matching to perform
   */
  type: UpdateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType;
  /**
   * The pattern to match against branch names
   */
  pattern: string;
};

export type UpdateProjectProjectsBuilds = {
  use: string;
  src?: string | undefined;
  dest?: string | undefined;
};

export const UpdateProjectProjectsChecksConclusion = {
  Canceled: "canceled",
  Failed: "failed",
  Skipped: "skipped",
  Succeeded: "succeeded",
} as const;
export type UpdateProjectProjectsChecksConclusion = ClosedEnum<
  typeof UpdateProjectProjectsChecksConclusion
>;

export const UpdateProjectProjectsChecksState = {
  Completed: "completed",
  Registered: "registered",
  Running: "running",
} as const;
export type UpdateProjectProjectsChecksState = ClosedEnum<
  typeof UpdateProjectProjectsChecksState
>;

export type UpdateProjectProjectsResponseCreator = {
  email: string;
  githubLogin?: string | undefined;
  gitlabLogin?: string | undefined;
  uid: string;
  username: string;
};

export type UpdateProjectProjectsOidcTokenClaims = {
  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 UpdateProjectProjectsPlan = {
  Enterprise: "enterprise",
  Hobby: "hobby",
  Pro: "pro",
} as const;
export type UpdateProjectProjectsPlan = ClosedEnum<
  typeof UpdateProjectProjectsPlan
>;

export const UpdateProjectProjectsReadyState = {
  Blocked: "BLOCKED",
  Building: "BUILDING",
  Canceled: "CANCELED",
  Error: "ERROR",
  Initializing: "INITIALIZING",
  Queued: "QUEUED",
  Ready: "READY",
} as const;
export type UpdateProjectProjectsReadyState = ClosedEnum<
  typeof UpdateProjectProjectsReadyState
>;

export const UpdateProjectProjectsReadySubstate = {
  Promoted: "PROMOTED",
  Rolling: "ROLLING",
  Staged: "STAGED",
} as const;
export type UpdateProjectProjectsReadySubstate = ClosedEnum<
  typeof UpdateProjectProjectsReadySubstate
>;

export const UpdateProjectProjectsResponse200Type = {
  Lambdas: "LAMBDAS",
} as const;
export type UpdateProjectProjectsResponse200Type = ClosedEnum<
  typeof UpdateProjectProjectsResponse200Type
>;

export type UpdateProjectTargets = {
  id: string;
  alias?: Array<string> | undefined;
  aliasAssigned?: number | boolean | null | undefined;
  aliasError?: UpdateProjectProjectsAliasError | null | undefined;
  aliasFinal?: string | null | undefined;
  automaticAliases?: Array<string> | undefined;
  branchMatcher?: UpdateProjectProjectsResponseBranchMatcher | undefined;
  buildingAt?: number | undefined;
  builds?: Array<UpdateProjectProjectsBuilds> | undefined;
  checksConclusion?: UpdateProjectProjectsChecksConclusion | undefined;
  checksState?: UpdateProjectProjectsChecksState | undefined;
  connectBuildsEnabled?: boolean | undefined;
  connectConfigurationId?: string | undefined;
  createdAt: number;
  createdIn: string;
  creator: UpdateProjectProjectsResponseCreator | null;
  deletedAt?: number | undefined;
  deploymentHostname: string;
  forced?: boolean | undefined;
  name: string;
  meta?: { [k: string]: string } | undefined;
  monorepoManager?: string | null | undefined;
  oidcTokenClaims?: UpdateProjectProjectsOidcTokenClaims | undefined;
  plan: UpdateProjectProjectsPlan;
  /**
   * Whether or not preview comments are enabled for the deployment
   */
  previewCommentsEnabled?: boolean | undefined;
  private: boolean;
  readyAt?: number | undefined;
  readyState: UpdateProjectProjectsReadyState;
  readySubstate?: UpdateProjectProjectsReadySubstate | undefined;
  requestedAt?: number | undefined;
  target?: string | null | undefined;
  teamId?: string | null | undefined;
  type: UpdateProjectProjectsResponse200Type;
  url: string;
  /**
   * Present for user creators; omitted for app/integration/system creators.
   */
  userId?: string | undefined;
  withCache?: boolean | undefined;
};

export type UpdateProjectPermissions = {
  oauth2Connection?: Array<ACLAction> | undefined;
  user?: Array<ACLAction> | undefined;
  userConnection?: Array<ACLAction> | undefined;
  userMfaConfiguration?: Array<ACLAction> | undefined;
  userPreference?: Array<ACLAction> | undefined;
  userSudo?: Array<ACLAction> | undefined;
  webAuthn?: Array<ACLAction> | undefined;
  accessGroup?: Array<ACLAction> | undefined;
  agent?: Array<ACLAction> | undefined;
  aiGatewayApiKey?: Array<ACLAction> | undefined;
  aiGatewayApiKeyBypassAll?: Array<ACLAction> | undefined;
  aiGatewayApiKeyOwnedBySelf?: Array<ACLAction> | undefined;
  aiGatewayApiKeySpendAttribution?: Array<ACLAction> | undefined;
  aiGatewayApiKeyZdrExemption?: Array<ACLAction> | undefined;
  aiGatewayBudget?: Array<ACLAction> | undefined;
  aiGatewayCredits?: Array<ACLAction> | undefined;
  aiGatewayPrivateModels?: Array<ACLAction> | undefined;
  aiGatewayGuardrails?: Array<ACLAction> | undefined;
  aiGatewayRules?: Array<ACLAction> | undefined;
  aiGatewaySettings?: Array<ACLAction> | undefined;
  aiGatewayTranscripts?: Array<ACLAction> | undefined;
  aiGatewayTranscriptsSettings?: Array<ACLAction> | undefined;
  aiGatewayUsage?: Array<ACLAction> | undefined;
  aiGatewayVirtualModelConfigs?: Array<ACLAction> | undefined;
  alerts?: Array<ACLAction> | undefined;
  alertRules?: Array<ACLAction> | undefined;
  aliasGlobal?: Array<ACLAction> | undefined;
  analyticsSampling?: Array<ACLAction> | undefined;
  analyticsUsage?: Array<ACLAction> | undefined;
  apiKey?: Array<ACLAction> | undefined;
  apiKeyAiGateway?: Array<ACLAction> | undefined;
  apiKeyOwnedBySelf?: Array<ACLAction> | undefined;
  oauth2Application?: Array<ACLAction> | undefined;
  vercelAppInstallation?: Array<ACLAction> | undefined;
  vercelAppInstallationRequest?: Array<ACLAction> | undefined;
  auditLog?: Array<ACLAction> | undefined;
  automation?: Array<ACLAction> | undefined;
  billingAddress?: Array<ACLAction> | undefined;
  billingInformation?: Array<ACLAction> | undefined;
  billingInvoice?: Array<ACLAction> | undefined;
  billingInvoiceEmailRecipient?: Array<ACLAction> | undefined;
  billingInvoiceLanguage?: Array<ACLAction> | undefined;
  billingPlan?: Array<ACLAction> | undefined;
  billingPurchaseOrder?: Array<ACLAction> | undefined;
  billingRefund?: Array<ACLAction> | undefined;
  billingTaxId?: Array<ACLAction> | undefined;
  blob?: Array<ACLAction> | undefined;
  blobStoreTokenSet?: Array<ACLAction> | undefined;
  budget?: Array<ACLAction> | undefined;
  cacheArtifact?: Array<ACLAction> | undefined;
  cacheArtifactUsageEvent?: Array<ACLAction> | undefined;
  codeChecks?: Array<ACLAction> | undefined;
  codeOwners?: Array<ACLAction> | undefined;
  ciInvocations?: Array<ACLAction> | undefined;
  ciLogs?: Array<ACLAction> | undefined;
  concurrentBuilds?: Array<ACLAction> | undefined;
  connect?: Array<ACLAction> | undefined;
  connectConfiguration?: Array<ACLAction> | undefined;
  connectLogs?: Array<ACLAction> | undefined;
  connexClient?: Array<ACLAction> | undefined;
  connexClientProject?: Array<ACLAction> | undefined;
  connexContact?: Array<ACLAction> | undefined;
  connexInstallation?: Array<ACLAction> | undefined;
  connexToken?: Array<ACLAction> | undefined;
  buildMachineDefault?: Array<ACLAction> | undefined;
  cursorOriginInstallation?: Array<ACLAction> | undefined;
  dataCacheBillingSettings?: Array<ACLAction> | undefined;
  defaultDeploymentProtection?: Array<ACLAction> | undefined;
  deploymentPolicy?: Array<ACLAction> | undefined;
  domain?: Array<ACLAction> | undefined;
  domainAcceptDelegation?: Array<ACLAction> | undefined;
  domainAuthCodes?: Array<ACLAction> | undefined;
  domainCertificate?: Array<ACLAction> | undefined;
  domainCheckConfig?: Array<ACLAction> | undefined;
  domainMove?: Array<ACLAction> | undefined;
  domainPurchase?: Array<ACLAction> | undefined;
  domainRecord?: Array<ACLAction> | undefined;
  domainTransferIn?: Array<ACLAction> | undefined;
  drain?: Array<ACLAction> | undefined;
  edgeConfig?: Array<ACLAction> | undefined;
  edgeConfigItem?: Array<ACLAction> | undefined;
  edgeConfigSchema?: Array<ACLAction> | undefined;
  edgeConfigToken?: Array<ACLAction> | undefined;
  endpointVerification?: Array<ACLAction> | undefined;
  event?: Array<ACLAction> | undefined;
  fileUpload?: Array<ACLAction> | undefined;
  flagsExplorerSubscription?: Array<ACLAction> | undefined;
  gitRepository?: Array<ACLAction> | undefined;
  imageOptimizationNewPrice?: Array<ACLAction> | undefined;
  integration?: Array<ACLAction> | undefined;
  integrationAccount?: Array<ACLAction> | undefined;
  integrationConfiguration?: Array<ACLAction> | undefined;
  integrationConfigurationProjects?: Array<ACLAction> | undefined;
  integrationConfigurationRole?: Array<ACLAction> | undefined;
  integrationConfigurationTransfer?: Array<ACLAction> | undefined;
  integrationDeploymentAction?: Array<ACLAction> | undefined;
  integrationEvent?: Array<ACLAction> | undefined;
  integrationLog?: Array<ACLAction> | undefined;
  integrationResource?: Array<ACLAction> | undefined;
  integrationResourceData?: Array<ACLAction> | undefined;
  integrationResourceReplCommand?: Array<ACLAction> | undefined;
  integrationResourceSecrets?: Array<ACLAction> | undefined;
  integrationSSOSession?: Array<ACLAction> | undefined;
  integrationStrict?: Array<ACLAction> | undefined;
  integrationStoreTokenSet?: Array<ACLAction> | undefined;
  integrationVercelConfigurationOverride?: Array<ACLAction> | undefined;
  integrationPullRequest?: Array<ACLAction> | undefined;
  ipBlocking?: Array<ACLAction> | undefined;
  jobGlobal?: Array<ACLAction> | undefined;
  kmsIssuer?: Array<ACLAction> | undefined;
  kmsProjectGrant?: Array<ACLAction> | undefined;
  logDrain?: Array<ACLAction> | undefined;
  marketplaceBillingData?: Array<ACLAction> | undefined;
  marketplaceExperimentationEdgeConfigData?: Array<ACLAction> | undefined;
  marketplaceExperimentationItem?: Array<ACLAction> | undefined;
  marketplaceFlexCommit?: Array<ACLAction> | undefined;
  marketplaceInstallationMember?: Array<ACLAction> | undefined;
  marketplaceInvoice?: Array<ACLAction> | undefined;
  marketplaceSettings?: Array<ACLAction> | undefined;
  monitoring?: Array<ACLAction> | undefined;
  monitoringAlert?: Array<ACLAction> | undefined;
  monitoringChart?: Array<ACLAction> | undefined;
  monitoringQuery?: Array<ACLAction> | undefined;
  monitoringSettings?: Array<ACLAction> | undefined;
  notificationCustomerBudget?: Array<ACLAction> | undefined;
  notificationDeploymentFailed?: Array<ACLAction> | undefined;
  notificationDomainConfiguration?: Array<ACLAction> | undefined;
  notificationDomainExpire?: Array<ACLAction> | undefined;
  notificationDomainMoved?: Array<ACLAction> | undefined;
  notificationDomainPurchase?: Array<ACLAction> | undefined;
  notificationDomainRenewal?: Array<ACLAction> | undefined;
  notificationDomainTransfer?: Array<ACLAction> | undefined;
  notificationDomainUnverified?: Array<ACLAction> | undefined;
  notificationMonitoringAlert?: Array<ACLAction> | undefined;
  notificationPaymentFailed?: Array<ACLAction> | undefined;
  notificationPreferences?: Array<ACLAction> | undefined;
  notificationStatementOfReasons?: Array<ACLAction> | undefined;
  notificationUsageAlert?: Array<ACLAction> | undefined;
  oidcFederationPolicy?: Array<ACLAction> | undefined;
  observabilityConfiguration?: Array<ACLAction> | undefined;
  observabilityFunnel?: Array<ACLAction> | undefined;
  observabilityNotebook?: Array<ACLAction> | undefined;
  openTelemetryEndpoint?: Array<ACLAction> | undefined;
  ownEvent?: Array<ACLAction> | undefined;
  organization?: Array<ACLAction> | undefined;
  organizationDomain?: Array<ACLAction> | undefined;
  organizationTeam?: Array<ACLAction> | undefined;
  passwordProtectionInvoiceItem?: Array<ACLAction> | undefined;
  paymentMethod?: Array<ACLAction> | undefined;
  permissions?: Array<ACLAction> | undefined;
  postgres?: Array<ACLAction> | undefined;
  postgresStoreTokenSet?: Array<ACLAction> | undefined;
  previewDeploymentSuffix?: Array<ACLAction> | undefined;
  privateCloudAccount?: Array<ACLAction> | undefined;
  projectTransferIn?: Array<ACLAction> | undefined;
  projectTransferRequest?: Array<ACLAction> | undefined;
  proTrialOnboarding?: Array<ACLAction> | undefined;
  rateLimit?: Array<ACLAction> | undefined;
  redis?: Array<ACLAction> | undefined;
  redisStoreTokenSet?: Array<ACLAction> | undefined;
  remoteCaching?: Array<ACLAction> | undefined;
  repository?: Array<ACLAction> | undefined;
  samlConfig?: Array<ACLAction> | undefined;
  secret?: Array<ACLAction> | undefined;
  securityConfig?: Array<ACLAction> | undefined;
  sensitiveEnvironmentVariablePolicy?: Array<ACLAction> | undefined;
  sharedEnvVars?: Array<ACLAction> | undefined;
  sharedEnvVarsProduction?: Array<ACLAction> | undefined;
  space?: Array<ACLAction> | undefined;
  spaceRun?: Array<ACLAction> | undefined;
  storeIsLocked?: Array<ACLAction> | undefined;
  storeTokenSetSensitive?: Array<ACLAction> | undefined;
  storeTransfer?: Array<ACLAction> | undefined;
  supportCase?: Array<ACLAction> | undefined;
  supportCaseComment?: Array<ACLAction> | undefined;
  team?: Array<ACLAction> | undefined;
  teamAccessRequest?: Array<ACLAction> | undefined;
  teamFellowMembership?: Array<ACLAction> | undefined;
  teamGitExclusivity?: Array<ACLAction> | undefined;
  teamInvite?: Array<ACLAction> | undefined;
  teamInviteCode?: Array<ACLAction> | undefined;
  teamInviteLink?: Array<ACLAction> | undefined;
  teamJoin?: Array<ACLAction> | undefined;
  teamMemberMfaStatus?: Array<ACLAction> | undefined;
  teamMicrofrontends?: Array<ACLAction> | undefined;
  teamOwnMembership?: Array<ACLAction> | undefined;
  teamOwnMembershipDisconnectSAML?: Array<ACLAction> | undefined;
  teamSudo?: Array<ACLAction> | undefined;
  teamTokenInvalidation?: Array<ACLAction> | undefined;
  token?: Array<ACLAction> | undefined;
  toolbarComment?: Array<ACLAction> | undefined;
  usage?: Array<ACLAction> | undefined;
  usageCycle?: Array<ACLAction> | undefined;
  vcrRepository?: Array<ACLAction> | undefined;
  vpcPeeringConnection?: Array<ACLAction> | undefined;
  webAnalyticsPlan?: Array<ACLAction> | undefined;
  webhook?: Array<ACLAction> | undefined;
  webhookEvent?: Array<ACLAction> | undefined;
  aliasProject?: Array<ACLAction> | undefined;
  aliasProtectionBypass?: Array<ACLAction> | undefined;
  bulkRedirects?: Array<ACLAction> | undefined;
  buildMachine?: Array<ACLAction> | undefined;
  connectConfigurationLink?: Array<ACLAction> | undefined;
  dataCacheNamespace?: Array<ACLAction> | undefined;
  deployment?: Array<ACLAction> | undefined;
  deploymentBuildLogs?: Array<ACLAction> | undefined;
  deploymentCheck?: Array<ACLAction> | undefined;
  deploymentCheckPreview?: Array<ACLAction> | undefined;
  deploymentCheckReRunFromProductionBranch?: Array<ACLAction> | undefined;
  deploymentProductionGit?: Array<ACLAction> | undefined;
  deploymentV0?: Array<ACLAction> | undefined;
  deploymentPreview?: Array<ACLAction> | undefined;
  deploymentPrivate?: Array<ACLAction> | undefined;
  deploymentPromote?: Array<ACLAction> | undefined;
  deploymentRollback?: Array<ACLAction> | undefined;
  edgeCacheNamespace?: Array<ACLAction> | undefined;
  environments?: Array<ACLAction> | undefined;
  job?: Array<ACLAction> | undefined;
  logs?: Array<ACLAction> | undefined;
  logsPreset?: Array<ACLAction> | undefined;
  observabilityData?: Array<ACLAction> | undefined;
  onDemandBuild?: Array<ACLAction> | undefined;
  onDemandConcurrency?: Array<ACLAction> | undefined;
  optionsAllowlist?: Array<ACLAction> | undefined;
  passwordProtection?: Array<ACLAction> | undefined;
  privateLinkEndpoint?: Array<ACLAction> | undefined;
  productionAliasProtectionBypass?: Array<ACLAction> | undefined;
  productionShareableLink?: Array<ACLAction> | undefined;
  project?: Array<ACLAction> | undefined;
  projectAccessGroup?: Array<ACLAction> | undefined;
  projectAnalyticsSampling?: Array<ACLAction> | undefined;
  projectAnalyticsUsage?: Array<ACLAction> | undefined;
  projectCheck?: Array<ACLAction> | undefined;
  projectCheckRun?: Array<ACLAction> | undefined;
  projectDeploymentExpiration?: Array<ACLAction> | undefined;
  projectDeploymentHook?: Array<ACLAction> | undefined;
  projectDeploymentProtectionStrict?: Array<ACLAction> | undefined;
  projectDomain?: Array<ACLAction> | undefined;
  projectDomainCheckConfig?: Array<ACLAction> | undefined;
  projectDomainMove?: Array<ACLAction> | undefined;
  projectDomainVerify?: Array<ACLAction> | undefined;
  projectEvent?: Array<ACLAction> | undefined;
  projectEnvVars?: Array<ACLAction> | undefined;
  projectEnvVarsProduction?: Array<ACLAction> | undefined;
  projectEnvVarsUnownedByIntegration?: Array<ACLAction> | undefined;
  projectFlags?: Array<ACLAction> | undefined;
  projectFlagsProduction?: Array<ACLAction> | undefined;
  projectFlagsSDKKey?: Array<ACLAction> | undefined;
  projectFromV0?: Array<ACLAction> | undefined;
  projectId?: Array<ACLAction> | undefined;
  projectIntegrationConfiguration?: Array<ACLAction> | undefined;
  projectLink?: Array<ACLAction> | undefined;
  projectMember?: Array<ACLAction> | undefined;
  projectMonitoring?: Array<ACLAction> | undefined;
  projectOIDCToken?: Array<ACLAction> | undefined;
  projectPermissions?: Array<ACLAction> | undefined;
  projectProductionBranch?: Array<ACLAction> | undefined;
  projectProtectionBypass?: Array<ACLAction> | undefined;
  projectRollingRelease?: Array<ACLAction> | undefined;
  projectRoutes?: Array<ACLAction> | undefined;
  projectSupportCase?: Array<ACLAction> | undefined;
  projectSupportCaseComment?: Array<ACLAction> | undefined;
  projectTier?: Array<ACLAction> | undefined;
  projectTransfer?: Array<ACLAction> | undefined;
  projectTransferOut?: Array<ACLAction> | undefined;
  projectUsage?: Array<ACLAction> | undefined;
  pageIntegrity?: Array<ACLAction> | undefined;
  seawallConfig?: Array<ACLAction> | undefined;
  securityPlusConfiguration?: Array<ACLAction> | undefined;
  shareableLink?: Array<ACLAction> | undefined;
  shareableLinkStrict?: Array<ACLAction> | undefined;
  sharedEnvVarConnection?: Array<ACLAction> | undefined;
  skewProtection?: Array<ACLAction> | undefined;
  analytics?: Array<ACLAction> | undefined;
  trustedIps?: Array<ACLAction> | undefined;
  trustedSources?: Array<ACLAction> | undefined;
  v0Chat?: Array<ACLAction> | undefined;
  vercelAuth?: Array<ACLAction> | undefined;
  vercelRun?: Array<ACLAction> | undefined;
  webAnalytics?: Array<ACLAction> | undefined;
  workflowRunData?: Array<ACLAction> | undefined;
};

export type UpdateProjectLastRollbackTarget = {};

export const UpdateProjectJobStatus = {
  Failed: "failed",
  InProgress: "in-progress",
  Pending: "pending",
  Skipped: "skipped",
  Succeeded: "succeeded",
} as const;
export type UpdateProjectJobStatus = ClosedEnum<typeof UpdateProjectJobStatus>;

export const UpdateProjectProjectsResponse200ApplicationJSONType = {
  Promote: "promote",
  Rollback: "rollback",
} as const;
export type UpdateProjectProjectsResponse200ApplicationJSONType = ClosedEnum<
  typeof UpdateProjectProjectsResponse200ApplicationJSONType
>;

export type UpdateProjectLastAliasRequest = {
  fromDeploymentId: string | null;
  toDeploymentId: string;
  /**
   * If rolling back from a rolling release, fromDeploymentId captures the "base" of that rolling release, and fromRollingReleaseId captures the "target" of that rolling release.
   */
  fromRollingReleaseId?: string | undefined;
  jobStatus: UpdateProjectJobStatus;
  requestedAt: number;
  type: UpdateProjectProjectsResponse200ApplicationJSONType;
};

export type UpdateProjectProtectionBypass2 = {
  createdAt: number;
  createdBy: string;
  scope: "automation-bypass";
  /**
   * When there was only one bypass, it was automatically set as an env var on deployments. With multiple bypasses, there is always one bypass that is selected as the default, and gets set as an env var on deployments. As this is a new field, undefined means that the bypass is the env var. If there are any automation bypasses, exactly one must be the env var.
   */
  isEnvVar?: boolean | undefined;
  /**
   * Optional note about the bypass to be displayed in the UI
   */
  note?: string | undefined;
};

export type UpdateProjectProtectionBypass1 = {
  createdAt: number;
  createdBy: string;
  scope: "integration-automation-bypass";
  integrationId: string;
  configurationId: string;
};

export type UpdateProjectProtectionBypass =
  | UpdateProjectProtectionBypass1
  | UpdateProjectProtectionBypass2;

export const UpdateProjectTrustedIpsProjectsDeploymentType = {
  All: "all",
  AllExceptCustomDomains: "all_except_custom_domains",
  Preview: "preview",
  ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
  Production: "production",
} as const;
export type UpdateProjectTrustedIpsProjectsDeploymentType = ClosedEnum<
  typeof UpdateProjectTrustedIpsProjectsDeploymentType
>;

export type UpdateProjectTrustedIps2 = {
  deploymentType: UpdateProjectTrustedIpsProjectsDeploymentType;
};

export const UpdateProjectTrustedIpsDeploymentType = {
  All: "all",
  AllExceptCustomDomains: "all_except_custom_domains",
  Preview: "preview",
  ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
  Production: "production",
} as const;
export type UpdateProjectTrustedIpsDeploymentType = ClosedEnum<
  typeof UpdateProjectTrustedIpsDeploymentType
>;

export type UpdateProjectTrustedIpsAddresses = {
  value: string;
  note?: string | undefined;
};

export const UpdateProjectTrustedIpsProtectionMode = {
  Additional: "additional",
  Exclusive: "exclusive",
} as const;
export type UpdateProjectTrustedIpsProtectionMode = ClosedEnum<
  typeof UpdateProjectTrustedIpsProtectionMode
>;

export type UpdateProjectTrustedIps1 = {
  deploymentType: UpdateProjectTrustedIpsDeploymentType;
  addresses: Array<UpdateProjectTrustedIpsAddresses>;
  protectionMode: UpdateProjectTrustedIpsProtectionMode;
};

export type UpdateProjectProjectsTrustedIps =
  | UpdateProjectTrustedIps1
  | UpdateProjectTrustedIps2;

export const UpdateProjectFromProjectsResponsePreset = {
  AllCustom: "all-custom",
} as const;
export type UpdateProjectFromProjectsResponsePreset = ClosedEnum<
  typeof UpdateProjectFromProjectsResponsePreset
>;

/**
 * The source envs on the trusted project that are allowed to access `to`.
 */
export type UpdateProjectFrom2 = {
  /**
   * System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
   */
  slugs?: Array<string> | undefined;
  preset: UpdateProjectFromProjectsResponsePreset;
};

export const UpdateProjectFromProjectsPreset = {
  AllCustom: "all-custom",
} as const;
export type UpdateProjectFromProjectsPreset = ClosedEnum<
  typeof UpdateProjectFromProjectsPreset
>;

/**
 * The source envs on the trusted project that are allowed to access `to`.
 */
export type UpdateProjectFrom1 = {
  /**
   * System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
   */
  slugs: Array<string>;
  preset?: UpdateProjectFromProjectsPreset | undefined;
};

export type UpdateProjectFrom = UpdateProjectFrom1 | UpdateProjectFrom2;

export const UpdateProjectToProjectsResponse200ApplicationJSONResponseBodyPreset =
  {
    AllCustom: "all-custom",
  } as const;
export type UpdateProjectToProjectsResponse200ApplicationJSONResponseBodyPreset =
  ClosedEnum<
    typeof UpdateProjectToProjectsResponse200ApplicationJSONResponseBodyPreset
  >;

/**
 * The target envs on the current project that may be accessed.
 */
export type UpdateProjectToProjectsResponse2 = {
  /**
   * System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
   */
  slugs?: Array<string> | undefined;
  preset: UpdateProjectToProjectsResponse200ApplicationJSONResponseBodyPreset;
};

export const UpdateProjectToProjectsResponse200ApplicationJSONPreset = {
  AllCustom: "all-custom",
} as const;
export type UpdateProjectToProjectsResponse200ApplicationJSONPreset =
  ClosedEnum<typeof UpdateProjectToProjectsResponse200ApplicationJSONPreset>;

/**
 * The target envs on the current project that may be accessed.
 */
export type UpdateProjectToProjectsResponse1 = {
  /**
   * System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
   */
  slugs: Array<string>;
  preset?: UpdateProjectToProjectsResponse200ApplicationJSONPreset | undefined;
};

export type UpdateProjectProjectsResponseTo =
  | UpdateProjectToProjectsResponse1
  | UpdateProjectToProjectsResponse2;

/**
 * Optional overrides for the default same-env-by-slug matching. Provide explicit rules to allow cross-env access or presets.
 */
export type UpdateProjectCustomAllow = {
  from: UpdateProjectFrom1 | UpdateProjectFrom2;
  to: UpdateProjectToProjectsResponse1 | UpdateProjectToProjectsResponse2;
};

export type UpdateProjectProjectsProjects = {
  label?: string | undefined;
  /**
   * Optional overrides for the default same-env-by-slug matching. Provide explicit rules to allow cross-env access or presets.
   */
  customAllow?: Array<UpdateProjectCustomAllow> | undefined;
};

export const UpdateProjectToProjectsResponse200Preset = {
  AllCustom: "all-custom",
} as const;
export type UpdateProjectToProjectsResponse200Preset = ClosedEnum<
  typeof UpdateProjectToProjectsResponse200Preset
>;

/**
 * The target envs on the current project that may be accessed.
 */
export type UpdateProjectToProjects2 = {
  /**
   * System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
   */
  slugs?: Array<string> | undefined;
  preset: UpdateProjectToProjectsResponse200Preset;
};

export const UpdateProjectToProjectsResponsePreset = {
  AllCustom: "all-custom",
} as const;
export type UpdateProjectToProjectsResponsePreset = ClosedEnum<
  typeof UpdateProjectToProjectsResponsePreset
>;

/**
 * The target envs on the current project that may be accessed.
 */
export type UpdateProjectToProjects1 = {
  /**
   * System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
   */
  slugs: Array<string>;
  preset?: UpdateProjectToProjectsResponsePreset | undefined;
};

export type UpdateProjectProjectsTo =
  | UpdateProjectToProjects1
  | UpdateProjectToProjects2;

export type UpdateProjectOidcProviders = {
  to: UpdateProjectToProjects1 | UpdateProjectToProjects2;
  label?: string | undefined;
  claims: { [k: string]: Array<string> };
};

export type UpdateProjectTrustedSources = {
  /**
   * Allow same-team Vercel CI access to preview deployments built from the CI run's repository, using the deployment source rather than the current project repository link. Defaults to enabled when not stored; omitted or null Trusted Sources updates preserve the stored value.
   */
  enableVercelCiSameRepository?: boolean | undefined;
  projects?: { [k: string]: UpdateProjectProjectsProjects } | undefined;
  oidcProviders?:
    | { [k: string]: Array<UpdateProjectOidcProviders> }
    | undefined;
};

export type UpdateProjectGitComments = {
  /**
   * Whether the Vercel bot should comment on PRs
   */
  onPullRequest: boolean;
  /**
   * Whether the Vercel bot should comment on commits
   */
  onCommit: boolean;
};

/**
 * Whether the Vercel bot should automatically create GitHub deployments https://docs.github.com/en/rest/deployments/deployments#about-deployments NOTE: repository-dispatch events should be used instead
 */
export const UpdateProjectCreateDeployments = {
  Disabled: "disabled",
  Enabled: "enabled",
} as const;
/**
 * Whether the Vercel bot should automatically create GitHub deployments https://docs.github.com/en/rest/deployments/deployments#about-deployments NOTE: repository-dispatch events should be used instead
 */
export type UpdateProjectCreateDeployments = ClosedEnum<
  typeof UpdateProjectCreateDeployments
>;

/**
 * Configuration for consolidated git commit status reporting. When enabled, Vercel will post a single consolidated commit status instead of individual statuses for each deployment.
 */
export type UpdateProjectConsolidatedGitCommitStatus = {
  /**
   * Whether consolidated commit status is enabled.
   */
  enabled: boolean;
  /**
   * Whether to propagate individual deployment failures to the consolidated status.
   */
  propagateFailures: boolean;
};

export type UpdateProjectGitProviderOptions = {
  /**
   * Whether the Vercel bot should automatically create GitHub deployments https://docs.github.com/en/rest/deployments/deployments#about-deployments NOTE: repository-dispatch events should be used instead
   */
  createDeployments: UpdateProjectCreateDeployments;
  /**
   * Whether the Vercel bot should not automatically create GitHub repository-dispatch events on deployment events. https://vercel.com/docs/git/vercel-for-github#repository-dispatch-events - `true`: disable repository-dispatch events for this project (explicit override of the team setting). - `false`: enable repository-dispatch events for this project (explicit override of the team setting). - absent: inherit from `team.disableRepositoryDispatchEvents`.
   */
  disableRepositoryDispatchEvents?: boolean | undefined;
  /**
   * Whether the project requires commits to be signed & verified before deployments will be created. - `true`: require verified commits for this project (explicit override of the team setting). - `false`: do not require verified commits (explicit override of the team setting). - absent: inherit from `team.requireVerifiedCommits`.
   */
  requireVerifiedCommits?: boolean | undefined;
  /**
   * Whether Vercel should post commit statuses for this project. When omitted, commit statuses remain enabled.
   */
  gitCommitStatus?: boolean | undefined;
  /**
   * Configuration for consolidated git commit status reporting. When enabled, Vercel will post a single consolidated commit status instead of individual statuses for each deployment.
   */
  consolidatedGitCommitStatus?:
    | UpdateProjectConsolidatedGitCommitStatus
    | undefined;
};

export type UpdateProjectWebAnalytics = {
  id: string;
  disabledAt?: number | undefined;
  canceledAt?: number | undefined;
  enabledAt?: number | undefined;
  hasData?: true | undefined;
};

export const UpdateProjectProjectsResponseAction = {
  Allow: "allow",
  Bypass: "bypass",
  Challenge: "challenge",
  Deny: "deny",
  Log: "log",
  RateLimit: "rate_limit",
  Redirect: "redirect",
} as const;
export type UpdateProjectProjectsResponseAction = ClosedEnum<
  typeof UpdateProjectProjectsResponseAction
>;

export const UpdateProjectAlgo = {
  FixedWindow: "fixed_window",
  TokenBucket: "token_bucket",
} as const;
export type UpdateProjectAlgo = ClosedEnum<typeof UpdateProjectAlgo>;

export type UpdateProjectRateLimit = {
  algo: UpdateProjectAlgo;
  window: number;
  limit: number;
  keys: Array<string>;
};

export type UpdateProjectRedirect = {
  location: string;
  permanent: boolean;
};

export const UpdateProjectLogHeadersProjects2 = {
  Wildcard: "*",
} as const;
export type UpdateProjectLogHeadersProjects2 = ClosedEnum<
  typeof UpdateProjectLogHeadersProjects2
>;

export type UpdateProjectProjectsLogHeaders =
  | Array<string>
  | UpdateProjectLogHeadersProjects2;

export type UpdateProjectRulesets = {
  action: UpdateProjectProjectsResponseAction;
  rateLimit?: UpdateProjectRateLimit | null | undefined;
  redirect?: UpdateProjectRedirect | null | undefined;
  actionDuration?: string | null | undefined;
  bypassSystem?: boolean | null | undefined;
  logHeaders?: Array<string> | UpdateProjectLogHeadersProjects2 | undefined;
};

export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesVercelRulesetAction =
  {
    Challenge: "challenge",
    Deny: "deny",
    Log: "log",
  } as const;
export type UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesVercelRulesetAction =
  ClosedEnum<
    typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesVercelRulesetAction
  >;

export type UpdateProjectVercelRuleset = {
  active: boolean;
  action?:
    | UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesVercelRulesetAction
    | undefined;
};

export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesTrafficSourcesAction =
  {
    Challenge: "challenge",
    Deny: "deny",
    Log: "log",
  } as const;
export type UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesTrafficSourcesAction =
  ClosedEnum<
    typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesTrafficSourcesAction
  >;

export type UpdateProjectTrafficSources = {
  active: boolean;
  action?:
    | UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesTrafficSourcesAction
    | undefined;
};

/** @internal */
export const UpdateProjectBranchMatcher$inboundSchema: z.ZodType<
  UpdateProjectBranchMatcher,
  z.ZodTypeDef,
  unknown
> = z.object({
  type:
    UpdateProjectProjectsResponse200ApplicationJSONResponseBodyCustomEnvironmentsType$inboundSchema,
  pattern: types.string(),
});

export function updateProjectBranchMatcherFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectBranchMatcher, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectBranchMatcher$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectBranchMatcher' from JSON`,
  );
}

/** @internal */
export const UpdateProjectVerification$inboundSchema: z.ZodType<
  UpdateProjectVerification,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.string(),
  domain: types.string(),
  value: types.string(),
  reason: types.string(),
});

export function updateProjectVerificationFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectVerification, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectVerification$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectVerification' from JSON`,
  );
}

/** @internal */
export const UpdateProjectDomains$inboundSchema: z.ZodType<
  UpdateProjectDomains,
  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(() => UpdateProjectVerification$inboundSchema)),
  ),
});

export function updateProjectDomainsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectDomains, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectDomains$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectDomains' from JSON`,
  );
}

/** @internal */
export const UpdateProjectCustomEnvironments$inboundSchema: z.ZodType<
  UpdateProjectCustomEnvironments,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: types.string(),
  slug: types.string(),
  type: UpdateProjectProjectsType$inboundSchema,
  description: types.optional(types.string()),
  branchMatcher: types.optional(
    z.lazy(() => UpdateProjectBranchMatcher$inboundSchema),
  ),
  domains: types.optional(
    z.array(z.lazy(() => UpdateProjectDomains$inboundSchema)),
  ),
  currentDeploymentAliases: types.optional(z.array(types.string())),
  createdAt: types.number(),
  updatedAt: types.number(),
});

export function updateProjectCustomEnvironmentsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectCustomEnvironments, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectCustomEnvironments$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectCustomEnvironments' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsFramework$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectProjectsFramework
> = z.nativeEnum(UpdateProjectProjectsFramework);

/** @internal */
export const UpdateProjectServiceType$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectServiceType
> = z.nativeEnum(UpdateProjectServiceType);

/** @internal */
export const UpdateProjectProjectsResponseFramework$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectProjectsResponseFramework> = z.nativeEnum(
    UpdateProjectProjectsResponseFramework,
  );

/** @internal */
export const UpdateProjectServices$inboundSchema: z.ZodType<
  UpdateProjectServices,
  z.ZodTypeDef,
  unknown
> = z.object({
  serviceName: types.string(),
  serviceType: types.optional(UpdateProjectServiceType$inboundSchema),
  framework: types.optional(
    UpdateProjectProjectsResponseFramework$inboundSchema,
  ),
  runtime: types.optional(types.string()),
});

export function updateProjectServicesFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectServices, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectServices$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectServices' from JSON`,
  );
}

/** @internal */
export const UpdateProjectIpBuckets$inboundSchema: z.ZodType<
  UpdateProjectIpBuckets,
  z.ZodTypeDef,
  unknown
> = z.object({
  bucket: types.string(),
  default: types.optional(types.boolean()),
  supportUntil: types.optional(types.number()),
});

export function updateProjectIpBucketsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectIpBuckets, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectIpBuckets$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectIpBuckets' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLint$inboundSchema: z.ZodType<
  UpdateProjectLint,
  z.ZodTypeDef,
  unknown
> = z.object({
  targets: z.array(types.string()),
});

export function updateProjectLintFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectLint, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectLint$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLint' from JSON`,
  );
}

/** @internal */
export const UpdateProjectTypecheck$inboundSchema: z.ZodType<
  UpdateProjectTypecheck,
  z.ZodTypeDef,
  unknown
> = z.object({
  targets: z.array(types.string()),
});

export function updateProjectTypecheckFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectTypecheck, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectTypecheck$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectTypecheck' from JSON`,
  );
}

/** @internal */
export const UpdateProjectMfeConfigPresent$inboundSchema: z.ZodType<
  UpdateProjectMfeConfigPresent,
  z.ZodTypeDef,
  unknown
> = z.object({
  targets: z.array(types.string()),
});

export function updateProjectMfeConfigPresentFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectMfeConfigPresent, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectMfeConfigPresent$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectMfeConfigPresent' from JSON`,
  );
}

/** @internal */
export const UpdateProjectJobs$inboundSchema: z.ZodType<
  UpdateProjectJobs,
  z.ZodTypeDef,
  unknown
> = z.object({
  lint: types.optional(z.lazy(() => UpdateProjectLint$inboundSchema)),
  typecheck: types.optional(z.lazy(() => UpdateProjectTypecheck$inboundSchema)),
  "mfe-config-present": types.optional(
    z.lazy(() => UpdateProjectMfeConfigPresent$inboundSchema),
  ),
}).transform((v) => {
  return remap$(v, {
    "mfe-config-present": "mfeConfigPresent",
  });
});

export function updateProjectJobsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectJobs, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectJobs$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectJobs' from JSON`,
  );
}

/** @internal */
export const UpdateProjectAliasAssigned$inboundSchema: z.ZodType<
  UpdateProjectAliasAssigned,
  z.ZodTypeDef,
  unknown
> = smartUnion([types.number(), types.boolean()]);

export function updateProjectAliasAssignedFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectAliasAssigned, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectAliasAssigned$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectAliasAssigned' from JSON`,
  );
}

/** @internal */
export const UpdateProjectAliasError$inboundSchema: z.ZodType<
  UpdateProjectAliasError,
  z.ZodTypeDef,
  unknown
> = z.object({
  code: types.string(),
  message: types.string(),
});

export function updateProjectAliasErrorFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectAliasError, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectAliasError$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectAliasError' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType$inboundSchema:
  z.ZodNativeEnum<
    typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType
  > = z.nativeEnum(
    UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType,
  );

/** @internal */
export const UpdateProjectProjectsBranchMatcher$inboundSchema: z.ZodType<
  UpdateProjectProjectsBranchMatcher,
  z.ZodTypeDef,
  unknown
> = z.object({
  type:
    UpdateProjectProjectsResponse200ApplicationJSONResponseBodyType$inboundSchema,
  pattern: types.string(),
});

export function updateProjectProjectsBranchMatcherFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsBranchMatcher, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectProjectsBranchMatcher$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsBranchMatcher' from JSON`,
  );
}

/** @internal */
export const UpdateProjectBuilds$inboundSchema: z.ZodType<
  UpdateProjectBuilds,
  z.ZodTypeDef,
  unknown
> = z.object({
  use: types.string(),
  src: types.optional(types.string()),
  dest: types.optional(types.string()),
});

export function updateProjectBuildsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectBuilds, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectBuilds$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectBuilds' from JSON`,
  );
}

/** @internal */
export const UpdateProjectChecksConclusion$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectChecksConclusion
> = z.nativeEnum(UpdateProjectChecksConclusion);

/** @internal */
export const UpdateProjectChecksState$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectChecksState
> = z.nativeEnum(UpdateProjectChecksState);

/** @internal */
export const UpdateProjectProjectsCreator$inboundSchema: z.ZodType<
  UpdateProjectProjectsCreator,
  z.ZodTypeDef,
  unknown
> = z.object({
  email: types.string(),
  githubLogin: types.optional(types.string()),
  gitlabLogin: types.optional(types.string()),
  uid: types.string(),
  username: types.string(),
});

export function updateProjectProjectsCreatorFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsCreator, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectProjectsCreator$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsCreator' from JSON`,
  );
}

/** @internal */
export const UpdateProjectOidcTokenClaims$inboundSchema: z.ZodType<
  UpdateProjectOidcTokenClaims,
  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 updateProjectOidcTokenClaimsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectOidcTokenClaims, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectOidcTokenClaims$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectOidcTokenClaims' from JSON`,
  );
}

/** @internal */
export const UpdateProjectPlan$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectPlan
> = z.nativeEnum(UpdateProjectPlan);

/** @internal */
export const UpdateProjectReadyState$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectReadyState
> = z.nativeEnum(UpdateProjectReadyState);

/** @internal */
export const UpdateProjectReadySubstate$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectReadySubstate
> = z.nativeEnum(UpdateProjectReadySubstate);

/** @internal */
export const UpdateProjectProjectsResponseType$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectProjectsResponseType
> = z.nativeEnum(UpdateProjectProjectsResponseType);

/** @internal */
export const UpdateProjectLatestDeployments$inboundSchema: z.ZodType<
  UpdateProjectLatestDeployments,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: types.string(),
  alias: types.optional(z.array(types.string())),
  aliasAssigned: z.nullable(smartUnion([types.number(), types.boolean()]))
    .optional(),
  aliasError: z.nullable(z.lazy(() => UpdateProjectAliasError$inboundSchema))
    .optional(),
  aliasFinal: z.nullable(types.string()).optional(),
  automaticAliases: types.optional(z.array(types.string())),
  branchMatcher: types.optional(
    z.lazy(() => UpdateProjectProjectsBranchMatcher$inboundSchema),
  ),
  buildingAt: types.optional(types.number()),
  builds: types.optional(
    z.array(z.lazy(() => UpdateProjectBuilds$inboundSchema)),
  ),
  checksConclusion: types.optional(UpdateProjectChecksConclusion$inboundSchema),
  checksState: types.optional(UpdateProjectChecksState$inboundSchema),
  connectBuildsEnabled: types.optional(types.boolean()),
  connectConfigurationId: types.optional(types.string()),
  createdAt: types.number(),
  createdIn: types.string(),
  creator: types.nullable(
    z.lazy(() => UpdateProjectProjectsCreator$inboundSchema),
  ),
  deletedAt: types.optional(types.number()),
  deploymentHostname: types.string(),
  forced: types.optional(types.boolean()),
  name: types.string(),
  meta: types.optional(z.record(types.string())),
  monorepoManager: z.nullable(types.string()).optional(),
  oidcTokenClaims: types.optional(
    z.lazy(() => UpdateProjectOidcTokenClaims$inboundSchema),
  ),
  plan: UpdateProjectPlan$inboundSchema,
  previewCommentsEnabled: types.optional(types.boolean()),
  private: types.boolean(),
  readyAt: types.optional(types.number()),
  readyState: UpdateProjectReadyState$inboundSchema,
  readySubstate: types.optional(UpdateProjectReadySubstate$inboundSchema),
  requestedAt: types.optional(types.number()),
  target: z.nullable(types.string()).optional(),
  teamId: z.nullable(types.string()).optional(),
  type: UpdateProjectProjectsResponseType$inboundSchema,
  url: types.string(),
  userId: types.optional(types.string()),
  withCache: types.optional(types.boolean()),
});

export function updateProjectLatestDeploymentsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectLatestDeployments, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectLatestDeployments$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLatestDeployments' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooks$inboundSchema:
  z.ZodType<
    UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooks,
    z.ZodTypeDef,
    unknown
  > = z.object({
    createdAt: types.optional(types.number()),
    id: types.string(),
    name: types.string(),
    ref: types.string(),
    url: types.string(),
  });

export function updateProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooksFromJSON(
  jsonString: string,
): SafeParseResult<
  UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooks,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooks$inboundSchema
        .parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooks' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLink8$inboundSchema: z.ZodType<
  UpdateProjectLink8,
  z.ZodTypeDef,
  unknown
> = z.object({
  owner: types.string(),
  repo: types.string(),
  repoId: types.string(),
  ownerId: types.string(),
  type: types.literal("cursor-origin"),
  createdAt: types.optional(types.number()),
  deployHooks: z.array(
    z.lazy(() =>
      UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooks$inboundSchema
    ),
  ),
  gitCredentialId: types.string(),
  updatedAt: types.optional(types.number()),
  sourceless: types.optional(types.boolean()),
  productionBranch: types.string(),
});

export function updateProjectLink8FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectLink8, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectLink8$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLink8' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooks$inboundSchema:
  z.ZodType<
    UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooks,
    z.ZodTypeDef,
    unknown
  > = z.object({
    createdAt: types.optional(types.number()),
    id: types.string(),
    name: types.string(),
    ref: types.string(),
    url: types.string(),
  });

export function updateProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooksFromJSON(
  jsonString: string,
): SafeParseResult<
  UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooks,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooks$inboundSchema
        .parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooks' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLink7$inboundSchema: z.ZodType<
  UpdateProjectLink7,
  z.ZodTypeDef,
  unknown
> = z.object({
  org: types.string(),
  repo: types.string(),
  repoId: types.string(),
  type: types.literal("v0"),
  createdAt: types.optional(types.number()),
  deployHooks: z.array(
    z.lazy(() =>
      UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooks$inboundSchema
    ),
  ),
  gitCredentialId: types.string(),
  updatedAt: types.optional(types.number()),
  sourceless: types.optional(types.boolean()),
  productionBranch: types.string(),
});

export function updateProjectLink7FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectLink7, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectLink7$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLink7' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooks$inboundSchema:
  z.ZodType<
    UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooks,
    z.ZodTypeDef,
    unknown
  > = z.object({
    createdAt: types.optional(types.number()),
    id: types.string(),
    name: types.string(),
    ref: types.string(),
    url: types.string(),
  });

export function updateProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooksFromJSON(
  jsonString: string,
): SafeParseResult<
  UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooks,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooks$inboundSchema
        .parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooks' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLink6$inboundSchema: z.ZodType<
  UpdateProjectLink6,
  z.ZodTypeDef,
  unknown
> = z.object({
  org: types.string(),
  repo: types.string(),
  repoId: types.string(),
  type: types.literal("vercel"),
  createdAt: types.optional(types.number()),
  deployHooks: z.array(
    z.lazy(() =>
      UpdateProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooks$inboundSchema
    ),
  ),
  gitCredentialId: types.string(),
  updatedAt: types.optional(types.number()),
  sourceless: types.optional(types.boolean()),
  productionBranch: types.string(),
});

export function updateProjectLink6FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectLink6, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectLink6$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLink6' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLinkProjectsResponse200ApplicationJSONDeployHooks$inboundSchema:
  z.ZodType<
    UpdateProjectLinkProjectsResponse200ApplicationJSONDeployHooks,
    z.ZodTypeDef,
    unknown
  > = z.object({
    createdAt: types.optional(types.number()),
    id: types.string(),
    name: types.string(),
    ref: types.string(),
    url: types.string(),
  });

export function updateProjectLinkProjectsResponse200ApplicationJSONDeployHooksFromJSON(
  jsonString: string,
): SafeParseResult<
  UpdateProjectLinkProjectsResponse200ApplicationJSONDeployHooks,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectLinkProjectsResponse200ApplicationJSONDeployHooks$inboundSchema
        .parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLinkProjectsResponse200ApplicationJSONDeployHooks' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLink5$inboundSchema: z.ZodType<
  UpdateProjectLink5,
  z.ZodTypeDef,
  unknown
> = z.object({
  name: types.string(),
  slug: types.string(),
  owner: types.string(),
  type: types.literal("bitbucket"),
  uuid: types.string(),
  workspaceUuid: types.string(),
  createdAt: types.optional(types.number()),
  deployHooks: z.array(
    z.lazy(() =>
      UpdateProjectLinkProjectsResponse200ApplicationJSONDeployHooks$inboundSchema
    ),
  ),
  gitCredentialId: types.string(),
  updatedAt: types.optional(types.number()),
  sourceless: types.optional(types.boolean()),
  productionBranch: types.string(),
});

export function updateProjectLink5FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectLink5, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectLink5$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLink5' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLinkProjectsResponse200DeployHooks$inboundSchema:
  z.ZodType<
    UpdateProjectLinkProjectsResponse200DeployHooks,
    z.ZodTypeDef,
    unknown
  > = z.object({
    createdAt: types.optional(types.number()),
    id: types.string(),
    name: types.string(),
    ref: types.string(),
    url: types.string(),
  });

export function updateProjectLinkProjectsResponse200DeployHooksFromJSON(
  jsonString: string,
): SafeParseResult<
  UpdateProjectLinkProjectsResponse200DeployHooks,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectLinkProjectsResponse200DeployHooks$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'UpdateProjectLinkProjectsResponse200DeployHooks' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLink4$inboundSchema: z.ZodType<
  UpdateProjectLink4,
  z.ZodTypeDef,
  unknown
> = z.object({
  projectId: types.string(),
  projectName: types.string(),
  projectNameWithNamespace: types.string(),
  projectNamespace: types.string(),
  projectOwnerId: types.optional(types.number()),
  projectUrl: types.string(),
  type: types.literal("gitlab"),
  createdAt: types.optional(types.number()),
  deployHooks: z.array(
    z.lazy(() => UpdateProjectLinkProjectsResponse200DeployHooks$inboundSchema),
  ),
  gitCredentialId: types.string(),
  updatedAt: types.optional(types.number()),
  sourceless: types.optional(types.boolean()),
  productionBranch: types.string(),
});

export function updateProjectLink4FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectLink4, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectLink4$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLink4' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLinkProjectsResponseDeployHooks$inboundSchema:
  z.ZodType<
    UpdateProjectLinkProjectsResponseDeployHooks,
    z.ZodTypeDef,
    unknown
  > = z.object({
    createdAt: types.optional(types.number()),
    id: types.string(),
    name: types.string(),
    ref: types.string(),
    url: types.string(),
  });

export function updateProjectLinkProjectsResponseDeployHooksFromJSON(
  jsonString: string,
): SafeParseResult<
  UpdateProjectLinkProjectsResponseDeployHooks,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectLinkProjectsResponseDeployHooks$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'UpdateProjectLinkProjectsResponseDeployHooks' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLink3$inboundSchema: z.ZodType<
  UpdateProjectLink3,
  z.ZodTypeDef,
  unknown
> = z.object({
  org: types.string(),
  repoOwnerId: types.optional(types.number()),
  repo: types.optional(types.string()),
  repoId: types.optional(types.number()),
  type: types.literal("github-custom-host"),
  host: types.string(),
  createdAt: types.optional(types.number()),
  deployHooks: z.array(
    z.lazy(() => UpdateProjectLinkProjectsResponseDeployHooks$inboundSchema),
  ),
  gitCredentialId: types.string(),
  updatedAt: types.optional(types.number()),
  sourceless: types.optional(types.boolean()),
  productionBranch: types.string(),
});

export function updateProjectLink3FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectLink3, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectLink3$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLink3' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLinkProjectsDeployHooks$inboundSchema: z.ZodType<
  UpdateProjectLinkProjectsDeployHooks,
  z.ZodTypeDef,
  unknown
> = z.object({
  createdAt: types.optional(types.number()),
  id: types.string(),
  name: types.string(),
  ref: types.string(),
  url: types.string(),
});

export function updateProjectLinkProjectsDeployHooksFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectLinkProjectsDeployHooks, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectLinkProjectsDeployHooks$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLinkProjectsDeployHooks' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLink2$inboundSchema: z.ZodType<
  UpdateProjectLink2,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("github-limited"),
  repo: types.optional(types.string()),
  repoId: types.optional(types.number()),
  createdAt: types.optional(types.number()),
  updatedAt: types.optional(types.number()),
  org: types.string(),
  repoOwnerId: types.optional(types.number()),
  deployHooks: z.array(
    z.lazy(() => UpdateProjectLinkProjectsDeployHooks$inboundSchema),
  ),
  gitCredentialId: types.string(),
  sourceless: types.optional(types.boolean()),
  productionBranch: types.string(),
});

export function updateProjectLink2FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectLink2, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectLink2$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLink2' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLinkDeployHooks$inboundSchema: z.ZodType<
  UpdateProjectLinkDeployHooks,
  z.ZodTypeDef,
  unknown
> = z.object({
  createdAt: types.optional(types.number()),
  id: types.string(),
  name: types.string(),
  ref: types.string(),
  url: types.string(),
});

export function updateProjectLinkDeployHooksFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectLinkDeployHooks, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectLinkDeployHooks$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLinkDeployHooks' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLink1$inboundSchema: z.ZodType<
  UpdateProjectLink1,
  z.ZodTypeDef,
  unknown
> = z.object({
  org: types.string(),
  repoOwnerId: types.optional(types.number()),
  repo: types.optional(types.string()),
  repoId: types.optional(types.number()),
  type: types.literal("github"),
  createdAt: types.optional(types.number()),
  deployHooks: z.array(
    z.lazy(() => UpdateProjectLinkDeployHooks$inboundSchema),
  ),
  gitCredentialId: types.string(),
  updatedAt: types.optional(types.number()),
  sourceless: types.optional(types.boolean()),
  productionBranch: types.string(),
});

export function updateProjectLink1FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectLink1, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectLink1$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLink1' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLink$inboundSchema: z.ZodType<
  UpdateProjectLink,
  z.ZodTypeDef,
  unknown
> = z.union([
  z.lazy(() => UpdateProjectLink1$inboundSchema),
  z.lazy(() => UpdateProjectLink2$inboundSchema),
  z.lazy(() => UpdateProjectLink3$inboundSchema),
  z.lazy(() => UpdateProjectLink4$inboundSchema),
  z.lazy(() => UpdateProjectLink5$inboundSchema),
  z.lazy(() => UpdateProjectLink6$inboundSchema),
  z.lazy(() => UpdateProjectLink7$inboundSchema),
  z.lazy(() => UpdateProjectLink8$inboundSchema),
]);

export function updateProjectLinkFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectLink, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectLink$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLink' from JSON`,
  );
}

/** @internal */
export const UpdateProjectBlobs$inboundSchema: z.ZodType<
  UpdateProjectBlobs,
  z.ZodTypeDef,
  unknown
> = z.object({
  isDefaultApp: types.optional(types.boolean()),
});

export function updateProjectBlobsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectBlobs, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectBlobs$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectBlobs' from JSON`,
  );
}

/** @internal */
export const UpdateProjectMicrofrontends3$inboundSchema: z.ZodType<
  UpdateProjectMicrofrontends3,
  z.ZodTypeDef,
  unknown
> = z.object({
  updatedAt: types.number(),
  groupIds: z.array(z.any()),
  enabled: types.literal(false),
  freeProjectForLegacyLimits: types.optional(types.boolean()),
});

export function updateProjectMicrofrontends3FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectMicrofrontends3, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectMicrofrontends3$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectMicrofrontends3' from JSON`,
  );
}

/** @internal */
export const UpdateProjectMicrofrontends2$inboundSchema: z.ZodType<
  UpdateProjectMicrofrontends2,
  z.ZodTypeDef,
  unknown
> = z.object({
  isDefaultApp: types.optional(types.literal(false)),
  routeObservabilityToThisProject: types.optional(types.boolean()),
  doNotRouteWithMicrofrontendsRouting: types.optional(types.boolean()),
  updatedAt: types.number(),
  groupIds: z.array(types.string()),
  enabled: types.literal(true),
  defaultRoute: types.optional(types.string()),
  freeProjectForLegacyLimits: types.optional(types.boolean()),
});

export function updateProjectMicrofrontends2FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectMicrofrontends2, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectMicrofrontends2$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectMicrofrontends2' from JSON`,
  );
}

/** @internal */
export const UpdateProjectMicrofrontends1$inboundSchema: z.ZodType<
  UpdateProjectMicrofrontends1,
  z.ZodTypeDef,
  unknown
> = z.object({
  isDefaultApp: types.literal(true),
  updatedAt: types.number(),
  groupIds: z.array(types.string()),
  enabled: types.literal(true),
  defaultRoute: types.optional(types.string()),
  freeProjectForLegacyLimits: types.optional(types.boolean()),
});

export function updateProjectMicrofrontends1FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectMicrofrontends1, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectMicrofrontends1$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectMicrofrontends1' from JSON`,
  );
}

/** @internal */
export const UpdateProjectMicrofrontends$inboundSchema: z.ZodType<
  UpdateProjectMicrofrontends,
  z.ZodTypeDef,
  unknown
> = smartUnion([
  z.lazy(() => UpdateProjectMicrofrontends1$inboundSchema),
  z.lazy(() => UpdateProjectMicrofrontends2$inboundSchema),
  z.lazy(() => UpdateProjectMicrofrontends3$inboundSchema),
]);

export function updateProjectMicrofrontendsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectMicrofrontends, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectMicrofrontends$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectMicrofrontends' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsNodeVersion$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectProjectsNodeVersion
> = z.nativeEnum(UpdateProjectProjectsNodeVersion);

/** @internal */
export const UpdateProjectProjectsPaths$inboundSchema: z.ZodType<
  UpdateProjectProjectsPaths,
  z.ZodTypeDef,
  unknown
> = z.object({
  value: types.string(),
});

export function updateProjectProjectsPathsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsPaths, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectProjectsPaths$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsPaths' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsOptionsAllowlist$inboundSchema: z.ZodType<
  UpdateProjectProjectsOptionsAllowlist,
  z.ZodTypeDef,
  unknown
> = z.object({
  paths: z.array(z.lazy(() => UpdateProjectProjectsPaths$inboundSchema)),
});

export function updateProjectProjectsOptionsAllowlistFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsOptionsAllowlist, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectProjectsOptionsAllowlist$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsOptionsAllowlist' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsPasswordProtection$inboundSchema: z.ZodType<
  UpdateProjectProjectsPasswordProtection,
  z.ZodTypeDef,
  unknown
> = z.object({});

export function updateProjectProjectsPasswordProtectionFromJSON(
  jsonString: string,
): SafeParseResult<
  UpdateProjectProjectsPasswordProtection,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectProjectsPasswordProtection$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'UpdateProjectProjectsPasswordProtection' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsResponseDeploymentType$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectProjectsResponseDeploymentType> = z
    .nativeEnum(UpdateProjectProjectsResponseDeploymentType);

/** @internal */
export const UpdateProjectProjectsPassport$inboundSchema: z.ZodType<
  UpdateProjectProjectsPassport,
  z.ZodTypeDef,
  unknown
> = z.object({
  deploymentType: UpdateProjectProjectsResponseDeploymentType$inboundSchema,
  connectorId: types.string(),
});

export function updateProjectProjectsPassportFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsPassport, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectProjectsPassport$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsPassport' from JSON`,
  );
}

/** @internal */
export const UpdateProjectSandboxUrls$inboundSchema: z.ZodType<
  UpdateProjectSandboxUrls,
  z.ZodTypeDef,
  unknown
> = z.object({
  inheritDeploymentProtection: types.optional(types.boolean()),
});

export function updateProjectSandboxUrlsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectSandboxUrls, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectSandboxUrls$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectSandboxUrls' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProtectionConfig$inboundSchema: z.ZodType<
  UpdateProjectProtectionConfig,
  z.ZodTypeDef,
  unknown
> = z.object({
  sandboxUrls: types.optional(
    z.lazy(() => UpdateProjectSandboxUrls$inboundSchema),
  ),
});

export function updateProjectProtectionConfigFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProtectionConfig, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectProtectionConfig$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProtectionConfig' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsRegion$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectProjectsRegion
> = z.nativeEnum(UpdateProjectProjectsRegion);

/** @internal */
export const UpdateProjectProjectsFailoverRegions$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectProjectsFailoverRegions> = z.nativeEnum(
    UpdateProjectProjectsFailoverRegions,
  );

/** @internal */
export const UpdateProjectProjectsSandbox$inboundSchema: z.ZodType<
  UpdateProjectProjectsSandbox,
  z.ZodTypeDef,
  unknown
> = z.object({
  region: types.optional(UpdateProjectProjectsRegion$inboundSchema),
  failoverRegions: types.optional(
    z.array(UpdateProjectProjectsFailoverRegions$inboundSchema),
  ),
});

export function updateProjectProjectsSandboxFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsSandbox, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectProjectsSandbox$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsSandbox' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsFunctionDefaultMemoryType$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectProjectsFunctionDefaultMemoryType> = z
    .nativeEnum(UpdateProjectProjectsFunctionDefaultMemoryType);

/** @internal */
export const UpdateProjectProjectsBuildMachineType$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectProjectsBuildMachineType> = z.nativeEnum(
    UpdateProjectProjectsBuildMachineType,
  );

/** @internal */
export const UpdateProjectProjectsBuildMachineSelection$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectProjectsBuildMachineSelection> = z
    .nativeEnum(UpdateProjectProjectsBuildMachineSelection);

/** @internal */
export const UpdateProjectProjectsBuildMachineElasticReason$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectProjectsBuildMachineElasticReason> = z
    .nativeEnum(UpdateProjectProjectsBuildMachineElasticReason);

/** @internal */
export const UpdateProjectProjectsConfiguration$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectProjectsConfiguration
> = z.nativeEnum(UpdateProjectProjectsConfiguration);

/** @internal */
export const UpdateProjectProjectsBuildQueue$inboundSchema: z.ZodType<
  UpdateProjectProjectsBuildQueue,
  z.ZodTypeDef,
  unknown
> = z.object({
  configuration: types.optional(
    UpdateProjectProjectsConfiguration$inboundSchema,
  ),
});

export function updateProjectProjectsBuildQueueFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsBuildQueue, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectProjectsBuildQueue$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsBuildQueue' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsResourceConfig$inboundSchema: z.ZodType<
  UpdateProjectProjectsResourceConfig,
  z.ZodTypeDef,
  unknown
> = z.object({
  elasticConcurrencyEnabled: types.optional(types.boolean()),
  fluid: types.optional(types.boolean()),
  functionDefaultRegions: z.array(types.string()),
  functionDefaultTimeout: types.optional(types.number()),
  functionDefaultMemoryType: types.optional(
    UpdateProjectProjectsFunctionDefaultMemoryType$inboundSchema,
  ),
  functionZeroConfigFailover: types.optional(types.boolean()),
  buildMachineType: types.optional(
    UpdateProjectProjectsBuildMachineType$inboundSchema,
  ),
  buildMachineSelection: types.optional(
    UpdateProjectProjectsBuildMachineSelection$inboundSchema,
  ),
  buildMachineElasticLastUpdated: types.optional(types.number()),
  buildMachineElasticReason: types.optional(
    UpdateProjectProjectsBuildMachineElasticReason$inboundSchema,
  ),
  isNSNBDisabled: types.optional(types.boolean()),
  buildQueue: types.optional(
    z.lazy(() => UpdateProjectProjectsBuildQueue$inboundSchema),
  ),
  enableFunctionsBeta: types.optional(types.boolean()),
});

export function updateProjectProjectsResourceConfigFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsResourceConfig, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectProjectsResourceConfig$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsResourceConfig' from JSON`,
  );
}

/** @internal */
export const UpdateProjectRollbackDescription$inboundSchema: z.ZodType<
  UpdateProjectRollbackDescription,
  z.ZodTypeDef,
  unknown
> = z.object({
  userId: types.string(),
  username: types.string(),
  description: types.string(),
  createdAt: types.number(),
});

export function updateProjectRollbackDescriptionFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectRollbackDescription, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectRollbackDescription$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectRollbackDescription' from JSON`,
  );
}

/** @internal */
export const UpdateProjectStages$inboundSchema: z.ZodType<
  UpdateProjectStages,
  z.ZodTypeDef,
  unknown
> = z.object({
  targetPercentage: types.number(),
  requireApproval: types.optional(types.boolean()),
  duration: types.optional(types.number()),
  linearShift: types.optional(types.boolean()),
});

export function updateProjectStagesFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectStages, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectStages$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectStages' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType$inboundSchema:
  z.ZodNativeEnum<
    typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType
  > = z.nativeEnum(
    UpdateProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType,
  );

/** @internal */
export const UpdateProjectChecks$inboundSchema: z.ZodType<
  UpdateProjectChecks,
  z.ZodTypeDef,
  unknown
> = z.object({
  type:
    UpdateProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType$inboundSchema,
  minSampleSize: types.optional(types.number()),
  excludeStatusCodes: types.optional(z.array(types.number())),
  excludePaths: types.optional(z.array(types.string())),
  ingestWatermarkSeconds: types.optional(types.number()),
});

export function updateProjectChecksFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectChecks, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectChecks$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectChecks' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAction$inboundSchema:
  z.ZodNativeEnum<
    typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAction
  > = z.nativeEnum(
    UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAction,
  );

/** @internal */
export const UpdateProjectGate$inboundSchema: z.ZodType<
  UpdateProjectGate,
  z.ZodTypeDef,
  unknown
> = z.object({
  enabled: types.boolean(),
  checks: z.array(z.lazy(() => UpdateProjectChecks$inboundSchema)),
  failureThreshold: types.optional(types.number()),
  windowSize: types.optional(types.number()),
  action:
    UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAction$inboundSchema,
  dryRun: types.boolean(),
});

export function updateProjectGateFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectGate, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectGate$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectGate' from JSON`,
  );
}

/** @internal */
export const UpdateProjectRollingRelease$inboundSchema: z.ZodType<
  UpdateProjectRollingRelease,
  z.ZodTypeDef,
  unknown
> = z.object({
  target: types.string(),
  stages: z.nullable(z.array(z.lazy(() => UpdateProjectStages$inboundSchema)))
    .optional(),
  canaryResponseHeader: types.optional(types.boolean()),
  gate: types.optional(z.lazy(() => UpdateProjectGate$inboundSchema)),
});

export function updateProjectRollingReleaseFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectRollingRelease, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectRollingRelease$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectRollingRelease' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsResponseFunctionDefaultMemoryType$inboundSchema:
  z.ZodNativeEnum<
    typeof UpdateProjectProjectsResponseFunctionDefaultMemoryType
  > = z.nativeEnum(UpdateProjectProjectsResponseFunctionDefaultMemoryType);

/** @internal */
export const UpdateProjectProjectsResponseBuildMachineType$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectProjectsResponseBuildMachineType> = z
    .nativeEnum(UpdateProjectProjectsResponseBuildMachineType);

/** @internal */
export const UpdateProjectProjectsResponseBuildMachineSelection$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectProjectsResponseBuildMachineSelection> = z
    .nativeEnum(UpdateProjectProjectsResponseBuildMachineSelection);

/** @internal */
export const UpdateProjectProjectsResponseBuildMachineElasticReason$inboundSchema:
  z.ZodNativeEnum<
    typeof UpdateProjectProjectsResponseBuildMachineElasticReason
  > = z.nativeEnum(UpdateProjectProjectsResponseBuildMachineElasticReason);

/** @internal */
export const UpdateProjectProjectsResponseConfiguration$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectProjectsResponseConfiguration> = z
    .nativeEnum(UpdateProjectProjectsResponseConfiguration);

/** @internal */
export const UpdateProjectProjectsResponseBuildQueue$inboundSchema: z.ZodType<
  UpdateProjectProjectsResponseBuildQueue,
  z.ZodTypeDef,
  unknown
> = z.object({
  configuration: types.optional(
    UpdateProjectProjectsResponseConfiguration$inboundSchema,
  ),
});

export function updateProjectProjectsResponseBuildQueueFromJSON(
  jsonString: string,
): SafeParseResult<
  UpdateProjectProjectsResponseBuildQueue,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectProjectsResponseBuildQueue$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'UpdateProjectProjectsResponseBuildQueue' from JSON`,
  );
}

/** @internal */
export const UpdateProjectDefaultResourceConfig$inboundSchema: z.ZodType<
  UpdateProjectDefaultResourceConfig,
  z.ZodTypeDef,
  unknown
> = z.object({
  elasticConcurrencyEnabled: types.optional(types.boolean()),
  fluid: types.optional(types.boolean()),
  functionDefaultRegions: z.array(types.string()),
  functionDefaultTimeout: types.optional(types.number()),
  functionDefaultMemoryType: types.optional(
    UpdateProjectProjectsResponseFunctionDefaultMemoryType$inboundSchema,
  ),
  functionZeroConfigFailover: types.optional(types.boolean()),
  buildMachineType: types.optional(
    UpdateProjectProjectsResponseBuildMachineType$inboundSchema,
  ),
  buildMachineSelection: types.optional(
    UpdateProjectProjectsResponseBuildMachineSelection$inboundSchema,
  ),
  buildMachineElasticLastUpdated: types.optional(types.number()),
  buildMachineElasticReason: types.optional(
    UpdateProjectProjectsResponseBuildMachineElasticReason$inboundSchema,
  ),
  isNSNBDisabled: types.optional(types.boolean()),
  buildQueue: types.optional(
    z.lazy(() => UpdateProjectProjectsResponseBuildQueue$inboundSchema),
  ),
  enableFunctionsBeta: types.optional(types.boolean()),
});

export function updateProjectDefaultResourceConfigFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectDefaultResourceConfig, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectDefaultResourceConfig$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectDefaultResourceConfig' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsStaticIps$inboundSchema: z.ZodType<
  UpdateProjectProjectsStaticIps,
  z.ZodTypeDef,
  unknown
> = z.object({
  builds: types.boolean(),
  enabled: types.boolean(),
  regions: z.array(types.string()),
});

export function updateProjectProjectsStaticIpsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsStaticIps, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectProjectsStaticIps$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsStaticIps' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsResponse200DeploymentType$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectProjectsResponse200DeploymentType> = z
    .nativeEnum(UpdateProjectProjectsResponse200DeploymentType);

/** @internal */
export const UpdateProjectCve55182MigrationAppliedFrom$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectCve55182MigrationAppliedFrom> = z
    .nativeEnum(UpdateProjectCve55182MigrationAppliedFrom);

/** @internal */
export const UpdateProjectApril2026SecurityIncidentMigrationAppliedFrom$inboundSchema:
  z.ZodNativeEnum<
    typeof UpdateProjectApril2026SecurityIncidentMigrationAppliedFrom
  > = z.nativeEnum(UpdateProjectApril2026SecurityIncidentMigrationAppliedFrom);

/** @internal */
export const UpdateProjectProjectsSsoProtection$inboundSchema: z.ZodType<
  UpdateProjectProjectsSsoProtection,
  z.ZodTypeDef,
  unknown
> = z.object({
  deploymentType: UpdateProjectProjectsResponse200DeploymentType$inboundSchema,
  cve55182MigrationAppliedFrom: z.nullable(
    UpdateProjectCve55182MigrationAppliedFrom$inboundSchema,
  ).optional(),
  april2026SecurityIncidentMigrationAppliedFrom: z.nullable(
    UpdateProjectApril2026SecurityIncidentMigrationAppliedFrom$inboundSchema,
  ).optional(),
});

export function updateProjectProjectsSsoProtectionFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsSsoProtection, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectProjectsSsoProtection$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsSsoProtection' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsAliasAssigned$inboundSchema: z.ZodType<
  UpdateProjectProjectsAliasAssigned,
  z.ZodTypeDef,
  unknown
> = smartUnion([types.number(), types.boolean()]);

export function updateProjectProjectsAliasAssignedFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsAliasAssigned, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectProjectsAliasAssigned$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsAliasAssigned' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsAliasError$inboundSchema: z.ZodType<
  UpdateProjectProjectsAliasError,
  z.ZodTypeDef,
  unknown
> = z.object({
  code: types.string(),
  message: types.string(),
});

export function updateProjectProjectsAliasErrorFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsAliasError, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectProjectsAliasError$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsAliasError' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType$inboundSchema:
  z.ZodNativeEnum<
    typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType
  > = z.nativeEnum(
    UpdateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType,
  );

/** @internal */
export const UpdateProjectProjectsResponseBranchMatcher$inboundSchema:
  z.ZodType<UpdateProjectProjectsResponseBranchMatcher, z.ZodTypeDef, unknown> =
    z.object({
      type:
        UpdateProjectProjectsResponse200ApplicationJSONResponseBodyTargetsType$inboundSchema,
      pattern: types.string(),
    });

export function updateProjectProjectsResponseBranchMatcherFromJSON(
  jsonString: string,
): SafeParseResult<
  UpdateProjectProjectsResponseBranchMatcher,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectProjectsResponseBranchMatcher$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'UpdateProjectProjectsResponseBranchMatcher' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsBuilds$inboundSchema: z.ZodType<
  UpdateProjectProjectsBuilds,
  z.ZodTypeDef,
  unknown
> = z.object({
  use: types.string(),
  src: types.optional(types.string()),
  dest: types.optional(types.string()),
});

export function updateProjectProjectsBuildsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsBuilds, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectProjectsBuilds$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsBuilds' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsChecksConclusion$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectProjectsChecksConclusion> = z.nativeEnum(
    UpdateProjectProjectsChecksConclusion,
  );

/** @internal */
export const UpdateProjectProjectsChecksState$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectProjectsChecksState
> = z.nativeEnum(UpdateProjectProjectsChecksState);

/** @internal */
export const UpdateProjectProjectsResponseCreator$inboundSchema: z.ZodType<
  UpdateProjectProjectsResponseCreator,
  z.ZodTypeDef,
  unknown
> = z.object({
  email: types.string(),
  githubLogin: types.optional(types.string()),
  gitlabLogin: types.optional(types.string()),
  uid: types.string(),
  username: types.string(),
});

export function updateProjectProjectsResponseCreatorFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsResponseCreator, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectProjectsResponseCreator$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsResponseCreator' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsOidcTokenClaims$inboundSchema: z.ZodType<
  UpdateProjectProjectsOidcTokenClaims,
  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 updateProjectProjectsOidcTokenClaimsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsOidcTokenClaims, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectProjectsOidcTokenClaims$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsOidcTokenClaims' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsPlan$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectProjectsPlan
> = z.nativeEnum(UpdateProjectProjectsPlan);

/** @internal */
export const UpdateProjectProjectsReadyState$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectProjectsReadyState
> = z.nativeEnum(UpdateProjectProjectsReadyState);

/** @internal */
export const UpdateProjectProjectsReadySubstate$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectProjectsReadySubstate
> = z.nativeEnum(UpdateProjectProjectsReadySubstate);

/** @internal */
export const UpdateProjectProjectsResponse200Type$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectProjectsResponse200Type> = z.nativeEnum(
    UpdateProjectProjectsResponse200Type,
  );

/** @internal */
export const UpdateProjectTargets$inboundSchema: z.ZodType<
  UpdateProjectTargets,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: types.string(),
  alias: types.optional(z.array(types.string())),
  aliasAssigned: z.nullable(smartUnion([types.number(), types.boolean()]))
    .optional(),
  aliasError: z.nullable(
    z.lazy(() => UpdateProjectProjectsAliasError$inboundSchema),
  ).optional(),
  aliasFinal: z.nullable(types.string()).optional(),
  automaticAliases: types.optional(z.array(types.string())),
  branchMatcher: types.optional(
    z.lazy(() => UpdateProjectProjectsResponseBranchMatcher$inboundSchema),
  ),
  buildingAt: types.optional(types.number()),
  builds: types.optional(
    z.array(z.lazy(() => UpdateProjectProjectsBuilds$inboundSchema)),
  ),
  checksConclusion: types.optional(
    UpdateProjectProjectsChecksConclusion$inboundSchema,
  ),
  checksState: types.optional(UpdateProjectProjectsChecksState$inboundSchema),
  connectBuildsEnabled: types.optional(types.boolean()),
  connectConfigurationId: types.optional(types.string()),
  createdAt: types.number(),
  createdIn: types.string(),
  creator: types.nullable(
    z.lazy(() => UpdateProjectProjectsResponseCreator$inboundSchema),
  ),
  deletedAt: types.optional(types.number()),
  deploymentHostname: types.string(),
  forced: types.optional(types.boolean()),
  name: types.string(),
  meta: types.optional(z.record(types.string())),
  monorepoManager: z.nullable(types.string()).optional(),
  oidcTokenClaims: types.optional(
    z.lazy(() => UpdateProjectProjectsOidcTokenClaims$inboundSchema),
  ),
  plan: UpdateProjectProjectsPlan$inboundSchema,
  previewCommentsEnabled: types.optional(types.boolean()),
  private: types.boolean(),
  readyAt: types.optional(types.number()),
  readyState: UpdateProjectProjectsReadyState$inboundSchema,
  readySubstate: types.optional(
    UpdateProjectProjectsReadySubstate$inboundSchema,
  ),
  requestedAt: types.optional(types.number()),
  target: z.nullable(types.string()).optional(),
  teamId: z.nullable(types.string()).optional(),
  type: UpdateProjectProjectsResponse200Type$inboundSchema,
  url: types.string(),
  userId: types.optional(types.string()),
  withCache: types.optional(types.boolean()),
});

export function updateProjectTargetsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectTargets, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectTargets$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectTargets' from JSON`,
  );
}

/** @internal */
export const UpdateProjectPermissions$inboundSchema: z.ZodType<
  UpdateProjectPermissions,
  z.ZodTypeDef,
  unknown
> = z.object({
  oauth2Connection: types.optional(z.array(ACLAction$inboundSchema)),
  user: types.optional(z.array(ACLAction$inboundSchema)),
  userConnection: types.optional(z.array(ACLAction$inboundSchema)),
  userMfaConfiguration: types.optional(z.array(ACLAction$inboundSchema)),
  userPreference: types.optional(z.array(ACLAction$inboundSchema)),
  userSudo: types.optional(z.array(ACLAction$inboundSchema)),
  webAuthn: types.optional(z.array(ACLAction$inboundSchema)),
  accessGroup: types.optional(z.array(ACLAction$inboundSchema)),
  agent: types.optional(z.array(ACLAction$inboundSchema)),
  aiGatewayApiKey: types.optional(z.array(ACLAction$inboundSchema)),
  aiGatewayApiKeyBypassAll: types.optional(z.array(ACLAction$inboundSchema)),
  aiGatewayApiKeyOwnedBySelf: types.optional(z.array(ACLAction$inboundSchema)),
  aiGatewayApiKeySpendAttribution: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  aiGatewayApiKeyZdrExemption: types.optional(z.array(ACLAction$inboundSchema)),
  aiGatewayBudget: types.optional(z.array(ACLAction$inboundSchema)),
  aiGatewayCredits: types.optional(z.array(ACLAction$inboundSchema)),
  aiGatewayPrivateModels: types.optional(z.array(ACLAction$inboundSchema)),
  aiGatewayGuardrails: types.optional(z.array(ACLAction$inboundSchema)),
  aiGatewayRules: types.optional(z.array(ACLAction$inboundSchema)),
  aiGatewaySettings: types.optional(z.array(ACLAction$inboundSchema)),
  aiGatewayTranscripts: types.optional(z.array(ACLAction$inboundSchema)),
  aiGatewayTranscriptsSettings: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  aiGatewayUsage: types.optional(z.array(ACLAction$inboundSchema)),
  aiGatewayVirtualModelConfigs: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  alerts: types.optional(z.array(ACLAction$inboundSchema)),
  alertRules: types.optional(z.array(ACLAction$inboundSchema)),
  aliasGlobal: types.optional(z.array(ACLAction$inboundSchema)),
  analyticsSampling: types.optional(z.array(ACLAction$inboundSchema)),
  analyticsUsage: types.optional(z.array(ACLAction$inboundSchema)),
  apiKey: types.optional(z.array(ACLAction$inboundSchema)),
  apiKeyAiGateway: types.optional(z.array(ACLAction$inboundSchema)),
  apiKeyOwnedBySelf: types.optional(z.array(ACLAction$inboundSchema)),
  oauth2Application: types.optional(z.array(ACLAction$inboundSchema)),
  vercelAppInstallation: types.optional(z.array(ACLAction$inboundSchema)),
  vercelAppInstallationRequest: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  auditLog: types.optional(z.array(ACLAction$inboundSchema)),
  automation: types.optional(z.array(ACLAction$inboundSchema)),
  billingAddress: types.optional(z.array(ACLAction$inboundSchema)),
  billingInformation: types.optional(z.array(ACLAction$inboundSchema)),
  billingInvoice: types.optional(z.array(ACLAction$inboundSchema)),
  billingInvoiceEmailRecipient: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  billingInvoiceLanguage: types.optional(z.array(ACLAction$inboundSchema)),
  billingPlan: types.optional(z.array(ACLAction$inboundSchema)),
  billingPurchaseOrder: types.optional(z.array(ACLAction$inboundSchema)),
  billingRefund: types.optional(z.array(ACLAction$inboundSchema)),
  billingTaxId: types.optional(z.array(ACLAction$inboundSchema)),
  blob: types.optional(z.array(ACLAction$inboundSchema)),
  blobStoreTokenSet: types.optional(z.array(ACLAction$inboundSchema)),
  budget: types.optional(z.array(ACLAction$inboundSchema)),
  cacheArtifact: types.optional(z.array(ACLAction$inboundSchema)),
  cacheArtifactUsageEvent: types.optional(z.array(ACLAction$inboundSchema)),
  codeChecks: types.optional(z.array(ACLAction$inboundSchema)),
  codeOwners: types.optional(z.array(ACLAction$inboundSchema)),
  ciInvocations: types.optional(z.array(ACLAction$inboundSchema)),
  ciLogs: types.optional(z.array(ACLAction$inboundSchema)),
  concurrentBuilds: types.optional(z.array(ACLAction$inboundSchema)),
  connect: types.optional(z.array(ACLAction$inboundSchema)),
  connectConfiguration: types.optional(z.array(ACLAction$inboundSchema)),
  connectLogs: types.optional(z.array(ACLAction$inboundSchema)),
  connexClient: types.optional(z.array(ACLAction$inboundSchema)),
  connexClientProject: types.optional(z.array(ACLAction$inboundSchema)),
  connexContact: types.optional(z.array(ACLAction$inboundSchema)),
  connexInstallation: types.optional(z.array(ACLAction$inboundSchema)),
  connexToken: types.optional(z.array(ACLAction$inboundSchema)),
  buildMachineDefault: types.optional(z.array(ACLAction$inboundSchema)),
  cursorOriginInstallation: types.optional(z.array(ACLAction$inboundSchema)),
  dataCacheBillingSettings: types.optional(z.array(ACLAction$inboundSchema)),
  defaultDeploymentProtection: types.optional(z.array(ACLAction$inboundSchema)),
  deploymentPolicy: types.optional(z.array(ACLAction$inboundSchema)),
  domain: types.optional(z.array(ACLAction$inboundSchema)),
  domainAcceptDelegation: types.optional(z.array(ACLAction$inboundSchema)),
  domainAuthCodes: types.optional(z.array(ACLAction$inboundSchema)),
  domainCertificate: types.optional(z.array(ACLAction$inboundSchema)),
  domainCheckConfig: types.optional(z.array(ACLAction$inboundSchema)),
  domainMove: types.optional(z.array(ACLAction$inboundSchema)),
  domainPurchase: types.optional(z.array(ACLAction$inboundSchema)),
  domainRecord: types.optional(z.array(ACLAction$inboundSchema)),
  domainTransferIn: types.optional(z.array(ACLAction$inboundSchema)),
  drain: types.optional(z.array(ACLAction$inboundSchema)),
  edgeConfig: types.optional(z.array(ACLAction$inboundSchema)),
  edgeConfigItem: types.optional(z.array(ACLAction$inboundSchema)),
  edgeConfigSchema: types.optional(z.array(ACLAction$inboundSchema)),
  edgeConfigToken: types.optional(z.array(ACLAction$inboundSchema)),
  endpointVerification: types.optional(z.array(ACLAction$inboundSchema)),
  event: types.optional(z.array(ACLAction$inboundSchema)),
  fileUpload: types.optional(z.array(ACLAction$inboundSchema)),
  flagsExplorerSubscription: types.optional(z.array(ACLAction$inboundSchema)),
  gitRepository: types.optional(z.array(ACLAction$inboundSchema)),
  imageOptimizationNewPrice: types.optional(z.array(ACLAction$inboundSchema)),
  integration: types.optional(z.array(ACLAction$inboundSchema)),
  integrationAccount: types.optional(z.array(ACLAction$inboundSchema)),
  integrationConfiguration: types.optional(z.array(ACLAction$inboundSchema)),
  integrationConfigurationProjects: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  integrationConfigurationRole: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  integrationConfigurationTransfer: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  integrationDeploymentAction: types.optional(z.array(ACLAction$inboundSchema)),
  integrationEvent: types.optional(z.array(ACLAction$inboundSchema)),
  integrationLog: types.optional(z.array(ACLAction$inboundSchema)),
  integrationResource: types.optional(z.array(ACLAction$inboundSchema)),
  integrationResourceData: types.optional(z.array(ACLAction$inboundSchema)),
  integrationResourceReplCommand: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  integrationResourceSecrets: types.optional(z.array(ACLAction$inboundSchema)),
  integrationSSOSession: types.optional(z.array(ACLAction$inboundSchema)),
  integrationStrict: types.optional(z.array(ACLAction$inboundSchema)),
  integrationStoreTokenSet: types.optional(z.array(ACLAction$inboundSchema)),
  integrationVercelConfigurationOverride: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  integrationPullRequest: types.optional(z.array(ACLAction$inboundSchema)),
  ipBlocking: types.optional(z.array(ACLAction$inboundSchema)),
  jobGlobal: types.optional(z.array(ACLAction$inboundSchema)),
  kmsIssuer: types.optional(z.array(ACLAction$inboundSchema)),
  kmsProjectGrant: types.optional(z.array(ACLAction$inboundSchema)),
  logDrain: types.optional(z.array(ACLAction$inboundSchema)),
  marketplaceBillingData: types.optional(z.array(ACLAction$inboundSchema)),
  marketplaceExperimentationEdgeConfigData: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  marketplaceExperimentationItem: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  marketplaceFlexCommit: types.optional(z.array(ACLAction$inboundSchema)),
  marketplaceInstallationMember: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  marketplaceInvoice: types.optional(z.array(ACLAction$inboundSchema)),
  marketplaceSettings: types.optional(z.array(ACLAction$inboundSchema)),
  Monitoring: types.optional(z.array(ACLAction$inboundSchema)),
  monitoringAlert: types.optional(z.array(ACLAction$inboundSchema)),
  monitoringChart: types.optional(z.array(ACLAction$inboundSchema)),
  monitoringQuery: types.optional(z.array(ACLAction$inboundSchema)),
  monitoringSettings: types.optional(z.array(ACLAction$inboundSchema)),
  notificationCustomerBudget: types.optional(z.array(ACLAction$inboundSchema)),
  notificationDeploymentFailed: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  notificationDomainConfiguration: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  notificationDomainExpire: types.optional(z.array(ACLAction$inboundSchema)),
  notificationDomainMoved: types.optional(z.array(ACLAction$inboundSchema)),
  notificationDomainPurchase: types.optional(z.array(ACLAction$inboundSchema)),
  notificationDomainRenewal: types.optional(z.array(ACLAction$inboundSchema)),
  notificationDomainTransfer: types.optional(z.array(ACLAction$inboundSchema)),
  notificationDomainUnverified: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  NotificationMonitoringAlert: types.optional(z.array(ACLAction$inboundSchema)),
  notificationPaymentFailed: types.optional(z.array(ACLAction$inboundSchema)),
  notificationPreferences: types.optional(z.array(ACLAction$inboundSchema)),
  notificationStatementOfReasons: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  notificationUsageAlert: types.optional(z.array(ACLAction$inboundSchema)),
  oidcFederationPolicy: types.optional(z.array(ACLAction$inboundSchema)),
  observabilityConfiguration: types.optional(z.array(ACLAction$inboundSchema)),
  observabilityFunnel: types.optional(z.array(ACLAction$inboundSchema)),
  observabilityNotebook: types.optional(z.array(ACLAction$inboundSchema)),
  openTelemetryEndpoint: types.optional(z.array(ACLAction$inboundSchema)),
  ownEvent: types.optional(z.array(ACLAction$inboundSchema)),
  organization: types.optional(z.array(ACLAction$inboundSchema)),
  organizationDomain: types.optional(z.array(ACLAction$inboundSchema)),
  organizationTeam: types.optional(z.array(ACLAction$inboundSchema)),
  passwordProtectionInvoiceItem: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  paymentMethod: types.optional(z.array(ACLAction$inboundSchema)),
  permissions: types.optional(z.array(ACLAction$inboundSchema)),
  postgres: types.optional(z.array(ACLAction$inboundSchema)),
  postgresStoreTokenSet: types.optional(z.array(ACLAction$inboundSchema)),
  previewDeploymentSuffix: types.optional(z.array(ACLAction$inboundSchema)),
  privateCloudAccount: types.optional(z.array(ACLAction$inboundSchema)),
  projectTransferIn: types.optional(z.array(ACLAction$inboundSchema)),
  projectTransferRequest: types.optional(z.array(ACLAction$inboundSchema)),
  proTrialOnboarding: types.optional(z.array(ACLAction$inboundSchema)),
  rateLimit: types.optional(z.array(ACLAction$inboundSchema)),
  redis: types.optional(z.array(ACLAction$inboundSchema)),
  redisStoreTokenSet: types.optional(z.array(ACLAction$inboundSchema)),
  remoteCaching: types.optional(z.array(ACLAction$inboundSchema)),
  repository: types.optional(z.array(ACLAction$inboundSchema)),
  samlConfig: types.optional(z.array(ACLAction$inboundSchema)),
  secret: types.optional(z.array(ACLAction$inboundSchema)),
  securityConfig: types.optional(z.array(ACLAction$inboundSchema)),
  sensitiveEnvironmentVariablePolicy: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  sharedEnvVars: types.optional(z.array(ACLAction$inboundSchema)),
  sharedEnvVarsProduction: types.optional(z.array(ACLAction$inboundSchema)),
  space: types.optional(z.array(ACLAction$inboundSchema)),
  spaceRun: types.optional(z.array(ACLAction$inboundSchema)),
  storeIsLocked: types.optional(z.array(ACLAction$inboundSchema)),
  storeTokenSetSensitive: types.optional(z.array(ACLAction$inboundSchema)),
  storeTransfer: types.optional(z.array(ACLAction$inboundSchema)),
  supportCase: types.optional(z.array(ACLAction$inboundSchema)),
  supportCaseComment: types.optional(z.array(ACLAction$inboundSchema)),
  team: types.optional(z.array(ACLAction$inboundSchema)),
  teamAccessRequest: types.optional(z.array(ACLAction$inboundSchema)),
  teamFellowMembership: types.optional(z.array(ACLAction$inboundSchema)),
  teamGitExclusivity: types.optional(z.array(ACLAction$inboundSchema)),
  teamInvite: types.optional(z.array(ACLAction$inboundSchema)),
  teamInviteCode: types.optional(z.array(ACLAction$inboundSchema)),
  teamInviteLink: types.optional(z.array(ACLAction$inboundSchema)),
  teamJoin: types.optional(z.array(ACLAction$inboundSchema)),
  teamMemberMfaStatus: types.optional(z.array(ACLAction$inboundSchema)),
  teamMicrofrontends: types.optional(z.array(ACLAction$inboundSchema)),
  teamOwnMembership: types.optional(z.array(ACLAction$inboundSchema)),
  teamOwnMembershipDisconnectSAML: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  teamSudo: types.optional(z.array(ACLAction$inboundSchema)),
  teamTokenInvalidation: types.optional(z.array(ACLAction$inboundSchema)),
  token: types.optional(z.array(ACLAction$inboundSchema)),
  toolbarComment: types.optional(z.array(ACLAction$inboundSchema)),
  usage: types.optional(z.array(ACLAction$inboundSchema)),
  usageCycle: types.optional(z.array(ACLAction$inboundSchema)),
  vcrRepository: types.optional(z.array(ACLAction$inboundSchema)),
  vpcPeeringConnection: types.optional(z.array(ACLAction$inboundSchema)),
  webAnalyticsPlan: types.optional(z.array(ACLAction$inboundSchema)),
  webhook: types.optional(z.array(ACLAction$inboundSchema)),
  "webhook-event": types.optional(z.array(ACLAction$inboundSchema)),
  aliasProject: types.optional(z.array(ACLAction$inboundSchema)),
  aliasProtectionBypass: types.optional(z.array(ACLAction$inboundSchema)),
  bulkRedirects: types.optional(z.array(ACLAction$inboundSchema)),
  buildMachine: types.optional(z.array(ACLAction$inboundSchema)),
  connectConfigurationLink: types.optional(z.array(ACLAction$inboundSchema)),
  dataCacheNamespace: types.optional(z.array(ACLAction$inboundSchema)),
  deployment: types.optional(z.array(ACLAction$inboundSchema)),
  deploymentBuildLogs: types.optional(z.array(ACLAction$inboundSchema)),
  deploymentCheck: types.optional(z.array(ACLAction$inboundSchema)),
  deploymentCheckPreview: types.optional(z.array(ACLAction$inboundSchema)),
  deploymentCheckReRunFromProductionBranch: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  deploymentProductionGit: types.optional(z.array(ACLAction$inboundSchema)),
  deploymentV0: types.optional(z.array(ACLAction$inboundSchema)),
  deploymentPreview: types.optional(z.array(ACLAction$inboundSchema)),
  deploymentPrivate: types.optional(z.array(ACLAction$inboundSchema)),
  deploymentPromote: types.optional(z.array(ACLAction$inboundSchema)),
  deploymentRollback: types.optional(z.array(ACLAction$inboundSchema)),
  edgeCacheNamespace: types.optional(z.array(ACLAction$inboundSchema)),
  environments: types.optional(z.array(ACLAction$inboundSchema)),
  job: types.optional(z.array(ACLAction$inboundSchema)),
  logs: types.optional(z.array(ACLAction$inboundSchema)),
  logsPreset: types.optional(z.array(ACLAction$inboundSchema)),
  observabilityData: types.optional(z.array(ACLAction$inboundSchema)),
  onDemandBuild: types.optional(z.array(ACLAction$inboundSchema)),
  onDemandConcurrency: types.optional(z.array(ACLAction$inboundSchema)),
  optionsAllowlist: types.optional(z.array(ACLAction$inboundSchema)),
  passwordProtection: types.optional(z.array(ACLAction$inboundSchema)),
  privateLinkEndpoint: types.optional(z.array(ACLAction$inboundSchema)),
  productionAliasProtectionBypass: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  productionShareableLink: types.optional(z.array(ACLAction$inboundSchema)),
  project: types.optional(z.array(ACLAction$inboundSchema)),
  projectAccessGroup: types.optional(z.array(ACLAction$inboundSchema)),
  projectAnalyticsSampling: types.optional(z.array(ACLAction$inboundSchema)),
  projectAnalyticsUsage: types.optional(z.array(ACLAction$inboundSchema)),
  projectCheck: types.optional(z.array(ACLAction$inboundSchema)),
  projectCheckRun: types.optional(z.array(ACLAction$inboundSchema)),
  projectDeploymentExpiration: types.optional(z.array(ACLAction$inboundSchema)),
  projectDeploymentHook: types.optional(z.array(ACLAction$inboundSchema)),
  projectDeploymentProtectionStrict: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  projectDomain: types.optional(z.array(ACLAction$inboundSchema)),
  projectDomainCheckConfig: types.optional(z.array(ACLAction$inboundSchema)),
  projectDomainMove: types.optional(z.array(ACLAction$inboundSchema)),
  projectDomainVerify: types.optional(z.array(ACLAction$inboundSchema)),
  projectEvent: types.optional(z.array(ACLAction$inboundSchema)),
  projectEnvVars: types.optional(z.array(ACLAction$inboundSchema)),
  projectEnvVarsProduction: types.optional(z.array(ACLAction$inboundSchema)),
  projectEnvVarsUnownedByIntegration: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  projectFlags: types.optional(z.array(ACLAction$inboundSchema)),
  projectFlagsProduction: types.optional(z.array(ACLAction$inboundSchema)),
  projectFlagsSdkKey: types.optional(z.array(ACLAction$inboundSchema)),
  projectFromV0: types.optional(z.array(ACLAction$inboundSchema)),
  projectId: types.optional(z.array(ACLAction$inboundSchema)),
  projectIntegrationConfiguration: types.optional(
    z.array(ACLAction$inboundSchema),
  ),
  projectLink: types.optional(z.array(ACLAction$inboundSchema)),
  projectMember: types.optional(z.array(ACLAction$inboundSchema)),
  projectMonitoring: types.optional(z.array(ACLAction$inboundSchema)),
  projectOIDCToken: types.optional(z.array(ACLAction$inboundSchema)),
  projectPermissions: types.optional(z.array(ACLAction$inboundSchema)),
  projectProductionBranch: types.optional(z.array(ACLAction$inboundSchema)),
  projectProtectionBypass: types.optional(z.array(ACLAction$inboundSchema)),
  projectRollingRelease: types.optional(z.array(ACLAction$inboundSchema)),
  projectRoutes: types.optional(z.array(ACLAction$inboundSchema)),
  projectSupportCase: types.optional(z.array(ACLAction$inboundSchema)),
  projectSupportCaseComment: types.optional(z.array(ACLAction$inboundSchema)),
  projectTier: types.optional(z.array(ACLAction$inboundSchema)),
  projectTransfer: types.optional(z.array(ACLAction$inboundSchema)),
  projectTransferOut: types.optional(z.array(ACLAction$inboundSchema)),
  projectUsage: types.optional(z.array(ACLAction$inboundSchema)),
  pageIntegrity: types.optional(z.array(ACLAction$inboundSchema)),
  seawallConfig: types.optional(z.array(ACLAction$inboundSchema)),
  securityPlusConfiguration: types.optional(z.array(ACLAction$inboundSchema)),
  shareableLink: types.optional(z.array(ACLAction$inboundSchema)),
  shareableLinkStrict: types.optional(z.array(ACLAction$inboundSchema)),
  sharedEnvVarConnection: types.optional(z.array(ACLAction$inboundSchema)),
  skewProtection: types.optional(z.array(ACLAction$inboundSchema)),
  analytics: types.optional(z.array(ACLAction$inboundSchema)),
  trustedIps: types.optional(z.array(ACLAction$inboundSchema)),
  trustedSources: types.optional(z.array(ACLAction$inboundSchema)),
  v0Chat: types.optional(z.array(ACLAction$inboundSchema)),
  vercelAuth: types.optional(z.array(ACLAction$inboundSchema)),
  vercelRun: types.optional(z.array(ACLAction$inboundSchema)),
  webAnalytics: types.optional(z.array(ACLAction$inboundSchema)),
  workflowRunData: types.optional(z.array(ACLAction$inboundSchema)),
}).transform((v) => {
  return remap$(v, {
    "Monitoring": "monitoring",
    "NotificationMonitoringAlert": "notificationMonitoringAlert",
    "webhook-event": "webhookEvent",
    "projectFlagsSdkKey": "projectFlagsSDKKey",
  });
});

export function updateProjectPermissionsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectPermissions, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectPermissions$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectPermissions' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLastRollbackTarget$inboundSchema: z.ZodType<
  UpdateProjectLastRollbackTarget,
  z.ZodTypeDef,
  unknown
> = z.object({});

export function updateProjectLastRollbackTargetFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectLastRollbackTarget, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectLastRollbackTarget$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLastRollbackTarget' from JSON`,
  );
}

/** @internal */
export const UpdateProjectJobStatus$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectJobStatus
> = z.nativeEnum(UpdateProjectJobStatus);

/** @internal */
export const UpdateProjectProjectsResponse200ApplicationJSONType$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectProjectsResponse200ApplicationJSONType> =
    z.nativeEnum(UpdateProjectProjectsResponse200ApplicationJSONType);

/** @internal */
export const UpdateProjectLastAliasRequest$inboundSchema: z.ZodType<
  UpdateProjectLastAliasRequest,
  z.ZodTypeDef,
  unknown
> = z.object({
  fromDeploymentId: types.nullable(types.string()),
  toDeploymentId: types.string(),
  fromRollingReleaseId: types.optional(types.string()),
  jobStatus: UpdateProjectJobStatus$inboundSchema,
  requestedAt: types.number(),
  type: UpdateProjectProjectsResponse200ApplicationJSONType$inboundSchema,
});

export function updateProjectLastAliasRequestFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectLastAliasRequest, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectLastAliasRequest$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectLastAliasRequest' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProtectionBypass2$inboundSchema: z.ZodType<
  UpdateProjectProtectionBypass2,
  z.ZodTypeDef,
  unknown
> = z.object({
  createdAt: types.number(),
  createdBy: types.string(),
  scope: types.literal("automation-bypass"),
  isEnvVar: types.optional(types.boolean()),
  note: types.optional(types.string()),
});

export function updateProjectProtectionBypass2FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProtectionBypass2, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectProtectionBypass2$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProtectionBypass2' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProtectionBypass1$inboundSchema: z.ZodType<
  UpdateProjectProtectionBypass1,
  z.ZodTypeDef,
  unknown
> = z.object({
  createdAt: types.number(),
  createdBy: types.string(),
  scope: types.literal("integration-automation-bypass"),
  integrationId: types.string(),
  configurationId: types.string(),
});

export function updateProjectProtectionBypass1FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProtectionBypass1, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectProtectionBypass1$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProtectionBypass1' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProtectionBypass$inboundSchema: z.ZodType<
  UpdateProjectProtectionBypass,
  z.ZodTypeDef,
  unknown
> = z.union([
  z.lazy(() => UpdateProjectProtectionBypass1$inboundSchema),
  z.lazy(() => UpdateProjectProtectionBypass2$inboundSchema),
]);

export function updateProjectProtectionBypassFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProtectionBypass, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectProtectionBypass$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProtectionBypass' from JSON`,
  );
}

/** @internal */
export const UpdateProjectTrustedIpsProjectsDeploymentType$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectTrustedIpsProjectsDeploymentType> = z
    .nativeEnum(UpdateProjectTrustedIpsProjectsDeploymentType);

/** @internal */
export const UpdateProjectTrustedIps2$inboundSchema: z.ZodType<
  UpdateProjectTrustedIps2,
  z.ZodTypeDef,
  unknown
> = z.object({
  deploymentType: UpdateProjectTrustedIpsProjectsDeploymentType$inboundSchema,
});

export function updateProjectTrustedIps2FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectTrustedIps2, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectTrustedIps2$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectTrustedIps2' from JSON`,
  );
}

/** @internal */
export const UpdateProjectTrustedIpsDeploymentType$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectTrustedIpsDeploymentType> = z.nativeEnum(
    UpdateProjectTrustedIpsDeploymentType,
  );

/** @internal */
export const UpdateProjectTrustedIpsAddresses$inboundSchema: z.ZodType<
  UpdateProjectTrustedIpsAddresses,
  z.ZodTypeDef,
  unknown
> = z.object({
  value: types.string(),
  note: types.optional(types.string()),
});

export function updateProjectTrustedIpsAddressesFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectTrustedIpsAddresses, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectTrustedIpsAddresses$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectTrustedIpsAddresses' from JSON`,
  );
}

/** @internal */
export const UpdateProjectTrustedIpsProtectionMode$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectTrustedIpsProtectionMode> = z.nativeEnum(
    UpdateProjectTrustedIpsProtectionMode,
  );

/** @internal */
export const UpdateProjectTrustedIps1$inboundSchema: z.ZodType<
  UpdateProjectTrustedIps1,
  z.ZodTypeDef,
  unknown
> = z.object({
  deploymentType: UpdateProjectTrustedIpsDeploymentType$inboundSchema,
  addresses: z.array(
    z.lazy(() => UpdateProjectTrustedIpsAddresses$inboundSchema),
  ),
  protectionMode: UpdateProjectTrustedIpsProtectionMode$inboundSchema,
});

export function updateProjectTrustedIps1FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectTrustedIps1, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectTrustedIps1$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectTrustedIps1' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsTrustedIps$inboundSchema: z.ZodType<
  UpdateProjectProjectsTrustedIps,
  z.ZodTypeDef,
  unknown
> = smartUnion([
  z.lazy(() => UpdateProjectTrustedIps1$inboundSchema),
  z.lazy(() => UpdateProjectTrustedIps2$inboundSchema),
]);

export function updateProjectProjectsTrustedIpsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsTrustedIps, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectProjectsTrustedIps$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsTrustedIps' from JSON`,
  );
}

/** @internal */
export const UpdateProjectFromProjectsResponsePreset$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectFromProjectsResponsePreset> = z
    .nativeEnum(UpdateProjectFromProjectsResponsePreset);

/** @internal */
export const UpdateProjectFrom2$inboundSchema: z.ZodType<
  UpdateProjectFrom2,
  z.ZodTypeDef,
  unknown
> = z.object({
  slugs: types.optional(z.array(types.string())),
  preset: UpdateProjectFromProjectsResponsePreset$inboundSchema,
});

export function updateProjectFrom2FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectFrom2, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectFrom2$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectFrom2' from JSON`,
  );
}

/** @internal */
export const UpdateProjectFromProjectsPreset$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectFromProjectsPreset
> = z.nativeEnum(UpdateProjectFromProjectsPreset);

/** @internal */
export const UpdateProjectFrom1$inboundSchema: z.ZodType<
  UpdateProjectFrom1,
  z.ZodTypeDef,
  unknown
> = z.object({
  slugs: z.array(types.string()),
  preset: types.optional(UpdateProjectFromProjectsPreset$inboundSchema),
});

export function updateProjectFrom1FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectFrom1, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectFrom1$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectFrom1' from JSON`,
  );
}

/** @internal */
export const UpdateProjectFrom$inboundSchema: z.ZodType<
  UpdateProjectFrom,
  z.ZodTypeDef,
  unknown
> = smartUnion([
  z.lazy(() => UpdateProjectFrom1$inboundSchema),
  z.lazy(() => UpdateProjectFrom2$inboundSchema),
]);

export function updateProjectFromFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectFrom, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectFrom$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectFrom' from JSON`,
  );
}

/** @internal */
export const UpdateProjectToProjectsResponse200ApplicationJSONResponseBodyPreset$inboundSchema:
  z.ZodNativeEnum<
    typeof UpdateProjectToProjectsResponse200ApplicationJSONResponseBodyPreset
  > = z.nativeEnum(
    UpdateProjectToProjectsResponse200ApplicationJSONResponseBodyPreset,
  );

/** @internal */
export const UpdateProjectToProjectsResponse2$inboundSchema: z.ZodType<
  UpdateProjectToProjectsResponse2,
  z.ZodTypeDef,
  unknown
> = z.object({
  slugs: types.optional(z.array(types.string())),
  preset:
    UpdateProjectToProjectsResponse200ApplicationJSONResponseBodyPreset$inboundSchema,
});

export function updateProjectToProjectsResponse2FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectToProjectsResponse2, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectToProjectsResponse2$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectToProjectsResponse2' from JSON`,
  );
}

/** @internal */
export const UpdateProjectToProjectsResponse200ApplicationJSONPreset$inboundSchema:
  z.ZodNativeEnum<
    typeof UpdateProjectToProjectsResponse200ApplicationJSONPreset
  > = z.nativeEnum(UpdateProjectToProjectsResponse200ApplicationJSONPreset);

/** @internal */
export const UpdateProjectToProjectsResponse1$inboundSchema: z.ZodType<
  UpdateProjectToProjectsResponse1,
  z.ZodTypeDef,
  unknown
> = z.object({
  slugs: z.array(types.string()),
  preset: types.optional(
    UpdateProjectToProjectsResponse200ApplicationJSONPreset$inboundSchema,
  ),
});

export function updateProjectToProjectsResponse1FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectToProjectsResponse1, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectToProjectsResponse1$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectToProjectsResponse1' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsResponseTo$inboundSchema: z.ZodType<
  UpdateProjectProjectsResponseTo,
  z.ZodTypeDef,
  unknown
> = smartUnion([
  z.lazy(() => UpdateProjectToProjectsResponse1$inboundSchema),
  z.lazy(() => UpdateProjectToProjectsResponse2$inboundSchema),
]);

export function updateProjectProjectsResponseToFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsResponseTo, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectProjectsResponseTo$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsResponseTo' from JSON`,
  );
}

/** @internal */
export const UpdateProjectCustomAllow$inboundSchema: z.ZodType<
  UpdateProjectCustomAllow,
  z.ZodTypeDef,
  unknown
> = z.object({
  from: smartUnion([
    z.lazy(() => UpdateProjectFrom1$inboundSchema),
    z.lazy(() => UpdateProjectFrom2$inboundSchema),
  ]),
  to: smartUnion([
    z.lazy(() => UpdateProjectToProjectsResponse1$inboundSchema),
    z.lazy(() => UpdateProjectToProjectsResponse2$inboundSchema),
  ]),
});

export function updateProjectCustomAllowFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectCustomAllow, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectCustomAllow$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectCustomAllow' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsProjects$inboundSchema: z.ZodType<
  UpdateProjectProjectsProjects,
  z.ZodTypeDef,
  unknown
> = z.object({
  label: types.optional(types.string()),
  customAllow: types.optional(
    z.array(z.lazy(() => UpdateProjectCustomAllow$inboundSchema)),
  ),
});

export function updateProjectProjectsProjectsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsProjects, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectProjectsProjects$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsProjects' from JSON`,
  );
}

/** @internal */
export const UpdateProjectToProjectsResponse200Preset$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectToProjectsResponse200Preset> = z
    .nativeEnum(UpdateProjectToProjectsResponse200Preset);

/** @internal */
export const UpdateProjectToProjects2$inboundSchema: z.ZodType<
  UpdateProjectToProjects2,
  z.ZodTypeDef,
  unknown
> = z.object({
  slugs: types.optional(z.array(types.string())),
  preset: UpdateProjectToProjectsResponse200Preset$inboundSchema,
});

export function updateProjectToProjects2FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectToProjects2, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectToProjects2$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectToProjects2' from JSON`,
  );
}

/** @internal */
export const UpdateProjectToProjectsResponsePreset$inboundSchema:
  z.ZodNativeEnum<typeof UpdateProjectToProjectsResponsePreset> = z.nativeEnum(
    UpdateProjectToProjectsResponsePreset,
  );

/** @internal */
export const UpdateProjectToProjects1$inboundSchema: z.ZodType<
  UpdateProjectToProjects1,
  z.ZodTypeDef,
  unknown
> = z.object({
  slugs: z.array(types.string()),
  preset: types.optional(UpdateProjectToProjectsResponsePreset$inboundSchema),
});

export function updateProjectToProjects1FromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectToProjects1, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectToProjects1$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectToProjects1' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsTo$inboundSchema: z.ZodType<
  UpdateProjectProjectsTo,
  z.ZodTypeDef,
  unknown
> = smartUnion([
  z.lazy(() => UpdateProjectToProjects1$inboundSchema),
  z.lazy(() => UpdateProjectToProjects2$inboundSchema),
]);

export function updateProjectProjectsToFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsTo, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectProjectsTo$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsTo' from JSON`,
  );
}

/** @internal */
export const UpdateProjectOidcProviders$inboundSchema: z.ZodType<
  UpdateProjectOidcProviders,
  z.ZodTypeDef,
  unknown
> = z.object({
  to: smartUnion([
    z.lazy(() => UpdateProjectToProjects1$inboundSchema),
    z.lazy(() => UpdateProjectToProjects2$inboundSchema),
  ]),
  label: types.optional(types.string()),
  claims: z.record(z.array(types.string())),
});

export function updateProjectOidcProvidersFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectOidcProviders, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectOidcProviders$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectOidcProviders' from JSON`,
  );
}

/** @internal */
export const UpdateProjectTrustedSources$inboundSchema: z.ZodType<
  UpdateProjectTrustedSources,
  z.ZodTypeDef,
  unknown
> = z.object({
  enableVercelCiSameRepository: types.optional(types.boolean()),
  projects: types.optional(
    z.record(z.lazy(() => UpdateProjectProjectsProjects$inboundSchema)),
  ),
  oidcProviders: types.optional(
    z.record(z.array(z.lazy(() => UpdateProjectOidcProviders$inboundSchema))),
  ),
});

export function updateProjectTrustedSourcesFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectTrustedSources, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectTrustedSources$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectTrustedSources' from JSON`,
  );
}

/** @internal */
export const UpdateProjectGitComments$inboundSchema: z.ZodType<
  UpdateProjectGitComments,
  z.ZodTypeDef,
  unknown
> = z.object({
  onPullRequest: types.boolean(),
  onCommit: types.boolean(),
});

export function updateProjectGitCommentsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectGitComments, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectGitComments$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectGitComments' from JSON`,
  );
}

/** @internal */
export const UpdateProjectCreateDeployments$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectCreateDeployments
> = z.nativeEnum(UpdateProjectCreateDeployments);

/** @internal */
export const UpdateProjectConsolidatedGitCommitStatus$inboundSchema: z.ZodType<
  UpdateProjectConsolidatedGitCommitStatus,
  z.ZodTypeDef,
  unknown
> = z.object({
  enabled: types.boolean(),
  propagateFailures: types.boolean(),
});

export function updateProjectConsolidatedGitCommitStatusFromJSON(
  jsonString: string,
): SafeParseResult<
  UpdateProjectConsolidatedGitCommitStatus,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      UpdateProjectConsolidatedGitCommitStatus$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'UpdateProjectConsolidatedGitCommitStatus' from JSON`,
  );
}

/** @internal */
export const UpdateProjectGitProviderOptions$inboundSchema: z.ZodType<
  UpdateProjectGitProviderOptions,
  z.ZodTypeDef,
  unknown
> = z.object({
  createDeployments: UpdateProjectCreateDeployments$inboundSchema,
  disableRepositoryDispatchEvents: types.optional(types.boolean()),
  requireVerifiedCommits: types.optional(types.boolean()),
  gitCommitStatus: types.optional(types.boolean()),
  consolidatedGitCommitStatus: types.optional(
    z.lazy(() => UpdateProjectConsolidatedGitCommitStatus$inboundSchema),
  ),
});

export function updateProjectGitProviderOptionsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectGitProviderOptions, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectGitProviderOptions$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectGitProviderOptions' from JSON`,
  );
}

/** @internal */
export const UpdateProjectWebAnalytics$inboundSchema: z.ZodType<
  UpdateProjectWebAnalytics,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: types.string(),
  disabledAt: types.optional(types.number()),
  canceledAt: types.optional(types.number()),
  enabledAt: types.optional(types.number()),
  hasData: types.optional(types.literal(true)),
});

export function updateProjectWebAnalyticsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectWebAnalytics, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectWebAnalytics$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectWebAnalytics' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsResponseAction$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectProjectsResponseAction
> = z.nativeEnum(UpdateProjectProjectsResponseAction);

/** @internal */
export const UpdateProjectAlgo$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectAlgo
> = z.nativeEnum(UpdateProjectAlgo);

/** @internal */
export const UpdateProjectRateLimit$inboundSchema: z.ZodType<
  UpdateProjectRateLimit,
  z.ZodTypeDef,
  unknown
> = z.object({
  algo: UpdateProjectAlgo$inboundSchema,
  window: types.number(),
  limit: types.number(),
  keys: z.array(types.string()),
});

export function updateProjectRateLimitFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectRateLimit, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectRateLimit$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectRateLimit' from JSON`,
  );
}

/** @internal */
export const UpdateProjectRedirect$inboundSchema: z.ZodType<
  UpdateProjectRedirect,
  z.ZodTypeDef,
  unknown
> = z.object({
  location: types.string(),
  permanent: types.boolean(),
});

export function updateProjectRedirectFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectRedirect, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectRedirect$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectRedirect' from JSON`,
  );
}

/** @internal */
export const UpdateProjectLogHeadersProjects2$inboundSchema: z.ZodNativeEnum<
  typeof UpdateProjectLogHeadersProjects2
> = z.nativeEnum(UpdateProjectLogHeadersProjects2);

/** @internal */
export const UpdateProjectProjectsLogHeaders$inboundSchema: z.ZodType<
  UpdateProjectProjectsLogHeaders,
  z.ZodTypeDef,
  unknown
> = smartUnion([
  z.array(types.string()),
  UpdateProjectLogHeadersProjects2$inboundSchema,
]);

export function updateProjectProjectsLogHeadersFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectProjectsLogHeaders, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectProjectsLogHeaders$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectProjectsLogHeaders' from JSON`,
  );
}

/** @internal */
export const UpdateProjectRulesets$inboundSchema: z.ZodType<
  UpdateProjectRulesets,
  z.ZodTypeDef,
  unknown
> = z.object({
  action: UpdateProjectProjectsResponseAction$inboundSchema,
  rateLimit: z.nullable(z.lazy(() => UpdateProjectRateLimit$inboundSchema))
    .optional(),
  redirect: z.nullable(z.lazy(() => UpdateProjectRedirect$inboundSchema))
    .optional(),
  actionDuration: z.nullable(types.string()).optional(),
  bypassSystem: z.nullable(types.boolean()).optional(),
  logHeaders: types.optional(
    smartUnion([
      z.array(types.string()),
      UpdateProjectLogHeadersProjects2$inboundSchema,
    ]),
  ),
});

export function updateProjectRulesetsFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectRulesets, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectRulesets$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectRulesets' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesVercelRulesetAction$inboundSchema:
  z.ZodNativeEnum<
    typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesVercelRulesetAction
  > = z.nativeEnum(
    UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesVercelRulesetAction,
  );

/** @internal */
export const UpdateProjectVercelRuleset$inboundSchema: z.ZodType<
  UpdateProjectVercelRuleset,
  z.ZodTypeDef,
  unknown
> = z.object({
  active: types.boolean(),
  action: types.optional(
    UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesVercelRulesetAction$inboundSchema,
  ),
});

export function updateProjectVercelRulesetFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectVercelRuleset, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectVercelRuleset$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectVercelRuleset' from JSON`,
  );
}

/** @internal */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesTrafficSourcesAction$inboundSchema:
  z.ZodNativeEnum<
    typeof UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesTrafficSourcesAction
  > = z.nativeEnum(
    UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesTrafficSourcesAction,
  );

/** @internal */
export const UpdateProjectTrafficSources$inboundSchema: z.ZodType<
  UpdateProjectTrafficSources,
  z.ZodTypeDef,
  unknown
> = z.object({
  active: types.boolean(),
  action: types.optional(
    UpdateProjectProjectsResponse200ApplicationJSONResponseBodySecurityManagedRulesTrafficSourcesAction$inboundSchema,
  ),
});

export function updateProjectTrafficSourcesFromJSON(
  jsonString: string,
): SafeParseResult<UpdateProjectTrafficSources, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => UpdateProjectTrafficSources$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'UpdateProjectTrafficSources' from JSON`,
  );
}