@contember/react-client-tenant 1.3.0-alpha.26 → 2.0.0-alpha.1
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/components/IdentityProvider.cjs +38 -0
- package/dist/development/components/IdentityProvider.cjs.map +1 -0
- package/dist/development/components/IdentityProvider.js +38 -0
- package/dist/development/components/IdentityProvider.js.map +1 -0
- package/dist/development/components/IdentityState.cjs +14 -0
- package/dist/development/components/IdentityState.cjs.map +1 -0
- package/dist/development/components/IdentityState.js +14 -0
- package/dist/development/components/IdentityState.js.map +1 -0
- package/dist/development/components/forms/ChangeMyPasswordForm.cjs +59 -0
- package/dist/development/components/forms/ChangeMyPasswordForm.cjs.map +1 -0
- package/dist/development/components/forms/ChangeMyPasswordForm.js +59 -0
- package/dist/development/components/forms/ChangeMyPasswordForm.js.map +1 -0
- package/dist/development/components/forms/CreateApiKeyForm.cjs +57 -0
- package/dist/development/components/forms/CreateApiKeyForm.cjs.map +1 -0
- package/dist/development/components/forms/CreateApiKeyForm.js +57 -0
- package/dist/development/components/forms/CreateApiKeyForm.js.map +1 -0
- package/dist/development/components/forms/CreateSessionTokenForm.cjs +50 -0
- package/dist/development/components/forms/CreateSessionTokenForm.cjs.map +1 -0
- package/dist/development/components/forms/CreateSessionTokenForm.js +50 -0
- package/dist/development/components/forms/CreateSessionTokenForm.js.map +1 -0
- package/dist/development/components/forms/InviteForm.cjs +62 -0
- package/dist/development/components/forms/InviteForm.cjs.map +1 -0
- package/dist/development/components/forms/InviteForm.js +62 -0
- package/dist/development/components/forms/InviteForm.js.map +1 -0
- package/dist/development/components/forms/LoginForm.cjs +85 -0
- package/dist/development/components/forms/LoginForm.cjs.map +1 -0
- package/dist/development/components/forms/LoginForm.js +85 -0
- package/dist/development/components/forms/LoginForm.js.map +1 -0
- package/dist/development/components/forms/OtpConfirmForm.cjs +49 -0
- package/dist/development/components/forms/OtpConfirmForm.cjs.map +1 -0
- package/dist/development/components/forms/OtpConfirmForm.js +49 -0
- package/dist/development/components/forms/OtpConfirmForm.js.map +1 -0
- package/dist/development/components/forms/OtpPrepareForm.cjs +36 -0
- package/dist/development/components/forms/OtpPrepareForm.cjs.map +1 -0
- package/dist/development/components/forms/OtpPrepareForm.js +36 -0
- package/dist/development/components/forms/OtpPrepareForm.js.map +1 -0
- package/dist/development/components/forms/PasswordResetForm.cjs +62 -0
- package/dist/development/components/forms/PasswordResetForm.cjs.map +1 -0
- package/dist/development/components/forms/PasswordResetForm.js +62 -0
- package/dist/development/components/forms/PasswordResetForm.js.map +1 -0
- package/dist/development/components/forms/PasswordResetRequestForm.cjs +49 -0
- package/dist/development/components/forms/PasswordResetRequestForm.cjs.map +1 -0
- package/dist/development/components/forms/PasswordResetRequestForm.js +49 -0
- package/dist/development/components/forms/PasswordResetRequestForm.js.map +1 -0
- package/dist/development/components/forms/TenantForm.cjs +91 -0
- package/dist/development/components/forms/TenantForm.cjs.map +1 -0
- package/dist/development/components/forms/TenantForm.js +91 -0
- package/dist/development/components/forms/TenantForm.js.map +1 -0
- package/dist/development/components/forms/UpdateProjectMemberForm.cjs +64 -0
- package/dist/development/components/forms/UpdateProjectMemberForm.cjs.map +1 -0
- package/dist/development/components/forms/UpdateProjectMemberForm.js +64 -0
- package/dist/development/components/forms/UpdateProjectMemberForm.js.map +1 -0
- package/dist/development/components/idp/IDP.cjs +56 -0
- package/dist/development/components/idp/IDP.cjs.map +1 -0
- package/dist/development/components/idp/IDP.js +56 -0
- package/dist/development/components/idp/IDP.js.map +1 -0
- package/dist/development/components/idp/IDPInitTrigger.cjs +16 -0
- package/dist/development/components/idp/IDPInitTrigger.cjs.map +1 -0
- package/dist/development/components/idp/IDPInitTrigger.js +16 -0
- package/dist/development/components/idp/IDPInitTrigger.js.map +1 -0
- package/dist/development/components/idp/IDPState.cjs +14 -0
- package/dist/development/components/idp/IDPState.cjs.map +1 -0
- package/dist/development/components/idp/IDPState.js +14 -0
- package/dist/development/components/idp/IDPState.js.map +1 -0
- package/dist/development/components/triggers/DisableOtpTrigger.cjs +32 -0
- package/dist/development/components/triggers/DisableOtpTrigger.cjs.map +1 -0
- package/dist/development/components/triggers/DisableOtpTrigger.js +32 -0
- package/dist/development/components/triggers/DisableOtpTrigger.js.map +1 -0
- package/dist/development/components/triggers/LogoutTrigger.cjs +16 -0
- package/dist/development/components/triggers/LogoutTrigger.cjs.map +1 -0
- package/dist/development/components/triggers/LogoutTrigger.js +16 -0
- package/dist/development/components/triggers/LogoutTrigger.js.map +1 -0
- package/dist/development/components/triggers/RemoveProjectMemberTrigger.cjs +17 -0
- package/dist/development/components/triggers/RemoveProjectMemberTrigger.cjs.map +1 -0
- package/dist/development/components/triggers/RemoveProjectMemberTrigger.js +17 -0
- package/dist/development/components/triggers/RemoveProjectMemberTrigger.js.map +1 -0
- package/dist/development/components/triggers/TenantActionTrigger.cjs +37 -0
- package/dist/development/components/triggers/TenantActionTrigger.cjs.map +1 -0
- package/dist/development/components/triggers/TenantActionTrigger.js +37 -0
- package/dist/development/components/triggers/TenantActionTrigger.js.map +1 -0
- package/dist/development/contexts.cjs +34 -0
- package/dist/development/contexts.cjs.map +1 -0
- package/dist/development/contexts.js +34 -0
- package/dist/development/contexts.js.map +1 -0
- package/dist/development/hooks/mutations/apiKey/useCreateApiKeyMutation.cjs +30 -0
- package/dist/development/hooks/mutations/apiKey/useCreateApiKeyMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/apiKey/useCreateApiKeyMutation.js +13 -0
- package/dist/development/hooks/mutations/apiKey/useCreateApiKeyMutation.js.map +1 -0
- package/dist/development/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.cjs +30 -0
- package/dist/development/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.js +13 -0
- package/dist/development/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.js.map +1 -0
- package/dist/development/hooks/mutations/apiKey/useCreateSessionTokenMutation.cjs +30 -0
- package/dist/development/hooks/mutations/apiKey/useCreateSessionTokenMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/apiKey/useCreateSessionTokenMutation.js +13 -0
- package/dist/development/hooks/mutations/apiKey/useCreateSessionTokenMutation.js.map +1 -0
- package/dist/development/hooks/mutations/apiKey/useDisableApiKeyMutation.cjs +29 -0
- package/dist/development/hooks/mutations/apiKey/useDisableApiKeyMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/apiKey/useDisableApiKeyMutation.js +12 -0
- package/dist/development/hooks/mutations/apiKey/useDisableApiKeyMutation.js.map +1 -0
- package/dist/development/hooks/mutations/auth/useChangeMyPasswordMutation.cjs +29 -0
- package/dist/development/hooks/mutations/auth/useChangeMyPasswordMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/auth/useChangeMyPasswordMutation.js +12 -0
- package/dist/development/hooks/mutations/auth/useChangeMyPasswordMutation.js.map +1 -0
- package/dist/development/hooks/mutations/auth/useSignInMutation.cjs +33 -0
- package/dist/development/hooks/mutations/auth/useSignInMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/auth/useSignInMutation.js +16 -0
- package/dist/development/hooks/mutations/auth/useSignInMutation.js.map +1 -0
- package/dist/development/hooks/mutations/auth/useSignOutMutation.cjs +29 -0
- package/dist/development/hooks/mutations/auth/useSignOutMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/auth/useSignOutMutation.js +12 -0
- package/dist/development/hooks/mutations/auth/useSignOutMutation.js.map +1 -0
- package/dist/development/hooks/mutations/idp/useInitSignInIDPMutation.cjs +31 -0
- package/dist/development/hooks/mutations/idp/useInitSignInIDPMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/idp/useInitSignInIDPMutation.js +14 -0
- package/dist/development/hooks/mutations/idp/useInitSignInIDPMutation.js.map +1 -0
- package/dist/development/hooks/mutations/idp/useSignInIdpMutation.cjs +33 -0
- package/dist/development/hooks/mutations/idp/useSignInIdpMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/idp/useSignInIdpMutation.js +16 -0
- package/dist/development/hooks/mutations/idp/useSignInIdpMutation.js.map +1 -0
- package/dist/development/hooks/mutations/invite/useInviteMutation.cjs +30 -0
- package/dist/development/hooks/mutations/invite/useInviteMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/invite/useInviteMutation.js +13 -0
- package/dist/development/hooks/mutations/invite/useInviteMutation.js.map +1 -0
- package/dist/development/hooks/mutations/memberships/useAddProjectMemberMutation.cjs +29 -0
- package/dist/development/hooks/mutations/memberships/useAddProjectMemberMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/memberships/useAddProjectMemberMutation.js +12 -0
- package/dist/development/hooks/mutations/memberships/useAddProjectMemberMutation.js.map +1 -0
- package/dist/development/hooks/mutations/memberships/useRemoveProjectMemberMutation.cjs +29 -0
- package/dist/development/hooks/mutations/memberships/useRemoveProjectMemberMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/memberships/useRemoveProjectMemberMutation.js +12 -0
- package/dist/development/hooks/mutations/memberships/useRemoveProjectMemberMutation.js.map +1 -0
- package/dist/development/hooks/mutations/memberships/useUpdateProjectMemberMutation.cjs +29 -0
- package/dist/development/hooks/mutations/memberships/useUpdateProjectMemberMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/memberships/useUpdateProjectMemberMutation.js +12 -0
- package/dist/development/hooks/mutations/memberships/useUpdateProjectMemberMutation.js.map +1 -0
- package/dist/development/hooks/mutations/otp/useConfirmOtpMutation.cjs +29 -0
- package/dist/development/hooks/mutations/otp/useConfirmOtpMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/otp/useConfirmOtpMutation.js +12 -0
- package/dist/development/hooks/mutations/otp/useConfirmOtpMutation.js.map +1 -0
- package/dist/development/hooks/mutations/otp/useDisableOtpMutation.cjs +29 -0
- package/dist/development/hooks/mutations/otp/useDisableOtpMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/otp/useDisableOtpMutation.js +12 -0
- package/dist/development/hooks/mutations/otp/useDisableOtpMutation.js.map +1 -0
- package/dist/development/hooks/mutations/otp/usePrepareOtpMutation.cjs +30 -0
- package/dist/development/hooks/mutations/otp/usePrepareOtpMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/otp/usePrepareOtpMutation.js +13 -0
- package/dist/development/hooks/mutations/otp/usePrepareOtpMutation.js.map +1 -0
- package/dist/development/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.cjs +32 -0
- package/dist/development/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.js +15 -0
- package/dist/development/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.js.map +1 -0
- package/dist/development/hooks/mutations/passwordReset/useResetPasswordMutation.cjs +32 -0
- package/dist/development/hooks/mutations/passwordReset/useResetPasswordMutation.cjs.map +1 -0
- package/dist/development/hooks/mutations/passwordReset/useResetPasswordMutation.js +15 -0
- package/dist/development/hooks/mutations/passwordReset/useResetPasswordMutation.js.map +1 -0
- package/dist/development/hooks/queries/useMeQuery.cjs +33 -0
- package/dist/development/hooks/queries/useMeQuery.cjs.map +1 -0
- package/dist/development/hooks/queries/useMeQuery.js +16 -0
- package/dist/development/hooks/queries/useMeQuery.js.map +1 -0
- package/dist/development/hooks/queries/useProjectMembersQuery.cjs +47 -0
- package/dist/development/hooks/queries/useProjectMembersQuery.cjs.map +1 -0
- package/dist/development/hooks/queries/useProjectMembersQuery.js +30 -0
- package/dist/development/hooks/queries/useProjectMembersQuery.js.map +1 -0
- package/dist/development/hooks/queries/useProjectMembershipsQuery.cjs +34 -0
- package/dist/development/hooks/queries/useProjectMembershipsQuery.cjs.map +1 -0
- package/dist/development/hooks/queries/useProjectMembershipsQuery.js +17 -0
- package/dist/development/hooks/queries/useProjectMembershipsQuery.js.map +1 -0
- package/dist/development/hooks/queries/useProjectRolesDefinitionQuery.cjs +36 -0
- package/dist/development/hooks/queries/useProjectRolesDefinitionQuery.cjs.map +1 -0
- package/dist/development/hooks/queries/useProjectRolesDefinitionQuery.js +19 -0
- package/dist/development/hooks/queries/useProjectRolesDefinitionQuery.js.map +1 -0
- package/dist/development/hooks/useFetchIdentity.cjs +52 -0
- package/dist/development/hooks/useFetchIdentity.cjs.map +1 -0
- package/dist/development/hooks/useFetchIdentity.js +52 -0
- package/dist/development/hooks/useFetchIdentity.js.map +1 -0
- package/dist/development/hooks/useLogout.cjs +10 -0
- package/dist/development/hooks/useLogout.cjs.map +1 -0
- package/dist/development/hooks/useLogout.js +10 -0
- package/dist/development/hooks/useLogout.js.map +1 -0
- package/dist/development/hooks/useTenantApi.cjs +11 -4
- package/dist/development/hooks/useTenantApi.cjs.map +1 -1
- package/dist/development/hooks/useTenantApi.js +12 -5
- package/dist/development/hooks/useTenantApi.js.map +1 -1
- package/dist/development/hooks/useTenantMutation.cjs +33 -0
- package/dist/development/hooks/useTenantMutation.cjs.map +1 -0
- package/dist/development/hooks/useTenantMutation.js +33 -0
- package/dist/development/hooks/useTenantMutation.js.map +1 -0
- package/dist/development/hooks/useTenantQueryLoader.cjs +36 -0
- package/dist/development/hooks/useTenantQueryLoader.cjs.map +1 -0
- package/dist/development/hooks/useTenantQueryLoader.js +36 -0
- package/dist/development/hooks/useTenantQueryLoader.js.map +1 -0
- package/dist/development/index.cjs +130 -0
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +132 -2
- package/dist/development/index.js.map +1 -1
- package/dist/development/internal/hooks/useHandleIDPResponse.cjs +51 -0
- package/dist/development/internal/hooks/useHandleIDPResponse.cjs.map +1 -0
- package/dist/development/internal/hooks/useHandleIDPResponse.js +51 -0
- package/dist/development/internal/hooks/useHandleIDPResponse.js.map +1 -0
- package/dist/development/internal/hooks/useIDPAutoInit.cjs +19 -0
- package/dist/development/internal/hooks/useIDPAutoInit.cjs.map +1 -0
- package/dist/development/internal/hooks/useIDPAutoInit.js +19 -0
- package/dist/development/internal/hooks/useIDPAutoInit.js.map +1 -0
- package/dist/development/internal/hooks/useIDPStateStore.cjs +19 -0
- package/dist/development/internal/hooks/useIDPStateStore.cjs.map +1 -0
- package/dist/development/internal/hooks/useIDPStateStore.js +19 -0
- package/dist/development/internal/hooks/useIDPStateStore.js.map +1 -0
- package/dist/development/internal/hooks/useInitIDPRedirect.cjs +44 -0
- package/dist/development/internal/hooks/useInitIDPRedirect.cjs.map +1 -0
- package/dist/development/internal/hooks/useInitIDPRedirect.js +44 -0
- package/dist/development/internal/hooks/useInitIDPRedirect.js.map +1 -0
- package/dist/development/internal/hooks/useLogoutInternal.cjs +35 -0
- package/dist/development/internal/hooks/useLogoutInternal.cjs.map +1 -0
- package/dist/development/internal/hooks/useLogoutInternal.js +35 -0
- package/dist/development/internal/hooks/useLogoutInternal.js.map +1 -0
- package/dist/development/internal/hooks/useRedirectToBacklink.cjs +31 -0
- package/dist/development/internal/hooks/useRedirectToBacklink.cjs.map +1 -0
- package/dist/development/internal/hooks/useRedirectToBacklink.js +31 -0
- package/dist/development/internal/hooks/useRedirectToBacklink.js.map +1 -0
- package/dist/development/internal/utils/getBaseHref.cjs +8 -0
- package/dist/development/internal/utils/getBaseHref.cjs.map +1 -0
- package/dist/development/internal/utils/getBaseHref.js +8 -0
- package/dist/development/internal/utils/getBaseHref.js.map +1 -0
- package/dist/production/components/IdentityProvider.cjs +26 -0
- package/dist/production/components/IdentityProvider.cjs.map +1 -0
- package/dist/production/components/IdentityProvider.js +26 -0
- package/dist/production/components/IdentityProvider.js.map +1 -0
- package/dist/production/components/IdentityState.cjs +10 -0
- package/dist/production/components/IdentityState.cjs.map +1 -0
- package/dist/production/components/IdentityState.js +10 -0
- package/dist/production/components/IdentityState.js.map +1 -0
- package/dist/production/components/forms/ChangeMyPasswordForm.cjs +51 -0
- package/dist/production/components/forms/ChangeMyPasswordForm.cjs.map +1 -0
- package/dist/production/components/forms/ChangeMyPasswordForm.js +51 -0
- package/dist/production/components/forms/ChangeMyPasswordForm.js.map +1 -0
- package/dist/production/components/forms/CreateApiKeyForm.cjs +49 -0
- package/dist/production/components/forms/CreateApiKeyForm.cjs.map +1 -0
- package/dist/production/components/forms/CreateApiKeyForm.js +49 -0
- package/dist/production/components/forms/CreateApiKeyForm.js.map +1 -0
- package/dist/production/components/forms/CreateSessionTokenForm.cjs +42 -0
- package/dist/production/components/forms/CreateSessionTokenForm.cjs.map +1 -0
- package/dist/production/components/forms/CreateSessionTokenForm.js +42 -0
- package/dist/production/components/forms/CreateSessionTokenForm.js.map +1 -0
- package/dist/production/components/forms/InviteForm.cjs +54 -0
- package/dist/production/components/forms/InviteForm.cjs.map +1 -0
- package/dist/production/components/forms/InviteForm.js +54 -0
- package/dist/production/components/forms/InviteForm.js.map +1 -0
- package/dist/production/components/forms/LoginForm.cjs +77 -0
- package/dist/production/components/forms/LoginForm.cjs.map +1 -0
- package/dist/production/components/forms/LoginForm.js +77 -0
- package/dist/production/components/forms/LoginForm.js.map +1 -0
- package/dist/production/components/forms/OtpConfirmForm.cjs +41 -0
- package/dist/production/components/forms/OtpConfirmForm.cjs.map +1 -0
- package/dist/production/components/forms/OtpConfirmForm.js +41 -0
- package/dist/production/components/forms/OtpConfirmForm.js.map +1 -0
- package/dist/production/components/forms/OtpPrepareForm.cjs +28 -0
- package/dist/production/components/forms/OtpPrepareForm.cjs.map +1 -0
- package/dist/production/components/forms/OtpPrepareForm.js +28 -0
- package/dist/production/components/forms/OtpPrepareForm.js.map +1 -0
- package/dist/production/components/forms/PasswordResetForm.cjs +54 -0
- package/dist/production/components/forms/PasswordResetForm.cjs.map +1 -0
- package/dist/production/components/forms/PasswordResetForm.js +54 -0
- package/dist/production/components/forms/PasswordResetForm.js.map +1 -0
- package/dist/production/components/forms/PasswordResetRequestForm.cjs +41 -0
- package/dist/production/components/forms/PasswordResetRequestForm.cjs.map +1 -0
- package/dist/production/components/forms/PasswordResetRequestForm.js +41 -0
- package/dist/production/components/forms/PasswordResetRequestForm.js.map +1 -0
- package/dist/production/components/forms/TenantForm.cjs +83 -0
- package/dist/production/components/forms/TenantForm.cjs.map +1 -0
- package/dist/production/components/forms/TenantForm.js +83 -0
- package/dist/production/components/forms/TenantForm.js.map +1 -0
- package/dist/production/components/forms/UpdateProjectMemberForm.cjs +56 -0
- package/dist/production/components/forms/UpdateProjectMemberForm.cjs.map +1 -0
- package/dist/production/components/forms/UpdateProjectMemberForm.js +56 -0
- package/dist/production/components/forms/UpdateProjectMemberForm.js.map +1 -0
- package/dist/production/components/idp/IDP.cjs +48 -0
- package/dist/production/components/idp/IDP.cjs.map +1 -0
- package/dist/production/components/idp/IDP.js +48 -0
- package/dist/production/components/idp/IDP.js.map +1 -0
- package/dist/production/components/idp/IDPInitTrigger.cjs +12 -0
- package/dist/production/components/idp/IDPInitTrigger.cjs.map +1 -0
- package/dist/production/components/idp/IDPInitTrigger.js +12 -0
- package/dist/production/components/idp/IDPInitTrigger.js.map +1 -0
- package/dist/production/components/idp/IDPState.cjs +10 -0
- package/dist/production/components/idp/IDPState.cjs.map +1 -0
- package/dist/production/components/idp/IDPState.js +10 -0
- package/dist/production/components/idp/IDPState.js.map +1 -0
- package/dist/production/components/triggers/DisableOtpTrigger.cjs +24 -0
- package/dist/production/components/triggers/DisableOtpTrigger.cjs.map +1 -0
- package/dist/production/components/triggers/DisableOtpTrigger.js +24 -0
- package/dist/production/components/triggers/DisableOtpTrigger.js.map +1 -0
- package/dist/production/components/triggers/LogoutTrigger.cjs +12 -0
- package/dist/production/components/triggers/LogoutTrigger.cjs.map +1 -0
- package/dist/production/components/triggers/LogoutTrigger.js +12 -0
- package/dist/production/components/triggers/LogoutTrigger.js.map +1 -0
- package/dist/production/components/triggers/RemoveProjectMemberTrigger.cjs +13 -0
- package/dist/production/components/triggers/RemoveProjectMemberTrigger.cjs.map +1 -0
- package/dist/production/components/triggers/RemoveProjectMemberTrigger.js +13 -0
- package/dist/production/components/triggers/RemoveProjectMemberTrigger.js.map +1 -0
- package/dist/production/components/triggers/TenantActionTrigger.cjs +33 -0
- package/dist/production/components/triggers/TenantActionTrigger.cjs.map +1 -0
- package/dist/production/components/triggers/TenantActionTrigger.js +33 -0
- package/dist/production/components/triggers/TenantActionTrigger.js.map +1 -0
- package/dist/production/contexts.cjs +34 -0
- package/dist/production/contexts.cjs.map +1 -0
- package/dist/production/contexts.js +34 -0
- package/dist/production/contexts.js.map +1 -0
- package/dist/production/hooks/mutations/apiKey/useCreateApiKeyMutation.cjs +30 -0
- package/dist/production/hooks/mutations/apiKey/useCreateApiKeyMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/apiKey/useCreateApiKeyMutation.js +13 -0
- package/dist/production/hooks/mutations/apiKey/useCreateApiKeyMutation.js.map +1 -0
- package/dist/production/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.cjs +30 -0
- package/dist/production/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.js +13 -0
- package/dist/production/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.js.map +1 -0
- package/dist/production/hooks/mutations/apiKey/useCreateSessionTokenMutation.cjs +30 -0
- package/dist/production/hooks/mutations/apiKey/useCreateSessionTokenMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/apiKey/useCreateSessionTokenMutation.js +13 -0
- package/dist/production/hooks/mutations/apiKey/useCreateSessionTokenMutation.js.map +1 -0
- package/dist/production/hooks/mutations/apiKey/useDisableApiKeyMutation.cjs +29 -0
- package/dist/production/hooks/mutations/apiKey/useDisableApiKeyMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/apiKey/useDisableApiKeyMutation.js +12 -0
- package/dist/production/hooks/mutations/apiKey/useDisableApiKeyMutation.js.map +1 -0
- package/dist/production/hooks/mutations/auth/useChangeMyPasswordMutation.cjs +29 -0
- package/dist/production/hooks/mutations/auth/useChangeMyPasswordMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/auth/useChangeMyPasswordMutation.js +12 -0
- package/dist/production/hooks/mutations/auth/useChangeMyPasswordMutation.js.map +1 -0
- package/dist/production/hooks/mutations/auth/useSignInMutation.cjs +33 -0
- package/dist/production/hooks/mutations/auth/useSignInMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/auth/useSignInMutation.js +16 -0
- package/dist/production/hooks/mutations/auth/useSignInMutation.js.map +1 -0
- package/dist/production/hooks/mutations/auth/useSignOutMutation.cjs +29 -0
- package/dist/production/hooks/mutations/auth/useSignOutMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/auth/useSignOutMutation.js +12 -0
- package/dist/production/hooks/mutations/auth/useSignOutMutation.js.map +1 -0
- package/dist/production/hooks/mutations/idp/useInitSignInIDPMutation.cjs +31 -0
- package/dist/production/hooks/mutations/idp/useInitSignInIDPMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/idp/useInitSignInIDPMutation.js +14 -0
- package/dist/production/hooks/mutations/idp/useInitSignInIDPMutation.js.map +1 -0
- package/dist/production/hooks/mutations/idp/useSignInIdpMutation.cjs +33 -0
- package/dist/production/hooks/mutations/idp/useSignInIdpMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/idp/useSignInIdpMutation.js +16 -0
- package/dist/production/hooks/mutations/idp/useSignInIdpMutation.js.map +1 -0
- package/dist/production/hooks/mutations/invite/useInviteMutation.cjs +30 -0
- package/dist/production/hooks/mutations/invite/useInviteMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/invite/useInviteMutation.js +13 -0
- package/dist/production/hooks/mutations/invite/useInviteMutation.js.map +1 -0
- package/dist/production/hooks/mutations/memberships/useAddProjectMemberMutation.cjs +29 -0
- package/dist/production/hooks/mutations/memberships/useAddProjectMemberMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/memberships/useAddProjectMemberMutation.js +12 -0
- package/dist/production/hooks/mutations/memberships/useAddProjectMemberMutation.js.map +1 -0
- package/dist/production/hooks/mutations/memberships/useRemoveProjectMemberMutation.cjs +29 -0
- package/dist/production/hooks/mutations/memberships/useRemoveProjectMemberMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/memberships/useRemoveProjectMemberMutation.js +12 -0
- package/dist/production/hooks/mutations/memberships/useRemoveProjectMemberMutation.js.map +1 -0
- package/dist/production/hooks/mutations/memberships/useUpdateProjectMemberMutation.cjs +29 -0
- package/dist/production/hooks/mutations/memberships/useUpdateProjectMemberMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/memberships/useUpdateProjectMemberMutation.js +12 -0
- package/dist/production/hooks/mutations/memberships/useUpdateProjectMemberMutation.js.map +1 -0
- package/dist/production/hooks/mutations/otp/useConfirmOtpMutation.cjs +29 -0
- package/dist/production/hooks/mutations/otp/useConfirmOtpMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/otp/useConfirmOtpMutation.js +12 -0
- package/dist/production/hooks/mutations/otp/useConfirmOtpMutation.js.map +1 -0
- package/dist/production/hooks/mutations/otp/useDisableOtpMutation.cjs +29 -0
- package/dist/production/hooks/mutations/otp/useDisableOtpMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/otp/useDisableOtpMutation.js +12 -0
- package/dist/production/hooks/mutations/otp/useDisableOtpMutation.js.map +1 -0
- package/dist/production/hooks/mutations/otp/usePrepareOtpMutation.cjs +30 -0
- package/dist/production/hooks/mutations/otp/usePrepareOtpMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/otp/usePrepareOtpMutation.js +13 -0
- package/dist/production/hooks/mutations/otp/usePrepareOtpMutation.js.map +1 -0
- package/dist/production/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.cjs +32 -0
- package/dist/production/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.js +15 -0
- package/dist/production/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.js.map +1 -0
- package/dist/production/hooks/mutations/passwordReset/useResetPasswordMutation.cjs +32 -0
- package/dist/production/hooks/mutations/passwordReset/useResetPasswordMutation.cjs.map +1 -0
- package/dist/production/hooks/mutations/passwordReset/useResetPasswordMutation.js +15 -0
- package/dist/production/hooks/mutations/passwordReset/useResetPasswordMutation.js.map +1 -0
- package/dist/production/hooks/queries/useMeQuery.cjs +33 -0
- package/dist/production/hooks/queries/useMeQuery.cjs.map +1 -0
- package/dist/production/hooks/queries/useMeQuery.js +16 -0
- package/dist/production/hooks/queries/useMeQuery.js.map +1 -0
- package/dist/production/hooks/queries/useProjectMembersQuery.cjs +47 -0
- package/dist/production/hooks/queries/useProjectMembersQuery.cjs.map +1 -0
- package/dist/production/hooks/queries/useProjectMembersQuery.js +30 -0
- package/dist/production/hooks/queries/useProjectMembersQuery.js.map +1 -0
- package/dist/production/hooks/queries/useProjectMembershipsQuery.cjs +34 -0
- package/dist/production/hooks/queries/useProjectMembershipsQuery.cjs.map +1 -0
- package/dist/production/hooks/queries/useProjectMembershipsQuery.js +17 -0
- package/dist/production/hooks/queries/useProjectMembershipsQuery.js.map +1 -0
- package/dist/production/hooks/queries/useProjectRolesDefinitionQuery.cjs +36 -0
- package/dist/production/hooks/queries/useProjectRolesDefinitionQuery.cjs.map +1 -0
- package/dist/production/hooks/queries/useProjectRolesDefinitionQuery.js +19 -0
- package/dist/production/hooks/queries/useProjectRolesDefinitionQuery.js.map +1 -0
- package/dist/production/hooks/useFetchIdentity.cjs +52 -0
- package/dist/production/hooks/useFetchIdentity.cjs.map +1 -0
- package/dist/production/hooks/useFetchIdentity.js +52 -0
- package/dist/production/hooks/useFetchIdentity.js.map +1 -0
- package/dist/production/hooks/useLogout.cjs +10 -0
- package/dist/production/hooks/useLogout.cjs.map +1 -0
- package/dist/production/hooks/useLogout.js +10 -0
- package/dist/production/hooks/useLogout.js.map +1 -0
- package/dist/production/hooks/useTenantApi.cjs +11 -4
- package/dist/production/hooks/useTenantApi.cjs.map +1 -1
- package/dist/production/hooks/useTenantApi.js +12 -5
- package/dist/production/hooks/useTenantApi.js.map +1 -1
- package/dist/production/hooks/useTenantMutation.cjs +33 -0
- package/dist/production/hooks/useTenantMutation.cjs.map +1 -0
- package/dist/production/hooks/useTenantMutation.js +33 -0
- package/dist/production/hooks/useTenantMutation.js.map +1 -0
- package/dist/production/hooks/useTenantQueryLoader.cjs +36 -0
- package/dist/production/hooks/useTenantQueryLoader.cjs.map +1 -0
- package/dist/production/hooks/useTenantQueryLoader.js +36 -0
- package/dist/production/hooks/useTenantQueryLoader.js.map +1 -0
- package/dist/production/index.cjs +130 -0
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.js +132 -2
- package/dist/production/index.js.map +1 -1
- package/dist/production/internal/hooks/useHandleIDPResponse.cjs +51 -0
- package/dist/production/internal/hooks/useHandleIDPResponse.cjs.map +1 -0
- package/dist/production/internal/hooks/useHandleIDPResponse.js +51 -0
- package/dist/production/internal/hooks/useHandleIDPResponse.js.map +1 -0
- package/dist/production/internal/hooks/useIDPAutoInit.cjs +19 -0
- package/dist/production/internal/hooks/useIDPAutoInit.cjs.map +1 -0
- package/dist/production/internal/hooks/useIDPAutoInit.js +19 -0
- package/dist/production/internal/hooks/useIDPAutoInit.js.map +1 -0
- package/dist/production/internal/hooks/useIDPStateStore.cjs +19 -0
- package/dist/production/internal/hooks/useIDPStateStore.cjs.map +1 -0
- package/dist/production/internal/hooks/useIDPStateStore.js +19 -0
- package/dist/production/internal/hooks/useIDPStateStore.js.map +1 -0
- package/dist/production/internal/hooks/useInitIDPRedirect.cjs +44 -0
- package/dist/production/internal/hooks/useInitIDPRedirect.cjs.map +1 -0
- package/dist/production/internal/hooks/useInitIDPRedirect.js +44 -0
- package/dist/production/internal/hooks/useInitIDPRedirect.js.map +1 -0
- package/dist/production/internal/hooks/useLogoutInternal.cjs +35 -0
- package/dist/production/internal/hooks/useLogoutInternal.cjs.map +1 -0
- package/dist/production/internal/hooks/useLogoutInternal.js +35 -0
- package/dist/production/internal/hooks/useLogoutInternal.js.map +1 -0
- package/dist/production/internal/hooks/useRedirectToBacklink.cjs +31 -0
- package/dist/production/internal/hooks/useRedirectToBacklink.cjs.map +1 -0
- package/dist/production/internal/hooks/useRedirectToBacklink.js +31 -0
- package/dist/production/internal/hooks/useRedirectToBacklink.js.map +1 -0
- package/dist/production/internal/utils/getBaseHref.cjs +8 -0
- package/dist/production/internal/utils/getBaseHref.cjs.map +1 -0
- package/dist/production/internal/utils/getBaseHref.js +8 -0
- package/dist/production/internal/utils/getBaseHref.js.map +1 -0
- package/dist/types/components/IdentityProvider.d.ts +6 -0
- package/dist/types/components/IdentityProvider.d.ts.map +1 -0
- package/dist/types/components/IdentityState.d.ts +8 -0
- package/dist/types/components/IdentityState.d.ts.map +1 -0
- package/dist/types/components/forms/ChangeMyPasswordForm.d.ts +19 -0
- package/dist/types/components/forms/ChangeMyPasswordForm.d.ts.map +1 -0
- package/dist/types/components/forms/CreateApiKeyForm.d.ts +23 -0
- package/dist/types/components/forms/CreateApiKeyForm.d.ts.map +1 -0
- package/dist/types/components/forms/CreateSessionTokenForm.d.ts +22 -0
- package/dist/types/components/forms/CreateSessionTokenForm.d.ts.map +1 -0
- package/dist/types/components/forms/InviteForm.d.ts +25 -0
- package/dist/types/components/forms/InviteForm.d.ts.map +1 -0
- package/dist/types/components/forms/LoginForm.d.ts +20 -0
- package/dist/types/components/forms/LoginForm.d.ts.map +1 -0
- package/dist/types/components/forms/OtpConfirmForm.d.ts +17 -0
- package/dist/types/components/forms/OtpConfirmForm.d.ts.map +1 -0
- package/dist/types/components/forms/OtpPrepareForm.d.ts +19 -0
- package/dist/types/components/forms/OtpPrepareForm.d.ts.map +1 -0
- package/dist/types/components/forms/PasswordResetForm.d.ts +20 -0
- package/dist/types/components/forms/PasswordResetForm.d.ts.map +1 -0
- package/dist/types/components/forms/PasswordResetRequestForm.d.ts +17 -0
- package/dist/types/components/forms/PasswordResetRequestForm.d.ts.map +1 -0
- package/dist/types/components/forms/TenantForm.d.ts +37 -0
- package/dist/types/components/forms/TenantForm.d.ts.map +1 -0
- package/dist/types/components/forms/UpdateProjectMemberForm.d.ts +19 -0
- package/dist/types/components/forms/UpdateProjectMemberForm.d.ts.map +1 -0
- package/dist/types/components/forms/index.d.ts +11 -0
- package/dist/types/components/forms/index.d.ts.map +1 -0
- package/dist/types/components/idp/IDP.d.ts +10 -0
- package/dist/types/components/idp/IDP.d.ts.map +1 -0
- package/dist/types/components/idp/IDPInitTrigger.d.ts +7 -0
- package/dist/types/components/idp/IDPInitTrigger.d.ts.map +1 -0
- package/dist/types/components/idp/IDPState.d.ts +8 -0
- package/dist/types/components/idp/IDPState.d.ts.map +1 -0
- package/dist/types/components/idp/index.d.ts +4 -0
- package/dist/types/components/idp/index.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +6 -0
- package/dist/types/components/index.d.ts.map +1 -0
- package/dist/types/components/triggers/DisableOtpTrigger.d.ts +8 -0
- package/dist/types/components/triggers/DisableOtpTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/LogoutTrigger.d.ts +5 -0
- package/dist/types/components/triggers/LogoutTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/RemoveProjectMemberTrigger.d.ts +9 -0
- package/dist/types/components/triggers/RemoveProjectMemberTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/TenantActionTrigger.d.ts +22 -0
- package/dist/types/components/triggers/TenantActionTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/index.d.ts +4 -0
- package/dist/types/components/triggers/index.d.ts.map +1 -0
- package/dist/types/contexts.d.ts +20 -0
- package/dist/types/contexts.d.ts.map +1 -0
- package/dist/types/hooks/index.d.ts +6 -0
- package/dist/types/hooks/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/apiKey/index.d.ts +5 -0
- package/dist/types/hooks/mutations/apiKey/index.d.ts.map +1 -0
- package/dist/types/hooks/mutations/apiKey/useCreateApiKeyMutation.d.ts +83 -0
- package/dist/types/hooks/mutations/apiKey/useCreateApiKeyMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.d.ts +73 -0
- package/dist/types/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/apiKey/useCreateSessionTokenMutation.d.ts +65 -0
- package/dist/types/hooks/mutations/apiKey/useCreateSessionTokenMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/apiKey/useDisableApiKeyMutation.d.ts +21 -0
- package/dist/types/hooks/mutations/apiKey/useDisableApiKeyMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/auth/index.d.ts +4 -0
- package/dist/types/hooks/mutations/auth/index.d.ts.map +1 -0
- package/dist/types/hooks/mutations/auth/useChangeMyPasswordMutation.d.ts +21 -0
- package/dist/types/hooks/mutations/auth/useChangeMyPasswordMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/auth/useSignInMutation.d.ts +69 -0
- package/dist/types/hooks/mutations/auth/useSignInMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/auth/useSignOutMutation.d.ts +21 -0
- package/dist/types/hooks/mutations/auth/useSignOutMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/idp/index.d.ts +3 -0
- package/dist/types/hooks/mutations/idp/index.d.ts.map +1 -0
- package/dist/types/hooks/mutations/idp/useInitSignInIDPMutation.d.ts +17 -0
- package/dist/types/hooks/mutations/idp/useInitSignInIDPMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/idp/useSignInIdpMutation.d.ts +76 -0
- package/dist/types/hooks/mutations/idp/useSignInIdpMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/index.d.ts +8 -0
- package/dist/types/hooks/mutations/index.d.ts.map +1 -0
- package/dist/types/hooks/mutations/invite/index.d.ts +2 -0
- package/dist/types/hooks/mutations/invite/index.d.ts.map +1 -0
- package/dist/types/hooks/mutations/invite/useInviteMutation.d.ts +103 -0
- package/dist/types/hooks/mutations/invite/useInviteMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/memberships/index.d.ts +4 -0
- package/dist/types/hooks/mutations/memberships/index.d.ts.map +1 -0
- package/dist/types/hooks/mutations/memberships/useAddProjectMemberMutation.d.ts +33 -0
- package/dist/types/hooks/mutations/memberships/useAddProjectMemberMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/memberships/useRemoveProjectMemberMutation.d.ts +23 -0
- package/dist/types/hooks/mutations/memberships/useRemoveProjectMemberMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/memberships/useUpdateProjectMemberMutation.d.ts +33 -0
- package/dist/types/hooks/mutations/memberships/useUpdateProjectMemberMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/otp/index.d.ts +4 -0
- package/dist/types/hooks/mutations/otp/index.d.ts.map +1 -0
- package/dist/types/hooks/mutations/otp/useConfirmOtpMutation.d.ts +21 -0
- package/dist/types/hooks/mutations/otp/useConfirmOtpMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/otp/useDisableOtpMutation.d.ts +17 -0
- package/dist/types/hooks/mutations/otp/useDisableOtpMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/otp/usePrepareOtpMutation.d.ts +25 -0
- package/dist/types/hooks/mutations/otp/usePrepareOtpMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/passwordReset/index.d.ts +3 -0
- package/dist/types/hooks/mutations/passwordReset/index.d.ts.map +1 -0
- package/dist/types/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.d.ts +23 -0
- package/dist/types/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/passwordReset/useResetPasswordMutation.d.ts +23 -0
- package/dist/types/hooks/mutations/passwordReset/useResetPasswordMutation.d.ts.map +1 -0
- package/dist/types/hooks/queries/index.d.ts +5 -0
- package/dist/types/hooks/queries/index.d.ts.map +1 -0
- package/dist/types/hooks/queries/useMeQuery.d.ts +52 -0
- package/dist/types/hooks/queries/useMeQuery.d.ts.map +1 -0
- package/dist/types/hooks/queries/useProjectMembersQuery.d.ts +43 -0
- package/dist/types/hooks/queries/useProjectMembersQuery.d.ts.map +1 -0
- package/dist/types/hooks/queries/useProjectMembershipsQuery.d.ts +20 -0
- package/dist/types/hooks/queries/useProjectMembershipsQuery.d.ts.map +1 -0
- package/dist/types/hooks/queries/useProjectRolesDefinitionQuery.d.ts +66 -0
- package/dist/types/hooks/queries/useProjectRolesDefinitionQuery.d.ts.map +1 -0
- package/dist/types/hooks/useFetchIdentity.d.ts +6 -0
- package/dist/types/hooks/useFetchIdentity.d.ts.map +1 -0
- package/dist/types/hooks/useLogout.d.ts +4 -0
- package/dist/types/hooks/useLogout.d.ts.map +1 -0
- package/dist/types/hooks/useTenantApi.d.ts +7 -2
- package/dist/types/hooks/useTenantApi.d.ts.map +1 -1
- package/dist/types/hooks/useTenantMutation.d.ts +25 -0
- package/dist/types/hooks/useTenantMutation.d.ts.map +1 -0
- package/dist/types/hooks/useTenantQueryLoader.d.ts +17 -0
- package/dist/types/hooks/useTenantQueryLoader.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/internal/hooks/useHandleIDPResponse.d.ts +10 -0
- package/dist/types/internal/hooks/useHandleIDPResponse.d.ts.map +1 -0
- package/dist/types/internal/hooks/useIDPAutoInit.d.ts +2 -0
- package/dist/types/internal/hooks/useIDPAutoInit.d.ts.map +1 -0
- package/dist/types/internal/hooks/useIDPStateStore.d.ts +9 -0
- package/dist/types/internal/hooks/useIDPStateStore.d.ts.map +1 -0
- package/dist/types/internal/hooks/useInitIDPRedirect.d.ts +15 -0
- package/dist/types/internal/hooks/useInitIDPRedirect.d.ts.map +1 -0
- package/dist/types/internal/hooks/useLogoutInternal.d.ts +4 -0
- package/dist/types/internal/hooks/useLogoutInternal.d.ts.map +1 -0
- package/dist/types/internal/hooks/useRedirectToBacklink.d.ts +4 -0
- package/dist/types/internal/hooks/useRedirectToBacklink.d.ts.map +1 -0
- package/dist/types/internal/utils/getBaseHref.d.ts +2 -0
- package/dist/types/internal/utils/getBaseHref.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/types/Identity.d.ts +19 -0
- package/dist/types/types/Identity.d.ts.map +1 -0
- package/dist/types/types/IdentityMethods.d.ts +5 -0
- package/dist/types/types/IdentityMethods.d.ts.map +1 -0
- package/dist/types/types/IdentityStateValue.d.ts +2 -0
- package/dist/types/types/IdentityStateValue.d.ts.map +1 -0
- package/dist/types/types/forms.d.ts +18 -0
- package/dist/types/types/forms.d.ts.map +1 -0
- package/dist/types/types/idp.d.ts +30 -0
- package/dist/types/types/idp.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +6 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/package.json +6 -2
- package/src/components/IdentityProvider.tsx +39 -0
- package/src/components/IdentityState.tsx +14 -0
- package/src/components/forms/ChangeMyPasswordForm.tsx +75 -0
- package/src/components/forms/CreateApiKeyForm.tsx +72 -0
- package/src/components/forms/CreateSessionTokenForm.tsx +64 -0
- package/src/components/forms/InviteForm.tsx +79 -0
- package/src/components/forms/LoginForm.tsx +110 -0
- package/src/components/forms/OtpConfirmForm.tsx +61 -0
- package/src/components/forms/OtpPrepareForm.tsx +45 -0
- package/src/components/forms/PasswordResetForm.tsx +80 -0
- package/src/components/forms/PasswordResetRequestForm.tsx +64 -0
- package/src/components/forms/TenantForm.tsx +116 -0
- package/src/components/forms/UpdateProjectMemberForm.tsx +77 -0
- package/src/components/forms/index.ts +10 -0
- package/src/components/idp/IDP.tsx +65 -0
- package/src/components/idp/IDPInitTrigger.tsx +17 -0
- package/src/components/idp/IDPState.tsx +14 -0
- package/src/components/idp/index.ts +3 -0
- package/src/components/index.ts +5 -0
- package/src/components/triggers/DisableOtpTrigger.tsx +25 -0
- package/src/components/triggers/LogoutTrigger.tsx +10 -0
- package/src/components/triggers/RemoveProjectMemberTrigger.tsx +18 -0
- package/src/components/triggers/TenantActionTrigger.tsx +41 -0
- package/src/components/triggers/index.ts +3 -0
- package/src/contexts.ts +34 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/mutations/apiKey/index.ts +4 -0
- package/src/hooks/mutations/apiKey/useCreateApiKeyMutation.tsx +19 -0
- package/src/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.tsx +19 -0
- package/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.tsx +19 -0
- package/src/hooks/mutations/apiKey/useDisableApiKeyMutation.tsx +14 -0
- package/src/hooks/mutations/auth/index.ts +3 -0
- package/src/hooks/mutations/auth/useChangeMyPasswordMutation.ts +14 -0
- package/src/hooks/mutations/auth/useSignInMutation.ts +25 -0
- package/src/hooks/mutations/auth/useSignOutMutation.ts +12 -0
- package/src/hooks/mutations/idp/index.ts +2 -0
- package/src/hooks/mutations/idp/useInitSignInIDPMutation.ts +29 -0
- package/src/hooks/mutations/idp/useSignInIdpMutation.ts +35 -0
- package/src/hooks/mutations/index.ts +7 -0
- package/src/hooks/mutations/invite/index.ts +1 -0
- package/src/hooks/mutations/invite/useInviteMutation.tsx +20 -0
- package/src/hooks/mutations/memberships/index.ts +3 -0
- package/src/hooks/mutations/memberships/useAddProjectMemberMutation.ts +13 -0
- package/src/hooks/mutations/memberships/useRemoveProjectMemberMutation.ts +13 -0
- package/src/hooks/mutations/memberships/useUpdateProjectMemberMutation.ts +13 -0
- package/src/hooks/mutations/otp/index.ts +3 -0
- package/src/hooks/mutations/otp/useConfirmOtpMutation.ts +13 -0
- package/src/hooks/mutations/otp/useDisableOtpMutation.ts +10 -0
- package/src/hooks/mutations/otp/usePrepareOtpMutation.ts +16 -0
- package/src/hooks/mutations/passwordReset/index.ts +2 -0
- package/src/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.ts +17 -0
- package/src/hooks/mutations/passwordReset/useResetPasswordMutation.ts +17 -0
- package/src/hooks/queries/index.ts +4 -0
- package/src/hooks/queries/useMeQuery.ts +23 -0
- package/src/hooks/queries/useProjectMembersQuery.ts +43 -0
- package/src/hooks/queries/useProjectMembershipsQuery.ts +25 -0
- package/src/hooks/queries/useProjectRolesDefinitionQuery.ts +34 -0
- package/src/hooks/useFetchIdentity.ts +55 -0
- package/src/hooks/useLogout.ts +7 -0
- package/src/hooks/useTenantApi.ts +18 -6
- package/src/hooks/useTenantMutation.ts +45 -0
- package/src/hooks/useTenantQueryLoader.ts +49 -0
- package/src/index.ts +3 -0
- package/src/internal/hooks/useHandleIDPResponse.ts +64 -0
- package/src/internal/hooks/useIDPAutoInit.ts +18 -0
- package/src/internal/hooks/useIDPStateStore.ts +18 -0
- package/src/internal/hooks/useInitIDPRedirect.ts +48 -0
- package/src/internal/hooks/useLogoutInternal.ts +35 -0
- package/src/internal/hooks/useRedirectToBacklink.ts +42 -0
- package/src/internal/utils/getBaseHref.ts +4 -0
- package/src/tsconfig.json +1 -0
- package/src/types/Identity.ts +20 -0
- package/src/types/IdentityMethods.ts +4 -0
- package/src/types/IdentityStateValue.ts +6 -0
- package/src/types/forms.ts +26 -0
- package/src/types/idp.ts +25 -0
- package/src/types/index.ts +5 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as TenantApi from "@contember/graphql-client-tenant";
|
|
2
|
+
import { createTenantMutation } from "../../useTenantMutation.js";
|
|
3
|
+
const confirmOtpMutation = TenantApi.mutation$.confirmOtp(
|
|
4
|
+
TenantApi.confirmOtpResponse$$.error(TenantApi.confirmOtpError$$),
|
|
5
|
+
(options) => options.alias("mutation")
|
|
6
|
+
);
|
|
7
|
+
const useConfirmOtpMutation = createTenantMutation(confirmOtpMutation);
|
|
8
|
+
export {
|
|
9
|
+
confirmOtpMutation,
|
|
10
|
+
useConfirmOtpMutation
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=useConfirmOtpMutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConfirmOtpMutation.js","sources":["../../../../../src/hooks/mutations/otp/useConfirmOtpMutation.ts"],"sourcesContent":["import * as TenantApi from '@contember/graphql-client-tenant'\nimport { createTenantMutation } from '../../useTenantMutation'\n\nexport const confirmOtpMutation = TenantApi.mutation$\n\t.confirmOtp(TenantApi\n\t\t\t.confirmOtpResponse$$\n\t\t\t.error(TenantApi.confirmOtpError$$),\n\t\toptions => options.alias('mutation'),\n\t)\n\n\nexport const useConfirmOtpMutation = createTenantMutation(confirmOtpMutation)\nexport type ConfirmOtpMutationVariables = Parameters<ReturnType<typeof useConfirmOtpMutation>>[0]\n"],"names":[],"mappings":";;AAGa,MAAA,qBAAqB,UAAU,UAC1C;AAAA,EAAW,UACT,qBACA,MAAM,UAAU,iBAAiB;AAAA,EACnC,CAAA,YAAW,QAAQ,MAAM,UAAU;AACpC;AAGY,MAAA,wBAAwB,qBAAqB,kBAAkB;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const TenantApi = require("@contember/graphql-client-tenant");
|
|
4
|
+
const useTenantMutation = require("../../useTenantMutation.cjs");
|
|
5
|
+
function _interopNamespaceDefault(e) {
|
|
6
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
7
|
+
if (e) {
|
|
8
|
+
for (const k in e) {
|
|
9
|
+
if (k !== "default") {
|
|
10
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: () => e[k]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
n.default = e;
|
|
19
|
+
return Object.freeze(n);
|
|
20
|
+
}
|
|
21
|
+
const TenantApi__namespace = /* @__PURE__ */ _interopNamespaceDefault(TenantApi);
|
|
22
|
+
const disableOtpMutation = TenantApi__namespace.mutation$.disableOtp(
|
|
23
|
+
TenantApi__namespace.disableOtpResponse$$.error(TenantApi__namespace.disableOtpError$$),
|
|
24
|
+
(options) => options.alias("mutation")
|
|
25
|
+
);
|
|
26
|
+
const useDisableOtpMutation = useTenantMutation.createTenantMutation(disableOtpMutation);
|
|
27
|
+
exports.disableOtpMutation = disableOtpMutation;
|
|
28
|
+
exports.useDisableOtpMutation = useDisableOtpMutation;
|
|
29
|
+
//# sourceMappingURL=useDisableOtpMutation.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDisableOtpMutation.cjs","sources":["../../../../../src/hooks/mutations/otp/useDisableOtpMutation.ts"],"sourcesContent":["import * as TenantApi from '@contember/graphql-client-tenant'\nimport { createTenantMutation } from '../../useTenantMutation'\n\nexport const disableOtpMutation = TenantApi.mutation$.disableOtp(\n\tTenantApi.disableOtpResponse$$.error(TenantApi.disableOtpError$$),\n\toptions => options.alias('mutation'),\n)\n\nexport const useDisableOtpMutation = createTenantMutation(disableOtpMutation)\nexport type DisableOtpMutationVariables = Parameters<ReturnType<typeof useDisableOtpMutation>>[0]\n"],"names":["TenantApi","createTenantMutation"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAGa,MAAA,qBAAqBA,qBAAU,UAAU;AAAA,EACrDA,qBAAU,qBAAqB,MAAMA,qBAAU,iBAAiB;AAAA,EAChE,CAAA,YAAW,QAAQ,MAAM,UAAU;AACpC;AAEa,MAAA,wBAAwBC,uCAAqB,kBAAkB;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as TenantApi from "@contember/graphql-client-tenant";
|
|
2
|
+
import { createTenantMutation } from "../../useTenantMutation.js";
|
|
3
|
+
const disableOtpMutation = TenantApi.mutation$.disableOtp(
|
|
4
|
+
TenantApi.disableOtpResponse$$.error(TenantApi.disableOtpError$$),
|
|
5
|
+
(options) => options.alias("mutation")
|
|
6
|
+
);
|
|
7
|
+
const useDisableOtpMutation = createTenantMutation(disableOtpMutation);
|
|
8
|
+
export {
|
|
9
|
+
disableOtpMutation,
|
|
10
|
+
useDisableOtpMutation
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=useDisableOtpMutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDisableOtpMutation.js","sources":["../../../../../src/hooks/mutations/otp/useDisableOtpMutation.ts"],"sourcesContent":["import * as TenantApi from '@contember/graphql-client-tenant'\nimport { createTenantMutation } from '../../useTenantMutation'\n\nexport const disableOtpMutation = TenantApi.mutation$.disableOtp(\n\tTenantApi.disableOtpResponse$$.error(TenantApi.disableOtpError$$),\n\toptions => options.alias('mutation'),\n)\n\nexport const useDisableOtpMutation = createTenantMutation(disableOtpMutation)\nexport type DisableOtpMutationVariables = Parameters<ReturnType<typeof useDisableOtpMutation>>[0]\n"],"names":[],"mappings":";;AAGa,MAAA,qBAAqB,UAAU,UAAU;AAAA,EACrD,UAAU,qBAAqB,MAAM,UAAU,iBAAiB;AAAA,EAChE,CAAA,YAAW,QAAQ,MAAM,UAAU;AACpC;AAEa,MAAA,wBAAwB,qBAAqB,kBAAkB;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const TenantApi = require("@contember/graphql-client-tenant");
|
|
4
|
+
const useTenantMutation = require("../../useTenantMutation.cjs");
|
|
5
|
+
function _interopNamespaceDefault(e) {
|
|
6
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
7
|
+
if (e) {
|
|
8
|
+
for (const k in e) {
|
|
9
|
+
if (k !== "default") {
|
|
10
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: () => e[k]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
n.default = e;
|
|
19
|
+
return Object.freeze(n);
|
|
20
|
+
}
|
|
21
|
+
const TenantApi__namespace = /* @__PURE__ */ _interopNamespaceDefault(TenantApi);
|
|
22
|
+
const prepareOtmMutationResult = TenantApi__namespace.prepareOtpResponse$$.result(TenantApi__namespace.prepareOtpResult$$);
|
|
23
|
+
const prepareOtpMutation = TenantApi__namespace.mutation$.prepareOtp(
|
|
24
|
+
prepareOtmMutationResult,
|
|
25
|
+
(options) => options.alias("mutation")
|
|
26
|
+
);
|
|
27
|
+
const usePrepareOtpMutation = useTenantMutation.createTenantMutation(prepareOtpMutation);
|
|
28
|
+
exports.prepareOtpMutation = prepareOtpMutation;
|
|
29
|
+
exports.usePrepareOtpMutation = usePrepareOtpMutation;
|
|
30
|
+
//# sourceMappingURL=usePrepareOtpMutation.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePrepareOtpMutation.cjs","sources":["../../../../../src/hooks/mutations/otp/usePrepareOtpMutation.ts"],"sourcesContent":["import * as TenantApi from '@contember/graphql-client-tenant'\nimport { ModelType } from 'graphql-ts-client-api'\nimport { createTenantMutation } from '../../useTenantMutation'\n\nconst prepareOtmMutationResult = TenantApi.prepareOtpResponse$$.result(TenantApi.prepareOtpResult$$)\n\nexport type PrepareOtpMutationResult = ModelType<typeof TenantApi.prepareOtpResult$$>\n\nexport const prepareOtpMutation = TenantApi.mutation$.prepareOtp(\n\tprepareOtmMutationResult,\n\toptions => options.alias('mutation'),\n)\n\n\nexport const usePrepareOtpMutation = createTenantMutation(prepareOtpMutation)\nexport type PrepareOtpMutationVariables = Parameters<ReturnType<typeof usePrepareOtpMutation>>[0]\n"],"names":["TenantApi","createTenantMutation"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,2BAA2BA,qBAAU,qBAAqB,OAAOA,qBAAU,kBAAkB;AAItF,MAAA,qBAAqBA,qBAAU,UAAU;AAAA,EACrD;AAAA,EACA,CAAA,YAAW,QAAQ,MAAM,UAAU;AACpC;AAGa,MAAA,wBAAwBC,uCAAqB,kBAAkB;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as TenantApi from "@contember/graphql-client-tenant";
|
|
2
|
+
import { createTenantMutation } from "../../useTenantMutation.js";
|
|
3
|
+
const prepareOtmMutationResult = TenantApi.prepareOtpResponse$$.result(TenantApi.prepareOtpResult$$);
|
|
4
|
+
const prepareOtpMutation = TenantApi.mutation$.prepareOtp(
|
|
5
|
+
prepareOtmMutationResult,
|
|
6
|
+
(options) => options.alias("mutation")
|
|
7
|
+
);
|
|
8
|
+
const usePrepareOtpMutation = createTenantMutation(prepareOtpMutation);
|
|
9
|
+
export {
|
|
10
|
+
prepareOtpMutation,
|
|
11
|
+
usePrepareOtpMutation
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=usePrepareOtpMutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePrepareOtpMutation.js","sources":["../../../../../src/hooks/mutations/otp/usePrepareOtpMutation.ts"],"sourcesContent":["import * as TenantApi from '@contember/graphql-client-tenant'\nimport { ModelType } from 'graphql-ts-client-api'\nimport { createTenantMutation } from '../../useTenantMutation'\n\nconst prepareOtmMutationResult = TenantApi.prepareOtpResponse$$.result(TenantApi.prepareOtpResult$$)\n\nexport type PrepareOtpMutationResult = ModelType<typeof TenantApi.prepareOtpResult$$>\n\nexport const prepareOtpMutation = TenantApi.mutation$.prepareOtp(\n\tprepareOtmMutationResult,\n\toptions => options.alias('mutation'),\n)\n\n\nexport const usePrepareOtpMutation = createTenantMutation(prepareOtpMutation)\nexport type PrepareOtpMutationVariables = Parameters<ReturnType<typeof usePrepareOtpMutation>>[0]\n"],"names":[],"mappings":";;AAIA,MAAM,2BAA2B,UAAU,qBAAqB,OAAO,UAAU,kBAAkB;AAItF,MAAA,qBAAqB,UAAU,UAAU;AAAA,EACrD;AAAA,EACA,CAAA,YAAW,QAAQ,MAAM,UAAU;AACpC;AAGa,MAAA,wBAAwB,qBAAqB,kBAAkB;"}
|
package/dist/development/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.cjs
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const TenantApi = require("@contember/graphql-client-tenant");
|
|
4
|
+
const useTenantApi = require("../../useTenantApi.cjs");
|
|
5
|
+
const useTenantMutation = require("../../useTenantMutation.cjs");
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
7
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
8
|
+
if (e) {
|
|
9
|
+
for (const k in e) {
|
|
10
|
+
if (k !== "default") {
|
|
11
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: () => e[k]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
n.default = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
const TenantApi__namespace = /* @__PURE__ */ _interopNamespaceDefault(TenantApi);
|
|
23
|
+
const createResetPasswordRequestMutation = TenantApi__namespace.mutation$.createResetPasswordRequest(
|
|
24
|
+
TenantApi__namespace.createPasswordResetRequestResponse$$.error(TenantApi__namespace.createPasswordResetRequestError$$),
|
|
25
|
+
(options) => options.alias("mutation")
|
|
26
|
+
);
|
|
27
|
+
const useCreateResetPasswordRequestMutation = useTenantMutation.createTenantMutation(createResetPasswordRequestMutation, {
|
|
28
|
+
apiToken: useTenantApi.LoginToken
|
|
29
|
+
});
|
|
30
|
+
exports.createResetPasswordRequestMutation = createResetPasswordRequestMutation;
|
|
31
|
+
exports.useCreateResetPasswordRequestMutation = useCreateResetPasswordRequestMutation;
|
|
32
|
+
//# sourceMappingURL=useCreateResetPasswordRequestMutation.cjs.map
|
package/dist/development/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCreateResetPasswordRequestMutation.cjs","sources":["../../../../../src/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.ts"],"sourcesContent":["import * as TenantApi from '@contember/graphql-client-tenant'\nimport { LoginToken } from '../../useTenantApi'\nimport { createTenantMutation } from '../../useTenantMutation'\n\nexport const createResetPasswordRequestMutation = TenantApi\n\t.mutation$\n\t.createResetPasswordRequest(\n\t\tTenantApi\n\t\t\t.createPasswordResetRequestResponse$$\n\t\t\t.error(TenantApi.createPasswordResetRequestError$$),\n\t\toptions => options.alias('mutation'),\n\t)\n\nexport const useCreateResetPasswordRequestMutation = createTenantMutation(createResetPasswordRequestMutation, {\n\tapiToken: LoginToken,\n})\nexport type CreateResetPasswordRequestMutationVariables = Parameters<ReturnType<typeof useCreateResetPasswordRequestMutation>>[0]\n"],"names":["TenantApi","createTenantMutation","LoginToken"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAIa,MAAA,qCAAqCA,qBAChD,UACA;AAAA,EACAA,qBACE,qCACA,MAAMA,qBAAU,iCAAiC;AAAA,EACnD,CAAA,YAAW,QAAQ,MAAM,UAAU;AACpC;AAEY,MAAA,wCAAwCC,uCAAqB,oCAAoC;AAAA,EAC7G,UAAUC,aAAA;AACX,CAAC;;;"}
|
package/dist/development/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as TenantApi from "@contember/graphql-client-tenant";
|
|
2
|
+
import { LoginToken } from "../../useTenantApi.js";
|
|
3
|
+
import { createTenantMutation } from "../../useTenantMutation.js";
|
|
4
|
+
const createResetPasswordRequestMutation = TenantApi.mutation$.createResetPasswordRequest(
|
|
5
|
+
TenantApi.createPasswordResetRequestResponse$$.error(TenantApi.createPasswordResetRequestError$$),
|
|
6
|
+
(options) => options.alias("mutation")
|
|
7
|
+
);
|
|
8
|
+
const useCreateResetPasswordRequestMutation = createTenantMutation(createResetPasswordRequestMutation, {
|
|
9
|
+
apiToken: LoginToken
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
createResetPasswordRequestMutation,
|
|
13
|
+
useCreateResetPasswordRequestMutation
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=useCreateResetPasswordRequestMutation.js.map
|
package/dist/development/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCreateResetPasswordRequestMutation.js","sources":["../../../../../src/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.ts"],"sourcesContent":["import * as TenantApi from '@contember/graphql-client-tenant'\nimport { LoginToken } from '../../useTenantApi'\nimport { createTenantMutation } from '../../useTenantMutation'\n\nexport const createResetPasswordRequestMutation = TenantApi\n\t.mutation$\n\t.createResetPasswordRequest(\n\t\tTenantApi\n\t\t\t.createPasswordResetRequestResponse$$\n\t\t\t.error(TenantApi.createPasswordResetRequestError$$),\n\t\toptions => options.alias('mutation'),\n\t)\n\nexport const useCreateResetPasswordRequestMutation = createTenantMutation(createResetPasswordRequestMutation, {\n\tapiToken: LoginToken,\n})\nexport type CreateResetPasswordRequestMutationVariables = Parameters<ReturnType<typeof useCreateResetPasswordRequestMutation>>[0]\n"],"names":[],"mappings":";;;AAIa,MAAA,qCAAqC,UAChD,UACA;AAAA,EACA,UACE,qCACA,MAAM,UAAU,iCAAiC;AAAA,EACnD,CAAA,YAAW,QAAQ,MAAM,UAAU;AACpC;AAEY,MAAA,wCAAwC,qBAAqB,oCAAoC;AAAA,EAC7G,UAAU;AACX,CAAC;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const TenantApi = require("@contember/graphql-client-tenant");
|
|
4
|
+
const useTenantApi = require("../../useTenantApi.cjs");
|
|
5
|
+
const useTenantMutation = require("../../useTenantMutation.cjs");
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
7
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
8
|
+
if (e) {
|
|
9
|
+
for (const k in e) {
|
|
10
|
+
if (k !== "default") {
|
|
11
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: () => e[k]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
n.default = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
const TenantApi__namespace = /* @__PURE__ */ _interopNamespaceDefault(TenantApi);
|
|
23
|
+
const resetPasswordMutation = TenantApi__namespace.mutation$.resetPassword(
|
|
24
|
+
TenantApi__namespace.resetPasswordResponse$$.error(TenantApi__namespace.resetPasswordError$$),
|
|
25
|
+
(options) => options.alias("mutation")
|
|
26
|
+
);
|
|
27
|
+
const useResetPasswordMutation = useTenantMutation.createTenantMutation(resetPasswordMutation, {
|
|
28
|
+
apiToken: useTenantApi.LoginToken
|
|
29
|
+
});
|
|
30
|
+
exports.resetPasswordMutation = resetPasswordMutation;
|
|
31
|
+
exports.useResetPasswordMutation = useResetPasswordMutation;
|
|
32
|
+
//# sourceMappingURL=useResetPasswordMutation.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useResetPasswordMutation.cjs","sources":["../../../../../src/hooks/mutations/passwordReset/useResetPasswordMutation.ts"],"sourcesContent":["import * as TenantApi from '@contember/graphql-client-tenant'\nimport { LoginToken } from '../../useTenantApi'\nimport { createTenantMutation } from '../../useTenantMutation'\n\nexport const resetPasswordMutation = TenantApi\n\t.mutation$\n\t.resetPassword(\n\t\tTenantApi\n\t\t\t.resetPasswordResponse$$\n\t\t\t.error(TenantApi.resetPasswordError$$),\n\t\toptions => options.alias('mutation'),\n\t)\n\nexport const useResetPasswordMutation = createTenantMutation(resetPasswordMutation, {\n\tapiToken: LoginToken,\n})\nexport type ResetPasswordMutationVariables = Parameters<ReturnType<typeof useResetPasswordMutation>>[0]\n"],"names":["TenantApi","createTenantMutation","LoginToken"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAIa,MAAA,wBAAwBA,qBACnC,UACA;AAAA,EACAA,qBACE,wBACA,MAAMA,qBAAU,oBAAoB;AAAA,EACtC,CAAA,YAAW,QAAQ,MAAM,UAAU;AACpC;AAEY,MAAA,2BAA2BC,uCAAqB,uBAAuB;AAAA,EACnF,UAAUC,aAAA;AACX,CAAC;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as TenantApi from "@contember/graphql-client-tenant";
|
|
2
|
+
import { LoginToken } from "../../useTenantApi.js";
|
|
3
|
+
import { createTenantMutation } from "../../useTenantMutation.js";
|
|
4
|
+
const resetPasswordMutation = TenantApi.mutation$.resetPassword(
|
|
5
|
+
TenantApi.resetPasswordResponse$$.error(TenantApi.resetPasswordError$$),
|
|
6
|
+
(options) => options.alias("mutation")
|
|
7
|
+
);
|
|
8
|
+
const useResetPasswordMutation = createTenantMutation(resetPasswordMutation, {
|
|
9
|
+
apiToken: LoginToken
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
resetPasswordMutation,
|
|
13
|
+
useResetPasswordMutation
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=useResetPasswordMutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useResetPasswordMutation.js","sources":["../../../../../src/hooks/mutations/passwordReset/useResetPasswordMutation.ts"],"sourcesContent":["import * as TenantApi from '@contember/graphql-client-tenant'\nimport { LoginToken } from '../../useTenantApi'\nimport { createTenantMutation } from '../../useTenantMutation'\n\nexport const resetPasswordMutation = TenantApi\n\t.mutation$\n\t.resetPassword(\n\t\tTenantApi\n\t\t\t.resetPasswordResponse$$\n\t\t\t.error(TenantApi.resetPasswordError$$),\n\t\toptions => options.alias('mutation'),\n\t)\n\nexport const useResetPasswordMutation = createTenantMutation(resetPasswordMutation, {\n\tapiToken: LoginToken,\n})\nexport type ResetPasswordMutationVariables = Parameters<ReturnType<typeof useResetPasswordMutation>>[0]\n"],"names":[],"mappings":";;;AAIa,MAAA,wBAAwB,UACnC,UACA;AAAA,EACA,UACE,wBACA,MAAM,UAAU,oBAAoB;AAAA,EACtC,CAAA,YAAW,QAAQ,MAAM,UAAU;AACpC;AAEY,MAAA,2BAA2B,qBAAqB,uBAAuB;AAAA,EACnF,UAAU;AACX,CAAC;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const TenantApi = require("@contember/graphql-client-tenant");
|
|
4
|
+
const useTenantApi = require("../useTenantApi.cjs");
|
|
5
|
+
const react = require("react");
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
7
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
8
|
+
if (e) {
|
|
9
|
+
for (const k in e) {
|
|
10
|
+
if (k !== "default") {
|
|
11
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: () => e[k]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
n.default = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
const TenantApi__namespace = /* @__PURE__ */ _interopNamespaceDefault(TenantApi);
|
|
23
|
+
const identityFragment = TenantApi__namespace.identity$$.person(TenantApi__namespace.person$$).projects(
|
|
24
|
+
TenantApi__namespace.identityProjectRelation$.project(TenantApi__namespace.project$$).memberships(TenantApi__namespace.membership$$.variables(TenantApi__namespace.variableEntry$$))
|
|
25
|
+
).permissions(TenantApi__namespace.identityGlobalPermissions$$);
|
|
26
|
+
const useMeQuery = (options = {}) => {
|
|
27
|
+
const executor = useTenantApi.useTenantApi(options);
|
|
28
|
+
return react.useCallback(async ({}) => {
|
|
29
|
+
return (await executor(TenantApi__namespace.query$.me(identityFragment))).me;
|
|
30
|
+
}, [executor]);
|
|
31
|
+
};
|
|
32
|
+
exports.useMeQuery = useMeQuery;
|
|
33
|
+
//# sourceMappingURL=useMeQuery.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMeQuery.cjs","sources":["../../../../src/hooks/queries/useMeQuery.ts"],"sourcesContent":["import * as TenantApi from '@contember/graphql-client-tenant'\nimport { ModelType } from 'graphql-ts-client-api'\nimport { TenantApiOptions, useTenantApi } from '../useTenantApi'\nimport { useCallback } from 'react'\n\nconst identityFragment = TenantApi\n\t.identity$$\n\t.person(TenantApi.person$$)\n\t.projects(TenantApi\n\t\t.identityProjectRelation$\n\t\t.project(TenantApi.project$$)\n\t\t.memberships(TenantApi.membership$$.variables(TenantApi.variableEntry$$)),\n\t)\n\t.permissions(TenantApi.identityGlobalPermissions$$)\n\nexport type MeQueryData = ModelType<typeof identityFragment>\n\nexport const useMeQuery = (options: TenantApiOptions = {}) => {\n\tconst executor = useTenantApi(options)\n\treturn useCallback(async ({}: {}): Promise<MeQueryData> => {\n\t\treturn (await executor(TenantApi.query$.me(identityFragment))).me\n\t}, [executor])\n}\n"],"names":["TenantApi","useTenantApi","useCallback"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM,mBAAmBA,qBACvB,WACA,OAAOA,qBAAU,QAAQ,EACzB;AAAA,EAASA,qBACR,yBACA,QAAQA,qBAAU,SAAS,EAC3B,YAAYA,qBAAU,aAAa,UAAUA,qBAAU,eAAe,CAAC;AACzE,EACC,YAAYA,qBAAU,2BAA2B;AAI5C,MAAM,aAAa,CAAC,UAA4B,OAAO;AACvD,QAAA,WAAWC,0BAAa,OAAO;AAC9B,SAAAC,MAAAA,YAAY,OAAO,OAAiC;AAC1D,YAAQ,MAAM,SAASF,qBAAU,OAAO,GAAG,gBAAgB,CAAC,GAAG;AAAA,EAAA,GAC7D,CAAC,QAAQ,CAAC;AACd;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as TenantApi from "@contember/graphql-client-tenant";
|
|
2
|
+
import { useTenantApi } from "../useTenantApi.js";
|
|
3
|
+
import { useCallback } from "react";
|
|
4
|
+
const identityFragment = TenantApi.identity$$.person(TenantApi.person$$).projects(
|
|
5
|
+
TenantApi.identityProjectRelation$.project(TenantApi.project$$).memberships(TenantApi.membership$$.variables(TenantApi.variableEntry$$))
|
|
6
|
+
).permissions(TenantApi.identityGlobalPermissions$$);
|
|
7
|
+
const useMeQuery = (options = {}) => {
|
|
8
|
+
const executor = useTenantApi(options);
|
|
9
|
+
return useCallback(async ({}) => {
|
|
10
|
+
return (await executor(TenantApi.query$.me(identityFragment))).me;
|
|
11
|
+
}, [executor]);
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
useMeQuery
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=useMeQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMeQuery.js","sources":["../../../../src/hooks/queries/useMeQuery.ts"],"sourcesContent":["import * as TenantApi from '@contember/graphql-client-tenant'\nimport { ModelType } from 'graphql-ts-client-api'\nimport { TenantApiOptions, useTenantApi } from '../useTenantApi'\nimport { useCallback } from 'react'\n\nconst identityFragment = TenantApi\n\t.identity$$\n\t.person(TenantApi.person$$)\n\t.projects(TenantApi\n\t\t.identityProjectRelation$\n\t\t.project(TenantApi.project$$)\n\t\t.memberships(TenantApi.membership$$.variables(TenantApi.variableEntry$$)),\n\t)\n\t.permissions(TenantApi.identityGlobalPermissions$$)\n\nexport type MeQueryData = ModelType<typeof identityFragment>\n\nexport const useMeQuery = (options: TenantApiOptions = {}) => {\n\tconst executor = useTenantApi(options)\n\treturn useCallback(async ({}: {}): Promise<MeQueryData> => {\n\t\treturn (await executor(TenantApi.query$.me(identityFragment))).me\n\t}, [executor])\n}\n"],"names":[],"mappings":";;;AAKA,MAAM,mBAAmB,UACvB,WACA,OAAO,UAAU,QAAQ,EACzB;AAAA,EAAS,UACR,yBACA,QAAQ,UAAU,SAAS,EAC3B,YAAY,UAAU,aAAa,UAAU,UAAU,eAAe,CAAC;AACzE,EACC,YAAY,UAAU,2BAA2B;AAI5C,MAAM,aAAa,CAAC,UAA4B,OAAO;AACvD,QAAA,WAAW,aAAa,OAAO;AAC9B,SAAA,YAAY,OAAO,OAAiC;AAC1D,YAAQ,MAAM,SAAS,UAAU,OAAO,GAAG,gBAAgB,CAAC,GAAG;AAAA,EAAA,GAC7D,CAAC,QAAQ,CAAC;AACd;"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const TenantApi = require("@contember/graphql-client-tenant");
|
|
4
|
+
const graphqlTsClientApi = require("graphql-ts-client-api");
|
|
5
|
+
const useTenantApi = require("../useTenantApi.cjs");
|
|
6
|
+
const react = require("react");
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
8
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
9
|
+
if (e) {
|
|
10
|
+
for (const k in e) {
|
|
11
|
+
if (k !== "default") {
|
|
12
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: () => e[k]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
const TenantApi__namespace = /* @__PURE__ */ _interopNamespaceDefault(TenantApi);
|
|
24
|
+
const projectIdentityRelationFragment = TenantApi__namespace.projectIdentityRelation$.identity(
|
|
25
|
+
TenantApi__namespace.identity$$.person(TenantApi__namespace.person$$).apiKey(TenantApi__namespace.apiKey$$)
|
|
26
|
+
).memberships(TenantApi__namespace.membership$$.variables(TenantApi__namespace.variableEntry$$));
|
|
27
|
+
const useProjectMembersQuery = ({ headers, apiToken } = {}) => {
|
|
28
|
+
const executor = useTenantApi.useTenantApi({
|
|
29
|
+
headers,
|
|
30
|
+
apiToken
|
|
31
|
+
});
|
|
32
|
+
return react.useCallback(async ({ projectSlug, ...membersInput }) => {
|
|
33
|
+
const result = await executor(TenantApi__namespace.query$.projectBySlug({
|
|
34
|
+
slug: graphqlTsClientApi.ParameterRef.of("projectSlug")
|
|
35
|
+
}, TenantApi__namespace.project$.members({
|
|
36
|
+
input: graphqlTsClientApi.ParameterRef.of("membersInput")
|
|
37
|
+
}, projectIdentityRelationFragment)), {
|
|
38
|
+
variables: {
|
|
39
|
+
projectSlug,
|
|
40
|
+
membersInput
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
return result.projectBySlug?.members ?? [];
|
|
44
|
+
}, [executor]);
|
|
45
|
+
};
|
|
46
|
+
exports.useProjectMembersQuery = useProjectMembersQuery;
|
|
47
|
+
//# sourceMappingURL=useProjectMembersQuery.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProjectMembersQuery.cjs","sources":["../../../../src/hooks/queries/useProjectMembersQuery.ts"],"sourcesContent":["import * as TenantApi from '@contember/graphql-client-tenant'\nimport { ModelType, ParameterRef } from 'graphql-ts-client-api'\nimport { TenantApiOptions, useTenantApi } from '../useTenantApi'\nimport { useCallback } from 'react'\n\nconst projectIdentityRelationFragment = TenantApi\n\t.projectIdentityRelation$\n\t.identity(TenantApi.identity$$\n\t\t\t.person(TenantApi.person$$)\n\t\t\t.apiKey(TenantApi.apiKey$$)\n\t\t,\n\t)\n\t.memberships(TenantApi.membership$$.variables(TenantApi.variableEntry$$))\n\nexport type ProjectMembersQueryResult = readonly ModelType<typeof projectIdentityRelationFragment>[]\n\nexport type ProjectMembersQueryVariables =\n\t& {\n\t\tprojectSlug: string\n\t}\n\t& TenantApi.ProjectMembersInput\n\n\nexport const useProjectMembersQuery = ({ headers, apiToken }: TenantApiOptions = {}) => {\n\tconst executor = useTenantApi({\n\t\theaders,\n\t\tapiToken,\n\t})\n\treturn useCallback(async ({ projectSlug, ...membersInput }: ProjectMembersQueryVariables): Promise<ProjectMembersQueryResult> => {\n\t\tconst result = await executor(TenantApi.query$.projectBySlug({\n\t\t\tslug: ParameterRef.of('projectSlug'),\n\t\t}, TenantApi.project$.members({\n\t\t\tinput: ParameterRef.of('membersInput'),\n\t\t}, projectIdentityRelationFragment)), {\n\t\t\tvariables: {\n\t\t\t\tprojectSlug,\n\t\t\t\tmembersInput,\n\t\t\t},\n\t\t})\n\n\t\treturn result.projectBySlug?.members ?? []\n\t}, [executor])\n}\n"],"names":["TenantApi","useTenantApi","useCallback","ParameterRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM,kCAAkCA,qBACtC,yBACA;AAAA,EAASA,qBAAU,WACjB,OAAOA,qBAAU,QAAQ,EACzB,OAAOA,qBAAU,QAAQ;AAE5B,EACC,YAAYA,qBAAU,aAAa,UAAUA,qBAAU,eAAe,CAAC;AAWlE,MAAM,yBAAyB,CAAC,EAAE,SAAS,SAAS,IAAsB,CAAA,MAAO;AACvF,QAAM,WAAWC,aAAAA,aAAa;AAAA,IAC7B;AAAA,IACA;AAAA,EAAA,CACA;AACD,SAAOC,kBAAY,OAAO,EAAE,aAAa,GAAG,mBAAqF;AAChI,UAAM,SAAS,MAAM,SAASF,qBAAU,OAAO,cAAc;AAAA,MAC5D,MAAMG,mBAAAA,aAAa,GAAG,aAAa;AAAA,IAAA,GACjCH,qBAAU,SAAS,QAAQ;AAAA,MAC7B,OAAOG,mBAAAA,aAAa,GAAG,cAAc;AAAA,IAAA,GACnC,+BAA+B,CAAC,GAAG;AAAA,MACrC,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,IAAA,CACA;AAEM,WAAA,OAAO,eAAe,WAAW;EAAC,GACvC,CAAC,QAAQ,CAAC;AACd;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as TenantApi from "@contember/graphql-client-tenant";
|
|
2
|
+
import { ParameterRef } from "graphql-ts-client-api";
|
|
3
|
+
import { useTenantApi } from "../useTenantApi.js";
|
|
4
|
+
import { useCallback } from "react";
|
|
5
|
+
const projectIdentityRelationFragment = TenantApi.projectIdentityRelation$.identity(
|
|
6
|
+
TenantApi.identity$$.person(TenantApi.person$$).apiKey(TenantApi.apiKey$$)
|
|
7
|
+
).memberships(TenantApi.membership$$.variables(TenantApi.variableEntry$$));
|
|
8
|
+
const useProjectMembersQuery = ({ headers, apiToken } = {}) => {
|
|
9
|
+
const executor = useTenantApi({
|
|
10
|
+
headers,
|
|
11
|
+
apiToken
|
|
12
|
+
});
|
|
13
|
+
return useCallback(async ({ projectSlug, ...membersInput }) => {
|
|
14
|
+
const result = await executor(TenantApi.query$.projectBySlug({
|
|
15
|
+
slug: ParameterRef.of("projectSlug")
|
|
16
|
+
}, TenantApi.project$.members({
|
|
17
|
+
input: ParameterRef.of("membersInput")
|
|
18
|
+
}, projectIdentityRelationFragment)), {
|
|
19
|
+
variables: {
|
|
20
|
+
projectSlug,
|
|
21
|
+
membersInput
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
return result.projectBySlug?.members ?? [];
|
|
25
|
+
}, [executor]);
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
useProjectMembersQuery
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=useProjectMembersQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProjectMembersQuery.js","sources":["../../../../src/hooks/queries/useProjectMembersQuery.ts"],"sourcesContent":["import * as TenantApi from '@contember/graphql-client-tenant'\nimport { ModelType, ParameterRef } from 'graphql-ts-client-api'\nimport { TenantApiOptions, useTenantApi } from '../useTenantApi'\nimport { useCallback } from 'react'\n\nconst projectIdentityRelationFragment = TenantApi\n\t.projectIdentityRelation$\n\t.identity(TenantApi.identity$$\n\t\t\t.person(TenantApi.person$$)\n\t\t\t.apiKey(TenantApi.apiKey$$)\n\t\t,\n\t)\n\t.memberships(TenantApi.membership$$.variables(TenantApi.variableEntry$$))\n\nexport type ProjectMembersQueryResult = readonly ModelType<typeof projectIdentityRelationFragment>[]\n\nexport type ProjectMembersQueryVariables =\n\t& {\n\t\tprojectSlug: string\n\t}\n\t& TenantApi.ProjectMembersInput\n\n\nexport const useProjectMembersQuery = ({ headers, apiToken }: TenantApiOptions = {}) => {\n\tconst executor = useTenantApi({\n\t\theaders,\n\t\tapiToken,\n\t})\n\treturn useCallback(async ({ projectSlug, ...membersInput }: ProjectMembersQueryVariables): Promise<ProjectMembersQueryResult> => {\n\t\tconst result = await executor(TenantApi.query$.projectBySlug({\n\t\t\tslug: ParameterRef.of('projectSlug'),\n\t\t}, TenantApi.project$.members({\n\t\t\tinput: ParameterRef.of('membersInput'),\n\t\t}, projectIdentityRelationFragment)), {\n\t\t\tvariables: {\n\t\t\t\tprojectSlug,\n\t\t\t\tmembersInput,\n\t\t\t},\n\t\t})\n\n\t\treturn result.projectBySlug?.members ?? []\n\t}, [executor])\n}\n"],"names":[],"mappings":";;;;AAKA,MAAM,kCAAkC,UACtC,yBACA;AAAA,EAAS,UAAU,WACjB,OAAO,UAAU,QAAQ,EACzB,OAAO,UAAU,QAAQ;AAE5B,EACC,YAAY,UAAU,aAAa,UAAU,UAAU,eAAe,CAAC;AAWlE,MAAM,yBAAyB,CAAC,EAAE,SAAS,SAAS,IAAsB,CAAA,MAAO;AACvF,QAAM,WAAW,aAAa;AAAA,IAC7B;AAAA,IACA;AAAA,EAAA,CACA;AACD,SAAO,YAAY,OAAO,EAAE,aAAa,GAAG,mBAAqF;AAChI,UAAM,SAAS,MAAM,SAAS,UAAU,OAAO,cAAc;AAAA,MAC5D,MAAM,aAAa,GAAG,aAAa;AAAA,IAAA,GACjC,UAAU,SAAS,QAAQ;AAAA,MAC7B,OAAO,aAAa,GAAG,cAAc;AAAA,IAAA,GACnC,+BAA+B,CAAC,GAAG;AAAA,MACrC,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,IAAA,CACA;AAEM,WAAA,OAAO,eAAe,WAAW;EAAC,GACvC,CAAC,QAAQ,CAAC;AACd;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const TenantApi = require("@contember/graphql-client-tenant");
|
|
4
|
+
const useTenantApi = require("../useTenantApi.cjs");
|
|
5
|
+
const react = require("react");
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
7
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
8
|
+
if (e) {
|
|
9
|
+
for (const k in e) {
|
|
10
|
+
if (k !== "default") {
|
|
11
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: () => e[k]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
n.default = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
const TenantApi__namespace = /* @__PURE__ */ _interopNamespaceDefault(TenantApi);
|
|
23
|
+
TenantApi__namespace.membership$$.variables(TenantApi__namespace.variableEntry$$);
|
|
24
|
+
const useProjectMembershipsQuery = (options = {}) => {
|
|
25
|
+
const executor = useTenantApi.useTenantApi(options);
|
|
26
|
+
return react.useCallback(async (input) => {
|
|
27
|
+
const result = await executor(TenantApi__namespace.query$.projectMemberships(TenantApi__namespace.membership$$.variables(TenantApi__namespace.variableEntry$$)), {
|
|
28
|
+
variables: input
|
|
29
|
+
});
|
|
30
|
+
return result.projectMemberships ?? [];
|
|
31
|
+
}, [executor]);
|
|
32
|
+
};
|
|
33
|
+
exports.useProjectMembershipsQuery = useProjectMembershipsQuery;
|
|
34
|
+
//# sourceMappingURL=useProjectMembershipsQuery.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProjectMembershipsQuery.cjs","sources":["../../../../src/hooks/queries/useProjectMembershipsQuery.ts"],"sourcesContent":["import * as TenantApi from '@contember/graphql-client-tenant'\nimport { ModelType, ParameterRef } from 'graphql-ts-client-api'\nimport { TenantApiOptions, useTenantApi } from '../useTenantApi'\nimport { useCallback } from 'react'\n\nconst projectMembershipsFragment = TenantApi.membership$$.variables(TenantApi.variableEntry$$)\n\nexport type ProjectMembershipsQueryResult = readonly ModelType<typeof projectMembershipsFragment>[]\n\nexport type ProjectMembershipsQueryVariables = {\n\tprojectSlug: string\n\tidentityId: string\n}\n\n\nexport const useProjectMembershipsQuery = (options: TenantApiOptions = {}) => {\n\tconst executor = useTenantApi(options)\n\treturn useCallback(async (input: ProjectMembershipsQueryVariables): Promise<ProjectMembershipsQueryResult> => {\n\t\tconst result = await executor(TenantApi.query$.projectMemberships(TenantApi.membership$$.variables(TenantApi.variableEntry$$)), {\n\t\t\tvariables: input,\n\t\t})\n\n\t\treturn result.projectMemberships ?? []\n\t}, [executor])\n}\n"],"names":["TenantApi","useTenantApi","useCallback"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAKmCA,qBAAU,aAAa,UAAUA,qBAAU,eAAe;AAUtF,MAAM,6BAA6B,CAAC,UAA4B,OAAO;AACvE,QAAA,WAAWC,0BAAa,OAAO;AAC9B,SAAAC,MAAAA,YAAY,OAAO,UAAoF;AAC7G,UAAM,SAAS,MAAM,SAASF,qBAAU,OAAO,mBAAmBA,qBAAU,aAAa,UAAUA,qBAAU,eAAe,CAAC,GAAG;AAAA,MAC/H,WAAW;AAAA,IAAA,CACX;AAEM,WAAA,OAAO,sBAAsB;EAAC,GACnC,CAAC,QAAQ,CAAC;AACd;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as TenantApi from "@contember/graphql-client-tenant";
|
|
2
|
+
import { useTenantApi } from "../useTenantApi.js";
|
|
3
|
+
import { useCallback } from "react";
|
|
4
|
+
TenantApi.membership$$.variables(TenantApi.variableEntry$$);
|
|
5
|
+
const useProjectMembershipsQuery = (options = {}) => {
|
|
6
|
+
const executor = useTenantApi(options);
|
|
7
|
+
return useCallback(async (input) => {
|
|
8
|
+
const result = await executor(TenantApi.query$.projectMemberships(TenantApi.membership$$.variables(TenantApi.variableEntry$$)), {
|
|
9
|
+
variables: input
|
|
10
|
+
});
|
|
11
|
+
return result.projectMemberships ?? [];
|
|
12
|
+
}, [executor]);
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
useProjectMembershipsQuery
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=useProjectMembershipsQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProjectMembershipsQuery.js","sources":["../../../../src/hooks/queries/useProjectMembershipsQuery.ts"],"sourcesContent":["import * as TenantApi from '@contember/graphql-client-tenant'\nimport { ModelType, ParameterRef } from 'graphql-ts-client-api'\nimport { TenantApiOptions, useTenantApi } from '../useTenantApi'\nimport { useCallback } from 'react'\n\nconst projectMembershipsFragment = TenantApi.membership$$.variables(TenantApi.variableEntry$$)\n\nexport type ProjectMembershipsQueryResult = readonly ModelType<typeof projectMembershipsFragment>[]\n\nexport type ProjectMembershipsQueryVariables = {\n\tprojectSlug: string\n\tidentityId: string\n}\n\n\nexport const useProjectMembershipsQuery = (options: TenantApiOptions = {}) => {\n\tconst executor = useTenantApi(options)\n\treturn useCallback(async (input: ProjectMembershipsQueryVariables): Promise<ProjectMembershipsQueryResult> => {\n\t\tconst result = await executor(TenantApi.query$.projectMemberships(TenantApi.membership$$.variables(TenantApi.variableEntry$$)), {\n\t\t\tvariables: input,\n\t\t})\n\n\t\treturn result.projectMemberships ?? []\n\t}, [executor])\n}\n"],"names":[],"mappings":";;;AAKmC,UAAU,aAAa,UAAU,UAAU,eAAe;AAUtF,MAAM,6BAA6B,CAAC,UAA4B,OAAO;AACvE,QAAA,WAAW,aAAa,OAAO;AAC9B,SAAA,YAAY,OAAO,UAAoF;AAC7G,UAAM,SAAS,MAAM,SAAS,UAAU,OAAO,mBAAmB,UAAU,aAAa,UAAU,UAAU,eAAe,CAAC,GAAG;AAAA,MAC/H,WAAW;AAAA,IAAA,CACX;AAEM,WAAA,OAAO,sBAAsB;EAAC,GACnC,CAAC,QAAQ,CAAC;AACd;"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const TenantApi = require("@contember/graphql-client-tenant");
|
|
4
|
+
const useTenantApi = require("../useTenantApi.cjs");
|
|
5
|
+
const react = require("react");
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
7
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
8
|
+
if (e) {
|
|
9
|
+
for (const k in e) {
|
|
10
|
+
if (k !== "default") {
|
|
11
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: () => e[k]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
n.default = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
const TenantApi__namespace = /* @__PURE__ */ _interopNamespaceDefault(TenantApi);
|
|
23
|
+
const projectRolesDefinitionFragment = TenantApi__namespace.roleDefinition$$.variables(
|
|
24
|
+
TenantApi__namespace.roleVariableDefinition$$.on(TenantApi__namespace.roleConditionVariableDefinition$$).on(TenantApi__namespace.roleEntityVariableDefinition$$).on(TenantApi__namespace.rolePredefinedVariableDefinition$$)
|
|
25
|
+
);
|
|
26
|
+
const projectRolesDefinitionQuery = TenantApi__namespace.query$.projectBySlug(
|
|
27
|
+
TenantApi__namespace.project$.roles(projectRolesDefinitionFragment)
|
|
28
|
+
);
|
|
29
|
+
const useProjectRolesDefinitionQuery = ({ headers, apiToken } = {}) => {
|
|
30
|
+
const executor = useTenantApi.useTenantApi();
|
|
31
|
+
return react.useCallback(async (variables) => {
|
|
32
|
+
return (await executor(projectRolesDefinitionQuery, { headers, apiToken, variables })).projectBySlug?.roles ?? [];
|
|
33
|
+
}, [apiToken, executor, headers]);
|
|
34
|
+
};
|
|
35
|
+
exports.useProjectRolesDefinitionQuery = useProjectRolesDefinitionQuery;
|
|
36
|
+
//# sourceMappingURL=useProjectRolesDefinitionQuery.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProjectRolesDefinitionQuery.cjs","sources":["../../../../src/hooks/queries/useProjectRolesDefinitionQuery.ts"],"sourcesContent":["import * as TenantApi from '@contember/graphql-client-tenant'\nimport { ModelType } from 'graphql-ts-client-api'\nimport { TenantApiOptions, useTenantApi } from '../useTenantApi'\nimport { useCallback } from 'react'\n\nconst projectRolesDefinitionFragment = TenantApi.roleDefinition$$\n\t.variables(\n\t\tTenantApi.roleVariableDefinition$$\n\t\t\t.on(TenantApi.roleConditionVariableDefinition$$)\n\t\t\t.on(TenantApi.roleEntityVariableDefinition$$)\n\t\t\t.on(TenantApi.rolePredefinedVariableDefinition$$)\n\t\t,\n\t)\n\nexport type ProjectRoleDefinition = ModelType<typeof projectRolesDefinitionFragment>\nexport type ProjectRolesDefinitionQueryResult = readonly ProjectRoleDefinition[]\n\nconst projectRolesDefinitionQuery = TenantApi.query$\n\t.projectBySlug(\n\t\tTenantApi\n\t\t\t.project$\n\t\t\t.roles(projectRolesDefinitionFragment),\n\t)\n\nexport interface ProjectRolesDefinitionQueryVariables {\n\tslug: string\n}\n\nexport const useProjectRolesDefinitionQuery = ({ headers, apiToken }: TenantApiOptions = {}) => {\n\tconst executor = useTenantApi()\n\treturn useCallback(async (variables: ProjectRolesDefinitionQueryVariables): Promise<ProjectRolesDefinitionQueryResult> => {\n\t\treturn (await executor(projectRolesDefinitionQuery, { headers, apiToken, variables })).projectBySlug?.roles ?? []\n\t}, [apiToken, executor, headers])\n}\n"],"names":["TenantApi","useTenantApi","useCallback"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM,iCAAiCA,qBAAU,iBAC/C;AAAA,EACAA,qBAAU,yBACR,GAAGA,qBAAU,iCAAiC,EAC9C,GAAGA,qBAAU,8BAA8B,EAC3C,GAAGA,qBAAU,kCAAkC;AAElD;AAKD,MAAM,8BAA8BA,qBAAU,OAC5C;AAAA,EACAA,qBACE,SACA,MAAM,8BAA8B;AACvC;AAMM,MAAM,iCAAiC,CAAC,EAAE,SAAS,SAAS,IAAsB,CAAA,MAAO;AAC/F,QAAM,WAAWC,aAAAA;AACV,SAAAC,MAAAA,YAAY,OAAO,cAAgG;AACjH,YAAA,MAAM,SAAS,6BAA6B,EAAE,SAAS,UAAU,WAAW,GAAG,eAAe,SAAS,CAAA;AAAA,EAC7G,GAAA,CAAC,UAAU,UAAU,OAAO,CAAC;AACjC;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as TenantApi from "@contember/graphql-client-tenant";
|
|
2
|
+
import { useTenantApi } from "../useTenantApi.js";
|
|
3
|
+
import { useCallback } from "react";
|
|
4
|
+
const projectRolesDefinitionFragment = TenantApi.roleDefinition$$.variables(
|
|
5
|
+
TenantApi.roleVariableDefinition$$.on(TenantApi.roleConditionVariableDefinition$$).on(TenantApi.roleEntityVariableDefinition$$).on(TenantApi.rolePredefinedVariableDefinition$$)
|
|
6
|
+
);
|
|
7
|
+
const projectRolesDefinitionQuery = TenantApi.query$.projectBySlug(
|
|
8
|
+
TenantApi.project$.roles(projectRolesDefinitionFragment)
|
|
9
|
+
);
|
|
10
|
+
const useProjectRolesDefinitionQuery = ({ headers, apiToken } = {}) => {
|
|
11
|
+
const executor = useTenantApi();
|
|
12
|
+
return useCallback(async (variables) => {
|
|
13
|
+
return (await executor(projectRolesDefinitionQuery, { headers, apiToken, variables })).projectBySlug?.roles ?? [];
|
|
14
|
+
}, [apiToken, executor, headers]);
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
useProjectRolesDefinitionQuery
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=useProjectRolesDefinitionQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProjectRolesDefinitionQuery.js","sources":["../../../../src/hooks/queries/useProjectRolesDefinitionQuery.ts"],"sourcesContent":["import * as TenantApi from '@contember/graphql-client-tenant'\nimport { ModelType } from 'graphql-ts-client-api'\nimport { TenantApiOptions, useTenantApi } from '../useTenantApi'\nimport { useCallback } from 'react'\n\nconst projectRolesDefinitionFragment = TenantApi.roleDefinition$$\n\t.variables(\n\t\tTenantApi.roleVariableDefinition$$\n\t\t\t.on(TenantApi.roleConditionVariableDefinition$$)\n\t\t\t.on(TenantApi.roleEntityVariableDefinition$$)\n\t\t\t.on(TenantApi.rolePredefinedVariableDefinition$$)\n\t\t,\n\t)\n\nexport type ProjectRoleDefinition = ModelType<typeof projectRolesDefinitionFragment>\nexport type ProjectRolesDefinitionQueryResult = readonly ProjectRoleDefinition[]\n\nconst projectRolesDefinitionQuery = TenantApi.query$\n\t.projectBySlug(\n\t\tTenantApi\n\t\t\t.project$\n\t\t\t.roles(projectRolesDefinitionFragment),\n\t)\n\nexport interface ProjectRolesDefinitionQueryVariables {\n\tslug: string\n}\n\nexport const useProjectRolesDefinitionQuery = ({ headers, apiToken }: TenantApiOptions = {}) => {\n\tconst executor = useTenantApi()\n\treturn useCallback(async (variables: ProjectRolesDefinitionQueryVariables): Promise<ProjectRolesDefinitionQueryResult> => {\n\t\treturn (await executor(projectRolesDefinitionQuery, { headers, apiToken, variables })).projectBySlug?.roles ?? []\n\t}, [apiToken, executor, headers])\n}\n"],"names":[],"mappings":";;;AAKA,MAAM,iCAAiC,UAAU,iBAC/C;AAAA,EACA,UAAU,yBACR,GAAG,UAAU,iCAAiC,EAC9C,GAAG,UAAU,8BAA8B,EAC3C,GAAG,UAAU,kCAAkC;AAElD;AAKD,MAAM,8BAA8B,UAAU,OAC5C;AAAA,EACA,UACE,SACA,MAAM,8BAA8B;AACvC;AAMM,MAAM,iCAAiC,CAAC,EAAE,SAAS,SAAS,IAAsB,CAAA,MAAO;AAC/F,QAAM,WAAW;AACV,SAAA,YAAY,OAAO,cAAgG;AACjH,YAAA,MAAM,SAAS,6BAA6B,EAAE,SAAS,UAAU,WAAW,GAAG,eAAe,SAAS,CAAA;AAAA,EAC7G,GAAA,CAAC,UAAU,UAAU,OAAO,CAAC;AACjC;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const react = require("react");
|
|
4
|
+
const reactClient = require("@contember/react-client");
|
|
5
|
+
const useLogoutInternal = require("../internal/hooks/useLogoutInternal.cjs");
|
|
6
|
+
const useMeQuery = require("./queries/useMeQuery.cjs");
|
|
7
|
+
const useFetchIdentity = () => {
|
|
8
|
+
const sessionToken = reactClient.useSessionToken();
|
|
9
|
+
const fetchMe = useMeQuery.useMeQuery();
|
|
10
|
+
const [identityState, setIdentityState] = react.useState({ state: sessionToken ? "loading" : "none", identity: void 0 });
|
|
11
|
+
const clearIdentity = react.useCallback(() => setIdentityState({ state: "cleared", identity: void 0 }), []);
|
|
12
|
+
const logout = useLogoutInternal.useLogoutInternal(clearIdentity);
|
|
13
|
+
const fetch = react.useCallback(async () => {
|
|
14
|
+
setIdentityState({ state: "loading", identity: void 0 });
|
|
15
|
+
try {
|
|
16
|
+
const response = await fetchMe({});
|
|
17
|
+
const person = response.person;
|
|
18
|
+
const projects = response.projects;
|
|
19
|
+
const permissions = response.permissions ?? { canCreateProject: false };
|
|
20
|
+
setIdentityState({
|
|
21
|
+
state: "success",
|
|
22
|
+
identity: {
|
|
23
|
+
id: response.id,
|
|
24
|
+
person: person ?? void 0,
|
|
25
|
+
projects: projects.map((it) => ({
|
|
26
|
+
name: it.project.name,
|
|
27
|
+
slug: it.project.slug,
|
|
28
|
+
roles: it.memberships.map((it2) => it2.role)
|
|
29
|
+
})),
|
|
30
|
+
permissions
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
} catch (e) {
|
|
34
|
+
console.error(e);
|
|
35
|
+
if (typeof e === "object" && e !== null && "status" in e && e.status === 401) {
|
|
36
|
+
logout({ noRedirect: true });
|
|
37
|
+
setIdentityState({ state: "cleared", identity: void 0 });
|
|
38
|
+
} else {
|
|
39
|
+
setIdentityState({ state: "failed", identity: void 0 });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}, [fetchMe, logout]);
|
|
43
|
+
return [
|
|
44
|
+
identityState,
|
|
45
|
+
react.useMemo(() => ({
|
|
46
|
+
clearIdentity,
|
|
47
|
+
refreshIdentity: fetch
|
|
48
|
+
}), [clearIdentity, fetch])
|
|
49
|
+
];
|
|
50
|
+
};
|
|
51
|
+
exports.useFetchIdentity = useFetchIdentity;
|
|
52
|
+
//# sourceMappingURL=useFetchIdentity.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFetchIdentity.cjs","sources":["../../../src/hooks/useFetchIdentity.ts"],"sourcesContent":["import { useCallback, useMemo, useState } from 'react'\nimport { Identity, IdentityMethods, IdentityStateValue } from '../types'\nimport { useSessionToken } from '@contember/react-client'\nimport { useLogoutInternal } from '../internal/hooks/useLogoutInternal'\nimport { useMeQuery } from './queries'\n\nexport const useFetchIdentity = (): [{ state: IdentityStateValue, identity: Identity | undefined }, IdentityMethods] => {\n\tconst sessionToken = useSessionToken()\n\tconst fetchMe = useMeQuery()\n\n\tconst [identityState, setIdentityState] = useState<ReturnType<typeof useFetchIdentity>[0]>({ state: sessionToken ? 'loading' : 'none', identity: undefined })\n\n\tconst clearIdentity = useCallback(() => setIdentityState({ state: 'cleared', identity: undefined }), [])\n\tconst logout = useLogoutInternal(clearIdentity)\n\n\tconst fetch = useCallback(async () => {\n\t\tsetIdentityState({ state: 'loading', identity: undefined })\n\t\ttry {\n\t\t\tconst response = await fetchMe({})\n\t\t\tconst person = response.person\n\t\t\tconst projects = response.projects\n\t\t\tconst permissions = response.permissions ?? { canCreateProject: false }\n\n\t\t\tsetIdentityState({\n\t\t\t\tstate: 'success',\n\t\t\t\tidentity: {\n\t\t\t\t\tid: response.id,\n\t\t\t\t\tperson: person ?? undefined,\n\t\t\t\t\tprojects: projects.map(it => ({\n\t\t\t\t\t\tname: it.project.name,\n\t\t\t\t\t\tslug: it.project.slug,\n\t\t\t\t\t\troles: it.memberships.map(it => it.role),\n\t\t\t\t\t})),\n\t\t\t\t\tpermissions,\n\t\t\t\t},\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\tif (typeof e === 'object' && e !== null && 'status' in e && (e as { status?: unknown }).status === 401) {\n\t\t\t\tlogout({ noRedirect: true })\n\t\t\t\tsetIdentityState({ state: 'cleared', identity: undefined })\n\t\t\t} else {\n\t\t\t\tsetIdentityState({ state: 'failed', identity: undefined })\n\t\t\t}\n\t\t}\n\t}, [fetchMe, logout])\n\n\treturn [\n\t\tidentityState,\n\t\tuseMemo((): IdentityMethods => ({\n\t\t\tclearIdentity,\n\t\t\trefreshIdentity: fetch,\n\t\t}), [clearIdentity, fetch]),\n\t]\n}\n"],"names":["useSessionToken","useMeQuery","useState","useCallback","useLogoutInternal","it","useMemo"],"mappings":";;;;;;AAMO,MAAM,mBAAmB,MAAwF;AACvH,QAAM,eAAeA,YAAAA;AACrB,QAAM,UAAUC,WAAAA;AAEhB,QAAM,CAAC,eAAe,gBAAgB,IAAIC,MAAAA,SAAiD,EAAE,OAAO,eAAe,YAAY,QAAQ,UAAU,OAAW,CAAA;AAE5J,QAAM,gBAAgBC,MAAAA,YAAY,MAAM,iBAAiB,EAAE,OAAO,WAAW,UAAU,QAAW,GAAG,CAAE,CAAA;AACjG,QAAA,SAASC,oCAAkB,aAAa;AAExC,QAAA,QAAQD,MAAAA,YAAY,YAAY;AACrC,qBAAiB,EAAE,OAAO,WAAW,UAAU,QAAW;AACtD,QAAA;AACH,YAAM,WAAW,MAAM,QAAQ,CAAA,CAAE;AACjC,YAAM,SAAS,SAAS;AACxB,YAAM,WAAW,SAAS;AAC1B,YAAM,cAAc,SAAS,eAAe,EAAE,kBAAkB,MAAM;AAErD,uBAAA;AAAA,QAChB,OAAO;AAAA,QACP,UAAU;AAAA,UACT,IAAI,SAAS;AAAA,UACb,QAAQ,UAAU;AAAA,UAClB,UAAU,SAAS,IAAI,CAAO,QAAA;AAAA,YAC7B,MAAM,GAAG,QAAQ;AAAA,YACjB,MAAM,GAAG,QAAQ;AAAA,YACjB,OAAO,GAAG,YAAY,IAAI,CAAAE,QAAMA,IAAG,IAAI;AAAA,UAAA,EACtC;AAAA,UACF;AAAA,QACD;AAAA,MAAA,CACA;AAAA,aACO,GAAG;AACX,cAAQ,MAAM,CAAC;AACX,UAAA,OAAO,MAAM,YAAY,MAAM,QAAQ,YAAY,KAAM,EAA2B,WAAW,KAAK;AAChG,eAAA,EAAE,YAAY,KAAA,CAAM;AAC3B,yBAAiB,EAAE,OAAO,WAAW,UAAU,QAAW;AAAA,MAAA,OACpD;AACN,yBAAiB,EAAE,OAAO,UAAU,UAAU,QAAW;AAAA,MAC1D;AAAA,IACD;AAAA,EAAA,GACE,CAAC,SAAS,MAAM,CAAC;AAEb,SAAA;AAAA,IACN;AAAA,IACAC,MAAAA,QAAQ,OAAwB;AAAA,MAC/B;AAAA,MACA,iBAAiB;AAAA,IAAA,IACd,CAAC,eAAe,KAAK,CAAC;AAAA,EAAA;AAE5B;;"}
|