@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,211 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.SaasPlanDialogsController = void 0;
|
|
16
|
+
exports.stopSellingDialog = stopSellingDialog;
|
|
17
|
+
exports.deletePlanDialog = deletePlanDialog;
|
|
18
|
+
exports.deleteFeatureDialog = deleteFeatureDialog;
|
|
19
|
+
const interface_api_1 = require("@antelopejs/interface-api");
|
|
20
|
+
const interface_api_util_1 = require("@antelopejs/interface-api-util");
|
|
21
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
22
|
+
const auth_1 = require("@antelopejs/interface-dms/auth");
|
|
23
|
+
const table_view_1 = require("@antelopejs/interface-dms/base/table-view");
|
|
24
|
+
const db_1 = require("../../db");
|
|
25
|
+
const plans_1 = require("../../plans");
|
|
26
|
+
const feature_usage_1 = require("../../plans/feature-usage");
|
|
27
|
+
const catalogue_usage_1 = require("../../plans/catalogue-usage");
|
|
28
|
+
const money_1 = require("../../plans/money");
|
|
29
|
+
const content_language_1 = require("../../utils/content-language");
|
|
30
|
+
const HTTP_NOT_FOUND = 404;
|
|
31
|
+
const TEXTS = "$saas.catalog.plans.dialog";
|
|
32
|
+
const FEATURE_TEXTS = "$saas.catalog.features.dialog.delete";
|
|
33
|
+
const STRIPE_ID_PREVIEW_LENGTH = 12;
|
|
34
|
+
const ELLIPSIS = "…";
|
|
35
|
+
function shortStripeId(id) {
|
|
36
|
+
return id.length > STRIPE_ID_PREVIEW_LENGTH
|
|
37
|
+
? `${id.slice(0, STRIPE_ID_PREVIEW_LENGTH)}${ELLIPSIS}`
|
|
38
|
+
: id;
|
|
39
|
+
}
|
|
40
|
+
function stopSellingDialog(plan, usage, locale) {
|
|
41
|
+
const isInUse = usage.workspaces > 0;
|
|
42
|
+
return (0, table_view_1.serializeConfirmDialog)({
|
|
43
|
+
title: `${TEXTS}.stop_selling.title`,
|
|
44
|
+
description: isInUse
|
|
45
|
+
? `${TEXTS}.stop_selling.description_in_use`
|
|
46
|
+
: `${TEXTS}.stop_selling.description_unused`,
|
|
47
|
+
params: { name: plan.name },
|
|
48
|
+
icon: "i-ph-pause",
|
|
49
|
+
color: "warning",
|
|
50
|
+
confirmLabel: `${TEXTS}.stop_selling.confirm`,
|
|
51
|
+
impact: isInUse
|
|
52
|
+
? [
|
|
53
|
+
{
|
|
54
|
+
icon: "i-ph-buildings",
|
|
55
|
+
label: `${TEXTS}.stop_selling.impact_workspaces`,
|
|
56
|
+
count: usage.workspaces,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
icon: "i-ph-currency-circle-dollar",
|
|
60
|
+
label: `${TEXTS}.stop_selling.impact_mrr`,
|
|
61
|
+
count: (0, money_1.formatMoney)(usage.mrr, plan.currency, locale),
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
icon: "i-ph-hourglass",
|
|
65
|
+
label: `${TEXTS}.stop_selling.impact_trials`,
|
|
66
|
+
count: usage.trialing,
|
|
67
|
+
},
|
|
68
|
+
]
|
|
69
|
+
: [],
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function deletePlanDialog(plan, usage) {
|
|
73
|
+
const bound = usage.workspaces + usage.scheduled;
|
|
74
|
+
if (bound > 0) {
|
|
75
|
+
return (0, table_view_1.serializeConfirmDialog)({
|
|
76
|
+
title: `${TEXTS}.delete.blocked_title`,
|
|
77
|
+
description: `${TEXTS}.delete.blocked_description`,
|
|
78
|
+
params: { name: plan.name, count: bound },
|
|
79
|
+
icon: "i-ph-trash",
|
|
80
|
+
color: "error",
|
|
81
|
+
blocked: true,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
const productId = plan.paymentProviderRefs?.stripeProductId;
|
|
85
|
+
return (0, table_view_1.serializeConfirmDialog)({
|
|
86
|
+
title: `${TEXTS}.delete.title`,
|
|
87
|
+
description: `${TEXTS}.delete.description`,
|
|
88
|
+
params: { name: plan.name },
|
|
89
|
+
icon: "i-ph-trash",
|
|
90
|
+
color: "error",
|
|
91
|
+
confirmLabel: `${TEXTS}.delete.confirm`,
|
|
92
|
+
impact: [
|
|
93
|
+
{
|
|
94
|
+
icon: "i-ph-buildings",
|
|
95
|
+
label: `${TEXTS}.delete.impact_workspaces`,
|
|
96
|
+
count: 0,
|
|
97
|
+
},
|
|
98
|
+
...(productId
|
|
99
|
+
? [
|
|
100
|
+
{
|
|
101
|
+
icon: "i-ph-stripe-logo",
|
|
102
|
+
label: `${TEXTS}.delete.impact_stripe`,
|
|
103
|
+
count: shortStripeId(productId),
|
|
104
|
+
},
|
|
105
|
+
]
|
|
106
|
+
: []),
|
|
107
|
+
],
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function deleteFeatureDialog(displayName, reach) {
|
|
111
|
+
if (reach.plans > 0) {
|
|
112
|
+
return (0, table_view_1.serializeConfirmDialog)({
|
|
113
|
+
title: `${FEATURE_TEXTS}.blocked_title`,
|
|
114
|
+
description: `${FEATURE_TEXTS}.blocked_description`,
|
|
115
|
+
params: { name: displayName, count: reach.plans },
|
|
116
|
+
icon: "i-ph-lock-simple",
|
|
117
|
+
color: "warning",
|
|
118
|
+
blocked: true,
|
|
119
|
+
impact: [
|
|
120
|
+
{
|
|
121
|
+
icon: "i-ph-stack",
|
|
122
|
+
label: `${FEATURE_TEXTS}.impact_plans`,
|
|
123
|
+
count: reach.plans,
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
icon: "i-ph-buildings",
|
|
127
|
+
label: `${FEATURE_TEXTS}.impact_workspaces`,
|
|
128
|
+
count: reach.workspaces,
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
return (0, table_view_1.serializeConfirmDialog)({
|
|
134
|
+
title: `${FEATURE_TEXTS}.title`,
|
|
135
|
+
description: `${FEATURE_TEXTS}.description`,
|
|
136
|
+
params: { name: displayName },
|
|
137
|
+
icon: "i-ph-trash",
|
|
138
|
+
color: "error",
|
|
139
|
+
confirmLabel: `${FEATURE_TEXTS}.confirm`,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
class SaasPlanDialogsController extends (0, interface_api_1.Controller)("/api/saas/plan-dialogs") {
|
|
143
|
+
async featureReach(featureId) {
|
|
144
|
+
const [plans, usage] = await Promise.all([
|
|
145
|
+
this.planModel.findNotDeleted(),
|
|
146
|
+
(0, catalogue_usage_1.loadCatalogueUsage)(),
|
|
147
|
+
]);
|
|
148
|
+
const resolved = await Promise.all(plans.map((plan) => this.planModel.resolveInheritance(plan)));
|
|
149
|
+
const relying = plans.filter((_plan, index) => resolved[index].features.some((entry) => entry.featureId === featureId));
|
|
150
|
+
return {
|
|
151
|
+
plans: (0, feature_usage_1.plansUsingFeature)(plans, featureId).length,
|
|
152
|
+
workspaces: relying.reduce((total, plan) => total + (usage.byPlan.get(plan._id)?.workspaces ?? 0), 0),
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
async removeFeature(_user, id, language) {
|
|
156
|
+
const feature = await this.featureModel.get(id);
|
|
157
|
+
(0, interface_api_util_1.assert)(feature, HTTP_NOT_FOUND, "saas.errors.feature.not_found");
|
|
158
|
+
const localized = (0, plans_1.localizeFeature)(feature, (0, content_language_1.requestLocale)(language));
|
|
159
|
+
return deleteFeatureDialog(localized.displayName, await this.featureReach(id));
|
|
160
|
+
}
|
|
161
|
+
async load(id) {
|
|
162
|
+
const plan = await this.planModel.get(id);
|
|
163
|
+
(0, interface_api_util_1.assert)(plan, HTTP_NOT_FOUND, "saas.errors.plan.not_found");
|
|
164
|
+
const usage = await (0, catalogue_usage_1.loadCatalogueUsage)();
|
|
165
|
+
return [plan, usage.byPlan.get(id) ?? (0, catalogue_usage_1.emptyPlanUsage)()];
|
|
166
|
+
}
|
|
167
|
+
async stopSelling(_user, id, language) {
|
|
168
|
+
const [plan, usage] = await this.load(id);
|
|
169
|
+
return stopSellingDialog(plan, usage, (0, content_language_1.requestLocale)(language));
|
|
170
|
+
}
|
|
171
|
+
async remove(_user, id) {
|
|
172
|
+
const [plan, usage] = await this.load(id);
|
|
173
|
+
return deletePlanDialog(plan, usage);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
exports.SaasPlanDialogsController = SaasPlanDialogsController;
|
|
177
|
+
__decorate([
|
|
178
|
+
(0, interface_database_decorators_1.Model)(db_1.PlanModel),
|
|
179
|
+
__metadata("design:type", db_1.PlanModel)
|
|
180
|
+
], SaasPlanDialogsController.prototype, "planModel", void 0);
|
|
181
|
+
__decorate([
|
|
182
|
+
(0, interface_database_decorators_1.Model)(db_1.FeatureModel),
|
|
183
|
+
__metadata("design:type", db_1.FeatureModel)
|
|
184
|
+
], SaasPlanDialogsController.prototype, "featureModel", void 0);
|
|
185
|
+
__decorate([
|
|
186
|
+
(0, interface_api_1.Get)("/features/:id/delete"),
|
|
187
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
188
|
+
__param(1, (0, interface_api_1.Parameter)("id")),
|
|
189
|
+
__param(2, (0, interface_api_1.Parameter)(content_language_1.CONTENT_LANGUAGE_HEADER, "header")),
|
|
190
|
+
__metadata("design:type", Function),
|
|
191
|
+
__metadata("design:paramtypes", [Function, String, Object]),
|
|
192
|
+
__metadata("design:returntype", Promise)
|
|
193
|
+
], SaasPlanDialogsController.prototype, "removeFeature", null);
|
|
194
|
+
__decorate([
|
|
195
|
+
(0, interface_api_1.Get)("/:id/stop-selling"),
|
|
196
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
197
|
+
__param(1, (0, interface_api_1.Parameter)("id")),
|
|
198
|
+
__param(2, (0, interface_api_1.Parameter)(content_language_1.CONTENT_LANGUAGE_HEADER, "header")),
|
|
199
|
+
__metadata("design:type", Function),
|
|
200
|
+
__metadata("design:paramtypes", [Function, String, Object]),
|
|
201
|
+
__metadata("design:returntype", Promise)
|
|
202
|
+
], SaasPlanDialogsController.prototype, "stopSelling", null);
|
|
203
|
+
__decorate([
|
|
204
|
+
(0, interface_api_1.Get)("/:id/delete"),
|
|
205
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
206
|
+
__param(1, (0, interface_api_1.Parameter)("id")),
|
|
207
|
+
__metadata("design:type", Function),
|
|
208
|
+
__metadata("design:paramtypes", [Function, String]),
|
|
209
|
+
__metadata("design:returntype", Promise)
|
|
210
|
+
], SaasPlanDialogsController.prototype, "remove", null);
|
|
211
|
+
//# sourceMappingURL=plan-dialogs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-dialogs.js","sourceRoot":"","sources":["../../../src/routes/platformOwner/plan-dialogs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAuCA,8CAmCC;AAOD,4CAwCC;AAYD,kDAkCC;AAvKD,6DAAuE;AACv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B,EAAE,QAAQ,CAAC,CAAA;;;;8DAS9C;AAUK;IADL,IAAA,mBAAG,EAAC,mBAAmB,CAAC;IAEtB,WAAA,IAAA,oBAAa,GAAE,CAAA;IACf,WAAA,IAAA,yBAAS,EAAC,IAAI,CAAC,CAAA;IACf,WAAA,IAAA,yBAAS,EAAC,0CAAuB,EAAE,QAAQ,CAAC,CAAA;;;;4DAI9C;AAGK;IADL,IAAA,mBAAG,EAAC,aAAa,CAAC;IAEhB,WAAA,IAAA,oBAAa,GAAE,CAAA;IACf,WAAA,IAAA,yBAAS,EAAC,IAAI,CAAC,CAAA;;;;uDAIjB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type PlanMigration } from "../../db";
|
|
2
|
+
import type { FeatureNames } from "../../plans/migration-blocks";
|
|
3
|
+
import { type MigrationDetailContext, type MigrationWorkspaceView } from "../../plans/migration-detail";
|
|
4
|
+
import { type MigrationWorkspaceRow, type StripeReading } from "../../plans/migration-workspaces";
|
|
5
|
+
export declare function loadMigrationContext(migration: PlanMigration): Promise<MigrationDetailContext>;
|
|
6
|
+
export declare function loadWorkspaceRows(context: MigrationDetailContext): Promise<MigrationWorkspaceRow[]>;
|
|
7
|
+
export declare function loadFeatureNames(locale: string): Promise<FeatureNames>;
|
|
8
|
+
export declare function uncertainView(context: MigrationDetailContext, tenantId: string): MigrationWorkspaceView;
|
|
9
|
+
export declare function readStripe(migration: PlanMigration, tenantId: string): Promise<StripeReading>;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadMigrationContext = loadMigrationContext;
|
|
4
|
+
exports.loadWorkspaceRows = loadWorkspaceRows;
|
|
5
|
+
exports.loadFeatureNames = loadFeatureNames;
|
|
6
|
+
exports.uncertainView = uncertainView;
|
|
7
|
+
exports.readStripe = readStripe;
|
|
8
|
+
const interface_api_util_1 = require("@antelopejs/interface-api-util");
|
|
9
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
10
|
+
const db_1 = require("@antelopejs/interface-dms/auth/db");
|
|
11
|
+
const db_2 = require("@antelopejs/interface-dms/db");
|
|
12
|
+
const db_3 = require("../../db");
|
|
13
|
+
const plans_1 = require("../../plans");
|
|
14
|
+
const migration_detail_1 = require("../../plans/migration-detail");
|
|
15
|
+
const migration_workspaces_1 = require("../../plans/migration-workspaces");
|
|
16
|
+
const client_1 = require("../../stripe/client");
|
|
17
|
+
const dashboard_links_1 = require("../../stripe/dashboard-links");
|
|
18
|
+
const HTTP_CONFLICT = 409;
|
|
19
|
+
async function planRef(planId, name) {
|
|
20
|
+
const plan = await (0, interface_database_decorators_1.GetModel)(db_3.PlanModel).get(planId);
|
|
21
|
+
return {
|
|
22
|
+
_id: planId,
|
|
23
|
+
name,
|
|
24
|
+
price: plan?.price ?? null,
|
|
25
|
+
currency: plan?.currency ?? null,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
async function workspaceNames(tenantIds) {
|
|
29
|
+
const tenants = await Promise.all(tenantIds.map((id) => (0, interface_database_decorators_1.GetModel)(db_2.TenantModel).get(id)));
|
|
30
|
+
return new Map(tenantIds.map((id, index) => [id, tenants[index]?.name ?? id]));
|
|
31
|
+
}
|
|
32
|
+
function capturedTenantIds(migration) {
|
|
33
|
+
return (migration.snapshot?.tenantIds ??
|
|
34
|
+
migration.tenantOutcomes.map((row) => row.tenantId));
|
|
35
|
+
}
|
|
36
|
+
function mentionedPeople(migration) {
|
|
37
|
+
const ids = [
|
|
38
|
+
migration.initiatedBy,
|
|
39
|
+
migration.reconciledBy,
|
|
40
|
+
...migration.tenantOutcomes.map((row) => row.resolvedBy),
|
|
41
|
+
];
|
|
42
|
+
return [...new Set(ids.filter((id) => Boolean(id)))];
|
|
43
|
+
}
|
|
44
|
+
async function peopleNames(userIds) {
|
|
45
|
+
const users = await Promise.all(userIds.map((id) => (0, interface_database_decorators_1.GetModel)(db_1.UserModel).get(id)));
|
|
46
|
+
return new Map(userIds.map((id, index) => [
|
|
47
|
+
id,
|
|
48
|
+
users[index]?.name || users[index]?.email || id,
|
|
49
|
+
]));
|
|
50
|
+
}
|
|
51
|
+
async function loadMigrationContext(migration) {
|
|
52
|
+
const totals = (0, migration_detail_1.migrationTotals)(migration);
|
|
53
|
+
const [from, to, names, people] = await Promise.all([
|
|
54
|
+
planRef(migration.fromPlanId, migration.fromPlanName),
|
|
55
|
+
planRef(migration.toPlanId, migration.toPlanName),
|
|
56
|
+
workspaceNames(capturedTenantIds(migration)),
|
|
57
|
+
peopleNames(mentionedPeople(migration)),
|
|
58
|
+
]);
|
|
59
|
+
return {
|
|
60
|
+
migration,
|
|
61
|
+
from,
|
|
62
|
+
to,
|
|
63
|
+
totals,
|
|
64
|
+
abilities: (0, migration_detail_1.migrationAbilities)(migration, totals),
|
|
65
|
+
workspaces: (0, migration_detail_1.migrationWorkspaces)(migration, names),
|
|
66
|
+
people,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
async function subscriptionRef(tenantId) {
|
|
70
|
+
const subscription = await (0, interface_database_decorators_1.GetModel)(db_3.TenantSubscriptionModel, tenantId).findOne();
|
|
71
|
+
const id = subscription?.stripeSubscriptionId;
|
|
72
|
+
return id ? { id, url: (0, dashboard_links_1.stripeObjectUrl)("subscriptions", id) } : null;
|
|
73
|
+
}
|
|
74
|
+
async function loadWorkspaceRows(context) {
|
|
75
|
+
const refs = await Promise.all(context.workspaces.map((view) => subscriptionRef(view.tenantId)));
|
|
76
|
+
const subscriptions = new Map();
|
|
77
|
+
context.workspaces.forEach((view, index) => {
|
|
78
|
+
const ref = refs[index];
|
|
79
|
+
if (ref)
|
|
80
|
+
subscriptions.set(view.tenantId, ref);
|
|
81
|
+
});
|
|
82
|
+
return (0, migration_workspaces_1.migrationWorkspaceRows)(context, subscriptions);
|
|
83
|
+
}
|
|
84
|
+
async function loadFeatureNames(locale) {
|
|
85
|
+
const features = await (0, interface_database_decorators_1.GetModel)(db_3.FeatureModel).getAll();
|
|
86
|
+
return new Map(features.map((feature) => [
|
|
87
|
+
feature._id,
|
|
88
|
+
(0, plans_1.localizeFeature)(feature, locale).displayName,
|
|
89
|
+
]));
|
|
90
|
+
}
|
|
91
|
+
function uncertainView(context, tenantId) {
|
|
92
|
+
const view = context.workspaces.find((row) => row.tenantId === tenantId);
|
|
93
|
+
(0, interface_api_util_1.assert)(view?.isUncertain && context.abilities.canResolve, HTTP_CONFLICT, "saas.errors.migration.workspace_not_uncertain");
|
|
94
|
+
return view;
|
|
95
|
+
}
|
|
96
|
+
async function planByStripePrice(priceId) {
|
|
97
|
+
const plans = await (0, interface_database_decorators_1.GetModel)(db_3.PlanModel).findNotDeleted();
|
|
98
|
+
const plan = plans.find((row) => row.paymentProviderRefs?.stripePriceId === priceId);
|
|
99
|
+
return plan ? planRef(plan._id, plan.name) : null;
|
|
100
|
+
}
|
|
101
|
+
function stripeSide(migration, plan) {
|
|
102
|
+
if (!plan)
|
|
103
|
+
return "other";
|
|
104
|
+
if (plan._id === migration.toPlanId)
|
|
105
|
+
return "target";
|
|
106
|
+
if (plan._id === migration.fromPlanId)
|
|
107
|
+
return "source";
|
|
108
|
+
return "other";
|
|
109
|
+
}
|
|
110
|
+
async function readStripePlan(migration, reading) {
|
|
111
|
+
if (!(0, client_1.isStripeConfigured)() || !reading.stripeSubscriptionId) {
|
|
112
|
+
return { ...reading, stripePlan: "unavailable" };
|
|
113
|
+
}
|
|
114
|
+
try {
|
|
115
|
+
const subscription = await (0, client_1.getStripeClient)().subscriptions.retrieve(reading.stripeSubscriptionId);
|
|
116
|
+
const priceId = subscription.items.data[0]?.price.id;
|
|
117
|
+
const plan = priceId ? await planByStripePrice(priceId) : null;
|
|
118
|
+
return {
|
|
119
|
+
...reading,
|
|
120
|
+
stripePlan: stripeSide(migration, plan),
|
|
121
|
+
stripePlanName: plan?.name ?? null,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
return { ...reading, stripePlan: "unavailable" };
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
async function readStripe(migration, tenantId) {
|
|
129
|
+
const subscription = await (0, interface_database_decorators_1.GetModel)(db_3.TenantSubscriptionModel, tenantId).findOne();
|
|
130
|
+
const dmsPlan = subscription?.planId
|
|
131
|
+
? await (0, interface_database_decorators_1.GetModel)(db_3.PlanModel).get(subscription.planId)
|
|
132
|
+
: undefined;
|
|
133
|
+
const subscriptionId = subscription?.stripeSubscriptionId ?? null;
|
|
134
|
+
const reading = {
|
|
135
|
+
stripeSubscriptionId: subscriptionId,
|
|
136
|
+
stripeUrl: subscriptionId
|
|
137
|
+
? (0, dashboard_links_1.stripeObjectUrl)("subscriptions", subscriptionId)
|
|
138
|
+
: null,
|
|
139
|
+
stripePlan: "none",
|
|
140
|
+
stripePlanName: null,
|
|
141
|
+
dmsPlanName: dmsPlan?.name ?? null,
|
|
142
|
+
};
|
|
143
|
+
if (!subscriptionId)
|
|
144
|
+
return reading;
|
|
145
|
+
return readStripePlan(migration, reading);
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=plan-migration-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-migration-context.js","sourceRoot":"","sources":["../../../src/routes/platformOwner/plan-migration-context.ts"],"names":[],"mappings":";;AA4FA,oDAmBC;AAcD,8CAYC;AAGD,4CAQC;AAMD,sCAWC;AAoDD,gCAuBC;AAhPD,uEAAwD;AACxD,6FAAqE;AACrE,0DAA8D;AAC9D,qDAA2D;AAC3D,iCAKkB;AAClB,uCAA8C;AAE9C,mEAOsC;AACtC,2EAM0C;AAC1C,gDAA0E;AAC1E,kEAA+D;AAE/D,MAAM,aAAa,GAAG,GAAG,CAAC;AAG1B,KAAK,UAAU,OAAO,CACpB,MAAc,EACd,IAAY;IAEZ,MAAM,IAAI,GAAG,MAAM,IAAA,wCAAQ,EAAC,cAAS,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,C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AAO,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type RequestContext } from "@antelopejs/interface-api";
|
|
2
|
+
import type { User } from "@antelopejs/interface-dms/auth/db";
|
|
3
|
+
import { type ExportJobStatus } from "@antelopejs/interface-dms/base";
|
|
4
|
+
import { PlanMigrationModel } from "../../db";
|
|
5
|
+
declare const SaasPlanMigrationExportController_base: import("@antelopejs/interface-api").ControllerClass<object>;
|
|
6
|
+
export declare class SaasPlanMigrationExportController extends SaasPlanMigrationExportController_base {
|
|
7
|
+
planMigrationModel: PlanMigrationModel;
|
|
8
|
+
startExport(user: User, ctx: RequestContext, id: string): Promise<import("@antelopejs/interface-dms/base").ExportJobTicket>;
|
|
9
|
+
exportStatus(user: User, ctx: RequestContext, id: string, jobId: string): Promise<ExportJobStatus>;
|
|
10
|
+
downloadExport(user: User, ctx: RequestContext, id: string, jobId: string): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.SaasPlanMigrationExportController = void 0;
|
|
19
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
20
|
+
const interface_api_1 = require("@antelopejs/interface-api");
|
|
21
|
+
const interface_api_util_1 = require("@antelopejs/interface-api-util");
|
|
22
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
23
|
+
const auth_1 = require("@antelopejs/interface-dms/auth");
|
|
24
|
+
const base_1 = require("@antelopejs/interface-dms/base");
|
|
25
|
+
const db_1 = require("../../db");
|
|
26
|
+
const migration_workspaces_1 = require("../../plans/migration-workspaces");
|
|
27
|
+
const csv_file_1 = require("../../utils/csv-file");
|
|
28
|
+
const plan_migration_context_1 = require("./plan-migration-context");
|
|
29
|
+
const HTTP_NOT_FOUND = 404;
|
|
30
|
+
const EXPORT_SCOPE = "saas-plan-migration-workspaces";
|
|
31
|
+
function exportAccess(migrationId) {
|
|
32
|
+
return {
|
|
33
|
+
scope: EXPORT_SCOPE,
|
|
34
|
+
isOwnedBy: (_record, context) => context?.migrationId === migrationId,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
class SaasPlanMigrationExportController extends (0, interface_api_1.Controller)("/api/saas/plan-migrations") {
|
|
38
|
+
async startExport(user, ctx, id) {
|
|
39
|
+
const migration = await this.planMigrationModel.get(id);
|
|
40
|
+
(0, interface_api_util_1.assert)(migration, HTTP_NOT_FOUND, "saas.errors.migration.not_found");
|
|
41
|
+
return (0, base_1.runExportJob)({
|
|
42
|
+
ctx,
|
|
43
|
+
user,
|
|
44
|
+
scope: EXPORT_SCOPE,
|
|
45
|
+
context: { migrationId: id },
|
|
46
|
+
filename: `plan-migration-${id}-workspaces`,
|
|
47
|
+
extension: "csv",
|
|
48
|
+
contentType: "text/csv; charset=utf-8",
|
|
49
|
+
generate: async ({ localPath }) => {
|
|
50
|
+
const context = await (0, plan_migration_context_1.loadMigrationContext)(migration);
|
|
51
|
+
const rows = await (0, plan_migration_context_1.loadWorkspaceRows)(context);
|
|
52
|
+
node_fs_1.default.writeFileSync(localPath, csv_file_1.CSV_BOM);
|
|
53
|
+
(0, csv_file_1.appendCsvRow)(localPath, migration_workspaces_1.WORKSPACE_EXPORT_HEADER);
|
|
54
|
+
for (const row of rows)
|
|
55
|
+
(0, csv_file_1.appendCsvRow)(localPath, (0, migration_workspaces_1.workspaceExportRow)(row));
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
async exportStatus(user, ctx, id, jobId) {
|
|
60
|
+
return (0, base_1.getExportJobStatus)(ctx, user, jobId, exportAccess(id));
|
|
61
|
+
}
|
|
62
|
+
async downloadExport(user, ctx, id, jobId) {
|
|
63
|
+
await (0, base_1.downloadExportJob)(ctx, user, jobId, exportAccess(id));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.SaasPlanMigrationExportController = SaasPlanMigrationExportController;
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, interface_database_decorators_1.Model)(db_1.PlanMigrationModel),
|
|
69
|
+
__metadata("design:type", db_1.PlanMigrationModel)
|
|
70
|
+
], SaasPlanMigrationExportController.prototype, "planMigrationModel", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, interface_api_1.Post)("/:id/workspaces-export/start"),
|
|
73
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
74
|
+
__param(1, (0, interface_api_1.Context)()),
|
|
75
|
+
__param(2, (0, interface_api_1.Parameter)("id")),
|
|
76
|
+
__metadata("design:type", Function),
|
|
77
|
+
__metadata("design:paramtypes", [Function, Object, String]),
|
|
78
|
+
__metadata("design:returntype", Promise)
|
|
79
|
+
], SaasPlanMigrationExportController.prototype, "startExport", null);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, interface_api_1.Get)("/:id/workspaces-export/status/:jobId"),
|
|
82
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
83
|
+
__param(1, (0, interface_api_1.Context)()),
|
|
84
|
+
__param(2, (0, interface_api_1.Parameter)("id")),
|
|
85
|
+
__param(3, (0, interface_api_1.Parameter)("jobId")),
|
|
86
|
+
__metadata("design:type", Function),
|
|
87
|
+
__metadata("design:paramtypes", [Function, Object, String, String]),
|
|
88
|
+
__metadata("design:returntype", Promise)
|
|
89
|
+
], SaasPlanMigrationExportController.prototype, "exportStatus", null);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, interface_api_1.Get)("/:id/workspaces-export/download/:jobId"),
|
|
92
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
93
|
+
__param(1, (0, interface_api_1.Context)()),
|
|
94
|
+
__param(2, (0, interface_api_1.Parameter)("id")),
|
|
95
|
+
__param(3, (0, interface_api_1.Parameter)("jobId")),
|
|
96
|
+
__metadata("design:type", Function),
|
|
97
|
+
__metadata("design:paramtypes", [Function, Object, String, String]),
|
|
98
|
+
__metadata("design:returntype", Promise)
|
|
99
|
+
], SaasPlanMigrationExportController.prototype, "downloadExport", null);
|
|
100
|
+
//# sourceMappingURL=plan-migration-export.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-migration-export.js","sourceRoot":"","sources":["../../../src/routes/platformOwner/plan-migration-export.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,sDAAyB;AACzB,6DAOmC;AACnC,uEAAwD;AACxD,6FAAkE;AAClE,yDAA+D;AAE/D,yDAMwC;AACxC,iCAA8C;AAC9C,2EAG0C;AAC1C,mDAA6D;AAC7D,qEAGkC;AAElC,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,YAAY,GAAG,gCAAgC,CAAC;AAMtD,SAAS,YAAY,CACnB,WAAmB;IAEnB,OAAO;QACL,KAAK,EAAE,YAAY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AI,EAAE,KAAK,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC;IAChE,CAAC;IAGK,AAAN,KAAK,CAAC,cAAc,CACD,IAAU,EAChB,GAAmB,EACb,EAAU,EACP,KAAa;QAEjC,MAAM,IAAA,wBAAiB,EAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9D,CAAC;CACF;AApDD,8EAoDC;AAhDS;IADP,IAAA,qCAAK,EAAC,uBAAkB,CAAC;8BACE,uBAAkB;6EAAC;AAGzC;IADL,IAAA,oBAAI,EAAC,8BAA8B,CAAC;IAElC,WAAA,IAAA,oBAAa,GAAE,CAAA;IACf,WAAA,IAAA,uBAAO,GAAE,CAAA;IACT,WAAA,IAAA,yBAAS,EAAC,IAAI,CAAC,CAAA;;;;oEAqBjB;AAGK;IADL,IAAA,mBAAG,EAAC,sCAAsC,CAAC;IAEzC,WAAA,IAAA,oBAAa,GAAE,CAAA;IACf,WAAA,IAAA,uBAAO,GAAE,CAAA;IACT,WAAA,IAAA,yBAAS,EAAC,IAAI,CAAC,CAAA;IACf,WAAA,IAAA,yBAAS,EAAC,OAAO,CAAC,CAAA;;;;qEAGpB;AAGK;IADL,IAAA,mBAAG,EAAC,wCAAwC,CAAC;IAE3C,WAAA,IAAA,oBAAa,GAAE,CAAA;IACf,WAAA,IAAA,uBAAO,GAAE,CAAA;IACT,WAAA,IAAA,yBAAS,EAAC,IAAI,CAAC,CAAA;IACf,WAAA,IAAA,yBAAS,EAAC,OAAO,CAAC,CAAA;;;;uEAGpB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { User } from "@antelopejs/interface-dms/auth/db";
|
|
2
|
+
import type { ActivityFeedItem, BannerContent, KeyValueListItem, NavCardItem, StatGroupItem } from "@antelopejs/interface-dms/base";
|
|
3
|
+
import type { ConfirmDialogSerialized } from "@antelopejs/interface-dms/base/table-view";
|
|
4
|
+
import { PlanMigrationModel } from "../../db";
|
|
5
|
+
import { type MigrationWorkspaceRow } from "../../plans/migration-workspaces";
|
|
6
|
+
import { type UncertainResolution } from "../../workers";
|
|
7
|
+
import type { ItemsPayload, RowsPayload } from "./block-payloads";
|
|
8
|
+
interface StripeReadingPayload extends ItemsPayload<KeyValueListItem> {
|
|
9
|
+
resolution: UncertainResolution | null;
|
|
10
|
+
stripeUrl: string | null;
|
|
11
|
+
}
|
|
12
|
+
interface ResolveBody {
|
|
13
|
+
resolution?: string;
|
|
14
|
+
}
|
|
15
|
+
interface ReconcileBody {
|
|
16
|
+
note?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const SaasPlanMigrationsController_base: import("@antelopejs/interface-api").ControllerClass<object>;
|
|
19
|
+
export declare class SaasPlanMigrationsController extends SaasPlanMigrationsController_base {
|
|
20
|
+
planMigrationModel: PlanMigrationModel;
|
|
21
|
+
private load;
|
|
22
|
+
private context;
|
|
23
|
+
attention(_user: User): Promise<ItemsPayload<NavCardItem>>;
|
|
24
|
+
header(_user: User, id: string): Promise<BannerContent>;
|
|
25
|
+
totals(_user: User, id: string): Promise<ItemsPayload<StatGroupItem>>;
|
|
26
|
+
workspaces(_user: User, id: string, group: unknown): Promise<RowsPayload<MigrationWorkspaceRow>>;
|
|
27
|
+
changes(_user: User, id: string, language: unknown): Promise<ItemsPayload<KeyValueListItem>>;
|
|
28
|
+
journal(_user: User, id: string): Promise<ItemsPayload<ActivityFeedItem>>;
|
|
29
|
+
stripeReading(_user: User, id: string, tenantId: string): Promise<StripeReadingPayload>;
|
|
30
|
+
retryConfirmation(_user: User, id: string): Promise<ConfirmDialogSerialized>;
|
|
31
|
+
reconcileConfirmation(_user: User, id: string): Promise<ConfirmDialogSerialized>;
|
|
32
|
+
resolveConfirmation(_user: User, id: string, tenantId: string, resolution: string): Promise<ConfirmDialogSerialized>;
|
|
33
|
+
resolve(user: User, id: string, tenantId: string, body: ResolveBody): Promise<{
|
|
34
|
+
_id: string;
|
|
35
|
+
}>;
|
|
36
|
+
retry(_user: User, id: string): Promise<{
|
|
37
|
+
_id: string;
|
|
38
|
+
}>;
|
|
39
|
+
reconcile(user: User, id: string, body: ReconcileBody): Promise<{
|
|
40
|
+
_id: string;
|
|
41
|
+
}>;
|
|
42
|
+
}
|
|
43
|
+
export {};
|