@hexclave/next 1.0.3 → 1.0.5
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/components/api-key-dialogs.d.ts +1 -1
- package/dist/components/api-key-dialogs.js.map +1 -1
- package/dist/components/api-key-table.d.ts +1 -1
- package/dist/components/api-key-table.js.map +1 -1
- package/dist/components/credential-sign-in.js.map +1 -1
- package/dist/components/credential-sign-up.js.map +1 -1
- package/dist/components/elements/form-warning.js.map +1 -1
- package/dist/components/elements/maybe-full-page.js.map +1 -1
- package/dist/components/elements/separator-with-text.js.map +1 -1
- package/dist/components/elements/sidebar-layout.js.map +1 -1
- package/dist/components/elements/ssr-layout-effect.js.map +1 -1
- package/dist/components/elements/user-avatar.js.map +1 -1
- package/dist/components/link.js.map +1 -1
- package/dist/components/magic-link-sign-in.js +2 -2
- package/dist/components/magic-link-sign-in.js.map +1 -1
- package/dist/components/message-cards/known-error-message-card.js +2 -2
- package/dist/components/message-cards/known-error-message-card.js.map +1 -1
- package/dist/components/message-cards/message-card.js.map +1 -1
- package/dist/components/message-cards/predefined-message-card.js +9 -9
- package/dist/components/message-cards/predefined-message-card.js.map +1 -1
- package/dist/components/oauth-button-group.js +2 -2
- package/dist/components/oauth-button-group.js.map +1 -1
- package/dist/components/oauth-button.js +2 -2
- package/dist/components/oauth-button.js.map +1 -1
- package/dist/components/passkey-button.js +2 -2
- package/dist/components/passkey-button.js.map +1 -1
- package/dist/components/profile-image-editor.js.map +1 -1
- package/dist/components/selected-team-switcher.d.ts +1 -1
- package/dist/components/selected-team-switcher.js.map +1 -1
- package/dist/components/team-icon.d.ts +1 -1
- package/dist/components/team-icon.js.map +1 -1
- package/dist/components/team-switcher.d.ts +1 -1
- package/dist/components/team-switcher.js.map +1 -1
- package/dist/components/use-in-iframe.js.map +1 -1
- package/dist/components/user-button.js.map +1 -1
- package/dist/components-page/account-settings/active-sessions/active-sessions-page.js.map +1 -1
- package/dist/components-page/account-settings/api-keys/api-keys-page.js.map +1 -1
- package/dist/components-page/account-settings/editable-text.js.map +1 -1
- package/dist/components-page/account-settings/email-and-auth/email-and-auth-page.js.map +1 -1
- package/dist/components-page/account-settings/email-and-auth/emails-section.js.map +1 -1
- package/dist/components-page/account-settings/email-and-auth/mfa-section.js.map +1 -1
- package/dist/components-page/account-settings/email-and-auth/otp-section.js.map +1 -1
- package/dist/components-page/account-settings/email-and-auth/passkey-section.js.map +1 -1
- package/dist/components-page/account-settings/email-and-auth/password-section.js.map +1 -1
- package/dist/components-page/account-settings/notifications/notifications-page.js.map +1 -1
- package/dist/components-page/account-settings/page-layout.js.map +1 -1
- package/dist/components-page/account-settings/payments/payments-page.d.ts +1 -1
- package/dist/components-page/account-settings/payments/payments-page.js.map +1 -1
- package/dist/components-page/account-settings/payments/payments-panel.d.ts +1 -1
- package/dist/components-page/account-settings/payments/payments-panel.js +3 -3
- package/dist/components-page/account-settings/payments/payments-panel.js.map +1 -1
- package/dist/components-page/account-settings/profile-page/profile-page.js.map +1 -1
- package/dist/components-page/account-settings/section.js.map +1 -1
- package/dist/components-page/account-settings/settings/delete-account-section.js.map +1 -1
- package/dist/components-page/account-settings/settings/settings-page.js.map +1 -1
- package/dist/components-page/account-settings/settings/sign-out-section.js.map +1 -1
- package/dist/components-page/account-settings/teams/leave-team-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/leave-team-section.js.map +1 -1
- package/dist/components-page/account-settings/teams/team-api-keys-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-api-keys-section.js.map +1 -1
- package/dist/components-page/account-settings/teams/team-creation-page.js.map +1 -1
- package/dist/components-page/account-settings/teams/team-display-name-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-display-name-section.js.map +1 -1
- package/dist/components-page/account-settings/teams/team-member-invitation-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-member-invitation-section.js.map +1 -1
- package/dist/components-page/account-settings/teams/team-member-list-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-member-list-section.js.map +1 -1
- package/dist/components-page/account-settings/teams/team-page.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-page.js.map +1 -1
- package/dist/components-page/account-settings/teams/team-profile-image-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-profile-image-section.js.map +1 -1
- package/dist/components-page/account-settings/teams/team-profile-user-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-profile-user-section.js.map +1 -1
- package/dist/components-page/account-settings.js.map +1 -1
- package/dist/components-page/auth-page.d.ts.map +1 -1
- package/dist/components-page/auth-page.js +55 -10
- package/dist/components-page/auth-page.js.map +1 -1
- package/dist/components-page/cli-auth-confirm.js +3 -3
- package/dist/components-page/cli-auth-confirm.js.map +1 -1
- package/dist/components-page/cli-auth-confirm.test.js +4 -4
- package/dist/components-page/cli-auth-confirm.test.js.map +1 -1
- package/dist/components-page/email-verification.js +4 -4
- package/dist/components-page/email-verification.js.map +1 -1
- package/dist/components-page/error-page.js +9 -9
- package/dist/components-page/error-page.js.map +1 -1
- package/dist/components-page/forgot-password.js +4 -4
- package/dist/components-page/forgot-password.js.map +1 -1
- package/dist/components-page/{stack-handler-client.d.ts → hexclave-handler-client.d.ts} +4 -4
- package/dist/components-page/hexclave-handler-client.d.ts.map +1 -0
- package/dist/components-page/{stack-handler-client.js → hexclave-handler-client.js} +19 -18
- package/dist/components-page/hexclave-handler-client.js.map +1 -0
- package/dist/components-page/{stack-handler.d.ts → hexclave-handler.d.ts} +5 -5
- package/dist/components-page/hexclave-handler.d.ts.map +1 -0
- package/dist/components-page/{stack-handler.js → hexclave-handler.js} +4 -4
- package/dist/components-page/hexclave-handler.js.map +1 -0
- package/dist/components-page/magic-link-callback.js +7 -7
- package/dist/components-page/magic-link-callback.js.map +1 -1
- package/dist/components-page/mfa.js +4 -4
- package/dist/components-page/mfa.js.map +1 -1
- package/dist/components-page/oauth-callback.js +3 -3
- package/dist/components-page/oauth-callback.js.map +1 -1
- package/dist/components-page/onboarding.js +3 -3
- package/dist/components-page/onboarding.js.map +1 -1
- package/dist/components-page/password-reset.js +8 -8
- package/dist/components-page/password-reset.js.map +1 -1
- package/dist/components-page/sign-in.js.map +1 -1
- package/dist/components-page/sign-out.d.ts +1 -0
- package/dist/components-page/sign-out.d.ts.map +1 -1
- package/dist/components-page/sign-out.js +11 -5
- package/dist/components-page/sign-out.js.map +1 -1
- package/dist/components-page/sign-up.js.map +1 -1
- package/dist/components-page/team-creation.js.map +1 -1
- package/dist/components-page/team-invitation.js +16 -16
- package/dist/components-page/team-invitation.js.map +1 -1
- package/dist/dev-tool/dev-tool-core.d.ts +1 -1
- package/dist/dev-tool/dev-tool-core.js +11 -11
- package/dist/dev-tool/dev-tool-core.js.map +1 -1
- package/dist/dev-tool/dev-tool-styles.d.ts +1 -1
- package/dist/dev-tool/dev-tool-styles.js +371 -371
- package/dist/dev-tool/dev-tool-styles.js.map +1 -1
- package/dist/dev-tool/dev-tool-trigger-position.js.map +1 -1
- package/dist/dev-tool/dev-tool-trigger-position.test.js.map +1 -1
- package/dist/dev-tool/index.d.ts +4 -4
- package/dist/dev-tool/index.js +4 -4
- package/dist/dev-tool/index.js.map +1 -1
- package/dist/esm/components/api-key-dialogs.d.ts +1 -1
- package/dist/esm/components/api-key-dialogs.js.map +1 -1
- package/dist/esm/components/api-key-table.d.ts +1 -1
- package/dist/esm/components/api-key-table.js.map +1 -1
- package/dist/esm/components/credential-sign-in.js.map +1 -1
- package/dist/esm/components/credential-sign-up.js.map +1 -1
- package/dist/esm/components/elements/form-warning.js.map +1 -1
- package/dist/esm/components/elements/maybe-full-page.js.map +1 -1
- package/dist/esm/components/elements/separator-with-text.js.map +1 -1
- package/dist/esm/components/elements/sidebar-layout.js.map +1 -1
- package/dist/esm/components/elements/ssr-layout-effect.js.map +1 -1
- package/dist/esm/components/elements/user-avatar.js.map +1 -1
- package/dist/esm/components/link.js.map +1 -1
- package/dist/esm/components/magic-link-sign-in.js +2 -2
- package/dist/esm/components/magic-link-sign-in.js.map +1 -1
- package/dist/esm/components/message-cards/known-error-message-card.js +2 -2
- package/dist/esm/components/message-cards/known-error-message-card.js.map +1 -1
- package/dist/esm/components/message-cards/message-card.js.map +1 -1
- package/dist/esm/components/message-cards/predefined-message-card.js +9 -9
- package/dist/esm/components/message-cards/predefined-message-card.js.map +1 -1
- package/dist/esm/components/oauth-button-group.js +2 -2
- package/dist/esm/components/oauth-button-group.js.map +1 -1
- package/dist/esm/components/oauth-button.js +2 -2
- package/dist/esm/components/oauth-button.js.map +1 -1
- package/dist/esm/components/passkey-button.js +2 -2
- package/dist/esm/components/passkey-button.js.map +1 -1
- package/dist/esm/components/profile-image-editor.js.map +1 -1
- package/dist/esm/components/selected-team-switcher.js.map +1 -1
- package/dist/esm/components/team-icon.js.map +1 -1
- package/dist/esm/components/team-switcher.js.map +1 -1
- package/dist/esm/components/use-in-iframe.js.map +1 -1
- package/dist/esm/components/user-button.js.map +1 -1
- package/dist/esm/components-page/account-settings/active-sessions/active-sessions-page.js.map +1 -1
- package/dist/esm/components-page/account-settings/api-keys/api-keys-page.js.map +1 -1
- package/dist/esm/components-page/account-settings/editable-text.js.map +1 -1
- package/dist/esm/components-page/account-settings/email-and-auth/email-and-auth-page.js.map +1 -1
- package/dist/esm/components-page/account-settings/email-and-auth/emails-section.js.map +1 -1
- package/dist/esm/components-page/account-settings/email-and-auth/mfa-section.js.map +1 -1
- package/dist/esm/components-page/account-settings/email-and-auth/otp-section.js.map +1 -1
- package/dist/esm/components-page/account-settings/email-and-auth/passkey-section.js.map +1 -1
- package/dist/esm/components-page/account-settings/email-and-auth/password-section.js.map +1 -1
- package/dist/esm/components-page/account-settings/notifications/notifications-page.js.map +1 -1
- package/dist/esm/components-page/account-settings/page-layout.js.map +1 -1
- package/dist/esm/components-page/account-settings/payments/payments-page.js.map +1 -1
- package/dist/esm/components-page/account-settings/payments/payments-panel.d.ts +1 -1
- package/dist/esm/components-page/account-settings/payments/payments-panel.js +3 -3
- package/dist/esm/components-page/account-settings/payments/payments-panel.js.map +1 -1
- package/dist/esm/components-page/account-settings/profile-page/profile-page.js.map +1 -1
- package/dist/esm/components-page/account-settings/section.js.map +1 -1
- package/dist/esm/components-page/account-settings/settings/delete-account-section.js.map +1 -1
- package/dist/esm/components-page/account-settings/settings/settings-page.js.map +1 -1
- package/dist/esm/components-page/account-settings/settings/sign-out-section.js.map +1 -1
- package/dist/esm/components-page/account-settings/teams/leave-team-section.js.map +1 -1
- package/dist/esm/components-page/account-settings/teams/team-api-keys-section.d.ts +1 -1
- package/dist/esm/components-page/account-settings/teams/team-api-keys-section.js.map +1 -1
- package/dist/esm/components-page/account-settings/teams/team-creation-page.js.map +1 -1
- package/dist/esm/components-page/account-settings/teams/team-display-name-section.js.map +1 -1
- package/dist/esm/components-page/account-settings/teams/team-member-invitation-section.js.map +1 -1
- package/dist/esm/components-page/account-settings/teams/team-member-list-section.js.map +1 -1
- package/dist/esm/components-page/account-settings/teams/team-page.js.map +1 -1
- package/dist/esm/components-page/account-settings/teams/team-profile-image-section.js.map +1 -1
- package/dist/esm/components-page/account-settings/teams/team-profile-user-section.js.map +1 -1
- package/dist/esm/components-page/account-settings.js.map +1 -1
- package/dist/esm/components-page/auth-page.d.ts.map +1 -1
- package/dist/esm/components-page/auth-page.js +56 -11
- package/dist/esm/components-page/auth-page.js.map +1 -1
- package/dist/esm/components-page/cli-auth-confirm.js +3 -3
- package/dist/esm/components-page/cli-auth-confirm.js.map +1 -1
- package/dist/esm/components-page/cli-auth-confirm.test.js +4 -4
- package/dist/esm/components-page/cli-auth-confirm.test.js.map +1 -1
- package/dist/esm/components-page/email-verification.js +4 -4
- package/dist/esm/components-page/email-verification.js.map +1 -1
- package/dist/esm/components-page/error-page.js +9 -9
- package/dist/esm/components-page/error-page.js.map +1 -1
- package/dist/esm/components-page/forgot-password.js +4 -4
- package/dist/esm/components-page/forgot-password.js.map +1 -1
- package/dist/esm/components-page/{stack-handler-client.d.ts → hexclave-handler-client.d.ts} +4 -4
- package/dist/esm/components-page/hexclave-handler-client.d.ts.map +1 -0
- package/dist/esm/components-page/{stack-handler-client.js → hexclave-handler-client.js} +17 -16
- package/dist/esm/components-page/hexclave-handler-client.js.map +1 -0
- package/dist/esm/components-page/{stack-handler.d.ts → hexclave-handler.d.ts} +5 -5
- package/dist/esm/components-page/hexclave-handler.d.ts.map +1 -0
- package/dist/esm/components-page/{stack-handler.js → hexclave-handler.js} +4 -4
- package/dist/esm/components-page/hexclave-handler.js.map +1 -0
- package/dist/esm/components-page/magic-link-callback.js +7 -7
- package/dist/esm/components-page/magic-link-callback.js.map +1 -1
- package/dist/esm/components-page/mfa.js +4 -4
- package/dist/esm/components-page/mfa.js.map +1 -1
- package/dist/esm/components-page/oauth-callback.js +3 -3
- package/dist/esm/components-page/oauth-callback.js.map +1 -1
- package/dist/esm/components-page/onboarding.js +3 -3
- package/dist/esm/components-page/onboarding.js.map +1 -1
- package/dist/esm/components-page/password-reset.js +8 -8
- package/dist/esm/components-page/password-reset.js.map +1 -1
- package/dist/esm/components-page/sign-in.js.map +1 -1
- package/dist/esm/components-page/sign-out.d.ts +1 -0
- package/dist/esm/components-page/sign-out.d.ts.map +1 -1
- package/dist/esm/components-page/sign-out.js +11 -5
- package/dist/esm/components-page/sign-out.js.map +1 -1
- package/dist/esm/components-page/sign-up.js.map +1 -1
- package/dist/esm/components-page/team-creation.js.map +1 -1
- package/dist/esm/components-page/team-invitation.js +16 -16
- package/dist/esm/components-page/team-invitation.js.map +1 -1
- package/dist/esm/dev-tool/dev-tool-core.d.ts +1 -1
- package/dist/esm/dev-tool/dev-tool-core.js +10 -10
- package/dist/esm/dev-tool/dev-tool-core.js.map +1 -1
- package/dist/esm/dev-tool/dev-tool-styles.d.ts +1 -1
- package/dist/esm/dev-tool/dev-tool-styles.js +371 -371
- package/dist/esm/dev-tool/dev-tool-styles.js.map +1 -1
- package/dist/esm/dev-tool/dev-tool-trigger-position.js.map +1 -1
- package/dist/esm/dev-tool/dev-tool-trigger-position.test.js.map +1 -1
- package/dist/esm/dev-tool/index.d.ts +4 -4
- package/dist/esm/dev-tool/index.js +4 -4
- package/dist/esm/dev-tool/index.js.map +1 -1
- package/dist/esm/generated/global-css.d.ts +1 -1
- package/dist/esm/generated/global-css.js +1 -1
- package/dist/esm/generated/global-css.js.map +1 -1
- package/dist/esm/generated/quetzal-translations.js.map +1 -1
- package/dist/esm/index.d.ts +4 -4
- package/dist/esm/index.js +3 -3
- package/dist/esm/integrations/convex/component/convex.config.js.map +1 -1
- package/dist/esm/integrations/convex.js +1 -1
- package/dist/esm/integrations/convex.js.map +1 -1
- package/dist/esm/lib/auth.js.map +1 -1
- package/dist/esm/lib/auth.test.js.map +1 -1
- package/dist/esm/lib/cookie.js +2 -2
- package/dist/esm/lib/cookie.js.map +1 -1
- package/dist/esm/lib/env.js.map +1 -1
- package/dist/{lib/stack-app → esm/lib/hexclave-app}/api-keys/index.d.ts +2 -2
- package/dist/esm/lib/hexclave-app/api-keys/index.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/api-keys/index.js +1 -1
- package/dist/esm/lib/hexclave-app/api-keys/index.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/admin-app-impl.d.ts +6 -6
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/admin-app-impl.js +7 -7
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/client-app-impl.cross-domain.test.js +2 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/client-app-impl.d.ts +13 -13
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/client-app-impl.js +23 -30
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/client-app-impl.oauth-prefetch.test.js +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.oauth-prefetch.test.js.map +1 -0
- package/dist/{lib/stack-app → esm/lib/hexclave-app}/apps/implementations/common.d.ts +4 -4
- package/dist/esm/lib/hexclave-app/apps/implementations/common.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/common.js +7 -7
- package/dist/esm/lib/hexclave-app/apps/implementations/common.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/event-tracker.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/event-tracker.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/event-tracker.js +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/event-tracker.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/event-tracker.test.js +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/event-tracker.test.js.map +1 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/index.d.ts +9 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/index.d.ts.map +1 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/index.js +27 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/index.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/redirect-page-urls.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/redirect-page-urls.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/redirect-page-urls.js +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/redirect-page-urls.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/server-app-impl.d.ts +4 -4
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/server-app-impl.js +6 -6
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.js.map +1 -0
- package/dist/{lib/stack-app → esm/lib/hexclave-app}/apps/implementations/session-refresh-subscription.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-refresh-subscription.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/session-refresh-subscription.js +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-refresh-subscription.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/session-refresh-subscription.test.js +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-refresh-subscription.test.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/session-replay.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/session-replay.js +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/session-replay.test.js +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.test.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/interfaces/admin-app.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/interfaces/admin-app.js +3 -3
- package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/interfaces/client-app.d.ts +4 -4
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/interfaces/client-app.js +3 -3
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/interfaces/server-app.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/server-app.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/apps/interfaces/server-app.js +3 -3
- package/dist/esm/lib/hexclave-app/apps/interfaces/server-app.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/common.d.ts +7 -7
- package/dist/esm/lib/hexclave-app/common.d.ts.map +1 -0
- package/dist/esm/lib/hexclave-app/common.js +7 -0
- package/dist/esm/lib/hexclave-app/common.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/connected-accounts/index.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/connected-accounts/index.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/contact-channels/index.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/contact-channels/index.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/contact-channels/index.js +1 -1
- package/dist/esm/lib/hexclave-app/contact-channels/index.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/customers/index.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/customers/index.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/data-vault/index.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/data-vault/index.d.ts.map +1 -0
- package/dist/{lib/stack-app → esm/lib/hexclave-app}/email/index.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/email/index.d.ts.map +1 -0
- package/dist/{lib/stack-app → esm/lib/hexclave-app}/email-templates/index.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/email-templates/index.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/email-templates/index.js +1 -1
- package/dist/esm/lib/hexclave-app/email-templates/index.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/index.d.ts +2 -2
- package/dist/esm/lib/{stack-app → hexclave-app}/index.js +2 -2
- package/dist/{lib/stack-app → esm/lib/hexclave-app}/internal-api-keys/index.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/internal-api-keys/index.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/internal-api-keys/index.js +1 -1
- package/dist/esm/lib/hexclave-app/internal-api-keys/index.js.map +1 -0
- package/dist/{lib/stack-app → esm/lib/hexclave-app}/notification-categories/index.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/notification-categories/index.d.ts.map +1 -0
- package/dist/{lib/stack-app → esm/lib/hexclave-app}/permissions/index.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/permissions/index.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/permissions/index.js +1 -1
- package/dist/esm/lib/hexclave-app/permissions/index.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/project-configs/index.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/project-configs/index.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/projects/index.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/projects/index.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/projects/index.js +1 -1
- package/dist/esm/lib/hexclave-app/projects/index.js.map +1 -0
- package/dist/{lib/stack-app → esm/lib/hexclave-app}/session-replays/index.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/session-replays/index.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/teams/index.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/teams/index.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/teams/index.js +1 -1
- package/dist/esm/lib/hexclave-app/teams/index.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/url-targets.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/url-targets.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/url-targets.js +2 -2
- package/dist/esm/lib/hexclave-app/url-targets.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/url-targets.test.js +1 -1
- package/dist/esm/lib/hexclave-app/url-targets.test.js.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/users/index.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/users/index.d.ts.map +1 -0
- package/dist/esm/lib/{stack-app → hexclave-app}/users/index.js +1 -1
- package/dist/esm/lib/hexclave-app/users/index.js.map +1 -0
- package/dist/esm/lib/hooks.d.ts +1 -1
- package/dist/esm/lib/hooks.js +9 -9
- package/dist/esm/lib/hooks.js.map +1 -1
- package/dist/esm/lib/translations.js.map +1 -1
- package/dist/esm/providers/hexclave-context.d.ts +11 -0
- package/dist/esm/providers/hexclave-context.d.ts.map +1 -0
- package/dist/esm/providers/hexclave-context.js +12 -0
- package/dist/esm/providers/hexclave-context.js.map +1 -0
- package/dist/esm/providers/{stack-provider-client.d.ts → hexclave-provider-client.d.ts} +5 -5
- package/dist/esm/providers/hexclave-provider-client.d.ts.map +1 -0
- package/dist/esm/providers/hexclave-provider-client.js +30 -0
- package/dist/esm/providers/hexclave-provider-client.js.map +1 -0
- package/dist/esm/providers/{stack-provider.d.ts → hexclave-provider.d.ts} +3 -3
- package/dist/esm/providers/hexclave-provider.d.ts.map +1 -0
- package/dist/esm/providers/{stack-provider.js → hexclave-provider.js} +6 -6
- package/dist/esm/providers/hexclave-provider.js.map +1 -0
- package/dist/esm/providers/theme-provider.js.map +1 -1
- package/dist/esm/providers/translation-provider-client.js.map +1 -1
- package/dist/esm/providers/translation-provider.js.map +1 -1
- package/dist/esm/tanstack-start-server-context.d.ts +1 -1
- package/dist/esm/utils/browser-script.js.map +1 -1
- package/dist/esm/utils/constants.js.map +1 -1
- package/dist/esm/utils/url.js.map +1 -1
- package/dist/generated/global-css.d.ts +1 -1
- package/dist/generated/global-css.js +1 -1
- package/dist/generated/global-css.js.map +1 -1
- package/dist/generated/quetzal-translations.js.map +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.js +9 -9
- package/dist/integrations/convex/component/convex.config.d.ts +2 -2
- package/dist/integrations/convex/component/convex.config.d.ts.map +1 -1
- package/dist/integrations/convex/component/convex.config.js.map +1 -1
- package/dist/integrations/convex.js +2 -2
- package/dist/integrations/convex.js.map +1 -1
- package/dist/lib/auth.js.map +1 -1
- package/dist/lib/auth.test.js.map +1 -1
- package/dist/lib/cookie.js +2 -2
- package/dist/lib/cookie.js.map +1 -1
- package/dist/lib/env.js.map +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/api-keys/index.d.ts +2 -2
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/api-keys/index.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/api-keys/index.js +1 -1
- package/dist/lib/hexclave-app/api-keys/index.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/admin-app-impl.d.ts +6 -6
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/admin-app-impl.js +5 -5
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/client-app-impl.cross-domain.test.js +2 -2
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/client-app-impl.d.ts +13 -13
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/client-app-impl.js +22 -29
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/client-app-impl.oauth-prefetch.test.js +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.oauth-prefetch.test.js.map +1 -0
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/apps/implementations/common.d.ts +4 -4
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/apps/implementations/common.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/common.js +6 -6
- package/dist/lib/hexclave-app/apps/implementations/common.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/event-tracker.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/apps/implementations/event-tracker.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/event-tracker.js +1 -1
- package/dist/lib/hexclave-app/apps/implementations/event-tracker.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/event-tracker.test.js +1 -1
- package/dist/lib/hexclave-app/apps/implementations/event-tracker.test.js.map +1 -0
- package/dist/lib/hexclave-app/apps/implementations/index.d.ts +9 -0
- package/dist/lib/hexclave-app/apps/implementations/index.d.ts.map +1 -0
- package/dist/lib/hexclave-app/apps/implementations/index.js +31 -0
- package/dist/lib/hexclave-app/apps/implementations/index.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/redirect-page-urls.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/apps/implementations/redirect-page-urls.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/redirect-page-urls.js +1 -1
- package/dist/lib/hexclave-app/apps/implementations/redirect-page-urls.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/server-app-impl.d.ts +4 -4
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/apps/implementations/server-app-impl.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/server-app-impl.js +5 -5
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.js.map +1 -0
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/apps/implementations/session-refresh-subscription.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/apps/implementations/session-refresh-subscription.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/session-refresh-subscription.js +1 -1
- package/dist/lib/hexclave-app/apps/implementations/session-refresh-subscription.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/session-refresh-subscription.test.js +1 -1
- package/dist/lib/hexclave-app/apps/implementations/session-refresh-subscription.test.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/session-replay.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/apps/implementations/session-replay.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/session-replay.js +1 -1
- package/dist/lib/hexclave-app/apps/implementations/session-replay.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/apps/implementations/session-replay.test.js +1 -1
- package/dist/lib/hexclave-app/apps/implementations/session-replay.test.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/apps/interfaces/admin-app.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/apps/interfaces/admin-app.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/apps/interfaces/admin-app.js +2 -2
- package/dist/lib/hexclave-app/apps/interfaces/admin-app.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/apps/interfaces/client-app.d.ts +4 -4
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/apps/interfaces/client-app.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/apps/interfaces/client-app.js +2 -2
- package/dist/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/apps/interfaces/server-app.d.ts +2 -2
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/apps/interfaces/server-app.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/apps/interfaces/server-app.js +2 -2
- package/dist/lib/hexclave-app/apps/interfaces/server-app.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/common.d.ts +8 -8
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/common.d.ts.map +1 -1
- package/dist/lib/hexclave-app/common.js +9 -0
- package/dist/lib/hexclave-app/common.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/connected-accounts/index.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/connected-accounts/index.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/contact-channels/index.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/contact-channels/index.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/contact-channels/index.js +1 -1
- package/dist/lib/hexclave-app/contact-channels/index.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/customers/index.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/customers/index.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/data-vault/index.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/data-vault/index.d.ts.map +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/email/index.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/email/index.d.ts.map +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/email-templates/index.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/email-templates/index.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/email-templates/index.js +1 -1
- package/dist/lib/hexclave-app/email-templates/index.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/index.d.ts +2 -2
- package/dist/lib/{stack-app → hexclave-app}/index.js +2 -2
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/internal-api-keys/index.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/internal-api-keys/index.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/internal-api-keys/index.js +1 -1
- package/dist/lib/hexclave-app/internal-api-keys/index.js.map +1 -0
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/notification-categories/index.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/notification-categories/index.d.ts.map +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/permissions/index.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/permissions/index.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/permissions/index.js +1 -1
- package/dist/lib/hexclave-app/permissions/index.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/project-configs/index.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/project-configs/index.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/projects/index.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/projects/index.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/projects/index.js +1 -1
- package/dist/lib/hexclave-app/projects/index.js.map +1 -0
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/session-replays/index.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/session-replays/index.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/teams/index.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/teams/index.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/teams/index.js +1 -1
- package/dist/lib/hexclave-app/teams/index.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/url-targets.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/url-targets.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/url-targets.js +2 -2
- package/dist/lib/hexclave-app/url-targets.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/url-targets.test.js +1 -1
- package/dist/lib/hexclave-app/url-targets.test.js.map +1 -0
- package/dist/lib/{stack-app → hexclave-app}/users/index.d.ts +1 -1
- package/dist/{esm/lib/stack-app → lib/hexclave-app}/users/index.d.ts.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/users/index.js +1 -1
- package/dist/lib/hexclave-app/users/index.js.map +1 -0
- package/dist/lib/hooks.d.ts +3 -3
- package/dist/lib/hooks.d.ts.map +1 -1
- package/dist/lib/hooks.js +9 -9
- package/dist/lib/hooks.js.map +1 -1
- package/dist/lib/translations.js.map +1 -1
- package/dist/providers/hexclave-context.d.ts +11 -0
- package/dist/providers/hexclave-context.d.ts.map +1 -0
- package/dist/providers/hexclave-context.js +15 -0
- package/dist/providers/hexclave-context.js.map +1 -0
- package/dist/providers/{stack-provider-client.d.ts → hexclave-provider-client.d.ts} +5 -5
- package/dist/providers/hexclave-provider-client.d.ts.map +1 -0
- package/dist/providers/{stack-provider-client.js → hexclave-provider-client.js} +9 -9
- package/dist/providers/hexclave-provider-client.js.map +1 -0
- package/dist/providers/{stack-provider.d.ts → hexclave-provider.d.ts} +5 -5
- package/dist/providers/hexclave-provider.d.ts.map +1 -0
- package/dist/providers/{stack-provider.js → hexclave-provider.js} +6 -6
- package/dist/providers/hexclave-provider.js.map +1 -0
- package/dist/providers/theme-provider.js.map +1 -1
- package/dist/providers/translation-provider-client.js.map +1 -1
- package/dist/providers/translation-provider.js.map +1 -1
- package/dist/{storage-kTmOAWHW.d.ts → storage-CKzvsBxG.d.ts} +18 -18
- package/dist/{storage-kTmOAWHW.d.ts.map → storage-CKzvsBxG.d.ts.map} +1 -1
- package/dist/tanstack-start-server-context.d.ts +1 -1
- package/dist/utils/browser-script.js.map +1 -1
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/url.js.map +1 -1
- package/package.json +6 -5
- package/src/components/api-key-dialogs.tsx +173 -0
- package/src/components/api-key-table.tsx +127 -0
- package/src/components/credential-sign-in.tsx +83 -0
- package/src/components/credential-sign-up.tsx +108 -0
- package/src/components/elements/form-warning.tsx +17 -0
- package/src/components/elements/maybe-full-page.tsx +60 -0
- package/src/components/elements/separator-with-text.tsx +22 -0
- package/src/components/elements/sidebar-layout.tsx +136 -0
- package/src/components/elements/ssr-layout-effect.tsx +24 -0
- package/src/components/elements/user-avatar.tsx +32 -0
- package/src/components/link.tsx +40 -0
- package/src/components/magic-link-sign-in.tsx +143 -0
- package/src/components/message-cards/known-error-message-card.tsx +33 -0
- package/src/components/message-cards/message-card.tsx +46 -0
- package/src/components/message-cards/predefined-message-card.tsx +88 -0
- package/src/components/oauth-button-group.tsx +35 -0
- package/src/components/oauth-button.tsx +222 -0
- package/src/components/passkey-button.tsx +43 -0
- package/src/components/profile-image-editor.tsx +194 -0
- package/src/components/selected-team-switcher.tsx +97 -0
- package/src/components/team-icon.tsx +30 -0
- package/src/components/team-switcher.tsx +191 -0
- package/src/components/use-in-iframe.tsx +18 -0
- package/src/components/user-button.tsx +157 -0
- package/src/components-page/account-settings/active-sessions/active-sessions-page.tsx +238 -0
- package/src/components-page/account-settings/api-keys/api-keys-page.tsx +157 -0
- package/src/components-page/account-settings/editable-text.tsx +53 -0
- package/src/components-page/account-settings/email-and-auth/email-and-auth-page.tsx +24 -0
- package/src/components-page/account-settings/email-and-auth/emails-section.tsx +201 -0
- package/src/components-page/account-settings/email-and-auth/mfa-section.tsx +139 -0
- package/src/components-page/account-settings/email-and-auth/otp-section.tsx +102 -0
- package/src/components-page/account-settings/email-and-auth/passkey-section.tsx +112 -0
- package/src/components-page/account-settings/email-and-auth/password-section.tsx +174 -0
- package/src/components-page/account-settings/notifications/notifications-page.tsx +44 -0
- package/src/components-page/account-settings/page-layout.tsx +11 -0
- package/src/components-page/account-settings/payments/payments-page.tsx +73 -0
- package/src/components-page/account-settings/payments/payments-panel.tsx +543 -0
- package/src/components-page/account-settings/profile-page/profile-page.tsx +61 -0
- package/src/components-page/account-settings/section.tsx +26 -0
- package/src/components-page/account-settings/settings/delete-account-section.tsx +85 -0
- package/src/components-page/account-settings/settings/settings-page.tsx +19 -0
- package/src/components-page/account-settings/settings/sign-out-section.tsx +40 -0
- package/src/components-page/account-settings/teams/leave-team-section.tsx +57 -0
- package/src/components-page/account-settings/teams/team-api-keys-section.tsx +74 -0
- package/src/components-page/account-settings/teams/team-creation-page.tsx +92 -0
- package/src/components-page/account-settings/teams/team-display-name-section.tsx +31 -0
- package/src/components-page/account-settings/teams/team-member-invitation-section.tsx +128 -0
- package/src/components-page/account-settings/teams/team-member-list-section.tsx +59 -0
- package/src/components-page/account-settings/teams/team-page.tsx +28 -0
- package/src/components-page/account-settings/teams/team-profile-image-section.tsx +33 -0
- package/src/components-page/account-settings/teams/team-profile-user-section.tsx +29 -0
- package/src/components-page/account-settings.tsx +343 -0
- package/src/components-page/auth-page.tsx +206 -0
- package/src/components-page/cli-auth-confirm.test.tsx +204 -0
- package/src/components-page/cli-auth-confirm.tsx +278 -0
- package/src/components-page/email-verification.tsx +76 -0
- package/src/components-page/error-page.tsx +105 -0
- package/src/components-page/forgot-password.tsx +105 -0
- package/src/components-page/hexclave-handler-client.tsx +325 -0
- package/src/components-page/hexclave-handler.tsx +48 -0
- package/src/components-page/magic-link-callback.tsx +92 -0
- package/src/components-page/mfa.tsx +222 -0
- package/src/components-page/oauth-callback.tsx +78 -0
- package/src/components-page/onboarding.tsx +176 -0
- package/src/components-page/password-reset.tsx +185 -0
- package/src/components-page/section.tsx +27 -0
- package/src/components-page/sign-in.tsx +34 -0
- package/src/components-page/sign-out.tsx +37 -0
- package/src/components-page/sign-up.tsx +24 -0
- package/src/components-page/team-creation.tsx +78 -0
- package/src/components-page/team-invitation.tsx +150 -0
- package/src/dev-tool/dev-tool-core.ts +2460 -0
- package/src/dev-tool/dev-tool-styles.ts +2758 -0
- package/src/dev-tool/dev-tool-trigger-position.test.ts +113 -0
- package/src/dev-tool/dev-tool-trigger-position.ts +109 -0
- package/src/dev-tool/index.ts +149 -0
- package/src/generated/.gitignore +3 -0
- package/src/generated/quetzal-translations.ts +4312 -0
- package/src/global.css +13 -0
- package/src/global.d.ts +5 -0
- package/src/index.ts +39 -0
- package/src/integrations/convex/component/README.md +74 -0
- package/src/integrations/convex/component/convex.config.ts +9 -0
- package/src/integrations/convex.ts +28 -0
- package/src/lib/auth.test.ts +67 -0
- package/src/lib/auth.ts +175 -0
- package/src/lib/cookie.ts +421 -0
- package/src/lib/env.ts +93 -0
- package/src/lib/hexclave-app/api-keys/index.ts +73 -0
- package/src/lib/hexclave-app/apps/implementations/admin-app-impl.ts +1261 -0
- package/src/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.ts +141 -0
- package/src/lib/hexclave-app/apps/implementations/client-app-impl.oauth-prefetch.test.ts +36 -0
- package/src/lib/hexclave-app/apps/implementations/client-app-impl.ts +3912 -0
- package/src/lib/hexclave-app/apps/implementations/common.ts +244 -0
- package/src/lib/hexclave-app/apps/implementations/event-tracker.test.ts +105 -0
- package/src/lib/hexclave-app/apps/implementations/event-tracker.ts +306 -0
- package/src/lib/hexclave-app/apps/implementations/index.ts +35 -0
- package/src/lib/hexclave-app/apps/implementations/redirect-page-urls.ts +342 -0
- package/src/lib/hexclave-app/apps/implementations/server-app-impl.ts +1619 -0
- package/src/lib/hexclave-app/apps/implementations/session-refresh-subscription.test.ts +106 -0
- package/src/lib/hexclave-app/apps/implementations/session-refresh-subscription.ts +52 -0
- package/src/lib/hexclave-app/apps/implementations/session-replay.test.ts +33 -0
- package/src/lib/hexclave-app/apps/implementations/session-replay.ts +356 -0
- package/src/lib/hexclave-app/apps/index.ts +40 -0
- package/src/lib/hexclave-app/apps/interfaces/admin-app.ts +192 -0
- package/src/lib/hexclave-app/apps/interfaces/client-app.ts +180 -0
- package/src/lib/hexclave-app/apps/interfaces/server-app.ts +129 -0
- package/src/lib/hexclave-app/common.ts +216 -0
- package/src/lib/hexclave-app/connected-accounts/index.ts +49 -0
- package/src/lib/hexclave-app/contact-channels/index.ts +80 -0
- package/src/lib/hexclave-app/customers/index.ts +158 -0
- package/src/lib/hexclave-app/data-vault/index.ts +12 -0
- package/src/lib/hexclave-app/email/index.ts +280 -0
- package/src/lib/hexclave-app/email-templates/index.ts +24 -0
- package/src/lib/hexclave-app/index.ts +146 -0
- package/src/lib/hexclave-app/internal-api-keys/index.ts +55 -0
- package/src/lib/hexclave-app/notification-categories/index.ts +12 -0
- package/src/lib/hexclave-app/permissions/index.ts +75 -0
- package/src/lib/hexclave-app/project-configs/index.ts +103 -0
- package/src/lib/hexclave-app/projects/index.ts +236 -0
- package/src/lib/hexclave-app/session-replays/index.ts +72 -0
- package/src/lib/hexclave-app/teams/index.ts +206 -0
- package/src/lib/hexclave-app/url-targets.test.ts +253 -0
- package/src/lib/hexclave-app/url-targets.ts +395 -0
- package/src/lib/hexclave-app/users/index.ts +523 -0
- package/src/lib/hooks.tsx +63 -0
- package/src/lib/translations.tsx +23 -0
- package/src/providers/hexclave-context.tsx +20 -0
- package/src/providers/hexclave-provider-client.tsx +39 -0
- package/src/providers/hexclave-provider.tsx +48 -0
- package/src/providers/theme-provider.tsx +121 -0
- package/src/providers/translation-provider-client.tsx +35 -0
- package/src/providers/translation-provider.tsx +25 -0
- package/src/tanstack-start-server-context.d.ts +13 -0
- package/src/utils/browser-script.tsx +135 -0
- package/src/utils/constants.tsx +58 -0
- package/src/utils/url.ts +24 -0
- package/dist/components-page/stack-handler-client.d.ts.map +0 -1
- package/dist/components-page/stack-handler-client.js.map +0 -1
- package/dist/components-page/stack-handler.d.ts.map +0 -1
- package/dist/components-page/stack-handler.js.map +0 -1
- package/dist/esm/components-page/stack-handler-client.d.ts.map +0 -1
- package/dist/esm/components-page/stack-handler-client.js.map +0 -1
- package/dist/esm/components-page/stack-handler.d.ts.map +0 -1
- package/dist/esm/components-page/stack-handler.js.map +0 -1
- package/dist/esm/lib/stack-app/api-keys/index.js.map +0 -1
- package/dist/esm/lib/stack-app/apps/implementations/admin-app-impl.d.ts.map +0 -1
- package/dist/esm/lib/stack-app/apps/implementations/admin-app-impl.js.map +0 -1
- package/dist/esm/lib/stack-app/apps/implementations/client-app-impl.cross-domain.test.js.map +0 -1
- package/dist/esm/lib/stack-app/apps/implementations/client-app-impl.d.ts.map +0 -1
- package/dist/esm/lib/stack-app/apps/implementations/client-app-impl.js.map +0 -1
- package/dist/esm/lib/stack-app/apps/implementations/client-app-impl.oauth-prefetch.test.js.map +0 -1
- package/dist/esm/lib/stack-app/apps/implementations/common.js.map +0 -1
- package/dist/esm/lib/stack-app/apps/implementations/event-tracker.js.map +0 -1
- package/dist/esm/lib/stack-app/apps/implementations/event-tracker.test.js.map +0 -1
- package/dist/esm/lib/stack-app/apps/implementations/index.d.ts +0 -9
- package/dist/esm/lib/stack-app/apps/implementations/index.d.ts.map +0 -1
- package/dist/esm/lib/stack-app/apps/implementations/index.js +0 -27
- package/dist/esm/lib/stack-app/apps/implementations/index.js.map +0 -1
- package/dist/esm/lib/stack-app/apps/implementations/redirect-page-urls.js.map +0 -1
- package/dist/esm/lib/stack-app/apps/implementations/server-app-impl.js.map +0 -1
- package/dist/esm/lib/stack-app/apps/implementations/session-refresh-subscription.js.map +0 -1
- package/dist/esm/lib/stack-app/apps/implementations/session-refresh-subscription.test.js.map +0 -1
- package/dist/esm/lib/stack-app/apps/implementations/session-replay.js.map +0 -1
- package/dist/esm/lib/stack-app/apps/implementations/session-replay.test.js.map +0 -1
- package/dist/esm/lib/stack-app/apps/interfaces/admin-app.js.map +0 -1
- package/dist/esm/lib/stack-app/apps/interfaces/client-app.js.map +0 -1
- package/dist/esm/lib/stack-app/apps/interfaces/server-app.js.map +0 -1
- package/dist/esm/lib/stack-app/common.js +0 -7
- package/dist/esm/lib/stack-app/common.js.map +0 -1
- package/dist/esm/lib/stack-app/contact-channels/index.js.map +0 -1
- package/dist/esm/lib/stack-app/email-templates/index.js.map +0 -1
- package/dist/esm/lib/stack-app/internal-api-keys/index.js.map +0 -1
- package/dist/esm/lib/stack-app/permissions/index.js.map +0 -1
- package/dist/esm/lib/stack-app/projects/index.js.map +0 -1
- package/dist/esm/lib/stack-app/teams/index.js.map +0 -1
- package/dist/esm/lib/stack-app/url-targets.js.map +0 -1
- package/dist/esm/lib/stack-app/url-targets.test.js.map +0 -1
- package/dist/esm/lib/stack-app/users/index.js.map +0 -1
- package/dist/esm/providers/stack-context.d.ts +0 -11
- package/dist/esm/providers/stack-context.d.ts.map +0 -1
- package/dist/esm/providers/stack-context.js +0 -12
- package/dist/esm/providers/stack-context.js.map +0 -1
- package/dist/esm/providers/stack-provider-client.d.ts.map +0 -1
- package/dist/esm/providers/stack-provider-client.js +0 -30
- package/dist/esm/providers/stack-provider-client.js.map +0 -1
- package/dist/esm/providers/stack-provider.d.ts.map +0 -1
- package/dist/esm/providers/stack-provider.js.map +0 -1
- package/dist/lib/stack-app/api-keys/index.d.ts.map +0 -1
- package/dist/lib/stack-app/api-keys/index.js.map +0 -1
- package/dist/lib/stack-app/apps/implementations/admin-app-impl.d.ts.map +0 -1
- package/dist/lib/stack-app/apps/implementations/admin-app-impl.js.map +0 -1
- package/dist/lib/stack-app/apps/implementations/client-app-impl.cross-domain.test.js.map +0 -1
- package/dist/lib/stack-app/apps/implementations/client-app-impl.d.ts.map +0 -1
- package/dist/lib/stack-app/apps/implementations/client-app-impl.js.map +0 -1
- package/dist/lib/stack-app/apps/implementations/client-app-impl.oauth-prefetch.test.js.map +0 -1
- package/dist/lib/stack-app/apps/implementations/common.d.ts.map +0 -1
- package/dist/lib/stack-app/apps/implementations/common.js.map +0 -1
- package/dist/lib/stack-app/apps/implementations/event-tracker.d.ts.map +0 -1
- package/dist/lib/stack-app/apps/implementations/event-tracker.js.map +0 -1
- package/dist/lib/stack-app/apps/implementations/event-tracker.test.js.map +0 -1
- package/dist/lib/stack-app/apps/implementations/index.d.ts +0 -9
- package/dist/lib/stack-app/apps/implementations/index.d.ts.map +0 -1
- package/dist/lib/stack-app/apps/implementations/index.js +0 -31
- package/dist/lib/stack-app/apps/implementations/index.js.map +0 -1
- package/dist/lib/stack-app/apps/implementations/redirect-page-urls.d.ts.map +0 -1
- package/dist/lib/stack-app/apps/implementations/redirect-page-urls.js.map +0 -1
- package/dist/lib/stack-app/apps/implementations/server-app-impl.d.ts.map +0 -1
- package/dist/lib/stack-app/apps/implementations/server-app-impl.js.map +0 -1
- package/dist/lib/stack-app/apps/implementations/session-refresh-subscription.d.ts.map +0 -1
- package/dist/lib/stack-app/apps/implementations/session-refresh-subscription.js.map +0 -1
- package/dist/lib/stack-app/apps/implementations/session-refresh-subscription.test.js.map +0 -1
- package/dist/lib/stack-app/apps/implementations/session-replay.d.ts.map +0 -1
- package/dist/lib/stack-app/apps/implementations/session-replay.js.map +0 -1
- package/dist/lib/stack-app/apps/implementations/session-replay.test.js.map +0 -1
- package/dist/lib/stack-app/apps/interfaces/admin-app.d.ts.map +0 -1
- package/dist/lib/stack-app/apps/interfaces/admin-app.js.map +0 -1
- package/dist/lib/stack-app/apps/interfaces/client-app.d.ts.map +0 -1
- package/dist/lib/stack-app/apps/interfaces/client-app.js.map +0 -1
- package/dist/lib/stack-app/apps/interfaces/server-app.d.ts.map +0 -1
- package/dist/lib/stack-app/apps/interfaces/server-app.js.map +0 -1
- package/dist/lib/stack-app/common.d.ts.map +0 -1
- package/dist/lib/stack-app/common.js +0 -9
- package/dist/lib/stack-app/common.js.map +0 -1
- package/dist/lib/stack-app/connected-accounts/index.d.ts.map +0 -1
- package/dist/lib/stack-app/contact-channels/index.d.ts.map +0 -1
- package/dist/lib/stack-app/contact-channels/index.js.map +0 -1
- package/dist/lib/stack-app/customers/index.d.ts.map +0 -1
- package/dist/lib/stack-app/data-vault/index.d.ts.map +0 -1
- package/dist/lib/stack-app/email/index.d.ts.map +0 -1
- package/dist/lib/stack-app/email-templates/index.d.ts.map +0 -1
- package/dist/lib/stack-app/email-templates/index.js.map +0 -1
- package/dist/lib/stack-app/internal-api-keys/index.d.ts.map +0 -1
- package/dist/lib/stack-app/internal-api-keys/index.js.map +0 -1
- package/dist/lib/stack-app/notification-categories/index.d.ts.map +0 -1
- package/dist/lib/stack-app/permissions/index.d.ts.map +0 -1
- package/dist/lib/stack-app/permissions/index.js.map +0 -1
- package/dist/lib/stack-app/project-configs/index.d.ts.map +0 -1
- package/dist/lib/stack-app/projects/index.d.ts.map +0 -1
- package/dist/lib/stack-app/projects/index.js.map +0 -1
- package/dist/lib/stack-app/session-replays/index.d.ts.map +0 -1
- package/dist/lib/stack-app/teams/index.d.ts.map +0 -1
- package/dist/lib/stack-app/teams/index.js.map +0 -1
- package/dist/lib/stack-app/url-targets.d.ts.map +0 -1
- package/dist/lib/stack-app/url-targets.js.map +0 -1
- package/dist/lib/stack-app/url-targets.test.js.map +0 -1
- package/dist/lib/stack-app/users/index.d.ts.map +0 -1
- package/dist/lib/stack-app/users/index.js.map +0 -1
- package/dist/providers/stack-context.d.ts +0 -11
- package/dist/providers/stack-context.d.ts.map +0 -1
- package/dist/providers/stack-context.js +0 -15
- package/dist/providers/stack-context.js.map +0 -1
- package/dist/providers/stack-provider-client.d.ts.map +0 -1
- package/dist/providers/stack-provider-client.js.map +0 -1
- package/dist/providers/stack-provider.d.ts.map +0 -1
- package/dist/providers/stack-provider.js.map +0 -1
- /package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/client-app-impl.cross-domain.test.d.ts +0 -0
- /package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/client-app-impl.oauth-prefetch.test.d.ts +0 -0
- /package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/event-tracker.test.d.ts +0 -0
- /package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/session-refresh-subscription.test.d.ts +0 -0
- /package/dist/esm/lib/{stack-app → hexclave-app}/apps/implementations/session-replay.test.d.ts +0 -0
- /package/dist/esm/lib/{stack-app → hexclave-app}/apps/index.d.ts +0 -0
- /package/dist/esm/lib/{stack-app → hexclave-app}/apps/index.js +0 -0
- /package/dist/esm/lib/{stack-app → hexclave-app}/connected-accounts/index.js +0 -0
- /package/dist/esm/lib/{stack-app → hexclave-app}/customers/index.js +0 -0
- /package/dist/esm/lib/{stack-app → hexclave-app}/data-vault/index.js +0 -0
- /package/dist/esm/lib/{stack-app → hexclave-app}/email/index.js +0 -0
- /package/dist/esm/lib/{stack-app → hexclave-app}/notification-categories/index.js +0 -0
- /package/dist/esm/lib/{stack-app → hexclave-app}/project-configs/index.js +0 -0
- /package/dist/esm/lib/{stack-app → hexclave-app}/session-replays/index.js +0 -0
- /package/dist/esm/lib/{stack-app → hexclave-app}/url-targets.test.d.ts +0 -0
- /package/dist/lib/{stack-app → hexclave-app}/apps/implementations/client-app-impl.cross-domain.test.d.ts +0 -0
- /package/dist/lib/{stack-app → hexclave-app}/apps/implementations/client-app-impl.oauth-prefetch.test.d.ts +0 -0
- /package/dist/lib/{stack-app → hexclave-app}/apps/implementations/event-tracker.test.d.ts +0 -0
- /package/dist/lib/{stack-app → hexclave-app}/apps/implementations/session-refresh-subscription.test.d.ts +0 -0
- /package/dist/lib/{stack-app → hexclave-app}/apps/implementations/session-replay.test.d.ts +0 -0
- /package/dist/lib/{stack-app → hexclave-app}/apps/index.d.ts +0 -0
- /package/dist/lib/{stack-app → hexclave-app}/apps/index.js +0 -0
- /package/dist/lib/{stack-app → hexclave-app}/connected-accounts/index.js +0 -0
- /package/dist/lib/{stack-app → hexclave-app}/customers/index.js +0 -0
- /package/dist/lib/{stack-app → hexclave-app}/data-vault/index.js +0 -0
- /package/dist/lib/{stack-app → hexclave-app}/email/index.js +0 -0
- /package/dist/lib/{stack-app → hexclave-app}/notification-categories/index.js +0 -0
- /package/dist/lib/{stack-app → hexclave-app}/project-configs/index.js +0 -0
- /package/dist/lib/{stack-app → hexclave-app}/session-replays/index.js +0 -0
- /package/dist/lib/{stack-app → hexclave-app}/url-targets.test.d.ts +0 -0
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
|
|
2
|
+
//===========================================
|
|
3
|
+
// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template
|
|
4
|
+
//===========================================
|
|
5
|
+
import { KnownErrors } from "@hexclave/shared";
|
|
6
|
+
import { CurrentUserCrud } from "@hexclave/shared/dist/interface/crud/current-user";
|
|
7
|
+
import { UsersCrud } from "@hexclave/shared/dist/interface/crud/users";
|
|
8
|
+
import type { RestrictedReason } from "@hexclave/shared/dist/schema-fields";
|
|
9
|
+
import { InternalSession } from "@hexclave/shared/dist/sessions";
|
|
10
|
+
import { encodeBase64 } from "@hexclave/shared/dist/utils/bytes";
|
|
11
|
+
import { GeoInfo } from "@hexclave/shared/dist/utils/geo";
|
|
12
|
+
import { ReadonlyJson } from "@hexclave/shared/dist/utils/json";
|
|
13
|
+
import { ProviderType } from "@hexclave/shared/dist/utils/oauth";
|
|
14
|
+
import { Result } from "@hexclave/shared/dist/utils/results";
|
|
15
|
+
import { ApiKeyCreationOptions, UserApiKey, UserApiKeyFirstView } from "../api-keys";
|
|
16
|
+
import { AsyncStoreProperty, AuthLike } from "../common";
|
|
17
|
+
import { DeprecatedOAuthConnection, OAuthConnection } from "../connected-accounts";
|
|
18
|
+
import { ContactChannel, ContactChannelCreateOptions, ServerContactChannel, ServerContactChannelCreateOptions } from "../contact-channels";
|
|
19
|
+
import { Customer } from "../customers";
|
|
20
|
+
import { NotificationCategory } from "../notification-categories";
|
|
21
|
+
import { AdminTeamPermission, TeamPermission } from "../permissions";
|
|
22
|
+
import { AdminOwnedProject, AdminProjectCreateOptions } from "../projects";
|
|
23
|
+
import { EditableTeamMemberProfile, ReceivedTeamInvitation, ServerListTeamsOptions, ServerTeam, ServerTeamCreateOptions, Team, TeamCreateOptions } from "../teams";
|
|
24
|
+
|
|
25
|
+
const userGetterErrorMessage = "Hexclave: useUser() already returns the user object. Use `const user = useUser()` (or `const user = await app.getUser()`) instead of destructuring it like `const { user } = ...`.";
|
|
26
|
+
|
|
27
|
+
export function withUserDestructureGuard<T extends object>(target: T): T {
|
|
28
|
+
Object.freeze(target);
|
|
29
|
+
return new Proxy(target, {
|
|
30
|
+
get(target, prop, receiver) {
|
|
31
|
+
if (prop === "user") {
|
|
32
|
+
return guardGetter();
|
|
33
|
+
}
|
|
34
|
+
return target[prop as keyof T];
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function guardGetter(): never {
|
|
40
|
+
throw new Error(userGetterErrorMessage);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type OAuthProvider = {
|
|
44
|
+
readonly id: string,
|
|
45
|
+
readonly type: string,
|
|
46
|
+
readonly userId: string,
|
|
47
|
+
readonly accountId?: string,
|
|
48
|
+
readonly email?: string,
|
|
49
|
+
readonly allowSignIn: boolean,
|
|
50
|
+
readonly allowConnectedAccounts: boolean,
|
|
51
|
+
update(data: { allowSignIn?: boolean, allowConnectedAccounts?: boolean }): Promise<Result<void,
|
|
52
|
+
InstanceType<typeof KnownErrors.OAuthProviderAccountIdAlreadyUsedForSignIn>
|
|
53
|
+
>>,
|
|
54
|
+
delete(): Promise<void>,
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export type ServerOAuthProvider = {
|
|
58
|
+
readonly id: string,
|
|
59
|
+
readonly type: string,
|
|
60
|
+
readonly userId: string,
|
|
61
|
+
readonly accountId: string,
|
|
62
|
+
readonly email?: string,
|
|
63
|
+
readonly allowSignIn: boolean,
|
|
64
|
+
readonly allowConnectedAccounts: boolean,
|
|
65
|
+
update(data: { accountId?: string, email?: string, allowSignIn?: boolean, allowConnectedAccounts?: boolean }): Promise<Result<void,
|
|
66
|
+
InstanceType<typeof KnownErrors.OAuthProviderAccountIdAlreadyUsedForSignIn>
|
|
67
|
+
>>,
|
|
68
|
+
delete(): Promise<void>,
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Contains everything related to the current user session.
|
|
74
|
+
*/
|
|
75
|
+
export type Auth = AuthLike<{}> & {
|
|
76
|
+
readonly _internalSession: InternalSession,
|
|
77
|
+
readonly currentSession: {
|
|
78
|
+
getTokens(): Promise<{ accessToken: string | null, refreshToken: string | null }>,
|
|
79
|
+
useTokens(): { accessToken: string | null, refreshToken: string | null }, // THIS_LINE_PLATFORM react-like
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* ```
|
|
85
|
+
* +----------+-------------+-------------------+
|
|
86
|
+
* | \ | !Server | Server |
|
|
87
|
+
* +----------+-------------+-------------------+
|
|
88
|
+
* | !Session | User | ServerUser |
|
|
89
|
+
* | Session | CurrentUser | CurrentServerUser |
|
|
90
|
+
* +----------+-------------+-------------------+
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
93
|
+
* The fields on each of these types are available iff:
|
|
94
|
+
* BaseUser: true
|
|
95
|
+
* Auth: Session
|
|
96
|
+
* ServerBaseUser: Server
|
|
97
|
+
* UserExtra: Session OR Server
|
|
98
|
+
*
|
|
99
|
+
* The types are defined as follows (in the typescript manner):
|
|
100
|
+
* User = BaseUser
|
|
101
|
+
* CurrentUser = BaseUser & Auth & UserExtra
|
|
102
|
+
* ServerUser = BaseUser & ServerBaseUser & UserExtra
|
|
103
|
+
* CurrentServerUser = BaseUser & ServerBaseUser & Auth & UserExtra
|
|
104
|
+
**/
|
|
105
|
+
|
|
106
|
+
export type BaseUser = {
|
|
107
|
+
readonly id: string,
|
|
108
|
+
|
|
109
|
+
readonly displayName: string | null,
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The user's email address.
|
|
113
|
+
*
|
|
114
|
+
* Note: This might NOT be unique across multiple users, so always use `id` for unique identification.
|
|
115
|
+
*/
|
|
116
|
+
readonly primaryEmail: string | null,
|
|
117
|
+
readonly primaryEmailVerified: boolean,
|
|
118
|
+
readonly profileImageUrl: string | null,
|
|
119
|
+
|
|
120
|
+
readonly signedUpAt: Date,
|
|
121
|
+
|
|
122
|
+
readonly clientMetadata: any,
|
|
123
|
+
readonly clientReadOnlyMetadata: any,
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Whether the user has a password set.
|
|
127
|
+
*/
|
|
128
|
+
readonly hasPassword: boolean,
|
|
129
|
+
readonly otpAuthEnabled: boolean,
|
|
130
|
+
readonly passkeyAuthEnabled: boolean,
|
|
131
|
+
|
|
132
|
+
readonly isMultiFactorRequired: boolean,
|
|
133
|
+
readonly isAnonymous: boolean,
|
|
134
|
+
/**
|
|
135
|
+
* Whether the user is in restricted state (signed up but hasn't completed onboarding requirements).
|
|
136
|
+
* For example, if email verification is required but the user hasn't verified their email yet.
|
|
137
|
+
*/
|
|
138
|
+
readonly isRestricted: boolean,
|
|
139
|
+
/**
|
|
140
|
+
* The reason why the user is restricted, e.g., { type: "email_not_verified" }, { type: "anonymous" }, or { type: "restricted_by_administrator" }.
|
|
141
|
+
* Null if the user is not restricted.
|
|
142
|
+
*/
|
|
143
|
+
readonly restrictedReason: RestrictedReason | null,
|
|
144
|
+
toClientJson(): CurrentUserCrud["Client"]["Read"],
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @deprecated, use contact channel's usedForAuth instead
|
|
148
|
+
*/
|
|
149
|
+
readonly emailAuthEnabled: boolean,
|
|
150
|
+
/**
|
|
151
|
+
* @deprecated
|
|
152
|
+
*/
|
|
153
|
+
readonly oauthProviders: readonly { id: string }[],
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export type UserExtra = {
|
|
157
|
+
setDisplayName(displayName: string | null): Promise<void>,
|
|
158
|
+
/** @deprecated Use contact channel's sendVerificationEmail instead */
|
|
159
|
+
sendVerificationEmail(): Promise<KnownErrors["EmailAlreadyVerified"] | void>,
|
|
160
|
+
setClientMetadata(metadata: any): Promise<void>,
|
|
161
|
+
updatePassword(options: { oldPassword: string, newPassword: string}): Promise<KnownErrors["PasswordConfirmationMismatch"] | KnownErrors["PasswordRequirementsNotMet"] | void>,
|
|
162
|
+
setPassword(options: { password: string }): Promise<KnownErrors["PasswordRequirementsNotMet"] | void>,
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* A shorthand method to update multiple fields of the user at once.
|
|
166
|
+
*/
|
|
167
|
+
update(update: UserUpdateOptions): Promise<void>,
|
|
168
|
+
|
|
169
|
+
useContactChannels(): ContactChannel[], // THIS_LINE_PLATFORM react-like
|
|
170
|
+
listContactChannels(): Promise<ContactChannel[]>,
|
|
171
|
+
createContactChannel(data: ContactChannelCreateOptions): Promise<ContactChannel>,
|
|
172
|
+
|
|
173
|
+
useNotificationCategories(): NotificationCategory[], // THIS_LINE_PLATFORM react-like
|
|
174
|
+
listNotificationCategories(): Promise<NotificationCategory[]>,
|
|
175
|
+
|
|
176
|
+
delete(): Promise<void>,
|
|
177
|
+
|
|
178
|
+
/** @deprecated Use `getOrLinkConnectedAccount` for redirect behavior, or `getConnectedAccount({ provider, providerAccountId })` for existence check. */
|
|
179
|
+
getConnectedAccount(id: ProviderType, options: { or: 'redirect', scopes?: string[] }): Promise<DeprecatedOAuthConnection>,
|
|
180
|
+
/** @deprecated Use `getConnectedAccount({ provider, providerAccountId })` for existence check, or `getOrLinkConnectedAccount` for redirect behavior. */
|
|
181
|
+
getConnectedAccount(id: ProviderType, options?: { or?: 'redirect' | 'throw' | 'return-null', scopes?: string[] }): Promise<DeprecatedOAuthConnection | null>,
|
|
182
|
+
/** Get a specific connected account by provider and providerAccountId. Returns null if not found. */
|
|
183
|
+
getConnectedAccount(account: { provider: string, providerAccountId: string }): Promise<OAuthConnection | null>,
|
|
184
|
+
|
|
185
|
+
/** @deprecated Use `useOrLinkConnectedAccount` for redirect behavior, or `useConnectedAccount({ provider, providerAccountId })` for existence check. */
|
|
186
|
+
useConnectedAccount(id: ProviderType, options: { or: 'redirect', scopes?: string[] }): DeprecatedOAuthConnection,
|
|
187
|
+
/** @deprecated Use `useConnectedAccount({ provider, providerAccountId })` for existence check, or `useOrLinkConnectedAccount` for redirect behavior. */
|
|
188
|
+
useConnectedAccount(id: ProviderType, options?: { or?: 'redirect' | 'throw' | 'return-null', scopes?: string[] }): DeprecatedOAuthConnection | null,
|
|
189
|
+
/** Get a specific connected account by provider and providerAccountId. Returns null if not found. */
|
|
190
|
+
useConnectedAccount(account: { provider: string, providerAccountId: string }): OAuthConnection | null,
|
|
191
|
+
|
|
192
|
+
/** List all connected accounts for this user (only those with allowConnectedAccounts enabled). */
|
|
193
|
+
listConnectedAccounts(): Promise<OAuthConnection[]>,
|
|
194
|
+
/** React hook to list all connected accounts. */
|
|
195
|
+
useConnectedAccounts(): OAuthConnection[], // THIS_LINE_PLATFORM react-like
|
|
196
|
+
/** Redirect the user to the OAuth flow to link a new connected account. Always redirects, never returns. */
|
|
197
|
+
linkConnectedAccount(provider: string, options?: { scopes?: string[] }): Promise<void>,
|
|
198
|
+
/** Get a connected account for the given provider, or redirect to link one if none exists or the token/scopes are insufficient. */
|
|
199
|
+
getOrLinkConnectedAccount(provider: string, options?: { scopes?: string[] }): Promise<OAuthConnection>,
|
|
200
|
+
/** React hook: get a connected account for the given provider, or redirect to link one if none exists or the token/scopes are insufficient. */
|
|
201
|
+
useOrLinkConnectedAccount(provider: string, options?: { scopes?: string[] }): OAuthConnection, // THIS_LINE_PLATFORM react-like
|
|
202
|
+
|
|
203
|
+
hasPermission(scope: Team, permissionId: string): Promise<boolean>,
|
|
204
|
+
hasPermission(permissionId: string): Promise<boolean>,
|
|
205
|
+
|
|
206
|
+
getPermission(scope: Team, permissionId: string): Promise<TeamPermission | null>,
|
|
207
|
+
getPermission(permissionId: string): Promise<TeamPermission | null>,
|
|
208
|
+
|
|
209
|
+
listPermissions(scope: Team, options?: { recursive?: boolean }): Promise<TeamPermission[]>,
|
|
210
|
+
listPermissions(options?: { recursive?: boolean }): Promise<TeamPermission[]>,
|
|
211
|
+
|
|
212
|
+
usePermissions(scope: Team, options?: { recursive?: boolean }): TeamPermission[],
|
|
213
|
+
usePermissions(options?: { recursive?: boolean }): TeamPermission[],
|
|
214
|
+
|
|
215
|
+
usePermission(scope: Team, permissionId: string): TeamPermission | null,
|
|
216
|
+
usePermission(permissionId: string): TeamPermission | null,
|
|
217
|
+
|
|
218
|
+
readonly selectedTeam: Team | null,
|
|
219
|
+
setSelectedTeam(teamOrId: string | Team | null): Promise<void>,
|
|
220
|
+
createTeam(data: TeamCreateOptions): Promise<Team>,
|
|
221
|
+
leaveTeam(team: Team): Promise<void>,
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Lists all pending team invitations sent to any of the current user's verified email addresses.
|
|
225
|
+
*
|
|
226
|
+
* This allows the user to discover which teams have invited them, even if they haven't
|
|
227
|
+
* joined those teams yet. Only invitations sent to verified email addresses are included.
|
|
228
|
+
*
|
|
229
|
+
* @returns An array of `ReceivedTeamInvitation` objects, each containing the team ID, team
|
|
230
|
+
* display name, recipient email, and expiration date.
|
|
231
|
+
*
|
|
232
|
+
* @example
|
|
233
|
+
* ```ts
|
|
234
|
+
* const invitations = await user.listTeamInvitations();
|
|
235
|
+
* for (const invitation of invitations) {
|
|
236
|
+
* console.log(`Invited to ${invitation.teamDisplayName} via ${invitation.recipientEmail}`);
|
|
237
|
+
* }
|
|
238
|
+
* ```
|
|
239
|
+
*/
|
|
240
|
+
listTeamInvitations(): Promise<ReceivedTeamInvitation[]>,
|
|
241
|
+
/**
|
|
242
|
+
* Lists all pending team invitations sent to any of the current user's verified email addresses.
|
|
243
|
+
*
|
|
244
|
+
* React hook version of `listTeamInvitations()`. Automatically re-renders when invitations change.
|
|
245
|
+
*/
|
|
246
|
+
useTeamInvitations(): ReceivedTeamInvitation[], // THIS_LINE_PLATFORM react-like
|
|
247
|
+
|
|
248
|
+
getActiveSessions(): Promise<ActiveSession[]>,
|
|
249
|
+
revokeSession(sessionId: string): Promise<void>,
|
|
250
|
+
getTeamProfile(team: Team): Promise<EditableTeamMemberProfile>,
|
|
251
|
+
useTeamProfile(team: Team): EditableTeamMemberProfile, // THIS_LINE_PLATFORM react-like
|
|
252
|
+
|
|
253
|
+
createApiKey(options: ApiKeyCreationOptions<"user">): Promise<UserApiKeyFirstView>,
|
|
254
|
+
|
|
255
|
+
useOAuthProviders(): OAuthProvider[], // THIS_LINE_PLATFORM react-like
|
|
256
|
+
listOAuthProviders(): Promise<OAuthProvider[]>,
|
|
257
|
+
|
|
258
|
+
useOAuthProvider(id: string): OAuthProvider | null, // THIS_LINE_PLATFORM react-like
|
|
259
|
+
getOAuthProvider(id: string): Promise<OAuthProvider | null>,
|
|
260
|
+
|
|
261
|
+
registerPasskey(options?: { hostname?: string }): Promise<Result<undefined, KnownErrors["PasskeyRegistrationFailed"] | KnownErrors["PasskeyWebAuthnError"]>>,
|
|
262
|
+
}
|
|
263
|
+
& AsyncStoreProperty<"apiKeys", [], UserApiKey[], true>
|
|
264
|
+
& AsyncStoreProperty<"team", [id: string], Team | null, false>
|
|
265
|
+
& AsyncStoreProperty<"teams", [], Team[], true>
|
|
266
|
+
& AsyncStoreProperty<"teamInvitations", [], ReceivedTeamInvitation[], true>
|
|
267
|
+
& AsyncStoreProperty<"permission", [scope: Team, permissionId: string, options?: { recursive?: boolean }], TeamPermission | null, false>
|
|
268
|
+
& AsyncStoreProperty<"permissions", [scope: Team, options?: { recursive?: boolean }], TeamPermission[], true>;
|
|
269
|
+
|
|
270
|
+
export type InternalUserExtra =
|
|
271
|
+
& {
|
|
272
|
+
createProject(newProject: AdminProjectCreateOptions): Promise<AdminOwnedProject>,
|
|
273
|
+
transferProject(projectIdToTransfer: string, newTeamId: string): Promise<void>,
|
|
274
|
+
}
|
|
275
|
+
& AsyncStoreProperty<"ownedProjects", [], AdminOwnedProject[], true>
|
|
276
|
+
|
|
277
|
+
export type User = BaseUser;
|
|
278
|
+
|
|
279
|
+
export type CurrentUser = BaseUser & Auth & UserExtra & Customer;
|
|
280
|
+
|
|
281
|
+
export type CurrentInternalUser = CurrentUser & InternalUserExtra;
|
|
282
|
+
|
|
283
|
+
export type ProjectCurrentUser<ProjectId> = ProjectId extends "internal" ? CurrentInternalUser : CurrentUser;
|
|
284
|
+
|
|
285
|
+
export type TokenPartialUser = Pick<
|
|
286
|
+
User,
|
|
287
|
+
| "id"
|
|
288
|
+
| "displayName"
|
|
289
|
+
| "primaryEmail"
|
|
290
|
+
| "primaryEmailVerified"
|
|
291
|
+
| "isAnonymous"
|
|
292
|
+
| "isMultiFactorRequired"
|
|
293
|
+
| "isRestricted"
|
|
294
|
+
| "restrictedReason"
|
|
295
|
+
>
|
|
296
|
+
|
|
297
|
+
export type SyncedPartialUser = TokenPartialUser & Pick<
|
|
298
|
+
User,
|
|
299
|
+
| "id"
|
|
300
|
+
| "displayName"
|
|
301
|
+
| "primaryEmail"
|
|
302
|
+
| "primaryEmailVerified"
|
|
303
|
+
| "profileImageUrl"
|
|
304
|
+
| "signedUpAt"
|
|
305
|
+
| "clientMetadata"
|
|
306
|
+
| "clientReadOnlyMetadata"
|
|
307
|
+
| "isAnonymous"
|
|
308
|
+
| "hasPassword"
|
|
309
|
+
| "isRestricted"
|
|
310
|
+
| "restrictedReason"
|
|
311
|
+
>;
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
export type ActiveSession = {
|
|
315
|
+
id: string,
|
|
316
|
+
userId: string,
|
|
317
|
+
createdAt: Date,
|
|
318
|
+
isImpersonation: boolean,
|
|
319
|
+
lastUsedAt: Date | undefined,
|
|
320
|
+
isCurrentSession: boolean,
|
|
321
|
+
geoInfo?: GeoInfo,
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
export type UserUpdateOptions = {
|
|
325
|
+
displayName?: string | null,
|
|
326
|
+
clientMetadata?: ReadonlyJson,
|
|
327
|
+
selectedTeamId?: string | null,
|
|
328
|
+
totpMultiFactorSecret?: Uint8Array | null,
|
|
329
|
+
profileImageUrl?: string | null,
|
|
330
|
+
otpAuthEnabled?: boolean,
|
|
331
|
+
passkeyAuthEnabled?: boolean,
|
|
332
|
+
primaryEmail?: string | null,
|
|
333
|
+
}
|
|
334
|
+
export function userUpdateOptionsToCrud(options: UserUpdateOptions): CurrentUserCrud["Client"]["Update"] {
|
|
335
|
+
return {
|
|
336
|
+
display_name: options.displayName,
|
|
337
|
+
client_metadata: options.clientMetadata,
|
|
338
|
+
selected_team_id: options.selectedTeamId,
|
|
339
|
+
totp_secret_base64: options.totpMultiFactorSecret != null ? encodeBase64(options.totpMultiFactorSecret) : options.totpMultiFactorSecret,
|
|
340
|
+
profile_image_url: options.profileImageUrl,
|
|
341
|
+
otp_auth_enabled: options.otpAuthEnabled,
|
|
342
|
+
passkey_auth_enabled: options.passkeyAuthEnabled,
|
|
343
|
+
primary_email: options.primaryEmail,
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
export type ServerBaseUser = {
|
|
349
|
+
setPrimaryEmail(email: string | null, options?: { verified?: boolean | undefined }): Promise<void>,
|
|
350
|
+
|
|
351
|
+
readonly lastActiveAt: Date,
|
|
352
|
+
|
|
353
|
+
readonly serverMetadata: any,
|
|
354
|
+
setServerMetadata(metadata: any): Promise<void>,
|
|
355
|
+
setClientReadOnlyMetadata(metadata: any): Promise<void>,
|
|
356
|
+
|
|
357
|
+
/** Whether the user is restricted by an administrator. Can be set manually or by sign-up rules. */
|
|
358
|
+
readonly restrictedByAdmin: boolean,
|
|
359
|
+
/** Public reason shown to the user explaining why they are restricted. Optional. */
|
|
360
|
+
readonly restrictedByAdminReason: string | null,
|
|
361
|
+
/** Private details about the restriction (e.g., which sign-up rule triggered). Only visible to server access and above. */
|
|
362
|
+
readonly restrictedByAdminPrivateDetails: string | null,
|
|
363
|
+
/** Best-effort ISO country code captured at sign-up time from request geo headers. */
|
|
364
|
+
readonly countryCode: string | null,
|
|
365
|
+
/** Server-only risk scores used during sign-up risk evaluation. */
|
|
366
|
+
readonly riskScores: {
|
|
367
|
+
readonly signUp: {
|
|
368
|
+
readonly bot: number,
|
|
369
|
+
readonly freeTrialAbuse: number,
|
|
370
|
+
},
|
|
371
|
+
},
|
|
372
|
+
|
|
373
|
+
createTeam(data: Omit<ServerTeamCreateOptions, "creatorUserId">): Promise<ServerTeam>,
|
|
374
|
+
|
|
375
|
+
useContactChannels(): ServerContactChannel[], // THIS_LINE_PLATFORM react-like
|
|
376
|
+
listContactChannels(): Promise<ServerContactChannel[]>,
|
|
377
|
+
createContactChannel(data: ServerContactChannelCreateOptions): Promise<ServerContactChannel>,
|
|
378
|
+
|
|
379
|
+
update(user: ServerUserUpdateOptions): Promise<void>,
|
|
380
|
+
|
|
381
|
+
grantPermission(scope: Team, permissionId: string): Promise<void>,
|
|
382
|
+
grantPermission(permissionId: string): Promise<void>,
|
|
383
|
+
|
|
384
|
+
revokePermission(scope: Team, permissionId: string): Promise<void>,
|
|
385
|
+
revokePermission(permissionId: string): Promise<void>,
|
|
386
|
+
|
|
387
|
+
getPermission(scope: Team, permissionId: string): Promise<TeamPermission | null>,
|
|
388
|
+
getPermission(permissionId: string): Promise<TeamPermission | null>,
|
|
389
|
+
|
|
390
|
+
hasPermission(scope: Team, permissionId: string): Promise<boolean>,
|
|
391
|
+
hasPermission(permissionId: string): Promise<boolean>,
|
|
392
|
+
|
|
393
|
+
listPermissions(scope: Team, options?: { recursive?: boolean }): Promise<TeamPermission[]>,
|
|
394
|
+
listPermissions(options?: { recursive?: boolean }): Promise<TeamPermission[]>,
|
|
395
|
+
|
|
396
|
+
usePermissions(scope: Team, options?: { recursive?: boolean }): TeamPermission[],
|
|
397
|
+
usePermissions(options?: { recursive?: boolean }): TeamPermission[],
|
|
398
|
+
|
|
399
|
+
usePermission(scope: Team, permissionId: string): TeamPermission | null,
|
|
400
|
+
usePermission(permissionId: string): TeamPermission | null,
|
|
401
|
+
|
|
402
|
+
useOAuthProviders(): ServerOAuthProvider[], // THIS_LINE_PLATFORM react-like
|
|
403
|
+
listOAuthProviders(): Promise<ServerOAuthProvider[]>,
|
|
404
|
+
|
|
405
|
+
useOAuthProvider(id: string): ServerOAuthProvider | null, // THIS_LINE_PLATFORM react-like
|
|
406
|
+
getOAuthProvider(id: string): Promise<ServerOAuthProvider | null>,
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Creates a new session object with a refresh token for this user. Can be used to impersonate them.
|
|
410
|
+
*/
|
|
411
|
+
createSession(options?: { expiresInMillis?: number, isImpersonation?: boolean }): Promise<{
|
|
412
|
+
getTokens(): Promise<{ accessToken: string | null, refreshToken: string | null }>,
|
|
413
|
+
}>,
|
|
414
|
+
}
|
|
415
|
+
& AsyncStoreProperty<"team", [id: string], ServerTeam | null, false>
|
|
416
|
+
& AsyncStoreProperty<"teams", [options?: ServerListTeamsOptions], ServerTeam[] & { nextCursor: string | null }, true>
|
|
417
|
+
& AsyncStoreProperty<"permission", [scope: Team, permissionId: string, options?: { direct?: boolean }], AdminTeamPermission | null, false>
|
|
418
|
+
& AsyncStoreProperty<"permissions", [scope: Team, options?: { direct?: boolean }], AdminTeamPermission[], true>;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* A user including sensitive fields that should only be used on the server, never sent to the client
|
|
422
|
+
* (such as sensitive information and serverMetadata).
|
|
423
|
+
*/
|
|
424
|
+
export type ServerUser = ServerBaseUser & BaseUser & UserExtra & Customer<true>;
|
|
425
|
+
|
|
426
|
+
export type CurrentServerUser = Auth & ServerUser;
|
|
427
|
+
|
|
428
|
+
export type CurrentInternalServerUser = CurrentServerUser & InternalUserExtra;
|
|
429
|
+
|
|
430
|
+
export type ProjectCurrentServerUser<ProjectId> = ProjectId extends "internal" ? CurrentInternalServerUser : CurrentServerUser;
|
|
431
|
+
|
|
432
|
+
export type SyncedPartialServerUser = SyncedPartialUser & Pick<
|
|
433
|
+
ServerUser,
|
|
434
|
+
| "serverMetadata"
|
|
435
|
+
>;
|
|
436
|
+
|
|
437
|
+
export type ServerUserUpdateOptions = {
|
|
438
|
+
primaryEmail?: string | null,
|
|
439
|
+
primaryEmailVerified?: boolean,
|
|
440
|
+
primaryEmailAuthEnabled?: boolean,
|
|
441
|
+
clientReadOnlyMetadata?: ReadonlyJson,
|
|
442
|
+
serverMetadata?: ReadonlyJson,
|
|
443
|
+
password?: string,
|
|
444
|
+
restrictedByAdmin?: boolean,
|
|
445
|
+
restrictedByAdminReason?: string | null,
|
|
446
|
+
restrictedByAdminPrivateDetails?: string | null,
|
|
447
|
+
countryCode?: string | null,
|
|
448
|
+
riskScores?: {
|
|
449
|
+
signUp: {
|
|
450
|
+
bot: number,
|
|
451
|
+
freeTrialAbuse: number,
|
|
452
|
+
},
|
|
453
|
+
},
|
|
454
|
+
} & UserUpdateOptions;
|
|
455
|
+
export function serverUserUpdateOptionsToCrud(options: ServerUserUpdateOptions): CurrentUserCrud["Server"]["Update"] {
|
|
456
|
+
// Base update options
|
|
457
|
+
const baseUpdate: CurrentUserCrud["Server"]["Update"] = {
|
|
458
|
+
display_name: options.displayName,
|
|
459
|
+
primary_email: options.primaryEmail,
|
|
460
|
+
client_metadata: options.clientMetadata,
|
|
461
|
+
client_read_only_metadata: options.clientReadOnlyMetadata,
|
|
462
|
+
server_metadata: options.serverMetadata,
|
|
463
|
+
selected_team_id: options.selectedTeamId,
|
|
464
|
+
primary_email_auth_enabled: options.primaryEmailAuthEnabled,
|
|
465
|
+
primary_email_verified: options.primaryEmailVerified,
|
|
466
|
+
password: options.password,
|
|
467
|
+
profile_image_url: options.profileImageUrl,
|
|
468
|
+
totp_secret_base64: options.totpMultiFactorSecret != null ? encodeBase64(options.totpMultiFactorSecret) : options.totpMultiFactorSecret,
|
|
469
|
+
};
|
|
470
|
+
return {
|
|
471
|
+
...baseUpdate,
|
|
472
|
+
restricted_by_admin: options.restrictedByAdmin,
|
|
473
|
+
restricted_by_admin_reason: options.restrictedByAdminReason,
|
|
474
|
+
restricted_by_admin_private_details: options.restrictedByAdminPrivateDetails,
|
|
475
|
+
country_code: options.countryCode,
|
|
476
|
+
risk_scores: options.riskScores ? {
|
|
477
|
+
sign_up: {
|
|
478
|
+
bot: options.riskScores.signUp.bot,
|
|
479
|
+
free_trial_abuse: options.riskScores.signUp.freeTrialAbuse,
|
|
480
|
+
},
|
|
481
|
+
} : undefined,
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
export type ServerUserCreateOptions = {
|
|
487
|
+
primaryEmail?: string | null,
|
|
488
|
+
primaryEmailAuthEnabled?: boolean,
|
|
489
|
+
password?: string,
|
|
490
|
+
otpAuthEnabled?: boolean,
|
|
491
|
+
displayName?: string,
|
|
492
|
+
primaryEmailVerified?: boolean,
|
|
493
|
+
clientMetadata?: any,
|
|
494
|
+
clientReadOnlyMetadata?: any,
|
|
495
|
+
serverMetadata?: any,
|
|
496
|
+
countryCode?: string | null,
|
|
497
|
+
riskScores?: {
|
|
498
|
+
signUp: {
|
|
499
|
+
bot: number,
|
|
500
|
+
freeTrialAbuse: number,
|
|
501
|
+
},
|
|
502
|
+
},
|
|
503
|
+
}
|
|
504
|
+
export function serverUserCreateOptionsToCrud(options: ServerUserCreateOptions): UsersCrud["Server"]["Create"] {
|
|
505
|
+
return {
|
|
506
|
+
primary_email: options.primaryEmail,
|
|
507
|
+
password: options.password,
|
|
508
|
+
otp_auth_enabled: options.otpAuthEnabled,
|
|
509
|
+
primary_email_auth_enabled: options.primaryEmailAuthEnabled,
|
|
510
|
+
display_name: options.displayName,
|
|
511
|
+
primary_email_verified: options.primaryEmailVerified,
|
|
512
|
+
client_metadata: options.clientMetadata,
|
|
513
|
+
client_read_only_metadata: options.clientReadOnlyMetadata,
|
|
514
|
+
server_metadata: options.serverMetadata,
|
|
515
|
+
country_code: options.countryCode,
|
|
516
|
+
risk_scores: options.riskScores ? {
|
|
517
|
+
sign_up: {
|
|
518
|
+
bot: options.riskScores.signUp.bot,
|
|
519
|
+
free_trial_abuse: options.riskScores.signUp.freeTrialAbuse,
|
|
520
|
+
},
|
|
521
|
+
} : undefined,
|
|
522
|
+
};
|
|
523
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
|
|
2
|
+
//===========================================
|
|
3
|
+
// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template
|
|
4
|
+
//===========================================
|
|
5
|
+
import { useContext } from "react";
|
|
6
|
+
import { HexclaveContext } from "../providers/hexclave-context";
|
|
7
|
+
import type { GetUserOptions as AppGetUserOptions, CurrentInternalUser, CurrentUser, StackClientApp } from "./hexclave-app";
|
|
8
|
+
|
|
9
|
+
type GetUserOptions = AppGetUserOptions<true> & {
|
|
10
|
+
projectIdMustMatch?: string,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Returns the current user object. Equivalent to `useStackApp().useUser()`.
|
|
15
|
+
*
|
|
16
|
+
* @returns the current user
|
|
17
|
+
*/
|
|
18
|
+
export function useUser(options: GetUserOptions & { or: 'redirect' | 'throw', projectIdMustMatch: "internal" }): CurrentInternalUser;
|
|
19
|
+
export function useUser(options: GetUserOptions & { or: 'redirect' | 'throw' }): CurrentUser;
|
|
20
|
+
export function useUser(options: GetUserOptions & { projectIdMustMatch: "internal" }): CurrentInternalUser | null;
|
|
21
|
+
export function useUser(options?: GetUserOptions): CurrentUser | CurrentInternalUser | null;
|
|
22
|
+
export function useUser(options: GetUserOptions = {}): CurrentUser | CurrentInternalUser | null {
|
|
23
|
+
const hexclaveApp = useHexclaveApp(options);
|
|
24
|
+
if (options.projectIdMustMatch && hexclaveApp.projectId !== options.projectIdMustMatch) {
|
|
25
|
+
throw new Error("Unexpected project ID in useHexclaveApp: " + hexclaveApp.projectId);
|
|
26
|
+
}
|
|
27
|
+
if (options.projectIdMustMatch === "internal") {
|
|
28
|
+
return hexclaveApp.useUser(options) as CurrentInternalUser;
|
|
29
|
+
} else {
|
|
30
|
+
return hexclaveApp.useUser(options) as CurrentUser;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Returns the current Hexclave app associated with the HexclaveProvider.
|
|
36
|
+
*
|
|
37
|
+
* @returns the current Hexclave app
|
|
38
|
+
*/
|
|
39
|
+
export function useHexclaveApp<ProjectId extends string>(options: { projectIdMustMatch?: ProjectId } = {}): StackClientApp<true, ProjectId> {
|
|
40
|
+
if (typeof useContext !== "function") {
|
|
41
|
+
throw new Error("useHexclaveApp() can only be used in a React Client Component. Make sure you're not calling it from a Server Component, or any other environment.");
|
|
42
|
+
}
|
|
43
|
+
const context = useContext(HexclaveContext);
|
|
44
|
+
if (context === null) {
|
|
45
|
+
throw new Error("useHexclaveApp must be used within a HexclaveProvider");
|
|
46
|
+
}
|
|
47
|
+
const hexclaveApp = context.app;
|
|
48
|
+
if (options.projectIdMustMatch && hexclaveApp.projectId !== options.projectIdMustMatch) {
|
|
49
|
+
throw new Error("Unexpected project ID in useHexclaveApp: " + hexclaveApp.projectId);
|
|
50
|
+
}
|
|
51
|
+
return hexclaveApp as StackClientApp<true, ProjectId>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Returns the current Stack app associated with the StackProvider.
|
|
56
|
+
*
|
|
57
|
+
* @deprecated Use `useHexclaveApp` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration.
|
|
58
|
+
*
|
|
59
|
+
* @returns the current Stack app
|
|
60
|
+
*/
|
|
61
|
+
export function useStackApp<ProjectId extends string>(options: { projectIdMustMatch?: ProjectId } = {}): StackClientApp<true, ProjectId> {
|
|
62
|
+
return useHexclaveApp(options);
|
|
63
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
//===========================================
|
|
3
|
+
// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template
|
|
4
|
+
//===========================================
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { TranslationContext } from "../providers/translation-provider-client";
|
|
7
|
+
|
|
8
|
+
export function useTranslation() {
|
|
9
|
+
const translationContext = React.useContext(TranslationContext);
|
|
10
|
+
if (!translationContext) {
|
|
11
|
+
throw new Error("Translation context not found; did you forget to wrap your app in a <StackProvider />?");
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
t: (str: string, templateVars?: Record<string, string>) => {
|
|
15
|
+
const { quetzalKeys, quetzalLocale } = translationContext;
|
|
16
|
+
let translation = quetzalLocale.get(quetzalKeys.get(str) ?? (undefined as never)) ?? str;
|
|
17
|
+
for (const [key, value] of Object.entries(templateVars || {})) {
|
|
18
|
+
translation = translation.replace(`{${key}}`, value);
|
|
19
|
+
}
|
|
20
|
+
return translation;
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
//===========================================
|
|
5
|
+
// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template
|
|
6
|
+
//===========================================
|
|
7
|
+
|
|
8
|
+
import React from "react";
|
|
9
|
+
import { createGlobal } from "@hexclave/shared/dist/utils/globals";
|
|
10
|
+
import type { StackClientApp } from "../lib/hexclave-app/apps/interfaces/client-app";
|
|
11
|
+
|
|
12
|
+
type HexclaveContextValue = {
|
|
13
|
+
app: StackClientApp<true>,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const HexclaveContext = createGlobal<React.Context<HexclaveContextValue | null>>(
|
|
17
|
+
"HexclaveContext",
|
|
18
|
+
() => React.createContext<HexclaveContextValue | null>(null),
|
|
19
|
+
);
|
|
20
|
+
HexclaveContext.displayName ??= "HexclaveContext";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
//===========================================
|
|
5
|
+
// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template
|
|
6
|
+
//===========================================
|
|
7
|
+
|
|
8
|
+
import { CurrentUserCrud } from "@hexclave/shared/dist/interface/crud/current-user";
|
|
9
|
+
import { globalVar } from "@hexclave/shared/dist/utils/globals";
|
|
10
|
+
import React, { useEffect } from "react";
|
|
11
|
+
import { useStackApp } from "../lib/hooks";
|
|
12
|
+
import { StackClientApp, StackClientAppJson, hexclaveAppInternalsSymbol } from "../lib/hexclave-app";
|
|
13
|
+
import { HexclaveContext } from "./hexclave-context";
|
|
14
|
+
|
|
15
|
+
export function HexclaveProviderClient(props: {
|
|
16
|
+
app: StackClientAppJson<true, string> | StackClientApp<true>,
|
|
17
|
+
serialized: boolean,
|
|
18
|
+
children?: React.ReactNode,
|
|
19
|
+
}) {
|
|
20
|
+
const app = props.serialized
|
|
21
|
+
? StackClientApp[hexclaveAppInternalsSymbol].fromClientJson(props.app as StackClientAppJson<true, string>)
|
|
22
|
+
: props.app as StackClientApp<true>;
|
|
23
|
+
globalVar.__STACK_AUTH__ = { app };
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<HexclaveContext.Provider value={{ app }}>
|
|
27
|
+
{props.children}
|
|
28
|
+
</HexclaveContext.Provider>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function UserSetter(props: { userJsonPromise: Promise<CurrentUserCrud['Client']['Read'] | null> }) {
|
|
33
|
+
const app = useStackApp();
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
const promise = (async () => await props.userJsonPromise)(); // there is a Next.js bug where Promises passed by server components return `undefined` as their `then` value, so wrap it in a normal promise
|
|
36
|
+
app[hexclaveAppInternalsSymbol].setCurrentUser(promise);
|
|
37
|
+
}, []);
|
|
38
|
+
return null;
|
|
39
|
+
}
|