/** * @example * { * account_id: "biz_xxxxxxxxxxxxxx", * event_name: "coating_deposit_paid" * } */ export interface CreateEventsRequest { /** The account to associate with this event. */ account_id: string; /** Where the event originated. */ action_source?: CreateEventsRequest.ActionSource | null; /** The build of the hosted app that served the page where the event occurred. */ app_build_id?: string | null; /** The hosted app that served the page where the event occurred. */ app_id?: string | null; /** Tracking and attribution context. */ context?: CreateEventsRequest.Context | null; /** ISO 4217 currency code. */ currency?: CreateEventsRequest.Currency | null; /** Custom event name when event_name is 'custom'. Maximum 35 chars for this value. */ custom_name?: string | null; /** For 'leave' events: milliseconds the visitor spent on the page. */ duration?: number | null; /** Client-provided identifier for deduplication. Generated if omitted. */ event_id?: string | null; /** * The type of event. * * Use a standard event (lead, submit_application, contact, complete_registration, schedule, view_content, add_to_cart) or pass your own name directly for a custom event. */ event_name: string; /** When the event occurred. Defaults to now. */ event_time?: string | null; /** The variant associated with the event. */ plan_id?: string | null; /** The product associated with the event. */ product_id?: string | null; /** The referring URL. */ referrer_url?: string | null; /** For 'page' events: true when the page was restored from the back/forward cache. */ resumed?: boolean | null; /** For 'identify' events: where the identity was captured (url, form, manual, iframe). */ source?: string | null; /** For 'page' events: the document title. */ title?: string | null; /** The URL where the event occurred. */ url?: string | null; /** User identity and profile data. */ user?: CreateEventsRequest.User | null; /** Monetary value associated with the event. */ value?: number | null; } export declare namespace CreateEventsRequest { /** The channel where an event originated */ const ActionSource: { readonly Email: "email"; readonly Website: "website"; readonly App: "app"; readonly PhoneCall: "phone_call"; readonly Chat: "chat"; readonly PhysicalStore: "physical_store"; readonly SystemGenerated: "system_generated"; readonly BusinessMessaging: "business_messaging"; readonly Other: "other"; }; type ActionSource = (typeof ActionSource)[keyof typeof ActionSource]; /** * Tracking and attribution context. */ interface Context { /** Ad campaign ID. */ ad_campaign_id?: (string | null) | undefined; /** Ad ID. */ ad_id?: (string | null) | undefined; /** Ad set ID. */ ad_set_id?: (string | null) | undefined; /** Facebook click cookie (_fbc, format fb.1.{timestamp}.{fbclid}). */ fbc?: (string | null) | undefined; /** Facebook click ID. */ fbclid?: (string | null) | undefined; /** Facebook browser pixel ID. */ fbp?: (string | null) | undefined; /** Client-side device fingerprint. */ fingerprint?: (string | null) | undefined; /** Confidence score (0-1) for the device fingerprint. */ fingerprint_confidence?: (number | null) | undefined; /** Google Analytics client ID. */ ga?: (string | null) | undefined; /** Google Ads gbraid click ID (iOS privacy). */ gbraid?: (string | null) | undefined; /** Google click ID. */ gclid?: (string | null) | undefined; /** Instagram session ID. */ ig_sid?: (string | null) | undefined; /** IP address. */ ip_address?: (string | null) | undefined; /** Browser language (e.g. en-US). */ language?: (string | null) | undefined; /** LinkedIn click ID. */ li_fat_id?: (string | null) | undefined; /** Microsoft Advertising (Bing) click ID. */ msclkid?: (string | null) | undefined; /** Reddit click ID. */ rdt_cid?: (string | null) | undefined; /** Whop SC identifier. */ sc?: (string | null) | undefined; /** Snapchat click ID. */ sccid?: (string | null) | undefined; /** Screen resolution (e.g. 1920x1080). */ screen_resolution?: (string | null) | undefined; /** IANA timezone (e.g. America/New_York). */ timezone?: (string | null) | undefined; /** TikTok click ID. */ ttclid?: (string | null) | undefined; /** TikTok pixel ID. */ ttp?: (string | null) | undefined; /** X (Twitter) click ID. */ twclid?: (string | null) | undefined; /** Browser user agent string. */ user_agent?: (string | null) | undefined; /** UTM campaign parameter. */ utm_campaign?: (string | null) | undefined; /** UTM content parameter. */ utm_content?: (string | null) | undefined; /** UTM ID parameter. */ utm_id?: (string | null) | undefined; /** UTM medium parameter. */ utm_medium?: (string | null) | undefined; /** UTM source parameter. */ utm_source?: (string | null) | undefined; /** UTM term parameter. */ utm_term?: (string | null) | undefined; /** Google Ads wbraid click ID (iOS privacy). */ wbraid?: (string | null) | undefined; } /** The available currencies on the platform */ const Currency: { readonly Usd: "usd"; readonly Sgd: "sgd"; readonly Inr: "inr"; readonly Aud: "aud"; readonly Brl: "brl"; readonly Cad: "cad"; readonly Dkk: "dkk"; readonly Eur: "eur"; readonly Nok: "nok"; readonly Gbp: "gbp"; readonly Sek: "sek"; readonly Chf: "chf"; readonly Hkd: "hkd"; readonly Huf: "huf"; readonly Jpy: "jpy"; readonly Mxn: "mxn"; readonly Myr: "myr"; readonly Pln: "pln"; readonly Czk: "czk"; readonly Nzd: "nzd"; readonly Aed: "aed"; readonly Eth: "eth"; readonly Ape: "ape"; readonly Cop: "cop"; readonly Ron: "ron"; readonly Thb: "thb"; readonly Bgn: "bgn"; readonly Idr: "idr"; readonly Dop: "dop"; readonly Php: "php"; readonly Try: "try"; readonly Krw: "krw"; readonly Twd: "twd"; readonly Vnd: "vnd"; readonly Pkr: "pkr"; readonly Clp: "clp"; readonly Uyu: "uyu"; readonly Ars: "ars"; readonly Zar: "zar"; readonly Dzd: "dzd"; readonly Tnd: "tnd"; readonly Mad: "mad"; readonly Kes: "kes"; readonly Kwd: "kwd"; readonly Jod: "jod"; readonly All: "all"; readonly Xcd: "xcd"; readonly Amd: "amd"; readonly Bsd: "bsd"; readonly Bhd: "bhd"; readonly Bob: "bob"; readonly Bam: "bam"; readonly Khr: "khr"; readonly Crc: "crc"; readonly Xof: "xof"; readonly Egp: "egp"; readonly Etb: "etb"; readonly Gmd: "gmd"; readonly Ghs: "ghs"; readonly Gtq: "gtq"; readonly Gyd: "gyd"; readonly Ils: "ils"; readonly Jmd: "jmd"; readonly Mop: "mop"; readonly Mga: "mga"; readonly Mur: "mur"; readonly Mdl: "mdl"; readonly Mnt: "mnt"; readonly Nad: "nad"; readonly Ngn: "ngn"; readonly Mkd: "mkd"; readonly Omr: "omr"; readonly Pyg: "pyg"; readonly Pen: "pen"; readonly Qar: "qar"; readonly Rwf: "rwf"; readonly Sar: "sar"; readonly Rsd: "rsd"; readonly Lkr: "lkr"; readonly Tzs: "tzs"; readonly Ttd: "ttd"; readonly Uzs: "uzs"; readonly Rub: "rub"; readonly Btc: "btc"; readonly Cny: "cny"; readonly Usdt: "usdt"; readonly Kzt: "kzt"; readonly Awg: "awg"; readonly WhopUsd: "whop_usd"; readonly Xau: "xau"; }; type Currency = (typeof Currency)[keyof typeof Currency]; /** * User identity and profile data. */ interface User { /** An anonymous identifier for the user. */ anonymous_id?: (string | null) | undefined; /** Date of birth (YYYY-MM-DD). */ birthdate?: (string | null) | undefined; /** City. */ city?: (string | null) | undefined; /** Country. */ country?: (string | null) | undefined; /** Email address. */ email?: (string | null) | undefined; /** An external identifier for the user. */ external_id?: (string | null) | undefined; /** First name. */ first_name?: (string | null) | undefined; /** Gender. */ gender?: (User.Gender | null) | undefined; /** Last name. */ last_name?: (string | null) | undefined; /** A second anonymous identifier to link to this user (e.g. captured across an iframe boundary). */ linked_anonymous_id?: (string | null) | undefined; /** A wuid from a linked frame, captured across an iframe boundary. */ linked_wuid?: (string | null) | undefined; /** The Whop member ID. */ member_id?: (string | null) | undefined; /** The Whop membership ID. */ membership_id?: (string | null) | undefined; /** Full display name. */ name?: (string | null) | undefined; /** Phone number. */ phone?: (string | null) | undefined; /** Postal code. */ postal_code?: (string | null) | undefined; /** State or region. */ state?: (string | null) | undefined; /** The Whop user ID. */ user_id?: (string | null) | undefined; /** Username. */ username?: (string | null) | undefined; } namespace User { /** Gender */ const Gender: { readonly Male: "male"; readonly Female: "female"; }; type Gender = (typeof Gender)[keyof typeof Gender]; } }