@frontegg/redux-store 6.135.0-alpha.1 → 6.136.0-alpha.0

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,3 +1,4 @@
1
+ import { WithCallback } from '../../../interfaces';
1
2
  import { SecurityCenterState } from './interfaces';
2
3
  import { SecurityCenterStateIndicator } from './types';
3
4
  declare const securityCenterState: SecurityCenterState;
@@ -122,7 +123,11 @@ declare const reducers: {
122
123
  declare const actions: {
123
124
  loadRecommendations: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
124
125
  loadInsights: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
125
- sendResetBreachedPasswordEmails: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
126
+ sendResetBreachedPasswordEmails: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
127
+ callback?: import("../../../interfaces").CallbackMethod<boolean> | undefined;
128
+ }], {
129
+ callback?: import("../../../interfaces").CallbackMethod<boolean> | undefined;
130
+ }, string, never, never>;
126
131
  };
127
132
  /**
128
133
  * To be used for actions types after dispatch, and should contains
@@ -133,7 +138,7 @@ declare type DispatchedActions = {
133
138
  resetSecurityCenterState: () => void;
134
139
  loadRecommendations: () => void;
135
140
  loadInsights: () => void;
136
- sendResetBreachedPasswordEmails: () => void;
141
+ sendResetBreachedPasswordEmails: (payload: WithCallback) => void;
137
142
  setSecurityCenterStateLoader: (payload: SecurityCenterStateIndicator) => void;
138
143
  setSecurityCenterStateError: (payload: SecurityCenterStateIndicator) => void;
139
144
  };
@@ -19,7 +19,9 @@ const reducers = {
19
19
  const actions = {
20
20
  loadRecommendations: createAction(`${authStoreName}/loadRecommendations`),
21
21
  loadInsights: createAction(`${authStoreName}/loadInsights`),
22
- sendResetBreachedPasswordEmails: createAction(`${authStoreName}/sendResetBreachedPasswordEmails`)
22
+ sendResetBreachedPasswordEmails: createAction(`${authStoreName}/sendResetBreachedPasswordEmails`, payload => ({
23
+ payload
24
+ }))
23
25
  };
24
26
 
25
27
  /**
@@ -1,4 +1,5 @@
1
1
  import { GetRecommendationsResponse, GetInsightsResponse } from '@frontegg/rest-api';
2
+ import { PayloadAction, WithCallback } from '../../../index';
2
3
  /**
3
4
  * This function is used to wrap sagas of the security page.
4
5
  * This function returns function,
@@ -35,7 +36,7 @@ export declare function loadInsights(): Generator<import("redux-saga/effects").P
35
36
  payload: Partial<import("./interfaces").SecurityCenterState>;
36
37
  type: string;
37
38
  }> | import("redux-saga/effects").CallEffect<GetInsightsResponse>, void, GetInsightsResponse>;
38
- export declare function sendResetBreachedPasswordEmails(): Generator<import("redux-saga/effects").PutEffect<{
39
+ export declare function sendResetBreachedPasswordEmails({ payload: { callback } }: PayloadAction<WithCallback>): Generator<import("redux-saga/effects").PutEffect<{
39
40
  payload: import("./types").SecurityCenterStateIndicator;
40
41
  type: string;
41
42
  }> | import("redux-saga/effects").CallEffect<void>, void, unknown>;
@@ -78,7 +78,11 @@ export function* loadInsights() {
78
78
  }));
79
79
  }
80
80
  }
81
- export function* sendResetBreachedPasswordEmails() {
81
+ export function* sendResetBreachedPasswordEmails({
82
+ payload: {
83
+ callback
84
+ }
85
+ }) {
82
86
  const key = SecurityCenterStateKeys.SEND_BULK_RESET_BREACHED_PASSWORD_EMAILS;
83
87
  yield put(actions.setSecurityCenterStateError({
84
88
  key,
@@ -90,11 +94,13 @@ export function* sendResetBreachedPasswordEmails() {
90
94
  }));
91
95
  try {
92
96
  yield call(api.users.sendResetBreachedPasswordEmails);
97
+ callback == null ? void 0 : callback(true);
93
98
  } catch (e) {
94
99
  yield put(actions.setSecurityCenterStateError({
95
100
  key,
96
101
  value: errorHandler(e)
97
102
  }));
103
+ callback == null ? void 0 : callback(false);
98
104
  } finally {
99
105
  yield put(actions.setSecurityCenterStateLoader({
100
106
  key,
package/auth/index.d.ts CHANGED
@@ -72,7 +72,11 @@ declare const _default: {
72
72
  actions: {
73
73
  loadRecommendations: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
74
74
  loadInsights: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
75
- sendResetBreachedPasswordEmails: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
75
+ sendResetBreachedPasswordEmails: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
76
+ callback?: import("..").CallbackMethod<boolean> | undefined;
77
+ }], {
78
+ callback?: import("..").CallbackMethod<boolean> | undefined;
79
+ }, string, never, never>;
76
80
  loadAccounts: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("..").WithCallback<import("@frontegg/rest-api").SearchSubTenantsParams & {
77
81
  _links?: import("@frontegg/rest-api").FronteggPaginationLinks | undefined;
78
82
  } & import("./MSP/AllAccountsState").TUserJwtPayload, boolean>], import("..").WithCallback<import("@frontegg/rest-api").SearchSubTenantsParams & {
package/auth/reducer.d.ts CHANGED
@@ -32,7 +32,11 @@ declare const reducer: import("redux").Reducer<AuthState, import("redux").AnyAct
32
32
  declare const actions: {
33
33
  loadRecommendations: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
34
34
  loadInsights: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
35
- sendResetBreachedPasswordEmails: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
35
+ sendResetBreachedPasswordEmails: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
36
+ callback?: import("..").CallbackMethod<boolean> | undefined;
37
+ }], {
38
+ callback?: import("..").CallbackMethod<boolean> | undefined;
39
+ }, string, never, never>;
36
40
  loadAccounts: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("..").WithCallback<import("@frontegg/rest-api").SearchSubTenantsParams & {
37
41
  _links?: import("@frontegg/rest-api").FronteggPaginationLinks | undefined;
38
42
  } & import("./MSP/AllAccountsState").TUserJwtPayload, boolean>], import("..").WithCallback<import("@frontegg/rest-api").SearchSubTenantsParams & {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.135.0-alpha.1
1
+ /** @license Frontegg v6.136.0-alpha.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -27,7 +27,9 @@ exports.securityCenterReducers = reducers;
27
27
  const actions = {
28
28
  loadRecommendations: (0, _toolkit.createAction)(`${_constants.authStoreName}/loadRecommendations`),
29
29
  loadInsights: (0, _toolkit.createAction)(`${_constants.authStoreName}/loadInsights`),
30
- sendResetBreachedPasswordEmails: (0, _toolkit.createAction)(`${_constants.authStoreName}/sendResetBreachedPasswordEmails`)
30
+ sendResetBreachedPasswordEmails: (0, _toolkit.createAction)(`${_constants.authStoreName}/sendResetBreachedPasswordEmails`, payload => ({
31
+ payload
32
+ }))
31
33
  };
32
34
 
33
35
  /**
@@ -90,7 +90,11 @@ function* loadInsights() {
90
90
  }));
91
91
  }
92
92
  }
93
- function* sendResetBreachedPasswordEmails() {
93
+ function* sendResetBreachedPasswordEmails({
94
+ payload: {
95
+ callback
96
+ }
97
+ }) {
94
98
  const key = _types.SecurityCenterStateKeys.SEND_BULK_RESET_BREACHED_PASSWORD_EMAILS;
95
99
  yield (0, _effects.put)(_reducer.actions.setSecurityCenterStateError({
96
100
  key,
@@ -102,11 +106,13 @@ function* sendResetBreachedPasswordEmails() {
102
106
  }));
103
107
  try {
104
108
  yield (0, _effects.call)(_restApi.api.users.sendResetBreachedPasswordEmails);
109
+ callback == null ? void 0 : callback(true);
105
110
  } catch (e) {
106
111
  yield (0, _effects.put)(_reducer.actions.setSecurityCenterStateError({
107
112
  key,
108
113
  value: (0, _utils.errorHandler)(e)
109
114
  }));
115
+ callback == null ? void 0 : callback(false);
110
116
  } finally {
111
117
  yield (0, _effects.put)(_reducer.actions.setSecurityCenterStateLoader({
112
118
  key,
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.135.0-alpha.1
1
+ /** @license Frontegg v6.136.0-alpha.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/redux-store",
3
- "version": "6.135.0-alpha.1",
3
+ "version": "6.136.0-alpha.0",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Frontegg LTD",