@coorpacademy/app-review 0.0.14-alpha.1 → 0.0.14-alpha.4.3
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.
- package/es/actions/courses.d.ts +7 -0
- package/es/actions/courses.d.ts.map +1 -0
- package/es/actions/courses.js +5 -0
- package/es/actions/index.d.ts +6 -0
- package/es/actions/index.d.ts.map +1 -1
- package/es/actions/index.js +2 -0
- package/es/actions/navigation.d.ts +6 -6
- package/es/actions/navigation.d.ts.map +1 -1
- package/es/actions/token.d.ts +7 -0
- package/es/actions/token.d.ts.map +1 -0
- package/es/actions/token.js +5 -0
- package/es/components/__tmp-backup-vues-mobile/revision-home.stories.d.ts +0 -1
- package/es/components/__tmp-backup-vues-mobile/revision-home.stories.js +14 -14
- package/es/configure-store.d.ts +9 -2
- package/es/configure-store.d.ts.map +1 -1
- package/es/configure-store.js +3 -1
- package/es/index.d.ts +2 -0
- package/es/index.d.ts.map +1 -1
- package/es/middlewares/on-start-app.d.ts +7 -0
- package/es/middlewares/on-start-app.d.ts.map +1 -0
- package/es/middlewares/on-start-app.js +17 -0
- package/es/reducers/courses.d.ts +6 -0
- package/es/reducers/courses.d.ts.map +1 -0
- package/es/reducers/courses.js +14 -0
- package/es/reducers/index.d.ts +1 -0
- package/es/reducers/index.d.ts.map +1 -1
- package/es/reducers/index.js +2 -0
- package/es/reducers/navigation.d.ts +2 -2
- package/es/reducers/navigation.d.ts.map +1 -1
- package/es/reducers/token.d.ts +2 -2
- package/es/reducers/token.d.ts.map +1 -1
- package/es/reducers/token.js +3 -3
- package/es/services/fetch-demo.d.ts +11 -2
- package/es/services/fetch-demo.d.ts.map +1 -1
- package/es/services/fetch-demo.js +6 -4
- package/es/services/fetch-demo.test.js +8 -7
- package/es/services/fetch-responses.d.ts +20 -0
- package/es/services/fetch-responses.d.ts.map +1 -0
- package/es/services/fetch-responses.js +33 -0
- package/es/services/fetch.mocks.d.ts +10 -0
- package/es/services/fetch.mocks.d.ts.map +1 -0
- package/es/services/fetch.mocks.js +12 -0
- package/lib/actions/courses.d.ts +7 -0
- package/lib/actions/courses.d.ts.map +1 -0
- package/lib/actions/courses.js +9 -0
- package/lib/actions/index.d.ts +6 -0
- package/lib/actions/index.d.ts.map +1 -1
- package/lib/actions/index.js +2 -0
- package/lib/actions/navigation.d.ts +6 -6
- package/lib/actions/navigation.d.ts.map +1 -1
- package/lib/actions/token.d.ts +7 -0
- package/lib/actions/token.d.ts.map +1 -0
- package/lib/actions/token.js +9 -0
- package/lib/components/__tmp-backup-vues-mobile/revision-home.stories.d.ts +0 -1
- package/lib/components/__tmp-backup-vues-mobile/revision-home.stories.js +14 -16
- package/lib/configure-store.d.ts +9 -2
- package/lib/configure-store.d.ts.map +1 -1
- package/lib/configure-store.js +3 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/middlewares/on-start-app.d.ts +7 -0
- package/lib/middlewares/on-start-app.d.ts.map +1 -0
- package/lib/middlewares/on-start-app.js +22 -0
- package/lib/reducers/courses.d.ts +6 -0
- package/lib/reducers/courses.d.ts.map +1 -0
- package/lib/reducers/courses.js +27 -0
- package/lib/reducers/index.d.ts +1 -0
- package/lib/reducers/index.d.ts.map +1 -1
- package/lib/reducers/index.js +2 -0
- package/lib/reducers/navigation.d.ts +2 -2
- package/lib/reducers/navigation.d.ts.map +1 -1
- package/lib/reducers/token.d.ts +2 -2
- package/lib/reducers/token.d.ts.map +1 -1
- package/lib/reducers/token.js +3 -3
- package/lib/services/fetch-demo.d.ts +11 -2
- package/lib/services/fetch-demo.d.ts.map +1 -1
- package/lib/services/fetch-demo.js +8 -6
- package/lib/services/fetch-demo.test.js +10 -9
- package/lib/services/fetch-responses.d.ts +20 -0
- package/lib/services/fetch-responses.d.ts.map +1 -0
- package/lib/services/fetch-responses.js +118 -0
- package/lib/services/fetch.mocks.d.ts +10 -0
- package/lib/services/fetch.mocks.d.ts.map +1 -0
- package/lib/services/fetch.mocks.js +31 -0
- package/package.json +5 -5
- package/readme.md +2 -0
- package/src/actions/courses.ts +11 -0
- package/src/actions/index.ts +8 -0
- package/src/actions/navigation.ts +6 -6
- package/src/actions/token.ts +11 -0
- package/src/components/__tmp-backup-vues-mobile/revision-home.stories.tsx +14 -14
- package/src/configure-store.ts +14 -1
- package/src/index.tsx +2 -0
- package/src/middlewares/on-start-app.ts +30 -0
- package/src/reducers/courses.ts +22 -0
- package/src/reducers/index.ts +3 -0
- package/src/reducers/navigation.ts +2 -2
- package/src/reducers/token.ts +4 -5
- package/src/services/fetch-demo.test.ts +10 -7
- package/src/services/fetch-demo.ts +11 -4
- package/src/services/fetch-responses.ts +53 -0
- package/src/services/fetch.mocks.ts +26 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const RECEIVED_COURSE = "@@api/RECEIVED_COURSE";
|
|
2
|
+
export declare type ReceivedCourse = {
|
|
3
|
+
type: '@@api/RECEIVED_COURSE';
|
|
4
|
+
payload: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const receivedCourse: (course: any) => ReceivedCourse;
|
|
7
|
+
//# sourceMappingURL=courses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"courses.d.ts","sourceRoot":"","sources":["../../src/actions/courses.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,0BAA0B,CAAC;AAEvD,oBAAY,cAAc,GAAG;IAC3B,IAAI,EAAE,uBAAuB,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,cAAc,WAAY,GAAG,KAAG,cAG3C,CAAC"}
|
package/es/actions/index.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
import { ReceivedCourse } from './courses';
|
|
2
|
+
import { NavigateBack, NavigateTo, StartApp } from './navigation';
|
|
3
|
+
import { StoreToken } from './token';
|
|
4
|
+
export * from './courses';
|
|
1
5
|
export * from './navigation';
|
|
6
|
+
export * from './token';
|
|
7
|
+
export declare type Action = StartApp | StoreToken | NavigateBack | NavigateTo | ReceivedCourse;
|
|
2
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AACzC,OAAO,EAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAC,MAAM,cAAc,CAAC;AAChE,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;AAEnC,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AAExB,oBAAY,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,GAAG,cAAc,CAAC"}
|
package/es/actions/index.js
CHANGED
|
@@ -3,18 +3,18 @@ import { AppOptions } from '..';
|
|
|
3
3
|
export declare const NAVIGATE_TO = "@@navigation/NAVIGATE_TO";
|
|
4
4
|
export declare const NAVIGATE_BACK = "@@navigation/NAVIGATE_BACK";
|
|
5
5
|
export declare const START_APP = "@@navigation/START_APP";
|
|
6
|
-
export declare type
|
|
6
|
+
export declare type NavigateTo = {
|
|
7
7
|
type: '@@navigation/NAVIGATE_TO';
|
|
8
8
|
payload: string;
|
|
9
9
|
};
|
|
10
|
-
export declare type
|
|
10
|
+
export declare type NavigateBack = {
|
|
11
11
|
type: '@@navigation/NAVIGATE_BACK';
|
|
12
12
|
};
|
|
13
|
-
export declare type
|
|
13
|
+
export declare type StartApp = {
|
|
14
14
|
type: '@@navigation/START_APP';
|
|
15
15
|
payload: AppOptions;
|
|
16
16
|
};
|
|
17
|
-
export declare const navigateTo: ActionCreator
|
|
18
|
-
export declare const navigateBack: ActionCreator
|
|
19
|
-
export declare const startApp: (options: AppOptions) =>
|
|
17
|
+
export declare const navigateTo: ActionCreator<NavigateTo>;
|
|
18
|
+
export declare const navigateBack: ActionCreator<NavigateBack>;
|
|
19
|
+
export declare const startApp: (options: AppOptions) => StartApp;
|
|
20
20
|
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/actions/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AACpC,OAAO,EAAC,UAAU,EAAC,MAAM,IAAI,CAAC;AAE9B,eAAO,MAAM,WAAW,6BAA6B,CAAC;AACtD,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAC1D,eAAO,MAAM,SAAS,2BAA2B,CAAC;AAElD,oBAAY,
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/actions/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AACpC,OAAO,EAAC,UAAU,EAAC,MAAM,IAAI,CAAC;AAE9B,eAAO,MAAM,WAAW,6BAA6B,CAAC;AACtD,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAC1D,eAAO,MAAM,SAAS,2BAA2B,CAAC;AAElD,oBAAY,UAAU,GAAG;IACvB,IAAI,EAAE,0BAA0B,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,IAAI,EAAE,4BAA4B,CAAC;CACpC,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,IAAI,EAAE,wBAAwB,CAAC;IAC/B,OAAO,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,aAAa,CAAC,UAAU,CAG/C,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE,aAAa,CAAC,YAAY,CAEnD,CAAC;AAEH,eAAO,MAAM,QAAQ,YAAa,UAAU,KAAG,QAG7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../src/actions/token.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,wBAAwB,CAAC;AAEjD,oBAAY,UAAU,GAAG;IACvB,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,UAAU,UAAW,MAAM,KAAG,UAGzC,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import RevisionHome from './revision-home';
|
|
4
|
-
const emptySkills = [];
|
|
5
|
-
const skillsToRevise = [
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
];
|
|
12
|
-
storiesOf('RevisionHome', module)
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
// import * as React from 'react';
|
|
2
|
+
// import {storiesOf} from '@storybook/react-native';
|
|
3
|
+
// import RevisionHome from './revision-home';
|
|
4
|
+
// const emptySkills: [] = [];
|
|
5
|
+
// const skillsToRevise: {title: string; info: string}[] = [
|
|
6
|
+
// {title: 'Negotiation and powers of persuasion', info: '75 questions to revise'},
|
|
7
|
+
// {title: 'Negotiation and powers of persuasion', info: '75 questions to revise'},
|
|
8
|
+
// {title: 'Negotiation and powers of persuasion', info: '75 questions to revise'},
|
|
9
|
+
// {title: 'Negotiation and powers of persuasion', info: '75 questions to revise'},
|
|
10
|
+
// {title: 'Creativity and innovation', info: '75 questions to revise'}
|
|
11
|
+
// ];
|
|
12
|
+
// storiesOf('RevisionHome', module)
|
|
13
|
+
// .add('No skills', () => <RevisionHome skillsToRevise={emptySkills} />)
|
|
14
|
+
// .add('Few skills', () => <RevisionHome skillsToRevise={skillsToRevise} />);
|
package/es/configure-store.d.ts
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
import { State as NavigationState } from './reducers/navigation';
|
|
2
|
+
import { State as TokenState } from './reducers/token';
|
|
1
3
|
export default function configureStore(): import("redux").Store<import("redux").EmptyObject & {
|
|
2
|
-
|
|
4
|
+
courses: import("./reducers/courses").State;
|
|
5
|
+
navigation: NavigationState;
|
|
3
6
|
token: string;
|
|
4
7
|
}, import("redux").AnyAction> & {
|
|
5
|
-
dispatch:
|
|
8
|
+
dispatch: {};
|
|
9
|
+
};
|
|
10
|
+
export declare type StoreState = {
|
|
11
|
+
navigation: NavigationState;
|
|
12
|
+
token: TokenState;
|
|
6
13
|
};
|
|
7
14
|
//# sourceMappingURL=configure-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure-store.d.ts","sourceRoot":"","sources":["../src/configure-store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"configure-store.d.ts","sourceRoot":"","sources":["../src/configure-store.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,KAAK,IAAI,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAC,KAAK,IAAI,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAOrD,MAAM,CAAC,OAAO,UAAU,cAAc;;;;;;EAcrC;AAID,oBAAY,UAAU,GAAG;IACvB,UAAU,EAAE,eAAe,CAAC;IAC5B,KAAK,EAAE,UAAU,CAAC;CACnB,CAAC"}
|
package/es/configure-store.js
CHANGED
|
@@ -2,7 +2,9 @@ import { applyMiddleware, compose, createStore } from 'redux';
|
|
|
2
2
|
import thunk from 'redux-thunk';
|
|
3
3
|
import { composeWithDevTools } from 'redux-devtools-extension';
|
|
4
4
|
import rootReducer from './reducers';
|
|
5
|
+
import onStartApp from './middlewares/on-start-app';
|
|
5
6
|
const preloadedState = undefined;
|
|
7
|
+
// -----------------------------------------------------------------------------
|
|
6
8
|
export default function configureStore() {
|
|
7
9
|
const _compose = process.env.NODE_ENV !== 'production'
|
|
8
10
|
? composeWithDevTools({
|
|
@@ -11,7 +13,7 @@ export default function configureStore() {
|
|
|
11
13
|
traceLimit: 25
|
|
12
14
|
})
|
|
13
15
|
: compose;
|
|
14
|
-
const enhancer = _compose(applyMiddleware(thunk));
|
|
16
|
+
const enhancer = _compose(applyMiddleware(thunk, onStartApp));
|
|
15
17
|
const store = createStore(rootReducer, preloadedState, enhancer);
|
|
16
18
|
return store;
|
|
17
19
|
}
|
package/es/index.d.ts
CHANGED
package/es/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAmBA,QAAA,MAAM,WAAW,gBAAe,KAAK,gBAgBpC,CAAC;AAIF,aAAK,KAAK,GAAG;IAAC,OAAO,EAAE,UAAU,CAAA;CAAC,CAAC;AAEnC,oBAAY,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAmBA,QAAA,MAAM,WAAW,gBAAe,KAAK,gBAgBpC,CAAC;AAIF,aAAK,KAAK,GAAG;IAAC,OAAO,EAAE,UAAU,CAAA;CAAC,CAAC;AAEnC,oBAAY,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,YAAY,CAAC,EAAE,GAAG,CAAC;CACpB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Middleware } from 'redux';
|
|
2
|
+
import { Dispatch } from 'redux';
|
|
3
|
+
import { Action } from '../actions';
|
|
4
|
+
import { StoreState } from '../configure-store';
|
|
5
|
+
declare const onStartApp: Middleware<{}, StoreState, Dispatch<Action>>;
|
|
6
|
+
export default onStartApp;
|
|
7
|
+
//# sourceMappingURL=on-start-app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"on-start-app.d.ts","sourceRoot":"","sources":["../../src/middlewares/on-start-app.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,MAAM,EAAwC,MAAM,YAAY,CAAC;AACzE,OAAO,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAG9C,QAAA,MAAM,UAAU,EAAE,UAAU,CAAC,EAAE,EAAE,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,CAmB5D,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { receivedCourse, START_APP, storeToken } from '../actions';
|
|
2
|
+
import fetchCourse from '../services/fetch-demo';
|
|
3
|
+
const onStartApp = ({ dispatch }) => next => (action) => {
|
|
4
|
+
if (action.type === START_APP) {
|
|
5
|
+
const { token } = action.payload;
|
|
6
|
+
dispatch(storeToken(token));
|
|
7
|
+
// --------------
|
|
8
|
+
// demo service
|
|
9
|
+
const language = 'fr';
|
|
10
|
+
const universalRef = 'dis_xxx15';
|
|
11
|
+
fetchCourse(token, language, universalRef).then(course => {
|
|
12
|
+
dispatch(receivedCourse(course));
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return next(action);
|
|
16
|
+
};
|
|
17
|
+
export default onStartApp;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReceivedCourse } from '../actions';
|
|
2
|
+
export declare type State = Array<any>;
|
|
3
|
+
export declare const initialState: State;
|
|
4
|
+
declare const reducer: (state: State, action: ReceivedCourse) => State;
|
|
5
|
+
export default reducer;
|
|
6
|
+
//# sourceMappingURL=courses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"courses.d.ts","sourceRoot":"","sources":["../../src/reducers/courses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAkB,MAAM,YAAY,CAAC;AAI3D,oBAAY,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAC/B,eAAO,MAAM,YAAY,EAAE,KAAU,CAAC;AAItC,QAAA,MAAM,OAAO,yBAAyC,cAAc,UAQnE,CAAC;AAIF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RECEIVED_COURSE } from '../actions';
|
|
2
|
+
export const initialState = [];
|
|
3
|
+
// -----------------------------------------------------------------------------
|
|
4
|
+
const reducer = (state = initialState, action) => {
|
|
5
|
+
switch (action.type) {
|
|
6
|
+
case RECEIVED_COURSE: {
|
|
7
|
+
return [...state, action.payload];
|
|
8
|
+
}
|
|
9
|
+
default:
|
|
10
|
+
return state;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
// -----------------------------------------------------------------------------
|
|
14
|
+
export default reducer;
|
package/es/reducers/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reducers/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reducers/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,WAAW;;;;8BAIf,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
package/es/reducers/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { NavigateTo, NavigateBack } from '../actions/navigation';
|
|
2
2
|
export declare type State = Array<string>;
|
|
3
3
|
export declare const initialState: State;
|
|
4
|
-
declare const reducer: (state: State, action:
|
|
4
|
+
declare const reducer: (state: State, action: NavigateTo | NavigateBack) => State;
|
|
5
5
|
export declare const getCurrentViewName: (appState: any) => any;
|
|
6
6
|
export default reducer;
|
|
7
7
|
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/reducers/navigation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/reducers/navigation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,uBAAuB,CAAC;AAIpE,oBAAY,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAClC,eAAO,MAAM,YAAY,EAAE,KAAgB,CAAC;AAI5C,QAAA,MAAM,OAAO,yBAAyC,UAAU,GAAG,YAAY,UAa9E,CAAC;AAIF,eAAO,MAAM,kBAAkB,wBAAkE,CAAC;AAIlG,eAAe,OAAO,CAAC"}
|
package/es/reducers/token.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { StoreToken } from '../actions';
|
|
2
2
|
export declare type State = string;
|
|
3
3
|
export declare const initialState: State;
|
|
4
|
-
declare const reducer: (state: State, action:
|
|
4
|
+
declare const reducer: (state: State, action: StoreToken) => State;
|
|
5
5
|
export declare const getToken: (appState: any) => any;
|
|
6
6
|
export default reducer;
|
|
7
7
|
//# sourceMappingURL=token.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../src/reducers/token.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../src/reducers/token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAc,MAAM,YAAY,CAAC;AAInD,oBAAY,KAAK,GAAG,MAAM,CAAC;AAC3B,eAAO,MAAM,YAAY,EAAE,KAAY,CAAC;AAIxC,QAAA,MAAM,OAAO,UAAW,KAAK,UAAyB,UAAU,KAAG,KAQlE,CAAC;AAIF,eAAO,MAAM,QAAQ,wBAA6B,CAAC;AAInD,eAAe,OAAO,CAAC"}
|
package/es/reducers/token.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { STORE_TOKEN } from '../actions';
|
|
2
2
|
export const initialState = null;
|
|
3
3
|
// -----------------------------------------------------------------------------
|
|
4
4
|
const reducer = (state = initialState, action) => {
|
|
5
5
|
switch (action.type) {
|
|
6
|
-
case
|
|
7
|
-
return action.payload
|
|
6
|
+
case STORE_TOKEN: {
|
|
7
|
+
return action.payload;
|
|
8
8
|
}
|
|
9
9
|
default:
|
|
10
10
|
return state;
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Fetch } from './fetch-responses';
|
|
2
|
+
declare const fetchCourse: (fetch: Fetch) => (token: any, language: any, universalRef: any) => Promise<Course>;
|
|
3
|
+
export declare type Course = {
|
|
4
|
+
title: any;
|
|
5
|
+
};
|
|
6
|
+
export declare type CatalogHits = {
|
|
7
|
+
hits: Course[];
|
|
8
|
+
};
|
|
9
|
+
export { fetchCourse };
|
|
10
|
+
declare const _default: (token: any, language: any, universalRef: any) => Promise<Course>;
|
|
11
|
+
export default _default;
|
|
3
12
|
//# sourceMappingURL=fetch-demo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-demo.d.ts","sourceRoot":"","sources":["../../src/services/fetch-demo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch-demo.d.ts","sourceRoot":"","sources":["../../src/services/fetch-demo.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,EAAS,MAAM,mBAAmB,CAAC;AA4BhD,QAAA,MAAM,WAAW,UAAW,KAAK,uDAA4C,QAAQ,MAAM,CAc1F,CAAC;AAIF,oBAAY,MAAM,GAAG;IAAC,KAAK,MAAA;CAAC,CAAC;AAC7B,oBAAY,WAAW,GAAG;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAC,CAAC;AAI3C,OAAO,EAAC,WAAW,EAAC,CAAC;;AACrB,wBAAuC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import crossFetch from 'cross-fetch';
|
|
2
2
|
import decode from 'jwt-decode';
|
|
3
|
+
import { toJSON } from './fetch-responses';
|
|
3
4
|
const buildUrlQueryParams = (params) => Object.keys(params)
|
|
4
5
|
.map(key => {
|
|
5
6
|
const value = params[key].toString();
|
|
@@ -7,7 +8,7 @@ const buildUrlQueryParams = (params) => Object.keys(params)
|
|
|
7
8
|
})
|
|
8
9
|
.join('&');
|
|
9
10
|
// -----------------------------------------------------------------------------
|
|
10
|
-
const fetchCourse = async (token, language, universalRef) => {
|
|
11
|
+
const fetchCourse = (fetch) => async (token, language, universalRef) => {
|
|
11
12
|
const jwt = decode(token);
|
|
12
13
|
const query = {
|
|
13
14
|
type: 'course',
|
|
@@ -17,8 +18,9 @@ const fetchCourse = async (token, language, universalRef) => {
|
|
|
17
18
|
const response = await fetch(`${jwt.host}/api/v2/contents?${buildUrlQueryParams(query)}`, {
|
|
18
19
|
headers: { authorization: token }
|
|
19
20
|
});
|
|
20
|
-
const { hits } = await response
|
|
21
|
+
const { hits } = (await toJSON(response));
|
|
21
22
|
return hits?.[0];
|
|
22
23
|
};
|
|
23
24
|
// -----------------------------------------------------------------------------
|
|
24
|
-
export
|
|
25
|
+
export { fetchCourse };
|
|
26
|
+
export default fetchCourse(crossFetch);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import test from 'ava';
|
|
2
|
-
import fetchCourse from './fetch-demo
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const token = process.env.API_TEST_TOKEN;
|
|
2
|
+
import { fetchCourse as _fetchCourse } from './fetch-demo';
|
|
3
|
+
import { okJSONResponse } from './fetch.mocks';
|
|
4
|
+
test('should fetch a demo course', async (t) => {
|
|
5
|
+
const token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c';
|
|
7
6
|
const language = 'fr';
|
|
8
|
-
const universalRef = '
|
|
7
|
+
const universalRef = 'bar';
|
|
8
|
+
const result = { hits: [{ title: 'Digital IQ test' }] };
|
|
9
|
+
const fetchCourse = _fetchCourse(okJSONResponse(result));
|
|
9
10
|
const course = await fetchCourse(token, language, universalRef);
|
|
10
|
-
t.is(course.title, '
|
|
11
|
+
t.is(course.title, 'Digital IQ test');
|
|
11
12
|
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare type Response = {
|
|
2
|
+
ok: boolean;
|
|
3
|
+
status: number;
|
|
4
|
+
statusText: string;
|
|
5
|
+
json: () => Promise<unknown>;
|
|
6
|
+
text: () => Promise<string>;
|
|
7
|
+
};
|
|
8
|
+
export declare type Fetch = (url?: string, options?: {
|
|
9
|
+
headers: {
|
|
10
|
+
authorization: string;
|
|
11
|
+
};
|
|
12
|
+
}) => Promise<Response>;
|
|
13
|
+
export declare class ResponseError extends Error {
|
|
14
|
+
statusCode: number;
|
|
15
|
+
constructor(status: number, statusText: string, body?: string);
|
|
16
|
+
}
|
|
17
|
+
export declare const toJSON: (response: Response) => Promise<unknown>;
|
|
18
|
+
export declare const toText: (response: Response) => Promise<string>;
|
|
19
|
+
export declare const toVoid: (response: Response) => Promise<void>;
|
|
20
|
+
//# sourceMappingURL=fetch-responses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-responses.d.ts","sourceRoot":"","sources":["../../src/services/fetch-responses.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ,GAAG;IACrB,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7B,IAAI,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7B,CAAC;AAEF,oBAAY,KAAK,GAAG,CAClB,GAAG,CAAC,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;IAAC,OAAO,EAAE;QAAC,aAAa,EAAE,MAAM,CAAA;KAAC,CAAA;CAAC,KACzC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEvB,qBAAa,aAAc,SAAQ,KAAK;IAC/B,UAAU,EAAE,MAAM,CAAC;gBAEP,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,SAAK;CAKjE;AAED,eAAO,MAAM,MAAM,aAAoB,QAAQ,KAAG,QAAQ,OAAO,CAWhE,CAAC;AAEF,eAAO,MAAM,MAAM,aAAoB,QAAQ,KAAG,QAAQ,MAAM,CAQ/D,CAAC;AAEF,eAAO,MAAM,MAAM,aAAoB,QAAQ,KAAG,QAAQ,IAAI,CAM7D,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export class ResponseError extends Error {
|
|
2
|
+
constructor(status, statusText, body = '') {
|
|
3
|
+
super(`${statusText} ${body}`.trim());
|
|
4
|
+
this.name = 'ResponseError';
|
|
5
|
+
this.statusCode = status;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export const toJSON = async (response) => {
|
|
9
|
+
if (!response.ok) {
|
|
10
|
+
const body = await response.text();
|
|
11
|
+
throw new ResponseError(response.status, response.statusText, body);
|
|
12
|
+
}
|
|
13
|
+
try {
|
|
14
|
+
return await response.json();
|
|
15
|
+
}
|
|
16
|
+
catch (err) {
|
|
17
|
+
throw new ResponseError(response.status, response.statusText);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
export const toText = async (response) => {
|
|
21
|
+
const body = await response.text();
|
|
22
|
+
if (!response.ok) {
|
|
23
|
+
throw new ResponseError(response.status, response.statusText, body);
|
|
24
|
+
}
|
|
25
|
+
return body;
|
|
26
|
+
};
|
|
27
|
+
export const toVoid = async (response) => {
|
|
28
|
+
if (!response.ok) {
|
|
29
|
+
const body = await response.text();
|
|
30
|
+
throw new ResponseError(response.status, response.statusText, body);
|
|
31
|
+
}
|
|
32
|
+
return;
|
|
33
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Response } from './fetch-responses';
|
|
2
|
+
export declare const toResponse: (status: number, statusText: string, body: string) => Promise<Response>;
|
|
3
|
+
declare type FetchFunction = () => Promise<Response>;
|
|
4
|
+
export declare const okJSONResponse: (body: unknown) => FetchFunction;
|
|
5
|
+
export declare const internalServerErrorJSONResponse: (body: unknown) => FetchFunction;
|
|
6
|
+
export declare const notFoundJSONResponse: (body: unknown) => FetchFunction;
|
|
7
|
+
export declare const okTextResponse: (body: string) => FetchFunction;
|
|
8
|
+
export declare const internalServerErrorTextResponse: (body: string) => FetchFunction;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=fetch.mocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.mocks.d.ts","sourceRoot":"","sources":["../../src/services/fetch.mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAE3C,eAAO,MAAM,UAAU,WAAY,MAAM,cAAc,MAAM,QAAQ,MAAM,KAAG,QAAQ,QAAQ,CAO1F,CAAC;AAEL,aAAK,aAAa,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE7C,eAAO,MAAM,cAAc,SAAU,OAAO,KAAG,aACF,CAAC;AAE9C,eAAO,MAAM,+BAA+B,SAAU,OAAO,KAAG,aACF,CAAC;AAE/D,eAAO,MAAM,oBAAoB,SAAU,OAAO,KAAG,aACD,CAAC;AAErD,eAAO,MAAM,cAAc,SAAU,MAAM,KAAG,aAAkD,CAAC;AAEjG,eAAO,MAAM,+BAA+B,SAAU,MAAM,KAAG,aACjB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const toResponse = (status, statusText, body) => Promise.resolve({
|
|
2
|
+
ok: status < 400,
|
|
3
|
+
status,
|
|
4
|
+
statusText,
|
|
5
|
+
json: () => Promise.resolve(body).then(JSON.parse),
|
|
6
|
+
text: () => Promise.resolve(body)
|
|
7
|
+
});
|
|
8
|
+
export const okJSONResponse = (body) => () => toResponse(200, 'OK', JSON.stringify(body));
|
|
9
|
+
export const internalServerErrorJSONResponse = (body) => () => toResponse(500, 'InternalServerError', JSON.stringify(body));
|
|
10
|
+
export const notFoundJSONResponse = (body) => () => toResponse(404, 'Not Found', JSON.stringify(body));
|
|
11
|
+
export const okTextResponse = (body) => () => toResponse(200, 'OK', body);
|
|
12
|
+
export const internalServerErrorTextResponse = (body) => () => toResponse(500, 'InternalServerError', body);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const RECEIVED_COURSE = "@@api/RECEIVED_COURSE";
|
|
2
|
+
export declare type ReceivedCourse = {
|
|
3
|
+
type: '@@api/RECEIVED_COURSE';
|
|
4
|
+
payload: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const receivedCourse: (course: any) => ReceivedCourse;
|
|
7
|
+
//# sourceMappingURL=courses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"courses.d.ts","sourceRoot":"","sources":["../../src/actions/courses.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,0BAA0B,CAAC;AAEvD,oBAAY,cAAc,GAAG;IAC3B,IAAI,EAAE,uBAAuB,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,cAAc,WAAY,GAAG,KAAG,cAG3C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.receivedCourse = exports.RECEIVED_COURSE = void 0;
|
|
4
|
+
exports.RECEIVED_COURSE = '@@api/RECEIVED_COURSE';
|
|
5
|
+
var receivedCourse = function (course) { return ({
|
|
6
|
+
type: exports.RECEIVED_COURSE,
|
|
7
|
+
payload: course
|
|
8
|
+
}); };
|
|
9
|
+
exports.receivedCourse = receivedCourse;
|
package/lib/actions/index.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
import { ReceivedCourse } from './courses';
|
|
2
|
+
import { NavigateBack, NavigateTo, StartApp } from './navigation';
|
|
3
|
+
import { StoreToken } from './token';
|
|
4
|
+
export * from './courses';
|
|
1
5
|
export * from './navigation';
|
|
6
|
+
export * from './token';
|
|
7
|
+
export declare type Action = StartApp | StoreToken | NavigateBack | NavigateTo | ReceivedCourse;
|
|
2
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AACzC,OAAO,EAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAC,MAAM,cAAc,CAAC;AAChE,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;AAEnC,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AAExB,oBAAY,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,GAAG,cAAc,CAAC"}
|
package/lib/actions/index.js
CHANGED
|
@@ -14,4 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./courses"), exports);
|
|
17
18
|
__exportStar(require("./navigation"), exports);
|
|
19
|
+
__exportStar(require("./token"), exports);
|
|
@@ -3,18 +3,18 @@ import { AppOptions } from '..';
|
|
|
3
3
|
export declare const NAVIGATE_TO = "@@navigation/NAVIGATE_TO";
|
|
4
4
|
export declare const NAVIGATE_BACK = "@@navigation/NAVIGATE_BACK";
|
|
5
5
|
export declare const START_APP = "@@navigation/START_APP";
|
|
6
|
-
export declare type
|
|
6
|
+
export declare type NavigateTo = {
|
|
7
7
|
type: '@@navigation/NAVIGATE_TO';
|
|
8
8
|
payload: string;
|
|
9
9
|
};
|
|
10
|
-
export declare type
|
|
10
|
+
export declare type NavigateBack = {
|
|
11
11
|
type: '@@navigation/NAVIGATE_BACK';
|
|
12
12
|
};
|
|
13
|
-
export declare type
|
|
13
|
+
export declare type StartApp = {
|
|
14
14
|
type: '@@navigation/START_APP';
|
|
15
15
|
payload: AppOptions;
|
|
16
16
|
};
|
|
17
|
-
export declare const navigateTo: ActionCreator
|
|
18
|
-
export declare const navigateBack: ActionCreator
|
|
19
|
-
export declare const startApp: (options: AppOptions) =>
|
|
17
|
+
export declare const navigateTo: ActionCreator<NavigateTo>;
|
|
18
|
+
export declare const navigateBack: ActionCreator<NavigateBack>;
|
|
19
|
+
export declare const startApp: (options: AppOptions) => StartApp;
|
|
20
20
|
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/actions/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AACpC,OAAO,EAAC,UAAU,EAAC,MAAM,IAAI,CAAC;AAE9B,eAAO,MAAM,WAAW,6BAA6B,CAAC;AACtD,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAC1D,eAAO,MAAM,SAAS,2BAA2B,CAAC;AAElD,oBAAY,
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/actions/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AACpC,OAAO,EAAC,UAAU,EAAC,MAAM,IAAI,CAAC;AAE9B,eAAO,MAAM,WAAW,6BAA6B,CAAC;AACtD,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAC1D,eAAO,MAAM,SAAS,2BAA2B,CAAC;AAElD,oBAAY,UAAU,GAAG;IACvB,IAAI,EAAE,0BAA0B,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,IAAI,EAAE,4BAA4B,CAAC;CACpC,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,IAAI,EAAE,wBAAwB,CAAC;IAC/B,OAAO,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,aAAa,CAAC,UAAU,CAG/C,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE,aAAa,CAAC,YAAY,CAEnD,CAAC;AAEH,eAAO,MAAM,QAAQ,YAAa,UAAU,KAAG,QAG7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../src/actions/token.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,wBAAwB,CAAC;AAEjD,oBAAY,UAAU,GAAG;IACvB,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,UAAU,UAAW,MAAM,KAAG,UAGzC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.storeToken = exports.STORE_TOKEN = void 0;
|
|
4
|
+
exports.STORE_TOKEN = '@@token/STORE_TOKEN';
|
|
5
|
+
var storeToken = function (token) { return ({
|
|
6
|
+
type: exports.STORE_TOKEN,
|
|
7
|
+
payload: token
|
|
8
|
+
}); };
|
|
9
|
+
exports.storeToken = storeToken;
|