/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { adminActivateUser } from "../funcs/adminActivateUser.js"; import { adminAdminGetUser } from "../funcs/adminAdminGetUser.js"; import { adminAdminListUsers } from "../funcs/adminAdminListUsers.js"; import { adminAnonymizeUser } from "../funcs/adminAnonymizeUser.js"; import { adminDeactivateUser } from "../funcs/adminDeactivateUser.js"; import { adminDeleteUser } from "../funcs/adminDeleteUser.js"; import { adminLogOutUser } from "../funcs/adminLogOutUser.js"; import { adminRefreshGravatar } from "../funcs/adminRefreshGravatar.js"; import { adminSilenceUser } from "../funcs/adminSilenceUser.js"; import { adminSuspendUser } from "../funcs/adminSuspendUser.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Admin extends ClientSDK { /** * Activate a user */ async activateUser( id: number, options?: RequestOptions, ): Promise { return unwrapAsync(adminActivateUser( this, id, options, )); } /** * Get a user by id */ async adminGetUser( id: number, options?: RequestOptions, ): Promise { return unwrapAsync(adminAdminGetUser( this, id, options, )); } /** * Get a list of users */ async adminListUsers( request: operations.AdminListUsersRequest, options?: RequestOptions, ): Promise> { return unwrapAsync(adminAdminListUsers( this, request, options, )); } /** * Anonymize a user */ async anonymizeUser( id: number, options?: RequestOptions, ): Promise { return unwrapAsync(adminAnonymizeUser( this, id, options, )); } /** * Deactivate a user */ async deactivateUser( id: number, options?: RequestOptions, ): Promise { return unwrapAsync(adminDeactivateUser( this, id, options, )); } /** * Delete a user */ async deleteUser( id: number, requestBody?: operations.DeleteUserRequestBody | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(adminDeleteUser( this, id, requestBody, options, )); } /** * Log a user out */ async logOutUser( id: number, options?: RequestOptions, ): Promise { return unwrapAsync(adminLogOutUser( this, id, options, )); } /** * Refresh gravatar */ async refreshGravatar( username: string, options?: RequestOptions, ): Promise { return unwrapAsync(adminRefreshGravatar( this, username, options, )); } /** * Silence a user */ async silenceUser( id: number, requestBody?: operations.SilenceUserRequestBody | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(adminSilenceUser( this, id, requestBody, options, )); } /** * Suspend a user */ async suspendUser( id: number, requestBody?: operations.SuspendUserRequestBody | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(adminSuspendUser( this, id, requestBody, options, )); } }