/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { userProfileChangePassword } from "../funcs/user-profile-change-password.js"; import { userProfileDeleteAccount } from "../funcs/user-profile-delete-account.js"; import { userProfileDeleteSession } from "../funcs/user-profile-delete-session.js"; import { userProfileGetProfile } from "../funcs/user-profile-get-profile.js"; import { userProfileListSessions } from "../funcs/user-profile-list-sessions.js"; import { userProfileUpdateProfile } from "../funcs/user-profile-update-profile.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class UserProfile extends ClientSDK { /** * Get current user profile * * @remarks * Returns the authenticated user profile information */ async getProfile( options?: RequestOptions, ): Promise { return unwrapAsync(userProfileGetProfile( this, options, )); } /** * Update user profile * * @remarks * Update the authenticated user profile (name, email, avatar) */ async updateProfile( request: models.NameEmailAvatarUrl, options?: RequestOptions, ): Promise { return unwrapAsync(userProfileUpdateProfile( this, request, options, )); } /** * Delete account * * @remarks * Soft delete the authenticated user account. Requires confirmation string "DELETE MY ACCOUNT". */ async deleteAccount( request: operations.DeleteAccountRequest, options?: RequestOptions, ): Promise { return unwrapAsync(userProfileDeleteAccount( this, request, options, )); } /** * Change password * * @remarks * Change the authenticated user password. Requires current password verification. */ async changePassword( request: models.CurrentPasswordNewPassword, options?: RequestOptions, ): Promise { return unwrapAsync(userProfileChangePassword( this, request, options, )); } /** * List active sessions * * @remarks * Returns all active sessions for the authenticated user */ async listSessions( options?: RequestOptions, ): Promise { return unwrapAsync(userProfileListSessions( this, options, )); } /** * Revoke session * * @remarks * Revoke a specific session. Cannot revoke the current session. */ async deleteSession( request: operations.DeleteSessionRequest, options?: RequestOptions, ): Promise { return unwrapAsync(userProfileDeleteSession( this, request, options, )); } }