import type * as Whop from "../../../../index.mjs"; /** * @example * { * id: "id" * } */ export interface UpdateAdGroupsRequest { /** The ad group ID. */ id: string; /** The platform returned when you last retrieved the campaign, ad group, or ad. A different current platform rejects the request with campaign_changed; retrieve the resource again before editing. Required after a delivery-platform migration when creating ads or ad groups, or changing fields other than title, status, budget, and account scope. */ "X-Ads-Platform"?: Whop.UpdateAdGroupsRequestXAdsPlatform; /** Saved audiences to deliver to or exclude. Can't be combined with demographics.automatic. */ audiences?: Whop.AdGroupAudiencesBody; /** How delivery bids are set in the ad auction. Target-based strategies use `desired_cost_per_result`. */ bid_type?: UpdateAdGroupsRequest.BidType; /** This ad group's budget in USD, which is what it is stored and billed in. Omit when the budget is set on the campaign instead. */ budget_amount?: number; /** This ad group's budget stated in the account's ads reporting currency (`budget_currency` on the response) instead of USD. Converted to USD at the current exchange rate and stored as budget_amount; on an update, an amount equal to the current budget_amount_local keeps the stored USD budget as is. Provide this or budget_amount, not both. */ budget_amount_local?: number; /** Whether budget_amount is spent per day (`daily`) or over the ad group's full run (`lifetime`). */ budget_type?: UpdateAdGroupsRequest.BudgetType; 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. The lead form itself is set on the ad. */ conversion_location?: UpdateAdGroupsRequest.ConversionLocation; /** Hours the ad group delivers in each week, keyed by day. Each window runs from `start` to `end` on the hour, with `24:00` for midnight, and a day's windows can't overlap or touch. A day that's empty or left out doesn't deliver. Replaces the whole schedule; `null` 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?: UpdateAdGroupsRequest.DeliverySchedule | null; /** Age, gender, and automatic-audience targeting. */ demographics?: Whop.AdGroupDemographicsBody; /** Cost per result to aim for (`average_target`) or never exceed (`maximum_target`). */ desired_cost_per_result?: number; /** 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. At most 100 entries per section. Can't be combined with demographics.automatic, and unavailable to campaigns with special_ad_categories. Send the complete intended state — a section you omit is cleared. */ detailed_targeting?: Whop.AdGroupDetailedTargetingBody; /** Device platforms and operating systems to target. */ devices?: Whop.AdGroupDevicesBody; /** When the ad group stops delivering, as an ISO 8601 timestamp. Omit to run until paused. */ ends_at?: string; /** Cap on how often one person sees ads from this ad group. Only available when the ad group optimizes for reach or ThruPlay. Under a campaign budget every ad group must use the same cap, which applies across the whole campaign, and only with the awareness objective (reach or ThruPlay ad groups) or engagement (ThruPlay). Fixed once the campaign launches; `null` clears it before then. */ frequency_cap?: UpdateAdGroupsRequest.FrequencyCap | null; /** Search terms the ad group's ads can show for, and terms they never show for. Only search campaigns take keywords, and each of their ad groups needs at least one before launch. Replaces the stored list; omit to keep it. */ keywords?: UpdateAdGroupsRequest.Keywords.Item[]; /** Languages to target, as ISO 639 codes such as `en` or `es`. Empty or omitted targets all languages. */ languages?: string[]; /** Apps the conversation opens in. Required when setting `conversion_location` to `messaging`, and rejected unless the ad group's conversion location is `messaging`. */ message_apps?: UpdateAdGroupsRequest.MessageApps.Item[]; /** Minimum the ad group tries to spend each day. */ minimum_daily_spend?: number; /** The result the ad group's delivery is optimized to get the most of. */ optimization_goal?: UpdateAdGroupsRequest.OptimizationGoal; /** * `automatic` to let the ad platform choose placements, or the list of platforms and positions to target. Omit a platform's positions to target all of them. * * Valid positions per platform: * * - `facebook`: `feed`, `right_hand_column`, `marketplace`, `search`, `profile_feed`, `notification`, `story`, `instream_video`, `facebook_reels`, `facebook_reels_overlay`, `biz_disco_feed` * - `instagram`: `stream`, `story`, `explore`, `explore_home`, `reels`, `profile_feed`, `profile_reels`, `ig_search` * - `messenger`: `story` * - `audience_network`: `classic`, `rewarded_video` * - `threads`: `threads_stream` * - `whatsapp`: `status` */ placements?: UpdateAdGroupsRequest.Placements; /** Locations to target and exclude. */ regions?: Whop.AdGroupRegionsBody; /** When the ad group starts delivering, as an ISO 8601 timestamp. Omit to start as soon as it's active. */ starts_at?: string; /** Initial status (default: `active`). */ status?: UpdateAdGroupsRequest.Status; /** The display name of the ad group. */ title?: string; } export declare namespace UpdateAdGroupsRequest { /** 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`). */ 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. The lead form itself is set on the ad. */ 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]; /** * Hours the ad group delivers in each week, keyed by day. Each window runs from `start` to `end` on the hour, with `24:00` for midnight, and a day's windows can't overlap or touch. A day that's empty or left out doesn't deliver. Replaces the whole schedule; `null` 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. */ interface DeliverySchedule { /** Windows the ad group delivers in on Friday. */ friday?: DeliverySchedule.Friday.Item[] | undefined; /** Windows the ad group delivers in on Monday. */ monday?: DeliverySchedule.Monday.Item[] | undefined; /** Windows the ad group delivers in on Saturday. */ saturday?: DeliverySchedule.Saturday.Item[] | undefined; /** Windows the ad group delivers in on Sunday. */ sunday?: DeliverySchedule.Sunday.Item[] | undefined; /** Windows the ad group delivers in on Thursday. */ thursday?: DeliverySchedule.Thursday.Item[] | undefined; /** Windows the ad group delivers in on Tuesday. */ tuesday?: DeliverySchedule.Tuesday.Item[] | undefined; /** Windows the ad group delivers in on Wednesday. */ wednesday?: DeliverySchedule.Wednesday.Item[] | undefined; } namespace DeliverySchedule { type Friday = Friday.Item[]; namespace Friday { interface Item { /** When delivery stops, as a 24-hour `HH:00` time up to `24:00` for midnight. Later than `start`. */ end: string; /** When delivery starts, as a 24-hour `HH:00` time from `00:00` to `23:00`. */ start: string; } } type Monday = Monday.Item[]; namespace Monday { interface Item { /** When delivery stops, as a 24-hour `HH:00` time up to `24:00` for midnight. Later than `start`. */ end: string; /** When delivery starts, as a 24-hour `HH:00` time from `00:00` to `23:00`. */ start: string; } } type Saturday = Saturday.Item[]; namespace Saturday { interface Item { /** When delivery stops, as a 24-hour `HH:00` time up to `24:00` for midnight. Later than `start`. */ end: string; /** When delivery starts, as a 24-hour `HH:00` time from `00:00` to `23:00`. */ start: string; } } type Sunday = Sunday.Item[]; namespace Sunday { interface Item { /** When delivery stops, as a 24-hour `HH:00` time up to `24:00` for midnight. Later than `start`. */ end: string; /** When delivery starts, as a 24-hour `HH:00` time from `00:00` to `23:00`. */ start: string; } } type Thursday = Thursday.Item[]; namespace Thursday { interface Item { /** When delivery stops, as a 24-hour `HH:00` time up to `24:00` for midnight. Later than `start`. */ end: string; /** When delivery starts, as a 24-hour `HH:00` time from `00:00` to `23:00`. */ start: string; } } type Tuesday = Tuesday.Item[]; namespace Tuesday { interface Item { /** When delivery stops, as a 24-hour `HH:00` time up to `24:00` for midnight. Later than `start`. */ end: string; /** When delivery starts, as a 24-hour `HH:00` time from `00:00` to `23:00`. */ start: string; } } type Wednesday = Wednesday.Item[]; namespace Wednesday { interface Item { /** When delivery stops, as a 24-hour `HH:00` time up to `24:00` for midnight. Later than `start`. */ end: string; /** When delivery starts, as a 24-hour `HH:00` time from `00:00` to `23:00`. */ start: string; } } } /** * Cap on how often one person sees ads from this ad group. Only available when the ad group optimizes for reach or ThruPlay. Under a campaign budget every ad group must use the same cap, which applies across the whole campaign, and only with the awareness objective (reach or ThruPlay ad groups) or engagement (ThruPlay). Fixed once the campaign launches; `null` clears it before then. */ interface FrequencyCap { /** Most times one person can be shown ads from this ad group within the window. */ maximum_impressions?: number | undefined; /** Length of the rolling window, in days. */ per_days?: number | undefined; } type Keywords = Keywords.Item[]; namespace Keywords { interface Item { /** How closely a search has to match: `broad` also reaches related searches, `phrase` needs the meaning of the phrase, and `exact` needs the same meaning as the term. Defaults to `broad`. */ match_type?: Item.MatchType | undefined; /** Set to `true` to keep the ads from showing for this term instead. Defaults to `false`. */ negative?: boolean | undefined; /** The search term, up to 80 characters and 10 words. Symbols such as ! @ % , * = ^ ; ~ | < > ? ( ) { } and quotes aren't allowed: set the match with match_type instead. */ text: string; } namespace Item { /** How closely a search has to match: `broad` also reaches related searches, `phrase` needs the meaning of the phrase, and `exact` needs the same meaning as the term. Defaults to `broad`. */ const MatchType: { readonly Broad: "broad"; readonly Phrase: "phrase"; readonly Exact: "exact"; }; type MatchType = (typeof MatchType)[keyof typeof MatchType]; } } type MessageApps = MessageApps.Item[]; namespace MessageApps { 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]; /** * `automatic` to let the ad platform choose placements, or the list of platforms and positions to target. Omit a platform's positions to target all of them. * * Valid positions per platform: * * - `facebook`: `feed`, `right_hand_column`, `marketplace`, `search`, `profile_feed`, `notification`, `story`, `instream_video`, `facebook_reels`, `facebook_reels_overlay`, `biz_disco_feed` * - `instagram`: `stream`, `story`, `explore`, `explore_home`, `reels`, `profile_feed`, `profile_reels`, `ig_search` * - `messenger`: `story` * - `audience_network`: `classic`, `rewarded_video` * - `threads`: `threads_stream` * - `whatsapp`: `status` */ type Placements = "automatic" | { platform: "facebook" | "instagram" | "messenger" | "audience_network" | "threads" | "whatsapp"; positions?: string[] | undefined; }[]; /** Initial status (default: `active`). */ const Status: { readonly Active: "active"; readonly Paused: "paused"; }; type Status = (typeof Status)[keyof typeof Status]; }