@learnpack/learnpack 4.0.12 → 4.0.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,34 +1,35 @@
1
- import { IConfig, IConfigObj } from "./config"
2
-
3
- export interface IPayload {
4
- email: string;
5
- }
6
-
7
- export interface IStartProps {
8
- token: string;
9
- payload: IPayload | null;
10
- }
11
-
12
- type TLoginResponse = {
13
- token: string;
14
- user_id: string;
15
- email: string;
16
- };
17
-
18
- export interface ISession {
19
- sessionStarted: boolean;
20
- token: string | null;
21
- config: IConfig | null;
22
- currentCohort: null;
23
- initialize: () => Promise<boolean>;
24
- setRigoToken: (token: string) => Promise<boolean>;
25
- setPayload: (value: IPayload) => Promise<boolean>;
26
- getPayload: () => Promise<any>;
27
- isActive: () => boolean;
28
- get: (config?: IConfigObj) => Promise<any>;
29
- login: () => Promise<void>;
30
- loginWeb: (email: string, password: string) => Promise<TLoginResponse>;
31
- sync: () => Promise<void>;
32
- start: ({ token, payload }: IStartProps) => Promise<void>;
33
- destroy: () => Promise<void>;
34
- }
1
+ import { IConfig, IConfigObj } from "./config"
2
+
3
+ export interface IPayload {
4
+ email: string
5
+ }
6
+
7
+ export interface IStartProps {
8
+ token: string
9
+ payload: IPayload | null
10
+ }
11
+
12
+ type TLoginResponse = {
13
+ token: string
14
+ user_id: string
15
+ email: string
16
+ }
17
+
18
+ export interface ISession {
19
+ sessionStarted: boolean
20
+ token: string | null
21
+ config: IConfig | null
22
+ currentCohort: null
23
+ initialize: () => Promise<boolean>
24
+ setRigoToken: (token: string) => Promise<boolean>
25
+ setTabHash: (hash: string) => Promise<boolean>
26
+ setPayload: (value: IPayload) => Promise<boolean>
27
+ getPayload: () => Promise<any>
28
+ isActive: () => boolean
29
+ get: (config?: IConfigObj) => Promise<any>
30
+ login: () => Promise<void>
31
+ loginWeb: (email: string, password: string) => Promise<TLoginResponse>
32
+ sync: () => Promise<void>
33
+ start: ({ token, payload }: IStartProps) => Promise<void>
34
+ destroy: () => Promise<void>
35
+ }