@learnpack/learnpack 4.0.12 → 4.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
+ }