@hexclave/js 1.0.41 → 1.0.43
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/admin-app-impl-6qQFRdrQ.d.ts +1095 -0
- package/dist/admin-app-impl-6qQFRdrQ.d.ts.map +1 -0
- package/dist/clickmap/clickmap-core.d.ts +1 -2
- package/dist/clickmap/clickmap-core.d.ts.map +1 -1
- package/dist/clickmap/clickmap-core.js +2 -4
- package/dist/clickmap/clickmap-core.js.map +1 -1
- package/dist/clickmap/clickmap-styles.js +3 -6
- package/dist/clickmap/clickmap-styles.js.map +1 -1
- package/dist/clickmap/index.d.ts +1 -2
- package/dist/clickmap/index.d.ts.map +1 -1
- package/dist/clickmap/index.js +2 -4
- package/dist/clickmap/index.js.map +1 -1
- package/dist/client-app-D8-Lm4RT.d.ts +1235 -0
- package/dist/client-app-D8-Lm4RT.d.ts.map +1 -0
- package/dist/common-BDyEKSM6.d.ts +174 -0
- package/dist/common-BDyEKSM6.d.ts.map +1 -0
- package/dist/common-CRu2FsO9.d.ts +65 -0
- package/dist/common-CRu2FsO9.d.ts.map +1 -0
- package/dist/config.js +17 -19
- package/dist/cookie-DTOQvCYn.d.ts +42 -0
- package/dist/cookie-DTOQvCYn.d.ts.map +1 -0
- package/dist/dev-tool/dev-tool-core.d.ts +1 -2
- package/dist/dev-tool/dev-tool-core.d.ts.map +1 -1
- package/dist/dev-tool/dev-tool-core.js +2 -4
- package/dist/dev-tool/dev-tool-core.js.map +1 -1
- package/dist/dev-tool/dev-tool-styles.js +3 -6
- package/dist/dev-tool/dev-tool-styles.js.map +1 -1
- package/dist/dev-tool/dev-tool-trigger-position.d.ts.map +1 -1
- package/dist/dev-tool/dev-tool-trigger-position.js +6 -7
- package/dist/dev-tool/dev-tool-trigger-position.js.map +1 -1
- package/dist/dev-tool/dev-tool-trigger-position.test.js +1 -3
- package/dist/dev-tool/dev-tool-trigger-position.test.js.map +1 -1
- package/dist/dev-tool/index.d.ts +1 -2
- package/dist/dev-tool/index.d.ts.map +1 -1
- package/dist/dev-tool/index.js +2 -4
- package/dist/dev-tool/index.js.map +1 -1
- package/dist/esm/clickmap/clickmap-core.d.ts +1 -1
- package/dist/esm/clickmap/clickmap-core.d.ts.map +1 -1
- package/dist/esm/clickmap/clickmap-core.js +1 -2
- package/dist/esm/clickmap/clickmap-core.js.map +1 -1
- package/dist/esm/clickmap/clickmap-styles.js +1 -2
- package/dist/esm/clickmap/clickmap-styles.js.map +1 -1
- package/dist/esm/clickmap/index.d.ts +1 -1
- package/dist/esm/clickmap/index.d.ts.map +1 -1
- package/dist/esm/clickmap/index.js +1 -2
- package/dist/esm/clickmap/index.js.map +1 -1
- package/dist/esm/config.js +1 -2
- package/dist/esm/dev-tool/dev-tool-core.d.ts +1 -1
- package/dist/esm/dev-tool/dev-tool-core.d.ts.map +1 -1
- package/dist/esm/dev-tool/dev-tool-core.js +1 -2
- package/dist/esm/dev-tool/dev-tool-core.js.map +1 -1
- package/dist/esm/dev-tool/dev-tool-styles.js +1 -2
- package/dist/esm/dev-tool/dev-tool-styles.js.map +1 -1
- package/dist/esm/dev-tool/dev-tool-trigger-position.d.ts.map +1 -1
- package/dist/esm/dev-tool/dev-tool-trigger-position.js +5 -5
- package/dist/esm/dev-tool/dev-tool-trigger-position.js.map +1 -1
- package/dist/esm/dev-tool/dev-tool-trigger-position.test.js +2 -3
- package/dist/esm/dev-tool/dev-tool-trigger-position.test.js.map +1 -1
- package/dist/esm/dev-tool/index.d.ts +1 -1
- package/dist/esm/dev-tool/index.d.ts.map +1 -1
- package/dist/esm/dev-tool/index.js +1 -2
- package/dist/esm/dev-tool/index.js.map +1 -1
- package/dist/esm/generated/env.js +1 -1
- package/dist/esm/generated/env.js.map +1 -1
- package/dist/esm/global.d.ts.map +1 -1
- package/dist/esm/in-page-ui/base-styles.d.ts.map +1 -1
- package/dist/esm/in-page-ui/base-styles.js +1 -1
- package/dist/esm/in-page-ui/base-styles.js.map +1 -1
- package/dist/esm/in-page-ui/dom.d.ts.map +1 -1
- package/dist/esm/in-page-ui/dom.js +1 -1
- package/dist/esm/in-page-ui/dom.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -4
- package/dist/esm/integrations/convex/component/convex.config.d.ts +1 -3
- package/dist/esm/integrations/convex/component/convex.config.d.ts.map +1 -1
- package/dist/esm/integrations/convex/component/convex.config.js +1 -2
- package/dist/esm/integrations/convex/component/convex.config.js.map +1 -1
- package/dist/esm/integrations/convex.js +1 -2
- package/dist/esm/integrations/convex.js.map +1 -1
- package/dist/esm/lib/auth.js +1 -2
- package/dist/esm/lib/auth.js.map +1 -1
- package/dist/esm/lib/auth.test.js +2 -3
- package/dist/esm/lib/auth.test.js.map +1 -1
- package/dist/esm/lib/cookie.d.ts.map +1 -1
- package/dist/esm/lib/cookie.js +4 -22
- package/dist/esm/lib/cookie.js.map +1 -1
- package/dist/esm/lib/hexclave-app/api-keys/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/api-keys/index.js +1 -2
- package/dist/esm/lib/hexclave-app/api-keys/index.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +34 -42
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js +1 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js +2 -3
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +26 -28
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js +1 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.oauth-prefetch.test.js +2 -3
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.oauth-prefetch.test.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/common.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/common.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/common.js +7 -8
- package/dist/esm/lib/hexclave-app/apps/implementations/common.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/event-tracker.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/event-tracker.js +1 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/event-tracker.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/event-tracker.test.js +2 -3
- package/dist/esm/lib/hexclave-app/apps/implementations/event-tracker.test.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/index.d.ts +3 -3
- package/dist/esm/lib/hexclave-app/apps/implementations/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/index.js +1 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/index.js.map +1 -1
- package/dist/esm/lib/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 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/redirect-page-urls.js +1 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/redirect-page-urls.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.d.ts +13 -13
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.js +1 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-refresh-subscription.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-refresh-subscription.js +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-refresh-subscription.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-refresh-subscription.test.js +2 -3
- package/dist/esm/lib/hexclave-app/apps/implementations/session-refresh-subscription.test.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js +13 -7
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.test.js +134 -3
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.test.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/index.d.ts +3 -3
- package/dist/esm/lib/hexclave-app/apps/index.js +1 -2
- package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.d.ts +8 -8
- package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.js +1 -2
- package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts +6 -6
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.js +1 -2
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/server-app.d.ts +7 -7
- package/dist/esm/lib/hexclave-app/apps/interfaces/server-app.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/server-app.js +1 -2
- package/dist/esm/lib/hexclave-app/apps/interfaces/server-app.js.map +1 -1
- package/dist/esm/lib/hexclave-app/common.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/common.js +1 -1
- package/dist/esm/lib/hexclave-app/common.js.map +1 -1
- package/dist/esm/lib/hexclave-app/connected-accounts/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/connected-accounts/index.js +1 -1
- package/dist/esm/lib/hexclave-app/contact-channels/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/contact-channels/index.js +1 -1
- package/dist/esm/lib/hexclave-app/contact-channels/index.js.map +1 -1
- package/dist/esm/lib/hexclave-app/customers/index.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/customers/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/customers/index.js +1 -1
- package/dist/esm/lib/hexclave-app/data-vault/index.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/data-vault/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/data-vault/index.js +1 -1
- package/dist/esm/lib/hexclave-app/email/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/email/index.js +1 -1
- package/dist/esm/lib/hexclave-app/email-templates/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/email-templates/index.js +1 -1
- package/dist/esm/lib/hexclave-app/email-templates/index.js.map +1 -1
- package/dist/esm/lib/hexclave-app/index.d.ts +14 -14
- package/dist/esm/lib/hexclave-app/index.js +1 -2
- package/dist/esm/lib/hexclave-app/internal-api-keys/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/internal-api-keys/index.js +1 -1
- package/dist/esm/lib/hexclave-app/internal-api-keys/index.js.map +1 -1
- package/dist/esm/lib/hexclave-app/notification-categories/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/notification-categories/index.js +1 -1
- package/dist/esm/lib/hexclave-app/permissions/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/permissions/index.js +1 -1
- package/dist/esm/lib/hexclave-app/permissions/index.js.map +1 -1
- package/dist/esm/lib/hexclave-app/plan-usage/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/plan-usage/index.js +1 -1
- package/dist/esm/lib/hexclave-app/project-configs/index.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/project-configs/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/project-configs/index.js +1 -1
- package/dist/esm/lib/hexclave-app/projects/index.d.ts +2 -2
- package/dist/esm/lib/hexclave-app/projects/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/projects/index.js +5 -1
- package/dist/esm/lib/hexclave-app/projects/index.js.map +1 -1
- package/dist/esm/lib/hexclave-app/session-replays/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/session-replays/index.js +1 -1
- package/dist/esm/lib/hexclave-app/teams/index.d.ts +4 -4
- package/dist/esm/lib/hexclave-app/teams/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/teams/index.js +1 -1
- package/dist/esm/lib/hexclave-app/teams/index.js.map +1 -1
- package/dist/esm/lib/hexclave-app/url-targets.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/url-targets.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/url-targets.js +2 -3
- package/dist/esm/lib/hexclave-app/url-targets.js.map +1 -1
- package/dist/esm/lib/hexclave-app/url-targets.test.js +2 -3
- package/dist/esm/lib/hexclave-app/url-targets.test.js.map +1 -1
- package/dist/esm/lib/hexclave-app/users/index.d.ts +10 -10
- package/dist/esm/lib/hexclave-app/users/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/users/index.js +1 -2
- package/dist/esm/lib/hexclave-app/users/index.js.map +1 -1
- package/dist/esm/pushed-config-error-overlay/index.d.ts +1 -1
- package/dist/esm/pushed-config-error-overlay/index.d.ts.map +1 -1
- package/dist/esm/pushed-config-error-overlay/index.js +1 -2
- package/dist/esm/pushed-config-error-overlay/index.js.map +1 -1
- package/dist/esm/pushed-config-error-overlay/index.test.js +2 -3
- package/dist/esm/pushed-config-error-overlay/index.test.js.map +1 -1
- package/dist/esm/utils/url.d.ts.map +1 -1
- package/dist/esm/utils/url.js +1 -2
- package/dist/esm/utils/url.js.map +1 -1
- package/dist/generated/env.js +2 -3
- package/dist/generated/env.js.map +1 -1
- package/dist/global.d.ts.map +1 -1
- package/dist/in-page-ui/base-styles.d.ts.map +1 -1
- package/dist/in-page-ui/base-styles.js +2 -3
- package/dist/in-page-ui/base-styles.js.map +1 -1
- package/dist/in-page-ui/dom.d.ts.map +1 -1
- package/dist/in-page-ui/dom.js +2 -3
- package/dist/in-page-ui/dom.js.map +1 -1
- package/dist/index-BKZ67WMa.d.ts +1 -0
- package/dist/index-BVVgDSdq.d.ts +1 -0
- package/dist/index-Bo5DpPFH.d.ts +17 -0
- package/dist/index-Bo5DpPFH.d.ts.map +1 -0
- package/dist/index-CBDR4cNg.d.ts +206 -0
- package/dist/index-CBDR4cNg.d.ts.map +1 -0
- package/dist/index-ClBTM-St.d.ts +40 -0
- package/dist/index-ClBTM-St.d.ts.map +1 -0
- package/dist/index-D7Vdg30O.d.ts +27 -0
- package/dist/index-D7Vdg30O.d.ts.map +1 -0
- package/dist/index-DLPccxVU.d.ts +14 -0
- package/dist/index-DLPccxVU.d.ts.map +1 -0
- package/dist/index-DN04TjLM.d.ts +43 -0
- package/dist/index-DN04TjLM.d.ts.map +1 -0
- package/dist/index-DSzMf-rS.d.ts +43 -0
- package/dist/index-DSzMf-rS.d.ts.map +1 -0
- package/dist/index-Dq4xsW7_.d.ts +106 -0
- package/dist/index-Dq4xsW7_.d.ts.map +1 -0
- package/dist/index-O3hJsHSl.d.ts +11 -0
- package/dist/index-O3hJsHSl.d.ts.map +1 -0
- package/dist/index-TUtJOdMm.d.ts +42 -0
- package/dist/index-TUtJOdMm.d.ts.map +1 -0
- package/dist/index-ZiEXZJBF.d.ts +129 -0
- package/dist/index-ZiEXZJBF.d.ts.map +1 -0
- package/dist/index-fOYcs4NH.d.ts +53 -0
- package/dist/{lib/hexclave-app/api-keys/index.d.ts.map → index-fOYcs4NH.d.ts.map} +1 -1
- package/dist/index-hYjsGKNc.d.ts +66 -0
- package/dist/index-hYjsGKNc.d.ts.map +1 -0
- package/dist/index.d.ts +11 -16
- package/dist/index.js +23 -23
- package/dist/integrations/convex/component/convex.config.d.ts +1 -1
- package/dist/integrations/convex/component/convex.config.d.ts.map +1 -1
- package/dist/integrations/convex/component/convex.config.js +2 -5
- package/dist/integrations/convex/component/convex.config.js.map +1 -1
- package/dist/integrations/convex.js +2 -4
- package/dist/integrations/convex.js.map +1 -1
- package/dist/lib/auth.js +2 -4
- package/dist/lib/auth.js.map +1 -1
- package/dist/lib/auth.test.js +1 -3
- package/dist/lib/auth.test.js.map +1 -1
- package/dist/lib/cookie.d.ts +2 -42
- package/dist/lib/cookie.js +7 -25
- package/dist/lib/cookie.js.map +1 -1
- package/dist/lib/hexclave-app/api-keys/index.d.ts +2 -53
- package/dist/lib/hexclave-app/api-keys/index.js +2 -4
- package/dist/lib/hexclave-app/api-keys/index.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +2 -376
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js +2 -4
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js +1 -3
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +2 -554
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js +4 -5
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.oauth-prefetch.test.js +1 -3
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.oauth-prefetch.test.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/common.d.ts +2 -65
- package/dist/lib/hexclave-app/apps/implementations/common.js +7 -9
- package/dist/lib/hexclave-app/apps/implementations/common.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/event-tracker.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/event-tracker.js +2 -4
- package/dist/lib/hexclave-app/apps/implementations/event-tracker.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/event-tracker.test.js +1 -3
- package/dist/lib/hexclave-app/apps/implementations/event-tracker.test.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/index.d.ts +1 -3
- package/dist/lib/hexclave-app/apps/implementations/index.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/index.js +2 -4
- package/dist/lib/hexclave-app/apps/implementations/index.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/redirect-page-urls.d.ts +2 -35
- package/dist/lib/hexclave-app/apps/implementations/redirect-page-urls.js +2 -4
- package/dist/lib/hexclave-app/apps/implementations/redirect-page-urls.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.d.ts +2 -217
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.js +2 -4
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/session-refresh-subscription.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/session-refresh-subscription.js +2 -3
- package/dist/lib/hexclave-app/apps/implementations/session-refresh-subscription.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/session-refresh-subscription.test.js +1 -3
- package/dist/lib/hexclave-app/apps/implementations/session-refresh-subscription.test.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/session-replay.d.ts +2 -122
- package/dist/lib/hexclave-app/apps/implementations/session-replay.js +14 -9
- package/dist/lib/hexclave-app/apps/implementations/session-replay.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/session-replay.test.js +135 -3
- package/dist/lib/hexclave-app/apps/implementations/session-replay.test.js.map +1 -1
- package/dist/lib/hexclave-app/apps/index.d.ts +1 -3
- package/dist/lib/hexclave-app/apps/index.js +32 -34
- package/dist/lib/hexclave-app/apps/interfaces/admin-app.d.ts +3 -255
- package/dist/lib/hexclave-app/apps/interfaces/admin-app.js +3 -6
- package/dist/lib/hexclave-app/apps/interfaces/admin-app.js.map +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts +2 -219
- package/dist/lib/hexclave-app/apps/interfaces/client-app.js +3 -6
- package/dist/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/server-app.d.ts +2 -133
- package/dist/lib/hexclave-app/apps/interfaces/server-app.js +3 -6
- package/dist/lib/hexclave-app/apps/interfaces/server-app.js.map +1 -1
- package/dist/lib/hexclave-app/common.d.ts +2 -174
- package/dist/lib/hexclave-app/common.js +2 -3
- package/dist/lib/hexclave-app/common.js.map +1 -1
- package/dist/lib/hexclave-app/connected-accounts/index.d.ts +2 -40
- package/dist/lib/hexclave-app/contact-channels/index.d.ts +2 -43
- package/dist/lib/hexclave-app/contact-channels/index.js +2 -3
- package/dist/lib/hexclave-app/contact-channels/index.js.map +1 -1
- package/dist/lib/hexclave-app/customers/index.d.ts +2 -129
- package/dist/lib/hexclave-app/data-vault/index.d.ts +2 -14
- package/dist/lib/hexclave-app/email/index.d.ts +2 -206
- package/dist/lib/hexclave-app/email-templates/index.d.ts +2 -17
- package/dist/lib/hexclave-app/email-templates/index.js +2 -3
- package/dist/lib/hexclave-app/email-templates/index.js.map +1 -1
- package/dist/lib/hexclave-app/index.d.ts +10 -15
- package/dist/lib/hexclave-app/index.js +49 -51
- package/dist/lib/hexclave-app/internal-api-keys/index.d.ts +2 -42
- package/dist/lib/hexclave-app/internal-api-keys/index.js +2 -3
- package/dist/lib/hexclave-app/internal-api-keys/index.js.map +1 -1
- package/dist/lib/hexclave-app/notification-categories/index.d.ts +2 -11
- package/dist/lib/hexclave-app/permissions/index.d.ts +2 -43
- package/dist/lib/hexclave-app/permissions/index.js +2 -3
- package/dist/lib/hexclave-app/permissions/index.js.map +1 -1
- package/dist/lib/hexclave-app/plan-usage/index.d.ts +2 -27
- package/dist/lib/hexclave-app/project-configs/index.d.ts +2 -106
- package/dist/lib/hexclave-app/projects/index.d.ts +2 -152
- package/dist/lib/hexclave-app/projects/index.js +6 -3
- package/dist/lib/hexclave-app/projects/index.js.map +1 -1
- package/dist/lib/hexclave-app/session-replays/index.d.ts +2 -66
- package/dist/lib/hexclave-app/teams/index.d.ts +2 -164
- package/dist/lib/hexclave-app/teams/index.js +2 -3
- package/dist/lib/hexclave-app/teams/index.js.map +1 -1
- package/dist/lib/hexclave-app/url-targets.d.ts +2 -39
- package/dist/lib/hexclave-app/url-targets.js +3 -5
- package/dist/lib/hexclave-app/url-targets.js.map +1 -1
- package/dist/lib/hexclave-app/url-targets.test.js +1 -3
- package/dist/lib/hexclave-app/url-targets.test.js.map +1 -1
- package/dist/lib/hexclave-app/users/index.d.ts +2 -357
- package/dist/lib/hexclave-app/users/index.js +2 -4
- package/dist/lib/hexclave-app/users/index.js.map +1 -1
- package/dist/pushed-config-error-overlay/index.d.ts +1 -2
- package/dist/pushed-config-error-overlay/index.d.ts.map +1 -1
- package/dist/pushed-config-error-overlay/index.js +2 -4
- package/dist/pushed-config-error-overlay/index.js.map +1 -1
- package/dist/pushed-config-error-overlay/index.test.js +1 -3
- package/dist/pushed-config-error-overlay/index.test.js.map +1 -1
- package/dist/redirect-page-urls-elbPx2J1.d.ts +35 -0
- package/dist/redirect-page-urls-elbPx2J1.d.ts.map +1 -0
- package/dist/{chunk-BE-pF4vm.js → rolldown-runtime-D6vf50IK.js} +12 -18
- package/dist/session-replay-8_3WCrsZ.d.ts +122 -0
- package/dist/session-replay-8_3WCrsZ.d.ts.map +1 -0
- package/dist/{storage-CKsyME2q.d.ts → storage-CA867GtX.d.ts} +1 -1
- package/dist/storage-CA867GtX.d.ts.map +1 -0
- package/dist/url-targets-BJgkwPGW.d.ts +39 -0
- package/dist/url-targets-BJgkwPGW.d.ts.map +1 -0
- package/dist/utils/url.d.ts.map +1 -1
- package/dist/utils/url.js +2 -4
- package/dist/utils/url.js.map +1 -1
- package/package.json +4 -4
- package/src/lib/hexclave-app/apps/implementations/session-replay.test.ts +160 -1
- package/src/lib/hexclave-app/apps/implementations/session-replay.ts +38 -12
- package/dist/lib/cookie.d.ts.map +0 -1
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +0 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +0 -1
- package/dist/lib/hexclave-app/apps/implementations/common.d.ts.map +0 -1
- package/dist/lib/hexclave-app/apps/implementations/redirect-page-urls.d.ts.map +0 -1
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.d.ts.map +0 -1
- package/dist/lib/hexclave-app/apps/implementations/session-replay.d.ts.map +0 -1
- package/dist/lib/hexclave-app/apps/interfaces/admin-app.d.ts.map +0 -1
- package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +0 -1
- package/dist/lib/hexclave-app/apps/interfaces/server-app.d.ts.map +0 -1
- package/dist/lib/hexclave-app/common.d.ts.map +0 -1
- package/dist/lib/hexclave-app/connected-accounts/index.d.ts.map +0 -1
- package/dist/lib/hexclave-app/contact-channels/index.d.ts.map +0 -1
- package/dist/lib/hexclave-app/customers/index.d.ts.map +0 -1
- package/dist/lib/hexclave-app/data-vault/index.d.ts.map +0 -1
- package/dist/lib/hexclave-app/email/index.d.ts.map +0 -1
- package/dist/lib/hexclave-app/email-templates/index.d.ts.map +0 -1
- package/dist/lib/hexclave-app/internal-api-keys/index.d.ts.map +0 -1
- package/dist/lib/hexclave-app/notification-categories/index.d.ts.map +0 -1
- package/dist/lib/hexclave-app/permissions/index.d.ts.map +0 -1
- package/dist/lib/hexclave-app/plan-usage/index.d.ts.map +0 -1
- package/dist/lib/hexclave-app/project-configs/index.d.ts.map +0 -1
- package/dist/lib/hexclave-app/projects/index.d.ts.map +0 -1
- package/dist/lib/hexclave-app/session-replays/index.d.ts.map +0 -1
- package/dist/lib/hexclave-app/teams/index.d.ts.map +0 -1
- package/dist/lib/hexclave-app/url-targets.d.ts.map +0 -1
- package/dist/lib/hexclave-app/users/index.d.ts.map +0 -1
- package/dist/storage-CKsyME2q.d.ts.map +0 -1
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { t as AsyncStoreProperty } from "./common-BDyEKSM6.js";
|
|
2
|
+
import { inlineProductSchema } from "@hexclave/shared/dist/schema-fields";
|
|
3
|
+
import * as yup from "yup";
|
|
4
|
+
|
|
5
|
+
//#region src/lib/hexclave-app/customers/index.d.ts
|
|
6
|
+
type InlineProduct = yup.InferType<typeof inlineProductSchema>;
|
|
7
|
+
type Item = {
|
|
8
|
+
displayName: string;
|
|
9
|
+
/**
|
|
10
|
+
* May be negative.
|
|
11
|
+
*/
|
|
12
|
+
quantity: number;
|
|
13
|
+
/**
|
|
14
|
+
* Equal to Math.max(0, quantity).
|
|
15
|
+
*/
|
|
16
|
+
nonNegativeQuantity: number;
|
|
17
|
+
};
|
|
18
|
+
type ServerItem = Item & {
|
|
19
|
+
increaseQuantity(amount: number): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Decreases the quantity by the given amount.
|
|
22
|
+
*
|
|
23
|
+
* 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.
|
|
24
|
+
*/
|
|
25
|
+
decreaseQuantity(amount: number): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* 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.
|
|
28
|
+
*
|
|
29
|
+
* Most useful for pre-paid credits.
|
|
30
|
+
*/
|
|
31
|
+
tryDecreaseQuantity(amount: number): Promise<boolean>;
|
|
32
|
+
};
|
|
33
|
+
type CustomerProduct = {
|
|
34
|
+
id: string | null;
|
|
35
|
+
quantity: number;
|
|
36
|
+
displayName: string;
|
|
37
|
+
customerType: "user" | "team" | "custom";
|
|
38
|
+
isServerOnly: boolean;
|
|
39
|
+
stackable: boolean; /** @deprecated Product ownership is independent of purchase type. Will be removed in a future version. */
|
|
40
|
+
type?: "one_time" | "subscription";
|
|
41
|
+
subscription: null | {
|
|
42
|
+
subscriptionId: string | null;
|
|
43
|
+
currentPeriodEnd: Date | null;
|
|
44
|
+
cancelAtPeriodEnd: boolean;
|
|
45
|
+
isCancelable: boolean;
|
|
46
|
+
};
|
|
47
|
+
switchOptions?: Array<{
|
|
48
|
+
productId: string;
|
|
49
|
+
displayName: string;
|
|
50
|
+
prices: InlineProduct["prices"];
|
|
51
|
+
}>;
|
|
52
|
+
};
|
|
53
|
+
type CustomerProductsList = CustomerProduct[] & {
|
|
54
|
+
nextCursor: string | null;
|
|
55
|
+
};
|
|
56
|
+
type CustomerProductsListOptions = {
|
|
57
|
+
cursor?: string;
|
|
58
|
+
limit?: number;
|
|
59
|
+
};
|
|
60
|
+
type CustomerProductsRequestOptions = ({
|
|
61
|
+
userId: string;
|
|
62
|
+
} & CustomerProductsListOptions) | ({
|
|
63
|
+
teamId: string;
|
|
64
|
+
} & CustomerProductsListOptions) | ({
|
|
65
|
+
customCustomerId: string;
|
|
66
|
+
} & CustomerProductsListOptions);
|
|
67
|
+
type CustomerInvoiceStatus = "draft" | "open" | "paid" | "uncollectible" | "void" | null;
|
|
68
|
+
type CustomerInvoice = {
|
|
69
|
+
createdAt: Date;
|
|
70
|
+
status: CustomerInvoiceStatus;
|
|
71
|
+
amountTotal: number;
|
|
72
|
+
hostedInvoiceUrl: string | null;
|
|
73
|
+
};
|
|
74
|
+
type CustomerInvoicesList = CustomerInvoice[] & {
|
|
75
|
+
nextCursor: string | null;
|
|
76
|
+
};
|
|
77
|
+
type CustomerInvoicesListOptions = {
|
|
78
|
+
cursor?: string;
|
|
79
|
+
limit?: number;
|
|
80
|
+
};
|
|
81
|
+
type CustomerInvoicesRequestOptions = ({
|
|
82
|
+
userId: string;
|
|
83
|
+
} & CustomerInvoicesListOptions) | ({
|
|
84
|
+
teamId: string;
|
|
85
|
+
} & CustomerInvoicesListOptions);
|
|
86
|
+
type CustomerDefaultPaymentMethod = {
|
|
87
|
+
id: string;
|
|
88
|
+
brand: string | null;
|
|
89
|
+
last4: string | null;
|
|
90
|
+
exp_month: number | null;
|
|
91
|
+
exp_year: number | null;
|
|
92
|
+
} | null;
|
|
93
|
+
type CustomerBilling = {
|
|
94
|
+
hasCustomer: boolean;
|
|
95
|
+
defaultPaymentMethod: CustomerDefaultPaymentMethod;
|
|
96
|
+
};
|
|
97
|
+
type CustomerPaymentMethodSetupIntent = {
|
|
98
|
+
clientSecret: string;
|
|
99
|
+
stripeAccountId: string;
|
|
100
|
+
};
|
|
101
|
+
type Customer<IsServer extends boolean = false> = {
|
|
102
|
+
readonly id: string;
|
|
103
|
+
createCheckoutUrl(options: ({
|
|
104
|
+
productId: string;
|
|
105
|
+
returnUrl?: string;
|
|
106
|
+
} | (IsServer extends true ? {
|
|
107
|
+
product: InlineProduct;
|
|
108
|
+
returnUrl?: string;
|
|
109
|
+
} : never))): Promise<string>;
|
|
110
|
+
createPaymentMethodSetupIntent(): Promise<CustomerPaymentMethodSetupIntent>;
|
|
111
|
+
setDefaultPaymentMethodFromSetupIntent(setupIntentId: string): Promise<CustomerDefaultPaymentMethod>;
|
|
112
|
+
switchSubscription(options: {
|
|
113
|
+
fromProductId: string;
|
|
114
|
+
toProductId: string;
|
|
115
|
+
priceId?: string;
|
|
116
|
+
quantity?: number;
|
|
117
|
+
}): Promise<void>;
|
|
118
|
+
} & AsyncStoreProperty<"billing", [], CustomerBilling, false> & AsyncStoreProperty<"item", [itemId: string], IsServer extends true ? ServerItem : Item, false> & AsyncStoreProperty<"products", [options?: CustomerProductsListOptions], CustomerProductsList, true> & AsyncStoreProperty<"invoices", [options?: CustomerInvoicesListOptions], CustomerInvoicesList, true> & (IsServer extends true ? {
|
|
119
|
+
grantProduct(product: {
|
|
120
|
+
productId: string;
|
|
121
|
+
quantity?: number;
|
|
122
|
+
} | {
|
|
123
|
+
product: InlineProduct;
|
|
124
|
+
quantity?: number;
|
|
125
|
+
}): Promise<void>;
|
|
126
|
+
} : {});
|
|
127
|
+
//#endregion
|
|
128
|
+
export { CustomerInvoiceStatus as a, CustomerInvoicesRequestOptions as c, CustomerProductsList as d, CustomerProductsListOptions as f, ServerItem as g, Item as h, CustomerInvoice as i, CustomerPaymentMethodSetupIntent as l, InlineProduct as m, CustomerBilling as n, CustomerInvoicesList as o, CustomerProductsRequestOptions as p, CustomerDefaultPaymentMethod as r, CustomerInvoicesListOptions as s, Customer as t, CustomerProduct as u };
|
|
129
|
+
//# sourceMappingURL=index-ZiEXZJBF.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-ZiEXZJBF.d.ts","names":[],"sources":["../src/lib/hexclave-app/customers/index.ts"],"mappings":";;;;;KAQY,aAAA,GAAgB,GAAA,CAAI,SAAS,QAAQ,mBAAA;AAAA,KAErC,IAAA;EACV,WAAA;EAHuB;;;EAOvB,QAAA;EAP8B;;;EAW9B,mBAAA;AAAA;AAAA,KAGU,UAAA,GAAa,IAAA;EACvB,gBAAA,CAAiB,MAAA,WAAiB,OAAA;EAbpB;;;;;EAmBd,gBAAA,CAAiB,MAAA,WAAiB,OAAA;EAPxB;;;;;EAaV,mBAAA,CAAoB,MAAA,WAAiB,OAAA;AAAA;AAAA,KAG3B,eAAA;EACV,EAAA;EACA,QAAA;EACA,WAAA;EACA,YAAA;EACA,YAAA;EACA,SAAA,WAfiB;EAiBjB,IAAA;EACA,YAAA;IACE,cAAA;IACA,gBAAA,EAAkB,IAAA;IAClB,iBAAA;IACA,YAAA;EAAA;EAEF,aAAA,GAAgB,KAAA;IACd,SAAA;IACA,WAAA;IACA,MAAA,EAAQ,aAAA;EAAA;AAAA;AAAA,KAIA,oBAAA,GAAuB,eAAe;EAChD,UAAU;AAAA;AAAA,KAGA,2BAAA;EACV,MAAA;EACA,KAAK;AAAA;AAAA,KAGK,8BAAA;EACL,MAAA;AAAA,IAAmB,2BAAA;EACnB,MAAA;AAAA,IAAmB,2BAAA;EACnB,gBAAA;AAAA,IAA6B,2BAAA;AAAA,KAExB,qBAAA;AAAA,KAEA,eAAA;EACV,SAAA,EAAW,IAAA;EACX,MAAA,EAAQ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eysCrud, UserApiKeysCrud, teamApiKeysCreateInputSchema, userApiKeysCreateInputSchema } from "@hexclave/shared/dist/interface/crud/project-api-keys";
|
|
4
|
+
|
|
5
|
+
//#region src/lib/hexclave-app/api-keys/index.d.ts
|
|
6
|
+
type ApiKeyType = "user" | "team";
|
|
7
|
+
type ApiKey<Type extends ApiKeyType = ApiKeyType, IsFirstView extends boolean = false> = {
|
|
8
|
+
id: string;
|
|
9
|
+
description: string;
|
|
10
|
+
expiresAt?: Date;
|
|
11
|
+
manuallyRevokedAt?: Date | null;
|
|
12
|
+
createdAt: Date;
|
|
13
|
+
value: IfAndOnlyIf<IsFirstView, true, string, {
|
|
14
|
+
lastFour: string;
|
|
15
|
+
}>;
|
|
16
|
+
update(options: ApiKeyUpdateOptions<Type>): Promise<void>;
|
|
17
|
+
revoke: () => Promise<void>;
|
|
18
|
+
isValid: () => boolean;
|
|
19
|
+
whyInvalid: () => "manually-revoked" | "expired" | null;
|
|
20
|
+
} & (("user" extends Type ? {
|
|
21
|
+
type: "user";
|
|
22
|
+
userId: string;
|
|
23
|
+
} : never) | ("team" extends Type ? {
|
|
24
|
+
type: "team";
|
|
25
|
+
teamId: string;
|
|
26
|
+
} : never));
|
|
27
|
+
type UserApiKeyFirstView = PrettifyType<ApiKey<"user", true>>;
|
|
28
|
+
type UserApiKey = PrettifyType<ApiKey<"user", false>>;
|
|
29
|
+
type TeamApiKeyFirstView = PrettifyType<ApiKey<"team", true>>;
|
|
30
|
+
type TeamApiKey = PrettifyType<ApiKey<"team", false>>;
|
|
31
|
+
type ApiKeyCreationOptions<Type extends ApiKeyType = ApiKeyType> = {
|
|
32
|
+
description: string;
|
|
33
|
+
expiresAt: Date | null;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the API key should be considered public. A public API key will not be detected by the secret scanner, which
|
|
36
|
+
* automatically revokes API keys when it detects that they may have been exposed to the public.
|
|
37
|
+
*/
|
|
38
|
+
isPublic?: boolean;
|
|
39
|
+
};
|
|
40
|
+
declare function apiKeyCreationOptionsToCrud(type: "user", userId: string, options: ApiKeyCreationOptions<"user">): Promise<yup.InferType<typeof userApiKeysCreateInputSchema>>;
|
|
41
|
+
declare function apiKeyCreationOptionsToCrud(type: "team", teamId: string, options: ApiKeyCreationOptions<"team">): Promise<yup.InferType<typeof teamApiKeysCreateInputSchema>>;
|
|
42
|
+
declare function apiKeyCreationOptionsToCrud(type: ApiKeyType, userIdOrTeamId: string, options: ApiKeyCreationOptions): Promise<yup.InferType<typeof userApiKeysCreateInputSchema> | yup.InferType<typeof teamApiKeysCreateInputSchema>>;
|
|
43
|
+
type ApiKeyUpdateOptions<Type extends ApiKeyType = ApiKeyType> = {
|
|
44
|
+
description?: string;
|
|
45
|
+
expiresAt?: Date | null;
|
|
46
|
+
revoked?: boolean;
|
|
47
|
+
};
|
|
48
|
+
declare function apiKeyUpdateOptionsToCrud(type: "user", options: ApiKeyUpdateOptions<"user">): Promise<UserApiKeysCrud["Client"]["Update"]>;
|
|
49
|
+
declare function apiKeyUpdateOptionsToCrud(type: "team", options: ApiKeyUpdateOptions<"team">): Promise<TeamApiKeysCrud["Client"]["Update"]>;
|
|
50
|
+
declare function apiKeyUpdateOptionsToCrud(type: ApiKeyType, options: ApiKeyUpdateOptions): Promise<UserApiKeysCrud["Client"]["Update"] | TeamApiKeysCrud["Client"]["Update"]>;
|
|
51
|
+
//#endregion
|
|
52
|
+
export { TeamApiKey as a, UserApiKeyFirstView as c, ApiKeyUpdateOptions as i, apiKeyCreationOptionsToCrud as l, ApiKeyCreationOptions as n, TeamApiKeyFirstView as o, ApiKeyType as r, UserApiKey as s, ApiKey as t, apiKeyUpdateOptionsToCrud as u };
|
|
53
|
+
//# sourceMappingURL=index-fOYcs4NH.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"index-fOYcs4NH.d.ts","names":[],"sources":["../src/lib/hexclave-app/api-keys/index.ts"],"mappings":";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AA,iBAEc,yBAAA,CAA0B,IAAA,UAAc,OAAA,EAAS,mBAAA,WAA8B,OAAA,CAAQ,eAAA;AAAA,iBACvF,yBAAA,CAA0B,IAAA,UAAc,OAAA,EAAS,mBAAA,WAA8B,OAAA,CAAQ,eAAA;AAAA,iBACvF,yBAAA,CAA0B,IAAA,EAAM,UAAA,EAAY,OAAA,EAAS,mBAAA,GAAsB,OAAA,CAAQ,eAAA,uBAAsC,eAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
//#region src/lib/hexclave-app/session-replays/index.d.ts
|
|
2
|
+
type AdminSessionReplay = {
|
|
3
|
+
id: string;
|
|
4
|
+
projectUser: {
|
|
5
|
+
id: string;
|
|
6
|
+
displayName: string | null;
|
|
7
|
+
primaryEmail: string | null;
|
|
8
|
+
};
|
|
9
|
+
startedAt: Date;
|
|
10
|
+
lastEventAt: Date;
|
|
11
|
+
chunkCount: number;
|
|
12
|
+
eventCount: number;
|
|
13
|
+
};
|
|
14
|
+
type AdminSessionReplayChunk = {
|
|
15
|
+
id: string;
|
|
16
|
+
batchId: string;
|
|
17
|
+
sessionReplaySegmentId: string | null;
|
|
18
|
+
browserSessionId: string | null;
|
|
19
|
+
eventCount: number;
|
|
20
|
+
byteLength: number;
|
|
21
|
+
firstEventAt: Date;
|
|
22
|
+
lastEventAt: Date;
|
|
23
|
+
createdAt: Date;
|
|
24
|
+
};
|
|
25
|
+
type ListSessionReplaysOptions = {
|
|
26
|
+
limit?: number;
|
|
27
|
+
cursor?: string;
|
|
28
|
+
userIds?: string[];
|
|
29
|
+
teamIds?: string[];
|
|
30
|
+
durationMsMin?: number;
|
|
31
|
+
durationMsMax?: number;
|
|
32
|
+
lastEventAtFromMillis?: number;
|
|
33
|
+
lastEventAtToMillis?: number;
|
|
34
|
+
clickCountMin?: number;
|
|
35
|
+
};
|
|
36
|
+
type ListSessionReplaysResult = {
|
|
37
|
+
items: AdminSessionReplay[];
|
|
38
|
+
nextCursor: string | null;
|
|
39
|
+
};
|
|
40
|
+
type ListSessionReplayChunksOptions = {
|
|
41
|
+
limit?: number;
|
|
42
|
+
cursor?: string;
|
|
43
|
+
};
|
|
44
|
+
type ListSessionReplayChunksResult = {
|
|
45
|
+
items: AdminSessionReplayChunk[];
|
|
46
|
+
nextCursor: string | null;
|
|
47
|
+
};
|
|
48
|
+
type SessionReplayAllEventsResult = {
|
|
49
|
+
chunks: Array<{
|
|
50
|
+
id: string;
|
|
51
|
+
batchId: string;
|
|
52
|
+
sessionReplaySegmentId: string | null;
|
|
53
|
+
eventCount: number;
|
|
54
|
+
byteLength: number;
|
|
55
|
+
firstEventAt: Date;
|
|
56
|
+
lastEventAt: Date;
|
|
57
|
+
createdAt: Date;
|
|
58
|
+
}>;
|
|
59
|
+
chunkEvents: Array<{
|
|
60
|
+
chunkId: string;
|
|
61
|
+
events: unknown[];
|
|
62
|
+
}>;
|
|
63
|
+
};
|
|
64
|
+
//#endregion
|
|
65
|
+
export { ListSessionReplaysOptions as a, ListSessionReplayChunksResult as i, AdminSessionReplayChunk as n, ListSessionReplaysResult as o, ListSessionReplayChunksOptions as r, SessionReplayAllEventsResult as s, AdminSessionReplay as t };
|
|
66
|
+
//# sourceMappingURL=index-hYjsGKNc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-hYjsGKNc.d.ts","names":[],"sources":["../src/lib/hexclave-app/session-replays/index.ts"],"mappings":";KAIY,kBAAA;EACV,EAAA;EACA,WAAA;IACE,EAAA;IACA,WAAA;IACA,YAAA;EAAA;EAEF,SAAA,EAAW,IAAA;EACX,WAAA,EAAa,IAAI;EACjB,UAAA;EACA,UAAA;AAAA;AAAA,KAGU,uBAAA;EACV,EAAA;EACA,OAAA;EACA,sBAAA;EACA,gBAAA;EACA,UAAA;EACA,UAAA;EACA,YAAA,EAAc,IAAA;EACd,WAAA,EAAa,IAAA;EACb,SAAA,EAAW,IAAA;AAAA;AAAA,KAGD,yBAAA;EACV,KAAA;EACA,MAAA;EACA,OAAA;EACA,OAAA;EACA,aAAA;EACA,aAAA;EACA,qBAAA;EACA,mBAAA;EACA,aAAA;AAAA;AAAA,KAGU,wBAAA;EACV,KAAA,EAAO,kBAAkB;EACzB,UAAA;AAAA;AAAA,KAGU,8BAAA;EACV,KAAA;EACA,MAAM;AAAA;AAAA,KAGI,6BAAA;EACV,KAAA,EAAO,uBAAuB;EAC9B,UAAA;AAAA;AAAA,KAGU,4BAAA;EACV,MAAA,EAAQ,KAAA;IACN,EAAA;IACA,OAAA;IACA,sBAAA;IACA,UAAA;IACA,UAAA;IACA,YAAA,EAAc,IAAA;IACd,WAAA,EAAa,IAAA;IACb,SAAA,EAAW,IAAA;EAAA;EAEb,WAAA,EAAa,KAAA;IACX,OAAA;IACA,MAAA;EAAA;AAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { EmailOutboxListOptions, EmailOutboxListResult, EmailOutboxUpdateOptions, HexclaveAdminApp, HexclaveAdminAppConstructor, HexclaveAdminAppConstructorOptions, StackAdminApp, StackAdminAppConstructor, StackAdminAppConstructorOptions } from "./lib/hexclave-app/apps/interfaces/admin-app.js";
|
|
12
|
-
import { AdminDomainConfig, AdminEmailConfig, AdminOAuthProviderConfig, AdminProjectConfig, AdminProjectConfigUpdateOptions, OAuthProviderConfig, ProjectConfig } from "./lib/hexclave-app/project-configs/index.js";
|
|
13
|
-
import { AdminOwnedProject, AdminProject, AdminProjectCreateOptions, AdminProjectUpdateOptions, Project, PushedConfigSource } from "./lib/hexclave-app/projects/index.js";
|
|
14
|
-
import { HexclaveClientApp, HexclaveClientAppConstructor, HexclaveClientAppConstructorOptions, HexclaveClientAppJson, StackClientApp, StackClientAppConstructor, StackClientAppConstructorOptions, StackClientAppJson } from "./lib/hexclave-app/apps/interfaces/client-app.js";
|
|
15
|
-
import { getPagePrompt } from "./lib/hexclave-app/url-targets.js";
|
|
1
|
+
import { _ as ResolvedHandlerUrls, f as HandlerUrls, p as OAuthScopesOnSignIn, s as GetCurrentUserOptions, u as HandlerUrlOptions, y as hexclaveAppInternalsSymbol } from "./common-BDyEKSM6.js";
|
|
2
|
+
import { S as AdminSentEmail, b as AdminEmailOutboxStatus, d as AdminEmailOutboxRecipient, t as AdminEmailOutbox, v as AdminEmailOutboxSimpleStatus, x as AdminSendAttemptError } from "./index-CBDR4cNg.js";
|
|
3
|
+
import { a as InternalApiKeyFirstView, i as InternalApiKeyCreateOptions, n as InternalApiKeyBase, r as InternalApiKeyBaseCrudRead, t as InternalApiKey } from "./index-TUtJOdMm.js";
|
|
4
|
+
import { a as AdminTeamPermission, c as AdminTeamPermissionDefinitionUpdateOptions, i as AdminProjectPermissionDefinitionUpdateOptions, n as AdminProjectPermissionDefinition, o as AdminTeamPermissionDefinition, r as AdminProjectPermissionDefinitionCreateOptions, s as AdminTeamPermissionDefinitionCreateOptions, t as AdminProjectPermission } from "./index-DSzMf-rS.js";
|
|
5
|
+
import { a as PlanUsageRow, i as PlanUsagePlanId, n as PlanUsageKind, r as PlanUsageNextPlanId, t as PlanUsage } from "./index-D7Vdg30O.js";
|
|
6
|
+
import { r as OAuthConnection, t as Connection } from "./index-ClBTM-St.js";
|
|
7
|
+
import { i as ServerContactChannel, t as ContactChannel } from "./index-DN04TjLM.js";
|
|
8
|
+
import { A as HexclaveServerApp, B as ServerListUsersOptions, C as HexclaveAdminAppConstructorOptions, D as StackAdminApp, F as StackServerAppConstructorOptions, G as ServerTeamUser, H as ServerTeamCreateOptions, I as EditableTeamMemberProfile, J as TeamInvitation, K as Team, L as ReceivedTeamInvitation, M as HexclaveServerAppConstructorOptions, N as StackServerApp, O as StackAdminAppConstructor, P as StackServerAppConstructor, Q as TeamUser, R as SentTeamInvitation, S as HexclaveAdminAppConstructor, St as User, U as ServerTeamMemberProfile, V as ServerTeam, W as ServerTeamUpdateOptions, Y as TeamMemberProfile, Z as TeamUpdateOptions, a as StackClientApp, b as EmailOutboxUpdateOptions, c as StackClientAppJson, ct as CurrentServerUser, d as AdminProjectCreateOptions, dt as OAuthProvider, f as AdminProjectUpdateOptions, gt as ServerUser, h as PushedConfigSource, ht as ServerOAuthProvider, i as HexclaveClientAppJson, it as Auth, j as HexclaveServerAppConstructor, k as StackAdminAppConstructorOptions, l as AdminOwnedProject, lt as CurrentUser, n as HexclaveClientAppConstructor, o as StackClientAppConstructor, ot as CurrentInternalServerUser, p as Project, q as TeamCreateOptions, r as HexclaveClientAppConstructorOptions, s as StackClientAppConstructorOptions, st as CurrentInternalUser, t as HexclaveClientApp, u as AdminProject, v as EmailOutboxListOptions, x as HexclaveAdminApp, y as EmailOutboxListResult } from "./client-app-D8-Lm4RT.js";
|
|
9
|
+
import { a as AdminProjectConfigUpdateOptions, i as AdminProjectConfig, n as AdminEmailConfig, o as OAuthProviderConfig, r as AdminOAuthProviderConfig, s as ProjectConfig, t as AdminDomainConfig } from "./index-Dq4xsW7_.js";
|
|
10
|
+
import { r as getPagePrompt } from "./url-targets-BJgkwPGW.js";
|
|
16
11
|
import { getConvexProvidersConfig } from "./integrations/convex.js";
|
|
17
12
|
import { HexclaveConfig, StackConfig, defineHexclaveConfig, defineStackConfig } from "@hexclave/shared/config";
|
|
18
|
-
export { AdminDomainConfig, AdminEmailConfig, AdminEmailOutbox, AdminEmailOutboxRecipient, AdminEmailOutboxSimpleStatus, AdminEmailOutboxStatus, AdminOAuthProviderConfig, AdminOwnedProject, AdminProject, AdminProjectConfig, AdminProjectConfigUpdateOptions, AdminProjectCreateOptions, AdminProjectPermission, AdminProjectPermissionDefinition, AdminProjectPermissionDefinitionCreateOptions, AdminProjectPermissionDefinitionUpdateOptions, AdminProjectUpdateOptions, AdminSendAttemptError, AdminSentEmail, AdminTeamPermission, AdminTeamPermissionDefinition, AdminTeamPermissionDefinitionCreateOptions, AdminTeamPermissionDefinitionUpdateOptions, Auth, Connection, ContactChannel, CurrentInternalServerUser, CurrentInternalUser, CurrentServerUser, CurrentUser, EditableTeamMemberProfile, EmailOutboxListOptions, EmailOutboxListResult, EmailOutboxUpdateOptions, GetCurrentUserOptions, GetCurrentUserOptions as GetUserOptions, HandlerUrlOptions, HandlerUrls, HexclaveAdminApp, HexclaveAdminAppConstructor, HexclaveAdminAppConstructorOptions, HexclaveClientApp, HexclaveClientAppConstructor, HexclaveClientAppConstructorOptions, HexclaveClientAppJson, type HexclaveConfig, HexclaveServerApp, HexclaveServerAppConstructor, HexclaveServerAppConstructorOptions, InternalApiKey, InternalApiKeyBase, InternalApiKeyBaseCrudRead, InternalApiKeyCreateOptions, InternalApiKeyFirstView, OAuthConnection, OAuthProvider, OAuthProviderConfig, OAuthScopesOnSignIn, PlanUsage, PlanUsageKind, PlanUsageNextPlanId, PlanUsagePlanId, PlanUsageRow, Project, ProjectConfig, PushedConfigSource, ReceivedTeamInvitation, ResolvedHandlerUrls, SentTeamInvitation, ServerContactChannel, ServerListUsersOptions, ServerOAuthProvider, ServerTeam, ServerTeamCreateOptions, ServerTeamMemberProfile, ServerTeamUpdateOptions, ServerTeamUser, ServerUser, StackAdminApp, StackAdminAppConstructor, StackAdminAppConstructorOptions, StackClientApp, StackClientAppConstructor, StackClientAppConstructorOptions, StackClientAppJson, type StackConfig, StackServerApp, StackServerAppConstructor, StackServerAppConstructorOptions, Team, TeamCreateOptions, TeamInvitation, TeamMemberProfile, TeamUpdateOptions, TeamUser, User, defineHexclaveConfig, defineStackConfig, getConvexProvidersConfig, getPagePrompt, hexclaveAppInternalsSymbol };
|
|
13
|
+
export { type AdminDomainConfig, type AdminEmailConfig, type AdminEmailOutbox, type AdminEmailOutboxRecipient, type AdminEmailOutboxSimpleStatus, type AdminEmailOutboxStatus, type AdminOAuthProviderConfig, type AdminOwnedProject, type AdminProject, type AdminProjectConfig, type AdminProjectConfigUpdateOptions, type AdminProjectCreateOptions, type AdminProjectPermission, type AdminProjectPermissionDefinition, type AdminProjectPermissionDefinitionCreateOptions, type AdminProjectPermissionDefinitionUpdateOptions, type AdminProjectUpdateOptions, type AdminSendAttemptError, type AdminSentEmail, type AdminTeamPermission, type AdminTeamPermissionDefinition, type AdminTeamPermissionDefinitionCreateOptions, type AdminTeamPermissionDefinitionUpdateOptions, type Auth, type Connection, type ContactChannel, type CurrentInternalServerUser, type CurrentInternalUser, type CurrentServerUser, type CurrentUser, type EditableTeamMemberProfile, type EmailOutboxListOptions, type EmailOutboxListResult, type EmailOutboxUpdateOptions, type GetCurrentUserOptions, type GetCurrentUserOptions as GetUserOptions, type HandlerUrlOptions, type HandlerUrls, HexclaveAdminApp, type HexclaveAdminAppConstructor, type HexclaveAdminAppConstructorOptions, HexclaveClientApp, type HexclaveClientAppConstructor, type HexclaveClientAppConstructorOptions, type HexclaveClientAppJson, type HexclaveConfig, HexclaveServerApp, type HexclaveServerAppConstructor, type HexclaveServerAppConstructorOptions, type InternalApiKey, type InternalApiKeyBase, type InternalApiKeyBaseCrudRead, type InternalApiKeyCreateOptions, type InternalApiKeyFirstView, type OAuthConnection, type OAuthProvider, type OAuthProviderConfig, type OAuthScopesOnSignIn, type PlanUsage, type PlanUsageKind, type PlanUsageNextPlanId, type PlanUsagePlanId, type PlanUsageRow, type Project, type ProjectConfig, type PushedConfigSource, type ReceivedTeamInvitation, type ResolvedHandlerUrls, type SentTeamInvitation, type ServerContactChannel, type ServerListUsersOptions, type ServerOAuthProvider, type ServerTeam, type ServerTeamCreateOptions, type ServerTeamMemberProfile, type ServerTeamUpdateOptions, type ServerTeamUser, type ServerUser, StackAdminApp, type StackAdminAppConstructor, type StackAdminAppConstructorOptions, StackClientApp, type StackClientAppConstructor, type StackClientAppConstructorOptions, type StackClientAppJson, type StackConfig, StackServerApp, type StackServerAppConstructor, type StackServerAppConstructorOptions, type Team, type TeamCreateOptions, type TeamInvitation, type TeamMemberProfile, type TeamUpdateOptions, type TeamUser, type User, defineHexclaveConfig, defineStackConfig, getConvexProvidersConfig, getPagePrompt, hexclaveAppInternalsSymbol };
|
package/dist/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
2
|
-
const require_chunk = require('./chunk-BE-pF4vm.js');
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
2
|
let _hexclave_shared_config = require("@hexclave/shared/config");
|
|
4
3
|
let __integrations_convex_js = require("./integrations/convex.js");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
4
|
+
Object.defineProperty(exports, "defineHexclaveConfig", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: function() {
|
|
7
|
+
return _hexclave_shared_config.defineHexclaveConfig;
|
|
8
|
+
}
|
|
11
9
|
});
|
|
12
|
-
Object.defineProperty(exports,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
Object.defineProperty(exports, "defineStackConfig", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function() {
|
|
13
|
+
return _hexclave_shared_config.defineStackConfig;
|
|
14
|
+
}
|
|
17
15
|
});
|
|
18
|
-
Object.defineProperty(exports,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
Object.defineProperty(exports, "getConvexProvidersConfig", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function() {
|
|
19
|
+
return __integrations_convex_js.getConvexProvidersConfig;
|
|
20
|
+
}
|
|
23
21
|
});
|
|
24
22
|
var __lib_hexclave_app_index_js = require("./lib/hexclave-app/index.js");
|
|
25
|
-
Object.keys(__lib_hexclave_app_index_js).forEach(function
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
Object.keys(__lib_hexclave_app_index_js).forEach(function(k) {
|
|
24
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function() {
|
|
27
|
+
return __lib_hexclave_app_index_js[k];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
30
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as FunctionReference } from "../../../storage-
|
|
1
|
+
import { n as FunctionReference } from "../../../storage-CA867GtX.js";
|
|
2
2
|
|
|
3
3
|
//#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/server/components/index.d.ts
|
|
4
4
|
interface ComponentExports {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convex.config.d.ts","names":["
|
|
1
|
+
{"version":3,"file":"convex.config.d.ts","names":["Type","FunctionType","Args","DefaultFunctionArgs","ReturnType","FunctionReference","functionReference","Promise","FunctionHandle","key","ComponentExports","Exports","use","Definition","ComponentDefinition","definition","name","options","InstalledComponent","__exports","T","constructor","exports","ComponentDefinitionExports","componentDefinitionPath","defaultName","AppDefinition","AnyInterfaceType","AnyFunctionReference","Record","AnyComponentReference","AnyChildComponents"],"sources":["../../../../../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/server/components/index.d.ts","../../../../src/integrations/convex/component/convex.config.ts"],"x_google_ignoreList":[0],"mappings":";;;UA+BU,gBAAA;EAAA,CACLS,GAAAA,WAAc,iBAAA,uBAAwC,gBAAgB;AAAA;;;;AA0BrD;AACpB;;;KAlBU,mBAAA,iBAAoC,gBAAA;EAmBhBW;;;;AAAuC;AAoBrE;;;EA9BER,GAAAA,oBAAuB,mBAAA,OAA0BG,UAAAA,EAAY,UAAA,EAAYE,OAAAA;IACrED,IAAAA;EAAAA,IACA,kBAAA,CAAmB,UAAA;EAkCR;;;;;EA5BfG,SAAAA,EAAW,OAAA;AAAA;AAAA,KAEV,0BAAA,WAAqC,mBAAA,SAA4B,CAAC;;;;;;AA0Bf;;;;;cAF1C,kBAAA,oBAAsC,mBAAA;EAChDE,WAAAA,CAAYN,UAAAA,EAAY,UAAA,EAAYC,IAAAA;EAAAA,IAChCM,OAAAA,IAAW,0BAAA,CAA2B,UAAA;AAAA;;;;;;;;;;;;cChFxC,SAAA,EAAyC,mBAAhC;AAAA"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
const require_chunk = require('../../../chunk-BE-pF4vm.js');
|
|
2
|
-
let convex_server = require("convex/server");
|
|
3
|
-
|
|
4
1
|
//#region src/integrations/convex/component/convex.config.ts
|
|
5
|
-
const component = (0,
|
|
6
|
-
|
|
2
|
+
const component = (0, require("convex/server").defineComponent)("stack_auth");
|
|
7
3
|
//#endregion
|
|
8
4
|
module.exports = component;
|
|
5
|
+
|
|
9
6
|
//# sourceMappingURL=convex.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convex.config.js","names":[],"sources":["../../../../src/integrations/convex/component/convex.config.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { defineComponent } from \"convex/server\";\n\nconst component = defineComponent(\"stack_auth\");\n\nexport default component;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"convex.config.js","names":[],"sources":["../../../../src/integrations/convex/component/convex.config.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { defineComponent } from \"convex/server\";\n\nconst component = defineComponent(\"stack_auth\");\n\nexport default component;\n"],"mappings":";AAMA,MAAM,aAAA,0BAAA,CAAA,CAAA,gBAAA,CAA4B,YAAY"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
2
|
-
const require_chunk = require('../chunk-BE-pF4vm.js');
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
2
|
let _hexclave_shared_dist_utils_urls = require("@hexclave/shared/dist/utils/urls");
|
|
4
3
|
let ___lib_hexclave_app_apps_implementations_common_js = require("../lib/hexclave-app/apps/implementations/common.js");
|
|
5
|
-
|
|
6
4
|
//#region src/integrations/convex.ts
|
|
7
5
|
function getConvexProvidersConfig(options) {
|
|
8
6
|
const baseUrl = options.baseUrl || ___lib_hexclave_app_apps_implementations_common_js.defaultBaseUrl;
|
|
@@ -19,7 +17,7 @@ function getConvexProvidersConfig(options) {
|
|
|
19
17
|
algorithm: "ES256"
|
|
20
18
|
}];
|
|
21
19
|
}
|
|
22
|
-
|
|
23
20
|
//#endregion
|
|
24
21
|
exports.getConvexProvidersConfig = getConvexProvidersConfig;
|
|
22
|
+
|
|
25
23
|
//# sourceMappingURL=convex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convex.js","names":["defaultBaseUrl"],"sources":["../../src/integrations/convex.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { urlString } from \"@hexclave/shared/dist/utils/urls\";\nimport { defaultBaseUrl } from \"../lib/hexclave-app/apps/implementations/common\";\n\nexport function getConvexProvidersConfig(options: {\n baseUrl?: string,\n projectId: string,\n}) {\n const baseUrl = options.baseUrl || defaultBaseUrl;\n const projectId = options.projectId;\n return [\n {\n type: \"customJwt\",\n issuer: new URL(urlString`/api/v1/projects/${projectId}`, baseUrl),\n jwks: new URL(urlString`/api/v1/projects/${projectId}/.well-known/jwks.json`, baseUrl),\n algorithm: \"ES256\",\n },\n {\n type: \"customJwt\",\n issuer: new URL(urlString`/api/v1/projects-anonymous-users/${projectId}`, baseUrl),\n jwks: new URL(urlString`/api/v1/projects/${projectId}/.well-known/jwks.json?include_anonymous=true`, baseUrl),\n algorithm: \"ES256\",\n },\n ];\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"convex.js","names":["defaultBaseUrl"],"sources":["../../src/integrations/convex.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { urlString } from \"@hexclave/shared/dist/utils/urls\";\nimport { defaultBaseUrl } from \"../lib/hexclave-app/apps/implementations/common\";\n\nexport function getConvexProvidersConfig(options: {\n baseUrl?: string,\n projectId: string,\n}) {\n const baseUrl = options.baseUrl || defaultBaseUrl;\n const projectId = options.projectId;\n return [\n {\n type: \"customJwt\",\n issuer: new URL(urlString`/api/v1/projects/${projectId}`, baseUrl),\n jwks: new URL(urlString`/api/v1/projects/${projectId}/.well-known/jwks.json`, baseUrl),\n algorithm: \"ES256\",\n },\n {\n type: \"customJwt\",\n issuer: new URL(urlString`/api/v1/projects-anonymous-users/${projectId}`, baseUrl),\n jwks: new URL(urlString`/api/v1/projects/${projectId}/.well-known/jwks.json?include_anonymous=true`, baseUrl),\n algorithm: \"ES256\",\n },\n ];\n}\n"],"mappings":";;;;AAOA,SAAgB,yBAAyB,SAGtC;CACD,MAAM,UAAU,QAAQ,WAAWA,mDAAAA;CACnC,MAAM,YAAY,QAAQ;CAC1B,OAAO,CACL;EACE,MAAM;EACN,QAAQ,IAAI,IAAI,iCAAA,SAAS,oBAAoB,aAAa,OAAO;EACjE,MAAM,IAAI,IAAI,iCAAA,SAAS,oBAAoB,UAAU,yBAAyB,OAAO;EACrF,WAAW;CACb,GACA;EACE,MAAM;EACN,QAAQ,IAAI,IAAI,iCAAA,SAAS,oCAAoC,aAAa,OAAO;EACjF,MAAM,IAAI,IAAI,iCAAA,SAAS,oBAAoB,UAAU,gDAAgD,OAAO;EAC5G,WAAW;CACb,CACF;AACF"}
|
package/dist/lib/auth.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
2
|
-
const require_chunk = require('../chunk-BE-pF4vm.js');
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
2
|
let _hexclave_shared_dist_utils_strings = require("@hexclave/shared/dist/utils/strings");
|
|
4
3
|
let _hexclave_shared_dist_utils_errors = require("@hexclave/shared/dist/utils/errors");
|
|
5
4
|
let _hexclave_shared = require("@hexclave/shared");
|
|
6
5
|
let _hexclave_shared_dist_utils_results = require("@hexclave/shared/dist/utils/results");
|
|
7
6
|
let ___utils_url_js = require("../utils/url.js");
|
|
8
7
|
let __cookie_js = require("./cookie.js");
|
|
9
|
-
|
|
10
8
|
//#region src/lib/auth.ts
|
|
11
9
|
async function getNewOAuthProviderOrScopeUrl(iface, options, session) {
|
|
12
10
|
const { codeChallenge, state } = await (0, __cookie_js.saveVerifierAndState)();
|
|
@@ -125,8 +123,8 @@ async function callOAuthCallback(iface, redirectUrl, options) {
|
|
|
125
123
|
throw new _hexclave_shared_dist_utils_errors.HexclaveAssertionError("Error signing in during OAuth callback. Please try again.", { cause: e });
|
|
126
124
|
}
|
|
127
125
|
}
|
|
128
|
-
|
|
129
126
|
//#endregion
|
|
130
127
|
exports.callOAuthCallback = callOAuthCallback;
|
|
131
128
|
exports.getNewOAuthProviderOrScopeUrl = getNewOAuthProviderOrScopeUrl;
|
|
129
|
+
|
|
132
130
|
//# sourceMappingURL=auth.js.map
|
package/dist/lib/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","names":["KnownErrors","HexclaveAssertionError","KnownError","Result"],"sources":["../../src/lib/auth.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { KnownError, KnownErrors, HexclaveClientInterface } from \"@hexclave/shared\";\nimport { InternalSession } from \"@hexclave/shared/dist/sessions\";\nimport { HexclaveAssertionError, throwErr } from \"@hexclave/shared/dist/utils/errors\";\nimport { Result } from \"@hexclave/shared/dist/utils/results\";\nimport { deindent } from \"@hexclave/shared/dist/utils/strings\";\nimport { constructRedirectUrl } from \"../utils/url\";\nimport { consumeVerifierAndStateCookie, saveVerifierAndState } from \"./cookie\";\nexport async function getNewOAuthProviderOrScopeUrl(\n iface: HexclaveClientInterface,\n options: {\n provider: string,\n redirectUrl: string,\n errorRedirectUrl: string,\n providerScope?: string,\n },\n session: InternalSession,\n): Promise<string> {\n const { codeChallenge, state } = await saveVerifierAndState();\n return await iface.getOAuthUrl({\n provider: options.provider,\n redirectUrl: constructRedirectUrl(options.redirectUrl, \"redirectUrl\"),\n errorRedirectUrl: constructRedirectUrl(options.errorRedirectUrl, \"errorRedirectUrl\"),\n afterCallbackRedirectUrl: constructRedirectUrl(window.location.href, \"afterCallbackRedirectUrl\"),\n codeChallenge,\n state,\n type: \"link\",\n session,\n providerScope: options.providerScope,\n });\n}\n\n/**\n * Checks if the current URL has the query parameters for an OAuth callback, and if so, removes them.\n *\n * Must be synchronous for the logic in callOAuthCallback to work without race conditions.\n */\ntype OAuthCallbackConsumptionResult =\n | {\n type: \"oauth-response\",\n originalUrl: URL,\n codeVerifier: string,\n state: string,\n }\n | {\n type: \"known-error\",\n error: KnownError,\n };\n\nconst oauthErrorParams = [\"error\", \"error_description\", \"errorCode\", \"message\", \"details\"] as const;\n\nfunction removeOAuthErrorParamsFromHistory(originalUrl: URL): void {\n const newUrl = new URL(originalUrl);\n for (const param of oauthErrorParams) {\n newUrl.searchParams.delete(param);\n }\n window.history.replaceState({}, \"\", newUrl.toString());\n}\n\nfunction getProviderOAuthErrorFromUrl(originalUrl: URL): KnownError | null {\n const providerError = originalUrl.searchParams.get(\"error\");\n const providerErrorDescription = originalUrl.searchParams.get(\"error_description\");\n if (providerError == null && providerErrorDescription == null) {\n return null;\n }\n\n switch (providerError) {\n case \"access_denied\":\n case \"consent_required\": {\n return new KnownErrors.OAuthProviderAccessDenied();\n }\n case \"server_error\":\n case \"temporarily_unavailable\":\n default: {\n return new KnownErrors.OAuthProviderTemporarilyUnavailable();\n }\n }\n}\n\nfunction consumeOAuthCallbackQueryParams(options?: {\n dontWarnAboutMissingQueryParams?: boolean,\n}): OAuthCallbackConsumptionResult | null {\n const requiredParams = [\"code\", \"state\"];\n const originalUrl = new URL(window.location.href);\n const knownErrorCode = originalUrl.searchParams.get(\"errorCode\");\n const knownErrorMessage = originalUrl.searchParams.get(\"message\");\n if (knownErrorCode && knownErrorMessage) {\n const details = originalUrl.searchParams.get(\"details\");\n let detailsJson = {};\n if (details) {\n try {\n detailsJson = JSON.parse(details);\n } catch (error) {\n throw new HexclaveAssertionError(\"OAuth callback returned malformed known-error details\", {\n details,\n cause: error,\n });\n }\n }\n\n removeOAuthErrorParamsFromHistory(originalUrl);\n\n return {\n type: \"known-error\",\n error: KnownError.fromJson({\n code: knownErrorCode,\n message: knownErrorMessage,\n details: detailsJson,\n }),\n };\n }\n\n const providerOAuthError = getProviderOAuthErrorFromUrl(originalUrl);\n if (providerOAuthError != null && !requiredParams.every(param => originalUrl.searchParams.has(param))) {\n removeOAuthErrorParamsFromHistory(originalUrl);\n return {\n type: \"known-error\",\n error: providerOAuthError,\n };\n }\n\n for (const param of requiredParams) {\n if (!originalUrl.searchParams.has(param)) {\n if (!options?.dontWarnAboutMissingQueryParams) {\n console.warn(new Error(`Missing required query parameter on OAuth callback: ${param}. Maybe you opened or reloaded the oauth-callback page from your history?`));\n }\n return null;\n }\n }\n\n const expectedState = originalUrl.searchParams.get(\"state\") ?? throwErr(\"This should never happen; isn't state required above?\");\n const cookieResult = consumeVerifierAndStateCookie(expectedState);\n\n if (!cookieResult) {\n // If the state can't be found in the cookies, then the callback wasn't meant for us.\n // Maybe the website uses another OAuth library?\n console.warn(deindent`\n Hexclave found an outer OAuth callback state in the query parameters, but not in cookies.\n\n This could have multiple reasons:\n - The cookie expired, because the OAuth flow took too long.\n - The user's browser deleted the cookie, either manually or because of a very strict cookie policy.\n - The cookie was already consumed by this page, and the user already logged in.\n - You are using another OAuth client library with the same callback URL as Hexclave.\n - The user opened the OAuth callback page from their history.\n\n Either way, it is probably safe to ignore this warning unless you are debugging an OAuth issue.\n `);\n return null;\n }\n\n\n const newUrl = new URL(originalUrl);\n for (const param of requiredParams) {\n newUrl.searchParams.delete(param);\n }\n\n // let's get rid of the authorization code in the history as we\n // don't redirect to `redirectUrl` if there's a validation error\n // (as the redirectUrl might be malicious!).\n //\n // We use history.replaceState instead of location.assign(...) to\n // prevent an unnecessary reload\n window.history.replaceState({}, \"\", newUrl.toString());\n\n return {\n type: \"oauth-response\",\n originalUrl,\n codeVerifier: cookieResult.codeVerifier,\n state: expectedState,\n };\n}\n\nexport async function callOAuthCallback(\n iface: HexclaveClientInterface,\n redirectUrl: string,\n options?: {\n dontWarnAboutMissingQueryParams?: boolean,\n },\n) {\n // note: this part of the function (until the return) needs\n // to be synchronous, to prevent race conditions when\n // callOAuthCallback is called multiple times in parallel\n const consumed = consumeOAuthCallbackQueryParams(options);\n if (!consumed) return Result.ok(undefined);\n if (consumed.type === \"known-error\") {\n throw consumed.error;\n }\n\n // the rest can be asynchronous (we now know that we are the\n // intended recipient of the callback, and the only instance\n // of callOAuthCallback that's running)\n try {\n return Result.ok(await iface.callOAuthCallback({\n oauthParams: consumed.originalUrl.searchParams,\n redirectUri: constructRedirectUrl(redirectUrl, \"redirectUri\"),\n codeVerifier: consumed.codeVerifier,\n state: consumed.state,\n }));\n } catch (e) {\n if (KnownError.isKnownError(e)) {\n throw e;\n }\n throw new HexclaveAssertionError(\"Error signing in during OAuth callback. Please try again.\", { cause: e });\n }\n}\n"],"mappings":";;;;;;;;;;AAWA,eAAsB,8BACpB,OACA,SAMA,SACiB;CACjB,MAA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AM;AAER,QAAM,IAAID,0DAAuB,6DAA6D,EAAE,OAAO,GAAG,CAAC"}
|
|
1
|
+
{"version":3,"file":"auth.js","names":["KnownErrors","HexclaveAssertionError","KnownError","Result"],"sources":["../../src/lib/auth.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { KnownError, KnownErrors, HexclaveClientInterface } from \"@hexclave/shared\";\nimport { InternalSession } from \"@hexclave/shared/dist/sessions\";\nimport { HexclaveAssertionError, throwErr } from \"@hexclave/shared/dist/utils/errors\";\nimport { Result } from \"@hexclave/shared/dist/utils/results\";\nimport { deindent } from \"@hexclave/shared/dist/utils/strings\";\nimport { constructRedirectUrl } from \"../utils/url\";\nimport { consumeVerifierAndStateCookie, saveVerifierAndState } from \"./cookie\";\nexport async function getNewOAuthProviderOrScopeUrl(\n iface: HexclaveClientInterface,\n options: {\n provider: string,\n redirectUrl: string,\n errorRedirectUrl: string,\n providerScope?: string,\n },\n session: InternalSession,\n): Promise<string> {\n const { codeChallenge, state } = await saveVerifierAndState();\n return await iface.getOAuthUrl({\n provider: options.provider,\n redirectUrl: constructRedirectUrl(options.redirectUrl, \"redirectUrl\"),\n errorRedirectUrl: constructRedirectUrl(options.errorRedirectUrl, \"errorRedirectUrl\"),\n afterCallbackRedirectUrl: constructRedirectUrl(window.location.href, \"afterCallbackRedirectUrl\"),\n codeChallenge,\n state,\n type: \"link\",\n session,\n providerScope: options.providerScope,\n });\n}\n\n/**\n * Checks if the current URL has the query parameters for an OAuth callback, and if so, removes them.\n *\n * Must be synchronous for the logic in callOAuthCallback to work without race conditions.\n */\ntype OAuthCallbackConsumptionResult =\n | {\n type: \"oauth-response\",\n originalUrl: URL,\n codeVerifier: string,\n state: string,\n }\n | {\n type: \"known-error\",\n error: KnownError,\n };\n\nconst oauthErrorParams = [\"error\", \"error_description\", \"errorCode\", \"message\", \"details\"] as const;\n\nfunction removeOAuthErrorParamsFromHistory(originalUrl: URL): void {\n const newUrl = new URL(originalUrl);\n for (const param of oauthErrorParams) {\n newUrl.searchParams.delete(param);\n }\n window.history.replaceState({}, \"\", newUrl.toString());\n}\n\nfunction getProviderOAuthErrorFromUrl(originalUrl: URL): KnownError | null {\n const providerError = originalUrl.searchParams.get(\"error\");\n const providerErrorDescription = originalUrl.searchParams.get(\"error_description\");\n if (providerError == null && providerErrorDescription == null) {\n return null;\n }\n\n switch (providerError) {\n case \"access_denied\":\n case \"consent_required\": {\n return new KnownErrors.OAuthProviderAccessDenied();\n }\n case \"server_error\":\n case \"temporarily_unavailable\":\n default: {\n return new KnownErrors.OAuthProviderTemporarilyUnavailable();\n }\n }\n}\n\nfunction consumeOAuthCallbackQueryParams(options?: {\n dontWarnAboutMissingQueryParams?: boolean,\n}): OAuthCallbackConsumptionResult | null {\n const requiredParams = [\"code\", \"state\"];\n const originalUrl = new URL(window.location.href);\n const knownErrorCode = originalUrl.searchParams.get(\"errorCode\");\n const knownErrorMessage = originalUrl.searchParams.get(\"message\");\n if (knownErrorCode && knownErrorMessage) {\n const details = originalUrl.searchParams.get(\"details\");\n let detailsJson = {};\n if (details) {\n try {\n detailsJson = JSON.parse(details);\n } catch (error) {\n throw new HexclaveAssertionError(\"OAuth callback returned malformed known-error details\", {\n details,\n cause: error,\n });\n }\n }\n\n removeOAuthErrorParamsFromHistory(originalUrl);\n\n return {\n type: \"known-error\",\n error: KnownError.fromJson({\n code: knownErrorCode,\n message: knownErrorMessage,\n details: detailsJson,\n }),\n };\n }\n\n const providerOAuthError = getProviderOAuthErrorFromUrl(originalUrl);\n if (providerOAuthError != null && !requiredParams.every(param => originalUrl.searchParams.has(param))) {\n removeOAuthErrorParamsFromHistory(originalUrl);\n return {\n type: \"known-error\",\n error: providerOAuthError,\n };\n }\n\n for (const param of requiredParams) {\n if (!originalUrl.searchParams.has(param)) {\n if (!options?.dontWarnAboutMissingQueryParams) {\n console.warn(new Error(`Missing required query parameter on OAuth callback: ${param}. Maybe you opened or reloaded the oauth-callback page from your history?`));\n }\n return null;\n }\n }\n\n const expectedState = originalUrl.searchParams.get(\"state\") ?? throwErr(\"This should never happen; isn't state required above?\");\n const cookieResult = consumeVerifierAndStateCookie(expectedState);\n\n if (!cookieResult) {\n // If the state can't be found in the cookies, then the callback wasn't meant for us.\n // Maybe the website uses another OAuth library?\n console.warn(deindent`\n Hexclave found an outer OAuth callback state in the query parameters, but not in cookies.\n\n This could have multiple reasons:\n - The cookie expired, because the OAuth flow took too long.\n - The user's browser deleted the cookie, either manually or because of a very strict cookie policy.\n - The cookie was already consumed by this page, and the user already logged in.\n - You are using another OAuth client library with the same callback URL as Hexclave.\n - The user opened the OAuth callback page from their history.\n\n Either way, it is probably safe to ignore this warning unless you are debugging an OAuth issue.\n `);\n return null;\n }\n\n\n const newUrl = new URL(originalUrl);\n for (const param of requiredParams) {\n newUrl.searchParams.delete(param);\n }\n\n // let's get rid of the authorization code in the history as we\n // don't redirect to `redirectUrl` if there's a validation error\n // (as the redirectUrl might be malicious!).\n //\n // We use history.replaceState instead of location.assign(...) to\n // prevent an unnecessary reload\n window.history.replaceState({}, \"\", newUrl.toString());\n\n return {\n type: \"oauth-response\",\n originalUrl,\n codeVerifier: cookieResult.codeVerifier,\n state: expectedState,\n };\n}\n\nexport async function callOAuthCallback(\n iface: HexclaveClientInterface,\n redirectUrl: string,\n options?: {\n dontWarnAboutMissingQueryParams?: boolean,\n },\n) {\n // note: this part of the function (until the return) needs\n // to be synchronous, to prevent race conditions when\n // callOAuthCallback is called multiple times in parallel\n const consumed = consumeOAuthCallbackQueryParams(options);\n if (!consumed) return Result.ok(undefined);\n if (consumed.type === \"known-error\") {\n throw consumed.error;\n }\n\n // the rest can be asynchronous (we now know that we are the\n // intended recipient of the callback, and the only instance\n // of callOAuthCallback that's running)\n try {\n return Result.ok(await iface.callOAuthCallback({\n oauthParams: consumed.originalUrl.searchParams,\n redirectUri: constructRedirectUrl(redirectUrl, \"redirectUri\"),\n codeVerifier: consumed.codeVerifier,\n state: consumed.state,\n }));\n } catch (e) {\n if (KnownError.isKnownError(e)) {\n throw e;\n }\n throw new HexclaveAssertionError(\"Error signing in during OAuth callback. Please try again.\", { cause: e });\n }\n}\n"],"mappings":";;;;;;;;AAWA,eAAsB,8BACpB,OACA,SAMA,SACiB;CACjB,MAAM,EAAE,eAAe,UAAU,OAAA,GAAA,YAAA,qBAAA,CAA2B;CAC5D,OAAO,MAAM,MAAM,YAAY;EAC7B,UAAU,QAAQ;EAClB,cAAA,GAAA,gBAAA,qBAAA,CAAkC,QAAQ,aAAa,aAAa;EACpE,mBAAA,GAAA,gBAAA,qBAAA,CAAuC,QAAQ,kBAAkB,kBAAkB;EACnF,2BAAA,GAAA,gBAAA,qBAAA,CAA+C,OAAO,SAAS,MAAM,0BAA0B;EAC/F;EACA;EACA,MAAM;EACN;EACA,eAAe,QAAQ;CACzB,CAAC;AACH;AAmBA,MAAM,mBAAmB;CAAC;CAAS;CAAqB;CAAa;CAAW;AAAS;AAEzF,SAAS,kCAAkC,aAAwB;CACjE,MAAM,SAAS,IAAI,IAAI,WAAW;CAClC,KAAK,MAAM,SAAS,kBAClB,OAAO,aAAa,OAAO,KAAK;CAElC,OAAO,QAAQ,aAAa,CAAC,GAAG,IAAI,OAAO,SAAS,CAAC;AACvD;AAEA,SAAS,6BAA6B,aAAqC;CACzE,MAAM,gBAAgB,YAAY,aAAa,IAAI,OAAO;CAC1D,MAAM,2BAA2B,YAAY,aAAa,IAAI,mBAAmB;CACjF,IAAI,iBAAiB,QAAQ,4BAA4B,MACvD,OAAO;CAGT,QAAQ,eAAR;EACE,KAAK;EACL,KAAK,oBACH,OAAO,IAAIA,iBAAAA,YAAY,0BAA0B;EAInD,SACE,OAAO,IAAIA,iBAAAA,YAAY,oCAAoC;CAE/D;AACF;AAEA,SAAS,gCAAgC,SAEC;CACxC,MAAM,iBAAiB,CAAC,QAAQ,OAAO;CACvC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IAAI,OAAO,SAAS,CAAC;CAErD,OAAO;EACL,MAAM;EACN;EACA,cAAc,aAAa;EAC3B,OAAO;CACT;AACF;AAEA,eAAsB,kBACpB,OACA,aACA,SAGA;CAIA,MAAM,WAAW,gCAAgC,OAAO;CACxD,IAAI,CAAC,UAAU,OAAOC,oCAAAA,OAAO,GAAG,KAAA,CAAS;CACzC,IAAI,SAAS,SAAS,eACpB,MAAM,SAAS;CAMjB,IAAI;EACF,OAAOA,oCAAAA,OAAO,GAAG,MAAM,MAAM,kBAAkB;GAC7C,aAAa,SAAS,YAAY;GAClC,cAAA,GAAA,gBAAA,qBAAA,CAAkC,aAAa,aAAa;GAC5D,cAAc,SAAS;GACvB,OAAO,SAAS;EAClB,CAAC,CAAC;CACJ,SAAS,GAAG;EACV,IAAID,iBAAAA,WAAW,aAAa,CAAC,GAC3B,MAAM;EAER,MAAM,IAAID,mCAAAA,uBAAuB,6DAA6D,EAAE,OAAO,EAAE,CAAC;CAC5G;AACF"}
|
package/dist/lib/auth.test.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
const require_chunk = require('../chunk-BE-pF4vm.js');
|
|
2
1
|
let vitest = require("vitest");
|
|
3
2
|
let _hexclave_shared = require("@hexclave/shared");
|
|
4
3
|
let __auth_js = require("./auth.js");
|
|
5
|
-
|
|
6
4
|
//#region src/lib/auth.test.ts
|
|
7
5
|
// @vitest-environment jsdom
|
|
8
6
|
vitest.vi.mock("./cookie", async (importOriginal) => {
|
|
@@ -70,6 +68,6 @@ function createTestInterface() {
|
|
|
70
68
|
(0, vitest.expect)(window.location.href).toBe("http://localhost:3000/handler/oauth-callback");
|
|
71
69
|
});
|
|
72
70
|
});
|
|
73
|
-
|
|
74
71
|
//#endregion
|
|
72
|
+
|
|
75
73
|
//# sourceMappingURL=auth.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.test.js","names":["vi","HexclaveClientInterface","KnownErrors"],"sources":["../../src/lib/auth.test.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\n// @vitest-environment jsdom\n\nimport { HexclaveClientInterface, KnownErrors } from \"@hexclave/shared\";\nimport { describe, expect, it, vi } from \"vitest\";\nimport { callOAuthCallback, getNewOAuthProviderOrScopeUrl } from \"./auth\";\n\nvi.mock(\"./cookie\", async (importOriginal) => {\n const actual = await importOriginal<typeof import(\"./cookie\")>();\n return {\n ...actual,\n saveVerifierAndState: async () => ({\n codeChallenge: \"<stripped code challenge>\",\n state: \"<stripped state>\",\n }),\n };\n});\n\nfunction createTestInterface() {\n return new HexclaveClientInterface({\n clientVersion: \"test\",\n getBaseUrl: () => \"https://api.example.com\",\n getApiUrls: () => [\"https://api.example.com\"],\n extraRequestHeaders: {},\n projectId: \"00000000-0000-4000-8000-000000000000\",\n publishableClientKey: \"pck_test\",\n });\n}\n\ndescribe(\"getNewOAuthProviderOrScopeUrl\", () => {\n it(\"returns the OAuth URL without performing navigation\", async () => {\n window.history.replaceState({}, \"\", \"/account?after_auth_return_to=%2Fsettings\");\n\n const iface = createTestInterface();\n const session = iface.createSession({ refreshToken: null, accessToken: null });\n\n const location = await getNewOAuthProviderOrScopeUrl(\n iface,\n {\n provider: \"github\",\n redirectUrl: \"/handler/oauth-callback\",\n errorRedirectUrl: \"/handler/error\",\n providerScope: \"repo user\",\n },\n session,\n );\n\n const url = new URL(location);\n expect(`${url.origin}${url.pathname}`).toBe(\"https://api.example.com/api/v1/auth/oauth/authorize/github\");\n expect(Object.fromEntries(url.searchParams.entries())).toMatchInlineSnapshot(`\n {\n \"after_callback_redirect_url\": \"http://localhost:3000/account?after_auth_return_to=%2Fsettings\",\n \"client_id\": \"00000000-0000-4000-8000-000000000000\",\n \"client_secret\": \"pck_test\",\n \"code_challenge\": \"<stripped code challenge>\",\n \"code_challenge_method\": \"S256\",\n \"error_redirect_url\": \"http://localhost:3000/handler/error?after_auth_return_to=%2Fsettings\",\n \"grant_type\": \"authorization_code\",\n \"provider_scope\": \"repo user\",\n \"redirect_uri\": \"http://localhost:3000/handler/oauth-callback?after_auth_return_to=%2Fsettings\",\n \"response_type\": \"code\",\n \"scope\": \"legacy\",\n \"state\": \"<stripped state>\",\n \"type\": \"link\",\n }\n `);\n });\n});\n\ndescribe(\"callOAuthCallback\", () => {\n it(\"turns provider access denial callback params into a known error\", async () => {\n window.history.replaceState({}, \"\", \"/handler/oauth-callback?error=access_denied&error_description=User+cancelled\");\n\n await expect(callOAuthCallback(createTestInterface(), \"/handler/oauth-callback\"))\n .rejects.toSatisfy((error: unknown) => KnownErrors.OAuthProviderAccessDenied.isInstance(error));\n expect(window.location.href).toBe(\"http://localhost:3000/handler/oauth-callback\");\n });\n\n it(\"turns generic provider error callback params into a known error\", async () => {\n window.history.replaceState({}, \"\", \"/handler/oauth-callback?error=server_error&error_description=Provider+failed\");\n\n await expect(callOAuthCallback(createTestInterface(), \"/handler/oauth-callback\"))\n .rejects.toSatisfy((error: unknown) => KnownErrors.OAuthProviderTemporarilyUnavailable.isInstance(error));\n expect(window.location.href).toBe(\"http://localhost:3000/handler/oauth-callback\");\n });\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.test.js","names":["vi","HexclaveClientInterface","KnownErrors"],"sources":["../../src/lib/auth.test.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\n// @vitest-environment jsdom\n\nimport { HexclaveClientInterface, KnownErrors } from \"@hexclave/shared\";\nimport { describe, expect, it, vi } from \"vitest\";\nimport { callOAuthCallback, getNewOAuthProviderOrScopeUrl } from \"./auth\";\n\nvi.mock(\"./cookie\", async (importOriginal) => {\n const actual = await importOriginal<typeof import(\"./cookie\")>();\n return {\n ...actual,\n saveVerifierAndState: async () => ({\n codeChallenge: \"<stripped code challenge>\",\n state: \"<stripped state>\",\n }),\n };\n});\n\nfunction createTestInterface() {\n return new HexclaveClientInterface({\n clientVersion: \"test\",\n getBaseUrl: () => \"https://api.example.com\",\n getApiUrls: () => [\"https://api.example.com\"],\n extraRequestHeaders: {},\n projectId: \"00000000-0000-4000-8000-000000000000\",\n publishableClientKey: \"pck_test\",\n });\n}\n\ndescribe(\"getNewOAuthProviderOrScopeUrl\", () => {\n it(\"returns the OAuth URL without performing navigation\", async () => {\n window.history.replaceState({}, \"\", \"/account?after_auth_return_to=%2Fsettings\");\n\n const iface = createTestInterface();\n const session = iface.createSession({ refreshToken: null, accessToken: null });\n\n const location = await getNewOAuthProviderOrScopeUrl(\n iface,\n {\n provider: \"github\",\n redirectUrl: \"/handler/oauth-callback\",\n errorRedirectUrl: \"/handler/error\",\n providerScope: \"repo user\",\n },\n session,\n );\n\n const url = new URL(location);\n expect(`${url.origin}${url.pathname}`).toBe(\"https://api.example.com/api/v1/auth/oauth/authorize/github\");\n expect(Object.fromEntries(url.searchParams.entries())).toMatchInlineSnapshot(`\n {\n \"after_callback_redirect_url\": \"http://localhost:3000/account?after_auth_return_to=%2Fsettings\",\n \"client_id\": \"00000000-0000-4000-8000-000000000000\",\n \"client_secret\": \"pck_test\",\n \"code_challenge\": \"<stripped code challenge>\",\n \"code_challenge_method\": \"S256\",\n \"error_redirect_url\": \"http://localhost:3000/handler/error?after_auth_return_to=%2Fsettings\",\n \"grant_type\": \"authorization_code\",\n \"provider_scope\": \"repo user\",\n \"redirect_uri\": \"http://localhost:3000/handler/oauth-callback?after_auth_return_to=%2Fsettings\",\n \"response_type\": \"code\",\n \"scope\": \"legacy\",\n \"state\": \"<stripped state>\",\n \"type\": \"link\",\n }\n `);\n });\n});\n\ndescribe(\"callOAuthCallback\", () => {\n it(\"turns provider access denial callback params into a known error\", async () => {\n window.history.replaceState({}, \"\", \"/handler/oauth-callback?error=access_denied&error_description=User+cancelled\");\n\n await expect(callOAuthCallback(createTestInterface(), \"/handler/oauth-callback\"))\n .rejects.toSatisfy((error: unknown) => KnownErrors.OAuthProviderAccessDenied.isInstance(error));\n expect(window.location.href).toBe(\"http://localhost:3000/handler/oauth-callback\");\n });\n\n it(\"turns generic provider error callback params into a known error\", async () => {\n window.history.replaceState({}, \"\", \"/handler/oauth-callback?error=server_error&error_description=Provider+failed\");\n\n await expect(callOAuthCallback(createTestInterface(), \"/handler/oauth-callback\"))\n .rejects.toSatisfy((error: unknown) => KnownErrors.OAuthProviderTemporarilyUnavailable.isInstance(error));\n expect(window.location.href).toBe(\"http://localhost:3000/handler/oauth-callback\");\n });\n});\n"],"mappings":";;;;;AAUAA,OAAAA,GAAG,KAAK,YAAY,OAAO,mBAAmB;CAE5C,OAAO;EACL,GAAG,MAFgB,eAA0C;EAG7D,sBAAsB,aAAa;GACjC,eAAe;GACf,OAAO;EACT;CACF;AACF,CAAC;AAED,SAAS,sBAAsB;CAC7B,OAAO,IAAIC,iBAAAA,wBAAwB;EACjC,eAAe;EACf,kBAAkB;EAClB,kBAAkB,CAAC,yBAAyB;EAC5C,qBAAqB,CAAC;EACtB,WAAW;EACX,sBAAsB;CACxB,CAAC;AACH;qBAES,uCAAuC;CAC9C,CAAA,GAAA,OAAA,GAAA,CAAG,uDAAuD,YAAY;EACpE,OAAO,QAAQ,aAAa,CAAC,GAAG,IAAI,2CAA2C;EAE/E,MAAM,QAAQ,oBAAoB;EAGlC,MAAM,WAAW,OAAA,GAAA,UAAA,8BAAA,CACf,OACA;GACE,UAAU;GACV,aAAa;GACb,kBAAkB;GAClB,eAAe;EACjB,GATc,MAAM,cAAc;GAAE,cAAc;GAAM,aAAa;EAAK,CAUpE,CACR;EAEA,MAAM,MAAM,IAAI,IAAI,QAAQ;EAC5B,CAAA,GAAA,OAAA,OAAA,CAAO,GAAG,IAAI,SAAS,IAAI,UAAU,CAAC,CAAC,KAAK,4DAA4D;EACxG,CAAA,GAAA,OAAA,OAAA,CAAO,OAA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