import { UserRepository } from '../../common/api/User'; import { BootstrapError } from '../../common/api'; import { Simple, Gda, GdaConfigurer } from '@zetapush/platform-legacy'; import { UserProfile, AccountStatus, LoginPasswordCredentials, Account } from '../api'; import { Bootstrappable } from '@zetapush/core'; import { BaseError } from '@zetapush/common'; export declare class LegacySimpleError extends BaseError { constructor(message: string, cause?: Error); } export declare class LegacyUpdateAccountStatus extends LegacySimpleError { accountId: string; constructor(message: string, accountId: string, cause?: Error); } export declare class LegacyLoginAlreadyUsedError extends LegacySimpleError { login: string; constructor(message: string, login: string); } export declare class AccountIdAssociationLoadError extends LegacySimpleError { accountId: string; constructor(message: string, accountId: string, cause?: Error); } export declare class UserNotExists extends LegacySimpleError { login: string; constructor(message: string, login: string, cause?: Error); } export declare const USER_LEGACY_ADAPTER_TABLE_SIMPLE_ASSOCIATIONS = "LegacySimpleAssociations"; export declare const USER_LEGACY_ADAPTER_TABLE_LOGIN_ASSOCIATION = "LegacyLoginAssociation"; export declare const USER_LEGACY_ADAPTER_COLUMN_DATA = "data"; export declare class LegacyAdapterUserRepositoryBootstrapError extends BootstrapError { } export declare class LegacyAdapterUserRepository implements Bootstrappable, UserRepository { private simple; private gda; private gdaConfigurer; constructor(simple: Simple, gda: Gda, gdaConfigurer: GdaConfigurer); onApplicationBootstrap(): Promise; exists(credentials: LoginPasswordCredentials): Promise; addUser(credentials: LoginPasswordCredentials, userProfile: UserProfile, accountStatus: AccountStatus, accountId: string): Promise; /** * Get the userKey of a user from his accountId * @param accountId */ getUserKey(accountId: string): Promise; getProfile(accountId: string): Promise; /** * Get the login of a user from his ID * @param accountId unique ID of a user */ getLoginFromAccountId(accountId: string): Promise; /** * Retrieve the account object from his login. * Used for the lost password feature * @param login Login of the user */ getAccountFromLogin(login: string): Promise; /** * Retrieve the account object from the specified accountId * @param accountId accountId of the user */ getAccountFromAccountId(accountId: string): Promise; /** * Update the status of an user (active of inactive) * @param accountId Unique ID of the user account * @param newStatus The new status of the user account (active or inactive) */ updateStatus(accountId: string, newStatus: AccountStatus): Promise; /** * Save the association between an accountId and his login and his userKey * @param accountId unique ID of the user * @param userKey Technical ID of the user (inherent of the ZetaPush platform) * @param login Login of the user account */ private saveAssociations; }