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 DomainsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * A Domain is a hostname an account holds on Whop. Its capabilities set what Whop does with it: `registration` buys the domain through Whop, runs its DNS, and renews it every year; `verification` connects a domain registered elsewhere once you publish the DNS records it returns, and expires if ownership is not proven within 48 hours; `website` serves one of the account's apps on it. * * Use the Domains API to search for a domain to buy, buy or connect one, serve a website on it, and check its DNS, payment, and renewal state. Thirty days before a bought domain expires, Whop opens a renewal charge at `purchase_url` and, while `auto_renew` is on, charges the saved card. An unpaid domain stops serving when it expires but stays renewable at `purchase_url` until the registry's grace period ends, and is then removed. */ export declare class DomainsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: DomainsClient.Options); /** * Lists your domains. Filter by account, app, status, hostname, or the state of a capability. * * Pass `search` to find domains to buy instead: the exact domain first, even when taken, then your name on popular extensions, then suggestions. Pass `tlds` to check only the extensions you choose. Results aren't reserved. * * @param {Whop.ListDomainsRequest} request * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.TooManyRequestsError} * @throws {@link Whop.ServiceUnavailableError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.domains.list({ * tlds: ["com"] * }) */ list(request?: Whop.ListDomainsRequest, requestOptions?: DomainsClient.RequestOptions): Promise>; /** * Adds a domain to your account with the capabilities you want. * * Pass `registration` to buy the domain through Whop; it's the default when you pass no capability. Pay its `amount_due` at `purchase_url`, or pass `registration.payment_method_id` to charge a saved card. Whop then registers it, runs its DNS, and renews it every year while `auto_renew` is on. * * Pass `registration.auth_code` to transfer in a domain you own at another registrar. The transfer starts once its `amount_due` is paid, or at once when `amount_due` is `null`. While `registration.phase` is `transferring`, its `issues` say what the transfer needs from you. * * Pass `verification` to connect a domain you registered elsewhere: its `issues` list the TXT and routing records to publish. Pass `website` with an `app_id` to serve that app on the domain. * * To change a domain you already have, update it instead. Adding a domain this account deleted revives it under its original ID. * * @param {Whop.CreateDomainsRequest} request * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.domains.create({ * domain: "store.example.com" * }) */ create(request: Whop.CreateDomainsRequest, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieves a domain by ID or hostname. Both return the same domain, shown as fully as you can see it: everything for your own accounts, and only who has it and what it serves for anyone else. * * A hostname no domain on Whop has comes back with its `availability` instead. * * @param {Whop.RetrieveDomainsRequest} request * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.TooManyRequestsError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.domains.retrieve({ * id: "id" * }) */ retrieve(request: Whop.RetrieveDomainsRequest, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Removes the domain from your account and releases its capabilities in the background. Deleting an unpaid purchase cancels it, and deleting a transfer cancels it and refunds it while the current registrar can still stop it. A registered domain can't be deleted; turn off `auto_renew` and it's released after it expires. Adding the domain to this account again revives it under the same ID. * * @param {Whop.DeleteDomainsRequest} request * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.domains.delete({ * id: "id" * }) */ delete(request: Whop.DeleteDomainsRequest, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Changes a domain's capabilities or metadata. Pass a capability to add it or change its settings, or `null` to release it; capabilities you leave out don't change. Passing a capability that needs action again retries it. Releasing every capability keeps the domain, `idle`; delete it to remove it. * * @param {Whop.UpdateDomainsRequest} request * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.domains.update({ * id: "id" * }) */ update(request: Whop.UpdateDomainsRequest, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise; private __update; /** * Checks the domain's DNS, payment, and provider state again now instead of at its next scheduled check. Returns the domain as saved; retrieve it again to see the result. * * @param {Whop.CheckDomainsRequest} request * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.domains.check({ * id: "id" * }) */ check(request: Whop.CheckDomainsRequest, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise; private __check; }