File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,15 @@ import axios from 'axios';
3
3
import {
4
4
initialize ,
5
5
getInAppMessages ,
6
- updateUserEmail
6
+ updateUserEmail ,
7
+ GenerateJWTPayload
7
8
} from '@iterable/web-sdk' ;
8
9
9
10
( ( ) : void => {
10
11
/* set token in the SDK */
11
12
const { setEmail, logout } = initialize (
12
13
process . env . API_KEY || '' ,
13
- ( { email } ) => {
14
+ ( { email } : GenerateJWTPayload ) => {
14
15
return axios
15
16
. post (
16
17
'http://localhost:5000/generate' ,
Original file line number Diff line number Diff line change @@ -20,20 +20,20 @@ import { config } from '../utils/config';
20
20
21
21
const MAX_TIMEOUT = ONE_DAY ;
22
22
23
- interface GenerateJWTPayload {
23
+ export interface GenerateJWTPayload {
24
24
email ?: string ;
25
25
userID ?: string ;
26
26
}
27
27
28
- interface WithJWT {
28
+ export interface WithJWT {
29
29
clearRefresh : ( ) => void ;
30
30
setEmail : ( email : string ) => Promise < string > ;
31
31
setUserID : ( userId : string ) => Promise < string > ;
32
32
logout : ( ) => void ;
33
33
refreshJwtToken : ( authTypes : string ) => Promise < string > ;
34
34
}
35
35
36
- interface WithoutJWT {
36
+ export interface WithoutJWT {
37
37
setNewAuthToken : ( newToken ?: string ) => void ;
38
38
clearAuthToken : ( ) => void ;
39
39
setEmail : ( email : string ) => void ;
You can’t perform that action at this time.
0 commit comments