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 TeamMembersClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * A Team Member is a member of an account's team: the link between a user and an account, carrying the role that controls what they can do. Roles are either system roles (like `admin` or `moderator`) or `custom` roles managed from the dashboard. * * Use the Team Members API to list an account's team, add a user to the team with a system role, change a member's role, and remove members. Adding a user who has not yet accepted sends an invitation instead. */ export declare class TeamMembersClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: TeamMembersClient.Options); /** * Lists an account's team members, including pending invites. A user credential with `company:basic:read` may list only its own joined membership by passing its own `user_id` and `status=joined`. Listing `role=workforce` is also allowed with the `bounty:create` scope. Members with the view-only Partner role are listed after all other members. * * @param {Whop.ListTeamMembersRequest} request * @param {TeamMembersClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.teamMembers.list({ * account_id: "account_id" * }) */ list(request: Whop.ListTeamMembersRequest, requestOptions?: TeamMembersClient.RequestOptions): Promise>; /** * Adds a member to an account's team with a system role. Identify them by exactly one of `user_id` or `email`. If the person has not yet accepted, or the email does not belong to a Whop account yet, an invitation is sent instead and the response is `202` with the pending team member, whose `status` is `pending` and whose id is prefixed `ausri_`. If they already have a pending invite, the request fails with a `400`. Granting the `workforce` role is also allowed with the `bounty:create` scope. * * @param {Whop.CreateTeamMembersRequest} request * @param {TeamMembersClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.teamMembers.create({ * account_id: "biz_xxxxxxxxxxxxxx", * role: "sales_manager", * user_id: "user_xxxxxxxxxxxxxx" * }) */ create(request: Whop.CreateTeamMembersRequest, requestOptions?: TeamMembersClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieves a team member or pending invite by ID. * * @param {Whop.RetrieveTeamMembersRequest} request * @param {TeamMembersClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.teamMembers.retrieve({ * id: "id" * }) */ retrieve(request: Whop.RetrieveTeamMembersRequest, requestOptions?: TeamMembersClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Removes a team member from the account, or revokes a pending invite when given an `ausri_` ID. A user session may delete its own membership to leave the team without the delete scope. Removing a member on the `workforce` role is also allowed with the `bounty:create` scope. The account owner cannot be removed. * * @param {Whop.DeleteTeamMembersRequest} request * @param {TeamMembersClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.teamMembers.delete({ * id: "id" * }) */ delete(request: Whop.DeleteTeamMembersRequest, requestOptions?: TeamMembersClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Changes a team member's system role. Requires a user session — account API keys cannot change member roles. The account owner's role cannot be changed, and you cannot change your own role. * * @param {Whop.UpdateTeamMembersRequest} request * @param {TeamMembersClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.teamMembers.update({ * id: "id" * }) */ update(request: Whop.UpdateTeamMembersRequest, requestOptions?: TeamMembersClient.RequestOptions): core.HttpResponsePromise; private __update; }