@frontegg/redux-store 6.13.0 → 6.31.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.
- package/auth/TeamState/saga.js +4 -2
- package/auth/TenantsState/saga.js +1 -1
- package/auth/utils.js +5 -3
- package/connectivity/consts.js +1 -0
- package/connectivity/saga.js +2 -0
- package/helpers.js +2 -1
- package/index.js +1 -1
- package/node/auth/TeamState/saga.js +4 -2
- package/node/auth/TenantsState/saga.js +1 -1
- package/node/auth/utils.js +5 -3
- package/node/connectivity/consts.js +1 -0
- package/node/helpers.js +1 -0
- package/node/index.js +1 -1
- package/node/subscriptions/Billing/Subscription/saga.js +2 -1
- package/node/toolkit/index.js +3 -1
- package/node/vendor/VendorState/index.js +1 -1
- package/package.json +1 -1
- package/subscriptions/Billing/Subscription/saga.js +2 -1
- package/toolkit/index.d.ts +1 -0
- package/toolkit/index.js +3 -1
- package/vendor/VendorState/index.js +1 -2
package/auth/TeamState/saga.js
CHANGED
|
@@ -27,7 +27,8 @@ import { delay } from '../utils';
|
|
|
27
27
|
import { allUsersDemo, permissionsDemo, rolesDemo, usersDemo, userTeamDemo } from '../dummy';
|
|
28
28
|
import { v4 as uuidv4 } from 'uuid';
|
|
29
29
|
|
|
30
|
-
const selectTeamState = () => sagaSelect(_ => _[authStoreName].teamState);
|
|
30
|
+
const selectTeamState = () => sagaSelect(_ => _[authStoreName].teamState); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
+
|
|
31
32
|
|
|
32
33
|
function* loadUsers({
|
|
33
34
|
payload
|
|
@@ -93,7 +94,8 @@ function* loadUsers({
|
|
|
93
94
|
key: TeamStateKeys.USERS,
|
|
94
95
|
value: false
|
|
95
96
|
}));
|
|
96
|
-
}
|
|
97
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
98
|
+
|
|
97
99
|
|
|
98
100
|
function* loadAllSubTenantsUsers({
|
|
99
101
|
payload
|
package/auth/utils.js
CHANGED
|
@@ -77,7 +77,8 @@ const lookup = new Uint8Array(256);
|
|
|
77
77
|
|
|
78
78
|
for (let i = 0; i < chars.length; i++) {
|
|
79
79
|
lookup[chars.charCodeAt(i)] = i;
|
|
80
|
-
}
|
|
80
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
81
|
+
|
|
81
82
|
|
|
82
83
|
export const base64urlEncode = arraybuffer => {
|
|
83
84
|
const bytes = new Uint8Array(arraybuffer);
|
|
@@ -102,8 +103,8 @@ export const base64urlEncode = arraybuffer => {
|
|
|
102
103
|
};
|
|
103
104
|
export const base64urlDecode = base64string => {
|
|
104
105
|
const bufferLength = base64string.length * 0.75;
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
const len = base64string.length;
|
|
107
|
+
let i,
|
|
107
108
|
p = 0,
|
|
108
109
|
encoded1,
|
|
109
110
|
encoded2,
|
|
@@ -125,6 +126,7 @@ export const base64urlDecode = base64string => {
|
|
|
125
126
|
};
|
|
126
127
|
export const publicKeyCredentialToJSON = pubKeyCred => {
|
|
127
128
|
if (pubKeyCred instanceof Array) {
|
|
129
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
128
130
|
const arr = [];
|
|
129
131
|
|
|
130
132
|
for (const i of pubKeyCred) {
|
package/connectivity/consts.js
CHANGED
package/connectivity/saga.js
CHANGED
|
@@ -2,6 +2,8 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
const _excluded = ["id"],
|
|
4
4
|
_excluded2 = ["id", "enabled"];
|
|
5
|
+
|
|
6
|
+
/* eslint-disable */
|
|
5
7
|
import { all, call, put, select, takeEvery, takeLatest } from 'redux-saga/effects';
|
|
6
8
|
import { actions as connectivityActions } from './reducer';
|
|
7
9
|
import { channels, channels2Platform, type2ApiGet, type2ApiPost } from './consts';
|
package/helpers.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { createAction } from '@reduxjs/toolkit';
|
|
2
|
+
import { createAction } from '@reduxjs/toolkit'; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3
|
+
|
|
3
4
|
export function omitProps(props, keys) {
|
|
4
5
|
const newProps = _extends({}, props);
|
|
5
6
|
|
package/index.js
CHANGED
|
@@ -47,7 +47,8 @@ const _excluded = ["callback"],
|
|
|
47
47
|
_excluded17 = ["callback"],
|
|
48
48
|
_excluded18 = ["callback"];
|
|
49
49
|
|
|
50
|
-
const selectTeamState = () => (0, _effects.select)(_ => _[_constants.authStoreName].teamState);
|
|
50
|
+
const selectTeamState = () => (0, _effects.select)(_ => _[_constants.authStoreName].teamState); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
51
|
+
|
|
51
52
|
|
|
52
53
|
function* loadUsers({
|
|
53
54
|
payload
|
|
@@ -113,7 +114,8 @@ function* loadUsers({
|
|
|
113
114
|
key: _interfaces.TeamStateKeys.USERS,
|
|
114
115
|
value: false
|
|
115
116
|
}));
|
|
116
|
-
}
|
|
117
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
118
|
+
|
|
117
119
|
|
|
118
120
|
function* loadAllSubTenantsUsers({
|
|
119
121
|
payload
|
package/node/auth/utils.js
CHANGED
|
@@ -107,7 +107,8 @@ const lookup = new Uint8Array(256);
|
|
|
107
107
|
|
|
108
108
|
for (let i = 0; i < chars.length; i++) {
|
|
109
109
|
lookup[chars.charCodeAt(i)] = i;
|
|
110
|
-
}
|
|
110
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
111
|
+
|
|
111
112
|
|
|
112
113
|
const base64urlEncode = arraybuffer => {
|
|
113
114
|
const bytes = new Uint8Array(arraybuffer);
|
|
@@ -135,8 +136,8 @@ exports.base64urlEncode = base64urlEncode;
|
|
|
135
136
|
|
|
136
137
|
const base64urlDecode = base64string => {
|
|
137
138
|
const bufferLength = base64string.length * 0.75;
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
const len = base64string.length;
|
|
140
|
+
let i,
|
|
140
141
|
p = 0,
|
|
141
142
|
encoded1,
|
|
142
143
|
encoded2,
|
|
@@ -161,6 +162,7 @@ exports.base64urlDecode = base64urlDecode;
|
|
|
161
162
|
|
|
162
163
|
const publicKeyCredentialToJSON = pubKeyCred => {
|
|
163
164
|
if (pubKeyCred instanceof Array) {
|
|
165
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
164
166
|
const arr = [];
|
|
165
167
|
|
|
166
168
|
for (const i of pubKeyCred) {
|
|
@@ -7,6 +7,7 @@ exports.type2ApiPost = exports.type2ApiGet = exports.defaultRootPath = exports.c
|
|
|
7
7
|
|
|
8
8
|
var _restApi = require("@frontegg/rest-api");
|
|
9
9
|
|
|
10
|
+
/* eslint-disable */
|
|
10
11
|
const type2ApiGet = {
|
|
11
12
|
slack: _restApi.api.connectivity.getSlackConfiguration,
|
|
12
13
|
email: _restApi.api.connectivity.getEmailConfiguration,
|
package/node/helpers.js
CHANGED
|
@@ -15,6 +15,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
15
15
|
|
|
16
16
|
var _toolkit = require("@reduxjs/toolkit");
|
|
17
17
|
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
19
|
function omitProps(props, keys) {
|
|
19
20
|
const newProps = (0, _extends2.default)({}, props);
|
|
20
21
|
keys.forEach(key => {
|
package/node/index.js
CHANGED
|
@@ -30,7 +30,8 @@ function* loadSubscriptionTenant() {
|
|
|
30
30
|
return (_state$auth = state.auth) == null ? void 0 : (_state$auth$user = _state$auth.user) == null ? void 0 : _state$auth$user.tenantId;
|
|
31
31
|
});
|
|
32
32
|
yield (0, _saga.loadSummaries)(tenantId);
|
|
33
|
-
}
|
|
33
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
|
+
|
|
34
35
|
|
|
35
36
|
function* loadSubscription() {
|
|
36
37
|
yield (0, _effects.put)(_index.subscriptionActions.setLoading(true));
|
package/node/toolkit/index.js
CHANGED
|
@@ -73,7 +73,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
73
73
|
|
|
74
74
|
const initialState = {
|
|
75
75
|
context: undefined,
|
|
76
|
-
urlStrategy: 'path'
|
|
76
|
+
urlStrategy: 'path',
|
|
77
|
+
previewMode: false
|
|
77
78
|
};
|
|
78
79
|
const {
|
|
79
80
|
reducer: rootReducer
|
|
@@ -126,6 +127,7 @@ const createFronteggStore = (rootInitialState, storeHolder, previewMode = false,
|
|
|
126
127
|
holder.store = (0, _toolkit.configureStore)({
|
|
127
128
|
middleware,
|
|
128
129
|
preloadedState: {
|
|
130
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
129
131
|
root: (0, _extends2.default)({}, rootInitialState, {
|
|
130
132
|
previewMode,
|
|
131
133
|
urlStrategy: urlStrategy
|
|
@@ -28,10 +28,10 @@ const actions = {
|
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
30
|
exports.vendorActions = actions;
|
|
31
|
-
// noinspection JSUnusedLocalSymbols
|
|
32
31
|
|
|
33
32
|
/**
|
|
34
33
|
* if you see error in matcher that's mean the DispatchAction does not
|
|
35
34
|
* contains the same functions in reducers and actions
|
|
36
35
|
*/
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
37
37
|
const Matcher = {};
|
package/package.json
CHANGED
|
@@ -16,7 +16,8 @@ function* loadSubscriptionTenant() {
|
|
|
16
16
|
return (_state$auth = state.auth) == null ? void 0 : (_state$auth$user = _state$auth.user) == null ? void 0 : _state$auth$user.tenantId;
|
|
17
17
|
});
|
|
18
18
|
yield loadSummaries(tenantId);
|
|
19
|
-
}
|
|
19
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
+
|
|
20
21
|
|
|
21
22
|
export function* loadSubscription() {
|
|
22
23
|
yield put(subscriptionActions.setLoading(true));
|
package/toolkit/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export type { CaseReducerActions, SliceCaseReducers } from '@reduxjs/toolkit';
|
|
|
13
13
|
export interface RootState {
|
|
14
14
|
context?: ContextOptions;
|
|
15
15
|
urlStrategy: 'hash' | 'path';
|
|
16
|
+
previewMode?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare const createFronteggStore: (rootInitialState: InitialState, storeHolder?: any, previewMode?: boolean, authInitialState?: (Partial<Pick<AuthState, "user" | "error" | "onRedirectTo" | "isAuthenticated" | "userIp" | "isLoading" | "keepSessionAlive" | "isSSOAuth" | "ssoACS" | "loginState" | "activateState" | "acceptInvitationState" | "forgotPasswordState" | "resetPhoneNumberState" | "ssoState" | "profileState" | "mfaState" | "teamState" | "socialLoginState" | "signUpState" | "apiTokensState" | "securityPolicyState" | "accountSettingsState" | "tenantsState" | "rolesState" | "sessionsState" | "hostedLoginBox" | "disableSilentRefresh" | "sessionsPolicyState" | "restrictionsState" | "header" | "loaderComponent">> & {
|
|
18
19
|
routes?: Partial<AuthPageRoutes> | undefined;
|
package/toolkit/index.js
CHANGED
|
@@ -15,7 +15,8 @@ export * from './redux-saga';
|
|
|
15
15
|
export { bindActionCreators } from '@reduxjs/toolkit';
|
|
16
16
|
const initialState = {
|
|
17
17
|
context: undefined,
|
|
18
|
-
urlStrategy: 'path'
|
|
18
|
+
urlStrategy: 'path',
|
|
19
|
+
previewMode: false
|
|
19
20
|
};
|
|
20
21
|
const {
|
|
21
22
|
reducer: rootReducer
|
|
@@ -66,6 +67,7 @@ export const createFronteggStore = (rootInitialState, storeHolder, previewMode =
|
|
|
66
67
|
holder.store = configureStore({
|
|
67
68
|
middleware,
|
|
68
69
|
preloadedState: {
|
|
70
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
69
71
|
root: _extends({}, rootInitialState, {
|
|
70
72
|
previewMode,
|
|
71
73
|
urlStrategy: urlStrategy
|
|
@@ -14,11 +14,10 @@ const actions = {
|
|
|
14
14
|
* the reducers and actions as standalone function
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
// noinspection JSUnusedLocalSymbols
|
|
18
|
-
|
|
19
17
|
/**
|
|
20
18
|
* if you see error in matcher that's mean the DispatchAction does not
|
|
21
19
|
* contains the same functions in reducers and actions
|
|
22
20
|
*/
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
23
22
|
const Matcher = {};
|
|
24
23
|
export { reducers as vendorReducers, actions as vendorActions };
|