import type * as Whop from "../index.js"; export interface AdCampaign { /** 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; /** How delivery bids in the ad auction: `minimum_cost` gets the most results for the budget, `average_target` holds an average cost per result, and `maximum_target` never bids above a cap. */ bid_type?: (AdCampaign.BidType | null) | undefined; /** The campaign's budget in USD, which is what it is stored and billed in. `null` when each ad group sets its own budget 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; /** Which level owns the budget: the whole campaign (`ad_campaign`) or each ad group individually (`ad_group`). */ budget_optimization: AdCampaign.BudgetOptimization | null; /** Whether `budget_amount` is spent per day (`daily`) or over the campaign's full run (`lifetime`). */ budget_type: AdCampaign.BudgetType | null; /** The kind of campaign, fixed at creation. `standard` is the ad network's standard campaign; `search` shows text ads on search results for the ad groups' keywords. */ campaign_type: AdCampaign.CampaignType; /** 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 campaign 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; /** Whether the campaign's ads are delivering right now, and if not, why. Content review is in_review; a campaign waiting to start is processing. Account billing failures set payment_failed without changing the configured status. Successful payment retry clears that block and recalculates delivery. When several states apply at once, the highest-precedence one is returned. */ delivery_status: AdCampaign.DeliveryStatus; /** The cost per result, in USD, the advertiser wants this campaign to achieve. A target only: it is not a bid, cost cap, or bid cap, and doesn't change how the campaign's ads bid. `null` when no target is set. */ desired_cost_per_result?: (number | null) | undefined; /** Google only: when the campaign stops delivering, as an ISO 8601 timestamp. `null` runs it until paused. */ ends_at?: (string | null) | undefined; /** Platform-reported impressions divided by reach. */ frequency: number | null; /** Unique identifier for the ad campaign, prefixed `adcamp_`. */ id: string; /** The number of impressions. */ impressions: number; issues: Whop.AdPlatformIssue[]; /** 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; /** The goal the campaign optimizes toward. */ objective: AdCampaign.Objective | null; /** The event the campaign optimizes for when a single goal is set campaign-wide. `null` when each ad group sets its own optimization_goal. */ optimization_goal: string | null; /** The ad network the campaign runs on. */ platform: AdCampaign.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; /** 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: AdCampaign.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; special_ad_categories: AdCampaign.SpecialAdCategories.Item[]; /** The amount charged, in spend_currency. */ spend: number; /** The ISO 4217 currency code of all monetary metrics. */ spend_currency: string | null; /** Google only: when the campaign starts delivering, as an ISO 8601 timestamp. `null` starts it as soon as it launches. */ starts_at?: (string | null) | undefined; /** The configured lifecycle status of the ad campaign. Billing failures preserve active or paused here and set delivery_status to payment_failed. */ status: AdCampaign.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 campaign. */ title: string; /** 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 campaign 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 AdCampaign { /** How delivery bids in the ad auction: `minimum_cost` gets the most results for the budget, `average_target` holds an average cost per result, and `maximum_target` never bids above a cap. */ const BidType: { readonly MinimumCost: "minimum_cost"; readonly AverageTarget: "average_target"; readonly MaximumTarget: "maximum_target"; }; type BidType = (typeof BidType)[keyof typeof BidType]; /** Which level owns the budget: the whole campaign (`ad_campaign`) or each ad group individually (`ad_group`). */ const BudgetOptimization: { readonly AdCampaign: "ad_campaign"; readonly AdGroup: "ad_group"; }; type BudgetOptimization = (typeof BudgetOptimization)[keyof typeof BudgetOptimization]; /** Whether `budget_amount` is spent per day (`daily`) or over the campaign's full run (`lifetime`). */ const BudgetType: { readonly Daily: "daily"; readonly Lifetime: "lifetime"; }; type BudgetType = (typeof BudgetType)[keyof typeof BudgetType]; /** The kind of campaign, fixed at creation. `standard` is the ad network's standard campaign; `search` shows text ads on search results for the ad groups' keywords. */ const CampaignType: { readonly Standard: "standard"; readonly Search: "search"; }; type CampaignType = (typeof CampaignType)[keyof typeof CampaignType]; /** Whether the campaign's ads are delivering right now, and if not, why. Content review is in_review; a campaign waiting to start is processing. Account billing failures set payment_failed without changing the configured status. Successful payment retry clears that block and recalculates delivery. When several states apply at once, the highest-precedence one is returned. */ const DeliveryStatus: { readonly PaymentFailed: "payment_failed"; readonly InAppeal: "in_appeal"; readonly AllAdsRejected: "all_ads_rejected"; readonly Draft: "draft"; readonly NoAdGroups: "no_ad_groups"; readonly NoAds: "no_ads"; readonly Paused: "paused"; readonly InReview: "in_review"; readonly Learning: "learning"; readonly Processing: "processing"; readonly Issues: "issues"; readonly Scheduled: "scheduled"; readonly Completed: "completed"; readonly AdGroupsOff: "ad_groups_off"; readonly Active: "active"; }; type DeliveryStatus = (typeof DeliveryStatus)[keyof typeof DeliveryStatus]; /** The goal the campaign optimizes toward. */ const Objective: { readonly Awareness: "awareness"; readonly Traffic: "traffic"; readonly Engagement: "engagement"; readonly Leads: "leads"; readonly Sales: "sales"; }; type Objective = (typeof Objective)[keyof typeof Objective]; /** The ad network the campaign 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]; type SpecialAdCategories = SpecialAdCategories.Item[]; namespace SpecialAdCategories { /** Regulated categories the campaign is declared under. Ads in these categories are subject to extra targeting restrictions. Empty when none apply. */ const Item: { readonly Housing: "housing"; readonly Employment: "employment"; readonly FinancialProducts: "financial_products"; readonly Politics: "politics"; }; type Item = (typeof Item)[keyof typeof Item]; } /** The configured lifecycle status of the ad campaign. Billing failures preserve active or paused here and set delivery_status to payment_failed. */ const Status: { readonly Active: "active"; readonly Paused: "paused"; readonly Inactive: "inactive"; readonly Stale: "stale"; readonly PendingRefund: "pending_refund"; readonly PaymentFailed: "payment_failed"; readonly Draft: "draft"; readonly InReview: "in_review"; readonly Flagged: "flagged"; readonly Importing: "importing"; readonly Imported: "imported"; readonly Duplicating: "duplicating"; }; type Status = (typeof Status)[keyof typeof Status]; }