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 { FeesClient } from "../resources/fees/client/Client.js"; import { OauthGrantsClient } from "../resources/oauthGrants/client/Client.js"; import { PasskeysClient } from "../resources/passkeys/client/Client.js"; import { PreferencesClient } from "../resources/preferences/client/Client.js"; export declare namespace UsersClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * A User represents a person on Whop. Users have a public profile and can buy products, join accounts, and access experiences. * * Use the Users API to search for users, retrieve or update profiles, and check whether a user has access to an account, product, or experience. */ export declare class UsersClient { protected readonly _options: NormalizedClientOptionsWithAuth; protected _oauthGrants: OauthGrantsClient | undefined; protected _passkeys: PasskeysClient | undefined; protected _preferences: PreferencesClient | undefined; protected _fees: FeesClient | undefined; constructor(options?: UsersClient.Options); get oauthGrants(): OauthGrantsClient; get passkeys(): PasskeysClient; get preferences(): PreferencesClient; get fees(): FeesClient; /** * Searches for users by name or username, ranked by social proximity to the authenticated user. Without a `query`, returns the user's most recently followed users. * * @param {Whop.ListUsersRequest} request * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.users.list() */ list(request?: Whop.ListUsersRequest, requestOptions?: UsersClient.RequestOptions): Promise>; /** * Retrieves the authenticated user. Same as `GET /users/:id` with the reserved id `me`: the self view, where self-only fields such as `email`, `balance`, and `cards` can be populated. * * @param {Whop.MeUsersRequest} request * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.users.me() */ me(request?: Whop.MeUsersRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise; private __me; /** * Updates the authenticated user's global profile, or their profile override for an account when `account_id` is given. Not available to API keys. * * @param {Whop.UpdateMeUsersRequest} request * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.users.updateMe() */ updateMe(request?: Whop.UpdateMeUsersRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise; private __updateMe; /** * Retrieves a user by `user_` tag or username, or the authenticated user with the reserved id `me`. Self-only fields such as `email`, `balance`, and `earnings_usd` are populated only when the id is `me`, and are always `null` when addressing a user by tag or username. * * @param {Whop.RetrieveUsersRequest} request * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.users.retrieve({ * id: "id" * }) */ retrieve(request: Whop.RetrieveUsersRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Updates a user, addressed by `user_` tag, username, or the reserved id `me` for the authenticated user. A user token updates their own global profile; an API key updates the user's profile override for the account in `account_id`. * * @param {Whop.UpdateUsersRequest} request * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.users.update({ * id: "id" * }) */ update(request: Whop.UpdateUsersRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise; private __update; /** * Checks whether a user has access to an account, product, or experience the caller can reach. * * @param {Whop.CheckAccessUsersRequest} request * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.users.checkAccess({ * id: "id", * resource_id: "resource_id" * }) */ checkAccess(request: Whop.CheckAccessUsersRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise; private __checkAccess; /** * Lists the recommended actions computed for the authenticated user: personal suggestions, such as starting a business or becoming an affiliate, pooled with the highest-impact actions across the accounts the user owns. You can only list your own recommended actions. * * @param {Whop.RecommendActionsUsersRequest} request * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.users.recommendActions({ * id: "id" * }) */ recommendActions(request: Whop.RecommendActionsUsersRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise; private __recommendActions; }