@hexclave/js 1.0.2 → 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/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/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/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- 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.map +1 -1
- package/dist/esm/lib/env.js.map +1 -1
- package/dist/esm/lib/{stack-app → hexclave-app}/api-keys/index.d.ts +1 -1
- 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 +3 -3
- 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 +6 -6
- 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 +5 -5
- 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/{lib/stack-app → esm/lib/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/{lib/stack-app → esm/lib/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/esm/lib/{stack-app → 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/esm/lib/{stack-app → 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/utils/url.js.map +1 -1
- package/dist/index.d.ts +15 -15
- package/dist/index.js +3 -3
- 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.map +1 -1
- package/dist/lib/env.js.map +1 -1
- package/dist/lib/{stack-app → hexclave-app}/api-keys/index.d.ts +1 -1
- 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 +3 -3
- 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 +5 -5
- 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 +4 -4
- 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 +1 -1
- 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 +7 -7
- 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/{esm/lib/stack-app → lib/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/{esm/lib/stack-app → lib/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/lib/{stack-app → 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/lib/{stack-app → 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/utils/url.js.map +1 -1
- package/package.json +4 -3
- 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/index.ts +12 -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 +327 -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 +1159 -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 +3525 -0
- package/src/lib/hexclave-app/apps/implementations/common.ts +190 -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 +1322 -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 +189 -0
- package/src/lib/hexclave-app/apps/interfaces/client-app.ts +172 -0
- package/src/lib/hexclave-app/apps/interfaces/server-app.ts +114 -0
- package/src/lib/hexclave-app/common.ts +209 -0
- package/src/lib/hexclave-app/connected-accounts/index.ts +47 -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 +234 -0
- package/src/lib/hexclave-app/session-replays/index.ts +72 -0
- package/src/lib/hexclave-app/teams/index.ts +203 -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 +495 -0
- package/src/utils/url.ts +24 -0
- 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/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/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,209 @@
|
|
|
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 { ProviderType } from "@hexclave/shared/dist/utils/oauth";
|
|
6
|
+
import type { GenericQueryCtx, UserIdentity } from "convex/server";
|
|
7
|
+
export type {
|
|
8
|
+
DefaultHandlerUrlTarget,
|
|
9
|
+
HandlerPageUrls,
|
|
10
|
+
HandlerRedirectUrls,
|
|
11
|
+
HandlerUrlOptions,
|
|
12
|
+
HandlerUrlTarget,
|
|
13
|
+
HandlerUrls,
|
|
14
|
+
ResolvedHandlerUrls,
|
|
15
|
+
} from "@hexclave/shared/dist/interface/handler-urls";
|
|
16
|
+
|
|
17
|
+
export type RedirectToOptions = {
|
|
18
|
+
replace?: boolean,
|
|
19
|
+
noRedirectBack?: boolean,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type AsyncStoreProperty<Name extends string, Args extends any[], Value, IsMultiple extends boolean> =
|
|
23
|
+
& { [key in `${IsMultiple extends true ? "list" : "get"}${Capitalize<Name>}`]: (...args: Args) => Promise<Value> }
|
|
24
|
+
|
|
25
|
+
export type EmailConfig = {
|
|
26
|
+
host: string,
|
|
27
|
+
port: number,
|
|
28
|
+
username: string,
|
|
29
|
+
password: string,
|
|
30
|
+
senderEmail: string,
|
|
31
|
+
senderName: string,
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type RedirectMethod = "window"
|
|
35
|
+
| "none"
|
|
36
|
+
| {
|
|
37
|
+
useNavigate: () => (to: string) => void,
|
|
38
|
+
navigate?: (to: string) => void,
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
export type GetCurrentUserOptions<HasTokenStore> =
|
|
43
|
+
& {
|
|
44
|
+
or?: 'redirect' | 'throw' | 'return-null' | 'anonymous' | /** @deprecated */ 'anonymous-if-exists[deprecated]',
|
|
45
|
+
/**
|
|
46
|
+
* Whether to include restricted users (users who haven't completed onboarding requirements like email verification).
|
|
47
|
+
* By default, restricted users are filtered out (treated similar to anonymous users).
|
|
48
|
+
*
|
|
49
|
+
* Note: This option cannot be set to false when `or: 'anonymous'` is used, as all anonymous users are also restricted.
|
|
50
|
+
*
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
includeRestricted?: boolean,
|
|
54
|
+
tokenStore?: TokenStoreInit,
|
|
55
|
+
}
|
|
56
|
+
& (HasTokenStore extends false ? {
|
|
57
|
+
tokenStore: TokenStoreInit,
|
|
58
|
+
} : {});
|
|
59
|
+
|
|
60
|
+
export type ConvexCtx =
|
|
61
|
+
| GenericQueryCtx<any>
|
|
62
|
+
| { auth: { getUserIdentity: () => Promise<UserIdentity | null> } };
|
|
63
|
+
|
|
64
|
+
export type GetCurrentPartialUserOptions<HasTokenStore> =
|
|
65
|
+
& {
|
|
66
|
+
or?: 'return-null' | 'anonymous-if-exists', // note: unlike normal getUser, 'anonymous' still returns null sometimes (eg. if no token is present)
|
|
67
|
+
tokenStore?: TokenStoreInit,
|
|
68
|
+
}
|
|
69
|
+
& (
|
|
70
|
+
| {
|
|
71
|
+
from: 'token',
|
|
72
|
+
}
|
|
73
|
+
| {
|
|
74
|
+
from: 'convex',
|
|
75
|
+
ctx: ConvexCtx,
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
& (HasTokenStore extends false ? {
|
|
79
|
+
tokenStore: TokenStoreInit,
|
|
80
|
+
} : {});
|
|
81
|
+
|
|
82
|
+
export type RequestLike = {
|
|
83
|
+
headers:
|
|
84
|
+
| {
|
|
85
|
+
get: (name: string) => string | null,
|
|
86
|
+
}
|
|
87
|
+
| Record<string, string | null>,
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export type TokenStoreInit<HasTokenStore extends boolean = boolean> =
|
|
91
|
+
HasTokenStore extends true ? (
|
|
92
|
+
| "cookie"
|
|
93
|
+
| "nextjs-cookie"
|
|
94
|
+
| "memory"
|
|
95
|
+
| RequestLike
|
|
96
|
+
| { accessToken: string, refreshToken: string }
|
|
97
|
+
)
|
|
98
|
+
: HasTokenStore extends false ? null
|
|
99
|
+
: TokenStoreInit<true> | TokenStoreInit<false>;
|
|
100
|
+
|
|
101
|
+
export type OAuthScopesOnSignIn = {
|
|
102
|
+
[key in ProviderType]: string[];
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Contains the authentication methods without session-related fields.
|
|
107
|
+
* Used for apps that have token storage capabilities.
|
|
108
|
+
*/
|
|
109
|
+
export type AuthLike<ExtraOptions = {}> = {
|
|
110
|
+
signOut(options?: { redirectUrl?: URL | string } & ExtraOptions): Promise<void>,
|
|
111
|
+
signOut(options?: { redirectUrl?: URL | string }): Promise<void>,
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Returns the current access token, or null if the user is not signed in.
|
|
115
|
+
*
|
|
116
|
+
* The access token is a short-lived JWT that can be used to authenticate requests to external servers.
|
|
117
|
+
* It will be automatically refreshed when it expires.
|
|
118
|
+
*/
|
|
119
|
+
getAccessToken(options?: {} & ExtraOptions): Promise<string | null>,
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Returns the current refresh token, or null if the user is not signed in.
|
|
123
|
+
*
|
|
124
|
+
* The refresh token is a long-lived token that can be used to obtain new access tokens.
|
|
125
|
+
* It should be kept secret and never exposed to the client.
|
|
126
|
+
*/
|
|
127
|
+
getRefreshToken(options?: {} & ExtraOptions): Promise<string | null>,
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Returns the value for the HTTP `Authorization` header for authenticated requests to external servers.
|
|
131
|
+
* Most commonly used in cross-origin requests. Similar to `getAuthJson`, but specifically for HTTP requests.
|
|
132
|
+
*
|
|
133
|
+
* If you are using `tokenStore: "cookie"`, you don't need this for same-origin requests. However, most
|
|
134
|
+
* browsers now disable third-party cookies by default, so we must pass authentication tokens by header instead
|
|
135
|
+
* if the client and server are on different origins.
|
|
136
|
+
*
|
|
137
|
+
* This function returns the header value in this format:
|
|
138
|
+
* `Bearer stackauth_<base64(getAuthJson())>`, or `null` if the user is not signed in.
|
|
139
|
+
* You can use this with `fetch` or other HTTP request libraries to send authenticated requests.
|
|
140
|
+
*
|
|
141
|
+
* On the server, you can then pass in the `Request` object to the `tokenStore` option
|
|
142
|
+
* of your Stack app. Please note that CORS does not allow most headers by default, so you
|
|
143
|
+
* must include `authorization` in the [`Access-Control-Allow-Headers` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers)
|
|
144
|
+
* of the CORS preflight response.
|
|
145
|
+
*
|
|
146
|
+
* If you are not using HTTP (and hence cannot set headers), use `getAuthJson()` instead.
|
|
147
|
+
*
|
|
148
|
+
* Example:
|
|
149
|
+
*
|
|
150
|
+
* ```ts
|
|
151
|
+
* // client
|
|
152
|
+
* const authorizationHeader = await hexclaveApp.getAuthorizationHeader();
|
|
153
|
+
* const res = await fetch("https://api.example.com", {
|
|
154
|
+
* headers: {
|
|
155
|
+
* ...(authorizationHeader ? { Authorization: authorizationHeader } : {})
|
|
156
|
+
* // you can also add your own headers here
|
|
157
|
+
* },
|
|
158
|
+
* });
|
|
159
|
+
*
|
|
160
|
+
* // server
|
|
161
|
+
* function handleRequest(req: Request) {
|
|
162
|
+
* const user = await hexclaveServerApp.getUser({ tokenStore: req });
|
|
163
|
+
* return new Response("Welcome, " + user.displayName);
|
|
164
|
+
* }
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
getAuthorizationHeader(options?: {} & ExtraOptions): Promise<string | null>,
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* @deprecated Use `getAuthorizationHeader()` instead.
|
|
171
|
+
*
|
|
172
|
+
* Returns the legacy `x-stack-auth` headers for authenticated HTTP requests. This remains for backwards
|
|
173
|
+
* compatibility with existing integrations.
|
|
174
|
+
*/
|
|
175
|
+
getAuthHeaders(options?: {} & ExtraOptions): Promise<{ "x-stack-auth": string }>,
|
|
176
|
+
/** @deprecated Use `useAuthorizationHeader()` instead. */
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Creates a JSON-serializable object containing the information to authenticate a user on an external server.
|
|
180
|
+
* Similar to `getAuthorizationHeader`, but returns an object that can be sent over any protocol instead of just
|
|
181
|
+
* HTTP headers.
|
|
182
|
+
*
|
|
183
|
+
* While `getAuthorizationHeader` is the recommended way to send authentication tokens over HTTP, your app may use
|
|
184
|
+
* a different protocol, for example WebSockets or gRPC. This function returns a token object that can be JSON-serialized and sent to the server in any way you like.
|
|
185
|
+
*
|
|
186
|
+
* On the server, you can pass in this token object into the `tokenStore` option to fetch user details.
|
|
187
|
+
*
|
|
188
|
+
* Example:
|
|
189
|
+
*
|
|
190
|
+
* ```ts
|
|
191
|
+
* // client
|
|
192
|
+
* const res = await rpcCall(rpcEndpoint, {
|
|
193
|
+
* data: {
|
|
194
|
+
* auth: await hexclaveApp.getAuthJson(),
|
|
195
|
+
* },
|
|
196
|
+
* });
|
|
197
|
+
*
|
|
198
|
+
* // server
|
|
199
|
+
* function handleRequest(data) {
|
|
200
|
+
* const user = await hexclaveServerApp.getUser({ tokenStore: data.auth });
|
|
201
|
+
* return new Response("Welcome, " + user.displayName);
|
|
202
|
+
* }
|
|
203
|
+
* ```
|
|
204
|
+
*/
|
|
205
|
+
getAuthJson(options?: {} & ExtraOptions): Promise<{ accessToken: string | null, refreshToken: string | null }>,
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
/** @internal */
|
|
209
|
+
export const hexclaveAppInternalsSymbol = Symbol.for("StackAuth--DO-NOT-USE-OR-YOU-WILL-BE-FIRED--StackAppInternals");
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { Result } from "@hexclave/shared/dist/utils/results";
|
|
7
|
+
|
|
8
|
+
export type Connection = {
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Use `provider` instead. This field returns the provider for backward compatibility.
|
|
11
|
+
*/
|
|
12
|
+
id: string,
|
|
13
|
+
/** Provider config ID (e.g., "google", "github") */
|
|
14
|
+
provider: string,
|
|
15
|
+
/** Account ID from the OAuth provider (e.g., Google user ID) */
|
|
16
|
+
providerAccountId: string,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type OAuthConnection = {
|
|
20
|
+
/**
|
|
21
|
+
* Get an OAuth access token for this connected account.
|
|
22
|
+
*
|
|
23
|
+
* Returns `{ status: "ok", data: { accessToken } }` on success, or
|
|
24
|
+
* `{ status: "error", error: KnownErrors["OAuthAccessTokenNotAvailable"] }` if the
|
|
25
|
+
* refresh token has been revoked/expired or the requested scopes are not available.
|
|
26
|
+
*
|
|
27
|
+
* @param options.scopes - If provided, only returns a token that has all of these scopes.
|
|
28
|
+
*/
|
|
29
|
+
getAccessToken(options?: { scopes?: string[] }): Promise<Result<{ accessToken: string }, KnownErrors["OAuthAccessTokenNotAvailable"]>>,
|
|
30
|
+
/**
|
|
31
|
+
* React hook to get an OAuth access token for this connected account.
|
|
32
|
+
*
|
|
33
|
+
* Returns `{ status: "ok", data: { accessToken } }` on success, or
|
|
34
|
+
* `{ status: "error", error: KnownErrors["OAuthAccessTokenNotAvailable"] }` if the
|
|
35
|
+
* refresh token has been revoked/expired or the requested scopes are not available.
|
|
36
|
+
*
|
|
37
|
+
* @param options.scopes - If provided, only returns a token that has all of these scopes.
|
|
38
|
+
*/
|
|
39
|
+
} & Connection;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated Used by legacy `getConnectedAccount(providerId)`. Use `OAuthConnection` instead,
|
|
43
|
+
* which returns a `Result` from `getAccessToken`/`useAccessToken` instead of throwing.
|
|
44
|
+
*/
|
|
45
|
+
export type DeprecatedOAuthConnection = {
|
|
46
|
+
getAccessToken(): Promise<{ accessToken: string }>,
|
|
47
|
+
} & Connection;
|
|
@@ -0,0 +1,80 @@
|
|
|
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 { ContactChannelsCrud } from "@hexclave/shared/dist/interface/crud/contact-channels";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export type ContactChannel = {
|
|
9
|
+
id: string,
|
|
10
|
+
value: string,
|
|
11
|
+
type: 'email',
|
|
12
|
+
isPrimary: boolean,
|
|
13
|
+
isVerified: boolean,
|
|
14
|
+
usedForAuth: boolean,
|
|
15
|
+
|
|
16
|
+
sendVerificationEmail(options?: { callbackUrl?: string }): Promise<void>,
|
|
17
|
+
update(data: ContactChannelUpdateOptions): Promise<void>,
|
|
18
|
+
delete(): Promise<void>,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type ContactChannelCreateOptions = {
|
|
22
|
+
value: string,
|
|
23
|
+
type: 'email',
|
|
24
|
+
usedForAuth: boolean,
|
|
25
|
+
isPrimary?: boolean,
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function contactChannelCreateOptionsToCrud(userId: string, options: ContactChannelCreateOptions): ContactChannelsCrud["Client"]["Create"] {
|
|
29
|
+
return {
|
|
30
|
+
value: options.value,
|
|
31
|
+
type: options.type,
|
|
32
|
+
used_for_auth: options.usedForAuth,
|
|
33
|
+
is_primary: options.isPrimary,
|
|
34
|
+
user_id: userId,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type ContactChannelUpdateOptions = {
|
|
39
|
+
usedForAuth?: boolean,
|
|
40
|
+
value?: string,
|
|
41
|
+
isPrimary?: boolean,
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function contactChannelUpdateOptionsToCrud(options: ContactChannelUpdateOptions): ContactChannelsCrud["Client"]["Update"] {
|
|
45
|
+
return {
|
|
46
|
+
value: options.value,
|
|
47
|
+
used_for_auth: options.usedForAuth,
|
|
48
|
+
is_primary: options.isPrimary,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type ServerContactChannel = ContactChannel & {
|
|
53
|
+
update(data: ServerContactChannelUpdateOptions): Promise<void>,
|
|
54
|
+
}
|
|
55
|
+
export type ServerContactChannelUpdateOptions = ContactChannelUpdateOptions & {
|
|
56
|
+
isVerified?: boolean,
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function serverContactChannelUpdateOptionsToCrud(options: ServerContactChannelUpdateOptions): ContactChannelsCrud["Server"]["Update"] {
|
|
60
|
+
return {
|
|
61
|
+
value: options.value,
|
|
62
|
+
is_verified: options.isVerified,
|
|
63
|
+
used_for_auth: options.usedForAuth,
|
|
64
|
+
is_primary: options.isPrimary,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export type ServerContactChannelCreateOptions = ContactChannelCreateOptions & {
|
|
69
|
+
isVerified?: boolean,
|
|
70
|
+
}
|
|
71
|
+
export function serverContactChannelCreateOptionsToCrud(userId: string, options: ServerContactChannelCreateOptions): ContactChannelsCrud["Server"]["Create"] {
|
|
72
|
+
return {
|
|
73
|
+
type: options.type,
|
|
74
|
+
value: options.value,
|
|
75
|
+
is_verified: options.isVerified,
|
|
76
|
+
user_id: userId,
|
|
77
|
+
used_for_auth: options.usedForAuth,
|
|
78
|
+
is_primary: options.isPrimary,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
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 { inlineProductSchema } from "@hexclave/shared/dist/schema-fields";
|
|
6
|
+
import * as yup from "yup";
|
|
7
|
+
import { AsyncStoreProperty } from "../common";
|
|
8
|
+
|
|
9
|
+
export type InlineProduct = yup.InferType<typeof inlineProductSchema>;
|
|
10
|
+
|
|
11
|
+
export type Item = {
|
|
12
|
+
displayName: string,
|
|
13
|
+
/**
|
|
14
|
+
* May be negative.
|
|
15
|
+
*/
|
|
16
|
+
quantity: number,
|
|
17
|
+
/**
|
|
18
|
+
* Equal to Math.max(0, quantity).
|
|
19
|
+
*/
|
|
20
|
+
nonNegativeQuantity: number,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type ServerItem = Item & {
|
|
24
|
+
increaseQuantity(amount: number): Promise<void>,
|
|
25
|
+
/**
|
|
26
|
+
* Decreases the quantity by the given amount.
|
|
27
|
+
*
|
|
28
|
+
* Note that you may want to use tryDecreaseQuantity instead, as it will prevent the quantity from going below 0 in a race-condition-free way.
|
|
29
|
+
*/
|
|
30
|
+
decreaseQuantity(amount: number): Promise<void>,
|
|
31
|
+
/**
|
|
32
|
+
* Decreases the quantity by the given amount and returns true if the result is non-negative; returns false and does nothing if the result would be negative.
|
|
33
|
+
*
|
|
34
|
+
* Most useful for pre-paid credits.
|
|
35
|
+
*/
|
|
36
|
+
tryDecreaseQuantity(amount: number): Promise<boolean>,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export type CustomerProduct = {
|
|
40
|
+
id: string | null,
|
|
41
|
+
quantity: number,
|
|
42
|
+
displayName: string,
|
|
43
|
+
customerType: "user" | "team" | "custom",
|
|
44
|
+
isServerOnly: boolean,
|
|
45
|
+
stackable: boolean,
|
|
46
|
+
/** @deprecated Product ownership is independent of purchase type. Will be removed in a future version. */
|
|
47
|
+
type?: "one_time" | "subscription",
|
|
48
|
+
subscription: null | {
|
|
49
|
+
subscriptionId: string | null,
|
|
50
|
+
currentPeriodEnd: Date | null,
|
|
51
|
+
cancelAtPeriodEnd: boolean,
|
|
52
|
+
isCancelable: boolean,
|
|
53
|
+
},
|
|
54
|
+
switchOptions?: Array<{
|
|
55
|
+
productId: string,
|
|
56
|
+
displayName: string,
|
|
57
|
+
prices: InlineProduct["prices"],
|
|
58
|
+
}>,
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export type CustomerProductsList = CustomerProduct[] & {
|
|
62
|
+
nextCursor: string | null,
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export type CustomerProductsListOptions = {
|
|
66
|
+
cursor?: string,
|
|
67
|
+
limit?: number,
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export type CustomerProductsRequestOptions =
|
|
71
|
+
| ({ userId: string } & CustomerProductsListOptions)
|
|
72
|
+
| ({ teamId: string } & CustomerProductsListOptions)
|
|
73
|
+
| ({ customCustomerId: string } & CustomerProductsListOptions);
|
|
74
|
+
|
|
75
|
+
export type CustomerInvoiceStatus = "draft" | "open" | "paid" | "uncollectible" | "void" | null;
|
|
76
|
+
|
|
77
|
+
export type CustomerInvoice = {
|
|
78
|
+
createdAt: Date,
|
|
79
|
+
status: CustomerInvoiceStatus,
|
|
80
|
+
amountTotal: number,
|
|
81
|
+
hostedInvoiceUrl: string | null,
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export type CustomerInvoicesList = CustomerInvoice[] & {
|
|
85
|
+
nextCursor: string | null,
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export type CustomerInvoicesListOptions = {
|
|
89
|
+
cursor?: string,
|
|
90
|
+
limit?: number,
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export type CustomerInvoicesRequestOptions =
|
|
94
|
+
| ({ userId: string } & CustomerInvoicesListOptions)
|
|
95
|
+
| ({ teamId: string } & CustomerInvoicesListOptions);
|
|
96
|
+
|
|
97
|
+
export type CustomerDefaultPaymentMethod = {
|
|
98
|
+
id: string,
|
|
99
|
+
brand: string | null,
|
|
100
|
+
last4: string | null,
|
|
101
|
+
exp_month: number | null,
|
|
102
|
+
exp_year: number | null,
|
|
103
|
+
} | null;
|
|
104
|
+
|
|
105
|
+
export type CustomerBilling = {
|
|
106
|
+
hasCustomer: boolean,
|
|
107
|
+
defaultPaymentMethod: CustomerDefaultPaymentMethod,
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export type CustomerPaymentMethodSetupIntent = {
|
|
111
|
+
clientSecret: string,
|
|
112
|
+
stripeAccountId: string,
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export type Customer<IsServer extends boolean = false> =
|
|
116
|
+
& {
|
|
117
|
+
readonly id: string,
|
|
118
|
+
|
|
119
|
+
createCheckoutUrl(options: (
|
|
120
|
+
| { productId: string, returnUrl?: string }
|
|
121
|
+
| (IsServer extends true ? { product: InlineProduct, returnUrl?: string } : never)
|
|
122
|
+
)): Promise<string>,
|
|
123
|
+
|
|
124
|
+
createPaymentMethodSetupIntent(): Promise<CustomerPaymentMethodSetupIntent>,
|
|
125
|
+
|
|
126
|
+
setDefaultPaymentMethodFromSetupIntent(setupIntentId: string): Promise<CustomerDefaultPaymentMethod>,
|
|
127
|
+
|
|
128
|
+
switchSubscription(options: { fromProductId: string, toProductId: string, priceId?: string, quantity?: number }): Promise<void>,
|
|
129
|
+
}
|
|
130
|
+
& AsyncStoreProperty<
|
|
131
|
+
"billing",
|
|
132
|
+
[],
|
|
133
|
+
CustomerBilling,
|
|
134
|
+
false
|
|
135
|
+
>
|
|
136
|
+
& AsyncStoreProperty<
|
|
137
|
+
"item",
|
|
138
|
+
[itemId: string],
|
|
139
|
+
IsServer extends true ? ServerItem : Item,
|
|
140
|
+
false
|
|
141
|
+
>
|
|
142
|
+
& AsyncStoreProperty<
|
|
143
|
+
"products",
|
|
144
|
+
[options?: CustomerProductsListOptions],
|
|
145
|
+
CustomerProductsList,
|
|
146
|
+
true
|
|
147
|
+
>
|
|
148
|
+
& AsyncStoreProperty<
|
|
149
|
+
"invoices",
|
|
150
|
+
[options?: CustomerInvoicesListOptions],
|
|
151
|
+
CustomerInvoicesList,
|
|
152
|
+
true
|
|
153
|
+
>
|
|
154
|
+
& (IsServer extends true ? {
|
|
155
|
+
grantProduct(
|
|
156
|
+
product: { productId: string, quantity?: number } | { product: InlineProduct, quantity?: number },
|
|
157
|
+
): Promise<void>,
|
|
158
|
+
} : {});
|
|
@@ -0,0 +1,12 @@
|
|
|
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 { AsyncStoreProperty } from "../common";
|
|
6
|
+
|
|
7
|
+
export type DataVaultStore =
|
|
8
|
+
& {
|
|
9
|
+
id: string,
|
|
10
|
+
setValue: (key: string, value: string, options: { secret: string }) => Promise<void>,
|
|
11
|
+
}
|
|
12
|
+
& AsyncStoreProperty<"value", [key: string, options: { secret: string }], string | null, false>;
|