import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import * as Whop from "../../../index.js"; export declare namespace AdGroupsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * An Ad Group sits inside an [ad campaign](/api-reference/beta/ad-campaigns/ad-campaign) and controls delivery for [ads](/api-reference/beta/ads/ad). It sets the audience, placements, schedule, budget, and optimization goal for its ads. * * Use the Ad Groups API to create ad groups in campaigns, list or retrieve targeting and delivery settings, update budgets or targeting, delete groups that should stop running, and pause or resume delivery. It can also search the ad platform's targeting taxonomy for options to target and estimate how many people a draft targeting spec can reach. */ export declare class AdGroupsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: AdGroupsClient.Options); /** * Lists ad groups for the account, newest first. * * @param {Whop.ListAdGroupsRequest} request * @param {AdGroupsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.adGroups.list({ * ad_campaign_ids: ["adcamp_xxxxxxxxxxxxxx"] * }) */ list(request?: Whop.ListAdGroupsRequest, requestOptions?: AdGroupsClient.RequestOptions): Promise>; /** * Creates an ad group (ad set) in a campaign. * * @param {Whop.CreateAdGroupsRequest} request * @param {AdGroupsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.NotFoundError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.adGroups.create({ * ad_campaign_id: "adcamp_xxxxxxxxxxxxxx" * }) */ create(request: Whop.CreateAdGroupsRequest, requestOptions?: AdGroupsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Estimates how many people a draft targeting spec can reach, before an ad group is created. The body takes the same targeting fields as creating an ad group, and nothing is persisted. * * @param {Whop.EstimateReachAdGroupsRequest} request * @param {AdGroupsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.adGroups.estimateReach({ * platform: "meta" * }) */ estimateReach(request: Whop.EstimateReachAdGroupsRequest, requestOptions?: AdGroupsClient.RequestOptions): core.HttpResponsePromise; private __estimateReach; /** * Searches the ad platform's targeting taxonomy for options to target an ad group with. Each result comes back in the exact shape the ad-group body accepts for its `type`, so it can be used in `detailed_targeting`, `regions`, or `languages` as-is. * * @param {Whop.SearchTargetingOptionsAdGroupsRequest} request * @param {AdGroupsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.adGroups.searchTargetingOptions({ * platform: "meta" * }) */ searchTargetingOptions(request: Whop.SearchTargetingOptionsAdGroupsRequest, requestOptions?: AdGroupsClient.RequestOptions): core.HttpResponsePromise; private __searchTargetingOptions; /** * Retrieves an ad group, with performance stats for the window set by `stats_from` and `stats_to`. * * @param {Whop.RetrieveAdGroupsRequest} request * @param {AdGroupsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.adGroups.retrieve({ * id: "id" * }) */ retrieve(request: Whop.RetrieveAdGroupsRequest, requestOptions?: AdGroupsClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Deletes an ad group, removing it from the ad platform so it stops delivering. * * @param {Whop.DeleteAdGroupsRequest} request * @param {AdGroupsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.adGroups.delete({ * id: "id" * }) */ delete(request: Whop.DeleteAdGroupsRequest, requestOptions?: AdGroupsClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Updates an ad group's editable fields. Only the keys you send are changed. * * @param {Whop.UpdateAdGroupsRequest} request * @param {AdGroupsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.adGroups.update({ * id: "id" * }) */ update(request: Whop.UpdateAdGroupsRequest, requestOptions?: AdGroupsClient.RequestOptions): core.HttpResponsePromise; private __update; /** * Starts copying an ad group and returns the copies in `duplicating` status. Poll each returned ad group until it leaves `duplicating`: it then takes the source's `active` or `paused` status, or, if the copy could not be completed, is deleted and returns 404. * * @param {Whop.DuplicateAdGroupsRequest} request * @param {AdGroupsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.adGroups.duplicate({ * id: "id" * }) */ duplicate(request: Whop.DuplicateAdGroupsRequest, requestOptions?: AdGroupsClient.RequestOptions): core.HttpResponsePromise; private __duplicate; /** * Pauses delivery of an ad group. * * @param {Whop.PauseAdGroupsRequest} request * @param {AdGroupsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.adGroups.pause({ * id: "id" * }) */ pause(request: Whop.PauseAdGroupsRequest, requestOptions?: AdGroupsClient.RequestOptions): core.HttpResponsePromise; private __pause; /** * Resumes delivery of a paused ad group. * * @param {Whop.UnpauseAdGroupsRequest} request * @param {AdGroupsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.adGroups.unpause({ * id: "id" * }) */ unpause(request: Whop.UnpauseAdGroupsRequest, requestOptions?: AdGroupsClient.RequestOptions): core.HttpResponsePromise; private __unpause; }