@frontegg/redux-store 7.83.0-alpha.6 → 7.84.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/LoginState/interfaces.d.ts +2 -1
- package/auth/LoginState/interfaces.js +1 -0
- package/auth/TeamState/actions/invitation-link.actions.js +15 -4
- package/index.js +1 -1
- package/node/auth/LoginState/interfaces.js +1 -0
- package/node/auth/TeamState/actions/invitation-link.actions.js +15 -4
- package/node/index.js +1 -1
- package/package.json +2 -2
|
@@ -116,7 +116,8 @@ export type SetLoadingAction = ({ loading, error }: {
|
|
|
116
116
|
export declare enum LoginActionTypes {
|
|
117
117
|
'social-login' = "social-login",
|
|
118
118
|
'custom-social-login' = "custom-social-login",
|
|
119
|
-
direct = "direct"
|
|
119
|
+
direct = "direct",
|
|
120
|
+
signup = "signup"
|
|
120
121
|
}
|
|
121
122
|
export interface LoginDirectAction {
|
|
122
123
|
type: keyof typeof LoginActionTypes;
|
|
@@ -38,4 +38,5 @@ export let LoginActionTypes;
|
|
|
38
38
|
LoginActionTypes["social-login"] = "social-login";
|
|
39
39
|
LoginActionTypes["custom-social-login"] = "custom-social-login";
|
|
40
40
|
LoginActionTypes["direct"] = "direct";
|
|
41
|
+
LoginActionTypes["signup"] = "signup";
|
|
41
42
|
})(LoginActionTypes || (LoginActionTypes = {}));
|
|
@@ -46,7 +46,9 @@ export default ((store, api, sharedActions) => {
|
|
|
46
46
|
};
|
|
47
47
|
const createInvitationLink = async payload => {
|
|
48
48
|
const {
|
|
49
|
-
callback
|
|
49
|
+
callback,
|
|
50
|
+
expiresInMinutes,
|
|
51
|
+
shouldSendEmail
|
|
50
52
|
} = payload;
|
|
51
53
|
actions.setTeamError({
|
|
52
54
|
key: TeamStateKeys.CREATE_TOKEN_LINK,
|
|
@@ -56,9 +58,18 @@ export default ((store, api, sharedActions) => {
|
|
|
56
58
|
inviteTokenState
|
|
57
59
|
} = store.auth.teamState;
|
|
58
60
|
try {
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
const [enhancedInviteUserModalFlag] = await actions.getFeatureFlags(['invite_user_modal_enhancements_frontend']);
|
|
62
|
+
let data;
|
|
63
|
+
if (enhancedInviteUserModalFlag) {
|
|
64
|
+
data = await api.teams.createInviteUserLink({
|
|
65
|
+
expiresInMinutes: expiresInMinutes != null ? expiresInMinutes : 43200,
|
|
66
|
+
shouldSendEmail: shouldSendEmail != null ? shouldSendEmail : true
|
|
67
|
+
});
|
|
68
|
+
} else {
|
|
69
|
+
data = await api.teams.createInviteUserLink({
|
|
70
|
+
expiresInMinutes: 43200
|
|
71
|
+
});
|
|
72
|
+
}
|
|
62
73
|
actions.setTeamState({
|
|
63
74
|
inviteTokenState: _extends({}, inviteTokenState, data)
|
|
64
75
|
});
|
package/index.js
CHANGED
|
@@ -53,4 +53,5 @@ exports.LoginActionTypes = LoginActionTypes;
|
|
|
53
53
|
LoginActionTypes["social-login"] = "social-login";
|
|
54
54
|
LoginActionTypes["custom-social-login"] = "custom-social-login";
|
|
55
55
|
LoginActionTypes["direct"] = "direct";
|
|
56
|
+
LoginActionTypes["signup"] = "signup";
|
|
56
57
|
})(LoginActionTypes || (exports.LoginActionTypes = LoginActionTypes = {}));
|
|
@@ -53,7 +53,9 @@ var _default = (store, api, sharedActions) => {
|
|
|
53
53
|
};
|
|
54
54
|
const createInvitationLink = async payload => {
|
|
55
55
|
const {
|
|
56
|
-
callback
|
|
56
|
+
callback,
|
|
57
|
+
expiresInMinutes,
|
|
58
|
+
shouldSendEmail
|
|
57
59
|
} = payload;
|
|
58
60
|
actions.setTeamError({
|
|
59
61
|
key: _interfaces.TeamStateKeys.CREATE_TOKEN_LINK,
|
|
@@ -63,9 +65,18 @@ var _default = (store, api, sharedActions) => {
|
|
|
63
65
|
inviteTokenState
|
|
64
66
|
} = store.auth.teamState;
|
|
65
67
|
try {
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
const [enhancedInviteUserModalFlag] = await actions.getFeatureFlags(['invite_user_modal_enhancements_frontend']);
|
|
69
|
+
let data;
|
|
70
|
+
if (enhancedInviteUserModalFlag) {
|
|
71
|
+
data = await api.teams.createInviteUserLink({
|
|
72
|
+
expiresInMinutes: expiresInMinutes != null ? expiresInMinutes : 43200,
|
|
73
|
+
shouldSendEmail: shouldSendEmail != null ? shouldSendEmail : true
|
|
74
|
+
});
|
|
75
|
+
} else {
|
|
76
|
+
data = await api.teams.createInviteUserLink({
|
|
77
|
+
expiresInMinutes: 43200
|
|
78
|
+
});
|
|
79
|
+
}
|
|
69
80
|
actions.setTeamState({
|
|
70
81
|
inviteTokenState: (0, _extends2.default)({}, inviteTokenState, data)
|
|
71
82
|
});
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/redux-store",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.84.0-alpha.0",
|
|
4
4
|
"main": "./node/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Frontegg LTD",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@babel/runtime": "^7.18.6",
|
|
9
9
|
"@frontegg/entitlements-javascript-commons": "1.1.2",
|
|
10
|
-
"@frontegg/rest-api": "7.
|
|
10
|
+
"@frontegg/rest-api": "7.84.0-alpha.0",
|
|
11
11
|
"fast-deep-equal": "3.1.3",
|
|
12
12
|
"get-value": "^3.0.1",
|
|
13
13
|
"proxy-compare": "^3.0.0",
|