import type * as Whop from "../index.mjs"; export interface Ad { /** The ad campaign this ad belongs to. */ ad_campaign: Whop.AdEntityReference; /** The ad group this ad belongs to. */ ad_group: Whop.AdEntityReference; /** USD value attributed to add-to-cart events. Sums the value sent with each event, normalized to USD; events without a value contribute 0. */ added_to_cart_value: number; /** Whop pixel-attributed add-to-cart events, last-click. */ added_to_carts: number; /** The call-to-action button shown on the ad. */ call_to_action: Ad.CallToAction | null; /** Clicks divided by impressions, between 0 and 1. */ click_through_rate: number; /** The number of clicks. */ clicks: number; /** USD value attributed to complete-registration events. Sums the value sent with each event, normalized to USD; events without a value contribute 0. */ completed_registration_value: number; /** Whop pixel-attributed complete-registration events, last-click. */ completed_registrations: number; /** USD value attributed to contact events. Sums the value sent with each event, normalized to USD; events without a value contribute 0. */ contact_value: number; /** Whop pixel-attributed contact events, last-click. */ contacts: number; /** Spend divided by attributed add-to-cart events; null when they are not the goal and none are attributed. */ cost_per_added_to_cart: number | null; /** Spend divided by clicks; 0 when there are no clicks. */ cost_per_click: number; /** Spend divided by attributed complete-registration events; null when they are not the goal and none are attributed. */ cost_per_completed_registration: number | null; /** Spend divided by attributed contact events; null when contacts are not the goal and none are attributed. */ cost_per_contact: number | null; /** Spend divided by attributed leads; null when leads are not a goal and none are attributed. */ cost_per_lead: number | null; /** Spend per 1,000 impressions; 0 when there are no impressions. */ cost_per_mille: number; /** Spend divided by attributed purchases; null when purchases are not a goal and none are attributed. */ cost_per_purchase: number | null; /** Spend divided by Whop pixel-attributed results; null when nothing Whop-attributable is being optimized for. */ cost_per_result: number | null; /** Spend divided by attributed schedule events; null when schedules are not the goal and none are attributed. */ cost_per_schedule: number | null; /** Spend divided by attributed submit-application events; null when they are not the goal and none are attributed. */ cost_per_submitted_application: number | null; /** Spend divided by unique clicks; null when there are no unique clicks. */ cost_per_unique_click: number | null; /** Spend divided by attributed view-content events; null when they are not the goal and none are attributed. */ cost_per_viewed_content: number | null; /** When the ad was created, as an ISO 8601 timestamp. */ created_at: string; creatives: Whop.AdCreative[]; /** Whop pixel-attributed custom (merchant-defined) conversion events, last-click, across all custom event names. */ custom_conversions: number; /** Whop pixel-attributed custom conversions, keyed by your event name with its last-click count as the value. Empty when no named custom events are attributed. Custom events fired without a name are counted in custom_conversions but omitted here, so these values sum to at most custom_conversions. */ custom_event_counts: Record; /** Conversion value attributed to each custom event, keyed by event name like custom_event_counts. Sums the value passed to whop.track, normalized to USD; events fired without a value contribute 0. */ custom_event_values: Record; /** Whether the ad is delivering right now, and if not, why. When several states apply at once, the highest-precedence one is returned. */ delivery_status: Ad.DeliveryStatus; descriptions: Whop.AdText[]; /** The post you pointed this ad at, when it promotes one you already published — a Facebook post, Instagram media, or TikTok video ID. `null` when the ad uses uploaded creatives. */ existing_post_id: string | null; external_accounts: Whop.AdEntityReference[]; /** Platform-reported impressions divided by reach. */ frequency: number | null; headlines: Whop.AdText[]; /** Unique identifier for the ad, prefixed `ad_`. */ id: string; /** The number of impressions. */ impressions: number; issues: Whop.AdPlatformIssue[]; /** The instant lead form shown when someone taps this ad. `null` when the ad group's conversion_location is not an instant-form destination. */ lead_form?: (Whop.AdLeadForm | null) | undefined; /** The ad platform's ID for the instant form the ad uses. Set when the ad references an existing form via `lead_form_id`, or once a form built from `lead_form` has been created on the platform. */ lead_form_id?: (string | null) | undefined; /** USD value attributed to lead events. Sums the value sent with each event, normalized to USD; events without a value contribute 0. */ lead_value: number; /** Whop pixel-attributed leads, last-click. */ leads: number; /** Page views on your destination from people who clicked the ad, recorded by the Whop pixel. Counted the same way on every ad platform. */ link_clicks: number; /** Welcome message for click-to-message ads, shown when the conversation opens. `null` when the ad has none. */ messaging_config?: (Whop.AdMessagingConfig | null) | undefined; /** Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true. */ multi_advertiser_ads?: boolean | undefined; /** The advertiser-uploaded MP3 a TikTok carousel ad plays. TikTok-only; `null` elsewhere and for non-carousel ads. */ music?: (Whop.AdMusic | null) | undefined; /** The ad platform this ad runs on. */ platform: Ad.Platform; /** The post the ad network serves for this ad, as `pageID_postID` on Meta — the post Meta created for an uploaded creative, or the post being promoted. Use it to open the live post, or to promote the same post from another ad. `null` until the network has created the post. */ post_id: string | null; /** Identifies the network that owns `existing_post_id`; `null` when the ad uses uploaded creatives. */ post_source: Ad.PostSource | null; /** Preview image of the post named by `existing_post_id`. `null` for ads that use uploaded creatives, or until the post's media has been fetched from the network. */ post_thumbnail_url: string | null; primary_texts: Whop.AdText[]; /** USD value of pixel-attributed purchases. */ purchase_value: number; /** Whop pixel-attributed purchases, last-click. */ purchases: number; /** The number of unique people who saw this. */ reach: number; /** The Whop pixel conversion event whose attributed count represents results — the optimization goal, or the highest-volume attributed event for campaigns that budget per ad group. Null when the goal isn't a Whop-attributed event. */ result_event: Ad.ResultEvent | null; /** The merchant-defined event name when result_event is custom; null for the standard events. */ result_event_name: string | null; /** The Whop pixel-attributed count behind result_event. When a campaign's ad groups optimize different goals there is no single result_event (it is null), and this is instead the sum of each ad group's own attributed results. Null when nothing Whop-attributable is being optimized for. */ results: number | null; /** Purchase value divided by spend, both in USD (a currency-neutral ratio); 0 when there is no spend. */ return_on_ad_spend: number; /** USD value attributed to schedule events. Sums the value sent with each event, normalized to USD; events without a value contribute 0. */ schedule_value: number; /** Whop pixel-attributed schedule events, last-click. */ schedules: number; /** The amount charged, in spend_currency. */ spend: number; /** The ISO 4217 currency code of all monetary metrics. */ spend_currency: string | null; /** Whether the ad is enabled. `active` and `paused` are set by you; `in_review` and `rejected` come from ad review. */ status: Ad.Status; /** USD value attributed to submit-application events. Sums the value sent with each event, normalized to USD; events without a value contribute 0. */ submitted_application_value: number; /** Whop pixel-attributed submit-application events, last-click. */ submitted_applications: number; /** Display title of the ad. */ title: string | null; /** The languages a Meta ad runs in besides its own. Each viewer sees the version for their language, or the ad's own copy. `null` when the ad runs in one language. */ translations?: (Whop.AdTranslations | null) | undefined; /** Unique clicks divided by impressions, between 0 and 1. */ unique_click_through_rate: number | null; /** People who clicked, reported by the Whop pixel, counted once per person. */ unique_clicks: number; /** When the ad was last updated, as an ISO 8601 timestamp. */ updated_at: string; /** The URL the ad links to, without its query string. Parameters belong in `url_parameters`; any you send on `url` are moved there. */ url: string | null; /** Every query parameter appended to the URL, keyed by parameter name — including any you sent on `url` itself. Whop adds its own click-attribution parameters on top; those are reserved and rejected if you set them. Which keys are reserved depends on the ad's network — Meta: utm_meta_ad_id, utm_meta_adset_id, utm_meta_campaign_id, utm_source, utm_placement, utm_medium, utm_content, utm_adset, utm_whop, wacid, wasid, waid, tw_source, tw_adid; TikTok: waid, wasid, wacid, ad_id, adset_id, campaign_id, utm_source, utm_medium, utm_placement, utm_whop, tw_source, tw_adid. */ url_parameters: Record; /** USD value attributed to view-content events. Sums the value sent with each event, normalized to USD; events without a value contribute 0. */ viewed_content_value: number; /** Whop pixel-attributed view-content events, last-click. */ viewed_contents: number; } export declare namespace Ad { /** The call-to-action button shown on the ad. */ const CallToAction: { readonly LearnMore: "learn_more"; readonly ShopNow: "shop_now"; readonly SignUp: "sign_up"; readonly Subscribe: "subscribe"; readonly GetStarted: "get_started"; readonly BookNow: "book_now"; readonly ApplyNow: "apply_now"; readonly ContactUs: "contact_us"; readonly Download: "download"; readonly OrderNow: "order_now"; readonly BuyNow: "buy_now"; readonly GetQuote: "get_quote"; readonly MessagePage: "message_page"; readonly WhatsappMessage: "whatsapp_message"; readonly InstagramMessage: "instagram_message"; readonly CallNow: "call_now"; readonly GetDirections: "get_directions"; readonly SendUpdates: "send_updates"; readonly GetOffer: "get_offer"; readonly WatchMore: "watch_more"; readonly ListenNow: "listen_now"; readonly PlayGame: "play_game"; readonly OpenLink: "open_link"; readonly NoButton: "no_button"; readonly GetOfferView: "get_offer_view"; readonly GetEventTickets: "get_event_tickets"; readonly SeeMenu: "see_menu"; readonly RequestTime: "request_time"; readonly EventRsvp: "event_rsvp"; readonly SeeDetails: "see_details"; readonly ViewInstagramProfile: "view_instagram_profile"; readonly DonateNow: "donate_now"; readonly SeeMore: "see_more"; readonly VisitSite: "visit_site"; }; type CallToAction = (typeof CallToAction)[keyof typeof CallToAction]; /** Whether the ad is delivering right now, and if not, why. When several states apply at once, the highest-precedence one is returned. */ const DeliveryStatus: { readonly InAppeal: "in_appeal"; readonly Rejected: "rejected"; readonly InReview: "in_review"; readonly Draft: "draft"; readonly CampaignPaused: "campaign_paused"; readonly AdGroupPaused: "ad_group_paused"; readonly Paused: "paused"; readonly Processing: "processing"; readonly Issues: "issues"; readonly Scheduled: "scheduled"; readonly LearningLimited: "learning_limited"; readonly Learning: "learning"; readonly Active: "active"; }; type DeliveryStatus = (typeof DeliveryStatus)[keyof typeof DeliveryStatus]; /** The ad platform this ad runs on. */ const Platform: { readonly Meta: "meta"; readonly Tiktok: "tiktok"; readonly Google: "google"; }; type Platform = (typeof Platform)[keyof typeof Platform]; /** Identifies the network that owns `existing_post_id`; `null` when the ad uses uploaded creatives. */ const PostSource: { readonly Facebook: "facebook"; readonly Instagram: "instagram"; }; type PostSource = (typeof PostSource)[keyof typeof PostSource]; /** The Whop pixel conversion event whose attributed count represents results — the optimization goal, or the highest-volume attributed event for campaigns that budget per ad group. Null when the goal isn't a Whop-attributed event. */ const ResultEvent: { readonly Purchase: "purchase"; readonly Lead: "lead"; readonly Schedule: "schedule"; readonly SubmitApplication: "submit_application"; readonly Contact: "contact"; readonly CompleteRegistration: "complete_registration"; readonly ViewContent: "view_content"; readonly AddToCart: "add_to_cart"; readonly Custom: "custom"; readonly MessagingConversation: "messaging_conversation"; }; type ResultEvent = (typeof ResultEvent)[keyof typeof ResultEvent]; /** Whether the ad is enabled. `active` and `paused` are set by you; `in_review` and `rejected` come from ad review. */ const Status: { readonly Active: "active"; readonly Paused: "paused"; readonly InReview: "in_review"; readonly Rejected: "rejected"; }; type Status = (typeof Status)[keyof typeof Status]; }