AccountsTypeorm

@accounts/typeormGlobalsAccountsTypeorm

Hierarchy

  • AccountsTypeorm

Implements

  • DatabaseInterface

Index

Constructors

Methods

Constructors

constructor

+ new AccountsTypeorm(options?: AccountsTypeormOptions): AccountsTypeorm

Defined in typeorm.ts:21

Parameters:

NameType
options?AccountsTypeormOptions

Returns: AccountsTypeorm

Methods

addEmail

addEmail(userId: string, newEmail: string, verified: boolean): Promise‹void›

Defined in typeorm.ts:285

Parameters:

NameType
userIdstring
newEmailstring
verifiedboolean

Returns: Promise‹void›


addEmailVerificationToken

addEmailVerificationToken(userId: string, email: string, token: string): Promise‹void›

Defined in typeorm.ts:330

Parameters:

NameType
userIdstring
emailstring
tokenstring

Returns: Promise‹void›


addResetPasswordToken

addResetPasswordToken(userId: string, email: string, token: string, reason: string): Promise‹void›

Defined in typeorm.ts:256

Parameters:

NameType
userIdstring
emailstring
tokenstring
reasonstring

Returns: Promise‹void›


createSession

createSession(userId: string, token: string, connection: ConnectionInformations, extra?: object): Promise‹string›

Defined in typeorm.ts:387

Parameters:

NameTypeDefault
userIdstring-
tokenstring-
connectionConnectionInformations{}
extra?object-

Returns: Promise‹string›


createUser

createUser(createUser: CreateUser): Promise‹string›

Defined in typeorm.ts:126

Parameters:

NameType
createUserCreateUser

Returns: Promise‹string›


findPasswordHash

findPasswordHash(userId: string): Promise‹string | null›

Defined in typeorm.ts:238

Parameters:

NameType
userIdstring

Returns: Promise‹string | null›


findSessionById

findSessionById(sessionId: string): Promise‹UserSession | null›

Defined in typeorm.ts:358

Parameters:

NameType
sessionIdstring

Returns: Promise‹UserSession | null›


findSessionByToken

findSessionByToken(token: string): Promise‹UserSession‹››

Defined in typeorm.ts:374

Parameters:

NameType
tokenstring

Returns: Promise‹UserSession‹››


findUserByEmail

findUserByEmail(email: string): Promise‹User | null›

Defined in typeorm.ts:57

Parameters:

NameType
emailstring

Returns: Promise‹User | null›


findUserByEmailVerificationToken

findUserByEmailVerificationToken(token: string): Promise‹User | null›

Defined in typeorm.ts:110

Parameters:

NameType
tokenstring

Returns: Promise‹User | null›


findUserById

findUserById(userId: string): Promise‹User | null›

Defined in typeorm.ts:83

Parameters:

NameType
userIdstring

Returns: Promise‹User | null›


findUserByResetPasswordToken

findUserByResetPasswordToken(token: string): Promise‹User | null›

Defined in typeorm.ts:94

Parameters:

NameType
tokenstring

Returns: Promise‹User | null›


findUserByServiceId

findUserByServiceId(serviceName: string, serviceId: string): Promise‹User | null›

Defined in typeorm.ts:168

Parameters:

NameType
serviceNamestring
serviceIdstring

Returns: Promise‹User | null›


findUserByUsername

findUserByUsername(username: string): Promise‹User | null›

Defined in typeorm.ts:70

Parameters:

NameType
usernamestring

Returns: Promise‹User | null›


getService

getService(userId: string, serviceName: string): Promise‹UserService | null›

Defined in typeorm.ts:182

Parameters:

NameType
userIdstring
serviceNamestring

Returns: Promise‹UserService | null›


invalidateAllSessions

invalidateAllSessions(userId: string, excludedSessionIds?: string[]): Promise‹void›

Defined in typeorm.ts:425

Parameters:

NameType
userIdstring
excludedSessionIds?string[]

Returns: Promise‹void›


invalidateSession

invalidateSession(sessionId: string): Promise‹void›

Defined in typeorm.ts:417

Parameters:

NameType
sessionIdstring

Returns: Promise‹void›


removeAllResetPasswordTokens

removeAllResetPasswordTokens(userId: string): Promise‹void›

Defined in typeorm.ts:346

Parameters:

NameType
userIdstring

Returns: Promise‹void›


removeEmail

removeEmail(userId: string, email: string): Promise‹void›

Defined in typeorm.ts:299

Parameters:

NameType
userIdstring
emailstring

Returns: Promise‹void›


setPassword

setPassword(userId: string, newPassword: string): Promise‹void›

Defined in typeorm.ts:246

Parameters:

NameType
userIdstring
newPasswordstring

Returns: Promise‹void›


setResetPassword

setResetPassword(userId: string, email: string, newPassword: string, token?: string): Promise‹void›

Defined in typeorm.ts:274

Parameters:

NameType
userIdstring
emailstring
newPasswordstring
token?string

Returns: Promise‹void›


setService

setService(userId: string, serviceName: string, data: object, token?: string): Promise‹void›

Defined in typeorm.ts:194

Parameters:

NameType
userIdstring
serviceNamestring
dataobject
token?string

Returns: Promise‹void›


setUserDeactivated

setUserDeactivated(userId: string, deactivated: boolean): Promise‹void›

Defined in typeorm.ts:350

Parameters:

NameType
userIdstring
deactivatedboolean

Returns: Promise‹void›


setUsername

setUsername(userId: string, newUsername: string): Promise‹void›

Defined in typeorm.ts:158

Parameters:

NameType
userIdstring
newUsernamestring

Returns: Promise‹void›


unsetService

unsetService(userId: string, serviceName: string): Promise‹void›

Defined in typeorm.ts:228

Parameters:

NameType
userIdstring
serviceNamestring

Returns: Promise‹void›


updateSession

updateSession(sessionId: string, connection: ConnectionInformations): Promise‹void›

Defined in typeorm.ts:408

Parameters:

NameType
sessionIdstring
connectionConnectionInformations

Returns: Promise‹void›


verifyEmail

verifyEmail(userId: string, email: string): Promise‹void›

Defined in typeorm.ts:313

Parameters:

NameType
userIdstring
emailstring

Returns: Promise‹void›