/*
 * 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";
import {
  SelectOption,
  SelectOption$inboundSchema,
  SelectOption$Outbound,
  SelectOption$outboundSchema,
} from "./selectoption.js";
import {
  Status,
  Status$inboundSchema,
  Status$Outbound,
  Status$outboundSchema,
} from "./status.js";

/**
 * The attribute type of the value.
 */
export const AttributeTypeTimestamp = {
  Timestamp: "timestamp",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypeTimestamp = ClosedEnum<typeof AttributeTypeTimestamp>;

export type OutputValueTimestamp = {
  /**
   * The attribute type of the value.
   */
  attributeType: AttributeTypeTimestamp;
  /**
   * 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;
};

/**
 * The attribute type of the value.
 */
export const AttributeTypeText = {
  Text: "text",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypeText = ClosedEnum<typeof AttributeTypeText>;

export type OutputValueText = {
  /**
   * A raw text field. Values are limited to 10MB.
   */
  value: string;
  /**
   * The attribute type of the value.
   */
  attributeType: AttributeTypeText;
};

/**
 * The attribute type of the value.
 */
export const AttributeTypeSelect2 = {
  Select: "select",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypeSelect2 = ClosedEnum<typeof AttributeTypeSelect2>;

export type OutputValueSelect2 = {
  option: SelectOption;
  /**
   * The attribute type of the value.
   */
  attributeType: AttributeTypeSelect2;
};

/**
 * The attribute type of the value.
 */
export const AttributeTypeSelect1 = {
  Select: "select",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypeSelect1 = ClosedEnum<typeof AttributeTypeSelect1>;

export type OutputValueSelect1 = {
  /**
   * The UUID identifying the selected select option.
   */
  option: string;
  /**
   * The attribute type of the value.
   */
  attributeType: AttributeTypeSelect1;
};

/**
 * The attribute type of the value.
 */
export const AttributeTypeRating = {
  Rating: "rating",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypeRating = ClosedEnum<typeof AttributeTypeRating>;

export type OutputValueRating = {
  /**
   * A number between 0 and 5 (inclusive) to represent a star rating.
   */
  value: number;
  /**
   * The attribute type of the value.
   */
  attributeType: AttributeTypeRating;
};

/**
 * The attribute type of the value.
 */
export const AttributeTypeStatus2 = {
  Status: "status",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypeStatus2 = ClosedEnum<typeof AttributeTypeStatus2>;

export type OutputValueStatus2 = {
  status: Status;
  /**
   * The attribute type of the value.
   */
  attributeType: AttributeTypeStatus2;
};

/**
 * The attribute type of the value.
 */
export const AttributeTypeStatus1 = {
  Status: "status",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypeStatus1 = ClosedEnum<typeof AttributeTypeStatus1>;

export type OutputValueStatus1 = {
  /**
   * The UUID identifying the selected status.
   */
  status: string;
  /**
   * The attribute type of the value.
   */
  attributeType: AttributeTypeStatus1;
};

/**
 * The ISO 3166-1 alpha-2 country code representing the country that this phone number belongs to.
 */
export const OutputValueCountryCode2 = {
  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 OutputValueCountryCode2 = ClosedEnum<
  typeof OutputValueCountryCode2
>;

/**
 * The attribute type of the value.
 */
export const AttributeTypePhoneNumber = {
  PhoneNumber: "phone-number",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypePhoneNumber = ClosedEnum<
  typeof AttributeTypePhoneNumber
>;

export type OutputValuePhoneNumber = {
  /**
   * The raw, original phone number, as inputted.
   */
  originalPhoneNumber: string;
  /**
   * The ISO 3166-1 alpha-2 country code representing the country that this phone number belongs to.
   */
  countryCode: OutputValueCountryCode2;
  phoneNumber: string;
  /**
   * The attribute type of the value.
   */
  attributeType: AttributeTypePhoneNumber;
};

/**
 * The attribute type of the value.
 */
export const AttributeTypePersonalName = {
  PersonalName: "personal-name",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypePersonalName = ClosedEnum<
  typeof AttributeTypePersonalName
>;

export type OutputValuePersonalName = {
  /**
   * The first name.
   */
  firstName: string;
  /**
   * The last name.
   */
  lastName: string;
  /**
   * The full name.
   */
  fullName: string;
  /**
   * The attribute type of the value.
   */
  attributeType: AttributeTypePersonalName;
};

/**
 * The attribute type of the value.
 */
export const AttributeTypeNumber = {
  Number: "number",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypeNumber = ClosedEnum<typeof AttributeTypeNumber>;

export type OutputValueNumber = {
  /**
   * Numbers are persisted as 64 bit floats.
   */
  value: number;
  /**
   * The attribute type of the value.
   */
  attributeType: AttributeTypeNumber;
};

/**
 * The ISO 3166-1 alpha-2 country code for the country this location is in.
 */
export const OutputValueCountryCode1 = {
  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 OutputValueCountryCode1 = ClosedEnum<
  typeof OutputValueCountryCode1
>;

/**
 * The attribute type of the value.
 */
export const AttributeTypeLocation = {
  Location: "location",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypeLocation = ClosedEnum<typeof AttributeTypeLocation>;

export type OutputValueLocation = {
  /**
   * 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: OutputValueCountryCode1 | 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 attribute type of the value.
   */
  attributeType: AttributeTypeLocation;
};

/**
 * The type of interaction e.g. calendar or email.
 */
export const OutputValueInteractionType = {
  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 OutputValueInteractionType = ClosedEnum<
  typeof OutputValueInteractionType
>;

/**
 * The type of actor. [Read more information on actor types here](/docs/actors).
 */
export const OutputValueType = {
  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 OutputValueType = ClosedEnum<typeof OutputValueType>;

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

/**
 * The attribute type of the value.
 */
export const AttributeTypeInteraction = {
  Interaction: "interaction",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypeInteraction = ClosedEnum<
  typeof AttributeTypeInteraction
>;

export type OutputValueInteraction = {
  /**
   * The type of interaction e.g. calendar or email.
   */
  interactionType: OutputValueInteractionType;
  /**
   * When the interaction occurred.
   */
  interactedAt: Date;
  /**
   * The actor that created this value.
   */
  ownerActor: OutputValueOwnerActor;
  /**
   * The attribute type of the value.
   */
  attributeType: AttributeTypeInteraction;
};

/**
 * The attribute type of the value.
 */
export const AttributeTypeRecordReference = {
  RecordReference: "record-reference",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypeRecordReference = ClosedEnum<
  typeof AttributeTypeRecordReference
>;

export type OutputValueRecordReference = {
  /**
   * A slug identifying the object that the referenced record belongs to.
   */
  targetObject: string;
  /**
   * A UUID to identify the referenced record.
   */
  targetRecordId: string;
  /**
   * The attribute type of the value.
   */
  attributeType: AttributeTypeRecordReference;
};

/**
 * The attribute type of the value.
 */
export const AttributeTypeEmailAddress = {
  EmailAddress: "email-address",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypeEmailAddress = ClosedEnum<
  typeof AttributeTypeEmailAddress
>;

export type OutputValueEmailAddress = {
  originalEmailAddress: string;
  emailAddress: string;
  emailDomain: string;
  emailRootDomain: string;
  emailLocalSpecifier: string;
  /**
   * The attribute type of the value.
   */
  attributeType: AttributeTypeEmailAddress;
};

/**
 * The attribute type of the value.
 */
export const AttributeTypeDomain = {
  Domain: "domain",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypeDomain = ClosedEnum<typeof AttributeTypeDomain>;

export type OutputValueDomain = {
  domain: string;
  rootDomain: string;
  /**
   * The attribute type of the value.
   */
  attributeType: AttributeTypeDomain;
};

/**
 * The attribute type of the value.
 */
export const AttributeTypeDate = {
  Date: "date",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypeDate = ClosedEnum<typeof AttributeTypeDate>;

export type OutputValueDate = {
  /**
   * The attribute type of the value.
   */
  attributeType: AttributeTypeDate;
  /**
   * 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;
};

/**
 * The ISO4217 currency code representing the currency that the value is stored in.
 */
export const CurrencyCode = {
  Aud: "AUD",
  Brl: "BRL",
  Bel: "BEL",
  Cad: "CAD",
  Cny: "CNY",
  Cop: "COP",
  Czk: "CZK",
  Dkk: "DKK",
  Eur: "EUR",
  Hkd: "HKD",
  Isk: "ISK",
  Inr: "INR",
  Ils: "ILS",
  Jpy: "JPY",
  Krw: "KRW",
  Myr: "MYR",
  Mxn: "MXN",
  Ntd: "NTD",
  Nzd: "NZD",
  Ngn: "NGN",
  Nok: "NOK",
  Xpf: "XPF",
  Pen: "PEN",
  Php: "PHP",
  Pln: "PLN",
  Gbp: "GBP",
  Sar: "SAR",
  Sgd: "SGD",
  Zar: "ZAR",
  Sek: "SEK",
  Chf: "CHF",
  Aed: "AED",
  Usd: "USD",
} as const;
/**
 * The ISO4217 currency code representing the currency that the value is stored in.
 */
export type CurrencyCode = ClosedEnum<typeof CurrencyCode>;

/**
 * The attribute type of the value.
 */
export const AttributeTypeCurrency = {
  Currency: "currency",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypeCurrency = ClosedEnum<typeof AttributeTypeCurrency>;

export type OutputValueCurrency = {
  /**
   * A numerical representation of the currency value. A decimal with a max of 4 decimal places.
   */
  currencyValue: number;
  /**
   * The ISO4217 currency code representing the currency that the value is stored in.
   */
  currencyCode?: CurrencyCode | null | undefined;
  /**
   * The attribute type of the value.
   */
  attributeType: AttributeTypeCurrency;
};

/**
 * The attribute type of the value.
 */
export const AttributeTypeCheckbox = {
  Checkbox: "checkbox",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypeCheckbox = ClosedEnum<typeof AttributeTypeCheckbox>;

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

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

/**
 * The attribute type of the value.
 */
export const AttributeTypeActorReference = {
  ActorReference: "actor-reference",
} as const;
/**
 * The attribute type of the value.
 */
export type AttributeTypeActorReference = ClosedEnum<
  typeof AttributeTypeActorReference
>;

export type OutputValueActorReference = {
  /**
   * The type of the referenced actor. [Read more information on actor types here](/docs/actors).
   */
  referencedActorType: OutputValueReferencedActorType;
  /**
   * The ID of the referenced actor.
   */
  referencedActorId: string | null;
  /**
   * The attribute type of the value.
   */
  attributeType: AttributeTypeActorReference;
};

/**
 * A union of possible value types, as returned in response bodies.
 */
export type OutputValue =
  | OutputValueCheckbox
  | OutputValueDate
  | OutputValueNumber
  | OutputValueStatus1
  | OutputValueStatus2
  | OutputValueRating
  | OutputValueSelect1
  | OutputValueSelect2
  | OutputValueText
  | OutputValueTimestamp
  | OutputValueActorReference
  | OutputValueCurrency
  | OutputValueDomain
  | OutputValueRecordReference
  | OutputValueInteraction
  | OutputValuePersonalName
  | OutputValuePhoneNumber
  | OutputValueEmailAddress
  | OutputValueLocation;

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

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

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

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

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

/** @internal */
export const OutputValueTimestamp$outboundSchema: z.ZodType<
  OutputValueTimestamp$Outbound,
  z.ZodTypeDef,
  OutputValueTimestamp
> = z.object({
  attributeType: AttributeTypeTimestamp$outboundSchema,
  value: z.date().transform(v => v.toISOString()),
}).transform((v) => {
  return remap$(v, {
    attributeType: "attribute_type",
  });
});

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

export function outputValueTimestampToJSON(
  outputValueTimestamp: OutputValueTimestamp,
): string {
  return JSON.stringify(
    OutputValueTimestamp$outboundSchema.parse(outputValueTimestamp),
  );
}

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

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

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

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

/** @internal */
export const OutputValueText$inboundSchema: z.ZodType<
  OutputValueText,
  z.ZodTypeDef,
  unknown
> = z.object({
  value: z.string(),
  attribute_type: AttributeTypeText$inboundSchema,
}).transform((v) => {
  return remap$(v, {
    "attribute_type": "attributeType",
  });
});

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

/** @internal */
export const OutputValueText$outboundSchema: z.ZodType<
  OutputValueText$Outbound,
  z.ZodTypeDef,
  OutputValueText
> = z.object({
  value: z.string(),
  attributeType: AttributeTypeText$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    attributeType: "attribute_type",
  });
});

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

export function outputValueTextToJSON(
  outputValueText: OutputValueText,
): string {
  return JSON.stringify(OutputValueText$outboundSchema.parse(outputValueText));
}

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

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

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

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

/** @internal */
export const OutputValueSelect2$inboundSchema: z.ZodType<
  OutputValueSelect2,
  z.ZodTypeDef,
  unknown
> = z.object({
  option: SelectOption$inboundSchema,
  attribute_type: AttributeTypeSelect2$inboundSchema,
}).transform((v) => {
  return remap$(v, {
    "attribute_type": "attributeType",
  });
});

/** @internal */
export type OutputValueSelect2$Outbound = {
  option: SelectOption$Outbound;
  attribute_type: string;
};

/** @internal */
export const OutputValueSelect2$outboundSchema: z.ZodType<
  OutputValueSelect2$Outbound,
  z.ZodTypeDef,
  OutputValueSelect2
> = z.object({
  option: SelectOption$outboundSchema,
  attributeType: AttributeTypeSelect2$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    attributeType: "attribute_type",
  });
});

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

export function outputValueSelect2ToJSON(
  outputValueSelect2: OutputValueSelect2,
): string {
  return JSON.stringify(
    OutputValueSelect2$outboundSchema.parse(outputValueSelect2),
  );
}

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

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

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

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

/** @internal */
export const OutputValueSelect1$inboundSchema: z.ZodType<
  OutputValueSelect1,
  z.ZodTypeDef,
  unknown
> = z.object({
  option: z.string(),
  attribute_type: AttributeTypeSelect1$inboundSchema,
}).transform((v) => {
  return remap$(v, {
    "attribute_type": "attributeType",
  });
});

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

/** @internal */
export const OutputValueSelect1$outboundSchema: z.ZodType<
  OutputValueSelect1$Outbound,
  z.ZodTypeDef,
  OutputValueSelect1
> = z.object({
  option: z.string(),
  attributeType: AttributeTypeSelect1$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    attributeType: "attribute_type",
  });
});

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

export function outputValueSelect1ToJSON(
  outputValueSelect1: OutputValueSelect1,
): string {
  return JSON.stringify(
    OutputValueSelect1$outboundSchema.parse(outputValueSelect1),
  );
}

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

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

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

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

/** @internal */
export const OutputValueRating$inboundSchema: z.ZodType<
  OutputValueRating,
  z.ZodTypeDef,
  unknown
> = z.object({
  value: z.number(),
  attribute_type: AttributeTypeRating$inboundSchema,
}).transform((v) => {
  return remap$(v, {
    "attribute_type": "attributeType",
  });
});

/** @internal */
export type OutputValueRating$Outbound = {
  value: number;
  attribute_type: string;
};

/** @internal */
export const OutputValueRating$outboundSchema: z.ZodType<
  OutputValueRating$Outbound,
  z.ZodTypeDef,
  OutputValueRating
> = z.object({
  value: z.number(),
  attributeType: AttributeTypeRating$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    attributeType: "attribute_type",
  });
});

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

export function outputValueRatingToJSON(
  outputValueRating: OutputValueRating,
): string {
  return JSON.stringify(
    OutputValueRating$outboundSchema.parse(outputValueRating),
  );
}

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

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

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

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

/** @internal */
export const OutputValueStatus2$inboundSchema: z.ZodType<
  OutputValueStatus2,
  z.ZodTypeDef,
  unknown
> = z.object({
  status: Status$inboundSchema,
  attribute_type: AttributeTypeStatus2$inboundSchema,
}).transform((v) => {
  return remap$(v, {
    "attribute_type": "attributeType",
  });
});

/** @internal */
export type OutputValueStatus2$Outbound = {
  status: Status$Outbound;
  attribute_type: string;
};

/** @internal */
export const OutputValueStatus2$outboundSchema: z.ZodType<
  OutputValueStatus2$Outbound,
  z.ZodTypeDef,
  OutputValueStatus2
> = z.object({
  status: Status$outboundSchema,
  attributeType: AttributeTypeStatus2$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    attributeType: "attribute_type",
  });
});

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

export function outputValueStatus2ToJSON(
  outputValueStatus2: OutputValueStatus2,
): string {
  return JSON.stringify(
    OutputValueStatus2$outboundSchema.parse(outputValueStatus2),
  );
}

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

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

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

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

/** @internal */
export const OutputValueStatus1$inboundSchema: z.ZodType<
  OutputValueStatus1,
  z.ZodTypeDef,
  unknown
> = z.object({
  status: z.string(),
  attribute_type: AttributeTypeStatus1$inboundSchema,
}).transform((v) => {
  return remap$(v, {
    "attribute_type": "attributeType",
  });
});

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

/** @internal */
export const OutputValueStatus1$outboundSchema: z.ZodType<
  OutputValueStatus1$Outbound,
  z.ZodTypeDef,
  OutputValueStatus1
> = z.object({
  status: z.string(),
  attributeType: AttributeTypeStatus1$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    attributeType: "attribute_type",
  });
});

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

export function outputValueStatus1ToJSON(
  outputValueStatus1: OutputValueStatus1,
): string {
  return JSON.stringify(
    OutputValueStatus1$outboundSchema.parse(outputValueStatus1),
  );
}

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

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

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

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

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

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

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

/** @internal */
export const OutputValuePhoneNumber$inboundSchema: z.ZodType<
  OutputValuePhoneNumber,
  z.ZodTypeDef,
  unknown
> = z.object({
  original_phone_number: z.string(),
  country_code: OutputValueCountryCode2$inboundSchema,
  phone_number: z.string(),
  attribute_type: AttributeTypePhoneNumber$inboundSchema,
}).transform((v) => {
  return remap$(v, {
    "original_phone_number": "originalPhoneNumber",
    "country_code": "countryCode",
    "phone_number": "phoneNumber",
    "attribute_type": "attributeType",
  });
});

/** @internal */
export type OutputValuePhoneNumber$Outbound = {
  original_phone_number: string;
  country_code: string;
  phone_number: string;
  attribute_type: string;
};

/** @internal */
export const OutputValuePhoneNumber$outboundSchema: z.ZodType<
  OutputValuePhoneNumber$Outbound,
  z.ZodTypeDef,
  OutputValuePhoneNumber
> = z.object({
  originalPhoneNumber: z.string(),
  countryCode: OutputValueCountryCode2$outboundSchema,
  phoneNumber: z.string(),
  attributeType: AttributeTypePhoneNumber$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    originalPhoneNumber: "original_phone_number",
    countryCode: "country_code",
    phoneNumber: "phone_number",
    attributeType: "attribute_type",
  });
});

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

export function outputValuePhoneNumberToJSON(
  outputValuePhoneNumber: OutputValuePhoneNumber,
): string {
  return JSON.stringify(
    OutputValuePhoneNumber$outboundSchema.parse(outputValuePhoneNumber),
  );
}

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

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

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

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

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

/** @internal */
export type OutputValuePersonalName$Outbound = {
  first_name: string;
  last_name: string;
  full_name: string;
  attribute_type: string;
};

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

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

export function outputValuePersonalNameToJSON(
  outputValuePersonalName: OutputValuePersonalName,
): string {
  return JSON.stringify(
    OutputValuePersonalName$outboundSchema.parse(outputValuePersonalName),
  );
}

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

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

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

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

/** @internal */
export const OutputValueNumber$inboundSchema: z.ZodType<
  OutputValueNumber,
  z.ZodTypeDef,
  unknown
> = z.object({
  value: z.number(),
  attribute_type: AttributeTypeNumber$inboundSchema,
}).transform((v) => {
  return remap$(v, {
    "attribute_type": "attributeType",
  });
});

/** @internal */
export type OutputValueNumber$Outbound = {
  value: number;
  attribute_type: string;
};

/** @internal */
export const OutputValueNumber$outboundSchema: z.ZodType<
  OutputValueNumber$Outbound,
  z.ZodTypeDef,
  OutputValueNumber
> = z.object({
  value: z.number(),
  attributeType: AttributeTypeNumber$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    attributeType: "attribute_type",
  });
});

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

export function outputValueNumberToJSON(
  outputValueNumber: OutputValueNumber,
): string {
  return JSON.stringify(
    OutputValueNumber$outboundSchema.parse(outputValueNumber),
  );
}

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

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

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

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

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

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

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

/** @internal */
export const OutputValueLocation$inboundSchema: z.ZodType<
  OutputValueLocation,
  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(OutputValueCountryCode1$inboundSchema),
  latitude: z.nullable(z.string()),
  longitude: z.nullable(z.string()),
  attribute_type: AttributeTypeLocation$inboundSchema,
}).transform((v) => {
  return remap$(v, {
    "line_1": "line1",
    "line_2": "line2",
    "line_3": "line3",
    "line_4": "line4",
    "country_code": "countryCode",
    "attribute_type": "attributeType",
  });
});

/** @internal */
export type OutputValueLocation$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;
  attribute_type: string;
};

/** @internal */
export const OutputValueLocation$outboundSchema: z.ZodType<
  OutputValueLocation$Outbound,
  z.ZodTypeDef,
  OutputValueLocation
> = 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(OutputValueCountryCode1$outboundSchema),
  latitude: z.nullable(z.string()),
  longitude: z.nullable(z.string()),
  attributeType: AttributeTypeLocation$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    line1: "line_1",
    line2: "line_2",
    line3: "line_3",
    line4: "line_4",
    countryCode: "country_code",
    attributeType: "attribute_type",
  });
});

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

export function outputValueLocationToJSON(
  outputValueLocation: OutputValueLocation,
): string {
  return JSON.stringify(
    OutputValueLocation$outboundSchema.parse(outputValueLocation),
  );
}

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

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

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

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

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

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

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

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

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

/** @internal */
export const OutputValueOwnerActor$outboundSchema: z.ZodType<
  OutputValueOwnerActor$Outbound,
  z.ZodTypeDef,
  OutputValueOwnerActor
> = z.object({
  id: z.nullable(z.string()).optional(),
  type: z.nullable(OutputValueType$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 OutputValueOwnerActor$ {
  /** @deprecated use `OutputValueOwnerActor$inboundSchema` instead. */
  export const inboundSchema = OutputValueOwnerActor$inboundSchema;
  /** @deprecated use `OutputValueOwnerActor$outboundSchema` instead. */
  export const outboundSchema = OutputValueOwnerActor$outboundSchema;
  /** @deprecated use `OutputValueOwnerActor$Outbound` instead. */
  export type Outbound = OutputValueOwnerActor$Outbound;
}

export function outputValueOwnerActorToJSON(
  outputValueOwnerActor: OutputValueOwnerActor,
): string {
  return JSON.stringify(
    OutputValueOwnerActor$outboundSchema.parse(outputValueOwnerActor),
  );
}

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

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

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

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

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

/** @internal */
export type OutputValueInteraction$Outbound = {
  interaction_type: string;
  interacted_at: string;
  owner_actor: OutputValueOwnerActor$Outbound;
  attribute_type: string;
};

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

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

export function outputValueInteractionToJSON(
  outputValueInteraction: OutputValueInteraction,
): string {
  return JSON.stringify(
    OutputValueInteraction$outboundSchema.parse(outputValueInteraction),
  );
}

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

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

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

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

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

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

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

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

export function outputValueRecordReferenceToJSON(
  outputValueRecordReference: OutputValueRecordReference,
): string {
  return JSON.stringify(
    OutputValueRecordReference$outboundSchema.parse(outputValueRecordReference),
  );
}

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

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

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

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

/** @internal */
export const OutputValueEmailAddress$inboundSchema: z.ZodType<
  OutputValueEmailAddress,
  z.ZodTypeDef,
  unknown
> = z.object({
  original_email_address: z.string(),
  email_address: z.string(),
  email_domain: z.string(),
  email_root_domain: z.string(),
  email_local_specifier: z.string(),
  attribute_type: AttributeTypeEmailAddress$inboundSchema,
}).transform((v) => {
  return remap$(v, {
    "original_email_address": "originalEmailAddress",
    "email_address": "emailAddress",
    "email_domain": "emailDomain",
    "email_root_domain": "emailRootDomain",
    "email_local_specifier": "emailLocalSpecifier",
    "attribute_type": "attributeType",
  });
});

/** @internal */
export type OutputValueEmailAddress$Outbound = {
  original_email_address: string;
  email_address: string;
  email_domain: string;
  email_root_domain: string;
  email_local_specifier: string;
  attribute_type: string;
};

/** @internal */
export const OutputValueEmailAddress$outboundSchema: z.ZodType<
  OutputValueEmailAddress$Outbound,
  z.ZodTypeDef,
  OutputValueEmailAddress
> = z.object({
  originalEmailAddress: z.string(),
  emailAddress: z.string(),
  emailDomain: z.string(),
  emailRootDomain: z.string(),
  emailLocalSpecifier: z.string(),
  attributeType: AttributeTypeEmailAddress$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    originalEmailAddress: "original_email_address",
    emailAddress: "email_address",
    emailDomain: "email_domain",
    emailRootDomain: "email_root_domain",
    emailLocalSpecifier: "email_local_specifier",
    attributeType: "attribute_type",
  });
});

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

export function outputValueEmailAddressToJSON(
  outputValueEmailAddress: OutputValueEmailAddress,
): string {
  return JSON.stringify(
    OutputValueEmailAddress$outboundSchema.parse(outputValueEmailAddress),
  );
}

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

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

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

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

/** @internal */
export const OutputValueDomain$inboundSchema: z.ZodType<
  OutputValueDomain,
  z.ZodTypeDef,
  unknown
> = z.object({
  domain: z.string(),
  root_domain: z.string(),
  attribute_type: AttributeTypeDomain$inboundSchema,
}).transform((v) => {
  return remap$(v, {
    "root_domain": "rootDomain",
    "attribute_type": "attributeType",
  });
});

/** @internal */
export type OutputValueDomain$Outbound = {
  domain: string;
  root_domain: string;
  attribute_type: string;
};

/** @internal */
export const OutputValueDomain$outboundSchema: z.ZodType<
  OutputValueDomain$Outbound,
  z.ZodTypeDef,
  OutputValueDomain
> = z.object({
  domain: z.string(),
  rootDomain: z.string(),
  attributeType: AttributeTypeDomain$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    rootDomain: "root_domain",
    attributeType: "attribute_type",
  });
});

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

export function outputValueDomainToJSON(
  outputValueDomain: OutputValueDomain,
): string {
  return JSON.stringify(
    OutputValueDomain$outboundSchema.parse(outputValueDomain),
  );
}

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

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

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

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

/** @internal */
export const OutputValueDate$inboundSchema: z.ZodType<
  OutputValueDate,
  z.ZodTypeDef,
  unknown
> = z.object({
  attribute_type: AttributeTypeDate$inboundSchema,
  value: z.string(),
}).transform((v) => {
  return remap$(v, {
    "attribute_type": "attributeType",
  });
});

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

/** @internal */
export const OutputValueDate$outboundSchema: z.ZodType<
  OutputValueDate$Outbound,
  z.ZodTypeDef,
  OutputValueDate
> = z.object({
  attributeType: AttributeTypeDate$outboundSchema,
  value: z.string(),
}).transform((v) => {
  return remap$(v, {
    attributeType: "attribute_type",
  });
});

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

export function outputValueDateToJSON(
  outputValueDate: OutputValueDate,
): string {
  return JSON.stringify(OutputValueDate$outboundSchema.parse(outputValueDate));
}

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

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

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

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

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

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

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

/** @internal */
export const OutputValueCurrency$inboundSchema: z.ZodType<
  OutputValueCurrency,
  z.ZodTypeDef,
  unknown
> = z.object({
  currency_value: z.number(),
  currency_code: z.nullable(CurrencyCode$inboundSchema).optional(),
  attribute_type: AttributeTypeCurrency$inboundSchema,
}).transform((v) => {
  return remap$(v, {
    "currency_value": "currencyValue",
    "currency_code": "currencyCode",
    "attribute_type": "attributeType",
  });
});

/** @internal */
export type OutputValueCurrency$Outbound = {
  currency_value: number;
  currency_code?: string | null | undefined;
  attribute_type: string;
};

/** @internal */
export const OutputValueCurrency$outboundSchema: z.ZodType<
  OutputValueCurrency$Outbound,
  z.ZodTypeDef,
  OutputValueCurrency
> = z.object({
  currencyValue: z.number(),
  currencyCode: z.nullable(CurrencyCode$outboundSchema).optional(),
  attributeType: AttributeTypeCurrency$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    currencyValue: "currency_value",
    currencyCode: "currency_code",
    attributeType: "attribute_type",
  });
});

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

export function outputValueCurrencyToJSON(
  outputValueCurrency: OutputValueCurrency,
): string {
  return JSON.stringify(
    OutputValueCurrency$outboundSchema.parse(outputValueCurrency),
  );
}

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

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

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

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

/** @internal */
export const OutputValueCheckbox$inboundSchema: z.ZodType<
  OutputValueCheckbox,
  z.ZodTypeDef,
  unknown
> = z.object({
  value: z.boolean(),
  attribute_type: AttributeTypeCheckbox$inboundSchema,
}).transform((v) => {
  return remap$(v, {
    "attribute_type": "attributeType",
  });
});

/** @internal */
export type OutputValueCheckbox$Outbound = {
  value: boolean;
  attribute_type: string;
};

/** @internal */
export const OutputValueCheckbox$outboundSchema: z.ZodType<
  OutputValueCheckbox$Outbound,
  z.ZodTypeDef,
  OutputValueCheckbox
> = z.object({
  value: z.boolean(),
  attributeType: AttributeTypeCheckbox$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    attributeType: "attribute_type",
  });
});

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

export function outputValueCheckboxToJSON(
  outputValueCheckbox: OutputValueCheckbox,
): string {
  return JSON.stringify(
    OutputValueCheckbox$outboundSchema.parse(outputValueCheckbox),
  );
}

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

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

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

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

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

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

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

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

/** @internal */
export type OutputValueActorReference$Outbound = {
  referenced_actor_type: string;
  referenced_actor_id: string | null;
  attribute_type: string;
};

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

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

export function outputValueActorReferenceToJSON(
  outputValueActorReference: OutputValueActorReference,
): string {
  return JSON.stringify(
    OutputValueActorReference$outboundSchema.parse(outputValueActorReference),
  );
}

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

/** @internal */
export const OutputValue$inboundSchema: z.ZodType<
  OutputValue,
  z.ZodTypeDef,
  unknown
> = z.union([
  z.lazy(() => OutputValueCheckbox$inboundSchema),
  z.lazy(() => OutputValueDate$inboundSchema),
  z.lazy(() => OutputValueNumber$inboundSchema),
  z.lazy(() => OutputValueStatus1$inboundSchema),
  z.lazy(() => OutputValueStatus2$inboundSchema),
  z.lazy(() => OutputValueRating$inboundSchema),
  z.lazy(() => OutputValueSelect1$inboundSchema),
  z.lazy(() => OutputValueSelect2$inboundSchema),
  z.lazy(() => OutputValueText$inboundSchema),
  z.lazy(() => OutputValueTimestamp$inboundSchema),
  z.lazy(() => OutputValueActorReference$inboundSchema),
  z.lazy(() => OutputValueCurrency$inboundSchema),
  z.lazy(() => OutputValueDomain$inboundSchema),
  z.lazy(() => OutputValueRecordReference$inboundSchema),
  z.lazy(() => OutputValueInteraction$inboundSchema),
  z.lazy(() => OutputValuePersonalName$inboundSchema),
  z.lazy(() => OutputValuePhoneNumber$inboundSchema),
  z.lazy(() => OutputValueEmailAddress$inboundSchema),
  z.lazy(() => OutputValueLocation$inboundSchema),
]);

/** @internal */
export type OutputValue$Outbound =
  | OutputValueCheckbox$Outbound
  | OutputValueDate$Outbound
  | OutputValueNumber$Outbound
  | OutputValueStatus1$Outbound
  | OutputValueStatus2$Outbound
  | OutputValueRating$Outbound
  | OutputValueSelect1$Outbound
  | OutputValueSelect2$Outbound
  | OutputValueText$Outbound
  | OutputValueTimestamp$Outbound
  | OutputValueActorReference$Outbound
  | OutputValueCurrency$Outbound
  | OutputValueDomain$Outbound
  | OutputValueRecordReference$Outbound
  | OutputValueInteraction$Outbound
  | OutputValuePersonalName$Outbound
  | OutputValuePhoneNumber$Outbound
  | OutputValueEmailAddress$Outbound
  | OutputValueLocation$Outbound;

/** @internal */
export const OutputValue$outboundSchema: z.ZodType<
  OutputValue$Outbound,
  z.ZodTypeDef,
  OutputValue
> = z.union([
  z.lazy(() => OutputValueCheckbox$outboundSchema),
  z.lazy(() => OutputValueDate$outboundSchema),
  z.lazy(() => OutputValueNumber$outboundSchema),
  z.lazy(() => OutputValueStatus1$outboundSchema),
  z.lazy(() => OutputValueStatus2$outboundSchema),
  z.lazy(() => OutputValueRating$outboundSchema),
  z.lazy(() => OutputValueSelect1$outboundSchema),
  z.lazy(() => OutputValueSelect2$outboundSchema),
  z.lazy(() => OutputValueText$outboundSchema),
  z.lazy(() => OutputValueTimestamp$outboundSchema),
  z.lazy(() => OutputValueActorReference$outboundSchema),
  z.lazy(() => OutputValueCurrency$outboundSchema),
  z.lazy(() => OutputValueDomain$outboundSchema),
  z.lazy(() => OutputValueRecordReference$outboundSchema),
  z.lazy(() => OutputValueInteraction$outboundSchema),
  z.lazy(() => OutputValuePersonalName$outboundSchema),
  z.lazy(() => OutputValuePhoneNumber$outboundSchema),
  z.lazy(() => OutputValueEmailAddress$outboundSchema),
  z.lazy(() => OutputValueLocation$outboundSchema),
]);

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

export function outputValueToJSON(outputValue: OutputValue): string {
  return JSON.stringify(OutputValue$outboundSchema.parse(outputValue));
}

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