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

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

export type InputValue18 = {
  /**
   * A timestamp value represents a single, universal moment in time using an ISO 8601 formatted string. This means that a timestamp consists of a date, a time (with nanosecond precision), and a time zone. Attio will coerce timestamps which do not provide full nanosecond precision and UTC is assumed if no time zone is provided. For example, "2023", "2023-01", "2023-01-02", "2023-01-02T13:00", "2023-01-02T13:00:00", and "2023-01-02T13:00:00.000000000" will all be coerced to "2023-01-02T13:00:00.000000000Z". Timestamps are always returned in UTC. For example, writing a timestamp value using the string "2023-01-02T13:00:00.000000000+02:00" will result in the value "2023-01-02T11:00:00.000000000Z" being returned. The maximum date is "9999-12-31T23:59:59.999999999Z".
   */
  value: Date;
};

export type InputValue17 = {
  /**
   * A raw text field. Values are limited to 10MB.
   */
  value: string;
};

export type InputValue16 = {
  /**
   * The UUID or select option title identifying the selected select option.
   */
  option: string;
};

export type InputValue15 = {
  /**
   * A number between 0 and 5 (inclusive) to represent a star rating.
   */
  value: number;
};

export type InputValue14 = {
  /**
   * The UUID or status title identifying the selected status.
   */
  status: string;
};

/**
 * The ISO 3166-1 alpha-2 country code representing the country that this phone number belongs to. Optional if `original_phone_number` includes a country code prefix.
 */
export const InputValueCountryCode2 = {
  Af: "AF",
  Ax: "AX",
  Al: "AL",
  Dz: "DZ",
  As: "AS",
  Ad: "AD",
  Ao: "AO",
  Ai: "AI",
  Aq: "AQ",
  Ag: "AG",
  Ar: "AR",
  Am: "AM",
  Aw: "AW",
  Au: "AU",
  At: "AT",
  Az: "AZ",
  Bs: "BS",
  Bh: "BH",
  Bd: "BD",
  Bb: "BB",
  By: "BY",
  Be: "BE",
  Bz: "BZ",
  Bj: "BJ",
  Bm: "BM",
  Bt: "BT",
  Bo: "BO",
  Ba: "BA",
  Bw: "BW",
  Bv: "BV",
  Br: "BR",
  Io: "IO",
  Bn: "BN",
  Bg: "BG",
  Bf: "BF",
  Bi: "BI",
  Kh: "KH",
  Cm: "CM",
  Ca: "CA",
  Cv: "CV",
  Ky: "KY",
  Cf: "CF",
  Td: "TD",
  Cl: "CL",
  Cn: "CN",
  Cx: "CX",
  Cc: "CC",
  Co: "CO",
  Km: "KM",
  Cg: "CG",
  Cd: "CD",
  Ck: "CK",
  Cr: "CR",
  Ci: "CI",
  Hr: "HR",
  Cu: "CU",
  Cw: "CW",
  Cy: "CY",
  Cz: "CZ",
  Dk: "DK",
  Dj: "DJ",
  Dm: "DM",
  Do: "DO",
  Ec: "EC",
  Eg: "EG",
  Sv: "SV",
  Gq: "GQ",
  Er: "ER",
  Ee: "EE",
  Et: "ET",
  Fk: "FK",
  Fo: "FO",
  Fj: "FJ",
  Fi: "FI",
  Fr: "FR",
  Gf: "GF",
  Pf: "PF",
  Tf: "TF",
  Ga: "GA",
  Gm: "GM",
  Ge: "GE",
  De: "DE",
  Gh: "GH",
  Gi: "GI",
  Gr: "GR",
  Gl: "GL",
  Gd: "GD",
  Gp: "GP",
  Gu: "GU",
  Gt: "GT",
  Gg: "GG",
  Gn: "GN",
  Gw: "GW",
  Gy: "GY",
  Ht: "HT",
  Hm: "HM",
  Va: "VA",
  Hn: "HN",
  Hk: "HK",
  Hu: "HU",
  Is: "IS",
  In: "IN",
  Id: "ID",
  Ir: "IR",
  Iq: "IQ",
  Ie: "IE",
  Im: "IM",
  Il: "IL",
  It: "IT",
  Jm: "JM",
  Jp: "JP",
  Je: "JE",
  Jo: "JO",
  Kz: "KZ",
  Ke: "KE",
  Ki: "KI",
  Kr: "KR",
  Kw: "KW",
  Kg: "KG",
  La: "LA",
  Lv: "LV",
  Lb: "LB",
  Ls: "LS",
  Lr: "LR",
  Ly: "LY",
  Li: "LI",
  Lt: "LT",
  Lu: "LU",
  Mo: "MO",
  Mk: "MK",
  Mg: "MG",
  Mw: "MW",
  My: "MY",
  Mv: "MV",
  Ml: "ML",
  Mt: "MT",
  Mh: "MH",
  Mq: "MQ",
  Mr: "MR",
  Mu: "MU",
  Yt: "YT",
  Mx: "MX",
  Fm: "FM",
  Md: "MD",
  Mc: "MC",
  Mn: "MN",
  Me: "ME",
  Ms: "MS",
  Ma: "MA",
  Mz: "MZ",
  Mm: "MM",
  Na: "NA",
  Nr: "NR",
  Np: "NP",
  Nl: "NL",
  An: "AN",
  Nc: "NC",
  Nz: "NZ",
  Ni: "NI",
  Ne: "NE",
  Ng: "NG",
  Nu: "NU",
  Nf: "NF",
  Mp: "MP",
  No: "NO",
  Om: "OM",
  Pk: "PK",
  Pw: "PW",
  Ps: "PS",
  Pa: "PA",
  Pg: "PG",
  Py: "PY",
  Pe: "PE",
  Ph: "PH",
  Pn: "PN",
  Pl: "PL",
  Pt: "PT",
  Pr: "PR",
  Qa: "QA",
  Re: "RE",
  Ro: "RO",
  Ru: "RU",
  Rw: "RW",
  Bl: "BL",
  Sh: "SH",
  Kn: "KN",
  Lc: "LC",
  Mf: "MF",
  Pm: "PM",
  Vc: "VC",
  Ws: "WS",
  Sm: "SM",
  St: "ST",
  Sa: "SA",
  Sn: "SN",
  Ss: "SS",
  Rs: "RS",
  Sc: "SC",
  Sl: "SL",
  Sg: "SG",
  Sk: "SK",
  Si: "SI",
  Sb: "SB",
  So: "SO",
  Za: "ZA",
  Gs: "GS",
  Es: "ES",
  Lk: "LK",
  Sd: "SD",
  Sr: "SR",
  Sj: "SJ",
  Sz: "SZ",
  Se: "SE",
  Ch: "CH",
  Sy: "SY",
  Tw: "TW",
  Tj: "TJ",
  Tz: "TZ",
  Th: "TH",
  Tl: "TL",
  Tg: "TG",
  Tk: "TK",
  To: "TO",
  Tt: "TT",
  Tn: "TN",
  Tr: "TR",
  Tm: "TM",
  Tc: "TC",
  Tv: "TV",
  Ug: "UG",
  Ua: "UA",
  Ae: "AE",
  Gb: "GB",
  Us: "US",
  Um: "UM",
  Uy: "UY",
  Uz: "UZ",
  Vu: "VU",
  Ve: "VE",
  Vn: "VN",
  Vg: "VG",
  Vi: "VI",
  Wf: "WF",
  Eh: "EH",
  Ye: "YE",
  Zm: "ZM",
  Zw: "ZW",
} as const;
/**
 * The ISO 3166-1 alpha-2 country code representing the country that this phone number belongs to. Optional if `original_phone_number` includes a country code prefix.
 */
export type InputValueCountryCode2 = ClosedEnum<typeof InputValueCountryCode2>;

export type InputValue13 = {
  /**
   * A phone number which is either a) prefixed with a country code (e.g. `+44....`) or b) a local number, where `country_code` is specified in addition.
   */
  originalPhoneNumber: string;
  /**
   * The ISO 3166-1 alpha-2 country code representing the country that this phone number belongs to. Optional if `original_phone_number` includes a country code prefix.
   */
  countryCode?: InputValueCountryCode2 | null | undefined;
};

export type InputValue12 = {
  /**
   * The first name.
   */
  firstName?: string | undefined;
  /**
   * The last name.
   */
  lastName?: string | undefined;
  /**
   * The full name.
   */
  fullName?: string | undefined;
};

export type InputValue11 = {
  /**
   * Numbers are persisted as 64 bit floats.
   */
  value: number;
};

/**
 * The ISO 3166-1 alpha-2 country code for the country this location is in.
 */
export const InputValueCountryCode1 = {
  Af: "AF",
  Ax: "AX",
  Al: "AL",
  Dz: "DZ",
  As: "AS",
  Ad: "AD",
  Ao: "AO",
  Ai: "AI",
  Aq: "AQ",
  Ag: "AG",
  Ar: "AR",
  Am: "AM",
  Aw: "AW",
  Au: "AU",
  At: "AT",
  Az: "AZ",
  Bs: "BS",
  Bh: "BH",
  Bd: "BD",
  Bb: "BB",
  By: "BY",
  Be: "BE",
  Bz: "BZ",
  Bj: "BJ",
  Bm: "BM",
  Bt: "BT",
  Bo: "BO",
  Ba: "BA",
  Bw: "BW",
  Bv: "BV",
  Br: "BR",
  Io: "IO",
  Bn: "BN",
  Bg: "BG",
  Bf: "BF",
  Bi: "BI",
  Kh: "KH",
  Cm: "CM",
  Ca: "CA",
  Cv: "CV",
  Ky: "KY",
  Cf: "CF",
  Td: "TD",
  Cl: "CL",
  Cn: "CN",
  Cx: "CX",
  Cc: "CC",
  Co: "CO",
  Km: "KM",
  Cg: "CG",
  Cd: "CD",
  Ck: "CK",
  Cr: "CR",
  Ci: "CI",
  Hr: "HR",
  Cu: "CU",
  Cw: "CW",
  Cy: "CY",
  Cz: "CZ",
  Dk: "DK",
  Dj: "DJ",
  Dm: "DM",
  Do: "DO",
  Ec: "EC",
  Eg: "EG",
  Sv: "SV",
  Gq: "GQ",
  Er: "ER",
  Ee: "EE",
  Et: "ET",
  Fk: "FK",
  Fo: "FO",
  Fj: "FJ",
  Fi: "FI",
  Fr: "FR",
  Gf: "GF",
  Pf: "PF",
  Tf: "TF",
  Ga: "GA",
  Gm: "GM",
  Ge: "GE",
  De: "DE",
  Gh: "GH",
  Gi: "GI",
  Gr: "GR",
  Gl: "GL",
  Gd: "GD",
  Gp: "GP",
  Gu: "GU",
  Gt: "GT",
  Gg: "GG",
  Gn: "GN",
  Gw: "GW",
  Gy: "GY",
  Ht: "HT",
  Hm: "HM",
  Va: "VA",
  Hn: "HN",
  Hk: "HK",
  Hu: "HU",
  Is: "IS",
  In: "IN",
  Id: "ID",
  Ir: "IR",
  Iq: "IQ",
  Ie: "IE",
  Im: "IM",
  Il: "IL",
  It: "IT",
  Jm: "JM",
  Jp: "JP",
  Je: "JE",
  Jo: "JO",
  Kz: "KZ",
  Ke: "KE",
  Ki: "KI",
  Kr: "KR",
  Kw: "KW",
  Kg: "KG",
  La: "LA",
  Lv: "LV",
  Lb: "LB",
  Ls: "LS",
  Lr: "LR",
  Ly: "LY",
  Li: "LI",
  Lt: "LT",
  Lu: "LU",
  Mo: "MO",
  Mk: "MK",
  Mg: "MG",
  Mw: "MW",
  My: "MY",
  Mv: "MV",
  Ml: "ML",
  Mt: "MT",
  Mh: "MH",
  Mq: "MQ",
  Mr: "MR",
  Mu: "MU",
  Yt: "YT",
  Mx: "MX",
  Fm: "FM",
  Md: "MD",
  Mc: "MC",
  Mn: "MN",
  Me: "ME",
  Ms: "MS",
  Ma: "MA",
  Mz: "MZ",
  Mm: "MM",
  Na: "NA",
  Nr: "NR",
  Np: "NP",
  Nl: "NL",
  An: "AN",
  Nc: "NC",
  Nz: "NZ",
  Ni: "NI",
  Ne: "NE",
  Ng: "NG",
  Nu: "NU",
  Nf: "NF",
  Mp: "MP",
  No: "NO",
  Om: "OM",
  Pk: "PK",
  Pw: "PW",
  Ps: "PS",
  Pa: "PA",
  Pg: "PG",
  Py: "PY",
  Pe: "PE",
  Ph: "PH",
  Pn: "PN",
  Pl: "PL",
  Pt: "PT",
  Pr: "PR",
  Qa: "QA",
  Re: "RE",
  Ro: "RO",
  Ru: "RU",
  Rw: "RW",
  Bl: "BL",
  Sh: "SH",
  Kn: "KN",
  Lc: "LC",
  Mf: "MF",
  Pm: "PM",
  Vc: "VC",
  Ws: "WS",
  Sm: "SM",
  St: "ST",
  Sa: "SA",
  Sn: "SN",
  Ss: "SS",
  Rs: "RS",
  Sc: "SC",
  Sl: "SL",
  Sg: "SG",
  Sk: "SK",
  Si: "SI",
  Sb: "SB",
  So: "SO",
  Za: "ZA",
  Gs: "GS",
  Es: "ES",
  Lk: "LK",
  Sd: "SD",
  Sr: "SR",
  Sj: "SJ",
  Sz: "SZ",
  Se: "SE",
  Ch: "CH",
  Sy: "SY",
  Tw: "TW",
  Tj: "TJ",
  Tz: "TZ",
  Th: "TH",
  Tl: "TL",
  Tg: "TG",
  Tk: "TK",
  To: "TO",
  Tt: "TT",
  Tn: "TN",
  Tr: "TR",
  Tm: "TM",
  Tc: "TC",
  Tv: "TV",
  Ug: "UG",
  Ua: "UA",
  Ae: "AE",
  Gb: "GB",
  Us: "US",
  Um: "UM",
  Uy: "UY",
  Uz: "UZ",
  Vu: "VU",
  Ve: "VE",
  Vn: "VN",
  Vg: "VG",
  Vi: "VI",
  Wf: "WF",
  Eh: "EH",
  Ye: "YE",
  Zm: "ZM",
  Zw: "ZW",
} as const;
/**
 * The ISO 3166-1 alpha-2 country code for the country this location is in.
 */
export type InputValueCountryCode1 = ClosedEnum<typeof InputValueCountryCode1>;

export type InputValue10 = {
  /**
   * The first line of the address. Note that this value is not currently represented in the UI but will be persisted and readable through API calls.
   */
  line1: string | null;
  /**
   * The second line of the address. Note that this value is not currently represented in the UI but will be persisted and readable through API calls.
   */
  line2: string | null;
  /**
   * The third line of the address. Note that this value is not currently represented in the UI but will be persisted and readable through API calls.
   */
  line3: string | null;
  /**
   * The fourth line of the address. Note that this value is not currently represented in the UI but will be persisted and readable through API calls.
   */
  line4: string | null;
  /**
   * The town, neighborhood or area the location is in.
   */
  locality: string | null;
  /**
   * The state, county, province or region that the location is in.
   */
  region: string | null;
  /**
   * The postcode or zip code for the location. Note that this value is not currently represented in the UI but will be persisted and readable through API calls.}
   */
  postcode: string | null;
  /**
   * The ISO 3166-1 alpha-2 country code for the country this location is in.
   */
  countryCode: InputValueCountryCode1 | null;
  /**
   * The latitude of the location. Validated by the regular expression `/^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?)$/`. Note that this value is not currently represented in the UI but will be persisted and readable through API calls.}
   */
  latitude: string | null;
  /**
   * The longitude of the location. Validated by the regular expression `/^[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$/`
   */
  longitude: string | null;
};

/**
 * The type of interaction e.g. calendar or email.
 */
export const InputValueInteractionType = {
  CalendarEvent: "calendar-event",
  Call: "call",
  ChatThread: "chat-thread",
  Email: "email",
  InPersonMeeting: "in-person-meeting",
  Meeting: "meeting",
} as const;
/**
 * The type of interaction e.g. calendar or email.
 */
export type InputValueInteractionType = ClosedEnum<
  typeof InputValueInteractionType
>;

/**
 * The type of actor. [Read more information on actor types here](/docs/actors).
 */
export const InputValueType = {
  ApiToken: "api-token",
  WorkspaceMember: "workspace-member",
  System: "system",
  App: "app",
} as const;
/**
 * The type of actor. [Read more information on actor types here](/docs/actors).
 */
export type InputValueType = ClosedEnum<typeof InputValueType>;

/**
 * The actor that created this value.
 */
export type InputValueOwnerActor = {
  /**
   * An ID to identify the actor.
   */
  id?: string | null | undefined;
  /**
   * The type of actor. [Read more information on actor types here](/docs/actors).
   */
  type?: InputValueType | null | undefined;
};

export type InputValue9 = {
  /**
   * The type of interaction e.g. calendar or email.
   */
  interactionType: InputValueInteractionType;
  /**
   * When the interaction occurred.
   */
  interactedAt: Date;
  /**
   * The actor that created this value.
   */
  ownerActor: InputValueOwnerActor;
};

export type SlugOrIdOfMatchingAttribute5 = {
  /**
   * A raw text field. Values are limited to 10MB.
   */
  value?: string | undefined;
};

/**
 * The ISO 3166-1 alpha-2 country code representing the country that this phone number belongs to.
 */
export const SlugOrIdOfMatchingAttributeCountryCode = {
  Af: "AF",
  Ax: "AX",
  Al: "AL",
  Dz: "DZ",
  As: "AS",
  Ad: "AD",
  Ao: "AO",
  Ai: "AI",
  Aq: "AQ",
  Ag: "AG",
  Ar: "AR",
  Am: "AM",
  Aw: "AW",
  Au: "AU",
  At: "AT",
  Az: "AZ",
  Bs: "BS",
  Bh: "BH",
  Bd: "BD",
  Bb: "BB",
  By: "BY",
  Be: "BE",
  Bz: "BZ",
  Bj: "BJ",
  Bm: "BM",
  Bt: "BT",
  Bo: "BO",
  Ba: "BA",
  Bw: "BW",
  Bv: "BV",
  Br: "BR",
  Io: "IO",
  Bn: "BN",
  Bg: "BG",
  Bf: "BF",
  Bi: "BI",
  Kh: "KH",
  Cm: "CM",
  Ca: "CA",
  Cv: "CV",
  Ky: "KY",
  Cf: "CF",
  Td: "TD",
  Cl: "CL",
  Cn: "CN",
  Cx: "CX",
  Cc: "CC",
  Co: "CO",
  Km: "KM",
  Cg: "CG",
  Cd: "CD",
  Ck: "CK",
  Cr: "CR",
  Ci: "CI",
  Hr: "HR",
  Cu: "CU",
  Cw: "CW",
  Cy: "CY",
  Cz: "CZ",
  Dk: "DK",
  Dj: "DJ",
  Dm: "DM",
  Do: "DO",
  Ec: "EC",
  Eg: "EG",
  Sv: "SV",
  Gq: "GQ",
  Er: "ER",
  Ee: "EE",
  Et: "ET",
  Fk: "FK",
  Fo: "FO",
  Fj: "FJ",
  Fi: "FI",
  Fr: "FR",
  Gf: "GF",
  Pf: "PF",
  Tf: "TF",
  Ga: "GA",
  Gm: "GM",
  Ge: "GE",
  De: "DE",
  Gh: "GH",
  Gi: "GI",
  Gr: "GR",
  Gl: "GL",
  Gd: "GD",
  Gp: "GP",
  Gu: "GU",
  Gt: "GT",
  Gg: "GG",
  Gn: "GN",
  Gw: "GW",
  Gy: "GY",
  Ht: "HT",
  Hm: "HM",
  Va: "VA",
  Hn: "HN",
  Hk: "HK",
  Hu: "HU",
  Is: "IS",
  In: "IN",
  Id: "ID",
  Ir: "IR",
  Iq: "IQ",
  Ie: "IE",
  Im: "IM",
  Il: "IL",
  It: "IT",
  Jm: "JM",
  Jp: "JP",
  Je: "JE",
  Jo: "JO",
  Kz: "KZ",
  Ke: "KE",
  Ki: "KI",
  Kr: "KR",
  Kw: "KW",
  Kg: "KG",
  La: "LA",
  Lv: "LV",
  Lb: "LB",
  Ls: "LS",
  Lr: "LR",
  Ly: "LY",
  Li: "LI",
  Lt: "LT",
  Lu: "LU",
  Mo: "MO",
  Mk: "MK",
  Mg: "MG",
  Mw: "MW",
  My: "MY",
  Mv: "MV",
  Ml: "ML",
  Mt: "MT",
  Mh: "MH",
  Mq: "MQ",
  Mr: "MR",
  Mu: "MU",
  Yt: "YT",
  Mx: "MX",
  Fm: "FM",
  Md: "MD",
  Mc: "MC",
  Mn: "MN",
  Me: "ME",
  Ms: "MS",
  Ma: "MA",
  Mz: "MZ",
  Mm: "MM",
  Na: "NA",
  Nr: "NR",
  Np: "NP",
  Nl: "NL",
  An: "AN",
  Nc: "NC",
  Nz: "NZ",
  Ni: "NI",
  Ne: "NE",
  Ng: "NG",
  Nu: "NU",
  Nf: "NF",
  Mp: "MP",
  No: "NO",
  Om: "OM",
  Pk: "PK",
  Pw: "PW",
  Ps: "PS",
  Pa: "PA",
  Pg: "PG",
  Py: "PY",
  Pe: "PE",
  Ph: "PH",
  Pn: "PN",
  Pl: "PL",
  Pt: "PT",
  Pr: "PR",
  Qa: "QA",
  Re: "RE",
  Ro: "RO",
  Ru: "RU",
  Rw: "RW",
  Bl: "BL",
  Sh: "SH",
  Kn: "KN",
  Lc: "LC",
  Mf: "MF",
  Pm: "PM",
  Vc: "VC",
  Ws: "WS",
  Sm: "SM",
  St: "ST",
  Sa: "SA",
  Sn: "SN",
  Ss: "SS",
  Rs: "RS",
  Sc: "SC",
  Sl: "SL",
  Sg: "SG",
  Sk: "SK",
  Si: "SI",
  Sb: "SB",
  So: "SO",
  Za: "ZA",
  Gs: "GS",
  Es: "ES",
  Lk: "LK",
  Sd: "SD",
  Sr: "SR",
  Sj: "SJ",
  Sz: "SZ",
  Se: "SE",
  Ch: "CH",
  Sy: "SY",
  Tw: "TW",
  Tj: "TJ",
  Tz: "TZ",
  Th: "TH",
  Tl: "TL",
  Tg: "TG",
  Tk: "TK",
  To: "TO",
  Tt: "TT",
  Tn: "TN",
  Tr: "TR",
  Tm: "TM",
  Tc: "TC",
  Tv: "TV",
  Ug: "UG",
  Ua: "UA",
  Ae: "AE",
  Gb: "GB",
  Us: "US",
  Um: "UM",
  Uy: "UY",
  Uz: "UZ",
  Vu: "VU",
  Ve: "VE",
  Vn: "VN",
  Vg: "VG",
  Vi: "VI",
  Wf: "WF",
  Eh: "EH",
  Ye: "YE",
  Zm: "ZM",
  Zw: "ZW",
} as const;
/**
 * The ISO 3166-1 alpha-2 country code representing the country that this phone number belongs to.
 */
export type SlugOrIdOfMatchingAttributeCountryCode = ClosedEnum<
  typeof SlugOrIdOfMatchingAttributeCountryCode
>;

export type SlugOrIdOfMatchingAttribute4 = {
  /**
   * The raw, original phone number, as inputted.
   */
  originalPhoneNumber?: string | undefined;
  /**
   * The ISO 3166-1 alpha-2 country code representing the country that this phone number belongs to.
   */
  countryCode?: SlugOrIdOfMatchingAttributeCountryCode | null | undefined;
};

export type SlugOrIdOfMatchingAttribute3 = {
  /**
   * Numbers are persisted as 64 bit floats.
   */
  value?: number | undefined;
};

export type SlugOrIdOfMatchingAttribute2 = {
  /**
   * An email address string
   */
  emailAddress?: string | undefined;
};

export type SlugOrIdOfMatchingAttribute1 = {
  /**
   * The full domain of the website.
   */
  domain?: string | undefined;
};

export type SlugOrIdOfMatchingAttributeUnion =
  | SlugOrIdOfMatchingAttribute1
  | SlugOrIdOfMatchingAttribute2
  | SlugOrIdOfMatchingAttribute3
  | SlugOrIdOfMatchingAttribute5
  | SlugOrIdOfMatchingAttribute4;

export type InputValue8 = {
  /**
   * A UUID or slug to identify the object that the referenced record belongs to.
   */
  targetObject: string;
  /**
   * In addition to referencing records directly by record ID, you may also reference by a matching attribute of your choice. For example, if you want to add a reference to the person record with email "alice@website.com", you should pass a value with `target_object` set to `"people"` and `email_addresses` set to `[{email_address:"alice@website.com"}]`. The key should be the slug or ID of the matching attribute you would like to use and the value should be an array containing a single value of the appropriate attribute type (as specified below). Matching on multiple values is not currently supported. Matching attributes must be unique. This process is similar to how you use the `matching_attribute` query param in Attio's [assert endpoints](/reference/put_v2-objects-object-records).
   */
  slugOrIdOfMatchingAttribute: Array<
    | SlugOrIdOfMatchingAttribute1
    | SlugOrIdOfMatchingAttribute2
    | SlugOrIdOfMatchingAttribute3
    | SlugOrIdOfMatchingAttribute5
    | SlugOrIdOfMatchingAttribute4
  >;
};

export type InputValue7 = {
  /**
   * A UUID or slug to identify the object that the referenced record belongs to.
   */
  targetObject: string;
  /**
   * A UUID to identify the referenced record.
   */
  targetRecordId: string;
};

export type InputValue6 = {
  /**
   * An email address string
   */
  emailAddress?: string | undefined;
};

export type InputValue5 = {
  /**
   * The full domain of the website.
   */
  domain?: string | undefined;
};

export type InputValue4 = {
  /**
   * A date represents a single calendar year, month and day, independent of timezone. If hours, months, seconds or timezones are provided, they will be trimmed. For example, "2023" and "2023-01" will be coerced into "2023-01-01", and "2023-01-02", "2023-01-02T13:00", "2023-01-02T14:00:00", "2023-01-02T15:00:00.000000000", and "2023-01-02T15:00:00.000000000+02:00" will all be coerced to "2023-01-02". If a timezone is provided that would result in a different calendar date in UTC, the date will be coerced to UTC and then the timezone component will be trimmed. For example, the value "2023-01-02T23:00:00-10:00" will be returned as "2023-01-03". The maximum date is "9999-12-31".
   */
  value: string;
};

export type InputValue3 = {
  /**
   * A numerical representation of the currency value. A decimal with a max of 4 decimal places.
   */
  currencyValue: number;
};

export type InputValue2 = {
  /**
   * A boolean representing whether the checkbox is checked or not. The string values 'true' and 'false' are also accepted.
   */
  value: boolean;
};

export type InputValue1 = {
  /**
   * Workspace member actors can be referenced by email address as well as actor ID.
   */
  workspaceMemberEmailAddress: string;
};

/**
 * The type of the referenced actor. Currently, only workspace members can be written into actor reference attributes. [Read more information on actor types here](/docs/actors).
 */
export const InputValueReferencedActorType = {
  WorkspaceMember: "workspace-member",
} as const;
/**
 * The type of the referenced actor. Currently, only workspace members can be written into actor reference attributes. [Read more information on actor types here](/docs/actors).
 */
export type InputValueReferencedActorType = ClosedEnum<
  typeof InputValueReferencedActorType
>;

export type InputValueWorkspaceMember = {
  /**
   * The type of the referenced actor. Currently, only workspace members can be written into actor reference attributes. [Read more information on actor types here](/docs/actors).
   */
  referencedActorType: InputValueReferencedActorType;
  /**
   * The ID of the referenced Actor.
   */
  referencedActorId: string;
};

/**
 * A union of possible value types, as required in request bodies.
 */
export type InputValueUnion =
  | InputValue1
  | InputValue2
  | InputValue3
  | InputValue4
  | InputValue5
  | InputValue6
  | InputValue11
  | InputValue14
  | InputValue15
  | InputValue16
  | InputValue17
  | InputValue18
  | InputValueWorkspaceMember
  | InputValue7
  | InputValue8
  | InputValue13
  | InputValue9
  | InputValue12
  | InputValue10;

/** @internal */
export const InputValue18$inboundSchema: z.ZodType<
  InputValue18,
  z.ZodTypeDef,
  unknown
> = z.object({
  value: z.string().datetime({ offset: true }).transform(v => new Date(v)),
});

/** @internal */
export type InputValue18$Outbound = {
  value: string;
};

/** @internal */
export const InputValue18$outboundSchema: z.ZodType<
  InputValue18$Outbound,
  z.ZodTypeDef,
  InputValue18
> = z.object({
  value: z.date().transform(v => v.toISOString()),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue18$ {
  /** @deprecated use `InputValue18$inboundSchema` instead. */
  export const inboundSchema = InputValue18$inboundSchema;
  /** @deprecated use `InputValue18$outboundSchema` instead. */
  export const outboundSchema = InputValue18$outboundSchema;
  /** @deprecated use `InputValue18$Outbound` instead. */
  export type Outbound = InputValue18$Outbound;
}

export function inputValue18ToJSON(inputValue18: InputValue18): string {
  return JSON.stringify(InputValue18$outboundSchema.parse(inputValue18));
}

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

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

/** @internal */
export type InputValue17$Outbound = {
  value: string;
};

/** @internal */
export const InputValue17$outboundSchema: z.ZodType<
  InputValue17$Outbound,
  z.ZodTypeDef,
  InputValue17
> = z.object({
  value: z.string(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue17$ {
  /** @deprecated use `InputValue17$inboundSchema` instead. */
  export const inboundSchema = InputValue17$inboundSchema;
  /** @deprecated use `InputValue17$outboundSchema` instead. */
  export const outboundSchema = InputValue17$outboundSchema;
  /** @deprecated use `InputValue17$Outbound` instead. */
  export type Outbound = InputValue17$Outbound;
}

export function inputValue17ToJSON(inputValue17: InputValue17): string {
  return JSON.stringify(InputValue17$outboundSchema.parse(inputValue17));
}

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

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

/** @internal */
export type InputValue16$Outbound = {
  option: string;
};

/** @internal */
export const InputValue16$outboundSchema: z.ZodType<
  InputValue16$Outbound,
  z.ZodTypeDef,
  InputValue16
> = z.object({
  option: z.string(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue16$ {
  /** @deprecated use `InputValue16$inboundSchema` instead. */
  export const inboundSchema = InputValue16$inboundSchema;
  /** @deprecated use `InputValue16$outboundSchema` instead. */
  export const outboundSchema = InputValue16$outboundSchema;
  /** @deprecated use `InputValue16$Outbound` instead. */
  export type Outbound = InputValue16$Outbound;
}

export function inputValue16ToJSON(inputValue16: InputValue16): string {
  return JSON.stringify(InputValue16$outboundSchema.parse(inputValue16));
}

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

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

/** @internal */
export type InputValue15$Outbound = {
  value: number;
};

/** @internal */
export const InputValue15$outboundSchema: z.ZodType<
  InputValue15$Outbound,
  z.ZodTypeDef,
  InputValue15
> = z.object({
  value: z.number(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue15$ {
  /** @deprecated use `InputValue15$inboundSchema` instead. */
  export const inboundSchema = InputValue15$inboundSchema;
  /** @deprecated use `InputValue15$outboundSchema` instead. */
  export const outboundSchema = InputValue15$outboundSchema;
  /** @deprecated use `InputValue15$Outbound` instead. */
  export type Outbound = InputValue15$Outbound;
}

export function inputValue15ToJSON(inputValue15: InputValue15): string {
  return JSON.stringify(InputValue15$outboundSchema.parse(inputValue15));
}

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

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

/** @internal */
export type InputValue14$Outbound = {
  status: string;
};

/** @internal */
export const InputValue14$outboundSchema: z.ZodType<
  InputValue14$Outbound,
  z.ZodTypeDef,
  InputValue14
> = z.object({
  status: z.string(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue14$ {
  /** @deprecated use `InputValue14$inboundSchema` instead. */
  export const inboundSchema = InputValue14$inboundSchema;
  /** @deprecated use `InputValue14$outboundSchema` instead. */
  export const outboundSchema = InputValue14$outboundSchema;
  /** @deprecated use `InputValue14$Outbound` instead. */
  export type Outbound = InputValue14$Outbound;
}

export function inputValue14ToJSON(inputValue14: InputValue14): string {
  return JSON.stringify(InputValue14$outboundSchema.parse(inputValue14));
}

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

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

/** @internal */
export const InputValueCountryCode2$outboundSchema: z.ZodNativeEnum<
  typeof InputValueCountryCode2
> = InputValueCountryCode2$inboundSchema;

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValueCountryCode2$ {
  /** @deprecated use `InputValueCountryCode2$inboundSchema` instead. */
  export const inboundSchema = InputValueCountryCode2$inboundSchema;
  /** @deprecated use `InputValueCountryCode2$outboundSchema` instead. */
  export const outboundSchema = InputValueCountryCode2$outboundSchema;
}

/** @internal */
export const InputValue13$inboundSchema: z.ZodType<
  InputValue13,
  z.ZodTypeDef,
  unknown
> = z.object({
  original_phone_number: z.string(),
  country_code: z.nullable(InputValueCountryCode2$inboundSchema).optional(),
}).transform((v) => {
  return remap$(v, {
    "original_phone_number": "originalPhoneNumber",
    "country_code": "countryCode",
  });
});

/** @internal */
export type InputValue13$Outbound = {
  original_phone_number: string;
  country_code?: string | null | undefined;
};

/** @internal */
export const InputValue13$outboundSchema: z.ZodType<
  InputValue13$Outbound,
  z.ZodTypeDef,
  InputValue13
> = z.object({
  originalPhoneNumber: z.string(),
  countryCode: z.nullable(InputValueCountryCode2$outboundSchema).optional(),
}).transform((v) => {
  return remap$(v, {
    originalPhoneNumber: "original_phone_number",
    countryCode: "country_code",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue13$ {
  /** @deprecated use `InputValue13$inboundSchema` instead. */
  export const inboundSchema = InputValue13$inboundSchema;
  /** @deprecated use `InputValue13$outboundSchema` instead. */
  export const outboundSchema = InputValue13$outboundSchema;
  /** @deprecated use `InputValue13$Outbound` instead. */
  export type Outbound = InputValue13$Outbound;
}

export function inputValue13ToJSON(inputValue13: InputValue13): string {
  return JSON.stringify(InputValue13$outboundSchema.parse(inputValue13));
}

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

/** @internal */
export const InputValue12$inboundSchema: z.ZodType<
  InputValue12,
  z.ZodTypeDef,
  unknown
> = z.object({
  first_name: z.string().optional(),
  last_name: z.string().optional(),
  full_name: z.string().optional(),
}).transform((v) => {
  return remap$(v, {
    "first_name": "firstName",
    "last_name": "lastName",
    "full_name": "fullName",
  });
});

/** @internal */
export type InputValue12$Outbound = {
  first_name?: string | undefined;
  last_name?: string | undefined;
  full_name?: string | undefined;
};

/** @internal */
export const InputValue12$outboundSchema: z.ZodType<
  InputValue12$Outbound,
  z.ZodTypeDef,
  InputValue12
> = z.object({
  firstName: z.string().optional(),
  lastName: z.string().optional(),
  fullName: z.string().optional(),
}).transform((v) => {
  return remap$(v, {
    firstName: "first_name",
    lastName: "last_name",
    fullName: "full_name",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue12$ {
  /** @deprecated use `InputValue12$inboundSchema` instead. */
  export const inboundSchema = InputValue12$inboundSchema;
  /** @deprecated use `InputValue12$outboundSchema` instead. */
  export const outboundSchema = InputValue12$outboundSchema;
  /** @deprecated use `InputValue12$Outbound` instead. */
  export type Outbound = InputValue12$Outbound;
}

export function inputValue12ToJSON(inputValue12: InputValue12): string {
  return JSON.stringify(InputValue12$outboundSchema.parse(inputValue12));
}

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

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

/** @internal */
export type InputValue11$Outbound = {
  value: number;
};

/** @internal */
export const InputValue11$outboundSchema: z.ZodType<
  InputValue11$Outbound,
  z.ZodTypeDef,
  InputValue11
> = z.object({
  value: z.number(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue11$ {
  /** @deprecated use `InputValue11$inboundSchema` instead. */
  export const inboundSchema = InputValue11$inboundSchema;
  /** @deprecated use `InputValue11$outboundSchema` instead. */
  export const outboundSchema = InputValue11$outboundSchema;
  /** @deprecated use `InputValue11$Outbound` instead. */
  export type Outbound = InputValue11$Outbound;
}

export function inputValue11ToJSON(inputValue11: InputValue11): string {
  return JSON.stringify(InputValue11$outboundSchema.parse(inputValue11));
}

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

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

/** @internal */
export const InputValueCountryCode1$outboundSchema: z.ZodNativeEnum<
  typeof InputValueCountryCode1
> = InputValueCountryCode1$inboundSchema;

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValueCountryCode1$ {
  /** @deprecated use `InputValueCountryCode1$inboundSchema` instead. */
  export const inboundSchema = InputValueCountryCode1$inboundSchema;
  /** @deprecated use `InputValueCountryCode1$outboundSchema` instead. */
  export const outboundSchema = InputValueCountryCode1$outboundSchema;
}

/** @internal */
export const InputValue10$inboundSchema: z.ZodType<
  InputValue10,
  z.ZodTypeDef,
  unknown
> = z.object({
  line_1: z.nullable(z.string()),
  line_2: z.nullable(z.string()),
  line_3: z.nullable(z.string()),
  line_4: z.nullable(z.string()),
  locality: z.nullable(z.string()),
  region: z.nullable(z.string()),
  postcode: z.nullable(z.string()),
  country_code: z.nullable(InputValueCountryCode1$inboundSchema),
  latitude: z.nullable(z.string()),
  longitude: z.nullable(z.string()),
}).transform((v) => {
  return remap$(v, {
    "line_1": "line1",
    "line_2": "line2",
    "line_3": "line3",
    "line_4": "line4",
    "country_code": "countryCode",
  });
});

/** @internal */
export type InputValue10$Outbound = {
  line_1: string | null;
  line_2: string | null;
  line_3: string | null;
  line_4: string | null;
  locality: string | null;
  region: string | null;
  postcode: string | null;
  country_code: string | null;
  latitude: string | null;
  longitude: string | null;
};

/** @internal */
export const InputValue10$outboundSchema: z.ZodType<
  InputValue10$Outbound,
  z.ZodTypeDef,
  InputValue10
> = z.object({
  line1: z.nullable(z.string()),
  line2: z.nullable(z.string()),
  line3: z.nullable(z.string()),
  line4: z.nullable(z.string()),
  locality: z.nullable(z.string()),
  region: z.nullable(z.string()),
  postcode: z.nullable(z.string()),
  countryCode: z.nullable(InputValueCountryCode1$outboundSchema),
  latitude: z.nullable(z.string()),
  longitude: z.nullable(z.string()),
}).transform((v) => {
  return remap$(v, {
    line1: "line_1",
    line2: "line_2",
    line3: "line_3",
    line4: "line_4",
    countryCode: "country_code",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue10$ {
  /** @deprecated use `InputValue10$inboundSchema` instead. */
  export const inboundSchema = InputValue10$inboundSchema;
  /** @deprecated use `InputValue10$outboundSchema` instead. */
  export const outboundSchema = InputValue10$outboundSchema;
  /** @deprecated use `InputValue10$Outbound` instead. */
  export type Outbound = InputValue10$Outbound;
}

export function inputValue10ToJSON(inputValue10: InputValue10): string {
  return JSON.stringify(InputValue10$outboundSchema.parse(inputValue10));
}

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

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

/** @internal */
export const InputValueInteractionType$outboundSchema: z.ZodNativeEnum<
  typeof InputValueInteractionType
> = InputValueInteractionType$inboundSchema;

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValueInteractionType$ {
  /** @deprecated use `InputValueInteractionType$inboundSchema` instead. */
  export const inboundSchema = InputValueInteractionType$inboundSchema;
  /** @deprecated use `InputValueInteractionType$outboundSchema` instead. */
  export const outboundSchema = InputValueInteractionType$outboundSchema;
}

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

/** @internal */
export const InputValueType$outboundSchema: z.ZodNativeEnum<
  typeof InputValueType
> = InputValueType$inboundSchema;

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValueType$ {
  /** @deprecated use `InputValueType$inboundSchema` instead. */
  export const inboundSchema = InputValueType$inboundSchema;
  /** @deprecated use `InputValueType$outboundSchema` instead. */
  export const outboundSchema = InputValueType$outboundSchema;
}

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

/** @internal */
export type InputValueOwnerActor$Outbound = {
  id?: string | null | undefined;
  type?: string | null | undefined;
};

/** @internal */
export const InputValueOwnerActor$outboundSchema: z.ZodType<
  InputValueOwnerActor$Outbound,
  z.ZodTypeDef,
  InputValueOwnerActor
> = z.object({
  id: z.nullable(z.string()).optional(),
  type: z.nullable(InputValueType$outboundSchema).optional(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValueOwnerActor$ {
  /** @deprecated use `InputValueOwnerActor$inboundSchema` instead. */
  export const inboundSchema = InputValueOwnerActor$inboundSchema;
  /** @deprecated use `InputValueOwnerActor$outboundSchema` instead. */
  export const outboundSchema = InputValueOwnerActor$outboundSchema;
  /** @deprecated use `InputValueOwnerActor$Outbound` instead. */
  export type Outbound = InputValueOwnerActor$Outbound;
}

export function inputValueOwnerActorToJSON(
  inputValueOwnerActor: InputValueOwnerActor,
): string {
  return JSON.stringify(
    InputValueOwnerActor$outboundSchema.parse(inputValueOwnerActor),
  );
}

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

/** @internal */
export const InputValue9$inboundSchema: z.ZodType<
  InputValue9,
  z.ZodTypeDef,
  unknown
> = z.object({
  interaction_type: InputValueInteractionType$inboundSchema,
  interacted_at: z.string().datetime({ offset: true }).transform(v =>
    new Date(v)
  ),
  owner_actor: z.lazy(() => InputValueOwnerActor$inboundSchema),
}).transform((v) => {
  return remap$(v, {
    "interaction_type": "interactionType",
    "interacted_at": "interactedAt",
    "owner_actor": "ownerActor",
  });
});

/** @internal */
export type InputValue9$Outbound = {
  interaction_type: string;
  interacted_at: string;
  owner_actor: InputValueOwnerActor$Outbound;
};

/** @internal */
export const InputValue9$outboundSchema: z.ZodType<
  InputValue9$Outbound,
  z.ZodTypeDef,
  InputValue9
> = z.object({
  interactionType: InputValueInteractionType$outboundSchema,
  interactedAt: z.date().transform(v => v.toISOString()),
  ownerActor: z.lazy(() => InputValueOwnerActor$outboundSchema),
}).transform((v) => {
  return remap$(v, {
    interactionType: "interaction_type",
    interactedAt: "interacted_at",
    ownerActor: "owner_actor",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue9$ {
  /** @deprecated use `InputValue9$inboundSchema` instead. */
  export const inboundSchema = InputValue9$inboundSchema;
  /** @deprecated use `InputValue9$outboundSchema` instead. */
  export const outboundSchema = InputValue9$outboundSchema;
  /** @deprecated use `InputValue9$Outbound` instead. */
  export type Outbound = InputValue9$Outbound;
}

export function inputValue9ToJSON(inputValue9: InputValue9): string {
  return JSON.stringify(InputValue9$outboundSchema.parse(inputValue9));
}

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

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

/** @internal */
export type SlugOrIdOfMatchingAttribute5$Outbound = {
  value?: string | undefined;
};

/** @internal */
export const SlugOrIdOfMatchingAttribute5$outboundSchema: z.ZodType<
  SlugOrIdOfMatchingAttribute5$Outbound,
  z.ZodTypeDef,
  SlugOrIdOfMatchingAttribute5
> = z.object({
  value: z.string().optional(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace SlugOrIdOfMatchingAttribute5$ {
  /** @deprecated use `SlugOrIdOfMatchingAttribute5$inboundSchema` instead. */
  export const inboundSchema = SlugOrIdOfMatchingAttribute5$inboundSchema;
  /** @deprecated use `SlugOrIdOfMatchingAttribute5$outboundSchema` instead. */
  export const outboundSchema = SlugOrIdOfMatchingAttribute5$outboundSchema;
  /** @deprecated use `SlugOrIdOfMatchingAttribute5$Outbound` instead. */
  export type Outbound = SlugOrIdOfMatchingAttribute5$Outbound;
}

export function slugOrIdOfMatchingAttribute5ToJSON(
  slugOrIdOfMatchingAttribute5: SlugOrIdOfMatchingAttribute5,
): string {
  return JSON.stringify(
    SlugOrIdOfMatchingAttribute5$outboundSchema.parse(
      slugOrIdOfMatchingAttribute5,
    ),
  );
}

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

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

/** @internal */
export const SlugOrIdOfMatchingAttributeCountryCode$outboundSchema:
  z.ZodNativeEnum<typeof SlugOrIdOfMatchingAttributeCountryCode> =
    SlugOrIdOfMatchingAttributeCountryCode$inboundSchema;

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace SlugOrIdOfMatchingAttributeCountryCode$ {
  /** @deprecated use `SlugOrIdOfMatchingAttributeCountryCode$inboundSchema` instead. */
  export const inboundSchema =
    SlugOrIdOfMatchingAttributeCountryCode$inboundSchema;
  /** @deprecated use `SlugOrIdOfMatchingAttributeCountryCode$outboundSchema` instead. */
  export const outboundSchema =
    SlugOrIdOfMatchingAttributeCountryCode$outboundSchema;
}

/** @internal */
export const SlugOrIdOfMatchingAttribute4$inboundSchema: z.ZodType<
  SlugOrIdOfMatchingAttribute4,
  z.ZodTypeDef,
  unknown
> = z.object({
  original_phone_number: z.string().optional(),
  country_code: z.nullable(SlugOrIdOfMatchingAttributeCountryCode$inboundSchema)
    .optional(),
}).transform((v) => {
  return remap$(v, {
    "original_phone_number": "originalPhoneNumber",
    "country_code": "countryCode",
  });
});

/** @internal */
export type SlugOrIdOfMatchingAttribute4$Outbound = {
  original_phone_number?: string | undefined;
  country_code?: string | null | undefined;
};

/** @internal */
export const SlugOrIdOfMatchingAttribute4$outboundSchema: z.ZodType<
  SlugOrIdOfMatchingAttribute4$Outbound,
  z.ZodTypeDef,
  SlugOrIdOfMatchingAttribute4
> = z.object({
  originalPhoneNumber: z.string().optional(),
  countryCode: z.nullable(SlugOrIdOfMatchingAttributeCountryCode$outboundSchema)
    .optional(),
}).transform((v) => {
  return remap$(v, {
    originalPhoneNumber: "original_phone_number",
    countryCode: "country_code",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace SlugOrIdOfMatchingAttribute4$ {
  /** @deprecated use `SlugOrIdOfMatchingAttribute4$inboundSchema` instead. */
  export const inboundSchema = SlugOrIdOfMatchingAttribute4$inboundSchema;
  /** @deprecated use `SlugOrIdOfMatchingAttribute4$outboundSchema` instead. */
  export const outboundSchema = SlugOrIdOfMatchingAttribute4$outboundSchema;
  /** @deprecated use `SlugOrIdOfMatchingAttribute4$Outbound` instead. */
  export type Outbound = SlugOrIdOfMatchingAttribute4$Outbound;
}

export function slugOrIdOfMatchingAttribute4ToJSON(
  slugOrIdOfMatchingAttribute4: SlugOrIdOfMatchingAttribute4,
): string {
  return JSON.stringify(
    SlugOrIdOfMatchingAttribute4$outboundSchema.parse(
      slugOrIdOfMatchingAttribute4,
    ),
  );
}

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

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

/** @internal */
export type SlugOrIdOfMatchingAttribute3$Outbound = {
  value?: number | undefined;
};

/** @internal */
export const SlugOrIdOfMatchingAttribute3$outboundSchema: z.ZodType<
  SlugOrIdOfMatchingAttribute3$Outbound,
  z.ZodTypeDef,
  SlugOrIdOfMatchingAttribute3
> = z.object({
  value: z.number().optional(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace SlugOrIdOfMatchingAttribute3$ {
  /** @deprecated use `SlugOrIdOfMatchingAttribute3$inboundSchema` instead. */
  export const inboundSchema = SlugOrIdOfMatchingAttribute3$inboundSchema;
  /** @deprecated use `SlugOrIdOfMatchingAttribute3$outboundSchema` instead. */
  export const outboundSchema = SlugOrIdOfMatchingAttribute3$outboundSchema;
  /** @deprecated use `SlugOrIdOfMatchingAttribute3$Outbound` instead. */
  export type Outbound = SlugOrIdOfMatchingAttribute3$Outbound;
}

export function slugOrIdOfMatchingAttribute3ToJSON(
  slugOrIdOfMatchingAttribute3: SlugOrIdOfMatchingAttribute3,
): string {
  return JSON.stringify(
    SlugOrIdOfMatchingAttribute3$outboundSchema.parse(
      slugOrIdOfMatchingAttribute3,
    ),
  );
}

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

/** @internal */
export const SlugOrIdOfMatchingAttribute2$inboundSchema: z.ZodType<
  SlugOrIdOfMatchingAttribute2,
  z.ZodTypeDef,
  unknown
> = z.object({
  email_address: z.string().optional(),
}).transform((v) => {
  return remap$(v, {
    "email_address": "emailAddress",
  });
});

/** @internal */
export type SlugOrIdOfMatchingAttribute2$Outbound = {
  email_address?: string | undefined;
};

/** @internal */
export const SlugOrIdOfMatchingAttribute2$outboundSchema: z.ZodType<
  SlugOrIdOfMatchingAttribute2$Outbound,
  z.ZodTypeDef,
  SlugOrIdOfMatchingAttribute2
> = z.object({
  emailAddress: z.string().optional(),
}).transform((v) => {
  return remap$(v, {
    emailAddress: "email_address",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace SlugOrIdOfMatchingAttribute2$ {
  /** @deprecated use `SlugOrIdOfMatchingAttribute2$inboundSchema` instead. */
  export const inboundSchema = SlugOrIdOfMatchingAttribute2$inboundSchema;
  /** @deprecated use `SlugOrIdOfMatchingAttribute2$outboundSchema` instead. */
  export const outboundSchema = SlugOrIdOfMatchingAttribute2$outboundSchema;
  /** @deprecated use `SlugOrIdOfMatchingAttribute2$Outbound` instead. */
  export type Outbound = SlugOrIdOfMatchingAttribute2$Outbound;
}

export function slugOrIdOfMatchingAttribute2ToJSON(
  slugOrIdOfMatchingAttribute2: SlugOrIdOfMatchingAttribute2,
): string {
  return JSON.stringify(
    SlugOrIdOfMatchingAttribute2$outboundSchema.parse(
      slugOrIdOfMatchingAttribute2,
    ),
  );
}

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

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

/** @internal */
export type SlugOrIdOfMatchingAttribute1$Outbound = {
  domain?: string | undefined;
};

/** @internal */
export const SlugOrIdOfMatchingAttribute1$outboundSchema: z.ZodType<
  SlugOrIdOfMatchingAttribute1$Outbound,
  z.ZodTypeDef,
  SlugOrIdOfMatchingAttribute1
> = z.object({
  domain: z.string().optional(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace SlugOrIdOfMatchingAttribute1$ {
  /** @deprecated use `SlugOrIdOfMatchingAttribute1$inboundSchema` instead. */
  export const inboundSchema = SlugOrIdOfMatchingAttribute1$inboundSchema;
  /** @deprecated use `SlugOrIdOfMatchingAttribute1$outboundSchema` instead. */
  export const outboundSchema = SlugOrIdOfMatchingAttribute1$outboundSchema;
  /** @deprecated use `SlugOrIdOfMatchingAttribute1$Outbound` instead. */
  export type Outbound = SlugOrIdOfMatchingAttribute1$Outbound;
}

export function slugOrIdOfMatchingAttribute1ToJSON(
  slugOrIdOfMatchingAttribute1: SlugOrIdOfMatchingAttribute1,
): string {
  return JSON.stringify(
    SlugOrIdOfMatchingAttribute1$outboundSchema.parse(
      slugOrIdOfMatchingAttribute1,
    ),
  );
}

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

/** @internal */
export const SlugOrIdOfMatchingAttributeUnion$inboundSchema: z.ZodType<
  SlugOrIdOfMatchingAttributeUnion,
  z.ZodTypeDef,
  unknown
> = z.union([
  z.lazy(() => SlugOrIdOfMatchingAttribute1$inboundSchema),
  z.lazy(() => SlugOrIdOfMatchingAttribute2$inboundSchema),
  z.lazy(() => SlugOrIdOfMatchingAttribute3$inboundSchema),
  z.lazy(() => SlugOrIdOfMatchingAttribute5$inboundSchema),
  z.lazy(() => SlugOrIdOfMatchingAttribute4$inboundSchema),
]);

/** @internal */
export type SlugOrIdOfMatchingAttributeUnion$Outbound =
  | SlugOrIdOfMatchingAttribute1$Outbound
  | SlugOrIdOfMatchingAttribute2$Outbound
  | SlugOrIdOfMatchingAttribute3$Outbound
  | SlugOrIdOfMatchingAttribute5$Outbound
  | SlugOrIdOfMatchingAttribute4$Outbound;

/** @internal */
export const SlugOrIdOfMatchingAttributeUnion$outboundSchema: z.ZodType<
  SlugOrIdOfMatchingAttributeUnion$Outbound,
  z.ZodTypeDef,
  SlugOrIdOfMatchingAttributeUnion
> = z.union([
  z.lazy(() => SlugOrIdOfMatchingAttribute1$outboundSchema),
  z.lazy(() => SlugOrIdOfMatchingAttribute2$outboundSchema),
  z.lazy(() => SlugOrIdOfMatchingAttribute3$outboundSchema),
  z.lazy(() => SlugOrIdOfMatchingAttribute5$outboundSchema),
  z.lazy(() => SlugOrIdOfMatchingAttribute4$outboundSchema),
]);

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace SlugOrIdOfMatchingAttributeUnion$ {
  /** @deprecated use `SlugOrIdOfMatchingAttributeUnion$inboundSchema` instead. */
  export const inboundSchema = SlugOrIdOfMatchingAttributeUnion$inboundSchema;
  /** @deprecated use `SlugOrIdOfMatchingAttributeUnion$outboundSchema` instead. */
  export const outboundSchema = SlugOrIdOfMatchingAttributeUnion$outboundSchema;
  /** @deprecated use `SlugOrIdOfMatchingAttributeUnion$Outbound` instead. */
  export type Outbound = SlugOrIdOfMatchingAttributeUnion$Outbound;
}

export function slugOrIdOfMatchingAttributeUnionToJSON(
  slugOrIdOfMatchingAttributeUnion: SlugOrIdOfMatchingAttributeUnion,
): string {
  return JSON.stringify(
    SlugOrIdOfMatchingAttributeUnion$outboundSchema.parse(
      slugOrIdOfMatchingAttributeUnion,
    ),
  );
}

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

/** @internal */
export const InputValue8$inboundSchema: z.ZodType<
  InputValue8,
  z.ZodTypeDef,
  unknown
> = z.object({
  target_object: z.string(),
  "[slug_or_id_of_matching_attribute]": z.array(
    z.union([
      z.lazy(() => SlugOrIdOfMatchingAttribute1$inboundSchema),
      z.lazy(() => SlugOrIdOfMatchingAttribute2$inboundSchema),
      z.lazy(() => SlugOrIdOfMatchingAttribute3$inboundSchema),
      z.lazy(() => SlugOrIdOfMatchingAttribute5$inboundSchema),
      z.lazy(() => SlugOrIdOfMatchingAttribute4$inboundSchema),
    ]),
  ),
}).transform((v) => {
  return remap$(v, {
    "target_object": "targetObject",
    "[slug_or_id_of_matching_attribute]": "slugOrIdOfMatchingAttribute",
  });
});

/** @internal */
export type InputValue8$Outbound = {
  target_object: string;
  "[slug_or_id_of_matching_attribute]": Array<
    | SlugOrIdOfMatchingAttribute1$Outbound
    | SlugOrIdOfMatchingAttribute2$Outbound
    | SlugOrIdOfMatchingAttribute3$Outbound
    | SlugOrIdOfMatchingAttribute5$Outbound
    | SlugOrIdOfMatchingAttribute4$Outbound
  >;
};

/** @internal */
export const InputValue8$outboundSchema: z.ZodType<
  InputValue8$Outbound,
  z.ZodTypeDef,
  InputValue8
> = z.object({
  targetObject: z.string(),
  slugOrIdOfMatchingAttribute: z.array(
    z.union([
      z.lazy(() => SlugOrIdOfMatchingAttribute1$outboundSchema),
      z.lazy(() => SlugOrIdOfMatchingAttribute2$outboundSchema),
      z.lazy(() => SlugOrIdOfMatchingAttribute3$outboundSchema),
      z.lazy(() => SlugOrIdOfMatchingAttribute5$outboundSchema),
      z.lazy(() => SlugOrIdOfMatchingAttribute4$outboundSchema),
    ]),
  ),
}).transform((v) => {
  return remap$(v, {
    targetObject: "target_object",
    slugOrIdOfMatchingAttribute: "[slug_or_id_of_matching_attribute]",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue8$ {
  /** @deprecated use `InputValue8$inboundSchema` instead. */
  export const inboundSchema = InputValue8$inboundSchema;
  /** @deprecated use `InputValue8$outboundSchema` instead. */
  export const outboundSchema = InputValue8$outboundSchema;
  /** @deprecated use `InputValue8$Outbound` instead. */
  export type Outbound = InputValue8$Outbound;
}

export function inputValue8ToJSON(inputValue8: InputValue8): string {
  return JSON.stringify(InputValue8$outboundSchema.parse(inputValue8));
}

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

/** @internal */
export const InputValue7$inboundSchema: z.ZodType<
  InputValue7,
  z.ZodTypeDef,
  unknown
> = z.object({
  target_object: z.string(),
  target_record_id: z.string(),
}).transform((v) => {
  return remap$(v, {
    "target_object": "targetObject",
    "target_record_id": "targetRecordId",
  });
});

/** @internal */
export type InputValue7$Outbound = {
  target_object: string;
  target_record_id: string;
};

/** @internal */
export const InputValue7$outboundSchema: z.ZodType<
  InputValue7$Outbound,
  z.ZodTypeDef,
  InputValue7
> = z.object({
  targetObject: z.string(),
  targetRecordId: z.string(),
}).transform((v) => {
  return remap$(v, {
    targetObject: "target_object",
    targetRecordId: "target_record_id",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue7$ {
  /** @deprecated use `InputValue7$inboundSchema` instead. */
  export const inboundSchema = InputValue7$inboundSchema;
  /** @deprecated use `InputValue7$outboundSchema` instead. */
  export const outboundSchema = InputValue7$outboundSchema;
  /** @deprecated use `InputValue7$Outbound` instead. */
  export type Outbound = InputValue7$Outbound;
}

export function inputValue7ToJSON(inputValue7: InputValue7): string {
  return JSON.stringify(InputValue7$outboundSchema.parse(inputValue7));
}

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

/** @internal */
export const InputValue6$inboundSchema: z.ZodType<
  InputValue6,
  z.ZodTypeDef,
  unknown
> = z.object({
  email_address: z.string().optional(),
}).transform((v) => {
  return remap$(v, {
    "email_address": "emailAddress",
  });
});

/** @internal */
export type InputValue6$Outbound = {
  email_address?: string | undefined;
};

/** @internal */
export const InputValue6$outboundSchema: z.ZodType<
  InputValue6$Outbound,
  z.ZodTypeDef,
  InputValue6
> = z.object({
  emailAddress: z.string().optional(),
}).transform((v) => {
  return remap$(v, {
    emailAddress: "email_address",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue6$ {
  /** @deprecated use `InputValue6$inboundSchema` instead. */
  export const inboundSchema = InputValue6$inboundSchema;
  /** @deprecated use `InputValue6$outboundSchema` instead. */
  export const outboundSchema = InputValue6$outboundSchema;
  /** @deprecated use `InputValue6$Outbound` instead. */
  export type Outbound = InputValue6$Outbound;
}

export function inputValue6ToJSON(inputValue6: InputValue6): string {
  return JSON.stringify(InputValue6$outboundSchema.parse(inputValue6));
}

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

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

/** @internal */
export type InputValue5$Outbound = {
  domain?: string | undefined;
};

/** @internal */
export const InputValue5$outboundSchema: z.ZodType<
  InputValue5$Outbound,
  z.ZodTypeDef,
  InputValue5
> = z.object({
  domain: z.string().optional(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue5$ {
  /** @deprecated use `InputValue5$inboundSchema` instead. */
  export const inboundSchema = InputValue5$inboundSchema;
  /** @deprecated use `InputValue5$outboundSchema` instead. */
  export const outboundSchema = InputValue5$outboundSchema;
  /** @deprecated use `InputValue5$Outbound` instead. */
  export type Outbound = InputValue5$Outbound;
}

export function inputValue5ToJSON(inputValue5: InputValue5): string {
  return JSON.stringify(InputValue5$outboundSchema.parse(inputValue5));
}

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

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

/** @internal */
export type InputValue4$Outbound = {
  value: string;
};

/** @internal */
export const InputValue4$outboundSchema: z.ZodType<
  InputValue4$Outbound,
  z.ZodTypeDef,
  InputValue4
> = z.object({
  value: z.string(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue4$ {
  /** @deprecated use `InputValue4$inboundSchema` instead. */
  export const inboundSchema = InputValue4$inboundSchema;
  /** @deprecated use `InputValue4$outboundSchema` instead. */
  export const outboundSchema = InputValue4$outboundSchema;
  /** @deprecated use `InputValue4$Outbound` instead. */
  export type Outbound = InputValue4$Outbound;
}

export function inputValue4ToJSON(inputValue4: InputValue4): string {
  return JSON.stringify(InputValue4$outboundSchema.parse(inputValue4));
}

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

/** @internal */
export const InputValue3$inboundSchema: z.ZodType<
  InputValue3,
  z.ZodTypeDef,
  unknown
> = z.object({
  currency_value: z.number(),
}).transform((v) => {
  return remap$(v, {
    "currency_value": "currencyValue",
  });
});

/** @internal */
export type InputValue3$Outbound = {
  currency_value: number;
};

/** @internal */
export const InputValue3$outboundSchema: z.ZodType<
  InputValue3$Outbound,
  z.ZodTypeDef,
  InputValue3
> = z.object({
  currencyValue: z.number(),
}).transform((v) => {
  return remap$(v, {
    currencyValue: "currency_value",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue3$ {
  /** @deprecated use `InputValue3$inboundSchema` instead. */
  export const inboundSchema = InputValue3$inboundSchema;
  /** @deprecated use `InputValue3$outboundSchema` instead. */
  export const outboundSchema = InputValue3$outboundSchema;
  /** @deprecated use `InputValue3$Outbound` instead. */
  export type Outbound = InputValue3$Outbound;
}

export function inputValue3ToJSON(inputValue3: InputValue3): string {
  return JSON.stringify(InputValue3$outboundSchema.parse(inputValue3));
}

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

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

/** @internal */
export type InputValue2$Outbound = {
  value: boolean;
};

/** @internal */
export const InputValue2$outboundSchema: z.ZodType<
  InputValue2$Outbound,
  z.ZodTypeDef,
  InputValue2
> = z.object({
  value: z.boolean(),
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue2$ {
  /** @deprecated use `InputValue2$inboundSchema` instead. */
  export const inboundSchema = InputValue2$inboundSchema;
  /** @deprecated use `InputValue2$outboundSchema` instead. */
  export const outboundSchema = InputValue2$outboundSchema;
  /** @deprecated use `InputValue2$Outbound` instead. */
  export type Outbound = InputValue2$Outbound;
}

export function inputValue2ToJSON(inputValue2: InputValue2): string {
  return JSON.stringify(InputValue2$outboundSchema.parse(inputValue2));
}

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

/** @internal */
export const InputValue1$inboundSchema: z.ZodType<
  InputValue1,
  z.ZodTypeDef,
  unknown
> = z.object({
  workspace_member_email_address: z.string(),
}).transform((v) => {
  return remap$(v, {
    "workspace_member_email_address": "workspaceMemberEmailAddress",
  });
});

/** @internal */
export type InputValue1$Outbound = {
  workspace_member_email_address: string;
};

/** @internal */
export const InputValue1$outboundSchema: z.ZodType<
  InputValue1$Outbound,
  z.ZodTypeDef,
  InputValue1
> = z.object({
  workspaceMemberEmailAddress: z.string(),
}).transform((v) => {
  return remap$(v, {
    workspaceMemberEmailAddress: "workspace_member_email_address",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValue1$ {
  /** @deprecated use `InputValue1$inboundSchema` instead. */
  export const inboundSchema = InputValue1$inboundSchema;
  /** @deprecated use `InputValue1$outboundSchema` instead. */
  export const outboundSchema = InputValue1$outboundSchema;
  /** @deprecated use `InputValue1$Outbound` instead. */
  export type Outbound = InputValue1$Outbound;
}

export function inputValue1ToJSON(inputValue1: InputValue1): string {
  return JSON.stringify(InputValue1$outboundSchema.parse(inputValue1));
}

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

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

/** @internal */
export const InputValueReferencedActorType$outboundSchema: z.ZodNativeEnum<
  typeof InputValueReferencedActorType
> = InputValueReferencedActorType$inboundSchema;

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValueReferencedActorType$ {
  /** @deprecated use `InputValueReferencedActorType$inboundSchema` instead. */
  export const inboundSchema = InputValueReferencedActorType$inboundSchema;
  /** @deprecated use `InputValueReferencedActorType$outboundSchema` instead. */
  export const outboundSchema = InputValueReferencedActorType$outboundSchema;
}

/** @internal */
export const InputValueWorkspaceMember$inboundSchema: z.ZodType<
  InputValueWorkspaceMember,
  z.ZodTypeDef,
  unknown
> = z.object({
  referenced_actor_type: InputValueReferencedActorType$inboundSchema,
  referenced_actor_id: z.string(),
}).transform((v) => {
  return remap$(v, {
    "referenced_actor_type": "referencedActorType",
    "referenced_actor_id": "referencedActorId",
  });
});

/** @internal */
export type InputValueWorkspaceMember$Outbound = {
  referenced_actor_type: string;
  referenced_actor_id: string;
};

/** @internal */
export const InputValueWorkspaceMember$outboundSchema: z.ZodType<
  InputValueWorkspaceMember$Outbound,
  z.ZodTypeDef,
  InputValueWorkspaceMember
> = z.object({
  referencedActorType: InputValueReferencedActorType$outboundSchema,
  referencedActorId: z.string(),
}).transform((v) => {
  return remap$(v, {
    referencedActorType: "referenced_actor_type",
    referencedActorId: "referenced_actor_id",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValueWorkspaceMember$ {
  /** @deprecated use `InputValueWorkspaceMember$inboundSchema` instead. */
  export const inboundSchema = InputValueWorkspaceMember$inboundSchema;
  /** @deprecated use `InputValueWorkspaceMember$outboundSchema` instead. */
  export const outboundSchema = InputValueWorkspaceMember$outboundSchema;
  /** @deprecated use `InputValueWorkspaceMember$Outbound` instead. */
  export type Outbound = InputValueWorkspaceMember$Outbound;
}

export function inputValueWorkspaceMemberToJSON(
  inputValueWorkspaceMember: InputValueWorkspaceMember,
): string {
  return JSON.stringify(
    InputValueWorkspaceMember$outboundSchema.parse(inputValueWorkspaceMember),
  );
}

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

/** @internal */
export const InputValueUnion$inboundSchema: z.ZodType<
  InputValueUnion,
  z.ZodTypeDef,
  unknown
> = z.union([
  z.lazy(() => InputValue1$inboundSchema),
  z.lazy(() => InputValue2$inboundSchema),
  z.lazy(() => InputValue3$inboundSchema),
  z.lazy(() => InputValue4$inboundSchema),
  z.lazy(() => InputValue5$inboundSchema),
  z.lazy(() => InputValue6$inboundSchema),
  z.lazy(() => InputValue11$inboundSchema),
  z.lazy(() => InputValue14$inboundSchema),
  z.lazy(() => InputValue15$inboundSchema),
  z.lazy(() => InputValue16$inboundSchema),
  z.lazy(() => InputValue17$inboundSchema),
  z.lazy(() => InputValue18$inboundSchema),
  z.lazy(() => InputValueWorkspaceMember$inboundSchema),
  z.lazy(() => InputValue7$inboundSchema),
  z.lazy(() => InputValue8$inboundSchema),
  z.lazy(() => InputValue13$inboundSchema),
  z.lazy(() => InputValue9$inboundSchema),
  z.lazy(() => InputValue12$inboundSchema),
  z.lazy(() => InputValue10$inboundSchema),
]);

/** @internal */
export type InputValueUnion$Outbound =
  | InputValue1$Outbound
  | InputValue2$Outbound
  | InputValue3$Outbound
  | InputValue4$Outbound
  | InputValue5$Outbound
  | InputValue6$Outbound
  | InputValue11$Outbound
  | InputValue14$Outbound
  | InputValue15$Outbound
  | InputValue16$Outbound
  | InputValue17$Outbound
  | InputValue18$Outbound
  | InputValueWorkspaceMember$Outbound
  | InputValue7$Outbound
  | InputValue8$Outbound
  | InputValue13$Outbound
  | InputValue9$Outbound
  | InputValue12$Outbound
  | InputValue10$Outbound;

/** @internal */
export const InputValueUnion$outboundSchema: z.ZodType<
  InputValueUnion$Outbound,
  z.ZodTypeDef,
  InputValueUnion
> = z.union([
  z.lazy(() => InputValue1$outboundSchema),
  z.lazy(() => InputValue2$outboundSchema),
  z.lazy(() => InputValue3$outboundSchema),
  z.lazy(() => InputValue4$outboundSchema),
  z.lazy(() => InputValue5$outboundSchema),
  z.lazy(() => InputValue6$outboundSchema),
  z.lazy(() => InputValue11$outboundSchema),
  z.lazy(() => InputValue14$outboundSchema),
  z.lazy(() => InputValue15$outboundSchema),
  z.lazy(() => InputValue16$outboundSchema),
  z.lazy(() => InputValue17$outboundSchema),
  z.lazy(() => InputValue18$outboundSchema),
  z.lazy(() => InputValueWorkspaceMember$outboundSchema),
  z.lazy(() => InputValue7$outboundSchema),
  z.lazy(() => InputValue8$outboundSchema),
  z.lazy(() => InputValue13$outboundSchema),
  z.lazy(() => InputValue9$outboundSchema),
  z.lazy(() => InputValue12$outboundSchema),
  z.lazy(() => InputValue10$outboundSchema),
]);

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace InputValueUnion$ {
  /** @deprecated use `InputValueUnion$inboundSchema` instead. */
  export const inboundSchema = InputValueUnion$inboundSchema;
  /** @deprecated use `InputValueUnion$outboundSchema` instead. */
  export const outboundSchema = InputValueUnion$outboundSchema;
  /** @deprecated use `InputValueUnion$Outbound` instead. */
  export type Outbound = InputValueUnion$Outbound;
}

export function inputValueUnionToJSON(
  inputValueUnion: InputValueUnion,
): string {
  return JSON.stringify(InputValueUnion$outboundSchema.parse(inputValueUnion));
}

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