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

import * as z from "zod/v3";
import { remap as remap$ } from "../lib/primitives.js";
import { safeParse } from "../lib/schemas.js";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
import {
  ThreeHundred,
  ThreeHundred$inboundSchema,
  ThreeHundredAndOne,
  ThreeHundredAndOne$inboundSchema,
  ThreeHundredAndThree,
  ThreeHundredAndThree$inboundSchema,
  ThreeHundredAndTwo,
  ThreeHundredAndTwo$inboundSchema,
  TwoHundredAndEighty,
  TwoHundredAndEighty$inboundSchema,
  TwoHundredAndEightyEight,
  TwoHundredAndEightyEight$inboundSchema,
  TwoHundredAndEightyFive,
  TwoHundredAndEightyFive$inboundSchema,
  TwoHundredAndEightyFour,
  TwoHundredAndEightyFour$inboundSchema,
  TwoHundredAndEightyNine,
  TwoHundredAndEightyNine$inboundSchema,
  TwoHundredAndEightyOne,
  TwoHundredAndEightyOne$inboundSchema,
  TwoHundredAndEightySeven,
  TwoHundredAndEightySeven$inboundSchema,
  TwoHundredAndEightySix,
  TwoHundredAndEightySix$inboundSchema,
  TwoHundredAndEightyThree,
  TwoHundredAndEightyThree$inboundSchema,
  TwoHundredAndEightyTwo,
  TwoHundredAndEightyTwo$inboundSchema,
  TwoHundredAndFifty,
  TwoHundredAndFifty$inboundSchema,
  TwoHundredAndFiftyEight,
  TwoHundredAndFiftyEight$inboundSchema,
  TwoHundredAndFiftyFive,
  TwoHundredAndFiftyFive$inboundSchema,
  TwoHundredAndFiftyFour,
  TwoHundredAndFiftyFour$inboundSchema,
  TwoHundredAndFiftyNine,
  TwoHundredAndFiftyNine$inboundSchema,
  TwoHundredAndFiftyOne,
  TwoHundredAndFiftyOne$inboundSchema,
  TwoHundredAndFiftySeven,
  TwoHundredAndFiftySeven$inboundSchema,
  TwoHundredAndFiftySix,
  TwoHundredAndFiftySix$inboundSchema,
  TwoHundredAndFiftyThree,
  TwoHundredAndFiftyThree$inboundSchema,
  TwoHundredAndFiftyTwo,
  TwoHundredAndFiftyTwo$inboundSchema,
  TwoHundredAndFortyEight,
  TwoHundredAndFortyEight$inboundSchema,
  TwoHundredAndFortyFive,
  TwoHundredAndFortyFive$inboundSchema,
  TwoHundredAndFortyNine,
  TwoHundredAndFortyNine$inboundSchema,
  TwoHundredAndFortySeven,
  TwoHundredAndFortySeven$inboundSchema,
  TwoHundredAndFortySix,
  TwoHundredAndFortySix$inboundSchema,
  TwoHundredAndNinety,
  TwoHundredAndNinety$inboundSchema,
  TwoHundredAndNinetyEight,
  TwoHundredAndNinetyEight$inboundSchema,
  TwoHundredAndNinetyFive,
  TwoHundredAndNinetyFive$inboundSchema,
  TwoHundredAndNinetyFour,
  TwoHundredAndNinetyFour$inboundSchema,
  TwoHundredAndNinetyNine,
  TwoHundredAndNinetyNine$inboundSchema,
  TwoHundredAndNinetyOne,
  TwoHundredAndNinetyOne$inboundSchema,
  TwoHundredAndNinetySeven,
  TwoHundredAndNinetySeven$inboundSchema,
  TwoHundredAndNinetySix,
  TwoHundredAndNinetySix$inboundSchema,
  TwoHundredAndNinetyThree,
  TwoHundredAndNinetyThree$inboundSchema,
  TwoHundredAndNinetyTwo,
  TwoHundredAndNinetyTwo$inboundSchema,
  TwoHundredAndSeventy,
  TwoHundredAndSeventy$inboundSchema,
  TwoHundredAndSeventyEight,
  TwoHundredAndSeventyEight$inboundSchema,
  TwoHundredAndSeventyFive,
  TwoHundredAndSeventyFive$inboundSchema,
  TwoHundredAndSeventyFour,
  TwoHundredAndSeventyFour$inboundSchema,
  TwoHundredAndSeventyNine,
  TwoHundredAndSeventyNine$inboundSchema,
  TwoHundredAndSeventyOne,
  TwoHundredAndSeventyOne$inboundSchema,
  TwoHundredAndSeventySeven,
  TwoHundredAndSeventySeven$inboundSchema,
  TwoHundredAndSeventySix,
  TwoHundredAndSeventySix$inboundSchema,
  TwoHundredAndSeventyThree,
  TwoHundredAndSeventyThree$inboundSchema,
  TwoHundredAndSeventyTwo,
  TwoHundredAndSeventyTwo$inboundSchema,
  TwoHundredAndSixty,
  TwoHundredAndSixty$inboundSchema,
  TwoHundredAndSixtyEight,
  TwoHundredAndSixtyEight$inboundSchema,
  TwoHundredAndSixtyFive,
  TwoHundredAndSixtyFive$inboundSchema,
  TwoHundredAndSixtyFour,
  TwoHundredAndSixtyFour$inboundSchema,
  TwoHundredAndSixtyNine,
  TwoHundredAndSixtyNine$inboundSchema,
  TwoHundredAndSixtyOne,
  TwoHundredAndSixtyOne$inboundSchema,
  TwoHundredAndSixtySeven,
  TwoHundredAndSixtySeven$inboundSchema,
  TwoHundredAndSixtySix,
  TwoHundredAndSixtySix$inboundSchema,
  TwoHundredAndSixtyThree,
  TwoHundredAndSixtyThree$inboundSchema,
  TwoHundredAndSixtyTwo,
  TwoHundredAndSixtyTwo$inboundSchema,
} from "./consent.js";
import {
  Eighty,
  Eighty$inboundSchema,
  EightyEight,
  EightyEight$inboundSchema,
  EightyFive,
  EightyFive$inboundSchema,
  EightyFour,
  EightyFour$inboundSchema,
  EightyNine,
  EightyNine$inboundSchema,
  EightyOne,
  EightyOne$inboundSchema,
  EightySeven,
  EightySeven$inboundSchema,
  EightySix,
  EightySix$inboundSchema,
  EightyThree,
  EightyThree$inboundSchema,
  EightyTwo,
  EightyTwo$inboundSchema,
  FiftyEight,
  FiftyEight$inboundSchema,
  FiftyNine,
  FiftyNine$inboundSchema,
  FiftySeven,
  FiftySeven$inboundSchema,
  FiftySix,
  FiftySix$inboundSchema,
  Ninety,
  Ninety$inboundSchema,
  NinetyEight,
  NinetyEight$inboundSchema,
  NinetyFive,
  NinetyFive$inboundSchema,
  NinetyFour,
  NinetyFour$inboundSchema,
  NinetyNine,
  NinetyNine$inboundSchema,
  NinetyOne,
  NinetyOne$inboundSchema,
  NinetySeven,
  NinetySeven$inboundSchema,
  NinetySix,
  NinetySix$inboundSchema,
  NinetyThree,
  NinetyThree$inboundSchema,
  NinetyTwo,
  NinetyTwo$inboundSchema,
  OneHundred,
  OneHundred$inboundSchema,
  OneHundredAndEight,
  OneHundredAndEight$inboundSchema,
  OneHundredAndFive,
  OneHundredAndFive$inboundSchema,
  OneHundredAndFour,
  OneHundredAndFour$inboundSchema,
  OneHundredAndNine,
  OneHundredAndNine$inboundSchema,
  OneHundredAndOne,
  OneHundredAndOne$inboundSchema,
  OneHundredAndSeven,
  OneHundredAndSeven$inboundSchema,
  OneHundredAndSix,
  OneHundredAndSix$inboundSchema,
  OneHundredAndTen,
  OneHundredAndTen$inboundSchema,
  OneHundredAndThree,
  OneHundredAndThree$inboundSchema,
  OneHundredAndTwo,
  OneHundredAndTwo$inboundSchema,
  Seventy,
  Seventy$inboundSchema,
  SeventyEight,
  SeventyEight$inboundSchema,
  SeventyFive,
  SeventyFive$inboundSchema,
  SeventyFour,
  SeventyFour$inboundSchema,
  SeventyNine,
  SeventyNine$inboundSchema,
  SeventyOne,
  SeventyOne$inboundSchema,
  SeventySeven,
  SeventySeven$inboundSchema,
  SeventySix,
  SeventySix$inboundSchema,
  SeventyThree,
  SeventyThree$inboundSchema,
  SeventyTwo,
  SeventyTwo$inboundSchema,
  Sixty,
  Sixty$inboundSchema,
  SixtyEight,
  SixtyEight$inboundSchema,
  SixtyFive,
  SixtyFive$inboundSchema,
  SixtyFour,
  SixtyFour$inboundSchema,
  SixtyNine,
  SixtyNine$inboundSchema,
  SixtyOne,
  SixtyOne$inboundSchema,
  SixtySeven,
  SixtySeven$inboundSchema,
  SixtySix,
  SixtySix$inboundSchema,
  SixtyThree,
  SixtyThree$inboundSchema,
  SixtyTwo,
  SixtyTwo$inboundSchema,
} from "./fiftysix.js";
import {
  OneHundredAndEighteen,
  OneHundredAndEighteen$inboundSchema,
  OneHundredAndEleven,
  OneHundredAndEleven$inboundSchema,
  OneHundredAndFifteen,
  OneHundredAndFifteen$inboundSchema,
  OneHundredAndFourteen,
  OneHundredAndFourteen$inboundSchema,
  OneHundredAndNineteen,
  OneHundredAndNineteen$inboundSchema,
  OneHundredAndSeventeen,
  OneHundredAndSeventeen$inboundSchema,
  OneHundredAndSixteen,
  OneHundredAndSixteen$inboundSchema,
  OneHundredAndThirteen,
  OneHundredAndThirteen$inboundSchema,
  OneHundredAndThirty,
  OneHundredAndThirty$inboundSchema,
  OneHundredAndThirtyEight,
  OneHundredAndThirtyEight$inboundSchema,
  OneHundredAndThirtyFive,
  OneHundredAndThirtyFive$inboundSchema,
  OneHundredAndThirtyFour,
  OneHundredAndThirtyFour$inboundSchema,
  OneHundredAndThirtyOne,
  OneHundredAndThirtyOne$inboundSchema,
  OneHundredAndThirtySeven,
  OneHundredAndThirtySeven$inboundSchema,
  OneHundredAndThirtySix,
  OneHundredAndThirtySix$inboundSchema,
  OneHundredAndThirtyThree,
  OneHundredAndThirtyThree$inboundSchema,
  OneHundredAndThirtyTwo,
  OneHundredAndThirtyTwo$inboundSchema,
  OneHundredAndTwelve,
  OneHundredAndTwelve$inboundSchema,
  OneHundredAndTwenty,
  OneHundredAndTwenty$inboundSchema,
  OneHundredAndTwentyEight,
  OneHundredAndTwentyEight$inboundSchema,
  OneHundredAndTwentyFive,
  OneHundredAndTwentyFive$inboundSchema,
  OneHundredAndTwentyFour,
  OneHundredAndTwentyFour$inboundSchema,
  OneHundredAndTwentyNine,
  OneHundredAndTwentyNine$inboundSchema,
  OneHundredAndTwentyOne,
  OneHundredAndTwentyOne$inboundSchema,
  OneHundredAndTwentySeven,
  OneHundredAndTwentySeven$inboundSchema,
  OneHundredAndTwentySix,
  OneHundredAndTwentySix$inboundSchema,
  OneHundredAndTwentyThree,
  OneHundredAndTwentyThree$inboundSchema,
  OneHundredAndTwentyTwo,
  OneHundredAndTwentyTwo$inboundSchema,
} from "./onehundredandeleven.js";
import {
  OneHundredAndEighty,
  OneHundredAndEighty$inboundSchema,
  OneHundredAndEightyEight,
  OneHundredAndEightyEight$inboundSchema,
  OneHundredAndEightyFive,
  OneHundredAndEightyFive$inboundSchema,
  OneHundredAndEightyFour,
  OneHundredAndEightyFour$inboundSchema,
  OneHundredAndEightyNine,
  OneHundredAndEightyNine$inboundSchema,
  OneHundredAndEightyOne,
  OneHundredAndEightyOne$inboundSchema,
  OneHundredAndEightySeven,
  OneHundredAndEightySeven$inboundSchema,
  OneHundredAndEightySix,
  OneHundredAndEightySix$inboundSchema,
  OneHundredAndEightyThree,
  OneHundredAndEightyThree$inboundSchema,
  OneHundredAndEightyTwo,
  OneHundredAndEightyTwo$inboundSchema,
  OneHundredAndNinety,
  OneHundredAndNinety$inboundSchema,
  OneHundredAndNinetyEight,
  OneHundredAndNinetyEight$inboundSchema,
  OneHundredAndNinetyFive,
  OneHundredAndNinetyFive$inboundSchema,
  OneHundredAndNinetyFour,
  OneHundredAndNinetyFour$inboundSchema,
  OneHundredAndNinetyNine,
  OneHundredAndNinetyNine$inboundSchema,
  OneHundredAndNinetyOne,
  OneHundredAndNinetyOne$inboundSchema,
  OneHundredAndNinetySeven,
  OneHundredAndNinetySeven$inboundSchema,
  OneHundredAndNinetySix,
  OneHundredAndNinetySix$inboundSchema,
  OneHundredAndNinetyThree,
  OneHundredAndNinetyThree$inboundSchema,
  OneHundredAndNinetyTwo,
  OneHundredAndNinetyTwo$inboundSchema,
  OneHundredAndSeventyEight,
  OneHundredAndSeventyEight$inboundSchema,
  OneHundredAndSeventyFive,
  OneHundredAndSeventyFive$inboundSchema,
  OneHundredAndSeventyNine,
  OneHundredAndSeventyNine$inboundSchema,
  OneHundredAndSeventySeven,
  OneHundredAndSeventySeven$inboundSchema,
  OneHundredAndSeventySix,
  OneHundredAndSeventySix$inboundSchema,
  TwoHundred,
  TwoHundred$inboundSchema,
  TwoHundredAndEight,
  TwoHundredAndEight$inboundSchema,
  TwoHundredAndEighteen,
  TwoHundredAndEighteen$inboundSchema,
  TwoHundredAndEleven,
  TwoHundredAndEleven$inboundSchema,
  TwoHundredAndFifteen,
  TwoHundredAndFifteen$inboundSchema,
  TwoHundredAndFive,
  TwoHundredAndFive$inboundSchema,
  TwoHundredAndForty,
  TwoHundredAndForty$inboundSchema,
  TwoHundredAndFortyFour,
  TwoHundredAndFortyFour$inboundSchema,
  TwoHundredAndFortyOne,
  TwoHundredAndFortyOne$inboundSchema,
  TwoHundredAndFortyThree,
  TwoHundredAndFortyThree$inboundSchema,
  TwoHundredAndFortyTwo,
  TwoHundredAndFortyTwo$inboundSchema,
  TwoHundredAndFour,
  TwoHundredAndFour$inboundSchema,
  TwoHundredAndFourteen,
  TwoHundredAndFourteen$inboundSchema,
  TwoHundredAndNine,
  TwoHundredAndNine$inboundSchema,
  TwoHundredAndNineteen,
  TwoHundredAndNineteen$inboundSchema,
  TwoHundredAndOne,
  TwoHundredAndOne$inboundSchema,
  TwoHundredAndSeven,
  TwoHundredAndSeven$inboundSchema,
  TwoHundredAndSeventeen,
  TwoHundredAndSeventeen$inboundSchema,
  TwoHundredAndSix,
  TwoHundredAndSix$inboundSchema,
  TwoHundredAndSixteen,
  TwoHundredAndSixteen$inboundSchema,
  TwoHundredAndTen,
  TwoHundredAndTen$inboundSchema,
  TwoHundredAndThirteen,
  TwoHundredAndThirteen$inboundSchema,
  TwoHundredAndThirty,
  TwoHundredAndThirty$inboundSchema,
  TwoHundredAndThirtyEight,
  TwoHundredAndThirtyEight$inboundSchema,
  TwoHundredAndThirtyFive,
  TwoHundredAndThirtyFive$inboundSchema,
  TwoHundredAndThirtyFour,
  TwoHundredAndThirtyFour$inboundSchema,
  TwoHundredAndThirtyNine,
  TwoHundredAndThirtyNine$inboundSchema,
  TwoHundredAndThirtyOne,
  TwoHundredAndThirtyOne$inboundSchema,
  TwoHundredAndThirtySeven,
  TwoHundredAndThirtySeven$inboundSchema,
  TwoHundredAndThirtySix,
  TwoHundredAndThirtySix$inboundSchema,
  TwoHundredAndThirtyThree,
  TwoHundredAndThirtyThree$inboundSchema,
  TwoHundredAndThirtyTwo,
  TwoHundredAndThirtyTwo$inboundSchema,
  TwoHundredAndThree,
  TwoHundredAndThree$inboundSchema,
  TwoHundredAndTwelve,
  TwoHundredAndTwelve$inboundSchema,
  TwoHundredAndTwenty,
  TwoHundredAndTwenty$inboundSchema,
  TwoHundredAndTwentyEight,
  TwoHundredAndTwentyEight$inboundSchema,
  TwoHundredAndTwentyFive,
  TwoHundredAndTwentyFive$inboundSchema,
  TwoHundredAndTwentyFour,
  TwoHundredAndTwentyFour$inboundSchema,
  TwoHundredAndTwentyNine,
  TwoHundredAndTwentyNine$inboundSchema,
  TwoHundredAndTwentyOne,
  TwoHundredAndTwentyOne$inboundSchema,
  TwoHundredAndTwentySeven,
  TwoHundredAndTwentySeven$inboundSchema,
  TwoHundredAndTwentySix,
  TwoHundredAndTwentySix$inboundSchema,
  TwoHundredAndTwentyThree,
  TwoHundredAndTwentyThree$inboundSchema,
  TwoHundredAndTwentyTwo,
  TwoHundredAndTwentyTwo$inboundSchema,
  TwoHundredAndTwo,
  TwoHundredAndTwo$inboundSchema,
} from "./removedusers.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
import {
  Categories,
  Categories$inboundSchema,
  Entities,
  Entities$inboundSchema,
  Principal,
  Principal$inboundSchema,
  ThreeHundredAndEight,
  ThreeHundredAndEight$inboundSchema,
  ThreeHundredAndEighteen,
  ThreeHundredAndEighteen$inboundSchema,
  ThreeHundredAndEleven,
  ThreeHundredAndEleven$inboundSchema,
  ThreeHundredAndFifteen,
  ThreeHundredAndFifteen$inboundSchema,
  ThreeHundredAndFifty,
  ThreeHundredAndFifty$inboundSchema,
  ThreeHundredAndFiftyFive,
  ThreeHundredAndFiftyFive$inboundSchema,
  ThreeHundredAndFiftyFour,
  ThreeHundredAndFiftyFour$inboundSchema,
  ThreeHundredAndFiftyOne,
  ThreeHundredAndFiftyOne$inboundSchema,
  ThreeHundredAndFiftySix,
  ThreeHundredAndFiftySix$inboundSchema,
  ThreeHundredAndFiftyThree,
  ThreeHundredAndFiftyThree$inboundSchema,
  ThreeHundredAndFiftyTwo,
  ThreeHundredAndFiftyTwo$inboundSchema,
  ThreeHundredAndFive,
  ThreeHundredAndFive$inboundSchema,
  ThreeHundredAndForty,
  ThreeHundredAndForty$inboundSchema,
  ThreeHundredAndFortyEight,
  ThreeHundredAndFortyEight$inboundSchema,
  ThreeHundredAndFortyFive,
  ThreeHundredAndFortyFive$inboundSchema,
  ThreeHundredAndFortyFour,
  ThreeHundredAndFortyFour$inboundSchema,
  ThreeHundredAndFortyNine,
  ThreeHundredAndFortyNine$inboundSchema,
  ThreeHundredAndFortyOne,
  ThreeHundredAndFortyOne$inboundSchema,
  ThreeHundredAndFortySeven,
  ThreeHundredAndFortySeven$inboundSchema,
  ThreeHundredAndFortySix,
  ThreeHundredAndFortySix$inboundSchema,
  ThreeHundredAndFortyThree,
  ThreeHundredAndFortyThree$inboundSchema,
  ThreeHundredAndFortyTwo,
  ThreeHundredAndFortyTwo$inboundSchema,
  ThreeHundredAndFour,
  ThreeHundredAndFour$inboundSchema,
  ThreeHundredAndFourteen,
  ThreeHundredAndFourteen$inboundSchema,
  ThreeHundredAndNine,
  ThreeHundredAndNine$inboundSchema,
  ThreeHundredAndNineteen,
  ThreeHundredAndNineteen$inboundSchema,
  ThreeHundredAndSeven,
  ThreeHundredAndSeven$inboundSchema,
  ThreeHundredAndSeventeen,
  ThreeHundredAndSeventeen$inboundSchema,
  ThreeHundredAndSix,
  ThreeHundredAndSix$inboundSchema,
  ThreeHundredAndSixteen,
  ThreeHundredAndSixteen$inboundSchema,
  ThreeHundredAndTen,
  ThreeHundredAndTen$inboundSchema,
  ThreeHundredAndThirteen,
  ThreeHundredAndThirteen$inboundSchema,
  ThreeHundredAndThirty,
  ThreeHundredAndThirty$inboundSchema,
  ThreeHundredAndThirtyEight,
  ThreeHundredAndThirtyEight$inboundSchema,
  ThreeHundredAndThirtyFive,
  ThreeHundredAndThirtyFive$inboundSchema,
  ThreeHundredAndThirtyFour,
  ThreeHundredAndThirtyFour$inboundSchema,
  ThreeHundredAndThirtyNine,
  ThreeHundredAndThirtyNine$inboundSchema,
  ThreeHundredAndThirtyOne,
  ThreeHundredAndThirtyOne$inboundSchema,
  ThreeHundredAndThirtySeven,
  ThreeHundredAndThirtySeven$inboundSchema,
  ThreeHundredAndThirtySix,
  ThreeHundredAndThirtySix$inboundSchema,
  ThreeHundredAndThirtyThree,
  ThreeHundredAndThirtyThree$inboundSchema,
  ThreeHundredAndThirtyTwo,
  ThreeHundredAndThirtyTwo$inboundSchema,
  ThreeHundredAndTwelve,
  ThreeHundredAndTwelve$inboundSchema,
  ThreeHundredAndTwenty,
  ThreeHundredAndTwenty$inboundSchema,
  ThreeHundredAndTwentyEight,
  ThreeHundredAndTwentyEight$inboundSchema,
  ThreeHundredAndTwentyFive,
  ThreeHundredAndTwentyFive$inboundSchema,
  ThreeHundredAndTwentyFour,
  ThreeHundredAndTwentyFour$inboundSchema,
  ThreeHundredAndTwentyNine,
  ThreeHundredAndTwentyNine$inboundSchema,
  ThreeHundredAndTwentyOne,
  ThreeHundredAndTwentyOne$inboundSchema,
  ThreeHundredAndTwentySeven,
  ThreeHundredAndTwentySeven$inboundSchema,
  ThreeHundredAndTwentySix,
  ThreeHundredAndTwentySix$inboundSchema,
  ThreeHundredAndTwentyThree,
  ThreeHundredAndTwentyThree$inboundSchema,
  ThreeHundredAndTwentyTwo,
  ThreeHundredAndTwentyTwo$inboundSchema,
  Type,
  Type$inboundSchema,
  User,
  User$inboundSchema,
  Via,
  Via$inboundSchema,
} from "./threehundredandfour.js";
import {
  OneHundredAndFifty,
  OneHundredAndFifty$inboundSchema,
  OneHundredAndFiftyEight,
  OneHundredAndFiftyEight$inboundSchema,
  OneHundredAndFiftyFive,
  OneHundredAndFiftyFive$inboundSchema,
  OneHundredAndFiftyFour,
  OneHundredAndFiftyFour$inboundSchema,
  OneHundredAndFiftyNine,
  OneHundredAndFiftyNine$inboundSchema,
  OneHundredAndFiftyOne,
  OneHundredAndFiftyOne$inboundSchema,
  OneHundredAndFiftySeven,
  OneHundredAndFiftySeven$inboundSchema,
  OneHundredAndFiftySix,
  OneHundredAndFiftySix$inboundSchema,
  OneHundredAndFiftyThree,
  OneHundredAndFiftyThree$inboundSchema,
  OneHundredAndFiftyTwo,
  OneHundredAndFiftyTwo$inboundSchema,
  OneHundredAndForty,
  OneHundredAndForty$inboundSchema,
  OneHundredAndFortyEight,
  OneHundredAndFortyEight$inboundSchema,
  OneHundredAndFortyFive,
  OneHundredAndFortyFive$inboundSchema,
  OneHundredAndFortyFour,
  OneHundredAndFortyFour$inboundSchema,
  OneHundredAndFortyNine,
  OneHundredAndFortyNine$inboundSchema,
  OneHundredAndFortyOne,
  OneHundredAndFortyOne$inboundSchema,
  OneHundredAndFortySeven,
  OneHundredAndFortySeven$inboundSchema,
  OneHundredAndFortySix,
  OneHundredAndFortySix$inboundSchema,
  OneHundredAndFortyThree,
  OneHundredAndFortyThree$inboundSchema,
  OneHundredAndFortyTwo,
  OneHundredAndFortyTwo$inboundSchema,
  OneHundredAndSeventy,
  OneHundredAndSeventy$inboundSchema,
  OneHundredAndSeventyFour,
  OneHundredAndSeventyFour$inboundSchema,
  OneHundredAndSeventyOne,
  OneHundredAndSeventyOne$inboundSchema,
  OneHundredAndSeventyThree,
  OneHundredAndSeventyThree$inboundSchema,
  OneHundredAndSeventyTwo,
  OneHundredAndSeventyTwo$inboundSchema,
  OneHundredAndSixty,
  OneHundredAndSixty$inboundSchema,
  OneHundredAndSixtyEight,
  OneHundredAndSixtyEight$inboundSchema,
  OneHundredAndSixtyFive,
  OneHundredAndSixtyFive$inboundSchema,
  OneHundredAndSixtyFour,
  OneHundredAndSixtyFour$inboundSchema,
  OneHundredAndSixtyNine,
  OneHundredAndSixtyNine$inboundSchema,
  OneHundredAndSixtyOne,
  OneHundredAndSixtyOne$inboundSchema,
  OneHundredAndSixtySeven,
  OneHundredAndSixtySeven$inboundSchema,
  OneHundredAndSixtySix,
  OneHundredAndSixtySix$inboundSchema,
  OneHundredAndSixtyThree,
  OneHundredAndSixtyThree$inboundSchema,
  OneHundredAndSixtyTwo,
  OneHundredAndSixtyTwo$inboundSchema,
  OneHundredAndThirtyNine,
  OneHundredAndThirtyNine$inboundSchema,
} from "./usereventpayload138type.js";

export const UserEventPayload55Action = {
  Mutate: "mutate",
} as const;
export type UserEventPayload55Action = ClosedEnum<
  typeof UserEventPayload55Action
>;

/**
 * The payload of the event, if requested.
 */
export type FiftyFive = {
  subscriptionId?: string | undefined;
  action: UserEventPayload55Action;
  data: { [k: string]: any };
};

export const UserEventPayload54Action = {
  ResumePlan: "resume_plan",
} as const;
export type UserEventPayload54Action = ClosedEnum<
  typeof UserEventPayload54Action
>;

export const PayloadPlanSlug = {
  V0Business: "v0_business",
  V0Teams: "v0_teams",
} as const;
export type PayloadPlanSlug = ClosedEnum<typeof PayloadPlanSlug>;

export type PayloadData = {
  planSlug: PayloadPlanSlug;
};

/**
 * The payload of the event, if requested.
 */
export type FiftyFour = {
  subscriptionId?: string | undefined;
  action: UserEventPayload54Action;
  data: PayloadData;
};

export const UserEventPayload53Action = {
  CancelPlan: "cancel_plan",
} as const;
export type UserEventPayload53Action = ClosedEnum<
  typeof UserEventPayload53Action
>;

export const PlanSlug = {
  V0Business: "v0_business",
  V0Teams: "v0_teams",
} as const;
export type PlanSlug = ClosedEnum<typeof PlanSlug>;

export const PayloadReason = {
  NonPayment: "non-payment",
} as const;
export type PayloadReason = ClosedEnum<typeof PayloadReason>;

export type UserEventPayloadData = {
  planSlug: PlanSlug;
  reason?: PayloadReason | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type FiftyThree = {
  subscriptionId?: string | undefined;
  action: UserEventPayload53Action;
  data: UserEventPayloadData;
};

/**
 * The payload of the event, if requested.
 */
export type FiftyTwo = {
  subscriptionId?: string | undefined;
  planSlug: string;
};

/**
 * The payload of the event, if requested.
 */
export type FiftyOne = {
  paymentMethodId: string;
  brand?: string | undefined;
  last4?: string | undefined;
};

export const SettlementMethod = {
  CreditedPaid: "credited-paid",
  CreditedPaymentPending: "credited-payment-pending",
  RefundedPaid: "refunded-paid",
  RefundedPaymentPending: "refunded-payment-pending",
} as const;
export type SettlementMethod = ClosedEnum<typeof SettlementMethod>;

/**
 * The payload of the event, if requested.
 */
export type Fifty = {
  invoiceId: string;
  newInvoiceId: string;
  settlementMethod: SettlementMethod;
  amount: number;
};

/**
 * The payload of the event, if requested.
 */
export type FortyNine = {
  invoiceId: string;
  amount: number;
  refundReason: string;
  lineItemCount: number;
};

/**
 * The payload of the event, if requested.
 */
export type FortyEight = {
  avatar?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type FortySeven = {
  projectId?: string | undefined;
  projectName: string;
  autoExposeSystemEnvs: boolean;
};

/**
 * The payload of the event, if requested.
 */
export type FortySix = {
  projectId: string;
  prevAttackModeEnabled?: boolean | undefined;
  prevAttackModeActiveUntil?: number | null | undefined;
  attackModeEnabled: boolean;
  attackModeActiveUntil?: number | null | undefined;
};

/**
 * Note that not all historical events have this field.
 */
export type App = {
  /**
   * The App's ID.
   */
  id: string;
  /**
   * The App's name at the moment this even was published (it may have changed since then).
   */
  name: string;
};

/**
 * The payload of the event, if requested.
 */
export type FortyFive = {
  /**
   * The App's name at the moment this even was published (it may have changed since then).
   */
  appName: string;
  /**
   * The App's ID. Note that not all historical events have this field.
   */
  appId?: string | undefined;
  /**
   * Note that not all historical events have this field.
   */
  app?: App | undefined;
  /**
   * UNIX timestamp in seconds. Tokens issued before this timestamp will be revoked. Note that not all historical events have this field.
   */
  issuedBefore?: number | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type FortyFour = {
  appName: string;
  appId?: string | undefined;
  secretLastFourChars?: string | undefined;
};

export const UserEventPayload43Type = {
  List: "list",
} as const;
export type UserEventPayload43Type = ClosedEnum<typeof UserEventPayload43Type>;

export const UserEventPayload43ResourcesType = {
  String: "string",
} as const;
export type UserEventPayload43ResourcesType = ClosedEnum<
  typeof UserEventPayload43ResourcesType
>;

export type Items = {
  type: UserEventPayload43ResourcesType;
};

/**
 * Specific project IDs or all projects on the team (`['*']`).
 */
export type PayloadProjectIds = {
  type: UserEventPayload43Type;
  required: true;
  items: Items;
};

export type Resources = {
  /**
   * Specific project IDs or all projects on the team (`['*']`).
   */
  projectIds: PayloadProjectIds;
};

export const PayloadPermissions = {
  ReadWriteAiGatewayApiKey: "read-write:ai-gateway-api-key",
  ReadWriteAiGatewayRules: "read-write:ai-gateway-rules",
  ReadWriteAlerts: "read-write:alerts",
  ReadWriteBilling: "read-write:billing",
  ReadWriteBlob: "read-write:blob",
  ReadWriteDeployment: "read-write:deployment",
  ReadWriteDomain: "read-write:domain",
  ReadWriteDomainRegistrar: "read-write:domain-registrar",
  ReadWriteDrains: "read-write:drains",
  ReadWriteEdgeCache: "read-write:edge-cache",
  ReadWriteEdgeConfig: "read-write:edge-config",
  ReadWriteIntegrationConfiguration: "read-write:integration-configuration",
  ReadWriteIntegrationResource: "read-write:integration-resource",
  ReadWriteKms: "read-write:kms",
  ReadWriteProject: "read-write:project",
  ReadWriteProjectEnvVars: "read-write:project-env-vars",
  ReadWriteProjectEnvVarsNonProduction:
    "read-write:project-env-vars-non-production",
  ReadWriteProjectEnvVarsProduction: "read-write:project-env-vars-production",
  ReadWriteProjectFlagsNonProduction: "read-write:project-flags-non-production",
  ReadWriteProjectFlagsProduction: "read-write:project-flags-production",
  ReadWriteProjectProtectionBypass: "read-write:project-protection-bypass",
  ReadWriteRemoteCache: "read-write:remote-cache",
  ReadWriteSandbox: "read-write:sandbox",
  ReadAccessGroup: "read:access-group",
  ReadAiGatewayRules: "read:ai-gateway-rules",
  ReadAlerts: "read:alerts",
  ReadBilling: "read:billing",
  ReadDeployment: "read:deployment",
  ReadDomain: "read:domain",
  ReadEvent: "read:event",
  ReadIntegrationConfiguration: "read:integration-configuration",
  ReadKms: "read:kms",
  ReadMonitoring: "read:monitoring",
  ReadProject: "read:project",
  ReadProjectEnvVarsNonProduction: "read:project-env-vars-non-production",
  ReadProjectEnvVarsProduction: "read:project-env-vars-production",
  ReadSandbox: "read:sandbox",
  ReadTeam: "read:team",
  UseAiGateway: "use:ai-gateway",
} as const;
export type PayloadPermissions = ClosedEnum<typeof PayloadPermissions>;

/**
 * The payload of the event, if requested.
 */
export type FortyThree = {
  appName: string;
  appId?: string | undefined;
  resources?: Resources | undefined;
  permissions?: Array<PayloadPermissions> | undefined;
};

export const UserEventPayload42Type = {
  List: "list",
} as const;
export type UserEventPayload42Type = ClosedEnum<typeof UserEventPayload42Type>;

export const UserEventPayload42BeforeType = {
  String: "string",
} as const;
export type UserEventPayload42BeforeType = ClosedEnum<
  typeof UserEventPayload42BeforeType
>;

export type UserEventPayloadItems = {
  type: UserEventPayload42BeforeType;
};

/**
 * Specific project IDs or all projects on the team (`['*']`).
 */
export type UserEventPayloadProjectIds = {
  type: UserEventPayload42Type;
  required: true;
  items: UserEventPayloadItems;
};

export type UserEventPayloadResources = {
  /**
   * Specific project IDs or all projects on the team (`['*']`).
   */
  projectIds: UserEventPayloadProjectIds;
};

export const UserEventPayload42Permissions = {
  ReadWriteAiGatewayApiKey: "read-write:ai-gateway-api-key",
  ReadWriteAiGatewayRules: "read-write:ai-gateway-rules",
  ReadWriteAlerts: "read-write:alerts",
  ReadWriteBilling: "read-write:billing",
  ReadWriteBlob: "read-write:blob",
  ReadWriteDeployment: "read-write:deployment",
  ReadWriteDomain: "read-write:domain",
  ReadWriteDomainRegistrar: "read-write:domain-registrar",
  ReadWriteDrains: "read-write:drains",
  ReadWriteEdgeCache: "read-write:edge-cache",
  ReadWriteEdgeConfig: "read-write:edge-config",
  ReadWriteIntegrationConfiguration: "read-write:integration-configuration",
  ReadWriteIntegrationResource: "read-write:integration-resource",
  ReadWriteKms: "read-write:kms",
  ReadWriteProject: "read-write:project",
  ReadWriteProjectEnvVars: "read-write:project-env-vars",
  ReadWriteProjectEnvVarsNonProduction:
    "read-write:project-env-vars-non-production",
  ReadWriteProjectEnvVarsProduction: "read-write:project-env-vars-production",
  ReadWriteProjectFlagsNonProduction: "read-write:project-flags-non-production",
  ReadWriteProjectFlagsProduction: "read-write:project-flags-production",
  ReadWriteProjectProtectionBypass: "read-write:project-protection-bypass",
  ReadWriteRemoteCache: "read-write:remote-cache",
  ReadWriteSandbox: "read-write:sandbox",
  ReadAccessGroup: "read:access-group",
  ReadAiGatewayRules: "read:ai-gateway-rules",
  ReadAlerts: "read:alerts",
  ReadBilling: "read:billing",
  ReadDeployment: "read:deployment",
  ReadDomain: "read:domain",
  ReadEvent: "read:event",
  ReadIntegrationConfiguration: "read:integration-configuration",
  ReadKms: "read:kms",
  ReadMonitoring: "read:monitoring",
  ReadProject: "read:project",
  ReadProjectEnvVarsNonProduction: "read:project-env-vars-non-production",
  ReadProjectEnvVarsProduction: "read:project-env-vars-production",
  ReadSandbox: "read:sandbox",
  ReadTeam: "read:team",
  UseAiGateway: "use:ai-gateway",
} as const;
export type UserEventPayload42Permissions = ClosedEnum<
  typeof UserEventPayload42Permissions
>;

export type Before = {
  resources?: UserEventPayloadResources | undefined;
  permissions?: Array<UserEventPayload42Permissions> | undefined;
};

export const UserEventPayload42AfterType = {
  List: "list",
} as const;
export type UserEventPayload42AfterType = ClosedEnum<
  typeof UserEventPayload42AfterType
>;

export const UserEventPayload42AfterResourcesType = {
  String: "string",
} as const;
export type UserEventPayload42AfterResourcesType = ClosedEnum<
  typeof UserEventPayload42AfterResourcesType
>;

export type PayloadItems = {
  type: UserEventPayload42AfterResourcesType;
};

/**
 * Specific project IDs or all projects on the team (`['*']`).
 */
export type UserEventPayload42ProjectIds = {
  type: UserEventPayload42AfterType;
  required: true;
  items: PayloadItems;
};

export type PayloadResources = {
  /**
   * Specific project IDs or all projects on the team (`['*']`).
   */
  projectIds: UserEventPayload42ProjectIds;
};

export const UserEventPayloadPermissions = {
  ReadWriteAiGatewayApiKey: "read-write:ai-gateway-api-key",
  ReadWriteAiGatewayRules: "read-write:ai-gateway-rules",
  ReadWriteAlerts: "read-write:alerts",
  ReadWriteBilling: "read-write:billing",
  ReadWriteBlob: "read-write:blob",
  ReadWriteDeployment: "read-write:deployment",
  ReadWriteDomain: "read-write:domain",
  ReadWriteDomainRegistrar: "read-write:domain-registrar",
  ReadWriteDrains: "read-write:drains",
  ReadWriteEdgeCache: "read-write:edge-cache",
  ReadWriteEdgeConfig: "read-write:edge-config",
  ReadWriteIntegrationConfiguration: "read-write:integration-configuration",
  ReadWriteIntegrationResource: "read-write:integration-resource",
  ReadWriteKms: "read-write:kms",
  ReadWriteProject: "read-write:project",
  ReadWriteProjectEnvVars: "read-write:project-env-vars",
  ReadWriteProjectEnvVarsNonProduction:
    "read-write:project-env-vars-non-production",
  ReadWriteProjectEnvVarsProduction: "read-write:project-env-vars-production",
  ReadWriteProjectFlagsNonProduction: "read-write:project-flags-non-production",
  ReadWriteProjectFlagsProduction: "read-write:project-flags-production",
  ReadWriteProjectProtectionBypass: "read-write:project-protection-bypass",
  ReadWriteRemoteCache: "read-write:remote-cache",
  ReadWriteSandbox: "read-write:sandbox",
  ReadAccessGroup: "read:access-group",
  ReadAiGatewayRules: "read:ai-gateway-rules",
  ReadAlerts: "read:alerts",
  ReadBilling: "read:billing",
  ReadDeployment: "read:deployment",
  ReadDomain: "read:domain",
  ReadEvent: "read:event",
  ReadIntegrationConfiguration: "read:integration-configuration",
  ReadKms: "read:kms",
  ReadMonitoring: "read:monitoring",
  ReadProject: "read:project",
  ReadProjectEnvVarsNonProduction: "read:project-env-vars-non-production",
  ReadProjectEnvVarsProduction: "read:project-env-vars-production",
  ReadSandbox: "read:sandbox",
  ReadTeam: "read:team",
  UseAiGateway: "use:ai-gateway",
} as const;
export type UserEventPayloadPermissions = ClosedEnum<
  typeof UserEventPayloadPermissions
>;

export type After = {
  resources?: PayloadResources | undefined;
  permissions?: Array<UserEventPayloadPermissions> | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type FortyTwo = {
  appName: string;
  appId?: string | undefined;
  installationId?: string | undefined;
  before?: Before | undefined;
  after?: After | undefined;
};

export const NextScopes = {
  Email: "email",
  OfflineAccess: "offline_access",
  Openid: "openid",
  Profile: "profile",
} as const;
export type NextScopes = ClosedEnum<typeof NextScopes>;

export const NextPermissions = {
  Wildcard: "*",
  ReadWriteAiGatewayApiKey: "read-write:ai-gateway-api-key",
  ReadWriteAiGatewayRules: "read-write:ai-gateway-rules",
  ReadWriteAlerts: "read-write:alerts",
  ReadWriteBilling: "read-write:billing",
  ReadWriteBlob: "read-write:blob",
  ReadWriteDeployment: "read-write:deployment",
  ReadWriteDomain: "read-write:domain",
  ReadWriteDomainRegistrar: "read-write:domain-registrar",
  ReadWriteDrains: "read-write:drains",
  ReadWriteEdgeCache: "read-write:edge-cache",
  ReadWriteEdgeConfig: "read-write:edge-config",
  ReadWriteIntegrationConfiguration: "read-write:integration-configuration",
  ReadWriteIntegrationResource: "read-write:integration-resource",
  ReadWriteKms: "read-write:kms",
  ReadWriteProject: "read-write:project",
  ReadWriteProjectEnvVars: "read-write:project-env-vars",
  ReadWriteProjectEnvVarsNonProduction:
    "read-write:project-env-vars-non-production",
  ReadWriteProjectEnvVarsProduction: "read-write:project-env-vars-production",
  ReadWriteProjectFlagsNonProduction: "read-write:project-flags-non-production",
  ReadWriteProjectFlagsProduction: "read-write:project-flags-production",
  ReadWriteProjectProtectionBypass: "read-write:project-protection-bypass",
  ReadWriteRemoteCache: "read-write:remote-cache",
  ReadWriteSandbox: "read-write:sandbox",
  ReadAccessGroup: "read:access-group",
  ReadAiGatewayRules: "read:ai-gateway-rules",
  ReadAlerts: "read:alerts",
  ReadBilling: "read:billing",
  ReadDeployment: "read:deployment",
  ReadDomain: "read:domain",
  ReadEvent: "read:event",
  ReadIntegrationConfiguration: "read:integration-configuration",
  ReadKms: "read:kms",
  ReadMonitoring: "read:monitoring",
  ReadProject: "read:project",
  ReadProjectEnvVarsNonProduction: "read:project-env-vars-non-production",
  ReadProjectEnvVarsProduction: "read:project-env-vars-production",
  ReadSandbox: "read:sandbox",
  ReadTeam: "read:team",
  ReadUser: "read:user",
  UseAiGateway: "use:ai-gateway",
} as const;
export type NextPermissions = ClosedEnum<typeof NextPermissions>;

/**
 * The payload of the event, if requested.
 */
export type FortyOne = {
  appName: string;
  appId?: string | undefined;
  nextScopes: Array<NextScopes>;
  nextPermissions?: Array<NextPermissions> | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type Forty = {
  appName: string;
  appId?: string | undefined;
};

export const PayloadScopes = {
  Email: "email",
  OfflineAccess: "offline_access",
  Openid: "openid",
  Profile: "profile",
} as const;
export type PayloadScopes = ClosedEnum<typeof PayloadScopes>;

export const Permissions = {
  Wildcard: "*",
  ReadWriteAiGatewayApiKey: "read-write:ai-gateway-api-key",
  ReadWriteAiGatewayRules: "read-write:ai-gateway-rules",
  ReadWriteAlerts: "read-write:alerts",
  ReadWriteBilling: "read-write:billing",
  ReadWriteBlob: "read-write:blob",
  ReadWriteDeployment: "read-write:deployment",
  ReadWriteDomain: "read-write:domain",
  ReadWriteDomainRegistrar: "read-write:domain-registrar",
  ReadWriteDrains: "read-write:drains",
  ReadWriteEdgeCache: "read-write:edge-cache",
  ReadWriteEdgeConfig: "read-write:edge-config",
  ReadWriteIntegrationConfiguration: "read-write:integration-configuration",
  ReadWriteIntegrationResource: "read-write:integration-resource",
  ReadWriteKms: "read-write:kms",
  ReadWriteProject: "read-write:project",
  ReadWriteProjectEnvVars: "read-write:project-env-vars",
  ReadWriteProjectEnvVarsNonProduction:
    "read-write:project-env-vars-non-production",
  ReadWriteProjectEnvVarsProduction: "read-write:project-env-vars-production",
  ReadWriteProjectFlagsNonProduction: "read-write:project-flags-non-production",
  ReadWriteProjectFlagsProduction: "read-write:project-flags-production",
  ReadWriteProjectProtectionBypass: "read-write:project-protection-bypass",
  ReadWriteRemoteCache: "read-write:remote-cache",
  ReadWriteSandbox: "read-write:sandbox",
  ReadAccessGroup: "read:access-group",
  ReadAiGatewayRules: "read:ai-gateway-rules",
  ReadAlerts: "read:alerts",
  ReadBilling: "read:billing",
  ReadDeployment: "read:deployment",
  ReadDomain: "read:domain",
  ReadEvent: "read:event",
  ReadIntegrationConfiguration: "read:integration-configuration",
  ReadKms: "read:kms",
  ReadMonitoring: "read:monitoring",
  ReadProject: "read:project",
  ReadProjectEnvVarsNonProduction: "read:project-env-vars-non-production",
  ReadProjectEnvVarsProduction: "read:project-env-vars-production",
  ReadSandbox: "read:sandbox",
  ReadTeam: "read:team",
  ReadUser: "read:user",
  UseAiGateway: "use:ai-gateway",
} as const;
export type Permissions = ClosedEnum<typeof Permissions>;

/**
 * The payload of the event, if requested.
 */
export type ThirtyNine = {
  appName: string;
  appId?: string | undefined;
  scopes: Array<PayloadScopes>;
  permissions?: Array<Permissions> | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type ThirtyEight = {
  alias?: string | undefined;
  aliasId?: string | undefined;
  userId?: string | undefined;
  username?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type ThirtySeven = {
  alias?: string | undefined;
  userId?: string | undefined;
  username?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type ThirtySix = {
  alias: string;
  deploymentUrl: string;
};

export const UserEventPayload35Action = {
  Created: "created",
  Removed: "removed",
} as const;
export type UserEventPayload35Action = ClosedEnum<
  typeof UserEventPayload35Action
>;

/**
 * The payload of the event, if requested.
 */
export type ThirtyFive = {
  projectId?: string | undefined;
  projectName: string;
  alias: string;
  action: UserEventPayload35Action;
};

/**
 * The payload of the event, if requested.
 */
export type ThirtyFour = {
  aliasId?: string | undefined;
  alias?: string | undefined;
  projectId?: string | undefined;
  projectName?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type ThirtyThree = {
  alias?: string | undefined;
  email?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type ThirtyTwo = {
  alias?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type ThirtyOne = {
  alias?: string | undefined;
  email?: string | undefined;
  username?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type Thirty = {
  name?: string | undefined;
  alias: string;
  aliasId: string;
  deploymentId: string | null;
};

export type OldTeam = {
  name: string;
};

export type NewTeam = {
  name: string;
};

/**
 * The payload of the event, if requested.
 */
export type TwentyNine = {
  name?: string | undefined;
  alias: string;
  oldTeam?: OldTeam | undefined;
  newTeam?: NewTeam | 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.
 */
export const PayloadAllowListedReadyStateReasonInternal = {
  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 PayloadAllowListedReadyStateReasonInternal = ClosedEnum<
  typeof PayloadAllowListedReadyStateReasonInternal
>;

export type PayloadDeployment = {
  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?:
    | PayloadAllowListedReadyStateReasonInternal
    | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type TwentyEight = {
  projectId: string;
  aliasCount: number;
  deployment?: PayloadDeployment | null | 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.
 */
export const AllowListedReadyStateReasonInternal = {
  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 AllowListedReadyStateReasonInternal = ClosedEnum<
  typeof AllowListedReadyStateReasonInternal
>;

export type Deployment = {
  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?:
    | AllowListedReadyStateReasonInternal
    | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type TwentySeven = {
  alias?: string | undefined;
  deployment?: Deployment | null | undefined;
  ruleCount?: number | undefined;
  deploymentUrl?: string | undefined;
  aliasId?: string | undefined;
  deploymentId?: string | null | undefined;
  oldDeploymentId?: string | null | undefined;
  redirect?: string | undefined;
  redirectStatusCode?: number | null | undefined;
  target?: string | null | undefined;
  system?: boolean | undefined;
  aliasUpdatedAt?: number | undefined;
};

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

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

export type PayloadUser = {
  id: string;
  username?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type TwentyFive = {
  accessGroup: UserEventPayload25AccessGroup;
  user: PayloadUser;
  directoryType?: string | undefined;
};

export type UserEventPayload24AccessGroup = {
  id: string;
  name: string;
};

/**
 * The payload of the event, if requested.
 */
export type TwentyFour = {
  accessGroup: UserEventPayload24AccessGroup;
  name?: string | undefined;
  previousName?: string | undefined;
  teamRoles?: Array<string> | undefined;
  previousTeamRoles?: Array<string> | undefined;
  teamPermissions?: Array<string> | undefined;
  previousTeamPermissions?: Array<string> | undefined;
  entitlementsAdded?: Array<string> | undefined;
  entitlementsRemoved?: Array<string> | undefined;
};

export type UserEventPayloadAccessGroup = {
  id: string;
  name: string;
};

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

export const NextRole = {
  Admin: "ADMIN",
  ProjectDeveloper: "PROJECT_DEVELOPER",
  ProjectGuest: "PROJECT_GUEST",
  ProjectViewer: "PROJECT_VIEWER",
} as const;
export type NextRole = ClosedEnum<typeof NextRole>;

export const PreviousRole = {
  Admin: "ADMIN",
  ProjectDeveloper: "PROJECT_DEVELOPER",
  ProjectGuest: "PROJECT_GUEST",
  ProjectViewer: "PROJECT_VIEWER",
} as const;
export type PreviousRole = ClosedEnum<typeof PreviousRole>;

/**
 * The payload of the event, if requested.
 */
export type TwentyThree = {
  accessGroup: UserEventPayloadAccessGroup;
  project: Project;
  nextRole?: NextRole | null | undefined;
  previousRole?: PreviousRole | undefined;
};

export type PayloadAccessGroup = {
  id: string;
  name: string;
};

/**
 * The payload of the event, if requested.
 */
export type TwentyTwo = {
  author: string;
  accessGroup: PayloadAccessGroup;
};

export type AccessGroup = {
  id: string;
  name: string;
};

/**
 * The payload of the event, if requested.
 */
export type TwentyOne = {
  accessGroup: AccessGroup;
  teamRoles?: Array<string> | undefined;
  teamPermissions?: Array<string> | undefined;
  entitlements?: Array<string> | undefined;
};

export type VirtualModelConfig = {
  id: string;
  displayName?: string | undefined;
  modelSlug: string;
};

/**
 * The payload of the event, if requested.
 */
export type Twenty = {
  virtualModelConfig: VirtualModelConfig;
};

export type UserEventPayloadRule = {
  id: string;
  type: string;
  model?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type Nineteen = {
  rule: UserEventPayloadRule;
  enabled?: boolean | undefined;
};

export type PayloadRule = {
  id: string;
  type: string;
  model?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type Eighteen = {
  rule: PayloadRule;
};

export type Rule = {
  id: string;
  type: string;
  model?: string | undefined;
  rewriteModel?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type Seventeen = {
  rule: Rule;
};

/**
 * The payload of the event, if requested.
 */
export type Sixteen = {
  added: Array<string>;
  removed: Array<string>;
};

/**
 * The payload of the event, if requested.
 */
export type Fifteen = {
  enabled: boolean;
};

export type Credential = {
  id: string;
  name: string;
  providerSlug: string;
};

/**
 * The payload of the event, if requested.
 */
export type Fourteen = {
  credential: Credential;
};

export type UserEventPayloadApiKey = {
  id: string;
  name: string;
};

export const PayloadRefreshPeriod = {
  Daily: "daily",
  Monthly: "monthly",
  None: "none",
  Weekly: "weekly",
} as const;
export type PayloadRefreshPeriod = ClosedEnum<typeof PayloadRefreshPeriod>;

/**
 * Spend budget on an AI Gateway API key, as surfaced in activity messages. Defined locally (rather than imported from `@api/pubsub-types`) because `@api/pubsub-types` already depends on `@api/events`; importing it here would create a circular dependency. Must stay structurally aligned with `APIKeyBudget` in `@api/pubsub-types/event-payloads/api-keys`.
 */
export type PayloadBudget = {
  /**
   * Spend cap, in dollars.
   */
  limitAmount: number;
  refreshPeriod: PayloadRefreshPeriod;
};

export const Change = {
  Disable: "disable",
  Enable: "enable",
  Remove: "remove",
  Set: "set",
} as const;
export type Change = ClosedEnum<typeof Change>;

/**
 * The payload of the event, if requested.
 */
export type Thirteen = {
  apiKey: UserEventPayloadApiKey;
  /**
   * Spend budget on an AI Gateway API key, as surfaced in activity messages. Defined locally (rather than imported from `@api/pubsub-types`) because `@api/pubsub-types` already depends on `@api/events`; importing it here would create a circular dependency. Must stay structurally aligned with `APIKeyBudget` in `@api/pubsub-types/event-payloads/api-keys`.
   */
  budget?: PayloadBudget | null | undefined;
  change: Change;
};

export type PayloadApiKey = {
  id: string;
  name: string;
};

/**
 * The payload of the event, if requested.
 */
export type Twelve = {
  apiKey: PayloadApiKey;
};

export type ApiKey = {
  id: string;
  name: string;
};

export const RefreshPeriod = {
  Daily: "daily",
  Monthly: "monthly",
  None: "none",
  Weekly: "weekly",
} as const;
export type RefreshPeriod = ClosedEnum<typeof RefreshPeriod>;

/**
 * Spend budget on an AI Gateway API key, as surfaced in activity messages. Defined locally (rather than imported from `@api/pubsub-types`) because `@api/pubsub-types` already depends on `@api/events`; importing it here would create a circular dependency. Must stay structurally aligned with `APIKeyBudget` in `@api/pubsub-types/event-payloads/api-keys`.
 */
export type Budget = {
  /**
   * Spend cap, in dollars.
   */
  limitAmount: number;
  refreshPeriod: RefreshPeriod;
};

/**
 * The payload of the event, if requested.
 */
export type Eleven = {
  apiKey: ApiKey;
  /**
   * Spend budget on an AI Gateway API key, as surfaced in activity messages. Defined locally (rather than imported from `@api/pubsub-types`) because `@api/pubsub-types` already depends on `@api/events`; importing it here would create a circular dependency. Must stay structurally aligned with `APIKeyBudget` in `@api/pubsub-types/event-payloads/api-keys`.
   */
  budget?: Budget | null | undefined;
};

/**
 * Present on new events only. Equivalent to "stripe" when absent.
 */
export const UserEventPayload10Provider = {
  Chatgpt: "chatgpt",
  Stripe: "stripe",
} as const;
/**
 * Present on new events only. Equivalent to "stripe" when absent.
 */
export type UserEventPayload10Provider = ClosedEnum<
  typeof UserEventPayload10Provider
>;

export const FromPlan = {
  Hobby: "hobby",
  Pro: "pro",
} as const;
export type FromPlan = ClosedEnum<typeof FromPlan>;

export const ToPlan = {
  Hobby: "hobby",
  Pro: "pro",
} as const;
export type ToPlan = ClosedEnum<typeof ToPlan>;

/**
 * The payload of the event, if requested.
 */
export type Ten = {
  /**
   * Present on new events only. Equivalent to "stripe" when absent.
   */
  provider?: UserEventPayload10Provider | undefined;
  /**
   * Present on new events only. Equivalent to `stripeAccount` when absent.
   */
  providerAccount?: string | undefined;
  /**
   * Present when `provider` is "stripe". Equivalent to `providerAccount`.
   */
  stripeAccount?: string | undefined;
  /**
   * Present when `provider` is "stripe".
   */
  stripeOrganisation?: string | undefined;
  teamId: string;
  resourceId: string;
  fromPlan: FromPlan;
  toPlan: ToPlan;
};

/**
 * Present on new events only. Equivalent to "stripe" when absent.
 */
export const UserEventPayload9Provider = {
  Chatgpt: "chatgpt",
  Stripe: "stripe",
} as const;
/**
 * Present on new events only. Equivalent to "stripe" when absent.
 */
export type UserEventPayload9Provider = ClosedEnum<
  typeof UserEventPayload9Provider
>;

/**
 * The payload of the event, if requested.
 */
export type Nine = {
  /**
   * Present on new events only. Equivalent to "stripe" when absent.
   */
  provider?: UserEventPayload9Provider | undefined;
  /**
   * Present on new events only. Equivalent to `stripeAccount` when absent.
   */
  providerAccount?: string | undefined;
  /**
   * Present when `provider` is "stripe". Equivalent to `providerAccount`.
   */
  stripeAccount?: string | undefined;
  resourceId: string;
  projectName: string;
};

/**
 * Present on new events only. Equivalent to "stripe" when absent.
 */
export const UserEventPayload8Provider = {
  Chatgpt: "chatgpt",
  Stripe: "stripe",
} as const;
/**
 * Present on new events only. Equivalent to "stripe" when absent.
 */
export type UserEventPayload8Provider = ClosedEnum<
  typeof UserEventPayload8Provider
>;

/**
 * The payload of the event, if requested.
 */
export type Eight = {
  /**
   * Present on new events only. Equivalent to "stripe" when absent.
   */
  provider?: UserEventPayload8Provider | undefined;
  /**
   * Present on new events only. Equivalent to `stripeAccount` when absent.
   */
  providerAccount?: string | undefined;
  /**
   * Present when `provider` is "stripe". Equivalent to `providerAccount`.
   */
  stripeAccount?: string | undefined;
  /**
   * Present when `provider` is "stripe".
   */
  stripeOrganisation?: string | undefined;
  reason: string;
  blockCode: string;
};

/**
 * Present on new events only. Equivalent to "stripe" when absent.
 */
export const UserEventPayloadProvider = {
  Chatgpt: "chatgpt",
  Stripe: "stripe",
} as const;
/**
 * Present on new events only. Equivalent to "stripe" when absent.
 */
export type UserEventPayloadProvider = ClosedEnum<
  typeof UserEventPayloadProvider
>;

/**
 * The payload of the event, if requested.
 */
export type Seven = {
  /**
   * Present on new events only. Equivalent to "stripe" when absent.
   */
  provider?: UserEventPayloadProvider | undefined;
  /**
   * Present on new events only. Equivalent to `stripeAccount` when absent.
   */
  providerAccount?: string | undefined;
  /**
   * Present when `provider` is "stripe". Equivalent to `providerAccount`.
   */
  stripeAccount?: string | undefined;
  /**
   * Present when `provider` is "stripe".
   */
  stripeOrganisation?: string | undefined;
  teamId: string;
  teamSlug: string;
};

/**
 * Present on new events only. Equivalent to "stripe" when absent.
 */
export const PayloadProvider = {
  Chatgpt: "chatgpt",
  Stripe: "stripe",
} as const;
/**
 * Present on new events only. Equivalent to "stripe" when absent.
 */
export type PayloadProvider = ClosedEnum<typeof PayloadProvider>;

/**
 * The payload of the event, if requested.
 */
export type Six = {
  /**
   * Present on new events only. Equivalent to "stripe" when absent.
   */
  provider?: PayloadProvider | undefined;
  /**
   * Present on new events only. Equivalent to `stripeAccount` when absent.
   */
  providerAccount?: string | undefined;
  /**
   * Present when `provider` is "stripe". Equivalent to `providerAccount`.
   */
  stripeAccount?: string | undefined;
  /**
   * Present when `provider` is "stripe".
   */
  stripeOrganisation?: string | undefined;
  teamId: string;
};

/**
 * Present on new events only. Equivalent to "stripe" when absent.
 */
export const Provider = {
  Chatgpt: "chatgpt",
  Stripe: "stripe",
} as const;
/**
 * Present on new events only. Equivalent to "stripe" when absent.
 */
export type Provider = ClosedEnum<typeof Provider>;

/**
 * The payload of the event, if requested.
 */
export type Five = {
  /**
   * Present on new events only. Equivalent to "stripe" when absent.
   */
  provider?: Provider | undefined;
  /**
   * Present on new events only. Equivalent to `stripeAccount` when absent.
   */
  providerAccount?: string | undefined;
  /**
   * Present when `provider` is "stripe". Equivalent to `providerAccount`.
   */
  stripeAccount?: string | undefined;
  /**
   * Present when `provider` is "stripe".
   */
  stripeOrganisation?: string | undefined;
  teamId: string;
  accountRequestId: string;
};

export const UserEventPayloadAction = {
  Read: "read",
} as const;
export type UserEventPayloadAction = ClosedEnum<typeof UserEventPayloadAction>;

/**
 * The payload of the event, if requested.
 */
export type Four = {
  action: UserEventPayloadAction;
  projectName?: string | undefined;
  projectId?: string | undefined;
  environment: Array<string>;
};

export const PayloadAction = {
  Added: "added",
  Deleted: "deleted",
  Rotated: "rotated",
} as const;
export type PayloadAction = ClosedEnum<typeof PayloadAction>;

/**
 * The payload of the event, if requested.
 */
export type Payload3 = {
  action: PayloadAction;
  label?: string | undefined;
  projectName?: string | undefined;
  projectId?: string | undefined;
  environment: string;
};

export const Action = {
  Archived: "archived",
  Created: "created",
  Deleted: "deleted",
  Unarchived: "unarchived",
  Updated: "updated",
} as const;
export type Action = ClosedEnum<typeof Action>;

/**
 * The payload of the event, if requested.
 */
export type Payload2 = {
  action: Action;
  id: string;
  slug: string;
  projectId: string;
  projectName?: string | undefined;
};

/**
 * The payload of the event, if requested.
 */
export type Payload1 = {};

export type Payload =
  | TwoHundredAndNinetySix
  | OneHundredAndFortyFive
  | NinetyFour
  | OneHundredAndSixtyFive
  | TwoHundredAndTwentyFour
  | OneHundredAndThirtyNine
  | OneHundredAndFortyThree
  | TwoHundredAndTwo
  | TwoHundredAndSixtyThree
  | TwoHundredAndSeventySeven
  | TwoHundredAndSeventyNine
  | EightyEight
  | NinetyOne
  | NinetyTwo
  | NinetyThree
  | NinetyFive
  | OneHundredAndTwo
  | OneHundredAndThirtyThree
  | OneHundredAndThirtyEight
  | OneHundredAndFortyFour
  | TwoHundredAndTwelve
  | TwoHundredAndTwentySix
  | TwoHundredAndThirtySix
  | TwoHundredAndNinetyFive
  | ThreeHundredAndFiftyThree
  | Payload2
  | Ten
  | FortyNine
  | Fifty
  | EightyTwo
  | EightyFour
  | Ninety
  | OneHundred
  | OneHundredAndSeventeen
  | OneHundredAndTwentyOne
  | OneHundredAndThirtySeven
  | OneHundredAndSixtyFour
  | OneHundredAndSixtySix
  | OneHundredAndSeventyTwo
  | OneHundredAndEightyNine
  | OneHundredAndNinetyTwo
  | OneHundredAndNinetyNine
  | TwoHundredAndThree
  | TwoHundredAndFive
  | TwoHundredAndSix
  | TwoHundredAndSeven
  | TwoHundredAndEight
  | TwoHundredAndTwentyThree
  | TwoHundredAndTwentyFive
  | TwoHundredAndTwentyNine
  | TwoHundredAndFortyFive
  | TwoHundredAndFortyNine
  | TwoHundredAndFifty
  | TwoHundredAndFiftySeven
  | TwoHundredAndFiftyEight
  | TwoHundredAndFiftyNine
  | TwoHundredAndSixtyOne
  | TwoHundredAndSeventyFive
  | TwoHundredAndSeventyEight
  | TwoHundredAndEightySeven
  | TwoHundredAndEightyEight
  | TwoHundredAndNinetyFour
  | ThreeHundredAndOne
  | ThreeHundredAndFifteen
  | ThreeHundredAndTwentyNine
  | ThreeHundredAndFiftyFour
  | ThreeHundredAndFiftyFive
  | Thirty
  | ThirtyFive
  | FiftySeven
  | Sixty
  | SixtySeven
  | SixtyEight
  | SixtyNine
  | Seventy
  | EightyNine
  | OneHundredAndThree
  | OneHundredAndSix
  | OneHundredAndSeven
  | OneHundredAndEight
  | OneHundredAndThirteen
  | OneHundredAndFourteen
  | OneHundredAndSixteen
  | OneHundredAndTwenty
  | OneHundredAndTwentyTwo
  | OneHundredAndThirty
  | OneHundredAndThirtyOne
  | OneHundredAndThirtyTwo
  | OneHundredAndThirtyFour
  | OneHundredAndThirtyFive
  | OneHundredAndForty
  | OneHundredAndFortyOne
  | OneHundredAndFortySix
  | OneHundredAndFifty
  | OneHundredAndFiftyTwo
  | OneHundredAndFiftyFive
  | OneHundredAndFiftyEight
  | OneHundredAndFiftyNine
  | OneHundredAndSixty
  | OneHundredAndSixtyOne
  | OneHundredAndSixtyTwo
  | OneHundredAndSixtyThree
  | OneHundredAndSixtySeven
  | OneHundredAndSixtyEight
  | OneHundredAndSixtyNine
  | OneHundredAndSeventy
  | OneHundredAndEighty
  | OneHundredAndEightyTwo
  | OneHundredAndEightyThree
  | OneHundredAndEightyFive
  | OneHundredAndEightySeven
  | OneHundredAndEightyEight
  | OneHundredAndNinety
  | OneHundredAndNinetyOne
  | OneHundredAndNinetySeven
  | TwoHundred
  | TwoHundredAndOne
  | TwoHundredAndNine
  | TwoHundredAndTen
  | TwoHundredAndEleven
  | TwoHundredAndThirteen
  | TwoHundredAndFourteen
  | TwoHundredAndFifteen
  | TwoHundredAndSixteen
  | TwoHundredAndSeventeen
  | TwoHundredAndTwenty
  | TwoHundredAndTwentyOne
  | TwoHundredAndTwentyTwo
  | TwoHundredAndTwentySeven
  | TwoHundredAndThirtyFour
  | TwoHundredAndThirtySeven
  | TwoHundredAndThirtyEight
  | TwoHundredAndFiftyOne
  | TwoHundredAndFiftyTwo
  | TwoHundredAndFiftyThree
  | TwoHundredAndFiftyFour
  | TwoHundredAndFiftyFive
  | TwoHundredAndSixtySix
  | TwoHundredAndEighty
  | TwoHundredAndNinetyOne
  | TwoHundredAndNinetyEight
  | ThreeHundredAndNineteen
  | ThreeHundredAndFortyThree
  | ThreeHundredAndFortyFour
  | ThreeHundredAndFortyFive
  | ThreeHundredAndFortySix
  | ThreeHundredAndFiftyTwo
  | Payload3
  | Four
  | Five
  | Seven
  | Eight
  | Nine
  | Thirteen
  | Sixteen
  | TwentyTwo
  | TwentyThree
  | TwentyFive
  | TwentyEight
  | ThirtySix
  | ThirtyNine
  | FortyOne
  | FortySix
  | FortySeven
  | FiftyThree
  | FiftyFour
  | FiftyFive
  | FiftyEight
  | SixtyThree
  | SeventyThree
  | SeventyFour
  | SeventyFive
  | SeventySix
  | SeventySeven
  | Eighty
  | EightyThree
  | NinetySeven
  | NinetyEight
  | OneHundredAndOne
  | OneHundredAndFive
  | OneHundredAndEleven
  | OneHundredAndFifteen
  | OneHundredAndEighteen
  | OneHundredAndNineteen
  | OneHundredAndTwentyThree
  | OneHundredAndTwentyFour
  | OneHundredAndTwentySeven
  | OneHundredAndFortyTwo
  | OneHundredAndFiftyThree
  | OneHundredAndFiftyFour
  | OneHundredAndFiftySix
  | OneHundredAndSeventyOne
  | OneHundredAndSeventyThree
  | OneHundredAndSeventyEight
  | OneHundredAndSeventyNine
  | OneHundredAndEightyOne
  | OneHundredAndEightySix
  | OneHundredAndNinetyFive
  | OneHundredAndNinetyEight
  | TwoHundredAndFour
  | TwoHundredAndThirty
  | TwoHundredAndThirtyTwo
  | TwoHundredAndThirtyThree
  | TwoHundredAndThirtyFive
  | TwoHundredAndThirtyNine
  | TwoHundredAndForty
  | TwoHundredAndFortyTwo
  | TwoHundredAndFortyFour
  | TwoHundredAndFortySix
  | TwoHundredAndFortySeven
  | TwoHundredAndFortyEight
  | TwoHundredAndFiftySix
  | TwoHundredAndSixty
  | TwoHundredAndSixtyTwo
  | TwoHundredAndSixtyFive
  | TwoHundredAndSixtySeven
  | TwoHundredAndSixtyEight
  | TwoHundredAndSixtyNine
  | TwoHundredAndSeventyOne
  | TwoHundredAndSeventyTwo
  | TwoHundredAndSeventyThree
  | TwoHundredAndEightySix
  | TwoHundredAndEightyNine
  | TwoHundredAndNinetyNine
  | ThreeHundredAndTwo
  | ThreeHundredAndFour
  | ThreeHundredAndNine
  | ThreeHundredAndTen
  | ThreeHundredAndSeventeen
  | ThreeHundredAndTwentyFive
  | ThreeHundredAndTwentySeven
  | ThreeHundredAndThirtyTwo
  | ThreeHundredAndThirtyThree
  | ThreeHundredAndThirtySix
  | ThreeHundredAndThirtyNine
  | ThreeHundredAndForty
  | ThreeHundredAndFortyEight
  | ThreeHundredAndFifty
  | ThreeHundredAndFiftyOne
  | ThreeHundredAndFiftySix
  | Six
  | Eleven
  | Twelve
  | Fourteen
  | Fifteen
  | Seventeen
  | Eighteen
  | Nineteen
  | Twenty
  | TwentyOne
  | TwentyFour
  | TwentyNine
  | Forty
  | FortyTwo
  | FortyThree
  | FortyFour
  | FortyFive
  | FiftyOne
  | FiftyTwo
  | FiftySix
  | FiftyNine
  | SixtyTwo
  | SixtyFour
  | SixtySix
  | SeventyOne
  | SeventyTwo
  | SeventyNine
  | EightyOne
  | EightyFive
  | EightySix
  | EightySeven
  | NinetySix
  | NinetyNine
  | OneHundredAndFour
  | OneHundredAndNine
  | OneHundredAndTen
  | OneHundredAndTwelve
  | OneHundredAndTwentyFive
  | OneHundredAndThirtySix
  | OneHundredAndFortySeven
  | OneHundredAndFortyEight
  | OneHundredAndFiftyOne
  | OneHundredAndFiftySeven
  | OneHundredAndSeventyFour
  | OneHundredAndSeventySeven
  | OneHundredAndEightyFour
  | OneHundredAndNinetySix
  | TwoHundredAndEighteen
  | TwoHundredAndNineteen
  | TwoHundredAndTwentyEight
  | TwoHundredAndThirtyOne
  | TwoHundredAndFortyOne
  | TwoHundredAndFortyThree
  | TwoHundredAndSixtyFour
  | TwoHundredAndSeventy
  | TwoHundredAndSeventyFour
  | TwoHundredAndEightyOne
  | TwoHundredAndEightyTwo
  | TwoHundredAndEightyThree
  | TwoHundredAndEightyFive
  | TwoHundredAndNinety
  | TwoHundredAndNinetyTwo
  | TwoHundredAndNinetyThree
  | ThreeHundred
  | ThreeHundredAndSix
  | ThreeHundredAndSeven
  | ThreeHundredAndTwelve
  | ThreeHundredAndThirteen
  | ThreeHundredAndFourteen
  | ThreeHundredAndSixteen
  | ThreeHundredAndEighteen
  | ThreeHundredAndTwentyTwo
  | ThreeHundredAndTwentyFour
  | ThreeHundredAndTwentyEight
  | ThreeHundredAndThirty
  | ThreeHundredAndThirtyFour
  | ThreeHundredAndThirtyFive
  | ThreeHundredAndThirtySeven
  | ThreeHundredAndThirtyEight
  | ThreeHundredAndFortyOne
  | ThreeHundredAndFortyTwo
  | ThreeHundredAndFortySeven
  | ThreeHundredAndFortyNine
  | Payload1
  | TwentySix
  | TwentySeven
  | ThirtyOne
  | ThirtyTwo
  | ThirtyThree
  | ThirtyFour
  | ThirtySeven
  | ThirtyEight
  | FortyEight
  | SixtyOne
  | SixtyFive
  | SeventyEight
  | OneHundredAndTwentySix
  | OneHundredAndTwentyEight
  | OneHundredAndTwentyNine
  | OneHundredAndFortyNine
  | OneHundredAndSeventyFive
  | OneHundredAndSeventySix
  | OneHundredAndNinetyThree
  | OneHundredAndNinetyFour
  | TwoHundredAndSeventySix
  | TwoHundredAndEightyFour
  | TwoHundredAndNinetySeven
  | ThreeHundredAndThree
  | ThreeHundredAndFive
  | ThreeHundredAndEight
  | ThreeHundredAndEleven
  | ThreeHundredAndTwenty
  | ThreeHundredAndTwentyOne
  | ThreeHundredAndTwentyThree
  | ThreeHundredAndTwentySix
  | ThreeHundredAndThirtyOne;

/**
 * Array of events generated by the User.
 */
export type UserEvent = {
  /**
   * The unique identifier of the Event.
   */
  id: string;
  /**
   * The human-readable text of the Event.
   */
  text: string;
  /**
   * A list of "entities" within the event `text`. Useful for enhancing the displayed text with additional styling and links.
   */
  entities: Array<Entities>;
  /**
   * The type of the event.
   */
  type?: Type | undefined;
  /**
   * The categories that group this event with related event types. An event can belong to multiple categories (e.g. a firewall event is both Firewall and Security). The first entry is the "primary" category. Use the `/events/types` endpoint to discover the full list of categories.
   */
  categories?: Array<Categories> | undefined;
  /**
   * Timestamp (in milliseconds) of when the event was generated.
   */
  createdAt: number;
  /**
   * Metadata for {@link userId}.
   */
  user?: User | undefined;
  principal?: Principal | undefined;
  /**
   * Metadata for {@link viaIds}.
   */
  via?: Array<Via> | undefined;
  /**
   * When the principal who generated the event is a user, this is their ID; otherwise, it is empty.
   */
  userId?: string | undefined;
  /**
   * The ID of the principal who generated the event. The principal is typically a user, but it could also be an app, an integration, etc. The principal may have delegated its authority to an acting party, and so {@link viaIds} should be checked as well.
   */
  principalId: string;
  /**
   * If the principal delegated its authority (for example, a user delegating to an app), then this array contains the ID of the current actor. For example, if `principalId` is "user123" and `viaIds` is `["app456"]`, we can say the event was triggered by - "app456 on behalf of user123", or - "user123 via app4556". Both are equivalent. Arbitrarily long chains of delegation can be represented. For example, if `principalId` is "user123" and `viaIds` is `["service1", "service2"]`, we can say the event was triggered by "user123 via service1 via service2".
   */
  viaIds?: Array<string> | undefined;
  payload?:
    | TwoHundredAndNinetySix
    | OneHundredAndFortyFive
    | NinetyFour
    | OneHundredAndSixtyFive
    | TwoHundredAndTwentyFour
    | OneHundredAndThirtyNine
    | OneHundredAndFortyThree
    | TwoHundredAndTwo
    | TwoHundredAndSixtyThree
    | TwoHundredAndSeventySeven
    | TwoHundredAndSeventyNine
    | EightyEight
    | NinetyOne
    | NinetyTwo
    | NinetyThree
    | NinetyFive
    | OneHundredAndTwo
    | OneHundredAndThirtyThree
    | OneHundredAndThirtyEight
    | OneHundredAndFortyFour
    | TwoHundredAndTwelve
    | TwoHundredAndTwentySix
    | TwoHundredAndThirtySix
    | TwoHundredAndNinetyFive
    | ThreeHundredAndFiftyThree
    | Payload2
    | Ten
    | FortyNine
    | Fifty
    | EightyTwo
    | EightyFour
    | Ninety
    | OneHundred
    | OneHundredAndSeventeen
    | OneHundredAndTwentyOne
    | OneHundredAndThirtySeven
    | OneHundredAndSixtyFour
    | OneHundredAndSixtySix
    | OneHundredAndSeventyTwo
    | OneHundredAndEightyNine
    | OneHundredAndNinetyTwo
    | OneHundredAndNinetyNine
    | TwoHundredAndThree
    | TwoHundredAndFive
    | TwoHundredAndSix
    | TwoHundredAndSeven
    | TwoHundredAndEight
    | TwoHundredAndTwentyThree
    | TwoHundredAndTwentyFive
    | TwoHundredAndTwentyNine
    | TwoHundredAndFortyFive
    | TwoHundredAndFortyNine
    | TwoHundredAndFifty
    | TwoHundredAndFiftySeven
    | TwoHundredAndFiftyEight
    | TwoHundredAndFiftyNine
    | TwoHundredAndSixtyOne
    | TwoHundredAndSeventyFive
    | TwoHundredAndSeventyEight
    | TwoHundredAndEightySeven
    | TwoHundredAndEightyEight
    | TwoHundredAndNinetyFour
    | ThreeHundredAndOne
    | ThreeHundredAndFifteen
    | ThreeHundredAndTwentyNine
    | ThreeHundredAndFiftyFour
    | ThreeHundredAndFiftyFive
    | Thirty
    | ThirtyFive
    | FiftySeven
    | Sixty
    | SixtySeven
    | SixtyEight
    | SixtyNine
    | Seventy
    | EightyNine
    | OneHundredAndThree
    | OneHundredAndSix
    | OneHundredAndSeven
    | OneHundredAndEight
    | OneHundredAndThirteen
    | OneHundredAndFourteen
    | OneHundredAndSixteen
    | OneHundredAndTwenty
    | OneHundredAndTwentyTwo
    | OneHundredAndThirty
    | OneHundredAndThirtyOne
    | OneHundredAndThirtyTwo
    | OneHundredAndThirtyFour
    | OneHundredAndThirtyFive
    | OneHundredAndForty
    | OneHundredAndFortyOne
    | OneHundredAndFortySix
    | OneHundredAndFifty
    | OneHundredAndFiftyTwo
    | OneHundredAndFiftyFive
    | OneHundredAndFiftyEight
    | OneHundredAndFiftyNine
    | OneHundredAndSixty
    | OneHundredAndSixtyOne
    | OneHundredAndSixtyTwo
    | OneHundredAndSixtyThree
    | OneHundredAndSixtySeven
    | OneHundredAndSixtyEight
    | OneHundredAndSixtyNine
    | OneHundredAndSeventy
    | OneHundredAndEighty
    | OneHundredAndEightyTwo
    | OneHundredAndEightyThree
    | OneHundredAndEightyFive
    | OneHundredAndEightySeven
    | OneHundredAndEightyEight
    | OneHundredAndNinety
    | OneHundredAndNinetyOne
    | OneHundredAndNinetySeven
    | TwoHundred
    | TwoHundredAndOne
    | TwoHundredAndNine
    | TwoHundredAndTen
    | TwoHundredAndEleven
    | TwoHundredAndThirteen
    | TwoHundredAndFourteen
    | TwoHundredAndFifteen
    | TwoHundredAndSixteen
    | TwoHundredAndSeventeen
    | TwoHundredAndTwenty
    | TwoHundredAndTwentyOne
    | TwoHundredAndTwentyTwo
    | TwoHundredAndTwentySeven
    | TwoHundredAndThirtyFour
    | TwoHundredAndThirtySeven
    | TwoHundredAndThirtyEight
    | TwoHundredAndFiftyOne
    | TwoHundredAndFiftyTwo
    | TwoHundredAndFiftyThree
    | TwoHundredAndFiftyFour
    | TwoHundredAndFiftyFive
    | TwoHundredAndSixtySix
    | TwoHundredAndEighty
    | TwoHundredAndNinetyOne
    | TwoHundredAndNinetyEight
    | ThreeHundredAndNineteen
    | ThreeHundredAndFortyThree
    | ThreeHundredAndFortyFour
    | ThreeHundredAndFortyFive
    | ThreeHundredAndFortySix
    | ThreeHundredAndFiftyTwo
    | Payload3
    | Four
    | Five
    | Seven
    | Eight
    | Nine
    | Thirteen
    | Sixteen
    | TwentyTwo
    | TwentyThree
    | TwentyFive
    | TwentyEight
    | ThirtySix
    | ThirtyNine
    | FortyOne
    | FortySix
    | FortySeven
    | FiftyThree
    | FiftyFour
    | FiftyFive
    | FiftyEight
    | SixtyThree
    | SeventyThree
    | SeventyFour
    | SeventyFive
    | SeventySix
    | SeventySeven
    | Eighty
    | EightyThree
    | NinetySeven
    | NinetyEight
    | OneHundredAndOne
    | OneHundredAndFive
    | OneHundredAndEleven
    | OneHundredAndFifteen
    | OneHundredAndEighteen
    | OneHundredAndNineteen
    | OneHundredAndTwentyThree
    | OneHundredAndTwentyFour
    | OneHundredAndTwentySeven
    | OneHundredAndFortyTwo
    | OneHundredAndFiftyThree
    | OneHundredAndFiftyFour
    | OneHundredAndFiftySix
    | OneHundredAndSeventyOne
    | OneHundredAndSeventyThree
    | OneHundredAndSeventyEight
    | OneHundredAndSeventyNine
    | OneHundredAndEightyOne
    | OneHundredAndEightySix
    | OneHundredAndNinetyFive
    | OneHundredAndNinetyEight
    | TwoHundredAndFour
    | TwoHundredAndThirty
    | TwoHundredAndThirtyTwo
    | TwoHundredAndThirtyThree
    | TwoHundredAndThirtyFive
    | TwoHundredAndThirtyNine
    | TwoHundredAndForty
    | TwoHundredAndFortyTwo
    | TwoHundredAndFortyFour
    | TwoHundredAndFortySix
    | TwoHundredAndFortySeven
    | TwoHundredAndFortyEight
    | TwoHundredAndFiftySix
    | TwoHundredAndSixty
    | TwoHundredAndSixtyTwo
    | TwoHundredAndSixtyFive
    | TwoHundredAndSixtySeven
    | TwoHundredAndSixtyEight
    | TwoHundredAndSixtyNine
    | TwoHundredAndSeventyOne
    | TwoHundredAndSeventyTwo
    | TwoHundredAndSeventyThree
    | TwoHundredAndEightySix
    | TwoHundredAndEightyNine
    | TwoHundredAndNinetyNine
    | ThreeHundredAndTwo
    | ThreeHundredAndFour
    | ThreeHundredAndNine
    | ThreeHundredAndTen
    | ThreeHundredAndSeventeen
    | ThreeHundredAndTwentyFive
    | ThreeHundredAndTwentySeven
    | ThreeHundredAndThirtyTwo
    | ThreeHundredAndThirtyThree
    | ThreeHundredAndThirtySix
    | ThreeHundredAndThirtyNine
    | ThreeHundredAndForty
    | ThreeHundredAndFortyEight
    | ThreeHundredAndFifty
    | ThreeHundredAndFiftyOne
    | ThreeHundredAndFiftySix
    | Six
    | Eleven
    | Twelve
    | Fourteen
    | Fifteen
    | Seventeen
    | Eighteen
    | Nineteen
    | Twenty
    | TwentyOne
    | TwentyFour
    | TwentyNine
    | Forty
    | FortyTwo
    | FortyThree
    | FortyFour
    | FortyFive
    | FiftyOne
    | FiftyTwo
    | FiftySix
    | FiftyNine
    | SixtyTwo
    | SixtyFour
    | SixtySix
    | SeventyOne
    | SeventyTwo
    | SeventyNine
    | EightyOne
    | EightyFive
    | EightySix
    | EightySeven
    | NinetySix
    | NinetyNine
    | OneHundredAndFour
    | OneHundredAndNine
    | OneHundredAndTen
    | OneHundredAndTwelve
    | OneHundredAndTwentyFive
    | OneHundredAndThirtySix
    | OneHundredAndFortySeven
    | OneHundredAndFortyEight
    | OneHundredAndFiftyOne
    | OneHundredAndFiftySeven
    | OneHundredAndSeventyFour
    | OneHundredAndSeventySeven
    | OneHundredAndEightyFour
    | OneHundredAndNinetySix
    | TwoHundredAndEighteen
    | TwoHundredAndNineteen
    | TwoHundredAndTwentyEight
    | TwoHundredAndThirtyOne
    | TwoHundredAndFortyOne
    | TwoHundredAndFortyThree
    | TwoHundredAndSixtyFour
    | TwoHundredAndSeventy
    | TwoHundredAndSeventyFour
    | TwoHundredAndEightyOne
    | TwoHundredAndEightyTwo
    | TwoHundredAndEightyThree
    | TwoHundredAndEightyFive
    | TwoHundredAndNinety
    | TwoHundredAndNinetyTwo
    | TwoHundredAndNinetyThree
    | ThreeHundred
    | ThreeHundredAndSix
    | ThreeHundredAndSeven
    | ThreeHundredAndTwelve
    | ThreeHundredAndThirteen
    | ThreeHundredAndFourteen
    | ThreeHundredAndSixteen
    | ThreeHundredAndEighteen
    | ThreeHundredAndTwentyTwo
    | ThreeHundredAndTwentyFour
    | ThreeHundredAndTwentyEight
    | ThreeHundredAndThirty
    | ThreeHundredAndThirtyFour
    | ThreeHundredAndThirtyFive
    | ThreeHundredAndThirtySeven
    | ThreeHundredAndThirtyEight
    | ThreeHundredAndFortyOne
    | ThreeHundredAndFortyTwo
    | ThreeHundredAndFortySeven
    | ThreeHundredAndFortyNine
    | Payload1
    | TwentySix
    | TwentySeven
    | ThirtyOne
    | ThirtyTwo
    | ThirtyThree
    | ThirtyFour
    | ThirtySeven
    | ThirtyEight
    | FortyEight
    | SixtyOne
    | SixtyFive
    | SeventyEight
    | OneHundredAndTwentySix
    | OneHundredAndTwentyEight
    | OneHundredAndTwentyNine
    | OneHundredAndFortyNine
    | OneHundredAndSeventyFive
    | OneHundredAndSeventySix
    | OneHundredAndNinetyThree
    | OneHundredAndNinetyFour
    | TwoHundredAndSeventySix
    | TwoHundredAndEightyFour
    | TwoHundredAndNinetySeven
    | ThreeHundredAndThree
    | ThreeHundredAndFive
    | ThreeHundredAndEight
    | ThreeHundredAndEleven
    | ThreeHundredAndTwenty
    | ThreeHundredAndTwentyOne
    | ThreeHundredAndTwentyThree
    | ThreeHundredAndTwentySix
    | ThreeHundredAndThirtyOne
    | undefined;
};

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

/** @internal */
export const FiftyFive$inboundSchema: z.ZodType<
  FiftyFive,
  z.ZodTypeDef,
  unknown
> = z.object({
  subscriptionId: types.optional(types.string()),
  action: UserEventPayload55Action$inboundSchema,
  data: z.record(z.any()),
});

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

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

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

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

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

/** @internal */
export const FiftyFour$inboundSchema: z.ZodType<
  FiftyFour,
  z.ZodTypeDef,
  unknown
> = z.object({
  subscriptionId: types.optional(types.string()),
  action: UserEventPayload54Action$inboundSchema,
  data: z.lazy(() => PayloadData$inboundSchema),
});

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

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

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

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

/** @internal */
export const UserEventPayloadData$inboundSchema: z.ZodType<
  UserEventPayloadData,
  z.ZodTypeDef,
  unknown
> = z.object({
  planSlug: PlanSlug$inboundSchema,
  reason: types.optional(PayloadReason$inboundSchema),
});

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

/** @internal */
export const FiftyThree$inboundSchema: z.ZodType<
  FiftyThree,
  z.ZodTypeDef,
  unknown
> = z.object({
  subscriptionId: types.optional(types.string()),
  action: UserEventPayload53Action$inboundSchema,
  data: z.lazy(() => UserEventPayloadData$inboundSchema),
});

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

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

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

/** @internal */
export const FiftyOne$inboundSchema: z.ZodType<
  FiftyOne,
  z.ZodTypeDef,
  unknown
> = z.object({
  paymentMethodId: types.string(),
  brand: types.optional(types.string()),
  last4: types.optional(types.string()),
});

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

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

/** @internal */
export const Fifty$inboundSchema: z.ZodType<Fifty, z.ZodTypeDef, unknown> = z
  .object({
    invoiceId: types.string(),
    newInvoiceId: types.string(),
    settlementMethod: SettlementMethod$inboundSchema,
    amount: types.number(),
  });

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

/** @internal */
export const FortyNine$inboundSchema: z.ZodType<
  FortyNine,
  z.ZodTypeDef,
  unknown
> = z.object({
  invoiceId: types.string(),
  amount: types.number(),
  refundReason: types.string(),
  lineItemCount: types.number(),
});

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

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

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

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

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

/** @internal */
export const FortySix$inboundSchema: z.ZodType<
  FortySix,
  z.ZodTypeDef,
  unknown
> = z.object({
  projectId: types.string(),
  prevAttackModeEnabled: types.optional(types.boolean()),
  prevAttackModeActiveUntil: z.nullable(types.number()).optional(),
  attackModeEnabled: types.boolean(),
  attackModeActiveUntil: z.nullable(types.number()).optional(),
});

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

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

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

/** @internal */
export const FortyFive$inboundSchema: z.ZodType<
  FortyFive,
  z.ZodTypeDef,
  unknown
> = z.object({
  appName: types.string(),
  appId: types.optional(types.string()),
  app: types.optional(z.lazy(() => App$inboundSchema)),
  issuedBefore: types.optional(types.number()),
});

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

/** @internal */
export const FortyFour$inboundSchema: z.ZodType<
  FortyFour,
  z.ZodTypeDef,
  unknown
> = z.object({
  appName: types.string(),
  appId: types.optional(types.string()),
  secretLastFourChars: types.optional(types.string()),
});

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

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

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

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

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

/** @internal */
export const PayloadProjectIds$inboundSchema: z.ZodType<
  PayloadProjectIds,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: UserEventPayload43Type$inboundSchema,
  required: types.literal(true),
  items: z.lazy(() => Items$inboundSchema),
});

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

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

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

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

/** @internal */
export const FortyThree$inboundSchema: z.ZodType<
  FortyThree,
  z.ZodTypeDef,
  unknown
> = z.object({
  appName: types.string(),
  appId: types.optional(types.string()),
  resources: types.optional(z.lazy(() => Resources$inboundSchema)),
  permissions: types.optional(z.array(PayloadPermissions$inboundSchema)),
});

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

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

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

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

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

/** @internal */
export const UserEventPayloadProjectIds$inboundSchema: z.ZodType<
  UserEventPayloadProjectIds,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: UserEventPayload42Type$inboundSchema,
  required: types.literal(true),
  items: z.lazy(() => UserEventPayloadItems$inboundSchema),
});

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

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

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

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

/** @internal */
export const Before$inboundSchema: z.ZodType<Before, z.ZodTypeDef, unknown> = z
  .object({
    resources: types.optional(
      z.lazy(() => UserEventPayloadResources$inboundSchema),
    ),
    permissions: types.optional(
      z.array(UserEventPayload42Permissions$inboundSchema),
    ),
  });

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

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

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

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

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

/** @internal */
export const UserEventPayload42ProjectIds$inboundSchema: z.ZodType<
  UserEventPayload42ProjectIds,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: UserEventPayload42AfterType$inboundSchema,
  required: types.literal(true),
  items: z.lazy(() => PayloadItems$inboundSchema),
});

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

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

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

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

/** @internal */
export const After$inboundSchema: z.ZodType<After, z.ZodTypeDef, unknown> = z
  .object({
    resources: types.optional(z.lazy(() => PayloadResources$inboundSchema)),
    permissions: types.optional(
      z.array(UserEventPayloadPermissions$inboundSchema),
    ),
  });

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

/** @internal */
export const FortyTwo$inboundSchema: z.ZodType<
  FortyTwo,
  z.ZodTypeDef,
  unknown
> = z.object({
  appName: types.string(),
  appId: types.optional(types.string()),
  installationId: types.optional(types.string()),
  before: types.optional(z.lazy(() => Before$inboundSchema)),
  after: types.optional(z.lazy(() => After$inboundSchema)),
});

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

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

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

/** @internal */
export const FortyOne$inboundSchema: z.ZodType<
  FortyOne,
  z.ZodTypeDef,
  unknown
> = z.object({
  appName: types.string(),
  appId: types.optional(types.string()),
  nextScopes: z.array(NextScopes$inboundSchema),
  nextPermissions: types.optional(z.array(NextPermissions$inboundSchema)),
});

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

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

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

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

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

/** @internal */
export const ThirtyNine$inboundSchema: z.ZodType<
  ThirtyNine,
  z.ZodTypeDef,
  unknown
> = z.object({
  appName: types.string(),
  appId: types.optional(types.string()),
  scopes: z.array(PayloadScopes$inboundSchema),
  permissions: types.optional(z.array(Permissions$inboundSchema)),
});

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

/** @internal */
export const ThirtyEight$inboundSchema: z.ZodType<
  ThirtyEight,
  z.ZodTypeDef,
  unknown
> = z.object({
  alias: types.optional(types.string()),
  aliasId: types.optional(types.string()),
  userId: types.optional(types.string()),
  username: types.optional(types.string()),
});

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/** @internal */
export const TwentyEight$inboundSchema: z.ZodType<
  TwentyEight,
  z.ZodTypeDef,
  unknown
> = z.object({
  projectId: types.string(),
  aliasCount: types.number(),
  deployment: z.nullable(z.lazy(() => PayloadDeployment$inboundSchema))
    .optional(),
});

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

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

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

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

/** @internal */
export const TwentySeven$inboundSchema: z.ZodType<
  TwentySeven,
  z.ZodTypeDef,
  unknown
> = z.object({
  alias: types.optional(types.string()),
  deployment: z.nullable(z.lazy(() => Deployment$inboundSchema)).optional(),
  ruleCount: types.optional(types.number()),
  deploymentUrl: types.optional(types.string()),
  aliasId: types.optional(types.string()),
  deploymentId: z.nullable(types.string()).optional(),
  oldDeploymentId: z.nullable(types.string()).optional(),
  redirect: types.optional(types.string()),
  redirectStatusCode: z.nullable(types.number()).optional(),
  target: z.nullable(types.string()).optional(),
  system: types.optional(types.boolean()),
  aliasUpdatedAt: types.optional(types.number()),
});

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

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

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

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

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

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

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

/** @internal */
export const TwentyFive$inboundSchema: z.ZodType<
  TwentyFive,
  z.ZodTypeDef,
  unknown
> = z.object({
  accessGroup: z.lazy(() => UserEventPayload25AccessGroup$inboundSchema),
  user: z.lazy(() => PayloadUser$inboundSchema),
  directoryType: types.optional(types.string()),
});

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

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

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

/** @internal */
export const TwentyFour$inboundSchema: z.ZodType<
  TwentyFour,
  z.ZodTypeDef,
  unknown
> = z.object({
  accessGroup: z.lazy(() => UserEventPayload24AccessGroup$inboundSchema),
  name: types.optional(types.string()),
  previousName: types.optional(types.string()),
  teamRoles: types.optional(z.array(types.string())),
  previousTeamRoles: types.optional(z.array(types.string())),
  teamPermissions: types.optional(z.array(types.string())),
  previousTeamPermissions: types.optional(z.array(types.string())),
  entitlementsAdded: types.optional(z.array(types.string())),
  entitlementsRemoved: types.optional(z.array(types.string())),
});

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

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

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

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

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

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

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

/** @internal */
export const TwentyThree$inboundSchema: z.ZodType<
  TwentyThree,
  z.ZodTypeDef,
  unknown
> = z.object({
  accessGroup: z.lazy(() => UserEventPayloadAccessGroup$inboundSchema),
  project: z.lazy(() => Project$inboundSchema),
  next_role: z.nullable(NextRole$inboundSchema).optional(),
  previous_role: types.optional(PreviousRole$inboundSchema),
}).transform((v) => {
  return remap$(v, {
    "next_role": "nextRole",
    "previous_role": "previousRole",
  });
});

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

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

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

/** @internal */
export const TwentyTwo$inboundSchema: z.ZodType<
  TwentyTwo,
  z.ZodTypeDef,
  unknown
> = z.object({
  author: types.string(),
  accessGroup: z.lazy(() => PayloadAccessGroup$inboundSchema),
});

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

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

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

/** @internal */
export const TwentyOne$inboundSchema: z.ZodType<
  TwentyOne,
  z.ZodTypeDef,
  unknown
> = z.object({
  accessGroup: z.lazy(() => AccessGroup$inboundSchema),
  teamRoles: types.optional(z.array(types.string())),
  teamPermissions: types.optional(z.array(types.string())),
  entitlements: types.optional(z.array(types.string())),
});

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

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

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

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

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

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

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

/** @internal */
export const Nineteen$inboundSchema: z.ZodType<
  Nineteen,
  z.ZodTypeDef,
  unknown
> = z.object({
  rule: z.lazy(() => UserEventPayloadRule$inboundSchema),
  enabled: types.optional(types.boolean()),
});

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/** @internal */
export const PayloadBudget$inboundSchema: z.ZodType<
  PayloadBudget,
  z.ZodTypeDef,
  unknown
> = z.object({
  limitAmount: types.number(),
  refreshPeriod: PayloadRefreshPeriod$inboundSchema,
});

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

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

/** @internal */
export const Thirteen$inboundSchema: z.ZodType<
  Thirteen,
  z.ZodTypeDef,
  unknown
> = z.object({
  apiKey: z.lazy(() => UserEventPayloadApiKey$inboundSchema),
  budget: z.nullable(z.lazy(() => PayloadBudget$inboundSchema)).optional(),
  change: Change$inboundSchema,
});

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

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

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

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

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

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

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

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

/** @internal */
export const Budget$inboundSchema: z.ZodType<Budget, z.ZodTypeDef, unknown> = z
  .object({
    limitAmount: types.number(),
    refreshPeriod: RefreshPeriod$inboundSchema,
  });

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

/** @internal */
export const Eleven$inboundSchema: z.ZodType<Eleven, z.ZodTypeDef, unknown> = z
  .object({
    apiKey: z.lazy(() => ApiKey$inboundSchema),
    budget: z.nullable(z.lazy(() => Budget$inboundSchema)).optional(),
  });

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

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

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

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

/** @internal */
export const Ten$inboundSchema: z.ZodType<Ten, z.ZodTypeDef, unknown> = z
  .object({
    provider: types.optional(UserEventPayload10Provider$inboundSchema),
    providerAccount: types.optional(types.string()),
    stripeAccount: types.optional(types.string()),
    stripeOrganisation: types.optional(types.string()),
    teamId: types.string(),
    resourceId: types.string(),
    fromPlan: FromPlan$inboundSchema,
    toPlan: ToPlan$inboundSchema,
  });

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

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

/** @internal */
export const Nine$inboundSchema: z.ZodType<Nine, z.ZodTypeDef, unknown> = z
  .object({
    provider: types.optional(UserEventPayload9Provider$inboundSchema),
    providerAccount: types.optional(types.string()),
    stripeAccount: types.optional(types.string()),
    resourceId: types.string(),
    projectName: types.string(),
  });

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

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

/** @internal */
export const Eight$inboundSchema: z.ZodType<Eight, z.ZodTypeDef, unknown> = z
  .object({
    provider: types.optional(UserEventPayload8Provider$inboundSchema),
    providerAccount: types.optional(types.string()),
    stripeAccount: types.optional(types.string()),
    stripeOrganisation: types.optional(types.string()),
    reason: types.string(),
    blockCode: types.string(),
  });

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

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

/** @internal */
export const Seven$inboundSchema: z.ZodType<Seven, z.ZodTypeDef, unknown> = z
  .object({
    provider: types.optional(UserEventPayloadProvider$inboundSchema),
    providerAccount: types.optional(types.string()),
    stripeAccount: types.optional(types.string()),
    stripeOrganisation: types.optional(types.string()),
    teamId: types.string(),
    teamSlug: types.string(),
  });

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

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

/** @internal */
export const Six$inboundSchema: z.ZodType<Six, z.ZodTypeDef, unknown> = z
  .object({
    provider: types.optional(PayloadProvider$inboundSchema),
    providerAccount: types.optional(types.string()),
    stripeAccount: types.optional(types.string()),
    stripeOrganisation: types.optional(types.string()),
    teamId: types.string(),
  });

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

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

/** @internal */
export const Five$inboundSchema: z.ZodType<Five, z.ZodTypeDef, unknown> = z
  .object({
    provider: types.optional(Provider$inboundSchema),
    providerAccount: types.optional(types.string()),
    stripeAccount: types.optional(types.string()),
    stripeOrganisation: types.optional(types.string()),
    teamId: types.string(),
    accountRequestId: types.string(),
  });

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

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

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

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

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

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

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

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

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

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

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

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

/** @internal */
export const Payload$inboundSchema: z.ZodType<Payload, z.ZodTypeDef, unknown> =
  smartUnion([
    TwoHundredAndNinetySix$inboundSchema,
    OneHundredAndFortyFive$inboundSchema,
    NinetyFour$inboundSchema,
    OneHundredAndSixtyFive$inboundSchema,
    TwoHundredAndTwentyFour$inboundSchema,
    OneHundredAndThirtyNine$inboundSchema,
    OneHundredAndFortyThree$inboundSchema,
    TwoHundredAndTwo$inboundSchema,
    TwoHundredAndSixtyThree$inboundSchema,
    TwoHundredAndSeventySeven$inboundSchema,
    TwoHundredAndSeventyNine$inboundSchema,
    EightyEight$inboundSchema,
    NinetyOne$inboundSchema,
    NinetyTwo$inboundSchema,
    NinetyThree$inboundSchema,
    NinetyFive$inboundSchema,
    OneHundredAndTwo$inboundSchema,
    OneHundredAndThirtyThree$inboundSchema,
    OneHundredAndThirtyEight$inboundSchema,
    OneHundredAndFortyFour$inboundSchema,
    TwoHundredAndTwelve$inboundSchema,
    TwoHundredAndTwentySix$inboundSchema,
    TwoHundredAndThirtySix$inboundSchema,
    TwoHundredAndNinetyFive$inboundSchema,
    ThreeHundredAndFiftyThree$inboundSchema,
    z.lazy(() => Payload2$inboundSchema),
    z.lazy(() => Ten$inboundSchema),
    z.lazy(() => FortyNine$inboundSchema),
    z.lazy(() => Fifty$inboundSchema),
    EightyTwo$inboundSchema,
    EightyFour$inboundSchema,
    Ninety$inboundSchema,
    OneHundred$inboundSchema,
    OneHundredAndSeventeen$inboundSchema,
    OneHundredAndTwentyOne$inboundSchema,
    OneHundredAndThirtySeven$inboundSchema,
    OneHundredAndSixtyFour$inboundSchema,
    OneHundredAndSixtySix$inboundSchema,
    OneHundredAndSeventyTwo$inboundSchema,
    OneHundredAndEightyNine$inboundSchema,
    OneHundredAndNinetyTwo$inboundSchema,
    OneHundredAndNinetyNine$inboundSchema,
    TwoHundredAndThree$inboundSchema,
    TwoHundredAndFive$inboundSchema,
    TwoHundredAndSix$inboundSchema,
    TwoHundredAndSeven$inboundSchema,
    TwoHundredAndEight$inboundSchema,
    TwoHundredAndTwentyThree$inboundSchema,
    TwoHundredAndTwentyFive$inboundSchema,
    TwoHundredAndTwentyNine$inboundSchema,
    TwoHundredAndFortyFive$inboundSchema,
    TwoHundredAndFortyNine$inboundSchema,
    TwoHundredAndFifty$inboundSchema,
    TwoHundredAndFiftySeven$inboundSchema,
    TwoHundredAndFiftyEight$inboundSchema,
    TwoHundredAndFiftyNine$inboundSchema,
    TwoHundredAndSixtyOne$inboundSchema,
    TwoHundredAndSeventyFive$inboundSchema,
    TwoHundredAndSeventyEight$inboundSchema,
    TwoHundredAndEightySeven$inboundSchema,
    TwoHundredAndEightyEight$inboundSchema,
    TwoHundredAndNinetyFour$inboundSchema,
    ThreeHundredAndOne$inboundSchema,
    ThreeHundredAndFifteen$inboundSchema,
    ThreeHundredAndTwentyNine$inboundSchema,
    ThreeHundredAndFiftyFour$inboundSchema,
    ThreeHundredAndFiftyFive$inboundSchema,
    z.lazy(() => Thirty$inboundSchema),
    z.lazy(() => ThirtyFive$inboundSchema),
    FiftySeven$inboundSchema,
    Sixty$inboundSchema,
    SixtySeven$inboundSchema,
    SixtyEight$inboundSchema,
    SixtyNine$inboundSchema,
    Seventy$inboundSchema,
    EightyNine$inboundSchema,
    OneHundredAndThree$inboundSchema,
    OneHundredAndSix$inboundSchema,
    OneHundredAndSeven$inboundSchema,
    OneHundredAndEight$inboundSchema,
    OneHundredAndThirteen$inboundSchema,
    OneHundredAndFourteen$inboundSchema,
    OneHundredAndSixteen$inboundSchema,
    OneHundredAndTwenty$inboundSchema,
    OneHundredAndTwentyTwo$inboundSchema,
    OneHundredAndThirty$inboundSchema,
    OneHundredAndThirtyOne$inboundSchema,
    OneHundredAndThirtyTwo$inboundSchema,
    OneHundredAndThirtyFour$inboundSchema,
    OneHundredAndThirtyFive$inboundSchema,
    OneHundredAndForty$inboundSchema,
    OneHundredAndFortyOne$inboundSchema,
    OneHundredAndFortySix$inboundSchema,
    OneHundredAndFifty$inboundSchema,
    OneHundredAndFiftyTwo$inboundSchema,
    OneHundredAndFiftyFive$inboundSchema,
    OneHundredAndFiftyEight$inboundSchema,
    OneHundredAndFiftyNine$inboundSchema,
    OneHundredAndSixty$inboundSchema,
    OneHundredAndSixtyOne$inboundSchema,
    OneHundredAndSixtyTwo$inboundSchema,
    OneHundredAndSixtyThree$inboundSchema,
    OneHundredAndSixtySeven$inboundSchema,
    OneHundredAndSixtyEight$inboundSchema,
    OneHundredAndSixtyNine$inboundSchema,
    OneHundredAndSeventy$inboundSchema,
    OneHundredAndEighty$inboundSchema,
    OneHundredAndEightyTwo$inboundSchema,
    OneHundredAndEightyThree$inboundSchema,
    OneHundredAndEightyFive$inboundSchema,
    OneHundredAndEightySeven$inboundSchema,
    OneHundredAndEightyEight$inboundSchema,
    OneHundredAndNinety$inboundSchema,
    OneHundredAndNinetyOne$inboundSchema,
    OneHundredAndNinetySeven$inboundSchema,
    TwoHundred$inboundSchema,
    TwoHundredAndOne$inboundSchema,
    TwoHundredAndNine$inboundSchema,
    TwoHundredAndTen$inboundSchema,
    TwoHundredAndEleven$inboundSchema,
    TwoHundredAndThirteen$inboundSchema,
    TwoHundredAndFourteen$inboundSchema,
    TwoHundredAndFifteen$inboundSchema,
    TwoHundredAndSixteen$inboundSchema,
    TwoHundredAndSeventeen$inboundSchema,
    TwoHundredAndTwenty$inboundSchema,
    TwoHundredAndTwentyOne$inboundSchema,
    TwoHundredAndTwentyTwo$inboundSchema,
    TwoHundredAndTwentySeven$inboundSchema,
    TwoHundredAndThirtyFour$inboundSchema,
    TwoHundredAndThirtySeven$inboundSchema,
    TwoHundredAndThirtyEight$inboundSchema,
    TwoHundredAndFiftyOne$inboundSchema,
    TwoHundredAndFiftyTwo$inboundSchema,
    TwoHundredAndFiftyThree$inboundSchema,
    TwoHundredAndFiftyFour$inboundSchema,
    TwoHundredAndFiftyFive$inboundSchema,
    TwoHundredAndSixtySix$inboundSchema,
    TwoHundredAndEighty$inboundSchema,
    TwoHundredAndNinetyOne$inboundSchema,
    TwoHundredAndNinetyEight$inboundSchema,
    ThreeHundredAndNineteen$inboundSchema,
    ThreeHundredAndFortyThree$inboundSchema,
    ThreeHundredAndFortyFour$inboundSchema,
    ThreeHundredAndFortyFive$inboundSchema,
    ThreeHundredAndFortySix$inboundSchema,
    ThreeHundredAndFiftyTwo$inboundSchema,
    z.lazy(() => Payload3$inboundSchema),
    z.lazy(() => Four$inboundSchema),
    z.lazy(() => Five$inboundSchema),
    z.lazy(() => Seven$inboundSchema),
    z.lazy(() => Eight$inboundSchema),
    z.lazy(() => Nine$inboundSchema),
    z.lazy(() => Thirteen$inboundSchema),
    z.lazy(() => Sixteen$inboundSchema),
    z.lazy(() => TwentyTwo$inboundSchema),
    z.lazy(() => TwentyThree$inboundSchema),
    z.lazy(() => TwentyFive$inboundSchema),
    z.lazy(() => TwentyEight$inboundSchema),
    z.lazy(() => ThirtySix$inboundSchema),
    z.lazy(() => ThirtyNine$inboundSchema),
    z.lazy(() => FortyOne$inboundSchema),
    z.lazy(() => FortySix$inboundSchema),
    z.lazy(() => FortySeven$inboundSchema),
    z.lazy(() => FiftyThree$inboundSchema),
    z.lazy(() => FiftyFour$inboundSchema),
    z.lazy(() => FiftyFive$inboundSchema),
    FiftyEight$inboundSchema,
    SixtyThree$inboundSchema,
    SeventyThree$inboundSchema,
    SeventyFour$inboundSchema,
    SeventyFive$inboundSchema,
    SeventySix$inboundSchema,
    SeventySeven$inboundSchema,
    Eighty$inboundSchema,
    EightyThree$inboundSchema,
    NinetySeven$inboundSchema,
    NinetyEight$inboundSchema,
    OneHundredAndOne$inboundSchema,
    OneHundredAndFive$inboundSchema,
    OneHundredAndEleven$inboundSchema,
    OneHundredAndFifteen$inboundSchema,
    OneHundredAndEighteen$inboundSchema,
    OneHundredAndNineteen$inboundSchema,
    OneHundredAndTwentyThree$inboundSchema,
    OneHundredAndTwentyFour$inboundSchema,
    OneHundredAndTwentySeven$inboundSchema,
    OneHundredAndFortyTwo$inboundSchema,
    OneHundredAndFiftyThree$inboundSchema,
    OneHundredAndFiftyFour$inboundSchema,
    OneHundredAndFiftySix$inboundSchema,
    OneHundredAndSeventyOne$inboundSchema,
    OneHundredAndSeventyThree$inboundSchema,
    OneHundredAndSeventyEight$inboundSchema,
    OneHundredAndSeventyNine$inboundSchema,
    OneHundredAndEightyOne$inboundSchema,
    OneHundredAndEightySix$inboundSchema,
    OneHundredAndNinetyFive$inboundSchema,
    OneHundredAndNinetyEight$inboundSchema,
    TwoHundredAndFour$inboundSchema,
    TwoHundredAndThirty$inboundSchema,
    TwoHundredAndThirtyTwo$inboundSchema,
    TwoHundredAndThirtyThree$inboundSchema,
    TwoHundredAndThirtyFive$inboundSchema,
    TwoHundredAndThirtyNine$inboundSchema,
    TwoHundredAndForty$inboundSchema,
    TwoHundredAndFortyTwo$inboundSchema,
    TwoHundredAndFortyFour$inboundSchema,
    TwoHundredAndFortySix$inboundSchema,
    TwoHundredAndFortySeven$inboundSchema,
    TwoHundredAndFortyEight$inboundSchema,
    TwoHundredAndFiftySix$inboundSchema,
    TwoHundredAndSixty$inboundSchema,
    TwoHundredAndSixtyTwo$inboundSchema,
    TwoHundredAndSixtyFive$inboundSchema,
    TwoHundredAndSixtySeven$inboundSchema,
    TwoHundredAndSixtyEight$inboundSchema,
    TwoHundredAndSixtyNine$inboundSchema,
    TwoHundredAndSeventyOne$inboundSchema,
    TwoHundredAndSeventyTwo$inboundSchema,
    TwoHundredAndSeventyThree$inboundSchema,
    TwoHundredAndEightySix$inboundSchema,
    TwoHundredAndEightyNine$inboundSchema,
    TwoHundredAndNinetyNine$inboundSchema,
    ThreeHundredAndTwo$inboundSchema,
    ThreeHundredAndFour$inboundSchema,
    ThreeHundredAndNine$inboundSchema,
    ThreeHundredAndTen$inboundSchema,
    ThreeHundredAndSeventeen$inboundSchema,
    ThreeHundredAndTwentyFive$inboundSchema,
    ThreeHundredAndTwentySeven$inboundSchema,
    ThreeHundredAndThirtyTwo$inboundSchema,
    ThreeHundredAndThirtyThree$inboundSchema,
    ThreeHundredAndThirtySix$inboundSchema,
    ThreeHundredAndThirtyNine$inboundSchema,
    ThreeHundredAndForty$inboundSchema,
    ThreeHundredAndFortyEight$inboundSchema,
    ThreeHundredAndFifty$inboundSchema,
    ThreeHundredAndFiftyOne$inboundSchema,
    ThreeHundredAndFiftySix$inboundSchema,
    z.lazy(() => Six$inboundSchema),
    z.lazy(() => Eleven$inboundSchema),
    z.lazy(() => Twelve$inboundSchema),
    z.lazy(() => Fourteen$inboundSchema),
    z.lazy(() => Fifteen$inboundSchema),
    z.lazy(() => Seventeen$inboundSchema),
    z.lazy(() => Eighteen$inboundSchema),
    z.lazy(() => Nineteen$inboundSchema),
    z.lazy(() => Twenty$inboundSchema),
    z.lazy(() => TwentyOne$inboundSchema),
    z.lazy(() => TwentyFour$inboundSchema),
    z.lazy(() => TwentyNine$inboundSchema),
    z.lazy(() => Forty$inboundSchema),
    z.lazy(() => FortyTwo$inboundSchema),
    z.lazy(() => FortyThree$inboundSchema),
    z.lazy(() => FortyFour$inboundSchema),
    z.lazy(() => FortyFive$inboundSchema),
    z.lazy(() => FiftyOne$inboundSchema),
    z.lazy(() => FiftyTwo$inboundSchema),
    FiftySix$inboundSchema,
    FiftyNine$inboundSchema,
    SixtyTwo$inboundSchema,
    SixtyFour$inboundSchema,
    SixtySix$inboundSchema,
    SeventyOne$inboundSchema,
    SeventyTwo$inboundSchema,
    SeventyNine$inboundSchema,
    EightyOne$inboundSchema,
    EightyFive$inboundSchema,
    EightySix$inboundSchema,
    EightySeven$inboundSchema,
    NinetySix$inboundSchema,
    NinetyNine$inboundSchema,
    OneHundredAndFour$inboundSchema,
    OneHundredAndNine$inboundSchema,
    OneHundredAndTen$inboundSchema,
    OneHundredAndTwelve$inboundSchema,
    OneHundredAndTwentyFive$inboundSchema,
    OneHundredAndThirtySix$inboundSchema,
    OneHundredAndFortySeven$inboundSchema,
    OneHundredAndFortyEight$inboundSchema,
    OneHundredAndFiftyOne$inboundSchema,
    OneHundredAndFiftySeven$inboundSchema,
    OneHundredAndSeventyFour$inboundSchema,
    OneHundredAndSeventySeven$inboundSchema,
    OneHundredAndEightyFour$inboundSchema,
    OneHundredAndNinetySix$inboundSchema,
    TwoHundredAndEighteen$inboundSchema,
    TwoHundredAndNineteen$inboundSchema,
    TwoHundredAndTwentyEight$inboundSchema,
    TwoHundredAndThirtyOne$inboundSchema,
    TwoHundredAndFortyOne$inboundSchema,
    TwoHundredAndFortyThree$inboundSchema,
    TwoHundredAndSixtyFour$inboundSchema,
    TwoHundredAndSeventy$inboundSchema,
    TwoHundredAndSeventyFour$inboundSchema,
    TwoHundredAndEightyOne$inboundSchema,
    TwoHundredAndEightyTwo$inboundSchema,
    TwoHundredAndEightyThree$inboundSchema,
    TwoHundredAndEightyFive$inboundSchema,
    TwoHundredAndNinety$inboundSchema,
    TwoHundredAndNinetyTwo$inboundSchema,
    TwoHundredAndNinetyThree$inboundSchema,
    ThreeHundred$inboundSchema,
    ThreeHundredAndSix$inboundSchema,
    ThreeHundredAndSeven$inboundSchema,
    ThreeHundredAndTwelve$inboundSchema,
    ThreeHundredAndThirteen$inboundSchema,
    ThreeHundredAndFourteen$inboundSchema,
    ThreeHundredAndSixteen$inboundSchema,
    ThreeHundredAndEighteen$inboundSchema,
    ThreeHundredAndTwentyTwo$inboundSchema,
    ThreeHundredAndTwentyFour$inboundSchema,
    ThreeHundredAndTwentyEight$inboundSchema,
    ThreeHundredAndThirty$inboundSchema,
    ThreeHundredAndThirtyFour$inboundSchema,
    ThreeHundredAndThirtyFive$inboundSchema,
    ThreeHundredAndThirtySeven$inboundSchema,
    ThreeHundredAndThirtyEight$inboundSchema,
    ThreeHundredAndFortyOne$inboundSchema,
    ThreeHundredAndFortyTwo$inboundSchema,
    ThreeHundredAndFortySeven$inboundSchema,
    ThreeHundredAndFortyNine$inboundSchema,
    z.lazy(() => Payload1$inboundSchema),
    z.lazy(() => TwentySix$inboundSchema),
    z.lazy(() => TwentySeven$inboundSchema),
    z.lazy(() => ThirtyOne$inboundSchema),
    z.lazy(() => ThirtyTwo$inboundSchema),
    z.lazy(() => ThirtyThree$inboundSchema),
    z.lazy(() => ThirtyFour$inboundSchema),
    z.lazy(() => ThirtySeven$inboundSchema),
    z.lazy(() => ThirtyEight$inboundSchema),
    z.lazy(() => FortyEight$inboundSchema),
    SixtyOne$inboundSchema,
    SixtyFive$inboundSchema,
    SeventyEight$inboundSchema,
    OneHundredAndTwentySix$inboundSchema,
    OneHundredAndTwentyEight$inboundSchema,
    OneHundredAndTwentyNine$inboundSchema,
    OneHundredAndFortyNine$inboundSchema,
    OneHundredAndSeventyFive$inboundSchema,
    OneHundredAndSeventySix$inboundSchema,
    OneHundredAndNinetyThree$inboundSchema,
    OneHundredAndNinetyFour$inboundSchema,
    TwoHundredAndSeventySix$inboundSchema,
    TwoHundredAndEightyFour$inboundSchema,
    TwoHundredAndNinetySeven$inboundSchema,
    ThreeHundredAndThree$inboundSchema,
    ThreeHundredAndFive$inboundSchema,
    ThreeHundredAndEight$inboundSchema,
    ThreeHundredAndEleven$inboundSchema,
    ThreeHundredAndTwenty$inboundSchema,
    ThreeHundredAndTwentyOne$inboundSchema,
    ThreeHundredAndTwentyThree$inboundSchema,
    ThreeHundredAndTwentySix$inboundSchema,
    ThreeHundredAndThirtyOne$inboundSchema,
  ]);

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

/** @internal */
export const UserEvent$inboundSchema: z.ZodType<
  UserEvent,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: types.string(),
  text: types.string(),
  entities: z.array(Entities$inboundSchema),
  type: types.optional(Type$inboundSchema),
  categories: types.optional(z.array(Categories$inboundSchema)),
  createdAt: types.number(),
  user: types.optional(User$inboundSchema),
  principal: types.optional(Principal$inboundSchema),
  via: types.optional(z.array(Via$inboundSchema)),
  userId: types.optional(types.string()),
  principalId: types.string(),
  viaIds: types.optional(z.array(types.string())),
  payload: types.optional(
    smartUnion([
      TwoHundredAndNinetySix$inboundSchema,
      OneHundredAndFortyFive$inboundSchema,
      NinetyFour$inboundSchema,
      OneHundredAndSixtyFive$inboundSchema,
      TwoHundredAndTwentyFour$inboundSchema,
      OneHundredAndThirtyNine$inboundSchema,
      OneHundredAndFortyThree$inboundSchema,
      TwoHundredAndTwo$inboundSchema,
      TwoHundredAndSixtyThree$inboundSchema,
      TwoHundredAndSeventySeven$inboundSchema,
      TwoHundredAndSeventyNine$inboundSchema,
      EightyEight$inboundSchema,
      NinetyOne$inboundSchema,
      NinetyTwo$inboundSchema,
      NinetyThree$inboundSchema,
      NinetyFive$inboundSchema,
      OneHundredAndTwo$inboundSchema,
      OneHundredAndThirtyThree$inboundSchema,
      OneHundredAndThirtyEight$inboundSchema,
      OneHundredAndFortyFour$inboundSchema,
      TwoHundredAndTwelve$inboundSchema,
      TwoHundredAndTwentySix$inboundSchema,
      TwoHundredAndThirtySix$inboundSchema,
      TwoHundredAndNinetyFive$inboundSchema,
      ThreeHundredAndFiftyThree$inboundSchema,
      z.lazy(() => Payload2$inboundSchema),
      z.lazy(() => Ten$inboundSchema),
      z.lazy(() => FortyNine$inboundSchema),
      z.lazy(() => Fifty$inboundSchema),
      EightyTwo$inboundSchema,
      EightyFour$inboundSchema,
      Ninety$inboundSchema,
      OneHundred$inboundSchema,
      OneHundredAndSeventeen$inboundSchema,
      OneHundredAndTwentyOne$inboundSchema,
      OneHundredAndThirtySeven$inboundSchema,
      OneHundredAndSixtyFour$inboundSchema,
      OneHundredAndSixtySix$inboundSchema,
      OneHundredAndSeventyTwo$inboundSchema,
      OneHundredAndEightyNine$inboundSchema,
      OneHundredAndNinetyTwo$inboundSchema,
      OneHundredAndNinetyNine$inboundSchema,
      TwoHundredAndThree$inboundSchema,
      TwoHundredAndFive$inboundSchema,
      TwoHundredAndSix$inboundSchema,
      TwoHundredAndSeven$inboundSchema,
      TwoHundredAndEight$inboundSchema,
      TwoHundredAndTwentyThree$inboundSchema,
      TwoHundredAndTwentyFive$inboundSchema,
      TwoHundredAndTwentyNine$inboundSchema,
      TwoHundredAndFortyFive$inboundSchema,
      TwoHundredAndFortyNine$inboundSchema,
      TwoHundredAndFifty$inboundSchema,
      TwoHundredAndFiftySeven$inboundSchema,
      TwoHundredAndFiftyEight$inboundSchema,
      TwoHundredAndFiftyNine$inboundSchema,
      TwoHundredAndSixtyOne$inboundSchema,
      TwoHundredAndSeventyFive$inboundSchema,
      TwoHundredAndSeventyEight$inboundSchema,
      TwoHundredAndEightySeven$inboundSchema,
      TwoHundredAndEightyEight$inboundSchema,
      TwoHundredAndNinetyFour$inboundSchema,
      ThreeHundredAndOne$inboundSchema,
      ThreeHundredAndFifteen$inboundSchema,
      ThreeHundredAndTwentyNine$inboundSchema,
      ThreeHundredAndFiftyFour$inboundSchema,
      ThreeHundredAndFiftyFive$inboundSchema,
      z.lazy(() => Thirty$inboundSchema),
      z.lazy(() => ThirtyFive$inboundSchema),
      FiftySeven$inboundSchema,
      Sixty$inboundSchema,
      SixtySeven$inboundSchema,
      SixtyEight$inboundSchema,
      SixtyNine$inboundSchema,
      Seventy$inboundSchema,
      EightyNine$inboundSchema,
      OneHundredAndThree$inboundSchema,
      OneHundredAndSix$inboundSchema,
      OneHundredAndSeven$inboundSchema,
      OneHundredAndEight$inboundSchema,
      OneHundredAndThirteen$inboundSchema,
      OneHundredAndFourteen$inboundSchema,
      OneHundredAndSixteen$inboundSchema,
      OneHundredAndTwenty$inboundSchema,
      OneHundredAndTwentyTwo$inboundSchema,
      OneHundredAndThirty$inboundSchema,
      OneHundredAndThirtyOne$inboundSchema,
      OneHundredAndThirtyTwo$inboundSchema,
      OneHundredAndThirtyFour$inboundSchema,
      OneHundredAndThirtyFive$inboundSchema,
      OneHundredAndForty$inboundSchema,
      OneHundredAndFortyOne$inboundSchema,
      OneHundredAndFortySix$inboundSchema,
      OneHundredAndFifty$inboundSchema,
      OneHundredAndFiftyTwo$inboundSchema,
      OneHundredAndFiftyFive$inboundSchema,
      OneHundredAndFiftyEight$inboundSchema,
      OneHundredAndFiftyNine$inboundSchema,
      OneHundredAndSixty$inboundSchema,
      OneHundredAndSixtyOne$inboundSchema,
      OneHundredAndSixtyTwo$inboundSchema,
      OneHundredAndSixtyThree$inboundSchema,
      OneHundredAndSixtySeven$inboundSchema,
      OneHundredAndSixtyEight$inboundSchema,
      OneHundredAndSixtyNine$inboundSchema,
      OneHundredAndSeventy$inboundSchema,
      OneHundredAndEighty$inboundSchema,
      OneHundredAndEightyTwo$inboundSchema,
      OneHundredAndEightyThree$inboundSchema,
      OneHundredAndEightyFive$inboundSchema,
      OneHundredAndEightySeven$inboundSchema,
      OneHundredAndEightyEight$inboundSchema,
      OneHundredAndNinety$inboundSchema,
      OneHundredAndNinetyOne$inboundSchema,
      OneHundredAndNinetySeven$inboundSchema,
      TwoHundred$inboundSchema,
      TwoHundredAndOne$inboundSchema,
      TwoHundredAndNine$inboundSchema,
      TwoHundredAndTen$inboundSchema,
      TwoHundredAndEleven$inboundSchema,
      TwoHundredAndThirteen$inboundSchema,
      TwoHundredAndFourteen$inboundSchema,
      TwoHundredAndFifteen$inboundSchema,
      TwoHundredAndSixteen$inboundSchema,
      TwoHundredAndSeventeen$inboundSchema,
      TwoHundredAndTwenty$inboundSchema,
      TwoHundredAndTwentyOne$inboundSchema,
      TwoHundredAndTwentyTwo$inboundSchema,
      TwoHundredAndTwentySeven$inboundSchema,
      TwoHundredAndThirtyFour$inboundSchema,
      TwoHundredAndThirtySeven$inboundSchema,
      TwoHundredAndThirtyEight$inboundSchema,
      TwoHundredAndFiftyOne$inboundSchema,
      TwoHundredAndFiftyTwo$inboundSchema,
      TwoHundredAndFiftyThree$inboundSchema,
      TwoHundredAndFiftyFour$inboundSchema,
      TwoHundredAndFiftyFive$inboundSchema,
      TwoHundredAndSixtySix$inboundSchema,
      TwoHundredAndEighty$inboundSchema,
      TwoHundredAndNinetyOne$inboundSchema,
      TwoHundredAndNinetyEight$inboundSchema,
      ThreeHundredAndNineteen$inboundSchema,
      ThreeHundredAndFortyThree$inboundSchema,
      ThreeHundredAndFortyFour$inboundSchema,
      ThreeHundredAndFortyFive$inboundSchema,
      ThreeHundredAndFortySix$inboundSchema,
      ThreeHundredAndFiftyTwo$inboundSchema,
      z.lazy(() => Payload3$inboundSchema),
      z.lazy(() => Four$inboundSchema),
      z.lazy(() => Five$inboundSchema),
      z.lazy(() => Seven$inboundSchema),
      z.lazy(() => Eight$inboundSchema),
      z.lazy(() => Nine$inboundSchema),
      z.lazy(() => Thirteen$inboundSchema),
      z.lazy(() => Sixteen$inboundSchema),
      z.lazy(() => TwentyTwo$inboundSchema),
      z.lazy(() => TwentyThree$inboundSchema),
      z.lazy(() => TwentyFive$inboundSchema),
      z.lazy(() => TwentyEight$inboundSchema),
      z.lazy(() => ThirtySix$inboundSchema),
      z.lazy(() => ThirtyNine$inboundSchema),
      z.lazy(() => FortyOne$inboundSchema),
      z.lazy(() => FortySix$inboundSchema),
      z.lazy(() => FortySeven$inboundSchema),
      z.lazy(() => FiftyThree$inboundSchema),
      z.lazy(() => FiftyFour$inboundSchema),
      z.lazy(() => FiftyFive$inboundSchema),
      FiftyEight$inboundSchema,
      SixtyThree$inboundSchema,
      SeventyThree$inboundSchema,
      SeventyFour$inboundSchema,
      SeventyFive$inboundSchema,
      SeventySix$inboundSchema,
      SeventySeven$inboundSchema,
      Eighty$inboundSchema,
      EightyThree$inboundSchema,
      NinetySeven$inboundSchema,
      NinetyEight$inboundSchema,
      OneHundredAndOne$inboundSchema,
      OneHundredAndFive$inboundSchema,
      OneHundredAndEleven$inboundSchema,
      OneHundredAndFifteen$inboundSchema,
      OneHundredAndEighteen$inboundSchema,
      OneHundredAndNineteen$inboundSchema,
      OneHundredAndTwentyThree$inboundSchema,
      OneHundredAndTwentyFour$inboundSchema,
      OneHundredAndTwentySeven$inboundSchema,
      OneHundredAndFortyTwo$inboundSchema,
      OneHundredAndFiftyThree$inboundSchema,
      OneHundredAndFiftyFour$inboundSchema,
      OneHundredAndFiftySix$inboundSchema,
      OneHundredAndSeventyOne$inboundSchema,
      OneHundredAndSeventyThree$inboundSchema,
      OneHundredAndSeventyEight$inboundSchema,
      OneHundredAndSeventyNine$inboundSchema,
      OneHundredAndEightyOne$inboundSchema,
      OneHundredAndEightySix$inboundSchema,
      OneHundredAndNinetyFive$inboundSchema,
      OneHundredAndNinetyEight$inboundSchema,
      TwoHundredAndFour$inboundSchema,
      TwoHundredAndThirty$inboundSchema,
      TwoHundredAndThirtyTwo$inboundSchema,
      TwoHundredAndThirtyThree$inboundSchema,
      TwoHundredAndThirtyFive$inboundSchema,
      TwoHundredAndThirtyNine$inboundSchema,
      TwoHundredAndForty$inboundSchema,
      TwoHundredAndFortyTwo$inboundSchema,
      TwoHundredAndFortyFour$inboundSchema,
      TwoHundredAndFortySix$inboundSchema,
      TwoHundredAndFortySeven$inboundSchema,
      TwoHundredAndFortyEight$inboundSchema,
      TwoHundredAndFiftySix$inboundSchema,
      TwoHundredAndSixty$inboundSchema,
      TwoHundredAndSixtyTwo$inboundSchema,
      TwoHundredAndSixtyFive$inboundSchema,
      TwoHundredAndSixtySeven$inboundSchema,
      TwoHundredAndSixtyEight$inboundSchema,
      TwoHundredAndSixtyNine$inboundSchema,
      TwoHundredAndSeventyOne$inboundSchema,
      TwoHundredAndSeventyTwo$inboundSchema,
      TwoHundredAndSeventyThree$inboundSchema,
      TwoHundredAndEightySix$inboundSchema,
      TwoHundredAndEightyNine$inboundSchema,
      TwoHundredAndNinetyNine$inboundSchema,
      ThreeHundredAndTwo$inboundSchema,
      ThreeHundredAndFour$inboundSchema,
      ThreeHundredAndNine$inboundSchema,
      ThreeHundredAndTen$inboundSchema,
      ThreeHundredAndSeventeen$inboundSchema,
      ThreeHundredAndTwentyFive$inboundSchema,
      ThreeHundredAndTwentySeven$inboundSchema,
      ThreeHundredAndThirtyTwo$inboundSchema,
      ThreeHundredAndThirtyThree$inboundSchema,
      ThreeHundredAndThirtySix$inboundSchema,
      ThreeHundredAndThirtyNine$inboundSchema,
      ThreeHundredAndForty$inboundSchema,
      ThreeHundredAndFortyEight$inboundSchema,
      ThreeHundredAndFifty$inboundSchema,
      ThreeHundredAndFiftyOne$inboundSchema,
      ThreeHundredAndFiftySix$inboundSchema,
      z.lazy(() => Six$inboundSchema),
      z.lazy(() => Eleven$inboundSchema),
      z.lazy(() => Twelve$inboundSchema),
      z.lazy(() => Fourteen$inboundSchema),
      z.lazy(() => Fifteen$inboundSchema),
      z.lazy(() => Seventeen$inboundSchema),
      z.lazy(() => Eighteen$inboundSchema),
      z.lazy(() => Nineteen$inboundSchema),
      z.lazy(() => Twenty$inboundSchema),
      z.lazy(() => TwentyOne$inboundSchema),
      z.lazy(() => TwentyFour$inboundSchema),
      z.lazy(() => TwentyNine$inboundSchema),
      z.lazy(() => Forty$inboundSchema),
      z.lazy(() => FortyTwo$inboundSchema),
      z.lazy(() => FortyThree$inboundSchema),
      z.lazy(() => FortyFour$inboundSchema),
      z.lazy(() => FortyFive$inboundSchema),
      z.lazy(() => FiftyOne$inboundSchema),
      z.lazy(() => FiftyTwo$inboundSchema),
      FiftySix$inboundSchema,
      FiftyNine$inboundSchema,
      SixtyTwo$inboundSchema,
      SixtyFour$inboundSchema,
      SixtySix$inboundSchema,
      SeventyOne$inboundSchema,
      SeventyTwo$inboundSchema,
      SeventyNine$inboundSchema,
      EightyOne$inboundSchema,
      EightyFive$inboundSchema,
      EightySix$inboundSchema,
      EightySeven$inboundSchema,
      NinetySix$inboundSchema,
      NinetyNine$inboundSchema,
      OneHundredAndFour$inboundSchema,
      OneHundredAndNine$inboundSchema,
      OneHundredAndTen$inboundSchema,
      OneHundredAndTwelve$inboundSchema,
      OneHundredAndTwentyFive$inboundSchema,
      OneHundredAndThirtySix$inboundSchema,
      OneHundredAndFortySeven$inboundSchema,
      OneHundredAndFortyEight$inboundSchema,
      OneHundredAndFiftyOne$inboundSchema,
      OneHundredAndFiftySeven$inboundSchema,
      OneHundredAndSeventyFour$inboundSchema,
      OneHundredAndSeventySeven$inboundSchema,
      OneHundredAndEightyFour$inboundSchema,
      OneHundredAndNinetySix$inboundSchema,
      TwoHundredAndEighteen$inboundSchema,
      TwoHundredAndNineteen$inboundSchema,
      TwoHundredAndTwentyEight$inboundSchema,
      TwoHundredAndThirtyOne$inboundSchema,
      TwoHundredAndFortyOne$inboundSchema,
      TwoHundredAndFortyThree$inboundSchema,
      TwoHundredAndSixtyFour$inboundSchema,
      TwoHundredAndSeventy$inboundSchema,
      TwoHundredAndSeventyFour$inboundSchema,
      TwoHundredAndEightyOne$inboundSchema,
      TwoHundredAndEightyTwo$inboundSchema,
      TwoHundredAndEightyThree$inboundSchema,
      TwoHundredAndEightyFive$inboundSchema,
      TwoHundredAndNinety$inboundSchema,
      TwoHundredAndNinetyTwo$inboundSchema,
      TwoHundredAndNinetyThree$inboundSchema,
      ThreeHundred$inboundSchema,
      ThreeHundredAndSix$inboundSchema,
      ThreeHundredAndSeven$inboundSchema,
      ThreeHundredAndTwelve$inboundSchema,
      ThreeHundredAndThirteen$inboundSchema,
      ThreeHundredAndFourteen$inboundSchema,
      ThreeHundredAndSixteen$inboundSchema,
      ThreeHundredAndEighteen$inboundSchema,
      ThreeHundredAndTwentyTwo$inboundSchema,
      ThreeHundredAndTwentyFour$inboundSchema,
      ThreeHundredAndTwentyEight$inboundSchema,
      ThreeHundredAndThirty$inboundSchema,
      ThreeHundredAndThirtyFour$inboundSchema,
      ThreeHundredAndThirtyFive$inboundSchema,
      ThreeHundredAndThirtySeven$inboundSchema,
      ThreeHundredAndThirtyEight$inboundSchema,
      ThreeHundredAndFortyOne$inboundSchema,
      ThreeHundredAndFortyTwo$inboundSchema,
      ThreeHundredAndFortySeven$inboundSchema,
      ThreeHundredAndFortyNine$inboundSchema,
      z.lazy(() => Payload1$inboundSchema),
      z.lazy(() => TwentySix$inboundSchema),
      z.lazy(() => TwentySeven$inboundSchema),
      z.lazy(() => ThirtyOne$inboundSchema),
      z.lazy(() => ThirtyTwo$inboundSchema),
      z.lazy(() => ThirtyThree$inboundSchema),
      z.lazy(() => ThirtyFour$inboundSchema),
      z.lazy(() => ThirtySeven$inboundSchema),
      z.lazy(() => ThirtyEight$inboundSchema),
      z.lazy(() => FortyEight$inboundSchema),
      SixtyOne$inboundSchema,
      SixtyFive$inboundSchema,
      SeventyEight$inboundSchema,
      OneHundredAndTwentySix$inboundSchema,
      OneHundredAndTwentyEight$inboundSchema,
      OneHundredAndTwentyNine$inboundSchema,
      OneHundredAndFortyNine$inboundSchema,
      OneHundredAndSeventyFive$inboundSchema,
      OneHundredAndSeventySix$inboundSchema,
      OneHundredAndNinetyThree$inboundSchema,
      OneHundredAndNinetyFour$inboundSchema,
      TwoHundredAndSeventySix$inboundSchema,
      TwoHundredAndEightyFour$inboundSchema,
      TwoHundredAndNinetySeven$inboundSchema,
      ThreeHundredAndThree$inboundSchema,
      ThreeHundredAndFive$inboundSchema,
      ThreeHundredAndEight$inboundSchema,
      ThreeHundredAndEleven$inboundSchema,
      ThreeHundredAndTwenty$inboundSchema,
      ThreeHundredAndTwentyOne$inboundSchema,
      ThreeHundredAndTwentyThree$inboundSchema,
      ThreeHundredAndTwentySix$inboundSchema,
      ThreeHundredAndThirtyOne$inboundSchema,
    ]),
  ),
});

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