lavva.exalushome
Version:
Library implementing communication and abstraction layers for ExalusHome system
42 lines (41 loc) • 1.37 kB
TypeScript
import { ITypedEvent } from "../../TypedEvent";
import { IUser, AccessLevel, Gender } from '../Users/IUser';
import { ISessionService, LoginError } from "./ISessionService";
export declare class SessionService implements ISessionService {
private _onUserLoggedInEvent;
private _onUserLoggedOutEvent;
static readonly ServiceName: string;
private _email;
private _password;
private _authToken;
private _alreadySubsribedToNetworkEvents;
private _isLoggedIn;
private _user;
private isLoginError;
RestoreSessionAsync(): Promise<boolean>;
WaitForSessionCreationAsync(): Promise<void>;
OnUserLoggedInEvent(): ITypedEvent<IUser>;
OnUserLoggedOutEvent(): ITypedEvent<IUser>;
get User(): IUser | null;
UserLogOutAsync(): Promise<void>;
AuthorizeAppAsync(authToken: string): Promise<IUser | LoginError>;
UserLogInAsync(email: string, password: string): Promise<IUser | LoginError>;
GetServiceName(): string;
}
export declare class UserData {
Guid: string;
Name: string;
Surname: string;
Password: string;
Email: string;
Phone: string;
IsActive: boolean;
IsBanned: boolean;
IsAccountOnline: boolean;
AccessLevel: AccessLevel;
Gender: Gender;
ConfigurationTime: string;
IsGeolocationSet: boolean;
SoftwareVersion: string;
UpdatesChannel: string;
}