@frontegg/vue 1.0.22 → 2.0.1-alpha.2952957281

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.
@@ -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/interfaces").WithCallback<import("@frontegg/redux-store").IActivateAccountPayload, boolean>) => void;
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/interfaces").WithCallback<import("@frontegg/rest-api").IGetActivateAccountStrategy, import("@frontegg/rest-api").IGetActivateAccountStrategyResponse>) => void;
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/interfaces").WithSilentLoad<{
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/interfaces").WithCallback<Pick<import("@frontegg/redux-store").ITenantApiTokensData, "roleIds" | "description">, boolean>) => void;
46
- addUserApiToken: (payload: import("@frontegg/redux-store/interfaces").WithCallback<Pick<import("@frontegg/redux-store").IApiTokensData, "description">, boolean>) => void;
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/interfaces").WithCallback<import("@frontegg/rest-api").IResetPassword, boolean>) => void;
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/interfaces").WithCallback<import("@frontegg/rest-api").IVerifyMfa, string | undefined>) => void;
62
- verifyMfaAfterForce: (payload: import("@frontegg/redux-store/interfaces").WithCallback<import("@frontegg/rest-api").ILoginWithMfa, string | undefined>) => void;
63
- disableMfa: (payload: import("@frontegg/redux-store/interfaces").WithCallback<import("@frontegg/rest-api").IDisableMfa, boolean>) => void;
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/interfaces").WithCallback<import("@frontegg/rest-api").IUserProfile, import("@frontegg/rest-api").IUserProfile>>) => void;
70
- changePassword: (payload: import("@frontegg/redux-store/interfaces").WithCallback<import("@frontegg/rest-api").IChangePassword, boolean>) => void;
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/interfaces").WithCallback<import("@frontegg/rest-api").ISaveSecurityPolicyMfa, import("@frontegg/rest-api").ISecurityPolicyMfa>) => void;
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/interfaces").WithCallback<import("@frontegg/rest-api").ISaveSecurityPolicyLockout, import("@frontegg/rest-api").ISecurityPolicyLockout>) => void;
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/interfaces").WithCallback<import("@frontegg/rest-api").ISaveSecurityPolicyPasswordHistory, import("@frontegg/rest-api").ISecurityPolicyPasswordHistory>) => void;
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/interfaces").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/interfaces").WithCallback<Partial<Pick<import("@frontegg/redux-store").ISSOConfiguration, "roleIds" | "enabled" | "generatedVerification" | "ssoEndpoint" | "publicCertificate" | "signRequest" | "acsUrl" | "type" | "spEntityId" | "oidcClientId" | "oidcSecret" | "groups">> & {
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/interfaces").WithCallback<{
135
+ deleteSSOConfiguration: (payload: import("@frontegg/redux-store").WithCallback<{
136
136
  ssoConfigId: string;
137
137
  }, boolean>) => void;
138
- deleteSSODomain: (payload: import("@frontegg/redux-store/interfaces").WithCallback<{
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/interfaces").WithCallback<import("@frontegg/rest-api").ICreateSSODomain & {
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/interfaces").WithCallback<{
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/interfaces").WithCallback<{
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/interfaces").WithCallback<{
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/interfaces").WithCallback<{
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/interfaces").WithCallback<{
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/interfaces").WithCallback<{
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/interfaces").WithCallback<Partial<Pick<import("@frontegg/rest-api").ISamlConfiguration, "enabled" | "ssoEndpoint" | "publicCertificate" | "signRequest" | "acsUrl" | "type" | "spEntityId" | "oidcClientId" | "oidcSecret" | "domain" | "isSamlActive"> & {
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/interfaces").WithCallback<{
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/interfaces").WithCallback<{
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/interfaces").WithCallback<{
189
+ deleteSamlGroup: (payload: import("@frontegg/redux-store").WithCallback<{
190
190
  id: string;
191
191
  }, boolean>) => void;
192
- createSamlGroup: (payload: import("@frontegg/redux-store/interfaces").WithCallback<import("@frontegg/rest-api").ICreateSamlGroup, boolean>) => void;
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/interfaces").WithCallback<import("@frontegg/redux-store/interfaces").WithSilentLoad<import("@frontegg/rest-api").ILoadUsers>, import("@frontegg/rest-api").ITeamUser[]>) => void;
201
- loadAllSubTenantsUsers: (payload: import("@frontegg/redux-store/interfaces").WithCallback<import("@frontegg/redux-store/interfaces").WithSilentLoad<Partial<import("@frontegg/rest-api").ILoadAllUsers>>, import("@frontegg/rest-api").ISubTenantUser[]>) => void;
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/interfaces").WithCallback<import("@frontegg/rest-api").IAddUser, import("@frontegg/rest-api").ITeamUser>) => void;
209
- addUserToSubTenants: (payload: import("@frontegg/redux-store/interfaces").WithCallback<import("@frontegg/rest-api").AddUserToSubTenantsRequest, boolean>) => void;
210
- setUserRolesForSubTenants: (payload: import("@frontegg/redux-store/interfaces").WithCallback<import("@frontegg/rest-api").UpdateUserRolesForSubTenantsRequestDto & {
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/interfaces").WithCallback<Partial<import("@frontegg/rest-api").ITeamUser>, import("@frontegg/rest-api").ITeamUser>) => void;
214
- deleteUser: (payload: import("@frontegg/redux-store/interfaces").WithCallback<import("@frontegg/rest-api").IDeleteUser, boolean>) => void;
215
- deleteUserFromSubTenants: (payload: import("@frontegg/redux-store/interfaces").WithCallback<import("@frontegg/rest-api").RemoveUserFromSubTenantsRequest, boolean>) => void;
216
- lockUser: (payload: import("@frontegg/redux-store/interfaces").WithCallback<import("@frontegg/rest-api").IDeleteUser, boolean>) => void;
217
- resendActivationLink: (payload: import("@frontegg/redux-store/interfaces").WithCallback<import("@frontegg/rest-api").IResendActivationLink, boolean>) => void;
218
- resendInvitationLink: (payload: import("@frontegg/redux-store/interfaces").WithCallback<import("@frontegg/rest-api").IResendInvitationLink, boolean>) => void;
219
- resendInvitationLinkToAllSubTenants: (payload: import("@frontegg/redux-store/interfaces").WithCallback<import("@frontegg/rest-api").IResendInvitationLink, boolean>) => void;
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/interfaces").WithCallback<import("@frontegg/rest-api").ICreateOrUpdateInviteUserLink, string>) => void;
222
- updateInvitationLink: (payload: import("@frontegg/redux-store/interfaces").WithCallback<import("@frontegg/rest-api").ICreateOrUpdateInviteUserLink, boolean>) => void;
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/interfaces").WithCallback<import("@frontegg/rest-api").ISwitchTenant, boolean>) => void;
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;
@@ -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/toolkit';
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/admin-portal';
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/admin-portal';
6
- export { AdminPortal } from '@frontegg/admin-portal';
7
- import { bindActionCreators } from '@frontegg/redux-store/toolkit';
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,i,o,a,u){"use strict";function c(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function s(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 f=c(e),l=c(r),d=s(i);function g(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function h(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&&h(t.prototype,n),e&&h(t,e),t}function p(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function A(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,i=!1,o=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){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}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 S(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)?S(t,n):void 0}}function S(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}
1
+ var FronteggCore=function(t,n,e,r,i,o,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(i);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 h(t,n,e){return n&&g(t.prototype,n),e&&g(t,e),t}function v(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,i=!1,o=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){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return e}(t,n)||A(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 A(t,n){if(t){if("string"==typeof t)return b(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)?b(t,n):void 0}}function b(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 i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]])}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},R=function(t){return t.FRONTEGG_REDUX_BINDINGS},I=function(){function t(){g(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}(),E=function(t){return function(n){return l.default(n,t)}},T=function(t,n,e){return function(){var r,i=this,o=Object.keys(n),a=l.default(O(i).getState(),t),u=function(t,n,e,r,i){return e.reduce((function(e,o){return Object.assign({},e,p({},n,Object.assign(Object.assign({},e[n]),p({},o,function(t,n,e){return"function"==typeof n?n.bind(t):e(n)}(t,r[o],i)))))}),R(t)||{})}(i,t,o,n,e);return r=u,i.FRONTEGG_REDUX_BINDINGS=r,o.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)}(i,n[r],e,a)))}),{})}},P=function(){function t(){g(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;g(this,t);var r=n.router,i=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=A(t,2),r=n[0],i=n[1];Object.assign(e,p({},r,a.bindActionCreators(i,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),i.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}(),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)},H=function(t){return k("auth.tenantsState").bind(t)},M=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:H(t)})},W=function(t){return function(){return P.getAction(t).apply(void 0,arguments)}},V=null,$={install:function(t,e){var r,i=null!=e?e:{},a=i.router,u=y(i,["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,h=new Set,v=a&&function(t){var e=t.options.base||"";I.setBasename(e);var r=function(n,r){var i=n;i.startsWith(e)&&"/"!==e&&(i=i.substring(e.length-1)),(null==r?void 0:r.refresh)?window.location.href=i:(null==r?void 0:r.replace)?t.replace(i):t.push(i)};return n.ContextHolder.setOnRedirectTo(r),r}(a),p=(V=o.initialize(Object.assign(Object.assign({},u),{onRedirectTo:v,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,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 o,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,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(u)throw o}}}}(h);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 i=function(){n?n(t,e,r):r()};if(g)i();else var o=setInterval((function(){A(),g&&(clearInterval(o),i())}),1)}}));var S,E=setInterval((function(){A(),g&&clearInterval(E)}),10);function T(){this.$route.path.startsWith(t.fronteggAuth.routes.hostedLoginRedirectUrl)||(p.dispatch({type:"auth/setState",payload:{isLoading:!0}}),t.fronteggAuth.loginActions.requestHostedLoginAuthorize())}s||(S=t,s=!0,(t.fronteggPlugins||[]).forEach((function(t){return t.init(u,p)})),m(S,p),S.fronteggAuth=t.fronteggAuth,M(S)),t.mixin({data:function(){return{fronteggLoaded:g}},beforeCreate:function(){m(this,p),this.fronteggAuth=t.fronteggAuth,this.loginWithRedirect=T.bind(this),M(this)},created:function(){var t,n;R(this)&&function(t,n){t.FRONTEGG_UNSUBSCRIBE=n}(this,p.subscribe((t=this,n=R(this),function(){var e=O(t).getState();Object.keys(n).forEach((function(r){Object.keys(n[r]).forEach((function(i){var o=n[r][i];if(o){var a,u=o(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,i,u),2===a&&f.default(t._data,i,u)}}))}))}))),function(t,n){t.FRONTEGG_LOADER_UNSUBSCRIBE=n}(this,function(t){var n=function(){t.fronteggLoaded=g};return h.add(n),function(){return h.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 o.AdminPortal}}),t.Frontegg=$,t.closeAdminPortal=function(){return o.AdminPortal.hide()},t.isAuthenticatedGuard=function(t,n,e){var r,i,o=function(){var n,r=I.getStore().getState().auth;if(r.isAuthenticated)e();else{var i=null!==(n=I.getBasename())&&void 0!==n?n:"",o=i.endsWith("/")?i.substring(0,i.length-1):"";localStorage.setItem("FRONTEGG_AFTER_AUTH_REDIRECT_URL","".concat(o).concat(t.fullPath)),e({path:r.routes.loginUrl,replace:!0})}},a=null===(i=null===(r=I.getStore())||void 0===r?void 0:r.getState())||void 0===i?void 0:i.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),o())}),1);else o()},t.mapAcceptInvitationActions=function(t){return W(t)},t.mapActivateAccountActions=function(t){return W(t)},t.mapApiTokensActions=function(t){return W(t)},t.mapAuthActions=function(t){return W(t)},t.mapForgotPasswordActions=function(t){return W(t)},t.mapLoginActions=function(t){return W("loginWithRedirect"===t?"requestHostedLoginAuthorize":t)},t.mapMfaActions=function(t){return W(t)},t.mapProfileActions=function(t){return W(t)},t.mapSecurityPolicyActions=function(t){return W(t)},t.mapSignupActions=function(t){return W(t)},t.mapSocialLoginActions=function(t){return W(t)},t.mapSsoActions=function(t){return W(t)},t.mapTeamActions=function(t){return W(t)},t.openAdminPortal=function(){return o.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 i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]])}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},R=function(){function t(){d(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}(),I=function(t){return function(n){return f.default(n,t)}},E=function(t,n,e){return function(){var r,i=this,o=Object.keys(n),a=f.default(m(i).getState(),t),u=function(t,n,e,r,i){return e.reduce((function(e,o){return Object.assign({},e,v({},n,Object.assign(Object.assign({},e[n]),v({},o,function(t,n,e){return"function"==typeof n?n.bind(t):e(n)}(t,r[o],i)))))}),O(t)||{})}(i,t,o,n,e);return r=u,i.FRONTEGG_REDUX_BINDINGS=r,o.reduce((function(t,r){return Object.assign({},t,v({},r,function(t,n,e,r){return"function"==typeof n?n.call(t,r):e(n)(r)}(i,n[r],e,a)))}),{})}},T=function(){function t(){d(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;d(this,t);var r=n.router,i=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],i=n[1];Object.assign(e,v({},r,a.bindActionCreators(i,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),i.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}(),P=function(t,n){return function(){var e=v({},null!=n?n:t.substring("auth.".length),(function(t){return t}));return E(t,e,I).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)},H=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)})},M=function(t){return function(){return T.getAction(t).apply(void 0,arguments)}},W=null,V={install:function(t,e){var r,i=null!=e?e:{},a=i.router,u=S(i,["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,h=new Set,v=a&&function(t){var e=t.options.base||"";R.setBasename(e);var r=function(n,r){var i=n;i.startsWith(e)&&"/"!==e&&(i=i.substring(e.length-1)),(null==r?void 0:r.refresh)?window.location.href=i:(null==r?void 0:r.replace)?t.replace(i):t.push(i)};return n.ContextHolder.setOnRedirectTo(r),r}(a),p=(W=o.initialize(Object.assign(Object.assign({},u),{onRedirectTo:v,basename:null==a?void 0:a.options.base}))).store;R.setStore(p),t.$fronteggApp=W,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,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 o,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,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(u)throw o}}}}(h);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 i=function(){n?n(t,e,r):r()};if(g)i();else var o=setInterval((function(){b(),g&&(clearInterval(o),i())}),1)}}));var I,E=setInterval((function(){b(),g&&clearInterval(E)}),10);function T(){this.$route.path.startsWith(t.fronteggAuth.routes.hostedLoginRedirectUrl)||(p.dispatch({type:"auth/setState",payload:{isLoading:!0}}),t.fronteggAuth.loginActions.requestHostedLoginAuthorize())}d||(I=t,d=!0,(t.fronteggPlugins||[]).forEach((function(t){return t.init(u,p)})),y(I,p),I.fronteggAuth=t.fronteggAuth,H(I)),t.mixin({data:function(){return{fronteggLoaded:g}},beforeCreate:function(){y(this,p),this.fronteggAuth=t.fronteggAuth,this.loginWithRedirect=T.bind(this),H(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(i){var o=n[r][i];if(o){var a,u=o(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,i,u),2===a&&s.default(t._data,i,u)}}))}))}))),function(t,n){t.FRONTEGG_LOADER_UNSUBSCRIBE=n}(this,function(t){var n=function(){t.fronteggLoaded=g};return h.add(n),function(){return h.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 o.AdminPortal}}),t.Frontegg=V,t.closeAdminPortal=function(){return o.AdminPortal.hide()},t.isAuthenticatedGuard=function(t,n,e){var r,i,o=function(){var n,r=R.getStore().getState().auth;if(r.isAuthenticated)e();else{var i=null!==(n=R.getBasename())&&void 0!==n?n:"",o=i.endsWith("/")?i.substring(0,i.length-1):"";localStorage.setItem("FRONTEGG_AFTER_AUTH_REDIRECT_URL","".concat(o).concat(t.fullPath)),e({path:r.routes.loginUrl,replace:!0})}},a=null===(i=null===(r=R.getStore())||void 0===r?void 0:r.getState())||void 0===i?void 0:i.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),o())}),1);else o()},t.mapAcceptInvitationActions=function(t){return M(t)},t.mapActivateAccountActions=function(t){return M(t)},t.mapApiTokensActions=function(t){return M(t)},t.mapAuthActions=function(t){return M(t)},t.mapForgotPasswordActions=function(t){return M(t)},t.mapLoginActions=function(t){return M("loginWithRedirect"===t?"requestHostedLoginAuthorize":t)},t.mapMfaActions=function(t){return M(t)},t.mapProfileActions=function(t){return M(t)},t.mapSecurityPolicyActions=function(t){return M(t)},t.mapSignupActions=function(t){return M(t)},t.mapSocialLoginActions=function(t){return M(t)},t.mapSsoActions=function(t){return M(t)},t.mapTeamActions=function(t){return M(t)},t.openAdminPortal=function(){return o.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'),adminPortal=require('@frontegg/admin-portal'),toolkit=require('@frontegg/redux-store/toolkit'),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) {
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, toolkit.bindActionCreators(actions, _this.store.dispatch)));
397
+ Object.assign(_this, _defineProperty({}, key, reduxStore.bindActionCreators(actions, _this.store.dispatch)));
398
398
  });
399
- var detachableActions = toolkit.bindActionCreators(reduxStore.authActions, _this.store.dispatch);
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 = adminPortal.initialize(Object.assign(Object.assign({}, rest), {
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
  }));
@@ -807,7 +807,7 @@ var Frontegg = {
807
807
  */
808
808
 
809
809
  var openAdminPortal = function openAdminPortal() {
810
- return adminPortal.AdminPortal.show();
810
+ return js.AdminPortal.show();
811
811
  };
812
812
  /**
813
813
  * @deprecated since version 2.0
@@ -818,5 +818,5 @@ var openAdminPortal = function openAdminPortal() {
818
818
 
819
819
 
820
820
  var closeAdminPortal = function closeAdminPortal() {
821
- return adminPortal.AdminPortal.hide();
822
- };Object.defineProperty(exports,'AdminPortal',{enumerable:true,get:function(){return adminPortal.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;
821
+ return js.AdminPortal.hide();
822
+ };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": "1.0.22",
3
+ "version": "2.0.1-alpha.2952957281",
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/admin-portal": "5.79.0",
26
- "@frontegg/redux-store": "5.79.0",
25
+ "@frontegg/js": "6.0.3-alpha.4",
26
+ "@frontegg/redux-store": "6.0.3-alpha.4",
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
+ }