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"; import { OverridesClient } from "../resources/overrides/client/Client.js"; export declare namespace AffiliatesClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class AffiliatesClient { protected readonly _options: NormalizedClientOptionsWithAuth; protected _overrides: OverridesClient | undefined; constructor(options?: AffiliatesClient.Options); get overrides(): OverridesClient; /** * Lists the affiliates of an account. * * Required permissions: * - `affiliate:basic:read` * * @param {Whop.ListAffiliatesRequest} request * @param {AffiliatesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.UnprocessableEntityError} * @throws {@link Whop.TooManyRequestsError} * @throws {@link Whop.InternalServerError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.affiliates.list({ * first: 42, * last: 42, * account_id: "biz_xxxxxxxxxxxxxx" * }) */ list(request: Whop.ListAffiliatesRequest, requestOptions?: AffiliatesClient.RequestOptions): Promise>; /** * Creates an affiliate for a user on an account. If the user is already an affiliate of the account, returns that affiliate, reactivating it if it was archived. * * Required permissions: * - `affiliate:create` * * @param {Whop.CreateAffiliatesRequest} request * @param {AffiliatesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.UnprocessableEntityError} * @throws {@link Whop.TooManyRequestsError} * @throws {@link Whop.InternalServerError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.affiliates.create({ * account_id: "biz_xxxxxxxxxxxxxx", * user_identifier: "user_identifier" * }) */ create(request: Whop.CreateAffiliatesRequest, requestOptions?: AffiliatesClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieves the details of an existing affiliate. * * Required permissions: * - `affiliate:basic:read` * * @param {Whop.RetrieveAffiliatesRequest} request * @param {AffiliatesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.UnprocessableEntityError} * @throws {@link Whop.TooManyRequestsError} * @throws {@link Whop.InternalServerError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.affiliates.retrieve({ * id: "aff_xxxxxxxxxxxxxx" * }) */ retrieve(request: Whop.RetrieveAffiliatesRequest, requestOptions?: AffiliatesClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Archives an affiliate. The affiliate that handles Whop marketplace referrals cannot be archived. * * Required permissions: * - `affiliate:update` * * @param {Whop.ArchiveAffiliatesRequest} request * @param {AffiliatesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.UnprocessableEntityError} * @throws {@link Whop.TooManyRequestsError} * @throws {@link Whop.InternalServerError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.affiliates.archive({ * id: "aff_xxxxxxxxxxxxxx" * }) */ archive(request: Whop.ArchiveAffiliatesRequest, requestOptions?: AffiliatesClient.RequestOptions): core.HttpResponsePromise; private __archive; /** * Unarchives an archived affiliate. * * Required permissions: * - `affiliate:update` * * @param {Whop.UnarchiveAffiliatesRequest} request * @param {AffiliatesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.UnprocessableEntityError} * @throws {@link Whop.TooManyRequestsError} * @throws {@link Whop.InternalServerError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.affiliates.unarchive({ * id: "aff_xxxxxxxxxxxxxx" * }) */ unarchive(request: Whop.UnarchiveAffiliatesRequest, requestOptions?: AffiliatesClient.RequestOptions): core.HttpResponsePromise; private __unarchive; }