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';
33import {
44 initialize ,
55 getInAppMessages ,
6- updateUserEmail
6+ updateUserEmail ,
7+ GenerateJWTPayload
78} from '@iterable/web-sdk' ;
89
910( ( ) : void => {
1011 /* set token in the SDK */
1112 const { setEmail, logout } = initialize (
1213 process . env . API_KEY || '' ,
13- ( { email } ) => {
14+ ( { email } : GenerateJWTPayload ) => {
1415 return axios
1516 . post (
1617 'http://localhost:5000/generate' ,
Original file line number Diff line number Diff line change @@ -20,20 +20,20 @@ import { config } from '../utils/config';
2020
2121const MAX_TIMEOUT = ONE_DAY ;
2222
23- interface GenerateJWTPayload {
23+ export interface GenerateJWTPayload {
2424 email ?: string ;
2525 userID ?: string ;
2626}
2727
28- interface WithJWT {
28+ export interface WithJWT {
2929 clearRefresh : ( ) => void ;
3030 setEmail : ( email : string ) => Promise < string > ;
3131 setUserID : ( userId : string ) => Promise < string > ;
3232 logout : ( ) => void ;
3333 refreshJwtToken : ( authTypes : string ) => Promise < string > ;
3434}
3535
36- interface WithoutJWT {
36+ export interface WithoutJWT {
3737 setNewAuthToken : ( newToken ?: string ) => void ;
3838 clearAuthToken : ( ) => void ;
3939 setEmail : ( email : string ) => void ;
You can’t perform that action at this time.
0 commit comments