/*
 * 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 {
  TagSchema,
  TagSchema$inboundSchema,
  TagSchema$Outbound,
  TagSchema$outboundSchema,
} from "./tagschema.js";

export const LeadEventEvent = {
  Lead: "lead",
} as const;
export type LeadEventEvent = ClosedEnum<typeof LeadEventEvent>;

export type LeadEventClick = {
  id: string;
  url: string;
  country: string;
  city: string;
  region: string;
  continent: string;
  device: string;
  browser: string;
  os: string;
  referer: string;
  refererUrl: string;
  qr?: boolean | undefined;
  ip: string;
};

/**
 * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo
 */
export type LeadEventGeo = {
  af?: string | undefined;
  al?: string | undefined;
  dz?: string | undefined;
  as?: string | undefined;
  ad?: string | undefined;
  ao?: string | undefined;
  ai?: string | undefined;
  aq?: string | undefined;
  ag?: string | undefined;
  ar?: string | undefined;
  am?: string | undefined;
  aw?: string | undefined;
  au?: string | undefined;
  at?: string | undefined;
  az?: string | undefined;
  bs?: string | undefined;
  bh?: string | undefined;
  bd?: string | undefined;
  bb?: string | undefined;
  by?: string | undefined;
  be?: string | undefined;
  bz?: string | undefined;
  bj?: string | undefined;
  bm?: string | undefined;
  bt?: string | undefined;
  bo?: string | undefined;
  ba?: string | undefined;
  bw?: string | undefined;
  bv?: string | undefined;
  br?: string | undefined;
  io?: string | undefined;
  bn?: string | undefined;
  bg?: string | undefined;
  bf?: string | undefined;
  bi?: string | undefined;
  kh?: string | undefined;
  cm?: string | undefined;
  ca?: string | undefined;
  cv?: string | undefined;
  ky?: string | undefined;
  cf?: string | undefined;
  td?: string | undefined;
  cl?: string | undefined;
  cn?: string | undefined;
  cx?: string | undefined;
  cc?: string | undefined;
  co?: string | undefined;
  km?: string | undefined;
  cg?: string | undefined;
  cd?: string | undefined;
  ck?: string | undefined;
  cr?: string | undefined;
  ci?: string | undefined;
  hr?: string | undefined;
  cu?: string | undefined;
  cy?: string | undefined;
  cz?: string | undefined;
  dk?: string | undefined;
  dj?: string | undefined;
  dm?: string | undefined;
  do?: string | undefined;
  ec?: string | undefined;
  eg?: string | undefined;
  sv?: string | undefined;
  gq?: string | undefined;
  er?: string | undefined;
  ee?: string | undefined;
  et?: string | undefined;
  fk?: string | undefined;
  fo?: string | undefined;
  fj?: string | undefined;
  fi?: string | undefined;
  fr?: string | undefined;
  gf?: string | undefined;
  pf?: string | undefined;
  tf?: string | undefined;
  ga?: string | undefined;
  gm?: string | undefined;
  ge?: string | undefined;
  de?: string | undefined;
  gh?: string | undefined;
  gi?: string | undefined;
  gr?: string | undefined;
  gl?: string | undefined;
  gd?: string | undefined;
  gp?: string | undefined;
  gu?: string | undefined;
  gt?: string | undefined;
  gn?: string | undefined;
  gw?: string | undefined;
  gy?: string | undefined;
  ht?: string | undefined;
  hm?: string | undefined;
  va?: string | undefined;
  hn?: string | undefined;
  hk?: string | undefined;
  hu?: string | undefined;
  is?: string | undefined;
  in?: string | undefined;
  id?: string | undefined;
  ir?: string | undefined;
  iq?: string | undefined;
  ie?: string | undefined;
  il?: string | undefined;
  it?: string | undefined;
  jm?: string | undefined;
  jp?: string | undefined;
  jo?: string | undefined;
  kz?: string | undefined;
  ke?: string | undefined;
  ki?: string | undefined;
  kp?: string | undefined;
  kr?: string | undefined;
  kw?: string | undefined;
  kg?: string | undefined;
  la?: string | undefined;
  lv?: string | undefined;
  lb?: string | undefined;
  ls?: string | undefined;
  lr?: string | undefined;
  ly?: string | undefined;
  li?: string | undefined;
  lt?: string | undefined;
  lu?: string | undefined;
  mo?: string | undefined;
  mg?: string | undefined;
  mw?: string | undefined;
  my?: string | undefined;
  mv?: string | undefined;
  ml?: string | undefined;
  mt?: string | undefined;
  mh?: string | undefined;
  mq?: string | undefined;
  mr?: string | undefined;
  mu?: string | undefined;
  yt?: string | undefined;
  mx?: string | undefined;
  fm?: string | undefined;
  md?: string | undefined;
  mc?: string | undefined;
  mn?: string | undefined;
  ms?: string | undefined;
  ma?: string | undefined;
  mz?: string | undefined;
  mm?: string | undefined;
  na?: string | undefined;
  nr?: string | undefined;
  np?: string | undefined;
  nl?: string | undefined;
  nc?: string | undefined;
  nz?: string | undefined;
  ni?: string | undefined;
  ne?: string | undefined;
  ng?: string | undefined;
  nu?: string | undefined;
  nf?: string | undefined;
  mk?: string | undefined;
  mp?: string | undefined;
  no?: string | undefined;
  om?: string | undefined;
  pk?: string | undefined;
  pw?: string | undefined;
  ps?: string | undefined;
  pa?: string | undefined;
  pg?: string | undefined;
  py?: string | undefined;
  pe?: string | undefined;
  ph?: string | undefined;
  pn?: string | undefined;
  pl?: string | undefined;
  pt?: string | undefined;
  pr?: string | undefined;
  qa?: string | undefined;
  re?: string | undefined;
  ro?: string | undefined;
  ru?: string | undefined;
  rw?: string | undefined;
  sh?: string | undefined;
  kn?: string | undefined;
  lc?: string | undefined;
  pm?: string | undefined;
  vc?: string | undefined;
  ws?: string | undefined;
  sm?: string | undefined;
  st?: string | undefined;
  sa?: string | undefined;
  sn?: string | undefined;
  sc?: string | undefined;
  sl?: string | undefined;
  sg?: string | undefined;
  sk?: string | undefined;
  si?: string | undefined;
  sb?: string | undefined;
  so?: string | undefined;
  za?: string | undefined;
  gs?: string | undefined;
  es?: string | undefined;
  lk?: string | undefined;
  sd?: string | undefined;
  sr?: string | undefined;
  sj?: string | undefined;
  sz?: string | undefined;
  se?: string | undefined;
  ch?: string | undefined;
  sy?: string | undefined;
  tw?: string | undefined;
  tj?: string | undefined;
  tz?: string | undefined;
  th?: string | undefined;
  tl?: string | undefined;
  tg?: string | undefined;
  tk?: string | undefined;
  to?: string | undefined;
  tt?: string | undefined;
  tn?: string | undefined;
  tr?: string | undefined;
  tm?: string | undefined;
  tc?: string | undefined;
  tv?: string | undefined;
  ug?: string | undefined;
  ua?: string | undefined;
  ae?: string | undefined;
  gb?: string | undefined;
  us?: string | undefined;
  um?: string | undefined;
  uy?: string | undefined;
  uz?: string | undefined;
  vu?: string | undefined;
  ve?: string | undefined;
  vn?: string | undefined;
  vg?: string | undefined;
  vi?: string | undefined;
  wf?: string | undefined;
  eh?: string | undefined;
  ye?: string | undefined;
  zm?: string | undefined;
  zw?: string | undefined;
  ax?: string | undefined;
  bq?: string | undefined;
  cw?: string | undefined;
  gg?: string | undefined;
  im?: string | undefined;
  je?: string | undefined;
  me?: string | undefined;
  bl?: string | undefined;
  mf?: string | undefined;
  rs?: string | undefined;
  sx?: string | undefined;
  ss?: string | undefined;
  xk?: string | undefined;
};

export type LeadEventLink = {
  /**
   * The unique ID of the short link.
   */
  id: string;
  /**
   * The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).
   */
  domain: string;
  /**
   * The short link slug. If not provided, a random 7-character slug will be generated.
   */
  key: string;
  url: string;
  trackConversion?: boolean | undefined;
  /**
   * The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.
   */
  externalId: string | null;
  /**
   * The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.
   */
  tenantId: string | null;
  archived?: boolean | undefined;
  expiresAt: string;
  expiredUrl: string | null;
  /**
   * The password required to access the destination URL of the short link.
   */
  password: string | null;
  proxy?: boolean | undefined;
  /**
   * The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
   */
  title: string | null;
  /**
   * The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
   */
  description: string | null;
  /**
   * The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
   */
  image: string | null;
  /**
   * The custom link preview video (og:video). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og
   */
  video: string | null;
  rewrite?: boolean | undefined;
  doIndex?: boolean | undefined;
  /**
   * The iOS destination URL for the short link for iOS device targeting.
   */
  ios: string | null;
  /**
   * The Android destination URL for the short link for Android device targeting.
   */
  android: string | null;
  /**
   * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo
   */
  geo: LeadEventGeo | null;
  publicStats?: boolean | undefined;
  /**
   * The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead.
   *
   * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
   */
  tagId: string | null;
  /**
   * The tags assigned to the short link.
   */
  tags: Array<TagSchema> | null;
  /**
   * The IDs of the webhooks that the short link is associated with.
   */
  webhookIds: Array<string>;
  /**
   * The comments for the short link.
   */
  comments: string | null;
  /**
   * The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
   */
  shortLink: string;
  /**
   * The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`).
   */
  qrCode: string;
  /**
   * The UTM source of the short link.
   */
  utmSource: string | null;
  /**
   * The UTM medium of the short link.
   */
  utmMedium: string | null;
  /**
   * The UTM campaign of the short link.
   */
  utmCampaign: string | null;
  /**
   * The UTM term of the short link.
   */
  utmTerm: string | null;
  /**
   * The UTM content of the short link.
   */
  utmContent: string | null;
  userId: string | null;
  /**
   * The workspace ID of the short link.
   */
  workspaceId: string;
  /**
   * The number of clicks on the short link.
   */
  clicks?: number | undefined;
  lastClicked: string;
  /**
   * The number of leads the short links has generated.
   */
  leads?: number | undefined;
  /**
   * The number of sales the short links has generated.
   */
  sales?: number | undefined;
  /**
   * The total dollar amount of sales the short links has generated (in cents).
   */
  saleAmount?: number | undefined;
  createdAt: string;
  updatedAt: string;
  /**
   * The project ID of the short link. This field is deprecated – use `workspaceId` instead.
   *
   * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
   */
  projectId: string;
  /**
   * The ID of the program the short link is associated with.
   */
  programId: string | null;
};

export type LeadEventCustomerLink = {
  /**
   * The unique ID of the short link.
   */
  id: string;
  /**
   * The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).
   */
  domain: string;
  /**
   * The short link slug. If not provided, a random 7-character slug will be generated.
   */
  key: string;
  /**
   * The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
   */
  shortLink: string;
  /**
   * The ID of the program the short link is associated with.
   */
  programId: string | null;
};

export type Partner = {
  id: string;
  name: string;
  email: string;
  image?: string | null | undefined;
};

export const Type = {
  Percentage: "percentage",
  Flat: "flat",
} as const;
export type Type = ClosedEnum<typeof Type>;

export const Interval = {
  Month: "month",
  Year: "year",
} as const;
export type Interval = ClosedEnum<typeof Interval>;

export type Discount = {
  id: string;
  couponId: string | null;
  couponTestId: string | null;
  amount: number;
  type: Type;
  duration: number | null;
  interval: Interval | null;
};

export type Customer = {
  /**
   * The unique identifier of the customer in Dub.
   */
  id: string;
  /**
   * Unique identifier for the customer in the client's app.
   */
  externalId: string;
  /**
   * Name of the customer.
   */
  name: string;
  /**
   * Email of the customer.
   */
  email?: string | null | undefined;
  /**
   * Avatar URL of the customer.
   */
  avatar?: string | null | undefined;
  /**
   * Country of the customer.
   */
  country?: string | null | undefined;
  /**
   * The date the customer was created.
   */
  createdAt: string;
  link?: LeadEventCustomerLink | null | undefined;
  partner?: Partner | null | undefined;
  discount?: Discount | null | undefined;
};

export type LeadEvent = {
  event: LeadEventEvent;
  timestamp?: string | undefined;
  eventId: string;
  eventName: string;
  click: LeadEventClick;
  link: LeadEventLink;
  customer: Customer;
  /**
   * Deprecated. Use `click.id` instead.
   *
   * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
   */
  clickId: string;
  /**
   * Deprecated. Use `link.id` instead.
   *
   * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
   */
  linkId: string;
  /**
   * Deprecated. Use `link.domain` instead.
   *
   * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
   */
  domain: string;
  /**
   * Deprecated. Use `link.key` instead.
   *
   * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
   */
  key: string;
  /**
   * Deprecated. Use `click.url` instead.
   *
   * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
   */
  url: string;
  /**
   * Deprecated. Use `click.continent` instead.
   *
   * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
   */
  continent: string;
  /**
   * Deprecated. Use `click.country` instead.
   *
   * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
   */
  country: string;
  /**
   * Deprecated. Use `click.city` instead.
   *
   * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
   */
  city: string;
  /**
   * Deprecated. Use `click.device` instead.
   *
   * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
   */
  device: string;
  /**
   * Deprecated. Use `click.browser` instead.
   *
   * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
   */
  browser: string;
  /**
   * Deprecated. Use `click.os` instead.
   *
   * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
   */
  os: string;
  /**
   * Deprecated. Use `click.qr` instead.
   *
   * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
   */
  qr: number;
  /**
   * Deprecated. Use `click.ip` instead.
   *
   * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
   */
  ip: string;
};

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

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

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

/** @internal */
export const LeadEventClick$inboundSchema: z.ZodType<
  LeadEventClick,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: z.string(),
  url: z.string(),
  country: z.string(),
  city: z.string(),
  region: z.string(),
  continent: z.string(),
  device: z.string(),
  browser: z.string(),
  os: z.string(),
  referer: z.string(),
  refererUrl: z.string(),
  qr: z.boolean().optional(),
  ip: z.string(),
});

/** @internal */
export type LeadEventClick$Outbound = {
  id: string;
  url: string;
  country: string;
  city: string;
  region: string;
  continent: string;
  device: string;
  browser: string;
  os: string;
  referer: string;
  refererUrl: string;
  qr?: boolean | undefined;
  ip: string;
};

/** @internal */
export const LeadEventClick$outboundSchema: z.ZodType<
  LeadEventClick$Outbound,
  z.ZodTypeDef,
  LeadEventClick
> = z.object({
  id: z.string(),
  url: z.string(),
  country: z.string(),
  city: z.string(),
  region: z.string(),
  continent: z.string(),
  device: z.string(),
  browser: z.string(),
  os: z.string(),
  referer: z.string(),
  refererUrl: z.string(),
  qr: z.boolean().optional(),
  ip: 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 LeadEventClick$ {
  /** @deprecated use `LeadEventClick$inboundSchema` instead. */
  export const inboundSchema = LeadEventClick$inboundSchema;
  /** @deprecated use `LeadEventClick$outboundSchema` instead. */
  export const outboundSchema = LeadEventClick$outboundSchema;
  /** @deprecated use `LeadEventClick$Outbound` instead. */
  export type Outbound = LeadEventClick$Outbound;
}

export function leadEventClickToJSON(leadEventClick: LeadEventClick): string {
  return JSON.stringify(LeadEventClick$outboundSchema.parse(leadEventClick));
}

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

/** @internal */
export const LeadEventGeo$inboundSchema: z.ZodType<
  LeadEventGeo,
  z.ZodTypeDef,
  unknown
> = z.object({
  AF: z.string().optional(),
  AL: z.string().optional(),
  DZ: z.string().optional(),
  AS: z.string().optional(),
  AD: z.string().optional(),
  AO: z.string().optional(),
  AI: z.string().optional(),
  AQ: z.string().optional(),
  AG: z.string().optional(),
  AR: z.string().optional(),
  AM: z.string().optional(),
  AW: z.string().optional(),
  AU: z.string().optional(),
  AT: z.string().optional(),
  AZ: z.string().optional(),
  BS: z.string().optional(),
  BH: z.string().optional(),
  BD: z.string().optional(),
  BB: z.string().optional(),
  BY: z.string().optional(),
  BE: z.string().optional(),
  BZ: z.string().optional(),
  BJ: z.string().optional(),
  BM: z.string().optional(),
  BT: z.string().optional(),
  BO: z.string().optional(),
  BA: z.string().optional(),
  BW: z.string().optional(),
  BV: z.string().optional(),
  BR: z.string().optional(),
  IO: z.string().optional(),
  BN: z.string().optional(),
  BG: z.string().optional(),
  BF: z.string().optional(),
  BI: z.string().optional(),
  KH: z.string().optional(),
  CM: z.string().optional(),
  CA: z.string().optional(),
  CV: z.string().optional(),
  KY: z.string().optional(),
  CF: z.string().optional(),
  TD: z.string().optional(),
  CL: z.string().optional(),
  CN: z.string().optional(),
  CX: z.string().optional(),
  CC: z.string().optional(),
  CO: z.string().optional(),
  KM: z.string().optional(),
  CG: z.string().optional(),
  CD: z.string().optional(),
  CK: z.string().optional(),
  CR: z.string().optional(),
  CI: z.string().optional(),
  HR: z.string().optional(),
  CU: z.string().optional(),
  CY: z.string().optional(),
  CZ: z.string().optional(),
  DK: z.string().optional(),
  DJ: z.string().optional(),
  DM: z.string().optional(),
  DO: z.string().optional(),
  EC: z.string().optional(),
  EG: z.string().optional(),
  SV: z.string().optional(),
  GQ: z.string().optional(),
  ER: z.string().optional(),
  EE: z.string().optional(),
  ET: z.string().optional(),
  FK: z.string().optional(),
  FO: z.string().optional(),
  FJ: z.string().optional(),
  FI: z.string().optional(),
  FR: z.string().optional(),
  GF: z.string().optional(),
  PF: z.string().optional(),
  TF: z.string().optional(),
  GA: z.string().optional(),
  GM: z.string().optional(),
  GE: z.string().optional(),
  DE: z.string().optional(),
  GH: z.string().optional(),
  GI: z.string().optional(),
  GR: z.string().optional(),
  GL: z.string().optional(),
  GD: z.string().optional(),
  GP: z.string().optional(),
  GU: z.string().optional(),
  GT: z.string().optional(),
  GN: z.string().optional(),
  GW: z.string().optional(),
  GY: z.string().optional(),
  HT: z.string().optional(),
  HM: z.string().optional(),
  VA: z.string().optional(),
  HN: z.string().optional(),
  HK: z.string().optional(),
  HU: z.string().optional(),
  IS: z.string().optional(),
  IN: z.string().optional(),
  ID: z.string().optional(),
  IR: z.string().optional(),
  IQ: z.string().optional(),
  IE: z.string().optional(),
  IL: z.string().optional(),
  IT: z.string().optional(),
  JM: z.string().optional(),
  JP: z.string().optional(),
  JO: z.string().optional(),
  KZ: z.string().optional(),
  KE: z.string().optional(),
  KI: z.string().optional(),
  KP: z.string().optional(),
  KR: z.string().optional(),
  KW: z.string().optional(),
  KG: z.string().optional(),
  LA: z.string().optional(),
  LV: z.string().optional(),
  LB: z.string().optional(),
  LS: z.string().optional(),
  LR: z.string().optional(),
  LY: z.string().optional(),
  LI: z.string().optional(),
  LT: z.string().optional(),
  LU: z.string().optional(),
  MO: z.string().optional(),
  MG: z.string().optional(),
  MW: z.string().optional(),
  MY: z.string().optional(),
  MV: z.string().optional(),
  ML: z.string().optional(),
  MT: z.string().optional(),
  MH: z.string().optional(),
  MQ: z.string().optional(),
  MR: z.string().optional(),
  MU: z.string().optional(),
  YT: z.string().optional(),
  MX: z.string().optional(),
  FM: z.string().optional(),
  MD: z.string().optional(),
  MC: z.string().optional(),
  MN: z.string().optional(),
  MS: z.string().optional(),
  MA: z.string().optional(),
  MZ: z.string().optional(),
  MM: z.string().optional(),
  NA: z.string().optional(),
  NR: z.string().optional(),
  NP: z.string().optional(),
  NL: z.string().optional(),
  NC: z.string().optional(),
  NZ: z.string().optional(),
  NI: z.string().optional(),
  NE: z.string().optional(),
  NG: z.string().optional(),
  NU: z.string().optional(),
  NF: z.string().optional(),
  MK: z.string().optional(),
  MP: z.string().optional(),
  NO: z.string().optional(),
  OM: z.string().optional(),
  PK: z.string().optional(),
  PW: z.string().optional(),
  PS: z.string().optional(),
  PA: z.string().optional(),
  PG: z.string().optional(),
  PY: z.string().optional(),
  PE: z.string().optional(),
  PH: z.string().optional(),
  PN: z.string().optional(),
  PL: z.string().optional(),
  PT: z.string().optional(),
  PR: z.string().optional(),
  QA: z.string().optional(),
  RE: z.string().optional(),
  RO: z.string().optional(),
  RU: z.string().optional(),
  RW: z.string().optional(),
  SH: z.string().optional(),
  KN: z.string().optional(),
  LC: z.string().optional(),
  PM: z.string().optional(),
  VC: z.string().optional(),
  WS: z.string().optional(),
  SM: z.string().optional(),
  ST: z.string().optional(),
  SA: z.string().optional(),
  SN: z.string().optional(),
  SC: z.string().optional(),
  SL: z.string().optional(),
  SG: z.string().optional(),
  SK: z.string().optional(),
  SI: z.string().optional(),
  SB: z.string().optional(),
  SO: z.string().optional(),
  ZA: z.string().optional(),
  GS: z.string().optional(),
  ES: z.string().optional(),
  LK: z.string().optional(),
  SD: z.string().optional(),
  SR: z.string().optional(),
  SJ: z.string().optional(),
  SZ: z.string().optional(),
  SE: z.string().optional(),
  CH: z.string().optional(),
  SY: z.string().optional(),
  TW: z.string().optional(),
  TJ: z.string().optional(),
  TZ: z.string().optional(),
  TH: z.string().optional(),
  TL: z.string().optional(),
  TG: z.string().optional(),
  TK: z.string().optional(),
  TO: z.string().optional(),
  TT: z.string().optional(),
  TN: z.string().optional(),
  TR: z.string().optional(),
  TM: z.string().optional(),
  TC: z.string().optional(),
  TV: z.string().optional(),
  UG: z.string().optional(),
  UA: z.string().optional(),
  AE: z.string().optional(),
  GB: z.string().optional(),
  US: z.string().optional(),
  UM: z.string().optional(),
  UY: z.string().optional(),
  UZ: z.string().optional(),
  VU: z.string().optional(),
  VE: z.string().optional(),
  VN: z.string().optional(),
  VG: z.string().optional(),
  VI: z.string().optional(),
  WF: z.string().optional(),
  EH: z.string().optional(),
  YE: z.string().optional(),
  ZM: z.string().optional(),
  ZW: z.string().optional(),
  AX: z.string().optional(),
  BQ: z.string().optional(),
  CW: z.string().optional(),
  GG: z.string().optional(),
  IM: z.string().optional(),
  JE: z.string().optional(),
  ME: z.string().optional(),
  BL: z.string().optional(),
  MF: z.string().optional(),
  RS: z.string().optional(),
  SX: z.string().optional(),
  SS: z.string().optional(),
  XK: z.string().optional(),
}).transform((v) => {
  return remap$(v, {
    "AF": "af",
    "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",
    "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",
    "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",
    "IL": "il",
    "IT": "it",
    "JM": "jm",
    "JP": "jp",
    "JO": "jo",
    "KZ": "kz",
    "KE": "ke",
    "KI": "ki",
    "KP": "kp",
    "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",
    "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",
    "MS": "ms",
    "MA": "ma",
    "MZ": "mz",
    "MM": "mm",
    "NA": "na",
    "NR": "nr",
    "NP": "np",
    "NL": "nl",
    "NC": "nc",
    "NZ": "nz",
    "NI": "ni",
    "NE": "ne",
    "NG": "ng",
    "NU": "nu",
    "NF": "nf",
    "MK": "mk",
    "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",
    "SH": "sh",
    "KN": "kn",
    "LC": "lc",
    "PM": "pm",
    "VC": "vc",
    "WS": "ws",
    "SM": "sm",
    "ST": "st",
    "SA": "sa",
    "SN": "sn",
    "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",
    "AX": "ax",
    "BQ": "bq",
    "CW": "cw",
    "GG": "gg",
    "IM": "im",
    "JE": "je",
    "ME": "me",
    "BL": "bl",
    "MF": "mf",
    "RS": "rs",
    "SX": "sx",
    "SS": "ss",
    "XK": "xk",
  });
});

/** @internal */
export type LeadEventGeo$Outbound = {
  AF?: string | undefined;
  AL?: string | undefined;
  DZ?: string | undefined;
  AS?: string | undefined;
  AD?: string | undefined;
  AO?: string | undefined;
  AI?: string | undefined;
  AQ?: string | undefined;
  AG?: string | undefined;
  AR?: string | undefined;
  AM?: string | undefined;
  AW?: string | undefined;
  AU?: string | undefined;
  AT?: string | undefined;
  AZ?: string | undefined;
  BS?: string | undefined;
  BH?: string | undefined;
  BD?: string | undefined;
  BB?: string | undefined;
  BY?: string | undefined;
  BE?: string | undefined;
  BZ?: string | undefined;
  BJ?: string | undefined;
  BM?: string | undefined;
  BT?: string | undefined;
  BO?: string | undefined;
  BA?: string | undefined;
  BW?: string | undefined;
  BV?: string | undefined;
  BR?: string | undefined;
  IO?: string | undefined;
  BN?: string | undefined;
  BG?: string | undefined;
  BF?: string | undefined;
  BI?: string | undefined;
  KH?: string | undefined;
  CM?: string | undefined;
  CA?: string | undefined;
  CV?: string | undefined;
  KY?: string | undefined;
  CF?: string | undefined;
  TD?: string | undefined;
  CL?: string | undefined;
  CN?: string | undefined;
  CX?: string | undefined;
  CC?: string | undefined;
  CO?: string | undefined;
  KM?: string | undefined;
  CG?: string | undefined;
  CD?: string | undefined;
  CK?: string | undefined;
  CR?: string | undefined;
  CI?: string | undefined;
  HR?: string | undefined;
  CU?: string | undefined;
  CY?: string | undefined;
  CZ?: string | undefined;
  DK?: string | undefined;
  DJ?: string | undefined;
  DM?: string | undefined;
  DO?: string | undefined;
  EC?: string | undefined;
  EG?: string | undefined;
  SV?: string | undefined;
  GQ?: string | undefined;
  ER?: string | undefined;
  EE?: string | undefined;
  ET?: string | undefined;
  FK?: string | undefined;
  FO?: string | undefined;
  FJ?: string | undefined;
  FI?: string | undefined;
  FR?: string | undefined;
  GF?: string | undefined;
  PF?: string | undefined;
  TF?: string | undefined;
  GA?: string | undefined;
  GM?: string | undefined;
  GE?: string | undefined;
  DE?: string | undefined;
  GH?: string | undefined;
  GI?: string | undefined;
  GR?: string | undefined;
  GL?: string | undefined;
  GD?: string | undefined;
  GP?: string | undefined;
  GU?: string | undefined;
  GT?: string | undefined;
  GN?: string | undefined;
  GW?: string | undefined;
  GY?: string | undefined;
  HT?: string | undefined;
  HM?: string | undefined;
  VA?: string | undefined;
  HN?: string | undefined;
  HK?: string | undefined;
  HU?: string | undefined;
  IS?: string | undefined;
  IN?: string | undefined;
  ID?: string | undefined;
  IR?: string | undefined;
  IQ?: string | undefined;
  IE?: string | undefined;
  IL?: string | undefined;
  IT?: string | undefined;
  JM?: string | undefined;
  JP?: string | undefined;
  JO?: string | undefined;
  KZ?: string | undefined;
  KE?: string | undefined;
  KI?: string | undefined;
  KP?: string | undefined;
  KR?: string | undefined;
  KW?: string | undefined;
  KG?: string | undefined;
  LA?: string | undefined;
  LV?: string | undefined;
  LB?: string | undefined;
  LS?: string | undefined;
  LR?: string | undefined;
  LY?: string | undefined;
  LI?: string | undefined;
  LT?: string | undefined;
  LU?: string | undefined;
  MO?: string | undefined;
  MG?: string | undefined;
  MW?: string | undefined;
  MY?: string | undefined;
  MV?: string | undefined;
  ML?: string | undefined;
  MT?: string | undefined;
  MH?: string | undefined;
  MQ?: string | undefined;
  MR?: string | undefined;
  MU?: string | undefined;
  YT?: string | undefined;
  MX?: string | undefined;
  FM?: string | undefined;
  MD?: string | undefined;
  MC?: string | undefined;
  MN?: string | undefined;
  MS?: string | undefined;
  MA?: string | undefined;
  MZ?: string | undefined;
  MM?: string | undefined;
  NA?: string | undefined;
  NR?: string | undefined;
  NP?: string | undefined;
  NL?: string | undefined;
  NC?: string | undefined;
  NZ?: string | undefined;
  NI?: string | undefined;
  NE?: string | undefined;
  NG?: string | undefined;
  NU?: string | undefined;
  NF?: string | undefined;
  MK?: string | undefined;
  MP?: string | undefined;
  NO?: string | undefined;
  OM?: string | undefined;
  PK?: string | undefined;
  PW?: string | undefined;
  PS?: string | undefined;
  PA?: string | undefined;
  PG?: string | undefined;
  PY?: string | undefined;
  PE?: string | undefined;
  PH?: string | undefined;
  PN?: string | undefined;
  PL?: string | undefined;
  PT?: string | undefined;
  PR?: string | undefined;
  QA?: string | undefined;
  RE?: string | undefined;
  RO?: string | undefined;
  RU?: string | undefined;
  RW?: string | undefined;
  SH?: string | undefined;
  KN?: string | undefined;
  LC?: string | undefined;
  PM?: string | undefined;
  VC?: string | undefined;
  WS?: string | undefined;
  SM?: string | undefined;
  ST?: string | undefined;
  SA?: string | undefined;
  SN?: string | undefined;
  SC?: string | undefined;
  SL?: string | undefined;
  SG?: string | undefined;
  SK?: string | undefined;
  SI?: string | undefined;
  SB?: string | undefined;
  SO?: string | undefined;
  ZA?: string | undefined;
  GS?: string | undefined;
  ES?: string | undefined;
  LK?: string | undefined;
  SD?: string | undefined;
  SR?: string | undefined;
  SJ?: string | undefined;
  SZ?: string | undefined;
  SE?: string | undefined;
  CH?: string | undefined;
  SY?: string | undefined;
  TW?: string | undefined;
  TJ?: string | undefined;
  TZ?: string | undefined;
  TH?: string | undefined;
  TL?: string | undefined;
  TG?: string | undefined;
  TK?: string | undefined;
  TO?: string | undefined;
  TT?: string | undefined;
  TN?: string | undefined;
  TR?: string | undefined;
  TM?: string | undefined;
  TC?: string | undefined;
  TV?: string | undefined;
  UG?: string | undefined;
  UA?: string | undefined;
  AE?: string | undefined;
  GB?: string | undefined;
  US?: string | undefined;
  UM?: string | undefined;
  UY?: string | undefined;
  UZ?: string | undefined;
  VU?: string | undefined;
  VE?: string | undefined;
  VN?: string | undefined;
  VG?: string | undefined;
  VI?: string | undefined;
  WF?: string | undefined;
  EH?: string | undefined;
  YE?: string | undefined;
  ZM?: string | undefined;
  ZW?: string | undefined;
  AX?: string | undefined;
  BQ?: string | undefined;
  CW?: string | undefined;
  GG?: string | undefined;
  IM?: string | undefined;
  JE?: string | undefined;
  ME?: string | undefined;
  BL?: string | undefined;
  MF?: string | undefined;
  RS?: string | undefined;
  SX?: string | undefined;
  SS?: string | undefined;
  XK?: string | undefined;
};

/** @internal */
export const LeadEventGeo$outboundSchema: z.ZodType<
  LeadEventGeo$Outbound,
  z.ZodTypeDef,
  LeadEventGeo
> = z.object({
  af: z.string().optional(),
  al: z.string().optional(),
  dz: z.string().optional(),
  as: z.string().optional(),
  ad: z.string().optional(),
  ao: z.string().optional(),
  ai: z.string().optional(),
  aq: z.string().optional(),
  ag: z.string().optional(),
  ar: z.string().optional(),
  am: z.string().optional(),
  aw: z.string().optional(),
  au: z.string().optional(),
  at: z.string().optional(),
  az: z.string().optional(),
  bs: z.string().optional(),
  bh: z.string().optional(),
  bd: z.string().optional(),
  bb: z.string().optional(),
  by: z.string().optional(),
  be: z.string().optional(),
  bz: z.string().optional(),
  bj: z.string().optional(),
  bm: z.string().optional(),
  bt: z.string().optional(),
  bo: z.string().optional(),
  ba: z.string().optional(),
  bw: z.string().optional(),
  bv: z.string().optional(),
  br: z.string().optional(),
  io: z.string().optional(),
  bn: z.string().optional(),
  bg: z.string().optional(),
  bf: z.string().optional(),
  bi: z.string().optional(),
  kh: z.string().optional(),
  cm: z.string().optional(),
  ca: z.string().optional(),
  cv: z.string().optional(),
  ky: z.string().optional(),
  cf: z.string().optional(),
  td: z.string().optional(),
  cl: z.string().optional(),
  cn: z.string().optional(),
  cx: z.string().optional(),
  cc: z.string().optional(),
  co: z.string().optional(),
  km: z.string().optional(),
  cg: z.string().optional(),
  cd: z.string().optional(),
  ck: z.string().optional(),
  cr: z.string().optional(),
  ci: z.string().optional(),
  hr: z.string().optional(),
  cu: z.string().optional(),
  cy: z.string().optional(),
  cz: z.string().optional(),
  dk: z.string().optional(),
  dj: z.string().optional(),
  dm: z.string().optional(),
  do: z.string().optional(),
  ec: z.string().optional(),
  eg: z.string().optional(),
  sv: z.string().optional(),
  gq: z.string().optional(),
  er: z.string().optional(),
  ee: z.string().optional(),
  et: z.string().optional(),
  fk: z.string().optional(),
  fo: z.string().optional(),
  fj: z.string().optional(),
  fi: z.string().optional(),
  fr: z.string().optional(),
  gf: z.string().optional(),
  pf: z.string().optional(),
  tf: z.string().optional(),
  ga: z.string().optional(),
  gm: z.string().optional(),
  ge: z.string().optional(),
  de: z.string().optional(),
  gh: z.string().optional(),
  gi: z.string().optional(),
  gr: z.string().optional(),
  gl: z.string().optional(),
  gd: z.string().optional(),
  gp: z.string().optional(),
  gu: z.string().optional(),
  gt: z.string().optional(),
  gn: z.string().optional(),
  gw: z.string().optional(),
  gy: z.string().optional(),
  ht: z.string().optional(),
  hm: z.string().optional(),
  va: z.string().optional(),
  hn: z.string().optional(),
  hk: z.string().optional(),
  hu: z.string().optional(),
  is: z.string().optional(),
  in: z.string().optional(),
  id: z.string().optional(),
  ir: z.string().optional(),
  iq: z.string().optional(),
  ie: z.string().optional(),
  il: z.string().optional(),
  it: z.string().optional(),
  jm: z.string().optional(),
  jp: z.string().optional(),
  jo: z.string().optional(),
  kz: z.string().optional(),
  ke: z.string().optional(),
  ki: z.string().optional(),
  kp: z.string().optional(),
  kr: z.string().optional(),
  kw: z.string().optional(),
  kg: z.string().optional(),
  la: z.string().optional(),
  lv: z.string().optional(),
  lb: z.string().optional(),
  ls: z.string().optional(),
  lr: z.string().optional(),
  ly: z.string().optional(),
  li: z.string().optional(),
  lt: z.string().optional(),
  lu: z.string().optional(),
  mo: z.string().optional(),
  mg: z.string().optional(),
  mw: z.string().optional(),
  my: z.string().optional(),
  mv: z.string().optional(),
  ml: z.string().optional(),
  mt: z.string().optional(),
  mh: z.string().optional(),
  mq: z.string().optional(),
  mr: z.string().optional(),
  mu: z.string().optional(),
  yt: z.string().optional(),
  mx: z.string().optional(),
  fm: z.string().optional(),
  md: z.string().optional(),
  mc: z.string().optional(),
  mn: z.string().optional(),
  ms: z.string().optional(),
  ma: z.string().optional(),
  mz: z.string().optional(),
  mm: z.string().optional(),
  na: z.string().optional(),
  nr: z.string().optional(),
  np: z.string().optional(),
  nl: z.string().optional(),
  nc: z.string().optional(),
  nz: z.string().optional(),
  ni: z.string().optional(),
  ne: z.string().optional(),
  ng: z.string().optional(),
  nu: z.string().optional(),
  nf: z.string().optional(),
  mk: z.string().optional(),
  mp: z.string().optional(),
  no: z.string().optional(),
  om: z.string().optional(),
  pk: z.string().optional(),
  pw: z.string().optional(),
  ps: z.string().optional(),
  pa: z.string().optional(),
  pg: z.string().optional(),
  py: z.string().optional(),
  pe: z.string().optional(),
  ph: z.string().optional(),
  pn: z.string().optional(),
  pl: z.string().optional(),
  pt: z.string().optional(),
  pr: z.string().optional(),
  qa: z.string().optional(),
  re: z.string().optional(),
  ro: z.string().optional(),
  ru: z.string().optional(),
  rw: z.string().optional(),
  sh: z.string().optional(),
  kn: z.string().optional(),
  lc: z.string().optional(),
  pm: z.string().optional(),
  vc: z.string().optional(),
  ws: z.string().optional(),
  sm: z.string().optional(),
  st: z.string().optional(),
  sa: z.string().optional(),
  sn: z.string().optional(),
  sc: z.string().optional(),
  sl: z.string().optional(),
  sg: z.string().optional(),
  sk: z.string().optional(),
  si: z.string().optional(),
  sb: z.string().optional(),
  so: z.string().optional(),
  za: z.string().optional(),
  gs: z.string().optional(),
  es: z.string().optional(),
  lk: z.string().optional(),
  sd: z.string().optional(),
  sr: z.string().optional(),
  sj: z.string().optional(),
  sz: z.string().optional(),
  se: z.string().optional(),
  ch: z.string().optional(),
  sy: z.string().optional(),
  tw: z.string().optional(),
  tj: z.string().optional(),
  tz: z.string().optional(),
  th: z.string().optional(),
  tl: z.string().optional(),
  tg: z.string().optional(),
  tk: z.string().optional(),
  to: z.string().optional(),
  tt: z.string().optional(),
  tn: z.string().optional(),
  tr: z.string().optional(),
  tm: z.string().optional(),
  tc: z.string().optional(),
  tv: z.string().optional(),
  ug: z.string().optional(),
  ua: z.string().optional(),
  ae: z.string().optional(),
  gb: z.string().optional(),
  us: z.string().optional(),
  um: z.string().optional(),
  uy: z.string().optional(),
  uz: z.string().optional(),
  vu: z.string().optional(),
  ve: z.string().optional(),
  vn: z.string().optional(),
  vg: z.string().optional(),
  vi: z.string().optional(),
  wf: z.string().optional(),
  eh: z.string().optional(),
  ye: z.string().optional(),
  zm: z.string().optional(),
  zw: z.string().optional(),
  ax: z.string().optional(),
  bq: z.string().optional(),
  cw: z.string().optional(),
  gg: z.string().optional(),
  im: z.string().optional(),
  je: z.string().optional(),
  me: z.string().optional(),
  bl: z.string().optional(),
  mf: z.string().optional(),
  rs: z.string().optional(),
  sx: z.string().optional(),
  ss: z.string().optional(),
  xk: z.string().optional(),
}).transform((v) => {
  return remap$(v, {
    af: "AF",
    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",
    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",
    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",
    il: "IL",
    it: "IT",
    jm: "JM",
    jp: "JP",
    jo: "JO",
    kz: "KZ",
    ke: "KE",
    ki: "KI",
    kp: "KP",
    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",
    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",
    ms: "MS",
    ma: "MA",
    mz: "MZ",
    mm: "MM",
    na: "NA",
    nr: "NR",
    np: "NP",
    nl: "NL",
    nc: "NC",
    nz: "NZ",
    ni: "NI",
    ne: "NE",
    ng: "NG",
    nu: "NU",
    nf: "NF",
    mk: "MK",
    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",
    sh: "SH",
    kn: "KN",
    lc: "LC",
    pm: "PM",
    vc: "VC",
    ws: "WS",
    sm: "SM",
    st: "ST",
    sa: "SA",
    sn: "SN",
    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",
    ax: "AX",
    bq: "BQ",
    cw: "CW",
    gg: "GG",
    im: "IM",
    je: "JE",
    me: "ME",
    bl: "BL",
    mf: "MF",
    rs: "RS",
    sx: "SX",
    ss: "SS",
    xk: "XK",
  });
});

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

export function leadEventGeoToJSON(leadEventGeo: LeadEventGeo): string {
  return JSON.stringify(LeadEventGeo$outboundSchema.parse(leadEventGeo));
}

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

/** @internal */
export const LeadEventLink$inboundSchema: z.ZodType<
  LeadEventLink,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: z.string(),
  domain: z.string(),
  key: z.string(),
  url: z.string(),
  trackConversion: z.boolean().optional(),
  externalId: z.nullable(z.string()),
  tenantId: z.nullable(z.string()),
  archived: z.boolean().optional(),
  expiresAt: z.string(),
  expiredUrl: z.nullable(z.string()),
  password: z.nullable(z.string()),
  proxy: z.boolean().optional(),
  title: z.nullable(z.string()),
  description: z.nullable(z.string()),
  image: z.nullable(z.string()),
  video: z.nullable(z.string()),
  rewrite: z.boolean().optional(),
  doIndex: z.boolean().optional(),
  ios: z.nullable(z.string()),
  android: z.nullable(z.string()),
  geo: z.nullable(z.lazy(() => LeadEventGeo$inboundSchema)),
  publicStats: z.boolean().optional(),
  tagId: z.nullable(z.string()),
  tags: z.nullable(z.array(TagSchema$inboundSchema)),
  webhookIds: z.array(z.string()),
  comments: z.nullable(z.string()),
  shortLink: z.string(),
  qrCode: z.string(),
  utm_source: z.nullable(z.string()),
  utm_medium: z.nullable(z.string()),
  utm_campaign: z.nullable(z.string()),
  utm_term: z.nullable(z.string()),
  utm_content: z.nullable(z.string()),
  userId: z.nullable(z.string()),
  workspaceId: z.string(),
  clicks: z.number().default(0),
  lastClicked: z.string(),
  leads: z.number().default(0),
  sales: z.number().default(0),
  saleAmount: z.number().default(0),
  createdAt: z.string(),
  updatedAt: z.string(),
  projectId: z.string(),
  programId: z.nullable(z.string()),
}).transform((v) => {
  return remap$(v, {
    "utm_source": "utmSource",
    "utm_medium": "utmMedium",
    "utm_campaign": "utmCampaign",
    "utm_term": "utmTerm",
    "utm_content": "utmContent",
  });
});

/** @internal */
export type LeadEventLink$Outbound = {
  id: string;
  domain: string;
  key: string;
  url: string;
  trackConversion?: boolean | undefined;
  externalId: string | null;
  tenantId: string | null;
  archived?: boolean | undefined;
  expiresAt: string;
  expiredUrl: string | null;
  password: string | null;
  proxy?: boolean | undefined;
  title: string | null;
  description: string | null;
  image: string | null;
  video: string | null;
  rewrite?: boolean | undefined;
  doIndex?: boolean | undefined;
  ios: string | null;
  android: string | null;
  geo: LeadEventGeo$Outbound | null;
  publicStats?: boolean | undefined;
  tagId: string | null;
  tags: Array<TagSchema$Outbound> | null;
  webhookIds: Array<string>;
  comments: string | null;
  shortLink: string;
  qrCode: string;
  utm_source: string | null;
  utm_medium: string | null;
  utm_campaign: string | null;
  utm_term: string | null;
  utm_content: string | null;
  userId: string | null;
  workspaceId: string;
  clicks: number;
  lastClicked: string;
  leads: number;
  sales: number;
  saleAmount: number;
  createdAt: string;
  updatedAt: string;
  projectId: string;
  programId: string | null;
};

/** @internal */
export const LeadEventLink$outboundSchema: z.ZodType<
  LeadEventLink$Outbound,
  z.ZodTypeDef,
  LeadEventLink
> = z.object({
  id: z.string(),
  domain: z.string(),
  key: z.string(),
  url: z.string(),
  trackConversion: z.boolean().optional(),
  externalId: z.nullable(z.string()),
  tenantId: z.nullable(z.string()),
  archived: z.boolean().optional(),
  expiresAt: z.string(),
  expiredUrl: z.nullable(z.string()),
  password: z.nullable(z.string()),
  proxy: z.boolean().optional(),
  title: z.nullable(z.string()),
  description: z.nullable(z.string()),
  image: z.nullable(z.string()),
  video: z.nullable(z.string()),
  rewrite: z.boolean().optional(),
  doIndex: z.boolean().optional(),
  ios: z.nullable(z.string()),
  android: z.nullable(z.string()),
  geo: z.nullable(z.lazy(() => LeadEventGeo$outboundSchema)),
  publicStats: z.boolean().optional(),
  tagId: z.nullable(z.string()),
  tags: z.nullable(z.array(TagSchema$outboundSchema)),
  webhookIds: z.array(z.string()),
  comments: z.nullable(z.string()),
  shortLink: z.string(),
  qrCode: z.string(),
  utmSource: z.nullable(z.string()),
  utmMedium: z.nullable(z.string()),
  utmCampaign: z.nullable(z.string()),
  utmTerm: z.nullable(z.string()),
  utmContent: z.nullable(z.string()),
  userId: z.nullable(z.string()),
  workspaceId: z.string(),
  clicks: z.number().default(0),
  lastClicked: z.string(),
  leads: z.number().default(0),
  sales: z.number().default(0),
  saleAmount: z.number().default(0),
  createdAt: z.string(),
  updatedAt: z.string(),
  projectId: z.string(),
  programId: z.nullable(z.string()),
}).transform((v) => {
  return remap$(v, {
    utmSource: "utm_source",
    utmMedium: "utm_medium",
    utmCampaign: "utm_campaign",
    utmTerm: "utm_term",
    utmContent: "utm_content",
  });
});

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

export function leadEventLinkToJSON(leadEventLink: LeadEventLink): string {
  return JSON.stringify(LeadEventLink$outboundSchema.parse(leadEventLink));
}

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

/** @internal */
export const LeadEventCustomerLink$inboundSchema: z.ZodType<
  LeadEventCustomerLink,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: z.string(),
  domain: z.string(),
  key: z.string(),
  shortLink: z.string(),
  programId: z.nullable(z.string()),
});

/** @internal */
export type LeadEventCustomerLink$Outbound = {
  id: string;
  domain: string;
  key: string;
  shortLink: string;
  programId: string | null;
};

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

export function leadEventCustomerLinkToJSON(
  leadEventCustomerLink: LeadEventCustomerLink,
): string {
  return JSON.stringify(
    LeadEventCustomerLink$outboundSchema.parse(leadEventCustomerLink),
  );
}

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

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

/** @internal */
export type Partner$Outbound = {
  id: string;
  name: string;
  email: string;
  image?: string | null | undefined;
};

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

export function partnerToJSON(partner: Partner): string {
  return JSON.stringify(Partner$outboundSchema.parse(partner));
}

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

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

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

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

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

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

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

/** @internal */
export const Discount$inboundSchema: z.ZodType<
  Discount,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: z.string(),
  couponId: z.nullable(z.string()),
  couponTestId: z.nullable(z.string()),
  amount: z.number(),
  type: Type$inboundSchema,
  duration: z.nullable(z.number()),
  interval: z.nullable(Interval$inboundSchema),
});

/** @internal */
export type Discount$Outbound = {
  id: string;
  couponId: string | null;
  couponTestId: string | null;
  amount: number;
  type: string;
  duration: number | null;
  interval: string | null;
};

/** @internal */
export const Discount$outboundSchema: z.ZodType<
  Discount$Outbound,
  z.ZodTypeDef,
  Discount
> = z.object({
  id: z.string(),
  couponId: z.nullable(z.string()),
  couponTestId: z.nullable(z.string()),
  amount: z.number(),
  type: Type$outboundSchema,
  duration: z.nullable(z.number()),
  interval: z.nullable(Interval$outboundSchema),
});

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

export function discountToJSON(discount: Discount): string {
  return JSON.stringify(Discount$outboundSchema.parse(discount));
}

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

/** @internal */
export const Customer$inboundSchema: z.ZodType<
  Customer,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: z.string(),
  externalId: z.string(),
  name: z.string(),
  email: z.nullable(z.string()).optional(),
  avatar: z.nullable(z.string()).optional(),
  country: z.nullable(z.string()).optional(),
  createdAt: z.string(),
  link: z.nullable(z.lazy(() => LeadEventCustomerLink$inboundSchema))
    .optional(),
  partner: z.nullable(z.lazy(() => Partner$inboundSchema)).optional(),
  discount: z.nullable(z.lazy(() => Discount$inboundSchema)).optional(),
});

/** @internal */
export type Customer$Outbound = {
  id: string;
  externalId: string;
  name: string;
  email?: string | null | undefined;
  avatar?: string | null | undefined;
  country?: string | null | undefined;
  createdAt: string;
  link?: LeadEventCustomerLink$Outbound | null | undefined;
  partner?: Partner$Outbound | null | undefined;
  discount?: Discount$Outbound | null | undefined;
};

/** @internal */
export const Customer$outboundSchema: z.ZodType<
  Customer$Outbound,
  z.ZodTypeDef,
  Customer
> = z.object({
  id: z.string(),
  externalId: z.string(),
  name: z.string(),
  email: z.nullable(z.string()).optional(),
  avatar: z.nullable(z.string()).optional(),
  country: z.nullable(z.string()).optional(),
  createdAt: z.string(),
  link: z.nullable(z.lazy(() => LeadEventCustomerLink$outboundSchema))
    .optional(),
  partner: z.nullable(z.lazy(() => Partner$outboundSchema)).optional(),
  discount: z.nullable(z.lazy(() => Discount$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 Customer$ {
  /** @deprecated use `Customer$inboundSchema` instead. */
  export const inboundSchema = Customer$inboundSchema;
  /** @deprecated use `Customer$outboundSchema` instead. */
  export const outboundSchema = Customer$outboundSchema;
  /** @deprecated use `Customer$Outbound` instead. */
  export type Outbound = Customer$Outbound;
}

export function customerToJSON(customer: Customer): string {
  return JSON.stringify(Customer$outboundSchema.parse(customer));
}

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

/** @internal */
export const LeadEvent$inboundSchema: z.ZodType<
  LeadEvent,
  z.ZodTypeDef,
  unknown
> = z.object({
  event: LeadEventEvent$inboundSchema,
  timestamp: z.string().optional(),
  eventId: z.string(),
  eventName: z.string(),
  click: z.lazy(() => LeadEventClick$inboundSchema),
  link: z.lazy(() => LeadEventLink$inboundSchema),
  customer: z.lazy(() => Customer$inboundSchema),
  click_id: z.string(),
  link_id: z.string(),
  domain: z.string(),
  key: z.string(),
  url: z.string(),
  continent: z.string(),
  country: z.string(),
  city: z.string(),
  device: z.string(),
  browser: z.string(),
  os: z.string(),
  qr: z.number(),
  ip: z.string(),
}).transform((v) => {
  return remap$(v, {
    "click_id": "clickId",
    "link_id": "linkId",
  });
});

/** @internal */
export type LeadEvent$Outbound = {
  event: string;
  timestamp?: string | undefined;
  eventId: string;
  eventName: string;
  click: LeadEventClick$Outbound;
  link: LeadEventLink$Outbound;
  customer: Customer$Outbound;
  click_id: string;
  link_id: string;
  domain: string;
  key: string;
  url: string;
  continent: string;
  country: string;
  city: string;
  device: string;
  browser: string;
  os: string;
  qr: number;
  ip: string;
};

/** @internal */
export const LeadEvent$outboundSchema: z.ZodType<
  LeadEvent$Outbound,
  z.ZodTypeDef,
  LeadEvent
> = z.object({
  event: LeadEventEvent$outboundSchema,
  timestamp: z.string().optional(),
  eventId: z.string(),
  eventName: z.string(),
  click: z.lazy(() => LeadEventClick$outboundSchema),
  link: z.lazy(() => LeadEventLink$outboundSchema),
  customer: z.lazy(() => Customer$outboundSchema),
  clickId: z.string(),
  linkId: z.string(),
  domain: z.string(),
  key: z.string(),
  url: z.string(),
  continent: z.string(),
  country: z.string(),
  city: z.string(),
  device: z.string(),
  browser: z.string(),
  os: z.string(),
  qr: z.number(),
  ip: z.string(),
}).transform((v) => {
  return remap$(v, {
    clickId: "click_id",
    linkId: "link_id",
  });
});

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

export function leadEventToJSON(leadEvent: LeadEvent): string {
  return JSON.stringify(LeadEvent$outboundSchema.parse(leadEvent));
}

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