UNPKG

cnpmcore

Version:

Private NPM Registry for Enterprise

29 lines (28 loc) 1.46 kB
import { Token as TokenEntity } from '../core/entity/Token.ts'; import { User as UserEntity } from '../core/entity/User.ts'; import { WebauthnCredential as WebauthnCredentialEntity } from '../core/entity/WebauthnCredential.ts'; import { AbstractRepository } from './AbstractRepository.ts'; export declare class UserRepository extends AbstractRepository { private readonly User; private readonly Token; private readonly TokenPackage; private readonly Package; private readonly packageRepository; private readonly WebauthnCredential; saveUser(user: UserEntity): Promise<void>; findUserByName(name: string): Promise<UserEntity | null>; findUserByUserId(userId: string): Promise<UserEntity | null>; findUsersByUserIds(userIds: string[]): Promise<UserEntity[]>; findUserAndTokenByTokenKey(tokenKey: string): Promise<{ token: TokenEntity; user: UserEntity; } | null>; findTokenByTokenKey(tokenKey: string): Promise<TokenEntity | null>; private _injectTokenPackages; saveToken(token: TokenEntity): Promise<void>; removeToken(tokenId: string): Promise<void>; listTokens(userId: string): Promise<TokenEntity[]>; saveCredential(credential: WebauthnCredentialEntity): Promise<void>; findCredentialByUserIdAndBrowserType(userId: string | undefined, browserType: string | null): Promise<WebauthnCredentialEntity | null>; removeCredential(wancId: string): Promise<void>; }