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 AdCampaignsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * An Ad Campaign is the top-level container for paid ads on an ad network. It sets the platform, objective, and budget strategy shared by its [ad groups](/api-reference/beta/ad-groups/ad-group) and ads. * * Use the Ad Campaigns API to create campaigns, list campaigns for an account, retrieve or update campaign settings, and pause or resume campaign delivery. * * Ads billing combines eligible spend across the account's campaigns. A failed payment blocks delivery with `delivery_status: payment_failed` while preserving the configured active/paused `status`. Fix the account's payment method and [retry its ads payment](/api-reference/beta/accounts/retry-failed-ads-payments) once for the account. The retry is asynchronous: acceptance does not confirm payment. Successful settlement clears the block; active campaigns can resume if otherwise eligible, while paused campaigns stay paused. See [billing and retries](/developer/ads/overview#paying-for-ads). */ export declare class AdCampaignsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: AdCampaignsClient.Options); /** * Lists the ad campaigns for an account, with stats over the requested window. * * @param {Whop.ListAdCampaignsRequest} request * @param {AdCampaignsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.adCampaigns.list() */ list(request?: Whop.ListAdCampaignsRequest, requestOptions?: AdCampaignsClient.RequestOptions): Promise>; /** * Creates an ad campaign in `draft` status for an account. Nothing runs until you launch it by setting `status` to `active` with `PATCH /ad_campaigns/:id`. * * @param {Whop.CreateAdCampaignsRequest} request * @param {AdCampaignsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.adCampaigns.create({ * objective: "awareness", * platform: "whop", * title: "Now hiring mobile detailers \u2014 Austin" * }) */ create(request: Whop.CreateAdCampaignsRequest, requestOptions?: AdCampaignsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieves a single ad campaign with stats over the requested window. * * @param {Whop.RetrieveAdCampaignsRequest} request * @param {AdCampaignsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.adCampaigns.retrieve({ * id: "id" * }) */ retrieve(request: Whop.RetrieveAdCampaignsRequest, requestOptions?: AdCampaignsClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Deletes an ad campaign and archives it on the ad platform (cascades to ad groups and ads). * * @param {Whop.DeleteAdCampaignsRequest} request * @param {AdCampaignsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.adCampaigns.delete({ * id: "id" * }) */ delete(request: Whop.DeleteAdCampaignsRequest, requestOptions?: AdCampaignsClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Updates an ad campaign's settings, or launches a draft campaign by setting `status` to `active`. The objective is fixed at creation and cannot be changed. * * @param {Whop.UpdateAdCampaignsRequest} request * @param {AdCampaignsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.adCampaigns.update({ * id: "id" * }) */ update(request: Whop.UpdateAdCampaignsRequest, requestOptions?: AdCampaignsClient.RequestOptions): core.HttpResponsePromise; private __update; /** * Creates copies of the campaign in `duplicating` status and returns them; each copy transitions to `draft` once duplication completes. Poll each returned campaign until it leaves `duplicating` — a copy that could not be completed is deleted and returns 404. * * @param {Whop.DuplicateAdCampaignsRequest} request * @param {AdCampaignsClient.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.adCampaigns.duplicate({ * id: "id" * }) */ duplicate(request: Whop.DuplicateAdCampaignsRequest, requestOptions?: AdCampaignsClient.RequestOptions): core.HttpResponsePromise; private __duplicate; /** * Pauses an active ad campaign. * * @param {Whop.PauseAdCampaignsRequest} request * @param {AdCampaignsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.adCampaigns.pause({ * id: "id" * }) */ pause(request: Whop.PauseAdCampaignsRequest, requestOptions?: AdCampaignsClient.RequestOptions): core.HttpResponsePromise; private __pause; /** * Resumes a paused ad campaign. Requires an ads payment method on the account. * * @param {Whop.UnpauseAdCampaignsRequest} request * @param {AdCampaignsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.adCampaigns.unpause({ * id: "id" * }) */ unpause(request: Whop.UnpauseAdCampaignsRequest, requestOptions?: AdCampaignsClient.RequestOptions): core.HttpResponsePromise; private __unpause; }