import type * as Whop from "../index.js"; export interface AdGroup { /** The ad campaign this ad group belongs to. */ ad_campaign: 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; /** Saved audiences this ad group delivers to or excludes. */ audiences: Whop.AdGroupAudiences; /** How delivery bids are set in the ad auction. Target-based strategies use `desired_cost_per_result`. */ bid_type: AdGroup.BidType | null; /** This ad group's budget in USD, which is what it is stored and billed in. `null` when the budget is set on the campaign instead. */ budget_amount: number | null; /** The same budget stated in `budget_currency` at today's exchange rate, for display in the account's ads reporting currency. `null` when `budget_amount` is. */ budget_amount_local: number | null; /** The ISO 4217 code `budget_amount_local` is in: the account's `ads_reporting_currency` preference. `usd` unless the account changed it. */ budget_currency: string; /** Whether `budget_amount` is spent per day (`daily`) or over the ad group's full run (`lifetime`). A `lifetime` ad group also needs `ends_at`, at least 24 hours after it starts. */ budget_type: AdGroup.BudgetType | 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; conversion_event: Whop.ConversionEvent | null; /** Where the outcome being optimized for occurs, such as a website visit, social-profile visit, messaging conversation, ad interaction, or lead-form submission. */ conversion_location?: (AdGroup.ConversionLocation | null) | undefined; /** 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 group was created, as an ISO 8601 timestamp. */ created_at: string; /** 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; /** Hours the ad group delivers in each week, keyed by day. Days it doesn't deliver are omitted. `null` when it delivers at every hour. Some platforms need a lifetime `budget_type` for a schedule, on the ad group or on its campaign when the campaign holds the budget. */ delivery_schedule: Whop.AdGroupDeliverySchedule | null; /** Whether ads in this ad group are delivering right now, and if not, why. When several states apply at once, the highest-precedence one is returned. */ delivery_status: AdGroup.DeliveryStatus; /** Age, gender, and automatic-audience targeting. */ demographics: Whop.AdGroupDemographics; /** Cost per result to aim for (`average_target`) or never exceed (`maximum_target`). `null` for `minimum_cost` bidding. */ desired_cost_per_result: number | null; /** Interest, behavior, and demographic targeting, using categories from the ad platform's targeting taxonomy. Entries across interests, behaviors, and demographics are OR'd together (anyone matching any entry is reached), matching Ads Manager's detailed-targeting box. Can't be combined with automatic audience targeting. Special ad category campaigns are limited to approved interests. */ detailed_targeting: Whop.AdGroupDetailedTargeting; /** Device platforms and operating systems targeted. */ devices: Whop.AdGroupDevices; /** Whether the ad platform automatically mixes and matches this ad group's creatives and copy to find the best-performing combinations. */ dynamic_creative?: boolean | undefined; /** When the ad group stops delivering, as an ISO 8601 timestamp. `null` when it runs until paused. */ ends_at: string | null; /** Platform-reported impressions divided by reach. */ frequency: number | null; /** Cap on how often one person sees ads from this ad group, or from the whole campaign under a campaign budget, where every ad group shares it. Only available when the ad group optimizes for reach or ThruPlay; `null` when uncapped. */ frequency_cap: Whop.AdGroupFrequencyCap | null; /** Unique identifier for the ad group, prefixed `adgrp_`. */ id: string; /** The number of impressions. */ impressions: number; issues: Whop.AdPlatformIssue[]; keywords?: Whop.AdGroupKeyword[] | undefined; languages: string[]; /** 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; /** Progress toward the ad platform's learning conversion threshold for this ad group. Null unless it is learning or learning limited and the platform reports valid counts. Reaching the threshold does not determine delivery status. */ learning_progress: Whop.AdGroupLearningProgress | null; /** 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; message_apps?: AdGroup.MessageApps.Item[] | undefined; /** Minimum the ad group tries to spend each day. `null` when no floor is set. */ minimum_daily_spend?: (number | null) | undefined; /** The result the ad group's delivery is optimized to get the most of. */ optimization_goal: AdGroup.OptimizationGoal | null; placements: Whop.AdGroupPlacement[]; /** The ad platform this ad group runs on. */ platform: AdGroup.Platform; /** 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; /** Locations targeted and excluded. */ regions: Whop.AdGroupRegions; /** 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: AdGroup.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; /** When the ad group starts delivering, as an ISO 8601 timestamp. `null` when it starts as soon as it's active. */ starts_at: string | null; /** Whether the ad group is enabled. `active` and `paused` are set by you; `rejected` means it failed ad review; `duplicating` is a copy still being filled in. */ status: AdGroup.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 name of the ad group. */ title: string | null; /** 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 group was last updated, as an ISO 8601 timestamp. */ updated_at: string; /** 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 AdGroup { /** How delivery bids are set in the ad auction. Target-based strategies use `desired_cost_per_result`. */ const BidType: { readonly MinimumCost: "minimum_cost"; readonly AverageTarget: "average_target"; readonly MaximumTarget: "maximum_target"; }; type BidType = (typeof BidType)[keyof typeof BidType]; /** Whether `budget_amount` is spent per day (`daily`) or over the ad group's full run (`lifetime`). A `lifetime` ad group also needs `ends_at`, at least 24 hours after it starts. */ const BudgetType: { readonly Daily: "daily"; readonly Lifetime: "lifetime"; }; type BudgetType = (typeof BudgetType)[keyof typeof BudgetType]; /** Where the outcome being optimized for occurs, such as a website visit, social-profile visit, messaging conversation, ad interaction, or lead-form submission. */ const ConversionLocation: { readonly Website: "website"; readonly Profile: "profile"; readonly InstagramAndFacebook: "instagram_and_facebook"; readonly InstagramProfile: "instagram_profile"; readonly Messaging: "messaging"; readonly OnAd: "on_ad"; readonly InstantForms: "instant_forms"; readonly InstantFormsAndMessenger: "instant_forms_and_messenger"; readonly WebsiteAndInstantForms: "website_and_instant_forms"; }; type ConversionLocation = (typeof ConversionLocation)[keyof typeof ConversionLocation]; /** Whether ads in this ad group are 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 AllAdsRejected: "all_ads_rejected"; readonly Rejected: "rejected"; readonly Draft: "draft"; readonly NoAds: "no_ads"; readonly CampaignPaused: "campaign_paused"; readonly Paused: "paused"; readonly Processing: "processing"; readonly Issues: "issues"; readonly Scheduled: "scheduled"; readonly Completed: "completed"; readonly AdsOff: "ads_off"; readonly LearningLimited: "learning_limited"; readonly Learning: "learning"; readonly Active: "active"; }; type DeliveryStatus = (typeof DeliveryStatus)[keyof typeof DeliveryStatus]; type MessageApps = MessageApps.Item[]; namespace MessageApps { /** Apps the conversation opens in when `conversion_location` is `messaging`. Empty for other conversion locations. */ const Item: { readonly Messenger: "messenger"; readonly Instagram: "instagram"; readonly Whatsapp: "whatsapp"; }; type Item = (typeof Item)[keyof typeof Item]; } /** The result the ad group's delivery is optimized to get the most of. */ const OptimizationGoal: { readonly Conversions: "conversions"; readonly LinkClicks: "link_clicks"; readonly LandingPageViews: "landing_page_views"; readonly Reach: "reach"; readonly Impressions: "impressions"; readonly Engagement: "engagement"; readonly Conversations: "conversations"; readonly VideoViews: "video_views"; readonly TwoSecondViews: "two_second_views"; readonly PageLikes: "page_likes"; readonly SocialProfile: "social_profile"; readonly AdRecallLift: "ad_recall_lift"; readonly EventResponses: "event_responses"; readonly RemindersSet: "reminders_set"; readonly LeadGeneration: "lead_generation"; readonly QualityLead: "quality_lead"; readonly Value: "value"; readonly ProfileAndPageEngagement: "profile_and_page_engagement"; }; type OptimizationGoal = (typeof OptimizationGoal)[keyof typeof OptimizationGoal]; /** The ad platform this ad group runs on. */ const Platform: { readonly Meta: "meta"; readonly Tiktok: "tiktok"; readonly Google: "google"; }; type Platform = (typeof Platform)[keyof typeof Platform]; /** 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 group is enabled. `active` and `paused` are set by you; `rejected` means it failed ad review; `duplicating` is a copy still being filled in. */ const Status: { readonly Active: "active"; readonly Paused: "paused"; readonly Rejected: "rejected"; readonly Duplicating: "duplicating"; }; type Status = (typeof Status)[keyof typeof Status]; }