Skip to main content

AccountsTypeorm

Implements

  • unknown

Index

Constructors

constructor

Methods

publicaddEmail

  • addEmail(userId: string, newEmail: string, verified: boolean): Promise<void>
  • Parameters

    • userId: string
    • newEmail: string
    • verified: boolean

    Returns Promise<void>

publicaddEmailVerificationToken

  • addEmailVerificationToken(userId: string, email: string, token: string): Promise<void>
  • Parameters

    • userId: string
    • email: string
    • token: string

    Returns Promise<void>

publicaddLoginToken

  • addLoginToken(userId: string, email: string, token: string): Promise<void>
  • Parameters

    • userId: string
    • email: string
    • token: string

    Returns Promise<void>

publicaddResetPasswordToken

  • addResetPasswordToken(userId: string, email: string, token: string, reason: string): Promise<void>
  • Parameters

    • userId: string
    • email: string
    • token: string
    • reason: string

    Returns Promise<void>

publiccreateSession

  • createSession(userId: string, token: string, connection?: ConnectionInformations, extra?: object): Promise<string>
  • Parameters

    • userId: string
    • token: string
    • connection: ConnectionInformations = {}
    • optionalextra: object

    Returns Promise<string>

publiccreateUser

  • createUser(createUser: CreateUser): Promise<string>
  • Parameters

    • createUser: CreateUser

    Returns Promise<string>

publicfindPasswordHash

  • findPasswordHash(userId: string): Promise<null | string>
  • Parameters

    • userId: string

    Returns Promise<null | string>

publicfindSessionById

  • findSessionById(sessionId: string): Promise<null | UserSession>
  • Parameters

    • sessionId: string

    Returns Promise<null | UserSession>

publicfindSessionByToken

  • findSessionByToken(token: string): Promise<null | UserSession>
  • Parameters

    • token: string

    Returns Promise<null | UserSession>

publicfindUserByEmail

  • findUserByEmail(email: string): Promise<null | User>
  • Parameters

    • email: string

    Returns Promise<null | User>

publicfindUserByEmailVerificationToken

  • findUserByEmailVerificationToken(token: string): Promise<null | User>
  • Parameters

    • token: string

    Returns Promise<null | User>

publicfindUserById

  • findUserById(userId: string): Promise<null | User>
  • Parameters

    • userId: string

    Returns Promise<null | User>

publicfindUserByLoginToken

  • findUserByLoginToken(token: string): Promise<null | User>
  • Parameters

    • token: string

    Returns Promise<null | User>

publicfindUserByResetPasswordToken

  • findUserByResetPasswordToken(token: string): Promise<null | User>
  • Parameters

    • token: string

    Returns Promise<null | User>

publicfindUserByServiceId

  • findUserByServiceId(serviceName: string, serviceId: string): Promise<null | User>
  • Parameters

    • serviceName: string
    • serviceId: string

    Returns Promise<null | User>

publicfindUserByUsername

  • findUserByUsername(username: string): Promise<null | User>
  • Parameters

    • username: string

    Returns Promise<null | User>

publicgetService

  • getService(userId: string, serviceName: string): Promise<null | UserService>
  • Parameters

    • userId: string
    • serviceName: string

    Returns Promise<null | UserService>

publicinvalidateAllSessions

  • invalidateAllSessions(userId: string, excludedSessionIds?: string[]): Promise<void>
  • Parameters

    • userId: string
    • optionalexcludedSessionIds: string[]

    Returns Promise<void>

publicinvalidateSession

  • invalidateSession(sessionId: string): Promise<void>
  • Parameters

    • sessionId: string

    Returns Promise<void>

publicremoveAllLoginTokens

  • removeAllLoginTokens(userId: string): Promise<void>
  • Parameters

    • userId: string

    Returns Promise<void>

publicremoveAllResetPasswordTokens

  • removeAllResetPasswordTokens(userId: string): Promise<void>
  • Parameters

    • userId: string

    Returns Promise<void>

publicremoveEmail

  • removeEmail(userId: string, email: string): Promise<void>
  • Parameters

    • userId: string
    • email: string

    Returns Promise<void>

publicsetPassword

  • setPassword(userId: string, newPassword: string): Promise<void>
  • Parameters

    • userId: string
    • newPassword: string

    Returns Promise<void>

publicsetService

  • setService(userId: string, serviceName: string, data: object, token?: string): Promise<void>
  • Parameters

    • userId: string
    • serviceName: string
    • data: object
    • optionaltoken: string

    Returns Promise<void>

publicsetUserDeactivated

  • setUserDeactivated(userId: string, deactivated: boolean): Promise<void>
  • Parameters

    • userId: string
    • deactivated: boolean

    Returns Promise<void>

publicsetUsername

  • setUsername(userId: string, newUsername: string): Promise<void>
  • Parameters

    • userId: string
    • newUsername: string

    Returns Promise<void>

publicunsetService

  • unsetService(userId: string, serviceName: string): Promise<void>
  • Parameters

    • userId: string
    • serviceName: string

    Returns Promise<void>

publicupdateSession

  • updateSession(sessionId: string, connection: ConnectionInformations): Promise<void>
  • Parameters

    • sessionId: string
    • connection: ConnectionInformations

    Returns Promise<void>

publicverifyEmail

  • verifyEmail(userId: string, email: string): Promise<void>
  • Parameters

    • userId: string
    • email: string

    Returns Promise<void>