@zeniai/client-epic-state 4.14.7 → 4.14.8
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.
|
@@ -9,14 +9,20 @@ const operators_1 = require("rxjs/operators");
|
|
|
9
9
|
const trimEnd_1 = __importDefault(require("lodash/trimEnd"));
|
|
10
10
|
const tenantReducer_1 = require("../tenantReducer");
|
|
11
11
|
const responsePayload_1 = require("../../../responsePayload");
|
|
12
|
-
const toRequestPayload = (inputParam) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
const toRequestPayload = (inputParam) => {
|
|
13
|
+
var _a;
|
|
14
|
+
return ({
|
|
15
|
+
application_type: inputParam.appType,
|
|
16
|
+
code: inputParam.authCode,
|
|
17
|
+
oauth_provider: inputParam.oauthProvider,
|
|
18
|
+
redirect_uri: (0, trimEnd_1.default)(inputParam.redirectUri.href, '/'),
|
|
19
|
+
source_uri: (_a = inputParam.sourceUri.href) !== null && _a !== void 0 ? _a : '',
|
|
20
|
+
});
|
|
21
|
+
};
|
|
18
22
|
const doSignInEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(tenantReducer_1.doSignIn.match), (0, operators_1.switchMap)((action) => zeniAPI
|
|
19
|
-
.postJSON(`${zeniAPI.apiEndPoints.authMicroServiceBaseUrl}/1.0/signin`, toRequestPayload(action.payload), {
|
|
23
|
+
.postJSON(`${zeniAPI.apiEndPoints.authMicroServiceBaseUrl}/1.0/signin`, toRequestPayload(action.payload), {
|
|
24
|
+
'X-Requested-With': 'XMLHttpRequest',
|
|
25
|
+
})
|
|
20
26
|
.pipe((0, operators_1.concatMap)((response) => {
|
|
21
27
|
return (0, rxjs_1.from)(response.json()).pipe((0, operators_1.mergeMap)((responseJson) => {
|
|
22
28
|
var _a;
|
|
@@ -11,6 +11,7 @@ export interface DoSignInPayload {
|
|
|
11
11
|
oauthProvider: string;
|
|
12
12
|
appType: 'web' | 'mobile';
|
|
13
13
|
redirectUri: ZeniUrl;
|
|
14
|
+
sourceUri: ZeniUrl;
|
|
14
15
|
}
|
|
15
16
|
export declare const initialState: TenantState;
|
|
16
17
|
export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenants: TenantPayload[], userTenantPayload?: TenantUserPayload | undefined, tenantUpdated?: any], {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.14.
|
|
3
|
+
"version": "4.14.8",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|