@antelopejs/dms-saas 0.3.15 → 0.5.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/README.md +61 -14
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.js +1 -0
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/owner-only-permissions-resolver.d.ts +1 -0
- package/dist/auth/owner-only-permissions-resolver.js +25 -0
- package/dist/auth/owner-only-permissions-resolver.js.map +1 -0
- package/dist/billing-state/directory-hooks.d.ts +1 -0
- package/dist/billing-state/directory-hooks.js +35 -0
- package/dist/billing-state/directory-hooks.js.map +1 -0
- package/dist/billing-state/directory.d.ts +29 -0
- package/dist/billing-state/directory.js +152 -0
- package/dist/billing-state/directory.js.map +1 -0
- package/dist/billing-state/index.d.ts +5 -1
- package/dist/billing-state/index.js +14 -2
- package/dist/billing-state/index.js.map +1 -1
- package/dist/billing-state/past-due-banner.d.ts +4 -3
- package/dist/billing-state/past-due-banner.js +30 -10
- package/dist/billing-state/past-due-banner.js.map +1 -1
- package/dist/billing-state/recovery.d.ts +4 -0
- package/dist/billing-state/recovery.js +7 -5
- package/dist/billing-state/recovery.js.map +1 -1
- package/dist/billing-state/trial-ending-banner.d.ts +4 -0
- package/dist/billing-state/trial-ending-banner.js +66 -0
- package/dist/billing-state/trial-ending-banner.js.map +1 -0
- package/dist/config/runtime.d.ts +1 -0
- package/dist/config/runtime.js +5 -0
- package/dist/config/runtime.js.map +1 -1
- package/dist/crons/auto-suspend-past-due.js +4 -5
- package/dist/crons/auto-suspend-past-due.js.map +1 -1
- package/dist/data-api/platformOwner/admin-user-invoices.d.ts +6 -4
- package/dist/data-api/platformOwner/admin-user-invoices.js +52 -30
- package/dist/data-api/platformOwner/admin-user-invoices.js.map +1 -1
- package/dist/data-api/platformOwner/admin-user-workspaces.d.ts +2 -0
- package/dist/data-api/platformOwner/admin-user-workspaces.js +69 -3
- package/dist/data-api/platformOwner/admin-user-workspaces.js.map +1 -1
- package/dist/data-api/platformOwner/credit-note-rows.d.ts +11 -0
- package/dist/data-api/platformOwner/credit-note-rows.js +54 -0
- package/dist/data-api/platformOwner/credit-note-rows.js.map +1 -0
- package/dist/data-api/platformOwner/credit-notes.d.ts +13 -0
- package/dist/data-api/platformOwner/credit-notes.js +149 -10
- package/dist/data-api/platformOwner/credit-notes.js.map +1 -1
- package/dist/data-api/platformOwner/features.d.ts +8 -2
- package/dist/data-api/platformOwner/features.js +155 -35
- package/dist/data-api/platformOwner/features.js.map +1 -1
- package/dist/data-api/platformOwner/invitations.js +29 -9
- package/dist/data-api/platformOwner/invitations.js.map +1 -1
- package/dist/data-api/platformOwner/invoice-cells.d.ts +5 -0
- package/dist/data-api/platformOwner/invoice-cells.js +51 -0
- package/dist/data-api/platformOwner/invoice-cells.js.map +1 -0
- package/dist/data-api/platformOwner/invoice-options.js.map +1 -1
- package/dist/data-api/platformOwner/invoice-rows.d.ts +9 -0
- package/dist/data-api/platformOwner/invoice-rows.js +39 -0
- package/dist/data-api/platformOwner/invoice-rows.js.map +1 -0
- package/dist/data-api/platformOwner/invoices.d.ts +24 -6
- package/dist/data-api/platformOwner/invoices.js +192 -11
- package/dist/data-api/platformOwner/invoices.js.map +1 -1
- package/dist/data-api/platformOwner/members.d.ts +2 -1
- package/dist/data-api/platformOwner/members.js +56 -20
- package/dist/data-api/platformOwner/members.js.map +1 -1
- package/dist/data-api/platformOwner/plan-migrations.d.ts +14 -2
- package/dist/data-api/platformOwner/plan-migrations.js +179 -33
- package/dist/data-api/platformOwner/plan-migrations.js.map +1 -1
- package/dist/data-api/platformOwner/plans.d.ts +30 -6
- package/dist/data-api/platformOwner/plans.js +269 -44
- package/dist/data-api/platformOwner/plans.js.map +1 -1
- package/dist/data-api/platformOwner/segments.d.ts +9 -7
- package/dist/data-api/platformOwner/segments.js +108 -101
- package/dist/data-api/platformOwner/segments.js.map +1 -1
- package/dist/data-api/platformOwner/table-scope.d.ts +6 -0
- package/dist/data-api/platformOwner/table-scope.js +8 -0
- package/dist/data-api/platformOwner/table-scope.js.map +1 -0
- package/dist/data-api/platformOwner/users.d.ts +15 -2
- package/dist/data-api/platformOwner/users.js +171 -15
- package/dist/data-api/platformOwner/users.js.map +1 -1
- package/dist/data-api/platformOwner/workspace-cells.d.ts +12 -0
- package/dist/data-api/platformOwner/workspace-cells.js +90 -0
- package/dist/data-api/platformOwner/workspace-cells.js.map +1 -0
- package/dist/data-api/platformOwner/workspaces.d.ts +26 -4
- package/dist/data-api/platformOwner/workspaces.js +269 -97
- package/dist/data-api/platformOwner/workspaces.js.map +1 -1
- package/dist/data-api/tenant/tenant-invoices.d.ts +4 -0
- package/dist/data-api/tenant/tenant-invoices.js +68 -4
- package/dist/data-api/tenant/tenant-invoices.js.map +1 -1
- package/dist/hooks/register.js +5 -1
- package/dist/hooks/register.js.map +1 -1
- package/dist/i18n/composed-text.d.ts +17 -0
- package/dist/i18n/composed-text.js +71 -0
- package/dist/i18n/composed-text.js.map +1 -0
- package/dist/implementations/dms-saas/billing.d.ts +1 -0
- package/dist/implementations/dms-saas/billing.js +4 -1
- package/dist/implementations/dms-saas/billing.js.map +1 -1
- package/dist/implementations/dms-saas/pages.d.ts +0 -1
- package/dist/implementations/dms-saas/pages.js +0 -4
- package/dist/implementations/dms-saas/pages.js.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/metrics/activity-sources.d.ts +2 -0
- package/dist/metrics/activity-sources.js +60 -0
- package/dist/metrics/activity-sources.js.map +1 -0
- package/dist/metrics/activity.d.ts +25 -0
- package/dist/metrics/activity.js +197 -0
- package/dist/metrics/activity.js.map +1 -0
- package/dist/metrics/directory-summary.d.ts +30 -0
- package/dist/metrics/directory-summary.js +95 -0
- package/dist/metrics/directory-summary.js.map +1 -0
- package/dist/metrics/headline-items.d.ts +32 -0
- package/dist/metrics/headline-items.js +242 -0
- package/dist/metrics/headline-items.js.map +1 -0
- package/dist/metrics/normalised-mrr.d.ts +32 -0
- package/dist/metrics/normalised-mrr.js +75 -0
- package/dist/metrics/normalised-mrr.js.map +1 -0
- package/dist/metrics/revenue.d.ts +30 -0
- package/dist/metrics/revenue.js +126 -0
- package/dist/metrics/revenue.js.map +1 -0
- package/dist/notifications/recipients.d.ts +1 -0
- package/dist/notifications/recipients.js +4 -0
- package/dist/notifications/recipients.js.map +1 -1
- package/dist/notifications/subjects.d.ts +18 -17
- package/dist/notifications/subjects.js +7 -1
- package/dist/notifications/subjects.js.map +1 -1
- package/dist/operator-actions/commands.js +9 -6
- package/dist/operator-actions/commands.js.map +1 -1
- package/dist/operator-actions/invitation-commands.d.ts +7 -1
- package/dist/operator-actions/invitation-commands.js +16 -0
- package/dist/operator-actions/invitation-commands.js.map +1 -1
- package/dist/operator-actions/previews.d.ts +50 -0
- package/dist/operator-actions/previews.js +113 -0
- package/dist/operator-actions/previews.js.map +1 -0
- package/dist/operator-actions/types.d.ts +1 -1
- package/dist/operator-actions/upgrade-preview.d.ts +35 -0
- package/dist/operator-actions/upgrade-preview.js +110 -0
- package/dist/operator-actions/upgrade-preview.js.map +1 -0
- package/dist/operator-billing/billing-rules.d.ts +58 -0
- package/dist/operator-billing/billing-rules.js +90 -0
- package/dist/operator-billing/billing-rules.js.map +1 -0
- package/dist/operator-billing/billing-settings-store.d.ts +3 -0
- package/dist/operator-billing/billing-settings-store.js +34 -0
- package/dist/operator-billing/billing-settings-store.js.map +1 -0
- package/dist/operator-billing/billing-stats.d.ts +37 -0
- package/dist/operator-billing/billing-stats.js +197 -0
- package/dist/operator-billing/billing-stats.js.map +1 -0
- package/dist/operator-billing/credit-allowance.d.ts +17 -0
- package/dist/operator-billing/credit-allowance.js +44 -0
- package/dist/operator-billing/credit-allowance.js.map +1 -0
- package/dist/operator-billing/credit-note-request.d.ts +39 -0
- package/dist/operator-billing/credit-note-request.js +73 -0
- package/dist/operator-billing/credit-note-request.js.map +1 -0
- package/dist/operator-billing/index.d.ts +8 -0
- package/dist/operator-billing/index.js +25 -0
- package/dist/operator-billing/index.js.map +1 -0
- package/dist/operator-billing/invoice-credit.d.ts +41 -0
- package/dist/operator-billing/invoice-credit.js +111 -0
- package/dist/operator-billing/invoice-credit.js.map +1 -0
- package/dist/operator-billing/legal-documents-store.d.ts +12 -0
- package/dist/operator-billing/legal-documents-store.js +46 -0
- package/dist/operator-billing/legal-documents-store.js.map +1 -0
- package/dist/operator-billing/legal-versions.d.ts +5 -0
- package/dist/operator-billing/legal-versions.js +31 -0
- package/dist/operator-billing/legal-versions.js.map +1 -0
- package/dist/pages/block-meta.d.ts +15 -0
- package/dist/pages/block-meta.js +21 -0
- package/dist/pages/block-meta.js.map +1 -0
- package/dist/pages/module.d.ts +1 -3
- package/dist/pages/module.js +1 -8
- package/dist/pages/module.js.map +1 -1
- package/dist/pages/platform/credit-notes.d.ts +1 -0
- package/dist/pages/platform/credit-notes.js +63 -5
- package/dist/pages/platform/credit-notes.js.map +1 -1
- package/dist/pages/platform/dashboard.d.ts +4 -1
- package/dist/pages/platform/dashboard.js +123 -64
- package/dist/pages/platform/dashboard.js.map +1 -1
- package/dist/pages/platform/features.js +83 -12
- package/dist/pages/platform/features.js.map +1 -1
- package/dist/pages/platform/index.d.ts +1 -0
- package/dist/pages/platform/index.js +1 -0
- package/dist/pages/platform/index.js.map +1 -1
- package/dist/pages/platform/invoices.d.ts +6 -0
- package/dist/pages/platform/invoices.js +84 -28
- package/dist/pages/platform/invoices.js.map +1 -1
- package/dist/pages/platform/paths.d.ts +9 -0
- package/dist/pages/platform/paths.js +25 -0
- package/dist/pages/platform/paths.js.map +1 -0
- package/dist/pages/platform/plans/edit.d.ts +2 -2
- package/dist/pages/platform/plans/edit.js +170 -105
- package/dist/pages/platform/plans/edit.js.map +1 -1
- package/dist/pages/platform/plans/index.d.ts +1 -0
- package/dist/pages/platform/plans/index.js +172 -54
- package/dist/pages/platform/plans/index.js.map +1 -1
- package/dist/pages/platform/plans/migrations.d.ts +12 -0
- package/dist/pages/platform/plans/migrations.js +259 -13
- package/dist/pages/platform/plans/migrations.js.map +1 -1
- package/dist/pages/platform/segments/edit.d.ts +17 -0
- package/dist/pages/platform/segments/edit.js +124 -0
- package/dist/pages/platform/segments/edit.js.map +1 -0
- package/dist/pages/platform/segments/index.js +68 -8
- package/dist/pages/platform/segments/index.js.map +1 -1
- package/dist/pages/platform/settings.d.ts +1 -1
- package/dist/pages/platform/settings.js +164 -105
- package/dist/pages/platform/settings.js.map +1 -1
- package/dist/pages/platform/users/detail.js +104 -33
- package/dist/pages/platform/users/detail.js.map +1 -1
- package/dist/pages/platform/users/index.js +52 -18
- package/dist/pages/platform/users/index.js.map +1 -1
- package/dist/pages/platform/workspaces/detail.d.ts +3 -1
- package/dist/pages/platform/workspaces/detail.js +184 -113
- package/dist/pages/platform/workspaces/detail.js.map +1 -1
- package/dist/pages/platform/workspaces/index.d.ts +1 -20
- package/dist/pages/platform/workspaces/index.js +152 -180
- package/dist/pages/platform/workspaces/index.js.map +1 -1
- package/dist/pages/platform/workspaces/shared.d.ts +11 -0
- package/dist/pages/platform/workspaces/shared.js +53 -0
- package/dist/pages/platform/workspaces/shared.js.map +1 -0
- package/dist/pages/public/auth/no-workspace.js +7 -2
- package/dist/pages/public/auth/no-workspace.js.map +1 -1
- package/dist/pages/public/index.js.map +1 -1
- package/dist/pages/public/legal/privacy-policy.d.ts +1 -0
- package/dist/pages/public/legal/privacy-policy.js +9 -4
- package/dist/pages/public/legal/privacy-policy.js.map +1 -1
- package/dist/pages/public/legal/terms-and-conditions.d.ts +1 -0
- package/dist/pages/public/legal/terms-and-conditions.js +9 -4
- package/dist/pages/public/legal/terms-and-conditions.js.map +1 -1
- package/dist/pages/public/legal/terms-of-use.d.ts +1 -0
- package/dist/pages/public/legal/terms-of-use.js +9 -4
- package/dist/pages/public/legal/terms-of-use.js.map +1 -1
- package/dist/pages/public/nav-bar.d.ts +2 -0
- package/dist/pages/public/nav-bar.js +14 -0
- package/dist/pages/public/nav-bar.js.map +1 -0
- package/dist/pages/public/pricing.d.ts +10 -0
- package/dist/pages/public/pricing.js +32 -0
- package/dist/pages/public/pricing.js.map +1 -0
- package/dist/pages/public/register.d.ts +1 -0
- package/dist/pages/public/register.js +6 -3
- package/dist/pages/public/register.js.map +1 -1
- package/dist/pages/public/screens.js +1 -0
- package/dist/pages/public/screens.js.map +1 -1
- package/dist/pages/tenant/billing.d.ts +7 -7
- package/dist/pages/tenant/billing.js +141 -63
- package/dist/pages/tenant/billing.js.map +1 -1
- package/dist/pages/tenant/data-export.d.ts +3 -1
- package/dist/pages/tenant/data-export.js +25 -6
- package/dist/pages/tenant/data-export.js.map +1 -1
- package/dist/pages/tenant/general.d.ts +3 -2
- package/dist/pages/tenant/general.js +91 -11
- package/dist/pages/tenant/general.js.map +1 -1
- package/dist/pages/tenant/index.d.ts +1 -0
- package/dist/pages/tenant/index.js +1 -0
- package/dist/pages/tenant/index.js.map +1 -1
- package/dist/pages/tenant/members-seat-quota.d.ts +3 -0
- package/dist/pages/tenant/members-seat-quota.js +18 -6
- package/dist/pages/tenant/members-seat-quota.js.map +1 -1
- package/dist/pages/tenant/owner-only.d.ts +1 -0
- package/dist/pages/tenant/owner-only.js +14 -0
- package/dist/pages/tenant/owner-only.js.map +1 -0
- package/dist/pages/tenant/workspace-suspended.js +7 -3
- package/dist/pages/tenant/workspace-suspended.js.map +1 -1
- package/dist/plan-changes/applied-upgrade.d.ts +5 -0
- package/dist/plan-changes/applied-upgrade.js +51 -0
- package/dist/plan-changes/applied-upgrade.js.map +1 -0
- package/dist/plan-changes/deferred.js +9 -40
- package/dist/plan-changes/deferred.js.map +1 -1
- package/dist/plan-changes/immediate.d.ts +4 -0
- package/dist/plan-changes/immediate.js +34 -0
- package/dist/plan-changes/immediate.js.map +1 -0
- package/dist/plan-changes/index.d.ts +1 -0
- package/dist/plan-changes/index.js +1 -0
- package/dist/plan-changes/index.js.map +1 -1
- package/dist/plan-changes/pending-target.d.ts +17 -0
- package/dist/plan-changes/pending-target.js +62 -0
- package/dist/plan-changes/pending-target.js.map +1 -0
- package/dist/plans/catalogue-summary.d.ts +24 -0
- package/dist/plans/catalogue-summary.js +97 -0
- package/dist/plans/catalogue-summary.js.map +1 -0
- package/dist/plans/catalogue-usage.d.ts +36 -0
- package/dist/plans/catalogue-usage.js +120 -0
- package/dist/plans/catalogue-usage.js.map +1 -0
- package/dist/plans/feature-guards.d.ts +5 -0
- package/dist/plans/feature-guards.js +31 -0
- package/dist/plans/feature-guards.js.map +1 -0
- package/dist/plans/feature-usage.d.ts +4 -0
- package/dist/plans/feature-usage.js +22 -0
- package/dist/plans/feature-usage.js.map +1 -0
- package/dist/plans/migration-blocks.d.ts +13 -0
- package/dist/plans/migration-blocks.js +337 -0
- package/dist/plans/migration-blocks.js.map +1 -0
- package/dist/plans/migration-detail.d.ts +48 -0
- package/dist/plans/migration-detail.js +80 -0
- package/dist/plans/migration-detail.js.map +1 -0
- package/dist/plans/migration-dialogs.d.ts +8 -0
- package/dist/plans/migration-dialogs.js +103 -0
- package/dist/plans/migration-dialogs.js.map +1 -0
- package/dist/plans/migration-outcomes.d.ts +7 -0
- package/dist/plans/migration-outcomes.js +38 -0
- package/dist/plans/migration-outcomes.js.map +1 -0
- package/dist/plans/migration-realtime.d.ts +2 -0
- package/dist/plans/migration-realtime.js +19 -0
- package/dist/plans/migration-realtime.js.map +1 -0
- package/dist/plans/migration-workspaces.d.ts +40 -0
- package/dist/plans/migration-workspaces.js +121 -0
- package/dist/plans/migration-workspaces.js.map +1 -0
- package/dist/plans/money.d.ts +1 -0
- package/dist/plans/money.js +11 -0
- package/dist/plans/money.js.map +1 -0
- package/dist/plans/plan-access-type.d.ts +25 -0
- package/dist/plans/plan-access-type.js +49 -0
- package/dist/plans/plan-access-type.js.map +1 -0
- package/dist/plans/plan-audience.d.ts +3 -0
- package/dist/plans/plan-audience.js +9 -0
- package/dist/plans/plan-audience.js.map +1 -0
- package/dist/plans/plan-diff.d.ts +13 -0
- package/dist/plans/plan-diff.js +73 -0
- package/dist/plans/plan-diff.js.map +1 -0
- package/dist/plans/plan-permission-tree.d.ts +11 -0
- package/dist/plans/plan-permission-tree.js +58 -0
- package/dist/plans/plan-permission-tree.js.map +1 -0
- package/dist/plans/plan-write.d.ts +17 -0
- package/dist/plans/plan-write.js +111 -0
- package/dist/plans/plan-write.js.map +1 -0
- package/dist/plans/seat-capacity.d.ts +3 -1
- package/dist/plans/seat-capacity.js +10 -2
- package/dist/plans/seat-capacity.js.map +1 -1
- package/dist/plans/seat-hooks.d.ts +1 -0
- package/dist/plans/seat-hooks.js +1 -0
- package/dist/plans/seat-hooks.js.map +1 -1
- package/dist/plans/stripe-sync.d.ts +3 -0
- package/dist/plans/stripe-sync.js +16 -0
- package/dist/plans/stripe-sync.js.map +1 -1
- package/dist/routes/platformOwner/billing-settings.d.ts +11 -35
- package/dist/routes/platformOwner/billing-settings.js +77 -47
- package/dist/routes/platformOwner/billing-settings.js.map +1 -1
- package/dist/routes/platformOwner/billing-stats.d.ts +15 -0
- package/dist/routes/platformOwner/billing-stats.js +106 -0
- package/dist/routes/platformOwner/billing-stats.js.map +1 -0
- package/dist/routes/platformOwner/block-payloads.d.ts +7 -0
- package/dist/routes/platformOwner/block-payloads.js +3 -0
- package/dist/routes/platformOwner/block-payloads.js.map +1 -0
- package/dist/routes/platformOwner/credit-notes-issue.d.ts +7 -8
- package/dist/routes/platformOwner/credit-notes-issue.js +28 -16
- package/dist/routes/platformOwner/credit-notes-issue.js.map +1 -1
- package/dist/routes/platformOwner/dashboard.d.ts +14 -57
- package/dist/routes/platformOwner/dashboard.js +126 -247
- package/dist/routes/platformOwner/dashboard.js.map +1 -1
- package/dist/routes/platformOwner/index.d.ts +7 -0
- package/dist/routes/platformOwner/index.js +7 -0
- package/dist/routes/platformOwner/index.js.map +1 -1
- package/dist/routes/platformOwner/plan-deletion.d.ts +77 -19
- package/dist/routes/platformOwner/plan-deletion.js +219 -67
- package/dist/routes/platformOwner/plan-deletion.js.map +1 -1
- package/dist/routes/platformOwner/plan-dialogs.d.ts +22 -0
- package/dist/routes/platformOwner/plan-dialogs.js +211 -0
- package/dist/routes/platformOwner/plan-dialogs.js.map +1 -0
- package/dist/routes/platformOwner/plan-migration-context.d.ts +9 -0
- package/dist/routes/platformOwner/plan-migration-context.js +147 -0
- package/dist/routes/platformOwner/plan-migration-context.js.map +1 -0
- package/dist/routes/platformOwner/plan-migration-export.d.ts +12 -0
- package/dist/routes/platformOwner/plan-migration-export.js +100 -0
- package/dist/routes/platformOwner/plan-migration-export.js.map +1 -0
- package/dist/routes/platformOwner/plan-migrations.d.ts +43 -0
- package/dist/routes/platformOwner/plan-migrations.js +260 -0
- package/dist/routes/platformOwner/plan-migrations.js.map +1 -0
- package/dist/routes/platformOwner/plans.d.ts +45 -42
- package/dist/routes/platformOwner/plans.js +162 -143
- package/dist/routes/platformOwner/plans.js.map +1 -1
- package/dist/routes/platformOwner/platform-owners.d.ts +8 -6
- package/dist/routes/platformOwner/platform-owners.js +40 -12
- package/dist/routes/platformOwner/platform-owners.js.map +1 -1
- package/dist/routes/platformOwner/segments-export.d.ts +15 -0
- package/dist/routes/platformOwner/segments-export.js +143 -0
- package/dist/routes/platformOwner/segments-export.js.map +1 -0
- package/dist/routes/platformOwner/segments.d.ts +17 -11
- package/dist/routes/platformOwner/segments.js +62 -113
- package/dist/routes/platformOwner/segments.js.map +1 -1
- package/dist/routes/platformOwner/stripe-dashboard.d.ts +6 -0
- package/dist/routes/platformOwner/stripe-dashboard.js +29 -0
- package/dist/routes/platformOwner/stripe-dashboard.js.map +1 -0
- package/dist/routes/platformOwner/users-detail.d.ts +12 -22
- package/dist/routes/platformOwner/users-detail.js +60 -53
- package/dist/routes/platformOwner/users-detail.js.map +1 -1
- package/dist/routes/platformOwner/workspace-detail.d.ts +36 -0
- package/dist/routes/platformOwner/workspace-detail.js +222 -0
- package/dist/routes/platformOwner/workspace-detail.js.map +1 -0
- package/dist/routes/platformOwner/workspace-invitations.d.ts +4 -0
- package/dist/routes/platformOwner/workspace-invitations.js +18 -0
- package/dist/routes/platformOwner/workspace-invitations.js.map +1 -1
- package/dist/routes/platformOwner/workspace-operator-actions.d.ts +14 -2
- package/dist/routes/platformOwner/workspace-operator-actions.js +42 -4
- package/dist/routes/platformOwner/workspace-operator-actions.js.map +1 -1
- package/dist/routes/platformOwner/workspaces-admin.d.ts +17 -12
- package/dist/routes/platformOwner/workspaces-admin.js +122 -28
- package/dist/routes/platformOwner/workspaces-admin.js.map +1 -1
- package/dist/routes/public/index.d.ts +1 -0
- package/dist/routes/public/index.js +1 -0
- package/dist/routes/public/index.js.map +1 -1
- package/dist/routes/public/legal-documents.d.ts +2 -8
- package/dist/routes/public/legal-documents.js +4 -39
- package/dist/routes/public/legal-documents.js.map +1 -1
- package/dist/routes/public/pricing.d.ts +12 -0
- package/dist/routes/public/pricing.js +50 -0
- package/dist/routes/public/pricing.js.map +1 -0
- package/dist/routes/public/public-plan-catalog.d.ts +37 -0
- package/dist/routes/public/public-plan-catalog.js +63 -0
- package/dist/routes/public/public-plan-catalog.js.map +1 -0
- package/dist/routes/public/register.d.ts +13 -0
- package/dist/routes/public/register.js +88 -4
- package/dist/routes/public/register.js.map +1 -1
- package/dist/routes/tenant/billing-pay-invoice.d.ts +13 -0
- package/dist/routes/tenant/billing-pay-invoice.js +82 -0
- package/dist/routes/tenant/billing-pay-invoice.js.map +1 -0
- package/dist/routes/tenant/billing-portal.d.ts +8 -3
- package/dist/routes/tenant/billing-portal.js +34 -16
- package/dist/routes/tenant/billing-portal.js.map +1 -1
- package/dist/routes/tenant/billing-self-refund.d.ts +26 -1
- package/dist/routes/tenant/billing-self-refund.js +95 -46
- package/dist/routes/tenant/billing-self-refund.js.map +1 -1
- package/dist/routes/tenant/complimentary-banner.d.ts +12 -0
- package/dist/routes/tenant/complimentary-banner.js +64 -0
- package/dist/routes/tenant/complimentary-banner.js.map +1 -0
- package/dist/routes/tenant/data-export.js +14 -0
- package/dist/routes/tenant/data-export.js.map +1 -1
- package/dist/routes/tenant/index.d.ts +7 -0
- package/dist/routes/tenant/index.js +7 -0
- package/dist/routes/tenant/index.js.map +1 -1
- package/dist/routes/tenant/tenant-billing.d.ts +1 -0
- package/dist/routes/tenant/tenant-billing.js +18 -13
- package/dist/routes/tenant/tenant-billing.js.map +1 -1
- package/dist/routes/tenant/tenant-plan-authentication.d.ts +13 -0
- package/dist/routes/tenant/tenant-plan-authentication.js +79 -0
- package/dist/routes/tenant/tenant-plan-authentication.js.map +1 -0
- package/dist/routes/tenant/tenant-plan-cancellation.d.ts +12 -0
- package/dist/routes/tenant/tenant-plan-cancellation.js +87 -0
- package/dist/routes/tenant/tenant-plan-cancellation.js.map +1 -0
- package/dist/routes/tenant/tenant-plan-checkout.d.ts +3 -0
- package/dist/routes/tenant/tenant-plan-checkout.js +21 -11
- package/dist/routes/tenant/tenant-plan-checkout.js.map +1 -1
- package/dist/routes/tenant/tenant-plan-ops.d.ts +32 -2
- package/dist/routes/tenant/tenant-plan-ops.js +112 -39
- package/dist/routes/tenant/tenant-plan-ops.js.map +1 -1
- package/dist/routes/tenant/tenant-plan-preview.d.ts +33 -0
- package/dist/routes/tenant/tenant-plan-preview.js +216 -0
- package/dist/routes/tenant/tenant-plan-preview.js.map +1 -0
- package/dist/routes/tenant/tenant-plan-resubscription.d.ts +2 -0
- package/dist/routes/tenant/tenant-plan-resubscription.js +61 -0
- package/dist/routes/tenant/tenant-plan-resubscription.js.map +1 -0
- package/dist/routes/tenant/tenant-plan.d.ts +9 -4
- package/dist/routes/tenant/tenant-plan.js +125 -15
- package/dist/routes/tenant/tenant-plan.js.map +1 -1
- package/dist/routes/tenant/tenant-seats.d.ts +6 -1
- package/dist/routes/tenant/tenant-seats.js +26 -5
- package/dist/routes/tenant/tenant-seats.js.map +1 -1
- package/dist/routes/tenant/tenant-upcoming-invoice.d.ts +26 -0
- package/dist/routes/tenant/tenant-upcoming-invoice.js +200 -0
- package/dist/routes/tenant/tenant-upcoming-invoice.js.map +1 -0
- package/dist/routes/tenant/workspace-access.d.ts +67 -0
- package/dist/routes/tenant/workspace-access.js +224 -0
- package/dist/routes/tenant/workspace-access.js.map +1 -0
- package/dist/routes/tenant/workspaces.d.ts +12 -43
- package/dist/routes/tenant/workspaces.js +82 -192
- package/dist/routes/tenant/workspaces.js.map +1 -1
- package/dist/segments/index.d.ts +29 -0
- package/dist/segments/index.js +116 -0
- package/dist/segments/index.js.map +1 -0
- package/dist/stripe/client.d.ts +1 -0
- package/dist/stripe/client.js +11 -0
- package/dist/stripe/client.js.map +1 -1
- package/dist/stripe/customer-locale.d.ts +3 -0
- package/dist/stripe/customer-locale.js +36 -0
- package/dist/stripe/customer-locale.js.map +1 -0
- package/dist/stripe/dashboard-links.d.ts +2 -0
- package/dist/stripe/dashboard-links.js +8 -0
- package/dist/stripe/dashboard-links.js.map +1 -0
- package/dist/stripe/index.d.ts +3 -0
- package/dist/stripe/index.js +3 -0
- package/dist/stripe/index.js.map +1 -1
- package/dist/stripe/pending-update.d.ts +5 -0
- package/dist/stripe/pending-update.js +56 -0
- package/dist/stripe/pending-update.js.map +1 -0
- package/dist/stripe/plan-schedule.js +4 -1
- package/dist/stripe/plan-schedule.js.map +1 -1
- package/dist/stripe/subscription-cancellation.d.ts +3 -0
- package/dist/stripe/subscription-cancellation.js +26 -0
- package/dist/stripe/subscription-cancellation.js.map +1 -0
- package/dist/stripe/sync-plan.js +5 -6
- package/dist/stripe/sync-plan.js.map +1 -1
- package/dist/stripe/upcoming-invoice.d.ts +9 -0
- package/dist/stripe/upcoming-invoice.js +19 -3
- package/dist/stripe/upcoming-invoice.js.map +1 -1
- package/dist/stripe/webhook-checkout.js +2 -0
- package/dist/stripe/webhook-checkout.js.map +1 -1
- package/dist/stripe/webhook-credit-notes.js +15 -0
- package/dist/stripe/webhook-credit-notes.js.map +1 -1
- package/dist/stripe/webhook-dispatch.js +2 -0
- package/dist/stripe/webhook-dispatch.js.map +1 -1
- package/dist/stripe/webhook-handlers.d.ts +1 -0
- package/dist/stripe/webhook-handlers.js +34 -9
- package/dist/stripe/webhook-handlers.js.map +1 -1
- package/dist/stripe/webhook-shared.d.ts +3 -1
- package/dist/stripe/webhook-shared.js +20 -1
- package/dist/stripe/webhook-shared.js.map +1 -1
- package/dist/stripe/workspace-checkout.d.ts +2 -0
- package/dist/stripe/workspace-checkout.js +4 -0
- package/dist/stripe/workspace-checkout.js.map +1 -1
- package/dist/types/config.d.ts +2 -0
- package/dist/types/config.js.map +1 -1
- package/dist/upcoming-invoice/mapping.js +1 -0
- package/dist/upcoming-invoice/mapping.js.map +1 -1
- package/dist/users/index.d.ts +4 -0
- package/dist/users/index.js +21 -0
- package/dist/users/index.js.map +1 -0
- package/dist/users/platform-role.d.ts +18 -0
- package/dist/users/platform-role.js +127 -0
- package/dist/users/platform-role.js.map +1 -0
- package/dist/users/user-detail.d.ts +43 -0
- package/dist/users/user-detail.js +100 -0
- package/dist/users/user-detail.js.map +1 -0
- package/dist/users/user-facts.d.ts +10 -0
- package/dist/users/user-facts.js +157 -0
- package/dist/users/user-facts.js.map +1 -0
- package/dist/users/user-segments.d.ts +10 -0
- package/dist/users/user-segments.js +32 -0
- package/dist/users/user-segments.js.map +1 -0
- package/dist/utils/billing-displays.d.ts +6 -0
- package/dist/utils/billing-displays.js +17 -0
- package/dist/utils/billing-displays.js.map +1 -0
- package/dist/utils/billing-document-status.d.ts +0 -4
- package/dist/utils/billing-document-status.js +1 -13
- package/dist/utils/billing-document-status.js.map +1 -1
- package/dist/utils/billing-document-type.d.ts +6 -0
- package/dist/utils/billing-document-type.js +13 -0
- package/dist/utils/billing-document-type.js.map +1 -1
- package/dist/utils/content-language.d.ts +2 -0
- package/dist/utils/content-language.js +12 -0
- package/dist/utils/content-language.js.map +1 -0
- package/dist/utils/csv-file.d.ts +2 -0
- package/dist/utils/csv-file.js +23 -0
- package/dist/utils/csv-file.js.map +1 -0
- package/dist/utils/form-insight-type.d.ts +8 -0
- package/dist/utils/form-insight-type.js +34 -0
- package/dist/utils/form-insight-type.js.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/language.d.ts +1 -0
- package/dist/utils/language.js +7 -0
- package/dist/utils/language.js.map +1 -0
- package/dist/utils/money.d.ts +2 -0
- package/dist/utils/money.js +24 -0
- package/dist/utils/money.js.map +1 -0
- package/dist/utils/segment-evaluator.d.ts +4 -0
- package/dist/utils/segment-evaluator.js +15 -8
- package/dist/utils/segment-evaluator.js.map +1 -1
- package/dist/utils/segment-explain.d.ts +10 -0
- package/dist/utils/segment-explain.js +31 -0
- package/dist/utils/segment-explain.js.map +1 -0
- package/dist/utils/segment-fields.d.ts +13 -2
- package/dist/utils/segment-fields.js +137 -116
- package/dist/utils/segment-fields.js.map +1 -1
- package/dist/utils/segment-matching.d.ts +14 -3
- package/dist/utils/segment-matching.js +47 -13
- package/dist/utils/segment-matching.js.map +1 -1
- package/dist/utils/segment-preview.d.ts +31 -0
- package/dist/utils/segment-preview.js +83 -0
- package/dist/utils/segment-preview.js.map +1 -0
- package/dist/utils/segment-user-projection.d.ts +3 -0
- package/dist/utils/segment-user-projection.js +31 -0
- package/dist/utils/segment-user-projection.js.map +1 -0
- package/dist/utils/segment-validation.d.ts +14 -0
- package/dist/utils/segment-validation.js +98 -0
- package/dist/utils/segment-validation.js.map +1 -0
- package/dist/utils/status-vocabulary.d.ts +57 -0
- package/dist/utils/status-vocabulary.js +92 -0
- package/dist/utils/status-vocabulary.js.map +1 -0
- package/dist/workers/index.d.ts +1 -0
- package/dist/workers/index.js +1 -0
- package/dist/workers/index.js.map +1 -1
- package/dist/workers/plan-migration-resolution.d.ts +14 -0
- package/dist/workers/plan-migration-resolution.js +99 -0
- package/dist/workers/plan-migration-resolution.js.map +1 -0
- package/dist/workers/plan-migration.d.ts +6 -1
- package/dist/workers/plan-migration.js +152 -37
- package/dist/workers/plan-migration.js.map +1 -1
- package/dist/workspaces/billing-identity-lock.d.ts +1 -0
- package/dist/workspaces/billing-identity-lock.js +18 -0
- package/dist/workspaces/billing-identity-lock.js.map +1 -0
- package/dist/workspaces/complimentary-banner.d.ts +11 -0
- package/dist/workspaces/complimentary-banner.js +83 -0
- package/dist/workspaces/complimentary-banner.js.map +1 -0
- package/dist/workspaces/default-member-role.d.ts +2 -0
- package/dist/workspaces/default-member-role.js +43 -0
- package/dist/workspaces/default-member-role.js.map +1 -0
- package/dist/workspaces/deletion-request.d.ts +2 -0
- package/dist/workspaces/deletion-request.js +5 -0
- package/dist/workspaces/deletion-request.js.map +1 -0
- package/dist/workspaces/deletion.d.ts +1 -1
- package/dist/workspaces/deletion.js +19 -7
- package/dist/workspaces/deletion.js.map +1 -1
- package/dist/workspaces/detail-items.d.ts +15 -0
- package/dist/workspaces/detail-items.js +226 -0
- package/dist/workspaces/detail-items.js.map +1 -0
- package/dist/workspaces/first-payment.d.ts +5 -0
- package/dist/workspaces/first-payment.js +28 -0
- package/dist/workspaces/first-payment.js.map +1 -0
- package/dist/workspaces/free-workspaces-per-card.d.ts +6 -0
- package/dist/workspaces/free-workspaces-per-card.js +58 -0
- package/dist/workspaces/free-workspaces-per-card.js.map +1 -0
- package/dist/workspaces/index.d.ts +7 -0
- package/dist/workspaces/index.js +7 -0
- package/dist/workspaces/index.js.map +1 -1
- package/dist/workspaces/invitations.d.ts +2 -1
- package/dist/workspaces/invitations.js +16 -6
- package/dist/workspaces/invitations.js.map +1 -1
- package/dist/workspaces/my-workspaces.d.ts +13 -0
- package/dist/workspaces/my-workspaces.js +68 -0
- package/dist/workspaces/my-workspaces.js.map +1 -0
- package/dist/workspaces/operator-creation.d.ts +39 -0
- package/dist/workspaces/operator-creation.js +123 -0
- package/dist/workspaces/operator-creation.js.map +1 -0
- package/dist/workspaces/operator-view.d.ts +13 -0
- package/dist/workspaces/operator-view.js +37 -0
- package/dist/workspaces/operator-view.js.map +1 -0
- package/dist/workspaces/owner-contact.d.ts +7 -0
- package/dist/workspaces/owner-contact.js +24 -0
- package/dist/workspaces/owner-contact.js.map +1 -0
- package/dist/workspaces/owner-invitation-email.d.ts +12 -0
- package/dist/workspaces/owner-invitation-email.js +53 -0
- package/dist/workspaces/owner-invitation-email.js.map +1 -0
- package/dist/workspaces/provisioning.d.ts +2 -0
- package/dist/workspaces/provisioning.js +37 -15
- package/dist/workspaces/provisioning.js.map +1 -1
- package/dist/workspaces/self-serve-creation.d.ts +38 -0
- package/dist/workspaces/self-serve-creation.js +106 -0
- package/dist/workspaces/self-serve-creation.js.map +1 -0
- package/dist/workspaces/workspace-glance.d.ts +3 -0
- package/dist/workspaces/workspace-glance.js +93 -0
- package/dist/workspaces/workspace-glance.js.map +1 -0
- package/dist/workspaces/workspace-name.d.ts +2 -0
- package/dist/workspaces/workspace-name.js +14 -0
- package/dist/workspaces/workspace-name.js.map +1 -0
- package/dist/workspaces/workspace-overview.d.ts +41 -0
- package/dist/workspaces/workspace-overview.js +84 -0
- package/dist/workspaces/workspace-overview.js.map +1 -0
- package/dist/workspaces/workspace-owner.d.ts +7 -0
- package/dist/workspaces/workspace-owner.js +14 -0
- package/dist/workspaces/workspace-owner.js.map +1 -0
- package/frontend-vue/app/build/PayInvoiceDialog.vue +40 -0
- package/frontend-vue/app/build/PayInvoicePanel.vue +203 -0
- package/frontend-vue/app/build/PlanChangeReview.vue +415 -0
- package/frontend-vue/app/build/PlanFeatureValueInput.vue +143 -0
- package/frontend-vue/app/build/PlanPermissionPicker.vue +246 -0
- package/frontend-vue/app/build/WorkspaceSwitcherRow.vue +116 -0
- package/frontend-vue/app/build/components/CreditNoteInvoiceSummary.vue +82 -0
- package/frontend-vue/app/build/components/FormFieldRow.vue +97 -0
- package/frontend-vue/app/build/components/FormRows.vue +26 -0
- package/frontend-vue/app/build/components/RequiredLegend.vue +7 -0
- package/frontend-vue/app/build/composables/useCreditNoteDraft.ts +142 -0
- package/frontend-vue/app/build/composables/useCreditNoteTexts.ts +123 -0
- package/frontend-vue/app/build/composables/useLiveFormValues.ts +49 -0
- package/frontend-vue/app/build/day-formats.ts +17 -0
- package/frontend-vue/app/build/highlight.ts +28 -0
- package/frontend-vue/app/build/plan-catalog.ts +161 -0
- package/frontend-vue/app/build/plan-change-heading.ts +81 -0
- package/frontend-vue/app/build/plan-permissions.ts +92 -0
- package/frontend-vue/app/build/plan-retire.ts +83 -0
- package/frontend-vue/app/build/public/AccessTimeline.vue +68 -0
- package/frontend-vue/app/build/public/LegalAcceptance.vue +51 -0
- package/frontend-vue/app/build/public/OtherWorkspaces.vue +88 -0
- package/frontend-vue/app/build/public/PricingComparison.vue +227 -0
- package/frontend-vue/app/build/public/PricingFaq.vue +76 -0
- package/frontend-vue/app/build/public/PublicStage.vue +72 -0
- package/frontend-vue/app/build/public/RegistrationCardField.vue +71 -0
- package/frontend-vue/app/build/public/RegistrationPlanCard.vue +122 -0
- package/frontend-vue/app/build/public/access.ts +118 -0
- package/frontend-vue/app/build/public/chosen-plan.ts +36 -0
- package/frontend-vue/app/build/public/legal.ts +99 -0
- package/frontend-vue/app/build/public/pricing.ts +175 -0
- package/frontend-vue/app/build/public/routes.ts +122 -0
- package/frontend-vue/app/build/public/usePublicFetch.ts +44 -0
- package/frontend-vue/app/build/public/usePublicPlanFormat.ts +52 -0
- package/frontend-vue/app/build/segments/tree.ts +137 -0
- package/frontend-vue/app/build/segments/types.ts +119 -0
- package/frontend-vue/app/build/segments/useSegmentCatalog.ts +58 -0
- package/frontend-vue/app/build/segments/useSegmentDraft.ts +33 -0
- package/frontend-vue/app/build/segments/useSegmentPreview.ts +78 -0
- package/frontend-vue/app/build/segments/useSegmentSentence.ts +60 -0
- package/frontend-vue/app/build/segments/useSegmentWords.ts +204 -0
- package/frontend-vue/app/build/useWorkspaceName.ts +14 -0
- package/frontend-vue/app/build/users/useUserDetail.ts +82 -0
- package/frontend-vue/app/build/workspace-detail/ComplimentaryDialog.vue +219 -0
- package/frontend-vue/app/build/workspace-detail/CreditDialog.vue +243 -0
- package/frontend-vue/app/build/workspace-detail/UpgradeDialog.vue +258 -0
- package/frontend-vue/app/build/workspace-detail/WorkspaceActionDialogs.vue +82 -0
- package/frontend-vue/app/build/workspace-detail/planPrice.ts +26 -0
- package/frontend-vue/app/build/workspace-detail/types.ts +138 -0
- package/frontend-vue/app/build/workspace-detail/useWorkspaceActions.ts +177 -0
- package/frontend-vue/app/build/workspace-detail/useWorkspaceOverview.ts +44 -0
- package/frontend-vue/app/build/workspace-paths.ts +8 -0
- package/frontend-vue/app/components/BillingIdentityFields.vue +294 -161
- package/frontend-vue/app/components/CustomerPortalButton.vue +80 -32
- package/frontend-vue/app/components/DataExport.vue +250 -260
- package/frontend-vue/app/components/DataExportHistory.vue +246 -0
- package/frontend-vue/app/components/DunningTimeline.vue +120 -0
- package/frontend-vue/app/components/IssueCreditNoteModal.vue +318 -116
- package/frontend-vue/app/components/LegalDocumentRelease.vue +64 -0
- package/frontend-vue/app/components/LegalLayout.vue +284 -46
- package/frontend-vue/app/components/MigrationStripeCheck.vue +133 -0
- package/frontend-vue/app/components/PastDueAlert.vue +186 -78
- package/frontend-vue/app/components/PastDueBanner.vue +96 -67
- package/frontend-vue/app/components/PayInvoiceModal.vue +57 -0
- package/frontend-vue/app/components/PaymentMethodCard.vue +159 -163
- package/frontend-vue/app/components/PendingCheckoutModal.vue +61 -61
- package/frontend-vue/app/components/PlanAccessEditor.vue +410 -0
- package/frontend-vue/app/components/PlanCard.vue +358 -261
- package/frontend-vue/app/components/PlanCardPublic.vue +123 -51
- package/frontend-vue/app/components/PlanComparisonModal.vue +373 -310
- package/frontend-vue/app/components/PlanEditorPreview.vue +374 -0
- package/frontend-vue/app/components/PlanLimitInput.vue +92 -0
- package/frontend-vue/app/components/PlanTaxSync.vue +118 -0
- package/frontend-vue/app/components/PlanUpgradeModal.vue +265 -156
- package/frontend-vue/app/components/PlatformNotes.vue +215 -255
- package/frontend-vue/app/components/Pricing.vue +236 -0
- package/frontend-vue/app/components/PublicNavBar.vue +70 -0
- package/frontend-vue/app/components/RefundButton.vue +264 -113
- package/frontend-vue/app/components/RefundExample.vue +86 -0
- package/frontend-vue/app/components/Register.vue +217 -121
- package/frontend-vue/app/components/RegistrationClosed.vue +30 -13
- package/frontend-vue/app/components/RetirePlanModal.vue +829 -0
- package/frontend-vue/app/components/SeatQuotaBanner.vue +240 -90
- package/frontend-vue/app/components/SegmentConditionRow.vue +171 -0
- package/frontend-vue/app/components/SegmentConditionsBuilder.vue +89 -162
- package/frontend-vue/app/components/SegmentConditionsGroup.vue +273 -463
- package/frontend-vue/app/components/SegmentLivePreview.vue +301 -0
- package/frontend-vue/app/components/SegmentLogicToggle.vue +24 -0
- package/frontend-vue/app/components/SegmentRulesText.vue +57 -0
- package/frontend-vue/app/components/SegmentValueInput.vue +165 -0
- package/frontend-vue/app/components/SegmentWords.vue +36 -0
- package/frontend-vue/app/components/TenantBillingForm.vue +142 -103
- package/frontend-vue/app/components/TenantPlanCard.vue +635 -281
- package/frontend-vue/app/components/TrialEndingBanner.vue +76 -0
- package/frontend-vue/app/components/UserPlatformRoleCard.vue +102 -0
- package/frontend-vue/app/components/UserSegmentMatches.vue +123 -0
- package/frontend-vue/app/components/UserSummaryCard.vue +107 -158
- package/frontend-vue/app/components/WorkspaceAdminCreateModal.vue +354 -177
- package/frontend-vue/app/components/WorkspaceCreateModal.vue +372 -252
- package/frontend-vue/app/components/WorkspaceDangerZone.vue +178 -126
- package/frontend-vue/app/components/WorkspaceDetailHeader.vue +262 -19
- package/frontend-vue/app/components/WorkspaceInvitationLink.vue +108 -86
- package/frontend-vue/app/components/WorkspaceOperatorActions.vue +105 -330
- package/frontend-vue/app/components/WorkspaceSuspendButton.vue +34 -158
- package/frontend-vue/app/components/WorkspaceSuspended.vue +390 -149
- package/frontend-vue/app/components/WorkspaceSwitcherWidget.vue +145 -161
- package/frontend-vue/app/composables/useBillingIdentity.ts +97 -95
- package/frontend-vue/app/composables/useBillingStatus.ts +56 -24
- package/frontend-vue/app/composables/useCurrentWorkspace.ts +15 -30
- package/frontend-vue/app/composables/useDaysLeft.ts +20 -0
- package/frontend-vue/app/composables/useExportHistory.ts +209 -120
- package/frontend-vue/app/composables/useInvitationLink.ts +39 -53
- package/frontend-vue/app/composables/useMoneyFormat.ts +64 -33
- package/frontend-vue/app/composables/useMyWorkspaces.ts +41 -32
- package/frontend-vue/app/composables/useNextInvoice.ts +20 -0
- package/frontend-vue/app/composables/usePayInvoice.ts +52 -0
- package/frontend-vue/app/composables/usePendingCheckout.ts +71 -67
- package/frontend-vue/app/composables/usePlanCatalog.ts +16 -0
- package/frontend-vue/app/composables/usePlanChangeReview.ts +115 -0
- package/frontend-vue/app/composables/usePlanComparison.ts +17 -8
- package/frontend-vue/app/composables/usePlanDowngrade.ts +25 -23
- package/frontend-vue/app/composables/usePlanFeatureFormat.ts +238 -202
- package/frontend-vue/app/composables/usePlanPriceLabel.ts +28 -0
- package/frontend-vue/app/composables/useSaasRegistration.ts +516 -301
- package/frontend-vue/app/composables/useSaasStatus.ts +81 -0
- package/frontend-vue/app/composables/useSeatQuota.ts +27 -17
- package/frontend-vue/app/composables/useServerConfirm.ts +44 -0
- package/frontend-vue/app/composables/useStripePaymentElement.ts +3 -5
- package/frontend-vue/app/composables/useTenantPlan.ts +235 -99
- package/frontend-vue/app/composables/useUpgradeAuthentication.ts +37 -0
- package/frontend-vue/app/composables/useWorkspaceFinalization.ts +4 -0
- package/frontend-vue/app/composables/useWorkspaceOverview.ts +58 -0
- package/frontend-vue/app/composables/useWorkspaceRenamed.ts +33 -0
- package/frontend-vue/app/custom-pages/auth/no-workspace.vue +391 -312
- package/frontend-vue/app/plugins/auth-links.ts +38 -17
- package/frontend-vue/app/plugins/billing-data-types.ts +111 -58
- package/frontend-vue/app/plugins/footer-links.ts +13 -33
- package/frontend-vue/app/plugins/segment-conditions-data-type.ts +45 -0
- package/frontend-vue/app/plugins/sidebar-widgets.ts +13 -10
- package/frontend-vue/app/types/runtime-config.ts +9 -4
- package/frontend-vue/dms.frontend.build.ts +7 -0
- package/frontend-vue/dms.frontend.ts +6 -13
- package/frontend-vue/i18n/locales/saas-en-GB.json +499 -1380
- package/frontend-vue/i18n/locales/saas-fr-FR.json +499 -1380
- package/frontend-vue/i18n/locales/saas-operator-billing-en-GB.json +282 -0
- package/frontend-vue/i18n/locales/saas-operator-billing-fr-FR.json +282 -0
- package/frontend-vue/i18n/locales/saas-operator-catalog-en-GB.json +597 -0
- package/frontend-vue/i18n/locales/saas-operator-catalog-fr-FR.json +597 -0
- package/frontend-vue/i18n/locales/saas-operator-users-en-GB.json +505 -0
- package/frontend-vue/i18n/locales/saas-operator-users-fr-FR.json +505 -0
- package/frontend-vue/i18n/locales/saas-operator-workspaces-en-GB.json +595 -0
- package/frontend-vue/i18n/locales/saas-operator-workspaces-fr-FR.json +595 -0
- package/frontend-vue/i18n/locales/saas-public-en-GB.json +304 -0
- package/frontend-vue/i18n/locales/saas-public-fr-FR.json +304 -0
- package/frontend-vue/i18n/locales/saas-tenant-billing-en-GB.json +434 -0
- package/frontend-vue/i18n/locales/saas-tenant-billing-fr-FR.json +434 -0
- package/frontend-vue/i18n/locales/saas-tenant-workspace-en-GB.json +252 -0
- package/frontend-vue/i18n/locales/saas-tenant-workspace-fr-FR.json +252 -0
- package/frontend-vue/package.json +1 -1
- package/package.json +10 -10
- package/frontend-vue/app/components/CardGrid.vue +0 -77
- package/frontend-vue/app/components/DeletePlanModal.vue +0 -223
- package/frontend-vue/app/components/FreeAccessBanner.vue +0 -70
- package/frontend-vue/app/components/PlanCardsDisplay.vue +0 -127
- package/frontend-vue/app/components/PlanInheritancePicker.vue +0 -329
- package/frontend-vue/app/components/RecentActivity.vue +0 -72
- package/frontend-vue/app/components/WorkspaceBillingInfo.vue +0 -68
- package/frontend-vue/app/components/WorkspaceCompAccessButton.vue +0 -198
- package/frontend-vue/app/components/WorkspaceIdentity.vue +0 -99
- package/frontend-vue/app/components/WorkspaceJoinButton.vue +0 -50
- package/frontend-vue/app/components/WorkspaceSummaryCard.vue +0 -185
- package/frontend-vue/app/composables/useDetailRefresh.ts +0 -17
- package/frontend-vue/app/composables/usePastDueBannerAction.ts +0 -20
- package/frontend-vue/app/composables/usePlanFeatureLabel.ts +0 -24
- package/frontend-vue/app/plugins/plan-cards-display.client.ts +0 -16
- package/frontend-vue/app/plugins/segment-conditions-data-type.client.ts +0 -122
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* The elevated card every public screen sits in on the empty layout's
|
|
4
|
+
* stage, built from the DMS's public card, icon well and eyebrow.
|
|
5
|
+
*/
|
|
6
|
+
type PublicStageWidth = 'default' | 'wide' | 'xwide'
|
|
7
|
+
type PublicStageTone = 'primary' | 'success' | 'warning' | 'error' | 'neutral'
|
|
8
|
+
|
|
9
|
+
interface PublicStageProps {
|
|
10
|
+
width?: PublicStageWidth
|
|
11
|
+
title?: string
|
|
12
|
+
description?: string
|
|
13
|
+
eyebrow?: string
|
|
14
|
+
icon?: string
|
|
15
|
+
tone?: PublicStageTone
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const props = withDefaults(defineProps<PublicStageProps>(), {
|
|
19
|
+
width: 'default',
|
|
20
|
+
title: undefined,
|
|
21
|
+
description: undefined,
|
|
22
|
+
eyebrow: undefined,
|
|
23
|
+
icon: undefined,
|
|
24
|
+
tone: 'primary',
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
const WIDTH_CLASSES: Record<PublicStageWidth, string> = {
|
|
28
|
+
default: 'max-w-[440px]',
|
|
29
|
+
wide: 'max-w-[560px]',
|
|
30
|
+
xwide: 'max-w-[720px]',
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<DmsCard
|
|
36
|
+
as="section"
|
|
37
|
+
variant="elevated"
|
|
38
|
+
:padded="false"
|
|
39
|
+
class="mx-auto w-full rounded-[16px] px-5 py-6 sm:p-8"
|
|
40
|
+
:class="WIDTH_CLASSES[props.width]"
|
|
41
|
+
>
|
|
42
|
+
<DmsIconWell v-if="props.icon" :tone="props.tone" size="xl" class="mb-4">
|
|
43
|
+
<UIcon :name="props.icon" class="size-5" />
|
|
44
|
+
</DmsIconWell>
|
|
45
|
+
|
|
46
|
+
<slot name="eyebrow">
|
|
47
|
+
<DmsEyebrow
|
|
48
|
+
v-if="props.eyebrow"
|
|
49
|
+
as="span"
|
|
50
|
+
tone="primary"
|
|
51
|
+
class="mb-2.5 block"
|
|
52
|
+
:label="props.eyebrow"
|
|
53
|
+
/>
|
|
54
|
+
</slot>
|
|
55
|
+
|
|
56
|
+
<h1
|
|
57
|
+
v-if="props.title"
|
|
58
|
+
class="text-highlighted text-xl font-[650] leading-tight tracking-[-0.025em]"
|
|
59
|
+
>
|
|
60
|
+
{{ props.title }}
|
|
61
|
+
</h1>
|
|
62
|
+
|
|
63
|
+
<p
|
|
64
|
+
v-if="props.description || $slots.description"
|
|
65
|
+
class="text-muted mt-1.5 text-[13px]"
|
|
66
|
+
>
|
|
67
|
+
<slot name="description">{{ props.description }}</slot>
|
|
68
|
+
</p>
|
|
69
|
+
|
|
70
|
+
<slot />
|
|
71
|
+
</DmsCard>
|
|
72
|
+
</template>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* The card step of Register and "Set up your first workspace": the Stripe
|
|
4
|
+
* element, why a card is asked for, and "Add a card later" when the
|
|
5
|
+
* deployment allows it.
|
|
6
|
+
*/
|
|
7
|
+
import { computed } from 'vue'
|
|
8
|
+
|
|
9
|
+
interface RegistrationCardFieldProps {
|
|
10
|
+
elementId: string
|
|
11
|
+
policy: RegistrationPaymentMethodPolicy
|
|
12
|
+
/** Whether the element is shown; it stays mounted while hidden. */
|
|
13
|
+
isVisible: boolean
|
|
14
|
+
/** Name of the plan the workspace opens on. */
|
|
15
|
+
planName: string | null
|
|
16
|
+
maxFreeWorkspacesPerCard: number | null
|
|
17
|
+
error?: string | null
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const props = withDefaults(defineProps<RegistrationCardFieldProps>(), {
|
|
21
|
+
error: null,
|
|
22
|
+
})
|
|
23
|
+
const skipsPaymentMethod = defineModel<boolean>('skips', { required: true })
|
|
24
|
+
|
|
25
|
+
const { t } = useI18n()
|
|
26
|
+
|
|
27
|
+
const badge = computed(() =>
|
|
28
|
+
props.policy === 'optional'
|
|
29
|
+
? t('saas.public.card.optional', {
|
|
30
|
+
plan: props.planName ?? t('saas.public.card.free_plan'),
|
|
31
|
+
})
|
|
32
|
+
: t('saas.public.card.required'),
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
const reason = computed(() =>
|
|
36
|
+
t('saas.public.card.reason', {
|
|
37
|
+
count: String(props.maxFreeWorkspacesPerCard ?? 1),
|
|
38
|
+
}),
|
|
39
|
+
)
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<template>
|
|
43
|
+
<div v-if="policy !== 'none'" class="flex flex-col gap-2">
|
|
44
|
+
<div class="flex items-center justify-between gap-2">
|
|
45
|
+
<span class="text-highlighted text-sm font-medium">
|
|
46
|
+
{{ $t('saas.public.card.label') }}
|
|
47
|
+
</span>
|
|
48
|
+
<DmsStatusPill :label="badge" tone="neutral" size="sm" dot="none" />
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<!-- v-show keeps the Stripe element mounted while the step is hidden. -->
|
|
52
|
+
<UFormField
|
|
53
|
+
v-show="isVisible"
|
|
54
|
+
name="card"
|
|
55
|
+
:error="error ?? undefined"
|
|
56
|
+
:help="reason"
|
|
57
|
+
>
|
|
58
|
+
<div
|
|
59
|
+
:id="elementId"
|
|
60
|
+
class="border-default bg-default rounded-md border p-3"
|
|
61
|
+
/>
|
|
62
|
+
</UFormField>
|
|
63
|
+
|
|
64
|
+
<UCheckbox
|
|
65
|
+
v-if="policy === 'optional'"
|
|
66
|
+
v-model="skipsPaymentMethod"
|
|
67
|
+
:label="$t('saas.public.card.later')"
|
|
68
|
+
:description="$t('saas.public.card.later_hint')"
|
|
69
|
+
/>
|
|
70
|
+
</div>
|
|
71
|
+
</template>
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* The plan a sign-up opens the workspace on, with "Change" leading to
|
|
4
|
+
* Pricing, and the paid plan chosen there when there is one.
|
|
5
|
+
*/
|
|
6
|
+
import { computed } from 'vue'
|
|
7
|
+
import { featureHighlights, type RegistrationPlanSummary } from './pricing'
|
|
8
|
+
import { usePublicPlanFormat } from './usePublicPlanFormat'
|
|
9
|
+
|
|
10
|
+
interface RegistrationPlanCardProps {
|
|
11
|
+
summary: RegistrationPlanSummary | null
|
|
12
|
+
isLoading: boolean
|
|
13
|
+
loadError: string | null
|
|
14
|
+
/** Link to Pricing, when the deployment serves it. */
|
|
15
|
+
changeTo: string | null
|
|
16
|
+
/** Defaults to "Change". */
|
|
17
|
+
changeLabel?: string
|
|
18
|
+
/** `_blank` keeps the current screen, e.g. one holding a sign-in token. */
|
|
19
|
+
changeTarget?: string
|
|
20
|
+
/** Lists the plan's main features under it. */
|
|
21
|
+
isDetailed?: boolean
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const props = withDefaults(defineProps<RegistrationPlanCardProps>(), {
|
|
25
|
+
changeLabel: undefined,
|
|
26
|
+
changeTarget: undefined,
|
|
27
|
+
isDetailed: false,
|
|
28
|
+
})
|
|
29
|
+
const emit = defineEmits<{ retry: [] }>()
|
|
30
|
+
|
|
31
|
+
const MAX_HIGHLIGHTS = 4
|
|
32
|
+
|
|
33
|
+
const { priceLabel } = usePublicPlanFormat()
|
|
34
|
+
const { formatFeatureValue } = usePlanFeatureFormat()
|
|
35
|
+
const { processI18n } = useTranslation()
|
|
36
|
+
const planDescription = usePlanDescription()
|
|
37
|
+
|
|
38
|
+
const highlights = computed(() => {
|
|
39
|
+
const summary = props.summary
|
|
40
|
+
if (!summary || !props.isDetailed) return []
|
|
41
|
+
return featureHighlights(summary.plan, null, summary.features)
|
|
42
|
+
.slice(0, MAX_HIGHLIGHTS)
|
|
43
|
+
.map(({ feature, value }) => ({
|
|
44
|
+
id: feature.featureId,
|
|
45
|
+
label:
|
|
46
|
+
feature.valueType === 'boolean'
|
|
47
|
+
? processI18n(feature.displayName)
|
|
48
|
+
: `${formatFeatureValue(feature, value, summary.plan.currency)} ${processI18n(feature.displayName)}`,
|
|
49
|
+
}))
|
|
50
|
+
})
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<USkeleton v-if="isLoading && !summary" class="h-14 w-full rounded-lg" />
|
|
55
|
+
|
|
56
|
+
<DmsBanner
|
|
57
|
+
v-else-if="loadError"
|
|
58
|
+
tone="error"
|
|
59
|
+
size="sm"
|
|
60
|
+
icon="i-ph-warning-circle"
|
|
61
|
+
:title="$t('saas.public.plan_card.load_error')"
|
|
62
|
+
:description="loadError"
|
|
63
|
+
>
|
|
64
|
+
<template #actions>
|
|
65
|
+
<UButton
|
|
66
|
+
size="xs"
|
|
67
|
+
color="neutral"
|
|
68
|
+
variant="outline"
|
|
69
|
+
:label="$t('saas.public.common.retry')"
|
|
70
|
+
@click="emit('retry')"
|
|
71
|
+
/>
|
|
72
|
+
</template>
|
|
73
|
+
</DmsBanner>
|
|
74
|
+
|
|
75
|
+
<div v-else-if="summary" class="flex flex-col gap-2">
|
|
76
|
+
<DmsCard
|
|
77
|
+
:padded="false"
|
|
78
|
+
class="flex items-start justify-between gap-3 px-4 py-3"
|
|
79
|
+
>
|
|
80
|
+
<div class="min-w-0">
|
|
81
|
+
<DmsEyebrow as="span" :label="$t('saas.public.plan_card.eyebrow')" />
|
|
82
|
+
<p class="text-highlighted text-sm font-semibold">
|
|
83
|
+
{{ summary.plan.name }}
|
|
84
|
+
<span class="text-muted font-normal">
|
|
85
|
+
· {{ priceLabel(summary.plan) }}
|
|
86
|
+
</span>
|
|
87
|
+
</p>
|
|
88
|
+
<p
|
|
89
|
+
v-if="isDetailed && summary.plan.description"
|
|
90
|
+
class="text-muted text-xs"
|
|
91
|
+
>
|
|
92
|
+
{{ planDescription(summary.plan.description) }}
|
|
93
|
+
</p>
|
|
94
|
+
<ul
|
|
95
|
+
v-if="highlights.length"
|
|
96
|
+
class="text-muted mt-1.5 flex flex-wrap gap-x-3 text-xs"
|
|
97
|
+
>
|
|
98
|
+
<li v-for="item in highlights" :key="item.id">{{ item.label }}</li>
|
|
99
|
+
</ul>
|
|
100
|
+
</div>
|
|
101
|
+
<UButton
|
|
102
|
+
v-if="changeTo"
|
|
103
|
+
:to="changeTo"
|
|
104
|
+
:target="changeTarget"
|
|
105
|
+
:label="changeLabel ?? $t('saas.public.plan_card.change')"
|
|
106
|
+
size="xs"
|
|
107
|
+
color="neutral"
|
|
108
|
+
variant="ghost"
|
|
109
|
+
/>
|
|
110
|
+
</DmsCard>
|
|
111
|
+
|
|
112
|
+
<p v-if="summary.requestedPlan" class="text-muted flex gap-1.5 text-xs">
|
|
113
|
+
<UIcon name="i-ph-info" class="mt-0.5 size-3.5 shrink-0" />
|
|
114
|
+
{{
|
|
115
|
+
$t('saas.public.plan_card.requested', {
|
|
116
|
+
requested: summary.requestedPlan.name,
|
|
117
|
+
plan: summary.plan.name,
|
|
118
|
+
})
|
|
119
|
+
}}
|
|
120
|
+
</p>
|
|
121
|
+
</div>
|
|
122
|
+
</template>
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
export type AccessBlockReason =
|
|
2
|
+
| 'suspended'
|
|
3
|
+
| 'pending_payment'
|
|
4
|
+
| 'cancelled'
|
|
5
|
+
| 'deleted'
|
|
6
|
+
| 'complimentary_expired'
|
|
7
|
+
|
|
8
|
+
export type AccessTimelineKind =
|
|
9
|
+
| 'invoice_issued'
|
|
10
|
+
| 'payment_failed'
|
|
11
|
+
| 'complimentary_ended'
|
|
12
|
+
| 'suspended'
|
|
13
|
+
| 'awaiting_payment'
|
|
14
|
+
| 'cancelled'
|
|
15
|
+
| 'deleted'
|
|
16
|
+
| 'data_deleted'
|
|
17
|
+
|
|
18
|
+
export interface AccessTimelineEntry {
|
|
19
|
+
kind: AccessTimelineKind
|
|
20
|
+
at: string
|
|
21
|
+
isUpcoming: boolean
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface WorkspaceOwnerContact {
|
|
25
|
+
name: string | null
|
|
26
|
+
email: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface OtherWorkspace {
|
|
30
|
+
_id: string
|
|
31
|
+
name: string
|
|
32
|
+
planName: string | null
|
|
33
|
+
status: string | null
|
|
34
|
+
isTenantOwner: boolean
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface UnpaidInvoiceRef {
|
|
38
|
+
number: string | null
|
|
39
|
+
amount: number
|
|
40
|
+
currency: string
|
|
41
|
+
hostedInvoiceUrl: string | null
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface BlockedWorkspaceSummary {
|
|
45
|
+
_id: string
|
|
46
|
+
name: string
|
|
47
|
+
planId: string | null
|
|
48
|
+
planName: string | null
|
|
49
|
+
memberCount: number
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** `GET /api/saas/workspace-access`. */
|
|
53
|
+
export interface WorkspaceAccessDetails {
|
|
54
|
+
blocked: boolean
|
|
55
|
+
reason: AccessBlockReason | null
|
|
56
|
+
workspace: BlockedWorkspaceSummary
|
|
57
|
+
isTenantOwner: boolean
|
|
58
|
+
owners: WorkspaceOwnerContact[]
|
|
59
|
+
unpaidInvoice: UnpaidInvoiceRef | null
|
|
60
|
+
canManageInStripe: boolean
|
|
61
|
+
timeline: AccessTimelineEntry[]
|
|
62
|
+
dataDeletionAt: string | null
|
|
63
|
+
/** Who deleted the workspace, when an owner did. */
|
|
64
|
+
deletion: WorkspaceDeletionView | null
|
|
65
|
+
otherWorkspaces: OtherWorkspace[]
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface WorkspaceDeletionView {
|
|
69
|
+
at: string
|
|
70
|
+
isByCaller: boolean
|
|
71
|
+
byName: string | null
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface AccessReasonView {
|
|
75
|
+
/** Status the pill shows, from the workspace status vocabulary. */
|
|
76
|
+
status: string
|
|
77
|
+
icon: string
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** The status pill and icon of each reason. */
|
|
81
|
+
export const ACCESS_REASON_VIEWS: Record<AccessBlockReason, AccessReasonView> =
|
|
82
|
+
{
|
|
83
|
+
suspended: { status: 'suspended', icon: 'i-ph-lock-simple' },
|
|
84
|
+
pending_payment: { status: 'pending_payment', icon: 'i-ph-hourglass' },
|
|
85
|
+
cancelled: { status: 'cancelled', icon: 'i-ph-archive' },
|
|
86
|
+
deleted: { status: 'cancelled', icon: 'i-ph-trash' },
|
|
87
|
+
complimentary_expired: { status: 'suspended', icon: 'i-ph-gift' },
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface TimelineStepView {
|
|
91
|
+
icon: string
|
|
92
|
+
tone: 'neutral' | 'warning' | 'error'
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export const TIMELINE_STEP_VIEWS: Record<AccessTimelineKind, TimelineStepView> =
|
|
96
|
+
{
|
|
97
|
+
invoice_issued: { icon: 'i-ph-receipt', tone: 'neutral' },
|
|
98
|
+
payment_failed: { icon: 'i-ph-credit-card', tone: 'error' },
|
|
99
|
+
complimentary_ended: { icon: 'i-ph-gift', tone: 'warning' },
|
|
100
|
+
suspended: { icon: 'i-ph-lock-simple', tone: 'error' },
|
|
101
|
+
awaiting_payment: { icon: 'i-ph-hourglass', tone: 'warning' },
|
|
102
|
+
cancelled: { icon: 'i-ph-archive', tone: 'neutral' },
|
|
103
|
+
deleted: { icon: 'i-ph-trash', tone: 'neutral' },
|
|
104
|
+
data_deleted: { icon: 'i-ph-trash', tone: 'error' },
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const INITIALS_LENGTH = 2
|
|
108
|
+
const WORD_SEPARATOR = /\s+/
|
|
109
|
+
|
|
110
|
+
/** Two letters for a workspace tile: "Northwind Traders" reads "NT". */
|
|
111
|
+
export function workspaceInitials(name: string): string {
|
|
112
|
+
const words = name.trim().split(WORD_SEPARATOR).filter(Boolean)
|
|
113
|
+
const letters =
|
|
114
|
+
words.length >= INITIALS_LENGTH
|
|
115
|
+
? words.slice(0, INITIALS_LENGTH).map((word) => word[0])
|
|
116
|
+
: [...(words[0] ?? '')].slice(0, INITIALS_LENGTH)
|
|
117
|
+
return letters.join('').toUpperCase()
|
|
118
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const CHOSEN_PLAN_STORAGE_KEY = 'dms-saas-chosen-plan'
|
|
2
|
+
|
|
3
|
+
function sessionStore(): Storage | null {
|
|
4
|
+
try {
|
|
5
|
+
return typeof window === 'undefined' ? null : window.sessionStorage
|
|
6
|
+
} catch {
|
|
7
|
+
return null
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Keeps the plan chosen on Pricing across the OAuth round-trip: the provider
|
|
13
|
+
* sends the visitor back to "Set up your first workspace", which has no
|
|
14
|
+
* `?plan=` of its own.
|
|
15
|
+
*
|
|
16
|
+
* @param reference Slug or id of the chosen plan; null forgets it
|
|
17
|
+
*/
|
|
18
|
+
export function rememberChosenPlan(reference: string | null): void {
|
|
19
|
+
const store = sessionStore()
|
|
20
|
+
if (!store) return
|
|
21
|
+
try {
|
|
22
|
+
if (reference) store.setItem(CHOSEN_PLAN_STORAGE_KEY, reference)
|
|
23
|
+
else store.removeItem(CHOSEN_PLAN_STORAGE_KEY)
|
|
24
|
+
} catch {
|
|
25
|
+
/* storage full or refused: the visitor picks the plan again on Billing */
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** The plan chosen on Pricing earlier in this tab, if any. */
|
|
30
|
+
export function readChosenPlan(): string | null {
|
|
31
|
+
try {
|
|
32
|
+
return sessionStore()?.getItem(CHOSEN_PLAN_STORAGE_KEY) ?? null
|
|
33
|
+
} catch {
|
|
34
|
+
return null
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { isInAppPath, LOGIN_PATH, type LegalDocumentField } from './routes'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Version of one document, as Billing rules & legal publishes it: version 0
|
|
5
|
+
* and no date while it was never published.
|
|
6
|
+
*/
|
|
7
|
+
export interface LegalDocumentVersion {
|
|
8
|
+
version: number
|
|
9
|
+
publishedAt: string | null
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** `GET /api/saas/legal-documents`. */
|
|
13
|
+
export interface LegalDocumentsPayload {
|
|
14
|
+
termsOfUse: string
|
|
15
|
+
termsAndConditions: string
|
|
16
|
+
privacyPolicy: string
|
|
17
|
+
versions: Record<LegalDocumentField, LegalDocumentVersion>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface LegalDocumentStamp {
|
|
21
|
+
version: number
|
|
22
|
+
updatedAt: string | null
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface LegalHeading {
|
|
26
|
+
id: string
|
|
27
|
+
text: string
|
|
28
|
+
level: number
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const WORDS_PER_MINUTE = 200
|
|
32
|
+
const HEADING_ID_PREFIX = 'section-'
|
|
33
|
+
const NON_SLUG_CHARACTERS = /[^\p{Letter}\p{Number}]+/gu
|
|
34
|
+
const EDGE_DASHES = /^-+|-+$/g
|
|
35
|
+
const WORD_SEPARATOR = /\s+/
|
|
36
|
+
/**
|
|
37
|
+
* Version and publication date of one document.
|
|
38
|
+
*
|
|
39
|
+
* @param payload Legal documents payload
|
|
40
|
+
* @param field Document to stamp
|
|
41
|
+
*/
|
|
42
|
+
export function legalDocumentStamp(
|
|
43
|
+
payload: LegalDocumentsPayload,
|
|
44
|
+
field: LegalDocumentField,
|
|
45
|
+
): LegalDocumentStamp {
|
|
46
|
+
const published = payload.versions[field]
|
|
47
|
+
return { version: published.version, updatedAt: published.publishedAt }
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* A unique anchor id for a heading, readable in the address bar.
|
|
52
|
+
*
|
|
53
|
+
* @param text Heading text
|
|
54
|
+
* @param taken Ids already given in this document; the new one is added
|
|
55
|
+
*/
|
|
56
|
+
export function headingAnchor(text: string, taken: Set<string>): string {
|
|
57
|
+
const base =
|
|
58
|
+
text
|
|
59
|
+
.toLowerCase()
|
|
60
|
+
.replace(NON_SLUG_CHARACTERS, '-')
|
|
61
|
+
.replace(EDGE_DASHES, '') || String(taken.size + 1)
|
|
62
|
+
let id = `${HEADING_ID_PREFIX}${base}`
|
|
63
|
+
for (let suffix = 2; taken.has(id); suffix++) {
|
|
64
|
+
id = `${HEADING_ID_PREFIX}${base}-${suffix}`
|
|
65
|
+
}
|
|
66
|
+
taken.add(id)
|
|
67
|
+
return id
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** Minutes a document takes to read, never less than one. */
|
|
71
|
+
export function readingMinutes(text: string): number {
|
|
72
|
+
const words = text.trim().split(WORD_SEPARATOR).filter(Boolean).length
|
|
73
|
+
return Math.max(1, Math.ceil(words / WORDS_PER_MINUTE))
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Where "Back" leads: the page named by `?from=`, else the page of this site
|
|
78
|
+
* the visitor followed the link from, else sign-in.
|
|
79
|
+
*
|
|
80
|
+
* @param from `from` query parameter
|
|
81
|
+
* @param referrer `document.referrer`
|
|
82
|
+
* @param origin This site's origin
|
|
83
|
+
* @param currentPath Path of the legal page itself
|
|
84
|
+
*/
|
|
85
|
+
export function resolveLegalBackTarget(
|
|
86
|
+
from: unknown,
|
|
87
|
+
referrer: string,
|
|
88
|
+
origin: string,
|
|
89
|
+
currentPath: string,
|
|
90
|
+
): string {
|
|
91
|
+
if (isInAppPath(from)) return from
|
|
92
|
+
try {
|
|
93
|
+
const url = new URL(referrer)
|
|
94
|
+
const isSameSite = url.origin === origin && url.pathname !== currentPath
|
|
95
|
+
return isSameSite ? `${url.pathname}${url.search}` : LOGIN_PATH
|
|
96
|
+
} catch {
|
|
97
|
+
return LOGIN_PATH
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import type { PlanInterval } from '../../composables/usePlanIntervalLabel'
|
|
2
|
+
import type { TenantPlanFeature } from '../../composables/useTenantPlan'
|
|
3
|
+
import { PLAN_UNLIMITED } from '../plan-catalog'
|
|
4
|
+
|
|
5
|
+
export type PlanBillingMode = 'flat' | 'seat'
|
|
6
|
+
export type RefundMode = 'full' | 'prorated'
|
|
7
|
+
|
|
8
|
+
/** A public plan, as `/api/saas/pricing` and `/api/saas/register/plan` send it. */
|
|
9
|
+
export interface PublicPlan {
|
|
10
|
+
_id: string
|
|
11
|
+
slug: string
|
|
12
|
+
name: string
|
|
13
|
+
description: string
|
|
14
|
+
/** Major units, per interval (and per member for `seat`). */
|
|
15
|
+
price: number
|
|
16
|
+
currency: string
|
|
17
|
+
interval: PlanInterval
|
|
18
|
+
billingMode: PlanBillingMode
|
|
19
|
+
trialDays: number
|
|
20
|
+
/** -1 means unlimited members. */
|
|
21
|
+
maxMembers: number
|
|
22
|
+
borderColor: string | null
|
|
23
|
+
borderLabel: string | null
|
|
24
|
+
order: number
|
|
25
|
+
inheritsFromPlanId: string | null
|
|
26
|
+
featureValues: Record<string, unknown>
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface PublicMoneyBackGuarantee {
|
|
30
|
+
windowDays: number
|
|
31
|
+
mode: RefundMode
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface PublicBillingRules {
|
|
35
|
+
moneyBackGuarantee: PublicMoneyBackGuarantee | null
|
|
36
|
+
dataRetentionDays: number
|
|
37
|
+
maxFreeWorkspacesPerCard: number
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface PublicPricing {
|
|
41
|
+
plans: PublicPlan[]
|
|
42
|
+
features: TenantPlanFeature[]
|
|
43
|
+
rules: PublicBillingRules
|
|
44
|
+
defaultPlanId: string | null
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** What the sign-up screens show about the plan they open the workspace on. */
|
|
48
|
+
export interface RegistrationPlanSummary {
|
|
49
|
+
plan: PublicPlan
|
|
50
|
+
requestedPlan: PublicPlan | null
|
|
51
|
+
features: TenantPlanFeature[]
|
|
52
|
+
rules: PublicBillingRules
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface SeatExample {
|
|
56
|
+
seats: number
|
|
57
|
+
total: number
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface FeatureHighlight {
|
|
61
|
+
feature: TenantPlanFeature
|
|
62
|
+
value: unknown
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface ComparisonRows {
|
|
66
|
+
main: TenantPlanFeature[]
|
|
67
|
+
detail: TenantPlanFeature[]
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** Team size the per-seat price is worked out for, under the plan's cap. */
|
|
71
|
+
const EXAMPLE_SEATS = 10
|
|
72
|
+
const INTERVAL_ORDER: PlanInterval[] = ['month', 'year']
|
|
73
|
+
const NOT_INCLUDED_VALUES = new Set<unknown>([
|
|
74
|
+
0,
|
|
75
|
+
false,
|
|
76
|
+
'',
|
|
77
|
+
'false',
|
|
78
|
+
null,
|
|
79
|
+
undefined,
|
|
80
|
+
])
|
|
81
|
+
|
|
82
|
+
export function isPaidPlan(plan: PublicPlan): boolean {
|
|
83
|
+
return plan.price > 0
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** What a sign-up link names the plan by: its slug, else its id. */
|
|
87
|
+
export function planReference(plan: PublicPlan): string {
|
|
88
|
+
return plan.slug || plan._id
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** 0 / false / empty mean "not included"; −1 and every other value do not. */
|
|
92
|
+
export function isIncludedValue(value: unknown): boolean {
|
|
93
|
+
return !NOT_INCLUDED_VALUES.has(value)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The intervals paid plans are sold in, in a stable order. The interval
|
|
98
|
+
* toggle shows only when there are two of them: a free plan costs the same
|
|
99
|
+
* either way and does not count.
|
|
100
|
+
*/
|
|
101
|
+
export function paidIntervals(plans: PublicPlan[]): PlanInterval[] {
|
|
102
|
+
const sold = new Set(plans.filter(isPaidPlan).map((plan) => plan.interval))
|
|
103
|
+
return INTERVAL_ORDER.filter((interval) => sold.has(interval))
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** The plans shown for an interval: those billed on it, and the free ones. */
|
|
107
|
+
export function plansForInterval(
|
|
108
|
+
plans: PublicPlan[],
|
|
109
|
+
interval: PlanInterval,
|
|
110
|
+
): PublicPlan[] {
|
|
111
|
+
return plans
|
|
112
|
+
.filter((plan) => !isPaidPlan(plan) || plan.interval === interval)
|
|
113
|
+
.sort((left, right) => left.order - right.order)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* A worked example of a per-member price: what a team of ten pays, or a full
|
|
118
|
+
* team when the plan caps members below ten. Null for a flat price.
|
|
119
|
+
*/
|
|
120
|
+
export function seatExample(plan: PublicPlan): SeatExample | null {
|
|
121
|
+
if (plan.billingMode !== 'seat' || !isPaidPlan(plan)) return null
|
|
122
|
+
const isCapped = plan.maxMembers !== PLAN_UNLIMITED && plan.maxMembers > 0
|
|
123
|
+
const seats = isCapped
|
|
124
|
+
? Math.min(EXAMPLE_SEATS, plan.maxMembers)
|
|
125
|
+
: EXAMPLE_SEATS
|
|
126
|
+
return { seats, total: plan.price * seats }
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** The plan `plan` extends, when that one is shown next to it. */
|
|
130
|
+
export function findParentPlan(
|
|
131
|
+
plan: PublicPlan,
|
|
132
|
+
shown: PublicPlan[],
|
|
133
|
+
): PublicPlan | null {
|
|
134
|
+
if (!plan.inheritsFromPlanId) return null
|
|
135
|
+
return shown.find((entry) => entry._id === plan.inheritsFromPlanId) ?? null
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The main features a plan card lists: those it includes, and when it
|
|
140
|
+
* extends a plan shown beside it, only those it improves on.
|
|
141
|
+
*/
|
|
142
|
+
export function featureHighlights(
|
|
143
|
+
plan: PublicPlan,
|
|
144
|
+
parent: PublicPlan | null,
|
|
145
|
+
features: TenantPlanFeature[],
|
|
146
|
+
): FeatureHighlight[] {
|
|
147
|
+
return features
|
|
148
|
+
.filter((feature) => !feature.isDetailRow)
|
|
149
|
+
.map((feature) => ({
|
|
150
|
+
feature,
|
|
151
|
+
value: plan.featureValues[feature.featureId],
|
|
152
|
+
}))
|
|
153
|
+
.filter(({ value }) => isIncludedValue(value))
|
|
154
|
+
.filter(
|
|
155
|
+
({ feature, value }) =>
|
|
156
|
+
!parent || parent.featureValues[feature.featureId] !== value,
|
|
157
|
+
)
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/** Comparison rows in catalogue order, main rows first. */
|
|
161
|
+
export function splitComparisonRows(
|
|
162
|
+
features: TenantPlanFeature[],
|
|
163
|
+
): ComparisonRows {
|
|
164
|
+
const ordered = [...features].sort((left, right) => left.order - right.order)
|
|
165
|
+
return {
|
|
166
|
+
main: ordered.filter((feature) => !feature.isDetailRow),
|
|
167
|
+
detail: ordered.filter((feature) => feature.isDetailRow),
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** One currency for every plan shown, or null when they differ. */
|
|
172
|
+
export function sharedCurrency(plans: PublicPlan[]): string | null {
|
|
173
|
+
const currencies = new Set(plans.map((plan) => plan.currency.toUpperCase()))
|
|
174
|
+
return currencies.size === 1 ? [...currencies][0]! : null
|
|
175
|
+
}
|