import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs"; import * as core from "../../../../core/index.mjs"; import * as Whop from "../../../index.mjs"; export declare namespace AdsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * An Ad is the individual creative unit delivered by an [ad group](/api-reference/beta/ad-groups/ad-group). It holds the copy, creative assets, and destination URL for one ad. * * Use the Ads API to list ads for an account, create ads inside ad groups, retrieve or update creative details, delete ads that should stop running, and pause or resume delivery. */ export declare class AdsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: AdsClient.Options); /** * Records a runner's stats for one of their ads in one hour, and pays them for the spend. Send the ad's totals so far for an hour that started in the last 24 hours; they replace what the ad held for that hour, and its ad group's and campaign's hours are rebuilt from their ads. The spend can go up but never down. Reporting on a campaign starts with the hour of its first recorded report; earlier hours are refused. Spend over what is left of a budget (the runner's share of the day, the campaign's daily budget or the ad group's budget) is refused with the most the ad can record. Takes the runner's Whop session or a user OAuth token with `ad_campaign:update`. A token without that scope gets a 403, and anyone not holding the ad's campaign gets a 404. * * @param {Whop.ReportStatsAdsRequest} request * @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.ads.reportStats({ * ad_id: "ad_xxxxxxxxxxxxxx", * hour_started_at: "2026-01-01T12:00:00Z", * spend: 1.1 * }) */ reportStats(request: Whop.ReportStatsAdsRequest, requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise; private __reportStats; /** * Lists the ads for an account, with stats over the requested window. * * @param {Whop.ListAdsRequest} request * @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.ads.list({ * ad_campaign_ids: ["adcamp_xxxxxxxxxxxxxx"], * ad_group_ids: ["adgrp_xxxxxxxxxxxxxx"] * }) */ list(request?: Whop.ListAdsRequest, requestOptions?: AdsClient.RequestOptions): Promise>; /** * Creates an ad in an ad group. Any campaign status other than `draft` launches the campaign, which requires an ads payment method on the account. * * @param {Whop.CreateAdsRequest} request * @param {AdsClient.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.ads.create() */ create(request?: Whop.CreateAdsRequest, requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieves a single ad with stats over the requested window. * * @param {Whop.RetrieveAdsRequest} request * @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.ads.retrieve({ * id: "id" * }) */ retrieve(request: Whop.RetrieveAdsRequest, requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Deletes an ad. * * @param {Whop.DeleteAdsRequest} request * @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.ads.delete({ * id: "id" * }) */ delete(request: Whop.DeleteAdsRequest, requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Updates an ad's editable fields. * * @param {Whop.UpdateAdsRequest} request * @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.ads.update({ * id: "id" * }) */ update(request: Whop.UpdateAdsRequest, requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise; private __update; /** * Copies an ad into its own ad group or into another one. Copies keep the source ad's active or paused state. * * @param {Whop.DuplicateAdsRequest} request * @param {AdsClient.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.ads.duplicate({ * id: "id" * }) */ duplicate(request: Whop.DuplicateAdsRequest, requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise; private __duplicate; /** * Pauses an active ad. * * @param {Whop.PauseAdsRequest} request * @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.ads.pause({ * id: "id" * }) */ pause(request: Whop.PauseAdsRequest, requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise; private __pause; /** * Resumes a paused ad. * * @param {Whop.UnpauseAdsRequest} request * @param {AdsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.ads.unpause({ * id: "id" * }) */ unpause(request: Whop.UnpauseAdsRequest, requestOptions?: AdsClient.RequestOptions): core.HttpResponsePromise; private __unpause; }