lavva.exalushome
Version:
Library implementing communication and abstraction layers for ExalusHome system
19 lines (18 loc) • 665 B
TypeScript
import { IDIService } from "../../IDIService";
import { ITypedEvent } from "../../TypedEvent";
import { IUser } from "../Users/IUser";
export interface ISessionService extends IDIService {
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>;
}
export declare enum LoginError {
Unknown = 0,
WrongAuthData = 1,
NoResponseFromController = 2,
AuthDisabled = 3,
MethodNotSupported = 4
}