UI for Zipcoin Blue

session.d.ts 958B

1234567891011121314151617181920212223242526
  1. import { IClient, IConfig, IProject, ISession, IonicEnvironment } from '../definitions';
  2. export declare class BaseSession {
  3. protected config: IConfig;
  4. protected project: IProject;
  5. protected client: IClient;
  6. constructor(config: IConfig, project: IProject, client: IClient);
  7. isLoggedIn(): Promise<boolean>;
  8. logout(): Promise<void>;
  9. getUser(): Promise<{
  10. id: number;
  11. }>;
  12. getUserToken(): Promise<string>;
  13. }
  14. export declare class CloudSession extends BaseSession implements ISession {
  15. login(email: string, password: string): Promise<void>;
  16. getAppUserToken(app_id?: string): Promise<string>;
  17. }
  18. export declare class ProSession extends BaseSession implements ISession {
  19. login(email: string, password: string): Promise<void>;
  20. getUser(): Promise<{
  21. id: number;
  22. }>;
  23. getAppUserToken(app_id?: string): Promise<string>;
  24. }
  25. export declare function promptToLogin(env: IonicEnvironment): Promise<void>;