Interface AccountRepository
Methods
checkUserPassword
- checkUserPassword(id: bigint, password: string): Promise<boolean>
-
Parameters
-
id: bigint
-
password: string
Returns Promise<boolean>
checkVerification
- checkVerification(userId: bigint, action: VerificationIntent, code: string, noExpire?: boolean): Promise<void>
-
Parameters
-
userId: bigint
-
-
code: string
-
Optional
noExpire: boolean
Returns Promise<void>
createByExternal
- createByExternal(type: string, profile: Profile): Promise<User>
-
Returns Promise<User>
createUser
- createUser(data: Partial<User & { password: string }>): Promise<User>
-
Parameters
-
data: Partial<User & { password: string }>
Returns Promise<User>
expireVerification
- expireVerification(userId: bigint): Promise<void>
-
Returns Promise<void>
getByExternal
- getByExternal(type: string, profile: Profile): Promise<undefined | User>
-
Returns Promise<undefined | User>
getUserByEmail
- getUserByEmail(email: string): Promise<undefined | User>
-
Returns Promise<undefined | User>
getUserById
- getUserById(id: bigint): Promise<undefined | User>
-
Returns Promise<undefined | User>
getUserByUsername
- getUserByUsername(username: string): Promise<undefined | User>
-
Returns Promise<undefined | User>
getUserExternalProfiles
- getUserExternalProfiles(id: bigint): Promise<Record<string, null | Profile>>
-
Returns Promise<Record<string, null | Profile>>
getUserPreferences
- getUserPreferences<T>(userId: bigint): Promise<T>
-
Returns Promise<T>
getUserProfiles
- getUserProfiles<T>(userId: bigint): Promise<T>
-
Returns Promise<T>
getUsersByIdList
- getUsersByIdList(ids: bigint[]): Promise<User[]>
-
Returns Promise<User[]>
setExternalForUser
- setExternalForUser(user: User, type: string, profile: Profile): Promise<void>
-
Returns Promise<void>
setUserPreference
- setUserPreference<T>(userId: bigint, key: string, value: T): Promise<void>
-
Parameters
-
userId: bigint
-
key: string
-
value: T
Returns Promise<void>
setUserProfile
- setUserProfile<T>(userId: bigint, key: string, value: T): Promise<void>
-
Parameters
-
userId: bigint
-
key: string
-
value: T
Returns Promise<void>
updateUser
- updateUser(id: bigint, data: Partial<User & { password: string }>): Promise<undefined | User>
-
Parameters
-
id: bigint
-
data: Partial<User & { password: string }>
Returns Promise<undefined | User>