/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

import * as z from "zod/v3";
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 { SDKValidationError } from "./sdkvalidationerror.js";

export type DeletedUser = {
  username: string;
  email: string;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndFifty = {
  deletedUser?: DeletedUser | undefined;
  deletedUid?: string | undefined;
  emailDomain?: string | undefined;
};

export type UserEventPayload149Team = {
  id: string;
  name?: string | undefined;
};

export type PayloadPreviousRule = {
  email: string;
};

export type NextRule = {
  email: string;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndFortyNine = {
  team: UserEventPayload149Team;
  previousRule?: PayloadPreviousRule | undefined;
  nextRule?: NextRule | undefined;
};

export type UserEventPayload148Team = {
  id: string;
  name?: string | undefined;
};

export type PreviousRule = {
  email: string;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndFortyEight = {
  team: UserEventPayload148Team;
  previousRule: PreviousRule;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndFortySeven = {
  email: string;
  name: string;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndFortySix = {
  edgeConfigId: string;
  edgeConfigSlug: string;
  /**
   * ids of deleted tokens
   */
  edgeConfigTokenIds: Array<string>;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndFortyFive = {
  edgeConfigId: string;
  edgeConfigSlug: string;
  edgeConfigTokenId: string;
  label: string;
};

export type EdgeConfig = {
  id: string;
  slug: string;
};

export const UserEventPayload144Type = {
  Team: "team",
  User: "user",
} as const;
export type UserEventPayload144Type = ClosedEnum<
  typeof UserEventPayload144Type
>;

export type FromAccount = {
  id: string;
  type: UserEventPayload144Type;
  slug?: string | undefined;
  username?: string | undefined;
};

export const UserEventPayload144ToAccountType = {
  Team: "team",
  User: "user",
} as const;
export type UserEventPayload144ToAccountType = ClosedEnum<
  typeof UserEventPayload144ToAccountType
>;

export type ToAccount = {
  id: string;
  type: UserEventPayload144ToAccountType;
  slug?: string | undefined;
  username?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndFortyFour = {
  edgeConfig: EdgeConfig;
  fromAccount: FromAccount;
  toAccount: ToAccount;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndFortyThree = {
  edgeConfigId: string;
  edgeConfigSlug: string;
  edgeConfigDigest?: string | undefined;
};

export type EdgeConfigSchema = {};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndFortyTwo = {
  edgeConfigId: string;
  edgeConfigSlug: string;
  edgeConfigSchema?: EdgeConfigSchema | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndFortyOne = {
  edgeConfigId: string;
  edgeConfigSlug: string;
  edgeConfigDigest: string;
  edgeConfigBackupVersionId: string;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndForty = {
  edgeConfigId: string;
  edgeConfigSlug: string;
  edgeConfigDigest: string;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndThirtyNine = {
  projectId: string;
  projectName: string;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndThirtyEight = {
  projectId: string;
  projectName: string;
  path: string;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndThirtySeven = {
  projectId: string;
  projectName: string;
  tags: Array<string>;
  target?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndThirtySix = {
  projectId: string;
  projectName: string;
  srcImages: Array<string>;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndThirtyFive = {
  drainUrl: string | null;
  integrationName?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndThirtyFour = {
  drainUrl: string | null;
  drainName: string | null;
  integrationName?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndThirtyThree = {
  name: string;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndThirtyTwo = {
  name: string;
  price?: number | undefined;
  currency?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndThirtyOne = {
  renew?: boolean | undefined;
  domain: string;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndThirty = {
  name: string;
  destinationId: string;
  destinationName: string;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndTwentyNine = {
  name: string;
  destinationId: string | null;
  destinationName: string | null;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndTwentyEight = {
  name: string;
  fromId: string | null;
  fromName: string | null;
};

export const PayloadInitiator = {
  System: "system",
  User: "user",
} as const;
export type PayloadInitiator = ClosedEnum<typeof PayloadInitiator>;

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndTwentySeven = {
  domain: string;
  zone: boolean;
  initiator: PayloadInitiator;
  source?: string | undefined;
  previousZone?: boolean | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndTwentySix = {
  domain: string;
  zone: boolean;
};

export const EchMode = {
  Auto: "auto",
  Disabled: "disabled",
  Enabled: "enabled",
} as const;
export type EchMode = ClosedEnum<typeof EchMode>;

export const PreviousEchMode = {
  Auto: "auto",
  Disabled: "disabled",
  Enabled: "enabled",
} as const;
export type PreviousEchMode = ClosedEnum<typeof PreviousEchMode>;

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndTwentyFive = {
  domain: string;
  echMode: EchMode;
  previousEchMode: PreviousEchMode;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndTwentyFour = {
  domain: string;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndTwentyThree = {
  domain: string;
  customNameservers: Array<string> | null;
  prevCustomNameservers: Array<string> | null;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndTwentyTwo = {
  previousServiceType: string;
  serviceType: string;
  id: string;
  name: string;
  nameservers: Array<string>;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndTwentyOne = {
  domainId: string;
  name: string;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndTwenty = {
  name: string;
  userId: string;
  teamId: string;
  ownerName: string;
};

export type UserEventPayload119OldTeam = {
  name: string;
};

export type UserEventPayload119NewTeam = {
  name: string;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndNineteen = {
  name: string;
  oldTeam?: UserEventPayload119OldTeam | undefined;
  newTeam?: UserEventPayload119NewTeam | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndEighteen = {
  name: string;
  cdnEnabled: boolean;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndSeventeen = {
  name: string;
  price: number;
  currency?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndSixteen = {
  name: string;
  zone?: boolean | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndFifteen = {
  id: string;
  value: string;
  name: string;
  domain: string;
  type: string;
};

export const UserEventPayload114Action = {
  Add: "add",
  Delete: "delete",
  Update: "update",
} as const;
export type UserEventPayload114Action = ClosedEnum<
  typeof UserEventPayload114Action
>;

export const Initiator = {
  System: "system",
  User: "user",
} as const;
export type Initiator = ClosedEnum<typeof Initiator>;

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndFourteen = {
  action: UserEventPayload114Action;
  initiator: Initiator;
  id: string;
  domain: string;
  name: string;
  type: string;
  value: string;
  mxPriority?: number | undefined;
  previousValue?: string | undefined;
  source?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndThirteen = {
  id: string;
  value: string;
  name: string;
  domain: string;
  type: string;
  mxPriority?: number | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndTwelve = {
  integrationId: string;
  configurationId: string;
  integrationSlug: string;
  integrationName: string;
  ownerId: string;
  projectIds?: Array<string> | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndEleven = {
  deploymentId: string;
  deploymentUrl: string | null;
  deploymentName: string | null;
  projectId: string;
  projectName: string;
};

/**
 * Which rule blocked the deploy.
 */
export const RuleName = {
  DeploymentSources: "deploymentSources",
  GitSources: "gitSources",
} as const;
/**
 * Which rule blocked the deploy.
 */
export type RuleName = ClosedEnum<typeof RuleName>;

/**
 * Team-level or project-level rule.
 */
export const RuleProvenance = {
  Default: "default",
  Project: "project",
  Team: "team",
} as const;
/**
 * Team-level or project-level rule.
 */
export type RuleProvenance = ClosedEnum<typeof RuleProvenance>;

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndTen = {
  projectId?: string | undefined;
  projectName: string;
  /**
   * The blocked deployment's id (e.g. `dpl_…`). When present, the message links it to the deployment details (inspector) page. Optional so events emitted before this field was added still render.
   */
  deploymentId?: string | undefined;
  /**
   * Classified deploy source, e.g. 'cli', 'git', 'integration'.
   */
  source: string;
  /**
   * Which rule blocked the deploy.
   */
  ruleName: RuleName;
  /**
   * Team-level or project-level rule.
   */
  ruleProvenance: RuleProvenance;
};

export type UserEventPayload109Deployment = {
  name: string;
  id: string;
  meta: { [k: string]: string };
  url: string;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndNine = {
  deployment: UserEventPayload109Deployment;
  deploymentId: string;
  url: string;
};

export const UserEventPayload108Reason = {
  IpAllowList: "ip_allow_list",
} as const;
export type UserEventPayload108Reason = ClosedEnum<
  typeof UserEventPayload108Reason
>;

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndEight = {
  sha: string;
  gitUserPlatform: string;
  projectId?: string | undefined;
  projectName: string;
  gitCommitterName: string;
  source: string;
  reason?: UserEventPayload108Reason | undefined;
};

export type UserEventPayloadOldTeam = {
  name: string;
};

export type UserEventPayloadNewTeam = {
  name: string;
};

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndSeven = {
  url: string;
  oldTeam?: UserEventPayloadOldTeam | undefined;
  newTeam?: UserEventPayloadNewTeam | undefined;
};

/**
 * Cursor Origin
 */
export type UserEventJobPayload10610HeadInfo = {
  /**
   * Owner (namespace) slug, e.g. `acme`.
   */
  owner: string;
  /**
   * Origin namespace id (`ns_…`).
   */
  ownerId: string;
  ref: string;
  /**
   * Repository name, e.g. `api`.
   */
  repo: string;
  /**
   * Origin repository id.
   */
  repoId: string;
  sha: string;
};

export type UserEventJobPayload10610GitComments = {
  onPullRequest: boolean;
  onCommit: boolean;
};

export const UserEventJobPayload10610Provider = {
  CursorOrigin: "cursor-origin",
} as const;
export type UserEventJobPayload10610Provider = ClosedEnum<
  typeof UserEventJobPayload10610Provider
>;

export type Job10 = {
  createdAt?: number | undefined;
  eventful?: boolean | undefined;
  /**
   * Cursor Origin
   */
  headInfo: UserEventJobPayload10610HeadInfo;
  /**
   * Origin installation id (`i_…`) used to resolve the credential.
   */
  installationId: string;
  linkedProjectId?: string | undefined;
  owner: string;
  prId: number;
  projectId?: any | null | undefined;
  customEnvId?: any | null | undefined;
  repo: string;
  repoId: string;
  type: "cursor-origin-now-comment";
  gitComments?: UserEventJobPayload10610GitComments | undefined;
  provider: UserEventJobPayload10610Provider;
};

export type UserEventJobPayload1069DeployHook = {
  createdAt: number;
  id: string;
  name: string;
  ref: string;
};

/**
 * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
 */
export const UserEventJobPayload1069GitHashtagVercel = {
  NumberVERCELBUILDPRIO1: "#VERCEL_BUILD_PRIO_1",
  NumberVERCELBUILDPRIO10: "#VERCEL_BUILD_PRIO_10",
  NumberVERCELBUILDPRIO2: "#VERCEL_BUILD_PRIO_2",
  NumberVERCELBUILDPRIO3: "#VERCEL_BUILD_PRIO_3",
  NumberVERCELBUILDPRIO4: "#VERCEL_BUILD_PRIO_4",
  NumberVERCELBUILDPRIO5: "#VERCEL_BUILD_PRIO_5",
  NumberVERCELBUILDPRIO6: "#VERCEL_BUILD_PRIO_6",
  NumberVERCELBUILDPRIO7: "#VERCEL_BUILD_PRIO_7",
  NumberVERCELBUILDPRIO8: "#VERCEL_BUILD_PRIO_8",
  NumberVERCELBUILDPRIO9: "#VERCEL_BUILD_PRIO_9",
  NumberVERCELSDDJAFTERGETREPOFORCECANCEL:
    "#VERCEL_SDDJ_AFTER_GET_REPO_FORCE_CANCEL",
  NumberVERCELSDDJAFTERGETREPOFORCEERROR:
    "#VERCEL_SDDJ_AFTER_GET_REPO_FORCE_ERROR",
  NumberVERCELSDDJAFTERVERIFYFORCECANCEL:
    "#VERCEL_SDDJ_AFTER_VERIFY_FORCE_CANCEL",
  NumberVERCELSDDJAFTERVERIFYFORCEERROR:
    "#VERCEL_SDDJ_AFTER_VERIFY_FORCE_ERROR",
  NumberVERCELSDDJBEFOREBUILDJOBQUEUEDERROR:
    "#VERCEL_SDDJ_BEFORE_BUILD_JOB_QUEUED_ERROR",
  NumberVERCELSDDJFORCEGITFORKERROR: "#VERCEL_SDDJ_FORCE_GIT_FORK_ERROR",
  NumberVERCELSKIP: "#VERCEL_SKIP",
  NumberVERCELV0MESSAGE: "#VERCEL_V0_MESSAGE",
} as const;
/**
 * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
 */
export type UserEventJobPayload1069GitHashtagVercel = ClosedEnum<
  typeof UserEventJobPayload1069GitHashtagVercel
>;

/**
 * Since June 2023 Determines if comments should be posted to the git host. Replaces `github.silent` in the vercel.json.
 */
export type UserEventJobPayload1069GitComments = {
  onPullRequest: boolean;
  onCommit: boolean;
};

/**
 * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
 */
export const UserEventJobPayload1069CommitVerification = {
  Unknown: "unknown",
  Unverified: "unverified",
  Verified: "verified",
} as const;
/**
 * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
 */
export type UserEventJobPayload1069CommitVerification = ClosedEnum<
  typeof UserEventJobPayload1069CommitVerification
>;

export const UserEventJobPayload1069Action = {
  AutoApprovedMember: "auto-approved-member",
  AutoApprovedPendingInvite: "auto-approved-pending-invite",
} as const;
export type UserEventJobPayload1069Action = ClosedEnum<
  typeof UserEventJobPayload1069Action
>;

/**
 * Since March 2026 Records a successful NSNB auto-add result so later GitHub PR comments can deterministically explain why this SHA was allowed to deploy.
 */
export type UserEventJobPayload1069NsnbSideEffect = {
  action: UserEventJobPayload1069Action;
  gitUserLogin: string;
};

/**
 * Cursor Origin
 */
export type UserEventJobPayload1069HeadInfo = {
  /**
   * Owner (namespace) slug, e.g. `acme`.
   */
  owner: string;
  /**
   * Origin namespace id (`ns_…`).
   */
  ownerId: string;
  ref: string;
  /**
   * Repository name, e.g. `api`.
   */
  repo: string;
  /**
   * Origin repository id.
   */
  repoId: string;
  sha: string;
};

export const UserEventJobPayload1069Provider = {
  CursorOrigin: "cursor-origin",
} as const;
export type UserEventJobPayload1069Provider = ClosedEnum<
  typeof UserEventJobPayload1069Provider
>;

export type Job9 = {
  type: "cursor-origin-push";
  ref: string;
  sha: string;
  beforeSha?: string | undefined;
  defaultBranch?: string | undefined;
  forced?: boolean | undefined;
  repoPushedAt?: number | null | undefined;
  deployHook?: UserEventJobPayload1069DeployHook | undefined;
  url?: string | undefined;
  target?: string | null | undefined;
  deploymentId?: string | undefined;
  linkedProjectId?: string | undefined;
  projectId?: string | undefined;
  createdAt?: number | undefined;
  eventful?: boolean | undefined;
  forceNew?: boolean | undefined;
  authorized?: boolean | undefined;
  authorizedBy?: string | undefined;
  /**
   * Since December 2022 All project ids associated to this job. Think monorepo. This job will be for one of these project.
   */
  jobProjectIds?: Array<string> | undefined;
  /**
   * Since December 2022 Pairs of projects and owner ids to build for this build request.
   */
  jobPairs?: Array<Array<string>> | undefined;
  /**
   * Since June 2024 Pairs of projects and owner ids to immediately finish (without building) because we want to create them in a skipped state.
   */
  skippedJobPairs?: Array<Array<string>> | undefined;
  /**
   * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
   */
  gitHashtagVercel?: Array<UserEventJobPayload1069GitHashtagVercel> | undefined;
  /**
   * Since April 2023 Cached count of how many projects are connected to the repo. Saves a few Cosmos queries down the road in the main flow.
   */
  connectedProjectCount?: number | undefined;
  /**
   * Since April 2023 If set then it is a cached result of asking the remote for the PR ID the commit that triggered this Job. Or zero if it was not a PR. This prevents a few git round trips by the git updater.
   */
  prIdOrZero?: number | undefined;
  /**
   * Since June 2023 Determines if comments should be posted to the git host. Replaces `github.silent` in the vercel.json.
   */
  gitComments?: UserEventJobPayload1069GitComments | undefined;
  /**
   * Since 28 Feb 2024 If set to true, identifies that the git job was created for a manual git deployment
   */
  isManualGitDeploy?: boolean | undefined;
  /**
   * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
   */
  commitVerification?: UserEventJobPayload1069CommitVerification | undefined;
  /**
   * Since March 2026 Records a successful NSNB auto-add result so later GitHub PR comments can deterministically explain why this SHA was allowed to deploy.
   */
  nsnbSideEffect?: UserEventJobPayload1069NsnbSideEffect | undefined;
  /**
   * Cursor Origin
   */
  headInfo: UserEventJobPayload1069HeadInfo;
  /**
   * Origin installation id (`i_…`) used to resolve the credential.
   */
  installationId: string;
  owner: string;
  repo: string;
  repoId: string;
  provider: UserEventJobPayload1069Provider;
  customEnvId?: string | null | undefined;
  prId?: number | null | undefined;
};

export type UserEventJobPayload1068DeployHook = {
  createdAt: number;
  id: string;
  name: string;
  ref: string;
};

/**
 * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
 */
export const UserEventJobPayload106GitHashtagVercel = {
  NumberVERCELBUILDPRIO1: "#VERCEL_BUILD_PRIO_1",
  NumberVERCELBUILDPRIO10: "#VERCEL_BUILD_PRIO_10",
  NumberVERCELBUILDPRIO2: "#VERCEL_BUILD_PRIO_2",
  NumberVERCELBUILDPRIO3: "#VERCEL_BUILD_PRIO_3",
  NumberVERCELBUILDPRIO4: "#VERCEL_BUILD_PRIO_4",
  NumberVERCELBUILDPRIO5: "#VERCEL_BUILD_PRIO_5",
  NumberVERCELBUILDPRIO6: "#VERCEL_BUILD_PRIO_6",
  NumberVERCELBUILDPRIO7: "#VERCEL_BUILD_PRIO_7",
  NumberVERCELBUILDPRIO8: "#VERCEL_BUILD_PRIO_8",
  NumberVERCELBUILDPRIO9: "#VERCEL_BUILD_PRIO_9",
  NumberVERCELSDDJAFTERGETREPOFORCECANCEL:
    "#VERCEL_SDDJ_AFTER_GET_REPO_FORCE_CANCEL",
  NumberVERCELSDDJAFTERGETREPOFORCEERROR:
    "#VERCEL_SDDJ_AFTER_GET_REPO_FORCE_ERROR",
  NumberVERCELSDDJAFTERVERIFYFORCECANCEL:
    "#VERCEL_SDDJ_AFTER_VERIFY_FORCE_CANCEL",
  NumberVERCELSDDJAFTERVERIFYFORCEERROR:
    "#VERCEL_SDDJ_AFTER_VERIFY_FORCE_ERROR",
  NumberVERCELSDDJBEFOREBUILDJOBQUEUEDERROR:
    "#VERCEL_SDDJ_BEFORE_BUILD_JOB_QUEUED_ERROR",
  NumberVERCELSDDJFORCEGITFORKERROR: "#VERCEL_SDDJ_FORCE_GIT_FORK_ERROR",
  NumberVERCELSKIP: "#VERCEL_SKIP",
  NumberVERCELV0MESSAGE: "#VERCEL_V0_MESSAGE",
} as const;
/**
 * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
 */
export type UserEventJobPayload106GitHashtagVercel = ClosedEnum<
  typeof UserEventJobPayload106GitHashtagVercel
>;

/**
 * Since June 2023 Determines if comments should be posted to the git host. Replaces `github.silent` in the vercel.json.
 */
export type UserEventJobPayload1068GitComments = {
  onPullRequest: boolean;
  onCommit: boolean;
};

/**
 * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
 */
export const UserEventJobPayload106CommitVerification = {
  Unknown: "unknown",
  Unverified: "unverified",
  Verified: "verified",
} as const;
/**
 * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
 */
export type UserEventJobPayload106CommitVerification = ClosedEnum<
  typeof UserEventJobPayload106CommitVerification
>;

export const UserEventJobPayload1068Action = {
  AutoApprovedMember: "auto-approved-member",
  AutoApprovedPendingInvite: "auto-approved-pending-invite",
} as const;
export type UserEventJobPayload1068Action = ClosedEnum<
  typeof UserEventJobPayload1068Action
>;

/**
 * Since March 2026 Records a successful NSNB auto-add result so later GitHub PR comments can deterministically explain why this SHA was allowed to deploy.
 */
export type UserEventJobPayload106NsnbSideEffect = {
  action: UserEventJobPayload1068Action;
  gitUserLogin: string;
};

/**
 * Vercel
 */
export type UserEventJobPayload1068HeadInfo = {
  org: string;
  ref: string;
  repo: string;
  sha: string;
};

export const UserEventJobPayload1068Provider = {
  Vercel: "vercel",
} as const;
export type UserEventJobPayload1068Provider = ClosedEnum<
  typeof UserEventJobPayload1068Provider
>;

export type Job8 = {
  type: "vercel-push";
  ref: string;
  repo: string;
  sha: string;
  repoPushedAt?: number | null | undefined;
  deployHook?: UserEventJobPayload1068DeployHook | undefined;
  url?: string | undefined;
  target?: string | null | undefined;
  deploymentId?: string | undefined;
  linkedProjectId?: string | undefined;
  projectId?: string | undefined;
  authorized?: boolean | undefined;
  authorizedBy?: string | undefined;
  /**
   * Since December 2022 All project ids associated to this job. Think monorepo. This job will be for one of these project.
   */
  jobProjectIds?: Array<string> | undefined;
  /**
   * Since December 2022 Pairs of projects and owner ids to build for this build request.
   */
  jobPairs?: Array<Array<string>> | undefined;
  /**
   * Since June 2024 Pairs of projects and owner ids to immediately finish (without building) because we want to create them in a skipped state.
   */
  skippedJobPairs?: Array<Array<string>> | undefined;
  /**
   * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
   */
  gitHashtagVercel?: Array<UserEventJobPayload106GitHashtagVercel> | undefined;
  /**
   * Since April 2023 Cached count of how many projects are connected to the repo. Saves a few Cosmos queries down the road in the main flow.
   */
  connectedProjectCount?: number | undefined;
  /**
   * Since April 2023 If set then it is a cached result of asking the remote for the PR ID the commit that triggered this Job. Or zero if it was not a PR. This prevents a few git round trips by the git updater.
   */
  prIdOrZero?: number | undefined;
  /**
   * Since June 2023 Determines if comments should be posted to the git host. Replaces `github.silent` in the vercel.json.
   */
  gitComments?: UserEventJobPayload1068GitComments | undefined;
  /**
   * Since 28 Feb 2024 If set to true, identifies that the git job was created for a manual git deployment
   */
  isManualGitDeploy?: boolean | undefined;
  /**
   * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
   */
  commitVerification?: UserEventJobPayload106CommitVerification | undefined;
  /**
   * Since March 2026 Records a successful NSNB auto-add result so later GitHub PR comments can deterministically explain why this SHA was allowed to deploy.
   */
  nsnbSideEffect?: UserEventJobPayload106NsnbSideEffect | undefined;
  /**
   * Vercel
   */
  headInfo: UserEventJobPayload1068HeadInfo;
  org: string;
  provider: UserEventJobPayload1068Provider;
  customEnvId?: string | null | undefined;
  prId?: number | null | undefined;
};

export type UserEventJobPayloadProject = {
  defaultBranch?: string | null | undefined;
  id: string;
  name?: string | null | undefined;
  namespace?: string | null | undefined;
  path?: string | null | undefined;
  url?: string | null | undefined;
};

/**
 * GitLab
 */
export type UserEventJobPayload1067HeadInfo = {
  project: UserEventJobPayloadProject;
  ref: string;
  sha: string;
};

export type UserEventJobProject = {
  defaultBranch?: string | null | undefined;
  id: string;
  name?: string | null | undefined;
  namespace?: string | null | undefined;
  path?: string | null | undefined;
  url?: string | null | undefined;
};

export type UserEventJobPayload1067GitComments = {
  onPullRequest: boolean;
  onCommit: boolean;
};

export const UserEventJobPayload1067Provider = {
  Gitlab: "gitlab",
} as const;
export type UserEventJobPayload1067Provider = ClosedEnum<
  typeof UserEventJobPayload1067Provider
>;

export type Job7 = {
  createdAt?: number | undefined;
  eventful?: boolean | undefined;
  /**
   * GitLab
   */
  headInfo: UserEventJobPayload1067HeadInfo;
  linkedProjectId?: string | undefined;
  prId: number;
  project: UserEventJobProject;
  projectId?: string | undefined;
  customEnvId?: string | null | undefined;
  ref: string;
  sha: string;
  type: "gitlab-now-comment";
  gitComments?: UserEventJobPayload1067GitComments | undefined;
  provider: UserEventJobPayload1067Provider;
};

/**
 * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
 */
export const UserEventJobPayloadGitHashtagVercel = {
  NumberVERCELBUILDPRIO1: "#VERCEL_BUILD_PRIO_1",
  NumberVERCELBUILDPRIO10: "#VERCEL_BUILD_PRIO_10",
  NumberVERCELBUILDPRIO2: "#VERCEL_BUILD_PRIO_2",
  NumberVERCELBUILDPRIO3: "#VERCEL_BUILD_PRIO_3",
  NumberVERCELBUILDPRIO4: "#VERCEL_BUILD_PRIO_4",
  NumberVERCELBUILDPRIO5: "#VERCEL_BUILD_PRIO_5",
  NumberVERCELBUILDPRIO6: "#VERCEL_BUILD_PRIO_6",
  NumberVERCELBUILDPRIO7: "#VERCEL_BUILD_PRIO_7",
  NumberVERCELBUILDPRIO8: "#VERCEL_BUILD_PRIO_8",
  NumberVERCELBUILDPRIO9: "#VERCEL_BUILD_PRIO_9",
  NumberVERCELSDDJAFTERGETREPOFORCECANCEL:
    "#VERCEL_SDDJ_AFTER_GET_REPO_FORCE_CANCEL",
  NumberVERCELSDDJAFTERGETREPOFORCEERROR:
    "#VERCEL_SDDJ_AFTER_GET_REPO_FORCE_ERROR",
  NumberVERCELSDDJAFTERVERIFYFORCECANCEL:
    "#VERCEL_SDDJ_AFTER_VERIFY_FORCE_CANCEL",
  NumberVERCELSDDJAFTERVERIFYFORCEERROR:
    "#VERCEL_SDDJ_AFTER_VERIFY_FORCE_ERROR",
  NumberVERCELSDDJBEFOREBUILDJOBQUEUEDERROR:
    "#VERCEL_SDDJ_BEFORE_BUILD_JOB_QUEUED_ERROR",
  NumberVERCELSDDJFORCEGITFORKERROR: "#VERCEL_SDDJ_FORCE_GIT_FORK_ERROR",
  NumberVERCELSKIP: "#VERCEL_SKIP",
  NumberVERCELV0MESSAGE: "#VERCEL_V0_MESSAGE",
} as const;
/**
 * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
 */
export type UserEventJobPayloadGitHashtagVercel = ClosedEnum<
  typeof UserEventJobPayloadGitHashtagVercel
>;

/**
 * Since June 2023 Determines if comments should be posted to the git host. Replaces `github.silent` in the vercel.json.
 */
export type UserEventJobPayload1066GitComments = {
  onPullRequest: boolean;
  onCommit: boolean;
};

/**
 * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
 */
export const UserEventJobPayloadCommitVerification = {
  Unknown: "unknown",
  Unverified: "unverified",
  Verified: "verified",
} as const;
/**
 * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
 */
export type UserEventJobPayloadCommitVerification = ClosedEnum<
  typeof UserEventJobPayloadCommitVerification
>;

export const UserEventJobPayload106Action = {
  AutoApprovedMember: "auto-approved-member",
  AutoApprovedPendingInvite: "auto-approved-pending-invite",
} as const;
export type UserEventJobPayload106Action = ClosedEnum<
  typeof UserEventJobPayload106Action
>;

/**
 * Since March 2026 Records a successful NSNB auto-add result so later GitHub PR comments can deterministically explain why this SHA was allowed to deploy.
 */
export type UserEventJobPayloadNsnbSideEffect = {
  action: UserEventJobPayload106Action;
  gitUserLogin: string;
};

export type Commit = {
  id: string;
  authorAvatar?: string | null | undefined;
  authorEmail?: string | null | undefined;
  authorId?: number | null | undefined;
  authorLogin?: string | null | undefined;
  authorName?: string | null | undefined;
};

export type UserEventJobPayload106DeployHook = {
  createdAt: number;
  id: string;
  name: string;
  ref: string;
};

export type UserEventJobPayload106Project = {
  defaultBranch?: string | null | undefined;
  id: string;
  name?: string | null | undefined;
  namespace?: string | null | undefined;
  path?: string | null | undefined;
  url?: string | null | undefined;
};

/**
 * GitLab
 */
export type UserEventJobPayload1066HeadInfo = {
  project: UserEventJobPayload106Project;
  ref: string;
  sha: string;
};

export type JobProject = {
  defaultBranch?: string | null | undefined;
  id: string;
  name?: string | null | undefined;
  namespace?: string | null | undefined;
  path?: string | null | undefined;
  url?: string | null | undefined;
};

export const UserEventJobPayload1066Provider = {
  Gitlab: "gitlab",
} as const;
export type UserEventJobPayload1066Provider = ClosedEnum<
  typeof UserEventJobPayload1066Provider
>;

export type Job6 = {
  type: "gitlab-push";
  authorized?: boolean | undefined;
  authorizedBy?: string | undefined;
  /**
   * Since December 2022 All project ids associated to this job. Think monorepo. This job will be for one of these project.
   */
  jobProjectIds?: Array<string> | undefined;
  /**
   * Since December 2022 Pairs of projects and owner ids to build for this build request.
   */
  jobPairs?: Array<Array<string>> | undefined;
  /**
   * Since June 2024 Pairs of projects and owner ids to immediately finish (without building) because we want to create them in a skipped state.
   */
  skippedJobPairs?: Array<Array<string>> | undefined;
  /**
   * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
   */
  gitHashtagVercel?: Array<UserEventJobPayloadGitHashtagVercel> | undefined;
  /**
   * Since April 2023 Cached count of how many projects are connected to the repo. Saves a few Cosmos queries down the road in the main flow.
   */
  connectedProjectCount?: number | undefined;
  /**
   * Since April 2023 If set then it is a cached result of asking the remote for the PR ID the commit that triggered this Job. Or zero if it was not a PR. This prevents a few git round trips by the git updater.
   */
  prIdOrZero?: number | undefined;
  /**
   * Since June 2023 Determines if comments should be posted to the git host. Replaces `github.silent` in the vercel.json.
   */
  gitComments?: UserEventJobPayload1066GitComments | undefined;
  /**
   * Since 28 Feb 2024 If set to true, identifies that the git job was created for a manual git deployment
   */
  isManualGitDeploy?: boolean | undefined;
  /**
   * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
   */
  commitVerification?: UserEventJobPayloadCommitVerification | undefined;
  /**
   * Since March 2026 Records a successful NSNB auto-add result so later GitHub PR comments can deterministically explain why this SHA was allowed to deploy.
   */
  nsnbSideEffect?: UserEventJobPayloadNsnbSideEffect | undefined;
  commit?: Commit | undefined;
  createdAt?: number | undefined;
  deployHook?: UserEventJobPayload106DeployHook | undefined;
  deploymentId?: string | undefined;
  eventful?: boolean | undefined;
  forceNew?: boolean | undefined;
  /**
   * GitLab
   */
  headInfo: UserEventJobPayload1066HeadInfo;
  linkedProjectId?: string | undefined;
  prId?: number | undefined;
  project: JobProject;
  projectId?: string | undefined;
  customEnvId?: string | null | undefined;
  ref: string;
  repoPushedAt?: number | null | undefined;
  sha: string;
  silent?: boolean | undefined;
  target?: string | null | undefined;
  url?: string | undefined;
  withCache?: boolean | undefined;
  provider: UserEventJobPayload1066Provider;
};

/**
 * Information about the head commit/branch for a GitHub repository
 */
export type UserEventJobPayload106HeadInfo = {
  org: string;
  ref: string;
  repo: string;
  repoId: number;
  sha: string;
};

export type UserEventJobPayload106GitComments = {
  onPullRequest: boolean;
  onCommit: boolean;
};

export const UserEventJobPayload1065Provider = {
  Github: "github",
  GithubCustomHost: "github-custom-host",
  GithubLimited: "github-limited",
} as const;
export type UserEventJobPayload1065Provider = ClosedEnum<
  typeof UserEventJobPayload1065Provider
>;

export type Job5 = {
  createdAt?: number | undefined;
  eventful?: boolean | undefined;
  /**
   * Information about the head commit/branch for a GitHub repository
   */
  headInfo: UserEventJobPayload106HeadInfo;
  beforeSha?: string | undefined;
  installationId: number;
  isPrivate: boolean;
  linkedProjectId?: string | undefined;
  org: string;
  prId: number;
  projectId?: any | null | undefined;
  customEnvId?: any | null | undefined;
  repo: string;
  repoId: number;
  type: "now-comment";
  gitComments?: UserEventJobPayload106GitComments | undefined;
  provider: UserEventJobPayload1065Provider;
  customHost?: string | undefined;
};

export type CommitInfo = {
  total: number;
  earliestSha?: string | undefined;
};

/**
 * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
 */
export const UserEventJobGitHashtagVercel = {
  NumberVERCELBUILDPRIO1: "#VERCEL_BUILD_PRIO_1",
  NumberVERCELBUILDPRIO10: "#VERCEL_BUILD_PRIO_10",
  NumberVERCELBUILDPRIO2: "#VERCEL_BUILD_PRIO_2",
  NumberVERCELBUILDPRIO3: "#VERCEL_BUILD_PRIO_3",
  NumberVERCELBUILDPRIO4: "#VERCEL_BUILD_PRIO_4",
  NumberVERCELBUILDPRIO5: "#VERCEL_BUILD_PRIO_5",
  NumberVERCELBUILDPRIO6: "#VERCEL_BUILD_PRIO_6",
  NumberVERCELBUILDPRIO7: "#VERCEL_BUILD_PRIO_7",
  NumberVERCELBUILDPRIO8: "#VERCEL_BUILD_PRIO_8",
  NumberVERCELBUILDPRIO9: "#VERCEL_BUILD_PRIO_9",
  NumberVERCELSDDJAFTERGETREPOFORCECANCEL:
    "#VERCEL_SDDJ_AFTER_GET_REPO_FORCE_CANCEL",
  NumberVERCELSDDJAFTERGETREPOFORCEERROR:
    "#VERCEL_SDDJ_AFTER_GET_REPO_FORCE_ERROR",
  NumberVERCELSDDJAFTERVERIFYFORCECANCEL:
    "#VERCEL_SDDJ_AFTER_VERIFY_FORCE_CANCEL",
  NumberVERCELSDDJAFTERVERIFYFORCEERROR:
    "#VERCEL_SDDJ_AFTER_VERIFY_FORCE_ERROR",
  NumberVERCELSDDJBEFOREBUILDJOBQUEUEDERROR:
    "#VERCEL_SDDJ_BEFORE_BUILD_JOB_QUEUED_ERROR",
  NumberVERCELSDDJFORCEGITFORKERROR: "#VERCEL_SDDJ_FORCE_GIT_FORK_ERROR",
  NumberVERCELSKIP: "#VERCEL_SKIP",
  NumberVERCELV0MESSAGE: "#VERCEL_V0_MESSAGE",
} as const;
/**
 * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
 */
export type UserEventJobGitHashtagVercel = ClosedEnum<
  typeof UserEventJobGitHashtagVercel
>;

/**
 * Since June 2023 Determines if comments should be posted to the git host. Replaces `github.silent` in the vercel.json.
 */
export type UserEventJobPayloadGitComments = {
  onPullRequest: boolean;
  onCommit: boolean;
};

/**
 * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
 */
export const UserEventJobCommitVerification = {
  Unknown: "unknown",
  Unverified: "unverified",
  Verified: "verified",
} as const;
/**
 * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
 */
export type UserEventJobCommitVerification = ClosedEnum<
  typeof UserEventJobCommitVerification
>;

export const UserEventJobPayloadAction = {
  AutoApprovedMember: "auto-approved-member",
  AutoApprovedPendingInvite: "auto-approved-pending-invite",
} as const;
export type UserEventJobPayloadAction = ClosedEnum<
  typeof UserEventJobPayloadAction
>;

/**
 * Since March 2026 Records a successful NSNB auto-add result so later GitHub PR comments can deterministically explain why this SHA was allowed to deploy.
 */
export type UserEventJobNsnbSideEffect = {
  action: UserEventJobPayloadAction;
  gitUserLogin: string;
};

export type UserEventJobPayloadDeployHook = {
  createdAt: number;
  id: string;
  name: string;
  ref: string;
};

/**
 * Information about the head commit/branch for a GitHub repository
 */
export type UserEventJobPayloadHeadInfo = {
  org: string;
  ref: string;
  repo: string;
  repoId: number;
  sha: string;
};

export const UserEventJobPayload106Provider = {
  Github: "github",
  GithubCustomHost: "github-custom-host",
  GithubLimited: "github-limited",
} as const;
export type UserEventJobPayload106Provider = ClosedEnum<
  typeof UserEventJobPayload106Provider
>;

export type Job4 = {
  repoPushedAt: number | null;
  commitInfo?: CommitInfo | undefined;
  forced?: boolean | undefined;
  type: "push";
  authorized?: boolean | undefined;
  authorizedBy?: string | undefined;
  /**
   * Since December 2022 All project ids associated to this job. Think monorepo. This job will be for one of these project.
   */
  jobProjectIds?: Array<string> | undefined;
  /**
   * Since December 2022 Pairs of projects and owner ids to build for this build request.
   */
  jobPairs?: Array<Array<string>> | undefined;
  /**
   * Since June 2024 Pairs of projects and owner ids to immediately finish (without building) because we want to create them in a skipped state.
   */
  skippedJobPairs?: Array<Array<string>> | undefined;
  /**
   * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
   */
  gitHashtagVercel?: Array<UserEventJobGitHashtagVercel> | undefined;
  /**
   * Since April 2023 Cached count of how many projects are connected to the repo. Saves a few Cosmos queries down the road in the main flow.
   */
  connectedProjectCount?: number | undefined;
  /**
   * Since April 2023 If set then it is a cached result of asking the remote for the PR ID the commit that triggered this Job. Or zero if it was not a PR. This prevents a few git round trips by the git updater.
   */
  prIdOrZero?: number | undefined;
  /**
   * Since June 2023 Determines if comments should be posted to the git host. Replaces `github.silent` in the vercel.json.
   */
  gitComments?: UserEventJobPayloadGitComments | undefined;
  /**
   * Since 28 Feb 2024 If set to true, identifies that the git job was created for a manual git deployment
   */
  isManualGitDeploy?: boolean | undefined;
  /**
   * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
   */
  commitVerification?: UserEventJobCommitVerification | undefined;
  /**
   * Since March 2026 Records a successful NSNB auto-add result so later GitHub PR comments can deterministically explain why this SHA was allowed to deploy.
   */
  nsnbSideEffect?: UserEventJobNsnbSideEffect | undefined;
  /**
   * Remote account id of the committer details (github id etc, not vercel). Note that the committer name/email are user input verbatim and not verified. Github does appear to resolve the given email to the username so we can trust that. If the username matches that of the sender, which is verified info, then we can use the account id and account type. See api-incoming, where we determine and set this property Note that even with that, the account may still have been spoofed.
   */
  committerGitUserId?: number | undefined;
  /**
   * Remote account type of the committer details (github type etc, not vercel). Note that the committer name/email are user input verbatim and not verified. Github does appear to resolve the given email to the username so we can trust that. If the username matches that of the sender, which is verified info, then we can use the account id and account type. See api-incoming, where we determine and set this property Note that even with that, the account may still have been spoofed.
   */
  committerGitUserType?: string | undefined;
  createdAt?: number | undefined;
  forceNew?: boolean | undefined;
  deploymentId?: string | undefined;
  deployHook?: UserEventJobPayloadDeployHook | undefined;
  beforeSha?: string | undefined;
  defaultBranch?: string | undefined;
  eventful?: boolean | undefined;
  githubDeploymentId?: string | undefined;
  /**
   * Information about the head commit/branch for a GitHub repository
   */
  headInfo: UserEventJobPayloadHeadInfo;
  installationId: number;
  isPrivate: boolean;
  linkedProjectId?: string | undefined;
  org: string;
  prId: number | null;
  projectId?: string | undefined;
  customEnvId?: string | null | undefined;
  repo: string;
  repoId: number;
  target?: string | null | undefined;
  url?: string | undefined;
  withCache?: boolean | undefined;
  provider: UserEventJobPayload106Provider;
  customHost?: string | undefined;
};

/**
 * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
 */
export const JobGitHashtagVercel = {
  NumberVERCELBUILDPRIO1: "#VERCEL_BUILD_PRIO_1",
  NumberVERCELBUILDPRIO10: "#VERCEL_BUILD_PRIO_10",
  NumberVERCELBUILDPRIO2: "#VERCEL_BUILD_PRIO_2",
  NumberVERCELBUILDPRIO3: "#VERCEL_BUILD_PRIO_3",
  NumberVERCELBUILDPRIO4: "#VERCEL_BUILD_PRIO_4",
  NumberVERCELBUILDPRIO5: "#VERCEL_BUILD_PRIO_5",
  NumberVERCELBUILDPRIO6: "#VERCEL_BUILD_PRIO_6",
  NumberVERCELBUILDPRIO7: "#VERCEL_BUILD_PRIO_7",
  NumberVERCELBUILDPRIO8: "#VERCEL_BUILD_PRIO_8",
  NumberVERCELBUILDPRIO9: "#VERCEL_BUILD_PRIO_9",
  NumberVERCELSDDJAFTERGETREPOFORCECANCEL:
    "#VERCEL_SDDJ_AFTER_GET_REPO_FORCE_CANCEL",
  NumberVERCELSDDJAFTERGETREPOFORCEERROR:
    "#VERCEL_SDDJ_AFTER_GET_REPO_FORCE_ERROR",
  NumberVERCELSDDJAFTERVERIFYFORCECANCEL:
    "#VERCEL_SDDJ_AFTER_VERIFY_FORCE_CANCEL",
  NumberVERCELSDDJAFTERVERIFYFORCEERROR:
    "#VERCEL_SDDJ_AFTER_VERIFY_FORCE_ERROR",
  NumberVERCELSDDJBEFOREBUILDJOBQUEUEDERROR:
    "#VERCEL_SDDJ_BEFORE_BUILD_JOB_QUEUED_ERROR",
  NumberVERCELSDDJFORCEGITFORKERROR: "#VERCEL_SDDJ_FORCE_GIT_FORK_ERROR",
  NumberVERCELSKIP: "#VERCEL_SKIP",
  NumberVERCELV0MESSAGE: "#VERCEL_V0_MESSAGE",
} as const;
/**
 * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
 */
export type JobGitHashtagVercel = ClosedEnum<typeof JobGitHashtagVercel>;

/**
 * Since June 2023 Determines if comments should be posted to the git host. Replaces `github.silent` in the vercel.json.
 */
export type UserEventJobGitComments = {
  onPullRequest: boolean;
  onCommit: boolean;
};

/**
 * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
 */
export const JobCommitVerification = {
  Unknown: "unknown",
  Unverified: "unverified",
  Verified: "verified",
} as const;
/**
 * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
 */
export type JobCommitVerification = ClosedEnum<typeof JobCommitVerification>;

export const UserEventJobAction = {
  AutoApprovedMember: "auto-approved-member",
  AutoApprovedPendingInvite: "auto-approved-pending-invite",
} as const;
export type UserEventJobAction = ClosedEnum<typeof UserEventJobAction>;

/**
 * Since March 2026 Records a successful NSNB auto-add result so later GitHub PR comments can deterministically explain why this SHA was allowed to deploy.
 */
export type JobNsnbSideEffect = {
  action: UserEventJobAction;
  gitUserLogin: string;
};

export type UserEventJobDeployHook = {
  createdAt: number;
  id: string;
  name: string;
  ref: string;
};

/**
 * Information about the head commit/branch for a GitHub repository
 */
export type UserEventJobHeadInfo = {
  org: string;
  ref: string;
  repo: string;
  repoId: number;
  sha: string;
};

export const UserEventJobPayloadProvider = {
  Github: "github",
  GithubCustomHost: "github-custom-host",
  GithubLimited: "github-limited",
} as const;
export type UserEventJobPayloadProvider = ClosedEnum<
  typeof UserEventJobPayloadProvider
>;

export type Job3 = {
  prId: number;
  type: "pr";
  authorized?: boolean | undefined;
  authorizedBy?: string | undefined;
  /**
   * Since December 2022 All project ids associated to this job. Think monorepo. This job will be for one of these project.
   */
  jobProjectIds?: Array<string> | undefined;
  /**
   * Since December 2022 Pairs of projects and owner ids to build for this build request.
   */
  jobPairs?: Array<Array<string>> | undefined;
  /**
   * Since June 2024 Pairs of projects and owner ids to immediately finish (without building) because we want to create them in a skipped state.
   */
  skippedJobPairs?: Array<Array<string>> | undefined;
  /**
   * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
   */
  gitHashtagVercel?: Array<JobGitHashtagVercel> | undefined;
  /**
   * Since April 2023 Cached count of how many projects are connected to the repo. Saves a few Cosmos queries down the road in the main flow.
   */
  connectedProjectCount?: number | undefined;
  /**
   * Since April 2023 If set then it is a cached result of asking the remote for the PR ID the commit that triggered this Job. Or zero if it was not a PR. This prevents a few git round trips by the git updater.
   */
  prIdOrZero?: number | undefined;
  /**
   * Since June 2023 Determines if comments should be posted to the git host. Replaces `github.silent` in the vercel.json.
   */
  gitComments?: UserEventJobGitComments | undefined;
  /**
   * Since 28 Feb 2024 If set to true, identifies that the git job was created for a manual git deployment
   */
  isManualGitDeploy?: boolean | undefined;
  /**
   * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
   */
  commitVerification?: JobCommitVerification | undefined;
  /**
   * Since March 2026 Records a successful NSNB auto-add result so later GitHub PR comments can deterministically explain why this SHA was allowed to deploy.
   */
  nsnbSideEffect?: JobNsnbSideEffect | undefined;
  /**
   * Remote account id of the committer details (github id etc, not vercel). Note that the committer name/email are user input verbatim and not verified. Github does appear to resolve the given email to the username so we can trust that. If the username matches that of the sender, which is verified info, then we can use the account id and account type. See api-incoming, where we determine and set this property Note that even with that, the account may still have been spoofed.
   */
  committerGitUserId?: number | undefined;
  /**
   * Remote account type of the committer details (github type etc, not vercel). Note that the committer name/email are user input verbatim and not verified. Github does appear to resolve the given email to the username so we can trust that. If the username matches that of the sender, which is verified info, then we can use the account id and account type. See api-incoming, where we determine and set this property Note that even with that, the account may still have been spoofed.
   */
  committerGitUserType?: string | undefined;
  createdAt?: number | undefined;
  forceNew?: boolean | undefined;
  deploymentId?: string | undefined;
  deployHook?: UserEventJobDeployHook | undefined;
  beforeSha?: string | undefined;
  defaultBranch?: string | undefined;
  eventful?: boolean | undefined;
  githubDeploymentId?: string | undefined;
  /**
   * Information about the head commit/branch for a GitHub repository
   */
  headInfo: UserEventJobHeadInfo;
  installationId: number;
  isPrivate: boolean;
  linkedProjectId?: string | undefined;
  org: string;
  projectId?: string | undefined;
  customEnvId?: string | null | undefined;
  repo: string;
  repoId: number;
  target?: string | null | undefined;
  url?: string | undefined;
  withCache?: boolean | undefined;
  provider: UserEventJobPayloadProvider;
  customHost?: string | undefined;
};

export type JobHeadInfo = {
  owner: string;
  ref: string;
  repoUuid: string;
  sha: string;
  slug: string;
};

export type JobGitComments = {
  onPullRequest: boolean;
  onCommit: boolean;
};

export const UserEventJobProvider = {
  Bitbucket: "bitbucket",
} as const;
export type UserEventJobProvider = ClosedEnum<typeof UserEventJobProvider>;

/**
 * Represents the payload for a Bitbucket comment job This interface defines the structure of data needed when creating a job to handle comments on Bitbucket pull requests or commits.
 */
export type Job2 = {
  createdAt?: number | undefined;
  eventful?: boolean | undefined;
  headInfo: JobHeadInfo;
  linkedProjectId?: string | undefined;
  name: string;
  owner: string;
  prId: number;
  projectId?: string | undefined;
  customEnvId?: string | null | undefined;
  ref: string;
  repoUuid: string;
  sha: string;
  slug: string;
  type: "bitbucket-now-comment";
  workspaceUuid: string;
  gitComments?: JobGitComments | undefined;
  provider: UserEventJobProvider;
};

/**
 * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
 */
export const GitHashtagVercel = {
  NumberVERCELBUILDPRIO1: "#VERCEL_BUILD_PRIO_1",
  NumberVERCELBUILDPRIO10: "#VERCEL_BUILD_PRIO_10",
  NumberVERCELBUILDPRIO2: "#VERCEL_BUILD_PRIO_2",
  NumberVERCELBUILDPRIO3: "#VERCEL_BUILD_PRIO_3",
  NumberVERCELBUILDPRIO4: "#VERCEL_BUILD_PRIO_4",
  NumberVERCELBUILDPRIO5: "#VERCEL_BUILD_PRIO_5",
  NumberVERCELBUILDPRIO6: "#VERCEL_BUILD_PRIO_6",
  NumberVERCELBUILDPRIO7: "#VERCEL_BUILD_PRIO_7",
  NumberVERCELBUILDPRIO8: "#VERCEL_BUILD_PRIO_8",
  NumberVERCELBUILDPRIO9: "#VERCEL_BUILD_PRIO_9",
  NumberVERCELSDDJAFTERGETREPOFORCECANCEL:
    "#VERCEL_SDDJ_AFTER_GET_REPO_FORCE_CANCEL",
  NumberVERCELSDDJAFTERGETREPOFORCEERROR:
    "#VERCEL_SDDJ_AFTER_GET_REPO_FORCE_ERROR",
  NumberVERCELSDDJAFTERVERIFYFORCECANCEL:
    "#VERCEL_SDDJ_AFTER_VERIFY_FORCE_CANCEL",
  NumberVERCELSDDJAFTERVERIFYFORCEERROR:
    "#VERCEL_SDDJ_AFTER_VERIFY_FORCE_ERROR",
  NumberVERCELSDDJBEFOREBUILDJOBQUEUEDERROR:
    "#VERCEL_SDDJ_BEFORE_BUILD_JOB_QUEUED_ERROR",
  NumberVERCELSDDJFORCEGITFORKERROR: "#VERCEL_SDDJ_FORCE_GIT_FORK_ERROR",
  NumberVERCELSKIP: "#VERCEL_SKIP",
  NumberVERCELV0MESSAGE: "#VERCEL_V0_MESSAGE",
} as const;
/**
 * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
 */
export type GitHashtagVercel = ClosedEnum<typeof GitHashtagVercel>;

/**
 * Since June 2023 Determines if comments should be posted to the git host. Replaces `github.silent` in the vercel.json.
 */
export type GitComments = {
  onPullRequest: boolean;
  onCommit: boolean;
};

/**
 * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
 */
export const CommitVerification = {
  Unknown: "unknown",
  Unverified: "unverified",
  Verified: "verified",
} as const;
/**
 * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
 */
export type CommitVerification = ClosedEnum<typeof CommitVerification>;

export const JobAction = {
  AutoApprovedMember: "auto-approved-member",
  AutoApprovedPendingInvite: "auto-approved-pending-invite",
} as const;
export type JobAction = ClosedEnum<typeof JobAction>;

/**
 * Since March 2026 Records a successful NSNB auto-add result so later GitHub PR comments can deterministically explain why this SHA was allowed to deploy.
 */
export type NsnbSideEffect = {
  action: JobAction;
  gitUserLogin: string;
};

export type JobDeployHook = {
  createdAt: number;
  id: string;
  name: string;
  ref: string;
};

export type HeadInfo = {
  owner: string;
  ref: string;
  repoUuid: string;
  sha: string;
  slug: string;
};

export const JobProvider = {
  Bitbucket: "bitbucket",
} as const;
export type JobProvider = ClosedEnum<typeof JobProvider>;

export type Job1 = {
  type: "bitbucket-push";
  authorized?: boolean | undefined;
  authorizedBy?: string | undefined;
  /**
   * Since December 2022 All project ids associated to this job. Think monorepo. This job will be for one of these project.
   */
  jobProjectIds?: Array<string> | undefined;
  /**
   * Since December 2022 Pairs of projects and owner ids to build for this build request.
   */
  jobPairs?: Array<Array<string>> | undefined;
  /**
   * Since June 2024 Pairs of projects and owner ids to immediately finish (without building) because we want to create them in a skipped state.
   */
  skippedJobPairs?: Array<Array<string>> | undefined;
  /**
   * Since February 2022 All the hashtag-vercel tags found in the commit message triggering the deploy. For example, #VERCEL_DO_SOMETHING
   */
  gitHashtagVercel?: Array<GitHashtagVercel> | undefined;
  /**
   * Since April 2023 Cached count of how many projects are connected to the repo. Saves a few Cosmos queries down the road in the main flow.
   */
  connectedProjectCount?: number | undefined;
  /**
   * Since April 2023 If set then it is a cached result of asking the remote for the PR ID the commit that triggered this Job. Or zero if it was not a PR. This prevents a few git round trips by the git updater.
   */
  prIdOrZero?: number | undefined;
  /**
   * Since June 2023 Determines if comments should be posted to the git host. Replaces `github.silent` in the vercel.json.
   */
  gitComments?: GitComments | undefined;
  /**
   * Since 28 Feb 2024 If set to true, identifies that the git job was created for a manual git deployment
   */
  isManualGitDeploy?: boolean | undefined;
  /**
   * Since 6 Nov 2025 The verification status of the commit. - 'verified' if the commit is verified - 'unverified' if the commit is not verified - 'unknown' if the commit verification status is unknown or not supported
   */
  commitVerification?: CommitVerification | undefined;
  /**
   * Since March 2026 Records a successful NSNB auto-add result so later GitHub PR comments can deterministically explain why this SHA was allowed to deploy.
   */
  nsnbSideEffect?: NsnbSideEffect | undefined;
  createdAt?: number | undefined;
  deploymentId?: string | undefined;
  deployHook?: JobDeployHook | undefined;
  eventful?: boolean | undefined;
  forceNew?: boolean | undefined;
  headInfo: HeadInfo;
  linkedProjectId?: string | undefined;
  name: string;
  owner: string;
  prId?: number | undefined;
  projectId?: string | undefined;
  customEnvId?: string | null | undefined;
  ref: string;
  repoPushedAt?: number | null | undefined;
  repoUuid: string;
  sha: string;
  silent?: boolean | undefined;
  slug: string;
  target?: string | null | undefined;
  url?: string | undefined;
  withCache?: boolean | undefined;
  workspaceUuid: string;
  provider: JobProvider;
};

export type PayloadJob =
  | Job1
  | Job2
  | Job3
  | Job4
  | Job5
  | Job6
  | Job7
  | Job8
  | Job9
  | Job10;

/**
 * The payload of the event, if requested.
 */
export type OneHundredAndSix = {
  job: Job1 | Job2 | Job3 | Job4 | Job5 | Job6 | Job7 | Job8 | Job9 | Job10;
};

/**
 * A narrowed subset of the deployment's `readyStateReasonInternal` — only values in the public allowlist are permitted here. Callers should run their raw reason through `toAllowListedReadyStateReasonInternal` from `@api/events` before assigning. This keeps abuse / moderation / admin reasons out of the public activity log.
 */
export const UserEventPayloadAllowListedReadyStateReasonInternal = {
  EarlyIgnoreStep: "EARLY_IGNORE_STEP",
  IgnoreStep: "IGNORE_STEP",
  NamespacePruned: "NAMESPACE_PRUNED",
  UnaffectedProject: "UNAFFECTED_PROJECT",
  UnverifiedCommit: "UNVERIFIED_COMMIT",
} as const;
/**
 * A narrowed subset of the deployment's `readyStateReasonInternal` — only values in the public allowlist are permitted here. Callers should run their raw reason through `toAllowListedReadyStateReasonInternal` from `@api/events` before assigning. This keeps abuse / moderation / admin reasons out of the public activity log.
 */
export type UserEventPayloadAllowListedReadyStateReasonInternal = ClosedEnum<
  typeof UserEventPayloadAllowListedReadyStateReasonInternal
>;

export type UserEventPayloadDeployment = {
  id: string;
  name: string;
  url: string;
  meta: { [k: string]: string };
  readyState?: string | undefined;
  /**
   * A narrowed subset of the deployment's `readyStateReasonInternal` — only values in the public allowlist are permitted here. Callers should run their raw reason through `toAllowListedReadyStateReasonInternal` from `@api/events` before assigning. This keeps abuse / moderation / admin reasons out of the public activity log.
   */
  allowListedReadyStateReasonInternal?:
    | UserEventPayloadAllowListedReadyStateReasonInternal
    | undefined;
};

export const GitCredentialSource = {
  ExternalToken: "external-token",
} as const;
export type GitCredentialSource = ClosedEnum<typeof GitCredentialSource>;

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

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

/** @internal */
export const OneHundredAndFifty$inboundSchema: z.ZodType<
  OneHundredAndFifty,
  z.ZodTypeDef,
  unknown
> = z.object({
  deletedUser: types.optional(z.lazy(() => DeletedUser$inboundSchema)),
  deletedUid: types.optional(types.string()),
  emailDomain: types.optional(types.string()),
});

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

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

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

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

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

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

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

/** @internal */
export const OneHundredAndFortyNine$inboundSchema: z.ZodType<
  OneHundredAndFortyNine,
  z.ZodTypeDef,
  unknown
> = z.object({
  team: z.lazy(() => UserEventPayload149Team$inboundSchema),
  previousRule: types.optional(z.lazy(() => PayloadPreviousRule$inboundSchema)),
  nextRule: types.optional(z.lazy(() => NextRule$inboundSchema)),
});

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

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

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

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

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

/** @internal */
export const OneHundredAndFortyEight$inboundSchema: z.ZodType<
  OneHundredAndFortyEight,
  z.ZodTypeDef,
  unknown
> = z.object({
  team: z.lazy(() => UserEventPayload148Team$inboundSchema),
  previousRule: z.lazy(() => PreviousRule$inboundSchema),
});

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

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

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

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

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

/** @internal */
export const OneHundredAndFortyFive$inboundSchema: z.ZodType<
  OneHundredAndFortyFive,
  z.ZodTypeDef,
  unknown
> = z.object({
  edgeConfigId: types.string(),
  edgeConfigSlug: types.string(),
  edgeConfigTokenId: types.string(),
  label: types.string(),
});

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

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

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

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

/** @internal */
export const FromAccount$inboundSchema: z.ZodType<
  FromAccount,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: types.string(),
  type: UserEventPayload144Type$inboundSchema,
  slug: types.optional(types.string()),
  username: types.optional(types.string()),
});

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

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

/** @internal */
export const ToAccount$inboundSchema: z.ZodType<
  ToAccount,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: types.string(),
  type: UserEventPayload144ToAccountType$inboundSchema,
  slug: types.optional(types.string()),
  username: types.optional(types.string()),
});

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

/** @internal */
export const OneHundredAndFortyFour$inboundSchema: z.ZodType<
  OneHundredAndFortyFour,
  z.ZodTypeDef,
  unknown
> = z.object({
  edgeConfig: z.lazy(() => EdgeConfig$inboundSchema),
  fromAccount: z.lazy(() => FromAccount$inboundSchema),
  toAccount: z.lazy(() => ToAccount$inboundSchema),
});

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

/** @internal */
export const OneHundredAndFortyThree$inboundSchema: z.ZodType<
  OneHundredAndFortyThree,
  z.ZodTypeDef,
  unknown
> = z.object({
  edgeConfigId: types.string(),
  edgeConfigSlug: types.string(),
  edgeConfigDigest: types.optional(types.string()),
});

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

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

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

/** @internal */
export const OneHundredAndFortyTwo$inboundSchema: z.ZodType<
  OneHundredAndFortyTwo,
  z.ZodTypeDef,
  unknown
> = z.object({
  edgeConfigId: types.string(),
  edgeConfigSlug: types.string(),
  edgeConfigSchema: types.optional(
    z.lazy(() => EdgeConfigSchema$inboundSchema),
  ),
});

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

/** @internal */
export const OneHundredAndFortyOne$inboundSchema: z.ZodType<
  OneHundredAndFortyOne,
  z.ZodTypeDef,
  unknown
> = z.object({
  edgeConfigId: types.string(),
  edgeConfigSlug: types.string(),
  edgeConfigDigest: types.string(),
  edgeConfigBackupVersionId: types.string(),
});

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

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

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

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

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

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

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

/** @internal */
export const OneHundredAndThirtySeven$inboundSchema: z.ZodType<
  OneHundredAndThirtySeven,
  z.ZodTypeDef,
  unknown
> = z.object({
  projectId: types.string(),
  projectName: types.string(),
  tags: z.array(types.string()),
  target: types.optional(types.string()),
});

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

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

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

/** @internal */
export const OneHundredAndThirtyFive$inboundSchema: z.ZodType<
  OneHundredAndThirtyFive,
  z.ZodTypeDef,
  unknown
> = z.object({
  drainUrl: types.nullable(types.string()),
  integrationName: types.optional(types.string()),
});

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

/** @internal */
export const OneHundredAndThirtyFour$inboundSchema: z.ZodType<
  OneHundredAndThirtyFour,
  z.ZodTypeDef,
  unknown
> = z.object({
  drainUrl: types.nullable(types.string()),
  drainName: types.nullable(types.string()),
  integrationName: types.optional(types.string()),
});

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

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

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

/** @internal */
export const OneHundredAndThirtyTwo$inboundSchema: z.ZodType<
  OneHundredAndThirtyTwo,
  z.ZodTypeDef,
  unknown
> = z.object({
  name: types.string(),
  price: types.optional(types.number()),
  currency: types.optional(types.string()),
});

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

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

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

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

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

/** @internal */
export const OneHundredAndTwentyNine$inboundSchema: z.ZodType<
  OneHundredAndTwentyNine,
  z.ZodTypeDef,
  unknown
> = z.object({
  name: types.string(),
  destinationId: types.nullable(types.string()),
  destinationName: types.nullable(types.string()),
});

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

/** @internal */
export const OneHundredAndTwentyEight$inboundSchema: z.ZodType<
  OneHundredAndTwentyEight,
  z.ZodTypeDef,
  unknown
> = z.object({
  name: types.string(),
  fromId: types.nullable(types.string()),
  fromName: types.nullable(types.string()),
});

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

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

/** @internal */
export const OneHundredAndTwentySeven$inboundSchema: z.ZodType<
  OneHundredAndTwentySeven,
  z.ZodTypeDef,
  unknown
> = z.object({
  domain: types.string(),
  zone: types.boolean(),
  initiator: PayloadInitiator$inboundSchema,
  source: types.optional(types.string()),
  previousZone: types.optional(types.boolean()),
});

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

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

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

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

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

/** @internal */
export const OneHundredAndTwentyFive$inboundSchema: z.ZodType<
  OneHundredAndTwentyFive,
  z.ZodTypeDef,
  unknown
> = z.object({
  domain: types.string(),
  echMode: EchMode$inboundSchema,
  previousEchMode: PreviousEchMode$inboundSchema,
});

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

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

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

/** @internal */
export const OneHundredAndTwentyThree$inboundSchema: z.ZodType<
  OneHundredAndTwentyThree,
  z.ZodTypeDef,
  unknown
> = z.object({
  domain: types.string(),
  customNameservers: types.nullable(z.array(types.string())),
  prevCustomNameservers: types.nullable(z.array(types.string())),
});

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

/** @internal */
export const OneHundredAndTwentyTwo$inboundSchema: z.ZodType<
  OneHundredAndTwentyTwo,
  z.ZodTypeDef,
  unknown
> = z.object({
  previousServiceType: types.string(),
  serviceType: types.string(),
  id: types.string(),
  name: types.string(),
  nameservers: z.array(types.string()),
});

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

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

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

/** @internal */
export const OneHundredAndTwenty$inboundSchema: z.ZodType<
  OneHundredAndTwenty,
  z.ZodTypeDef,
  unknown
> = z.object({
  name: types.string(),
  userId: types.string(),
  teamId: types.string(),
  ownerName: types.string(),
});

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

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

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

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

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

/** @internal */
export const OneHundredAndNineteen$inboundSchema: z.ZodType<
  OneHundredAndNineteen,
  z.ZodTypeDef,
  unknown
> = z.object({
  name: types.string(),
  oldTeam: types.optional(
    z.lazy(() => UserEventPayload119OldTeam$inboundSchema),
  ),
  newTeam: types.optional(
    z.lazy(() => UserEventPayload119NewTeam$inboundSchema),
  ),
});

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

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

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

/** @internal */
export const OneHundredAndSeventeen$inboundSchema: z.ZodType<
  OneHundredAndSeventeen,
  z.ZodTypeDef,
  unknown
> = z.object({
  name: types.string(),
  price: types.number(),
  currency: types.optional(types.string()),
});

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

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

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

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

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

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

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

/** @internal */
export const OneHundredAndFourteen$inboundSchema: z.ZodType<
  OneHundredAndFourteen,
  z.ZodTypeDef,
  unknown
> = z.object({
  action: UserEventPayload114Action$inboundSchema,
  initiator: Initiator$inboundSchema,
  id: types.string(),
  domain: types.string(),
  name: types.string(),
  type: types.string(),
  value: types.string(),
  mxPriority: types.optional(types.number()),
  previousValue: types.optional(types.string()),
  source: types.optional(types.string()),
});

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

/** @internal */
export const OneHundredAndThirteen$inboundSchema: z.ZodType<
  OneHundredAndThirteen,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: types.string(),
  value: types.string(),
  name: types.string(),
  domain: types.string(),
  type: types.string(),
  mxPriority: types.optional(types.number()),
});

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

/** @internal */
export const OneHundredAndTwelve$inboundSchema: z.ZodType<
  OneHundredAndTwelve,
  z.ZodTypeDef,
  unknown
> = z.object({
  integrationId: types.string(),
  configurationId: types.string(),
  integrationSlug: types.string(),
  integrationName: types.string(),
  ownerId: types.string(),
  projectIds: types.optional(z.array(types.string())),
});

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

/** @internal */
export const OneHundredAndEleven$inboundSchema: z.ZodType<
  OneHundredAndEleven,
  z.ZodTypeDef,
  unknown
> = z.object({
  deploymentId: types.string(),
  deploymentUrl: types.nullable(types.string()),
  deploymentName: types.nullable(types.string()),
  projectId: types.string(),
  projectName: types.string(),
});

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

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

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

/** @internal */
export const OneHundredAndTen$inboundSchema: z.ZodType<
  OneHundredAndTen,
  z.ZodTypeDef,
  unknown
> = z.object({
  projectId: types.optional(types.string()),
  projectName: types.string(),
  deploymentId: types.optional(types.string()),
  source: types.string(),
  ruleName: RuleName$inboundSchema,
  ruleProvenance: RuleProvenance$inboundSchema,
});

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

/** @internal */
export const UserEventPayload109Deployment$inboundSchema: z.ZodType<
  UserEventPayload109Deployment,
  z.ZodTypeDef,
  unknown
> = z.object({
  name: types.string(),
  id: types.string(),
  meta: z.record(types.string()),
  url: types.string(),
});

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

/** @internal */
export const OneHundredAndNine$inboundSchema: z.ZodType<
  OneHundredAndNine,
  z.ZodTypeDef,
  unknown
> = z.object({
  deployment: z.lazy(() => UserEventPayload109Deployment$inboundSchema),
  deploymentId: types.string(),
  url: types.string(),
});

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

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

/** @internal */
export const OneHundredAndEight$inboundSchema: z.ZodType<
  OneHundredAndEight,
  z.ZodTypeDef,
  unknown
> = z.object({
  sha: types.string(),
  gitUserPlatform: types.string(),
  projectId: types.optional(types.string()),
  projectName: types.string(),
  gitCommitterName: types.string(),
  source: types.string(),
  reason: types.optional(UserEventPayload108Reason$inboundSchema),
});

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

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

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

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

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

/** @internal */
export const OneHundredAndSeven$inboundSchema: z.ZodType<
  OneHundredAndSeven,
  z.ZodTypeDef,
  unknown
> = z.object({
  url: types.string(),
  oldTeam: types.optional(z.lazy(() => UserEventPayloadOldTeam$inboundSchema)),
  newTeam: types.optional(z.lazy(() => UserEventPayloadNewTeam$inboundSchema)),
});

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

/** @internal */
export const UserEventJobPayload10610HeadInfo$inboundSchema: z.ZodType<
  UserEventJobPayload10610HeadInfo,
  z.ZodTypeDef,
  unknown
> = z.object({
  owner: types.string(),
  ownerId: types.string(),
  ref: types.string(),
  repo: types.string(),
  repoId: types.string(),
  sha: types.string(),
});

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

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

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

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

/** @internal */
export const Job10$inboundSchema: z.ZodType<Job10, z.ZodTypeDef, unknown> = z
  .object({
    createdAt: types.optional(types.number()),
    eventful: types.optional(types.boolean()),
    headInfo: z.lazy(() => UserEventJobPayload10610HeadInfo$inboundSchema),
    installationId: types.string(),
    linkedProjectId: types.optional(types.string()),
    owner: types.string(),
    prId: types.number(),
    projectId: z.nullable(z.any()).optional(),
    customEnvId: z.nullable(z.any()).optional(),
    repo: types.string(),
    repoId: types.string(),
    type: types.literal("cursor-origin-now-comment"),
    gitComments: types.optional(
      z.lazy(() => UserEventJobPayload10610GitComments$inboundSchema),
    ),
    provider: UserEventJobPayload10610Provider$inboundSchema,
  });

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

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

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

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

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

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

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

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

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

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

/** @internal */
export const UserEventJobPayload1069HeadInfo$inboundSchema: z.ZodType<
  UserEventJobPayload1069HeadInfo,
  z.ZodTypeDef,
  unknown
> = z.object({
  owner: types.string(),
  ownerId: types.string(),
  ref: types.string(),
  repo: types.string(),
  repoId: types.string(),
  sha: types.string(),
});

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

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

/** @internal */
export const Job9$inboundSchema: z.ZodType<Job9, z.ZodTypeDef, unknown> = z
  .object({
    type: types.literal("cursor-origin-push"),
    ref: types.string(),
    sha: types.string(),
    beforeSha: types.optional(types.string()),
    defaultBranch: types.optional(types.string()),
    forced: types.optional(types.boolean()),
    repoPushedAt: z.nullable(types.number()).optional(),
    deployHook: types.optional(
      z.lazy(() => UserEventJobPayload1069DeployHook$inboundSchema),
    ),
    url: types.optional(types.string()),
    target: z.nullable(types.string()).optional(),
    deploymentId: types.optional(types.string()),
    linkedProjectId: types.optional(types.string()),
    projectId: types.optional(types.string()),
    createdAt: types.optional(types.number()),
    eventful: types.optional(types.boolean()),
    forceNew: types.optional(types.boolean()),
    authorized: types.optional(types.boolean()),
    authorizedBy: types.optional(types.string()),
    jobProjectIds: types.optional(z.array(types.string())),
    jobPairs: types.optional(z.array(z.array(types.string()))),
    skippedJobPairs: types.optional(z.array(z.array(types.string()))),
    gitHashtagVercel: types.optional(
      z.array(UserEventJobPayload1069GitHashtagVercel$inboundSchema),
    ),
    connectedProjectCount: types.optional(types.number()),
    prIdOrZero: types.optional(types.number()),
    gitComments: types.optional(
      z.lazy(() => UserEventJobPayload1069GitComments$inboundSchema),
    ),
    isManualGitDeploy: types.optional(types.boolean()),
    commitVerification: types.optional(
      UserEventJobPayload1069CommitVerification$inboundSchema,
    ),
    nsnbSideEffect: types.optional(
      z.lazy(() => UserEventJobPayload1069NsnbSideEffect$inboundSchema),
    ),
    headInfo: z.lazy(() => UserEventJobPayload1069HeadInfo$inboundSchema),
    installationId: types.string(),
    owner: types.string(),
    repo: types.string(),
    repoId: types.string(),
    provider: UserEventJobPayload1069Provider$inboundSchema,
    customEnvId: z.nullable(types.string()).optional(),
    prId: z.nullable(types.number()).optional(),
  });

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

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

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

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

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

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

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

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

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

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

/** @internal */
export const UserEventJobPayload1068HeadInfo$inboundSchema: z.ZodType<
  UserEventJobPayload1068HeadInfo,
  z.ZodTypeDef,
  unknown
> = z.object({
  org: types.string(),
  ref: types.string(),
  repo: types.string(),
  sha: types.string(),
});

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

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

/** @internal */
export const Job8$inboundSchema: z.ZodType<Job8, z.ZodTypeDef, unknown> = z
  .object({
    type: types.literal("vercel-push"),
    ref: types.string(),
    repo: types.string(),
    sha: types.string(),
    repoPushedAt: z.nullable(types.number()).optional(),
    deployHook: types.optional(
      z.lazy(() => UserEventJobPayload1068DeployHook$inboundSchema),
    ),
    url: types.optional(types.string()),
    target: z.nullable(types.string()).optional(),
    deploymentId: types.optional(types.string()),
    linkedProjectId: types.optional(types.string()),
    projectId: types.optional(types.string()),
    authorized: types.optional(types.boolean()),
    authorizedBy: types.optional(types.string()),
    jobProjectIds: types.optional(z.array(types.string())),
    jobPairs: types.optional(z.array(z.array(types.string()))),
    skippedJobPairs: types.optional(z.array(z.array(types.string()))),
    gitHashtagVercel: types.optional(
      z.array(UserEventJobPayload106GitHashtagVercel$inboundSchema),
    ),
    connectedProjectCount: types.optional(types.number()),
    prIdOrZero: types.optional(types.number()),
    gitComments: types.optional(
      z.lazy(() => UserEventJobPayload1068GitComments$inboundSchema),
    ),
    isManualGitDeploy: types.optional(types.boolean()),
    commitVerification: types.optional(
      UserEventJobPayload106CommitVerification$inboundSchema,
    ),
    nsnbSideEffect: types.optional(
      z.lazy(() => UserEventJobPayload106NsnbSideEffect$inboundSchema),
    ),
    headInfo: z.lazy(() => UserEventJobPayload1068HeadInfo$inboundSchema),
    org: types.string(),
    provider: UserEventJobPayload1068Provider$inboundSchema,
    customEnvId: z.nullable(types.string()).optional(),
    prId: z.nullable(types.number()).optional(),
  });

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

/** @internal */
export const UserEventJobPayloadProject$inboundSchema: z.ZodType<
  UserEventJobPayloadProject,
  z.ZodTypeDef,
  unknown
> = z.object({
  defaultBranch: z.nullable(types.string()).optional(),
  id: types.string(),
  name: z.nullable(types.string()).optional(),
  namespace: z.nullable(types.string()).optional(),
  path: z.nullable(types.string()).optional(),
  url: z.nullable(types.string()).optional(),
});

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

/** @internal */
export const UserEventJobPayload1067HeadInfo$inboundSchema: z.ZodType<
  UserEventJobPayload1067HeadInfo,
  z.ZodTypeDef,
  unknown
> = z.object({
  project: z.lazy(() => UserEventJobPayloadProject$inboundSchema),
  ref: types.string(),
  sha: types.string(),
});

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

/** @internal */
export const UserEventJobProject$inboundSchema: z.ZodType<
  UserEventJobProject,
  z.ZodTypeDef,
  unknown
> = z.object({
  defaultBranch: z.nullable(types.string()).optional(),
  id: types.string(),
  name: z.nullable(types.string()).optional(),
  namespace: z.nullable(types.string()).optional(),
  path: z.nullable(types.string()).optional(),
  url: z.nullable(types.string()).optional(),
});

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

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

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

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

/** @internal */
export const Job7$inboundSchema: z.ZodType<Job7, z.ZodTypeDef, unknown> = z
  .object({
    createdAt: types.optional(types.number()),
    eventful: types.optional(types.boolean()),
    headInfo: z.lazy(() => UserEventJobPayload1067HeadInfo$inboundSchema),
    linkedProjectId: types.optional(types.string()),
    prId: types.number(),
    project: z.lazy(() => UserEventJobProject$inboundSchema),
    projectId: types.optional(types.string()),
    customEnvId: z.nullable(types.string()).optional(),
    ref: types.string(),
    sha: types.string(),
    type: types.literal("gitlab-now-comment"),
    gitComments: types.optional(
      z.lazy(() => UserEventJobPayload1067GitComments$inboundSchema),
    ),
    provider: UserEventJobPayload1067Provider$inboundSchema,
  });

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

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

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

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

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

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

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

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

/** @internal */
export const Commit$inboundSchema: z.ZodType<Commit, z.ZodTypeDef, unknown> = z
  .object({
    id: types.string(),
    authorAvatar: z.nullable(types.string()).optional(),
    authorEmail: z.nullable(types.string()).optional(),
    authorId: z.nullable(types.number()).optional(),
    authorLogin: z.nullable(types.string()).optional(),
    authorName: z.nullable(types.string()).optional(),
  });

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

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

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

/** @internal */
export const UserEventJobPayload106Project$inboundSchema: z.ZodType<
  UserEventJobPayload106Project,
  z.ZodTypeDef,
  unknown
> = z.object({
  defaultBranch: z.nullable(types.string()).optional(),
  id: types.string(),
  name: z.nullable(types.string()).optional(),
  namespace: z.nullable(types.string()).optional(),
  path: z.nullable(types.string()).optional(),
  url: z.nullable(types.string()).optional(),
});

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

/** @internal */
export const UserEventJobPayload1066HeadInfo$inboundSchema: z.ZodType<
  UserEventJobPayload1066HeadInfo,
  z.ZodTypeDef,
  unknown
> = z.object({
  project: z.lazy(() => UserEventJobPayload106Project$inboundSchema),
  ref: types.string(),
  sha: types.string(),
});

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

/** @internal */
export const JobProject$inboundSchema: z.ZodType<
  JobProject,
  z.ZodTypeDef,
  unknown
> = z.object({
  defaultBranch: z.nullable(types.string()).optional(),
  id: types.string(),
  name: z.nullable(types.string()).optional(),
  namespace: z.nullable(types.string()).optional(),
  path: z.nullable(types.string()).optional(),
  url: z.nullable(types.string()).optional(),
});

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

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

/** @internal */
export const Job6$inboundSchema: z.ZodType<Job6, z.ZodTypeDef, unknown> = z
  .object({
    type: types.literal("gitlab-push"),
    authorized: types.optional(types.boolean()),
    authorizedBy: types.optional(types.string()),
    jobProjectIds: types.optional(z.array(types.string())),
    jobPairs: types.optional(z.array(z.array(types.string()))),
    skippedJobPairs: types.optional(z.array(z.array(types.string()))),
    gitHashtagVercel: types.optional(
      z.array(UserEventJobPayloadGitHashtagVercel$inboundSchema),
    ),
    connectedProjectCount: types.optional(types.number()),
    prIdOrZero: types.optional(types.number()),
    gitComments: types.optional(
      z.lazy(() => UserEventJobPayload1066GitComments$inboundSchema),
    ),
    isManualGitDeploy: types.optional(types.boolean()),
    commitVerification: types.optional(
      UserEventJobPayloadCommitVerification$inboundSchema,
    ),
    nsnbSideEffect: types.optional(
      z.lazy(() => UserEventJobPayloadNsnbSideEffect$inboundSchema),
    ),
    commit: types.optional(z.lazy(() => Commit$inboundSchema)),
    createdAt: types.optional(types.number()),
    deployHook: types.optional(
      z.lazy(() => UserEventJobPayload106DeployHook$inboundSchema),
    ),
    deploymentId: types.optional(types.string()),
    eventful: types.optional(types.boolean()),
    forceNew: types.optional(types.boolean()),
    headInfo: z.lazy(() => UserEventJobPayload1066HeadInfo$inboundSchema),
    linkedProjectId: types.optional(types.string()),
    prId: types.optional(types.number()),
    project: z.lazy(() => JobProject$inboundSchema),
    projectId: types.optional(types.string()),
    customEnvId: z.nullable(types.string()).optional(),
    ref: types.string(),
    repoPushedAt: z.nullable(types.number()).optional(),
    sha: types.string(),
    silent: types.optional(types.boolean()),
    target: z.nullable(types.string()).optional(),
    url: types.optional(types.string()),
    withCache: types.optional(types.boolean()),
    provider: UserEventJobPayload1066Provider$inboundSchema,
  });

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

/** @internal */
export const UserEventJobPayload106HeadInfo$inboundSchema: z.ZodType<
  UserEventJobPayload106HeadInfo,
  z.ZodTypeDef,
  unknown
> = z.object({
  org: types.string(),
  ref: types.string(),
  repo: types.string(),
  repoId: types.number(),
  sha: types.string(),
});

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

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

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

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

/** @internal */
export const Job5$inboundSchema: z.ZodType<Job5, z.ZodTypeDef, unknown> = z
  .object({
    createdAt: types.optional(types.number()),
    eventful: types.optional(types.boolean()),
    headInfo: z.lazy(() => UserEventJobPayload106HeadInfo$inboundSchema),
    beforeSha: types.optional(types.string()),
    installationId: types.number(),
    isPrivate: types.boolean(),
    linkedProjectId: types.optional(types.string()),
    org: types.string(),
    prId: types.number(),
    projectId: z.nullable(z.any()).optional(),
    customEnvId: z.nullable(z.any()).optional(),
    repo: types.string(),
    repoId: types.number(),
    type: types.literal("now-comment"),
    gitComments: types.optional(
      z.lazy(() => UserEventJobPayload106GitComments$inboundSchema),
    ),
    provider: UserEventJobPayload1065Provider$inboundSchema,
    customHost: types.optional(types.string()),
  });

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

/** @internal */
export const CommitInfo$inboundSchema: z.ZodType<
  CommitInfo,
  z.ZodTypeDef,
  unknown
> = z.object({
  total: types.number(),
  earliestSha: types.optional(types.string()),
});

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

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

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

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

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

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

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

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

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

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

/** @internal */
export const UserEventJobPayloadHeadInfo$inboundSchema: z.ZodType<
  UserEventJobPayloadHeadInfo,
  z.ZodTypeDef,
  unknown
> = z.object({
  org: types.string(),
  ref: types.string(),
  repo: types.string(),
  repoId: types.number(),
  sha: types.string(),
});

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

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

/** @internal */
export const Job4$inboundSchema: z.ZodType<Job4, z.ZodTypeDef, unknown> = z
  .object({
    repoPushedAt: types.nullable(types.number()),
    commitInfo: types.optional(z.lazy(() => CommitInfo$inboundSchema)),
    forced: types.optional(types.boolean()),
    type: types.literal("push"),
    authorized: types.optional(types.boolean()),
    authorizedBy: types.optional(types.string()),
    jobProjectIds: types.optional(z.array(types.string())),
    jobPairs: types.optional(z.array(z.array(types.string()))),
    skippedJobPairs: types.optional(z.array(z.array(types.string()))),
    gitHashtagVercel: types.optional(
      z.array(UserEventJobGitHashtagVercel$inboundSchema),
    ),
    connectedProjectCount: types.optional(types.number()),
    prIdOrZero: types.optional(types.number()),
    gitComments: types.optional(
      z.lazy(() => UserEventJobPayloadGitComments$inboundSchema),
    ),
    isManualGitDeploy: types.optional(types.boolean()),
    commitVerification: types.optional(
      UserEventJobCommitVerification$inboundSchema,
    ),
    nsnbSideEffect: types.optional(
      z.lazy(() => UserEventJobNsnbSideEffect$inboundSchema),
    ),
    committerGitUserId: types.optional(types.number()),
    committerGitUserType: types.optional(types.string()),
    createdAt: types.optional(types.number()),
    forceNew: types.optional(types.boolean()),
    deploymentId: types.optional(types.string()),
    deployHook: types.optional(
      z.lazy(() => UserEventJobPayloadDeployHook$inboundSchema),
    ),
    beforeSha: types.optional(types.string()),
    defaultBranch: types.optional(types.string()),
    eventful: types.optional(types.boolean()),
    githubDeploymentId: types.optional(types.string()),
    headInfo: z.lazy(() => UserEventJobPayloadHeadInfo$inboundSchema),
    installationId: types.number(),
    isPrivate: types.boolean(),
    linkedProjectId: types.optional(types.string()),
    org: types.string(),
    prId: types.nullable(types.number()),
    projectId: types.optional(types.string()),
    customEnvId: z.nullable(types.string()).optional(),
    repo: types.string(),
    repoId: types.number(),
    target: z.nullable(types.string()).optional(),
    url: types.optional(types.string()),
    withCache: types.optional(types.boolean()),
    provider: UserEventJobPayload106Provider$inboundSchema,
    customHost: types.optional(types.string()),
  });

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

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

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

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

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

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

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

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

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

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

/** @internal */
export const UserEventJobHeadInfo$inboundSchema: z.ZodType<
  UserEventJobHeadInfo,
  z.ZodTypeDef,
  unknown
> = z.object({
  org: types.string(),
  ref: types.string(),
  repo: types.string(),
  repoId: types.number(),
  sha: types.string(),
});

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

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

/** @internal */
export const Job3$inboundSchema: z.ZodType<Job3, z.ZodTypeDef, unknown> = z
  .object({
    prId: types.number(),
    type: types.literal("pr"),
    authorized: types.optional(types.boolean()),
    authorizedBy: types.optional(types.string()),
    jobProjectIds: types.optional(z.array(types.string())),
    jobPairs: types.optional(z.array(z.array(types.string()))),
    skippedJobPairs: types.optional(z.array(z.array(types.string()))),
    gitHashtagVercel: types.optional(
      z.array(JobGitHashtagVercel$inboundSchema),
    ),
    connectedProjectCount: types.optional(types.number()),
    prIdOrZero: types.optional(types.number()),
    gitComments: types.optional(
      z.lazy(() => UserEventJobGitComments$inboundSchema),
    ),
    isManualGitDeploy: types.optional(types.boolean()),
    commitVerification: types.optional(JobCommitVerification$inboundSchema),
    nsnbSideEffect: types.optional(
      z.lazy(() => JobNsnbSideEffect$inboundSchema),
    ),
    committerGitUserId: types.optional(types.number()),
    committerGitUserType: types.optional(types.string()),
    createdAt: types.optional(types.number()),
    forceNew: types.optional(types.boolean()),
    deploymentId: types.optional(types.string()),
    deployHook: types.optional(
      z.lazy(() => UserEventJobDeployHook$inboundSchema),
    ),
    beforeSha: types.optional(types.string()),
    defaultBranch: types.optional(types.string()),
    eventful: types.optional(types.boolean()),
    githubDeploymentId: types.optional(types.string()),
    headInfo: z.lazy(() => UserEventJobHeadInfo$inboundSchema),
    installationId: types.number(),
    isPrivate: types.boolean(),
    linkedProjectId: types.optional(types.string()),
    org: types.string(),
    projectId: types.optional(types.string()),
    customEnvId: z.nullable(types.string()).optional(),
    repo: types.string(),
    repoId: types.number(),
    target: z.nullable(types.string()).optional(),
    url: types.optional(types.string()),
    withCache: types.optional(types.boolean()),
    provider: UserEventJobPayloadProvider$inboundSchema,
    customHost: types.optional(types.string()),
  });

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

/** @internal */
export const JobHeadInfo$inboundSchema: z.ZodType<
  JobHeadInfo,
  z.ZodTypeDef,
  unknown
> = z.object({
  owner: types.string(),
  ref: types.string(),
  repoUuid: types.string(),
  sha: types.string(),
  slug: types.string(),
});

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

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

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

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

/** @internal */
export const Job2$inboundSchema: z.ZodType<Job2, z.ZodTypeDef, unknown> = z
  .object({
    createdAt: types.optional(types.number()),
    eventful: types.optional(types.boolean()),
    headInfo: z.lazy(() => JobHeadInfo$inboundSchema),
    linkedProjectId: types.optional(types.string()),
    name: types.string(),
    owner: types.string(),
    prId: types.number(),
    projectId: types.optional(types.string()),
    customEnvId: z.nullable(types.string()).optional(),
    ref: types.string(),
    repoUuid: types.string(),
    sha: types.string(),
    slug: types.string(),
    type: types.literal("bitbucket-now-comment"),
    workspaceUuid: types.string(),
    gitComments: types.optional(z.lazy(() => JobGitComments$inboundSchema)),
    provider: UserEventJobProvider$inboundSchema,
  });

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

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

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

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

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

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

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

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

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

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

/** @internal */
export const HeadInfo$inboundSchema: z.ZodType<
  HeadInfo,
  z.ZodTypeDef,
  unknown
> = z.object({
  owner: types.string(),
  ref: types.string(),
  repoUuid: types.string(),
  sha: types.string(),
  slug: types.string(),
});

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

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

/** @internal */
export const Job1$inboundSchema: z.ZodType<Job1, z.ZodTypeDef, unknown> = z
  .object({
    type: types.literal("bitbucket-push"),
    authorized: types.optional(types.boolean()),
    authorizedBy: types.optional(types.string()),
    jobProjectIds: types.optional(z.array(types.string())),
    jobPairs: types.optional(z.array(z.array(types.string()))),
    skippedJobPairs: types.optional(z.array(z.array(types.string()))),
    gitHashtagVercel: types.optional(z.array(GitHashtagVercel$inboundSchema)),
    connectedProjectCount: types.optional(types.number()),
    prIdOrZero: types.optional(types.number()),
    gitComments: types.optional(z.lazy(() => GitComments$inboundSchema)),
    isManualGitDeploy: types.optional(types.boolean()),
    commitVerification: types.optional(CommitVerification$inboundSchema),
    nsnbSideEffect: types.optional(z.lazy(() => NsnbSideEffect$inboundSchema)),
    createdAt: types.optional(types.number()),
    deploymentId: types.optional(types.string()),
    deployHook: types.optional(z.lazy(() => JobDeployHook$inboundSchema)),
    eventful: types.optional(types.boolean()),
    forceNew: types.optional(types.boolean()),
    headInfo: z.lazy(() => HeadInfo$inboundSchema),
    linkedProjectId: types.optional(types.string()),
    name: types.string(),
    owner: types.string(),
    prId: types.optional(types.number()),
    projectId: types.optional(types.string()),
    customEnvId: z.nullable(types.string()).optional(),
    ref: types.string(),
    repoPushedAt: z.nullable(types.number()).optional(),
    repoUuid: types.string(),
    sha: types.string(),
    silent: types.optional(types.boolean()),
    slug: types.string(),
    target: z.nullable(types.string()).optional(),
    url: types.optional(types.string()),
    withCache: types.optional(types.boolean()),
    workspaceUuid: types.string(),
    provider: JobProvider$inboundSchema,
  });

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

/** @internal */
export const PayloadJob$inboundSchema: z.ZodType<
  PayloadJob,
  z.ZodTypeDef,
  unknown
> = z.union([
  z.lazy(() => Job1$inboundSchema),
  z.lazy(() => Job2$inboundSchema),
  z.lazy(() => Job3$inboundSchema),
  z.lazy(() => Job4$inboundSchema),
  z.lazy(() => Job5$inboundSchema),
  z.lazy(() => Job6$inboundSchema),
  z.lazy(() => Job7$inboundSchema),
  z.lazy(() => Job8$inboundSchema),
  z.lazy(() => Job9$inboundSchema),
  z.lazy(() => Job10$inboundSchema),
]);

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

/** @internal */
export const OneHundredAndSix$inboundSchema: z.ZodType<
  OneHundredAndSix,
  z.ZodTypeDef,
  unknown
> = z.object({
  job: z.union([
    z.lazy(() => Job1$inboundSchema),
    z.lazy(() => Job2$inboundSchema),
    z.lazy(() => Job3$inboundSchema),
    z.lazy(() => Job4$inboundSchema),
    z.lazy(() => Job5$inboundSchema),
    z.lazy(() => Job6$inboundSchema),
    z.lazy(() => Job7$inboundSchema),
    z.lazy(() => Job8$inboundSchema),
    z.lazy(() => Job9$inboundSchema),
    z.lazy(() => Job10$inboundSchema),
  ]),
});

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

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

/** @internal */
export const UserEventPayloadDeployment$inboundSchema: z.ZodType<
  UserEventPayloadDeployment,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: types.string(),
  name: types.string(),
  url: types.string(),
  meta: z.record(types.string()),
  readyState: types.optional(types.string()),
  allowListedReadyStateReasonInternal: types.optional(
    UserEventPayloadAllowListedReadyStateReasonInternal$inboundSchema,
  ),
});

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

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