AuthModule
Provides authentication-related methods to interact with the API.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AuthModule(
client):AuthModule
Parameters
Section titled “Parameters”client
Section titled “client”Returns
Section titled “Returns”AuthModule
Methods
Section titled “Methods”changePassword()
Section titled “changePassword()”changePassword(
data):Promise<any>
Changes the user’s password.
Parameters
Section titled “Parameters”currentPassword
Section titled “currentPassword”string
newPassword
Section titled “newPassword”string
Returns
Section titled “Returns”Promise<any>
login()
Section titled “login()”login(
password):Promise<any>
Authenticates a user with email and password.
Parameters
Section titled “Parameters”string
The user’s email address.
password
Section titled “password”string
The user’s password.
Returns
Section titled “Returns”Promise<any>
A promise resolving to the authentication response containing the token.
me():
Promise<any>
Retrieves the current authenticated user’s profile and permissions.
Returns
Section titled “Returns”Promise<any>
A promise resolving to the user profile and their associated permissions.
updateProfile()
Section titled “updateProfile()”updateProfile(
data):Promise<any>
Updates the authenticated user’s profile.
Parameters
Section titled “Parameters”avatarUrl?
Section titled “avatarUrl?”string
firstName
Section titled “firstName”string
lastName
Section titled “lastName”string
Returns
Section titled “Returns”Promise<any>