@antelopejs/dms-saas 0.3.15 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -14
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.js +1 -0
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/owner-only-permissions-resolver.d.ts +1 -0
- package/dist/auth/owner-only-permissions-resolver.js +25 -0
- package/dist/auth/owner-only-permissions-resolver.js.map +1 -0
- package/dist/billing-state/directory-hooks.d.ts +1 -0
- package/dist/billing-state/directory-hooks.js +35 -0
- package/dist/billing-state/directory-hooks.js.map +1 -0
- package/dist/billing-state/directory.d.ts +29 -0
- package/dist/billing-state/directory.js +152 -0
- package/dist/billing-state/directory.js.map +1 -0
- package/dist/billing-state/index.d.ts +5 -1
- package/dist/billing-state/index.js +14 -2
- package/dist/billing-state/index.js.map +1 -1
- package/dist/billing-state/past-due-banner.d.ts +4 -3
- package/dist/billing-state/past-due-banner.js +30 -10
- package/dist/billing-state/past-due-banner.js.map +1 -1
- package/dist/billing-state/recovery.d.ts +4 -0
- package/dist/billing-state/recovery.js +7 -5
- package/dist/billing-state/recovery.js.map +1 -1
- package/dist/billing-state/trial-ending-banner.d.ts +4 -0
- package/dist/billing-state/trial-ending-banner.js +66 -0
- package/dist/billing-state/trial-ending-banner.js.map +1 -0
- package/dist/config/runtime.d.ts +1 -0
- package/dist/config/runtime.js +5 -0
- package/dist/config/runtime.js.map +1 -1
- package/dist/crons/auto-suspend-past-due.js +4 -5
- package/dist/crons/auto-suspend-past-due.js.map +1 -1
- package/dist/data-api/platformOwner/admin-user-invoices.d.ts +6 -4
- package/dist/data-api/platformOwner/admin-user-invoices.js +52 -30
- package/dist/data-api/platformOwner/admin-user-invoices.js.map +1 -1
- package/dist/data-api/platformOwner/admin-user-workspaces.d.ts +2 -0
- package/dist/data-api/platformOwner/admin-user-workspaces.js +69 -3
- package/dist/data-api/platformOwner/admin-user-workspaces.js.map +1 -1
- package/dist/data-api/platformOwner/credit-note-rows.d.ts +11 -0
- package/dist/data-api/platformOwner/credit-note-rows.js +54 -0
- package/dist/data-api/platformOwner/credit-note-rows.js.map +1 -0
- package/dist/data-api/platformOwner/credit-notes.d.ts +13 -0
- package/dist/data-api/platformOwner/credit-notes.js +149 -10
- package/dist/data-api/platformOwner/credit-notes.js.map +1 -1
- package/dist/data-api/platformOwner/features.d.ts +8 -2
- package/dist/data-api/platformOwner/features.js +155 -35
- package/dist/data-api/platformOwner/features.js.map +1 -1
- package/dist/data-api/platformOwner/invitations.js +29 -9
- package/dist/data-api/platformOwner/invitations.js.map +1 -1
- package/dist/data-api/platformOwner/invoice-cells.d.ts +5 -0
- package/dist/data-api/platformOwner/invoice-cells.js +51 -0
- package/dist/data-api/platformOwner/invoice-cells.js.map +1 -0
- package/dist/data-api/platformOwner/invoice-options.js.map +1 -1
- package/dist/data-api/platformOwner/invoice-rows.d.ts +9 -0
- package/dist/data-api/platformOwner/invoice-rows.js +39 -0
- package/dist/data-api/platformOwner/invoice-rows.js.map +1 -0
- package/dist/data-api/platformOwner/invoices.d.ts +24 -6
- package/dist/data-api/platformOwner/invoices.js +192 -11
- package/dist/data-api/platformOwner/invoices.js.map +1 -1
- package/dist/data-api/platformOwner/members.d.ts +2 -1
- package/dist/data-api/platformOwner/members.js +56 -20
- package/dist/data-api/platformOwner/members.js.map +1 -1
- package/dist/data-api/platformOwner/plan-migrations.d.ts +14 -2
- package/dist/data-api/platformOwner/plan-migrations.js +179 -33
- package/dist/data-api/platformOwner/plan-migrations.js.map +1 -1
- package/dist/data-api/platformOwner/plans.d.ts +30 -6
- package/dist/data-api/platformOwner/plans.js +269 -44
- package/dist/data-api/platformOwner/plans.js.map +1 -1
- package/dist/data-api/platformOwner/segments.d.ts +9 -7
- package/dist/data-api/platformOwner/segments.js +108 -101
- package/dist/data-api/platformOwner/segments.js.map +1 -1
- package/dist/data-api/platformOwner/table-scope.d.ts +6 -0
- package/dist/data-api/platformOwner/table-scope.js +8 -0
- package/dist/data-api/platformOwner/table-scope.js.map +1 -0
- package/dist/data-api/platformOwner/users.d.ts +15 -2
- package/dist/data-api/platformOwner/users.js +171 -15
- package/dist/data-api/platformOwner/users.js.map +1 -1
- package/dist/data-api/platformOwner/workspace-cells.d.ts +12 -0
- package/dist/data-api/platformOwner/workspace-cells.js +90 -0
- package/dist/data-api/platformOwner/workspace-cells.js.map +1 -0
- package/dist/data-api/platformOwner/workspaces.d.ts +26 -4
- package/dist/data-api/platformOwner/workspaces.js +269 -97
- package/dist/data-api/platformOwner/workspaces.js.map +1 -1
- package/dist/data-api/tenant/tenant-invoices.d.ts +4 -0
- package/dist/data-api/tenant/tenant-invoices.js +68 -4
- package/dist/data-api/tenant/tenant-invoices.js.map +1 -1
- package/dist/hooks/register.js +5 -1
- package/dist/hooks/register.js.map +1 -1
- package/dist/i18n/composed-text.d.ts +17 -0
- package/dist/i18n/composed-text.js +71 -0
- package/dist/i18n/composed-text.js.map +1 -0
- package/dist/implementations/dms-saas/billing.d.ts +1 -0
- package/dist/implementations/dms-saas/billing.js +4 -1
- package/dist/implementations/dms-saas/billing.js.map +1 -1
- package/dist/implementations/dms-saas/pages.d.ts +0 -1
- package/dist/implementations/dms-saas/pages.js +0 -4
- package/dist/implementations/dms-saas/pages.js.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/metrics/activity-sources.d.ts +2 -0
- package/dist/metrics/activity-sources.js +60 -0
- package/dist/metrics/activity-sources.js.map +1 -0
- package/dist/metrics/activity.d.ts +25 -0
- package/dist/metrics/activity.js +197 -0
- package/dist/metrics/activity.js.map +1 -0
- package/dist/metrics/directory-summary.d.ts +30 -0
- package/dist/metrics/directory-summary.js +95 -0
- package/dist/metrics/directory-summary.js.map +1 -0
- package/dist/metrics/headline-items.d.ts +32 -0
- package/dist/metrics/headline-items.js +242 -0
- package/dist/metrics/headline-items.js.map +1 -0
- package/dist/metrics/normalised-mrr.d.ts +32 -0
- package/dist/metrics/normalised-mrr.js +75 -0
- package/dist/metrics/normalised-mrr.js.map +1 -0
- package/dist/metrics/revenue.d.ts +30 -0
- package/dist/metrics/revenue.js +126 -0
- package/dist/metrics/revenue.js.map +1 -0
- package/dist/notifications/recipients.d.ts +1 -0
- package/dist/notifications/recipients.js +4 -0
- package/dist/notifications/recipients.js.map +1 -1
- package/dist/notifications/subjects.d.ts +18 -17
- package/dist/notifications/subjects.js +7 -1
- package/dist/notifications/subjects.js.map +1 -1
- package/dist/operator-actions/commands.js +9 -6
- package/dist/operator-actions/commands.js.map +1 -1
- package/dist/operator-actions/invitation-commands.d.ts +7 -1
- package/dist/operator-actions/invitation-commands.js +16 -0
- package/dist/operator-actions/invitation-commands.js.map +1 -1
- package/dist/operator-actions/previews.d.ts +50 -0
- package/dist/operator-actions/previews.js +113 -0
- package/dist/operator-actions/previews.js.map +1 -0
- package/dist/operator-actions/types.d.ts +1 -1
- package/dist/operator-actions/upgrade-preview.d.ts +35 -0
- package/dist/operator-actions/upgrade-preview.js +110 -0
- package/dist/operator-actions/upgrade-preview.js.map +1 -0
- package/dist/operator-billing/billing-rules.d.ts +58 -0
- package/dist/operator-billing/billing-rules.js +90 -0
- package/dist/operator-billing/billing-rules.js.map +1 -0
- package/dist/operator-billing/billing-settings-store.d.ts +3 -0
- package/dist/operator-billing/billing-settings-store.js +34 -0
- package/dist/operator-billing/billing-settings-store.js.map +1 -0
- package/dist/operator-billing/billing-stats.d.ts +37 -0
- package/dist/operator-billing/billing-stats.js +197 -0
- package/dist/operator-billing/billing-stats.js.map +1 -0
- package/dist/operator-billing/credit-allowance.d.ts +17 -0
- package/dist/operator-billing/credit-allowance.js +44 -0
- package/dist/operator-billing/credit-allowance.js.map +1 -0
- package/dist/operator-billing/credit-note-request.d.ts +39 -0
- package/dist/operator-billing/credit-note-request.js +73 -0
- package/dist/operator-billing/credit-note-request.js.map +1 -0
- package/dist/operator-billing/index.d.ts +8 -0
- package/dist/operator-billing/index.js +25 -0
- package/dist/operator-billing/index.js.map +1 -0
- package/dist/operator-billing/invoice-credit.d.ts +41 -0
- package/dist/operator-billing/invoice-credit.js +111 -0
- package/dist/operator-billing/invoice-credit.js.map +1 -0
- package/dist/operator-billing/legal-documents-store.d.ts +12 -0
- package/dist/operator-billing/legal-documents-store.js +46 -0
- package/dist/operator-billing/legal-documents-store.js.map +1 -0
- package/dist/operator-billing/legal-versions.d.ts +5 -0
- package/dist/operator-billing/legal-versions.js +31 -0
- package/dist/operator-billing/legal-versions.js.map +1 -0
- package/dist/pages/block-meta.d.ts +15 -0
- package/dist/pages/block-meta.js +21 -0
- package/dist/pages/block-meta.js.map +1 -0
- package/dist/pages/module.d.ts +1 -3
- package/dist/pages/module.js +1 -8
- package/dist/pages/module.js.map +1 -1
- package/dist/pages/platform/credit-notes.d.ts +1 -0
- package/dist/pages/platform/credit-notes.js +63 -5
- package/dist/pages/platform/credit-notes.js.map +1 -1
- package/dist/pages/platform/dashboard.d.ts +4 -1
- package/dist/pages/platform/dashboard.js +123 -64
- package/dist/pages/platform/dashboard.js.map +1 -1
- package/dist/pages/platform/features.js +83 -12
- package/dist/pages/platform/features.js.map +1 -1
- package/dist/pages/platform/index.d.ts +1 -0
- package/dist/pages/platform/index.js +1 -0
- package/dist/pages/platform/index.js.map +1 -1
- package/dist/pages/platform/invoices.d.ts +6 -0
- package/dist/pages/platform/invoices.js +84 -28
- package/dist/pages/platform/invoices.js.map +1 -1
- package/dist/pages/platform/paths.d.ts +9 -0
- package/dist/pages/platform/paths.js +25 -0
- package/dist/pages/platform/paths.js.map +1 -0
- package/dist/pages/platform/plans/edit.d.ts +2 -2
- package/dist/pages/platform/plans/edit.js +170 -105
- package/dist/pages/platform/plans/edit.js.map +1 -1
- package/dist/pages/platform/plans/index.d.ts +1 -0
- package/dist/pages/platform/plans/index.js +172 -54
- package/dist/pages/platform/plans/index.js.map +1 -1
- package/dist/pages/platform/plans/migrations.d.ts +12 -0
- package/dist/pages/platform/plans/migrations.js +259 -13
- package/dist/pages/platform/plans/migrations.js.map +1 -1
- package/dist/pages/platform/segments/edit.d.ts +17 -0
- package/dist/pages/platform/segments/edit.js +124 -0
- package/dist/pages/platform/segments/edit.js.map +1 -0
- package/dist/pages/platform/segments/index.js +68 -8
- package/dist/pages/platform/segments/index.js.map +1 -1
- package/dist/pages/platform/settings.d.ts +1 -1
- package/dist/pages/platform/settings.js +164 -105
- package/dist/pages/platform/settings.js.map +1 -1
- package/dist/pages/platform/users/detail.js +104 -33
- package/dist/pages/platform/users/detail.js.map +1 -1
- package/dist/pages/platform/users/index.js +52 -18
- package/dist/pages/platform/users/index.js.map +1 -1
- package/dist/pages/platform/workspaces/detail.d.ts +3 -1
- package/dist/pages/platform/workspaces/detail.js +184 -113
- package/dist/pages/platform/workspaces/detail.js.map +1 -1
- package/dist/pages/platform/workspaces/index.d.ts +1 -20
- package/dist/pages/platform/workspaces/index.js +152 -180
- package/dist/pages/platform/workspaces/index.js.map +1 -1
- package/dist/pages/platform/workspaces/shared.d.ts +11 -0
- package/dist/pages/platform/workspaces/shared.js +53 -0
- package/dist/pages/platform/workspaces/shared.js.map +1 -0
- package/dist/pages/public/auth/no-workspace.js +7 -2
- package/dist/pages/public/auth/no-workspace.js.map +1 -1
- package/dist/pages/public/index.js.map +1 -1
- package/dist/pages/public/legal/privacy-policy.d.ts +1 -0
- package/dist/pages/public/legal/privacy-policy.js +9 -4
- package/dist/pages/public/legal/privacy-policy.js.map +1 -1
- package/dist/pages/public/legal/terms-and-conditions.d.ts +1 -0
- package/dist/pages/public/legal/terms-and-conditions.js +9 -4
- package/dist/pages/public/legal/terms-and-conditions.js.map +1 -1
- package/dist/pages/public/legal/terms-of-use.d.ts +1 -0
- package/dist/pages/public/legal/terms-of-use.js +9 -4
- package/dist/pages/public/legal/terms-of-use.js.map +1 -1
- package/dist/pages/public/nav-bar.d.ts +2 -0
- package/dist/pages/public/nav-bar.js +14 -0
- package/dist/pages/public/nav-bar.js.map +1 -0
- package/dist/pages/public/pricing.d.ts +10 -0
- package/dist/pages/public/pricing.js +32 -0
- package/dist/pages/public/pricing.js.map +1 -0
- package/dist/pages/public/register.d.ts +1 -0
- package/dist/pages/public/register.js +6 -3
- package/dist/pages/public/register.js.map +1 -1
- package/dist/pages/public/screens.js +1 -0
- package/dist/pages/public/screens.js.map +1 -1
- package/dist/pages/tenant/billing.d.ts +7 -7
- package/dist/pages/tenant/billing.js +141 -63
- package/dist/pages/tenant/billing.js.map +1 -1
- package/dist/pages/tenant/data-export.d.ts +3 -1
- package/dist/pages/tenant/data-export.js +25 -6
- package/dist/pages/tenant/data-export.js.map +1 -1
- package/dist/pages/tenant/general.d.ts +3 -2
- package/dist/pages/tenant/general.js +91 -11
- package/dist/pages/tenant/general.js.map +1 -1
- package/dist/pages/tenant/index.d.ts +1 -0
- package/dist/pages/tenant/index.js +1 -0
- package/dist/pages/tenant/index.js.map +1 -1
- package/dist/pages/tenant/members-seat-quota.d.ts +3 -0
- package/dist/pages/tenant/members-seat-quota.js +18 -6
- package/dist/pages/tenant/members-seat-quota.js.map +1 -1
- package/dist/pages/tenant/owner-only.d.ts +1 -0
- package/dist/pages/tenant/owner-only.js +14 -0
- package/dist/pages/tenant/owner-only.js.map +1 -0
- package/dist/pages/tenant/workspace-suspended.js +7 -3
- package/dist/pages/tenant/workspace-suspended.js.map +1 -1
- package/dist/plan-changes/applied-upgrade.d.ts +5 -0
- package/dist/plan-changes/applied-upgrade.js +51 -0
- package/dist/plan-changes/applied-upgrade.js.map +1 -0
- package/dist/plan-changes/deferred.js +9 -40
- package/dist/plan-changes/deferred.js.map +1 -1
- package/dist/plan-changes/immediate.d.ts +4 -0
- package/dist/plan-changes/immediate.js +34 -0
- package/dist/plan-changes/immediate.js.map +1 -0
- package/dist/plan-changes/index.d.ts +1 -0
- package/dist/plan-changes/index.js +1 -0
- package/dist/plan-changes/index.js.map +1 -1
- package/dist/plan-changes/pending-target.d.ts +17 -0
- package/dist/plan-changes/pending-target.js +62 -0
- package/dist/plan-changes/pending-target.js.map +1 -0
- package/dist/plans/catalogue-summary.d.ts +24 -0
- package/dist/plans/catalogue-summary.js +97 -0
- package/dist/plans/catalogue-summary.js.map +1 -0
- package/dist/plans/catalogue-usage.d.ts +36 -0
- package/dist/plans/catalogue-usage.js +120 -0
- package/dist/plans/catalogue-usage.js.map +1 -0
- package/dist/plans/feature-guards.d.ts +5 -0
- package/dist/plans/feature-guards.js +31 -0
- package/dist/plans/feature-guards.js.map +1 -0
- package/dist/plans/feature-usage.d.ts +4 -0
- package/dist/plans/feature-usage.js +22 -0
- package/dist/plans/feature-usage.js.map +1 -0
- package/dist/plans/migration-blocks.d.ts +13 -0
- package/dist/plans/migration-blocks.js +337 -0
- package/dist/plans/migration-blocks.js.map +1 -0
- package/dist/plans/migration-detail.d.ts +48 -0
- package/dist/plans/migration-detail.js +80 -0
- package/dist/plans/migration-detail.js.map +1 -0
- package/dist/plans/migration-dialogs.d.ts +8 -0
- package/dist/plans/migration-dialogs.js +103 -0
- package/dist/plans/migration-dialogs.js.map +1 -0
- package/dist/plans/migration-outcomes.d.ts +7 -0
- package/dist/plans/migration-outcomes.js +38 -0
- package/dist/plans/migration-outcomes.js.map +1 -0
- package/dist/plans/migration-realtime.d.ts +2 -0
- package/dist/plans/migration-realtime.js +19 -0
- package/dist/plans/migration-realtime.js.map +1 -0
- package/dist/plans/migration-workspaces.d.ts +40 -0
- package/dist/plans/migration-workspaces.js +121 -0
- package/dist/plans/migration-workspaces.js.map +1 -0
- package/dist/plans/money.d.ts +1 -0
- package/dist/plans/money.js +11 -0
- package/dist/plans/money.js.map +1 -0
- package/dist/plans/plan-access-type.d.ts +25 -0
- package/dist/plans/plan-access-type.js +49 -0
- package/dist/plans/plan-access-type.js.map +1 -0
- package/dist/plans/plan-audience.d.ts +3 -0
- package/dist/plans/plan-audience.js +9 -0
- package/dist/plans/plan-audience.js.map +1 -0
- package/dist/plans/plan-diff.d.ts +13 -0
- package/dist/plans/plan-diff.js +73 -0
- package/dist/plans/plan-diff.js.map +1 -0
- package/dist/plans/plan-permission-tree.d.ts +11 -0
- package/dist/plans/plan-permission-tree.js +58 -0
- package/dist/plans/plan-permission-tree.js.map +1 -0
- package/dist/plans/plan-write.d.ts +17 -0
- package/dist/plans/plan-write.js +111 -0
- package/dist/plans/plan-write.js.map +1 -0
- package/dist/plans/seat-capacity.d.ts +3 -1
- package/dist/plans/seat-capacity.js +10 -2
- package/dist/plans/seat-capacity.js.map +1 -1
- package/dist/plans/seat-hooks.d.ts +1 -0
- package/dist/plans/seat-hooks.js +1 -0
- package/dist/plans/seat-hooks.js.map +1 -1
- package/dist/plans/stripe-sync.d.ts +3 -0
- package/dist/plans/stripe-sync.js +16 -0
- package/dist/plans/stripe-sync.js.map +1 -1
- package/dist/routes/platformOwner/billing-settings.d.ts +11 -35
- package/dist/routes/platformOwner/billing-settings.js +77 -47
- package/dist/routes/platformOwner/billing-settings.js.map +1 -1
- package/dist/routes/platformOwner/billing-stats.d.ts +15 -0
- package/dist/routes/platformOwner/billing-stats.js +106 -0
- package/dist/routes/platformOwner/billing-stats.js.map +1 -0
- package/dist/routes/platformOwner/block-payloads.d.ts +7 -0
- package/dist/routes/platformOwner/block-payloads.js +3 -0
- package/dist/routes/platformOwner/block-payloads.js.map +1 -0
- package/dist/routes/platformOwner/credit-notes-issue.d.ts +7 -8
- package/dist/routes/platformOwner/credit-notes-issue.js +28 -16
- package/dist/routes/platformOwner/credit-notes-issue.js.map +1 -1
- package/dist/routes/platformOwner/dashboard.d.ts +14 -57
- package/dist/routes/platformOwner/dashboard.js +126 -247
- package/dist/routes/platformOwner/dashboard.js.map +1 -1
- package/dist/routes/platformOwner/index.d.ts +7 -0
- package/dist/routes/platformOwner/index.js +7 -0
- package/dist/routes/platformOwner/index.js.map +1 -1
- package/dist/routes/platformOwner/plan-deletion.d.ts +77 -19
- package/dist/routes/platformOwner/plan-deletion.js +219 -67
- package/dist/routes/platformOwner/plan-deletion.js.map +1 -1
- package/dist/routes/platformOwner/plan-dialogs.d.ts +22 -0
- package/dist/routes/platformOwner/plan-dialogs.js +211 -0
- package/dist/routes/platformOwner/plan-dialogs.js.map +1 -0
- package/dist/routes/platformOwner/plan-migration-context.d.ts +9 -0
- package/dist/routes/platformOwner/plan-migration-context.js +147 -0
- package/dist/routes/platformOwner/plan-migration-context.js.map +1 -0
- package/dist/routes/platformOwner/plan-migration-export.d.ts +12 -0
- package/dist/routes/platformOwner/plan-migration-export.js +100 -0
- package/dist/routes/platformOwner/plan-migration-export.js.map +1 -0
- package/dist/routes/platformOwner/plan-migrations.d.ts +43 -0
- package/dist/routes/platformOwner/plan-migrations.js +260 -0
- package/dist/routes/platformOwner/plan-migrations.js.map +1 -0
- package/dist/routes/platformOwner/plans.d.ts +45 -42
- package/dist/routes/platformOwner/plans.js +162 -143
- package/dist/routes/platformOwner/plans.js.map +1 -1
- package/dist/routes/platformOwner/platform-owners.d.ts +8 -6
- package/dist/routes/platformOwner/platform-owners.js +40 -12
- package/dist/routes/platformOwner/platform-owners.js.map +1 -1
- package/dist/routes/platformOwner/segments-export.d.ts +15 -0
- package/dist/routes/platformOwner/segments-export.js +143 -0
- package/dist/routes/platformOwner/segments-export.js.map +1 -0
- package/dist/routes/platformOwner/segments.d.ts +17 -11
- package/dist/routes/platformOwner/segments.js +62 -113
- package/dist/routes/platformOwner/segments.js.map +1 -1
- package/dist/routes/platformOwner/stripe-dashboard.d.ts +6 -0
- package/dist/routes/platformOwner/stripe-dashboard.js +29 -0
- package/dist/routes/platformOwner/stripe-dashboard.js.map +1 -0
- package/dist/routes/platformOwner/users-detail.d.ts +12 -22
- package/dist/routes/platformOwner/users-detail.js +60 -53
- package/dist/routes/platformOwner/users-detail.js.map +1 -1
- package/dist/routes/platformOwner/workspace-detail.d.ts +36 -0
- package/dist/routes/platformOwner/workspace-detail.js +222 -0
- package/dist/routes/platformOwner/workspace-detail.js.map +1 -0
- package/dist/routes/platformOwner/workspace-invitations.d.ts +4 -0
- package/dist/routes/platformOwner/workspace-invitations.js +18 -0
- package/dist/routes/platformOwner/workspace-invitations.js.map +1 -1
- package/dist/routes/platformOwner/workspace-operator-actions.d.ts +14 -2
- package/dist/routes/platformOwner/workspace-operator-actions.js +42 -4
- package/dist/routes/platformOwner/workspace-operator-actions.js.map +1 -1
- package/dist/routes/platformOwner/workspaces-admin.d.ts +17 -12
- package/dist/routes/platformOwner/workspaces-admin.js +122 -28
- package/dist/routes/platformOwner/workspaces-admin.js.map +1 -1
- package/dist/routes/public/index.d.ts +1 -0
- package/dist/routes/public/index.js +1 -0
- package/dist/routes/public/index.js.map +1 -1
- package/dist/routes/public/legal-documents.d.ts +2 -8
- package/dist/routes/public/legal-documents.js +4 -39
- package/dist/routes/public/legal-documents.js.map +1 -1
- package/dist/routes/public/pricing.d.ts +12 -0
- package/dist/routes/public/pricing.js +50 -0
- package/dist/routes/public/pricing.js.map +1 -0
- package/dist/routes/public/public-plan-catalog.d.ts +37 -0
- package/dist/routes/public/public-plan-catalog.js +63 -0
- package/dist/routes/public/public-plan-catalog.js.map +1 -0
- package/dist/routes/public/register.d.ts +13 -0
- package/dist/routes/public/register.js +88 -4
- package/dist/routes/public/register.js.map +1 -1
- package/dist/routes/tenant/billing-pay-invoice.d.ts +13 -0
- package/dist/routes/tenant/billing-pay-invoice.js +82 -0
- package/dist/routes/tenant/billing-pay-invoice.js.map +1 -0
- package/dist/routes/tenant/billing-portal.d.ts +8 -3
- package/dist/routes/tenant/billing-portal.js +34 -16
- package/dist/routes/tenant/billing-portal.js.map +1 -1
- package/dist/routes/tenant/billing-self-refund.d.ts +26 -1
- package/dist/routes/tenant/billing-self-refund.js +95 -46
- package/dist/routes/tenant/billing-self-refund.js.map +1 -1
- package/dist/routes/tenant/complimentary-banner.d.ts +12 -0
- package/dist/routes/tenant/complimentary-banner.js +64 -0
- package/dist/routes/tenant/complimentary-banner.js.map +1 -0
- package/dist/routes/tenant/data-export.js +14 -0
- package/dist/routes/tenant/data-export.js.map +1 -1
- package/dist/routes/tenant/index.d.ts +7 -0
- package/dist/routes/tenant/index.js +7 -0
- package/dist/routes/tenant/index.js.map +1 -1
- package/dist/routes/tenant/tenant-billing.d.ts +1 -0
- package/dist/routes/tenant/tenant-billing.js +18 -13
- package/dist/routes/tenant/tenant-billing.js.map +1 -1
- package/dist/routes/tenant/tenant-plan-authentication.d.ts +13 -0
- package/dist/routes/tenant/tenant-plan-authentication.js +79 -0
- package/dist/routes/tenant/tenant-plan-authentication.js.map +1 -0
- package/dist/routes/tenant/tenant-plan-cancellation.d.ts +12 -0
- package/dist/routes/tenant/tenant-plan-cancellation.js +87 -0
- package/dist/routes/tenant/tenant-plan-cancellation.js.map +1 -0
- package/dist/routes/tenant/tenant-plan-checkout.d.ts +3 -0
- package/dist/routes/tenant/tenant-plan-checkout.js +21 -11
- package/dist/routes/tenant/tenant-plan-checkout.js.map +1 -1
- package/dist/routes/tenant/tenant-plan-ops.d.ts +32 -2
- package/dist/routes/tenant/tenant-plan-ops.js +112 -39
- package/dist/routes/tenant/tenant-plan-ops.js.map +1 -1
- package/dist/routes/tenant/tenant-plan-preview.d.ts +33 -0
- package/dist/routes/tenant/tenant-plan-preview.js +216 -0
- package/dist/routes/tenant/tenant-plan-preview.js.map +1 -0
- package/dist/routes/tenant/tenant-plan-resubscription.d.ts +2 -0
- package/dist/routes/tenant/tenant-plan-resubscription.js +61 -0
- package/dist/routes/tenant/tenant-plan-resubscription.js.map +1 -0
- package/dist/routes/tenant/tenant-plan.d.ts +9 -4
- package/dist/routes/tenant/tenant-plan.js +125 -15
- package/dist/routes/tenant/tenant-plan.js.map +1 -1
- package/dist/routes/tenant/tenant-seats.d.ts +6 -1
- package/dist/routes/tenant/tenant-seats.js +26 -5
- package/dist/routes/tenant/tenant-seats.js.map +1 -1
- package/dist/routes/tenant/tenant-upcoming-invoice.d.ts +26 -0
- package/dist/routes/tenant/tenant-upcoming-invoice.js +200 -0
- package/dist/routes/tenant/tenant-upcoming-invoice.js.map +1 -0
- package/dist/routes/tenant/workspace-access.d.ts +67 -0
- package/dist/routes/tenant/workspace-access.js +224 -0
- package/dist/routes/tenant/workspace-access.js.map +1 -0
- package/dist/routes/tenant/workspaces.d.ts +12 -43
- package/dist/routes/tenant/workspaces.js +82 -192
- package/dist/routes/tenant/workspaces.js.map +1 -1
- package/dist/segments/index.d.ts +29 -0
- package/dist/segments/index.js +116 -0
- package/dist/segments/index.js.map +1 -0
- package/dist/stripe/client.d.ts +1 -0
- package/dist/stripe/client.js +11 -0
- package/dist/stripe/client.js.map +1 -1
- package/dist/stripe/customer-locale.d.ts +3 -0
- package/dist/stripe/customer-locale.js +36 -0
- package/dist/stripe/customer-locale.js.map +1 -0
- package/dist/stripe/dashboard-links.d.ts +2 -0
- package/dist/stripe/dashboard-links.js +8 -0
- package/dist/stripe/dashboard-links.js.map +1 -0
- package/dist/stripe/index.d.ts +3 -0
- package/dist/stripe/index.js +3 -0
- package/dist/stripe/index.js.map +1 -1
- package/dist/stripe/pending-update.d.ts +5 -0
- package/dist/stripe/pending-update.js +56 -0
- package/dist/stripe/pending-update.js.map +1 -0
- package/dist/stripe/plan-schedule.js +4 -1
- package/dist/stripe/plan-schedule.js.map +1 -1
- package/dist/stripe/subscription-cancellation.d.ts +3 -0
- package/dist/stripe/subscription-cancellation.js +26 -0
- package/dist/stripe/subscription-cancellation.js.map +1 -0
- package/dist/stripe/sync-plan.js +5 -6
- package/dist/stripe/sync-plan.js.map +1 -1
- package/dist/stripe/upcoming-invoice.d.ts +9 -0
- package/dist/stripe/upcoming-invoice.js +19 -3
- package/dist/stripe/upcoming-invoice.js.map +1 -1
- package/dist/stripe/webhook-checkout.js +2 -0
- package/dist/stripe/webhook-checkout.js.map +1 -1
- package/dist/stripe/webhook-credit-notes.js +15 -0
- package/dist/stripe/webhook-credit-notes.js.map +1 -1
- package/dist/stripe/webhook-dispatch.js +2 -0
- package/dist/stripe/webhook-dispatch.js.map +1 -1
- package/dist/stripe/webhook-handlers.d.ts +1 -0
- package/dist/stripe/webhook-handlers.js +34 -9
- package/dist/stripe/webhook-handlers.js.map +1 -1
- package/dist/stripe/webhook-shared.d.ts +3 -1
- package/dist/stripe/webhook-shared.js +20 -1
- package/dist/stripe/webhook-shared.js.map +1 -1
- package/dist/stripe/workspace-checkout.d.ts +2 -0
- package/dist/stripe/workspace-checkout.js +4 -0
- package/dist/stripe/workspace-checkout.js.map +1 -1
- package/dist/types/config.d.ts +2 -0
- package/dist/types/config.js.map +1 -1
- package/dist/upcoming-invoice/mapping.js +1 -0
- package/dist/upcoming-invoice/mapping.js.map +1 -1
- package/dist/users/index.d.ts +4 -0
- package/dist/users/index.js +21 -0
- package/dist/users/index.js.map +1 -0
- package/dist/users/platform-role.d.ts +18 -0
- package/dist/users/platform-role.js +127 -0
- package/dist/users/platform-role.js.map +1 -0
- package/dist/users/user-detail.d.ts +43 -0
- package/dist/users/user-detail.js +100 -0
- package/dist/users/user-detail.js.map +1 -0
- package/dist/users/user-facts.d.ts +10 -0
- package/dist/users/user-facts.js +157 -0
- package/dist/users/user-facts.js.map +1 -0
- package/dist/users/user-segments.d.ts +10 -0
- package/dist/users/user-segments.js +32 -0
- package/dist/users/user-segments.js.map +1 -0
- package/dist/utils/billing-displays.d.ts +6 -0
- package/dist/utils/billing-displays.js +17 -0
- package/dist/utils/billing-displays.js.map +1 -0
- package/dist/utils/billing-document-status.d.ts +0 -4
- package/dist/utils/billing-document-status.js +1 -13
- package/dist/utils/billing-document-status.js.map +1 -1
- package/dist/utils/billing-document-type.d.ts +6 -0
- package/dist/utils/billing-document-type.js +13 -0
- package/dist/utils/billing-document-type.js.map +1 -1
- package/dist/utils/content-language.d.ts +2 -0
- package/dist/utils/content-language.js +12 -0
- package/dist/utils/content-language.js.map +1 -0
- package/dist/utils/csv-file.d.ts +2 -0
- package/dist/utils/csv-file.js +23 -0
- package/dist/utils/csv-file.js.map +1 -0
- package/dist/utils/form-insight-type.d.ts +8 -0
- package/dist/utils/form-insight-type.js +34 -0
- package/dist/utils/form-insight-type.js.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/language.d.ts +1 -0
- package/dist/utils/language.js +7 -0
- package/dist/utils/language.js.map +1 -0
- package/dist/utils/money.d.ts +2 -0
- package/dist/utils/money.js +24 -0
- package/dist/utils/money.js.map +1 -0
- package/dist/utils/segment-evaluator.d.ts +4 -0
- package/dist/utils/segment-evaluator.js +15 -8
- package/dist/utils/segment-evaluator.js.map +1 -1
- package/dist/utils/segment-explain.d.ts +10 -0
- package/dist/utils/segment-explain.js +31 -0
- package/dist/utils/segment-explain.js.map +1 -0
- package/dist/utils/segment-fields.d.ts +13 -2
- package/dist/utils/segment-fields.js +137 -116
- package/dist/utils/segment-fields.js.map +1 -1
- package/dist/utils/segment-matching.d.ts +14 -3
- package/dist/utils/segment-matching.js +47 -13
- package/dist/utils/segment-matching.js.map +1 -1
- package/dist/utils/segment-preview.d.ts +31 -0
- package/dist/utils/segment-preview.js +83 -0
- package/dist/utils/segment-preview.js.map +1 -0
- package/dist/utils/segment-user-projection.d.ts +3 -0
- package/dist/utils/segment-user-projection.js +31 -0
- package/dist/utils/segment-user-projection.js.map +1 -0
- package/dist/utils/segment-validation.d.ts +14 -0
- package/dist/utils/segment-validation.js +98 -0
- package/dist/utils/segment-validation.js.map +1 -0
- package/dist/utils/status-vocabulary.d.ts +57 -0
- package/dist/utils/status-vocabulary.js +92 -0
- package/dist/utils/status-vocabulary.js.map +1 -0
- package/dist/workers/index.d.ts +1 -0
- package/dist/workers/index.js +1 -0
- package/dist/workers/index.js.map +1 -1
- package/dist/workers/plan-migration-resolution.d.ts +14 -0
- package/dist/workers/plan-migration-resolution.js +99 -0
- package/dist/workers/plan-migration-resolution.js.map +1 -0
- package/dist/workers/plan-migration.d.ts +6 -1
- package/dist/workers/plan-migration.js +152 -37
- package/dist/workers/plan-migration.js.map +1 -1
- package/dist/workspaces/billing-identity-lock.d.ts +1 -0
- package/dist/workspaces/billing-identity-lock.js +18 -0
- package/dist/workspaces/billing-identity-lock.js.map +1 -0
- package/dist/workspaces/complimentary-banner.d.ts +11 -0
- package/dist/workspaces/complimentary-banner.js +83 -0
- package/dist/workspaces/complimentary-banner.js.map +1 -0
- package/dist/workspaces/default-member-role.d.ts +2 -0
- package/dist/workspaces/default-member-role.js +43 -0
- package/dist/workspaces/default-member-role.js.map +1 -0
- package/dist/workspaces/deletion-request.d.ts +2 -0
- package/dist/workspaces/deletion-request.js +5 -0
- package/dist/workspaces/deletion-request.js.map +1 -0
- package/dist/workspaces/deletion.d.ts +1 -1
- package/dist/workspaces/deletion.js +19 -7
- package/dist/workspaces/deletion.js.map +1 -1
- package/dist/workspaces/detail-items.d.ts +15 -0
- package/dist/workspaces/detail-items.js +226 -0
- package/dist/workspaces/detail-items.js.map +1 -0
- package/dist/workspaces/first-payment.d.ts +5 -0
- package/dist/workspaces/first-payment.js +28 -0
- package/dist/workspaces/first-payment.js.map +1 -0
- package/dist/workspaces/free-workspaces-per-card.d.ts +6 -0
- package/dist/workspaces/free-workspaces-per-card.js +58 -0
- package/dist/workspaces/free-workspaces-per-card.js.map +1 -0
- package/dist/workspaces/index.d.ts +7 -0
- package/dist/workspaces/index.js +7 -0
- package/dist/workspaces/index.js.map +1 -1
- package/dist/workspaces/invitations.d.ts +2 -1
- package/dist/workspaces/invitations.js +16 -6
- package/dist/workspaces/invitations.js.map +1 -1
- package/dist/workspaces/my-workspaces.d.ts +13 -0
- package/dist/workspaces/my-workspaces.js +68 -0
- package/dist/workspaces/my-workspaces.js.map +1 -0
- package/dist/workspaces/operator-creation.d.ts +39 -0
- package/dist/workspaces/operator-creation.js +123 -0
- package/dist/workspaces/operator-creation.js.map +1 -0
- package/dist/workspaces/operator-view.d.ts +13 -0
- package/dist/workspaces/operator-view.js +37 -0
- package/dist/workspaces/operator-view.js.map +1 -0
- package/dist/workspaces/owner-contact.d.ts +7 -0
- package/dist/workspaces/owner-contact.js +24 -0
- package/dist/workspaces/owner-contact.js.map +1 -0
- package/dist/workspaces/owner-invitation-email.d.ts +12 -0
- package/dist/workspaces/owner-invitation-email.js +53 -0
- package/dist/workspaces/owner-invitation-email.js.map +1 -0
- package/dist/workspaces/provisioning.d.ts +2 -0
- package/dist/workspaces/provisioning.js +37 -15
- package/dist/workspaces/provisioning.js.map +1 -1
- package/dist/workspaces/self-serve-creation.d.ts +38 -0
- package/dist/workspaces/self-serve-creation.js +106 -0
- package/dist/workspaces/self-serve-creation.js.map +1 -0
- package/dist/workspaces/workspace-glance.d.ts +3 -0
- package/dist/workspaces/workspace-glance.js +93 -0
- package/dist/workspaces/workspace-glance.js.map +1 -0
- package/dist/workspaces/workspace-name.d.ts +2 -0
- package/dist/workspaces/workspace-name.js +14 -0
- package/dist/workspaces/workspace-name.js.map +1 -0
- package/dist/workspaces/workspace-overview.d.ts +41 -0
- package/dist/workspaces/workspace-overview.js +84 -0
- package/dist/workspaces/workspace-overview.js.map +1 -0
- package/dist/workspaces/workspace-owner.d.ts +7 -0
- package/dist/workspaces/workspace-owner.js +14 -0
- package/dist/workspaces/workspace-owner.js.map +1 -0
- package/frontend-vue/app/build/PayInvoiceDialog.vue +40 -0
- package/frontend-vue/app/build/PayInvoicePanel.vue +203 -0
- package/frontend-vue/app/build/PlanChangeReview.vue +415 -0
- package/frontend-vue/app/build/PlanFeatureValueInput.vue +143 -0
- package/frontend-vue/app/build/PlanPermissionPicker.vue +246 -0
- package/frontend-vue/app/build/WorkspaceSwitcherRow.vue +116 -0
- package/frontend-vue/app/build/components/CreditNoteInvoiceSummary.vue +82 -0
- package/frontend-vue/app/build/components/FormFieldRow.vue +97 -0
- package/frontend-vue/app/build/components/FormRows.vue +26 -0
- package/frontend-vue/app/build/components/RequiredLegend.vue +7 -0
- package/frontend-vue/app/build/composables/useCreditNoteDraft.ts +142 -0
- package/frontend-vue/app/build/composables/useCreditNoteTexts.ts +123 -0
- package/frontend-vue/app/build/composables/useLiveFormValues.ts +49 -0
- package/frontend-vue/app/build/day-formats.ts +17 -0
- package/frontend-vue/app/build/highlight.ts +28 -0
- package/frontend-vue/app/build/plan-catalog.ts +161 -0
- package/frontend-vue/app/build/plan-change-heading.ts +81 -0
- package/frontend-vue/app/build/plan-permissions.ts +92 -0
- package/frontend-vue/app/build/plan-retire.ts +83 -0
- package/frontend-vue/app/build/public/AccessTimeline.vue +68 -0
- package/frontend-vue/app/build/public/LegalAcceptance.vue +51 -0
- package/frontend-vue/app/build/public/OtherWorkspaces.vue +88 -0
- package/frontend-vue/app/build/public/PricingComparison.vue +227 -0
- package/frontend-vue/app/build/public/PricingFaq.vue +76 -0
- package/frontend-vue/app/build/public/PublicStage.vue +72 -0
- package/frontend-vue/app/build/public/RegistrationCardField.vue +71 -0
- package/frontend-vue/app/build/public/RegistrationPlanCard.vue +122 -0
- package/frontend-vue/app/build/public/access.ts +118 -0
- package/frontend-vue/app/build/public/chosen-plan.ts +36 -0
- package/frontend-vue/app/build/public/legal.ts +99 -0
- package/frontend-vue/app/build/public/pricing.ts +175 -0
- package/frontend-vue/app/build/public/routes.ts +122 -0
- package/frontend-vue/app/build/public/usePublicFetch.ts +44 -0
- package/frontend-vue/app/build/public/usePublicPlanFormat.ts +52 -0
- package/frontend-vue/app/build/segments/tree.ts +137 -0
- package/frontend-vue/app/build/segments/types.ts +119 -0
- package/frontend-vue/app/build/segments/useSegmentCatalog.ts +58 -0
- package/frontend-vue/app/build/segments/useSegmentDraft.ts +33 -0
- package/frontend-vue/app/build/segments/useSegmentPreview.ts +78 -0
- package/frontend-vue/app/build/segments/useSegmentSentence.ts +60 -0
- package/frontend-vue/app/build/segments/useSegmentWords.ts +204 -0
- package/frontend-vue/app/build/useWorkspaceName.ts +14 -0
- package/frontend-vue/app/build/users/useUserDetail.ts +82 -0
- package/frontend-vue/app/build/workspace-detail/ComplimentaryDialog.vue +219 -0
- package/frontend-vue/app/build/workspace-detail/CreditDialog.vue +243 -0
- package/frontend-vue/app/build/workspace-detail/UpgradeDialog.vue +258 -0
- package/frontend-vue/app/build/workspace-detail/WorkspaceActionDialogs.vue +82 -0
- package/frontend-vue/app/build/workspace-detail/planPrice.ts +26 -0
- package/frontend-vue/app/build/workspace-detail/types.ts +138 -0
- package/frontend-vue/app/build/workspace-detail/useWorkspaceActions.ts +177 -0
- package/frontend-vue/app/build/workspace-detail/useWorkspaceOverview.ts +44 -0
- package/frontend-vue/app/build/workspace-paths.ts +8 -0
- package/frontend-vue/app/components/BillingIdentityFields.vue +294 -161
- package/frontend-vue/app/components/CustomerPortalButton.vue +80 -32
- package/frontend-vue/app/components/DataExport.vue +250 -260
- package/frontend-vue/app/components/DataExportHistory.vue +246 -0
- package/frontend-vue/app/components/DunningTimeline.vue +120 -0
- package/frontend-vue/app/components/IssueCreditNoteModal.vue +318 -116
- package/frontend-vue/app/components/LegalDocumentRelease.vue +64 -0
- package/frontend-vue/app/components/LegalLayout.vue +284 -46
- package/frontend-vue/app/components/MigrationStripeCheck.vue +133 -0
- package/frontend-vue/app/components/PastDueAlert.vue +186 -78
- package/frontend-vue/app/components/PastDueBanner.vue +96 -67
- package/frontend-vue/app/components/PayInvoiceModal.vue +57 -0
- package/frontend-vue/app/components/PaymentMethodCard.vue +159 -163
- package/frontend-vue/app/components/PendingCheckoutModal.vue +61 -61
- package/frontend-vue/app/components/PlanAccessEditor.vue +410 -0
- package/frontend-vue/app/components/PlanCard.vue +358 -261
- package/frontend-vue/app/components/PlanCardPublic.vue +123 -51
- package/frontend-vue/app/components/PlanComparisonModal.vue +373 -310
- package/frontend-vue/app/components/PlanEditorPreview.vue +374 -0
- package/frontend-vue/app/components/PlanLimitInput.vue +92 -0
- package/frontend-vue/app/components/PlanTaxSync.vue +118 -0
- package/frontend-vue/app/components/PlanUpgradeModal.vue +265 -156
- package/frontend-vue/app/components/PlatformNotes.vue +215 -255
- package/frontend-vue/app/components/Pricing.vue +236 -0
- package/frontend-vue/app/components/PublicNavBar.vue +70 -0
- package/frontend-vue/app/components/RefundButton.vue +264 -113
- package/frontend-vue/app/components/RefundExample.vue +86 -0
- package/frontend-vue/app/components/Register.vue +217 -121
- package/frontend-vue/app/components/RegistrationClosed.vue +30 -13
- package/frontend-vue/app/components/RetirePlanModal.vue +829 -0
- package/frontend-vue/app/components/SeatQuotaBanner.vue +240 -90
- package/frontend-vue/app/components/SegmentConditionRow.vue +171 -0
- package/frontend-vue/app/components/SegmentConditionsBuilder.vue +89 -162
- package/frontend-vue/app/components/SegmentConditionsGroup.vue +273 -463
- package/frontend-vue/app/components/SegmentLivePreview.vue +301 -0
- package/frontend-vue/app/components/SegmentLogicToggle.vue +24 -0
- package/frontend-vue/app/components/SegmentRulesText.vue +57 -0
- package/frontend-vue/app/components/SegmentValueInput.vue +165 -0
- package/frontend-vue/app/components/SegmentWords.vue +36 -0
- package/frontend-vue/app/components/TenantBillingForm.vue +142 -103
- package/frontend-vue/app/components/TenantPlanCard.vue +635 -281
- package/frontend-vue/app/components/TrialEndingBanner.vue +76 -0
- package/frontend-vue/app/components/UserPlatformRoleCard.vue +102 -0
- package/frontend-vue/app/components/UserSegmentMatches.vue +123 -0
- package/frontend-vue/app/components/UserSummaryCard.vue +107 -158
- package/frontend-vue/app/components/WorkspaceAdminCreateModal.vue +354 -177
- package/frontend-vue/app/components/WorkspaceCreateModal.vue +372 -252
- package/frontend-vue/app/components/WorkspaceDangerZone.vue +178 -126
- package/frontend-vue/app/components/WorkspaceDetailHeader.vue +262 -19
- package/frontend-vue/app/components/WorkspaceInvitationLink.vue +108 -86
- package/frontend-vue/app/components/WorkspaceOperatorActions.vue +105 -330
- package/frontend-vue/app/components/WorkspaceSuspendButton.vue +34 -158
- package/frontend-vue/app/components/WorkspaceSuspended.vue +390 -149
- package/frontend-vue/app/components/WorkspaceSwitcherWidget.vue +145 -161
- package/frontend-vue/app/composables/useBillingIdentity.ts +97 -95
- package/frontend-vue/app/composables/useBillingStatus.ts +56 -24
- package/frontend-vue/app/composables/useCurrentWorkspace.ts +15 -30
- package/frontend-vue/app/composables/useDaysLeft.ts +20 -0
- package/frontend-vue/app/composables/useExportHistory.ts +209 -120
- package/frontend-vue/app/composables/useInvitationLink.ts +39 -53
- package/frontend-vue/app/composables/useMoneyFormat.ts +64 -33
- package/frontend-vue/app/composables/useMyWorkspaces.ts +41 -32
- package/frontend-vue/app/composables/useNextInvoice.ts +20 -0
- package/frontend-vue/app/composables/usePayInvoice.ts +52 -0
- package/frontend-vue/app/composables/usePendingCheckout.ts +71 -67
- package/frontend-vue/app/composables/usePlanCatalog.ts +16 -0
- package/frontend-vue/app/composables/usePlanChangeReview.ts +115 -0
- package/frontend-vue/app/composables/usePlanComparison.ts +17 -8
- package/frontend-vue/app/composables/usePlanDowngrade.ts +25 -23
- package/frontend-vue/app/composables/usePlanFeatureFormat.ts +238 -202
- package/frontend-vue/app/composables/usePlanPriceLabel.ts +28 -0
- package/frontend-vue/app/composables/useSaasRegistration.ts +516 -301
- package/frontend-vue/app/composables/useSaasStatus.ts +81 -0
- package/frontend-vue/app/composables/useSeatQuota.ts +27 -17
- package/frontend-vue/app/composables/useServerConfirm.ts +44 -0
- package/frontend-vue/app/composables/useStripePaymentElement.ts +3 -5
- package/frontend-vue/app/composables/useTenantPlan.ts +235 -99
- package/frontend-vue/app/composables/useUpgradeAuthentication.ts +37 -0
- package/frontend-vue/app/composables/useWorkspaceFinalization.ts +4 -0
- package/frontend-vue/app/composables/useWorkspaceOverview.ts +58 -0
- package/frontend-vue/app/composables/useWorkspaceRenamed.ts +33 -0
- package/frontend-vue/app/custom-pages/auth/no-workspace.vue +391 -312
- package/frontend-vue/app/plugins/auth-links.ts +38 -17
- package/frontend-vue/app/plugins/billing-data-types.ts +111 -58
- package/frontend-vue/app/plugins/footer-links.ts +13 -33
- package/frontend-vue/app/plugins/segment-conditions-data-type.ts +45 -0
- package/frontend-vue/app/plugins/sidebar-widgets.ts +13 -10
- package/frontend-vue/app/types/runtime-config.ts +9 -4
- package/frontend-vue/dms.frontend.build.ts +7 -0
- package/frontend-vue/dms.frontend.ts +6 -13
- package/frontend-vue/i18n/locales/saas-en-GB.json +499 -1380
- package/frontend-vue/i18n/locales/saas-fr-FR.json +499 -1380
- package/frontend-vue/i18n/locales/saas-operator-billing-en-GB.json +282 -0
- package/frontend-vue/i18n/locales/saas-operator-billing-fr-FR.json +282 -0
- package/frontend-vue/i18n/locales/saas-operator-catalog-en-GB.json +597 -0
- package/frontend-vue/i18n/locales/saas-operator-catalog-fr-FR.json +597 -0
- package/frontend-vue/i18n/locales/saas-operator-users-en-GB.json +505 -0
- package/frontend-vue/i18n/locales/saas-operator-users-fr-FR.json +505 -0
- package/frontend-vue/i18n/locales/saas-operator-workspaces-en-GB.json +595 -0
- package/frontend-vue/i18n/locales/saas-operator-workspaces-fr-FR.json +595 -0
- package/frontend-vue/i18n/locales/saas-public-en-GB.json +304 -0
- package/frontend-vue/i18n/locales/saas-public-fr-FR.json +304 -0
- package/frontend-vue/i18n/locales/saas-tenant-billing-en-GB.json +434 -0
- package/frontend-vue/i18n/locales/saas-tenant-billing-fr-FR.json +434 -0
- package/frontend-vue/i18n/locales/saas-tenant-workspace-en-GB.json +252 -0
- package/frontend-vue/i18n/locales/saas-tenant-workspace-fr-FR.json +252 -0
- package/frontend-vue/package.json +1 -1
- package/package.json +10 -10
- package/frontend-vue/app/components/CardGrid.vue +0 -77
- package/frontend-vue/app/components/DeletePlanModal.vue +0 -223
- package/frontend-vue/app/components/FreeAccessBanner.vue +0 -70
- package/frontend-vue/app/components/PlanCardsDisplay.vue +0 -127
- package/frontend-vue/app/components/PlanInheritancePicker.vue +0 -329
- package/frontend-vue/app/components/RecentActivity.vue +0 -72
- package/frontend-vue/app/components/WorkspaceBillingInfo.vue +0 -68
- package/frontend-vue/app/components/WorkspaceCompAccessButton.vue +0 -198
- package/frontend-vue/app/components/WorkspaceIdentity.vue +0 -99
- package/frontend-vue/app/components/WorkspaceJoinButton.vue +0 -50
- package/frontend-vue/app/components/WorkspaceSummaryCard.vue +0 -185
- package/frontend-vue/app/composables/useDetailRefresh.ts +0 -17
- package/frontend-vue/app/composables/usePastDueBannerAction.ts +0 -20
- package/frontend-vue/app/composables/usePlanFeatureLabel.ts +0 -24
- package/frontend-vue/app/plugins/plan-cards-display.client.ts +0 -16
- package/frontend-vue/app/plugins/segment-conditions-data-type.client.ts +0 -122
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deletion-request.js","sourceRoot":"","sources":["../../src/workspaces/deletion-request.ts"],"names":[],"mappings":";;;AAMa,QAAA,wBAAwB,GAGjC,EAAE,mBAAmB,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -5,4 +5,4 @@ export interface WorkspaceDeletionResult {
|
|
|
5
5
|
}
|
|
6
6
|
export declare function getWorkspaceDeletionOperationId(tenantId: string, subscription: Pick<TenantSubscription, "_id" | "deletionStartedAt">): string;
|
|
7
7
|
export declare function resolveDataRetentionDays(): Promise<number>;
|
|
8
|
-
export declare function requestWorkspaceDeletion(tenantId: string): Promise<WorkspaceDeletionResult>;
|
|
8
|
+
export declare function requestWorkspaceDeletion(tenantId: string, ownerId: string): Promise<WorkspaceDeletionResult>;
|
|
@@ -7,10 +7,13 @@ const node_crypto_1 = require("node:crypto");
|
|
|
7
7
|
const interface_api_util_1 = require("@antelopejs/interface-api-util");
|
|
8
8
|
const logging_1 = require("@antelopejs/interface-core/logging");
|
|
9
9
|
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
10
|
+
const db_1 = require("@antelopejs/interface-dms/db");
|
|
10
11
|
const billing_state_1 = require("../billing-state");
|
|
11
|
-
const
|
|
12
|
+
const invitations_1 = require("./invitations");
|
|
13
|
+
const db_2 = require("../db");
|
|
12
14
|
const notifications_1 = require("../notifications");
|
|
13
15
|
const stripe_1 = require("../stripe");
|
|
16
|
+
const billing_settings_store_1 = require("../operator-billing/billing-settings-store");
|
|
14
17
|
const HTTP_NOT_FOUND = 404;
|
|
15
18
|
const HTTP_CONFLICT = 409;
|
|
16
19
|
const CANCELLED_STATUS = "cancelled";
|
|
@@ -28,11 +31,11 @@ function getWorkspaceDeletionOperationId(tenantId, subscription) {
|
|
|
28
31
|
]);
|
|
29
32
|
}
|
|
30
33
|
async function resolveDataRetentionDays() {
|
|
31
|
-
const settings = await (0,
|
|
32
|
-
return
|
|
34
|
+
const settings = await (0, billing_settings_store_1.loadBillingSettings)();
|
|
35
|
+
return settings.dataRetentionDaysAfterCancellation;
|
|
33
36
|
}
|
|
34
|
-
async function requestWorkspaceDeletion(tenantId) {
|
|
35
|
-
const subscriptionModel = (0, interface_database_decorators_1.GetModel)(
|
|
37
|
+
async function requestWorkspaceDeletion(tenantId, ownerId) {
|
|
38
|
+
const subscriptionModel = (0, interface_database_decorators_1.GetModel)(db_2.TenantSubscriptionModel, tenantId);
|
|
36
39
|
const subscription = await subscriptionModel.findOne();
|
|
37
40
|
(0, interface_api_util_1.assert)(subscription, HTTP_NOT_FOUND, "saas.errors.workspace.no_active_subscription");
|
|
38
41
|
(0, interface_api_util_1.assert)(subscription.status !== CANCELLED_STATUS, HTTP_CONFLICT, "saas.errors.workspace.is_cancelled");
|
|
@@ -46,9 +49,12 @@ async function requestWorkspaceDeletion(tenantId) {
|
|
|
46
49
|
if (subscription.stripeSubscriptionId) {
|
|
47
50
|
await (0, stripe_1.getStripeClient)().subscriptions.cancel(subscription.stripeSubscriptionId, undefined, { idempotencyKey: `workspace-delete:${operationId}` });
|
|
48
51
|
}
|
|
52
|
+
const now = new Date();
|
|
49
53
|
await subscriptionModel.completeTransition(subscription._id, operationId, {
|
|
50
54
|
status: CANCELLED_STATUS,
|
|
51
|
-
|
|
55
|
+
deletionRequestedAt: now,
|
|
56
|
+
deletionRequestedBy: ownerId,
|
|
57
|
+
updatedAt: now,
|
|
52
58
|
});
|
|
53
59
|
return {
|
|
54
60
|
status: CANCELLED_STATUS,
|
|
@@ -57,12 +63,18 @@ async function requestWorkspaceDeletion(tenantId) {
|
|
|
57
63
|
}
|
|
58
64
|
async function runAfterCancellation(tenantId) {
|
|
59
65
|
await bestEffort(tenantId, "recompute billing state", () => (0, billing_state_1.recomputeTenantBillingState)(tenantId));
|
|
66
|
+
await bestEffort(tenantId, "cancel pending invitations", () => cancelPendingInvitations(tenantId));
|
|
60
67
|
await bestEffort(tenantId, "notify owners", () => (0, notifications_1.notifyTenantOwners)(tenantId, notifications_1.subscriptionCancelledSubject, {
|
|
61
68
|
icon: NOTIF_ICON,
|
|
62
69
|
title: NOTIF_TITLE,
|
|
63
70
|
description: NOTIF_DESC,
|
|
64
71
|
}));
|
|
65
|
-
return resolveDataRetentionDays().catch(() =>
|
|
72
|
+
return resolveDataRetentionDays().catch(() => db_2.DEFAULT_DATA_RETENTION_DAYS);
|
|
73
|
+
}
|
|
74
|
+
async function cancelPendingInvitations(tenantId) {
|
|
75
|
+
const invites = await (0, interface_database_decorators_1.GetModel)(db_1.UserInviteModel, tenantId).getAll();
|
|
76
|
+
for (const invite of invites)
|
|
77
|
+
await (0, invitations_1.cancelInvitation)(tenantId, invite);
|
|
66
78
|
}
|
|
67
79
|
async function bestEffort(tenantId, step, work) {
|
|
68
80
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deletion.js","sourceRoot":"","sources":["../../src/workspaces/deletion.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"deletion.js","sourceRoot":"","sources":["../../src/workspaces/deletion.ts"],"names":[],"mappings":";;AAiCA,0EAYC;AAED,4DAGC;AASD,4DAyCC;AApGD,6CAAyC;AACzC,uEAAwD;AACxD,gEAA6D;AAC7D,6FAAqE;AACrE,qDAA+D;AAC/D,oDAA+D;AAC/D,+CAAiD;AAEjD,8BAA6E;AAC7E,oDAG0B;AAC1B,sCAA4C;AAC5C,uFAAiF;AAEjF,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,aAAa,GAAG,GAAG,CAAC;AAE1B,MAAM,gBAAgB,GAA6B,WAAW,CAAC;AAE/D,MAAM,UAAU,GAAG,YAAY,CAAC;AAChC,MAA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C;AAED,KAAK,UAAU,UAAU,CACvB,QAAgB,EAChB,IAAY,EACZ,IAA4B;IAE5B,IAAI,CAAC;QACH,MAAM,IAAI,EAAE,CAAC;IACf,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,iBAAO,CAAC,KAAK,CACX,iCAAiC,IAAI,sBAAsB,QAAQ,EAAE,EACrE,KAAK,CACN,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ActivityFeedItem, KeyValueListItem, StatGroupItem } from "@antelopejs/interface-dms/base";
|
|
2
|
+
import type { UpcomingInvoicePreview } from "@antelopejs/interface-dms-saas/billing";
|
|
3
|
+
import type { PaymentMethodSummary } from "../billing-state/recovery";
|
|
4
|
+
import type { Invoice, TenantBillingInfo } from "../db";
|
|
5
|
+
import type { WorkspaceOperatorView } from "./operator-view";
|
|
6
|
+
export interface WorkspaceFactsInputs {
|
|
7
|
+
view: WorkspaceOperatorView;
|
|
8
|
+
preview: UpcomingInvoicePreview | null;
|
|
9
|
+
card: PaymentMethodSummary | null;
|
|
10
|
+
invoices: Invoice[];
|
|
11
|
+
}
|
|
12
|
+
export declare function workspaceFacts(inputs: WorkspaceFactsInputs): StatGroupItem[];
|
|
13
|
+
export declare function billingInfoItems(info: TenantBillingInfo | undefined): KeyValueListItem[];
|
|
14
|
+
export declare function upcomingTimelineItems(view: WorkspaceOperatorView, preview: UpcomingInvoicePreview | null): ActivityFeedItem[];
|
|
15
|
+
export declare function isInvoiceDocument(document: Invoice): boolean;
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.workspaceFacts = workspaceFacts;
|
|
4
|
+
exports.billingInfoItems = billingInfoItems;
|
|
5
|
+
exports.upcomingTimelineItems = upcomingTimelineItems;
|
|
6
|
+
exports.isInvoiceDocument = isInvoiceDocument;
|
|
7
|
+
const composed_text_1 = require("../i18n/composed-text");
|
|
8
|
+
const directory_summary_1 = require("../metrics/directory-summary");
|
|
9
|
+
const dashboard_links_1 = require("../stripe/dashboard-links");
|
|
10
|
+
const db_1 = require("../db");
|
|
11
|
+
const D = "saas.workspace_detail";
|
|
12
|
+
const PAID_STATUS = "paid";
|
|
13
|
+
const INVOICE_DOCUMENT = "invoice";
|
|
14
|
+
const NO_VALUE = "—";
|
|
15
|
+
function priceTimesSeats(view) {
|
|
16
|
+
const { directory } = view;
|
|
17
|
+
const price = (0, composed_text_1.moneyParam)(directory.planUnitAmountMinor ?? 0, directory.currency ?? "");
|
|
18
|
+
const interval = (0, composed_text_1.composed)(`saas.workspaces.interval.${directory.planInterval ?? "month"}`);
|
|
19
|
+
return directory.planBillingMode === "seat"
|
|
20
|
+
? (0, composed_text_1.composed)(`${D}.facts.price_times_seats`, {
|
|
21
|
+
price,
|
|
22
|
+
seats: directory.seats,
|
|
23
|
+
interval,
|
|
24
|
+
})
|
|
25
|
+
: (0, composed_text_1.composed)(`${D}.facts.flat_price`, { price, interval });
|
|
26
|
+
}
|
|
27
|
+
function mrrDetail(view) {
|
|
28
|
+
const { directory, billingState } = view;
|
|
29
|
+
if (!directory.planName)
|
|
30
|
+
return (0, composed_text_1.composed)(`${D}.facts.no_plan`);
|
|
31
|
+
if (directory.isComplimentary)
|
|
32
|
+
return (0, composed_text_1.composed)(`${D}.facts.complimentary`);
|
|
33
|
+
if (billingState === "trialing") {
|
|
34
|
+
const then = (0, directory_summary_1.monthlyAmountAfterTrial)(view.directory);
|
|
35
|
+
return (0, composed_text_1.composed)(`${D}.facts.trial_then`, {
|
|
36
|
+
amount: (0, composed_text_1.moneyParam)(then.amountMinor, then.currency),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
if (billingState === "suspended")
|
|
40
|
+
return (0, composed_text_1.composed)(`${D}.facts.billing_paused`);
|
|
41
|
+
return priceTimesSeats(view);
|
|
42
|
+
}
|
|
43
|
+
function mrrFact(view) {
|
|
44
|
+
const { directory } = view;
|
|
45
|
+
return {
|
|
46
|
+
id: "mrr",
|
|
47
|
+
icon: "i-ph-currency-circle-dollar",
|
|
48
|
+
eyebrow: `$${D}.facts.mrr`,
|
|
49
|
+
value: directory.currency
|
|
50
|
+
? (0, composed_text_1.valueText)((0, composed_text_1.moneyParam)(directory.mrrMinor, directory.currency))
|
|
51
|
+
: NO_VALUE,
|
|
52
|
+
detail: mrrDetail(view),
|
|
53
|
+
detailTone: view.billingState === "past_due" ? "error" : undefined,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function seatsFact(view) {
|
|
57
|
+
const maxMembers = view.plan?.maxMembers ?? db_1.PLAN_UNLIMITED;
|
|
58
|
+
const used = view.seats.occupied;
|
|
59
|
+
return {
|
|
60
|
+
id: "seats",
|
|
61
|
+
icon: "i-ph-users",
|
|
62
|
+
eyebrow: `$${D}.facts.seats`,
|
|
63
|
+
value: maxMembers === db_1.PLAN_UNLIMITED
|
|
64
|
+
? used
|
|
65
|
+
: (0, composed_text_1.composed)(`${D}.facts.seats_of`, { used, max: maxMembers }),
|
|
66
|
+
detail: (0, composed_text_1.composed)(`${D}.facts.pending_invitations`, {
|
|
67
|
+
count: (0, composed_text_1.countParam)(view.seats.pendingInvites),
|
|
68
|
+
}),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function nextInvoiceFact(preview) {
|
|
72
|
+
const base = {
|
|
73
|
+
id: "next_invoice",
|
|
74
|
+
icon: "i-ph-calendar-blank",
|
|
75
|
+
eyebrow: `$${D}.facts.next_invoice`,
|
|
76
|
+
};
|
|
77
|
+
if (preview?.status !== "available") {
|
|
78
|
+
const reason = preview?.status === "absent" ? "nothing_billed" : "preview_unavailable";
|
|
79
|
+
return { ...base, value: NO_VALUE, detail: `$${D}.facts.${reason}` };
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
...base,
|
|
83
|
+
value: (0, composed_text_1.valueText)((0, composed_text_1.dateParam)(preview.billingDate, "day")),
|
|
84
|
+
detail: (0, composed_text_1.composed)(`${D}.facts.next_invoice_total`, {
|
|
85
|
+
amount: (0, composed_text_1.moneyParam)(preview.totalMinorUnits, preview.currency),
|
|
86
|
+
}),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function stripeFact(view, card) {
|
|
90
|
+
const customerId = view.subscription?.stripeCustomerId;
|
|
91
|
+
const base = {
|
|
92
|
+
id: "stripe",
|
|
93
|
+
icon: "i-ph-stripe-logo",
|
|
94
|
+
eyebrow: `$${D}.facts.stripe_customer`,
|
|
95
|
+
};
|
|
96
|
+
if (!customerId)
|
|
97
|
+
return {
|
|
98
|
+
...base,
|
|
99
|
+
value: NO_VALUE,
|
|
100
|
+
detail: `$${D}.facts.no_stripe_customer`,
|
|
101
|
+
};
|
|
102
|
+
const open = (0, composed_text_1.composed)(`${D}.facts.open_in_stripe`);
|
|
103
|
+
return {
|
|
104
|
+
...base,
|
|
105
|
+
value: customerId,
|
|
106
|
+
detail: card
|
|
107
|
+
? (0, composed_text_1.dotList)([
|
|
108
|
+
open,
|
|
109
|
+
(0, composed_text_1.composed)(`${D}.facts.card`, { brand: card.brand, last4: card.last4 }),
|
|
110
|
+
])
|
|
111
|
+
: open,
|
|
112
|
+
to: (0, dashboard_links_1.stripeObjectUrl)("customers", customerId),
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
function lifetimeFact(invoices) {
|
|
116
|
+
const paid = invoices.filter((invoice) => invoice.status === PAID_STATUS && invoice.documentType !== "credit_note");
|
|
117
|
+
const currency = paid[0]?.currency ?? "";
|
|
118
|
+
const totalMinor = paid
|
|
119
|
+
.filter((invoice) => invoice.currency === currency)
|
|
120
|
+
.reduce((sum, invoice) => sum + (invoice.total || invoice.amount), 0);
|
|
121
|
+
const first = paid
|
|
122
|
+
.map((invoice) => new Date(invoice.issuedAt))
|
|
123
|
+
.sort((left, right) => left.getTime() - right.getTime())[0];
|
|
124
|
+
return {
|
|
125
|
+
id: "lifetime",
|
|
126
|
+
icon: "i-ph-chart-line-up",
|
|
127
|
+
eyebrow: `$${D}.facts.lifetime_revenue`,
|
|
128
|
+
value: currency ? (0, composed_text_1.valueText)((0, composed_text_1.moneyParam)(totalMinor, currency)) : NO_VALUE,
|
|
129
|
+
detail: first
|
|
130
|
+
? (0, composed_text_1.composed)(`${D}.facts.lifetime_detail`, {
|
|
131
|
+
count: (0, composed_text_1.countParam)(paid.length),
|
|
132
|
+
since: (0, composed_text_1.dateParam)(first),
|
|
133
|
+
})
|
|
134
|
+
: `$${D}.facts.no_paid_invoice`,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
function workspaceFacts(inputs) {
|
|
138
|
+
return [
|
|
139
|
+
mrrFact(inputs.view),
|
|
140
|
+
seatsFact(inputs.view),
|
|
141
|
+
nextInvoiceFact(inputs.preview),
|
|
142
|
+
stripeFact(inputs.view, inputs.card),
|
|
143
|
+
lifetimeFact(inputs.invoices.filter((invoice) => invoice.documentType !== "credit_note")),
|
|
144
|
+
];
|
|
145
|
+
}
|
|
146
|
+
function addressLine(info) {
|
|
147
|
+
const address = info.address;
|
|
148
|
+
if (!address)
|
|
149
|
+
return null;
|
|
150
|
+
const parts = [
|
|
151
|
+
address.line1,
|
|
152
|
+
address.line2,
|
|
153
|
+
[address.postalCode, address.city].filter(Boolean).join(" "),
|
|
154
|
+
address.country,
|
|
155
|
+
].filter((part) => !!part);
|
|
156
|
+
return parts.length > 0 ? parts.join(", ") : null;
|
|
157
|
+
}
|
|
158
|
+
function billingInfoItems(info) {
|
|
159
|
+
if (!info)
|
|
160
|
+
return [];
|
|
161
|
+
const rows = [
|
|
162
|
+
{
|
|
163
|
+
id: "customer_type",
|
|
164
|
+
label: `$${D}.billing.customer_type`,
|
|
165
|
+
value: info.customerType
|
|
166
|
+
? `$${D}.billing.customer_types.${info.customerType}`
|
|
167
|
+
: null,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: "company",
|
|
171
|
+
label: `$${D}.billing.company_name`,
|
|
172
|
+
value: info.companyName,
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
id: "vat",
|
|
176
|
+
label: `$${D}.billing.vat_number`,
|
|
177
|
+
value: info.vatNumber,
|
|
178
|
+
type: "mono",
|
|
179
|
+
detail: info.vatVerificationStatus
|
|
180
|
+
? `$${D}.billing.vat_status.${info.vatVerificationStatus}`
|
|
181
|
+
: undefined,
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
id: "email",
|
|
185
|
+
label: `$${D}.billing.billing_email`,
|
|
186
|
+
value: info.billingEmail,
|
|
187
|
+
},
|
|
188
|
+
{ id: "address", label: `$${D}.billing.address`, value: addressLine(info) },
|
|
189
|
+
];
|
|
190
|
+
return rows.filter((row) => row.value !== null && row.value !== undefined && row.value !== "");
|
|
191
|
+
}
|
|
192
|
+
function upcomingTimelineItems(view, preview) {
|
|
193
|
+
if (preview?.status === "available") {
|
|
194
|
+
return [
|
|
195
|
+
{
|
|
196
|
+
id: "next_invoice",
|
|
197
|
+
icon: "i-ph-calendar-blank",
|
|
198
|
+
tone: "primary",
|
|
199
|
+
title: `$${D}.timeline.next_invoice`,
|
|
200
|
+
params: {
|
|
201
|
+
amount: (0, composed_text_1.moneyParam)(preview.totalMinorUnits, preview.currency),
|
|
202
|
+
},
|
|
203
|
+
meta: [priceTimesSeats(view)],
|
|
204
|
+
date: preview.billingDate,
|
|
205
|
+
time: (0, composed_text_1.valueText)((0, composed_text_1.dateParam)(preview.billingDate, "day")),
|
|
206
|
+
},
|
|
207
|
+
];
|
|
208
|
+
}
|
|
209
|
+
const { renewalKind, renewsAt } = view.directory;
|
|
210
|
+
if (!renewalKind || !renewsAt || renewsAt.getTime() < Date.now())
|
|
211
|
+
return [];
|
|
212
|
+
return [
|
|
213
|
+
{
|
|
214
|
+
id: "milestone",
|
|
215
|
+
icon: "i-ph-flag",
|
|
216
|
+
tone: "info",
|
|
217
|
+
title: `$${D}.timeline.${renewalKind}`,
|
|
218
|
+
date: renewsAt.toISOString(),
|
|
219
|
+
time: (0, composed_text_1.valueText)((0, composed_text_1.dateParam)(renewsAt, "day")),
|
|
220
|
+
},
|
|
221
|
+
];
|
|
222
|
+
}
|
|
223
|
+
function isInvoiceDocument(document) {
|
|
224
|
+
return document.documentType === INVOICE_DOCUMENT;
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=detail-items.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detail-items.js","sourceRoot":"","sources":["../../src/workspaces/detail-items.ts"],"names":[],"mappings":";;AAmLA,wCAYC;AAeD,4CAoCC;AAGD,sDAiCC;AAGD,8CAEC;AAlRD,yDAO+B;AAC/B,oEAAuE;AACvE,+DAA4D;AAE5D,8BAAuC;AAUvC,MAAM,CAAC,GAAG,uBAAuB,CAAC;AAClC,MAAM,WAAW,GAAG,MAAM,CAAC;AAC3B,MAAM,gBAAgB,GAAG,SAAS,CAAC;AACnC,MAAM,QAAQ,GAAG,GAAG,CAAC;AAErB,SAAS,eAAe,CAAC,IAA2B;IAClD,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IAC3B,MAAM,KAAK,GAAG,IAAA,0BAAU,EACtB,SAAS,CAAC,mBAAmB,IAAI,CAAC,EAClC,SAAS,CAAC,QAAQ,IAAI,EAAE,CACzB,CAAC;IACF,MAAM,QAAQ,GAAG,IAAA,wBAAQ,EACvB,4BAA4B,SAAS,CAAC,YAAY,IAAI,OAAO,EAAE,CAChE,CAAC;IACF,OAAO,SAAS,CAAC,eAAe,KAAK,MAAM;QACzC,CAAC,CAAC,IAAA,wBAAQ,EAAC,GAAG,CAAC,0BAA0B,EAAE;YACvC,KAAK;YACL,KAAK,EAAE,SAAS,CAAC,KAAK;YACtB,QAAQ;SACT,CAAC;QACJ,CAAC,CAAC,IAAA,wBAAQ,EAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;AAC7D,CAAC;AAGD,SAAS,SAA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AM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC;IACjD,IAAI,CAAC,WAAW,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE;QAAE,OAAO,EAAE,CAAC;IAC5E,OAAO;QACL;YACE,EAAE,EAAE,WAAW;YACf,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,IAAI,CAAC,aAAa,WAAW,EAAE;YACtC,IAAI,EAAE,QAAQ,CAAC,WAAW,EAAE;YAC5B,IAAI,EAAE,IAAA,yBAAS,EAAC,IAAA,yBAAS,EAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;SAC5C;KACF,CAAC;AACJ,CAAC;AAGD,SAAgB,iBAAiB,CAAC,QAAiB;IACjD,OAAO,QAAQ,CAAC,YAAY,KAAK,gBAAgB,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TenantSubscription } from "../db";
|
|
2
|
+
export declare function awaitsFirstPayment(subscription: TenantSubscription | null | undefined): boolean;
|
|
3
|
+
export declare function canStartFirstPaidSubscription(subscription: TenantSubscription | null | undefined, now?: Date): boolean;
|
|
4
|
+
export declare function canResubscribe(subscription: TenantSubscription | null | undefined): boolean;
|
|
5
|
+
export declare function liveStripeSubscriptionId(subscription: TenantSubscription | null | undefined): string | null;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.awaitsFirstPayment = awaitsFirstPayment;
|
|
4
|
+
exports.canStartFirstPaidSubscription = canStartFirstPaidSubscription;
|
|
5
|
+
exports.canResubscribe = canResubscribe;
|
|
6
|
+
exports.liveStripeSubscriptionId = liveStripeSubscriptionId;
|
|
7
|
+
const complimentary_1 = require("./complimentary");
|
|
8
|
+
const PENDING_PAYMENT_STATUS = "pending_payment";
|
|
9
|
+
function awaitsFirstPayment(subscription) {
|
|
10
|
+
return (subscription?.status === PENDING_PAYMENT_STATUS &&
|
|
11
|
+
!subscription.stripeSubscriptionId &&
|
|
12
|
+
!subscription.isComplimentary &&
|
|
13
|
+
!subscription.deletionStartedAt);
|
|
14
|
+
}
|
|
15
|
+
function canStartFirstPaidSubscription(subscription, now = new Date()) {
|
|
16
|
+
return ((0, complimentary_1.canRecoverComplimentarySubscription)(subscription, now) ||
|
|
17
|
+
awaitsFirstPayment(subscription));
|
|
18
|
+
}
|
|
19
|
+
const CANCELLED_STATUS = "cancelled";
|
|
20
|
+
function canResubscribe(subscription) {
|
|
21
|
+
return (subscription?.status === CANCELLED_STATUS && !subscription.deletionStartedAt);
|
|
22
|
+
}
|
|
23
|
+
function liveStripeSubscriptionId(subscription) {
|
|
24
|
+
if (subscription?.status === CANCELLED_STATUS)
|
|
25
|
+
return null;
|
|
26
|
+
return subscription?.stripeSubscriptionId ?? null;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=first-payment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"first-payment.js","sourceRoot":"","sources":["../../src/workspaces/first-payment.ts"],"names":[],"mappings":";;AAUA,gDASC;AAOD,sEAQC;AASD,wCAMC;AAOD,4DAKC;AA5DD,mDAAsE;AAEtE,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AAOjD,SAAgB,kBAAkB,CAChC,YAAmD;IAEnD,OAAO,CACL,YAAY,EAAE,MAAM,KAAK,sBAAsB;QAC/C,CAAC,YAAY,CAAC,oBAAoB;QAClC,CAAC,YAAY,CAAC,eAAe;QAC7B,CAAC,YAAY,CAAC,iBAAiB,CAChC,CAAC;AACJ,CAAC;AAOD,SAAgB,6BAA6B,CAC3C,YAAmD,EACnD,GAAG,GAAG,IAAI,IAAI,EAAE;IAEhB,OAAO,CACL,IAAA,mDAAmC,EAAC,YAAY,EAAE,GAAG,CAAC;QACtD,kBAAkB,CAAC,YAAY,CAAC,CACjC,CAAC;AACJ,CAAC;AAED,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAOrC,SAAgB,cAAc,CAC5B,YAAmD;IAEnD,OAAO,CACL,YAAY,EAAE,MAAM,KAAK,gBAAgB,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAC7E,CAAC;AACJ,CAAC;AAOD,SAAgB,wBAAwB,CACtC,YAAmD;IAEnD,IAAI,YAAY,EAAE,MAAM,KAAK,gBAAgB;QAAE,OAAO,IAAI,CAAC;IAC3D,OAAO,YAAY,EAAE,oBAAoB,IAAI,IAAI,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function resolveFreeWorkspacesPerCard(): Promise<number>;
|
|
2
|
+
export declare function isFreePerCardPolicyActive(limit: number): boolean;
|
|
3
|
+
export declare function listFreeWorkspacesBackedByCard(fingerprint: string): Promise<string[]>;
|
|
4
|
+
export declare function cardMayBackFreeWorkspace(fingerprint: string, limit: number): Promise<boolean>;
|
|
5
|
+
export declare function assertCardMayBackFreeWorkspace(fingerprint: string, limit: number): Promise<void>;
|
|
6
|
+
export declare function withCardHold<T>(fingerprint: string | null, work: () => Promise<T>): Promise<T>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveFreeWorkspacesPerCard = resolveFreeWorkspacesPerCard;
|
|
4
|
+
exports.isFreePerCardPolicyActive = isFreePerCardPolicyActive;
|
|
5
|
+
exports.listFreeWorkspacesBackedByCard = listFreeWorkspacesBackedByCard;
|
|
6
|
+
exports.cardMayBackFreeWorkspace = cardMayBackFreeWorkspace;
|
|
7
|
+
exports.assertCardMayBackFreeWorkspace = assertCardMayBackFreeWorkspace;
|
|
8
|
+
exports.withCardHold = withCardHold;
|
|
9
|
+
const interface_api_util_1 = require("@antelopejs/interface-api-util");
|
|
10
|
+
const interface_database_1 = require("@antelopejs/interface-database");
|
|
11
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
12
|
+
const db_1 = require("../db");
|
|
13
|
+
const utils_1 = require("../utils");
|
|
14
|
+
const free_plan_1 = require("./free-plan");
|
|
15
|
+
const billing_settings_store_1 = require("../operator-billing/billing-settings-store");
|
|
16
|
+
const HTTP_CONFLICT = 409;
|
|
17
|
+
const POLICY_DISABLED_LIMIT = 0;
|
|
18
|
+
async function resolveFreeWorkspacesPerCard() {
|
|
19
|
+
const settings = await (0, billing_settings_store_1.loadBillingSettings)();
|
|
20
|
+
return settings.maxFreeWorkspacesPerCard;
|
|
21
|
+
}
|
|
22
|
+
function isFreePerCardPolicyActive(limit) {
|
|
23
|
+
return limit > POLICY_DISABLED_LIMIT;
|
|
24
|
+
}
|
|
25
|
+
async function isOnFreePlan(subscription) {
|
|
26
|
+
if (!subscription.planId || subscription.isComplimentary)
|
|
27
|
+
return false;
|
|
28
|
+
const plan = await (0, interface_database_decorators_1.GetModel)(db_1.PlanModel).get(subscription.planId);
|
|
29
|
+
return !!plan && (0, free_plan_1.isFreePlan)(plan);
|
|
30
|
+
}
|
|
31
|
+
async function listFreeWorkspacesBackedByCard(fingerprint) {
|
|
32
|
+
const subscriptions = await (0, interface_database_decorators_1.GetModel)(db_1.TenantSubscriptionModel, interface_database_1.CROSS_INSTANCE).findByCardFingerprint(fingerprint);
|
|
33
|
+
const verdicts = await Promise.all(subscriptions.map(isOnFreePlan));
|
|
34
|
+
return subscriptions
|
|
35
|
+
.filter((_, index) => verdicts[index])
|
|
36
|
+
.map((subscription) => (0, utils_1.getRowInstance)(subscription));
|
|
37
|
+
}
|
|
38
|
+
async function cardMayBackFreeWorkspace(fingerprint, limit) {
|
|
39
|
+
const backed = await listFreeWorkspacesBackedByCard(fingerprint);
|
|
40
|
+
return backed.length < limit;
|
|
41
|
+
}
|
|
42
|
+
async function assertCardMayBackFreeWorkspace(fingerprint, limit) {
|
|
43
|
+
(0, interface_api_util_1.assert)(await cardMayBackFreeWorkspace(fingerprint, limit), HTTP_CONFLICT, "saas.errors.workspace.free_card_limit_reached");
|
|
44
|
+
}
|
|
45
|
+
const cardsInFlight = new Set();
|
|
46
|
+
async function withCardHold(fingerprint, work) {
|
|
47
|
+
if (!fingerprint)
|
|
48
|
+
return work();
|
|
49
|
+
(0, interface_api_util_1.assert)(!cardsInFlight.has(fingerprint), HTTP_CONFLICT, "saas.errors.workspace.creation_in_progress");
|
|
50
|
+
cardsInFlight.add(fingerprint);
|
|
51
|
+
try {
|
|
52
|
+
return await work();
|
|
53
|
+
}
|
|
54
|
+
finally {
|
|
55
|
+
cardsInFlight.delete(fingerprint);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=free-workspaces-per-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"free-workspaces-per-card.js","sourceRoot":"","sources":["../../src/workspaces/free-workspaces-per-card.ts"],"names":[],"mappings":";;AAmBA,oEAGC;AAGD,8DAEC;AAgBD,wEAWC;AAGD,4DAMC;AAQD,wEASC;AAYD,oCAgBC;AA5GD,uEAAwD;AACxD,uEAAgE;AAChE,6FAAqE;AACrE,8BAIe;AACf,oCAA0C;AAC1C,2CAAyC;AACzC,uFAAiF;AAEjF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAMzB,KAAK,UAAU,4BAA4B;IAChD,MAAM,QAAQ,GAAG,MAAM,IAAA,4CAAmB,GAAE,CAAC;IAC7C,OAAO,QAAQ,CAAC,wBAAwB,CAAC;AAC3C,CAAC;AAGD,SAAgB,yBAAyB,CAAC,KAAa;IACrD,OAAO,KAAK,GAAG,qBAAqB,CAAC;AACvC,CAAC;AAED,KAAK,UAAU,YAAY,CACzB,YAAgC;IAEhC,IAAI,CAAC,YAAY,CAAC,MAAM,IAAI,YAAY,CAAC,eAAe;QAAE,OAAO,KAAK,CAAC;IACvE,MAAM,IAAI,GAAG,MAAM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A4C,CAC7C,CAAC;IACF,aAAa,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC/B,IAAI,CAAC;QACH,OAAO,MAAM,IAAI,EAAE,CAAC;IACtB,CAAC;YAAS,CAAC;QACT,aAAa,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACpC,CAAC;AACH,CAAC"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
export * from "./billing-profile";
|
|
2
|
+
export * from "./default-member-role";
|
|
2
3
|
export * from "./default-plan";
|
|
3
4
|
export * from "./deletion";
|
|
4
5
|
export * from "./free-plan";
|
|
6
|
+
export * from "./free-workspaces-per-card";
|
|
5
7
|
export * from "./invitations";
|
|
8
|
+
export * from "./my-workspaces";
|
|
6
9
|
export * from "./provisioning";
|
|
7
10
|
export * from "./registration-extras";
|
|
11
|
+
export * from "./self-serve-creation";
|
|
8
12
|
export * from "./suspension";
|
|
13
|
+
export * from "./workspace-name";
|
|
14
|
+
export * from "./workspace-glance";
|
|
15
|
+
export * from "./workspace-overview";
|
package/dist/workspaces/index.js
CHANGED
|
@@ -15,11 +15,18 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./billing-profile"), exports);
|
|
18
|
+
__exportStar(require("./default-member-role"), exports);
|
|
18
19
|
__exportStar(require("./default-plan"), exports);
|
|
19
20
|
__exportStar(require("./deletion"), exports);
|
|
20
21
|
__exportStar(require("./free-plan"), exports);
|
|
22
|
+
__exportStar(require("./free-workspaces-per-card"), exports);
|
|
21
23
|
__exportStar(require("./invitations"), exports);
|
|
24
|
+
__exportStar(require("./my-workspaces"), exports);
|
|
22
25
|
__exportStar(require("./provisioning"), exports);
|
|
23
26
|
__exportStar(require("./registration-extras"), exports);
|
|
27
|
+
__exportStar(require("./self-serve-creation"), exports);
|
|
24
28
|
__exportStar(require("./suspension"), exports);
|
|
29
|
+
__exportStar(require("./workspace-name"), exports);
|
|
30
|
+
__exportStar(require("./workspace-glance"), exports);
|
|
31
|
+
__exportStar(require("./workspace-overview"), exports);
|
|
25
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workspaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,iDAA+B;AAC/B,6CAA2B;AAC3B,8CAA4B;AAC5B,gDAA8B;AAC9B,iDAA+B;AAC/B,wDAAsC;AACtC,+CAA6B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workspaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,wDAAsC;AACtC,iDAA+B;AAC/B,6CAA2B;AAC3B,8CAA4B;AAC5B,6DAA2C;AAC3C,gDAA8B;AAC9B,kDAAgC;AAChC,iDAA+B;AAC/B,wDAAsC;AACtC,wDAAsC;AACtC,+CAA6B;AAC7B,mDAAiC;AACjC,qDAAmC;AACnC,uDAAqC"}
|
|
@@ -19,8 +19,9 @@ export declare function invitationStatusOf(invite: Pick<UserInvite, "expiresAt">
|
|
|
19
19
|
export declare function buildInvitationLink(invite: Pick<UserInvite, "email" | "token" | "firstname" | "lastname">): Promise<string>;
|
|
20
20
|
export declare function inviterNameOf(user: Pick<User, "name">): string | undefined;
|
|
21
21
|
export declare function deliverInvitationEmail(invite: DeliverableInvitation, sender?: InvitationSender): Promise<InvitationEmailDelivery>;
|
|
22
|
-
export declare function countPendingInvitations(tenantId: string, now?: Date): Promise<number>;
|
|
23
22
|
export declare function findPendingOwnerInvite(tenantId: string): Promise<UserInvite | undefined>;
|
|
24
23
|
export declare function resendInvitation(tenantId: string, inviteId: string, inviterName?: string): Promise<ReissuedInvitation>;
|
|
25
24
|
export declare function resolveInvitationLink(tenantId: string, inviteId: string): Promise<InvitationLink>;
|
|
25
|
+
export declare function revokeInvitation(tenantId: string, inviteId: string): Promise<UserInvite>;
|
|
26
|
+
export declare function cancelInvitation(tenantId: string, invite: UserInvite): Promise<void>;
|
|
26
27
|
export {};
|
|
@@ -4,10 +4,11 @@ exports.invitationStatusOf = invitationStatusOf;
|
|
|
4
4
|
exports.buildInvitationLink = buildInvitationLink;
|
|
5
5
|
exports.inviterNameOf = inviterNameOf;
|
|
6
6
|
exports.deliverInvitationEmail = deliverInvitationEmail;
|
|
7
|
-
exports.countPendingInvitations = countPendingInvitations;
|
|
8
7
|
exports.findPendingOwnerInvite = findPendingOwnerInvite;
|
|
9
8
|
exports.resendInvitation = resendInvitation;
|
|
10
9
|
exports.resolveInvitationLink = resolveInvitationLink;
|
|
10
|
+
exports.revokeInvitation = revokeInvitation;
|
|
11
|
+
exports.cancelInvitation = cancelInvitation;
|
|
11
12
|
const interface_api_util_1 = require("@antelopejs/interface-api-util");
|
|
12
13
|
const logging_1 = require("@antelopejs/interface-core/logging");
|
|
13
14
|
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
@@ -18,6 +19,7 @@ const invite_resolution_1 = require("@antelopejs/interface-dms/invite-resolution
|
|
|
18
19
|
const invites_1 = require("@antelopejs/interface-dms/invites");
|
|
19
20
|
const HTTP_NOT_FOUND = 404;
|
|
20
21
|
const SIGNUP_PATH = "/auth/signup";
|
|
22
|
+
const REVOKED_REASON = "cancelled";
|
|
21
23
|
function invitationStatusOf(invite, now = new Date()) {
|
|
22
24
|
return invite.expiresAt.getTime() > now.getTime() ? "pending" : "expired";
|
|
23
25
|
}
|
|
@@ -52,10 +54,6 @@ async function deliverInvitationEmail(invite, sender = {}) {
|
|
|
52
54
|
return "failed";
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
|
-
async function countPendingInvitations(tenantId, now = new Date()) {
|
|
56
|
-
const invites = await (0, interface_database_decorators_1.GetModel)(db_1.UserInviteModel, tenantId).getAll();
|
|
57
|
-
return invites.filter((invite) => invitationStatusOf(invite, now) === "pending").length;
|
|
58
|
-
}
|
|
59
57
|
async function findPendingOwnerInvite(tenantId) {
|
|
60
58
|
const invites = await (0, interface_database_decorators_1.GetModel)(db_1.UserInviteModel, tenantId).getAll();
|
|
61
59
|
return invites
|
|
@@ -78,7 +76,6 @@ async function renewInvite(tenantId, invite) {
|
|
|
78
76
|
language: invite.language,
|
|
79
77
|
roleIds: invite.roles_ids,
|
|
80
78
|
asTenantOwner: invite.asTenantOwner,
|
|
81
|
-
skipEmailValidation: invite.skipEmailValidation,
|
|
82
79
|
extensions: invite.extensions ?? undefined,
|
|
83
80
|
replacementReason: "resent",
|
|
84
81
|
});
|
|
@@ -109,4 +106,17 @@ async function resolveInvitationLink(tenantId, inviteId) {
|
|
|
109
106
|
expiresAt: invite.expiresAt,
|
|
110
107
|
};
|
|
111
108
|
}
|
|
109
|
+
async function revokeInvitation(tenantId, inviteId) {
|
|
110
|
+
const invite = await loadActionableInvite(tenantId, inviteId);
|
|
111
|
+
await cancelInvitation(tenantId, invite);
|
|
112
|
+
return invite;
|
|
113
|
+
}
|
|
114
|
+
async function cancelInvitation(tenantId, invite) {
|
|
115
|
+
const resolution = await (0, invite_resolution_1.decideInvite)({
|
|
116
|
+
tenantId,
|
|
117
|
+
invite,
|
|
118
|
+
reason: REVOKED_REASON,
|
|
119
|
+
});
|
|
120
|
+
await (0, invite_resolution_1.completeInviteResolution)(resolution);
|
|
121
|
+
}
|
|
112
122
|
//# sourceMappingURL=invitations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations.js","sourceRoot":"","sources":["../../src/workspaces/invitations.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"invitations.js","sourceRoot":"","sources":["../../src/workspaces/invitations.ts"],"names":[],"mappings":";;AAwDA,gDAKC;AAMD,kDAWC;AAGD,sCAEC;AAmBD,wDAmBC;AAGD,wDAOC;AA2CD,4CAcC;AAOD,sDAaC;AAMD,4CAOC;AASD,4CAUC;AAhPD,uEAAwD;AACxD,gEAA6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a,EAAE,CAAC;AACnC,CAAC;AAOM,KAAK,UAAU,qBAAqB,CACzC,QAAgB,EAChB,QAAgB;IAEhB,MAAM,MAAM,GAAG,MAAM,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC9D,MAAM,MAAM,GACV,kBAAkB,CAAC,MAAM,CAAC,KAAK,SAAS;QACtC,CAAC,CAAC,MAAM;QACR,CAAC,CAAC,MAAM,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC1C,OAAO;QACL,IAAI,EAAE,MAAM,mBAAmB,CAAC,MAAM,CAAC;QACvC,SAAS,EAAE,MAAM,CAAC,SAAS;KAC5B,CAAC;AACJ,CAAC;AAMM,KAAK,UAAU,gBAAgB,CACpC,QAAgB,EAChB,QAAgB;IAEhB,MAAM,MAAM,GAAG,MAAM,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC9D,MAAM,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACzC,OAAO,MAAM,CAAC;AAChB,CAAC;AASM,KAAK,UAAU,gBAAgB,CACpC,QAAgB,EAChB,MAAkB;IAElB,MAAM,UAAU,GAAG,MAAM,IAAA,gCAAY,EAAC;QACpC,QAAQ;QACR,MAAM;QACN,MAAM,EAAE,cAAc;KACvB,CAAC,CAAC;IACH,MAAM,IAAA,4CAAwB,EAAC,UAAU,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type BillingState } from "../db";
|
|
2
|
+
export interface MyWorkspaceRow {
|
|
3
|
+
_id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
planName: string | null;
|
|
6
|
+
status: BillingState;
|
|
7
|
+
isComplimentary: boolean;
|
|
8
|
+
membersCount: number;
|
|
9
|
+
ownerName: string | null;
|
|
10
|
+
isOwner: boolean;
|
|
11
|
+
isCurrent: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function listMyWorkspaces(userId: string, currentTenantId: string): Promise<MyWorkspaceRow[]>;
|