@antelopejs/dms-saas 0.4.0 → 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 +37 -2
- 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 +7 -2
- package/dist/data-api/platformOwner/features.js +151 -37
- 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 -55
- 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 +44 -41
- package/dist/routes/platformOwner/plans.js +155 -142
- 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 +124 -16
- 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/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 +8 -0
- package/dist/utils/index.js +8 -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 -309
- 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 -280
- 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/plugins/plan-cards-display.ts +0 -16
- package/frontend-vue/app/plugins/segment-conditions-data-type.client.ts +0 -122
|
@@ -1,309 +1,664 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed, onMounted, ref } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
const { t, locale } = useI18n()
|
|
23
|
-
const {
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const {
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
2
|
+
import { computed, onMounted, ref, watch } from 'vue'
|
|
3
|
+
import type { DropdownMenuItem } from '@nuxt/ui'
|
|
4
|
+
import { useWorkspaceName } from '../build/useWorkspaceName'
|
|
5
|
+
import { UPGRADE_QUERY_PARAM } from '../composables/usePlanChangeReview'
|
|
6
|
+
import { BILLING_CHOOSE_PLAN_PARAM } from '../build/public/routes'
|
|
7
|
+
|
|
8
|
+
const KEY_PREFIX = 'saas.tenant_billing.plan'
|
|
9
|
+
const MEMBERS_PATH = '/settings/workspace/members'
|
|
10
|
+
const DATA_EXPORT_PATH = '/settings/workspace/data-export'
|
|
11
|
+
const FREE_STATE = 'free'
|
|
12
|
+
const ACTIVE_STATUS = 'active'
|
|
13
|
+
const TRIALING_STATUS = 'trialing'
|
|
14
|
+
const PAST_DUE_STATUS = 'past_due'
|
|
15
|
+
const DAY_FORMAT: Intl.DateTimeFormatOptions = {
|
|
16
|
+
day: 'numeric',
|
|
17
|
+
month: 'short',
|
|
18
|
+
year: 'numeric',
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const toast = useToast()
|
|
22
|
+
const { t, locale } = useI18n()
|
|
23
|
+
const { confirm } = useConfirm()
|
|
24
|
+
const { resolveApiError } = useApiErrorMessage()
|
|
25
|
+
const tenantPlan = useTenantPlan()
|
|
26
|
+
const { data, error: loadError } = tenantPlan
|
|
27
|
+
const billingStatus = useBillingStatus()
|
|
28
|
+
const nextInvoice = useNextInvoice()
|
|
29
|
+
const { formatMajorUnits, formatMinorUnits } = useMoneyFormat()
|
|
30
|
+
const { statusView } = useSaasStatus()
|
|
31
|
+
const planDescription = usePlanDescription()
|
|
32
|
+
const { formatFeatureValue } = usePlanFeatureFormat()
|
|
33
|
+
const comparison = usePlanComparison()
|
|
34
|
+
const { consumeCancelledCheckout } = usePendingCheckout()
|
|
35
|
+
const { workspace, load: loadWorkspace } = useCurrentWorkspace()
|
|
36
|
+
const planIntervalLabel = usePlanIntervalLabel('saas.workspace.plan.interval')
|
|
37
|
+
const workspaceName = useWorkspaceName()
|
|
38
|
+
const myWorkspaces = useMyWorkspaces()
|
|
39
|
+
const route = useDmsRoute()
|
|
40
|
+
const router = useDmsRouter()
|
|
41
|
+
|
|
42
|
+
const isLoading = ref(true)
|
|
43
|
+
const isWorking = ref(false)
|
|
44
|
+
const isUpgradeOpen = ref(false)
|
|
45
|
+
const upgradeTarget = ref<OfferedPlanView | null>(null)
|
|
46
|
+
|
|
47
|
+
const current = computed(() => data.value?.current ?? null)
|
|
48
|
+
const seats = computed<SeatsInUse>(
|
|
49
|
+
() => data.value?.seats ?? { members: 0, pendingInvites: 0, occupied: 0 },
|
|
50
|
+
)
|
|
51
|
+
const pendingPlan = computed(() => data.value?.pendingPlan ?? null)
|
|
52
|
+
const status = computed(() => billingStatus.data.value)
|
|
53
|
+
const isTenantOwner = computed(() => !!status.value?.isTenantOwner)
|
|
54
|
+
const isPaid = computed(() => (current.value?.price ?? 0) > 0)
|
|
55
|
+
const isSeatPlan = computed(() => current.value?.billingMode === 'seat')
|
|
56
|
+
const cancellationAt = computed(
|
|
57
|
+
() => status.value?.scheduledCancellationAt ?? null,
|
|
58
|
+
)
|
|
59
|
+
const canResubscribe = computed(() => !!data.value?.canResubscribe)
|
|
60
|
+
const isStripeBilled = computed(
|
|
61
|
+
() =>
|
|
62
|
+
!!status.value?.hasStripeCustomer &&
|
|
63
|
+
isPaid.value &&
|
|
64
|
+
!data.value?.isComplimentary &&
|
|
65
|
+
!canResubscribe.value,
|
|
66
|
+
)
|
|
39
67
|
|
|
40
68
|
/** The card is readable on a blocked workspace's billing page, but plan
|
|
41
69
|
* mutations stay gated server-side: settling the invoice comes first. */
|
|
42
70
|
const isAccessBlocked = computed(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
/** Plan mutations are owner-only server-side; a member gets the read-only
|
|
58
|
-
* card instead of buttons that can only end in a 403 toast. */
|
|
59
|
-
const isTenantOwner = computed(() => !!billingStatus.value?.isTenantOwner);
|
|
60
|
-
|
|
61
|
-
function formatDay(value: string | null | undefined): string | null {
|
|
62
|
-
return formatDate(value, locale.value, FULL_DATE_FORMAT);
|
|
71
|
+
() =>
|
|
72
|
+
isBlockingSubscriptionStatus(data.value?.status) &&
|
|
73
|
+
!data.value?.canRecoverComplimentary &&
|
|
74
|
+
!canResubscribe.value,
|
|
75
|
+
)
|
|
76
|
+
const canChangePlan = computed(
|
|
77
|
+
() =>
|
|
78
|
+
isTenantOwner.value &&
|
|
79
|
+
!isAccessBlocked.value &&
|
|
80
|
+
!data.value?.isPlanChangeLocked,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
function day(value: string | null | undefined): string {
|
|
84
|
+
return formatDate(value, locale.value, DAY_FORMAT) ?? ''
|
|
63
85
|
}
|
|
64
86
|
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
plan: pending.planName,
|
|
74
|
-
date,
|
|
75
|
-
})
|
|
76
|
-
: t("saas.workspace.plan.pending_downgrade", { plan: pending.planName });
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
/** A workspace still on Free is being asked to convert, not to switch: the
|
|
80
|
-
* button carries the primary weight and different copy. */
|
|
81
|
-
const changeAction = computed(() =>
|
|
82
|
-
isPaid.value
|
|
83
|
-
? { color: "neutral" as const, variant: "subtle" as const, key: "change" }
|
|
84
|
-
: { color: "primary" as const, variant: "solid" as const, key: "go_paid" },
|
|
85
|
-
);
|
|
87
|
+
const pill = computed(() => {
|
|
88
|
+
const subscriptionStatus = data.value?.status ?? null
|
|
89
|
+
const state =
|
|
90
|
+
subscriptionStatus === ACTIVE_STATUS && !isPaid.value
|
|
91
|
+
? FREE_STATE
|
|
92
|
+
: subscriptionStatus
|
|
93
|
+
return statusView('workspace', state)
|
|
94
|
+
})
|
|
86
95
|
|
|
87
|
-
/**
|
|
88
|
-
* One line on what the plan includes: the catalogue's own description when it
|
|
89
|
-
* has one, else the plan's key (non-detail) limits.
|
|
90
|
-
*/
|
|
91
96
|
const summary = computed(() => {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
function openUpgrade(plan: TenantPlanView): void {
|
|
113
|
-
upgradeTarget.value = plan;
|
|
114
|
-
isUpgradeOpen.value = true;
|
|
115
|
-
}
|
|
97
|
+
if (current.value?.description)
|
|
98
|
+
return planDescription(current.value.description)
|
|
99
|
+
const view = data.value?.available.find(
|
|
100
|
+
(plan) => plan._id === current.value?._id,
|
|
101
|
+
)
|
|
102
|
+
if (!view || !data.value) return ''
|
|
103
|
+
return data.value.features
|
|
104
|
+
.filter(
|
|
105
|
+
(feature) =>
|
|
106
|
+
!feature.isDetailRow &&
|
|
107
|
+
view.featureValues[feature.featureId] !== undefined,
|
|
108
|
+
)
|
|
109
|
+
.map(
|
|
110
|
+
(feature) =>
|
|
111
|
+
`${feature.displayName} ${formatFeatureValue(feature, view.featureValues[feature.featureId], view.currency)}`,
|
|
112
|
+
)
|
|
113
|
+
.join(' · ')
|
|
114
|
+
})
|
|
116
115
|
|
|
116
|
+
const planPriceLabel = usePlanPriceLabel()
|
|
117
117
|
const priceLabel = computed(() =>
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
)
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
118
|
+
current.value ? planPriceLabel(current.value) : '',
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
const seatArithmetic = computed(() => {
|
|
122
|
+
const plan = current.value
|
|
123
|
+
if (!plan || !isSeatPlan.value || !isPaid.value) return null
|
|
124
|
+
return {
|
|
125
|
+
unit: formatMajorUnits(plan.price, plan.currency),
|
|
126
|
+
seats: seats.value.occupied,
|
|
127
|
+
total: formatMajorUnits(plan.price * seats.value.occupied, plan.currency),
|
|
128
|
+
interval: planIntervalLabel(plan.interval),
|
|
129
|
+
}
|
|
130
|
+
})
|
|
131
|
+
|
|
132
|
+
const meterSegments = computed(() => [
|
|
133
|
+
{
|
|
134
|
+
value: seats.value.members,
|
|
135
|
+
tone: 'primary' as const,
|
|
136
|
+
label: t(
|
|
137
|
+
`${KEY_PREFIX}.members`,
|
|
138
|
+
{ count: seats.value.members },
|
|
139
|
+
seats.value.members,
|
|
140
|
+
),
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
value: seats.value.pendingInvites,
|
|
144
|
+
tone: 'soft' as const,
|
|
145
|
+
label: t(
|
|
146
|
+
`${KEY_PREFIX}.invites`,
|
|
147
|
+
{ count: seats.value.pendingInvites },
|
|
148
|
+
seats.value.pendingInvites,
|
|
149
|
+
),
|
|
150
|
+
},
|
|
151
|
+
])
|
|
152
|
+
|
|
153
|
+
const seatHint = computed(() => {
|
|
154
|
+
const max = current.value?.maxMembers ?? 0
|
|
155
|
+
const free = Math.max(max - seats.value.occupied, 0)
|
|
156
|
+
return max > 0
|
|
157
|
+
? t(`${KEY_PREFIX}.seats_hint`, { used: seats.value.occupied, free })
|
|
158
|
+
: t(
|
|
159
|
+
`${KEY_PREFIX}.seats_unlimited`,
|
|
160
|
+
{ used: seats.value.occupied },
|
|
161
|
+
seats.value.occupied,
|
|
162
|
+
)
|
|
163
|
+
})
|
|
164
|
+
|
|
165
|
+
/** "Nov 8, 2026 · €34.80 incl. VAT" once Stripe's preview answers. */
|
|
166
|
+
function renewalValue(periodEnd: string): string {
|
|
167
|
+
const date = day(periodEnd)
|
|
168
|
+
const total = nextInvoice.data.value?.totalMinorUnits
|
|
169
|
+
if (typeof total !== 'number') return date
|
|
170
|
+
const amount = formatMinorUnits(total, nextInvoice.data.value?.currency)
|
|
171
|
+
return t(`${KEY_PREFIX}.next_renewal_amount`, { date, amount })
|
|
133
172
|
}
|
|
134
173
|
|
|
135
|
-
|
|
136
|
-
|
|
174
|
+
const facts = computed(() => {
|
|
175
|
+
const plan = current.value
|
|
176
|
+
if (!plan || !data.value) return []
|
|
177
|
+
const items = []
|
|
178
|
+
if (isPaid.value && !data.value.isComplimentary) {
|
|
179
|
+
const since = day(data.value.paidUsageStartedAt)
|
|
180
|
+
items.push({
|
|
181
|
+
label: t(`${KEY_PREFIX}.billing`),
|
|
182
|
+
value: since
|
|
183
|
+
? t(`${KEY_PREFIX}.interval_since.${plan.interval}`, { date: since })
|
|
184
|
+
: t(`${KEY_PREFIX}.interval.${plan.interval}`),
|
|
185
|
+
})
|
|
186
|
+
}
|
|
187
|
+
if (data.value.status === TRIALING_STATUS && data.value.currentPeriodEnd) {
|
|
188
|
+
items.push({
|
|
189
|
+
label: t(`${KEY_PREFIX}.trial_until`),
|
|
190
|
+
value: day(data.value.currentPeriodEnd),
|
|
191
|
+
})
|
|
192
|
+
} else if (
|
|
193
|
+
isStripeBilled.value &&
|
|
194
|
+
data.value.currentPeriodEnd &&
|
|
195
|
+
!cancellationAt.value
|
|
196
|
+
) {
|
|
197
|
+
items.push({
|
|
198
|
+
label: t(`${KEY_PREFIX}.next_renewal`),
|
|
199
|
+
value: renewalValue(data.value.currentPeriodEnd),
|
|
200
|
+
})
|
|
201
|
+
}
|
|
202
|
+
return items
|
|
203
|
+
})
|
|
204
|
+
|
|
205
|
+
const pastDueNote = computed(() => {
|
|
206
|
+
if (data.value?.status !== PAST_DUE_STATUS) return null
|
|
207
|
+
const invoice = status.value?.unpaidInvoice?.number
|
|
208
|
+
return invoice
|
|
209
|
+
? t(`${KEY_PREFIX}.downgrades_paused_invoice`, { invoice })
|
|
210
|
+
: t(`${KEY_PREFIX}.downgrades_paused`)
|
|
211
|
+
})
|
|
212
|
+
|
|
213
|
+
const blockedHint = computed(() =>
|
|
214
|
+
status.value?.unpaidInvoice
|
|
215
|
+
? t(`${KEY_PREFIX}.blocked_hint`)
|
|
216
|
+
: t(`${KEY_PREFIX}.blocked_hint_inactive`),
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
const menuItems = computed<DropdownMenuItem[][]>(() => {
|
|
220
|
+
const items: DropdownMenuItem[][] = [
|
|
221
|
+
[
|
|
222
|
+
{
|
|
223
|
+
label: t(`${KEY_PREFIX}.change`),
|
|
224
|
+
icon: 'i-ph-stack',
|
|
225
|
+
onSelect: () => comparison.open(),
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
label: t(`${KEY_PREFIX}.manage_seats`),
|
|
229
|
+
icon: 'i-ph-users-three',
|
|
230
|
+
to: MEMBERS_PATH,
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
]
|
|
234
|
+
if (isStripeBilled.value && !cancellationAt.value) {
|
|
235
|
+
items.push([
|
|
236
|
+
{
|
|
237
|
+
label: t(`${KEY_PREFIX}.cancel_subscription`),
|
|
238
|
+
icon: 'i-ph-x-circle',
|
|
239
|
+
color: 'error',
|
|
240
|
+
onSelect: () => void cancelSubscription(),
|
|
241
|
+
},
|
|
242
|
+
])
|
|
243
|
+
}
|
|
244
|
+
return items
|
|
245
|
+
})
|
|
246
|
+
|
|
247
|
+
function openUpgrade(plan: OfferedPlanView): void {
|
|
248
|
+
upgradeTarget.value = plan
|
|
249
|
+
isUpgradeOpen.value = true
|
|
137
250
|
}
|
|
138
251
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
} catch (error) {
|
|
150
|
-
toast.add({
|
|
151
|
-
title: resolveApiError(error, "saas.workspace.plan.change_error"),
|
|
152
|
-
color: "error",
|
|
153
|
-
icon: "i-ph-warning-circle",
|
|
154
|
-
});
|
|
155
|
-
} finally {
|
|
156
|
-
isCancelling.value = false;
|
|
157
|
-
}
|
|
252
|
+
// The page's stock blocks (the complimentary banner, the next invoice) and
|
|
253
|
+
// the sidebar switcher, which names the plan, read it too: they read their
|
|
254
|
+
// routes again once it changed.
|
|
255
|
+
async function refresh(): Promise<void> {
|
|
256
|
+
isLoading.value = true
|
|
257
|
+
void nextInvoice.refresh()
|
|
258
|
+
void myWorkspaces.refresh().catch(() => undefined)
|
|
259
|
+
await Promise.all([tenantPlan.refresh(), billingStatus.refresh()])
|
|
260
|
+
isLoading.value = false
|
|
261
|
+
refreshPageBlocks()
|
|
158
262
|
}
|
|
159
263
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
264
|
+
async function runAction(
|
|
265
|
+
action: () => Promise<unknown>,
|
|
266
|
+
successKey: string,
|
|
267
|
+
): Promise<void> {
|
|
268
|
+
isWorking.value = true
|
|
269
|
+
try {
|
|
270
|
+
await action()
|
|
271
|
+
toast.add({
|
|
272
|
+
title: t(successKey),
|
|
273
|
+
color: 'success',
|
|
274
|
+
icon: 'i-ph-check-circle',
|
|
275
|
+
})
|
|
276
|
+
await refresh()
|
|
277
|
+
} catch (error) {
|
|
278
|
+
toast.add({
|
|
279
|
+
title: resolveApiError(error, 'saas.workspace.plan.change_error'),
|
|
280
|
+
color: 'error',
|
|
281
|
+
icon: 'i-ph-warning-circle',
|
|
282
|
+
})
|
|
283
|
+
} finally {
|
|
284
|
+
isWorking.value = false
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function cancelDowngrade(): Promise<void> {
|
|
289
|
+
return runAction(
|
|
290
|
+
tenantPlan.cancelPendingChange,
|
|
291
|
+
`${KEY_PREFIX}.downgrade_cancelled`,
|
|
292
|
+
)
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
function keepSubscription(): Promise<void> {
|
|
296
|
+
return runAction(
|
|
297
|
+
tenantPlan.keepSubscription,
|
|
298
|
+
`${KEY_PREFIX}.subscription_kept`,
|
|
299
|
+
)
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
async function cancelSubscription(): Promise<void> {
|
|
303
|
+
await loadWorkspace().catch(() => undefined)
|
|
304
|
+
const params = {
|
|
305
|
+
workspace: workspaceName.value,
|
|
306
|
+
plan: current.value?.name ?? '',
|
|
307
|
+
date: day(data.value?.currentPeriodEnd),
|
|
308
|
+
retention: workspace.value?.retentionDays ?? 0,
|
|
309
|
+
}
|
|
310
|
+
await confirm({
|
|
311
|
+
title: t(`${KEY_PREFIX}.cancel_title`, params),
|
|
312
|
+
description: t(`${KEY_PREFIX}.cancel_description`, params),
|
|
313
|
+
color: 'error',
|
|
314
|
+
icon: 'i-ph-x-circle',
|
|
315
|
+
initialFocus: 'cancel',
|
|
316
|
+
confirmLabel: t(`${KEY_PREFIX}.cancel_confirm`, params),
|
|
317
|
+
cancelLabel: t(`${KEY_PREFIX}.cancel_keep`),
|
|
318
|
+
impact: [
|
|
319
|
+
{
|
|
320
|
+
icon: 'i-ph-calendar',
|
|
321
|
+
label: t(`${KEY_PREFIX}.cancel_access_until`),
|
|
322
|
+
count: params.date,
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
icon: 'i-ph-users-three',
|
|
326
|
+
label: t(`${KEY_PREFIX}.cancel_members`, params),
|
|
327
|
+
count: seats.value.members,
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
icon: 'i-ph-database',
|
|
331
|
+
label: t(`${KEY_PREFIX}.cancel_data`),
|
|
332
|
+
count: t(`${KEY_PREFIX}.cancel_data_days`, params, params.retention),
|
|
333
|
+
},
|
|
334
|
+
],
|
|
335
|
+
body: () => t(`${KEY_PREFIX}.cancel_note`),
|
|
336
|
+
onConfirm: async () => {
|
|
337
|
+
try {
|
|
338
|
+
await tenantPlan.cancelSubscription()
|
|
339
|
+
} catch (error) {
|
|
340
|
+
throw new Error(
|
|
341
|
+
resolveApiError(error, 'saas.workspace.plan.change_error'),
|
|
342
|
+
)
|
|
343
|
+
}
|
|
344
|
+
toast.add({
|
|
345
|
+
title: t(`${KEY_PREFIX}.cancel_scheduled`, params),
|
|
346
|
+
color: 'success',
|
|
347
|
+
icon: 'i-ph-check-circle',
|
|
348
|
+
})
|
|
349
|
+
await refresh()
|
|
350
|
+
},
|
|
351
|
+
})
|
|
165
352
|
}
|
|
166
353
|
|
|
167
354
|
/** Back from Stripe's cancel link: the checkout left behind is released
|
|
168
355
|
* before the card loads, so the plan buttons work straight away. */
|
|
169
356
|
async function releaseCancelledCheckout(): Promise<void> {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
357
|
+
try {
|
|
358
|
+
const { released } = await consumeCancelledCheckout()
|
|
359
|
+
if (!released) return
|
|
360
|
+
toast.add({
|
|
361
|
+
title: t('saas.workspace.plan.checkout_pending.cancelled'),
|
|
362
|
+
color: 'info',
|
|
363
|
+
icon: 'i-ph-info',
|
|
364
|
+
})
|
|
365
|
+
} catch (error) {
|
|
366
|
+
toast.add({
|
|
367
|
+
title: resolveApiError(
|
|
368
|
+
error,
|
|
369
|
+
'saas.workspace.plan.checkout_pending.restart_error',
|
|
370
|
+
),
|
|
371
|
+
color: 'error',
|
|
372
|
+
icon: 'i-ph-warning-circle',
|
|
373
|
+
})
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* `?upgrade=<planId>` (sent after registering with a paid plan) opens the
|
|
379
|
+
* change on that plan's review, or on Compare when the plan is not offered.
|
|
380
|
+
* The parameter is dropped either way, so a reload does not replay it.
|
|
381
|
+
*/
|
|
382
|
+
async function consumeUpgradeParam(): Promise<void> {
|
|
383
|
+
const planId = readUpgradeParam(route.query)
|
|
384
|
+
if (!planId) return
|
|
385
|
+
const { [UPGRADE_QUERY_PARAM]: _upgrade, ...query } = route.query
|
|
386
|
+
await router.replace({ query })
|
|
387
|
+
if (!canChangePlan.value || !data.value) return
|
|
388
|
+
const { offered } = splitOfferedPlans(
|
|
389
|
+
data.value.available,
|
|
390
|
+
seats.value,
|
|
391
|
+
current.value?._id ?? null,
|
|
392
|
+
)
|
|
393
|
+
const plan = offered.find((candidate) => candidate._id === planId)
|
|
394
|
+
// A workspace waiting for its first payment, or cancelled, pays for its
|
|
395
|
+
// own plan again through Stripe's payment page.
|
|
396
|
+
const isChoosingAnew =
|
|
397
|
+
canResubscribe.value || !!data.value.canRecoverComplimentary
|
|
398
|
+
if (!plan || (plan._id === current.value?._id && !isChoosingAnew)) {
|
|
399
|
+
comparison.open()
|
|
400
|
+
return
|
|
401
|
+
}
|
|
402
|
+
if ((!isPaid.value || isChoosingAnew) && plan.price > 0) {
|
|
403
|
+
openUpgrade(plan)
|
|
404
|
+
return
|
|
405
|
+
}
|
|
406
|
+
comparison.openReview(plan._id)
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* `?choose-plan` (sent by the access-restricted screen and the complimentary
|
|
411
|
+
* banner) opens Compare.
|
|
412
|
+
*/
|
|
413
|
+
async function consumeChoosePlanParam(): Promise<void> {
|
|
414
|
+
if (route.query[BILLING_CHOOSE_PLAN_PARAM] === undefined) return
|
|
415
|
+
const { [BILLING_CHOOSE_PLAN_PARAM]: _choosePlan, ...query } = route.query
|
|
416
|
+
await router.replace({ query })
|
|
417
|
+
// Owners compare plans even while an administrator manages the plan
|
|
418
|
+
// (complimentary access): choosing a paid one is how they keep access.
|
|
419
|
+
if (isTenantOwner.value) comparison.open()
|
|
188
420
|
}
|
|
189
421
|
|
|
190
422
|
onMounted(async () => {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
423
|
+
await releaseCancelledCheckout()
|
|
424
|
+
void nextInvoice.load()
|
|
425
|
+
await Promise.all([tenantPlan.load(), billingStatus.load()])
|
|
426
|
+
isLoading.value = false
|
|
427
|
+
await consumeUpgradeParam()
|
|
428
|
+
await consumeChoosePlanParam()
|
|
429
|
+
})
|
|
430
|
+
|
|
431
|
+
// The complimentary banner links the same page with `?choose-plan`: the
|
|
432
|
+
// card stays mounted, so it answers the query as it changes too.
|
|
433
|
+
watch(
|
|
434
|
+
() => route.query[BILLING_CHOOSE_PLAN_PARAM],
|
|
435
|
+
(value) => {
|
|
436
|
+
if (value !== undefined && !isLoading.value) void consumeChoosePlanParam()
|
|
437
|
+
},
|
|
438
|
+
)
|
|
195
439
|
</script>
|
|
196
440
|
|
|
197
441
|
<template>
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
442
|
+
<DmsCard :title="$t(`${KEY_PREFIX}.title`)">
|
|
443
|
+
<template v-if="canChangePlan && current" #actions>
|
|
444
|
+
<UButton
|
|
445
|
+
v-if="canResubscribe"
|
|
446
|
+
size="sm"
|
|
447
|
+
color="primary"
|
|
448
|
+
icon="i-ph-stack"
|
|
449
|
+
@click="comparison.open()"
|
|
450
|
+
>
|
|
451
|
+
{{ $t(`${KEY_PREFIX}.resubscribe`) }}
|
|
452
|
+
</UButton>
|
|
453
|
+
<UButton
|
|
454
|
+
v-else
|
|
455
|
+
size="sm"
|
|
456
|
+
:color="isPaid ? 'neutral' : 'primary'"
|
|
457
|
+
:variant="isPaid ? 'subtle' : 'solid'"
|
|
458
|
+
icon="i-ph-stack"
|
|
459
|
+
@click="comparison.open()"
|
|
460
|
+
>
|
|
461
|
+
{{ isPaid ? $t(`${KEY_PREFIX}.change`) : $t(`${KEY_PREFIX}.go_paid`) }}
|
|
462
|
+
</UButton>
|
|
463
|
+
<UDropdownMenu :items="menuItems">
|
|
464
|
+
<UButton
|
|
465
|
+
size="sm"
|
|
466
|
+
color="neutral"
|
|
467
|
+
variant="ghost"
|
|
468
|
+
icon="i-ph-dots-three"
|
|
469
|
+
:aria-label="$t(`${KEY_PREFIX}.more`)"
|
|
470
|
+
/>
|
|
471
|
+
</UDropdownMenu>
|
|
472
|
+
</template>
|
|
473
|
+
|
|
474
|
+
<div v-if="isLoading && !data" class="flex flex-col gap-3">
|
|
475
|
+
<USkeleton class="h-7 w-48" />
|
|
476
|
+
<USkeleton class="h-4 w-full" />
|
|
477
|
+
<USkeleton class="h-2 w-full" />
|
|
478
|
+
</div>
|
|
479
|
+
|
|
480
|
+
<DmsSaasLoadFailure
|
|
481
|
+
v-else-if="loadError && !data"
|
|
482
|
+
:title="$t(`${KEY_PREFIX}.load_failed`)"
|
|
483
|
+
@retry="refresh"
|
|
484
|
+
/>
|
|
485
|
+
|
|
486
|
+
<DmsEmptyState
|
|
487
|
+
v-else-if="data && !current"
|
|
488
|
+
size="sm"
|
|
489
|
+
icon="i-ph-stack"
|
|
490
|
+
:title="$t(`${KEY_PREFIX}.none_title`)"
|
|
491
|
+
:description="$t(`${KEY_PREFIX}.none_description`)"
|
|
492
|
+
/>
|
|
493
|
+
|
|
494
|
+
<div v-else-if="data && current" class="flex flex-col gap-4">
|
|
495
|
+
<div class="flex flex-wrap items-start gap-4">
|
|
496
|
+
<div class="min-w-60 grow">
|
|
497
|
+
<p class="flex items-center gap-2">
|
|
498
|
+
<span class="text-highlighted text-lg font-semibold">
|
|
499
|
+
{{ current.name }}
|
|
500
|
+
</span>
|
|
501
|
+
<DmsStatusPill :tone="pill.tone" :label="pill.label" />
|
|
502
|
+
</p>
|
|
503
|
+
<p v-if="summary" class="text-muted mt-1 text-sm">{{ summary }}</p>
|
|
504
|
+
</div>
|
|
505
|
+
<p class="text-highlighted text-xl font-semibold tabular-nums">
|
|
506
|
+
{{ priceLabel }}
|
|
507
|
+
</p>
|
|
508
|
+
</div>
|
|
509
|
+
|
|
510
|
+
<p
|
|
511
|
+
v-if="seatArithmetic"
|
|
512
|
+
class="flex flex-wrap items-baseline gap-2 text-sm"
|
|
513
|
+
>
|
|
514
|
+
<span class="tabular-nums">
|
|
515
|
+
{{ $t(`${KEY_PREFIX}.per_seat`, seatArithmetic) }}
|
|
516
|
+
</span>
|
|
517
|
+
<span class="text-muted">×</span>
|
|
518
|
+
<span class="tabular-nums">
|
|
519
|
+
{{
|
|
520
|
+
$t(
|
|
521
|
+
`${KEY_PREFIX}.seats_billed`,
|
|
522
|
+
seatArithmetic,
|
|
523
|
+
seatArithmetic.seats,
|
|
524
|
+
)
|
|
525
|
+
}}
|
|
526
|
+
</span>
|
|
527
|
+
<span class="text-muted">=</span>
|
|
528
|
+
<span class="font-semibold tabular-nums">
|
|
529
|
+
{{ $t(`${KEY_PREFIX}.total_excl_tax`, seatArithmetic) }}
|
|
530
|
+
</span>
|
|
531
|
+
</p>
|
|
532
|
+
|
|
533
|
+
<DmsMeter
|
|
534
|
+
v-if="current.maxMembers > 0"
|
|
535
|
+
:label="$t(`${KEY_PREFIX}.seats`)"
|
|
536
|
+
:hint="seatHint"
|
|
537
|
+
:max="current.maxMembers"
|
|
538
|
+
:segments="meterSegments"
|
|
539
|
+
format="fraction"
|
|
540
|
+
legend
|
|
541
|
+
:warn-at="80"
|
|
542
|
+
:error-at="100"
|
|
543
|
+
size="sm"
|
|
544
|
+
>
|
|
545
|
+
<template #legend-end>
|
|
546
|
+
<ULink :to="MEMBERS_PATH" class="text-primary text-xs">
|
|
547
|
+
{{ $t(`${KEY_PREFIX}.manage_members`) }}
|
|
548
|
+
</ULink>
|
|
549
|
+
</template>
|
|
550
|
+
</DmsMeter>
|
|
551
|
+
<p v-else class="text-muted text-sm">{{ seatHint }}</p>
|
|
552
|
+
|
|
553
|
+
<DmsKeyValueList v-if="facts.length" :items="facts" dense />
|
|
554
|
+
|
|
555
|
+
<DmsBanner
|
|
556
|
+
v-if="pendingPlan"
|
|
557
|
+
size="sm"
|
|
558
|
+
tone="warning"
|
|
559
|
+
icon="i-ph-calendar"
|
|
560
|
+
:title="
|
|
561
|
+
$t(`${KEY_PREFIX}.pending_downgrade`, {
|
|
562
|
+
plan: pendingPlan.planName,
|
|
563
|
+
date: day(pendingPlan.effectiveAt),
|
|
564
|
+
})
|
|
565
|
+
"
|
|
566
|
+
>
|
|
567
|
+
<template v-if="isTenantOwner" #actions>
|
|
568
|
+
<UButton
|
|
569
|
+
size="xs"
|
|
570
|
+
color="neutral"
|
|
571
|
+
variant="outline"
|
|
572
|
+
:loading="isWorking"
|
|
573
|
+
@click="cancelDowngrade"
|
|
574
|
+
>
|
|
575
|
+
{{ $t(`${KEY_PREFIX}.cancel_downgrade`) }}
|
|
576
|
+
</UButton>
|
|
577
|
+
</template>
|
|
578
|
+
</DmsBanner>
|
|
579
|
+
|
|
580
|
+
<DmsBanner
|
|
581
|
+
v-if="cancellationAt"
|
|
582
|
+
size="sm"
|
|
583
|
+
tone="error"
|
|
584
|
+
icon="i-ph-calendar-x"
|
|
585
|
+
:title="
|
|
586
|
+
$t(`${KEY_PREFIX}.cancels_on`, {
|
|
587
|
+
plan: current.name,
|
|
588
|
+
date: day(cancellationAt),
|
|
589
|
+
})
|
|
590
|
+
"
|
|
591
|
+
:description="$t(`${KEY_PREFIX}.cancels_hint`)"
|
|
592
|
+
>
|
|
593
|
+
<template v-if="isTenantOwner" #actions>
|
|
594
|
+
<UButton
|
|
595
|
+
size="xs"
|
|
596
|
+
color="neutral"
|
|
597
|
+
variant="outline"
|
|
598
|
+
:loading="isWorking"
|
|
599
|
+
@click="keepSubscription"
|
|
600
|
+
>
|
|
601
|
+
{{ $t(`${KEY_PREFIX}.keep_subscription`) }}
|
|
602
|
+
</UButton>
|
|
603
|
+
<UButton
|
|
604
|
+
size="xs"
|
|
605
|
+
color="neutral"
|
|
606
|
+
variant="ghost"
|
|
607
|
+
:to="DATA_EXPORT_PATH"
|
|
608
|
+
>
|
|
609
|
+
{{ $t(`${KEY_PREFIX}.export_data`) }}
|
|
610
|
+
</UButton>
|
|
611
|
+
</template>
|
|
612
|
+
</DmsBanner>
|
|
613
|
+
|
|
614
|
+
<p v-if="pastDueNote && !isAccessBlocked" class="text-muted text-sm">
|
|
615
|
+
<UIcon name="i-ph-info" class="me-1 align-middle" />
|
|
616
|
+
{{ pastDueNote }}
|
|
617
|
+
</p>
|
|
618
|
+
<p v-if="canResubscribe && isTenantOwner" class="text-muted text-sm">
|
|
619
|
+
{{ $t(`${KEY_PREFIX}.resubscribe_hint`) }}
|
|
620
|
+
</p>
|
|
621
|
+
<p v-else-if="isAccessBlocked" class="text-muted text-sm">
|
|
622
|
+
{{ blockedHint }}
|
|
623
|
+
</p>
|
|
624
|
+
<p v-else-if="data.isPlanChangeLocked" class="text-muted text-sm">
|
|
625
|
+
{{ $t(`${KEY_PREFIX}.managed`) }}
|
|
626
|
+
</p>
|
|
627
|
+
<p v-else-if="!isTenantOwner" class="text-muted text-sm">
|
|
628
|
+
{{
|
|
629
|
+
status?.workspaceOwner
|
|
630
|
+
? $t(`${KEY_PREFIX}.owner_changes_named`, {
|
|
631
|
+
owner: status.workspaceOwner.name,
|
|
632
|
+
})
|
|
633
|
+
: $t(`${KEY_PREFIX}.owner_changes`)
|
|
634
|
+
}}
|
|
635
|
+
</p>
|
|
636
|
+
</div>
|
|
637
|
+
|
|
638
|
+
<DmsSaasPlanComparisonModal
|
|
639
|
+
v-if="data && isTenantOwner"
|
|
640
|
+
:plans="data.available"
|
|
641
|
+
:features="data.features"
|
|
642
|
+
:seats="seats"
|
|
643
|
+
:current-plan-id="current?._id ?? null"
|
|
644
|
+
:current-plan-name="current?.name ?? null"
|
|
645
|
+
:pending-plan-id="pendingPlan?.planId ?? null"
|
|
646
|
+
:renewal-date="data.currentPeriodEnd"
|
|
647
|
+
:is-recovery="data.canRecoverComplimentary"
|
|
648
|
+
:is-resubscription="canResubscribe"
|
|
649
|
+
:is-current-paid="isPaid && !!status?.hasStripeCustomer && !canResubscribe"
|
|
650
|
+
:workspace-name="workspaceName"
|
|
651
|
+
@changed="refresh"
|
|
652
|
+
@upgrade="openUpgrade"
|
|
653
|
+
/>
|
|
654
|
+
<DmsSaasPlanUpgradeModal
|
|
655
|
+
v-if="isTenantOwner"
|
|
656
|
+
v-model:open="isUpgradeOpen"
|
|
657
|
+
:plan="upgradeTarget"
|
|
658
|
+
:workspace-name="workspaceName"
|
|
659
|
+
:is-resubscription="canResubscribe"
|
|
660
|
+
@changed="refresh"
|
|
661
|
+
/>
|
|
662
|
+
<DmsSaasPendingCheckoutModal v-if="isTenantOwner" />
|
|
663
|
+
</DmsCard>
|
|
309
664
|
</template>
|