@antelopejs/dms-saas 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -2
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.js +1 -0
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/owner-only-permissions-resolver.d.ts +1 -0
- package/dist/auth/owner-only-permissions-resolver.js +25 -0
- package/dist/auth/owner-only-permissions-resolver.js.map +1 -0
- package/dist/billing-state/directory-hooks.d.ts +1 -0
- package/dist/billing-state/directory-hooks.js +35 -0
- package/dist/billing-state/directory-hooks.js.map +1 -0
- package/dist/billing-state/directory.d.ts +29 -0
- package/dist/billing-state/directory.js +152 -0
- package/dist/billing-state/directory.js.map +1 -0
- package/dist/billing-state/index.d.ts +5 -1
- package/dist/billing-state/index.js +14 -2
- package/dist/billing-state/index.js.map +1 -1
- package/dist/billing-state/past-due-banner.d.ts +4 -3
- package/dist/billing-state/past-due-banner.js +30 -10
- package/dist/billing-state/past-due-banner.js.map +1 -1
- package/dist/billing-state/recovery.d.ts +4 -0
- package/dist/billing-state/recovery.js +7 -5
- package/dist/billing-state/recovery.js.map +1 -1
- package/dist/billing-state/trial-ending-banner.d.ts +4 -0
- package/dist/billing-state/trial-ending-banner.js +66 -0
- package/dist/billing-state/trial-ending-banner.js.map +1 -0
- package/dist/config/runtime.d.ts +1 -0
- package/dist/config/runtime.js +5 -0
- package/dist/config/runtime.js.map +1 -1
- package/dist/crons/auto-suspend-past-due.js +4 -5
- package/dist/crons/auto-suspend-past-due.js.map +1 -1
- package/dist/data-api/platformOwner/admin-user-invoices.d.ts +6 -4
- package/dist/data-api/platformOwner/admin-user-invoices.js +52 -30
- package/dist/data-api/platformOwner/admin-user-invoices.js.map +1 -1
- package/dist/data-api/platformOwner/admin-user-workspaces.d.ts +2 -0
- package/dist/data-api/platformOwner/admin-user-workspaces.js +69 -3
- package/dist/data-api/platformOwner/admin-user-workspaces.js.map +1 -1
- package/dist/data-api/platformOwner/credit-note-rows.d.ts +11 -0
- package/dist/data-api/platformOwner/credit-note-rows.js +54 -0
- package/dist/data-api/platformOwner/credit-note-rows.js.map +1 -0
- package/dist/data-api/platformOwner/credit-notes.d.ts +13 -0
- package/dist/data-api/platformOwner/credit-notes.js +149 -10
- package/dist/data-api/platformOwner/credit-notes.js.map +1 -1
- package/dist/data-api/platformOwner/features.d.ts +7 -2
- package/dist/data-api/platformOwner/features.js +151 -37
- package/dist/data-api/platformOwner/features.js.map +1 -1
- package/dist/data-api/platformOwner/invitations.js +29 -9
- package/dist/data-api/platformOwner/invitations.js.map +1 -1
- package/dist/data-api/platformOwner/invoice-cells.d.ts +5 -0
- package/dist/data-api/platformOwner/invoice-cells.js +51 -0
- package/dist/data-api/platformOwner/invoice-cells.js.map +1 -0
- package/dist/data-api/platformOwner/invoice-options.js.map +1 -1
- package/dist/data-api/platformOwner/invoice-rows.d.ts +9 -0
- package/dist/data-api/platformOwner/invoice-rows.js +39 -0
- package/dist/data-api/platformOwner/invoice-rows.js.map +1 -0
- package/dist/data-api/platformOwner/invoices.d.ts +24 -6
- package/dist/data-api/platformOwner/invoices.js +192 -11
- package/dist/data-api/platformOwner/invoices.js.map +1 -1
- package/dist/data-api/platformOwner/members.d.ts +2 -1
- package/dist/data-api/platformOwner/members.js +56 -20
- package/dist/data-api/platformOwner/members.js.map +1 -1
- package/dist/data-api/platformOwner/plan-migrations.d.ts +14 -2
- package/dist/data-api/platformOwner/plan-migrations.js +179 -33
- package/dist/data-api/platformOwner/plan-migrations.js.map +1 -1
- package/dist/data-api/platformOwner/plans.d.ts +30 -6
- package/dist/data-api/platformOwner/plans.js +269 -44
- package/dist/data-api/platformOwner/plans.js.map +1 -1
- package/dist/data-api/platformOwner/segments.d.ts +9 -7
- package/dist/data-api/platformOwner/segments.js +108 -101
- package/dist/data-api/platformOwner/segments.js.map +1 -1
- package/dist/data-api/platformOwner/table-scope.d.ts +6 -0
- package/dist/data-api/platformOwner/table-scope.js +8 -0
- package/dist/data-api/platformOwner/table-scope.js.map +1 -0
- package/dist/data-api/platformOwner/users.d.ts +15 -2
- package/dist/data-api/platformOwner/users.js +171 -15
- package/dist/data-api/platformOwner/users.js.map +1 -1
- package/dist/data-api/platformOwner/workspace-cells.d.ts +12 -0
- package/dist/data-api/platformOwner/workspace-cells.js +90 -0
- package/dist/data-api/platformOwner/workspace-cells.js.map +1 -0
- package/dist/data-api/platformOwner/workspaces.d.ts +26 -4
- package/dist/data-api/platformOwner/workspaces.js +269 -97
- package/dist/data-api/platformOwner/workspaces.js.map +1 -1
- package/dist/data-api/tenant/tenant-invoices.d.ts +4 -0
- package/dist/data-api/tenant/tenant-invoices.js +68 -4
- package/dist/data-api/tenant/tenant-invoices.js.map +1 -1
- package/dist/hooks/register.js +5 -1
- package/dist/hooks/register.js.map +1 -1
- package/dist/i18n/composed-text.d.ts +17 -0
- package/dist/i18n/composed-text.js +71 -0
- package/dist/i18n/composed-text.js.map +1 -0
- package/dist/implementations/dms-saas/billing.d.ts +1 -0
- package/dist/implementations/dms-saas/billing.js +4 -1
- package/dist/implementations/dms-saas/billing.js.map +1 -1
- package/dist/implementations/dms-saas/pages.d.ts +0 -1
- package/dist/implementations/dms-saas/pages.js +0 -4
- package/dist/implementations/dms-saas/pages.js.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/metrics/activity-sources.d.ts +2 -0
- package/dist/metrics/activity-sources.js +60 -0
- package/dist/metrics/activity-sources.js.map +1 -0
- package/dist/metrics/activity.d.ts +25 -0
- package/dist/metrics/activity.js +197 -0
- package/dist/metrics/activity.js.map +1 -0
- package/dist/metrics/directory-summary.d.ts +30 -0
- package/dist/metrics/directory-summary.js +95 -0
- package/dist/metrics/directory-summary.js.map +1 -0
- package/dist/metrics/headline-items.d.ts +32 -0
- package/dist/metrics/headline-items.js +242 -0
- package/dist/metrics/headline-items.js.map +1 -0
- package/dist/metrics/normalised-mrr.d.ts +32 -0
- package/dist/metrics/normalised-mrr.js +75 -0
- package/dist/metrics/normalised-mrr.js.map +1 -0
- package/dist/metrics/revenue.d.ts +30 -0
- package/dist/metrics/revenue.js +126 -0
- package/dist/metrics/revenue.js.map +1 -0
- package/dist/notifications/recipients.d.ts +1 -0
- package/dist/notifications/recipients.js +4 -0
- package/dist/notifications/recipients.js.map +1 -1
- package/dist/notifications/subjects.d.ts +18 -17
- package/dist/notifications/subjects.js +7 -1
- package/dist/notifications/subjects.js.map +1 -1
- package/dist/operator-actions/commands.js +9 -6
- package/dist/operator-actions/commands.js.map +1 -1
- package/dist/operator-actions/invitation-commands.d.ts +7 -1
- package/dist/operator-actions/invitation-commands.js +16 -0
- package/dist/operator-actions/invitation-commands.js.map +1 -1
- package/dist/operator-actions/previews.d.ts +50 -0
- package/dist/operator-actions/previews.js +113 -0
- package/dist/operator-actions/previews.js.map +1 -0
- package/dist/operator-actions/types.d.ts +1 -1
- package/dist/operator-actions/upgrade-preview.d.ts +35 -0
- package/dist/operator-actions/upgrade-preview.js +110 -0
- package/dist/operator-actions/upgrade-preview.js.map +1 -0
- package/dist/operator-billing/billing-rules.d.ts +58 -0
- package/dist/operator-billing/billing-rules.js +90 -0
- package/dist/operator-billing/billing-rules.js.map +1 -0
- package/dist/operator-billing/billing-settings-store.d.ts +3 -0
- package/dist/operator-billing/billing-settings-store.js +34 -0
- package/dist/operator-billing/billing-settings-store.js.map +1 -0
- package/dist/operator-billing/billing-stats.d.ts +37 -0
- package/dist/operator-billing/billing-stats.js +197 -0
- package/dist/operator-billing/billing-stats.js.map +1 -0
- package/dist/operator-billing/credit-allowance.d.ts +17 -0
- package/dist/operator-billing/credit-allowance.js +44 -0
- package/dist/operator-billing/credit-allowance.js.map +1 -0
- package/dist/operator-billing/credit-note-request.d.ts +39 -0
- package/dist/operator-billing/credit-note-request.js +73 -0
- package/dist/operator-billing/credit-note-request.js.map +1 -0
- package/dist/operator-billing/index.d.ts +8 -0
- package/dist/operator-billing/index.js +25 -0
- package/dist/operator-billing/index.js.map +1 -0
- package/dist/operator-billing/invoice-credit.d.ts +41 -0
- package/dist/operator-billing/invoice-credit.js +111 -0
- package/dist/operator-billing/invoice-credit.js.map +1 -0
- package/dist/operator-billing/legal-documents-store.d.ts +12 -0
- package/dist/operator-billing/legal-documents-store.js +46 -0
- package/dist/operator-billing/legal-documents-store.js.map +1 -0
- package/dist/operator-billing/legal-versions.d.ts +5 -0
- package/dist/operator-billing/legal-versions.js +31 -0
- package/dist/operator-billing/legal-versions.js.map +1 -0
- package/dist/pages/block-meta.d.ts +15 -0
- package/dist/pages/block-meta.js +21 -0
- package/dist/pages/block-meta.js.map +1 -0
- package/dist/pages/module.d.ts +1 -3
- package/dist/pages/module.js +1 -8
- package/dist/pages/module.js.map +1 -1
- package/dist/pages/platform/credit-notes.d.ts +1 -0
- package/dist/pages/platform/credit-notes.js +63 -5
- package/dist/pages/platform/credit-notes.js.map +1 -1
- package/dist/pages/platform/dashboard.d.ts +4 -1
- package/dist/pages/platform/dashboard.js +123 -64
- package/dist/pages/platform/dashboard.js.map +1 -1
- package/dist/pages/platform/features.js +83 -12
- package/dist/pages/platform/features.js.map +1 -1
- package/dist/pages/platform/index.d.ts +1 -0
- package/dist/pages/platform/index.js +1 -0
- package/dist/pages/platform/index.js.map +1 -1
- package/dist/pages/platform/invoices.d.ts +6 -0
- package/dist/pages/platform/invoices.js +84 -28
- package/dist/pages/platform/invoices.js.map +1 -1
- package/dist/pages/platform/paths.d.ts +9 -0
- package/dist/pages/platform/paths.js +25 -0
- package/dist/pages/platform/paths.js.map +1 -0
- package/dist/pages/platform/plans/edit.d.ts +2 -2
- package/dist/pages/platform/plans/edit.js +170 -105
- package/dist/pages/platform/plans/edit.js.map +1 -1
- package/dist/pages/platform/plans/index.d.ts +1 -0
- package/dist/pages/platform/plans/index.js +172 -55
- package/dist/pages/platform/plans/index.js.map +1 -1
- package/dist/pages/platform/plans/migrations.d.ts +12 -0
- package/dist/pages/platform/plans/migrations.js +259 -13
- package/dist/pages/platform/plans/migrations.js.map +1 -1
- package/dist/pages/platform/segments/edit.d.ts +17 -0
- package/dist/pages/platform/segments/edit.js +124 -0
- package/dist/pages/platform/segments/edit.js.map +1 -0
- package/dist/pages/platform/segments/index.js +68 -8
- package/dist/pages/platform/segments/index.js.map +1 -1
- package/dist/pages/platform/settings.d.ts +1 -1
- package/dist/pages/platform/settings.js +164 -105
- package/dist/pages/platform/settings.js.map +1 -1
- package/dist/pages/platform/users/detail.js +104 -33
- package/dist/pages/platform/users/detail.js.map +1 -1
- package/dist/pages/platform/users/index.js +52 -18
- package/dist/pages/platform/users/index.js.map +1 -1
- package/dist/pages/platform/workspaces/detail.d.ts +3 -1
- package/dist/pages/platform/workspaces/detail.js +184 -113
- package/dist/pages/platform/workspaces/detail.js.map +1 -1
- package/dist/pages/platform/workspaces/index.d.ts +1 -20
- package/dist/pages/platform/workspaces/index.js +152 -180
- package/dist/pages/platform/workspaces/index.js.map +1 -1
- package/dist/pages/platform/workspaces/shared.d.ts +11 -0
- package/dist/pages/platform/workspaces/shared.js +53 -0
- package/dist/pages/platform/workspaces/shared.js.map +1 -0
- package/dist/pages/public/auth/no-workspace.js +7 -2
- package/dist/pages/public/auth/no-workspace.js.map +1 -1
- package/dist/pages/public/index.js.map +1 -1
- package/dist/pages/public/legal/privacy-policy.d.ts +1 -0
- package/dist/pages/public/legal/privacy-policy.js +9 -4
- package/dist/pages/public/legal/privacy-policy.js.map +1 -1
- package/dist/pages/public/legal/terms-and-conditions.d.ts +1 -0
- package/dist/pages/public/legal/terms-and-conditions.js +9 -4
- package/dist/pages/public/legal/terms-and-conditions.js.map +1 -1
- package/dist/pages/public/legal/terms-of-use.d.ts +1 -0
- package/dist/pages/public/legal/terms-of-use.js +9 -4
- package/dist/pages/public/legal/terms-of-use.js.map +1 -1
- package/dist/pages/public/nav-bar.d.ts +2 -0
- package/dist/pages/public/nav-bar.js +14 -0
- package/dist/pages/public/nav-bar.js.map +1 -0
- package/dist/pages/public/pricing.d.ts +10 -0
- package/dist/pages/public/pricing.js +32 -0
- package/dist/pages/public/pricing.js.map +1 -0
- package/dist/pages/public/register.d.ts +1 -0
- package/dist/pages/public/register.js +6 -3
- package/dist/pages/public/register.js.map +1 -1
- package/dist/pages/public/screens.js +1 -0
- package/dist/pages/public/screens.js.map +1 -1
- package/dist/pages/tenant/billing.d.ts +7 -7
- package/dist/pages/tenant/billing.js +141 -63
- package/dist/pages/tenant/billing.js.map +1 -1
- package/dist/pages/tenant/data-export.d.ts +3 -1
- package/dist/pages/tenant/data-export.js +25 -6
- package/dist/pages/tenant/data-export.js.map +1 -1
- package/dist/pages/tenant/general.d.ts +3 -2
- package/dist/pages/tenant/general.js +91 -11
- package/dist/pages/tenant/general.js.map +1 -1
- package/dist/pages/tenant/index.d.ts +1 -0
- package/dist/pages/tenant/index.js +1 -0
- package/dist/pages/tenant/index.js.map +1 -1
- package/dist/pages/tenant/members-seat-quota.d.ts +3 -0
- package/dist/pages/tenant/members-seat-quota.js +18 -6
- package/dist/pages/tenant/members-seat-quota.js.map +1 -1
- package/dist/pages/tenant/owner-only.d.ts +1 -0
- package/dist/pages/tenant/owner-only.js +14 -0
- package/dist/pages/tenant/owner-only.js.map +1 -0
- package/dist/pages/tenant/workspace-suspended.js +7 -3
- package/dist/pages/tenant/workspace-suspended.js.map +1 -1
- package/dist/plan-changes/applied-upgrade.d.ts +5 -0
- package/dist/plan-changes/applied-upgrade.js +51 -0
- package/dist/plan-changes/applied-upgrade.js.map +1 -0
- package/dist/plan-changes/deferred.js +9 -40
- package/dist/plan-changes/deferred.js.map +1 -1
- package/dist/plan-changes/immediate.d.ts +4 -0
- package/dist/plan-changes/immediate.js +34 -0
- package/dist/plan-changes/immediate.js.map +1 -0
- package/dist/plan-changes/index.d.ts +1 -0
- package/dist/plan-changes/index.js +1 -0
- package/dist/plan-changes/index.js.map +1 -1
- package/dist/plan-changes/pending-target.d.ts +17 -0
- package/dist/plan-changes/pending-target.js +62 -0
- package/dist/plan-changes/pending-target.js.map +1 -0
- package/dist/plans/catalogue-summary.d.ts +24 -0
- package/dist/plans/catalogue-summary.js +97 -0
- package/dist/plans/catalogue-summary.js.map +1 -0
- package/dist/plans/catalogue-usage.d.ts +36 -0
- package/dist/plans/catalogue-usage.js +120 -0
- package/dist/plans/catalogue-usage.js.map +1 -0
- package/dist/plans/feature-guards.d.ts +5 -0
- package/dist/plans/feature-guards.js +31 -0
- package/dist/plans/feature-guards.js.map +1 -0
- package/dist/plans/feature-usage.d.ts +4 -0
- package/dist/plans/feature-usage.js +22 -0
- package/dist/plans/feature-usage.js.map +1 -0
- package/dist/plans/migration-blocks.d.ts +13 -0
- package/dist/plans/migration-blocks.js +337 -0
- package/dist/plans/migration-blocks.js.map +1 -0
- package/dist/plans/migration-detail.d.ts +48 -0
- package/dist/plans/migration-detail.js +80 -0
- package/dist/plans/migration-detail.js.map +1 -0
- package/dist/plans/migration-dialogs.d.ts +8 -0
- package/dist/plans/migration-dialogs.js +103 -0
- package/dist/plans/migration-dialogs.js.map +1 -0
- package/dist/plans/migration-outcomes.d.ts +7 -0
- package/dist/plans/migration-outcomes.js +38 -0
- package/dist/plans/migration-outcomes.js.map +1 -0
- package/dist/plans/migration-realtime.d.ts +2 -0
- package/dist/plans/migration-realtime.js +19 -0
- package/dist/plans/migration-realtime.js.map +1 -0
- package/dist/plans/migration-workspaces.d.ts +40 -0
- package/dist/plans/migration-workspaces.js +121 -0
- package/dist/plans/migration-workspaces.js.map +1 -0
- package/dist/plans/money.d.ts +1 -0
- package/dist/plans/money.js +11 -0
- package/dist/plans/money.js.map +1 -0
- package/dist/plans/plan-access-type.d.ts +25 -0
- package/dist/plans/plan-access-type.js +49 -0
- package/dist/plans/plan-access-type.js.map +1 -0
- package/dist/plans/plan-audience.d.ts +3 -0
- package/dist/plans/plan-audience.js +9 -0
- package/dist/plans/plan-audience.js.map +1 -0
- package/dist/plans/plan-diff.d.ts +13 -0
- package/dist/plans/plan-diff.js +73 -0
- package/dist/plans/plan-diff.js.map +1 -0
- package/dist/plans/plan-permission-tree.d.ts +11 -0
- package/dist/plans/plan-permission-tree.js +58 -0
- package/dist/plans/plan-permission-tree.js.map +1 -0
- package/dist/plans/plan-write.d.ts +17 -0
- package/dist/plans/plan-write.js +111 -0
- package/dist/plans/plan-write.js.map +1 -0
- package/dist/plans/seat-capacity.d.ts +3 -1
- package/dist/plans/seat-capacity.js +10 -2
- package/dist/plans/seat-capacity.js.map +1 -1
- package/dist/plans/seat-hooks.d.ts +1 -0
- package/dist/plans/seat-hooks.js +1 -0
- package/dist/plans/seat-hooks.js.map +1 -1
- package/dist/plans/stripe-sync.d.ts +3 -0
- package/dist/plans/stripe-sync.js +16 -0
- package/dist/plans/stripe-sync.js.map +1 -1
- package/dist/routes/platformOwner/billing-settings.d.ts +11 -35
- package/dist/routes/platformOwner/billing-settings.js +77 -47
- package/dist/routes/platformOwner/billing-settings.js.map +1 -1
- package/dist/routes/platformOwner/billing-stats.d.ts +15 -0
- package/dist/routes/platformOwner/billing-stats.js +106 -0
- package/dist/routes/platformOwner/billing-stats.js.map +1 -0
- package/dist/routes/platformOwner/block-payloads.d.ts +7 -0
- package/dist/routes/platformOwner/block-payloads.js +3 -0
- package/dist/routes/platformOwner/block-payloads.js.map +1 -0
- package/dist/routes/platformOwner/credit-notes-issue.d.ts +7 -8
- package/dist/routes/platformOwner/credit-notes-issue.js +28 -16
- package/dist/routes/platformOwner/credit-notes-issue.js.map +1 -1
- package/dist/routes/platformOwner/dashboard.d.ts +14 -57
- package/dist/routes/platformOwner/dashboard.js +126 -247
- package/dist/routes/platformOwner/dashboard.js.map +1 -1
- package/dist/routes/platformOwner/index.d.ts +7 -0
- package/dist/routes/platformOwner/index.js +7 -0
- package/dist/routes/platformOwner/index.js.map +1 -1
- package/dist/routes/platformOwner/plan-deletion.d.ts +77 -19
- package/dist/routes/platformOwner/plan-deletion.js +219 -67
- package/dist/routes/platformOwner/plan-deletion.js.map +1 -1
- package/dist/routes/platformOwner/plan-dialogs.d.ts +22 -0
- package/dist/routes/platformOwner/plan-dialogs.js +211 -0
- package/dist/routes/platformOwner/plan-dialogs.js.map +1 -0
- package/dist/routes/platformOwner/plan-migration-context.d.ts +9 -0
- package/dist/routes/platformOwner/plan-migration-context.js +147 -0
- package/dist/routes/platformOwner/plan-migration-context.js.map +1 -0
- package/dist/routes/platformOwner/plan-migration-export.d.ts +12 -0
- package/dist/routes/platformOwner/plan-migration-export.js +100 -0
- package/dist/routes/platformOwner/plan-migration-export.js.map +1 -0
- package/dist/routes/platformOwner/plan-migrations.d.ts +43 -0
- package/dist/routes/platformOwner/plan-migrations.js +260 -0
- package/dist/routes/platformOwner/plan-migrations.js.map +1 -0
- package/dist/routes/platformOwner/plans.d.ts +44 -41
- package/dist/routes/platformOwner/plans.js +155 -142
- package/dist/routes/platformOwner/plans.js.map +1 -1
- package/dist/routes/platformOwner/platform-owners.d.ts +8 -6
- package/dist/routes/platformOwner/platform-owners.js +40 -12
- package/dist/routes/platformOwner/platform-owners.js.map +1 -1
- package/dist/routes/platformOwner/segments-export.d.ts +15 -0
- package/dist/routes/platformOwner/segments-export.js +143 -0
- package/dist/routes/platformOwner/segments-export.js.map +1 -0
- package/dist/routes/platformOwner/segments.d.ts +17 -11
- package/dist/routes/platformOwner/segments.js +62 -113
- package/dist/routes/platformOwner/segments.js.map +1 -1
- package/dist/routes/platformOwner/stripe-dashboard.d.ts +6 -0
- package/dist/routes/platformOwner/stripe-dashboard.js +29 -0
- package/dist/routes/platformOwner/stripe-dashboard.js.map +1 -0
- package/dist/routes/platformOwner/users-detail.d.ts +12 -22
- package/dist/routes/platformOwner/users-detail.js +60 -53
- package/dist/routes/platformOwner/users-detail.js.map +1 -1
- package/dist/routes/platformOwner/workspace-detail.d.ts +36 -0
- package/dist/routes/platformOwner/workspace-detail.js +222 -0
- package/dist/routes/platformOwner/workspace-detail.js.map +1 -0
- package/dist/routes/platformOwner/workspace-invitations.d.ts +4 -0
- package/dist/routes/platformOwner/workspace-invitations.js +18 -0
- package/dist/routes/platformOwner/workspace-invitations.js.map +1 -1
- package/dist/routes/platformOwner/workspace-operator-actions.d.ts +14 -2
- package/dist/routes/platformOwner/workspace-operator-actions.js +42 -4
- package/dist/routes/platformOwner/workspace-operator-actions.js.map +1 -1
- package/dist/routes/platformOwner/workspaces-admin.d.ts +17 -12
- package/dist/routes/platformOwner/workspaces-admin.js +122 -28
- package/dist/routes/platformOwner/workspaces-admin.js.map +1 -1
- package/dist/routes/public/index.d.ts +1 -0
- package/dist/routes/public/index.js +1 -0
- package/dist/routes/public/index.js.map +1 -1
- package/dist/routes/public/legal-documents.d.ts +2 -8
- package/dist/routes/public/legal-documents.js +4 -39
- package/dist/routes/public/legal-documents.js.map +1 -1
- package/dist/routes/public/pricing.d.ts +12 -0
- package/dist/routes/public/pricing.js +50 -0
- package/dist/routes/public/pricing.js.map +1 -0
- package/dist/routes/public/public-plan-catalog.d.ts +37 -0
- package/dist/routes/public/public-plan-catalog.js +63 -0
- package/dist/routes/public/public-plan-catalog.js.map +1 -0
- package/dist/routes/public/register.d.ts +13 -0
- package/dist/routes/public/register.js +88 -4
- package/dist/routes/public/register.js.map +1 -1
- package/dist/routes/tenant/billing-pay-invoice.d.ts +13 -0
- package/dist/routes/tenant/billing-pay-invoice.js +82 -0
- package/dist/routes/tenant/billing-pay-invoice.js.map +1 -0
- package/dist/routes/tenant/billing-portal.d.ts +8 -3
- package/dist/routes/tenant/billing-portal.js +34 -16
- package/dist/routes/tenant/billing-portal.js.map +1 -1
- package/dist/routes/tenant/billing-self-refund.d.ts +26 -1
- package/dist/routes/tenant/billing-self-refund.js +95 -46
- package/dist/routes/tenant/billing-self-refund.js.map +1 -1
- package/dist/routes/tenant/complimentary-banner.d.ts +12 -0
- package/dist/routes/tenant/complimentary-banner.js +64 -0
- package/dist/routes/tenant/complimentary-banner.js.map +1 -0
- package/dist/routes/tenant/data-export.js +14 -0
- package/dist/routes/tenant/data-export.js.map +1 -1
- package/dist/routes/tenant/index.d.ts +7 -0
- package/dist/routes/tenant/index.js +7 -0
- package/dist/routes/tenant/index.js.map +1 -1
- package/dist/routes/tenant/tenant-billing.d.ts +1 -0
- package/dist/routes/tenant/tenant-billing.js +18 -13
- package/dist/routes/tenant/tenant-billing.js.map +1 -1
- package/dist/routes/tenant/tenant-plan-authentication.d.ts +13 -0
- package/dist/routes/tenant/tenant-plan-authentication.js +79 -0
- package/dist/routes/tenant/tenant-plan-authentication.js.map +1 -0
- package/dist/routes/tenant/tenant-plan-cancellation.d.ts +12 -0
- package/dist/routes/tenant/tenant-plan-cancellation.js +87 -0
- package/dist/routes/tenant/tenant-plan-cancellation.js.map +1 -0
- package/dist/routes/tenant/tenant-plan-checkout.d.ts +3 -0
- package/dist/routes/tenant/tenant-plan-checkout.js +21 -11
- package/dist/routes/tenant/tenant-plan-checkout.js.map +1 -1
- package/dist/routes/tenant/tenant-plan-ops.d.ts +32 -2
- package/dist/routes/tenant/tenant-plan-ops.js +112 -39
- package/dist/routes/tenant/tenant-plan-ops.js.map +1 -1
- package/dist/routes/tenant/tenant-plan-preview.d.ts +33 -0
- package/dist/routes/tenant/tenant-plan-preview.js +216 -0
- package/dist/routes/tenant/tenant-plan-preview.js.map +1 -0
- package/dist/routes/tenant/tenant-plan-resubscription.d.ts +2 -0
- package/dist/routes/tenant/tenant-plan-resubscription.js +61 -0
- package/dist/routes/tenant/tenant-plan-resubscription.js.map +1 -0
- package/dist/routes/tenant/tenant-plan.d.ts +9 -4
- package/dist/routes/tenant/tenant-plan.js +124 -16
- package/dist/routes/tenant/tenant-plan.js.map +1 -1
- package/dist/routes/tenant/tenant-seats.d.ts +6 -1
- package/dist/routes/tenant/tenant-seats.js +26 -5
- package/dist/routes/tenant/tenant-seats.js.map +1 -1
- package/dist/routes/tenant/tenant-upcoming-invoice.d.ts +26 -0
- package/dist/routes/tenant/tenant-upcoming-invoice.js +200 -0
- package/dist/routes/tenant/tenant-upcoming-invoice.js.map +1 -0
- package/dist/routes/tenant/workspace-access.d.ts +67 -0
- package/dist/routes/tenant/workspace-access.js +224 -0
- package/dist/routes/tenant/workspace-access.js.map +1 -0
- package/dist/routes/tenant/workspaces.d.ts +12 -43
- package/dist/routes/tenant/workspaces.js +82 -192
- package/dist/routes/tenant/workspaces.js.map +1 -1
- package/dist/segments/index.d.ts +29 -0
- package/dist/segments/index.js +116 -0
- package/dist/segments/index.js.map +1 -0
- package/dist/stripe/client.d.ts +1 -0
- package/dist/stripe/client.js +11 -0
- package/dist/stripe/client.js.map +1 -1
- package/dist/stripe/customer-locale.d.ts +3 -0
- package/dist/stripe/customer-locale.js +36 -0
- package/dist/stripe/customer-locale.js.map +1 -0
- package/dist/stripe/dashboard-links.d.ts +2 -0
- package/dist/stripe/dashboard-links.js +8 -0
- package/dist/stripe/dashboard-links.js.map +1 -0
- package/dist/stripe/index.d.ts +3 -0
- package/dist/stripe/index.js +3 -0
- package/dist/stripe/index.js.map +1 -1
- package/dist/stripe/pending-update.d.ts +5 -0
- package/dist/stripe/pending-update.js +56 -0
- package/dist/stripe/pending-update.js.map +1 -0
- package/dist/stripe/plan-schedule.js +4 -1
- package/dist/stripe/plan-schedule.js.map +1 -1
- package/dist/stripe/subscription-cancellation.d.ts +3 -0
- package/dist/stripe/subscription-cancellation.js +26 -0
- package/dist/stripe/subscription-cancellation.js.map +1 -0
- package/dist/stripe/sync-plan.js +5 -6
- package/dist/stripe/sync-plan.js.map +1 -1
- package/dist/stripe/upcoming-invoice.d.ts +9 -0
- package/dist/stripe/upcoming-invoice.js +19 -3
- package/dist/stripe/upcoming-invoice.js.map +1 -1
- package/dist/stripe/webhook-checkout.js +2 -0
- package/dist/stripe/webhook-checkout.js.map +1 -1
- package/dist/stripe/webhook-credit-notes.js +15 -0
- package/dist/stripe/webhook-credit-notes.js.map +1 -1
- package/dist/stripe/webhook-dispatch.js +2 -0
- package/dist/stripe/webhook-dispatch.js.map +1 -1
- package/dist/stripe/webhook-handlers.d.ts +1 -0
- package/dist/stripe/webhook-handlers.js +34 -9
- package/dist/stripe/webhook-handlers.js.map +1 -1
- package/dist/stripe/webhook-shared.d.ts +3 -1
- package/dist/stripe/webhook-shared.js +20 -1
- package/dist/stripe/webhook-shared.js.map +1 -1
- package/dist/stripe/workspace-checkout.d.ts +2 -0
- package/dist/stripe/workspace-checkout.js +4 -0
- package/dist/stripe/workspace-checkout.js.map +1 -1
- package/dist/types/config.d.ts +2 -0
- package/dist/types/config.js.map +1 -1
- package/dist/upcoming-invoice/mapping.js +1 -0
- package/dist/upcoming-invoice/mapping.js.map +1 -1
- package/dist/users/index.d.ts +4 -0
- package/dist/users/index.js +21 -0
- package/dist/users/index.js.map +1 -0
- package/dist/users/platform-role.d.ts +18 -0
- package/dist/users/platform-role.js +127 -0
- package/dist/users/platform-role.js.map +1 -0
- package/dist/users/user-detail.d.ts +43 -0
- package/dist/users/user-detail.js +100 -0
- package/dist/users/user-detail.js.map +1 -0
- package/dist/users/user-facts.d.ts +10 -0
- package/dist/users/user-facts.js +157 -0
- package/dist/users/user-facts.js.map +1 -0
- package/dist/users/user-segments.d.ts +10 -0
- package/dist/users/user-segments.js +32 -0
- package/dist/users/user-segments.js.map +1 -0
- package/dist/utils/billing-displays.d.ts +6 -0
- package/dist/utils/billing-displays.js +17 -0
- package/dist/utils/billing-displays.js.map +1 -0
- package/dist/utils/billing-document-status.d.ts +0 -4
- package/dist/utils/billing-document-status.js +1 -13
- package/dist/utils/billing-document-status.js.map +1 -1
- package/dist/utils/billing-document-type.d.ts +6 -0
- package/dist/utils/billing-document-type.js +13 -0
- package/dist/utils/billing-document-type.js.map +1 -1
- package/dist/utils/csv-file.d.ts +2 -0
- package/dist/utils/csv-file.js +23 -0
- package/dist/utils/csv-file.js.map +1 -0
- package/dist/utils/form-insight-type.d.ts +8 -0
- package/dist/utils/form-insight-type.js +34 -0
- package/dist/utils/form-insight-type.js.map +1 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +8 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/language.d.ts +1 -0
- package/dist/utils/language.js +7 -0
- package/dist/utils/language.js.map +1 -0
- package/dist/utils/money.d.ts +2 -0
- package/dist/utils/money.js +24 -0
- package/dist/utils/money.js.map +1 -0
- package/dist/utils/segment-evaluator.d.ts +4 -0
- package/dist/utils/segment-evaluator.js +15 -8
- package/dist/utils/segment-evaluator.js.map +1 -1
- package/dist/utils/segment-explain.d.ts +10 -0
- package/dist/utils/segment-explain.js +31 -0
- package/dist/utils/segment-explain.js.map +1 -0
- package/dist/utils/segment-fields.d.ts +13 -2
- package/dist/utils/segment-fields.js +137 -116
- package/dist/utils/segment-fields.js.map +1 -1
- package/dist/utils/segment-matching.d.ts +14 -3
- package/dist/utils/segment-matching.js +47 -13
- package/dist/utils/segment-matching.js.map +1 -1
- package/dist/utils/segment-preview.d.ts +31 -0
- package/dist/utils/segment-preview.js +83 -0
- package/dist/utils/segment-preview.js.map +1 -0
- package/dist/utils/segment-user-projection.d.ts +3 -0
- package/dist/utils/segment-user-projection.js +31 -0
- package/dist/utils/segment-user-projection.js.map +1 -0
- package/dist/utils/segment-validation.d.ts +14 -0
- package/dist/utils/segment-validation.js +98 -0
- package/dist/utils/segment-validation.js.map +1 -0
- package/dist/utils/status-vocabulary.d.ts +57 -0
- package/dist/utils/status-vocabulary.js +92 -0
- package/dist/utils/status-vocabulary.js.map +1 -0
- package/dist/workers/index.d.ts +1 -0
- package/dist/workers/index.js +1 -0
- package/dist/workers/index.js.map +1 -1
- package/dist/workers/plan-migration-resolution.d.ts +14 -0
- package/dist/workers/plan-migration-resolution.js +99 -0
- package/dist/workers/plan-migration-resolution.js.map +1 -0
- package/dist/workers/plan-migration.d.ts +6 -1
- package/dist/workers/plan-migration.js +152 -37
- package/dist/workers/plan-migration.js.map +1 -1
- package/dist/workspaces/billing-identity-lock.d.ts +1 -0
- package/dist/workspaces/billing-identity-lock.js +18 -0
- package/dist/workspaces/billing-identity-lock.js.map +1 -0
- package/dist/workspaces/complimentary-banner.d.ts +11 -0
- package/dist/workspaces/complimentary-banner.js +83 -0
- package/dist/workspaces/complimentary-banner.js.map +1 -0
- package/dist/workspaces/default-member-role.d.ts +2 -0
- package/dist/workspaces/default-member-role.js +43 -0
- package/dist/workspaces/default-member-role.js.map +1 -0
- package/dist/workspaces/deletion-request.d.ts +2 -0
- package/dist/workspaces/deletion-request.js +5 -0
- package/dist/workspaces/deletion-request.js.map +1 -0
- package/dist/workspaces/deletion.d.ts +1 -1
- package/dist/workspaces/deletion.js +19 -7
- package/dist/workspaces/deletion.js.map +1 -1
- package/dist/workspaces/detail-items.d.ts +15 -0
- package/dist/workspaces/detail-items.js +226 -0
- package/dist/workspaces/detail-items.js.map +1 -0
- package/dist/workspaces/first-payment.d.ts +5 -0
- package/dist/workspaces/first-payment.js +28 -0
- package/dist/workspaces/first-payment.js.map +1 -0
- package/dist/workspaces/free-workspaces-per-card.d.ts +6 -0
- package/dist/workspaces/free-workspaces-per-card.js +58 -0
- package/dist/workspaces/free-workspaces-per-card.js.map +1 -0
- package/dist/workspaces/index.d.ts +7 -0
- package/dist/workspaces/index.js +7 -0
- package/dist/workspaces/index.js.map +1 -1
- package/dist/workspaces/invitations.d.ts +2 -1
- package/dist/workspaces/invitations.js +16 -6
- package/dist/workspaces/invitations.js.map +1 -1
- package/dist/workspaces/my-workspaces.d.ts +13 -0
- package/dist/workspaces/my-workspaces.js +68 -0
- package/dist/workspaces/my-workspaces.js.map +1 -0
- package/dist/workspaces/operator-creation.d.ts +39 -0
- package/dist/workspaces/operator-creation.js +123 -0
- package/dist/workspaces/operator-creation.js.map +1 -0
- package/dist/workspaces/operator-view.d.ts +13 -0
- package/dist/workspaces/operator-view.js +37 -0
- package/dist/workspaces/operator-view.js.map +1 -0
- package/dist/workspaces/owner-contact.d.ts +7 -0
- package/dist/workspaces/owner-contact.js +24 -0
- package/dist/workspaces/owner-contact.js.map +1 -0
- package/dist/workspaces/owner-invitation-email.d.ts +12 -0
- package/dist/workspaces/owner-invitation-email.js +53 -0
- package/dist/workspaces/owner-invitation-email.js.map +1 -0
- package/dist/workspaces/provisioning.d.ts +2 -0
- package/dist/workspaces/provisioning.js +37 -15
- package/dist/workspaces/provisioning.js.map +1 -1
- package/dist/workspaces/self-serve-creation.d.ts +38 -0
- package/dist/workspaces/self-serve-creation.js +106 -0
- package/dist/workspaces/self-serve-creation.js.map +1 -0
- package/dist/workspaces/workspace-glance.d.ts +3 -0
- package/dist/workspaces/workspace-glance.js +93 -0
- package/dist/workspaces/workspace-glance.js.map +1 -0
- package/dist/workspaces/workspace-name.d.ts +2 -0
- package/dist/workspaces/workspace-name.js +14 -0
- package/dist/workspaces/workspace-name.js.map +1 -0
- package/dist/workspaces/workspace-overview.d.ts +41 -0
- package/dist/workspaces/workspace-overview.js +84 -0
- package/dist/workspaces/workspace-overview.js.map +1 -0
- package/dist/workspaces/workspace-owner.d.ts +7 -0
- package/dist/workspaces/workspace-owner.js +14 -0
- package/dist/workspaces/workspace-owner.js.map +1 -0
- package/frontend-vue/app/build/PayInvoiceDialog.vue +40 -0
- package/frontend-vue/app/build/PayInvoicePanel.vue +203 -0
- package/frontend-vue/app/build/PlanChangeReview.vue +415 -0
- package/frontend-vue/app/build/PlanFeatureValueInput.vue +143 -0
- package/frontend-vue/app/build/PlanPermissionPicker.vue +246 -0
- package/frontend-vue/app/build/WorkspaceSwitcherRow.vue +116 -0
- package/frontend-vue/app/build/components/CreditNoteInvoiceSummary.vue +82 -0
- package/frontend-vue/app/build/components/FormFieldRow.vue +97 -0
- package/frontend-vue/app/build/components/FormRows.vue +26 -0
- package/frontend-vue/app/build/components/RequiredLegend.vue +7 -0
- package/frontend-vue/app/build/composables/useCreditNoteDraft.ts +142 -0
- package/frontend-vue/app/build/composables/useCreditNoteTexts.ts +123 -0
- package/frontend-vue/app/build/composables/useLiveFormValues.ts +49 -0
- package/frontend-vue/app/build/day-formats.ts +17 -0
- package/frontend-vue/app/build/highlight.ts +28 -0
- package/frontend-vue/app/build/plan-catalog.ts +161 -0
- package/frontend-vue/app/build/plan-change-heading.ts +81 -0
- package/frontend-vue/app/build/plan-permissions.ts +92 -0
- package/frontend-vue/app/build/plan-retire.ts +83 -0
- package/frontend-vue/app/build/public/AccessTimeline.vue +68 -0
- package/frontend-vue/app/build/public/LegalAcceptance.vue +51 -0
- package/frontend-vue/app/build/public/OtherWorkspaces.vue +88 -0
- package/frontend-vue/app/build/public/PricingComparison.vue +227 -0
- package/frontend-vue/app/build/public/PricingFaq.vue +76 -0
- package/frontend-vue/app/build/public/PublicStage.vue +72 -0
- package/frontend-vue/app/build/public/RegistrationCardField.vue +71 -0
- package/frontend-vue/app/build/public/RegistrationPlanCard.vue +122 -0
- package/frontend-vue/app/build/public/access.ts +118 -0
- package/frontend-vue/app/build/public/chosen-plan.ts +36 -0
- package/frontend-vue/app/build/public/legal.ts +99 -0
- package/frontend-vue/app/build/public/pricing.ts +175 -0
- package/frontend-vue/app/build/public/routes.ts +122 -0
- package/frontend-vue/app/build/public/usePublicFetch.ts +44 -0
- package/frontend-vue/app/build/public/usePublicPlanFormat.ts +52 -0
- package/frontend-vue/app/build/segments/tree.ts +137 -0
- package/frontend-vue/app/build/segments/types.ts +119 -0
- package/frontend-vue/app/build/segments/useSegmentCatalog.ts +58 -0
- package/frontend-vue/app/build/segments/useSegmentDraft.ts +33 -0
- package/frontend-vue/app/build/segments/useSegmentPreview.ts +78 -0
- package/frontend-vue/app/build/segments/useSegmentSentence.ts +60 -0
- package/frontend-vue/app/build/segments/useSegmentWords.ts +204 -0
- package/frontend-vue/app/build/useWorkspaceName.ts +14 -0
- package/frontend-vue/app/build/users/useUserDetail.ts +82 -0
- package/frontend-vue/app/build/workspace-detail/ComplimentaryDialog.vue +219 -0
- package/frontend-vue/app/build/workspace-detail/CreditDialog.vue +243 -0
- package/frontend-vue/app/build/workspace-detail/UpgradeDialog.vue +258 -0
- package/frontend-vue/app/build/workspace-detail/WorkspaceActionDialogs.vue +82 -0
- package/frontend-vue/app/build/workspace-detail/planPrice.ts +26 -0
- package/frontend-vue/app/build/workspace-detail/types.ts +138 -0
- package/frontend-vue/app/build/workspace-detail/useWorkspaceActions.ts +177 -0
- package/frontend-vue/app/build/workspace-detail/useWorkspaceOverview.ts +44 -0
- package/frontend-vue/app/build/workspace-paths.ts +8 -0
- package/frontend-vue/app/components/BillingIdentityFields.vue +294 -161
- package/frontend-vue/app/components/CustomerPortalButton.vue +80 -32
- package/frontend-vue/app/components/DataExport.vue +250 -260
- package/frontend-vue/app/components/DataExportHistory.vue +246 -0
- package/frontend-vue/app/components/DunningTimeline.vue +120 -0
- package/frontend-vue/app/components/IssueCreditNoteModal.vue +318 -116
- package/frontend-vue/app/components/LegalDocumentRelease.vue +64 -0
- package/frontend-vue/app/components/LegalLayout.vue +284 -46
- package/frontend-vue/app/components/MigrationStripeCheck.vue +133 -0
- package/frontend-vue/app/components/PastDueAlert.vue +186 -78
- package/frontend-vue/app/components/PastDueBanner.vue +96 -67
- package/frontend-vue/app/components/PayInvoiceModal.vue +57 -0
- package/frontend-vue/app/components/PaymentMethodCard.vue +159 -163
- package/frontend-vue/app/components/PendingCheckoutModal.vue +61 -61
- package/frontend-vue/app/components/PlanAccessEditor.vue +410 -0
- package/frontend-vue/app/components/PlanCard.vue +358 -261
- package/frontend-vue/app/components/PlanCardPublic.vue +123 -51
- package/frontend-vue/app/components/PlanComparisonModal.vue +373 -309
- package/frontend-vue/app/components/PlanEditorPreview.vue +374 -0
- package/frontend-vue/app/components/PlanLimitInput.vue +92 -0
- package/frontend-vue/app/components/PlanTaxSync.vue +118 -0
- package/frontend-vue/app/components/PlanUpgradeModal.vue +265 -156
- package/frontend-vue/app/components/PlatformNotes.vue +215 -255
- package/frontend-vue/app/components/Pricing.vue +236 -0
- package/frontend-vue/app/components/PublicNavBar.vue +70 -0
- package/frontend-vue/app/components/RefundButton.vue +264 -113
- package/frontend-vue/app/components/RefundExample.vue +86 -0
- package/frontend-vue/app/components/Register.vue +217 -121
- package/frontend-vue/app/components/RegistrationClosed.vue +30 -13
- package/frontend-vue/app/components/RetirePlanModal.vue +829 -0
- package/frontend-vue/app/components/SeatQuotaBanner.vue +240 -90
- package/frontend-vue/app/components/SegmentConditionRow.vue +171 -0
- package/frontend-vue/app/components/SegmentConditionsBuilder.vue +89 -162
- package/frontend-vue/app/components/SegmentConditionsGroup.vue +273 -463
- package/frontend-vue/app/components/SegmentLivePreview.vue +301 -0
- package/frontend-vue/app/components/SegmentLogicToggle.vue +24 -0
- package/frontend-vue/app/components/SegmentRulesText.vue +57 -0
- package/frontend-vue/app/components/SegmentValueInput.vue +165 -0
- package/frontend-vue/app/components/SegmentWords.vue +36 -0
- package/frontend-vue/app/components/TenantBillingForm.vue +142 -103
- package/frontend-vue/app/components/TenantPlanCard.vue +635 -280
- package/frontend-vue/app/components/TrialEndingBanner.vue +76 -0
- package/frontend-vue/app/components/UserPlatformRoleCard.vue +102 -0
- package/frontend-vue/app/components/UserSegmentMatches.vue +123 -0
- package/frontend-vue/app/components/UserSummaryCard.vue +107 -158
- package/frontend-vue/app/components/WorkspaceAdminCreateModal.vue +354 -177
- package/frontend-vue/app/components/WorkspaceCreateModal.vue +372 -252
- package/frontend-vue/app/components/WorkspaceDangerZone.vue +178 -126
- package/frontend-vue/app/components/WorkspaceDetailHeader.vue +262 -19
- package/frontend-vue/app/components/WorkspaceInvitationLink.vue +108 -86
- package/frontend-vue/app/components/WorkspaceOperatorActions.vue +105 -330
- package/frontend-vue/app/components/WorkspaceSuspendButton.vue +34 -158
- package/frontend-vue/app/components/WorkspaceSuspended.vue +390 -149
- package/frontend-vue/app/components/WorkspaceSwitcherWidget.vue +145 -161
- package/frontend-vue/app/composables/useBillingIdentity.ts +97 -95
- package/frontend-vue/app/composables/useBillingStatus.ts +56 -24
- package/frontend-vue/app/composables/useCurrentWorkspace.ts +15 -30
- package/frontend-vue/app/composables/useDaysLeft.ts +20 -0
- package/frontend-vue/app/composables/useExportHistory.ts +209 -120
- package/frontend-vue/app/composables/useInvitationLink.ts +39 -53
- package/frontend-vue/app/composables/useMoneyFormat.ts +64 -33
- package/frontend-vue/app/composables/useMyWorkspaces.ts +41 -32
- package/frontend-vue/app/composables/useNextInvoice.ts +20 -0
- package/frontend-vue/app/composables/usePayInvoice.ts +52 -0
- package/frontend-vue/app/composables/usePendingCheckout.ts +71 -67
- package/frontend-vue/app/composables/usePlanCatalog.ts +16 -0
- package/frontend-vue/app/composables/usePlanChangeReview.ts +115 -0
- package/frontend-vue/app/composables/usePlanComparison.ts +17 -8
- package/frontend-vue/app/composables/usePlanDowngrade.ts +25 -23
- package/frontend-vue/app/composables/usePlanFeatureFormat.ts +238 -202
- package/frontend-vue/app/composables/usePlanPriceLabel.ts +28 -0
- package/frontend-vue/app/composables/useSaasRegistration.ts +516 -301
- package/frontend-vue/app/composables/useSaasStatus.ts +81 -0
- package/frontend-vue/app/composables/useSeatQuota.ts +27 -17
- package/frontend-vue/app/composables/useServerConfirm.ts +44 -0
- package/frontend-vue/app/composables/useStripePaymentElement.ts +3 -5
- package/frontend-vue/app/composables/useTenantPlan.ts +235 -99
- package/frontend-vue/app/composables/useUpgradeAuthentication.ts +37 -0
- package/frontend-vue/app/composables/useWorkspaceFinalization.ts +4 -0
- package/frontend-vue/app/composables/useWorkspaceOverview.ts +58 -0
- package/frontend-vue/app/composables/useWorkspaceRenamed.ts +33 -0
- package/frontend-vue/app/custom-pages/auth/no-workspace.vue +391 -312
- package/frontend-vue/app/plugins/auth-links.ts +38 -17
- package/frontend-vue/app/plugins/billing-data-types.ts +111 -58
- package/frontend-vue/app/plugins/footer-links.ts +13 -33
- package/frontend-vue/app/plugins/segment-conditions-data-type.ts +45 -0
- package/frontend-vue/app/plugins/sidebar-widgets.ts +13 -10
- package/frontend-vue/app/types/runtime-config.ts +9 -4
- package/frontend-vue/dms.frontend.build.ts +7 -0
- package/frontend-vue/dms.frontend.ts +6 -13
- package/frontend-vue/i18n/locales/saas-en-GB.json +499 -1380
- package/frontend-vue/i18n/locales/saas-fr-FR.json +499 -1380
- package/frontend-vue/i18n/locales/saas-operator-billing-en-GB.json +282 -0
- package/frontend-vue/i18n/locales/saas-operator-billing-fr-FR.json +282 -0
- package/frontend-vue/i18n/locales/saas-operator-catalog-en-GB.json +597 -0
- package/frontend-vue/i18n/locales/saas-operator-catalog-fr-FR.json +597 -0
- package/frontend-vue/i18n/locales/saas-operator-users-en-GB.json +505 -0
- package/frontend-vue/i18n/locales/saas-operator-users-fr-FR.json +505 -0
- package/frontend-vue/i18n/locales/saas-operator-workspaces-en-GB.json +595 -0
- package/frontend-vue/i18n/locales/saas-operator-workspaces-fr-FR.json +595 -0
- package/frontend-vue/i18n/locales/saas-public-en-GB.json +304 -0
- package/frontend-vue/i18n/locales/saas-public-fr-FR.json +304 -0
- package/frontend-vue/i18n/locales/saas-tenant-billing-en-GB.json +434 -0
- package/frontend-vue/i18n/locales/saas-tenant-billing-fr-FR.json +434 -0
- package/frontend-vue/i18n/locales/saas-tenant-workspace-en-GB.json +252 -0
- package/frontend-vue/i18n/locales/saas-tenant-workspace-fr-FR.json +252 -0
- package/frontend-vue/package.json +1 -1
- package/package.json +10 -10
- package/frontend-vue/app/components/CardGrid.vue +0 -77
- package/frontend-vue/app/components/DeletePlanModal.vue +0 -223
- package/frontend-vue/app/components/FreeAccessBanner.vue +0 -70
- package/frontend-vue/app/components/PlanCardsDisplay.vue +0 -127
- package/frontend-vue/app/components/PlanInheritancePicker.vue +0 -329
- package/frontend-vue/app/components/RecentActivity.vue +0 -72
- package/frontend-vue/app/components/WorkspaceBillingInfo.vue +0 -68
- package/frontend-vue/app/components/WorkspaceCompAccessButton.vue +0 -198
- package/frontend-vue/app/components/WorkspaceIdentity.vue +0 -99
- package/frontend-vue/app/components/WorkspaceJoinButton.vue +0 -50
- package/frontend-vue/app/components/WorkspaceSummaryCard.vue +0 -185
- package/frontend-vue/app/composables/useDetailRefresh.ts +0 -17
- package/frontend-vue/app/composables/usePastDueBannerAction.ts +0 -20
- package/frontend-vue/app/plugins/plan-cards-display.ts +0 -16
- package/frontend-vue/app/plugins/segment-conditions-data-type.client.ts +0 -122
|
@@ -14,55 +14,35 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.SaasUsersDetailController = void 0;
|
|
16
16
|
const interface_api_1 = require("@antelopejs/interface-api");
|
|
17
|
-
const interface_api_util_1 = require("@antelopejs/interface-api-util");
|
|
18
|
-
const interface_database_1 = require("@antelopejs/interface-database");
|
|
19
|
-
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
20
|
-
const db_1 = require("@antelopejs/interface-dms/db");
|
|
21
17
|
const auth_1 = require("@antelopejs/interface-dms/auth");
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
18
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
19
|
+
const config_1 = require("../../config");
|
|
20
|
+
const db_1 = require("../../db");
|
|
21
|
+
const users_1 = require("../../users");
|
|
22
|
+
async function countBilledDocuments(workspaces) {
|
|
23
|
+
const counts = await Promise.all(workspaces
|
|
24
|
+
.filter((workspace) => workspace.isTenantOwner)
|
|
25
|
+
.map(async (workspace) => (await (0, interface_database_decorators_1.GetModel)(db_1.InvoiceModel, workspace.tenantId).getAll()).length));
|
|
26
|
+
return counts.reduce((total, count) => total + count, 0);
|
|
27
|
+
}
|
|
25
28
|
class SaasUsersDetailController extends (0, interface_api_1.Controller)("/api/saas/users") {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
for (const session of sessions) {
|
|
44
|
-
if (!session.lastActiveAt)
|
|
45
|
-
continue;
|
|
46
|
-
const active = new Date(session.lastActiveAt);
|
|
47
|
-
if (!lastActiveAt || active > lastActiveAt)
|
|
48
|
-
lastActiveAt = active;
|
|
49
|
-
}
|
|
50
|
-
const segments = segmentLinks.length > 0
|
|
51
|
-
? (await (0, interface_database_decorators_1.GetModel)(db_3.SegmentModel).getMany(segmentLinks.map((l) => l.segmentId))).map((s) => ({ _id: s._id, name: s.name }))
|
|
52
|
-
: [];
|
|
53
|
-
return {
|
|
54
|
-
_id: user._id,
|
|
55
|
-
email: user.email,
|
|
56
|
-
name: user.name,
|
|
57
|
-
owner: user.owner,
|
|
58
|
-
createdAt: user.createdAt,
|
|
59
|
-
language: user.language ?? null,
|
|
60
|
-
isValidated: !!user.isValidated,
|
|
61
|
-
hasTwoFactor: (user.twoFactorMethods ?? []).length > 0,
|
|
62
|
-
lastActiveAt,
|
|
63
|
-
segments,
|
|
64
|
-
workspaces,
|
|
65
|
-
};
|
|
29
|
+
getDetail(actor, id) {
|
|
30
|
+
return (0, users_1.loadUserDetail)(id, actor._id);
|
|
31
|
+
}
|
|
32
|
+
async getFacts(actor, id) {
|
|
33
|
+
const detail = await (0, users_1.loadUserDetail)(id, actor._id);
|
|
34
|
+
return { items: (0, users_1.userFactItems)(detail, (0, config_1.getReportingCurrency)()) };
|
|
35
|
+
}
|
|
36
|
+
async getTabCounts(actor, id) {
|
|
37
|
+
const detail = await (0, users_1.loadUserDetail)(id, actor._id);
|
|
38
|
+
return (0, users_1.userTabCounts)(detail, await countBilledDocuments(detail.workspaces));
|
|
39
|
+
}
|
|
40
|
+
async getSecurity(actor, id) {
|
|
41
|
+
const detail = await (0, users_1.loadUserDetail)(id, actor._id);
|
|
42
|
+
return { items: (0, users_1.userSecurityItems)(detail.security) };
|
|
43
|
+
}
|
|
44
|
+
async getSegments(_actor, id) {
|
|
45
|
+
return { items: await (0, users_1.loadUserSegmentMatches)(id) };
|
|
66
46
|
}
|
|
67
47
|
}
|
|
68
48
|
exports.SaasUsersDetailController = SaasUsersDetailController;
|
|
@@ -70,13 +50,40 @@ __decorate([
|
|
|
70
50
|
(0, interface_api_1.Get)("/:id"),
|
|
71
51
|
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
72
52
|
__param(1, (0, interface_api_1.Parameter)("id")),
|
|
73
|
-
__param(2, (0, interface_database_decorators_1.Model)(db_2.UserModel)),
|
|
74
|
-
__param(3, (0, interface_database_decorators_1.Model)(db_1.TenantModel)),
|
|
75
|
-
__param(4, (0, interface_database_decorators_1.Model)(db_2.SessionModel)),
|
|
76
53
|
__metadata("design:type", Function),
|
|
77
|
-
__metadata("design:paramtypes", [Function, String,
|
|
78
|
-
db_1.TenantModel,
|
|
79
|
-
db_2.SessionModel]),
|
|
54
|
+
__metadata("design:paramtypes", [Function, String]),
|
|
80
55
|
__metadata("design:returntype", Promise)
|
|
81
56
|
], SaasUsersDetailController.prototype, "getDetail", null);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, interface_api_1.Get)("/:id/facts"),
|
|
59
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
60
|
+
__param(1, (0, interface_api_1.Parameter)("id")),
|
|
61
|
+
__metadata("design:type", Function),
|
|
62
|
+
__metadata("design:paramtypes", [Function, String]),
|
|
63
|
+
__metadata("design:returntype", Promise)
|
|
64
|
+
], SaasUsersDetailController.prototype, "getFacts", null);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, interface_api_1.Get)("/:id/tab-counts"),
|
|
67
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
68
|
+
__param(1, (0, interface_api_1.Parameter)("id")),
|
|
69
|
+
__metadata("design:type", Function),
|
|
70
|
+
__metadata("design:paramtypes", [Function, String]),
|
|
71
|
+
__metadata("design:returntype", Promise)
|
|
72
|
+
], SaasUsersDetailController.prototype, "getTabCounts", null);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, interface_api_1.Get)("/:id/security"),
|
|
75
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
76
|
+
__param(1, (0, interface_api_1.Parameter)("id")),
|
|
77
|
+
__metadata("design:type", Function),
|
|
78
|
+
__metadata("design:paramtypes", [Function, String]),
|
|
79
|
+
__metadata("design:returntype", Promise)
|
|
80
|
+
], SaasUsersDetailController.prototype, "getSecurity", null);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, interface_api_1.Get)("/:id/segments"),
|
|
83
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
84
|
+
__param(1, (0, interface_api_1.Parameter)("id")),
|
|
85
|
+
__metadata("design:type", Function),
|
|
86
|
+
__metadata("design:paramtypes", [Function, String]),
|
|
87
|
+
__metadata("design:returntype", Promise)
|
|
88
|
+
], SaasUsersDetailController.prototype, "getSegments", null);
|
|
82
89
|
//# sourceMappingURL=users-detail.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users-detail.js","sourceRoot":"","sources":["../../../src/routes/platformOwner/users-detail.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuE;AACvE,
|
|
1
|
+
{"version":3,"file":"users-detail.js","sourceRoot":"","sources":["../../../src/routes/platformOwner/users-detail.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuE;AACvE,yDAA+D;AAM/D,6FAAqE;AACrE,yCAAoD;AACpD,iCAAwC;AACxC,uCAUqB;AASrB,KAAK,UAAU,oBAAoB,CACjC,UAAoC;IAEpC,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAC9B,UAAU;SACP,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC;SAC9C,GAAG,CACF,KAAK,EAAE,SAAS,EAAE,EAAE,CAClB,CAAC,MAAM,IAAA,wCAAQ,EAAC,iBAAY,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CACrE,CACJ,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GA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A;IACf,WAAA,IAAA,yBAAS,EAAC,IAAI,CAAC,CAAA;;;;0DAGjB;AAIK;IADL,IAAA,mBAAG,EAAC,YAAY,CAAC;IAEf,WAAA,IAAA,oBAAa,GAAE,CAAA;IACf,WAAA,IAAA,yBAAS,EAAC,IAAI,CAAC,CAAA;;;;yDAIjB;AAIK;IADL,IAAA,mBAAG,EAAC,iBAAiB,CAAC;IAEpB,WAAA,IAAA,oBAAa,GAAE,CAAA;IACf,WAAA,IAAA,yBAAS,EAAC,IAAI,CAAC,CAAA;;;;6DAIjB;AAIK;IADL,IAAA,mBAAG,EAAC,eAAe,CAAC;IAElB,WAAA,IAAA,oBAAa,GAAE,CAAA;IACf,WAAA,IAAA,yBAAS,EAAC,IAAI,CAAC,CAAA;;;;4DAIjB;AAGK;IADL,IAAA,mBAAG,EAAC,eAAe,CAAC;IAElB,WAAA,IAAA,oBAAa,GAAE,CAAA;IACf,WAAA,IAAA,yBAAS,EAAC,IAAI,CAAC,CAAA;;;;4DAGjB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { User } from "@antelopejs/interface-dms/auth/db";
|
|
2
|
+
import type { ActivityFeedItem, KeyValueListItem, StatGroupItem } from "@antelopejs/interface-dms/base";
|
|
3
|
+
import type { ItemsPayload } from "./block-payloads";
|
|
4
|
+
interface WorkspaceOverview {
|
|
5
|
+
_id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
createdAt: Date;
|
|
8
|
+
status: string;
|
|
9
|
+
planName: string | null;
|
|
10
|
+
isComplimentary: boolean;
|
|
11
|
+
freeUntil: Date | null;
|
|
12
|
+
ownerName: string | null;
|
|
13
|
+
ownerEmail: string | null;
|
|
14
|
+
ownerStatus: string;
|
|
15
|
+
joinedAt: Date | null;
|
|
16
|
+
stripeCustomerId: string | null;
|
|
17
|
+
stripeCustomerUrl: string | null;
|
|
18
|
+
hasStripeSubscription: boolean;
|
|
19
|
+
members: number;
|
|
20
|
+
platformSupport: number;
|
|
21
|
+
pendingInvitations: number;
|
|
22
|
+
seats: number;
|
|
23
|
+
maxMembers: number | null;
|
|
24
|
+
}
|
|
25
|
+
declare const SaasWorkspaceDetailController_base: import("@antelopejs/interface-api").ControllerClass<object>;
|
|
26
|
+
export declare class SaasWorkspaceDetailController extends SaasWorkspaceDetailController_base {
|
|
27
|
+
directoryHeadline(_user: User): Promise<ItemsPayload<StatGroupItem>>;
|
|
28
|
+
overview(user: User, tenantId: string): Promise<WorkspaceOverview>;
|
|
29
|
+
facts(_user: User, tenantId: string): Promise<ItemsPayload<StatGroupItem>>;
|
|
30
|
+
billingInfo(_user: User, tenantId: string): Promise<ItemsPayload<KeyValueListItem>>;
|
|
31
|
+
subscriptionTimeline(_user: User, tenantId: string): Promise<ItemsPayload<ActivityFeedItem>>;
|
|
32
|
+
activity(_user: User, tenantId: string, kind: unknown, limit: unknown, flat: unknown): Promise<ItemsPayload<ActivityFeedItem>>;
|
|
33
|
+
tabCounts(_user: User, tenantId: string): Promise<Record<string, string | number>>;
|
|
34
|
+
availableCredit(_user: User, tenantId: string): Promise<ItemsPayload<KeyValueListItem>>;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,222 @@
|
|
|
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.SaasWorkspaceDetailController = void 0;
|
|
16
|
+
const interface_api_1 = require("@antelopejs/interface-api");
|
|
17
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
18
|
+
const db_1 = require("@antelopejs/interface-dms/db");
|
|
19
|
+
const auth_1 = require("@antelopejs/interface-dms/auth");
|
|
20
|
+
const billing_state_1 = require("../../billing-state");
|
|
21
|
+
const config_1 = require("../../config");
|
|
22
|
+
const db_2 = require("../../db");
|
|
23
|
+
const activity_1 = require("../../metrics/activity");
|
|
24
|
+
const activity_sources_1 = require("../../metrics/activity-sources");
|
|
25
|
+
const directory_summary_1 = require("../../metrics/directory-summary");
|
|
26
|
+
const headline_items_1 = require("../../metrics/headline-items");
|
|
27
|
+
const previews_1 = require("../../operator-actions/previews");
|
|
28
|
+
const customer_balance_1 = require("../../stripe/customer-balance");
|
|
29
|
+
const dashboard_links_1 = require("../../stripe/dashboard-links");
|
|
30
|
+
const detail_items_1 = require("../../workspaces/detail-items");
|
|
31
|
+
const operator_view_1 = require("../../workspaces/operator-view");
|
|
32
|
+
const money_1 = require("../../utils/money");
|
|
33
|
+
const ACTIVITY_LIMIT = 30;
|
|
34
|
+
const OVERVIEW_ACTIVITY_LIMIT = 4;
|
|
35
|
+
const TIMELINE_HISTORY_LIMIT = 4;
|
|
36
|
+
async function loadDocuments(tenantId) {
|
|
37
|
+
return (0, interface_database_decorators_1.GetModel)(db_2.InvoiceModel, tenantId).getAllInvoices();
|
|
38
|
+
}
|
|
39
|
+
class SaasWorkspaceDetailController extends (0, interface_api_1.Controller)("/api/saas/workspaces") {
|
|
40
|
+
async directoryHeadline(_user) {
|
|
41
|
+
const summary = (0, directory_summary_1.summariseDirectory)(await (0, directory_summary_1.loadDirectoryRows)(), new Date(), (0, config_1.getReportingCurrency)());
|
|
42
|
+
const endings = await (0, directory_summary_1.nameWorkspaces)(summary.complimentaryEnding);
|
|
43
|
+
return {
|
|
44
|
+
items: (0, headline_items_1.workspacesHeadline)(summary, endings),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
async overview(user, tenantId) {
|
|
48
|
+
const view = await (0, operator_view_1.loadWorkspaceOperatorView)(tenantId);
|
|
49
|
+
const membership = await (0, interface_database_decorators_1.GetModel)(db_1.TenantMemberModel, tenantId).getByUser(user._id);
|
|
50
|
+
const customerId = view.subscription?.stripeCustomerId ?? null;
|
|
51
|
+
const maxMembers = view.plan?.maxMembers ?? db_2.PLAN_UNLIMITED;
|
|
52
|
+
return {
|
|
53
|
+
_id: view.tenant._id,
|
|
54
|
+
name: view.tenant.name,
|
|
55
|
+
createdAt: view.tenant.createdAt,
|
|
56
|
+
status: view.billingState,
|
|
57
|
+
planName: view.directory.planName,
|
|
58
|
+
isComplimentary: view.directory.isComplimentary,
|
|
59
|
+
freeUntil: view.subscription?.freeUntil ?? null,
|
|
60
|
+
ownerName: view.directory.ownerName,
|
|
61
|
+
ownerEmail: view.directory.ownerEmail,
|
|
62
|
+
ownerStatus: view.directory.ownerStatus,
|
|
63
|
+
joinedAt: membership?.joinedAt ?? null,
|
|
64
|
+
stripeCustomerId: customerId,
|
|
65
|
+
stripeCustomerUrl: customerId
|
|
66
|
+
? (0, dashboard_links_1.stripeObjectUrl)("customers", customerId)
|
|
67
|
+
: null,
|
|
68
|
+
hasStripeSubscription: !!view.subscription?.stripeSubscriptionId,
|
|
69
|
+
members: view.seats.members,
|
|
70
|
+
platformSupport: view.seats.platformSupport.length,
|
|
71
|
+
pendingInvitations: view.seats.pendingInvites,
|
|
72
|
+
seats: view.seats.occupied,
|
|
73
|
+
maxMembers: maxMembers === db_2.PLAN_UNLIMITED ? null : maxMembers,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
async facts(_user, tenantId) {
|
|
77
|
+
const view = await (0, operator_view_1.loadWorkspaceOperatorView)(tenantId);
|
|
78
|
+
const customerId = view.subscription?.stripeCustomerId;
|
|
79
|
+
const [preview, card, invoices] = await Promise.all([
|
|
80
|
+
(0, previews_1.safeUpcomingInvoice)(tenantId),
|
|
81
|
+
customerId ? (0, billing_state_1.fetchDefaultPaymentMethod)(customerId) : null,
|
|
82
|
+
loadDocuments(tenantId),
|
|
83
|
+
]);
|
|
84
|
+
return {
|
|
85
|
+
items: (0, detail_items_1.workspaceFacts)({ view, preview, card, invoices }),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
async billingInfo(_user, tenantId) {
|
|
89
|
+
const view = await (0, operator_view_1.loadWorkspaceOperatorView)(tenantId);
|
|
90
|
+
return { items: (0, detail_items_1.billingInfoItems)(view.billingInfo) };
|
|
91
|
+
}
|
|
92
|
+
async subscriptionTimeline(_user, tenantId) {
|
|
93
|
+
const [view, preview, sources] = await Promise.all([
|
|
94
|
+
(0, operator_view_1.loadWorkspaceOperatorView)(tenantId),
|
|
95
|
+
(0, previews_1.safeUpcomingInvoice)(tenantId),
|
|
96
|
+
(0, activity_sources_1.loadActivitySources)(tenantId, TIMELINE_HISTORY_LIMIT),
|
|
97
|
+
]);
|
|
98
|
+
const history = (0, activity_1.buildActivityFeed)(sources, {
|
|
99
|
+
kind: "all",
|
|
100
|
+
limit: TIMELINE_HISTORY_LIMIT,
|
|
101
|
+
now: new Date(),
|
|
102
|
+
});
|
|
103
|
+
return {
|
|
104
|
+
items: [...(0, detail_items_1.upcomingTimelineItems)(view, preview), ...history],
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
async activity(_user, tenantId, kind, limit, flat) {
|
|
108
|
+
const cut = limit === "short" ? OVERVIEW_ACTIVITY_LIMIT : ACTIVITY_LIMIT;
|
|
109
|
+
const sources = await (0, activity_sources_1.loadActivitySources)(tenantId, cut);
|
|
110
|
+
return {
|
|
111
|
+
items: (0, activity_1.buildActivityFeed)(sources, {
|
|
112
|
+
kind: (0, activity_1.parseActivityKind)(kind),
|
|
113
|
+
limit: cut,
|
|
114
|
+
now: (0, activity_1.isFlatFeed)(flat) ? new Date() : undefined,
|
|
115
|
+
}),
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
async tabCounts(_user, tenantId) {
|
|
119
|
+
const [view, invoices, creditNotes] = await Promise.all([
|
|
120
|
+
(0, operator_view_1.loadWorkspaceOperatorView)(tenantId),
|
|
121
|
+
loadDocuments(tenantId),
|
|
122
|
+
(0, interface_database_decorators_1.GetModel)(db_2.CreditNoteModel, tenantId).getAll(),
|
|
123
|
+
]);
|
|
124
|
+
const { members, pendingInvites } = view.seats;
|
|
125
|
+
return {
|
|
126
|
+
invoices: invoices.length,
|
|
127
|
+
creditNotes: creditNotes.length,
|
|
128
|
+
members: pendingInvites > 0 ? `${members} + ${pendingInvites}` : members,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
async availableCredit(_user, tenantId) {
|
|
132
|
+
const view = await (0, operator_view_1.loadWorkspaceOperatorView)(tenantId);
|
|
133
|
+
const customerId = view.subscription?.stripeCustomerId;
|
|
134
|
+
if (!customerId)
|
|
135
|
+
return { items: [] };
|
|
136
|
+
const balance = await (0, customer_balance_1.retrieveStripeCustomerBalance)(customerId);
|
|
137
|
+
if (balance.status !== "available")
|
|
138
|
+
return { items: [] };
|
|
139
|
+
const currency = (balance.currency ??
|
|
140
|
+
view.directory.currency ??
|
|
141
|
+
"").toUpperCase();
|
|
142
|
+
return {
|
|
143
|
+
items: [
|
|
144
|
+
{
|
|
145
|
+
id: "available_credit",
|
|
146
|
+
label: "$saas.workspace_detail.credit.available",
|
|
147
|
+
value: (0, money_1.fromMinorUnits)(Math.max(0, -balance.balanceMinorUnits), currency),
|
|
148
|
+
type: "money",
|
|
149
|
+
currency,
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
exports.SaasWorkspaceDetailController = SaasWorkspaceDetailController;
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, interface_api_1.Get)("/directory-headline"),
|
|
158
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
159
|
+
__metadata("design:type", Function),
|
|
160
|
+
__metadata("design:paramtypes", [Function]),
|
|
161
|
+
__metadata("design:returntype", Promise)
|
|
162
|
+
], SaasWorkspaceDetailController.prototype, "directoryHeadline", null);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, interface_api_1.Get)("/:tenantId/overview"),
|
|
165
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
166
|
+
__param(1, (0, interface_api_1.Parameter)("tenantId", "param")),
|
|
167
|
+
__metadata("design:type", Function),
|
|
168
|
+
__metadata("design:paramtypes", [Function, String]),
|
|
169
|
+
__metadata("design:returntype", Promise)
|
|
170
|
+
], SaasWorkspaceDetailController.prototype, "overview", null);
|
|
171
|
+
__decorate([
|
|
172
|
+
(0, interface_api_1.Get)("/:tenantId/facts"),
|
|
173
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
174
|
+
__param(1, (0, interface_api_1.Parameter)("tenantId", "param")),
|
|
175
|
+
__metadata("design:type", Function),
|
|
176
|
+
__metadata("design:paramtypes", [Function, String]),
|
|
177
|
+
__metadata("design:returntype", Promise)
|
|
178
|
+
], SaasWorkspaceDetailController.prototype, "facts", null);
|
|
179
|
+
__decorate([
|
|
180
|
+
(0, interface_api_1.Get)("/:tenantId/billing-info"),
|
|
181
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
182
|
+
__param(1, (0, interface_api_1.Parameter)("tenantId", "param")),
|
|
183
|
+
__metadata("design:type", Function),
|
|
184
|
+
__metadata("design:paramtypes", [Function, String]),
|
|
185
|
+
__metadata("design:returntype", Promise)
|
|
186
|
+
], SaasWorkspaceDetailController.prototype, "billingInfo", null);
|
|
187
|
+
__decorate([
|
|
188
|
+
(0, interface_api_1.Get)("/:tenantId/subscription-timeline"),
|
|
189
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
190
|
+
__param(1, (0, interface_api_1.Parameter)("tenantId", "param")),
|
|
191
|
+
__metadata("design:type", Function),
|
|
192
|
+
__metadata("design:paramtypes", [Function, String]),
|
|
193
|
+
__metadata("design:returntype", Promise)
|
|
194
|
+
], SaasWorkspaceDetailController.prototype, "subscriptionTimeline", null);
|
|
195
|
+
__decorate([
|
|
196
|
+
(0, interface_api_1.Get)("/:tenantId/activity"),
|
|
197
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
198
|
+
__param(1, (0, interface_api_1.Parameter)("tenantId", "param")),
|
|
199
|
+
__param(2, (0, interface_api_1.Parameter)("kind", "query")),
|
|
200
|
+
__param(3, (0, interface_api_1.Parameter)("limit", "query")),
|
|
201
|
+
__param(4, (0, interface_api_1.Parameter)("flat", "query")),
|
|
202
|
+
__metadata("design:type", Function),
|
|
203
|
+
__metadata("design:paramtypes", [Function, String, Object, Object, Object]),
|
|
204
|
+
__metadata("design:returntype", Promise)
|
|
205
|
+
], SaasWorkspaceDetailController.prototype, "activity", null);
|
|
206
|
+
__decorate([
|
|
207
|
+
(0, interface_api_1.Get)("/:tenantId/tab-counts"),
|
|
208
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
209
|
+
__param(1, (0, interface_api_1.Parameter)("tenantId", "param")),
|
|
210
|
+
__metadata("design:type", Function),
|
|
211
|
+
__metadata("design:paramtypes", [Function, String]),
|
|
212
|
+
__metadata("design:returntype", Promise)
|
|
213
|
+
], SaasWorkspaceDetailController.prototype, "tabCounts", null);
|
|
214
|
+
__decorate([
|
|
215
|
+
(0, interface_api_1.Get)("/:tenantId/available-credit"),
|
|
216
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
217
|
+
__param(1, (0, interface_api_1.Parameter)("tenantId", "param")),
|
|
218
|
+
__metadata("design:type", Function),
|
|
219
|
+
__metadata("design:paramtypes", [Function, String]),
|
|
220
|
+
__metadata("design:returntype", Promise)
|
|
221
|
+
], SaasWorkspaceDetailController.prototype, "availableCredit", null);
|
|
222
|
+
//# sourceMappingURL=workspace-detail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-detail.js","sourceRoot":"","sources":["../../../src/routes/platformOwner/workspace-detail.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuE;AACvE,6FAAqE;AACrE,qDAAiE;AACjE,yDAA+D;AAO/D,uDAAgE;AAChE,yCAAoD;AACpD,iCAKkB;AAClB,qDAIgC;AAChC,qEAAqE;AACrE,uEAIyC;AACzC,iEAAkE;AAClE,8DAAsE;AACtE,oEAA8E;AAC9E,kEAA+D;AAC/D,gEAIuC;AACvC,kEAA2E;AAC3E,6CAAmD;AA4BnD,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAClC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAEjC,KAAK,UAAU,aAAa,CAAC,QAAgB;IAC3C,OAAO,IAAA,wCAAQ,EAAC,iBAAY,EAAE,QAAQ,CAAC,CAAC,cAAc,EAAE,CAAC;AAC3D,CAAC;AAGD,MAAa,6BAA8B,SAAQ,IAAA,0BAAU,EAC3D,sBAAsB,CACvB;IAEO,AAAN,KAAK,CAAC,iBAAiB,CACJ,KAAW;QAE5B,MAAM,OAAO,GAAG,IAAA,sCAAkB,EAChC,MAAM,IAAA,qCAAiB,GAAE,EACzB,IAAI,IAAI,EAAE,EACV,IAAA,6BAAoB,GAAE,CACvB,CAAC;QACF,MAAM,OAAO,GAAG,MAAM,IAAA,kCAAc,EAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;QAClE,OAAO;YACL,KAAK,EAAE,IAAA,mCAAkB,EAAC,OAAO,EAAE,OAAO,CAAC;SAC5C,CAAC;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,QAAQ,CACK,IAAU,EACK,QAAgB;QA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E,OAAO,CAAC,CAAA;;;;oEA0BhC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { TenantModel } from "@antelopejs/interface-dms/db";
|
|
2
2
|
import type { User } from "@antelopejs/interface-dms/auth/db";
|
|
3
|
+
interface RevokedInvitation {
|
|
4
|
+
revoked: true;
|
|
5
|
+
}
|
|
3
6
|
declare const SaasWorkspaceInvitationsController_base: import("@antelopejs/interface-api").ControllerClass<object>;
|
|
4
7
|
export declare class SaasWorkspaceInvitationsController extends SaasWorkspaceInvitationsController_base {
|
|
5
8
|
tenantModel: TenantModel;
|
|
@@ -9,5 +12,6 @@ export declare class SaasWorkspaceInvitationsController extends SaasWorkspaceInv
|
|
|
9
12
|
expiresAt: Date;
|
|
10
13
|
}>;
|
|
11
14
|
copyLink(user: User, tenantId: string, inviteId: string): Promise<import("../../workspaces").InvitationLink>;
|
|
15
|
+
revoke(user: User, tenantId: string, inviteId: string): Promise<RevokedInvitation>;
|
|
12
16
|
}
|
|
13
17
|
export {};
|
|
@@ -46,6 +46,15 @@ class SaasWorkspaceInvitationsController extends (0, interface_api_1.Controller)
|
|
|
46
46
|
actor: (0, operator_actions_1.operatorActorOf)(user),
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
+
async revoke(user, tenantId, inviteId) {
|
|
50
|
+
await this.assertTenantExists(tenantId);
|
|
51
|
+
await (0, operator_actions_1.revokeInvitationCommand)({
|
|
52
|
+
tenantId,
|
|
53
|
+
inviteId,
|
|
54
|
+
actor: (0, operator_actions_1.operatorActorOf)(user),
|
|
55
|
+
});
|
|
56
|
+
return { revoked: true };
|
|
57
|
+
}
|
|
49
58
|
}
|
|
50
59
|
exports.SaasWorkspaceInvitationsController = SaasWorkspaceInvitationsController;
|
|
51
60
|
__decorate([
|
|
@@ -70,4 +79,13 @@ __decorate([
|
|
|
70
79
|
__metadata("design:paramtypes", [Function, String, String]),
|
|
71
80
|
__metadata("design:returntype", Promise)
|
|
72
81
|
], SaasWorkspaceInvitationsController.prototype, "copyLink", null);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, interface_api_1.Post)("/:tenantId/invitations/:inviteId/revoke"),
|
|
84
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
85
|
+
__param(1, (0, interface_api_1.Parameter)("tenantId", "param")),
|
|
86
|
+
__param(2, (0, interface_api_1.Parameter)("inviteId", "param")),
|
|
87
|
+
__metadata("design:type", Function),
|
|
88
|
+
__metadata("design:paramtypes", [Function, String, String]),
|
|
89
|
+
__metadata("design:returntype", Promise)
|
|
90
|
+
], SaasWorkspaceInvitationsController.prototype, "revoke", null);
|
|
73
91
|
//# sourceMappingURL=workspace-invitations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-invitations.js","sourceRoot":"","sources":["../../../src/routes/platformOwner/workspace-invitations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAwE;AACxE,uEAAwD;AACxD,6FAAkE;AAClE,qDAA2D;AAC3D,yDAA+D;AAE/D,
|
|
1
|
+
{"version":3,"file":"workspace-invitations.js","sourceRoot":"","sources":["../../../src/routes/platformOwner/workspace-invitations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAwE;AACxE,uEAAwD;AACxD,6FAAkE;AAClE,qDAA2D;AAC3D,yDAA+D;AAE/D,6DAKgC;AAChC,8DAA6D;AAE7D,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAO7B,MAAa,kCAAmC,SAAQ,IAAA,0BAAU,EAChE,sBAAsB,CACvB;IAIS,KAAK,CAAC,kBAAkB,CAAC,QAAgB;QAC/C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACpD,IAAA,2BAAM,EAAC,MAAM,EAAE,cAAc,EAAE,iCAAiC,CAAC,CAAC;IACpE,CAAC;IAQK,AAAN,KAAK,CAAC,MAAM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A,IAAA,yBAAS,EAAC,UAAU,EAAE,OAAO,CAAC,CAAA;IAC9B,WAAA,IAAA,yBAAS,EAAC,UAAU,EAAE,OAAO,CAAC,CAAA;;;;gEAehC;AAGK;IADL,IAAA,oBAAI,EAAC,uCAAuC,CAAC;IAE3C,WAAA,IAAA,oBAAa,GAAE,CAAA;IACf,WAAA,IAAA,yBAAS,EAAC,UAAU,EAAE,OAAO,CAAC,CAAA;IAC9B,WAAA,IAAA,yBAAS,EAAC,UAAU,EAAE,OAAO,CAAC,CAAA;;;;kEAQhC;AAIK;IADL,IAAA,oBAAI,EAAC,yCAAyC,CAAC;IAE7C,WAAA,IAAA,oBAAa,GAAE,CAAA;IACf,WAAA,IAAA,yBAAS,EAAC,UAAU,EAAE,OAAO,CAAC,CAAA;IAC9B,WAAA,IAAA,yBAAS,EAAC,UAAU,EAAE,OAAO,CAAC,CAAA;;;;gEAShC"}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { TenantModel } from "@antelopejs/interface-dms/db";
|
|
2
2
|
import type { User } from "@antelopejs/interface-dms/auth/db";
|
|
3
|
+
import { type WorkspaceOperatorOptions } from "../../operator-actions";
|
|
4
|
+
import { type NextInvoiceRef, type SuspensionImpact } from "../../operator-actions/previews";
|
|
5
|
+
import { type UpgradePreview } from "../../operator-actions/upgrade-preview";
|
|
3
6
|
interface OperationBody {
|
|
4
7
|
operationId?: unknown;
|
|
5
8
|
}
|
|
9
|
+
interface SuspendBody extends OperationBody {
|
|
10
|
+
confirmName?: unknown;
|
|
11
|
+
}
|
|
6
12
|
interface ManualUpgradeBody extends OperationBody {
|
|
7
13
|
planId?: unknown;
|
|
8
14
|
}
|
|
@@ -10,6 +16,10 @@ interface BalanceCreditBody extends OperationBody {
|
|
|
10
16
|
amountCents?: unknown;
|
|
11
17
|
reason?: unknown;
|
|
12
18
|
}
|
|
19
|
+
interface OperatorOptionsResponse extends WorkspaceOperatorOptions {
|
|
20
|
+
creditCeilingMinor: number;
|
|
21
|
+
nextInvoice: NextInvoiceRef | null;
|
|
22
|
+
}
|
|
13
23
|
declare const SaasWorkspaceOperatorActionsController_base: import("@antelopejs/interface-api").ControllerClass<object>;
|
|
14
24
|
export declare class SaasWorkspaceOperatorActionsController extends SaasWorkspaceOperatorActionsController_base {
|
|
15
25
|
tenantModel: TenantModel;
|
|
@@ -25,9 +35,11 @@ export declare class SaasWorkspaceOperatorActionsController extends SaasWorkspac
|
|
|
25
35
|
requiresReconciliation: boolean;
|
|
26
36
|
reconciliationRequirements: string[];
|
|
27
37
|
}>;
|
|
28
|
-
getOptions(_user: User, tenantId: string): Promise<
|
|
29
|
-
|
|
38
|
+
getOptions(_user: User, tenantId: string): Promise<OperatorOptionsResponse>;
|
|
39
|
+
getSuspensionImpact(_user: User, tenantId: string): Promise<SuspensionImpact>;
|
|
40
|
+
suspend(user: User, tenantId: string, body: SuspendBody): Promise<import("../../operator-actions/types").OperatorCommandResult>;
|
|
30
41
|
unsuspend(user: User, tenantId: string, body: OperationBody): Promise<import("../../operator-actions/types").OperatorCommandResult>;
|
|
42
|
+
getUpgradePreview(_user: User, tenantId: string, planId: unknown): Promise<UpgradePreview>;
|
|
31
43
|
upgrade(user: User, tenantId: string, body: ManualUpgradeBody): Promise<import("../../operator-actions/types").OperatorCommandResult>;
|
|
32
44
|
grantCredit(user: User, tenantId: string, body: BalanceCreditBody): Promise<import("../../operator-actions/types").OperatorCommandResult>;
|
|
33
45
|
}
|
|
@@ -20,7 +20,10 @@ const db_1 = require("@antelopejs/interface-dms/db");
|
|
|
20
20
|
const auth_1 = require("@antelopejs/interface-dms/auth");
|
|
21
21
|
const operator_actions_1 = require("../../operator-actions");
|
|
22
22
|
const operator_action_model_1 = require("../../operator-actions/db/operator-action.model");
|
|
23
|
+
const previews_1 = require("../../operator-actions/previews");
|
|
24
|
+
const upgrade_preview_1 = require("../../operator-actions/upgrade-preview");
|
|
23
25
|
const provisioning_attempt_model_1 = require("../../workspaces/db/provisioning-attempt.model");
|
|
26
|
+
const operator_view_1 = require("../../workspaces/operator-view");
|
|
24
27
|
const HTTP_BAD_REQUEST = 400;
|
|
25
28
|
const HTTP_NOT_FOUND = 404;
|
|
26
29
|
function requireString(value, errorCode) {
|
|
@@ -42,6 +45,7 @@ class SaasWorkspaceOperatorActionsController extends (0, interface_api_1.Control
|
|
|
42
45
|
async assertTenantExists(tenantId) {
|
|
43
46
|
const tenant = await this.tenantModel.get(tenantId);
|
|
44
47
|
(0, interface_api_util_1.assert)(tenant, HTTP_NOT_FOUND, "saas.errors.workspace.not_found");
|
|
48
|
+
return tenant.name;
|
|
45
49
|
}
|
|
46
50
|
async getProvisioningAttempts(_user) {
|
|
47
51
|
return (0, interface_database_decorators_1.GetModel)(provisioning_attempt_model_1.ProvisioningAttemptModel).findUnresolved();
|
|
@@ -68,11 +72,24 @@ class SaasWorkspaceOperatorActionsController extends (0, interface_api_1.Control
|
|
|
68
72
|
};
|
|
69
73
|
}
|
|
70
74
|
async getOptions(_user, tenantId) {
|
|
71
|
-
await
|
|
72
|
-
|
|
75
|
+
const view = await (0, operator_view_1.loadWorkspaceOperatorView)(tenantId);
|
|
76
|
+
const [options, preview] = await Promise.all([
|
|
77
|
+
(0, operator_actions_1.getWorkspaceOperatorOptions)(tenantId),
|
|
78
|
+
(0, previews_1.safeUpcomingInvoice)(tenantId),
|
|
79
|
+
]);
|
|
80
|
+
return {
|
|
81
|
+
...options,
|
|
82
|
+
creditCeilingMinor: (0, previews_1.balanceCreditCeilingMinor)(view),
|
|
83
|
+
nextInvoice: (0, previews_1.nextInvoiceOf)(preview),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
async getSuspensionImpact(_user, tenantId) {
|
|
87
|
+
return (0, previews_1.loadSuspensionImpact)(tenantId);
|
|
73
88
|
}
|
|
74
89
|
async suspend(user, tenantId, body) {
|
|
75
|
-
await this.assertTenantExists(tenantId);
|
|
90
|
+
const name = await this.assertTenantExists(tenantId);
|
|
91
|
+
(0, interface_api_util_1.assert)(typeof body.confirmName === "string" &&
|
|
92
|
+
body.confirmName.trim() === name.trim(), HTTP_BAD_REQUEST, "saas.errors.workspace.confirmation_mismatch");
|
|
76
93
|
return (0, operator_actions_1.suspendWorkspaceCommand)({
|
|
77
94
|
tenantId,
|
|
78
95
|
operationId: operationIdOf(body),
|
|
@@ -87,6 +104,9 @@ class SaasWorkspaceOperatorActionsController extends (0, interface_api_1.Control
|
|
|
87
104
|
actor: (0, operator_actions_1.operatorActorOf)(user),
|
|
88
105
|
});
|
|
89
106
|
}
|
|
107
|
+
async getUpgradePreview(_user, tenantId, planId) {
|
|
108
|
+
return (0, upgrade_preview_1.previewManualUpgrade)(tenantId, requireString(planId, "saas.errors.operator.target_plan_required"));
|
|
109
|
+
}
|
|
90
110
|
async upgrade(user, tenantId, body) {
|
|
91
111
|
await this.assertTenantExists(tenantId);
|
|
92
112
|
return (0, operator_actions_1.manuallyUpgradeWorkspaceCommand)({
|
|
@@ -97,8 +117,9 @@ class SaasWorkspaceOperatorActionsController extends (0, interface_api_1.Control
|
|
|
97
117
|
});
|
|
98
118
|
}
|
|
99
119
|
async grantCredit(user, tenantId, body) {
|
|
100
|
-
await this.assertTenantExists(tenantId);
|
|
101
120
|
const credit = creditInputOf(body);
|
|
121
|
+
const view = await (0, operator_view_1.loadWorkspaceOperatorView)(tenantId);
|
|
122
|
+
(0, previews_1.assertBalanceCreditWithinCeiling)(view, credit.amountCents);
|
|
102
123
|
return (0, operator_actions_1.grantBalanceCreditCommand)({
|
|
103
124
|
tenantId,
|
|
104
125
|
operationId: operationIdOf(body),
|
|
@@ -144,6 +165,14 @@ __decorate([
|
|
|
144
165
|
__metadata("design:paramtypes", [Function, String]),
|
|
145
166
|
__metadata("design:returntype", Promise)
|
|
146
167
|
], SaasWorkspaceOperatorActionsController.prototype, "getOptions", null);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, interface_api_1.Get)("/:tenantId/suspension-impact"),
|
|
170
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
171
|
+
__param(1, (0, interface_api_1.Parameter)("tenantId", "param")),
|
|
172
|
+
__metadata("design:type", Function),
|
|
173
|
+
__metadata("design:paramtypes", [Function, String]),
|
|
174
|
+
__metadata("design:returntype", Promise)
|
|
175
|
+
], SaasWorkspaceOperatorActionsController.prototype, "getSuspensionImpact", null);
|
|
147
176
|
__decorate([
|
|
148
177
|
(0, interface_api_1.Post)("/:tenantId/suspend"),
|
|
149
178
|
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
@@ -162,6 +191,15 @@ __decorate([
|
|
|
162
191
|
__metadata("design:paramtypes", [Function, String, Object]),
|
|
163
192
|
__metadata("design:returntype", Promise)
|
|
164
193
|
], SaasWorkspaceOperatorActionsController.prototype, "unsuspend", null);
|
|
194
|
+
__decorate([
|
|
195
|
+
(0, interface_api_1.Get)("/:tenantId/upgrade-preview"),
|
|
196
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
197
|
+
__param(1, (0, interface_api_1.Parameter)("tenantId", "param")),
|
|
198
|
+
__param(2, (0, interface_api_1.Parameter)("planId", "query")),
|
|
199
|
+
__metadata("design:type", Function),
|
|
200
|
+
__metadata("design:paramtypes", [Function, String, Object]),
|
|
201
|
+
__metadata("design:returntype", Promise)
|
|
202
|
+
], SaasWorkspaceOperatorActionsController.prototype, "getUpgradePreview", null);
|
|
165
203
|
__decorate([
|
|
166
204
|
(0, interface_api_1.Post)("/:tenantId/upgrade"),
|
|
167
205
|
__param(0, (0, auth_1.AuthOwnerOnly)()),
|