@contember/react-client-tenant 2.0.0-alpha.9 → 2.0.0-beta.2
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/development/index.cjs +24 -0
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +24 -0
- package/dist/development/index.js.map +1 -1
- package/dist/development/src/components/IdentityProvider.cjs.map +1 -1
- package/dist/development/src/components/IdentityProvider.js.map +1 -1
- package/dist/development/src/components/IdentityState.cjs.map +1 -1
- package/dist/development/src/components/IdentityState.js.map +1 -1
- package/dist/development/src/components/forms/ChangeMyPasswordForm.cjs.map +1 -1
- package/dist/development/src/components/forms/ChangeMyPasswordForm.js.map +1 -1
- package/dist/development/src/components/forms/CreateApiKeyForm.cjs.map +1 -1
- package/dist/development/src/components/forms/CreateApiKeyForm.js.map +1 -1
- package/dist/development/src/components/forms/CreateSessionTokenForm.cjs.map +1 -1
- package/dist/development/src/components/forms/CreateSessionTokenForm.js.map +1 -1
- package/dist/development/src/components/forms/InviteForm.cjs.map +1 -1
- package/dist/development/src/components/forms/InviteForm.js.map +1 -1
- package/dist/development/src/components/forms/LoginForm.cjs +1 -1
- package/dist/development/src/components/forms/LoginForm.cjs.map +1 -1
- package/dist/development/src/components/forms/LoginForm.js +1 -1
- package/dist/development/src/components/forms/LoginForm.js.map +1 -1
- package/dist/development/src/components/forms/OtpConfirmForm.cjs.map +1 -1
- package/dist/development/src/components/forms/OtpConfirmForm.js.map +1 -1
- package/dist/development/src/components/forms/OtpPrepareForm.cjs.map +1 -1
- package/dist/development/src/components/forms/OtpPrepareForm.js.map +1 -1
- package/dist/development/src/components/forms/PasswordResetForm.cjs +2 -1
- package/dist/development/src/components/forms/PasswordResetForm.cjs.map +1 -1
- package/dist/development/src/components/forms/PasswordResetForm.js +2 -1
- package/dist/development/src/components/forms/PasswordResetForm.js.map +1 -1
- package/dist/development/src/components/forms/PasswordResetRequestForm.cjs.map +1 -1
- package/dist/development/src/components/forms/PasswordResetRequestForm.js.map +1 -1
- package/dist/development/src/components/forms/PasswordlessSignInForm.cjs +79 -0
- package/dist/development/src/components/forms/PasswordlessSignInForm.cjs.map +1 -0
- package/dist/development/src/components/forms/PasswordlessSignInForm.js +79 -0
- package/dist/development/src/components/forms/PasswordlessSignInForm.js.map +1 -0
- package/dist/development/src/components/forms/PasswordlessSignInInitForm.cjs +54 -0
- package/dist/development/src/components/forms/PasswordlessSignInInitForm.cjs.map +1 -0
- package/dist/development/src/components/forms/PasswordlessSignInInitForm.js +54 -0
- package/dist/development/src/components/forms/PasswordlessSignInInitForm.js.map +1 -0
- package/dist/development/src/components/forms/TenantForm.cjs.map +1 -1
- package/dist/development/src/components/forms/TenantForm.js.map +1 -1
- package/dist/development/src/components/forms/UpdateProjectMemberForm.cjs.map +1 -1
- package/dist/development/src/components/forms/UpdateProjectMemberForm.js.map +1 -1
- package/dist/development/src/components/idp/IDP.cjs.map +1 -1
- package/dist/development/src/components/idp/IDP.js.map +1 -1
- package/dist/development/src/components/idp/IDPInitTrigger.cjs.map +1 -1
- package/dist/development/src/components/idp/IDPInitTrigger.js.map +1 -1
- package/dist/development/src/components/idp/IDPState.cjs.map +1 -1
- package/dist/development/src/components/idp/IDPState.js.map +1 -1
- package/dist/development/src/components/triggers/DisableOtpTrigger.cjs.map +1 -1
- package/dist/development/src/components/triggers/DisableOtpTrigger.js.map +1 -1
- package/dist/development/src/components/triggers/LogoutTrigger.cjs.map +1 -1
- package/dist/development/src/components/triggers/LogoutTrigger.js.map +1 -1
- package/dist/development/src/components/triggers/RemoveProjectMemberTrigger.cjs.map +1 -1
- package/dist/development/src/components/triggers/RemoveProjectMemberTrigger.js.map +1 -1
- package/dist/development/src/components/triggers/TenantActionTrigger.cjs.map +1 -1
- package/dist/development/src/components/triggers/TenantActionTrigger.js.map +1 -1
- package/dist/development/src/consts.cjs +5 -0
- package/dist/development/src/consts.cjs.map +1 -0
- package/dist/development/src/consts.js +5 -0
- package/dist/development/src/consts.js.map +1 -0
- package/dist/development/src/contexts.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.cjs +1 -1
- package/dist/development/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.js +1 -1
- package/dist/development/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/auth/useSignInMutation.cjs +1 -1
- package/dist/development/src/hooks/mutations/auth/useSignInMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/auth/useSignInMutation.js +1 -1
- package/dist/development/src/hooks/mutations/auth/useSignInMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/idp/useInitSignInIDPMutation.cjs +1 -1
- package/dist/development/src/hooks/mutations/idp/useInitSignInIDPMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/idp/useInitSignInIDPMutation.js +1 -1
- package/dist/development/src/hooks/mutations/idp/useInitSignInIDPMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/idp/useSignInIdpMutation.cjs +1 -1
- package/dist/development/src/hooks/mutations/idp/useSignInIdpMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/idp/useSignInIdpMutation.js +1 -1
- package/dist/development/src/hooks/mutations/idp/useSignInIdpMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/invite/useInviteMutation.cjs +1 -1
- package/dist/development/src/hooks/mutations/invite/useInviteMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/invite/useInviteMutation.js +1 -1
- package/dist/development/src/hooks/mutations/invite/useInviteMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/passwordReset/useResetPasswordMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.cjs +31 -0
- package/dist/development/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.js +14 -0
- package/dist/development/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.cjs +28 -0
- package/dist/development/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.js +11 -0
- package/dist/development/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.cjs +28 -0
- package/dist/development/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.js +11 -0
- package/dist/development/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.cjs +32 -0
- package/dist/development/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.js +15 -0
- package/dist/development/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.cjs +32 -0
- package/dist/development/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.js +15 -0
- package/dist/development/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/profile/useChangeMyProfile.cjs +29 -0
- package/dist/development/src/hooks/mutations/profile/useChangeMyProfile.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/profile/useChangeMyProfile.js +12 -0
- package/dist/development/src/hooks/mutations/profile/useChangeMyProfile.js.map +1 -0
- package/dist/development/src/hooks/mutations/profile/useChangeProfile.cjs +29 -0
- package/dist/development/src/hooks/mutations/profile/useChangeProfile.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/profile/useChangeProfile.js +12 -0
- package/dist/development/src/hooks/mutations/profile/useChangeProfile.js.map +1 -0
- package/dist/development/src/hooks/queries/useMeQuery.cjs +1 -1
- package/dist/development/src/hooks/queries/useMeQuery.cjs.map +1 -1
- package/dist/development/src/hooks/queries/useMeQuery.js +1 -1
- package/dist/development/src/hooks/queries/useMeQuery.js.map +1 -1
- package/dist/development/src/hooks/queries/useProjectMembersQuery.cjs +1 -1
- package/dist/development/src/hooks/queries/useProjectMembersQuery.cjs.map +1 -1
- package/dist/development/src/hooks/queries/useProjectMembersQuery.js +1 -1
- package/dist/development/src/hooks/queries/useProjectMembersQuery.js.map +1 -1
- package/dist/development/src/hooks/queries/useProjectMembershipsQuery.cjs.map +1 -1
- package/dist/development/src/hooks/queries/useProjectMembershipsQuery.js.map +1 -1
- package/dist/development/src/hooks/queries/useProjectRolesDefinitionQuery.cjs.map +1 -1
- package/dist/development/src/hooks/queries/useProjectRolesDefinitionQuery.js.map +1 -1
- package/dist/development/src/hooks/useFetchIdentity.cjs +2 -2
- package/dist/development/src/hooks/useFetchIdentity.cjs.map +1 -1
- package/dist/development/src/hooks/useFetchIdentity.js +3 -3
- package/dist/development/src/hooks/useFetchIdentity.js.map +1 -1
- package/dist/development/src/hooks/useLogout.cjs.map +1 -1
- package/dist/development/src/hooks/useLogout.js.map +1 -1
- package/dist/development/src/hooks/usePasswordlessOtpActivator.cjs +53 -0
- package/dist/development/src/hooks/usePasswordlessOtpActivator.cjs.map +1 -0
- package/dist/development/src/hooks/usePasswordlessOtpActivator.js +53 -0
- package/dist/development/src/hooks/usePasswordlessOtpActivator.js.map +1 -0
- package/dist/development/src/hooks/useTenantApi.cjs.map +1 -1
- package/dist/development/src/hooks/useTenantApi.js.map +1 -1
- package/dist/development/src/hooks/useTenantMutation.cjs.map +1 -1
- package/dist/development/src/hooks/useTenantMutation.js.map +1 -1
- package/dist/development/src/hooks/useTenantQueryLoader.cjs.map +1 -1
- package/dist/development/src/hooks/useTenantQueryLoader.js.map +1 -1
- package/dist/development/src/internal/hooks/useHandleIDPResponse.cjs +1 -1
- package/dist/development/src/internal/hooks/useHandleIDPResponse.cjs.map +1 -1
- package/dist/development/src/internal/hooks/useHandleIDPResponse.js +1 -1
- package/dist/development/src/internal/hooks/useHandleIDPResponse.js.map +1 -1
- package/dist/development/src/internal/hooks/useIDPAutoInit.cjs.map +1 -1
- package/dist/development/src/internal/hooks/useIDPAutoInit.js.map +1 -1
- package/dist/development/src/internal/hooks/useIDPStateStore.cjs.map +1 -1
- package/dist/development/src/internal/hooks/useIDPStateStore.js.map +1 -1
- package/dist/development/src/internal/hooks/useInitIDPRedirect.cjs.map +1 -1
- package/dist/development/src/internal/hooks/useInitIDPRedirect.js.map +1 -1
- package/dist/development/src/internal/hooks/useLogoutInternal.cjs.map +1 -1
- package/dist/development/src/internal/hooks/useLogoutInternal.js.map +1 -1
- package/dist/development/src/internal/hooks/useRedirectToBacklink.cjs.map +1 -1
- package/dist/development/src/internal/hooks/useRedirectToBacklink.js.map +1 -1
- package/dist/development/src/internal/utils/hashing.cjs +8 -0
- package/dist/development/src/internal/utils/hashing.cjs.map +1 -0
- package/dist/development/src/internal/utils/hashing.js +8 -0
- package/dist/development/src/internal/utils/hashing.js.map +1 -0
- package/dist/development/src/internal/utils/randomInt.cjs +29 -0
- package/dist/development/src/internal/utils/randomInt.cjs.map +1 -0
- package/dist/development/src/internal/utils/randomInt.js +29 -0
- package/dist/development/src/internal/utils/randomInt.js.map +1 -0
- package/dist/production/index.cjs +24 -0
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.js +24 -0
- package/dist/production/index.js.map +1 -1
- package/dist/production/src/components/IdentityProvider.cjs.map +1 -1
- package/dist/production/src/components/IdentityProvider.js.map +1 -1
- package/dist/production/src/components/IdentityState.cjs.map +1 -1
- package/dist/production/src/components/IdentityState.js.map +1 -1
- package/dist/production/src/components/forms/ChangeMyPasswordForm.cjs.map +1 -1
- package/dist/production/src/components/forms/ChangeMyPasswordForm.js.map +1 -1
- package/dist/production/src/components/forms/CreateApiKeyForm.cjs.map +1 -1
- package/dist/production/src/components/forms/CreateApiKeyForm.js.map +1 -1
- package/dist/production/src/components/forms/CreateSessionTokenForm.cjs.map +1 -1
- package/dist/production/src/components/forms/CreateSessionTokenForm.js.map +1 -1
- package/dist/production/src/components/forms/InviteForm.cjs.map +1 -1
- package/dist/production/src/components/forms/InviteForm.js.map +1 -1
- package/dist/production/src/components/forms/LoginForm.cjs +1 -1
- package/dist/production/src/components/forms/LoginForm.cjs.map +1 -1
- package/dist/production/src/components/forms/LoginForm.js +1 -1
- package/dist/production/src/components/forms/LoginForm.js.map +1 -1
- package/dist/production/src/components/forms/OtpConfirmForm.cjs.map +1 -1
- package/dist/production/src/components/forms/OtpConfirmForm.js.map +1 -1
- package/dist/production/src/components/forms/OtpPrepareForm.cjs.map +1 -1
- package/dist/production/src/components/forms/OtpPrepareForm.js.map +1 -1
- package/dist/production/src/components/forms/PasswordResetForm.cjs +2 -1
- package/dist/production/src/components/forms/PasswordResetForm.cjs.map +1 -1
- package/dist/production/src/components/forms/PasswordResetForm.js +2 -1
- package/dist/production/src/components/forms/PasswordResetForm.js.map +1 -1
- package/dist/production/src/components/forms/PasswordResetRequestForm.cjs.map +1 -1
- package/dist/production/src/components/forms/PasswordResetRequestForm.js.map +1 -1
- package/dist/production/src/components/forms/PasswordlessSignInForm.cjs +71 -0
- package/dist/production/src/components/forms/PasswordlessSignInForm.cjs.map +1 -0
- package/dist/production/src/components/forms/PasswordlessSignInForm.js +71 -0
- package/dist/production/src/components/forms/PasswordlessSignInForm.js.map +1 -0
- package/dist/production/src/components/forms/PasswordlessSignInInitForm.cjs +46 -0
- package/dist/production/src/components/forms/PasswordlessSignInInitForm.cjs.map +1 -0
- package/dist/production/src/components/forms/PasswordlessSignInInitForm.js +46 -0
- package/dist/production/src/components/forms/PasswordlessSignInInitForm.js.map +1 -0
- package/dist/production/src/components/forms/TenantForm.cjs.map +1 -1
- package/dist/production/src/components/forms/TenantForm.js.map +1 -1
- package/dist/production/src/components/forms/UpdateProjectMemberForm.cjs.map +1 -1
- package/dist/production/src/components/forms/UpdateProjectMemberForm.js.map +1 -1
- package/dist/production/src/components/idp/IDP.cjs.map +1 -1
- package/dist/production/src/components/idp/IDP.js.map +1 -1
- package/dist/production/src/components/idp/IDPInitTrigger.cjs.map +1 -1
- package/dist/production/src/components/idp/IDPInitTrigger.js.map +1 -1
- package/dist/production/src/components/idp/IDPState.cjs.map +1 -1
- package/dist/production/src/components/idp/IDPState.js.map +1 -1
- package/dist/production/src/components/triggers/DisableOtpTrigger.cjs.map +1 -1
- package/dist/production/src/components/triggers/DisableOtpTrigger.js.map +1 -1
- package/dist/production/src/components/triggers/LogoutTrigger.cjs.map +1 -1
- package/dist/production/src/components/triggers/LogoutTrigger.js.map +1 -1
- package/dist/production/src/components/triggers/RemoveProjectMemberTrigger.cjs.map +1 -1
- package/dist/production/src/components/triggers/RemoveProjectMemberTrigger.js.map +1 -1
- package/dist/production/src/components/triggers/TenantActionTrigger.cjs.map +1 -1
- package/dist/production/src/components/triggers/TenantActionTrigger.js.map +1 -1
- package/dist/production/src/consts.cjs +5 -0
- package/dist/production/src/consts.cjs.map +1 -0
- package/dist/production/src/consts.js +5 -0
- package/dist/production/src/consts.js.map +1 -0
- package/dist/production/src/contexts.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.cjs +1 -1
- package/dist/production/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.js +1 -1
- package/dist/production/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/auth/useSignInMutation.cjs +1 -1
- package/dist/production/src/hooks/mutations/auth/useSignInMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/auth/useSignInMutation.js +1 -1
- package/dist/production/src/hooks/mutations/auth/useSignInMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/idp/useInitSignInIDPMutation.cjs +1 -1
- package/dist/production/src/hooks/mutations/idp/useInitSignInIDPMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/idp/useInitSignInIDPMutation.js +1 -1
- package/dist/production/src/hooks/mutations/idp/useInitSignInIDPMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/idp/useSignInIdpMutation.cjs +1 -1
- package/dist/production/src/hooks/mutations/idp/useSignInIdpMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/idp/useSignInIdpMutation.js +1 -1
- package/dist/production/src/hooks/mutations/idp/useSignInIdpMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/invite/useInviteMutation.cjs +1 -1
- package/dist/production/src/hooks/mutations/invite/useInviteMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/invite/useInviteMutation.js +1 -1
- package/dist/production/src/hooks/mutations/invite/useInviteMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/passwordReset/useResetPasswordMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.cjs +31 -0
- package/dist/production/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.js +14 -0
- package/dist/production/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.cjs +28 -0
- package/dist/production/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.js +11 -0
- package/dist/production/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.cjs +28 -0
- package/dist/production/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.js +11 -0
- package/dist/production/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.cjs +32 -0
- package/dist/production/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.js +15 -0
- package/dist/production/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.cjs +32 -0
- package/dist/production/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.js +15 -0
- package/dist/production/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/profile/useChangeMyProfile.cjs +29 -0
- package/dist/production/src/hooks/mutations/profile/useChangeMyProfile.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/profile/useChangeMyProfile.js +12 -0
- package/dist/production/src/hooks/mutations/profile/useChangeMyProfile.js.map +1 -0
- package/dist/production/src/hooks/mutations/profile/useChangeProfile.cjs +29 -0
- package/dist/production/src/hooks/mutations/profile/useChangeProfile.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/profile/useChangeProfile.js +12 -0
- package/dist/production/src/hooks/mutations/profile/useChangeProfile.js.map +1 -0
- package/dist/production/src/hooks/queries/useMeQuery.cjs +1 -1
- package/dist/production/src/hooks/queries/useMeQuery.cjs.map +1 -1
- package/dist/production/src/hooks/queries/useMeQuery.js +1 -1
- package/dist/production/src/hooks/queries/useMeQuery.js.map +1 -1
- package/dist/production/src/hooks/queries/useProjectMembersQuery.cjs +1 -1
- package/dist/production/src/hooks/queries/useProjectMembersQuery.cjs.map +1 -1
- package/dist/production/src/hooks/queries/useProjectMembersQuery.js +1 -1
- package/dist/production/src/hooks/queries/useProjectMembersQuery.js.map +1 -1
- package/dist/production/src/hooks/queries/useProjectMembershipsQuery.cjs.map +1 -1
- package/dist/production/src/hooks/queries/useProjectMembershipsQuery.js.map +1 -1
- package/dist/production/src/hooks/queries/useProjectRolesDefinitionQuery.cjs.map +1 -1
- package/dist/production/src/hooks/queries/useProjectRolesDefinitionQuery.js.map +1 -1
- package/dist/production/src/hooks/useFetchIdentity.cjs +2 -2
- package/dist/production/src/hooks/useFetchIdentity.cjs.map +1 -1
- package/dist/production/src/hooks/useFetchIdentity.js +3 -3
- package/dist/production/src/hooks/useFetchIdentity.js.map +1 -1
- package/dist/production/src/hooks/useLogout.cjs.map +1 -1
- package/dist/production/src/hooks/useLogout.js.map +1 -1
- package/dist/production/src/hooks/usePasswordlessOtpActivator.cjs +53 -0
- package/dist/production/src/hooks/usePasswordlessOtpActivator.cjs.map +1 -0
- package/dist/production/src/hooks/usePasswordlessOtpActivator.js +53 -0
- package/dist/production/src/hooks/usePasswordlessOtpActivator.js.map +1 -0
- package/dist/production/src/hooks/useTenantApi.cjs.map +1 -1
- package/dist/production/src/hooks/useTenantApi.js.map +1 -1
- package/dist/production/src/hooks/useTenantMutation.cjs.map +1 -1
- package/dist/production/src/hooks/useTenantMutation.js.map +1 -1
- package/dist/production/src/hooks/useTenantQueryLoader.cjs.map +1 -1
- package/dist/production/src/hooks/useTenantQueryLoader.js.map +1 -1
- package/dist/production/src/internal/hooks/useHandleIDPResponse.cjs +1 -1
- package/dist/production/src/internal/hooks/useHandleIDPResponse.cjs.map +1 -1
- package/dist/production/src/internal/hooks/useHandleIDPResponse.js +1 -1
- package/dist/production/src/internal/hooks/useHandleIDPResponse.js.map +1 -1
- package/dist/production/src/internal/hooks/useIDPAutoInit.cjs.map +1 -1
- package/dist/production/src/internal/hooks/useIDPAutoInit.js.map +1 -1
- package/dist/production/src/internal/hooks/useIDPStateStore.cjs.map +1 -1
- package/dist/production/src/internal/hooks/useIDPStateStore.js.map +1 -1
- package/dist/production/src/internal/hooks/useInitIDPRedirect.cjs.map +1 -1
- package/dist/production/src/internal/hooks/useInitIDPRedirect.js.map +1 -1
- package/dist/production/src/internal/hooks/useLogoutInternal.cjs.map +1 -1
- package/dist/production/src/internal/hooks/useLogoutInternal.js.map +1 -1
- package/dist/production/src/internal/hooks/useRedirectToBacklink.cjs.map +1 -1
- package/dist/production/src/internal/hooks/useRedirectToBacklink.js.map +1 -1
- package/dist/production/src/internal/utils/hashing.cjs +8 -0
- package/dist/production/src/internal/utils/hashing.cjs.map +1 -0
- package/dist/production/src/internal/utils/hashing.js +8 -0
- package/dist/production/src/internal/utils/hashing.js.map +1 -0
- package/dist/production/src/internal/utils/randomInt.cjs +29 -0
- package/dist/production/src/internal/utils/randomInt.cjs.map +1 -0
- package/dist/production/src/internal/utils/randomInt.js +29 -0
- package/dist/production/src/internal/utils/randomInt.js.map +1 -0
- package/dist/types/components/forms/PasswordlessSignInForm.d.ts +22 -0
- package/dist/types/components/forms/PasswordlessSignInForm.d.ts.map +1 -0
- package/dist/types/components/forms/PasswordlessSignInInitForm.d.ts +20 -0
- package/dist/types/components/forms/PasswordlessSignInInitForm.d.ts.map +1 -0
- package/dist/types/components/forms/index.d.ts +2 -0
- package/dist/types/components/forms/index.d.ts.map +1 -1
- package/dist/types/consts.d.ts +2 -0
- package/dist/types/consts.d.ts.map +1 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/apiKey/useCreateSessionTokenMutation.d.ts +0 -6
- package/dist/types/hooks/mutations/apiKey/useCreateSessionTokenMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/auth/useSignInMutation.d.ts +0 -6
- package/dist/types/hooks/mutations/auth/useSignInMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/idp/useSignInIdpMutation.d.ts +6 -6
- package/dist/types/hooks/mutations/idp/useSignInIdpMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/index.d.ts +2 -0
- package/dist/types/hooks/mutations/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/invite/useInviteMutation.d.ts +0 -6
- package/dist/types/hooks/mutations/invite/useInviteMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/passwordless/index.d.ts +6 -0
- package/dist/types/hooks/mutations/passwordless/index.d.ts.map +1 -0
- package/dist/types/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.d.ts +8 -0
- package/dist/types/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.d.ts +3 -0
- package/dist/types/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.d.ts +3 -0
- package/dist/types/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.d.ts +19 -0
- package/dist/types/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/passwordless/useSignInPasswordlessMutation.d.ts +34 -0
- package/dist/types/hooks/mutations/passwordless/useSignInPasswordlessMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/profile/index.d.ts +3 -0
- package/dist/types/hooks/mutations/profile/index.d.ts.map +1 -0
- package/dist/types/hooks/mutations/profile/useChangeMyProfile.d.ts +21 -0
- package/dist/types/hooks/mutations/profile/useChangeMyProfile.d.ts.map +1 -0
- package/dist/types/hooks/mutations/profile/useChangeProfile.d.ts +23 -0
- package/dist/types/hooks/mutations/profile/useChangeProfile.d.ts.map +1 -0
- package/dist/types/hooks/usePasswordlessOtpActivator.d.ts +19 -0
- package/dist/types/hooks/usePasswordlessOtpActivator.d.ts.map +1 -0
- package/dist/types/hooks/useTenantMutation.d.ts.map +1 -1
- package/dist/types/internal/utils/hashing.d.ts +2 -0
- package/dist/types/internal/utils/hashing.d.ts.map +1 -0
- package/dist/types/internal/utils/randomInt.d.ts +3 -0
- package/dist/types/internal/utils/randomInt.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/types/Identity.d.ts +1 -0
- package/dist/types/types/Identity.d.ts.map +1 -1
- package/package.json +8 -7
- package/src/components/forms/LoginForm.tsx +1 -1
- package/src/components/forms/PasswordResetForm.tsx +1 -0
- package/src/components/forms/PasswordlessSignInForm.tsx +102 -0
- package/src/components/forms/PasswordlessSignInInitForm.tsx +68 -0
- package/src/components/forms/index.ts +2 -0
- package/src/consts.ts +1 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.tsx +1 -1
- package/src/hooks/mutations/auth/useSignInMutation.ts +1 -1
- package/src/hooks/mutations/idp/useInitSignInIDPMutation.ts +1 -1
- package/src/hooks/mutations/idp/useSignInIdpMutation.ts +1 -1
- package/src/hooks/mutations/index.ts +2 -0
- package/src/hooks/mutations/invite/useInviteMutation.tsx +1 -1
- package/src/hooks/mutations/passwordless/index.ts +5 -0
- package/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.ts +19 -0
- package/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.ts +14 -0
- package/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.ts +14 -0
- package/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.ts +22 -0
- package/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.ts +24 -0
- package/src/hooks/mutations/profile/index.ts +2 -0
- package/src/hooks/mutations/profile/useChangeMyProfile.ts +13 -0
- package/src/hooks/mutations/profile/useChangeProfile.ts +13 -0
- package/src/hooks/queries/useMeQuery.ts +1 -1
- package/src/hooks/queries/useProjectMembersQuery.ts +1 -1
- package/src/hooks/useFetchIdentity.ts +3 -3
- package/src/hooks/usePasswordlessOtpActivator.ts +66 -0
- package/src/internal/hooks/useHandleIDPResponse.ts +1 -1
- package/src/internal/utils/hashing.ts +4 -0
- package/src/internal/utils/randomInt.ts +30 -0
- package/src/types/Identity.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInitIDPRedirect.cjs","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useInitIDPRedirect.ts"],"sourcesContent":["import { SetStateAction, useCallback } from 'react'\nimport { useIDPStateStore } from './useIDPStateStore'\nimport { getBaseHref } from '../utils/getBaseHref'\nimport { IDPInitError, IDPStateValue } from '../../types/idp'\nimport { useInitSignInIDPMutation } from '../../hooks'\nimport { useSaveBacklink } from './useRedirectToBacklink'\n\nexport interface UseInitIDPRedirectProps {\n\tonRedirect?: (url: string) => void\n\tsetState: (state: SetStateAction<IDPStateValue>) => void\n}\n\nexport const useInitIDPRedirect = ({ onRedirect, setState }: UseInitIDPRedirectProps) => {\n\tconst initRequest = useInitSignInIDPMutation()\n\tconst saveBacklink = useSaveBacklink()\n\tconst { set: saveIdpState } = useIDPStateStore()\n\n\treturn useCallback(async ({ provider }: { provider: string }): Promise<{ ok: true } | { ok: false; error: IDPInitError }> => {\n\t\tconst fail = (error: IDPInitError) => {\n\t\t\tsetState({ type: 'init_failed', error })\n\t\t\treturn { ok: false, error }\n\t\t}\n\t\ttry {\n\t\t\tsetState({ type: 'processing_init' })\n\t\t\tconst response = await initRequest({\n\t\t\t\tdata: {\n\t\t\t\t\tredirectUrl: getBaseHref(),\n\t\t\t\t},\n\t\t\t\tidentityProvider: provider,\n\t\t\t})\n\t\t\tif (!response.ok) {\n\t\t\t\treturn fail(response.error || 'UNKNOWN_ERROR')\n\t\t\t} else {\n\t\t\t\tsaveIdpState({ provider, sessionData: response.result.sessionData as string })\n\t\t\t\tsaveBacklink()\n\t\t\t\tif (onRedirect) {\n\t\t\t\t\tonRedirect(response.result.authUrl as string)\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = response.result.authUrl as string\n\t\t\t\t}\n\t\t\t\treturn { ok: true }\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\treturn fail('UNKNOWN_ERROR')\n\t\t}\n\t}, [initRequest, onRedirect, saveBacklink, saveIdpState, setState])\n}\n"],"names":["useInitSignInIDPMutation","useSaveBacklink","useIDPStateStore","useCallback","getBaseHref"],"mappings":";;;;;;;AAYO,MAAM,qBAAqB,CAAC,EAAE,YAAY,eAAwC;AACxF,QAAM,cAAcA,yBAAAA;
|
|
1
|
+
{"version":3,"file":"useInitIDPRedirect.cjs","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useInitIDPRedirect.ts"],"sourcesContent":["import { SetStateAction, useCallback } from 'react'\nimport { useIDPStateStore } from './useIDPStateStore'\nimport { getBaseHref } from '../utils/getBaseHref'\nimport { IDPInitError, IDPStateValue } from '../../types/idp'\nimport { useInitSignInIDPMutation } from '../../hooks'\nimport { useSaveBacklink } from './useRedirectToBacklink'\n\nexport interface UseInitIDPRedirectProps {\n\tonRedirect?: (url: string) => void\n\tsetState: (state: SetStateAction<IDPStateValue>) => void\n}\n\nexport const useInitIDPRedirect = ({ onRedirect, setState }: UseInitIDPRedirectProps) => {\n\tconst initRequest = useInitSignInIDPMutation()\n\tconst saveBacklink = useSaveBacklink()\n\tconst { set: saveIdpState } = useIDPStateStore()\n\n\treturn useCallback(async ({ provider }: { provider: string }): Promise<{ ok: true } | { ok: false; error: IDPInitError }> => {\n\t\tconst fail = (error: IDPInitError) => {\n\t\t\tsetState({ type: 'init_failed', error })\n\t\t\treturn { ok: false, error }\n\t\t}\n\t\ttry {\n\t\t\tsetState({ type: 'processing_init' })\n\t\t\tconst response = await initRequest({\n\t\t\t\tdata: {\n\t\t\t\t\tredirectUrl: getBaseHref(),\n\t\t\t\t},\n\t\t\t\tidentityProvider: provider,\n\t\t\t})\n\t\t\tif (!response.ok) {\n\t\t\t\treturn fail(response.error || 'UNKNOWN_ERROR')\n\t\t\t} else {\n\t\t\t\tsaveIdpState({ provider, sessionData: response.result.sessionData as string })\n\t\t\t\tsaveBacklink()\n\t\t\t\tif (onRedirect) {\n\t\t\t\t\tonRedirect(response.result.authUrl as string)\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = response.result.authUrl as string\n\t\t\t\t}\n\t\t\t\treturn { ok: true }\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\treturn fail('UNKNOWN_ERROR')\n\t\t}\n\t}, [initRequest, onRedirect, saveBacklink, saveIdpState, setState])\n}\n"],"names":["useInitSignInIDPMutation","useSaveBacklink","useIDPStateStore","useCallback","getBaseHref"],"mappings":";;;;;;;AAYO,MAAM,qBAAqB,CAAC,EAAE,YAAY,eAAwC;AACxF,QAAM,cAAcA,yBAAAA,yBAAyB;AAC7C,QAAM,eAAeC,sBAAAA,gBAAgB;AACrC,QAAM,EAAE,KAAK,aAAa,IAAIC,kCAAiB;AAE/C,SAAOC,MAAY,YAAA,OAAO,EAAE,eAAiG;AACtH,UAAA,OAAO,CAAC,UAAwB;AACrC,eAAS,EAAE,MAAM,eAAe,MAAA,CAAO;AAChC,aAAA,EAAE,IAAI,OAAO,MAAM;AAAA,IAC3B;AACI,QAAA;AACM,eAAA,EAAE,MAAM,mBAAmB;AAC9B,YAAA,WAAW,MAAM,YAAY;AAAA,QAClC,MAAM;AAAA,UACL,aAAaC,YAAY,YAAA;AAAA,QAC1B;AAAA,QACA,kBAAkB;AAAA,MAAA,CAClB;AACG,UAAA,CAAC,SAAS,IAAI;AACV,eAAA,KAAK,SAAS,SAAS,eAAe;AAAA,MAAA,OACvC;AACN,qBAAa,EAAE,UAAU,aAAa,SAAS,OAAO,aAAuB;AAChE,qBAAA;AACb,YAAI,YAAY;AACJ,qBAAA,SAAS,OAAO,OAAiB;AAAA,QAAA,OACtC;AACC,iBAAA,SAAS,OAAO,SAAS,OAAO;AAAA,QAAA;AAEjC,eAAA,EAAE,IAAI,KAAK;AAAA,MAAA;AAAA,aAEX,GAAG;AACX,cAAQ,MAAM,CAAC;AACf,aAAO,KAAK,eAAe;AAAA,IAAA;AAAA,EAC5B,GACE,CAAC,aAAa,YAAY,cAAc,cAAc,QAAQ,CAAC;AACnE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInitIDPRedirect.js","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useInitIDPRedirect.ts"],"sourcesContent":["import { SetStateAction, useCallback } from 'react'\nimport { useIDPStateStore } from './useIDPStateStore'\nimport { getBaseHref } from '../utils/getBaseHref'\nimport { IDPInitError, IDPStateValue } from '../../types/idp'\nimport { useInitSignInIDPMutation } from '../../hooks'\nimport { useSaveBacklink } from './useRedirectToBacklink'\n\nexport interface UseInitIDPRedirectProps {\n\tonRedirect?: (url: string) => void\n\tsetState: (state: SetStateAction<IDPStateValue>) => void\n}\n\nexport const useInitIDPRedirect = ({ onRedirect, setState }: UseInitIDPRedirectProps) => {\n\tconst initRequest = useInitSignInIDPMutation()\n\tconst saveBacklink = useSaveBacklink()\n\tconst { set: saveIdpState } = useIDPStateStore()\n\n\treturn useCallback(async ({ provider }: { provider: string }): Promise<{ ok: true } | { ok: false; error: IDPInitError }> => {\n\t\tconst fail = (error: IDPInitError) => {\n\t\t\tsetState({ type: 'init_failed', error })\n\t\t\treturn { ok: false, error }\n\t\t}\n\t\ttry {\n\t\t\tsetState({ type: 'processing_init' })\n\t\t\tconst response = await initRequest({\n\t\t\t\tdata: {\n\t\t\t\t\tredirectUrl: getBaseHref(),\n\t\t\t\t},\n\t\t\t\tidentityProvider: provider,\n\t\t\t})\n\t\t\tif (!response.ok) {\n\t\t\t\treturn fail(response.error || 'UNKNOWN_ERROR')\n\t\t\t} else {\n\t\t\t\tsaveIdpState({ provider, sessionData: response.result.sessionData as string })\n\t\t\t\tsaveBacklink()\n\t\t\t\tif (onRedirect) {\n\t\t\t\t\tonRedirect(response.result.authUrl as string)\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = response.result.authUrl as string\n\t\t\t\t}\n\t\t\t\treturn { ok: true }\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\treturn fail('UNKNOWN_ERROR')\n\t\t}\n\t}, [initRequest, onRedirect, saveBacklink, saveIdpState, setState])\n}\n"],"names":[],"mappings":";;;;;AAYO,MAAM,qBAAqB,CAAC,EAAE,YAAY,eAAwC;AACxF,QAAM,cAAc;
|
|
1
|
+
{"version":3,"file":"useInitIDPRedirect.js","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useInitIDPRedirect.ts"],"sourcesContent":["import { SetStateAction, useCallback } from 'react'\nimport { useIDPStateStore } from './useIDPStateStore'\nimport { getBaseHref } from '../utils/getBaseHref'\nimport { IDPInitError, IDPStateValue } from '../../types/idp'\nimport { useInitSignInIDPMutation } from '../../hooks'\nimport { useSaveBacklink } from './useRedirectToBacklink'\n\nexport interface UseInitIDPRedirectProps {\n\tonRedirect?: (url: string) => void\n\tsetState: (state: SetStateAction<IDPStateValue>) => void\n}\n\nexport const useInitIDPRedirect = ({ onRedirect, setState }: UseInitIDPRedirectProps) => {\n\tconst initRequest = useInitSignInIDPMutation()\n\tconst saveBacklink = useSaveBacklink()\n\tconst { set: saveIdpState } = useIDPStateStore()\n\n\treturn useCallback(async ({ provider }: { provider: string }): Promise<{ ok: true } | { ok: false; error: IDPInitError }> => {\n\t\tconst fail = (error: IDPInitError) => {\n\t\t\tsetState({ type: 'init_failed', error })\n\t\t\treturn { ok: false, error }\n\t\t}\n\t\ttry {\n\t\t\tsetState({ type: 'processing_init' })\n\t\t\tconst response = await initRequest({\n\t\t\t\tdata: {\n\t\t\t\t\tredirectUrl: getBaseHref(),\n\t\t\t\t},\n\t\t\t\tidentityProvider: provider,\n\t\t\t})\n\t\t\tif (!response.ok) {\n\t\t\t\treturn fail(response.error || 'UNKNOWN_ERROR')\n\t\t\t} else {\n\t\t\t\tsaveIdpState({ provider, sessionData: response.result.sessionData as string })\n\t\t\t\tsaveBacklink()\n\t\t\t\tif (onRedirect) {\n\t\t\t\t\tonRedirect(response.result.authUrl as string)\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = response.result.authUrl as string\n\t\t\t\t}\n\t\t\t\treturn { ok: true }\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\treturn fail('UNKNOWN_ERROR')\n\t\t}\n\t}, [initRequest, onRedirect, saveBacklink, saveIdpState, setState])\n}\n"],"names":[],"mappings":";;;;;AAYO,MAAM,qBAAqB,CAAC,EAAE,YAAY,eAAwC;AACxF,QAAM,cAAc,yBAAyB;AAC7C,QAAM,eAAe,gBAAgB;AACrC,QAAM,EAAE,KAAK,aAAa,IAAI,iBAAiB;AAE/C,SAAO,YAAY,OAAO,EAAE,eAAiG;AACtH,UAAA,OAAO,CAAC,UAAwB;AACrC,eAAS,EAAE,MAAM,eAAe,MAAA,CAAO;AAChC,aAAA,EAAE,IAAI,OAAO,MAAM;AAAA,IAC3B;AACI,QAAA;AACM,eAAA,EAAE,MAAM,mBAAmB;AAC9B,YAAA,WAAW,MAAM,YAAY;AAAA,QAClC,MAAM;AAAA,UACL,aAAa,YAAY;AAAA,QAC1B;AAAA,QACA,kBAAkB;AAAA,MAAA,CAClB;AACG,UAAA,CAAC,SAAS,IAAI;AACV,eAAA,KAAK,SAAS,SAAS,eAAe;AAAA,MAAA,OACvC;AACN,qBAAa,EAAE,UAAU,aAAa,SAAS,OAAO,aAAuB;AAChE,qBAAA;AACb,YAAI,YAAY;AACJ,qBAAA,SAAS,OAAO,OAAiB;AAAA,QAAA,OACtC;AACC,iBAAA,SAAS,OAAO,SAAS,OAAO;AAAA,QAAA;AAEjC,eAAA,EAAE,IAAI,KAAK;AAAA,MAAA;AAAA,aAEX,GAAG;AACX,cAAQ,MAAM,CAAC;AACf,aAAO,KAAK,eAAe;AAAA,IAAA;AAAA,EAC5B,GACE,CAAC,aAAa,YAAY,cAAc,cAAc,QAAQ,CAAC;AACnE;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLogoutInternal.cjs","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useLogoutInternal.ts"],"sourcesContent":["import { useSetSessionToken } from '@contember/react-client'\nimport { useCallback } from 'react'\nimport { useSignOutMutation } from '../../hooks'\n\nexport const useLogoutInternal = (clearIdentity?: () => void) => {\n\tconst tenantLogout = useSignOutMutation()\n\tconst setSessionToken = useSetSessionToken()\n\n\treturn useCallback(\n\t\tasync ({ noRedirect = false }: { noRedirect?: boolean } = {}) => {\n\t\t\tif (navigator.credentials && navigator.credentials.preventSilentAccess) {\n\t\t\t\ttry {\n\t\t\t\t\tawait navigator.credentials.preventSilentAccess()\n\t\t\t\t} catch {\n\t\t\t\t\t// actually, not implemented in safari:\n\t\t\t\t\t// https://github.com/WebKit/WebKit/blob/414f4e45b0e82bbfcee783d08a9642be1afa8f72/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp#L132\n\t\t\t\t}\n\t\t\t}\n\t\t\tclearIdentity?.()\n\t\t\tsetSessionToken(undefined)\n\t\t\ttry {\n\t\t\t\tconst response = await tenantLogout({})\n\t\t\t\tif (!response?.ok) {\n\t\t\t\t\tconsole.warn(response?.error)\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(e)\n\t\t\t}\n\t\t\tif (!noRedirect) {\n\t\t\t\twindow.location.href = '/' // todo better redirect?\n\t\t\t}\n\t\t},\n\t\t[clearIdentity, setSessionToken, tenantLogout],\n\t)\n}\n"],"names":["useSignOutMutation","useSetSessionToken","useCallback"],"mappings":";;;;;AAIa,MAAA,oBAAoB,CAAC,kBAA+B;AAChE,QAAM,eAAeA,mBAAAA;
|
|
1
|
+
{"version":3,"file":"useLogoutInternal.cjs","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useLogoutInternal.ts"],"sourcesContent":["import { useSetSessionToken } from '@contember/react-client'\nimport { useCallback } from 'react'\nimport { useSignOutMutation } from '../../hooks'\n\nexport const useLogoutInternal = (clearIdentity?: () => void) => {\n\tconst tenantLogout = useSignOutMutation()\n\tconst setSessionToken = useSetSessionToken()\n\n\treturn useCallback(\n\t\tasync ({ noRedirect = false }: { noRedirect?: boolean } = {}) => {\n\t\t\tif (navigator.credentials && navigator.credentials.preventSilentAccess) {\n\t\t\t\ttry {\n\t\t\t\t\tawait navigator.credentials.preventSilentAccess()\n\t\t\t\t} catch {\n\t\t\t\t\t// actually, not implemented in safari:\n\t\t\t\t\t// https://github.com/WebKit/WebKit/blob/414f4e45b0e82bbfcee783d08a9642be1afa8f72/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp#L132\n\t\t\t\t}\n\t\t\t}\n\t\t\tclearIdentity?.()\n\t\t\tsetSessionToken(undefined)\n\t\t\ttry {\n\t\t\t\tconst response = await tenantLogout({})\n\t\t\t\tif (!response?.ok) {\n\t\t\t\t\tconsole.warn(response?.error)\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(e)\n\t\t\t}\n\t\t\tif (!noRedirect) {\n\t\t\t\twindow.location.href = '/' // todo better redirect?\n\t\t\t}\n\t\t},\n\t\t[clearIdentity, setSessionToken, tenantLogout],\n\t)\n}\n"],"names":["useSignOutMutation","useSetSessionToken","useCallback"],"mappings":";;;;;AAIa,MAAA,oBAAoB,CAAC,kBAA+B;AAChE,QAAM,eAAeA,mBAAAA,mBAAmB;AACxC,QAAM,kBAAkBC,YAAAA,mBAAmB;AAEpC,SAAAC,MAAA;AAAA,IACN,OAAO,EAAE,aAAa,MAAM,IAA8B,OAAO;AAChE,UAAI,UAAU,eAAe,UAAU,YAAY,qBAAqB;AACnE,YAAA;AACG,gBAAA,UAAU,YAAY,oBAAoB;AAAA,QAAA,QACzC;AAAA,QAAA;AAAA,MAGR;AAEe,sBAAA;AAChB,sBAAgB,MAAS;AACrB,UAAA;AACH,cAAM,WAAW,MAAM,aAAa,EAAE;AAClC,YAAA,CAAC,UAAU,IAAI;AACV,kBAAA,KAAK,UAAU,KAAK;AAAA,QAAA;AAAA,eAErB,GAAG;AACX,gBAAQ,KAAK,CAAC;AAAA,MAAA;AAEf,UAAI,CAAC,YAAY;AAChB,eAAO,SAAS,OAAO;AAAA,MAAA;AAAA,IAEzB;AAAA,IACA,CAAC,eAAe,iBAAiB,YAAY;AAAA,EAC9C;AACD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLogoutInternal.js","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useLogoutInternal.ts"],"sourcesContent":["import { useSetSessionToken } from '@contember/react-client'\nimport { useCallback } from 'react'\nimport { useSignOutMutation } from '../../hooks'\n\nexport const useLogoutInternal = (clearIdentity?: () => void) => {\n\tconst tenantLogout = useSignOutMutation()\n\tconst setSessionToken = useSetSessionToken()\n\n\treturn useCallback(\n\t\tasync ({ noRedirect = false }: { noRedirect?: boolean } = {}) => {\n\t\t\tif (navigator.credentials && navigator.credentials.preventSilentAccess) {\n\t\t\t\ttry {\n\t\t\t\t\tawait navigator.credentials.preventSilentAccess()\n\t\t\t\t} catch {\n\t\t\t\t\t// actually, not implemented in safari:\n\t\t\t\t\t// https://github.com/WebKit/WebKit/blob/414f4e45b0e82bbfcee783d08a9642be1afa8f72/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp#L132\n\t\t\t\t}\n\t\t\t}\n\t\t\tclearIdentity?.()\n\t\t\tsetSessionToken(undefined)\n\t\t\ttry {\n\t\t\t\tconst response = await tenantLogout({})\n\t\t\t\tif (!response?.ok) {\n\t\t\t\t\tconsole.warn(response?.error)\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(e)\n\t\t\t}\n\t\t\tif (!noRedirect) {\n\t\t\t\twindow.location.href = '/' // todo better redirect?\n\t\t\t}\n\t\t},\n\t\t[clearIdentity, setSessionToken, tenantLogout],\n\t)\n}\n"],"names":[],"mappings":";;;AAIa,MAAA,oBAAoB,CAAC,kBAA+B;AAChE,QAAM,eAAe;
|
|
1
|
+
{"version":3,"file":"useLogoutInternal.js","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useLogoutInternal.ts"],"sourcesContent":["import { useSetSessionToken } from '@contember/react-client'\nimport { useCallback } from 'react'\nimport { useSignOutMutation } from '../../hooks'\n\nexport const useLogoutInternal = (clearIdentity?: () => void) => {\n\tconst tenantLogout = useSignOutMutation()\n\tconst setSessionToken = useSetSessionToken()\n\n\treturn useCallback(\n\t\tasync ({ noRedirect = false }: { noRedirect?: boolean } = {}) => {\n\t\t\tif (navigator.credentials && navigator.credentials.preventSilentAccess) {\n\t\t\t\ttry {\n\t\t\t\t\tawait navigator.credentials.preventSilentAccess()\n\t\t\t\t} catch {\n\t\t\t\t\t// actually, not implemented in safari:\n\t\t\t\t\t// https://github.com/WebKit/WebKit/blob/414f4e45b0e82bbfcee783d08a9642be1afa8f72/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp#L132\n\t\t\t\t}\n\t\t\t}\n\t\t\tclearIdentity?.()\n\t\t\tsetSessionToken(undefined)\n\t\t\ttry {\n\t\t\t\tconst response = await tenantLogout({})\n\t\t\t\tif (!response?.ok) {\n\t\t\t\t\tconsole.warn(response?.error)\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(e)\n\t\t\t}\n\t\t\tif (!noRedirect) {\n\t\t\t\twindow.location.href = '/' // todo better redirect?\n\t\t\t}\n\t\t},\n\t\t[clearIdentity, setSessionToken, tenantLogout],\n\t)\n}\n"],"names":[],"mappings":";;;AAIa,MAAA,oBAAoB,CAAC,kBAA+B;AAChE,QAAM,eAAe,mBAAmB;AACxC,QAAM,kBAAkB,mBAAmB;AAEpC,SAAA;AAAA,IACN,OAAO,EAAE,aAAa,MAAM,IAA8B,OAAO;AAChE,UAAI,UAAU,eAAe,UAAU,YAAY,qBAAqB;AACnE,YAAA;AACG,gBAAA,UAAU,YAAY,oBAAoB;AAAA,QAAA,QACzC;AAAA,QAAA;AAAA,MAGR;AAEe,sBAAA;AAChB,sBAAgB,MAAS;AACrB,UAAA;AACH,cAAM,WAAW,MAAM,aAAa,EAAE;AAClC,YAAA,CAAC,UAAU,IAAI;AACV,kBAAA,KAAK,UAAU,KAAK;AAAA,QAAA;AAAA,eAErB,GAAG;AACX,gBAAQ,KAAK,CAAC;AAAA,MAAA;AAEf,UAAI,CAAC,YAAY;AAChB,eAAO,SAAS,OAAO;AAAA,MAAA;AAAA,IAEzB;AAAA,IACA,CAAC,eAAe,iBAAiB,YAAY;AAAA,EAC9C;AACD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRedirectToBacklink.cjs","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useRedirectToBacklink.ts"],"sourcesContent":["import { useCallback, useEffect } from 'react'\nimport { useIdentity } from '../../contexts'\n\nconst getBacklinkFromUrl = () => {\n\treturn new URLSearchParams(window.location.search).get('backlink')\n}\n\nexport const useSaveBacklink = () => {\n\treturn useCallback(() => {\n\t\tconst backlink = getBacklinkFromUrl()\n\t\tif (!backlink) {\n\t\t\treturn\n\t\t}\n\t\tsessionStorage.setItem('backlink', backlink)\n\t}, [])\n}\n\nexport const useRedirectToBacklinkCallback = () => {\n\treturn useCallback(() => {\n\t\tconst backlink = getBacklinkFromUrl() ?? sessionStorage.getItem('backlink')\n\t\tif (!backlink) {\n\t\t\treturn\n\t\t}\n\t\tsessionStorage.removeItem('backlink')\n\t\tconst resolvedBacklink = new URL(backlink, window.location.href)\n\t\tif (resolvedBacklink.origin === window.location.origin) {\n\t\t\twindow.location.href = resolvedBacklink.toString()\n\t\t}\n\t}, [])\n}\n\nexport const useRedirectToBacklink = () => {\n\tconst identity = useIdentity()\n\tconst redirect = useRedirectToBacklinkCallback()\n\tuseEffect(() => {\n\t\tif (!identity) {\n\t\t\treturn\n\t\t}\n\t\tredirect()\n\t}, [identity, redirect])\n\n}\n"],"names":["useCallback"],"mappings":";;;AAGA,MAAM,qBAAqB,MAAM;AAChC,SAAO,IAAI,gBAAgB,OAAO,SAAS,MAAM,EAAE,IAAI,UAAU;AAClE;AAEO,MAAM,kBAAkB,MAAM;AACpC,SAAOA,kBAAY,MAAM;AACxB,UAAM,WAAW;
|
|
1
|
+
{"version":3,"file":"useRedirectToBacklink.cjs","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useRedirectToBacklink.ts"],"sourcesContent":["import { useCallback, useEffect } from 'react'\nimport { useIdentity } from '../../contexts'\n\nconst getBacklinkFromUrl = () => {\n\treturn new URLSearchParams(window.location.search).get('backlink')\n}\n\nexport const useSaveBacklink = () => {\n\treturn useCallback(() => {\n\t\tconst backlink = getBacklinkFromUrl()\n\t\tif (!backlink) {\n\t\t\treturn\n\t\t}\n\t\tsessionStorage.setItem('backlink', backlink)\n\t}, [])\n}\n\nexport const useRedirectToBacklinkCallback = () => {\n\treturn useCallback(() => {\n\t\tconst backlink = getBacklinkFromUrl() ?? sessionStorage.getItem('backlink')\n\t\tif (!backlink) {\n\t\t\treturn\n\t\t}\n\t\tsessionStorage.removeItem('backlink')\n\t\tconst resolvedBacklink = new URL(backlink, window.location.href)\n\t\tif (resolvedBacklink.origin === window.location.origin) {\n\t\t\twindow.location.href = resolvedBacklink.toString()\n\t\t}\n\t}, [])\n}\n\nexport const useRedirectToBacklink = () => {\n\tconst identity = useIdentity()\n\tconst redirect = useRedirectToBacklinkCallback()\n\tuseEffect(() => {\n\t\tif (!identity) {\n\t\t\treturn\n\t\t}\n\t\tredirect()\n\t}, [identity, redirect])\n\n}\n"],"names":["useCallback"],"mappings":";;;AAGA,MAAM,qBAAqB,MAAM;AAChC,SAAO,IAAI,gBAAgB,OAAO,SAAS,MAAM,EAAE,IAAI,UAAU;AAClE;AAEO,MAAM,kBAAkB,MAAM;AACpC,SAAOA,kBAAY,MAAM;AACxB,UAAM,WAAW,mBAAmB;AACpC,QAAI,CAAC,UAAU;AACd;AAAA,IAAA;AAEc,mBAAA,QAAQ,YAAY,QAAQ;AAAA,EAC5C,GAAG,EAAE;AACN;AAEO,MAAM,gCAAgC,MAAM;AAClD,SAAOA,kBAAY,MAAM;AACxB,UAAM,WAAW,mBAAA,KAAwB,eAAe,QAAQ,UAAU;AAC1E,QAAI,CAAC,UAAU;AACd;AAAA,IAAA;AAED,mBAAe,WAAW,UAAU;AACpC,UAAM,mBAAmB,IAAI,IAAI,UAAU,OAAO,SAAS,IAAI;AAC/D,QAAI,iBAAiB,WAAW,OAAO,SAAS,QAAQ;AAChD,aAAA,SAAS,OAAO,iBAAiB,SAAS;AAAA,IAAA;AAAA,EAEnD,GAAG,EAAE;AACN;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRedirectToBacklink.js","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useRedirectToBacklink.ts"],"sourcesContent":["import { useCallback, useEffect } from 'react'\nimport { useIdentity } from '../../contexts'\n\nconst getBacklinkFromUrl = () => {\n\treturn new URLSearchParams(window.location.search).get('backlink')\n}\n\nexport const useSaveBacklink = () => {\n\treturn useCallback(() => {\n\t\tconst backlink = getBacklinkFromUrl()\n\t\tif (!backlink) {\n\t\t\treturn\n\t\t}\n\t\tsessionStorage.setItem('backlink', backlink)\n\t}, [])\n}\n\nexport const useRedirectToBacklinkCallback = () => {\n\treturn useCallback(() => {\n\t\tconst backlink = getBacklinkFromUrl() ?? sessionStorage.getItem('backlink')\n\t\tif (!backlink) {\n\t\t\treturn\n\t\t}\n\t\tsessionStorage.removeItem('backlink')\n\t\tconst resolvedBacklink = new URL(backlink, window.location.href)\n\t\tif (resolvedBacklink.origin === window.location.origin) {\n\t\t\twindow.location.href = resolvedBacklink.toString()\n\t\t}\n\t}, [])\n}\n\nexport const useRedirectToBacklink = () => {\n\tconst identity = useIdentity()\n\tconst redirect = useRedirectToBacklinkCallback()\n\tuseEffect(() => {\n\t\tif (!identity) {\n\t\t\treturn\n\t\t}\n\t\tredirect()\n\t}, [identity, redirect])\n\n}\n"],"names":[],"mappings":";AAGA,MAAM,qBAAqB,MAAM;AAChC,SAAO,IAAI,gBAAgB,OAAO,SAAS,MAAM,EAAE,IAAI,UAAU;AAClE;AAEO,MAAM,kBAAkB,MAAM;AACpC,SAAO,YAAY,MAAM;AACxB,UAAM,WAAW;
|
|
1
|
+
{"version":3,"file":"useRedirectToBacklink.js","sources":["../../../../../../packages/react-client-tenant/src/internal/hooks/useRedirectToBacklink.ts"],"sourcesContent":["import { useCallback, useEffect } from 'react'\nimport { useIdentity } from '../../contexts'\n\nconst getBacklinkFromUrl = () => {\n\treturn new URLSearchParams(window.location.search).get('backlink')\n}\n\nexport const useSaveBacklink = () => {\n\treturn useCallback(() => {\n\t\tconst backlink = getBacklinkFromUrl()\n\t\tif (!backlink) {\n\t\t\treturn\n\t\t}\n\t\tsessionStorage.setItem('backlink', backlink)\n\t}, [])\n}\n\nexport const useRedirectToBacklinkCallback = () => {\n\treturn useCallback(() => {\n\t\tconst backlink = getBacklinkFromUrl() ?? sessionStorage.getItem('backlink')\n\t\tif (!backlink) {\n\t\t\treturn\n\t\t}\n\t\tsessionStorage.removeItem('backlink')\n\t\tconst resolvedBacklink = new URL(backlink, window.location.href)\n\t\tif (resolvedBacklink.origin === window.location.origin) {\n\t\t\twindow.location.href = resolvedBacklink.toString()\n\t\t}\n\t}, [])\n}\n\nexport const useRedirectToBacklink = () => {\n\tconst identity = useIdentity()\n\tconst redirect = useRedirectToBacklinkCallback()\n\tuseEffect(() => {\n\t\tif (!identity) {\n\t\t\treturn\n\t\t}\n\t\tredirect()\n\t}, [identity, redirect])\n\n}\n"],"names":[],"mappings":";AAGA,MAAM,qBAAqB,MAAM;AAChC,SAAO,IAAI,gBAAgB,OAAO,SAAS,MAAM,EAAE,IAAI,UAAU;AAClE;AAEO,MAAM,kBAAkB,MAAM;AACpC,SAAO,YAAY,MAAM;AACxB,UAAM,WAAW,mBAAmB;AACpC,QAAI,CAAC,UAAU;AACd;AAAA,IAAA;AAEc,mBAAA,QAAQ,YAAY,QAAQ;AAAA,EAC5C,GAAG,EAAE;AACN;AAEO,MAAM,gCAAgC,MAAM;AAClD,SAAO,YAAY,MAAM;AACxB,UAAM,WAAW,mBAAA,KAAwB,eAAe,QAAQ,UAAU;AAC1E,QAAI,CAAC,UAAU;AACd;AAAA,IAAA;AAED,mBAAe,WAAW,UAAU;AACpC,UAAM,mBAAmB,IAAI,IAAI,UAAU,OAAO,SAAS,IAAI;AAC/D,QAAI,iBAAiB,WAAW,OAAO,SAAS,QAAQ;AAChD,aAAA,SAAS,OAAO,iBAAiB,SAAS;AAAA,IAAA;AAAA,EAEnD,GAAG,EAAE;AACN;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const calculateHash = async (algo, message) => {
|
|
4
|
+
const hashBuffer = await crypto.subtle.digest(algo, new TextEncoder().encode(message));
|
|
5
|
+
return Array.from(new Uint8Array(hashBuffer)).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
6
|
+
};
|
|
7
|
+
exports.calculateHash = calculateHash;
|
|
8
|
+
//# sourceMappingURL=hashing.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashing.cjs","sources":["../../../../../../packages/react-client-tenant/src/internal/utils/hashing.ts"],"sourcesContent":["export const calculateHash = async (algo: AlgorithmIdentifier, message: string): Promise<string> => {\n\tconst hashBuffer = await crypto.subtle.digest(algo, new TextEncoder().encode(message))\n\treturn Array.from(new Uint8Array(hashBuffer)).map(b => b.toString(16).padStart(2, '0')).join('')\n}\n"],"names":[],"mappings":";;AAAa,MAAA,gBAAgB,OAAO,MAA2B,YAAqC;AAC7F,QAAA,aAAa,MAAM,OAAO,OAAO,OAAO,MAAM,IAAI,YAAY,EAAE,OAAO,OAAO,CAAC;AACrF,SAAO,MAAM,KAAK,IAAI,WAAW,UAAU,CAAC,EAAE,IAAI,CAAA,MAAK,EAAE,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC,EAAE,KAAK,EAAE;AAChG;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const calculateHash = async (algo, message) => {
|
|
2
|
+
const hashBuffer = await crypto.subtle.digest(algo, new TextEncoder().encode(message));
|
|
3
|
+
return Array.from(new Uint8Array(hashBuffer)).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
calculateHash
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=hashing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashing.js","sources":["../../../../../../packages/react-client-tenant/src/internal/utils/hashing.ts"],"sourcesContent":["export const calculateHash = async (algo: AlgorithmIdentifier, message: string): Promise<string> => {\n\tconst hashBuffer = await crypto.subtle.digest(algo, new TextEncoder().encode(message))\n\treturn Array.from(new Uint8Array(hashBuffer)).map(b => b.toString(16).padStart(2, '0')).join('')\n}\n"],"names":[],"mappings":"AAAa,MAAA,gBAAgB,OAAO,MAA2B,YAAqC;AAC7F,QAAA,aAAa,MAAM,OAAO,OAAO,OAAO,MAAM,IAAI,YAAY,EAAE,OAAO,OAAO,CAAC;AACrF,SAAO,MAAM,KAAK,IAAI,WAAW,UAAU,CAAC,EAAE,IAAI,CAAA,MAAK,EAAE,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC,EAAE,KAAK,EAAE;AAChG;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const randomInt = (min, max) => {
|
|
4
|
+
if (min >= max) {
|
|
5
|
+
throw new Error("The min value must be less than the max value.");
|
|
6
|
+
}
|
|
7
|
+
if (max > 4294967295) {
|
|
8
|
+
throw new Error("The max value exceeds the limit for this implementation.");
|
|
9
|
+
}
|
|
10
|
+
const range = max - min + 1;
|
|
11
|
+
const maxValidValue = Math.floor(4294967295 / range) * range;
|
|
12
|
+
let randomInt2;
|
|
13
|
+
do {
|
|
14
|
+
const array = new Uint32Array(1);
|
|
15
|
+
window.crypto.getRandomValues(array);
|
|
16
|
+
randomInt2 = array[0];
|
|
17
|
+
} while (randomInt2 >= maxValidValue);
|
|
18
|
+
return min + randomInt2 % range;
|
|
19
|
+
};
|
|
20
|
+
const randomString = (length, charset) => {
|
|
21
|
+
let result = "";
|
|
22
|
+
for (let i = 0; i < length; i++) {
|
|
23
|
+
result += charset[randomInt(0, charset.length - 1)];
|
|
24
|
+
}
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
exports.randomInt = randomInt;
|
|
28
|
+
exports.randomString = randomString;
|
|
29
|
+
//# sourceMappingURL=randomInt.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"randomInt.cjs","sources":["../../../../../../packages/react-client-tenant/src/internal/utils/randomInt.ts"],"sourcesContent":["export const randomInt = (min: number, max: number) => {\n\tif (min >= max) {\n\t\tthrow new Error('The min value must be less than the max value.')\n\t}\n\n\tif (max > 0xFFFFFFFF) {\n\t\tthrow new Error('The max value exceeds the limit for this implementation.')\n\t}\n\n\tconst range = max - min + 1\n\tconst maxValidValue = Math.floor(0xFFFFFFFF / range) * range\n\tlet randomInt\n\n\tdo {\n\t\tconst array = new Uint32Array(1)\n\t\twindow.crypto.getRandomValues(array)\n\t\trandomInt = array[0]\n\t} while (randomInt >= maxValidValue)\n\n\treturn min + (randomInt % range)\n}\n\n\nexport const randomString = (length: number, charset: string): string => {\n\tlet result = ''\n\tfor (let i = 0; i < length; i++) {\n\t\tresult += charset[randomInt(0, charset.length - 1)]\n\t}\n\treturn result\n}\n"],"names":["randomInt"],"mappings":";;AAAa,MAAA,YAAY,CAAC,KAAa,QAAgB;AACtD,MAAI,OAAO,KAAK;AACT,UAAA,IAAI,MAAM,gDAAgD;AAAA,EAAA;AAGjE,MAAI,MAAM,YAAY;AACf,UAAA,IAAI,MAAM,0DAA0D;AAAA,EAAA;AAGrE,QAAA,QAAQ,MAAM,MAAM;AAC1B,QAAM,gBAAgB,KAAK,MAAM,aAAa,KAAK,IAAI;AACnDA,MAAAA;AAED,KAAA;AACI,UAAA,QAAQ,IAAI,YAAY,CAAC;AACxB,WAAA,OAAO,gBAAgB,KAAK;AACnCA,iBAAY,MAAM,CAAC;AAAA,WACXA,cAAa;AAEtB,SAAO,MAAOA,aAAY;AAC3B;AAGa,MAAA,eAAe,CAAC,QAAgB,YAA4B;AACxE,MAAI,SAAS;AACb,WAAS,IAAI,GAAG,IAAI,QAAQ,KAAK;AAChC,cAAU,QAAQ,UAAU,GAAG,QAAQ,SAAS,CAAC,CAAC;AAAA,EAAA;AAE5C,SAAA;AACR;;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const randomInt = (min, max) => {
|
|
2
|
+
if (min >= max) {
|
|
3
|
+
throw new Error("The min value must be less than the max value.");
|
|
4
|
+
}
|
|
5
|
+
if (max > 4294967295) {
|
|
6
|
+
throw new Error("The max value exceeds the limit for this implementation.");
|
|
7
|
+
}
|
|
8
|
+
const range = max - min + 1;
|
|
9
|
+
const maxValidValue = Math.floor(4294967295 / range) * range;
|
|
10
|
+
let randomInt2;
|
|
11
|
+
do {
|
|
12
|
+
const array = new Uint32Array(1);
|
|
13
|
+
window.crypto.getRandomValues(array);
|
|
14
|
+
randomInt2 = array[0];
|
|
15
|
+
} while (randomInt2 >= maxValidValue);
|
|
16
|
+
return min + randomInt2 % range;
|
|
17
|
+
};
|
|
18
|
+
const randomString = (length, charset) => {
|
|
19
|
+
let result = "";
|
|
20
|
+
for (let i = 0; i < length; i++) {
|
|
21
|
+
result += charset[randomInt(0, charset.length - 1)];
|
|
22
|
+
}
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
randomInt,
|
|
27
|
+
randomString
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=randomInt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"randomInt.js","sources":["../../../../../../packages/react-client-tenant/src/internal/utils/randomInt.ts"],"sourcesContent":["export const randomInt = (min: number, max: number) => {\n\tif (min >= max) {\n\t\tthrow new Error('The min value must be less than the max value.')\n\t}\n\n\tif (max > 0xFFFFFFFF) {\n\t\tthrow new Error('The max value exceeds the limit for this implementation.')\n\t}\n\n\tconst range = max - min + 1\n\tconst maxValidValue = Math.floor(0xFFFFFFFF / range) * range\n\tlet randomInt\n\n\tdo {\n\t\tconst array = new Uint32Array(1)\n\t\twindow.crypto.getRandomValues(array)\n\t\trandomInt = array[0]\n\t} while (randomInt >= maxValidValue)\n\n\treturn min + (randomInt % range)\n}\n\n\nexport const randomString = (length: number, charset: string): string => {\n\tlet result = ''\n\tfor (let i = 0; i < length; i++) {\n\t\tresult += charset[randomInt(0, charset.length - 1)]\n\t}\n\treturn result\n}\n"],"names":["randomInt"],"mappings":"AAAa,MAAA,YAAY,CAAC,KAAa,QAAgB;AACtD,MAAI,OAAO,KAAK;AACT,UAAA,IAAI,MAAM,gDAAgD;AAAA,EAAA;AAGjE,MAAI,MAAM,YAAY;AACf,UAAA,IAAI,MAAM,0DAA0D;AAAA,EAAA;AAGrE,QAAA,QAAQ,MAAM,MAAM;AAC1B,QAAM,gBAAgB,KAAK,MAAM,aAAa,KAAK,IAAI;AACnDA,MAAAA;AAED,KAAA;AACI,UAAA,QAAQ,IAAI,YAAY,CAAC;AACxB,WAAA,OAAO,gBAAgB,KAAK;AACnCA,iBAAY,MAAM,CAAC;AAAA,WACXA,cAAa;AAEtB,SAAO,MAAOA,aAAY;AAC3B;AAGa,MAAA,eAAe,CAAC,QAAgB,YAA4B;AACxE,MAAI,SAAS;AACb,WAAS,IAAI,GAAG,IAAI,QAAQ,KAAK;AAChC,cAAU,QAAQ,UAAU,GAAG,QAAQ,SAAS,CAAC,CAAC;AAAA,EAAA;AAE5C,SAAA;AACR;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import * as TenantApi from '@contember/graphql-client-tenant';
|
|
3
|
+
import { FormContextValue, FormError, FormState } from '../../types/forms';
|
|
4
|
+
export type PasswordlessSignInFormValues = {
|
|
5
|
+
token: string;
|
|
6
|
+
otpToken: string;
|
|
7
|
+
};
|
|
8
|
+
export type PasswordlessSignInFormErrorCode = TenantApi.SignInPasswordlessErrorCode | 'FIELD_REQUIRED' | 'INVALID_VALUE' | 'UNKNOWN_ERROR';
|
|
9
|
+
export type PasswordlessSignInFormState = FormState | 'otp-required';
|
|
10
|
+
export type PasswordlessSignInFormError = FormError<PasswordlessSignInFormValues, PasswordlessSignInFormErrorCode>;
|
|
11
|
+
export type PasswordlessSignInFormContextValue = FormContextValue<PasswordlessSignInFormValues, PasswordlessSignInFormErrorCode, PasswordlessSignInFormState>;
|
|
12
|
+
export interface PasswordlessSignInFormProps {
|
|
13
|
+
requestId: string;
|
|
14
|
+
validationType: TenantApi.PasswordlessValidationType;
|
|
15
|
+
token?: string;
|
|
16
|
+
expiration?: number;
|
|
17
|
+
children: ReactElement;
|
|
18
|
+
onSuccess?: () => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const usePasswordlessSignInForm: () => PasswordlessSignInFormContextValue;
|
|
21
|
+
export declare const PasswordlessSignInForm: ({ children, onSuccess, requestId, validationType, token, expiration }: PasswordlessSignInFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=PasswordlessSignInForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordlessSignInForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/PasswordlessSignInForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAwB,MAAM,OAAO,CAAA;AAC1D,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAE7D,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAM1E,MAAM,MAAM,4BAA4B,GAAG;IAC1C,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,+BAA+B,GACxC,SAAS,CAAC,2BAA2B,GACrC,gBAAgB,GAChB,eAAe,GACf,eAAe,CAAA;AAElB,MAAM,MAAM,2BAA2B,GACpC,SAAS,GACT,cAAc,CAAA;AAEjB,MAAM,MAAM,2BAA2B,GAAG,SAAS,CAAC,4BAA4B,EAAE,+BAA+B,CAAC,CAAA;AAElH,MAAM,MAAM,kCAAkC,GAAG,gBAAgB,CAAC,4BAA4B,EAAE,+BAA+B,EAAE,2BAA2B,CAAC,CAAA;AAG7J,MAAM,WAAW,2BAA2B;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,SAAS,CAAC,0BAA0B,CAAA;IACpD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,YAAY,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB;AAED,eAAO,MAAM,yBAAyB,EAAc,MAAM,kCAAkC,CAAA;AAO5F,eAAO,MAAM,sBAAsB,0EAAsG,2BAA2B,4CA+CnK,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import * as TenantApi from '@contember/graphql-client-tenant';
|
|
3
|
+
import { FormContextValue, FormError, FormState } from '../../types/forms';
|
|
4
|
+
import { InitSignInPasswordlessMutationResult } from '../../hooks';
|
|
5
|
+
export type PasswordlessSignInInitFormValues = {
|
|
6
|
+
email: string;
|
|
7
|
+
};
|
|
8
|
+
export type PasswordlessSignInInitFormErrorCode = TenantApi.InitSignInPasswordlessErrorCode | 'FIELD_REQUIRED' | 'INVALID_VALUE' | 'UNKNOWN_ERROR';
|
|
9
|
+
export type PasswordlessSignInInitFormState = FormState;
|
|
10
|
+
export type PasswordlessSignInInitFormError = FormError<PasswordlessSignInInitFormValues, PasswordlessSignInInitFormErrorCode>;
|
|
11
|
+
export type PasswordlessSignInInitFormContextValue = FormContextValue<PasswordlessSignInInitFormValues, PasswordlessSignInInitFormErrorCode>;
|
|
12
|
+
export interface PasswordlessSignInInitFormProps {
|
|
13
|
+
children: ReactElement;
|
|
14
|
+
onSuccess?: (args: {
|
|
15
|
+
result: InitSignInPasswordlessMutationResult;
|
|
16
|
+
}) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const usePasswordlessSignInInitForm: () => PasswordlessSignInInitFormContextValue;
|
|
19
|
+
export declare const PasswordlessSignInInitForm: ({ children, onSuccess }: PasswordlessSignInInitFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=PasswordlessSignInInitForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordlessSignInInitForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/PasswordlessSignInInitForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAwB,MAAM,OAAO,CAAA;AAC1D,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAE7D,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE1E,OAAO,EAAE,oCAAoC,EAAqC,MAAM,aAAa,CAAA;AAGrG,MAAM,MAAM,gCAAgC,GAAG;IAC9C,KAAK,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,mCAAmC,GAC5C,SAAS,CAAC,+BAA+B,GACzC,gBAAgB,GAChB,eAAe,GACf,eAAe,CAAA;AAElB,MAAM,MAAM,+BAA+B,GAAG,SAAS,CAAA;AAEvD,MAAM,MAAM,+BAA+B,GAAG,SAAS,CAAC,gCAAgC,EAAE,mCAAmC,CAAC,CAAA;AAE9H,MAAM,MAAM,sCAAsC,GAAG,gBAAgB,CAAC,gCAAgC,EAAE,mCAAmC,CAAC,CAAA;AAG5I,MAAM,WAAW,+BAA+B;IAC/C,QAAQ,EAAE,YAAY,CAAA;IACtB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,oCAAoC,CAAA;KAAE,KAAK,IAAI,CAAA;CAC5E;AAED,eAAO,MAAM,6BAA6B,EAAc,MAAM,sCAAsC,CAAA;AAEpG,eAAO,MAAM,0BAA0B,4BAA6B,+BAA+B,4CA+BlG,CAAA"}
|
|
@@ -5,6 +5,8 @@ export * from './InviteForm';
|
|
|
5
5
|
export * from './LoginForm';
|
|
6
6
|
export * from './PasswordResetForm';
|
|
7
7
|
export * from './PasswordResetRequestForm';
|
|
8
|
+
export * from './PasswordlessSignInForm';
|
|
9
|
+
export * from './PasswordlessSignInInitForm';
|
|
8
10
|
export * from './OtpPrepareForm';
|
|
9
11
|
export * from './OtpConfirmForm';
|
|
10
12
|
export * from './UpdateProjectMemberForm';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,qBAAqB,CAAA;AACnC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,2BAA2B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,qBAAqB,CAAA;AACnC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,2BAA2B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/consts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,yBAAyB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,+BAA+B,CAAA"}
|
|
@@ -9,8 +9,6 @@ declare const createSessionTokenMutationResult: TenantApi.CreateSessionTokenResu
|
|
|
9
9
|
readonly email?: string;
|
|
10
10
|
} & {
|
|
11
11
|
readonly name?: string;
|
|
12
|
-
} & {
|
|
13
|
-
readonly otpEnabled: boolean;
|
|
14
12
|
};
|
|
15
13
|
}, {}>;
|
|
16
14
|
export type CreateSessionTokenMutationResult = ModelType<typeof createSessionTokenMutationResult>;
|
|
@@ -33,8 +31,6 @@ export declare const createSessionTokenMutation: TenantApi.MutationFetcher<{
|
|
|
33
31
|
readonly email?: string;
|
|
34
32
|
} & {
|
|
35
33
|
readonly name?: string;
|
|
36
|
-
} & {
|
|
37
|
-
readonly otpEnabled: boolean;
|
|
38
34
|
};
|
|
39
35
|
}) | undefined;
|
|
40
36
|
}) | undefined;
|
|
@@ -56,8 +52,6 @@ export declare const useCreateSessionTokenMutation: ({ headers, apiToken }?: imp
|
|
|
56
52
|
readonly email?: string;
|
|
57
53
|
} & {
|
|
58
54
|
readonly name?: string;
|
|
59
|
-
} & {
|
|
60
|
-
readonly otpEnabled: boolean;
|
|
61
55
|
};
|
|
62
56
|
}, TenantApi.CreateSessionTokenErrorCode>>;
|
|
63
57
|
export type CreateSessionTokenMutationVariables = Parameters<ReturnType<typeof useCreateSessionTokenMutation>>[0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateSessionTokenMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/apiKey/useCreateSessionTokenMutation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,QAAA,MAAM,gCAAgC
|
|
1
|
+
{"version":3,"file":"useCreateSessionTokenMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/apiKey/useCreateSessionTokenMutation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,QAAA,MAAM,gCAAgC;;;;;;;;;;MAAoF,CAAA;AAE1H,MAAM,MAAM,gCAAgC,GAAG,SAAS,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAEjG,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;EAOrC,CAAA;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;0CAAmD,CAAA;AAC7F,MAAM,MAAM,mCAAmC,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -9,8 +9,6 @@ declare const signInResultFragment: TenantApi.SignInResultFetcher<{
|
|
|
9
9
|
readonly email?: string;
|
|
10
10
|
} & {
|
|
11
11
|
readonly name?: string;
|
|
12
|
-
} & {
|
|
13
|
-
readonly otpEnabled: boolean;
|
|
14
12
|
};
|
|
15
13
|
}, {}>;
|
|
16
14
|
export type SignInMutationResult = ModelType<typeof signInResultFragment>;
|
|
@@ -35,8 +33,6 @@ export declare const signInMutation: TenantApi.MutationFetcher<{
|
|
|
35
33
|
readonly email?: string;
|
|
36
34
|
} & {
|
|
37
35
|
readonly name?: string;
|
|
38
|
-
} & {
|
|
39
|
-
readonly otpEnabled: boolean;
|
|
40
36
|
};
|
|
41
37
|
}) | undefined;
|
|
42
38
|
}) | undefined;
|
|
@@ -60,8 +56,6 @@ export declare const useSignInMutation: ({ headers, apiToken }?: import("../../u
|
|
|
60
56
|
readonly email?: string;
|
|
61
57
|
} & {
|
|
62
58
|
readonly name?: string;
|
|
63
|
-
} & {
|
|
64
|
-
readonly otpEnabled: boolean;
|
|
65
59
|
};
|
|
66
60
|
}, TenantApi.SignInErrorCode>>;
|
|
67
61
|
export type SignInMutationVariables = Parameters<ReturnType<typeof useSignInMutation>>[0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignInMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/auth/useSignInMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,QAAA,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"useSignInMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/auth/useSignInMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,QAAA,MAAM,oBAAoB;;;;;;;;;;MAAmE,CAAA;AAE7F,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEzE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQzB,CAAA;AAGF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;8BAE5B,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -2,6 +2,8 @@ import * as TenantApi from '@contember/graphql-client-tenant';
|
|
|
2
2
|
import { ModelType } from 'graphql-ts-client-api';
|
|
3
3
|
declare const signInIdpFragment: TenantApi.SignInIDPResultFetcher<{
|
|
4
4
|
readonly token: string;
|
|
5
|
+
} & {
|
|
6
|
+
readonly idpResponse?: unknown;
|
|
5
7
|
} & {
|
|
6
8
|
readonly person: {
|
|
7
9
|
readonly id: string;
|
|
@@ -9,8 +11,6 @@ declare const signInIdpFragment: TenantApi.SignInIDPResultFetcher<{
|
|
|
9
11
|
readonly email?: string;
|
|
10
12
|
} & {
|
|
11
13
|
readonly name?: string;
|
|
12
|
-
} & {
|
|
13
|
-
readonly otpEnabled: boolean;
|
|
14
14
|
};
|
|
15
15
|
}, {}>;
|
|
16
16
|
export type SignInIDPMutationResult = ModelType<typeof signInIdpFragment>;
|
|
@@ -28,6 +28,8 @@ export declare const signInIDPMutation: TenantApi.MutationFetcher<{
|
|
|
28
28
|
} & {
|
|
29
29
|
readonly result?: ({
|
|
30
30
|
readonly token: string;
|
|
31
|
+
} & {
|
|
32
|
+
readonly idpResponse?: unknown;
|
|
31
33
|
} & {
|
|
32
34
|
readonly person: {
|
|
33
35
|
readonly id: string;
|
|
@@ -35,8 +37,6 @@ export declare const signInIDPMutation: TenantApi.MutationFetcher<{
|
|
|
35
37
|
readonly email?: string;
|
|
36
38
|
} & {
|
|
37
39
|
readonly name?: string;
|
|
38
|
-
} & {
|
|
39
|
-
readonly otpEnabled: boolean;
|
|
40
40
|
};
|
|
41
41
|
}) | undefined;
|
|
42
42
|
}) | undefined;
|
|
@@ -61,6 +61,8 @@ export type SignInIDPMutationVariables = {
|
|
|
61
61
|
};
|
|
62
62
|
export declare const useSignInIDPMutation: ({ headers, apiToken }?: import("../../useTenantApi").TenantApiOptions) => (variables: SignInIDPMutationVariables) => Promise<import("../../useTenantMutation").TenantMutationResponse<{
|
|
63
63
|
readonly token: string;
|
|
64
|
+
} & {
|
|
65
|
+
readonly idpResponse?: unknown;
|
|
64
66
|
} & {
|
|
65
67
|
readonly person: {
|
|
66
68
|
readonly id: string;
|
|
@@ -68,8 +70,6 @@ export declare const useSignInIDPMutation: ({ headers, apiToken }?: import("../.
|
|
|
68
70
|
readonly email?: string;
|
|
69
71
|
} & {
|
|
70
72
|
readonly name?: string;
|
|
71
|
-
} & {
|
|
72
|
-
readonly otpEnabled: boolean;
|
|
73
73
|
};
|
|
74
74
|
}, TenantApi.SignInIDPErrorCode>>;
|
|
75
75
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignInIdpMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/idp/useSignInIdpMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,QAAA,MAAM,iBAAiB;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useSignInIdpMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/idp/useSignInIdpMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,QAAA,MAAM,iBAAiB;;;;;;;;;;;;MAAsE,CAAA;AAE7F,MAAM,MAAM,uBAAuB,GAAG,SAAS,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEzE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ5B,CAAA;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACxC,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,EACD;QACD,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,WAAW,CAAC,EAAE,GAAG,CAAA;KACjB,GACC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAA;CACzB,CAAA;AAGD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;iCAE/B,CAAA"}
|
|
@@ -3,6 +3,8 @@ export * from './auth';
|
|
|
3
3
|
export * from './invite';
|
|
4
4
|
export * from './idp';
|
|
5
5
|
export * from './memberships';
|
|
6
|
+
export * from './passwordless';
|
|
6
7
|
export * from './otp';
|
|
7
8
|
export * from './passwordReset';
|
|
9
|
+
export * from './profile';
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/mutations/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,eAAe,CAAA;AAC7B,cAAc,OAAO,CAAA;AACrB,cAAc,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/mutations/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,OAAO,CAAA;AACrB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA"}
|
|
@@ -9,8 +9,6 @@ declare const inviteMutationResult: TenantApi.InviteResultFetcher<{
|
|
|
9
9
|
readonly email?: string;
|
|
10
10
|
} & {
|
|
11
11
|
readonly name?: string;
|
|
12
|
-
} & {
|
|
13
|
-
readonly otpEnabled: boolean;
|
|
14
12
|
} & {
|
|
15
13
|
readonly identity: {
|
|
16
14
|
readonly id: string;
|
|
@@ -51,8 +49,6 @@ export declare const inviteMutation: TenantApi.MutationFetcher<{
|
|
|
51
49
|
readonly email?: string;
|
|
52
50
|
} & {
|
|
53
51
|
readonly name?: string;
|
|
54
|
-
} & {
|
|
55
|
-
readonly otpEnabled: boolean;
|
|
56
52
|
} & {
|
|
57
53
|
readonly identity: {
|
|
58
54
|
readonly id: string;
|
|
@@ -86,8 +82,6 @@ export declare const useInviteMutation: ({ headers, apiToken }?: import("../..")
|
|
|
86
82
|
readonly email?: string;
|
|
87
83
|
} & {
|
|
88
84
|
readonly name?: string;
|
|
89
|
-
} & {
|
|
90
|
-
readonly otpEnabled: boolean;
|
|
91
85
|
} & {
|
|
92
86
|
readonly identity: {
|
|
93
87
|
readonly id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInviteMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/invite/useInviteMutation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,QAAA,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"useInviteMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/invite/useInviteMutation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;MAC8C,CAAA;AAExE,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEzE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOzB,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;8BAAuC,CAAA;AACrE,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './useActivatePasswordlessOtpMutation';
|
|
2
|
+
export * from './useDisableMyPasswordlessMutation';
|
|
3
|
+
export * from './useEnableMyPasswordlessMutation';
|
|
4
|
+
export * from './useSignInPasswordlessMutation';
|
|
5
|
+
export * from './useInitSignInPasswordlessMutation';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/passwordless/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAA;AACpD,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,qCAAqC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as TenantApi from '@contember/graphql-client-tenant';
|
|
2
|
+
export declare const useActivatePasswordlessOtpMutation: ({ headers, apiToken }?: import("../../useTenantApi").TenantApiOptions) => (variables: {
|
|
3
|
+
readonly requestId: string;
|
|
4
|
+
readonly token: string;
|
|
5
|
+
readonly otpHash: string;
|
|
6
|
+
}) => Promise<import("../../useTenantMutation").TenantMutationResponse<unknown, TenantApi.ActivatePasswordlessOtpErrorCode>>;
|
|
7
|
+
export type ActivatePasswordlessOtpMutationVariables = Parameters<ReturnType<typeof useActivatePasswordlessOtpMutation>>[0];
|
|
8
|
+
//# sourceMappingURL=useActivatePasswordlessOtpMutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useActivatePasswordlessOtpMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAc7D,eAAO,MAAM,kCAAkC;;;;4HAE7C,CAAA;AAEF,MAAM,MAAM,wCAAwC,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,kCAAkC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as TenantApi from '@contember/graphql-client-tenant';
|
|
2
|
+
export declare const useDisableMyPasswordlessMutation: ({ headers, apiToken }?: import("../..").TenantApiOptions) => (variables: {}) => Promise<import("../../useTenantMutation").TenantMutationResponse<unknown, TenantApi.ToggleMyPasswordlessErrorCode>>;
|
|
3
|
+
//# sourceMappingURL=useDisableMyPasswordlessMutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDisableMyPasswordlessMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAa7D,eAAO,MAAM,gCAAgC,sMAAsD,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as TenantApi from '@contember/graphql-client-tenant';
|
|
2
|
+
export declare const useEnableMyPasswordlessMutation: ({ headers, apiToken }?: import("../..").TenantApiOptions) => (variables: {}) => Promise<import("../../useTenantMutation").TenantMutationResponse<unknown, TenantApi.ToggleMyPasswordlessErrorCode>>;
|
|
3
|
+
//# sourceMappingURL=useEnableMyPasswordlessMutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEnableMyPasswordlessMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAa7D,eAAO,MAAM,+BAA+B,sMAAqD,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as TenantApi from '@contember/graphql-client-tenant';
|
|
2
|
+
import { ModelType } from 'graphql-ts-client-api';
|
|
3
|
+
declare const InitSignInPasswordlessMutationResult: TenantApi.InitSignInPasswordlessResultFetcher<{
|
|
4
|
+
readonly requestId: string;
|
|
5
|
+
} & {
|
|
6
|
+
readonly expiresAt: string;
|
|
7
|
+
}, {}>;
|
|
8
|
+
export type InitSignInPasswordlessMutationResult = ModelType<typeof InitSignInPasswordlessMutationResult>;
|
|
9
|
+
export declare const useInitSignInPasswordlessMutation: ({ headers, apiToken }?: import("../../useTenantApi").TenantApiOptions) => (variables: {
|
|
10
|
+
readonly email: string;
|
|
11
|
+
readonly options?: TenantApi.InitSignInPasswordlessOptions;
|
|
12
|
+
}) => Promise<import("../../useTenantMutation").TenantMutationResponse<{
|
|
13
|
+
readonly requestId: string;
|
|
14
|
+
} & {
|
|
15
|
+
readonly expiresAt: string;
|
|
16
|
+
}, TenantApi.InitSignInPasswordlessErrorCode>>;
|
|
17
|
+
export type InitSignInPasswordlessMutationVariables = Parameters<ReturnType<typeof useInitSignInPasswordlessMutation>>[0];
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=useInitSignInPasswordlessMutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInitSignInPasswordlessMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,QAAA,MAAM,oCAAoC;;;;MAA2C,CAAA;AACrF,MAAM,MAAM,oCAAoC,GAAG,SAAS,CAAC,OAAO,oCAAoC,CAAC,CAAA;AAWzG,eAAO,MAAM,iCAAiC;;;;;;;8CAE5C,CAAA;AAEF,MAAM,MAAM,uCAAuC,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,iCAAiC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as TenantApi from '@contember/graphql-client-tenant';
|
|
2
|
+
import { ModelType } from 'graphql-ts-client-api';
|
|
3
|
+
declare const signInResultFragment: TenantApi.SignInPasswordlessResultFetcher<{
|
|
4
|
+
readonly token: string;
|
|
5
|
+
} & {
|
|
6
|
+
readonly person: {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
} & {
|
|
9
|
+
readonly email?: string;
|
|
10
|
+
} & {
|
|
11
|
+
readonly name?: string;
|
|
12
|
+
};
|
|
13
|
+
}, {}>;
|
|
14
|
+
export type SignInPasswordlessMutationResult = ModelType<typeof signInResultFragment>;
|
|
15
|
+
export declare const useSignInPasswordlessMutation: ({ headers, apiToken }?: import("../../useTenantApi").TenantApiOptions) => (variables: {
|
|
16
|
+
readonly requestId: string;
|
|
17
|
+
readonly validationType: TenantApi.PasswordlessValidationType;
|
|
18
|
+
readonly token: string;
|
|
19
|
+
readonly expiration?: number;
|
|
20
|
+
readonly mfaOtp?: string;
|
|
21
|
+
}) => Promise<import("../../useTenantMutation").TenantMutationResponse<{
|
|
22
|
+
readonly token: string;
|
|
23
|
+
} & {
|
|
24
|
+
readonly person: {
|
|
25
|
+
readonly id: string;
|
|
26
|
+
} & {
|
|
27
|
+
readonly email?: string;
|
|
28
|
+
} & {
|
|
29
|
+
readonly name?: string;
|
|
30
|
+
};
|
|
31
|
+
}, TenantApi.SignInPasswordlessErrorCode>>;
|
|
32
|
+
export type SignInPasswordlessMutationVariables = Parameters<ReturnType<typeof useSignInPasswordlessMutation>>[0];
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=useSignInPasswordlessMutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSignInPasswordlessMutation.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/passwordless/useSignInPasswordlessMutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAA;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,QAAA,MAAM,oBAAoB;;;;;;;;;;MAA+E,CAAA;AAEzG,MAAM,MAAM,gCAAgC,GAAG,SAAS,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAYrF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;0CAExC,CAAA;AAEF,MAAM,MAAM,mCAAmC,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/mutations/profile/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as TenantApi from '@contember/graphql-client-tenant';
|
|
2
|
+
export declare const changeMyProfile: TenantApi.MutationFetcher<{
|
|
3
|
+
readonly mutation?: ({
|
|
4
|
+
readonly ok: boolean;
|
|
5
|
+
} & {
|
|
6
|
+
readonly error?: ({
|
|
7
|
+
readonly code: TenantApi.ChangeMyProfileErrorCode;
|
|
8
|
+
} & {
|
|
9
|
+
readonly developerMessage: string;
|
|
10
|
+
}) | undefined;
|
|
11
|
+
}) | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
readonly email?: string;
|
|
14
|
+
readonly name?: string;
|
|
15
|
+
}>;
|
|
16
|
+
export declare const useChangeMyProfileMutation: ({ headers, apiToken }?: import("../..").TenantApiOptions) => (variables: {
|
|
17
|
+
readonly email?: string;
|
|
18
|
+
readonly name?: string;
|
|
19
|
+
}) => Promise<import("../../useTenantMutation").TenantMutationResponse<unknown, TenantApi.ChangeMyProfileErrorCode>>;
|
|
20
|
+
export type ChangeMyProfileMutationVariables = Parameters<ReturnType<typeof useChangeMyProfileMutation>>[0];
|
|
21
|
+
//# sourceMappingURL=useChangeMyProfile.d.ts.map
|