@frontegg/vue 1.0.21 → 2.0.1-alpha.2912759335
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/dist/auth/mapAuthState.d.ts +45 -45
- package/dist/auth/service.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -4
- package/dist/index.min.js +2 -2
- package/dist/index.ssr.js +7 -7
- package/package.json +4 -4
|
@@ -28,22 +28,22 @@ export declare const mapActivateAccountActions: <K extends "setActivateState" |
|
|
|
28
28
|
setActivateState: (state: Partial<import("@frontegg/redux-store").ActivateAccountState>) => void;
|
|
29
29
|
resetActivateState: () => void;
|
|
30
30
|
setActivateStrategyState: (state: Partial<import("@frontegg/redux-store").ActivateAccountStrategyState>) => void;
|
|
31
|
-
activateAccount: (payload: import("@frontegg/redux-store
|
|
31
|
+
activateAccount: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").IActivateAccountPayload, boolean>) => void;
|
|
32
32
|
preActivateAccount: (payload: import("@frontegg/redux-store").IPreActivateAccount) => void;
|
|
33
33
|
resendActivationEmail: (payload: import("@frontegg/rest-api").IResendActivationEmail) => void;
|
|
34
|
-
getActivateAccountStrategy: (payload: import("@frontegg/redux-store
|
|
34
|
+
getActivateAccountStrategy: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").IGetActivateAccountStrategy, import("@frontegg/rest-api").IGetActivateAccountStrategyResponse>) => void;
|
|
35
35
|
}[K];
|
|
36
36
|
export declare const mapApiTokensActions: <K extends "setApiTokensLoader" | "setApiTokensError" | "setApiTokensState" | "resetApiTokensState" | "loadApiTokens" | "initApiTokensData" | "addTenantApiToken" | "addUserApiToken" | "deleteUserApiToken" | "deleteTenantApiToken">(action: K) => {
|
|
37
37
|
setApiTokensLoader: (payload: import("@frontegg/redux-store").ApiStateIndicator) => void;
|
|
38
38
|
setApiTokensError: (payload: import("@frontegg/redux-store").ApiStateIndicator) => void;
|
|
39
39
|
setApiTokensState: (state: Partial<import("@frontegg/redux-store").ApiTokensState>) => void;
|
|
40
40
|
resetApiTokensState: () => void;
|
|
41
|
-
loadApiTokens: (payload?: import("@frontegg/redux-store
|
|
41
|
+
loadApiTokens: (payload?: import("@frontegg/redux-store").WithSilentLoad<{
|
|
42
42
|
callback?: ((data: boolean | null, error?: string | undefined) => void) | undefined;
|
|
43
43
|
}> | undefined) => void;
|
|
44
44
|
initApiTokensData: (payload: import("@frontegg/redux-store").ApiTokenType) => void;
|
|
45
|
-
addTenantApiToken: (payload: import("@frontegg/redux-store
|
|
46
|
-
addUserApiToken: (payload: import("@frontegg/redux-store
|
|
45
|
+
addTenantApiToken: (payload: import("@frontegg/redux-store").WithCallback<Pick<import("@frontegg/redux-store").ITenantApiTokensData, "roleIds" | "description">, boolean>) => void;
|
|
46
|
+
addUserApiToken: (payload: import("@frontegg/redux-store").WithCallback<Pick<import("@frontegg/redux-store").IApiTokensData, "description">, boolean>) => void;
|
|
47
47
|
deleteUserApiToken: (payload: string) => void;
|
|
48
48
|
deleteTenantApiToken: (payload: string) => void;
|
|
49
49
|
}[K];
|
|
@@ -51,23 +51,23 @@ export declare const mapForgotPasswordActions: <K extends "setForgotPasswordStat
|
|
|
51
51
|
setForgotPasswordState: (state: Partial<import("@frontegg/redux-store").ForgotPasswordState>) => void;
|
|
52
52
|
resetForgotPasswordState: () => void;
|
|
53
53
|
forgotPassword: (payload: import("@frontegg/rest-api").IForgotPassword) => void;
|
|
54
|
-
resetPassword: (payload: import("@frontegg/redux-store
|
|
54
|
+
resetPassword: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").IResetPassword, boolean>) => void;
|
|
55
55
|
loadPasswordConfig: (payload?: import("@frontegg/rest-api").IGetUserPasswordConfig | undefined) => void;
|
|
56
56
|
}[K];
|
|
57
57
|
export declare const mapMfaActions: <K extends "setMfaState" | "resetMfaState" | "enrollMfa" | "verifyMfa" | "verifyMfaAfterForce" | "disableMfa">(action: K) => {
|
|
58
58
|
setMfaState: (state: Partial<import("@frontegg/redux-store").MFAState>) => void;
|
|
59
59
|
resetMfaState: () => void;
|
|
60
60
|
enrollMfa: () => void;
|
|
61
|
-
verifyMfa: (payload: import("@frontegg/redux-store
|
|
62
|
-
verifyMfaAfterForce: (payload: import("@frontegg/redux-store
|
|
63
|
-
disableMfa: (payload: import("@frontegg/redux-store
|
|
61
|
+
verifyMfa: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").IVerifyMfa, string | undefined>) => void;
|
|
62
|
+
verifyMfaAfterForce: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").ILoginWithMfa, string | undefined>) => void;
|
|
63
|
+
disableMfa: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").IDisableMfa, boolean>) => void;
|
|
64
64
|
}[K];
|
|
65
65
|
export declare const mapProfileActions: <K extends "setProfileState" | "resetProfileState" | "loadProfile" | "saveProfile" | "changePassword">(action: K) => {
|
|
66
66
|
setProfileState: (state: Partial<import("@frontegg/redux-store").ProfileState>) => void;
|
|
67
67
|
resetProfileState: () => void;
|
|
68
68
|
loadProfile: () => void;
|
|
69
|
-
saveProfile: (payload: Partial<import("@frontegg/redux-store
|
|
70
|
-
changePassword: (payload: import("@frontegg/redux-store
|
|
69
|
+
saveProfile: (payload: Partial<import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").IUserProfile, import("@frontegg/rest-api").IUserProfile>>) => void;
|
|
70
|
+
changePassword: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").IChangePassword, boolean>) => void;
|
|
71
71
|
}[K];
|
|
72
72
|
export declare const mapSecurityPolicyActions: <K extends "setSecurityPolicyState" | "setSecurityPolicyGlobalState" | "setSecurityPolicyPublicState" | "setSecurityPolicyMfaState" | "setSecurityPolicyVendorMfaState" | "setSecurityPolicyLockoutState" | "setSecurityPolicyCaptchaState" | "setSecurityPolicyPasswordHistoryState" | "resetSecurityPolicyState" | "setSecurityPolicyPasswordState" | "setSecurityPolicyAuthStrategyPublicState" | "loadSecurityPolicy" | "loadPublicSecurityPolicy" | "loadVendorPasswordConfig" | "loadSecurityPolicyMfa" | "loadSecurityPolicyVendorMfa" | "saveSecurityPolicyMfa" | "loadSecurityPolicyLockout" | "saveSecurityPolicyLockout" | "loadSecurityPolicyCaptcha" | "loadSecurityPolicyPasswordHistory" | "saveSecurityPolicyPasswordHistory" | "loadPublicAuthStrategiesPolicy">(action: K) => {
|
|
73
73
|
setSecurityPolicyState: (state: Partial<import("@frontegg/redux-store").SecurityPolicyState>) => void;
|
|
@@ -104,12 +104,12 @@ export declare const mapSecurityPolicyActions: <K extends "setSecurityPolicyStat
|
|
|
104
104
|
loadVendorPasswordConfig: () => void;
|
|
105
105
|
loadSecurityPolicyMfa: () => void;
|
|
106
106
|
loadSecurityPolicyVendorMfa: () => void;
|
|
107
|
-
saveSecurityPolicyMfa: (payload: import("@frontegg/redux-store
|
|
107
|
+
saveSecurityPolicyMfa: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").ISaveSecurityPolicyMfa, import("@frontegg/rest-api").ISecurityPolicyMfa>) => void;
|
|
108
108
|
loadSecurityPolicyLockout: () => void;
|
|
109
|
-
saveSecurityPolicyLockout: (payload: import("@frontegg/redux-store
|
|
109
|
+
saveSecurityPolicyLockout: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").ISaveSecurityPolicyLockout, import("@frontegg/rest-api").ISecurityPolicyLockout>) => void;
|
|
110
110
|
loadSecurityPolicyCaptcha: () => void;
|
|
111
111
|
loadSecurityPolicyPasswordHistory: () => void;
|
|
112
|
-
saveSecurityPolicyPasswordHistory: (payload: import("@frontegg/redux-store
|
|
112
|
+
saveSecurityPolicyPasswordHistory: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").ISaveSecurityPolicyPasswordHistory, import("@frontegg/rest-api").ISecurityPolicyPasswordHistory>) => void;
|
|
113
113
|
loadPublicAuthStrategiesPolicy: () => void;
|
|
114
114
|
}[K];
|
|
115
115
|
export declare const mapSignupActions: <K extends "setSignUpState" | "resetSignUpState" | "signUpUser" | "resetSignUpStateSoft">(action: K) => {
|
|
@@ -128,41 +128,41 @@ export declare const mapSocialLoginActions: <K extends "setSocialLoginsState" |
|
|
|
128
128
|
}[K];
|
|
129
129
|
export declare const mapSsoActions: <K extends "loadSSOConfigurationsV2" | "saveSSOConfigurationV2" | "updateSSOConfiguration" | "deleteSSOConfiguration" | "deleteSSODomain" | "saveSSODomain" | "validateSSODomainV2" | "setSSODefaultRoles" | "setSSOGroups" | "updateSSOGroups" | "saveSSOConfigurationByMetadata" | "updateSSOConfigurationByMetadata" | "setSSOLoader" | "setSSOError" | "setSSOState" | "resetSSOState" | "loadSSOConfigurations" | "loadSSOAuthorizationRoles" | "saveSSOConfigurations" | "saveSSOConfigurationsFile" | "saveSSOConfigurationsFileWithCallback" | "validateSSODomain" | "updateSSOAuthorizationRoles" | "deleteSamlGroup" | "createSamlGroup" | "oidcPostlogin">(action: K) => {
|
|
130
130
|
loadSSOConfigurationsV2: () => void;
|
|
131
|
-
saveSSOConfigurationV2: (payload: import("@frontegg/redux-store
|
|
132
|
-
updateSSOConfiguration: (payload: import("@frontegg/redux-store
|
|
131
|
+
saveSSOConfigurationV2: (payload: import("@frontegg/redux-store").WithCallback<Partial<Pick<import("@frontegg/redux-store").ISSOConfiguration, "roleIds" | "enabled" | "generatedVerification" | "ssoEndpoint" | "publicCertificate" | "signRequest" | "acsUrl" | "type" | "spEntityId" | "oidcClientId" | "oidcSecret" | "groups">>, import("@frontegg/redux-store").ISSOConfiguration>) => void;
|
|
132
|
+
updateSSOConfiguration: (payload: import("@frontegg/redux-store").WithCallback<Partial<Pick<import("@frontegg/redux-store").ISSOConfiguration, "roleIds" | "enabled" | "generatedVerification" | "ssoEndpoint" | "publicCertificate" | "signRequest" | "acsUrl" | "type" | "spEntityId" | "oidcClientId" | "oidcSecret" | "groups">> & {
|
|
133
133
|
ssoConfigId: string;
|
|
134
134
|
}, import("@frontegg/redux-store").ISSOConfiguration>) => void;
|
|
135
|
-
deleteSSOConfiguration: (payload: import("@frontegg/redux-store
|
|
135
|
+
deleteSSOConfiguration: (payload: import("@frontegg/redux-store").WithCallback<{
|
|
136
136
|
ssoConfigId: string;
|
|
137
137
|
}, boolean>) => void;
|
|
138
|
-
deleteSSODomain: (payload: import("@frontegg/redux-store
|
|
138
|
+
deleteSSODomain: (payload: import("@frontegg/redux-store").WithCallback<{
|
|
139
139
|
domainId: string;
|
|
140
140
|
ssoConfigId: string;
|
|
141
141
|
}, boolean>) => void;
|
|
142
|
-
saveSSODomain: (payload: import("@frontegg/redux-store
|
|
142
|
+
saveSSODomain: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").ICreateSSODomain & {
|
|
143
143
|
ssoConfigId: string;
|
|
144
144
|
}, import("@frontegg/redux-store").ISSODomain>) => void;
|
|
145
|
-
validateSSODomainV2: (payload: import("@frontegg/redux-store
|
|
145
|
+
validateSSODomainV2: (payload: import("@frontegg/redux-store").WithCallback<{
|
|
146
146
|
domainId: string;
|
|
147
147
|
ssoConfigId: string;
|
|
148
148
|
}, boolean>) => void;
|
|
149
|
-
setSSODefaultRoles: (payload: import("@frontegg/redux-store
|
|
149
|
+
setSSODefaultRoles: (payload: import("@frontegg/redux-store").WithCallback<{
|
|
150
150
|
roleIds: string[];
|
|
151
151
|
ssoConfigId: string;
|
|
152
152
|
}, boolean>) => void;
|
|
153
|
-
setSSOGroups: (payload: import("@frontegg/redux-store
|
|
153
|
+
setSSOGroups: (payload: import("@frontegg/redux-store").WithCallback<{
|
|
154
154
|
ssoConfigId: string;
|
|
155
155
|
groupsToAdd: import("@frontegg/rest-api").ICreateSamlGroup[];
|
|
156
156
|
groupsToDelete: string[];
|
|
157
157
|
}, boolean>) => void;
|
|
158
|
-
updateSSOGroups: (payload: import("@frontegg/redux-store
|
|
158
|
+
updateSSOGroups: (payload: import("@frontegg/redux-store").WithCallback<{
|
|
159
159
|
ssoConfigId: string;
|
|
160
160
|
changedGroups: import("@frontegg/rest-api").IUpdateSamlGroup[];
|
|
161
161
|
}, boolean>) => void;
|
|
162
|
-
saveSSOConfigurationByMetadata: (payload: import("@frontegg/redux-store
|
|
162
|
+
saveSSOConfigurationByMetadata: (payload: import("@frontegg/redux-store").WithCallback<{
|
|
163
163
|
configFile: File;
|
|
164
164
|
}, import("@frontegg/redux-store").ISSOConfiguration>) => void;
|
|
165
|
-
updateSSOConfigurationByMetadata: (payload: import("@frontegg/redux-store
|
|
165
|
+
updateSSOConfigurationByMetadata: (payload: import("@frontegg/redux-store").WithCallback<{
|
|
166
166
|
configFile: File;
|
|
167
167
|
ssoConfigId: string;
|
|
168
168
|
}, import("@frontegg/redux-store").ISSOConfiguration>) => void;
|
|
@@ -172,24 +172,24 @@ export declare const mapSsoActions: <K extends "loadSSOConfigurationsV2" | "save
|
|
|
172
172
|
resetSSOState: () => void;
|
|
173
173
|
loadSSOConfigurations: () => void;
|
|
174
174
|
loadSSOAuthorizationRoles: () => void;
|
|
175
|
-
saveSSOConfigurations: (payload: import("@frontegg/redux-store
|
|
175
|
+
saveSSOConfigurations: (payload: import("@frontegg/redux-store").WithCallback<Partial<Pick<import("@frontegg/rest-api").ISamlConfiguration, "enabled" | "ssoEndpoint" | "publicCertificate" | "signRequest" | "acsUrl" | "type" | "spEntityId" | "oidcClientId" | "oidcSecret" | "domain" | "isSamlActive"> & {
|
|
176
176
|
samlVendor: import("@frontegg/redux-store").SamlVendors;
|
|
177
177
|
}>, boolean>) => void;
|
|
178
178
|
saveSSOConfigurationsFile: (payload: File[]) => void;
|
|
179
|
-
saveSSOConfigurationsFileWithCallback: (payload: import("@frontegg/redux-store
|
|
179
|
+
saveSSOConfigurationsFileWithCallback: (payload: import("@frontegg/redux-store").WithCallback<{
|
|
180
180
|
configFile: File;
|
|
181
181
|
}, boolean>) => void;
|
|
182
182
|
validateSSODomain: (payload?: {
|
|
183
183
|
callback?: ((data: boolean | null, error?: string | undefined) => void) | undefined;
|
|
184
184
|
} | undefined) => void;
|
|
185
|
-
updateSSOAuthorizationRoles: (payload: import("@frontegg/redux-store
|
|
185
|
+
updateSSOAuthorizationRoles: (payload: import("@frontegg/redux-store").WithCallback<{
|
|
186
186
|
authorizationRoles: string[];
|
|
187
187
|
groups?: import("@frontegg/rest-api").ISamlRolesGroup[] | undefined;
|
|
188
188
|
}, boolean>) => void;
|
|
189
|
-
deleteSamlGroup: (payload: import("@frontegg/redux-store
|
|
189
|
+
deleteSamlGroup: (payload: import("@frontegg/redux-store").WithCallback<{
|
|
190
190
|
id: string;
|
|
191
191
|
}, boolean>) => void;
|
|
192
|
-
createSamlGroup: (payload: import("@frontegg/redux-store
|
|
192
|
+
createSamlGroup: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").ICreateSamlGroup, boolean>) => void;
|
|
193
193
|
oidcPostlogin: (payload: import("@frontegg/rest-api").IOidcPostLogin) => void;
|
|
194
194
|
}[K];
|
|
195
195
|
export declare const mapTeamActions: <K extends "setTeamLoader" | "setTeamError" | "setTeamState" | "resetTeamState" | "loadUsers" | "loadAllSubTenantsUsers" | "loadRoles" | "addUser" | "addUserToSubTenants" | "setUserRolesForSubTenants" | "updateUser" | "deleteUser" | "deleteUserFromSubTenants" | "lockUser" | "resendActivationLink" | "resendInvitationLink" | "resendInvitationLinkToAllSubTenants" | "getInvitationLink" | "createInvitationLink" | "updateInvitationLink" | "deleteInvitationLink" | "openAddUserDialog" | "closeAddUserDialog" | "openDeleteUserDialog" | "closeDeleteUserDialog" | "openLockUserDialog" | "closeLockUserDialog">(action: K) => {
|
|
@@ -197,29 +197,29 @@ export declare const mapTeamActions: <K extends "setTeamLoader" | "setTeamError"
|
|
|
197
197
|
setTeamError: (payload: import("@frontegg/redux-store").TeamStateIndicator) => void;
|
|
198
198
|
setTeamState: (payload: Partial<import("@frontegg/redux-store").TeamState>) => void;
|
|
199
199
|
resetTeamState: () => void;
|
|
200
|
-
loadUsers: (payload: import("@frontegg/redux-store
|
|
201
|
-
loadAllSubTenantsUsers: (payload: import("@frontegg/redux-store
|
|
200
|
+
loadUsers: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithSilentLoad<import("@frontegg/rest-api").ILoadUsers>, import("@frontegg/rest-api").ITeamUser[]>) => void;
|
|
201
|
+
loadAllSubTenantsUsers: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/redux-store").WithSilentLoad<Partial<import("@frontegg/rest-api").ILoadAllUsers>>, import("@frontegg/rest-api").ISubTenantUser[]>) => void;
|
|
202
202
|
loadRoles: (payload?: {
|
|
203
203
|
callback?: ((data: {
|
|
204
204
|
roles: import("@frontegg/rest-api").ITeamUserRole[];
|
|
205
205
|
permissions: import("@frontegg/rest-api").ITeamUserPermission[];
|
|
206
206
|
} | null, error?: string | undefined) => void) | undefined;
|
|
207
207
|
} | undefined) => void;
|
|
208
|
-
addUser: (payload: import("@frontegg/redux-store
|
|
209
|
-
addUserToSubTenants: (payload: import("@frontegg/redux-store
|
|
210
|
-
setUserRolesForSubTenants: (payload: import("@frontegg/redux-store
|
|
208
|
+
addUser: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").IAddUser, import("@frontegg/rest-api").ITeamUser>) => void;
|
|
209
|
+
addUserToSubTenants: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").AddUserToSubTenantsRequest, boolean>) => void;
|
|
210
|
+
setUserRolesForSubTenants: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").UpdateUserRolesForSubTenantsRequestDto & {
|
|
211
211
|
userId: string;
|
|
212
212
|
}, boolean>) => void;
|
|
213
|
-
updateUser: (payload: import("@frontegg/redux-store
|
|
214
|
-
deleteUser: (payload: import("@frontegg/redux-store
|
|
215
|
-
deleteUserFromSubTenants: (payload: import("@frontegg/redux-store
|
|
216
|
-
lockUser: (payload: import("@frontegg/redux-store
|
|
217
|
-
resendActivationLink: (payload: import("@frontegg/redux-store
|
|
218
|
-
resendInvitationLink: (payload: import("@frontegg/redux-store
|
|
219
|
-
resendInvitationLinkToAllSubTenants: (payload: import("@frontegg/redux-store
|
|
213
|
+
updateUser: (payload: import("@frontegg/redux-store").WithCallback<Partial<import("@frontegg/rest-api").ITeamUser>, import("@frontegg/rest-api").ITeamUser>) => void;
|
|
214
|
+
deleteUser: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").IDeleteUser, boolean>) => void;
|
|
215
|
+
deleteUserFromSubTenants: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").RemoveUserFromSubTenantsRequest, boolean>) => void;
|
|
216
|
+
lockUser: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").IDeleteUser, boolean>) => void;
|
|
217
|
+
resendActivationLink: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").IResendActivationLink, boolean>) => void;
|
|
218
|
+
resendInvitationLink: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").IResendInvitationLink, boolean>) => void;
|
|
219
|
+
resendInvitationLinkToAllSubTenants: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").IResendInvitationLink, boolean>) => void;
|
|
220
220
|
getInvitationLink: () => void;
|
|
221
|
-
createInvitationLink: (payload: import("@frontegg/redux-store
|
|
222
|
-
updateInvitationLink: (payload: import("@frontegg/redux-store
|
|
221
|
+
createInvitationLink: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").ICreateOrUpdateInviteUserLink, string>) => void;
|
|
222
|
+
updateInvitationLink: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").ICreateOrUpdateInviteUserLink, boolean>) => void;
|
|
223
223
|
deleteInvitationLink: (payload?: {
|
|
224
224
|
callback?: ((data: boolean | null, error?: string | undefined) => void) | undefined;
|
|
225
225
|
} | undefined) => void;
|
|
@@ -233,7 +233,7 @@ export declare const mapTeamActions: <K extends "setTeamLoader" | "setTeamError"
|
|
|
233
233
|
export declare const mapTenantsActions: <K extends "setTenantsState" | "resetTenantsState" | "switchTenant" | "loadTenants" | "loadSubTenants" | "loadSubTenantsTree">(action: K) => {
|
|
234
234
|
setTenantsState: (state: Partial<import("@frontegg/redux-store").TenantsState>) => void;
|
|
235
235
|
resetTenantsState: () => void;
|
|
236
|
-
switchTenant: (payload: import("@frontegg/redux-store
|
|
236
|
+
switchTenant: (payload: import("@frontegg/redux-store").WithCallback<import("@frontegg/rest-api").ISwitchTenant, boolean>) => void;
|
|
237
237
|
loadTenants: (payload?: {
|
|
238
238
|
callback?: ((data: import("@frontegg/rest-api").ITenantsResponse[] | null, error?: string | undefined) => void) | undefined;
|
|
239
239
|
} | undefined) => void;
|
package/dist/auth/service.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AuthPluginOptions } from './interfaces';
|
|
2
2
|
import { FronteggPluginService, FronteggStore, PluginConfig, PluginOptions } from '../interfaces';
|
|
3
3
|
import { EnhancedStore } from '@reduxjs/toolkit';
|
|
4
|
-
import { CaseReducerActions, SliceCaseReducers } from '@frontegg/redux-store
|
|
4
|
+
import { CaseReducerActions, SliceCaseReducers } from '@frontegg/redux-store';
|
|
5
5
|
import { LoginActions, SocialLoginActions, ActivateAccountActions, AcceptInvitationActions, ForgotPasswordActions, SignUpActions, ProfileActions, SSOActions, MfaActions, TeamActions, ApiTokensActions, SecurityPolicyActions, User, TenantsActions, AuthPageRoutes } from '@frontegg/redux-store';
|
|
6
6
|
import VueRouter from 'vue-router';
|
|
7
7
|
export declare const sliceReducerActionsBy: <T extends SliceCaseReducers<any>>(reducer: T) => CaseReducerActions<T>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PluginObject } from 'vue';
|
|
2
2
|
import { PluginOptions } from './interfaces';
|
|
3
|
-
import { AdminPortal } from '@frontegg/
|
|
3
|
+
import { AdminPortal } from '@frontegg/js';
|
|
4
4
|
export * from './types';
|
|
5
5
|
export { mapAuthActions, mapLoginActions, mapAcceptInvitationActions, mapActivateAccountActions, mapApiTokensActions, mapForgotPasswordActions, mapMfaActions, mapProfileActions, mapSecurityPolicyActions, mapSignupActions, mapSocialLoginActions, mapSsoActions, mapTeamActions, } from './auth/mapAuthState';
|
|
6
6
|
export * from './auth/interfaces';
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,9 @@ import { ContextHolder } from '@frontegg/rest-api';
|
|
|
2
2
|
import set from 'set-value';
|
|
3
3
|
import get from 'get-value';
|
|
4
4
|
import * as Vue from 'vue';
|
|
5
|
-
import { initialize, AdminPortal } from '@frontegg/
|
|
6
|
-
export { AdminPortal } from '@frontegg/
|
|
7
|
-
import { bindActionCreators } from '@frontegg/redux-store
|
|
8
|
-
import { authInitialState, loginActions, socialLoginsActions, activateAccountActions, acceptInvitationActions, forgotPasswordActions, signUpActions, profileActions, ssoActions, mfaActions, teamActions, apiTokensActions, securityPolicyActions, tenantsActions, authActions } from '@frontegg/redux-store';
|
|
5
|
+
import { initialize, AdminPortal } from '@frontegg/js';
|
|
6
|
+
export { AdminPortal } from '@frontegg/js';
|
|
7
|
+
import { authInitialState, loginActions, socialLoginsActions, activateAccountActions, acceptInvitationActions, forgotPasswordActions, signUpActions, profileActions, ssoActions, mfaActions, teamActions, apiTokensActions, securityPolicyActions, tenantsActions, bindActionCreators, authActions } from '@frontegg/redux-store';
|
|
9
8
|
|
|
10
9
|
/*! *****************************************************************************
|
|
11
10
|
Copyright (c) Microsoft Corporation.
|
package/dist/index.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var FronteggCore=function(t,n,e,r,o,i,a
|
|
1
|
+
var FronteggCore=function(t,n,e,r,o,i,a){"use strict";function u(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function c(t){if(t&&t.__esModule)return t;var n=Object.create(null);return t&&Object.keys(t).forEach((function(e){if("default"!==e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})}})),n.default=t,Object.freeze(n)}var s=u(e),f=u(r),l=c(o);function d(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function g(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function v(t,n,e){return n&&g(t.prototype,n),e&&g(t,e),t}function h(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function p(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var e=[],r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(e.push(a.value),!n||e.length!==n);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return e}(t,n)||b(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,n){if(t){if("string"==typeof t)return A(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?A(t,n):void 0}}function A(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -13,4 +13,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
15
|
***************************************************************************** */
|
|
16
|
-
function y(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}var m=function(t,n){var e;return t.FRONTEGG_STORE_KEY=null!==(e=t.FRONTEGG_STORE_KEY)&&void 0!==e?e:n},O=function(t){return t.FRONTEGG_STORE_KEY},I=function(t){return t.FRONTEGG_REDUX_BINDINGS},R=function(){function t(){g(this,t)}return h(t,null,[{key:"getInstance",value:function(){return t.instance||(t.instance=new t),t.instance}},{key:"setStore",value:function(n){t.getInstance().store=n}},{key:"getStore",value:function(){return t.getInstance().store}},{key:"setBasename",value:function(n){t.getInstance().baseName=n}},{key:"getBasename",value:function(){return t.getInstance().baseName}}]),t}(),E=function(t){return function(n){return l.default(n,t)}},T=function(t,n,e){return function(){var r,o=this,i=Object.keys(n),a=l.default(O(o).getState(),t),u=function(t,n,e,r,o){return e.reduce((function(e,i){return Object.assign({},e,p({},n,Object.assign(Object.assign({},e[n]),p({},i,function(t,n,e){return"function"==typeof n?n.bind(t):e(n)}(t,r[i],o)))))}),I(t)||{})}(o,t,i,n,e);return r=u,o.FRONTEGG_REDUX_BINDINGS=r,i.reduce((function(t,r){return Object.assign({},t,p({},r,function(t,n,e,r){return"function"==typeof n?n.call(t,r):e(n)(r)}(o,n[r],e,a)))}),{})}},P=function(){function t(){g(this,t)}return h(t,null,[{key:"getInstance",value:function(){return t.instance||(t.instance=new t),t.instance}},{key:"setActions",value:function(n){t.getInstance().actions=n}},{key:"getAction",value:function(n){return t.getInstance().actions[n]}}]),t}(),j=function(){function t(n){var e=this;g(this,t);var r=n.router,o=y(n,["router"]);this.state=u.authInitialState,this.userRef=void 0,this.init=function(t,n){e.store=n,Object.entries({loginActions:u.loginActions,socialLoginsActions:u.socialLoginsActions,activateAccountActions:u.activateAccountActions,acceptInvitationActions:u.acceptInvitationActions,forgotPasswordActions:u.forgotPasswordActions,signUpActions:u.signUpActions,profileActions:u.profileActions,ssoActions:u.ssoActions,mfaActions:u.mfaActions,teamActions:u.teamActions,apiTokensActions:u.apiTokensActions,securityPolicyActions:u.securityPolicyActions,tenantsActions:u.tenantsActions}).forEach((function(t){var n=b(t,2),r=n[0],o=n[1];Object.assign(e,p({},r,a.bindActionCreators(o,e.store.dispatch)))}));var r=a.bindActionCreators(u.authActions,e.store.dispatch);P.setActions(r),t.hostedLoginBox||e.store.subscribe(e.storeSubscriber)},this.storeSubscriber=function(){e.state=e.store.getState().auth;var t=!1;e.state.user!==e.userRef&&(e.userRef=e.state.user,t=!0),e.state.isAuthenticated!==e.isAuthenticatedRef&&(e.isAuthenticatedRef=e.state.isAuthenticated,t=!0),e.userRef&&e.state.isAuthenticated?t&&e.accessTokenUpdater():clearInterval(e.accessTokenUpdaterRef)},this.accessTokenUpdater=function(){var t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e.accessTokenUpdaterRef&&clearInterval(e.accessTokenUpdaterRef),n)e.loginActions.requestAuthorize(!0);else if(e.isAuthenticated){var r=1e3*((null===(t=e.user)||void 0===t?void 0:t.expiresIn)||20)*.8;e.accessTokenUpdaterRef=setInterval(e.loginActions.requestAuthorize,r)}},this._routes=Object.assign(Object.assign({},u.authInitialState.routes),o.routes),this.router=r}return h(t,[{key:"loading",get:function(){var t,n;return null===(n=null===(t=this.store)||void 0===t?void 0:t.getState().auth.isLoading)||void 0===n||n}},{key:"routes",get:function(){var t,n;return null!==(n=null===(t=this.store)||void 0===t?void 0:t.getState().auth.routes)&&void 0!==n?n:this._routes}},{key:"isAuthenticated",get:function(){var t,n;return null!==(n=null===(t=this.store)||void 0===t?void 0:t.getState().auth.isAuthenticated)&&void 0!==n&&n}},{key:"user",get:function(){var t;return null===(t=this.store)||void 0===t?void 0:t.getState().auth.user}}]),t}(),k=function(t,n){return function(){var e=p({},null!=n?n:t.substring("auth.".length),(function(t){return t}));return T(t,e,E).bind(this)()}},w=function(t){return k("auth","authState").bind(t)},_=function(t){return k("auth.loginState").bind(t)},U=function(t){return k("auth.acceptInvitationState").bind(t)},G=function(t){return k("auth.activateState").bind(t)},N=function(t){return k("auth.apiTokensState").bind(t)},L=function(t){return k("auth.forgotPasswordState").bind(t)},C=function(t){return k("auth.mfaState").bind(t)},F=function(t){return k("auth.profileState").bind(t)},B=function(t){return k("auth.securityPolicyState").bind(t)},x=function(t){return k("auth.signUpState").bind(t)},D=function(t){return k("auth.socialLoginState").bind(t)},q=function(t){return k("auth.ssoState").bind(t)},z=function(t){return k("auth.teamState").bind(t)},M=function(t){return k("auth.tenantsState").bind(t)},H=function(t){Object.assign(t,{mapAuthState:w(t),mapLoginState:_(t),mapAcceptInvitationState:U(t),mapActivateAccountState:G(t),mapApiTokensState:N(t),mapForgotPasswordState:L(t),mapMfaState:C(t),mapProfileState:F(t),mapSecurityPolicyState:B(t),mapSignUpState:x(t),mapSocialLoginState:D(t),mapSsoState:q(t),mapTeamState:z(t),mapTenantsState:M(t)})},V=function(t){return function(){return P.getAction(t).apply(void 0,arguments)}},K=null,W={install:function(t,e){var r,o=null!=e?e:{},a=o.router,u=y(o,["router"]),c=(null!=e?e:{}).contextOptions;if(null==c)throw Error("contextOptions must be passed to Vue.use(Frontegg, { /* OPTIONS */ })");c.requestCredentials=null!==(r=c.requestCredentials)&&void 0!==r?r:"include",n.ContextHolder.setContext(c);var s=!1,g=!1,v=new Set,h=a&&function(t){var e=t.options.base||"";R.setBasename(e);var r=function(n,r){var o=n;o.startsWith(e)&&"/"!==e&&(o=o.substring(e.length-1)),(null==r?void 0:r.refresh)?window.location.href=o:(null==r?void 0:r.replace)?t.replace(o):t.push(o)};return n.ContextHolder.setOnRedirectTo(r),r}(a),p=(K=i.initialize(Object.assign(Object.assign({},u),{onRedirectTo:h,basename:null==a?void 0:a.options.base}))).store;R.setStore(p),t.$fronteggApp=K,t.fronteggAuth||(t.fronteggAuth=new j({router:a}),function(t,n){var e;t.fronteggPlugins=null!==(e=t.fronteggPlugins)&&void 0!==e?e:[],t.fronteggPlugins.push(n)}(t,t.fronteggAuth));var b=function(){var n=(t.fronteggPlugins||[]).reduce((function(t,n){return t&&!n.loading}),!0);if(n!==g){g=n;var e,r=function(t,n){var e;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(e=A(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){e=t[Symbol.iterator]()},n:function(){var t=e.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==e.return||e.return()}finally{if(u)throw i}}}}(v);try{for(r.s();!(e=r.n()).done;){(0,e.value)()}}catch(t){r.e(t)}finally{r.f()}}};null==a||a.getRoutes().map((function(t){var n=t.beforeEnter;t.beforeEnter=function(t,e,r){var o=function(){n?n(t,e,r):r()};if(g)o();else var i=setInterval((function(){b(),g&&(clearInterval(i),o())}),1)}}));var S,E=setInterval((function(){b(),g&&clearInterval(E)}),10);s||(S=t,s=!0,(t.fronteggPlugins||[]).forEach((function(t){return t.init(u,p)})),m(S,p),S.fronteggAuth=t.fronteggAuth,H(S)),t.mixin({data:function(){return{fronteggLoaded:g}},beforeCreate:function(){m(this,p),this.fronteggAuth=t.fronteggAuth,H(this)},created:function(){var t,n;I(this)&&function(t,n){t.FRONTEGG_UNSUBSCRIBE=n}(this,p.subscribe((t=this,n=I(this),function(){var e=O(t).getState();Object.keys(n).forEach((function(r){Object.keys(n[r]).forEach((function(o){var i=n[r][o];if(i){var a,u=i(l.default(e,r)),c=Object.assign({},d);c.default&&(a=2),c.version&&"3"===c.version[0]&&(a=3),3===a&&f.default(t.$data,o,u),2===a&&f.default(t._data,o,u)}}))}))}))),function(t,n){t.FRONTEGG_LOADER_UNSUBSCRIBE=n}(this,function(t){var n=function(){t.fronteggLoaded=g};return v.add(n),function(){return v.delete(n)}}(this))},beforeDestroy:function(){!function(t){var n;null===(n=t.FRONTEGG_UNSUBSCRIBE)||void 0===n||n.call(t)}(this),function(t){var n;null===(n=t.FRONTEGG_LOADER_UNSUBSCRIBE)||void 0===n||n.call(t)}(this)}})}};return Object.defineProperty(t,"AdminPortal",{enumerable:!0,get:function(){return i.AdminPortal}}),t.Frontegg=W,t.closeAdminPortal=function(){return i.AdminPortal.hide()},t.isAuthenticatedGuard=function(t,n,e){var r,o,i=function(){var n,r=R.getStore().getState().auth;if(r.isAuthenticated)e();else{var o=null!==(n=R.getBasename())&&void 0!==n?n:"",i=o.endsWith("/")?o.substring(0,o.length-1):"";localStorage.setItem("FRONTEGG_AFTER_AUTH_REDIRECT_URL","".concat(i).concat(t.fullPath)),e({path:r.routes.loginUrl,replace:!0})}},a=null===(o=null===(r=R.getStore())||void 0===r?void 0:r.getState())||void 0===o?void 0:o.auth;if(!a||(null==a?void 0:a.isLoading))var u=setInterval((function(){var t,n;(a=null===(n=null===(t=R.getStore())||void 0===t?void 0:t.getState())||void 0===n?void 0:n.auth)&&!(null==a?void 0:a.isLoading)&&(clearInterval(u),i())}),1);else i()},t.mapAcceptInvitationActions=function(t){return V(t)},t.mapActivateAccountActions=function(t){return V(t)},t.mapApiTokensActions=function(t){return V(t)},t.mapAuthActions=function(t){return V(t)},t.mapForgotPasswordActions=function(t){return V(t)},t.mapLoginActions=function(t){return V("loginWithRedirect"===t?"requestHostedLoginAuthorize":t)},t.mapMfaActions=function(t){return V(t)},t.mapProfileActions=function(t){return V(t)},t.mapSecurityPolicyActions=function(t){return V(t)},t.mapSignupActions=function(t){return V(t)},t.mapSocialLoginActions=function(t){return V(t)},t.mapSsoActions=function(t){return V(t)},t.mapTeamActions=function(t){return V(t)},t.openAdminPortal=function(){return i.AdminPortal.show()},Object.defineProperty(t,"__esModule",{value:!0}),t}({},fronteggRestApi,setValue,getValue,Vue,adminPortal,toolkit,fronteggReduxStore);
|
|
16
|
+
function S(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}var y=function(t,n){var e;return t.FRONTEGG_STORE_KEY=null!==(e=t.FRONTEGG_STORE_KEY)&&void 0!==e?e:n},m=function(t){return t.FRONTEGG_STORE_KEY},O=function(t){return t.FRONTEGG_REDUX_BINDINGS},I=function(){function t(){d(this,t)}return v(t,null,[{key:"getInstance",value:function(){return t.instance||(t.instance=new t),t.instance}},{key:"setStore",value:function(n){t.getInstance().store=n}},{key:"getStore",value:function(){return t.getInstance().store}},{key:"setBasename",value:function(n){t.getInstance().baseName=n}},{key:"getBasename",value:function(){return t.getInstance().baseName}}]),t}(),R=function(t){return function(n){return f.default(n,t)}},E=function(t,n,e){return function(){var r,o=this,i=Object.keys(n),a=f.default(m(o).getState(),t),u=function(t,n,e,r,o){return e.reduce((function(e,i){return Object.assign({},e,h({},n,Object.assign(Object.assign({},e[n]),h({},i,function(t,n,e){return"function"==typeof n?n.bind(t):e(n)}(t,r[i],o)))))}),O(t)||{})}(o,t,i,n,e);return r=u,o.FRONTEGG_REDUX_BINDINGS=r,i.reduce((function(t,r){return Object.assign({},t,h({},r,function(t,n,e,r){return"function"==typeof n?n.call(t,r):e(n)(r)}(o,n[r],e,a)))}),{})}},T=function(){function t(){d(this,t)}return v(t,null,[{key:"getInstance",value:function(){return t.instance||(t.instance=new t),t.instance}},{key:"setActions",value:function(n){t.getInstance().actions=n}},{key:"getAction",value:function(n){return t.getInstance().actions[n]}}]),t}(),j=function(){function t(n){var e=this;d(this,t);var r=n.router,o=S(n,["router"]);this.state=a.authInitialState,this.userRef=void 0,this.init=function(t,n){e.store=n,Object.entries({loginActions:a.loginActions,socialLoginsActions:a.socialLoginsActions,activateAccountActions:a.activateAccountActions,acceptInvitationActions:a.acceptInvitationActions,forgotPasswordActions:a.forgotPasswordActions,signUpActions:a.signUpActions,profileActions:a.profileActions,ssoActions:a.ssoActions,mfaActions:a.mfaActions,teamActions:a.teamActions,apiTokensActions:a.apiTokensActions,securityPolicyActions:a.securityPolicyActions,tenantsActions:a.tenantsActions}).forEach((function(t){var n=p(t,2),r=n[0],o=n[1];Object.assign(e,h({},r,a.bindActionCreators(o,e.store.dispatch)))}));var r=a.bindActionCreators(a.authActions,e.store.dispatch);T.setActions(r),t.hostedLoginBox||e.store.subscribe(e.storeSubscriber)},this.storeSubscriber=function(){e.state=e.store.getState().auth;var t=!1;e.state.user!==e.userRef&&(e.userRef=e.state.user,t=!0),e.state.isAuthenticated!==e.isAuthenticatedRef&&(e.isAuthenticatedRef=e.state.isAuthenticated,t=!0),e.userRef&&e.state.isAuthenticated?t&&e.accessTokenUpdater():clearInterval(e.accessTokenUpdaterRef)},this.accessTokenUpdater=function(){var t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e.accessTokenUpdaterRef&&clearInterval(e.accessTokenUpdaterRef),n)e.loginActions.requestAuthorize(!0);else if(e.isAuthenticated){var r=1e3*((null===(t=e.user)||void 0===t?void 0:t.expiresIn)||20)*.8;e.accessTokenUpdaterRef=setInterval(e.loginActions.requestAuthorize,r)}},this._routes=Object.assign(Object.assign({},a.authInitialState.routes),o.routes),this.router=r}return v(t,[{key:"loading",get:function(){var t,n;return null===(n=null===(t=this.store)||void 0===t?void 0:t.getState().auth.isLoading)||void 0===n||n}},{key:"routes",get:function(){var t,n;return null!==(n=null===(t=this.store)||void 0===t?void 0:t.getState().auth.routes)&&void 0!==n?n:this._routes}},{key:"isAuthenticated",get:function(){var t,n;return null!==(n=null===(t=this.store)||void 0===t?void 0:t.getState().auth.isAuthenticated)&&void 0!==n&&n}},{key:"user",get:function(){var t;return null===(t=this.store)||void 0===t?void 0:t.getState().auth.user}}]),t}(),P=function(t,n){return function(){var e=h({},null!=n?n:t.substring("auth.".length),(function(t){return t}));return E(t,e,R).bind(this)()}},w=function(t){return P("auth","authState").bind(t)},k=function(t){return P("auth.loginState").bind(t)},_=function(t){return P("auth.acceptInvitationState").bind(t)},U=function(t){return P("auth.activateState").bind(t)},G=function(t){return P("auth.apiTokensState").bind(t)},N=function(t){return P("auth.forgotPasswordState").bind(t)},L=function(t){return P("auth.mfaState").bind(t)},C=function(t){return P("auth.profileState").bind(t)},F=function(t){return P("auth.securityPolicyState").bind(t)},B=function(t){return P("auth.signUpState").bind(t)},x=function(t){return P("auth.socialLoginState").bind(t)},D=function(t){return P("auth.ssoState").bind(t)},q=function(t){return P("auth.teamState").bind(t)},z=function(t){return P("auth.tenantsState").bind(t)},M=function(t){Object.assign(t,{mapAuthState:w(t),mapLoginState:k(t),mapAcceptInvitationState:_(t),mapActivateAccountState:U(t),mapApiTokensState:G(t),mapForgotPasswordState:N(t),mapMfaState:L(t),mapProfileState:C(t),mapSecurityPolicyState:F(t),mapSignUpState:B(t),mapSocialLoginState:x(t),mapSsoState:D(t),mapTeamState:q(t),mapTenantsState:z(t)})},H=function(t){return function(){return T.getAction(t).apply(void 0,arguments)}},V=null,K={install:function(t,e){var r,o=null!=e?e:{},a=o.router,u=S(o,["router"]),c=(null!=e?e:{}).contextOptions;if(null==c)throw Error("contextOptions must be passed to Vue.use(Frontegg, { /* OPTIONS */ })");c.requestCredentials=null!==(r=c.requestCredentials)&&void 0!==r?r:"include",n.ContextHolder.setContext(c);var d=!1,g=!1,v=new Set,h=a&&function(t){var e=t.options.base||"";I.setBasename(e);var r=function(n,r){var o=n;o.startsWith(e)&&"/"!==e&&(o=o.substring(e.length-1)),(null==r?void 0:r.refresh)?window.location.href=o:(null==r?void 0:r.replace)?t.replace(o):t.push(o)};return n.ContextHolder.setOnRedirectTo(r),r}(a),p=(V=i.initialize(Object.assign(Object.assign({},u),{onRedirectTo:h,basename:null==a?void 0:a.options.base}))).store;I.setStore(p),t.$fronteggApp=V,t.fronteggAuth||(t.fronteggAuth=new j({router:a}),function(t,n){var e;t.fronteggPlugins=null!==(e=t.fronteggPlugins)&&void 0!==e?e:[],t.fronteggPlugins.push(n)}(t,t.fronteggAuth));var A=function(){var n=(t.fronteggPlugins||[]).reduce((function(t,n){return t&&!n.loading}),!0);if(n!==g){g=n;var e,r=function(t,n){var e;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(e=b(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){e=t[Symbol.iterator]()},n:function(){var t=e.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==e.return||e.return()}finally{if(u)throw i}}}}(v);try{for(r.s();!(e=r.n()).done;){(0,e.value)()}}catch(t){r.e(t)}finally{r.f()}}};null==a||a.getRoutes().map((function(t){var n=t.beforeEnter;t.beforeEnter=function(t,e,r){var o=function(){n?n(t,e,r):r()};if(g)o();else var i=setInterval((function(){A(),g&&(clearInterval(i),o())}),1)}}));var R,E=setInterval((function(){A(),g&&clearInterval(E)}),10);d||(R=t,d=!0,(t.fronteggPlugins||[]).forEach((function(t){return t.init(u,p)})),y(R,p),R.fronteggAuth=t.fronteggAuth,M(R)),t.mixin({data:function(){return{fronteggLoaded:g}},beforeCreate:function(){y(this,p),this.fronteggAuth=t.fronteggAuth,M(this)},created:function(){var t,n;O(this)&&function(t,n){t.FRONTEGG_UNSUBSCRIBE=n}(this,p.subscribe((t=this,n=O(this),function(){var e=m(t).getState();Object.keys(n).forEach((function(r){Object.keys(n[r]).forEach((function(o){var i=n[r][o];if(i){var a,u=i(f.default(e,r)),c=Object.assign({},l);c.default&&(a=2),c.version&&"3"===c.version[0]&&(a=3),3===a&&s.default(t.$data,o,u),2===a&&s.default(t._data,o,u)}}))}))}))),function(t,n){t.FRONTEGG_LOADER_UNSUBSCRIBE=n}(this,function(t){var n=function(){t.fronteggLoaded=g};return v.add(n),function(){return v.delete(n)}}(this))},beforeDestroy:function(){!function(t){var n;null===(n=t.FRONTEGG_UNSUBSCRIBE)||void 0===n||n.call(t)}(this),function(t){var n;null===(n=t.FRONTEGG_LOADER_UNSUBSCRIBE)||void 0===n||n.call(t)}(this)}})}};return Object.defineProperty(t,"AdminPortal",{enumerable:!0,get:function(){return i.AdminPortal}}),t.Frontegg=K,t.closeAdminPortal=function(){return i.AdminPortal.hide()},t.isAuthenticatedGuard=function(t,n,e){var r,o,i=function(){var n,r=I.getStore().getState().auth;if(r.isAuthenticated)e();else{var o=null!==(n=I.getBasename())&&void 0!==n?n:"",i=o.endsWith("/")?o.substring(0,o.length-1):"";localStorage.setItem("FRONTEGG_AFTER_AUTH_REDIRECT_URL","".concat(i).concat(t.fullPath)),e({path:r.routes.loginUrl,replace:!0})}},a=null===(o=null===(r=I.getStore())||void 0===r?void 0:r.getState())||void 0===o?void 0:o.auth;if(!a||(null==a?void 0:a.isLoading))var u=setInterval((function(){var t,n;(a=null===(n=null===(t=I.getStore())||void 0===t?void 0:t.getState())||void 0===n?void 0:n.auth)&&!(null==a?void 0:a.isLoading)&&(clearInterval(u),i())}),1);else i()},t.mapAcceptInvitationActions=function(t){return H(t)},t.mapActivateAccountActions=function(t){return H(t)},t.mapApiTokensActions=function(t){return H(t)},t.mapAuthActions=function(t){return H(t)},t.mapForgotPasswordActions=function(t){return H(t)},t.mapLoginActions=function(t){return H("loginWithRedirect"===t?"requestHostedLoginAuthorize":t)},t.mapMfaActions=function(t){return H(t)},t.mapProfileActions=function(t){return H(t)},t.mapSecurityPolicyActions=function(t){return H(t)},t.mapSignupActions=function(t){return H(t)},t.mapSocialLoginActions=function(t){return H(t)},t.mapSsoActions=function(t){return H(t)},t.mapTeamActions=function(t){return H(t)},t.openAdminPortal=function(){return i.AdminPortal.show()},Object.defineProperty(t,"__esModule",{value:!0}),t}({},fronteggRestApi,setValue,getValue,Vue,js,fronteggReduxStore);
|
package/dist/index.ssr.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var restApi=require('@frontegg/rest-api'),set=require('set-value'),get=require('get-value'),Vue=require('vue'),
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var restApi=require('@frontegg/rest-api'),set=require('set-value'),get=require('get-value'),Vue=require('vue'),js=require('@frontegg/js'),reduxStore=require('@frontegg/redux-store');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k];}});}});}n['default']=e;return Object.freeze(n);}var set__default=/*#__PURE__*/_interopDefaultLegacy(set);var get__default=/*#__PURE__*/_interopDefaultLegacy(get);var Vue__namespace=/*#__PURE__*/_interopNamespace(Vue);function _classCallCheck(instance, Constructor) {
|
|
2
2
|
if (!(instance instanceof Constructor)) {
|
|
3
3
|
throw new TypeError("Cannot call a class as a function");
|
|
4
4
|
}
|
|
@@ -394,9 +394,9 @@ var objectMappers = function objectMappers(subState, obj, fallbackGetter) {
|
|
|
394
394
|
key = _ref3[0],
|
|
395
395
|
actions = _ref3[1];
|
|
396
396
|
|
|
397
|
-
Object.assign(_this, _defineProperty({}, key,
|
|
397
|
+
Object.assign(_this, _defineProperty({}, key, reduxStore.bindActionCreators(actions, _this.store.dispatch)));
|
|
398
398
|
});
|
|
399
|
-
var detachableActions =
|
|
399
|
+
var detachableActions = reduxStore.bindActionCreators(reduxStore.authActions, _this.store.dispatch);
|
|
400
400
|
ActionsHolder.setActions(detachableActions);
|
|
401
401
|
|
|
402
402
|
if (!options.hostedLoginBox) {
|
|
@@ -670,7 +670,7 @@ var Frontegg = {
|
|
|
670
670
|
};
|
|
671
671
|
|
|
672
672
|
var onRedirectTo = router && setupOnRedirectTo(router);
|
|
673
|
-
fronteggApp =
|
|
673
|
+
fronteggApp = js.initialize(Object.assign(Object.assign({}, rest), {
|
|
674
674
|
onRedirectTo: onRedirectTo,
|
|
675
675
|
basename: router === null || router === void 0 ? void 0 : router.options.base
|
|
676
676
|
}));
|
|
@@ -792,7 +792,7 @@ var Frontegg = {
|
|
|
792
792
|
*/
|
|
793
793
|
|
|
794
794
|
var openAdminPortal = function openAdminPortal() {
|
|
795
|
-
return
|
|
795
|
+
return js.AdminPortal.show();
|
|
796
796
|
};
|
|
797
797
|
/**
|
|
798
798
|
* @deprecated since version 2.0
|
|
@@ -803,5 +803,5 @@ var openAdminPortal = function openAdminPortal() {
|
|
|
803
803
|
|
|
804
804
|
|
|
805
805
|
var closeAdminPortal = function closeAdminPortal() {
|
|
806
|
-
return
|
|
807
|
-
};Object.defineProperty(exports,'AdminPortal',{enumerable:true,get:function(){return
|
|
806
|
+
return js.AdminPortal.hide();
|
|
807
|
+
};Object.defineProperty(exports,'AdminPortal',{enumerable:true,get:function(){return js.AdminPortal;}});exports.Frontegg=Frontegg;exports.closeAdminPortal=closeAdminPortal;exports.isAuthenticatedGuard=isAuthenticatedGuard;exports.mapAcceptInvitationActions=mapAcceptInvitationActions;exports.mapActivateAccountActions=mapActivateAccountActions;exports.mapApiTokensActions=mapApiTokensActions;exports.mapAuthActions=mapAuthActions;exports.mapForgotPasswordActions=mapForgotPasswordActions;exports.mapLoginActions=mapLoginActions;exports.mapMfaActions=mapMfaActions;exports.mapProfileActions=mapProfileActions;exports.mapSecurityPolicyActions=mapSecurityPolicyActions;exports.mapSignupActions=mapSignupActions;exports.mapSocialLoginActions=mapSocialLoginActions;exports.mapSsoActions=mapSsoActions;exports.mapTeamActions=mapTeamActions;exports.openAdminPortal=openAdminPortal;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/vue",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1-alpha.2912759335",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.ssr.js",
|
|
6
6
|
"browser": "dist/index.js",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@frontegg/
|
|
26
|
-
"@frontegg/redux-store": "
|
|
25
|
+
"@frontegg/js": "6.0.3-alpha.3",
|
|
26
|
+
"@frontegg/redux-store": "6.0.3-alpha.3",
|
|
27
27
|
"get-value": "^3.0.1",
|
|
28
28
|
"set-value": "^4.0.1"
|
|
29
29
|
},
|
|
@@ -62,4 +62,4 @@
|
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=12"
|
|
64
64
|
}
|
|
65
|
-
}
|
|
65
|
+
}
|