@antelopejs/dms-saas 0.4.0 → 0.5.1
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 +42 -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 +85 -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 +177 -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 +112 -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 +74 -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 +265 -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 +305 -0
- package/frontend-vue/i18n/locales/saas-public-fr-FR.json +305 -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
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ACTIVITY_KINDS = void 0;
|
|
4
|
+
exports.buildActivityFeed = buildActivityFeed;
|
|
5
|
+
exports.isFlatFeed = isFlatFeed;
|
|
6
|
+
exports.parseActivityKind = parseActivityKind;
|
|
7
|
+
const composed_text_1 = require("../i18n/composed-text");
|
|
8
|
+
const row_instance_1 = require("../utils/row-instance");
|
|
9
|
+
const time_1 = require("../utils/time");
|
|
10
|
+
exports.ACTIVITY_KINDS = ["all", "billing", "lifecycle"];
|
|
11
|
+
const KEY_PREFIX = "$saas.activity";
|
|
12
|
+
const PLATFORM_TITLES = "platform";
|
|
13
|
+
const WORKSPACE_TITLES = "workspace";
|
|
14
|
+
const DOCUMENT_LOOKS = {
|
|
15
|
+
paid: { icon: "i-ph-check-circle", tone: "success", title: "invoice_paid" },
|
|
16
|
+
open: { icon: "i-ph-hourglass", tone: "warning", title: "invoice_open" },
|
|
17
|
+
uncollectible: {
|
|
18
|
+
icon: "i-ph-warning-octagon",
|
|
19
|
+
tone: "error",
|
|
20
|
+
title: "invoice_uncollectible",
|
|
21
|
+
},
|
|
22
|
+
issued: {
|
|
23
|
+
icon: "i-ph-arrow-u-down-left",
|
|
24
|
+
tone: "info",
|
|
25
|
+
title: "credit_note_issued",
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
const INVITATION_SEND_LOOKS = {
|
|
29
|
+
sent: {
|
|
30
|
+
kind: "lifecycle",
|
|
31
|
+
icon: "i-ph-envelope-simple",
|
|
32
|
+
tone: "neutral",
|
|
33
|
+
title: "invitation_sent",
|
|
34
|
+
},
|
|
35
|
+
failed: {
|
|
36
|
+
kind: "lifecycle",
|
|
37
|
+
icon: "i-ph-warning",
|
|
38
|
+
tone: "warning",
|
|
39
|
+
title: "invitation_email_failed",
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
const invitationSendLook = (action) => INVITATION_SEND_LOOKS[detailString(action, "emailDelivery")] ??
|
|
43
|
+
INVITATION_SEND_LOOKS.sent;
|
|
44
|
+
const ACTION_LOOKS = {
|
|
45
|
+
"workspace.suspend": {
|
|
46
|
+
kind: "lifecycle",
|
|
47
|
+
icon: "i-ph-prohibit",
|
|
48
|
+
tone: "error",
|
|
49
|
+
title: "workspace_suspended",
|
|
50
|
+
},
|
|
51
|
+
"workspace.unsuspend": {
|
|
52
|
+
kind: "lifecycle",
|
|
53
|
+
icon: "i-ph-play-circle",
|
|
54
|
+
tone: "success",
|
|
55
|
+
title: "workspace_reactivated",
|
|
56
|
+
},
|
|
57
|
+
"subscription.upgrade": {
|
|
58
|
+
kind: "billing",
|
|
59
|
+
icon: "i-ph-arrow-circle-up",
|
|
60
|
+
tone: "primary",
|
|
61
|
+
title: "subscription_upgraded",
|
|
62
|
+
},
|
|
63
|
+
"customer_balance.credit": {
|
|
64
|
+
kind: "billing",
|
|
65
|
+
icon: "i-ph-coins",
|
|
66
|
+
tone: "info",
|
|
67
|
+
title: "balance_credited",
|
|
68
|
+
},
|
|
69
|
+
"invitation.send": invitationSendLook,
|
|
70
|
+
"invitation.resend": {
|
|
71
|
+
kind: "lifecycle",
|
|
72
|
+
icon: "i-ph-envelope-simple",
|
|
73
|
+
tone: "neutral",
|
|
74
|
+
title: "invitation_resent",
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
function lookOf(action) {
|
|
78
|
+
const look = ACTION_LOOKS[action.action];
|
|
79
|
+
return typeof look === "function" ? look(action) : look;
|
|
80
|
+
}
|
|
81
|
+
function key(name) {
|
|
82
|
+
return `${KEY_PREFIX}.${name}`;
|
|
83
|
+
}
|
|
84
|
+
function titleKey(options, name) {
|
|
85
|
+
const titles = options.linkOf ? PLATFORM_TITLES : WORKSPACE_TITLES;
|
|
86
|
+
return key(`${titles}.${name}`);
|
|
87
|
+
}
|
|
88
|
+
function linkTo(options, tenantId) {
|
|
89
|
+
return options.linkOf?.(tenantId);
|
|
90
|
+
}
|
|
91
|
+
function documentEntry(document, sources, options) {
|
|
92
|
+
const look = DOCUMENT_LOOKS[document.status];
|
|
93
|
+
if (!look)
|
|
94
|
+
return null;
|
|
95
|
+
const tenantId = (0, row_instance_1.getRowInstance)(document);
|
|
96
|
+
const at = new Date(document.paidAt ?? document.issuedAt);
|
|
97
|
+
const amount = document.total || document.amount;
|
|
98
|
+
return {
|
|
99
|
+
kind: "billing",
|
|
100
|
+
at,
|
|
101
|
+
item: {
|
|
102
|
+
id: `document-${document._id}`,
|
|
103
|
+
icon: look.icon,
|
|
104
|
+
tone: look.tone,
|
|
105
|
+
title: titleKey(options, look.title),
|
|
106
|
+
meta: [(0, composed_text_1.valueText)((0, composed_text_1.moneyParam)(amount, document.currency))],
|
|
107
|
+
params: {
|
|
108
|
+
number: document.number ?? "—",
|
|
109
|
+
workspace: sources.names.get(tenantId) ?? "—",
|
|
110
|
+
},
|
|
111
|
+
date: at.toISOString(),
|
|
112
|
+
to: linkTo(options, tenantId),
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function detailString(action, field) {
|
|
117
|
+
const value = action.details?.[field];
|
|
118
|
+
return typeof value === "string" ? value : "—";
|
|
119
|
+
}
|
|
120
|
+
function actionMeta(action) {
|
|
121
|
+
const amount = action.details?.amountCents;
|
|
122
|
+
const currency = action.details?.currency;
|
|
123
|
+
const money = typeof amount === "number" && typeof currency === "string"
|
|
124
|
+
? [(0, composed_text_1.valueText)((0, composed_text_1.moneyParam)(amount, currency))]
|
|
125
|
+
: [];
|
|
126
|
+
return [...money, key("by_operator")];
|
|
127
|
+
}
|
|
128
|
+
function actionEntry(action, sources, options) {
|
|
129
|
+
const look = lookOf(action);
|
|
130
|
+
if (!look || action.status !== "succeeded")
|
|
131
|
+
return null;
|
|
132
|
+
const at = new Date(action.effectiveAt ?? action.createdAt);
|
|
133
|
+
return {
|
|
134
|
+
kind: look.kind,
|
|
135
|
+
at,
|
|
136
|
+
item: {
|
|
137
|
+
id: `action-${action._id}`,
|
|
138
|
+
icon: look.icon,
|
|
139
|
+
tone: look.tone,
|
|
140
|
+
title: titleKey(options, look.title),
|
|
141
|
+
meta: actionMeta(action),
|
|
142
|
+
params: {
|
|
143
|
+
workspace: sources.names.get(action.tenantId) ?? "—",
|
|
144
|
+
operator: action.actorEmail,
|
|
145
|
+
from: detailString(action, "previousPlanName"),
|
|
146
|
+
to: detailString(action, "targetPlanName"),
|
|
147
|
+
email: detailString(action, "email"),
|
|
148
|
+
},
|
|
149
|
+
date: at.toISOString(),
|
|
150
|
+
to: linkTo(options, action.tenantId),
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function workspaceEntry(workspace, options) {
|
|
155
|
+
const at = new Date(workspace.createdAt);
|
|
156
|
+
return {
|
|
157
|
+
kind: "lifecycle",
|
|
158
|
+
at,
|
|
159
|
+
item: {
|
|
160
|
+
id: `workspace-${workspace._id}`,
|
|
161
|
+
icon: "i-ph-buildings",
|
|
162
|
+
tone: "primary",
|
|
163
|
+
title: titleKey(options, "workspace_created"),
|
|
164
|
+
params: { workspace: workspace.name },
|
|
165
|
+
date: at.toISOString(),
|
|
166
|
+
to: linkTo(options, workspace._id),
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
function trailingDay(at, now) {
|
|
171
|
+
return (0, composed_text_1.valueText)((0, composed_text_1.dateParam)(at, (0, composed_text_1.listDateFormat)(at, now)));
|
|
172
|
+
}
|
|
173
|
+
function withTrailingDay(entry, now) {
|
|
174
|
+
if (!now || now.getTime() - entry.at.getTime() < time_1.MS_PER_DAY)
|
|
175
|
+
return entry.item;
|
|
176
|
+
return { ...entry.item, time: trailingDay(entry.at, now) };
|
|
177
|
+
}
|
|
178
|
+
function buildActivityFeed(sources, options) {
|
|
179
|
+
const entries = [
|
|
180
|
+
...sources.documents.map((doc) => documentEntry(doc, sources, options)),
|
|
181
|
+
...sources.actions.map((action) => actionEntry(action, sources, options)),
|
|
182
|
+
...sources.workspaces.map((workspace) => workspaceEntry(workspace, options)),
|
|
183
|
+
];
|
|
184
|
+
return entries
|
|
185
|
+
.filter((entry) => entry !== null)
|
|
186
|
+
.filter((entry) => options.kind === "all" || entry.kind === options.kind)
|
|
187
|
+
.sort((left, right) => right.at.getTime() - left.at.getTime())
|
|
188
|
+
.slice(0, options.limit)
|
|
189
|
+
.map((entry) => withTrailingDay(entry, options.now));
|
|
190
|
+
}
|
|
191
|
+
function isFlatFeed(value) {
|
|
192
|
+
return value === "true";
|
|
193
|
+
}
|
|
194
|
+
function parseActivityKind(value) {
|
|
195
|
+
return exports.ACTIVITY_KINDS.find((kind) => kind === value) ?? "all";
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=activity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity.js","sourceRoot":"","sources":["../../src/metrics/activity.ts"],"names":[],"mappings":";;;AAuRA,8CAiBC;AAGD,gCAEC;AAGD,8CAEC;AA5SD,yDAK+B;AAG/B,wDAAuD;AACvD,wCAA2C;AAG9B,QAAA,cAAc,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,WAAW,CAAU,CAAC;AAuDvE,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAGpC,MAAM,eAAe,GAAG,UAAU,CAAC;AACnC,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAErC,MAAM,cAAc,GAAiC;IACnD,IAAI,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE;IAC3E,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE;IACxE,aAAa,EAAE;QACb,IAAI,EAAE,sBAAsB;QAC5B,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,uBAAuB;KAC/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ACnC;KACF,CAAC;IACF,OAAO,OAAO;SACX,MAAM,CAAC,CAAC,KAAK,EAA0B,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;SACzD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC;SACxE,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC;SAC7D,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC;SACvB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AACzD,CAAC;AAGD,SAAgB,UAAU,CAAC,KAAc;IACvC,OAAO,KAAK,KAAK,MAAM,CAAC;AAC1B,CAAC;AAGD,SAAgB,iBAAiB,CAAC,KAAc;IAC9C,OAAO,sBAAc,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type BillingState, type TenantBillingState, type WorkspaceDirectoryFields } from "../db";
|
|
2
|
+
import { type MinorAmount, type ReportingTotal } from "./normalised-mrr";
|
|
3
|
+
export type DirectoryRow = TenantBillingState;
|
|
4
|
+
export interface DatedWorkspace {
|
|
5
|
+
tenantId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
at: Date;
|
|
8
|
+
}
|
|
9
|
+
export interface PastDueSummary {
|
|
10
|
+
count: number;
|
|
11
|
+
atRisk: ReportingTotal;
|
|
12
|
+
firstSuspension: Date | null;
|
|
13
|
+
}
|
|
14
|
+
export interface TrialsEndingSummary {
|
|
15
|
+
count: number;
|
|
16
|
+
thenMrr: ReportingTotal;
|
|
17
|
+
}
|
|
18
|
+
export interface DirectorySummary {
|
|
19
|
+
total: number;
|
|
20
|
+
byState: Record<BillingState, number>;
|
|
21
|
+
mrr: ReportingTotal;
|
|
22
|
+
paying: number;
|
|
23
|
+
pastDue: PastDueSummary;
|
|
24
|
+
trialsEnding: TrialsEndingSummary;
|
|
25
|
+
complimentaryEnding: DatedWorkspace[];
|
|
26
|
+
}
|
|
27
|
+
export declare function monthlyAmountAfterTrial(row: Partial<WorkspaceDirectoryFields>): MinorAmount;
|
|
28
|
+
export declare function summariseDirectory(rows: DirectoryRow[], now: Date, reportingCurrency: string): DirectorySummary;
|
|
29
|
+
export declare function loadDirectoryRows(): Promise<DirectoryRow[]>;
|
|
30
|
+
export declare function nameWorkspaces(entries: DatedWorkspace[]): Promise<DatedWorkspace[]>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.monthlyAmountAfterTrial = monthlyAmountAfterTrial;
|
|
4
|
+
exports.summariseDirectory = summariseDirectory;
|
|
5
|
+
exports.loadDirectoryRows = loadDirectoryRows;
|
|
6
|
+
exports.nameWorkspaces = nameWorkspaces;
|
|
7
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
8
|
+
const db_1 = require("@antelopejs/interface-dms/db");
|
|
9
|
+
const db_2 = require("../db");
|
|
10
|
+
const time_1 = require("../utils/time");
|
|
11
|
+
const normalised_mrr_1 = require("./normalised-mrr");
|
|
12
|
+
const TRIAL_ENDING_WINDOW_DAYS = 14;
|
|
13
|
+
const COMPLIMENTARY_ENDING_WINDOW_DAYS = 7;
|
|
14
|
+
function emptyStateCounts() {
|
|
15
|
+
return Object.fromEntries(db_2.BILLING_STATES.map((state) => [state, 0]));
|
|
16
|
+
}
|
|
17
|
+
function mrrOf(row) {
|
|
18
|
+
return { amountMinor: row.mrrMinor, currency: row.currency ?? "" };
|
|
19
|
+
}
|
|
20
|
+
function monthlyAmountAfterTrial(row) {
|
|
21
|
+
if (!row.planInterval || !row.planBillingMode || !row.currency)
|
|
22
|
+
return { amountMinor: 0, currency: row.currency ?? "" };
|
|
23
|
+
return {
|
|
24
|
+
amountMinor: (0, normalised_mrr_1.monthlyAmountMinor)({
|
|
25
|
+
unitAmountMinor: row.planUnitAmountMinor ?? 0,
|
|
26
|
+
interval: row.planInterval,
|
|
27
|
+
billingMode: row.planBillingMode,
|
|
28
|
+
}, row.seats ?? 0),
|
|
29
|
+
currency: row.currency,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function isDueWithin(row, kind, now, days) {
|
|
33
|
+
if (row.renewalKind !== kind || !row.renewsAt)
|
|
34
|
+
return false;
|
|
35
|
+
const at = new Date(row.renewsAt).getTime();
|
|
36
|
+
return at >= now.getTime() && at <= now.getTime() + days * time_1.MS_PER_DAY;
|
|
37
|
+
}
|
|
38
|
+
function earliest(dates) {
|
|
39
|
+
return dates.reduce((first, date) => (!first || date < first ? date : first), null);
|
|
40
|
+
}
|
|
41
|
+
function summarisePastDue(rows, currency) {
|
|
42
|
+
const pastDue = rows.filter((row) => row.billingState === "past_due");
|
|
43
|
+
return {
|
|
44
|
+
count: pastDue.length,
|
|
45
|
+
atRisk: (0, normalised_mrr_1.sumInReportingCurrency)(pastDue.map(mrrOf), currency),
|
|
46
|
+
firstSuspension: earliest(pastDue
|
|
47
|
+
.filter((row) => row.renewalKind === "suspends" && row.renewsAt)
|
|
48
|
+
.map((row) => new Date(row.renewsAt))),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function summariseDirectory(rows, now, reportingCurrency) {
|
|
52
|
+
const byState = rows.reduce((counts, row) => {
|
|
53
|
+
counts[row.billingState] += 1;
|
|
54
|
+
return counts;
|
|
55
|
+
}, emptyStateCounts());
|
|
56
|
+
const trials = rows.filter((row) => isDueWithin(row, "trial_ends", now, TRIAL_ENDING_WINDOW_DAYS));
|
|
57
|
+
const complimentaryEnding = rows
|
|
58
|
+
.filter((row) => isDueWithin(row, "free_until", now, COMPLIMENTARY_ENDING_WINDOW_DAYS))
|
|
59
|
+
.map((row) => ({
|
|
60
|
+
tenantId: row.tenantId,
|
|
61
|
+
name: "",
|
|
62
|
+
at: new Date(row.renewsAt),
|
|
63
|
+
}))
|
|
64
|
+
.sort((left, right) => left.at.getTime() - right.at.getTime());
|
|
65
|
+
return {
|
|
66
|
+
total: rows.length,
|
|
67
|
+
byState,
|
|
68
|
+
mrr: (0, normalised_mrr_1.sumInReportingCurrency)(rows.map(mrrOf), reportingCurrency),
|
|
69
|
+
paying: rows.filter((row) => row.mrrMinor > 0).length,
|
|
70
|
+
pastDue: summarisePastDue(rows, reportingCurrency),
|
|
71
|
+
trialsEnding: {
|
|
72
|
+
count: trials.length,
|
|
73
|
+
thenMrr: (0, normalised_mrr_1.sumInReportingCurrency)(trials.map(monthlyAmountAfterTrial), reportingCurrency),
|
|
74
|
+
},
|
|
75
|
+
complimentaryEnding,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
async function loadDirectoryRows() {
|
|
79
|
+
return (0, interface_database_decorators_1.GetModel)(db_2.TenantBillingStateModel)
|
|
80
|
+
.table.filter((row) => row
|
|
81
|
+
.key("deletedAt")
|
|
82
|
+
.eq(null)
|
|
83
|
+
.and(row.key("_id").eq(row.key("tenantId"))))
|
|
84
|
+
.run();
|
|
85
|
+
}
|
|
86
|
+
async function nameWorkspaces(entries) {
|
|
87
|
+
if (entries.length === 0)
|
|
88
|
+
return [];
|
|
89
|
+
const tenants = await (0, interface_database_decorators_1.GetModel)(db_1.TenantModel).getMany(entries.map((entry) => entry.tenantId));
|
|
90
|
+
const names = new Map(tenants.map((tenant) => [tenant._id, tenant.name]));
|
|
91
|
+
return entries
|
|
92
|
+
.filter((entry) => names.has(entry.tenantId))
|
|
93
|
+
.map((entry) => ({ ...entry, name: names.get(entry.tenantId) ?? "" }));
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=directory-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directory-summary.js","sourceRoot":"","sources":["../../src/metrics/directory-summary.ts"],"names":[],"mappings":";;AAkEA,0DAgBC;AAqCD,gDAqCC;AAGD,8CASC;AAGD,wCAWC;AAtLD,6FAAqE;AACrE,qDAA2D;AAC3D,8BAMe;AACf,wCAA2C;AAC3C,qDAK0B;AAG1B,MAAM,wBAAwB,GAAG,EAAE,CAAC;AACpC,MAAM,gCAAgC,GAAG,CAAC,CAAC;AAoC3C,SAAS,gBAAgB;IACvB,OAAO,MAAM,CAAC,WAAW,CACvB,mBAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CACV,CAAC;AACpC,CAAC;AAED,SAAS,KAAK,CAAC,GAAiB;IAC9B,OAAO,EAAE,WAAW,EAAE,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,CAAC,QAAQ,IAAI,EAAE,EAAE,CAAC;AACrE,CAAC;AAGD,SAAgB,uBAAuB,CACrC,GAAsC;IAEtC,IAAI,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,GAAG,CAAC,eAAe,IAAI,CAAC,GAAG,CAAC,QAAQ;QAC5D,OAAO,EAAE,WAAW,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC,QAAQ,IAAI,EAAE,EAAE,CAAC;IAC1D,OAAO;QACL,WAAW,EAAE,IAAA,mCAAkB,EAC7B;YACE,eAAe,EAAE,GAAG,CAAC,mBAAmB,IAAI,CAAC;YAC7C,QAAQ,EAAE,GAAG,CAAC,YAAY;YAC1B,WAAW,EAAE,GAAG,CAAC,eAAe;SACjC,EACD,GAAG,CAAC,KAAK,IAAI,CAAC,CACf;QACD,QAAQ,EAAE,GAAG,CAAC,QAAQ;KACvB,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAClB,GAAiB,EACjB,I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AI,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { KeyValueListItem, NavCardItem, StatGroupItem, TopListItem } from "@antelopejs/interface-dms/base";
|
|
2
|
+
import type { DatedWorkspace, DirectoryRow, DirectorySummary } from "./directory-summary";
|
|
3
|
+
import type { ReportingTotal } from "./normalised-mrr";
|
|
4
|
+
export declare const WORKSPACE_VIEW_IDS: {
|
|
5
|
+
readonly complimentaryEnding: "complimentary-ending";
|
|
6
|
+
readonly pastDueOverSevenDays: "past-due-7-days";
|
|
7
|
+
readonly trialsEnding: "trials-ending";
|
|
8
|
+
readonly ownerNeverJoined: "owner-never-joined";
|
|
9
|
+
readonly mrrOver500: "mrr-over-500";
|
|
10
|
+
};
|
|
11
|
+
export interface MigrationAttention {
|
|
12
|
+
count: number;
|
|
13
|
+
firstFromPlan: string;
|
|
14
|
+
firstToPlan: string;
|
|
15
|
+
firstFailed: number;
|
|
16
|
+
firstTotal: number;
|
|
17
|
+
}
|
|
18
|
+
export interface OpenInvoicesAttention {
|
|
19
|
+
count: number;
|
|
20
|
+
awaiting: ReportingTotal;
|
|
21
|
+
}
|
|
22
|
+
export interface AttentionInputs {
|
|
23
|
+
summary: DirectorySummary;
|
|
24
|
+
complimentaryEnding: DatedWorkspace[];
|
|
25
|
+
migrations: MigrationAttention;
|
|
26
|
+
openInvoices: OpenInvoicesAttention;
|
|
27
|
+
}
|
|
28
|
+
export declare function dashboardHeadline(summary: DirectorySummary): StatGroupItem[];
|
|
29
|
+
export declare function workspacesHeadline(summary: DirectorySummary, complimentaryEnding: DatedWorkspace[]): StatGroupItem[];
|
|
30
|
+
export declare function attentionCards(inputs: AttentionInputs): NavCardItem[];
|
|
31
|
+
export declare function workspacesByStatusItems(summary: DirectorySummary): KeyValueListItem[];
|
|
32
|
+
export declare function plansByMrrItems(rows: DirectoryRow[], currency: string): TopListItem[];
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WORKSPACE_VIEW_IDS = void 0;
|
|
4
|
+
exports.dashboardHeadline = dashboardHeadline;
|
|
5
|
+
exports.workspacesHeadline = workspacesHeadline;
|
|
6
|
+
exports.attentionCards = attentionCards;
|
|
7
|
+
exports.workspacesByStatusItems = workspacesByStatusItems;
|
|
8
|
+
exports.plansByMrrItems = plansByMrrItems;
|
|
9
|
+
const composed_text_1 = require("../i18n/composed-text");
|
|
10
|
+
const paths_1 = require("../pages/platform/paths");
|
|
11
|
+
const status_vocabulary_1 = require("../utils/status-vocabulary");
|
|
12
|
+
const money_1 = require("../utils/money");
|
|
13
|
+
exports.WORKSPACE_VIEW_IDS = {
|
|
14
|
+
complimentaryEnding: "complimentary-ending",
|
|
15
|
+
pastDueOverSevenDays: "past-due-7-days",
|
|
16
|
+
trialsEnding: "trials-ending",
|
|
17
|
+
ownerNeverJoined: "owner-never-joined",
|
|
18
|
+
mrrOver500: "mrr-over-500",
|
|
19
|
+
};
|
|
20
|
+
const K = "saas.dashboard";
|
|
21
|
+
const W = "saas.workspaces.headline";
|
|
22
|
+
const NAMED_ENDINGS_SHOWN = 2;
|
|
23
|
+
const MONTHS_PER_YEAR = 12;
|
|
24
|
+
function money(total) {
|
|
25
|
+
return (0, composed_text_1.moneyParam)(total.amountMinor, total.currency);
|
|
26
|
+
}
|
|
27
|
+
function otherCurrenciesNote(total) {
|
|
28
|
+
const amounts = (0, composed_text_1.commaList)(total.otherCurrencies.map((other) => (0, composed_text_1.moneyParam)(other.amountMinor, other.currency)));
|
|
29
|
+
return amounts ? (0, composed_text_1.composed)(`${K}.other_currencies`, { amounts }) : null;
|
|
30
|
+
}
|
|
31
|
+
function namedEndings(endings, key) {
|
|
32
|
+
return (0, composed_text_1.dotList)(endings
|
|
33
|
+
.slice(0, NAMED_ENDINGS_SHOWN)
|
|
34
|
+
.map((ending) => (0, composed_text_1.composed)(key, { name: ending.name, date: (0, composed_text_1.dateParam)(ending.at, "day") })));
|
|
35
|
+
}
|
|
36
|
+
function mrrItem(summary, detail) {
|
|
37
|
+
const note = otherCurrenciesNote(summary.mrr);
|
|
38
|
+
return {
|
|
39
|
+
id: "mrr",
|
|
40
|
+
icon: "i-ph-currency-circle-dollar",
|
|
41
|
+
tone: "primary",
|
|
42
|
+
eyebrow: `$${K}.headline.mrr`,
|
|
43
|
+
value: (0, composed_text_1.valueText)(money(summary.mrr)),
|
|
44
|
+
detail: note ? (0, composed_text_1.dotList)([detail, note]) : detail,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function dashboardHeadline(summary) {
|
|
48
|
+
const arr = {
|
|
49
|
+
...summary.mrr,
|
|
50
|
+
amountMinor: summary.mrr.amountMinor * MONTHS_PER_YEAR,
|
|
51
|
+
};
|
|
52
|
+
return [
|
|
53
|
+
mrrItem(summary, (0, composed_text_1.composed)(`${K}.headline.arr`, { arr: money(arr) })),
|
|
54
|
+
{
|
|
55
|
+
id: "paying",
|
|
56
|
+
icon: "i-ph-buildings",
|
|
57
|
+
eyebrow: `$${K}.headline.paying`,
|
|
58
|
+
value: (0, composed_text_1.composed)(`${K}.headline.paying_value`, {
|
|
59
|
+
paying: summary.paying,
|
|
60
|
+
total: summary.total,
|
|
61
|
+
}),
|
|
62
|
+
detail: (0, composed_text_1.composed)(`${K}.headline.paying_detail`, {
|
|
63
|
+
free: summary.byState.free,
|
|
64
|
+
trialing: summary.byState.trialing,
|
|
65
|
+
}),
|
|
66
|
+
to: (0, paths_1.workspacesTabPath)("active"),
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: "trials",
|
|
70
|
+
icon: "i-ph-hourglass-medium",
|
|
71
|
+
tone: "info",
|
|
72
|
+
eyebrow: `$${K}.headline.trials`,
|
|
73
|
+
value: summary.byState.trialing,
|
|
74
|
+
detail: (0, composed_text_1.composed)(`${K}.headline.trials_detail`, {
|
|
75
|
+
count: (0, composed_text_1.countParam)(summary.trialsEnding.count),
|
|
76
|
+
}),
|
|
77
|
+
to: (0, paths_1.workspacesViewPath)(exports.WORKSPACE_VIEW_IDS.trialsEnding),
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
}
|
|
81
|
+
function pastDueDetail(summary) {
|
|
82
|
+
const { atRisk, firstSuspension } = summary.pastDue;
|
|
83
|
+
const amount = money(atRisk);
|
|
84
|
+
return firstSuspension
|
|
85
|
+
? (0, composed_text_1.composed)(`${W}.past_due_detail`, {
|
|
86
|
+
amount,
|
|
87
|
+
date: (0, composed_text_1.dateParam)(firstSuspension, "day"),
|
|
88
|
+
})
|
|
89
|
+
: (0, composed_text_1.composed)(`${W}.past_due_detail_no_suspension`, { amount });
|
|
90
|
+
}
|
|
91
|
+
function workspacesHeadline(summary, complimentaryEnding) {
|
|
92
|
+
return [
|
|
93
|
+
mrrItem(summary, (0, composed_text_1.composed)(`${W}.mrr_detail`, { count: (0, composed_text_1.countParam)(summary.paying) })),
|
|
94
|
+
{
|
|
95
|
+
id: "past_due",
|
|
96
|
+
icon: "i-ph-warning-circle",
|
|
97
|
+
tone: summary.pastDue.count > 0 ? "error" : "muted",
|
|
98
|
+
eyebrow: `$${W}.past_due`,
|
|
99
|
+
value: summary.pastDue.count,
|
|
100
|
+
detail: pastDueDetail(summary),
|
|
101
|
+
detailTone: summary.pastDue.count > 0 ? "error" : undefined,
|
|
102
|
+
to: (0, paths_1.workspacesTabPath)("past_due"),
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: "complimentary_ending",
|
|
106
|
+
icon: "i-ph-gift",
|
|
107
|
+
tone: complimentaryEnding.length > 0 ? "warning" : "muted",
|
|
108
|
+
eyebrow: `$${W}.complimentary_ending`,
|
|
109
|
+
value: complimentaryEnding.length,
|
|
110
|
+
detail: namedEndings(complimentaryEnding, `${W}.named_ending`) ??
|
|
111
|
+
`$${W}.none_this_week`,
|
|
112
|
+
to: (0, paths_1.workspacesViewPath)(exports.WORKSPACE_VIEW_IDS.complimentaryEnding),
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: "trials_ending",
|
|
116
|
+
icon: "i-ph-hourglass-medium",
|
|
117
|
+
tone: "info",
|
|
118
|
+
eyebrow: `$${W}.trials_ending`,
|
|
119
|
+
value: summary.trialsEnding.count,
|
|
120
|
+
detail: (0, composed_text_1.composed)(`${W}.trials_ending_detail`, {
|
|
121
|
+
amount: money(summary.trialsEnding.thenMrr),
|
|
122
|
+
}),
|
|
123
|
+
to: (0, paths_1.workspacesViewPath)(exports.WORKSPACE_VIEW_IDS.trialsEnding),
|
|
124
|
+
},
|
|
125
|
+
];
|
|
126
|
+
}
|
|
127
|
+
function pastDueCard(summary) {
|
|
128
|
+
return {
|
|
129
|
+
id: "past_due",
|
|
130
|
+
icon: "i-ph-warning-circle",
|
|
131
|
+
iconTone: "error",
|
|
132
|
+
title: (0, composed_text_1.composed)(`${K}.attention.past_due`, {
|
|
133
|
+
count: (0, composed_text_1.countParam)(summary.pastDue.count),
|
|
134
|
+
}),
|
|
135
|
+
description: pastDueDetail(summary),
|
|
136
|
+
to: (0, paths_1.workspacesTabPath)("past_due"),
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
function complimentaryCard(endings) {
|
|
140
|
+
return {
|
|
141
|
+
id: "complimentary_ending",
|
|
142
|
+
icon: "i-ph-gift",
|
|
143
|
+
iconTone: "warning",
|
|
144
|
+
title: (0, composed_text_1.composed)(`${K}.attention.complimentary_ending`, {
|
|
145
|
+
count: (0, composed_text_1.countParam)(endings.length),
|
|
146
|
+
}),
|
|
147
|
+
description: namedEndings(endings, `${K}.attention.named_ending`) ?? undefined,
|
|
148
|
+
to: (0, paths_1.workspacesViewPath)(exports.WORKSPACE_VIEW_IDS.complimentaryEnding),
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function migrationsCard(migrations) {
|
|
152
|
+
return {
|
|
153
|
+
id: "migrations",
|
|
154
|
+
icon: "i-ph-arrows-clockwise",
|
|
155
|
+
iconTone: "error",
|
|
156
|
+
title: (0, composed_text_1.composed)(`${K}.attention.migrations`, {
|
|
157
|
+
count: (0, composed_text_1.countParam)(migrations.count),
|
|
158
|
+
}),
|
|
159
|
+
description: (0, composed_text_1.composed)(`${K}.attention.migrations_detail`, {
|
|
160
|
+
from: migrations.firstFromPlan,
|
|
161
|
+
to: migrations.firstToPlan,
|
|
162
|
+
failed: migrations.firstFailed,
|
|
163
|
+
total: migrations.firstTotal,
|
|
164
|
+
}),
|
|
165
|
+
to: paths_1.PLAN_MIGRATIONS_PAGE_PATH,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
function openInvoicesCard(open) {
|
|
169
|
+
return {
|
|
170
|
+
id: "open_invoices",
|
|
171
|
+
icon: "i-ph-receipt",
|
|
172
|
+
iconTone: "warning",
|
|
173
|
+
title: (0, composed_text_1.composed)(`${K}.attention.open_invoices`, {
|
|
174
|
+
count: (0, composed_text_1.countParam)(open.count),
|
|
175
|
+
}),
|
|
176
|
+
description: (0, composed_text_1.composed)(`${K}.attention.open_invoices_detail`, {
|
|
177
|
+
amount: money(open.awaiting),
|
|
178
|
+
}),
|
|
179
|
+
to: `${paths_1.INVOICES_PAGE_PATH}?tab=open`,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function attentionCards(inputs) {
|
|
183
|
+
const queues = [
|
|
184
|
+
[inputs.summary.pastDue.count, () => pastDueCard(inputs.summary)],
|
|
185
|
+
[
|
|
186
|
+
inputs.complimentaryEnding.length,
|
|
187
|
+
() => complimentaryCard(inputs.complimentaryEnding),
|
|
188
|
+
],
|
|
189
|
+
[inputs.migrations.count, () => migrationsCard(inputs.migrations)],
|
|
190
|
+
[inputs.openInvoices.count, () => openInvoicesCard(inputs.openInvoices)],
|
|
191
|
+
];
|
|
192
|
+
return queues.filter(([count]) => count > 0).map(([, card]) => card());
|
|
193
|
+
}
|
|
194
|
+
function workspacesByStatusItems(summary) {
|
|
195
|
+
return status_vocabulary_1.WORKSPACE_STATUS_ORDER.map((state) => ({
|
|
196
|
+
id: state,
|
|
197
|
+
label: `$saas.status.workspace.${state}`,
|
|
198
|
+
value: summary.byState[state],
|
|
199
|
+
tone: status_vocabulary_1.STATUS_TONES.workspace[state],
|
|
200
|
+
to: (0, paths_1.workspacesTabPath)(state),
|
|
201
|
+
}));
|
|
202
|
+
}
|
|
203
|
+
function groupByPlan(rows, currency) {
|
|
204
|
+
const groups = new Map();
|
|
205
|
+
for (const row of rows) {
|
|
206
|
+
if (!row.planId || !row.mrrMinor || row.currency !== currency)
|
|
207
|
+
continue;
|
|
208
|
+
const group = groups.get(row.planId) ?? {
|
|
209
|
+
planId: row.planId,
|
|
210
|
+
name: row.planName ?? "—",
|
|
211
|
+
workspaces: 0,
|
|
212
|
+
mrrMinor: 0,
|
|
213
|
+
row,
|
|
214
|
+
};
|
|
215
|
+
group.workspaces += 1;
|
|
216
|
+
group.mrrMinor += row.mrrMinor;
|
|
217
|
+
groups.set(row.planId, group);
|
|
218
|
+
}
|
|
219
|
+
return [...groups.values()];
|
|
220
|
+
}
|
|
221
|
+
function planPriceLabel(row) {
|
|
222
|
+
const key = row.planBillingMode === "seat" ? "price_per_seat" : "price_flat";
|
|
223
|
+
return (0, composed_text_1.composed)(`saas.workspaces.plan_cell.${key}`, {
|
|
224
|
+
price: (0, composed_text_1.moneyParam)(row.planUnitAmountMinor ?? 0, row.currency ?? ""),
|
|
225
|
+
interval: (0, composed_text_1.composed)(`saas.workspaces.interval.${row.planInterval}`),
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
function plansByMrrItems(rows, currency) {
|
|
229
|
+
return groupByPlan(rows, currency)
|
|
230
|
+
.sort((left, right) => right.mrrMinor - left.mrrMinor)
|
|
231
|
+
.map((group) => ({
|
|
232
|
+
id: group.planId,
|
|
233
|
+
title: group.name,
|
|
234
|
+
description: (0, composed_text_1.composed)(`${K}.plans.description`, {
|
|
235
|
+
count: (0, composed_text_1.countParam)(group.workspaces),
|
|
236
|
+
price: planPriceLabel(group.row),
|
|
237
|
+
}),
|
|
238
|
+
value: (0, money_1.fromMinorUnits)(group.mrrMinor, currency),
|
|
239
|
+
to: (0, paths_1.planEditPath)(group.planId),
|
|
240
|
+
}));
|
|
241
|
+
}
|
|
242
|
+
//# sourceMappingURL=headline-items.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headline-items.js","sourceRoot":"","sources":["../../src/metrics/headline-items.ts"],"names":[],"mappings":";;;AAoHA,8CAiCC;AAcD,gDA0CC;AA+DD,wCAWC;AAGD,0DAUC;AAqCD,0CAgBC;AAjVD,yDAQ+B;AAC/B,mDAMiC;AACjC,kEAGoC;AAOpC,0CAAgD;AAGnC,QAAA,kBAAkB,GAAG;IAChC,mBAAmB,EAAE,sBAAsB;IAC3C,oBAAoB,EAAE,iBAAiB;IACvC,YAAY,EAAE,eAAe;IAC7B,gBAAgB,EAAE,oBAAoB;IACtC,UAAU,EAAE,cAAc;CAClB,CAAC;AAyBX,MAAM,CAAC,GAAG,gBAAgB,CAAC;AAC3B,MAAM,CAAC,GAAG,0BAA0B,CAAC;AACrC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAC9B,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B,SAAS,KAAK,CAAC,KAAqB;IAClC,OAAO,IAAA,0BAAU,EAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;AACvD,CAAC;AAGD,SAAS,mBAAmB,CAAC,KAAqB;IAChD,MAAM,OAAO,GAAG,IAAA,yBAAS,EACvB,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAClC,IAAA,0BAAU,EAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,CAC9C,CACF,CAAC;IACF,OAAO,OAAO,CAAC,CAAC,CAAC,IAAA,wBAAQ,EAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,OAAO,EAAE,C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