@zeniai/client-epic-state 4.11.49 → 4.11.50

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,8 +1,7 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { ActionsObservable, StateObservable } from 'redux-observable';
3
3
  import { fetchAllTenants, updateTenantsSuccess, updateTenantsFailure } from '../tenantReducer';
4
- import { updateCompanies } from '../../company/companyReducer';
5
4
  import { ZeniAPI } from '../../../zeniAPI';
6
5
  import { RootState } from '../../../reducer';
7
- export declare type ActionType = ReturnType<typeof fetchAllTenants> | ReturnType<typeof updateTenantsSuccess> | ReturnType<typeof updateCompanies> | ReturnType<typeof updateTenantsFailure>;
6
+ export declare type ActionType = ReturnType<typeof fetchAllTenants> | ReturnType<typeof updateTenantsSuccess> | ReturnType<typeof updateTenantsFailure>;
8
7
  export declare const fetchAllTenantsEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -4,7 +4,6 @@ exports.fetchAllTenantsEpic = void 0;
4
4
  const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
6
  const tenantReducer_1 = require("../tenantReducer");
7
- const companyReducer_1 = require("../../company/companyReducer");
8
7
  const responsePayload_1 = require("../../../responsePayload");
9
8
  const fetchAllTenantsEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(tenantReducer_1.fetchAllTenants.match), (0, operators_1.switchMap)((action) => zeniAPI
10
9
  .getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/users/${action.payload.userId}/tenants`, Object.assign({ 'zeni-user-id': action.payload.userId }, { 'zeni-tenant-id': '' }, action.payload.zeniSessionId != null
@@ -12,16 +11,9 @@ const fetchAllTenantsEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operator
12
11
  : {}))
13
12
  .pipe((0, operators_1.mergeMap)((response) => {
14
13
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
15
- let actions = [(0, tenantReducer_1.updateTenantsSuccess)(response.data)];
16
- if (response.data.companies != null) {
17
- actions = [
18
- (0, companyReducer_1.updateCompanies)({
19
- payload: response.data.companies,
20
- schema: {},
21
- }),
22
- ...actions,
23
- ];
24
- }
14
+ const actions = [
15
+ (0, tenantReducer_1.updateTenantsSuccess)(response.data),
16
+ ];
25
17
  return (0, rxjs_1.from)(actions);
26
18
  }
27
19
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.11.49",
3
+ "version": "4.11.50",
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",