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 EmailAddressesClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * An Email address is a mailbox on one of the account's domains, such as support@example.com. The domain needs the `email` capability in the `ready` state first. A mailbox either belongs to one team member, who alone can read it and send from it, or is shared by the account, where `email:read` and `email:send` decide who can use it. * * Use the Email addresses API to create, list, reassign and delete mailboxes, read the password mail apps sign in with, and download a configuration profile that adds the mailbox to Mail on Apple devices. Deleting an address keeps its mail, and creating it again in the same account brings the mailbox back. */ export declare class EmailAddressesClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: EmailAddressesClient.Options); /** * Lists the email addresses of the accounts you can read, and the mailboxes you own. A password is included only for mailboxes you can use. * * @param {Whop.ListEmailAddressesRequest} request * @param {EmailAddressesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.emailAddresses.list() */ list(request?: Whop.ListEmailAddressesRequest, requestOptions?: EmailAddressesClient.RequestOptions): Promise>; /** * Creates a mailbox on one of the account's domains. The domain needs the `email` capability turned on. The address can be created and signed in to while email is still setting up, and it can send once email is `ready`. Give it to a team member with `user_id`, or leave it out to share the mailbox with the account. Creating an address this account deleted brings the mailbox back, with its mail and a new password. * * @param {Whop.CreateEmailAddressesRequest} request * @param {EmailAddressesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.emailAddresses.create({ * address: "marcus@shinetime.example" * }) */ create(request: Whop.CreateEmailAddressesRequest, requestOptions?: EmailAddressesClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieves an email address. Its owner can always retrieve it; anyone else needs `email:read`. The password is included only if you can use the mailbox. * * @param {Whop.RetrieveEmailAddressesRequest} request * @param {EmailAddressesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.emailAddresses.retrieve({ * id: "id" * }) */ retrieve(request: Whop.RetrieveEmailAddressesRequest, requestOptions?: EmailAddressesClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Deletes the address. Mail apps signed in to it lose access, and mail sent to it is no longer received. Its mail is kept, and creating the address again in this account brings the mailbox back. * * @param {Whop.DeleteEmailAddressesRequest} request * @param {EmailAddressesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.emailAddresses.delete({ * id: "id" * }) */ delete(request: Whop.DeleteEmailAddressesRequest, requestOptions?: EmailAddressesClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Gives the mailbox to a team member, or shares it with the account, under a new password. A mailbox that had an owner starts empty, because its earlier mail is private to that owner; mail apps sync it again from the start. * * @param {Whop.UpdateEmailAddressesRequest} request * @param {EmailAddressesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.emailAddresses.update({ * id: "id" * }) */ update(request: Whop.UpdateEmailAddressesRequest, requestOptions?: EmailAddressesClient.RequestOptions): core.HttpResponsePromise; private __update; /** * Downloads an Apple configuration profile that adds the mailbox to Mail on a Mac, iPhone or iPad, signed in and ready to send. Only the owner can download it for an owned mailbox; a shared one needs `email:read` and `email:send`. * * @throws {@link Whop.ForbiddenError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} */ mobileconfig(request: Whop.MobileconfigEmailAddressesRequest, requestOptions?: EmailAddressesClient.RequestOptions): core.HttpResponsePromise; private __mobileconfig; /** * Gives the mailbox a new password. Every mail app signed in with the old one loses access. Only the owner can reset an owned mailbox; a shared one needs `email:read` and `email:send`. * * @param {Whop.ResetPasswordEmailAddressesRequest} request * @param {EmailAddressesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.emailAddresses.resetPassword({ * id: "id" * }) */ resetPassword(request: Whop.ResetPasswordEmailAddressesRequest, requestOptions?: EmailAddressesClient.RequestOptions): core.HttpResponsePromise; private __resetPassword; }