@frontegg/redux-store 6.69.0 → 6.70.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.
Files changed (254) hide show
  1. package/audits/AuditLogsState/index.js +1 -1
  2. package/audits/AuditLogsState/saga.js +1 -18
  3. package/audits/AuditsMetadataState/index.js +1 -1
  4. package/audits/AuditsMetadataState/saga.js +1 -5
  5. package/audits/backward-compatibility/saga.js +0 -18
  6. package/audits/dummy.js +0 -16
  7. package/audits/index.js +4 -2
  8. package/audits/reducer.js +0 -2
  9. package/auth/AcceptInvitationState/index.d.ts +2 -0
  10. package/auth/AcceptInvitationState/index.js +1 -1
  11. package/auth/AcceptInvitationState/interfaces.js +0 -1
  12. package/auth/AcceptInvitationState/saga.js +0 -3
  13. package/auth/AccountSettingsState/index.d.ts +2 -0
  14. package/auth/AccountSettingsState/index.js +1 -1
  15. package/auth/AccountSettingsState/interfaces.d.ts +2 -0
  16. package/auth/AccountSettingsState/saga.js +1 -11
  17. package/auth/ActivateState/index.d.ts +3 -0
  18. package/auth/ActivateState/index.js +1 -1
  19. package/auth/ActivateState/interfaces.js +0 -1
  20. package/auth/ActivateState/saga.js +14 -34
  21. package/auth/ApiTokensState/index.d.ts +2 -0
  22. package/auth/ApiTokensState/index.js +1 -1
  23. package/auth/ApiTokensState/interfaces.d.ts +1 -0
  24. package/auth/ApiTokensState/interfaces.js +0 -1
  25. package/auth/ApiTokensState/saga.js +1 -44
  26. package/auth/ForgotPasswordState/index.d.ts +2 -0
  27. package/auth/ForgotPasswordState/index.js +1 -1
  28. package/auth/ForgotPasswordState/interfaces.js +0 -1
  29. package/auth/ForgotPasswordState/saga.js +5 -12
  30. package/auth/ImpersonationState/index.d.ts +2 -0
  31. package/auth/ImpersonationState/index.js +1 -1
  32. package/auth/ImpersonationState/interfaces.js +0 -1
  33. package/auth/ImpersonationState/saga.js +5 -9
  34. package/auth/LoginState/index.d.ts +2 -0
  35. package/auth/LoginState/index.js +1 -1
  36. package/auth/LoginState/interfaces.js +0 -6
  37. package/auth/LoginState/saga.d.ts +2 -38
  38. package/auth/LoginState/saga.js +132 -292
  39. package/auth/MfaState/index.d.ts +4 -2
  40. package/auth/MfaState/index.js +1 -1
  41. package/auth/MfaState/interfaces.d.ts +2 -2
  42. package/auth/MfaState/interfaces.js +0 -1
  43. package/auth/MfaState/saga.js +64 -143
  44. package/auth/ProfileState/index.d.ts +2 -0
  45. package/auth/ProfileState/index.js +1 -1
  46. package/auth/ProfileState/saga.js +22 -50
  47. package/auth/Provisioning/index.d.ts +2 -0
  48. package/auth/Provisioning/index.js +1 -1
  49. package/auth/Provisioning/saga.js +11 -23
  50. package/auth/ResetPhoneNumberState/index.d.ts +2 -0
  51. package/auth/ResetPhoneNumberState/index.js +1 -1
  52. package/auth/ResetPhoneNumberState/interfaces.js +0 -1
  53. package/auth/ResetPhoneNumberState/saga.js +17 -26
  54. package/auth/RestrictionsState/index.d.ts +3 -0
  55. package/auth/RestrictionsState/index.js +1 -1
  56. package/auth/RestrictionsState/saga.js +52 -105
  57. package/auth/RolesState/index.d.ts +2 -0
  58. package/auth/RolesState/index.js +1 -1
  59. package/auth/RolesState/saga.js +30 -51
  60. package/auth/SSOState/index.d.ts +2 -0
  61. package/auth/SSOState/index.js +1 -1
  62. package/auth/SSOState/interfaces.js +0 -3
  63. package/auth/SSOState/saga.js +10 -58
  64. package/auth/SSOState/saga.v2.js +13 -49
  65. package/auth/SecurityPolicyState/index.d.ts +13 -0
  66. package/auth/SecurityPolicyState/index.js +1 -1
  67. package/auth/SecurityPolicyState/saga.js +36 -90
  68. package/auth/SessionsPolicyState/index.d.ts +2 -0
  69. package/auth/SessionsPolicyState/index.js +1 -1
  70. package/auth/SessionsPolicyState/saga.js +7 -19
  71. package/auth/SessionsState/index.d.ts +2 -0
  72. package/auth/SessionsState/index.js +1 -1
  73. package/auth/SessionsState/saga.js +1 -15
  74. package/auth/SignUp/index.d.ts +2 -0
  75. package/auth/SignUp/index.js +1 -1
  76. package/auth/SignUp/interfaces.js +0 -1
  77. package/auth/SignUp/saga.js +6 -15
  78. package/auth/SocialLogins/index.d.ts +2 -0
  79. package/auth/SocialLogins/index.js +1 -1
  80. package/auth/SocialLogins/saga.js +10 -20
  81. package/auth/TeamState/index.d.ts +2 -0
  82. package/auth/TeamState/index.js +1 -1
  83. package/auth/TeamState/interfaces.js +0 -1
  84. package/auth/TeamState/saga.js +85 -205
  85. package/auth/TenantsState/index.d.ts +2 -0
  86. package/auth/TenantsState/index.js +1 -1
  87. package/auth/TenantsState/saga.js +1 -17
  88. package/auth/index.d.ts +2 -2
  89. package/auth/index.js +4 -3
  90. package/auth/interfaces.d.ts +2 -1
  91. package/auth/interfaces.js +0 -6
  92. package/auth/reducer.d.ts +2 -2
  93. package/auth/reducer.js +0 -2
  94. package/auth/saga.js +2 -1
  95. package/auth/utils.d.ts +4 -0
  96. package/auth/utils.js +7 -21
  97. package/connectivity/ConnectivityState/index.d.ts +9 -0
  98. package/connectivity/ConnectivityState/index.js +1 -1
  99. package/connectivity/consts.js +0 -5
  100. package/connectivity/index.js +4 -2
  101. package/connectivity/interfaces.d.ts +1 -0
  102. package/connectivity/reducer.js +0 -2
  103. package/connectivity/saga.js +48 -85
  104. package/helpers.js +4 -7
  105. package/index.js +1 -1
  106. package/node/audits/AuditLogsState/index.js +1 -8
  107. package/node/audits/AuditLogsState/saga.js +1 -26
  108. package/node/audits/AuditsMetadataState/index.js +1 -8
  109. package/node/audits/AuditsMetadataState/saga.js +1 -10
  110. package/node/audits/backward-compatibility/index.js +0 -8
  111. package/node/audits/backward-compatibility/reducer.js +0 -5
  112. package/node/audits/backward-compatibility/saga.js +0 -23
  113. package/node/audits/dummy.js +0 -19
  114. package/node/audits/index.js +0 -14
  115. package/node/audits/initialState.js +0 -3
  116. package/node/audits/reducer.js +0 -8
  117. package/node/audits/saga.js +0 -5
  118. package/node/audits/utils.js +0 -4
  119. package/node/auth/AcceptInvitationState/index.js +1 -7
  120. package/node/auth/AcceptInvitationState/interfaces.js +0 -1
  121. package/node/auth/AcceptInvitationState/saga.js +0 -7
  122. package/node/auth/AccountSettingsState/index.js +1 -6
  123. package/node/auth/AccountSettingsState/saga.js +1 -16
  124. package/node/auth/ActivateState/index.js +1 -7
  125. package/node/auth/ActivateState/interfaces.js +0 -1
  126. package/node/auth/ActivateState/saga.js +14 -41
  127. package/node/auth/ApiTokensState/index.js +1 -6
  128. package/node/auth/ApiTokensState/interfaces.js +0 -1
  129. package/node/auth/ApiTokensState/saga.js +1 -51
  130. package/node/auth/ForgotPasswordState/index.js +1 -7
  131. package/node/auth/ForgotPasswordState/interfaces.js +0 -1
  132. package/node/auth/ForgotPasswordState/saga.js +5 -19
  133. package/node/auth/ImpersonationState/index.js +1 -7
  134. package/node/auth/ImpersonationState/interfaces.js +0 -1
  135. package/node/auth/ImpersonationState/saga.js +5 -15
  136. package/node/auth/LoginState/index.js +1 -7
  137. package/node/auth/LoginState/interfaces.js +0 -7
  138. package/node/auth/LoginState/saga.js +132 -322
  139. package/node/auth/MfaState/index.js +1 -7
  140. package/node/auth/MfaState/interfaces.js +0 -1
  141. package/node/auth/MfaState/saga.js +64 -137
  142. package/node/auth/ProfileState/index.js +1 -6
  143. package/node/auth/ProfileState/saga.js +22 -58
  144. package/node/auth/Provisioning/index.js +1 -6
  145. package/node/auth/Provisioning/saga.js +11 -28
  146. package/node/auth/ResetPhoneNumberState/index.js +1 -7
  147. package/node/auth/ResetPhoneNumberState/interfaces.js +0 -1
  148. package/node/auth/ResetPhoneNumberState/saga.js +17 -32
  149. package/node/auth/RestrictionsState/index.js +1 -7
  150. package/node/auth/RestrictionsState/saga.js +52 -109
  151. package/node/auth/RolesState/index.js +1 -6
  152. package/node/auth/RolesState/saga.js +30 -54
  153. package/node/auth/SSOState/index.js +1 -6
  154. package/node/auth/SSOState/interfaces.js +0 -3
  155. package/node/auth/SSOState/saga.js +10 -63
  156. package/node/auth/SSOState/saga.v2.js +13 -53
  157. package/node/auth/SecurityPolicyState/index.js +1 -6
  158. package/node/auth/SecurityPolicyState/saga.js +36 -89
  159. package/node/auth/SessionsPolicyState/index.js +1 -6
  160. package/node/auth/SessionsPolicyState/saga.js +7 -24
  161. package/node/auth/SessionsState/index.js +1 -6
  162. package/node/auth/SessionsState/saga.js +1 -22
  163. package/node/auth/SignUp/index.js +1 -7
  164. package/node/auth/SignUp/interfaces.js +0 -1
  165. package/node/auth/SignUp/saga.js +6 -30
  166. package/node/auth/SocialLogins/index.js +1 -6
  167. package/node/auth/SocialLogins/saga.js +10 -33
  168. package/node/auth/TeamState/index.js +1 -6
  169. package/node/auth/TeamState/interfaces.js +0 -1
  170. package/node/auth/TeamState/saga.js +86 -190
  171. package/node/auth/TenantsState/index.js +1 -6
  172. package/node/auth/TenantsState/saga.js +1 -24
  173. package/node/auth/dummy.js +0 -5
  174. package/node/auth/index.js +0 -90
  175. package/node/auth/initialState.js +0 -23
  176. package/node/auth/interfaces.js +0 -6
  177. package/node/auth/reducer.js +0 -28
  178. package/node/auth/saga.js +2 -26
  179. package/node/auth/utils.js +7 -42
  180. package/node/connectivity/ConnectivityState/index.js +1 -7
  181. package/node/connectivity/consts.js +1 -7
  182. package/node/connectivity/index.js +0 -5
  183. package/node/connectivity/reducer.js +0 -6
  184. package/node/connectivity/saga.js +47 -91
  185. package/node/helpers.js +2 -14
  186. package/node/index.js +1 -17
  187. package/node/subscriptions/Billing/Information/index.js +0 -7
  188. package/node/subscriptions/Billing/Information/saga.js +1 -25
  189. package/node/subscriptions/Billing/Invoices/index.js +0 -6
  190. package/node/subscriptions/Billing/Invoices/saga.js +1 -13
  191. package/node/subscriptions/Billing/PaymentMethod/index.js +2 -8
  192. package/node/subscriptions/Billing/PaymentMethod/interfaces.js +0 -1
  193. package/node/subscriptions/Billing/PaymentMethod/saga.js +1 -17
  194. package/node/subscriptions/Billing/Subscription/index.js +0 -6
  195. package/node/subscriptions/Billing/Subscription/saga.js +3 -23
  196. package/node/subscriptions/Billing/index.js +0 -6
  197. package/node/subscriptions/Billing/interfaces.js +0 -8
  198. package/node/subscriptions/Billing/saga.js +0 -7
  199. package/node/subscriptions/Checkout/index.js +0 -6
  200. package/node/subscriptions/Checkout/saga.js +2 -22
  201. package/node/subscriptions/Config/index.js +0 -6
  202. package/node/subscriptions/Config/saga.js +1 -12
  203. package/node/subscriptions/Plans/index.js +0 -6
  204. package/node/subscriptions/Plans/saga.js +1 -13
  205. package/node/subscriptions/Stripe/index.js +0 -6
  206. package/node/subscriptions/Stripe/saga.js +0 -8
  207. package/node/subscriptions/VendorPublicConfig/index.js +0 -6
  208. package/node/subscriptions/VendorPublicConfig/saga.js +1 -9
  209. package/node/subscriptions/dummy.js +2 -4
  210. package/node/subscriptions/general.interfaces.js +0 -5
  211. package/node/subscriptions/index.js +0 -5
  212. package/node/subscriptions/interfaces.js +0 -14
  213. package/node/subscriptions/mapper.js +0 -11
  214. package/node/subscriptions/reducer.js +0 -9
  215. package/node/subscriptions/saga.js +0 -9
  216. package/node/subscriptions/utils.js +0 -6
  217. package/node/toolkit/index.js +0 -31
  218. package/node/toolkit/redux-saga.js +0 -3
  219. package/node/toolkit/redux.js +0 -1
  220. package/node/vendor/VendorState/index.js +1 -7
  221. package/node/vendor/index.js +0 -5
  222. package/node/vendor/reducer.js +0 -6
  223. package/node/vendor/saga.js +1 -9
  224. package/package.json +1 -1
  225. package/subscriptions/Billing/Information/index.js +0 -4
  226. package/subscriptions/Billing/Information/saga.js +1 -12
  227. package/subscriptions/Billing/Invoices/index.js +0 -4
  228. package/subscriptions/Billing/Invoices/saga.js +1 -5
  229. package/subscriptions/Billing/PaymentMethod/index.js +2 -6
  230. package/subscriptions/Billing/PaymentMethod/interfaces.js +1 -1
  231. package/subscriptions/Billing/PaymentMethod/saga.js +1 -9
  232. package/subscriptions/Billing/Subscription/index.js +0 -4
  233. package/subscriptions/Billing/Subscription/saga.js +3 -17
  234. package/subscriptions/Billing/interfaces.js +1 -0
  235. package/subscriptions/Checkout/index.js +0 -4
  236. package/subscriptions/Checkout/saga.js +2 -12
  237. package/subscriptions/Config/index.js +0 -4
  238. package/subscriptions/Config/saga.js +1 -7
  239. package/subscriptions/Plans/index.js +0 -2
  240. package/subscriptions/Plans/saga.js +1 -6
  241. package/subscriptions/Stripe/index.js +0 -4
  242. package/subscriptions/Stripe/saga.js +0 -4
  243. package/subscriptions/VendorPublicConfig/index.js +0 -2
  244. package/subscriptions/VendorPublicConfig/saga.js +1 -4
  245. package/subscriptions/dummy.js +3 -2
  246. package/subscriptions/general.interfaces.js +0 -5
  247. package/subscriptions/index.js +3 -1
  248. package/subscriptions/mapper.js +0 -5
  249. package/toolkit/index.d.ts +1 -1
  250. package/toolkit/index.js +0 -9
  251. package/vendor/VendorState/index.js +1 -0
  252. package/vendor/index.js +4 -2
  253. package/vendor/reducer.js +0 -2
  254. package/vendor/saga.js +1 -2
@@ -75,13 +75,13 @@ const actions = {
75
75
  loadVendorPasswordConfig: createAction(`${authStoreName}/loadVendorPasswordConfig`),
76
76
  loadPublicAuthStrategiesPolicy: createAction(`${authStoreName}/loadPublicAuthStrategiesPolicy`)
77
77
  };
78
+
78
79
  /**
79
80
  * To be used for actions types after dispatch, and should contains
80
81
  * the reducers and actions as standalone function
81
82
  */
82
83
 
83
84
  // noinspection JSUnusedLocalSymbols
84
-
85
85
  /**
86
86
  * if you see error in matcher that's mean the DispatchAction does not
87
87
  * contains the same functions in reducers and actions
@@ -1,23 +1,21 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
  const _excluded = ["callback"],
4
- _excluded2 = ["callback"],
5
- _excluded3 = ["callback"],
6
- _excluded4 = ["callback"],
7
- _excluded5 = ["callback"],
8
- _excluded6 = ["callback"];
4
+ _excluded2 = ["callback"],
5
+ _excluded3 = ["callback"],
6
+ _excluded4 = ["callback"],
7
+ _excluded5 = ["callback"],
8
+ _excluded6 = ["callback"];
9
9
  import { call, put, takeEvery, takeLeading } from 'redux-saga/effects';
10
10
  import { api } from '@frontegg/rest-api';
11
11
  import { actions } from '../reducer';
12
12
  import { delay } from '../utils';
13
13
  import { policyDemo, policyMfaDemo, policyLockoutDemo, policyPasswordHistoryDemo, publicSecurityPolicy } from '../dummy';
14
-
15
14
  function* loadSecurityPolicy() {
16
15
  yield put(actions.setSecurityPolicyGlobalState({
17
16
  loading: true,
18
17
  error: null
19
18
  }));
20
-
21
19
  try {
22
20
  const policy = yield call(api.auth.getGlobalSecurityPolicy);
23
21
  yield put(actions.setSecurityPolicyGlobalState({
@@ -30,7 +28,6 @@ function* loadSecurityPolicy() {
30
28
  loading: false
31
29
  }));
32
30
  }
33
-
34
31
  yield put(actions.loadSecurityPolicyMfa());
35
32
  yield put(actions.loadSecurityPolicyVendorMfa());
36
33
  yield put(actions.loadSecurityPolicyLockout());
@@ -39,13 +36,11 @@ function* loadSecurityPolicy() {
39
36
  yield put(actions.loadSecurityPolicyCaptcha());
40
37
  yield put(actions.loadPublicAuthStrategiesPolicy());
41
38
  }
42
-
43
39
  export function* loadPublicSecurityPolicy() {
44
40
  yield put(actions.setSecurityPolicyPublicState({
45
41
  loading: true,
46
42
  error: null
47
43
  }));
48
-
49
44
  try {
50
45
  const policy = yield call(api.auth.getVendorConfig);
51
46
  yield put(actions.setSecurityPolicyPublicState({
@@ -64,7 +59,6 @@ export function* loadPublicAuthStrategiesPolicy() {
64
59
  loading: true,
65
60
  error: null
66
61
  }));
67
-
68
62
  try {
69
63
  const policy = yield call(api.auth.getVendorPublicAuthStrategiesConfig);
70
64
  yield put(actions.setSecurityPolicyAuthStrategyPublicState({
@@ -78,13 +72,11 @@ export function* loadPublicAuthStrategiesPolicy() {
78
72
  }));
79
73
  }
80
74
  }
81
-
82
75
  function* loadSecurityPolicyMfa() {
83
76
  yield put(actions.setSecurityPolicyMfaState({
84
77
  loading: true,
85
78
  error: null
86
79
  }));
87
-
88
80
  try {
89
81
  const policy = yield call(api.auth.getMfaPolicy);
90
82
  yield put(actions.setSecurityPolicyMfaState({
@@ -98,13 +90,11 @@ function* loadSecurityPolicyMfa() {
98
90
  }));
99
91
  }
100
92
  }
101
-
102
93
  function* loadSecurityPolicyVendorMfa() {
103
94
  yield put(actions.setSecurityPolicyMfaState({
104
95
  loading: true,
105
96
  error: null
106
97
  }));
107
-
108
98
  try {
109
99
  const policy = yield call(api.auth.getVendorMfaPolicy);
110
100
  yield put(actions.setSecurityPolicyVendorMfaState({
@@ -118,20 +108,17 @@ function* loadSecurityPolicyVendorMfa() {
118
108
  }));
119
109
  }
120
110
  }
121
-
122
111
  function* saveSecurityPolicyMfa(_ref) {
123
112
  let {
124
- payload: {
125
- callback
126
- }
127
- } = _ref,
128
- newSecurityPolicy = _objectWithoutPropertiesLoose(_ref.payload, _excluded);
129
-
113
+ payload: {
114
+ callback
115
+ }
116
+ } = _ref,
117
+ newSecurityPolicy = _objectWithoutPropertiesLoose(_ref.payload, _excluded);
130
118
  yield put(actions.setSecurityPolicyMfaState({
131
119
  saving: true,
132
120
  error: null
133
121
  }));
134
-
135
122
  try {
136
123
  const policy = yield call(api.auth.saveMfaPolicy, newSecurityPolicy);
137
124
  yield put(actions.setSecurityPolicyMfaState({
@@ -147,13 +134,11 @@ function* saveSecurityPolicyMfa(_ref) {
147
134
  callback == null ? void 0 : callback(null, e);
148
135
  }
149
136
  }
150
-
151
137
  function* loadSecurityPolicyLockout() {
152
138
  yield put(actions.setSecurityPolicyLockoutState({
153
139
  loading: true,
154
140
  error: null
155
141
  }));
156
-
157
142
  try {
158
143
  const policy = yield call(api.auth.getLockoutPolicy);
159
144
  yield put(actions.setSecurityPolicyLockoutState({
@@ -167,20 +152,17 @@ function* loadSecurityPolicyLockout() {
167
152
  }));
168
153
  }
169
154
  }
170
-
171
155
  function* saveSecurityPolicyLockout(_ref2) {
172
156
  let {
173
- payload: {
174
- callback
175
- }
176
- } = _ref2,
177
- newSecurityPolicy = _objectWithoutPropertiesLoose(_ref2.payload, _excluded2);
178
-
157
+ payload: {
158
+ callback
159
+ }
160
+ } = _ref2,
161
+ newSecurityPolicy = _objectWithoutPropertiesLoose(_ref2.payload, _excluded2);
179
162
  yield put(actions.setSecurityPolicyLockoutState({
180
163
  saving: true,
181
164
  error: null
182
165
  }));
183
-
184
166
  try {
185
167
  const policy = yield call(api.auth.saveLockoutPolicy, newSecurityPolicy);
186
168
  yield put(actions.setSecurityPolicyLockoutState({
@@ -196,13 +178,11 @@ function* saveSecurityPolicyLockout(_ref2) {
196
178
  callback == null ? void 0 : callback(null, e);
197
179
  }
198
180
  }
199
-
200
181
  function* loadSecurityPolicyVendorLockout() {
201
182
  yield put(actions.setSecurityPolicyVendorLockoutState({
202
183
  loading: true,
203
184
  error: null
204
185
  }));
205
-
206
186
  try {
207
187
  const policy = yield call(api.auth.getVendorLockoutPolicy);
208
188
  yield put(actions.setSecurityPolicyVendorLockoutState({
@@ -216,13 +196,11 @@ function* loadSecurityPolicyVendorLockout() {
216
196
  }));
217
197
  }
218
198
  }
219
-
220
199
  function* loadSecurityPolicyCaptcha() {
221
200
  yield put(actions.setSecurityPolicyLockoutState({
222
201
  loading: true,
223
202
  error: null
224
203
  }));
225
-
226
204
  try {
227
205
  const policy = yield call(api.auth.getCaptchaPolicy);
228
206
  yield put(actions.setSecurityPolicyCaptchaState({
@@ -236,13 +214,11 @@ function* loadSecurityPolicyCaptcha() {
236
214
  }));
237
215
  }
238
216
  }
239
-
240
217
  function* loadSecurityPolicyPasswordHistory() {
241
218
  yield put(actions.setSecurityPolicyPasswordHistoryState({
242
219
  loading: true,
243
220
  error: null
244
221
  }));
245
-
246
222
  try {
247
223
  const policy = yield call(api.auth.getPasswordHistoryPolicy);
248
224
  yield put(actions.setSecurityPolicyPasswordHistoryState({
@@ -256,13 +232,11 @@ function* loadSecurityPolicyPasswordHistory() {
256
232
  }));
257
233
  }
258
234
  }
259
-
260
235
  function* loadSecurityPolicyVendorPasswordHistory() {
261
236
  yield put(actions.setSecurityPolicyVendorPasswordHistoryState({
262
237
  loading: true,
263
238
  error: null
264
239
  }));
265
-
266
240
  try {
267
241
  const policy = yield call(api.auth.getVendorPasswordHistoryPolicy);
268
242
  yield put(actions.setSecurityPolicyVendorPasswordHistoryState({
@@ -276,20 +250,17 @@ function* loadSecurityPolicyVendorPasswordHistory() {
276
250
  }));
277
251
  }
278
252
  }
279
-
280
253
  function* saveSecurityPolicyPasswordHistory(_ref3) {
281
254
  let {
282
- payload: {
283
- callback
284
- }
285
- } = _ref3,
286
- newSecurityPolicy = _objectWithoutPropertiesLoose(_ref3.payload, _excluded3);
287
-
255
+ payload: {
256
+ callback
257
+ }
258
+ } = _ref3,
259
+ newSecurityPolicy = _objectWithoutPropertiesLoose(_ref3.payload, _excluded3);
288
260
  yield put(actions.setSecurityPolicyPasswordHistoryState({
289
261
  saving: true,
290
262
  error: null
291
263
  }));
292
-
293
264
  try {
294
265
  const policy = yield call(api.auth.savePasswordHistoryPolicy, newSecurityPolicy);
295
266
  yield put(actions.setSecurityPolicyPasswordHistoryState({
@@ -305,13 +276,11 @@ function* saveSecurityPolicyPasswordHistory(_ref3) {
305
276
  callback == null ? void 0 : callback(null, e);
306
277
  }
307
278
  }
308
-
309
279
  function* loadVendorPasswordConfig() {
310
280
  yield put(actions.setSecurityPolicyPasswordState({
311
281
  loading: true,
312
282
  error: null
313
283
  }));
314
-
315
284
  try {
316
285
  const policy = yield call(api.auth.getPasswordConfigPolicy);
317
286
  yield put(actions.setSecurityPolicyPasswordState({
@@ -325,7 +294,6 @@ function* loadVendorPasswordConfig() {
325
294
  }));
326
295
  }
327
296
  }
328
-
329
297
  export function* securityPolicySagas() {
330
298
  yield takeLeading(actions.loadSecurityPolicy, loadSecurityPolicy);
331
299
  yield takeEvery(actions.saveSecurityPolicyMfa, saveSecurityPolicyMfa);
@@ -342,6 +310,7 @@ export function* securityPolicySagas() {
342
310
  yield takeEvery(actions.loadPublicSecurityPolicy, loadPublicSecurityPolicy);
343
311
  yield takeEvery(actions.loadPublicAuthStrategiesPolicy, loadPublicAuthStrategiesPolicy);
344
312
  }
313
+
345
314
  /*********************************
346
315
  * Preview Sagas
347
316
  *********************************/
@@ -351,7 +320,6 @@ export function* loadPublicSecurityPolicyMock() {
351
320
  loading: true,
352
321
  error: null
353
322
  }));
354
-
355
323
  try {
356
324
  yield put(actions.setSecurityPolicyPublicState({
357
325
  policy: publicSecurityPolicy,
@@ -364,7 +332,6 @@ export function* loadPublicSecurityPolicyMock() {
364
332
  }));
365
333
  }
366
334
  }
367
-
368
335
  function* loadSecurityPolicyMock() {
369
336
  yield put(actions.setSecurityPolicyGlobalState({
370
337
  loading: true,
@@ -383,7 +350,6 @@ function* loadSecurityPolicyMock() {
383
350
  yield put(actions.loadSecurityPolicyVendorPasswordHistory());
384
351
  yield put(actions.loadSecurityPolicyCaptcha());
385
352
  }
386
-
387
353
  function* loadSecurityPolicyMfaMock() {
388
354
  yield put(actions.setSecurityPolicyMfaState({
389
355
  loading: true,
@@ -395,7 +361,6 @@ function* loadSecurityPolicyMfaMock() {
395
361
  loading: false
396
362
  }));
397
363
  }
398
-
399
364
  function* loadSecurityPolicyVendorMfaMock() {
400
365
  yield put(actions.setSecurityPolicyVendorMfaState({
401
366
  loading: true,
@@ -407,27 +372,22 @@ function* loadSecurityPolicyVendorMfaMock() {
407
372
  loading: false
408
373
  }));
409
374
  }
410
-
411
375
  function* saveSecurityPolicyMfaMock(_ref4) {
412
376
  var _newSecurityPolicy$id;
413
-
414
377
  let {
415
- payload: {
416
- callback
417
- }
418
- } = _ref4,
419
- newSecurityPolicy = _objectWithoutPropertiesLoose(_ref4.payload, _excluded4);
420
-
378
+ payload: {
379
+ callback
380
+ }
381
+ } = _ref4,
382
+ newSecurityPolicy = _objectWithoutPropertiesLoose(_ref4.payload, _excluded4);
421
383
  yield put(actions.setSecurityPolicyMfaState({
422
384
  saving: true,
423
385
  error: null
424
386
  }));
425
-
426
387
  const policy = _extends({}, policyLockoutDemo, {
427
388
  id: (_newSecurityPolicy$id = newSecurityPolicy.id) != null ? _newSecurityPolicy$id : policyLockoutDemo.id,
428
389
  enforceMFAType: newSecurityPolicy.enforceMFAType
429
390
  });
430
-
431
391
  yield delay();
432
392
  yield put(actions.setSecurityPolicyMfaState({
433
393
  policy,
@@ -435,7 +395,6 @@ function* saveSecurityPolicyMfaMock(_ref4) {
435
395
  }));
436
396
  callback == null ? void 0 : callback(policy);
437
397
  }
438
-
439
398
  function* loadSecurityPolicyLockoutMock() {
440
399
  yield put(actions.setSecurityPolicyLockoutState({
441
400
  loading: true,
@@ -447,7 +406,6 @@ function* loadSecurityPolicyLockoutMock() {
447
406
  loading: false
448
407
  }));
449
408
  }
450
-
451
409
  function* loadSecurityPolicyVendorLockoutMock() {
452
410
  yield put(actions.setSecurityPolicyVendorLockoutState({
453
411
  loading: true,
@@ -459,32 +417,27 @@ function* loadSecurityPolicyVendorLockoutMock() {
459
417
  loading: false
460
418
  }));
461
419
  }
462
-
463
420
  function* saveSecurityPolicyLockoutMock(_ref5) {
464
421
  let {
465
- payload: {
466
- callback
467
- }
468
- } = _ref5,
469
- newSecurityPolicy = _objectWithoutPropertiesLoose(_ref5.payload, _excluded5);
470
-
422
+ payload: {
423
+ callback
424
+ }
425
+ } = _ref5,
426
+ newSecurityPolicy = _objectWithoutPropertiesLoose(_ref5.payload, _excluded5);
471
427
  yield put(actions.setSecurityPolicyLockoutState({
472
428
  saving: true,
473
429
  error: null
474
430
  }));
475
431
  yield delay();
476
-
477
432
  const policy = _extends({}, policyLockoutDemo, newSecurityPolicy, {
478
433
  id: newSecurityPolicy.id ? newSecurityPolicy.id : policyLockoutDemo.id
479
434
  });
480
-
481
435
  callback == null ? void 0 : callback(policy);
482
436
  yield put(actions.setSecurityPolicyLockoutState({
483
437
  policy,
484
438
  saving: false
485
439
  }));
486
440
  }
487
-
488
441
  function* loadSecurityPolicyCaptchaMock() {
489
442
  yield put(actions.setSecurityPolicyLockoutState({
490
443
  loading: true,
@@ -496,7 +449,6 @@ function* loadSecurityPolicyCaptchaMock() {
496
449
  loading: false
497
450
  }));
498
451
  }
499
-
500
452
  function* loadSecurityPolicyPasswordHistoryMock() {
501
453
  yield put(actions.setSecurityPolicyPasswordHistoryState({
502
454
  loading: true,
@@ -508,7 +460,6 @@ function* loadSecurityPolicyPasswordHistoryMock() {
508
460
  loading: false
509
461
  }));
510
462
  }
511
-
512
463
  function* loadSecurityPolicyVendorPasswordHistoryMock() {
513
464
  yield put(actions.setSecurityPolicyVendorPasswordHistoryState({
514
465
  loading: true,
@@ -520,32 +471,27 @@ function* loadSecurityPolicyVendorPasswordHistoryMock() {
520
471
  loading: false
521
472
  }));
522
473
  }
523
-
524
474
  function* saveSecurityPolicyPasswordHistoryMock(_ref6) {
525
475
  let {
526
- payload: {
527
- callback
528
- }
529
- } = _ref6,
530
- newSecurityPolicy = _objectWithoutPropertiesLoose(_ref6.payload, _excluded6);
531
-
476
+ payload: {
477
+ callback
478
+ }
479
+ } = _ref6,
480
+ newSecurityPolicy = _objectWithoutPropertiesLoose(_ref6.payload, _excluded6);
532
481
  yield put(actions.setSecurityPolicyPasswordHistoryState({
533
482
  saving: true,
534
483
  error: null
535
484
  }));
536
485
  yield delay();
537
-
538
486
  const policy = _extends({}, policyPasswordHistoryDemo, newSecurityPolicy, {
539
487
  id: newSecurityPolicy.id ? newSecurityPolicy.id : policyPasswordHistoryDemo.id
540
488
  });
541
-
542
489
  callback == null ? void 0 : callback(policy);
543
490
  yield put(actions.setSecurityPolicyPasswordHistoryState({
544
491
  policy,
545
492
  saving: false
546
493
  }));
547
494
  }
548
-
549
495
  export function* securityPolicySagasMock() {
550
496
  yield takeLeading(actions.loadSecurityPolicy, loadSecurityPolicyMock);
551
497
  yield takeEvery(actions.loadPublicSecurityPolicy, loadPublicSecurityPolicyMock);
@@ -20,6 +20,7 @@ declare const reducers: {
20
20
  user?: import("..").User | null | undefined;
21
21
  isSSOAuth: boolean;
22
22
  ssoACS?: string | undefined;
23
+ includeQueryParam?: boolean | undefined;
23
24
  loginState: import("..").LoginState;
24
25
  activateState: import("..").ActivateAccountState;
25
26
  acceptInvitationState: import("..").AcceptInvitationState;
@@ -58,6 +59,7 @@ declare const reducers: {
58
59
  user?: import("..").User | null | undefined;
59
60
  isSSOAuth: boolean;
60
61
  ssoACS?: string | undefined;
62
+ includeQueryParam?: boolean | undefined;
61
63
  loginState: import("..").LoginState;
62
64
  activateState: import("..").ActivateAccountState;
63
65
  acceptInvitationState: import("..").AcceptInvitationState;
@@ -17,13 +17,13 @@ const actions = {
17
17
  payload
18
18
  }))
19
19
  };
20
+
20
21
  /**
21
22
  * To be used for actions types after dispatch, and should contains
22
23
  * the reducers and actions as standalone function
23
24
  */
24
25
 
25
26
  // noinspection JSUnusedLocalSymbols
26
-
27
27
  /**
28
28
  * if you see error in matcher that's mean the DispatchAction does not
29
29
  * contains the same functions in reducers and actions
@@ -1,18 +1,16 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
  const _excluded = ["callback"],
4
- _excluded2 = ["callback"];
4
+ _excluded2 = ["callback"];
5
5
  import { takeLatest, put, call, takeLeading, select } from 'redux-saga/effects';
6
6
  import { api } from '@frontegg/rest-api';
7
7
  import { actions } from '../reducer';
8
8
  import { sessionsConfigDummies } from '../dummy';
9
-
10
9
  function* loadSessionPolicyState() {
11
10
  yield put(actions.setSessionsPolicyState({
12
11
  loading: true,
13
12
  error: null
14
13
  }));
15
-
16
14
  try {
17
15
  const sessionsPolicy = yield call(api.auth.getSessionConfigurations);
18
16
  yield put(actions.setSessionsPolicyState({
@@ -26,7 +24,6 @@ function* loadSessionPolicyState() {
26
24
  }));
27
25
  }
28
26
  }
29
-
30
27
  function* createOrUpdateSessionsPolicy({
31
28
  payload
32
29
  }) {
@@ -34,13 +31,11 @@ function* createOrUpdateSessionsPolicy({
34
31
  loading: true,
35
32
  error: null
36
33
  }));
37
-
38
34
  try {
39
35
  const {
40
- callback
41
- } = payload,
42
- rest = _objectWithoutPropertiesLoose(payload, _excluded);
43
-
36
+ callback
37
+ } = payload,
38
+ rest = _objectWithoutPropertiesLoose(payload, _excluded);
44
39
  yield call(api.auth.createOrUpdateSessionConfigrations, rest);
45
40
  yield put(actions.loadSessionsPolicy());
46
41
  callback == null ? void 0 : callback(true);
@@ -51,12 +46,10 @@ function* createOrUpdateSessionsPolicy({
51
46
  }));
52
47
  }
53
48
  }
54
-
55
49
  export function* sessionsPolicySaga() {
56
50
  yield takeLeading(actions.loadSessionsPolicy, loadSessionPolicyState);
57
51
  yield takeLatest(actions.createOrUpdateSessionsPolicy, createOrUpdateSessionsPolicy);
58
52
  }
59
-
60
53
  function* loadSessionPolicyStateMock() {
61
54
  yield put(actions.setSessionsPolicyState({
62
55
  loading: true,
@@ -64,14 +57,12 @@ function* loadSessionPolicyStateMock() {
64
57
  }));
65
58
  const sessionPolicyState = yield select(state => {
66
59
  var _state$auth$sessionsP, _state$auth;
67
-
68
60
  return (_state$auth$sessionsP = state == null ? void 0 : (_state$auth = state.auth) == null ? void 0 : _state$auth.sessionsPolicyState) != null ? _state$auth$sessionsP : sessionsConfigDummies;
69
61
  });
70
62
  yield put(actions.setSessionsPolicyState(_extends({}, sessionPolicyState, {
71
63
  loading: false
72
64
  })));
73
65
  }
74
-
75
66
  function* createOrUpdateSessionsPolicyMock({
76
67
  payload
77
68
  }) {
@@ -79,19 +70,16 @@ function* createOrUpdateSessionsPolicyMock({
79
70
  loading: true,
80
71
  error: null
81
72
  }));
82
-
83
73
  const {
84
- callback
85
- } = payload,
86
- rest = _objectWithoutPropertiesLoose(payload, _excluded2);
87
-
74
+ callback
75
+ } = payload,
76
+ rest = _objectWithoutPropertiesLoose(payload, _excluded2);
88
77
  callback == null ? void 0 : callback(true);
89
78
  yield put(actions.setSessionsPolicyState({
90
79
  configurations: rest,
91
80
  loading: false
92
81
  }));
93
82
  }
94
-
95
83
  export function* sessionsPolicySagaMock() {
96
84
  yield takeLeading(actions.loadSessionsPolicy, loadSessionPolicyStateMock);
97
85
  yield takeLatest(actions.createOrUpdateSessionsPolicy, createOrUpdateSessionsPolicyMock);
@@ -19,6 +19,7 @@ declare const reducers: {
19
19
  user?: import("..").User | null | undefined;
20
20
  isSSOAuth: boolean;
21
21
  ssoACS?: string | undefined;
22
+ includeQueryParam?: boolean | undefined;
22
23
  loginState: import("..").LoginState;
23
24
  activateState: import("..").ActivateAccountState;
24
25
  acceptInvitationState: import("..").AcceptInvitationState;
@@ -57,6 +58,7 @@ declare const reducers: {
57
58
  user?: import("..").User | null | undefined;
58
59
  isSSOAuth: boolean;
59
60
  ssoACS?: string | undefined;
61
+ includeQueryParam?: boolean | undefined;
60
62
  loginState: import("..").LoginState;
61
63
  activateState: import("..").ActivateAccountState;
62
64
  acceptInvitationState: import("..").AcceptInvitationState;
@@ -22,13 +22,13 @@ const actions = {
22
22
  payload
23
23
  }))
24
24
  };
25
+
25
26
  /**
26
27
  * To be used for actions types after dispatch, and should contains
27
28
  * the reducers and actions as standalone function
28
29
  */
29
30
 
30
31
  // noinspection JSUnusedLocalSymbols
31
-
32
32
  /**
33
33
  * if you see error in matcher that's mean the DispatchAction does not
34
34
  * contains the same functions in reducers and actions