UNPKG

internet-avatar.js

Version:

Library for connecting to Internet Avatar API.

60 lines (59 loc) 1.92 kB
import { Client } from "../client.js"; import { User } from "../structures/User.js"; import type { ReqUserCreation } from "../types/user.js"; import { Manager } from "./manager.js"; import type { ListResponse } from "../types/common.js"; export declare class UserManager extends Manager<User> { constructor(client: Client); fetch(id: string, options?: { cache?: boolean; force?: boolean; }): Promise<User>; count(): Promise<number>; create(requestUser: ReqUserCreation, options?: { cache?: boolean; force?: boolean; }): Promise<User>; /** * Updates a user's name * @param id The ID of the user to update * @param name The new name * @param options Options for the request * @returns The updated user */ updateName(id: string, name: string, options?: { cache?: boolean; }): Promise<User>; /** * Updates a user's avatar * @param id The ID of the user * @param avatarUrl The new avatar URL * @param options Options for the request * @returns The updated user */ updateAvatar(id: string, avatarUrl: string, options?: { cache?: boolean; }): Promise<User>; /** * Updates a user's permissions * @param id The ID of the user to update * @param permissions The new permissions array * @param options Options for the request * @returns The updated user */ updatePermissions(id: string, permissions: string[], options?: { cache?: boolean; }): Promise<User>; /** * @todo Implement in Backend * Lists users with pagination * @param options Pagination and filtering options * @returns A list of users and pagination info */ list(options?: { page?: number; limit?: number; cache?: boolean; }): Promise<ListResponse<User>>; delete(id: string): Promise<boolean>; }