@cedros/login-react 0.0.12 → 0.0.13
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/README.md +68 -0
- package/dist/AdminDepositList-Cx0xRwES.js +305 -0
- package/dist/AdminDepositList-Cx0xRwES.js.map +1 -0
- package/dist/AdminDepositList-UEcyRZkA.cjs +1 -0
- package/dist/AdminDepositList-UEcyRZkA.cjs.map +1 -0
- package/dist/AdminUserDetail-BzEIdNJh.cjs +1 -0
- package/dist/AdminUserDetail-BzEIdNJh.cjs.map +1 -0
- package/dist/AdminUserDetail-DHFDzY8B.js +1195 -0
- package/dist/AdminUserDetail-DHFDzY8B.js.map +1 -0
- package/dist/AdminWithdrawalHistory-0yxtMh6q.cjs +1 -0
- package/dist/AdminWithdrawalHistory-0yxtMh6q.cjs.map +1 -0
- package/dist/AdminWithdrawalHistory-BGjfrIe3.js +904 -0
- package/dist/AdminWithdrawalHistory-BGjfrIe3.js.map +1 -0
- package/dist/AuthenticationSettings-5Vi7Ib_A.cjs +1 -0
- package/dist/AuthenticationSettings-5Vi7Ib_A.cjs.map +1 -0
- package/dist/AuthenticationSettings-BPAh1my6.cjs +1 -0
- package/dist/AuthenticationSettings-BPAh1my6.cjs.map +1 -0
- package/dist/AuthenticationSettings-CJg8CJY9.js +9 -0
- package/dist/AuthenticationSettings-CJg8CJY9.js.map +1 -0
- package/dist/AuthenticationSettings-CR_i6TTS.js +495 -0
- package/dist/AuthenticationSettings-CR_i6TTS.js.map +1 -0
- package/dist/AutosaveStatus-CYkC2aI_.cjs +1 -0
- package/dist/AutosaveStatus-CYkC2aI_.cjs.map +1 -0
- package/dist/AutosaveStatus-N4uNS6-2.js +1497 -0
- package/dist/AutosaveStatus-N4uNS6-2.js.map +1 -0
- package/dist/CreditSystemSettings-BnAOK_tT.cjs +1 -0
- package/dist/CreditSystemSettings-BnAOK_tT.cjs.map +1 -0
- package/dist/CreditSystemSettings-CIf_SfJq.js +210 -0
- package/dist/CreditSystemSettings-CIf_SfJq.js.map +1 -0
- package/dist/CreditSystemSettings-CePYGgev.js +9 -0
- package/dist/CreditSystemSettings-CePYGgev.js.map +1 -0
- package/dist/CreditSystemSettings-Ck5WIMp3.cjs +1 -0
- package/dist/CreditSystemSettings-Ck5WIMp3.cjs.map +1 -0
- package/dist/{DepositsSection-0Hqr0yDm.js → DepositsSection-DA89uR9A.js} +5 -5
- package/dist/{DepositsSection-0Hqr0yDm.js.map → DepositsSection-DA89uR9A.js.map} +1 -1
- package/dist/DepositsSection-i6XdhLNs.cjs +1 -0
- package/dist/{DepositsSection-CGKCzM-H.cjs.map → DepositsSection-i6XdhLNs.cjs.map} +1 -1
- package/dist/EmailRegisterForm-BrDL3BZy.js +927 -0
- package/dist/EmailRegisterForm-BrDL3BZy.js.map +1 -0
- package/dist/EmailRegisterForm-CxktR-4J.cjs +1 -0
- package/dist/EmailRegisterForm-CxktR-4J.cjs.map +1 -0
- package/dist/EmailSettings-B8xwgd6_.cjs +1 -0
- package/dist/EmailSettings-B8xwgd6_.cjs.map +1 -0
- package/dist/{AuthenticationSettings-BSoIQ58T.js → EmailSettings-Bna7Z53E.js} +3 -3
- package/dist/EmailSettings-Bna7Z53E.js.map +1 -0
- package/dist/EmailSettings-DZywTTRq.cjs +1 -0
- package/dist/EmailSettings-DZywTTRq.cjs.map +1 -0
- package/dist/EmailSettings-DbMDfVaM.js +17 -0
- package/dist/EmailSettings-DbMDfVaM.js.map +1 -0
- package/dist/{EmbeddedWalletSettings-iVf_3pn3.js → EmbeddedWalletSettings-ANbhj3Lt.js} +3 -3
- package/dist/EmbeddedWalletSettings-ANbhj3Lt.js.map +1 -0
- package/dist/EmbeddedWalletSettings-BEztqO19.js +79 -0
- package/dist/EmbeddedWalletSettings-BEztqO19.js.map +1 -0
- package/dist/EmbeddedWalletSettings-D6M7pwgk.cjs +1 -0
- package/dist/EmbeddedWalletSettings-D6M7pwgk.cjs.map +1 -0
- package/dist/EmbeddedWalletSettings-DivEPn39.cjs +1 -0
- package/dist/EmbeddedWalletSettings-DivEPn39.cjs.map +1 -0
- package/dist/ErrorMessage-CHbYbVi2.cjs +1 -0
- package/dist/ErrorMessage-CHbYbVi2.cjs.map +1 -0
- package/dist/ErrorMessage-CcEK0pYO.js +64 -0
- package/dist/ErrorMessage-CcEK0pYO.js.map +1 -0
- package/dist/{GoogleLoginButton-BzHr545L.js → GoogleLoginButton-B3uRMJ_n.js} +4 -3
- package/dist/{GoogleLoginButton-BzHr545L.js.map → GoogleLoginButton-B3uRMJ_n.js.map} +1 -1
- package/dist/GoogleLoginButton-BydKswn4.cjs +1 -0
- package/dist/{GoogleLoginButton-DoAdOqb3.cjs.map → GoogleLoginButton-BydKswn4.cjs.map} +1 -1
- package/dist/LoadingSpinner-6vml-zwr.js +79 -0
- package/dist/LoadingSpinner-6vml-zwr.js.map +1 -0
- package/dist/LoadingSpinner-d6sSxgQN.cjs +1 -0
- package/dist/LoadingSpinner-d6sSxgQN.cjs.map +1 -0
- package/dist/PermissionsSection-BGaj_sI7.js +1026 -0
- package/dist/PermissionsSection-BGaj_sI7.js.map +1 -0
- package/dist/PermissionsSection-CKXXDfqi.cjs +1 -0
- package/dist/PermissionsSection-CKXXDfqi.cjs.map +1 -0
- package/dist/ServerSettings-B2RKhJtZ.js +84 -0
- package/dist/ServerSettings-B2RKhJtZ.js.map +1 -0
- package/dist/ServerSettings-BZXlm1BX.cjs +1 -0
- package/dist/ServerSettings-BZXlm1BX.cjs.map +1 -0
- package/dist/{ServerSettings-C_osdbiX.js → ServerSettings-Bqm4-bt2.js} +3 -3
- package/dist/ServerSettings-Bqm4-bt2.js.map +1 -0
- package/dist/ServerSettings-DZUKo6By.cjs +1 -0
- package/dist/ServerSettings-DZUKo6By.cjs.map +1 -0
- package/dist/SettingsPageLayout-COSYLMu7.cjs +1 -0
- package/dist/SettingsPageLayout-COSYLMu7.cjs.map +1 -0
- package/dist/SettingsPageLayout-DpgNEkuu.js +50 -0
- package/dist/SettingsPageLayout-DpgNEkuu.js.map +1 -0
- package/dist/{SolanaLoginButton-C-CfZxAZ.js → SolanaLoginButton-C_u9OppS.js} +5 -4
- package/dist/{SolanaLoginButton-C-CfZxAZ.js.map → SolanaLoginButton-C_u9OppS.js.map} +1 -1
- package/dist/SolanaLoginButton-fAW7kRUu.cjs +1 -0
- package/dist/{SolanaLoginButton-CPzms0kf.cjs.map → SolanaLoginButton-fAW7kRUu.cjs.map} +1 -1
- package/dist/StatsBar-BX-hHtTq.js +66 -0
- package/dist/StatsBar-BX-hHtTq.js.map +1 -0
- package/dist/StatsBar-DTUZCwDD.cjs +1 -0
- package/dist/StatsBar-DTUZCwDD.cjs.map +1 -0
- package/dist/{TeamSection-Bjt72upx.js → TeamSection-CvrCoa9D.js} +27 -26
- package/dist/TeamSection-CvrCoa9D.js.map +1 -0
- package/dist/TeamSection-DlUD5kp5.cjs +1 -0
- package/dist/TeamSection-DlUD5kp5.cjs.map +1 -0
- package/dist/UsersSection-C2U8Tb7V.cjs +1 -0
- package/dist/{UsersSection-DU86czWP.cjs.map → UsersSection-C2U8Tb7V.cjs.map} +1 -1
- package/dist/{UsersSection-hAcyfSZk.js → UsersSection-Dbh9PTSA.js} +17 -15
- package/dist/{UsersSection-hAcyfSZk.js.map → UsersSection-Dbh9PTSA.js.map} +1 -1
- package/dist/WebhookSettings-BT5q6AZ8.js +17 -0
- package/dist/WebhookSettings-BT5q6AZ8.js.map +1 -0
- package/dist/WebhookSettings-BWl_wsvg.cjs +1 -0
- package/dist/WebhookSettings-BWl_wsvg.cjs.map +1 -0
- package/dist/WebhookSettings-DXNH5bal.cjs +1 -0
- package/dist/WebhookSettings-DXNH5bal.cjs.map +1 -0
- package/dist/{WebhookSettings-IyhyTFes.js → WebhookSettings-bUg2u_p0.js} +4 -4
- package/dist/WebhookSettings-bUg2u_p0.js.map +1 -0
- package/dist/WithdrawalsSection-BL_LOUq8.cjs +1 -0
- package/dist/{WithdrawalsSection-iZJBuZ7O.cjs.map → WithdrawalsSection-BL_LOUq8.cjs.map} +1 -1
- package/dist/WithdrawalsSection-CN-lLnqX.js +20 -0
- package/dist/{WithdrawalsSection-B1415d-G.js.map → WithdrawalsSection-CN-lLnqX.js.map} +1 -1
- package/dist/admin-only.cjs +1 -0
- package/dist/admin-only.cjs.map +1 -0
- package/dist/{admin/types.d.ts → admin-only.d.ts} +228 -167
- package/dist/admin-only.js +8 -0
- package/dist/admin-only.js.map +1 -0
- package/dist/apiClient-B2JxVPlH.js +216 -0
- package/dist/apiClient-B2JxVPlH.js.map +1 -0
- package/dist/apiClient-CTTKhsYb.cjs +1 -0
- package/dist/apiClient-CTTKhsYb.cjs.map +1 -0
- package/dist/assets/argon2Worker-Bi5TuQvD.js.map +1 -1
- package/dist/email-only.cjs +1 -1
- package/dist/email-only.d.ts +634 -16
- package/dist/email-only.js +16 -13
- package/dist/email-only.js.map +1 -1
- package/dist/google-only.cjs +1 -1
- package/dist/google-only.d.ts +543 -13
- package/dist/google-only.js +11 -8
- package/dist/google-only.js.map +1 -1
- package/dist/index.cjs +2061 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5007 -144
- package/dist/index.js +13507 -116
- package/dist/index.js.map +1 -1
- package/dist/login-react.css +1 -1
- package/dist/plugin-5qRh-YhX.js +596 -0
- package/dist/plugin-5qRh-YhX.js.map +1 -0
- package/dist/plugin-BtYBW6JY.cjs +1 -0
- package/dist/plugin-BtYBW6JY.cjs.map +1 -0
- package/dist/sanitization-Bo_tn-L2.cjs +1 -0
- package/dist/sanitization-Bo_tn-L2.cjs.map +1 -0
- package/dist/sanitization-CQ-H1MSg.js +39 -0
- package/dist/sanitization-CQ-H1MSg.js.map +1 -0
- package/dist/shamir-AeLLfw0p.cjs +1 -0
- package/dist/shamir-AeLLfw0p.cjs.map +1 -0
- package/dist/{solanaKeypair-BlXol3nh.js → shamir-B0wConeK.js} +765 -757
- package/dist/shamir-B0wConeK.js.map +1 -0
- package/dist/silentWalletEnroll-B8pgdKZO.cjs +1 -0
- package/dist/silentWalletEnroll-B8pgdKZO.cjs.map +1 -0
- package/dist/silentWalletEnroll-DR2kPw7W.js +41 -0
- package/dist/silentWalletEnroll-DR2kPw7W.js.map +1 -0
- package/dist/solana-only.cjs +1 -1
- package/dist/solana-only.d.ts +594 -13
- package/dist/solana-only.js +12 -9
- package/dist/solana-only.js.map +1 -1
- package/dist/style.d.ts +1 -0
- package/dist/useAdminDeposits-BDY5KJ0-.js +151 -0
- package/dist/useAdminDeposits-BDY5KJ0-.js.map +1 -0
- package/dist/useAdminDeposits-Dvx3_UUE.cjs +1 -0
- package/dist/useAdminDeposits-Dvx3_UUE.cjs.map +1 -0
- package/dist/{ErrorMessage-DU2VBb85.js → useAuth-Bge6KaWN.js} +954 -1226
- package/dist/useAuth-Bge6KaWN.js.map +1 -0
- package/dist/useAuth-DhIDTLRd.cjs +1 -0
- package/dist/useAuth-DhIDTLRd.cjs.map +1 -0
- package/dist/useOrgs-Be3KH4ib.js +215 -0
- package/dist/useOrgs-Be3KH4ib.js.map +1 -0
- package/dist/useOrgs-CVbacmaQ.cjs +1 -0
- package/dist/useOrgs-CVbacmaQ.cjs.map +1 -0
- package/dist/useSystemSettings-D9Cr7ZTl.cjs +1 -0
- package/dist/useSystemSettings-D9Cr7ZTl.cjs.map +1 -0
- package/dist/useSystemSettings-DN5YqfNq.js +97 -0
- package/dist/useSystemSettings-DN5YqfNq.js.map +1 -0
- package/dist/{validation-BebL7hMF.js → validation-B8kMV3BL.js} +1 -1
- package/dist/{validation-BebL7hMF.js.map → validation-B8kMV3BL.js.map} +1 -1
- package/dist/{validation-BeXIfuHB.cjs → validation-BuGQrA-K.cjs} +1 -1
- package/dist/{validation-BeXIfuHB.cjs.map → validation-BuGQrA-K.cjs.map} +1 -1
- package/package.json +11 -1
- package/dist/AuthenticationSettings-BSoIQ58T.js.map +0 -1
- package/dist/AuthenticationSettings-CNmWEPFV.cjs +0 -1
- package/dist/AuthenticationSettings-CNmWEPFV.cjs.map +0 -1
- package/dist/CreditSystemSettings-BYxoFwaP.js +0 -9
- package/dist/CreditSystemSettings-BYxoFwaP.js.map +0 -1
- package/dist/CreditSystemSettings-D2fLorNx.cjs +0 -1
- package/dist/CreditSystemSettings-D2fLorNx.cjs.map +0 -1
- package/dist/DepositsSection-CGKCzM-H.cjs +0 -1
- package/dist/EmailRegisterForm-C0PStlj5.js +0 -961
- package/dist/EmailRegisterForm-C0PStlj5.js.map +0 -1
- package/dist/EmailRegisterForm-DaPLGws2.cjs +0 -1
- package/dist/EmailRegisterForm-DaPLGws2.cjs.map +0 -1
- package/dist/EmailSettings-CiLDwzNb.cjs +0 -1
- package/dist/EmailSettings-CiLDwzNb.cjs.map +0 -1
- package/dist/EmailSettings-DTjpO65J.js +0 -9
- package/dist/EmailSettings-DTjpO65J.js.map +0 -1
- package/dist/EmbeddedWalletSettings-CX7sYiPy.cjs +0 -1
- package/dist/EmbeddedWalletSettings-CX7sYiPy.cjs.map +0 -1
- package/dist/EmbeddedWalletSettings-iVf_3pn3.js.map +0 -1
- package/dist/ErrorMessage-BXHiYibN.cjs +0 -1
- package/dist/ErrorMessage-BXHiYibN.cjs.map +0 -1
- package/dist/ErrorMessage-DU2VBb85.js.map +0 -1
- package/dist/GoogleLoginButton-DoAdOqb3.cjs +0 -1
- package/dist/ServerSettings-C_osdbiX.js.map +0 -1
- package/dist/ServerSettings-HqSb_VDj.cjs +0 -1
- package/dist/ServerSettings-HqSb_VDj.cjs.map +0 -1
- package/dist/SolanaLoginButton-CPzms0kf.cjs +0 -1
- package/dist/TeamSection-Bjt72upx.js.map +0 -1
- package/dist/TeamSection-DZeWHkLd.cjs +0 -1
- package/dist/TeamSection-DZeWHkLd.cjs.map +0 -1
- package/dist/UsersSection-DU86czWP.cjs +0 -1
- package/dist/WebhookSettings-Br9bakAL.cjs +0 -1
- package/dist/WebhookSettings-Br9bakAL.cjs.map +0 -1
- package/dist/WebhookSettings-IyhyTFes.js.map +0 -1
- package/dist/WithdrawalsSection-B1415d-G.js +0 -20
- package/dist/WithdrawalsSection-iZJBuZ7O.cjs +0 -1
- package/dist/admin/AdminShell.d.ts +0 -38
- package/dist/admin/icons.d.ts +0 -2
- package/dist/admin/index.d.ts +0 -10
- package/dist/admin/plugin.d.ts +0 -3
- package/dist/admin/sections/AuthenticationSettings.d.ts +0 -3
- package/dist/admin/sections/CreditSystemSettings.d.ts +0 -3
- package/dist/admin/sections/DepositsSection.d.ts +0 -3
- package/dist/admin/sections/EmailSettings.d.ts +0 -3
- package/dist/admin/sections/EmbeddedWalletSettings.d.ts +0 -3
- package/dist/admin/sections/FeatureSettings.d.ts +0 -3
- package/dist/admin/sections/InvitesSection.d.ts +0 -3
- package/dist/admin/sections/MembersSection.d.ts +0 -3
- package/dist/admin/sections/ServerSettings.d.ts +0 -3
- package/dist/admin/sections/SettingsSections.d.ts +0 -7
- package/dist/admin/sections/TeamSection.d.ts +0 -3
- package/dist/admin/sections/UsersSection.d.ts +0 -3
- package/dist/admin/sections/WebhookSettings.d.ts +0 -3
- package/dist/admin/sections/WithdrawalsSection.d.ts +0 -3
- package/dist/components/LoginButton.d.ts +0 -23
- package/dist/components/LoginForm.d.ts +0 -9
- package/dist/components/LoginModal.d.ts +0 -9
- package/dist/components/admin/AdminUserDetail.d.ts +0 -23
- package/dist/components/admin/AdminUserList.d.ts +0 -21
- package/dist/components/admin/CedrosAdminDashboard.d.ts +0 -52
- package/dist/components/admin/PermissionsSection.d.ts +0 -7
- package/dist/components/admin/ProfileDropdown.d.ts +0 -34
- package/dist/components/admin/SetupWizard.d.ts +0 -30
- package/dist/components/admin/StatsBar.d.ts +0 -17
- package/dist/components/admin/SystemSettings.d.ts +0 -19
- package/dist/components/admin/settings/AuthenticationSettings.d.ts +0 -4
- package/dist/components/admin/settings/AutosaveStatus.d.ts +0 -6
- package/dist/components/admin/settings/CreditSystemSettings.d.ts +0 -6
- package/dist/components/admin/settings/EmailSettings.d.ts +0 -4
- package/dist/components/admin/settings/EmbeddedWalletSettings.d.ts +0 -4
- package/dist/components/admin/settings/FeatureSettings.d.ts +0 -4
- package/dist/components/admin/settings/MessagingSettings.d.ts +0 -4
- package/dist/components/admin/settings/SecuritySettings.d.ts +0 -4
- package/dist/components/admin/settings/ServerSettings.d.ts +0 -4
- package/dist/components/admin/settings/SettingsPageLayout.d.ts +0 -16
- package/dist/components/admin/settings/SsoProvidersSettings.d.ts +0 -4
- package/dist/components/admin/settings/WebhookSettings.d.ts +0 -4
- package/dist/components/admin/settings/index.d.ts +0 -31
- package/dist/components/admin/settings/settingsInputs.d.ts +0 -79
- package/dist/components/admin/settings/settingsMetadata.d.ts +0 -18
- package/dist/components/apple/AppleLoginButton.d.ts +0 -29
- package/dist/components/deposit/CreditBalance.d.ts +0 -19
- package/dist/components/deposit/DepositFlow.d.ts +0 -118
- package/dist/components/deposit/FeeConfigDisplay.d.ts +0 -15
- package/dist/components/deposit/History.d.ts +0 -21
- package/dist/components/deposit/TieredAmountSlider.d.ts +0 -19
- package/dist/components/deposit/TokenSelector.d.ts +0 -23
- package/dist/components/deposit/admin/AdminDepositList.d.ts +0 -21
- package/dist/components/deposit/admin/AdminDepositStats.d.ts +0 -15
- package/dist/components/deposit/admin/AdminPrivacyPeriodDeposits.d.ts +0 -19
- package/dist/components/deposit/admin/AdminWithdrawalHistory.d.ts +0 -19
- package/dist/components/deposit/admin/AdminWithdrawalQueue.d.ts +0 -23
- package/dist/components/deposit/admin/AdminWithdrawalStats.d.ts +0 -10
- package/dist/components/deposit/admin/FeatureDisabledMessage.d.ts +0 -15
- package/dist/components/deposit/admin/PrivacySystemStatus.d.ts +0 -15
- package/dist/components/deposit/admin/featureDisabled.d.ts +0 -14
- package/dist/components/deposit/admin/index.d.ts +0 -22
- package/dist/components/deposit/index.d.ts +0 -12
- package/dist/components/deposit/tierUtils.d.ts +0 -8
- package/dist/components/deposit/tokens.d.ts +0 -19
- package/dist/components/email/EmailLoginForm.d.ts +0 -11
- package/dist/components/email/EmailRegisterForm.d.ts +0 -14
- package/dist/components/email/ForgotPasswordForm.d.ts +0 -17
- package/dist/components/email/PasswordInput.d.ts +0 -14
- package/dist/components/email/ResetPasswordForm.d.ts +0 -22
- package/dist/components/google/GoogleLoginButton.d.ts +0 -12
- package/dist/components/invites/InviteForm.d.ts +0 -38
- package/dist/components/invites/InviteList.d.ts +0 -40
- package/dist/components/members/MemberList.d.ts +0 -47
- package/dist/components/org/CreateOrgForm.d.ts +0 -7
- package/dist/components/org/OrgAvatar.d.ts +0 -7
- package/dist/components/org/OrgListView.d.ts +0 -9
- package/dist/components/org/OrgSelector.d.ts +0 -52
- package/dist/components/org/OrgSwitcher.d.ts +0 -47
- package/dist/components/org/icons.d.ts +0 -8
- package/dist/components/profile/UserProfileSettings.d.ts +0 -35
- package/dist/components/profile/index.d.ts +0 -2
- package/dist/components/sessions/SessionList.d.ts +0 -33
- package/dist/components/shared/ErrorBoundary.d.ts +0 -38
- package/dist/components/shared/ErrorMessage.d.ts +0 -14
- package/dist/components/shared/LoadingSpinner.d.ts +0 -16
- package/dist/components/solana/SolanaLoginButton.d.ts +0 -49
- package/dist/components/templates/FullPageLayout.d.ts +0 -40
- package/dist/components/templates/SplitPageLayout.d.ts +0 -44
- package/dist/components/templates/index.d.ts +0 -4
- package/dist/components/totp/OtpInput.d.ts +0 -32
- package/dist/components/totp/QrCode.d.ts +0 -21
- package/dist/components/totp/TotpSettings.d.ts +0 -38
- package/dist/components/totp/TotpSetup.d.ts +0 -23
- package/dist/components/totp/TotpVerify.d.ts +0 -25
- package/dist/components/totp/index.d.ts +0 -10
- package/dist/components/wallet/CapabilityWarning.d.ts +0 -11
- package/dist/components/wallet/PasskeyPrompt.d.ts +0 -34
- package/dist/components/wallet/RecoveryPhraseDisplay.d.ts +0 -18
- package/dist/components/wallet/RecoveryPhraseInput.d.ts +0 -21
- package/dist/components/wallet/WalletAddressRow.d.ts +0 -10
- package/dist/components/wallet/WalletEnrollment.d.ts +0 -15
- package/dist/components/wallet/WalletManager.d.ts +0 -9
- package/dist/components/wallet/WalletRecovery.d.ts +0 -19
- package/dist/components/wallet/WalletStatus.d.ts +0 -28
- package/dist/components/wallet/WalletUnlock.d.ts +0 -23
- package/dist/components/wallet/index.d.ts +0 -23
- package/dist/components/webauthn/PasskeyLoginButton.d.ts +0 -8
- package/dist/context/CedrosLoginContext.d.ts +0 -24
- package/dist/context/CedrosLoginProvider.d.ts +0 -17
- package/dist/context/EmbeddedWalletExposure.d.ts +0 -19
- package/dist/context/useCedrosLogin.d.ts +0 -12
- package/dist/crypto/aesGcm.d.ts +0 -89
- package/dist/crypto/argon2.d.ts +0 -65
- package/dist/crypto/argon2Worker.d.ts +0 -1
- package/dist/crypto/argon2WorkerClient.d.ts +0 -28
- package/dist/crypto/bip39.d.ts +0 -106
- package/dist/crypto/capabilities.d.ts +0 -35
- package/dist/crypto/entropy.d.ts +0 -56
- package/dist/crypto/hkdf.d.ts +0 -38
- package/dist/crypto/index.d.ts +0 -30
- package/dist/crypto/secureWipe.d.ts +0 -71
- package/dist/crypto/shamir.d.ts +0 -52
- package/dist/crypto/solanaKeypair.d.ts +0 -63
- package/dist/crypto/types.d.ts +0 -134
- package/dist/crypto/webauthnPrf.d.ts +0 -108
- package/dist/hooks/useAdminDeposits.d.ts +0 -10
- package/dist/hooks/useAdminUsers.d.ts +0 -28
- package/dist/hooks/useAppleAuth.d.ts +0 -52
- package/dist/hooks/useAuth.d.ts +0 -34
- package/dist/hooks/useAuthSession.d.ts +0 -19
- package/dist/hooks/useAuthorize.d.ts +0 -62
- package/dist/hooks/useCredits.d.ts +0 -11
- package/dist/hooks/useDashboardPermissions.d.ts +0 -45
- package/dist/hooks/useDeposit.d.ts +0 -16
- package/dist/hooks/useEmailAuth.d.ts +0 -60
- package/dist/hooks/useGoogleAuth.d.ts +0 -67
- package/dist/hooks/useInstantLink.d.ts +0 -42
- package/dist/hooks/useInvites.d.ts +0 -57
- package/dist/hooks/useMembers.d.ts +0 -52
- package/dist/hooks/useOrgs.d.ts +0 -49
- package/dist/hooks/usePasswordReset.d.ts +0 -32
- package/dist/hooks/usePendingRecovery.d.ts +0 -34
- package/dist/hooks/useProfile.d.ts +0 -35
- package/dist/hooks/useRateLimiter.d.ts +0 -58
- package/dist/hooks/useServerFeatures.d.ts +0 -55
- package/dist/hooks/useSessions.d.ts +0 -45
- package/dist/hooks/useSettingsAutosave.d.ts +0 -29
- package/dist/hooks/useSetup.d.ts +0 -25
- package/dist/hooks/useSolanaAuth.d.ts +0 -30
- package/dist/hooks/useSsoProviders.d.ts +0 -52
- package/dist/hooks/useSystemSettings.d.ts +0 -47
- package/dist/hooks/useThemeManager.d.ts +0 -11
- package/dist/hooks/useTotp.d.ts +0 -52
- package/dist/hooks/useTotpVerify.d.ts +0 -38
- package/dist/hooks/useTransactionSigning.d.ts +0 -45
- package/dist/hooks/useWallet.d.ts +0 -10
- package/dist/hooks/useWalletDiscovery.d.ts +0 -24
- package/dist/hooks/useWalletEnrollment.d.ts +0 -9
- package/dist/hooks/useWalletMaterial.d.ts +0 -10
- package/dist/hooks/useWalletRecovery.d.ts +0 -9
- package/dist/hooks/useWalletSigning.d.ts +0 -31
- package/dist/hooks/useWebAuthn.d.ts +0 -25
- package/dist/i18n/I18nProvider.d.ts +0 -16
- package/dist/i18n/context.d.ts +0 -6
- package/dist/i18n/index.d.ts +0 -5
- package/dist/i18n/translations.d.ts +0 -66
- package/dist/i18n/useI18n.d.ts +0 -9
- package/dist/index-ZS9AwAal.cjs +0 -2061
- package/dist/index-ZS9AwAal.cjs.map +0 -1
- package/dist/index-dgg5tlO7.js +0 -19650
- package/dist/index-dgg5tlO7.js.map +0 -1
- package/dist/silentWalletEnroll-C3JRAD9_.js +0 -42
- package/dist/silentWalletEnroll-C3JRAD9_.js.map +0 -1
- package/dist/silentWalletEnroll-DRYQAQfg.cjs +0 -1
- package/dist/silentWalletEnroll-DRYQAQfg.cjs.map +0 -1
- package/dist/solanaKeypair-BlXol3nh.js.map +0 -1
- package/dist/solanaKeypair-C-lIR1JY.cjs +0 -1
- package/dist/solanaKeypair-C-lIR1JY.cjs.map +0 -1
- package/dist/types/adminUser.d.ts +0 -168
- package/dist/types/auth.d.ts +0 -122
- package/dist/types/config.d.ts +0 -266
- package/dist/types/deposit.d.ts +0 -490
- package/dist/types/index.d.ts +0 -13
- package/dist/types/invite.d.ts +0 -71
- package/dist/types/member.d.ts +0 -45
- package/dist/types/org.d.ts +0 -133
- package/dist/types/profile.d.ts +0 -56
- package/dist/types/session.d.ts +0 -28
- package/dist/types/setup.d.ts +0 -47
- package/dist/types/systemSettings.d.ts +0 -85
- package/dist/types/totp.d.ts +0 -52
- package/dist/types/wallet.d.ts +0 -309
- package/dist/utils/adminUserApi.d.ts +0 -60
- package/dist/utils/apiClient.d.ts +0 -78
- package/dist/utils/cryptoShim.d.ts +0 -17
- package/dist/utils/csrf.d.ts +0 -1
- package/dist/utils/deviceDetection.d.ts +0 -17
- package/dist/utils/embeddedWallet.d.ts +0 -75
- package/dist/utils/inviteApi.d.ts +0 -31
- package/dist/utils/memberApi.d.ts +0 -23
- package/dist/utils/orgApi.d.ts +0 -36
- package/dist/utils/profileApi.d.ts +0 -26
- package/dist/utils/sanitization.d.ts +0 -66
- package/dist/utils/sessionApi.d.ts +0 -16
- package/dist/utils/setupApi.d.ts +0 -21
- package/dist/utils/silentWalletEnroll.d.ts +0 -41
- package/dist/utils/systemSettingsApi.d.ts +0 -18
- package/dist/utils/tabSync.d.ts +0 -46
- package/dist/utils/tokenManager.d.ts +0 -107
- package/dist/utils/unlockCredential.d.ts +0 -5
- package/dist/utils/validation.d.ts +0 -48
- package/dist/utils/walletDetection.d.ts +0 -23
- package/dist/utils/webauthnJson.d.ts +0 -21
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { PrfSalt } from './types';
|
|
2
|
-
/** Result of registering a new passkey with PRF */
|
|
3
|
-
export interface PasskeyRegistrationResult {
|
|
4
|
-
/** Base64-encoded credential ID */
|
|
5
|
-
credentialId: string;
|
|
6
|
-
/** Base64-encoded PRF salt */
|
|
7
|
-
prfSalt: string;
|
|
8
|
-
/** PRF output (32 bytes) for key derivation */
|
|
9
|
-
prfOutput: Uint8Array;
|
|
10
|
-
}
|
|
11
|
-
/** Result of authenticating with an existing passkey */
|
|
12
|
-
export interface PasskeyAuthResult {
|
|
13
|
-
/** PRF output (32 bytes) for key derivation */
|
|
14
|
-
prfOutput: Uint8Array;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Check if WebAuthn is available in this browser
|
|
18
|
-
*/
|
|
19
|
-
export declare function isWebAuthnAvailable(): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Check if the PRF extension is supported
|
|
22
|
-
*
|
|
23
|
-
* Note: This only checks for API support, not actual authenticator support.
|
|
24
|
-
* The actual PRF availability depends on the user's authenticator.
|
|
25
|
-
*/
|
|
26
|
-
export declare function isPrfSupported(): Promise<boolean>;
|
|
27
|
-
/** Options for passkey operations */
|
|
28
|
-
export interface PasskeyOptions {
|
|
29
|
-
/** SEC-004: Allowed domains for RP ID validation */
|
|
30
|
-
allowedDomains?: string[];
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Register a new passkey with PRF extension for wallet encryption
|
|
34
|
-
*
|
|
35
|
-
* @param userId - User ID bytes (from authenticated user)
|
|
36
|
-
* @param userName - Display name for the passkey
|
|
37
|
-
* @param displayName - User's display name
|
|
38
|
-
* @param prfSalt - Optional PRF salt (generated if not provided)
|
|
39
|
-
* @param options - Optional configuration including allowed domains
|
|
40
|
-
* @returns Registration result with credential ID and PRF output
|
|
41
|
-
* @throws Error if registration fails or PRF is not supported
|
|
42
|
-
*/
|
|
43
|
-
export declare function registerPasskeyWithPrf(userId: Uint8Array, userName: string, displayName: string, prfSalt?: PrfSalt, options?: PasskeyOptions): Promise<PasskeyRegistrationResult>;
|
|
44
|
-
/**
|
|
45
|
-
* Authenticate with an existing passkey and get PRF output
|
|
46
|
-
*
|
|
47
|
-
* @param credentialId - Base64-encoded credential ID
|
|
48
|
-
* @param prfSalt - Base64-encoded PRF salt
|
|
49
|
-
* @param options - Optional configuration including allowed domains
|
|
50
|
-
* @returns Authentication result with PRF output
|
|
51
|
-
* @throws Error if authentication fails
|
|
52
|
-
*/
|
|
53
|
-
export declare function authenticateWithPrf(credentialId: string, prfSalt: string, options?: PasskeyOptions): Promise<PasskeyAuthResult>;
|
|
54
|
-
/**
|
|
55
|
-
* Get encryption key from passkey via PRF extension
|
|
56
|
-
*
|
|
57
|
-
* This combines authentication and key derivation in a single operation.
|
|
58
|
-
*
|
|
59
|
-
* ## SEC-03: Key Lifecycle Management
|
|
60
|
-
*
|
|
61
|
-
* **IMPORTANT**: The returned encryption key is sensitive cryptographic material.
|
|
62
|
-
* Callers are responsible for:
|
|
63
|
-
*
|
|
64
|
-
* 1. Using the key only for its intended purpose (Share B decryption)
|
|
65
|
-
* 2. Wiping the key from memory after use by calling `key.fill(0)`
|
|
66
|
-
* 3. Not storing the key in persistent storage (localStorage, IndexedDB, etc.)
|
|
67
|
-
* 4. Not logging or transmitting the key
|
|
68
|
-
*
|
|
69
|
-
* The PRF output used to derive this key is automatically wiped in the finally
|
|
70
|
-
* block, but the derived key must be managed by the caller.
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* ```typescript
|
|
74
|
-
* const key = await getEncryptionKeyFromPasskey(credentialId, prfSalt);
|
|
75
|
-
* try {
|
|
76
|
-
* const plaintext = await decryptShareB(ciphertext, key);
|
|
77
|
-
* // ... use plaintext
|
|
78
|
-
* } finally {
|
|
79
|
-
* key.fill(0); // Wipe key after use
|
|
80
|
-
* }
|
|
81
|
-
* ```
|
|
82
|
-
*
|
|
83
|
-
* @param credentialId - Base64-encoded credential ID
|
|
84
|
-
* @param prfSalt - Base64-encoded PRF salt
|
|
85
|
-
* @param options - Optional configuration including allowed domains
|
|
86
|
-
* @returns 32-byte encryption key derived from PRF output. **Caller must wipe after use.**
|
|
87
|
-
*/
|
|
88
|
-
export declare function getEncryptionKeyFromPasskey(credentialId: string, prfSalt: string, options?: PasskeyOptions): Promise<Uint8Array>;
|
|
89
|
-
/**
|
|
90
|
-
* Check if a credential ID is valid for this user
|
|
91
|
-
*
|
|
92
|
-
* @param credentialId - Base64-encoded credential ID to check
|
|
93
|
-
* @param options - Optional configuration including allowed domains
|
|
94
|
-
* @returns true if credential exists and can be used
|
|
95
|
-
*/
|
|
96
|
-
export declare function isCredentialAvailable(credentialId: string, options?: PasskeyOptions): Promise<boolean>;
|
|
97
|
-
/**
|
|
98
|
-
* Authenticate with any discoverable passkey and get PRF output
|
|
99
|
-
*
|
|
100
|
-
* This allows authentication without specifying a credential ID, letting
|
|
101
|
-
* the browser present all available passkeys for this domain.
|
|
102
|
-
*
|
|
103
|
-
* @param prfSalt - Base64-encoded PRF salt
|
|
104
|
-
* @param options - Optional configuration including allowed domains
|
|
105
|
-
* @returns Authentication result with PRF output
|
|
106
|
-
* @throws Error if authentication fails
|
|
107
|
-
*/
|
|
108
|
-
export declare function authenticateWithDiscoverablePrf(prfSalt: string, options?: PasskeyOptions): Promise<PasskeyAuthResult>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { UseAdminDepositsReturn } from '../types/deposit';
|
|
2
|
-
export type { UseAdminDepositsReturn } from '../types/deposit';
|
|
3
|
-
/**
|
|
4
|
-
* Hook for admin Privacy Cash deposit operations
|
|
5
|
-
*
|
|
6
|
-
* Requires system admin privileges. All methods will fail with 403 if not admin.
|
|
7
|
-
*
|
|
8
|
-
* Safe to call outside CedrosLoginProvider - returns no-op functions that throw.
|
|
9
|
-
*/
|
|
10
|
-
export declare function useAdminDeposits(): UseAdminDepositsReturn;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { UseAdminUsersReturn } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Hook for admin user management operations
|
|
4
|
-
*
|
|
5
|
-
* Provides methods to list all users, get individual users,
|
|
6
|
-
* and manage system admin status. Requires system admin privileges.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* function UserManagement() {
|
|
11
|
-
* const { users, total, isLoading, listUsers, setSystemAdmin } = useAdminUsers();
|
|
12
|
-
*
|
|
13
|
-
* useEffect(() => {
|
|
14
|
-
* listUsers({ limit: 20 });
|
|
15
|
-
* }, [listUsers]);
|
|
16
|
-
*
|
|
17
|
-
* return (
|
|
18
|
-
* <AdminUserList
|
|
19
|
-
* users={users}
|
|
20
|
-
* total={total}
|
|
21
|
-
* isLoading={isLoading}
|
|
22
|
-
* onToggleAdmin={(userId, isAdmin) => setSystemAdmin(userId, isAdmin)}
|
|
23
|
-
* />
|
|
24
|
-
* );
|
|
25
|
-
* }
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
export declare function useAdminUsers(): UseAdminUsersReturn;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { AuthResponse, AuthError } from '../types';
|
|
2
|
-
export interface UseAppleAuthReturn {
|
|
3
|
-
signIn: () => Promise<AuthResponse>;
|
|
4
|
-
isLoading: boolean;
|
|
5
|
-
isInitialized: boolean;
|
|
6
|
-
error: AuthError | null;
|
|
7
|
-
clearError: () => void;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Hook for Apple Sign In authentication.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```tsx
|
|
14
|
-
* function AppleButton() {
|
|
15
|
-
* const { signIn, isLoading, isInitialized, error } = useAppleAuth();
|
|
16
|
-
*
|
|
17
|
-
* return (
|
|
18
|
-
* <button onClick={signIn} disabled={!isInitialized || isLoading}>
|
|
19
|
-
* {isLoading ? 'Signing in...' : 'Sign in with Apple'}
|
|
20
|
-
* </button>
|
|
21
|
-
* );
|
|
22
|
-
* }
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
export declare function useAppleAuth(): UseAppleAuthReturn;
|
|
26
|
-
declare global {
|
|
27
|
-
interface Window {
|
|
28
|
-
AppleID?: {
|
|
29
|
-
auth?: {
|
|
30
|
-
init: (config: {
|
|
31
|
-
clientId: string;
|
|
32
|
-
scope: string;
|
|
33
|
-
redirectURI: string;
|
|
34
|
-
usePopup?: boolean;
|
|
35
|
-
}) => void;
|
|
36
|
-
signIn: () => Promise<{
|
|
37
|
-
authorization?: {
|
|
38
|
-
id_token?: string;
|
|
39
|
-
code?: string;
|
|
40
|
-
};
|
|
41
|
-
user?: {
|
|
42
|
-
email?: string;
|
|
43
|
-
name?: {
|
|
44
|
-
firstName?: string;
|
|
45
|
-
lastName?: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
}>;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
}
|
package/dist/hooks/useAuth.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { AuthUser, AuthState, AuthError } from '../types';
|
|
2
|
-
export interface UseAuthReturn {
|
|
3
|
-
user: AuthUser | null;
|
|
4
|
-
authState: AuthState;
|
|
5
|
-
error: AuthError | null;
|
|
6
|
-
isAuthenticated: boolean;
|
|
7
|
-
isLoading: boolean;
|
|
8
|
-
logout: () => Promise<void>;
|
|
9
|
-
refreshUser: () => Promise<void>;
|
|
10
|
-
openLoginModal: () => void;
|
|
11
|
-
closeLoginModal: () => void;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Main authentication hook providing user state and actions.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```tsx
|
|
18
|
-
* function MyComponent() {
|
|
19
|
-
* const { user, isAuthenticated, logout, openLoginModal } = useAuth();
|
|
20
|
-
*
|
|
21
|
-
* if (!isAuthenticated) {
|
|
22
|
-
* return <button onClick={openLoginModal}>Login</button>;
|
|
23
|
-
* }
|
|
24
|
-
*
|
|
25
|
-
* return (
|
|
26
|
-
* <div>
|
|
27
|
-
* <p>Welcome, {user?.name}</p>
|
|
28
|
-
* <button onClick={logout}>Logout</button>
|
|
29
|
-
* </div>
|
|
30
|
-
* );
|
|
31
|
-
* }
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export declare function useAuth(): UseAuthReturn;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { AuthUser, AuthState, TokenPair, SessionConfig, AuthCallbacks } from '../types';
|
|
2
|
-
export interface UseAuthSessionOptions {
|
|
3
|
-
serverUrl: string;
|
|
4
|
-
session?: SessionConfig;
|
|
5
|
-
callbacks?: AuthCallbacks;
|
|
6
|
-
requestTimeoutMs?: number;
|
|
7
|
-
}
|
|
8
|
-
export interface UseAuthSessionReturn {
|
|
9
|
-
user: AuthUser | null;
|
|
10
|
-
authState: AuthState;
|
|
11
|
-
handleLoginSuccess: (user: AuthUser, tokens?: TokenPair) => void;
|
|
12
|
-
logout: () => Promise<void>;
|
|
13
|
-
refreshUser: () => Promise<void>;
|
|
14
|
-
getAccessToken: () => string | null;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Hook that manages authentication session state, token refresh, and tab sync.
|
|
18
|
-
*/
|
|
19
|
-
export declare function useAuthSession({ serverUrl, session, callbacks, requestTimeoutMs, }: UseAuthSessionOptions): UseAuthSessionReturn;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { AuthorizeRequest, AuthError } from '../types';
|
|
2
|
-
export interface AuthorizationCheck {
|
|
3
|
-
allowed: boolean;
|
|
4
|
-
reason?: string;
|
|
5
|
-
isLoading: boolean;
|
|
6
|
-
error: AuthError | null;
|
|
7
|
-
}
|
|
8
|
-
export interface UseAuthorizeReturn {
|
|
9
|
-
/**
|
|
10
|
-
* Check if an action is authorized server-side.
|
|
11
|
-
* Use this for dynamic authorization checks.
|
|
12
|
-
*/
|
|
13
|
-
authorize: (request: AuthorizeRequest) => Promise<boolean>;
|
|
14
|
-
/**
|
|
15
|
-
* Authorization state for the last check
|
|
16
|
-
*/
|
|
17
|
-
lastCheck: AuthorizationCheck;
|
|
18
|
-
/**
|
|
19
|
-
* Clear the last authorization check
|
|
20
|
-
*/
|
|
21
|
-
clearCheck: () => void;
|
|
22
|
-
/**
|
|
23
|
-
* Check authorization and return detailed result
|
|
24
|
-
*/
|
|
25
|
-
checkAuthorization: (request: AuthorizeRequest) => Promise<AuthorizationCheck>;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Hook for server-side authorization checks.
|
|
29
|
-
*
|
|
30
|
-
* This hook allows you to check if a specific action is authorized
|
|
31
|
-
* by making a request to the server's /authorize endpoint.
|
|
32
|
-
*
|
|
33
|
-
* For simple permission checks based on the user's role, use `useOrgs().hasPermission()` instead.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```tsx
|
|
37
|
-
* function DeleteButton({ resourceId }: { resourceId: string }) {
|
|
38
|
-
* const { authorize, lastCheck } = useAuthorize();
|
|
39
|
-
* const { activeOrg } = useOrgs();
|
|
40
|
-
*
|
|
41
|
-
* const handleDelete = async () => {
|
|
42
|
-
* const allowed = await authorize({
|
|
43
|
-
* orgId: activeOrg?.id!,
|
|
44
|
-
* action: 'delete',
|
|
45
|
-
* resource: 'document',
|
|
46
|
-
* resourceId,
|
|
47
|
-
* });
|
|
48
|
-
*
|
|
49
|
-
* if (allowed) {
|
|
50
|
-
* // Proceed with delete
|
|
51
|
-
* }
|
|
52
|
-
* };
|
|
53
|
-
*
|
|
54
|
-
* return (
|
|
55
|
-
* <button onClick={handleDelete} disabled={lastCheck.isLoading}>
|
|
56
|
-
* Delete
|
|
57
|
-
* </button>
|
|
58
|
-
* );
|
|
59
|
-
* }
|
|
60
|
-
* ```
|
|
61
|
-
*/
|
|
62
|
-
export declare function useAuthorize(): UseAuthorizeReturn;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { UseCreditsReturn } from '../types/deposit';
|
|
2
|
-
export type { UseCreditsReturn } from '../types/deposit';
|
|
3
|
-
/**
|
|
4
|
-
* Hook for credit balance and transaction history
|
|
5
|
-
*
|
|
6
|
-
* Credits represent the user's balance from Privacy Cash deposits.
|
|
7
|
-
* The balance can be used for services within the application.
|
|
8
|
-
*
|
|
9
|
-
* Safe to call outside CedrosLoginProvider - returns no-op functions that throw.
|
|
10
|
-
*/
|
|
11
|
-
export declare function useCredits(): UseCreditsReturn;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { DashboardSection, DashboardPermissions, AuthError } from '../types';
|
|
2
|
-
export interface UseDashboardPermissionsReturn {
|
|
3
|
-
/** Current dashboard permissions config */
|
|
4
|
-
permissions: DashboardPermissions;
|
|
5
|
-
/** Whether the current user can access a specific section */
|
|
6
|
-
canAccess: (section: DashboardSection) => boolean;
|
|
7
|
-
/** Update permissions (owner only) */
|
|
8
|
-
updatePermissions: (permissions: DashboardPermissions) => Promise<void>;
|
|
9
|
-
/** Loading state */
|
|
10
|
-
isLoading: boolean;
|
|
11
|
-
/** Updating state */
|
|
12
|
-
isUpdating: boolean;
|
|
13
|
-
/** Error state */
|
|
14
|
-
error: AuthError | null;
|
|
15
|
-
/** Refresh permissions from server */
|
|
16
|
-
fetchPermissions: () => Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Hook for managing dashboard permissions per role.
|
|
20
|
-
*
|
|
21
|
-
* Allows org owners to configure which dashboard sections each role can access.
|
|
22
|
-
* - Owner always has full access (not configurable)
|
|
23
|
-
* - Admin and Member roles are configurable
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```tsx
|
|
27
|
-
* function AdminDashboard() {
|
|
28
|
-
* const { canAccess, permissions, updatePermissions } = useDashboardPermissions();
|
|
29
|
-
*
|
|
30
|
-
* // Check if current user can access a section
|
|
31
|
-
* if (!canAccess('deposits')) {
|
|
32
|
-
* return <div>You don't have access to deposits</div>;
|
|
33
|
-
* }
|
|
34
|
-
*
|
|
35
|
-
* // Update permissions (owner only)
|
|
36
|
-
* const toggleMemberDeposits = () => {
|
|
37
|
-
* updatePermissions({
|
|
38
|
-
* ...permissions,
|
|
39
|
-
* member: { ...permissions.member, deposits: !permissions.member.deposits },
|
|
40
|
-
* });
|
|
41
|
-
* };
|
|
42
|
-
* }
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
export declare function useDashboardPermissions(): UseDashboardPermissionsReturn;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { UseDepositReturn } from '../types/deposit';
|
|
2
|
-
export type { UseDepositReturn } from '../types/deposit';
|
|
3
|
-
/**
|
|
4
|
-
* Hook for Privacy Cash deposit operations
|
|
5
|
-
*
|
|
6
|
-
* Deposits go to the user's Privacy Cash account (user's pubkey is owner).
|
|
7
|
-
* Credits are issued immediately, withdrawal to company wallet happens later.
|
|
8
|
-
*
|
|
9
|
-
* Requirements:
|
|
10
|
-
* - User must have SSS wallet enrolled
|
|
11
|
-
* - Wallet must be unlocked (call POST /wallet/unlock first)
|
|
12
|
-
* - Wallet must be in "no recovery" mode
|
|
13
|
-
*
|
|
14
|
-
* Safe to call outside CedrosLoginProvider - returns no-op functions that throw.
|
|
15
|
-
*/
|
|
16
|
-
export declare function useDeposit(): UseDepositReturn;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { AuthResponse, AuthError } from '../types';
|
|
2
|
-
/** Result when MFA verification is required */
|
|
3
|
-
export interface MfaRequiredResult {
|
|
4
|
-
mfaRequired: true;
|
|
5
|
-
mfaToken: string;
|
|
6
|
-
email: string;
|
|
7
|
-
userId: string;
|
|
8
|
-
}
|
|
9
|
-
/** Result of successful login (no TOTP required or after TOTP verification) */
|
|
10
|
-
export interface LoginSuccessResult {
|
|
11
|
-
mfaRequired: false;
|
|
12
|
-
response: AuthResponse;
|
|
13
|
-
}
|
|
14
|
-
/** Union type for login result */
|
|
15
|
-
export type LoginResult = MfaRequiredResult | LoginSuccessResult;
|
|
16
|
-
export interface UseEmailAuthReturn {
|
|
17
|
-
/** Login - may return mfaRequired if 2FA is enabled */
|
|
18
|
-
login: (email: string, password: string) => Promise<LoginResult>;
|
|
19
|
-
register: (email: string, password: string, name?: string) => Promise<AuthResponse>;
|
|
20
|
-
isLoading: boolean;
|
|
21
|
-
error: AuthError | null;
|
|
22
|
-
clearError: () => void;
|
|
23
|
-
/**
|
|
24
|
-
* Number of remaining login attempts before rate limiting.
|
|
25
|
-
*
|
|
26
|
-
* M-10: Snapshot Behavior
|
|
27
|
-
* This value is a point-in-time snapshot computed at render time.
|
|
28
|
-
* It may be briefly stale during rapid requests or concurrent renders.
|
|
29
|
-
* For UI display only - actual rate limiting is enforced inside login/register.
|
|
30
|
-
*/
|
|
31
|
-
remainingAttempts: number;
|
|
32
|
-
/**
|
|
33
|
-
* Time in ms until rate limit resets (0 if not rate limited).
|
|
34
|
-
*
|
|
35
|
-
* M-10: Snapshot Behavior
|
|
36
|
-
* This value is a point-in-time snapshot computed at render time.
|
|
37
|
-
* It may be briefly stale - use for UI display, not for logic decisions.
|
|
38
|
-
*/
|
|
39
|
-
timeUntilReset: number;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Hook for email/password authentication.
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```tsx
|
|
46
|
-
* function LoginForm() {
|
|
47
|
-
* const { login, isLoading, error } = useEmailAuth();
|
|
48
|
-
*
|
|
49
|
-
* const handleSubmit = async (e) => {
|
|
50
|
-
* e.preventDefault();
|
|
51
|
-
* try {
|
|
52
|
-
* await login(email, password);
|
|
53
|
-
* } catch (err) {
|
|
54
|
-
* // Handle error
|
|
55
|
-
* }
|
|
56
|
-
* };
|
|
57
|
-
* }
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
export declare function useEmailAuth(): UseEmailAuthReturn;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { AuthResponse, AuthError } from '../types';
|
|
2
|
-
/** @internal */
|
|
3
|
-
export declare const _internalGoogleScriptLoader: {
|
|
4
|
-
loading: boolean;
|
|
5
|
-
loaded: boolean;
|
|
6
|
-
error: Error | null;
|
|
7
|
-
callbacks: Array<{
|
|
8
|
-
resolve: () => void;
|
|
9
|
-
reject: (err: Error) => void;
|
|
10
|
-
}>;
|
|
11
|
-
load(): Promise<void>;
|
|
12
|
-
/**
|
|
13
|
-
* Reset singleton state for test isolation (F-08)
|
|
14
|
-
* @internal - Only use in test setup/teardown
|
|
15
|
-
*/
|
|
16
|
-
_reset(): void;
|
|
17
|
-
};
|
|
18
|
-
export interface UseGoogleAuthReturn {
|
|
19
|
-
signIn: () => Promise<AuthResponse>;
|
|
20
|
-
isLoading: boolean;
|
|
21
|
-
isInitialized: boolean;
|
|
22
|
-
error: AuthError | null;
|
|
23
|
-
clearError: () => void;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Hook for Google OAuth authentication.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```tsx
|
|
30
|
-
* function GoogleButton() {
|
|
31
|
-
* const { signIn, isLoading, isInitialized, error } = useGoogleAuth();
|
|
32
|
-
*
|
|
33
|
-
* return (
|
|
34
|
-
* <button onClick={signIn} disabled={!isInitialized || isLoading}>
|
|
35
|
-
* {isLoading ? 'Signing in...' : 'Sign in with Google'}
|
|
36
|
-
* </button>
|
|
37
|
-
* );
|
|
38
|
-
* }
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
export declare function useGoogleAuth(): UseGoogleAuthReturn;
|
|
42
|
-
declare global {
|
|
43
|
-
interface Window {
|
|
44
|
-
google?: {
|
|
45
|
-
accounts?: {
|
|
46
|
-
id?: {
|
|
47
|
-
initialize: (config: {
|
|
48
|
-
client_id: string;
|
|
49
|
-
callback: (response: {
|
|
50
|
-
credential: string;
|
|
51
|
-
}) => void;
|
|
52
|
-
auto_select?: boolean;
|
|
53
|
-
cancel_on_tap_outside?: boolean;
|
|
54
|
-
}) => void;
|
|
55
|
-
prompt: (callback: (notification: {
|
|
56
|
-
isNotDisplayed: () => boolean;
|
|
57
|
-
isSkippedMoment: () => boolean;
|
|
58
|
-
isDismissedMoment: () => boolean;
|
|
59
|
-
getMomentType: () => string;
|
|
60
|
-
}) => void) => void;
|
|
61
|
-
renderButton: (element: HTMLElement, config: object) => void;
|
|
62
|
-
disableAutoSelect: () => void;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { AuthError, AuthResponse, MfaRequiredResponse } from '../types';
|
|
2
|
-
export interface UseInstantLinkReturn {
|
|
3
|
-
/** Send an instant link email to the given address */
|
|
4
|
-
sendInstantLink: (email: string) => Promise<void>;
|
|
5
|
-
/** Verify an instant link token and sign in */
|
|
6
|
-
verifyInstantLink: (token: string) => Promise<AuthResponse | MfaRequiredResponse>;
|
|
7
|
-
/** Whether a request is in progress */
|
|
8
|
-
isLoading: boolean;
|
|
9
|
-
/** Whether the instant link was sent successfully */
|
|
10
|
-
isSuccess: boolean;
|
|
11
|
-
/** Error from the last request */
|
|
12
|
-
error: AuthError | null;
|
|
13
|
-
/** Clear the error state */
|
|
14
|
-
clearError: () => void;
|
|
15
|
-
/** Reset to initial state */
|
|
16
|
-
reset: () => void;
|
|
17
|
-
/** Number of remaining attempts before rate limiting */
|
|
18
|
-
remainingAttempts: number;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Hook for instant link (passwordless) authentication.
|
|
22
|
-
*
|
|
23
|
-
* Sends an instant link email that allows the user to sign in
|
|
24
|
-
* without entering their password.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```tsx
|
|
28
|
-
* function InstantLinkForm() {
|
|
29
|
-
* const { sendInstantLink, isLoading, isSuccess, error } = useInstantLink();
|
|
30
|
-
*
|
|
31
|
-
* const handleSubmit = async (e) => {
|
|
32
|
-
* e.preventDefault();
|
|
33
|
-
* await sendInstantLink(email);
|
|
34
|
-
* };
|
|
35
|
-
*
|
|
36
|
-
* if (isSuccess) {
|
|
37
|
-
* return <p>Check your email for the sign-in link</p>;
|
|
38
|
-
* }
|
|
39
|
-
* }
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
export declare function useInstantLink(): UseInstantLinkReturn;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Invite, OrgRole, AuthError, AcceptInviteResponse } from '../types';
|
|
2
|
-
export interface UseInvitesReturn {
|
|
3
|
-
/** List of pending invites */
|
|
4
|
-
invites: Invite[];
|
|
5
|
-
/** Total pending invites available on the server */
|
|
6
|
-
total: number;
|
|
7
|
-
/** Loading state */
|
|
8
|
-
isLoading: boolean;
|
|
9
|
-
/** Error state */
|
|
10
|
-
error: AuthError | null;
|
|
11
|
-
/** Fetch/refresh invites list */
|
|
12
|
-
fetchInvites: (options?: {
|
|
13
|
-
limit?: number;
|
|
14
|
-
offset?: number;
|
|
15
|
-
}) => Promise<void>;
|
|
16
|
-
/** Create a new invite */
|
|
17
|
-
createInvite: (email: string, role?: Exclude<OrgRole, 'owner'>) => Promise<void>;
|
|
18
|
-
/** Cancel a pending invite */
|
|
19
|
-
cancelInvite: (inviteId: string) => Promise<void>;
|
|
20
|
-
/** Resend an invite email */
|
|
21
|
-
resendInvite: (inviteId: string) => Promise<void>;
|
|
22
|
-
/** Accept an invite (public) */
|
|
23
|
-
acceptInvite: (token: string) => Promise<AcceptInviteResponse>;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Hook for managing organization invites.
|
|
27
|
-
*
|
|
28
|
-
* @param orgId - The organization ID to manage invites for
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```tsx
|
|
32
|
-
* function InviteManager() {
|
|
33
|
-
* const { activeOrg } = useOrgs();
|
|
34
|
-
* const { invites, createInvite, cancelInvite, resendInvite } = useInvites(activeOrg?.id);
|
|
35
|
-
*
|
|
36
|
-
* const handleInvite = async (email: string) => {
|
|
37
|
-
* await createInvite(email, 'member');
|
|
38
|
-
* };
|
|
39
|
-
*
|
|
40
|
-
* return (
|
|
41
|
-
* <div>
|
|
42
|
-
* <InviteForm onSubmit={handleInvite} />
|
|
43
|
-
* <ul>
|
|
44
|
-
* {invites.map(invite => (
|
|
45
|
-
* <li key={invite.id}>
|
|
46
|
-
* {invite.email} ({invite.role})
|
|
47
|
-
* <button onClick={() => resendInvite(invite.id)}>Resend</button>
|
|
48
|
-
* <button onClick={() => cancelInvite(invite.id)}>Cancel</button>
|
|
49
|
-
* </li>
|
|
50
|
-
* ))}
|
|
51
|
-
* </ul>
|
|
52
|
-
* </div>
|
|
53
|
-
* );
|
|
54
|
-
* }
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
export declare function useInvites(orgId: string | undefined): UseInvitesReturn;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Member, OrgRole, AuthError } from '../types';
|
|
2
|
-
export interface UseMembersReturn {
|
|
3
|
-
/** List of members */
|
|
4
|
-
members: Member[];
|
|
5
|
-
/** Total members available on the server */
|
|
6
|
-
total: number;
|
|
7
|
-
/** Loading state */
|
|
8
|
-
isLoading: boolean;
|
|
9
|
-
/** Error state */
|
|
10
|
-
error: AuthError | null;
|
|
11
|
-
/** Fetch/refresh members list */
|
|
12
|
-
fetchMembers: (options?: {
|
|
13
|
-
limit?: number;
|
|
14
|
-
offset?: number;
|
|
15
|
-
}) => Promise<void>;
|
|
16
|
-
/** Update a member's role */
|
|
17
|
-
updateMemberRole: (userId: string, role: OrgRole) => Promise<void>;
|
|
18
|
-
/** Remove a member */
|
|
19
|
-
removeMember: (userId: string) => Promise<void>;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Hook for managing organization members.
|
|
23
|
-
*
|
|
24
|
-
* @param orgId - The organization ID to manage members for
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```tsx
|
|
28
|
-
* function MembersList() {
|
|
29
|
-
* const { activeOrg } = useOrgs();
|
|
30
|
-
* const { members, isLoading, updateMemberRole, removeMember } = useMembers(activeOrg?.id);
|
|
31
|
-
*
|
|
32
|
-
* if (!activeOrg) return null;
|
|
33
|
-
*
|
|
34
|
-
* return (
|
|
35
|
-
* <ul>
|
|
36
|
-
* {members.map(member => (
|
|
37
|
-
* <li key={member.id}>
|
|
38
|
-
* {member.user.name} - {member.role}
|
|
39
|
-
* <button onClick={() => updateMemberRole(member.userId, 'admin')}>
|
|
40
|
-
* Make Admin
|
|
41
|
-
* </button>
|
|
42
|
-
* <button onClick={() => removeMember(member.userId)}>
|
|
43
|
-
* Remove
|
|
44
|
-
* </button>
|
|
45
|
-
* </li>
|
|
46
|
-
* ))}
|
|
47
|
-
* </ul>
|
|
48
|
-
* );
|
|
49
|
-
* }
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
export declare function useMembers(orgId: string | undefined): UseMembersReturn;
|