urembo-hub-api
Preparing search index...
auth/auth.service
AuthService
Class AuthService
Index
Constructors
constructor
Methods
change
Password
compare
Password
forgot
Password
get
Profile
hash
Password
login
refresh
Token
register
resend
Verification
Email
reset
Password
validate
User
verify
Email
Constructors
constructor
new
AuthService
(
prisma
:
PrismaService
,
jwtService
:
JwtService
,
usersService
:
UsersService
,
emailService
:
EmailService
,
adminNotificationService
:
AdminNotificationService
,
)
:
AuthService
Parameters
prisma
:
PrismaService
jwtService
:
JwtService
usersService
:
UsersService
emailService
:
EmailService
adminNotificationService
:
AdminNotificationService
Returns
AuthService
Methods
change
Password
changePassword
(
userId
:
string
,
currentPassword
:
string
,
newPassword
:
string
,
)
:
Promise
<
{
message
:
string
}
>
Parameters
userId
:
string
currentPassword
:
string
newPassword
:
string
Returns
Promise
<
{
message
:
string
}
>
compare
Password
comparePassword
(
password
:
string
,
hashedPassword
:
string
)
:
Promise
<
boolean
>
Parameters
password
:
string
hashedPassword
:
string
Returns
Promise
<
boolean
>
forgot
Password
forgotPassword
(
email
:
string
)
:
Promise
<
{
message
:
string
}
>
Parameters
email
:
string
Returns
Promise
<
{
message
:
string
}
>
get
Profile
getProfile
(
userId
:
string
,
)
:
Promise
<
{
avatarUrl
:
string
;
businessAddress
:
string
;
businessDescription
:
string
;
businessName
:
string
;
businessPhone
:
string
;
createdAt
:
Date
;
email
:
string
;
fullName
:
string
;
id
:
string
;
isSuspended
:
boolean
;
isVerified
:
boolean
;
onboardingStatus
:
onboarding_status
;
paymentAccountDetails
:
JsonValue
;
paymentAccountType
:
string
;
paymentDetailsVerified
:
boolean
;
phone
:
string
;
role
:
user_role
;
suspendedAt
:
Date
;
suspendedBy
:
string
;
suspensionReason
:
string
;
updatedAt
:
Date
;
}
,
>
Parameters
userId
:
string
Returns
Promise
<
{
avatarUrl
:
string
;
businessAddress
:
string
;
businessDescription
:
string
;
businessName
:
string
;
businessPhone
:
string
;
createdAt
:
Date
;
email
:
string
;
fullName
:
string
;
id
:
string
;
isSuspended
:
boolean
;
isVerified
:
boolean
;
onboardingStatus
:
onboarding_status
;
paymentAccountDetails
:
JsonValue
;
paymentAccountType
:
string
;
paymentDetailsVerified
:
boolean
;
phone
:
string
;
role
:
user_role
;
suspendedAt
:
Date
;
suspendedBy
:
string
;
suspensionReason
:
string
;
updatedAt
:
Date
;
}
,
>
hash
Password
hashPassword
(
password
:
string
)
:
Promise
<
string
>
Parameters
password
:
string
Returns
Promise
<
string
>
login
login
(
loginDto
:
LoginDto
,
)
:
Promise
<
{
access_token
:
string
;
user
:
{
businessName
:
any
;
email
:
any
;
fullName
:
any
;
id
:
any
;
isVerified
:
any
;
onboardingStatus
:
any
;
role
:
any
;
}
;
}
,
>
Parameters
loginDto
:
LoginDto
Returns
Promise
<
{
access_token
:
string
;
user
:
{
businessName
:
any
;
email
:
any
;
fullName
:
any
;
id
:
any
;
isVerified
:
any
;
onboardingStatus
:
any
;
role
:
any
;
}
;
}
,
>
refresh
Token
refreshToken
(
userId
:
string
,
)
:
Promise
<
{
access_token
:
string
;
user
:
{
email
:
string
;
id
:
string
;
role
:
user_role
}
;
}
,
>
Parameters
userId
:
string
Returns
Promise
<
{
access_token
:
string
;
user
:
{
email
:
string
;
id
:
string
;
role
:
user_role
}
;
}
,
>
register
register
(
registerDto
:
RegisterDto
,
)
:
Promise
<
{
access_token
:
string
;
user
:
{
businessName
:
string
;
email
:
string
;
fullName
:
string
;
id
:
string
;
isVerified
:
boolean
;
onboardingStatus
:
onboarding_status
;
role
:
user_role
;
}
;
}
,
>
Parameters
registerDto
:
RegisterDto
Returns
Promise
<
{
access_token
:
string
;
user
:
{
businessName
:
string
;
email
:
string
;
fullName
:
string
;
id
:
string
;
isVerified
:
boolean
;
onboardingStatus
:
onboarding_status
;
role
:
user_role
;
}
;
}
,
>
resend
Verification
Email
resendVerificationEmail
(
userId
:
string
)
:
Promise
<
{
message
:
string
}
>
Parameters
userId
:
string
Returns
Promise
<
{
message
:
string
}
>
reset
Password
resetPassword
(
token
:
string
,
newPassword
:
string
)
:
Promise
<
{
message
:
string
}
>
Parameters
token
:
string
newPassword
:
string
Returns
Promise
<
{
message
:
string
}
>
validate
User
validateUser
(
email
:
string
,
password
:
string
)
:
Promise
<
any
>
Parameters
email
:
string
password
:
string
Returns
Promise
<
any
>
verify
Email
verifyEmail
(
token
:
string
)
:
Promise
<
{
message
:
string
}
>
Parameters
token
:
string
Returns
Promise
<
{
message
:
string
}
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Methods
change
Password
compare
Password
forgot
Password
get
Profile
hash
Password
login
refresh
Token
register
resend
Verification
Email
reset
Password
validate
User
verify
Email
urembo-hub-api
Loading...