@hexclave/shared 1.0.0
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/LICENSE +7 -0
- package/dist/ai/image-limits.d.ts +24 -0
- package/dist/ai/image-limits.d.ts.map +1 -0
- package/dist/ai/image-limits.js +61 -0
- package/dist/ai/image-limits.js.map +1 -0
- package/dist/ai/unified-prompts/reminders.d.ts +5 -0
- package/dist/ai/unified-prompts/reminders.d.ts.map +1 -0
- package/dist/ai/unified-prompts/reminders.js +33 -0
- package/dist/ai/unified-prompts/reminders.js.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts +11 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +851 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/brain.d.ts +5 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/brain.d.ts.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/brain.js +12 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/brain.js.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/cli-help.d.ts +5 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/cli-help.d.ts.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/cli-help.js +12 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/cli-help.js.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/config-docs.d.ts +5 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/config-docs.d.ts.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/config-docs.js +12 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/config-docs.js.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.d.ts +5 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.d.ts.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.js +12 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.js.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.d.ts +5 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.d.ts.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.js +12 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.js.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts +5 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +64 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.d.ts +5 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.d.ts.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js +12 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.d.ts +5 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.d.ts.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.js +12 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.js.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt.d.ts +5 -0
- package/dist/ai/unified-prompts/skill-site-prompt.d.ts.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt.js +75 -0
- package/dist/ai/unified-prompts/skill-site-prompt.js.map +1 -0
- package/dist/apps/apps-config.d.ts +168 -0
- package/dist/apps/apps-config.d.ts.map +1 -0
- package/dist/apps/apps-config.js +157 -0
- package/dist/apps/apps-config.js.map +1 -0
- package/dist/apps/apps-ui.d.ts +45 -0
- package/dist/apps/apps-ui.d.ts.map +1 -0
- package/dist/apps/apps-ui.js +109 -0
- package/dist/apps/apps-ui.js.map +1 -0
- package/dist/chunk-BE-pF4vm.js +34 -0
- package/dist/config/db-sync-mappings.d.ts +193 -0
- package/dist/config/db-sync-mappings.d.ts.map +1 -0
- package/dist/config/db-sync-mappings.js +2255 -0
- package/dist/config/db-sync-mappings.js.map +1 -0
- package/dist/config/format.d.ts +61 -0
- package/dist/config/format.d.ts.map +1 -0
- package/dist/config/format.js +337 -0
- package/dist/config/format.js.map +1 -0
- package/dist/config/migrate-catalogs-to-product-lines.d.ts +14 -0
- package/dist/config/migrate-catalogs-to-product-lines.d.ts.map +1 -0
- package/dist/config/migrate-catalogs-to-product-lines.js +379 -0
- package/dist/config/migrate-catalogs-to-product-lines.js.map +1 -0
- package/dist/config/schema-fuzzer.test.d.ts +1 -0
- package/dist/config/schema-fuzzer.test.js +401 -0
- package/dist/config/schema-fuzzer.test.js.map +1 -0
- package/dist/config/schema.d.ts +2315 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +1085 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/config-authoring.d.ts +12 -0
- package/dist/config-authoring.d.ts.map +1 -0
- package/dist/config-authoring.js +12 -0
- package/dist/config-authoring.js.map +1 -0
- package/dist/config-authoring.test.d.ts +1 -0
- package/dist/config-authoring.test.js +29 -0
- package/dist/config-authoring.test.js.map +1 -0
- package/dist/config-rendering.d.ts +17 -0
- package/dist/config-rendering.d.ts.map +1 -0
- package/dist/config-rendering.js +114 -0
- package/dist/config-rendering.js.map +1 -0
- package/dist/crud.d.ts +98 -0
- package/dist/crud.d.ts.map +1 -0
- package/dist/crud.js +129 -0
- package/dist/crud.js.map +1 -0
- package/dist/esm/ai/image-limits.d.ts +24 -0
- package/dist/esm/ai/image-limits.d.ts.map +1 -0
- package/dist/esm/ai/image-limits.js +53 -0
- package/dist/esm/ai/image-limits.js.map +1 -0
- package/dist/esm/ai/unified-prompts/reminders.d.ts +5 -0
- package/dist/esm/ai/unified-prompts/reminders.d.ts.map +1 -0
- package/dist/esm/ai/unified-prompts/reminders.js +31 -0
- package/dist/esm/ai/unified-prompts/reminders.js.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts +11 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +843 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/brain.d.ts +5 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/brain.d.ts.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/brain.js +10 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/brain.js.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/cli-help.d.ts +5 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/cli-help.d.ts.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/cli-help.js +10 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/cli-help.js.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/config-docs.d.ts +5 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/config-docs.d.ts.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/config-docs.js +10 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/config-docs.js.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.d.ts +5 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.d.ts.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.js +10 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.js.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.d.ts +5 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.d.ts.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.js +10 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.js.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts +5 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +61 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.d.ts +5 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.d.ts.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js +10 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.d.ts +5 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.d.ts.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.js +10 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.js.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt.d.ts +5 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt.d.ts.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt.js +73 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt.js.map +1 -0
- package/dist/esm/apps/apps-config.d.ts +168 -0
- package/dist/esm/apps/apps-config.d.ts.map +1 -0
- package/dist/esm/apps/apps-config.js +154 -0
- package/dist/esm/apps/apps-config.js.map +1 -0
- package/dist/esm/apps/apps-ui.d.ts +45 -0
- package/dist/esm/apps/apps-ui.d.ts.map +1 -0
- package/dist/esm/apps/apps-ui.js +104 -0
- package/dist/esm/apps/apps-ui.js.map +1 -0
- package/dist/esm/config/db-sync-mappings.d.ts +193 -0
- package/dist/esm/config/db-sync-mappings.d.ts.map +1 -0
- package/dist/esm/config/db-sync-mappings.js +2253 -0
- package/dist/esm/config/db-sync-mappings.js.map +1 -0
- package/dist/esm/config/format.d.ts +61 -0
- package/dist/esm/config/format.d.ts.map +1 -0
- package/dist/esm/config/format.js +327 -0
- package/dist/esm/config/format.js.map +1 -0
- package/dist/esm/config/migrate-catalogs-to-product-lines.d.ts +14 -0
- package/dist/esm/config/migrate-catalogs-to-product-lines.d.ts.map +1 -0
- package/dist/esm/config/migrate-catalogs-to-product-lines.js +377 -0
- package/dist/esm/config/migrate-catalogs-to-product-lines.js.map +1 -0
- package/dist/esm/config/schema-fuzzer.test.d.ts +1 -0
- package/dist/esm/config/schema-fuzzer.test.js +401 -0
- package/dist/esm/config/schema-fuzzer.test.js.map +1 -0
- package/dist/esm/config/schema.d.ts +2315 -0
- package/dist/esm/config/schema.d.ts.map +1 -0
- package/dist/esm/config/schema.js +1065 -0
- package/dist/esm/config/schema.js.map +1 -0
- package/dist/esm/config-authoring.d.ts +12 -0
- package/dist/esm/config-authoring.d.ts.map +1 -0
- package/dist/esm/config-authoring.js +9 -0
- package/dist/esm/config-authoring.js.map +1 -0
- package/dist/esm/config-authoring.test.d.ts +1 -0
- package/dist/esm/config-authoring.test.js +29 -0
- package/dist/esm/config-authoring.test.js.map +1 -0
- package/dist/esm/config-rendering.d.ts +17 -0
- package/dist/esm/config-rendering.d.ts.map +1 -0
- package/dist/esm/config-rendering.js +108 -0
- package/dist/esm/config-rendering.js.map +1 -0
- package/dist/esm/crud.d.ts +98 -0
- package/dist/esm/crud.d.ts.map +1 -0
- package/dist/esm/crud.js +127 -0
- package/dist/esm/crud.js.map +1 -0
- package/dist/esm/global.d.ts +1 -0
- package/dist/esm/helpers/emails.d.ts +69 -0
- package/dist/esm/helpers/emails.d.ts.map +1 -0
- package/dist/esm/helpers/emails.js +243 -0
- package/dist/esm/helpers/emails.js.map +1 -0
- package/dist/esm/helpers/init-prompt.d.ts +5 -0
- package/dist/esm/helpers/init-prompt.d.ts.map +1 -0
- package/dist/esm/helpers/init-prompt.js +40 -0
- package/dist/esm/helpers/init-prompt.js.map +1 -0
- package/dist/esm/helpers/password.d.ts +7 -0
- package/dist/esm/helpers/password.d.ts.map +1 -0
- package/dist/esm/helpers/password.js +13 -0
- package/dist/esm/helpers/password.js.map +1 -0
- package/dist/esm/helpers/production-mode.d.ts +11 -0
- package/dist/esm/helpers/production-mode.d.ts.map +1 -0
- package/dist/esm/helpers/production-mode.js +46 -0
- package/dist/esm/helpers/production-mode.js.map +1 -0
- package/dist/esm/helpers/support-sla.d.ts +48 -0
- package/dist/esm/helpers/support-sla.d.ts.map +1 -0
- package/dist/esm/helpers/support-sla.js +65 -0
- package/dist/esm/helpers/support-sla.js.map +1 -0
- package/dist/esm/helpers/support-sla.test.d.ts +1 -0
- package/dist/esm/helpers/support-sla.test.js +102 -0
- package/dist/esm/helpers/support-sla.test.js.map +1 -0
- package/dist/esm/helpers/vault/client-side.d.ts +16 -0
- package/dist/esm/helpers/vault/client-side.d.ts.map +1 -0
- package/dist/esm/helpers/vault/client-side.js +69 -0
- package/dist/esm/helpers/vault/client-side.js.map +1 -0
- package/dist/esm/helpers/vault/server-side.d.ts +9 -0
- package/dist/esm/helpers/vault/server-side.d.ts.map +1 -0
- package/dist/esm/helpers/vault/server-side.js +123 -0
- package/dist/esm/helpers/vault/server-side.js.map +1 -0
- package/dist/esm/hooks/use-async-callback.d.ts +8 -0
- package/dist/esm/hooks/use-async-callback.d.ts.map +1 -0
- package/dist/esm/hooks/use-async-callback.js +38 -0
- package/dist/esm/hooks/use-async-callback.js.map +1 -0
- package/dist/esm/hooks/use-async-external-store.d.ts +9 -0
- package/dist/esm/hooks/use-async-external-store.d.ts.map +1 -0
- package/dist/esm/hooks/use-async-external-store.js +20 -0
- package/dist/esm/hooks/use-async-external-store.js.map +1 -0
- package/dist/esm/hooks/use-hash.d.ts +5 -0
- package/dist/esm/hooks/use-hash.d.ts.map +1 -0
- package/dist/esm/hooks/use-hash.js +15 -0
- package/dist/esm/hooks/use-hash.js.map +1 -0
- package/dist/esm/hooks/use-hover.d.ts +8 -0
- package/dist/esm/hooks/use-hover.d.ts.map +1 -0
- package/dist/esm/hooks/use-hover.js +59 -0
- package/dist/esm/hooks/use-hover.js.map +1 -0
- package/dist/esm/hooks/use-strict-memo.d.ts +10 -0
- package/dist/esm/hooks/use-strict-memo.d.ts.map +1 -0
- package/dist/esm/hooks/use-strict-memo.js +119 -0
- package/dist/esm/hooks/use-strict-memo.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/interface/admin-interface.d.ts +308 -0
- package/dist/esm/interface/admin-interface.d.ts.map +1 -0
- package/dist/esm/interface/admin-interface.js +463 -0
- package/dist/esm/interface/admin-interface.js.map +1 -0
- package/dist/esm/interface/admin-metrics.d.ts +597 -0
- package/dist/esm/interface/admin-metrics.d.ts.map +1 -0
- package/dist/esm/interface/admin-metrics.js +134 -0
- package/dist/esm/interface/admin-metrics.js.map +1 -0
- package/dist/esm/interface/client-interface.d.ts +447 -0
- package/dist/esm/interface/client-interface.d.ts.map +1 -0
- package/dist/esm/interface/client-interface.js +1946 -0
- package/dist/esm/interface/client-interface.js.map +1 -0
- package/dist/esm/interface/client-interface.test.d.ts +1 -0
- package/dist/esm/interface/client-interface.test.js +559 -0
- package/dist/esm/interface/client-interface.test.js.map +1 -0
- package/dist/esm/interface/conversations.d.ts +314 -0
- package/dist/esm/interface/conversations.d.ts.map +1 -0
- package/dist/esm/interface/conversations.js +108 -0
- package/dist/esm/interface/conversations.js.map +1 -0
- package/dist/esm/interface/crud/analytics.d.ts +14 -0
- package/dist/esm/interface/crud/analytics.d.ts.map +1 -0
- package/dist/esm/interface/crud/analytics.js +1 -0
- package/dist/esm/interface/crud/connected-accounts.d.ts +69 -0
- package/dist/esm/interface/crud/connected-accounts.d.ts.map +1 -0
- package/dist/esm/interface/crud/connected-accounts.js +35 -0
- package/dist/esm/interface/crud/connected-accounts.js.map +1 -0
- package/dist/esm/interface/crud/contact-channels.d.ts +182 -0
- package/dist/esm/interface/crud/contact-channels.d.ts.map +1 -0
- package/dist/esm/interface/crud/contact-channels.js +68 -0
- package/dist/esm/interface/crud/contact-channels.js.map +1 -0
- package/dist/esm/interface/crud/current-user.d.ts +286 -0
- package/dist/esm/interface/crud/current-user.d.ts.map +1 -0
- package/dist/esm/interface/crud/current-user.js +69 -0
- package/dist/esm/interface/crud/current-user.js.map +1 -0
- package/dist/esm/interface/crud/email-outbox.d.ts +1466 -0
- package/dist/esm/interface/crud/email-outbox.d.ts.map +1 -0
- package/dist/esm/interface/crud/email-outbox.js +190 -0
- package/dist/esm/interface/crud/email-outbox.js.map +1 -0
- package/dist/esm/interface/crud/email-templates.d.ts +86 -0
- package/dist/esm/interface/crud/email-templates.d.ts.map +1 -0
- package/dist/esm/interface/crud/email-templates.js +46 -0
- package/dist/esm/interface/crud/email-templates.js.map +1 -0
- package/dist/esm/interface/crud/emails.d.ts +42 -0
- package/dist/esm/interface/crud/emails.d.ts.map +1 -0
- package/dist/esm/interface/crud/emails.js +19 -0
- package/dist/esm/interface/crud/emails.js.map +1 -0
- package/dist/esm/interface/crud/internal-api-keys.d.ts +141 -0
- package/dist/esm/interface/crud/internal-api-keys.d.ts.map +1 -0
- package/dist/esm/interface/crud/internal-api-keys.js +49 -0
- package/dist/esm/interface/crud/internal-api-keys.js.map +1 -0
- package/dist/esm/interface/crud/invoices.d.ts +43 -0
- package/dist/esm/interface/crud/invoices.d.ts.map +1 -0
- package/dist/esm/interface/crud/invoices.js +25 -0
- package/dist/esm/interface/crud/invoices.js.map +1 -0
- package/dist/esm/interface/crud/items.d.ts +31 -0
- package/dist/esm/interface/crud/items.d.ts.map +1 -0
- package/dist/esm/interface/crud/items.js +23 -0
- package/dist/esm/interface/crud/items.js.map +1 -0
- package/dist/esm/interface/crud/notification-preferences.d.ts +39 -0
- package/dist/esm/interface/crud/notification-preferences.d.ts.map +1 -0
- package/dist/esm/interface/crud/notification-preferences.js +31 -0
- package/dist/esm/interface/crud/notification-preferences.js.map +1 -0
- package/dist/esm/interface/crud/oauth-providers.d.ts +187 -0
- package/dist/esm/interface/crud/oauth-providers.d.ts.map +1 -0
- package/dist/esm/interface/crud/oauth-providers.js +75 -0
- package/dist/esm/interface/crud/oauth-providers.js.map +1 -0
- package/dist/esm/interface/crud/products.d.ts +182 -0
- package/dist/esm/interface/crud/products.d.ts.map +1 -0
- package/dist/esm/interface/crud/products.js +29 -0
- package/dist/esm/interface/crud/products.js.map +1 -0
- package/dist/esm/interface/crud/project-api-keys.d.ts +204 -0
- package/dist/esm/interface/crud/project-api-keys.d.ts.map +1 -0
- package/dist/esm/interface/crud/project-api-keys.js +72 -0
- package/dist/esm/interface/crud/project-api-keys.js.map +1 -0
- package/dist/esm/interface/crud/project-permissions.d.ts +162 -0
- package/dist/esm/interface/crud/project-permissions.d.ts.map +1 -0
- package/dist/esm/interface/crud/project-permissions.js +104 -0
- package/dist/esm/interface/crud/project-permissions.js.map +1 -0
- package/dist/esm/interface/crud/projects.d.ts +852 -0
- package/dist/esm/interface/crud/projects.d.ts.map +1 -0
- package/dist/esm/interface/crud/projects.js +193 -0
- package/dist/esm/interface/crud/projects.js.map +1 -0
- package/dist/esm/interface/crud/session-replays.d.ts +83 -0
- package/dist/esm/interface/crud/session-replays.d.ts.map +1 -0
- package/dist/esm/interface/crud/session-replays.js +1 -0
- package/dist/esm/interface/crud/sessions.d.ts +151 -0
- package/dist/esm/interface/crud/sessions.d.ts.map +1 -0
- package/dist/esm/interface/crud/sessions.js +56 -0
- package/dist/esm/interface/crud/sessions.js.map +1 -0
- package/dist/esm/interface/crud/sign-up-rules.d.ts +15 -0
- package/dist/esm/interface/crud/sign-up-rules.d.ts.map +1 -0
- package/dist/esm/interface/crud/sign-up-rules.js +1 -0
- package/dist/esm/interface/crud/svix-token.d.ts +32 -0
- package/dist/esm/interface/crud/svix-token.d.ts.map +1 -0
- package/dist/esm/interface/crud/svix-token.js +18 -0
- package/dist/esm/interface/crud/svix-token.js.map +1 -0
- package/dist/esm/interface/crud/team-invitation-details.d.ts +32 -0
- package/dist/esm/interface/crud/team-invitation-details.d.ts.map +1 -0
- package/dist/esm/interface/crud/team-invitation-details.js +21 -0
- package/dist/esm/interface/crud/team-invitation-details.js.map +1 -0
- package/dist/esm/interface/crud/team-invitation.d.ts +55 -0
- package/dist/esm/interface/crud/team-invitation.d.ts.map +1 -0
- package/dist/esm/interface/crud/team-invitation.js +37 -0
- package/dist/esm/interface/crud/team-invitation.js.map +1 -0
- package/dist/esm/interface/crud/team-member-profiles.d.ts +287 -0
- package/dist/esm/interface/crud/team-member-profiles.d.ts.map +1 -0
- package/dist/esm/interface/crud/team-member-profiles.js +58 -0
- package/dist/esm/interface/crud/team-member-profiles.js.map +1 -0
- package/dist/esm/interface/crud/team-memberships.d.ts +76 -0
- package/dist/esm/interface/crud/team-memberships.d.ts.map +1 -0
- package/dist/esm/interface/crud/team-memberships.js +54 -0
- package/dist/esm/interface/crud/team-memberships.js.map +1 -0
- package/dist/esm/interface/crud/team-permissions.d.ts +170 -0
- package/dist/esm/interface/crud/team-permissions.d.ts.map +1 -0
- package/dist/esm/interface/crud/team-permissions.js +105 -0
- package/dist/esm/interface/crud/team-permissions.js.map +1 -0
- package/dist/esm/interface/crud/teams.d.ts +300 -0
- package/dist/esm/interface/crud/teams.d.ts.map +1 -0
- package/dist/esm/interface/crud/teams.js +129 -0
- package/dist/esm/interface/crud/teams.js.map +1 -0
- package/dist/esm/interface/crud/transactions.d.ts +183 -0
- package/dist/esm/interface/crud/transactions.d.ts.map +1 -0
- package/dist/esm/interface/crud/transactions.js +85 -0
- package/dist/esm/interface/crud/transactions.js.map +1 -0
- package/dist/esm/interface/crud/users.d.ts +654 -0
- package/dist/esm/interface/crud/users.d.ts.map +1 -0
- package/dist/esm/interface/crud/users.js +181 -0
- package/dist/esm/interface/crud/users.js.map +1 -0
- package/dist/esm/interface/handler-urls.d.ts +51 -0
- package/dist/esm/interface/handler-urls.d.ts.map +1 -0
- package/dist/esm/interface/handler-urls.js +3 -0
- package/dist/esm/interface/page-component-versions.d.ts +25 -0
- package/dist/esm/interface/page-component-versions.d.ts.map +1 -0
- package/dist/esm/interface/page-component-versions.js +1661 -0
- package/dist/esm/interface/page-component-versions.js.map +1 -0
- package/dist/esm/interface/server-interface.d.ts +255 -0
- package/dist/esm/interface/server-interface.d.ts.map +1 -0
- package/dist/esm/interface/server-interface.js +459 -0
- package/dist/esm/interface/server-interface.js.map +1 -0
- package/dist/esm/interface/webhooks.d.ts +326 -0
- package/dist/esm/interface/webhooks.d.ts.map +1 -0
- package/dist/esm/interface/webhooks.js +22 -0
- package/dist/esm/interface/webhooks.js.map +1 -0
- package/dist/esm/known-errors.d.ts +575 -0
- package/dist/esm/known-errors.d.ts.map +1 -0
- package/dist/esm/known-errors.js +791 -0
- package/dist/esm/known-errors.js.map +1 -0
- package/dist/esm/local-emulator.d.ts +6 -0
- package/dist/esm/local-emulator.d.ts.map +1 -0
- package/dist/esm/local-emulator.js +7 -0
- package/dist/esm/local-emulator.js.map +1 -0
- package/dist/esm/payments/payment-methods.d.ts +64 -0
- package/dist/esm/payments/payment-methods.d.ts.map +1 -0
- package/dist/esm/payments/payment-methods.js +205 -0
- package/dist/esm/payments/payment-methods.js.map +1 -0
- package/dist/esm/payments/stripe-limits.d.ts +17 -0
- package/dist/esm/payments/stripe-limits.d.ts.map +1 -0
- package/dist/esm/payments/stripe-limits.js +17 -0
- package/dist/esm/payments/stripe-limits.js.map +1 -0
- package/dist/esm/plans.d.ts +72 -0
- package/dist/esm/plans.d.ts.map +1 -0
- package/dist/esm/plans.js +81 -0
- package/dist/esm/plans.js.map +1 -0
- package/dist/esm/schema-fields.d.ts +472 -0
- package/dist/esm/schema-fields.d.ts.map +1 -0
- package/dist/esm/schema-fields.js +1009 -0
- package/dist/esm/schema-fields.js.map +1 -0
- package/dist/esm/sessions.d.ts +165 -0
- package/dist/esm/sessions.d.ts.map +1 -0
- package/dist/esm/sessions.js +226 -0
- package/dist/esm/sessions.js.map +1 -0
- package/dist/esm/stack-config-file.d.ts +15 -0
- package/dist/esm/stack-config-file.d.ts.map +1 -0
- package/dist/esm/stack-config-file.js +76 -0
- package/dist/esm/stack-config-file.js.map +1 -0
- package/dist/esm/utils/api-keys.d.ts +26 -0
- package/dist/esm/utils/api-keys.d.ts.map +1 -0
- package/dist/esm/utils/api-keys.js +77 -0
- package/dist/esm/utils/api-keys.js.map +1 -0
- package/dist/esm/utils/arrays.d.ts +25 -0
- package/dist/esm/utils/arrays.d.ts.map +1 -0
- package/dist/esm/utils/arrays.js +552 -0
- package/dist/esm/utils/arrays.js.map +1 -0
- package/dist/esm/utils/auth-methods.d.ts +6 -0
- package/dist/esm/utils/auth-methods.d.ts.map +1 -0
- package/dist/esm/utils/auth-methods.js +11 -0
- package/dist/esm/utils/auth-methods.js.map +1 -0
- package/dist/esm/utils/base64.d.ts +6 -0
- package/dist/esm/utils/base64.d.ts.map +1 -0
- package/dist/esm/utils/base64.js +25 -0
- package/dist/esm/utils/base64.js.map +1 -0
- package/dist/esm/utils/booleans.d.ts +8 -0
- package/dist/esm/utils/booleans.d.ts.map +1 -0
- package/dist/esm/utils/booleans.js +35 -0
- package/dist/esm/utils/booleans.js.map +1 -0
- package/dist/esm/utils/browser-compat.d.ts +10 -0
- package/dist/esm/utils/browser-compat.d.ts.map +1 -0
- package/dist/esm/utils/browser-compat.js +21 -0
- package/dist/esm/utils/browser-compat.js.map +1 -0
- package/dist/esm/utils/bytes.d.ts +17 -0
- package/dist/esm/utils/bytes.d.ts.map +1 -0
- package/dist/esm/utils/bytes.js +290 -0
- package/dist/esm/utils/bytes.js.map +1 -0
- package/dist/esm/utils/caches.d.ts +102 -0
- package/dist/esm/utils/caches.d.ts.map +1 -0
- package/dist/esm/utils/caches.js +185 -0
- package/dist/esm/utils/caches.js.map +1 -0
- package/dist/esm/utils/cel-fields.d.ts +23 -0
- package/dist/esm/utils/cel-fields.d.ts.map +1 -0
- package/dist/esm/utils/cel-fields.js +99 -0
- package/dist/esm/utils/cel-fields.js.map +1 -0
- package/dist/esm/utils/compile-time.d.ts +10 -0
- package/dist/esm/utils/compile-time.d.ts.map +1 -0
- package/dist/esm/utils/compile-time.js +14 -0
- package/dist/esm/utils/compile-time.js.map +1 -0
- package/dist/esm/utils/country-codes.d.ts +11 -0
- package/dist/esm/utils/country-codes.d.ts.map +1 -0
- package/dist/esm/utils/country-codes.js +36 -0
- package/dist/esm/utils/country-codes.js.map +1 -0
- package/dist/esm/utils/crypto.d.ts +48 -0
- package/dist/esm/utils/crypto.d.ts.map +1 -0
- package/dist/esm/utils/crypto.js +208 -0
- package/dist/esm/utils/crypto.js.map +1 -0
- package/dist/esm/utils/currencies.d.ts +8 -0
- package/dist/esm/utils/currencies.d.ts.map +1 -0
- package/dist/esm/utils/currencies.js +50 -0
- package/dist/esm/utils/currencies.js.map +1 -0
- package/dist/esm/utils/currency-constants.d.ts +39 -0
- package/dist/esm/utils/currency-constants.d.ts.map +1 -0
- package/dist/esm/utils/currency-constants.js +42 -0
- package/dist/esm/utils/currency-constants.js.map +1 -0
- package/dist/esm/utils/dates.d.ts +23 -0
- package/dist/esm/utils/dates.d.ts.map +1 -0
- package/dist/esm/utils/dates.js +167 -0
- package/dist/esm/utils/dates.js.map +1 -0
- package/dist/esm/utils/dev-env-state-path.d.ts +6 -0
- package/dist/esm/utils/dev-env-state-path.d.ts.map +1 -0
- package/dist/esm/utils/dev-env-state-path.js +15 -0
- package/dist/esm/utils/dev-env-state-path.js.map +1 -0
- package/dist/esm/utils/dom.d.ts +5 -0
- package/dist/esm/utils/dom.d.ts.map +1 -0
- package/dist/esm/utils/dom.js +11 -0
- package/dist/esm/utils/dom.js.map +1 -0
- package/dist/esm/utils/env.d.ts +25 -0
- package/dist/esm/utils/env.d.ts.map +1 -0
- package/dist/esm/utils/env.js +78 -0
- package/dist/esm/utils/env.js.map +1 -0
- package/dist/esm/utils/errors.d.ts +231 -0
- package/dist/esm/utils/errors.d.ts.map +1 -0
- package/dist/esm/utils/errors.js +385 -0
- package/dist/esm/utils/errors.js.map +1 -0
- package/dist/esm/utils/esbuild.d.ts +16 -0
- package/dist/esm/utils/esbuild.d.ts.map +1 -0
- package/dist/esm/utils/esbuild.js +182 -0
- package/dist/esm/utils/esbuild.js.map +1 -0
- package/dist/esm/utils/featurebase.d.ts +30 -0
- package/dist/esm/utils/featurebase.d.ts.map +1 -0
- package/dist/esm/utils/featurebase.js +166 -0
- package/dist/esm/utils/featurebase.js.map +1 -0
- package/dist/esm/utils/fs.d.ts +9 -0
- package/dist/esm/utils/fs.d.ts.map +1 -0
- package/dist/esm/utils/fs.js +25 -0
- package/dist/esm/utils/fs.js.map +1 -0
- package/dist/esm/utils/functions.d.ts +6 -0
- package/dist/esm/utils/functions.d.ts.map +1 -0
- package/dist/esm/utils/functions.js +34 -0
- package/dist/esm/utils/functions.js.map +1 -0
- package/dist/esm/utils/geo.d.ts +24 -0
- package/dist/esm/utils/geo.d.ts.map +1 -0
- package/dist/esm/utils/geo.js +16 -0
- package/dist/esm/utils/geo.js.map +1 -0
- package/dist/esm/utils/globals.d.ts +13 -0
- package/dist/esm/utils/globals.d.ts.map +1 -0
- package/dist/esm/utils/globals.js +34 -0
- package/dist/esm/utils/globals.js.map +1 -0
- package/dist/esm/utils/hashes.d.ts +9 -0
- package/dist/esm/utils/hashes.d.ts.map +1 -0
- package/dist/esm/utils/hashes.js +40 -0
- package/dist/esm/utils/hashes.js.map +1 -0
- package/dist/esm/utils/html.d.ts +7 -0
- package/dist/esm/utils/html.d.ts.map +1 -0
- package/dist/esm/utils/html.js +33 -0
- package/dist/esm/utils/html.js.map +1 -0
- package/dist/esm/utils/http.d.ts +45 -0
- package/dist/esm/utils/http.d.ts.map +1 -0
- package/dist/esm/utils/http.js +75 -0
- package/dist/esm/utils/http.js.map +1 -0
- package/dist/esm/utils/ips.d.ts +8 -0
- package/dist/esm/utils/ips.d.ts.map +1 -0
- package/dist/esm/utils/ips.js +36 -0
- package/dist/esm/utils/ips.js.map +1 -0
- package/dist/esm/utils/json.d.ts +15 -0
- package/dist/esm/utils/json.d.ts.map +1 -0
- package/dist/esm/utils/json.js +178 -0
- package/dist/esm/utils/json.js.map +1 -0
- package/dist/esm/utils/jsx-editable-transpiler.d.ts +68 -0
- package/dist/esm/utils/jsx-editable-transpiler.d.ts.map +1 -0
- package/dist/esm/utils/jsx-editable-transpiler.js +216 -0
- package/dist/esm/utils/jsx-editable-transpiler.js.map +1 -0
- package/dist/esm/utils/jsx-editable-transpiler.test.d.ts +1 -0
- package/dist/esm/utils/jsx-editable-transpiler.test.js +122 -0
- package/dist/esm/utils/jsx-editable-transpiler.test.js.map +1 -0
- package/dist/esm/utils/jwt.d.ts +79 -0
- package/dist/esm/utils/jwt.d.ts.map +1 -0
- package/dist/esm/utils/jwt.js +102 -0
- package/dist/esm/utils/jwt.js.map +1 -0
- package/dist/esm/utils/locks.d.ts +17 -0
- package/dist/esm/utils/locks.d.ts.map +1 -0
- package/dist/esm/utils/locks.js +54 -0
- package/dist/esm/utils/locks.js.map +1 -0
- package/dist/esm/utils/maps.d.ts +61 -0
- package/dist/esm/utils/maps.d.ts.map +1 -0
- package/dist/esm/utils/maps.js +297 -0
- package/dist/esm/utils/maps.js.map +1 -0
- package/dist/esm/utils/math.d.ts +8 -0
- package/dist/esm/utils/math.d.ts.map +1 -0
- package/dist/esm/utils/math.js +21 -0
- package/dist/esm/utils/math.js.map +1 -0
- package/dist/esm/utils/monkey-patch.d.ts +7 -0
- package/dist/esm/utils/monkey-patch.d.ts.map +1 -0
- package/dist/esm/utils/monkey-patch.js +21 -0
- package/dist/esm/utils/monkey-patch.js.map +1 -0
- package/dist/esm/utils/node-http.d.ts +17 -0
- package/dist/esm/utils/node-http.d.ts.map +1 -0
- package/dist/esm/utils/node-http.js +38 -0
- package/dist/esm/utils/node-http.js.map +1 -0
- package/dist/esm/utils/numbers.d.ts +7 -0
- package/dist/esm/utils/numbers.d.ts.map +1 -0
- package/dist/esm/utils/numbers.js +75 -0
- package/dist/esm/utils/numbers.js.map +1 -0
- package/dist/esm/utils/oauth.d.ts +11 -0
- package/dist/esm/utils/oauth.d.ts.map +1 -0
- package/dist/esm/utils/oauth.js +27 -0
- package/dist/esm/utils/oauth.js.map +1 -0
- package/dist/esm/utils/objects.d.ts +59 -0
- package/dist/esm/utils/objects.d.ts.map +1 -0
- package/dist/esm/utils/objects.js +818 -0
- package/dist/esm/utils/objects.js.map +1 -0
- package/dist/esm/utils/paginated-lists.d.ts +442 -0
- package/dist/esm/utils/paginated-lists.d.ts.map +1 -0
- package/dist/esm/utils/paginated-lists.js +411 -0
- package/dist/esm/utils/paginated-lists.js.map +1 -0
- package/dist/esm/utils/paginated-lists.test.d.ts +1 -0
- package/dist/esm/utils/paginated-lists.test.js +1304 -0
- package/dist/esm/utils/paginated-lists.test.js.map +1 -0
- package/dist/esm/utils/passkey.d.ts +2 -0
- package/dist/esm/utils/passkey.js +1 -0
- package/dist/esm/utils/promises.d.ts +80 -0
- package/dist/esm/utils/promises.d.ts.map +1 -0
- package/dist/esm/utils/promises.js +333 -0
- package/dist/esm/utils/promises.js.map +1 -0
- package/dist/esm/utils/proxies.d.ts +13 -0
- package/dist/esm/utils/proxies.d.ts.map +1 -0
- package/dist/esm/utils/proxies.js +197 -0
- package/dist/esm/utils/proxies.js.map +1 -0
- package/dist/esm/utils/react.d.ts +61 -0
- package/dist/esm/utils/react.d.ts.map +1 -0
- package/dist/esm/utils/react.js +229 -0
- package/dist/esm/utils/react.js.map +1 -0
- package/dist/esm/utils/redirect-urls.d.ts +30 -0
- package/dist/esm/utils/redirect-urls.d.ts.map +1 -0
- package/dist/esm/utils/redirect-urls.js +215 -0
- package/dist/esm/utils/redirect-urls.js.map +1 -0
- package/dist/esm/utils/regex.d.ts +5 -0
- package/dist/esm/utils/regex.d.ts.map +1 -0
- package/dist/esm/utils/regex.js +13 -0
- package/dist/esm/utils/regex.js.map +1 -0
- package/dist/esm/utils/results.d.ts +70 -0
- package/dist/esm/utils/results.d.ts.map +1 -0
- package/dist/esm/utils/results.js +339 -0
- package/dist/esm/utils/results.js.map +1 -0
- package/dist/esm/utils/sentry.d.ts +13 -0
- package/dist/esm/utils/sentry.d.ts.map +1 -0
- package/dist/esm/utils/sentry.js +14 -0
- package/dist/esm/utils/sentry.js.map +1 -0
- package/dist/esm/utils/stores.d.ts +104 -0
- package/dist/esm/utils/stores.d.ts.map +1 -0
- package/dist/esm/utils/stores.js +175 -0
- package/dist/esm/utils/stores.js.map +1 -0
- package/dist/esm/utils/strings.d.ts +76 -0
- package/dist/esm/utils/strings.d.ts.map +1 -0
- package/dist/esm/utils/strings.js +530 -0
- package/dist/esm/utils/strings.js.map +1 -0
- package/dist/esm/utils/strings.nicify.test.d.ts +1 -0
- package/dist/esm/utils/strings.nicify.test.js +243 -0
- package/dist/esm/utils/strings.nicify.test.js.map +1 -0
- package/dist/esm/utils/telemetry.d.ts +15 -0
- package/dist/esm/utils/telemetry.d.ts.map +1 -0
- package/dist/esm/utils/telemetry.js +31 -0
- package/dist/esm/utils/telemetry.js.map +1 -0
- package/dist/esm/utils/turnstile-browser.d.ts +32 -0
- package/dist/esm/utils/turnstile-browser.d.ts.map +1 -0
- package/dist/esm/utils/turnstile-browser.js +61 -0
- package/dist/esm/utils/turnstile-browser.js.map +1 -0
- package/dist/esm/utils/turnstile-flow.d.ts +29 -0
- package/dist/esm/utils/turnstile-flow.d.ts.map +1 -0
- package/dist/esm/utils/turnstile-flow.js +219 -0
- package/dist/esm/utils/turnstile-flow.js.map +1 -0
- package/dist/esm/utils/turnstile-flow.test.d.ts +1 -0
- package/dist/esm/utils/turnstile-flow.test.js +75 -0
- package/dist/esm/utils/turnstile-flow.test.js.map +1 -0
- package/dist/esm/utils/turnstile.d.ts +17 -0
- package/dist/esm/utils/turnstile.d.ts.map +1 -0
- package/dist/esm/utils/turnstile.js +25 -0
- package/dist/esm/utils/turnstile.js.map +1 -0
- package/dist/esm/utils/typed-arrays.d.ts +14 -0
- package/dist/esm/utils/typed-arrays.d.ts.map +1 -0
- package/dist/esm/utils/typed-arrays.js +20 -0
- package/dist/esm/utils/typed-arrays.js.map +1 -0
- package/dist/esm/utils/types.d.ts +77 -0
- package/dist/esm/utils/types.d.ts.map +1 -0
- package/dist/esm/utils/types.js +55 -0
- package/dist/esm/utils/types.js.map +1 -0
- package/dist/esm/utils/unicode.d.ts +5 -0
- package/dist/esm/utils/unicode.d.ts.map +1 -0
- package/dist/esm/utils/unicode.js +24 -0
- package/dist/esm/utils/unicode.js.map +1 -0
- package/dist/esm/utils/urls.d.ts +28 -0
- package/dist/esm/utils/urls.d.ts.map +1 -0
- package/dist/esm/utils/urls.js +259 -0
- package/dist/esm/utils/urls.js.map +1 -0
- package/dist/esm/utils/uuids.d.ts +6 -0
- package/dist/esm/utils/uuids.d.ts.map +1 -0
- package/dist/esm/utils/uuids.js +36 -0
- package/dist/esm/utils/uuids.js.map +1 -0
- package/dist/global.d.d.ts +0 -0
- package/dist/global.d.ts +1 -0
- package/dist/helpers/emails.d.ts +69 -0
- package/dist/helpers/emails.d.ts.map +1 -0
- package/dist/helpers/emails.js +252 -0
- package/dist/helpers/emails.js.map +1 -0
- package/dist/helpers/init-prompt.d.ts +5 -0
- package/dist/helpers/init-prompt.d.ts.map +1 -0
- package/dist/helpers/init-prompt.js +42 -0
- package/dist/helpers/init-prompt.js.map +1 -0
- package/dist/helpers/password.d.ts +6 -0
- package/dist/helpers/password.d.ts.map +1 -0
- package/dist/helpers/password.js +15 -0
- package/dist/helpers/password.js.map +1 -0
- package/dist/helpers/production-mode.d.ts +11 -0
- package/dist/helpers/production-mode.d.ts.map +1 -0
- package/dist/helpers/production-mode.js +48 -0
- package/dist/helpers/production-mode.js.map +1 -0
- package/dist/helpers/support-sla.d.ts +48 -0
- package/dist/helpers/support-sla.d.ts.map +1 -0
- package/dist/helpers/support-sla.js +72 -0
- package/dist/helpers/support-sla.js.map +1 -0
- package/dist/helpers/support-sla.test.d.ts +1 -0
- package/dist/helpers/support-sla.test.js +102 -0
- package/dist/helpers/support-sla.test.js.map +1 -0
- package/dist/helpers/vault/client-side.d.ts +16 -0
- package/dist/helpers/vault/client-side.d.ts.map +1 -0
- package/dist/helpers/vault/client-side.js +73 -0
- package/dist/helpers/vault/client-side.js.map +1 -0
- package/dist/helpers/vault/server-side.d.ts +9 -0
- package/dist/helpers/vault/server-side.d.ts.map +1 -0
- package/dist/helpers/vault/server-side.js +126 -0
- package/dist/helpers/vault/server-side.js.map +1 -0
- package/dist/hooks/use-async-callback.d.ts +8 -0
- package/dist/hooks/use-async-callback.d.ts.map +1 -0
- package/dist/hooks/use-async-callback.js +42 -0
- package/dist/hooks/use-async-callback.js.map +1 -0
- package/dist/hooks/use-async-external-store.d.ts +9 -0
- package/dist/hooks/use-async-external-store.d.ts.map +1 -0
- package/dist/hooks/use-async-external-store.js +22 -0
- package/dist/hooks/use-async-external-store.js.map +1 -0
- package/dist/hooks/use-hash.d.ts +5 -0
- package/dist/hooks/use-hash.d.ts.map +1 -0
- package/dist/hooks/use-hash.js +17 -0
- package/dist/hooks/use-hash.js.map +1 -0
- package/dist/hooks/use-hover.d.ts +8 -0
- package/dist/hooks/use-hover.d.ts.map +1 -0
- package/dist/hooks/use-hover.js +61 -0
- package/dist/hooks/use-hover.js.map +1 -0
- package/dist/hooks/use-strict-memo.d.ts +10 -0
- package/dist/hooks/use-strict-memo.d.ts.map +1 -0
- package/dist/hooks/use-strict-memo.js +121 -0
- package/dist/hooks/use-strict-memo.js.map +1 -0
- package/dist/index-D9ysacya.d.ts +153 -0
- package/dist/index-D9ysacya.d.ts.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +37 -0
- package/dist/interface/admin-interface.d.ts +308 -0
- package/dist/interface/admin-interface.d.ts.map +1 -0
- package/dist/interface/admin-interface.js +465 -0
- package/dist/interface/admin-interface.js.map +1 -0
- package/dist/interface/admin-metrics.d.ts +597 -0
- package/dist/interface/admin-metrics.d.ts.map +1 -0
- package/dist/interface/admin-metrics.js +153 -0
- package/dist/interface/admin-metrics.js.map +1 -0
- package/dist/interface/client-interface.d.ts +447 -0
- package/dist/interface/client-interface.d.ts.map +1 -0
- package/dist/interface/client-interface.js +1948 -0
- package/dist/interface/client-interface.js.map +1 -0
- package/dist/interface/client-interface.test.d.ts +1 -0
- package/dist/interface/client-interface.test.js +559 -0
- package/dist/interface/client-interface.test.js.map +1 -0
- package/dist/interface/conversations.d.ts +314 -0
- package/dist/interface/conversations.d.ts.map +1 -0
- package/dist/interface/conversations.js +121 -0
- package/dist/interface/conversations.js.map +1 -0
- package/dist/interface/crud/analytics.d.ts +14 -0
- package/dist/interface/crud/analytics.d.ts.map +1 -0
- package/dist/interface/crud/analytics.js +0 -0
- package/dist/interface/crud/connected-accounts.d.ts +68 -0
- package/dist/interface/crud/connected-accounts.d.ts.map +1 -0
- package/dist/interface/crud/connected-accounts.js +41 -0
- package/dist/interface/crud/connected-accounts.js.map +1 -0
- package/dist/interface/crud/contact-channels.d.ts +181 -0
- package/dist/interface/crud/contact-channels.d.ts.map +1 -0
- package/dist/interface/crud/contact-channels.js +76 -0
- package/dist/interface/crud/contact-channels.js.map +1 -0
- package/dist/interface/crud/current-user.d.ts +285 -0
- package/dist/interface/crud/current-user.d.ts.map +1 -0
- package/dist/interface/crud/current-user.js +71 -0
- package/dist/interface/crud/current-user.js.map +1 -0
- package/dist/interface/crud/email-outbox.d.ts +1465 -0
- package/dist/interface/crud/email-outbox.d.ts.map +1 -0
- package/dist/interface/crud/email-outbox.js +195 -0
- package/dist/interface/crud/email-outbox.js.map +1 -0
- package/dist/interface/crud/email-templates.d.ts +85 -0
- package/dist/interface/crud/email-templates.d.ts.map +1 -0
- package/dist/interface/crud/email-templates.js +53 -0
- package/dist/interface/crud/email-templates.js.map +1 -0
- package/dist/interface/crud/emails.d.ts +41 -0
- package/dist/interface/crud/emails.d.ts.map +1 -0
- package/dist/interface/crud/emails.js +23 -0
- package/dist/interface/crud/emails.js.map +1 -0
- package/dist/interface/crud/internal-api-keys.d.ts +140 -0
- package/dist/interface/crud/internal-api-keys.d.ts.map +1 -0
- package/dist/interface/crud/internal-api-keys.js +56 -0
- package/dist/interface/crud/internal-api-keys.js.map +1 -0
- package/dist/interface/crud/invoices.d.ts +43 -0
- package/dist/interface/crud/invoices.d.ts.map +1 -0
- package/dist/interface/crud/invoices.js +28 -0
- package/dist/interface/crud/invoices.js.map +1 -0
- package/dist/interface/crud/items.d.ts +30 -0
- package/dist/interface/crud/items.d.ts.map +1 -0
- package/dist/interface/crud/items.js +25 -0
- package/dist/interface/crud/items.js.map +1 -0
- package/dist/interface/crud/notification-preferences.d.ts +38 -0
- package/dist/interface/crud/notification-preferences.d.ts.map +1 -0
- package/dist/interface/crud/notification-preferences.js +33 -0
- package/dist/interface/crud/notification-preferences.js.map +1 -0
- package/dist/interface/crud/oauth-providers.d.ts +186 -0
- package/dist/interface/crud/oauth-providers.d.ts.map +1 -0
- package/dist/interface/crud/oauth-providers.js +83 -0
- package/dist/interface/crud/oauth-providers.js.map +1 -0
- package/dist/interface/crud/products.d.ts +182 -0
- package/dist/interface/crud/products.d.ts.map +1 -0
- package/dist/interface/crud/products.js +32 -0
- package/dist/interface/crud/products.js.map +1 -0
- package/dist/interface/crud/project-api-keys.d.ts +203 -0
- package/dist/interface/crud/project-api-keys.d.ts.map +1 -0
- package/dist/interface/crud/project-api-keys.js +79 -0
- package/dist/interface/crud/project-api-keys.js.map +1 -0
- package/dist/interface/crud/project-permissions.d.ts +161 -0
- package/dist/interface/crud/project-permissions.d.ts.map +1 -0
- package/dist/interface/crud/project-permissions.js +116 -0
- package/dist/interface/crud/project-permissions.js.map +1 -0
- package/dist/interface/crud/projects.d.ts +851 -0
- package/dist/interface/crud/projects.d.ts.map +1 -0
- package/dist/interface/crud/projects.js +204 -0
- package/dist/interface/crud/projects.js.map +1 -0
- package/dist/interface/crud/session-replays.d.ts +83 -0
- package/dist/interface/crud/session-replays.d.ts.map +1 -0
- package/dist/interface/crud/session-replays.js +0 -0
- package/dist/interface/crud/sessions.d.ts +150 -0
- package/dist/interface/crud/sessions.d.ts.map +1 -0
- package/dist/interface/crud/sessions.js +62 -0
- package/dist/interface/crud/sessions.js.map +1 -0
- package/dist/interface/crud/sign-up-rules.d.ts +15 -0
- package/dist/interface/crud/sign-up-rules.d.ts.map +1 -0
- package/dist/interface/crud/sign-up-rules.js +0 -0
- package/dist/interface/crud/svix-token.d.ts +31 -0
- package/dist/interface/crud/svix-token.d.ts.map +1 -0
- package/dist/interface/crud/svix-token.js +22 -0
- package/dist/interface/crud/svix-token.js.map +1 -0
- package/dist/interface/crud/team-invitation-details.d.ts +31 -0
- package/dist/interface/crud/team-invitation-details.d.ts.map +1 -0
- package/dist/interface/crud/team-invitation-details.js +24 -0
- package/dist/interface/crud/team-invitation-details.js.map +1 -0
- package/dist/interface/crud/team-invitation.d.ts +54 -0
- package/dist/interface/crud/team-invitation.d.ts.map +1 -0
- package/dist/interface/crud/team-invitation.js +40 -0
- package/dist/interface/crud/team-invitation.js.map +1 -0
- package/dist/interface/crud/team-member-profiles.d.ts +286 -0
- package/dist/interface/crud/team-member-profiles.d.ts.map +1 -0
- package/dist/interface/crud/team-member-profiles.js +63 -0
- package/dist/interface/crud/team-member-profiles.js.map +1 -0
- package/dist/interface/crud/team-memberships.d.ts +75 -0
- package/dist/interface/crud/team-memberships.d.ts.map +1 -0
- package/dist/interface/crud/team-memberships.js +61 -0
- package/dist/interface/crud/team-memberships.js.map +1 -0
- package/dist/interface/crud/team-permissions.d.ts +169 -0
- package/dist/interface/crud/team-permissions.d.ts.map +1 -0
- package/dist/interface/crud/team-permissions.js +117 -0
- package/dist/interface/crud/team-permissions.js.map +1 -0
- package/dist/interface/crud/teams.d.ts +299 -0
- package/dist/interface/crud/teams.d.ts.map +1 -0
- package/dist/interface/crud/teams.js +142 -0
- package/dist/interface/crud/teams.js.map +1 -0
- package/dist/interface/crud/transactions.d.ts +183 -0
- package/dist/interface/crud/transactions.d.ts.map +1 -0
- package/dist/interface/crud/transactions.js +89 -0
- package/dist/interface/crud/transactions.js.map +1 -0
- package/dist/interface/crud/users.d.ts +653 -0
- package/dist/interface/crud/users.d.ts.map +1 -0
- package/dist/interface/crud/users.js +193 -0
- package/dist/interface/crud/users.js.map +1 -0
- package/dist/interface/handler-urls.d.ts +51 -0
- package/dist/interface/handler-urls.d.ts.map +1 -0
- package/dist/interface/handler-urls.js +16 -0
- package/dist/interface/page-component-versions.d.ts +25 -0
- package/dist/interface/page-component-versions.d.ts.map +1 -0
- package/dist/interface/page-component-versions.js +1664 -0
- package/dist/interface/page-component-versions.js.map +1 -0
- package/dist/interface/server-interface.d.ts +255 -0
- package/dist/interface/server-interface.d.ts.map +1 -0
- package/dist/interface/server-interface.js +461 -0
- package/dist/interface/server-interface.js.map +1 -0
- package/dist/interface/webhooks.d.ts +326 -0
- package/dist/interface/webhooks.d.ts.map +1 -0
- package/dist/interface/webhooks.js +24 -0
- package/dist/interface/webhooks.js.map +1 -0
- package/dist/known-errors.d.ts +575 -0
- package/dist/known-errors.d.ts.map +1 -0
- package/dist/known-errors.js +794 -0
- package/dist/known-errors.js.map +1 -0
- package/dist/local-emulator.d.ts +6 -0
- package/dist/local-emulator.d.ts.map +1 -0
- package/dist/local-emulator.js +10 -0
- package/dist/local-emulator.js.map +1 -0
- package/dist/payments/payment-methods.d.ts +64 -0
- package/dist/payments/payment-methods.d.ts.map +1 -0
- package/dist/payments/payment-methods.js +216 -0
- package/dist/payments/payment-methods.js.map +1 -0
- package/dist/payments/stripe-limits.d.ts +17 -0
- package/dist/payments/stripe-limits.d.ts.map +1 -0
- package/dist/payments/stripe-limits.js +20 -0
- package/dist/payments/stripe-limits.js.map +1 -0
- package/dist/plans.d.ts +72 -0
- package/dist/plans.d.ts.map +1 -0
- package/dist/plans.js +88 -0
- package/dist/plans.js.map +1 -0
- package/dist/schema-fields.d.ts +472 -0
- package/dist/schema-fields.d.ts.map +1 -0
- package/dist/schema-fields.js +1188 -0
- package/dist/schema-fields.js.map +1 -0
- package/dist/sessions.d.ts +165 -0
- package/dist/sessions.d.ts.map +1 -0
- package/dist/sessions.js +231 -0
- package/dist/sessions.js.map +1 -0
- package/dist/stack-config-file.d.ts +15 -0
- package/dist/stack-config-file.d.ts.map +1 -0
- package/dist/stack-config-file.js +82 -0
- package/dist/stack-config-file.js.map +1 -0
- package/dist/utils/api-keys.d.ts +26 -0
- package/dist/utils/api-keys.d.ts.map +1 -0
- package/dist/utils/api-keys.js +82 -0
- package/dist/utils/api-keys.js.map +1 -0
- package/dist/utils/arrays.d.ts +25 -0
- package/dist/utils/arrays.d.ts.map +1 -0
- package/dist/utils/arrays.js +569 -0
- package/dist/utils/arrays.js.map +1 -0
- package/dist/utils/auth-methods.d.ts +6 -0
- package/dist/utils/auth-methods.d.ts.map +1 -0
- package/dist/utils/auth-methods.js +13 -0
- package/dist/utils/auth-methods.js.map +1 -0
- package/dist/utils/base64.d.ts +6 -0
- package/dist/utils/base64.d.ts.map +1 -0
- package/dist/utils/base64.js +28 -0
- package/dist/utils/base64.js.map +1 -0
- package/dist/utils/booleans.d.ts +8 -0
- package/dist/utils/booleans.d.ts.map +1 -0
- package/dist/utils/booleans.js +38 -0
- package/dist/utils/booleans.js.map +1 -0
- package/dist/utils/browser-compat.d.ts +10 -0
- package/dist/utils/browser-compat.d.ts.map +1 -0
- package/dist/utils/browser-compat.js +23 -0
- package/dist/utils/browser-compat.js.map +1 -0
- package/dist/utils/bytes.d.ts +17 -0
- package/dist/utils/bytes.d.ts.map +1 -0
- package/dist/utils/bytes.js +304 -0
- package/dist/utils/bytes.js.map +1 -0
- package/dist/utils/caches.d.ts +102 -0
- package/dist/utils/caches.d.ts.map +1 -0
- package/dist/utils/caches.js +188 -0
- package/dist/utils/caches.js.map +1 -0
- package/dist/utils/cel-fields.d.ts +23 -0
- package/dist/utils/cel-fields.d.ts.map +1 -0
- package/dist/utils/cel-fields.js +108 -0
- package/dist/utils/cel-fields.js.map +1 -0
- package/dist/utils/compile-time.d.ts +10 -0
- package/dist/utils/compile-time.d.ts.map +1 -0
- package/dist/utils/compile-time.js +16 -0
- package/dist/utils/compile-time.js.map +1 -0
- package/dist/utils/country-codes.d.ts +11 -0
- package/dist/utils/country-codes.d.ts.map +1 -0
- package/dist/utils/country-codes.js +40 -0
- package/dist/utils/country-codes.js.map +1 -0
- package/dist/utils/crypto.d.ts +48 -0
- package/dist/utils/crypto.d.ts.map +1 -0
- package/dist/utils/crypto.js +215 -0
- package/dist/utils/crypto.js.map +1 -0
- package/dist/utils/currencies.d.ts +8 -0
- package/dist/utils/currencies.d.ts.map +1 -0
- package/dist/utils/currencies.js +52 -0
- package/dist/utils/currencies.js.map +1 -0
- package/dist/utils/currency-constants.d.ts +39 -0
- package/dist/utils/currency-constants.d.ts.map +1 -0
- package/dist/utils/currency-constants.js +44 -0
- package/dist/utils/currency-constants.js.map +1 -0
- package/dist/utils/dates.d.ts +23 -0
- package/dist/utils/dates.d.ts.map +1 -0
- package/dist/utils/dates.js +176 -0
- package/dist/utils/dates.js.map +1 -0
- package/dist/utils/dev-env-state-path.d.ts +6 -0
- package/dist/utils/dev-env-state-path.d.ts.map +1 -0
- package/dist/utils/dev-env-state-path.js +18 -0
- package/dist/utils/dev-env-state-path.js.map +1 -0
- package/dist/utils/dom.d.ts +5 -0
- package/dist/utils/dom.d.ts.map +1 -0
- package/dist/utils/dom.js +13 -0
- package/dist/utils/dom.js.map +1 -0
- package/dist/utils/env.d.ts +25 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/env.js +85 -0
- package/dist/utils/env.js.map +1 -0
- package/dist/utils/errors.d.ts +231 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +393 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/esbuild.d.ts +16 -0
- package/dist/utils/esbuild.d.ts.map +1 -0
- package/dist/utils/esbuild.js +186 -0
- package/dist/utils/esbuild.js.map +1 -0
- package/dist/utils/featurebase.d.ts +30 -0
- package/dist/utils/featurebase.d.ts.map +1 -0
- package/dist/utils/featurebase.js +168 -0
- package/dist/utils/featurebase.js.map +1 -0
- package/dist/utils/fs.d.ts +9 -0
- package/dist/utils/fs.d.ts.map +1 -0
- package/dist/utils/fs.js +31 -0
- package/dist/utils/fs.js.map +1 -0
- package/dist/utils/functions.d.ts +6 -0
- package/dist/utils/functions.d.ts.map +1 -0
- package/dist/utils/functions.js +37 -0
- package/dist/utils/functions.js.map +1 -0
- package/dist/utils/geo.d.ts +24 -0
- package/dist/utils/geo.d.ts.map +1 -0
- package/dist/utils/geo.js +18 -0
- package/dist/utils/geo.js.map +1 -0
- package/dist/utils/globals.d.ts +13 -0
- package/dist/utils/globals.d.ts.map +1 -0
- package/dist/utils/globals.js +40 -0
- package/dist/utils/globals.js.map +1 -0
- package/dist/utils/hashes.d.ts +9 -0
- package/dist/utils/hashes.d.ts.map +1 -0
- package/dist/utils/hashes.js +47 -0
- package/dist/utils/hashes.js.map +1 -0
- package/dist/utils/html.d.ts +7 -0
- package/dist/utils/html.d.ts.map +1 -0
- package/dist/utils/html.js +37 -0
- package/dist/utils/html.js.map +1 -0
- package/dist/utils/http.d.ts +45 -0
- package/dist/utils/http.d.ts.map +1 -0
- package/dist/utils/http.js +79 -0
- package/dist/utils/http.js.map +1 -0
- package/dist/utils/ips.d.ts +8 -0
- package/dist/utils/ips.d.ts.map +1 -0
- package/dist/utils/ips.js +40 -0
- package/dist/utils/ips.js.map +1 -0
- package/dist/utils/json.d.ts +15 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/json.js +182 -0
- package/dist/utils/json.js.map +1 -0
- package/dist/utils/jsx-editable-transpiler.d.ts +68 -0
- package/dist/utils/jsx-editable-transpiler.d.ts.map +1 -0
- package/dist/utils/jsx-editable-transpiler.js +223 -0
- package/dist/utils/jsx-editable-transpiler.js.map +1 -0
- package/dist/utils/jsx-editable-transpiler.test.d.ts +1 -0
- package/dist/utils/jsx-editable-transpiler.test.js +122 -0
- package/dist/utils/jsx-editable-transpiler.test.js.map +1 -0
- package/dist/utils/jwt.d.ts +79 -0
- package/dist/utils/jwt.d.ts.map +1 -0
- package/dist/utils/jwt.js +112 -0
- package/dist/utils/jwt.js.map +1 -0
- package/dist/utils/locks.d.ts +17 -0
- package/dist/utils/locks.d.ts.map +1 -0
- package/dist/utils/locks.js +56 -0
- package/dist/utils/locks.js.map +1 -0
- package/dist/utils/maps.d.ts +61 -0
- package/dist/utils/maps.d.ts.map +1 -0
- package/dist/utils/maps.js +302 -0
- package/dist/utils/maps.js.map +1 -0
- package/dist/utils/math.d.ts +8 -0
- package/dist/utils/math.d.ts.map +1 -0
- package/dist/utils/math.js +23 -0
- package/dist/utils/math.js.map +1 -0
- package/dist/utils/monkey-patch.d.ts +7 -0
- package/dist/utils/monkey-patch.d.ts.map +1 -0
- package/dist/utils/monkey-patch.js +25 -0
- package/dist/utils/monkey-patch.js.map +1 -0
- package/dist/utils/node-http.d.ts +17 -0
- package/dist/utils/node-http.d.ts.map +1 -0
- package/dist/utils/node-http.js +40 -0
- package/dist/utils/node-http.js.map +1 -0
- package/dist/utils/numbers.d.ts +7 -0
- package/dist/utils/numbers.d.ts.map +1 -0
- package/dist/utils/numbers.js +79 -0
- package/dist/utils/numbers.js.map +1 -0
- package/dist/utils/oauth.d.ts +11 -0
- package/dist/utils/oauth.d.ts.map +1 -0
- package/dist/utils/oauth.js +32 -0
- package/dist/utils/oauth.js.map +1 -0
- package/dist/utils/objects.d.ts +59 -0
- package/dist/utils/objects.d.ts.map +1 -0
- package/dist/utils/objects.js +846 -0
- package/dist/utils/objects.js.map +1 -0
- package/dist/utils/paginated-lists.d.ts +442 -0
- package/dist/utils/paginated-lists.d.ts.map +1 -0
- package/dist/utils/paginated-lists.js +414 -0
- package/dist/utils/paginated-lists.js.map +1 -0
- package/dist/utils/paginated-lists.test.d.ts +1 -0
- package/dist/utils/paginated-lists.test.js +1304 -0
- package/dist/utils/paginated-lists.test.js.map +1 -0
- package/dist/utils/passkey.d.ts +2 -0
- package/dist/utils/passkey.js +0 -0
- package/dist/utils/promises.d.ts +80 -0
- package/dist/utils/promises.d.ts.map +1 -0
- package/dist/utils/promises.js +349 -0
- package/dist/utils/promises.js.map +1 -0
- package/dist/utils/proxies.d.ts +13 -0
- package/dist/utils/proxies.d.ts.map +1 -0
- package/dist/utils/proxies.js +201 -0
- package/dist/utils/proxies.js.map +1 -0
- package/dist/utils/react.d.ts +61 -0
- package/dist/utils/react.d.ts.map +1 -0
- package/dist/utils/react.js +243 -0
- package/dist/utils/react.js.map +1 -0
- package/dist/utils/redirect-urls.d.ts +30 -0
- package/dist/utils/redirect-urls.d.ts.map +1 -0
- package/dist/utils/redirect-urls.js +222 -0
- package/dist/utils/redirect-urls.js.map +1 -0
- package/dist/utils/regex.d.ts +5 -0
- package/dist/utils/regex.d.ts.map +1 -0
- package/dist/utils/regex.js +15 -0
- package/dist/utils/regex.js.map +1 -0
- package/dist/utils/results.d.ts +70 -0
- package/dist/utils/results.d.ts.map +1 -0
- package/dist/utils/results.js +342 -0
- package/dist/utils/results.js.map +1 -0
- package/dist/utils/sentry.d.ts +13 -0
- package/dist/utils/sentry.d.ts.map +1 -0
- package/dist/utils/sentry.js +16 -0
- package/dist/utils/sentry.js.map +1 -0
- package/dist/utils/stores.d.ts +104 -0
- package/dist/utils/stores.d.ts.map +1 -0
- package/dist/utils/stores.js +179 -0
- package/dist/utils/stores.js.map +1 -0
- package/dist/utils/strings.d.ts +76 -0
- package/dist/utils/strings.d.ts.map +1 -0
- package/dist/utils/strings.js +549 -0
- package/dist/utils/strings.js.map +1 -0
- package/dist/utils/strings.nicify.test.d.ts +1 -0
- package/dist/utils/strings.nicify.test.js +243 -0
- package/dist/utils/strings.nicify.test.js.map +1 -0
- package/dist/utils/telemetry.d.ts +15 -0
- package/dist/utils/telemetry.d.ts.map +1 -0
- package/dist/utils/telemetry.js +35 -0
- package/dist/utils/telemetry.js.map +1 -0
- package/dist/utils/turnstile-browser.d.ts +32 -0
- package/dist/utils/turnstile-browser.d.ts.map +1 -0
- package/dist/utils/turnstile-browser.js +65 -0
- package/dist/utils/turnstile-browser.js.map +1 -0
- package/dist/utils/turnstile-flow.d.ts +29 -0
- package/dist/utils/turnstile-flow.d.ts.map +1 -0
- package/dist/utils/turnstile-flow.js +225 -0
- package/dist/utils/turnstile-flow.js.map +1 -0
- package/dist/utils/turnstile-flow.test.d.ts +1 -0
- package/dist/utils/turnstile-flow.test.js +75 -0
- package/dist/utils/turnstile-flow.test.js.map +1 -0
- package/dist/utils/turnstile.d.ts +17 -0
- package/dist/utils/turnstile.d.ts.map +1 -0
- package/dist/utils/turnstile.js +31 -0
- package/dist/utils/turnstile.js.map +1 -0
- package/dist/utils/typed-arrays.d.ts +14 -0
- package/dist/utils/typed-arrays.d.ts.map +1 -0
- package/dist/utils/typed-arrays.js +22 -0
- package/dist/utils/typed-arrays.js.map +1 -0
- package/dist/utils/types.d.ts +77 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/utils/types.js +59 -0
- package/dist/utils/types.js.map +1 -0
- package/dist/utils/unicode.d.ts +5 -0
- package/dist/utils/unicode.d.ts.map +1 -0
- package/dist/utils/unicode.js +26 -0
- package/dist/utils/unicode.js.map +1 -0
- package/dist/utils/urls.d.ts +28 -0
- package/dist/utils/urls.d.ts.map +1 -0
- package/dist/utils/urls.js +274 -0
- package/dist/utils/urls.js.map +1 -0
- package/dist/utils/uuids.d.ts +6 -0
- package/dist/utils/uuids.d.ts.map +1 -0
- package/dist/utils/uuids.js +39 -0
- package/dist/utils/uuids.js.map +1 -0
- package/package.json +99 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"featurebase.d.ts","names":[],"sources":["../../../src/utils/featurebase.tsx"],"mappings":";KAGY,eAAA;EACV,MAAA;EACA,KAAA;EACA,IAAA;EACA,cAAA;AAAA;AAAA,KAGU,aAAA;EACV,EAAA;EACA,YAAA;EACA,WAAA;EACA,eAAA;AAAA;;;;;;;;;iBAgKoB,0BAAA,CACpB,aAAA,EAAe,aAAA,EACf,OAAA;EAAY,MAAA;AAAA,IACX,OAAA;EAAU,MAAA;EAAgB,KAAA;AAAA"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { HexclaveAssertionError } from "./errors.js";
|
|
2
|
+
import { getEnvVariable } from "./env.js";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/featurebase.tsx
|
|
5
|
+
/**
|
|
6
|
+
* Find a Featurebase user by their Hexclave user ID
|
|
7
|
+
*/
|
|
8
|
+
async function findFeaturebaseUserById(stackAuthUserId, apiKey) {
|
|
9
|
+
try {
|
|
10
|
+
const response = await fetch(`https://do.featurebase.app/v2/organization/identifyUser?id=${stackAuthUserId}`, {
|
|
11
|
+
method: "GET",
|
|
12
|
+
headers: { "X-API-Key": apiKey }
|
|
13
|
+
});
|
|
14
|
+
if (response.status === 404) return null;
|
|
15
|
+
if (!response.ok) throw new HexclaveAssertionError(`Failed to find Featurebase user by ID: ${response.statusText}`);
|
|
16
|
+
const data = await response.json();
|
|
17
|
+
const user = data.user;
|
|
18
|
+
if (!user) throw new HexclaveAssertionError(`Featurebase API returned success but no user data for ID: ${stackAuthUserId}`, { data });
|
|
19
|
+
return {
|
|
20
|
+
userId: user.externalUserId || user.userId || stackAuthUserId,
|
|
21
|
+
email: user.email,
|
|
22
|
+
name: user.name,
|
|
23
|
+
profilePicture: user.profilePicture
|
|
24
|
+
};
|
|
25
|
+
} catch (error) {
|
|
26
|
+
if (error instanceof HexclaveAssertionError) throw error;
|
|
27
|
+
throw new HexclaveAssertionError("Failed to find Featurebase user by ID", { cause: error });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Find a Featurebase user by their email address
|
|
32
|
+
*/
|
|
33
|
+
async function findFeaturebaseUserByEmail(email, apiKey) {
|
|
34
|
+
try {
|
|
35
|
+
const response = await fetch(`https://do.featurebase.app/v2/organization/identifyUser?email=${encodeURIComponent(email)}`, {
|
|
36
|
+
method: "GET",
|
|
37
|
+
headers: { "X-API-Key": apiKey }
|
|
38
|
+
});
|
|
39
|
+
if (response.status === 404) return null;
|
|
40
|
+
if (!response.ok) throw new HexclaveAssertionError(`Failed to find Featurebase user by email: ${response.statusText}`);
|
|
41
|
+
const data = await response.json();
|
|
42
|
+
const user = data.user;
|
|
43
|
+
if (!user) throw new HexclaveAssertionError(`Featurebase API returned success but no user data for email: ${email}`, { data });
|
|
44
|
+
return {
|
|
45
|
+
userId: user.externalUserId || user.userId,
|
|
46
|
+
email: user.email,
|
|
47
|
+
name: user.name,
|
|
48
|
+
profilePicture: user.profilePicture
|
|
49
|
+
};
|
|
50
|
+
} catch (error) {
|
|
51
|
+
console.error("Error finding Featurebase user by email:", error);
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Create a new Featurebase user using the identifyUser endpoint
|
|
57
|
+
*/
|
|
58
|
+
async function createFeaturebaseUser(user, apiKey) {
|
|
59
|
+
try {
|
|
60
|
+
const response = await fetch("https://do.featurebase.app/v2/organization/identifyUser", {
|
|
61
|
+
method: "POST",
|
|
62
|
+
headers: {
|
|
63
|
+
"Content-Type": "application/json",
|
|
64
|
+
"X-API-Key": apiKey
|
|
65
|
+
},
|
|
66
|
+
body: JSON.stringify({
|
|
67
|
+
userId: user.userId,
|
|
68
|
+
email: user.email,
|
|
69
|
+
name: user.name,
|
|
70
|
+
profilePicture: user.profilePicture
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
if (!response.ok) {
|
|
74
|
+
const errorData = await response.json().catch(() => ({}));
|
|
75
|
+
throw new HexclaveAssertionError(`Failed to create Featurebase user: ${errorData.error || response.statusText}`, { errorData });
|
|
76
|
+
}
|
|
77
|
+
return user;
|
|
78
|
+
} catch (error) {
|
|
79
|
+
if (error instanceof HexclaveAssertionError) throw error;
|
|
80
|
+
throw new HexclaveAssertionError("Failed to create Featurebase user", { cause: error });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Update an existing Featurebase user (excluding email)
|
|
85
|
+
*/
|
|
86
|
+
async function updateFeaturebaseUser(userId, updates, apiKey) {
|
|
87
|
+
try {
|
|
88
|
+
const response = await fetch(`https://do.featurebase.app/v2/users/${userId}`, {
|
|
89
|
+
method: "PATCH",
|
|
90
|
+
headers: {
|
|
91
|
+
"Content-Type": "application/json",
|
|
92
|
+
"X-API-Key": apiKey
|
|
93
|
+
},
|
|
94
|
+
body: JSON.stringify(updates)
|
|
95
|
+
});
|
|
96
|
+
if (!response.ok) {
|
|
97
|
+
const errorData = await response.json().catch(() => ({}));
|
|
98
|
+
throw new HexclaveAssertionError(`Failed to update Featurebase user: ${errorData.error || response.statusText}`, { errorData });
|
|
99
|
+
}
|
|
100
|
+
const data = await response.json();
|
|
101
|
+
return {
|
|
102
|
+
userId: data.userId || userId,
|
|
103
|
+
email: data.email,
|
|
104
|
+
name: data.name,
|
|
105
|
+
profilePicture: data.profilePicture
|
|
106
|
+
};
|
|
107
|
+
} catch (error) {
|
|
108
|
+
if (error instanceof HexclaveAssertionError) throw error;
|
|
109
|
+
throw new HexclaveAssertionError("Failed to update Featurebase user", { cause: error });
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Get or create a Featurebase user based on Hexclave user data.
|
|
114
|
+
* This function ensures that:
|
|
115
|
+
* 1. We never change a user's email address on Featurebase
|
|
116
|
+
* 2. We use Hexclave user ID as the primary identifier
|
|
117
|
+
* 3. We handle email conflicts by using fallback emails
|
|
118
|
+
* 4. We update profile information when needed
|
|
119
|
+
*/
|
|
120
|
+
async function getOrCreateFeaturebaseUser(stackAuthUser, options) {
|
|
121
|
+
const apiKey = options?.apiKey || getEnvVariable("STACK_FEATUREBASE_API_KEY");
|
|
122
|
+
const fallbackEmail = `${stackAuthUser.id}@featurebase-user.stack-auth-app.com`;
|
|
123
|
+
const existingById = await findFeaturebaseUserById(stackAuthUser.id, apiKey);
|
|
124
|
+
if (existingById) {
|
|
125
|
+
let ensuredEmail = existingById.email;
|
|
126
|
+
if (!ensuredEmail) try {
|
|
127
|
+
await createFeaturebaseUser({
|
|
128
|
+
userId: existingById.userId,
|
|
129
|
+
email: fallbackEmail,
|
|
130
|
+
name: stackAuthUser.displayName || void 0,
|
|
131
|
+
profilePicture: stackAuthUser.profileImageUrl || void 0
|
|
132
|
+
}, apiKey);
|
|
133
|
+
ensuredEmail = fallbackEmail;
|
|
134
|
+
} catch (e) {
|
|
135
|
+
throw new HexclaveAssertionError(`Failed to set fallback email for existing Featurebase user ${existingById.userId}`, { cause: e });
|
|
136
|
+
}
|
|
137
|
+
try {
|
|
138
|
+
const updates = {};
|
|
139
|
+
if (stackAuthUser.displayName && stackAuthUser.displayName !== existingById.name) updates.name = stackAuthUser.displayName;
|
|
140
|
+
if (stackAuthUser.profileImageUrl && stackAuthUser.profileImageUrl !== existingById.profilePicture) updates.profilePicture = stackAuthUser.profileImageUrl;
|
|
141
|
+
if (Object.keys(updates).length > 0) await updateFeaturebaseUser(existingById.userId, updates, apiKey);
|
|
142
|
+
} catch (error) {
|
|
143
|
+
console.error("Failed to update existing Featurebase user profile:", error);
|
|
144
|
+
}
|
|
145
|
+
return {
|
|
146
|
+
userId: existingById.userId,
|
|
147
|
+
email: ensuredEmail
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
const candidateEmail = stackAuthUser.primaryEmail ?? fallbackEmail;
|
|
151
|
+
const safeEmail = await findFeaturebaseUserByEmail(candidateEmail, apiKey) ? fallbackEmail : candidateEmail;
|
|
152
|
+
const created = await createFeaturebaseUser({
|
|
153
|
+
userId: stackAuthUser.id,
|
|
154
|
+
email: safeEmail,
|
|
155
|
+
name: stackAuthUser.displayName || stackAuthUser.primaryEmail?.split("@")[0] || "User",
|
|
156
|
+
profilePicture: stackAuthUser.profileImageUrl || void 0
|
|
157
|
+
}, apiKey);
|
|
158
|
+
return {
|
|
159
|
+
userId: created.userId,
|
|
160
|
+
email: created.email
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
//#endregion
|
|
165
|
+
export { getOrCreateFeaturebaseUser };
|
|
166
|
+
//# sourceMappingURL=featurebase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"featurebase.js","names":[],"sources":["../../../src/utils/featurebase.tsx"],"sourcesContent":["import { getEnvVariable } from \"./env\";\nimport { HexclaveAssertionError } from \"./errors\";\n\nexport type FeaturebaseUser = {\n userId: string,\n email: string,\n name?: string,\n profilePicture?: string,\n};\n\nexport type StackAuthUser = {\n id: string,\n primaryEmail: string | null,\n displayName?: string | null,\n profileImageUrl?: string | null,\n};\n\n/**\n * Find a Featurebase user by their Hexclave user ID\n */\nasync function findFeaturebaseUserById(stackAuthUserId: string, apiKey: string): Promise<FeaturebaseUser | null> {\n try {\n const response = await fetch(`https://do.featurebase.app/v2/organization/identifyUser?id=${stackAuthUserId}`, {\n method: 'GET',\n headers: {\n 'X-API-Key': apiKey,\n },\n });\n\n if (response.status === 404) {\n return null;\n }\n\n if (!response.ok) {\n throw new HexclaveAssertionError(`Failed to find Featurebase user by ID: ${response.statusText}`);\n }\n\n const data = await response.json();\n const user = data.user;\n\n if (!user) {\n throw new HexclaveAssertionError(`Featurebase API returned success but no user data for ID: ${stackAuthUserId}`, { data });\n }\n\n return {\n userId: user.externalUserId || user.userId || stackAuthUserId,\n email: user.email,\n name: user.name,\n profilePicture: user.profilePicture,\n };\n } catch (error) {\n if (error instanceof HexclaveAssertionError) {\n throw error;\n }\n throw new HexclaveAssertionError(\"Failed to find Featurebase user by ID\", { cause: error });\n }\n}\n\n/**\n * Find a Featurebase user by their email address\n */\nasync function findFeaturebaseUserByEmail(email: string, apiKey: string): Promise<FeaturebaseUser | null> {\n try {\n const response = await fetch(`https://do.featurebase.app/v2/organization/identifyUser?email=${encodeURIComponent(email)}`, {\n method: 'GET',\n headers: {\n 'X-API-Key': apiKey,\n },\n });\n\n if (response.status === 404) {\n return null;\n }\n\n if (!response.ok) {\n throw new HexclaveAssertionError(`Failed to find Featurebase user by email: ${response.statusText}`);\n }\n\n const data = await response.json();\n const user = data.user;\n\n if (!user) {\n throw new HexclaveAssertionError(`Featurebase API returned success but no user data for email: ${email}`, { data });\n }\n\n return {\n userId: user.externalUserId || user.userId,\n email: user.email,\n name: user.name,\n profilePicture: user.profilePicture,\n };\n } catch (error) {\n console.error('Error finding Featurebase user by email:', error);\n return null;\n }\n}\n\n/**\n * Create a new Featurebase user using the identifyUser endpoint\n */\nasync function createFeaturebaseUser(user: FeaturebaseUser, apiKey: string): Promise<FeaturebaseUser> {\n try {\n const response = await fetch('https://do.featurebase.app/v2/organization/identifyUser', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-API-Key': apiKey,\n },\n body: JSON.stringify({\n userId: user.userId,\n email: user.email,\n name: user.name,\n profilePicture: user.profilePicture,\n }),\n });\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({}));\n throw new HexclaveAssertionError(`Failed to create Featurebase user: ${errorData.error || response.statusText}`, { errorData });\n }\n\n // The identifyUser endpoint just returns { \"success\": true }, so we return the input data\n return user;\n } catch (error) {\n if (error instanceof HexclaveAssertionError) {\n throw error;\n }\n throw new HexclaveAssertionError(\"Failed to create Featurebase user\", { cause: error });\n\n }\n}\n\n/**\n * Update an existing Featurebase user (excluding email)\n */\nasync function updateFeaturebaseUser(userId: string, updates: Partial<Omit<FeaturebaseUser, 'userId' | 'email'>>, apiKey: string): Promise<FeaturebaseUser> {\n try {\n const response = await fetch(`https://do.featurebase.app/v2/users/${userId}`, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-API-Key': apiKey,\n },\n body: JSON.stringify(updates),\n });\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({}));\n throw new HexclaveAssertionError(`Failed to update Featurebase user: ${errorData.error || response.statusText}`, { errorData });\n }\n\n const data = await response.json();\n return {\n userId: data.userId || userId,\n email: data.email,\n name: data.name,\n profilePicture: data.profilePicture,\n };\n } catch (error) {\n if (error instanceof HexclaveAssertionError) {\n throw error;\n }\n throw new HexclaveAssertionError(\"Failed to update Featurebase user\", { cause: error });\n }\n}\n\n/**\n * Get or create a Featurebase user based on Hexclave user data.\n * This function ensures that:\n * 1. We never change a user's email address on Featurebase\n * 2. We use Hexclave user ID as the primary identifier\n * 3. We handle email conflicts by using fallback emails\n * 4. We update profile information when needed\n */\nexport async function getOrCreateFeaturebaseUser(\n stackAuthUser: StackAuthUser,\n options?: { apiKey?: string }\n): Promise<{ userId: string, email: string }> {\n const apiKey = options?.apiKey || getEnvVariable(\"STACK_FEATUREBASE_API_KEY\");\n const fallbackEmail = `${stackAuthUser.id}@featurebase-user.stack-auth-app.com`;\n\n // First, try to find existing user by Hexclave user ID\n const existingById = await findFeaturebaseUserById(stackAuthUser.id, apiKey);\n if (existingById) {\n // Ensure the user has an email on Featurebase.\n let ensuredEmail = existingById.email;\n if (!ensuredEmail) {\n try {\n await createFeaturebaseUser({\n userId: existingById.userId,\n email: fallbackEmail,\n name: stackAuthUser.displayName || undefined,\n profilePicture: stackAuthUser.profileImageUrl || undefined,\n }, apiKey);\n ensuredEmail = fallbackEmail;\n } catch (e) {\n // If setting fallback email failed, keep ensuredEmail as-is (undefined) and let callers handle\n throw new HexclaveAssertionError(`Failed to set fallback email for existing Featurebase user ${existingById.userId}`, { cause: e });\n }\n }\n\n // Update profile information if needed (but not email)\n try {\n const updates: Partial<Omit<FeaturebaseUser, 'userId' | 'email'>> = {};\n\n if (stackAuthUser.displayName && stackAuthUser.displayName !== existingById.name) {\n updates.name = stackAuthUser.displayName;\n }\n\n if (stackAuthUser.profileImageUrl && stackAuthUser.profileImageUrl !== existingById.profilePicture) {\n updates.profilePicture = stackAuthUser.profileImageUrl;\n }\n\n if (Object.keys(updates).length > 0) {\n await updateFeaturebaseUser(existingById.userId, updates, apiKey);\n }\n } catch (error) {\n console.error('Failed to update existing Featurebase user profile:', error);\n // Continue with existing user data even if update fails\n }\n\n return {\n userId: existingById.userId,\n email: ensuredEmail,\n };\n }\n\n // No existing user found by ID, need to create one\n const candidateEmail = stackAuthUser.primaryEmail ?? fallbackEmail;\n\n // Check if someone already has this email on Featurebase\n const existingByEmail = await findFeaturebaseUserByEmail(candidateEmail, apiKey);\n const safeEmail = existingByEmail ? fallbackEmail : candidateEmail;\n\n // Create new user\n const created = await createFeaturebaseUser({\n userId: stackAuthUser.id,\n email: safeEmail,\n name: stackAuthUser.displayName || stackAuthUser.primaryEmail?.split('@')[0] || 'User',\n profilePicture: stackAuthUser.profileImageUrl || undefined,\n }, apiKey);\n\n return {\n userId: created.userId,\n email: created.email,\n };\n}\n"],"mappings":";;;;;;;AAoBA,eAAe,wBAAwB,iBAAyB,QAAiD;AAC/G,KAAI;EACF,MAAM,WAAW,MAAM,MAAM,8DAA8D,mBAAmB;GAC5G,QAAQ;GACR,SAAS,EACP,aAAa,QACd;GACF,CAAC;AAEF,MAAI,SAAS,WAAW,IACtB,QAAO;AAGT,MAAI,CAAC,SAAS,GACZ,OAAM,IAAI,uBAAuB,0CAA0C,SAAS,aAAa;EAGnG,MAAM,OAAO,MAAM,SAAS,MAAM;EAClC,MAAM,OAAO,KAAK;AAElB,MAAI,CAAC,KACH,OAAM,IAAI,uBAAuB,6DAA6D,mBAAmB,EAAE,MAAM,CAAC;AAG5H,SAAO;GACL,QAAQ,KAAK,kBAAkB,KAAK,UAAU;GAC9C,OAAO,KAAK;GACZ,MAAM,KAAK;GACX,gBAAgB,KAAK;GACtB;UACM,OAAO;AACd,MAAI,iBAAiB,uBACnB,OAAM;AAER,QAAM,IAAI,uBAAuB,yCAAyC,EAAE,OAAO,OAAO,CAAC;;;;;;AAO/F,eAAe,2BAA2B,OAAe,QAAiD;AACxG,KAAI;EACF,MAAM,WAAW,MAAM,MAAM,iEAAiE,mBAAmB,MAAM,IAAI;GACzH,QAAQ;GACR,SAAS,EACP,aAAa,QACd;GACF,CAAC;AAEF,MAAI,SAAS,WAAW,IACtB,QAAO;AAGT,MAAI,CAAC,SAAS,GACZ,OAAM,IAAI,uBAAuB,6CAA6C,SAAS,aAAa;EAGtG,MAAM,OAAO,MAAM,SAAS,MAAM;EAClC,MAAM,OAAO,KAAK;AAElB,MAAI,CAAC,KACH,OAAM,IAAI,uBAAuB,gEAAgE,SAAS,EAAE,MAAM,CAAC;AAGrH,SAAO;GACL,QAAQ,KAAK,kBAAkB,KAAK;GACpC,OAAO,KAAK;GACZ,MAAM,KAAK;GACX,gBAAgB,KAAK;GACtB;UACM,OAAO;AACd,UAAQ,MAAM,4CAA4C,MAAM;AAChE,SAAO;;;;;;AAOX,eAAe,sBAAsB,MAAuB,QAA0C;AACpG,KAAI;EACF,MAAM,WAAW,MAAM,MAAM,2DAA2D;GACtF,QAAQ;GACR,SAAS;IACP,gBAAgB;IAChB,aAAa;IACd;GACD,MAAM,KAAK,UAAU;IACnB,QAAQ,KAAK;IACb,OAAO,KAAK;IACZ,MAAM,KAAK;IACX,gBAAgB,KAAK;IACtB,CAAC;GACH,CAAC;AAEF,MAAI,CAAC,SAAS,IAAI;GAChB,MAAM,YAAY,MAAM,SAAS,MAAM,CAAC,aAAa,EAAE,EAAE;AACzD,SAAM,IAAI,uBAAuB,sCAAsC,UAAU,SAAS,SAAS,cAAc,EAAE,WAAW,CAAC;;AAIjI,SAAO;UACA,OAAO;AACd,MAAI,iBAAiB,uBACnB,OAAM;AAER,QAAM,IAAI,uBAAuB,qCAAqC,EAAE,OAAO,OAAO,CAAC;;;;;;AAQ3F,eAAe,sBAAsB,QAAgB,SAA6D,QAA0C;AAC1J,KAAI;EACF,MAAM,WAAW,MAAM,MAAM,uCAAuC,UAAU;GAC5E,QAAQ;GACR,SAAS;IACP,gBAAgB;IAChB,aAAa;IACd;GACD,MAAM,KAAK,UAAU,QAAQ;GAC9B,CAAC;AAEF,MAAI,CAAC,SAAS,IAAI;GAChB,MAAM,YAAY,MAAM,SAAS,MAAM,CAAC,aAAa,EAAE,EAAE;AACzD,SAAM,IAAI,uBAAuB,sCAAsC,UAAU,SAAS,SAAS,cAAc,EAAE,WAAW,CAAC;;EAGjI,MAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SAAO;GACL,QAAQ,KAAK,UAAU;GACvB,OAAO,KAAK;GACZ,MAAM,KAAK;GACX,gBAAgB,KAAK;GACtB;UACM,OAAO;AACd,MAAI,iBAAiB,uBACnB,OAAM;AAER,QAAM,IAAI,uBAAuB,qCAAqC,EAAE,OAAO,OAAO,CAAC;;;;;;;;;;;AAY3F,eAAsB,2BACpB,eACA,SAC4C;CAC5C,MAAM,SAAS,SAAS,UAAU,eAAe,4BAA4B;CAC7E,MAAM,gBAAgB,GAAG,cAAc,GAAG;CAG1C,MAAM,eAAe,MAAM,wBAAwB,cAAc,IAAI,OAAO;AAC5E,KAAI,cAAc;EAEhB,IAAI,eAAe,aAAa;AAChC,MAAI,CAAC,aACH,KAAI;AACF,SAAM,sBAAsB;IAC1B,QAAQ,aAAa;IACrB,OAAO;IACP,MAAM,cAAc,eAAe;IACnC,gBAAgB,cAAc,mBAAmB;IAClD,EAAE,OAAO;AACV,kBAAe;WACR,GAAG;AAEV,SAAM,IAAI,uBAAuB,8DAA8D,aAAa,UAAU,EAAE,OAAO,GAAG,CAAC;;AAKvI,MAAI;GACF,MAAM,UAA8D,EAAE;AAEtE,OAAI,cAAc,eAAe,cAAc,gBAAgB,aAAa,KAC1E,SAAQ,OAAO,cAAc;AAG/B,OAAI,cAAc,mBAAmB,cAAc,oBAAoB,aAAa,eAClF,SAAQ,iBAAiB,cAAc;AAGzC,OAAI,OAAO,KAAK,QAAQ,CAAC,SAAS,EAChC,OAAM,sBAAsB,aAAa,QAAQ,SAAS,OAAO;WAE5D,OAAO;AACd,WAAQ,MAAM,uDAAuD,MAAM;;AAI7E,SAAO;GACL,QAAQ,aAAa;GACrB,OAAO;GACR;;CAIH,MAAM,iBAAiB,cAAc,gBAAgB;CAIrD,MAAM,YADkB,MAAM,2BAA2B,gBAAgB,OAAO,GAC5C,gBAAgB;CAGpD,MAAM,UAAU,MAAM,sBAAsB;EAC1C,QAAQ,cAAc;EACtB,OAAO;EACP,MAAM,cAAc,eAAe,cAAc,cAAc,MAAM,IAAI,CAAC,MAAM;EAChF,gBAAgB,cAAc,mBAAmB;EAClD,EAAE,OAAO;AAEV,QAAO;EACL,QAAQ,QAAQ;EAChB,OAAO,QAAQ;EAChB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/utils/fs.d.ts
|
|
2
|
+
declare function list(path: string): Promise<string[]>;
|
|
3
|
+
declare function listRecursively(p: string, options?: {
|
|
4
|
+
excludeDirectories?: boolean;
|
|
5
|
+
}): Promise<string[]>;
|
|
6
|
+
declare function writeFileSyncIfChanged(path: string, content: string): void;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { list, listRecursively, writeFileSyncIfChanged };
|
|
9
|
+
//# sourceMappingURL=fs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs.d.ts","names":[],"sources":["../../../src/utils/fs.tsx"],"mappings":";iBAGsB,IAAA,CAAK,IAAA,WAAY,OAAA;AAAA,iBAIjB,eAAA,CAAgB,CAAA,UAAW,OAAA;EAAW,kBAAA;AAAA,IAAsC,OAAA;AAAA,iBAiBlF,sBAAA,CAAuB,IAAA,UAAc,OAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as stackFs from "fs";
|
|
2
|
+
import * as path$1 from "path";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/fs.tsx
|
|
5
|
+
async function list(path) {
|
|
6
|
+
return await stackFs.promises.readdir(path);
|
|
7
|
+
}
|
|
8
|
+
async function listRecursively(p, options = {}) {
|
|
9
|
+
const files = await list(p);
|
|
10
|
+
return [...(await Promise.all(files.map(async (fileName) => {
|
|
11
|
+
const filePath = path$1.join(p, fileName);
|
|
12
|
+
if ((await stackFs.promises.stat(filePath)).isDirectory()) return [...await listRecursively(filePath, options), ...options.excludeDirectories ? [] : [filePath]];
|
|
13
|
+
else return [filePath];
|
|
14
|
+
}))).flat()];
|
|
15
|
+
}
|
|
16
|
+
function writeFileSyncIfChanged(path, content) {
|
|
17
|
+
if (stackFs.existsSync(path)) {
|
|
18
|
+
if (stackFs.readFileSync(path, "utf-8") === content) return;
|
|
19
|
+
}
|
|
20
|
+
stackFs.writeFileSync(path, content);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { list, listRecursively, writeFileSyncIfChanged };
|
|
25
|
+
//# sourceMappingURL=fs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs.js","names":["path"],"sources":["../../../src/utils/fs.tsx"],"sourcesContent":["import * as stackFs from \"fs\";\nimport * as path from \"path\";\n\nexport async function list(path: string) {\n return await stackFs.promises.readdir(path);\n}\n\nexport async function listRecursively(p: string, options: { excludeDirectories?: boolean } = {}): Promise<string[]> {\n const files = await list(p);\n return [\n ...(await Promise.all(files.map(async (fileName) => {\n const filePath = path.join(p, fileName);\n if ((await stackFs.promises.stat(filePath)).isDirectory()) {\n return [\n ...(await listRecursively(filePath, options)),\n ...(options.excludeDirectories ? [] : [filePath]),\n ];\n } else {\n return [filePath];\n }\n }))).flat(),\n ];\n}\n\nexport function writeFileSyncIfChanged(path: string, content: string): void {\n if (stackFs.existsSync(path)) {\n const existingContent = stackFs.readFileSync(path, \"utf-8\");\n if (existingContent === content) {\n return;\n }\n }\n stackFs.writeFileSync(path, content);\n}\n"],"mappings":";;;;AAGA,eAAsB,KAAK,MAAc;AACvC,QAAO,MAAM,QAAQ,SAAS,QAAQ,KAAK;;AAG7C,eAAsB,gBAAgB,GAAW,UAA4C,EAAE,EAAqB;CAClH,MAAM,QAAQ,MAAM,KAAK,EAAE;AAC3B,QAAO,CACL,IAAI,MAAM,QAAQ,IAAI,MAAM,IAAI,OAAO,aAAa;EAClD,MAAM,WAAWA,OAAK,KAAK,GAAG,SAAS;AACvC,OAAK,MAAM,QAAQ,SAAS,KAAK,SAAS,EAAE,aAAa,CACvD,QAAO,CACL,GAAI,MAAM,gBAAgB,UAAU,QAAQ,EAC5C,GAAI,QAAQ,qBAAqB,EAAE,GAAG,CAAC,SAAS,CACjD;MAED,QAAO,CAAC,SAAS;GAEnB,CAAC,EAAE,MAAM,CACZ;;AAGH,SAAgB,uBAAuB,MAAc,SAAuB;AAC1E,KAAI,QAAQ,WAAW,KAAK,EAE1B;MADwB,QAAQ,aAAa,MAAM,QAAQ,KACnC,QACtB;;AAGJ,SAAQ,cAAc,MAAM,QAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.d.ts","names":[],"sources":["../../../src/utils/functions.tsx"],"mappings":";iBAAgB,QAAA,GAAA,CAAY,CAAA,EAAG,CAAA,GAAI,CAAA;AAAA,iBAYnB,YAAA,iBAAA,CAAA,GAAiC,IAAA,EAAM,CAAA,GAAI,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region src/utils/functions.tsx
|
|
2
|
+
function identity(t) {
|
|
3
|
+
return t;
|
|
4
|
+
}
|
|
5
|
+
(void 0)?.test("identity", ({ expect }) => {
|
|
6
|
+
expect(identity(1)).toBe(1);
|
|
7
|
+
expect(identity("test")).toBe("test");
|
|
8
|
+
expect(identity(null)).toBe(null);
|
|
9
|
+
expect(identity(void 0)).toBe(void 0);
|
|
10
|
+
const obj = { a: 1 };
|
|
11
|
+
expect(identity(obj)).toBe(obj);
|
|
12
|
+
});
|
|
13
|
+
function identityArgs(...args) {
|
|
14
|
+
return args;
|
|
15
|
+
}
|
|
16
|
+
(void 0)?.test("identityArgs", ({ expect }) => {
|
|
17
|
+
expect(identityArgs()).toEqual([]);
|
|
18
|
+
expect(identityArgs(1)).toEqual([1]);
|
|
19
|
+
expect(identityArgs(1, 2, 3)).toEqual([
|
|
20
|
+
1,
|
|
21
|
+
2,
|
|
22
|
+
3
|
|
23
|
+
]);
|
|
24
|
+
expect(identityArgs("a", "b", "c")).toEqual([
|
|
25
|
+
"a",
|
|
26
|
+
"b",
|
|
27
|
+
"c"
|
|
28
|
+
]);
|
|
29
|
+
expect(identityArgs(null, void 0)).toEqual([null, void 0]);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { identity, identityArgs };
|
|
34
|
+
//# sourceMappingURL=functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.js","names":[],"sources":["../../../src/utils/functions.tsx"],"sourcesContent":["export function identity<T>(t: T): T {\n return t;\n}\nimport.meta.vitest?.test(\"identity\", ({ expect }) => {\n expect(identity(1)).toBe(1);\n expect(identity(\"test\")).toBe(\"test\");\n expect(identity(null)).toBe(null);\n expect(identity(undefined)).toBe(undefined);\n const obj = { a: 1 };\n expect(identity(obj)).toBe(obj);\n});\n\nexport function identityArgs<T extends any[]>(...args: T): T {\n return args;\n}\nimport.meta.vitest?.test(\"identityArgs\", ({ expect }) => {\n expect(identityArgs()).toEqual([]);\n expect(identityArgs(1)).toEqual([1]);\n expect(identityArgs(1, 2, 3)).toEqual([1, 2, 3]);\n expect(identityArgs(\"a\", \"b\", \"c\")).toEqual([\"a\", \"b\", \"c\"]);\n expect(identityArgs(null, undefined)).toEqual([null, undefined]);\n});\n"],"mappings":";AAAA,SAAgB,SAAY,GAAS;AACnC,QAAO;;CAET,SAAW,KAAC,aAAc,EAAA,aAAc;AACtC,QAAO,SAAS,EAAE,CAAC,CAAC,KAAK,EAAE;AAC3B,QAAO,SAAS,OAAO,CAAC,CAAC,KAAK,OAAO;AACrC,QAAO,SAAS,KAAK,CAAC,CAAC,KAAK,KAAK;AACjC,QAAO,SAAS,OAAU,CAAC,CAAC,KAAK,OAAU;CAC3C,MAAM,MAAM,EAAE,GAAG,GAAG;AACpB,QAAO,SAAS,IAAI,CAAC,CAAC,KAAK,IAAI;EAC/B;AAEF,SAAgB,aAA8B,GAAG,MAAY;AAC3D,QAAO;;CAET,SAAW,KAAC,iBAAc,EAAA,aAAkB;AAC1C,QAAO,cAAc,CAAC,CAAC,QAAQ,EAAE,CAAC;AAClC,QAAO,aAAa,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;AACpC,QAAO,aAAa,GAAG,GAAG,EAAE,CAAC,CAAC,QAAQ;EAAC;EAAG;EAAG;EAAE,CAAC;AAChD,QAAO,aAAa,KAAK,KAAK,IAAI,CAAC,CAAC,QAAQ;EAAC;EAAK;EAAK;EAAI,CAAC;AAC5D,QAAO,aAAa,MAAM,OAAU,CAAC,CAAC,QAAQ,CAAC,MAAM,OAAU,CAAC;EAChE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as yup$1 from "yup";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/geo.d.ts
|
|
4
|
+
declare const geoInfoSchema: yup$1.ObjectSchema<{
|
|
5
|
+
ip: string;
|
|
6
|
+
countryCode: string | null | undefined;
|
|
7
|
+
regionCode: string | null | undefined;
|
|
8
|
+
cityName: string | null | undefined;
|
|
9
|
+
latitude: number | null | undefined;
|
|
10
|
+
longitude: number | null | undefined;
|
|
11
|
+
tzIdentifier: string | null | undefined;
|
|
12
|
+
}, yup$1.AnyObject, {
|
|
13
|
+
ip: undefined;
|
|
14
|
+
countryCode: undefined;
|
|
15
|
+
regionCode: undefined;
|
|
16
|
+
cityName: undefined;
|
|
17
|
+
latitude: undefined;
|
|
18
|
+
longitude: undefined;
|
|
19
|
+
tzIdentifier: undefined;
|
|
20
|
+
}, "">;
|
|
21
|
+
type GeoInfo = yup$1.InferType<typeof geoInfoSchema>;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { GeoInfo, geoInfoSchema };
|
|
24
|
+
//# sourceMappingURL=geo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geo.d.ts","names":[],"sources":["../../../src/utils/geo.tsx"],"mappings":";;;cAIa,aAAA,EAAa,KAAA,CAAA,YAAA;;;;;;;;GAQxB,KAAA,CAAA,SAAA;;;;;;;;;KAEU,OAAA,GAAU,KAAA,CAAI,SAAA,QAAiB,aAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { yupNumber, yupObject, yupString } from "../schema-fields.js";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/geo.tsx
|
|
4
|
+
const geoInfoSchema = yupObject({
|
|
5
|
+
ip: yupString().defined(),
|
|
6
|
+
countryCode: yupString().nullable(),
|
|
7
|
+
regionCode: yupString().nullable(),
|
|
8
|
+
cityName: yupString().nullable(),
|
|
9
|
+
latitude: yupNumber().nullable(),
|
|
10
|
+
longitude: yupNumber().nullable(),
|
|
11
|
+
tzIdentifier: yupString().nullable()
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { geoInfoSchema };
|
|
16
|
+
//# sourceMappingURL=geo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geo.js","names":[],"sources":["../../../src/utils/geo.tsx"],"sourcesContent":["\nimport * as yup from \"yup\";\nimport { yupNumber, yupObject, yupString } from \"../schema-fields\";\n\nexport const geoInfoSchema = yupObject({\n ip: yupString().defined(),\n countryCode: yupString().nullable(),\n regionCode: yupString().nullable(),\n cityName: yupString().nullable(),\n latitude: yupNumber().nullable(),\n longitude: yupNumber().nullable(),\n tzIdentifier: yupString().nullable(),\n});\n\nexport type GeoInfo = yup.InferType<typeof geoInfoSchema>;\n\n"],"mappings":";;;AAIA,MAAa,gBAAgB,UAAU;CACrC,IAAI,WAAW,CAAC,SAAS;CACzB,aAAa,WAAW,CAAC,UAAU;CACnC,YAAY,WAAW,CAAC,UAAU;CAClC,UAAU,WAAW,CAAC,UAAU;CAChC,UAAU,WAAW,CAAC,UAAU;CAChC,WAAW,WAAW,CAAC,UAAU;CACjC,cAAc,WAAW,CAAC,UAAU;CACrC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/utils/globals.d.ts
|
|
2
|
+
declare const globalVar: any;
|
|
3
|
+
declare function createGlobal<T>(key: string, init: () => T): T;
|
|
4
|
+
/**
|
|
5
|
+
* Like createGlobal, but if the asynchronous initialization fails, the global will be reset and recomputed on the next
|
|
6
|
+
* invocation.
|
|
7
|
+
*/
|
|
8
|
+
declare function createGlobalAsync<T>(key: string, init: () => Promise<T>): Promise<T>;
|
|
9
|
+
declare function getGlobal(key: string): any;
|
|
10
|
+
declare function setGlobal(key: string, value: any): void;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { createGlobal, createGlobalAsync, getGlobal, globalVar, setGlobal };
|
|
13
|
+
//# sourceMappingURL=globals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globals.d.ts","names":[],"sources":["../../../src/utils/globals.tsx"],"mappings":";cAAM,SAAA;AAAA,iBAkBU,YAAA,GAAA,CAAgB,GAAA,UAAa,IAAA,QAAY,CAAA,GAIV,CAAA;;;;AAJ/C;iBAWgB,iBAAA,GAAA,CAAqB,GAAA,UAAa,IAAA,QAAY,OAAA,CAAQ,CAAA,IAAK,OAAA,CAAQ,CAAA;AAAA,iBAYnE,SAAA,CAAU,GAAA;AAAA,iBAIV,SAAA,CAAU,GAAA,UAAa,KAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region src/utils/globals.tsx
|
|
2
|
+
const globalVar = typeof globalThis !== "undefined" ? globalThis : typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {};
|
|
3
|
+
if (typeof globalThis === "undefined") globalVar.globalThis = globalVar;
|
|
4
|
+
const stackGlobalsSymbol = Symbol.for("__hexclave-globals");
|
|
5
|
+
globalVar[stackGlobalsSymbol] ??= {};
|
|
6
|
+
function createGlobal(key, init) {
|
|
7
|
+
if (!globalVar[stackGlobalsSymbol][key]) globalVar[stackGlobalsSymbol][key] = init();
|
|
8
|
+
return globalVar[stackGlobalsSymbol][key];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Like createGlobal, but if the asynchronous initialization fails, the global will be reset and recomputed on the next
|
|
12
|
+
* invocation.
|
|
13
|
+
*/
|
|
14
|
+
function createGlobalAsync(key, init) {
|
|
15
|
+
let promise = null;
|
|
16
|
+
if (!globalVar[stackGlobalsSymbol][key]) {
|
|
17
|
+
promise = init().catch((e) => {
|
|
18
|
+
delete globalVar[stackGlobalsSymbol][key];
|
|
19
|
+
throw e;
|
|
20
|
+
});
|
|
21
|
+
globalVar[stackGlobalsSymbol][key] = promise;
|
|
22
|
+
}
|
|
23
|
+
return promise ?? globalVar[stackGlobalsSymbol][key];
|
|
24
|
+
}
|
|
25
|
+
function getGlobal(key) {
|
|
26
|
+
return globalVar[stackGlobalsSymbol][key];
|
|
27
|
+
}
|
|
28
|
+
function setGlobal(key, value) {
|
|
29
|
+
globalVar[stackGlobalsSymbol][key] = value;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { createGlobal, createGlobalAsync, getGlobal, globalVar, setGlobal };
|
|
34
|
+
//# sourceMappingURL=globals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globals.js","names":[],"sources":["../../../src/utils/globals.tsx"],"sourcesContent":["const globalVar: any =\n typeof globalThis !== 'undefined' ? globalThis :\n typeof global !== 'undefined' ? global :\n typeof window !== 'undefined' ? window :\n typeof self !== 'undefined' ? self :\n {};\nexport {\n globalVar\n};\n\nif (typeof globalThis === 'undefined') {\n (globalVar as any).globalThis = globalVar;\n}\n\n// Hexclave rebrand: file-private symbol key, renamed outright (no cross-version compat needed).\nconst stackGlobalsSymbol = Symbol.for('__hexclave-globals');\nglobalVar[stackGlobalsSymbol] ??= {};\n\nexport function createGlobal<T>(key: string, init: () => T) {\n if (!globalVar[stackGlobalsSymbol][key]) {\n globalVar[stackGlobalsSymbol][key] = init();\n }\n return globalVar[stackGlobalsSymbol][key] as T;\n}\n\n/**\n * Like createGlobal, but if the asynchronous initialization fails, the global will be reset and recomputed on the next\n * invocation.\n */\nexport function createGlobalAsync<T>(key: string, init: () => Promise<T>): Promise<T> {\n let promise: Promise<T> | null = null;\n if (!globalVar[stackGlobalsSymbol][key]) {\n promise = init().catch((e) => {\n delete globalVar[stackGlobalsSymbol][key];\n throw e;\n });\n globalVar[stackGlobalsSymbol][key] = promise;\n }\n return promise ?? globalVar[stackGlobalsSymbol][key] as Promise<T>;\n}\n\nexport function getGlobal(key: string): any {\n return globalVar[stackGlobalsSymbol][key];\n}\n\nexport function setGlobal(key: string, value: any) {\n globalVar[stackGlobalsSymbol][key] = value;\n}\n"],"mappings":";AAAA,MAAM,YACJ,OAAO,eAAe,cAAc,aAClC,OAAO,WAAW,cAAc,SAC9B,OAAO,WAAW,cAAc,SAC9B,OAAO,SAAS,cAAc,OAC5B,EAAE;AAKZ,IAAI,OAAO,eAAe,YACxB,CAAC,UAAkB,aAAa;AAIlC,MAAM,qBAAqB,OAAO,IAAI,qBAAqB;AAC3D,UAAU,wBAAwB,EAAE;AAEpC,SAAgB,aAAgB,KAAa,MAAe;AAC1D,KAAI,CAAC,UAAU,oBAAoB,KACjC,WAAU,oBAAoB,OAAO,MAAM;AAE7C,QAAO,UAAU,oBAAoB;;;;;;AAOvC,SAAgB,kBAAqB,KAAa,MAAoC;CACpF,IAAI,UAA6B;AACjC,KAAI,CAAC,UAAU,oBAAoB,MAAM;AACvC,YAAU,MAAM,CAAC,OAAO,MAAM;AAC5B,UAAO,UAAU,oBAAoB;AACrC,SAAM;IACN;AACF,YAAU,oBAAoB,OAAO;;AAEvC,QAAO,WAAW,UAAU,oBAAoB;;AAGlD,SAAgB,UAAU,KAAkB;AAC1C,QAAO,UAAU,oBAAoB;;AAGvC,SAAgB,UAAU,KAAa,OAAY;AACjD,WAAU,oBAAoB,OAAO"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/utils/hashes.d.ts
|
|
2
|
+
declare function sha512(input: Uint8Array | string): Promise<Uint8Array>;
|
|
3
|
+
declare function hashPassword(password: string): Promise<string>;
|
|
4
|
+
declare function comparePassword(password: string, hash: string): Promise<boolean>;
|
|
5
|
+
declare function isPasswordHashValid(hash: string): Promise<boolean>;
|
|
6
|
+
declare function getPasswordHashAlgorithm(hash: string): Promise<"bcrypt" | undefined>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { comparePassword, getPasswordHashAlgorithm, hashPassword, isPasswordHashValid, sha512 };
|
|
9
|
+
//# sourceMappingURL=hashes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashes.d.ts","names":[],"sources":["../../../src/utils/hashes.tsx"],"mappings":";iBAIsB,MAAA,CAAO,KAAA,EAAO,UAAA,YAAsB,OAAA,CAAQ,UAAA;AAAA,iBAK5C,YAAA,CAAa,QAAA,WAAgB,OAAA;AAAA,iBAS7B,eAAA,CAAgB,QAAA,UAAkB,IAAA,WAAe,OAAA;AAAA,iBAWjD,mBAAA,CAAoB,IAAA,WAAY,OAAA;AAAA,iBAIhC,wBAAA,CAAyB,IAAA,WAAe,OAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { HexclaveAssertionError } from "./errors.js";
|
|
2
|
+
import { toArrayBufferBacked } from "./typed-arrays.js";
|
|
3
|
+
import bcrypt from "bcryptjs";
|
|
4
|
+
|
|
5
|
+
//#region src/utils/hashes.tsx
|
|
6
|
+
async function sha512(input) {
|
|
7
|
+
const bytes = typeof input === "string" ? new TextEncoder().encode(input) : toArrayBufferBacked(input);
|
|
8
|
+
return new Uint8Array(await crypto.subtle.digest("SHA-512", bytes));
|
|
9
|
+
}
|
|
10
|
+
async function hashPassword(password) {
|
|
11
|
+
const passwordBytes = new TextEncoder().encode(password);
|
|
12
|
+
if (passwordBytes.length >= 72) throw new HexclaveAssertionError(`Password is too long for bcrypt`, { len: passwordBytes.length });
|
|
13
|
+
const salt = await bcrypt.genSalt(10);
|
|
14
|
+
return await bcrypt.hash(password, salt);
|
|
15
|
+
}
|
|
16
|
+
async function comparePassword(password, hash) {
|
|
17
|
+
switch (await getPasswordHashAlgorithm(hash)) {
|
|
18
|
+
case "bcrypt": return await bcrypt.compare(password, hash);
|
|
19
|
+
default: return false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async function isPasswordHashValid(hash) {
|
|
23
|
+
return !!await getPasswordHashAlgorithm(hash);
|
|
24
|
+
}
|
|
25
|
+
async function getPasswordHashAlgorithm(hash) {
|
|
26
|
+
if (typeof hash !== "string") throw new HexclaveAssertionError(`Passed non-string value to getPasswordHashAlgorithm`, { hash });
|
|
27
|
+
if (hash.match(/^\$2[ayb]\$.{56}$/)) try {
|
|
28
|
+
if (bcrypt.getRounds(hash) > 16) return;
|
|
29
|
+
await bcrypt.compare("any string", hash);
|
|
30
|
+
return "bcrypt";
|
|
31
|
+
} catch (e) {
|
|
32
|
+
console.warn(`Error while checking bcrypt password hash. Assuming the hash is invalid`, e);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
else return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
export { comparePassword, getPasswordHashAlgorithm, hashPassword, isPasswordHashValid, sha512 };
|
|
40
|
+
//# sourceMappingURL=hashes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashes.js","names":[],"sources":["../../../src/utils/hashes.tsx"],"sourcesContent":["import bcrypt from 'bcryptjs';\nimport { HexclaveAssertionError } from './errors';\nimport { toArrayBufferBacked } from './typed-arrays';\n\nexport async function sha512(input: Uint8Array | string): Promise<Uint8Array> {\n const bytes = typeof input === \"string\" ? new TextEncoder().encode(input) : toArrayBufferBacked(input);\n return new Uint8Array(await crypto.subtle.digest(\"SHA-512\", bytes));\n}\n\nexport async function hashPassword(password: string) {\n const passwordBytes = new TextEncoder().encode(password);\n if (passwordBytes.length >= 72) {\n throw new HexclaveAssertionError(`Password is too long for bcrypt`, { len: passwordBytes.length });\n }\n const salt = await bcrypt.genSalt(10);\n return await bcrypt.hash(password, salt);\n}\n\nexport async function comparePassword(password: string, hash: string): Promise<boolean> {\n switch (await getPasswordHashAlgorithm(hash)) {\n case \"bcrypt\": {\n return await bcrypt.compare(password, hash);\n }\n default: {\n return false;\n }\n }\n}\n\nexport async function isPasswordHashValid(hash: string) {\n return !!(await getPasswordHashAlgorithm(hash));\n}\n\nexport async function getPasswordHashAlgorithm(hash: string): Promise<\"bcrypt\" | undefined> {\n if (typeof hash !== \"string\") {\n throw new HexclaveAssertionError(`Passed non-string value to getPasswordHashAlgorithm`, { hash });\n }\n if (hash.match(/^\\$2[ayb]\\$.{56}$/)) {\n try {\n if (bcrypt.getRounds(hash) > 16) {\n return undefined;\n }\n await bcrypt.compare(\"any string\", hash);\n return \"bcrypt\";\n } catch (e) {\n console.warn(`Error while checking bcrypt password hash. Assuming the hash is invalid`, e);\n return undefined;\n }\n } else {\n return undefined;\n }\n}\n"],"mappings":";;;;;AAIA,eAAsB,OAAO,OAAiD;CAC5E,MAAM,QAAQ,OAAO,UAAU,WAAW,IAAI,aAAa,CAAC,OAAO,MAAM,GAAG,oBAAoB,MAAM;AACtG,QAAO,IAAI,WAAW,MAAM,OAAO,OAAO,OAAO,WAAW,MAAM,CAAC;;AAGrE,eAAsB,aAAa,UAAkB;CACnD,MAAM,gBAAgB,IAAI,aAAa,CAAC,OAAO,SAAS;AACxD,KAAI,cAAc,UAAU,GAC1B,OAAM,IAAI,uBAAuB,mCAAmC,EAAE,KAAK,cAAc,QAAQ,CAAC;CAEpG,MAAM,OAAO,MAAM,OAAO,QAAQ,GAAG;AACrC,QAAO,MAAM,OAAO,KAAK,UAAU,KAAK;;AAG1C,eAAsB,gBAAgB,UAAkB,MAAgC;AACtF,SAAQ,MAAM,yBAAyB,KAAK,EAA5C;EACE,KAAK,SACH,QAAO,MAAM,OAAO,QAAQ,UAAU,KAAK;EAE7C,QACE,QAAO;;;AAKb,eAAsB,oBAAoB,MAAc;AACtD,QAAO,CAAC,CAAE,MAAM,yBAAyB,KAAK;;AAGhD,eAAsB,yBAAyB,MAA6C;AAC1F,KAAI,OAAO,SAAS,SAClB,OAAM,IAAI,uBAAuB,uDAAuD,EAAE,MAAM,CAAC;AAEnG,KAAI,KAAK,MAAM,oBAAoB,CACjC,KAAI;AACF,MAAI,OAAO,UAAU,KAAK,GAAG,GAC3B;AAEF,QAAM,OAAO,QAAQ,cAAc,KAAK;AACxC,SAAO;UACA,GAAG;AACV,UAAQ,KAAK,2EAA2E,EAAE;AAC1F;;KAGF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/utils/html.d.ts
|
|
2
|
+
declare function escapeHtml(unsafe: string): string;
|
|
3
|
+
declare function html(strings: TemplateStringsArray, ...values: any[]): string;
|
|
4
|
+
declare function htmlToText(untrustedHtml: string): string;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { escapeHtml, html, htmlToText };
|
|
7
|
+
//# sourceMappingURL=html.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html.d.ts","names":[],"sources":["../../../src/utils/html.tsx"],"mappings":";iBAEgB,UAAA,CAAW,MAAA;AAAA,iBA2BX,IAAA,CAAK,OAAA,EAAS,oBAAA,KAAyB,MAAA;AAAA,iBAwBvC,UAAA,CAAW,aAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { templateIdentity } from "./strings.js";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/html.tsx
|
|
4
|
+
function escapeHtml(unsafe) {
|
|
5
|
+
return `${unsafe}`.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
6
|
+
}
|
|
7
|
+
(void 0)?.test("escapeHtml", ({ expect }) => {
|
|
8
|
+
expect(escapeHtml("")).toBe("");
|
|
9
|
+
expect(escapeHtml("hello world")).toBe("hello world");
|
|
10
|
+
expect(escapeHtml("<div>")).toBe("<div>");
|
|
11
|
+
expect(escapeHtml("a & b")).toBe("a & b");
|
|
12
|
+
expect(escapeHtml("a \"quoted\" string")).toBe("a "quoted" string");
|
|
13
|
+
expect(escapeHtml("it's a test")).toBe("it's a test");
|
|
14
|
+
expect(escapeHtml("<a href=\"test\">It's a link</a>")).toBe("<a href="test">It's a link</a>");
|
|
15
|
+
});
|
|
16
|
+
function html(strings, ...values) {
|
|
17
|
+
return templateIdentity(strings, ...values.map((v) => escapeHtml(`${v}`)));
|
|
18
|
+
}
|
|
19
|
+
(void 0)?.test("html", ({ expect }) => {
|
|
20
|
+
expect(html`simple string`).toBe("simple string");
|
|
21
|
+
expect(html`Hello, ${"world"}!`).toBe("Hello, world!");
|
|
22
|
+
expect(html`Count: ${42}`).toBe("Count: 42");
|
|
23
|
+
expect(html`<div>${"<script>"}</div>`).toBe("<div><script></div>");
|
|
24
|
+
expect(html`${1} + ${2} = ${"<3"}`).toBe("1 + 2 = <3");
|
|
25
|
+
expect(html`Object: ${{ toString: () => "<object>" }}`).toBe("Object: <object>");
|
|
26
|
+
});
|
|
27
|
+
function htmlToText(untrustedHtml) {
|
|
28
|
+
return new DOMParser().parseFromString(untrustedHtml, "text/html").body.textContent;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { escapeHtml, html, htmlToText };
|
|
33
|
+
//# sourceMappingURL=html.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html.js","names":[],"sources":["../../../src/utils/html.tsx"],"sourcesContent":["import { templateIdentity } from \"./strings\";\n\nexport function escapeHtml(unsafe: string): string {\n return `${unsafe}`\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, \""\")\n .replace(/'/g, \"'\");\n}\nimport.meta.vitest?.test(\"escapeHtml\", ({ expect }) => {\n // Test with empty string\n expect(escapeHtml(\"\")).toBe(\"\");\n\n // Test with string without special characters\n expect(escapeHtml(\"hello world\")).toBe(\"hello world\");\n\n // Test with special characters\n expect(escapeHtml(\"<div>\")).toBe(\"<div>\");\n expect(escapeHtml(\"a & b\")).toBe(\"a & b\");\n expect(escapeHtml('a \"quoted\" string')).toBe(\"a "quoted" string\");\n expect(escapeHtml(\"it's a test\")).toBe(\"it's a test\");\n\n // Test with multiple special characters\n expect(escapeHtml(\"<a href=\\\"test\\\">It's a link</a>\")).toBe(\n \"<a href="test">It's a link</a>\"\n );\n});\n\nexport function html(strings: TemplateStringsArray, ...values: any[]): string {\n return templateIdentity(strings, ...values.map(v => escapeHtml(`${v}`)));\n}\nimport.meta.vitest?.test(\"html\", ({ expect }) => {\n // Test with no interpolation\n expect(html`simple string`).toBe(\"simple string\");\n\n // Test with string interpolation\n expect(html`Hello, ${\"world\"}!`).toBe(\"Hello, world!\");\n\n // Test with number interpolation\n expect(html`Count: ${42}`).toBe(\"Count: 42\");\n\n // Test with HTML special characters in interpolated values\n expect(html`<div>${\"<script>\"}</div>`).toBe(\"<div><script></div>\");\n\n // Test with multiple interpolations\n expect(html`${1} + ${2} = ${\"<3\"}`).toBe(\"1 + 2 = <3\");\n\n // Test with object interpolation\n const obj = { toString: () => \"<object>\" };\n expect(html`Object: ${obj}`).toBe(\"Object: <object>\");\n});\n\nexport function htmlToText(untrustedHtml: string): string {\n\n const doc = new DOMParser().parseFromString(untrustedHtml, 'text/html');\n\n return doc.body.textContent;\n\n}\n"],"mappings":";;;AAEA,SAAgB,WAAW,QAAwB;AACjD,QAAO,GAAG,SACP,QAAQ,MAAM,QAAO,CACrB,QAAQ,MAAM,OAAM,CACpB,QAAQ,MAAM,OAAM,CACpB,QAAQ,MAAM,SAAQ,CACtB,QAAQ,MAAM,SAAS;;CAE5B,SAAW,KAAC,eAAc,EAAA,aAAgB;AAExC,QAAO,WAAW,GAAG,CAAC,CAAC,KAAK,GAAG;AAG/B,QAAO,WAAW,cAAc,CAAC,CAAC,KAAK,cAAc;AAGrD,QAAO,WAAW,QAAQ,CAAC,CAAC,KAAK,cAAc;AAC/C,QAAO,WAAW,QAAQ,CAAC,CAAC,KAAK,YAAY;AAC7C,QAAO,WAAW,sBAAoB,CAAC,CAAC,KAAK,8BAA8B;AAC3E,QAAO,WAAW,cAAc,CAAC,CAAC,KAAK,mBAAmB;AAG1D,QAAO,WAAW,mCAAmC,CAAC,CAAC,KACrD,4DACD;EACD;AAEF,SAAgB,KAAK,SAA+B,GAAG,QAAuB;AAC5E,QAAO,iBAAiB,SAAS,GAAG,OAAO,KAAI,MAAK,WAAW,GAAG,IAAI,CAAC,CAAC;;CAE1E,SAAW,KAAC,SAAa,EAAC,aAAU;AAElC,QAAO,IAAI,gBAAgB,CAAC,KAAK,gBAAgB;AAGjD,QAAO,IAAI,UAAU,QAAQ,GAAG,CAAC,KAAK,gBAAgB;AAGtD,QAAO,IAAI,UAAU,KAAK,CAAC,KAAK,YAAY;AAG5C,QAAO,IAAI,QAAQ,WAAW,QAAQ,CAAC,KAAK,4BAA4B;AAGxE,QAAO,IAAI,GAAG,EAAE,KAAK,EAAE,KAAK,OAAO,CAAC,KAAK,gBAAgB;AAIzD,QAAO,IAAI,WADC,EAAE,gBAAgB,YAAY,GACd,CAAC,KAAK,yBAAyB;EAC3D;AAEF,SAAgB,WAAW,eAA+B;AAIxD,QAFY,IAAI,WAAW,CAAC,gBAAgB,eAAe,YAAY,CAE5D,KAAK"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
//#region src/utils/http.d.ts
|
|
2
|
+
declare const HTTP_METHODS: {
|
|
3
|
+
readonly GET: {
|
|
4
|
+
readonly safe: true;
|
|
5
|
+
readonly idempotent: true;
|
|
6
|
+
};
|
|
7
|
+
readonly POST: {
|
|
8
|
+
readonly safe: false;
|
|
9
|
+
readonly idempotent: false;
|
|
10
|
+
};
|
|
11
|
+
readonly PUT: {
|
|
12
|
+
readonly safe: false;
|
|
13
|
+
readonly idempotent: true;
|
|
14
|
+
};
|
|
15
|
+
readonly DELETE: {
|
|
16
|
+
readonly safe: false;
|
|
17
|
+
readonly idempotent: true;
|
|
18
|
+
};
|
|
19
|
+
readonly PATCH: {
|
|
20
|
+
readonly safe: false;
|
|
21
|
+
readonly idempotent: false;
|
|
22
|
+
};
|
|
23
|
+
readonly OPTIONS: {
|
|
24
|
+
readonly safe: true;
|
|
25
|
+
readonly idempotent: true;
|
|
26
|
+
};
|
|
27
|
+
readonly HEAD: {
|
|
28
|
+
readonly safe: true;
|
|
29
|
+
readonly idempotent: true;
|
|
30
|
+
};
|
|
31
|
+
readonly TRACE: {
|
|
32
|
+
readonly safe: true;
|
|
33
|
+
readonly idempotent: true;
|
|
34
|
+
};
|
|
35
|
+
readonly CONNECT: {
|
|
36
|
+
readonly safe: false;
|
|
37
|
+
readonly idempotent: false;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
type HttpMethod = keyof typeof HTTP_METHODS;
|
|
41
|
+
declare function decodeBasicAuthorizationHeader(value: string): [string, string] | null;
|
|
42
|
+
declare function encodeBasicAuthorizationHeader(id: string, password: string): string;
|
|
43
|
+
//#endregion
|
|
44
|
+
export { HTTP_METHODS, HttpMethod, decodeBasicAuthorizationHeader, encodeBasicAuthorizationHeader };
|
|
45
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","names":[],"sources":["../../../src/utils/http.tsx"],"mappings":";cAEa,YAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsCD,UAAA,gBAA0B,YAAA;AAAA,iBAEtB,8BAAA,CAA+B,KAAA;AAAA,iBA6B/B,8BAAA,CAA+B,EAAA,UAAY,QAAA"}
|