@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,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listMyWorkspaces = listMyWorkspaces;
|
|
4
|
+
const interface_database_1 = require("@antelopejs/interface-database");
|
|
5
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
6
|
+
const db_1 = require("@antelopejs/interface-dms/db");
|
|
7
|
+
const db_2 = require("@antelopejs/interface-dms/auth/db");
|
|
8
|
+
const billing_state_1 = require("../billing-state");
|
|
9
|
+
const db_3 = require("../db");
|
|
10
|
+
const CANCELLED_STATUS = "cancelled";
|
|
11
|
+
async function loadFacts(tenant) {
|
|
12
|
+
const [subscription, members] = await Promise.all([
|
|
13
|
+
(0, interface_database_decorators_1.GetModel)(db_3.TenantSubscriptionModel, tenant._id).findOne(),
|
|
14
|
+
(0, interface_database_decorators_1.GetModel)(db_1.TenantMemberModel, tenant._id).listAll(),
|
|
15
|
+
]);
|
|
16
|
+
return { tenant, subscription, members };
|
|
17
|
+
}
|
|
18
|
+
async function resolvePlanName(subscription) {
|
|
19
|
+
if (!subscription?.planId)
|
|
20
|
+
return null;
|
|
21
|
+
const plan = await (0, interface_database_decorators_1.GetModel)(db_3.PlanModel).get(subscription.planId);
|
|
22
|
+
return plan?.name ?? null;
|
|
23
|
+
}
|
|
24
|
+
async function resolveOwnerName(members) {
|
|
25
|
+
const owner = members.find((member) => member.isTenantOwner);
|
|
26
|
+
if (!owner)
|
|
27
|
+
return null;
|
|
28
|
+
const user = await (0, interface_database_decorators_1.GetModel)(db_2.UserModel).get(owner.userId);
|
|
29
|
+
return user?.name || user?.email || null;
|
|
30
|
+
}
|
|
31
|
+
async function toRow(facts, userId, currentTenantId) {
|
|
32
|
+
const { tenant, subscription, members } = facts;
|
|
33
|
+
const [planName, ownerName] = await Promise.all([
|
|
34
|
+
resolvePlanName(subscription),
|
|
35
|
+
resolveOwnerName(members),
|
|
36
|
+
]);
|
|
37
|
+
return {
|
|
38
|
+
_id: tenant._id,
|
|
39
|
+
name: tenant.name,
|
|
40
|
+
planName,
|
|
41
|
+
status: (0, billing_state_1.deriveBillingState)(subscription),
|
|
42
|
+
isComplimentary: !!subscription?.isComplimentary,
|
|
43
|
+
membersCount: members.length,
|
|
44
|
+
ownerName,
|
|
45
|
+
isOwner: members.some((member) => member.userId === userId && member.isTenantOwner),
|
|
46
|
+
isCurrent: tenant._id === currentTenantId,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function compareRows(a, b) {
|
|
50
|
+
if (a.isCurrent !== b.isCurrent)
|
|
51
|
+
return a.isCurrent ? -1 : 1;
|
|
52
|
+
return a.name.localeCompare(b.name);
|
|
53
|
+
}
|
|
54
|
+
function isListed(fact, currentTenantId) {
|
|
55
|
+
return (fact.subscription?.status !== CANCELLED_STATUS ||
|
|
56
|
+
fact.tenant._id === currentTenantId);
|
|
57
|
+
}
|
|
58
|
+
async function listMyWorkspaces(userId, currentTenantId) {
|
|
59
|
+
const memberships = await (0, interface_database_decorators_1.GetModel)(db_1.TenantMemberModel, interface_database_1.CROSS_INSTANCE).listByUserWithTenantIds(userId);
|
|
60
|
+
if (memberships.length === 0)
|
|
61
|
+
return [];
|
|
62
|
+
const tenants = await (0, interface_database_decorators_1.GetModel)(db_1.TenantModel).getMany(memberships.map((membership) => membership.tenantId));
|
|
63
|
+
const facts = await Promise.all(tenants.map(loadFacts));
|
|
64
|
+
const live = facts.filter((fact) => isListed(fact, currentTenantId));
|
|
65
|
+
const rows = await Promise.all(live.map((fact) => toRow(fact, userId, currentTenantId)));
|
|
66
|
+
return rows.sort(compareRows);
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=my-workspaces.js.map
|
|
@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e,CACpC,CAAC;AACJ,CAAC;AAGM,KAAK,UAAU,gBAAgB,CACpC,MAAc,EACd,eAAuB;IAEvB,MAAM,WAAW,GAAG,MAAM,IAAA,wCAAQ,EAChC,sBAAiB,EACjB,mCAAc,CACf,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAClC,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACxC,MAAM,OAAO,GAAG,MAAM,IAAA,wCAAQ,EAAC,gBAAW,CAAC,CAAC,OAAO,CACjD,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CACrD,CAAC;IACF,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;IACxD,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC;IACrE,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,GAAG,CAC5B,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC,CACzD,CAAC;IACF,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type InviteUserToTenantResult } from "@antelopejs/interface-dms/invites";
|
|
2
|
+
import { type User } from "@antelopejs/interface-dms/auth/db";
|
|
3
|
+
import { type Plan } from "../db";
|
|
4
|
+
declare const WORKSPACE_ACCESS_MODELS: readonly ["complimentary", "owner_pays"];
|
|
5
|
+
export type WorkspaceAccessModel = (typeof WORKSPACE_ACCESS_MODELS)[number];
|
|
6
|
+
export interface CreateWorkspaceBody {
|
|
7
|
+
name?: unknown;
|
|
8
|
+
planId?: unknown;
|
|
9
|
+
ownerEmail?: unknown;
|
|
10
|
+
access?: unknown;
|
|
11
|
+
freeUntil?: unknown;
|
|
12
|
+
}
|
|
13
|
+
export interface ValidatedWorkspaceInput {
|
|
14
|
+
name: string;
|
|
15
|
+
planId: string;
|
|
16
|
+
ownerEmail: string;
|
|
17
|
+
access: WorkspaceAccessModel;
|
|
18
|
+
freeUntil: Date | null;
|
|
19
|
+
}
|
|
20
|
+
export type OwnerLookup = {
|
|
21
|
+
kind: "existing";
|
|
22
|
+
name: string;
|
|
23
|
+
workspaces: number;
|
|
24
|
+
} | {
|
|
25
|
+
kind: "new";
|
|
26
|
+
invitationDays: number;
|
|
27
|
+
};
|
|
28
|
+
export interface CreatedWorkspace {
|
|
29
|
+
tenantId: string;
|
|
30
|
+
owner: InviteUserToTenantResult;
|
|
31
|
+
invitationEmail: OwnerInvitationEmailState;
|
|
32
|
+
access: WorkspaceAccessModel;
|
|
33
|
+
}
|
|
34
|
+
export type OwnerInvitationEmailState = "sending" | null;
|
|
35
|
+
export declare function validateWorkspaceInput(body: CreateWorkspaceBody): ValidatedWorkspaceInput;
|
|
36
|
+
export declare function loadPlanForAccess(input: ValidatedWorkspaceInput): Promise<Plan>;
|
|
37
|
+
export declare function lookUpOwner(email: string): Promise<OwnerLookup>;
|
|
38
|
+
export declare function createWorkspaceForOwner(input: ValidatedWorkspaceInput, operator: User): Promise<CreatedWorkspace>;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateWorkspaceInput = validateWorkspaceInput;
|
|
4
|
+
exports.loadPlanForAccess = loadPlanForAccess;
|
|
5
|
+
exports.lookUpOwner = lookUpOwner;
|
|
6
|
+
exports.createWorkspaceForOwner = createWorkspaceForOwner;
|
|
7
|
+
const interface_api_util_1 = require("@antelopejs/interface-api-util");
|
|
8
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
9
|
+
const interface_database_1 = require("@antelopejs/interface-database");
|
|
10
|
+
const db_1 = require("@antelopejs/interface-dms/db");
|
|
11
|
+
const invites_1 = require("@antelopejs/interface-dms/invites");
|
|
12
|
+
const db_2 = require("@antelopejs/interface-dms/auth/db");
|
|
13
|
+
const billing_state_1 = require("../billing-state");
|
|
14
|
+
const db_3 = require("../db");
|
|
15
|
+
const parse_future_date_1 = require("../utils/parse-future-date");
|
|
16
|
+
const owner_invitation_email_1 = require("./owner-invitation-email");
|
|
17
|
+
const default_member_role_1 = require("./default-member-role");
|
|
18
|
+
const HTTP_BAD_REQUEST = 400;
|
|
19
|
+
const WORKSPACE_ACCESS_MODELS = ["complimentary", "owner_pays"];
|
|
20
|
+
const SUBSCRIPTION_TERMS = {
|
|
21
|
+
complimentary: (input) => ({
|
|
22
|
+
status: "active",
|
|
23
|
+
isComplimentary: true,
|
|
24
|
+
freeUntil: input.freeUntil,
|
|
25
|
+
}),
|
|
26
|
+
owner_pays: () => ({
|
|
27
|
+
status: "pending_payment",
|
|
28
|
+
isComplimentary: false,
|
|
29
|
+
freeUntil: null,
|
|
30
|
+
}),
|
|
31
|
+
};
|
|
32
|
+
function asNonEmptyString(value) {
|
|
33
|
+
return typeof value === "string" && value.trim().length > 0
|
|
34
|
+
? value.trim()
|
|
35
|
+
: null;
|
|
36
|
+
}
|
|
37
|
+
function asAccessModel(value) {
|
|
38
|
+
return WORKSPACE_ACCESS_MODELS.find((model) => model === value) ?? null;
|
|
39
|
+
}
|
|
40
|
+
function validateWorkspaceInput(body) {
|
|
41
|
+
const name = asNonEmptyString(body.name);
|
|
42
|
+
const planId = asNonEmptyString(body.planId);
|
|
43
|
+
const ownerEmail = asNonEmptyString(body.ownerEmail);
|
|
44
|
+
const access = asAccessModel(body.access);
|
|
45
|
+
(0, interface_api_util_1.assert)(name, HTTP_BAD_REQUEST, "saas.errors.workspace_create.name");
|
|
46
|
+
(0, interface_api_util_1.assert)(planId, HTTP_BAD_REQUEST, "saas.errors.workspace_create.plan");
|
|
47
|
+
(0, interface_api_util_1.assert)(ownerEmail, HTTP_BAD_REQUEST, "saas.errors.workspace_create.owner_email");
|
|
48
|
+
(0, interface_api_util_1.assert)(access, HTTP_BAD_REQUEST, "saas.errors.workspace_create.access");
|
|
49
|
+
const freeUntil = access === "complimentary"
|
|
50
|
+
? (0, parse_future_date_1.parseFutureDate)(body.freeUntil, "saas.errors.workspace_create.free_until_past")
|
|
51
|
+
: null;
|
|
52
|
+
return { name, planId, ownerEmail, access, freeUntil };
|
|
53
|
+
}
|
|
54
|
+
async function loadPlanForAccess(input) {
|
|
55
|
+
const plan = await (0, interface_database_decorators_1.GetModel)(db_3.PlanModel).get(input.planId);
|
|
56
|
+
(0, interface_api_util_1.assert)(plan && !plan.isDeleted && plan.isActive, HTTP_BAD_REQUEST, "saas.errors.plan.not_available");
|
|
57
|
+
(0, interface_api_util_1.assert)(input.access !== "owner_pays" ||
|
|
58
|
+
(plan.price > 0 && !!plan.paymentProviderRefs?.stripePriceId), HTTP_BAD_REQUEST, "saas.errors.workspace_create.owner_pays_needs_paid_plan");
|
|
59
|
+
return plan;
|
|
60
|
+
}
|
|
61
|
+
async function lookUpOwner(email) {
|
|
62
|
+
const user = await (0, interface_database_decorators_1.GetModel)(db_2.UserModel).getByEmail(email);
|
|
63
|
+
if (!user)
|
|
64
|
+
return { kind: "new", invitationDays: invites_1.INVITE_EXPIRY_DAYS };
|
|
65
|
+
const memberships = await (0, interface_database_decorators_1.GetModel)(db_1.TenantMemberModel, interface_database_1.CROSS_INSTANCE).listByUserWithTenantIds(user._id);
|
|
66
|
+
return {
|
|
67
|
+
kind: "existing",
|
|
68
|
+
name: user.name || user.email,
|
|
69
|
+
workspaces: memberships.length,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
async function insertSubscription(tenantId, input, operator) {
|
|
73
|
+
const now = new Date();
|
|
74
|
+
await (0, interface_database_decorators_1.GetModel)(db_3.TenantSubscriptionModel, tenantId).insert([
|
|
75
|
+
{
|
|
76
|
+
...SUBSCRIPTION_TERMS[input.access](input),
|
|
77
|
+
planId: input.planId,
|
|
78
|
+
stripeCustomerId: null,
|
|
79
|
+
stripeSubscriptionId: null,
|
|
80
|
+
stripeCheckoutSessionId: null,
|
|
81
|
+
createdBy: operator._id,
|
|
82
|
+
paidUsageStartedAt: null,
|
|
83
|
+
paidUsagePeriods: [],
|
|
84
|
+
createdAt: now,
|
|
85
|
+
updatedAt: now,
|
|
86
|
+
},
|
|
87
|
+
]);
|
|
88
|
+
}
|
|
89
|
+
async function addOwner(tenantId, input, operator) {
|
|
90
|
+
return (0, invites_1.inviteUserToTenant)({
|
|
91
|
+
tenantId,
|
|
92
|
+
email: input.ownerEmail,
|
|
93
|
+
language: operator.language,
|
|
94
|
+
roleIds: [],
|
|
95
|
+
asTenantOwner: true,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function emailOwnerInvitation(tenantId, owner, input, operator) {
|
|
99
|
+
if (owner.kind !== "invited")
|
|
100
|
+
return null;
|
|
101
|
+
(0, owner_invitation_email_1.sendOwnerInvitationEmailInBackground)({
|
|
102
|
+
tenantId,
|
|
103
|
+
workspaceName: input.name,
|
|
104
|
+
email: input.ownerEmail,
|
|
105
|
+
inviteId: owner.inviteId,
|
|
106
|
+
token: owner.token,
|
|
107
|
+
operator,
|
|
108
|
+
});
|
|
109
|
+
return "sending";
|
|
110
|
+
}
|
|
111
|
+
async function createWorkspaceForOwner(input, operator) {
|
|
112
|
+
const now = new Date();
|
|
113
|
+
const [tenantId] = await (0, interface_database_decorators_1.GetModel)(db_1.TenantModel).insert([
|
|
114
|
+
{ name: input.name, createdAt: now, updatedAt: now },
|
|
115
|
+
]);
|
|
116
|
+
const owner = await addOwner(tenantId, input, operator);
|
|
117
|
+
await (0, default_member_role_1.createDefaultMemberRole)(tenantId, operator.language);
|
|
118
|
+
await insertSubscription(tenantId, input, operator);
|
|
119
|
+
await (0, billing_state_1.recomputeTenantBillingState)(tenantId);
|
|
120
|
+
const invitationEmail = emailOwnerInvitation(tenantId, owner, input, operator);
|
|
121
|
+
return { tenantId, owner, invitationEmail, access: input.access };
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=operator-creation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operator-creation.js","sourceRoot":"","sources":["../../src/workspaces/operator-creation.ts"],"names":[],"mappings":";;AAuGA,wDAuBC;AAMD,8CAgBC;AAGD,kCAYC;AAgED,0DAsBC;AAzPD,uEAAwD;AACxD,6FAAqE;AACrE,uEAAgE;AAChE,qDAA8E;AAC9E,+DAI2C;AAC3C,0DAAyE;AACzE,oDAA+D;AAC/D,8BAKe;AACf,kEAA6D;AAC7D,qEAAgF;AAChF,+DAAgE;AAEhE,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAO7B,MAAM,uBAAuB,GAAG,CAAC,eAAe,EAAE,YAAY,CAAU,CAAC;AAgDzE,MAAM,kBAAkB,GAGpB;IACF,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACzB,MAAM,EAAE,QAAQ;QAChB,eAAe,EAAE,IAAI;QACrB,SAAS,EAAE,KAAK,CAAC,SAAS;KAC3B,CAAC;IACF,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;QACjB,MAAM,EAAE,iBAAiB;QACzB,eAAe,EAAE,KAAK;QACtB,SAAS,EAAE,IAAI;KAChB,CAAC;CACH,CAAC;AAEF,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;QACzD,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE;QACd,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,uBAAuB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAA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CAA2B,EAAC,QAAQ,CAAC,CAAC;IAE5C,MAAM,eAAe,GAAG,oBAAoB,CAC1C,QAAQ,EACR,KAAK,EACL,KAAK,EACL,QAAQ,CACT,CAAC;IACF,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Tenant } from "@antelopejs/interface-dms/db";
|
|
2
|
+
import { type BillingState, type Plan, type TenantBillingInfo, type TenantSubscription, type WorkspaceDirectoryFields } from "../db";
|
|
3
|
+
import { type SeatUsage } from "../plans/seat-capacity";
|
|
4
|
+
export interface WorkspaceOperatorView {
|
|
5
|
+
tenant: Tenant;
|
|
6
|
+
subscription: TenantSubscription | undefined;
|
|
7
|
+
plan: Plan | null;
|
|
8
|
+
billingInfo: TenantBillingInfo | undefined;
|
|
9
|
+
billingState: BillingState;
|
|
10
|
+
directory: WorkspaceDirectoryFields;
|
|
11
|
+
seats: SeatUsage;
|
|
12
|
+
}
|
|
13
|
+
export declare function loadWorkspaceOperatorView(tenantId: string): Promise<WorkspaceOperatorView>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadWorkspaceOperatorView = loadWorkspaceOperatorView;
|
|
4
|
+
const interface_api_util_1 = require("@antelopejs/interface-api-util");
|
|
5
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
6
|
+
const db_1 = require("@antelopejs/interface-dms/db");
|
|
7
|
+
const billing_state_1 = require("../billing-state");
|
|
8
|
+
const db_2 = require("../db");
|
|
9
|
+
const seat_capacity_1 = require("../plans/seat-capacity");
|
|
10
|
+
const HTTP_NOT_FOUND = 404;
|
|
11
|
+
async function loadWorkspaceOperatorView(tenantId) {
|
|
12
|
+
const tenant = await (0, interface_database_decorators_1.GetModel)(db_1.TenantModel).get(tenantId);
|
|
13
|
+
(0, interface_api_util_1.assert)(tenant, HTTP_NOT_FOUND, "saas.errors.workspace.not_found");
|
|
14
|
+
const [subscription, billingInfo, existing, seats] = await Promise.all([
|
|
15
|
+
(0, interface_database_decorators_1.GetModel)(db_2.TenantSubscriptionModel, tenantId).findOne(),
|
|
16
|
+
(0, interface_database_decorators_1.GetModel)(db_2.TenantBillingInfoModel, tenantId).findOne(),
|
|
17
|
+
(0, interface_database_decorators_1.GetModel)(db_2.TenantBillingStateModel).findByTenant(tenantId),
|
|
18
|
+
(0, seat_capacity_1.getSeatUsage)(tenantId),
|
|
19
|
+
]);
|
|
20
|
+
const billingState = (0, billing_state_1.deriveBillingState)(subscription);
|
|
21
|
+
const [plan, directory] = await Promise.all([
|
|
22
|
+
subscription?.planId
|
|
23
|
+
? (0, interface_database_decorators_1.GetModel)(db_2.PlanModel).get(subscription.planId)
|
|
24
|
+
: undefined,
|
|
25
|
+
(0, billing_state_1.loadWorkspaceDirectoryFields)(tenantId, billingState, subscription, existing),
|
|
26
|
+
]);
|
|
27
|
+
return {
|
|
28
|
+
tenant,
|
|
29
|
+
subscription,
|
|
30
|
+
plan: plan ?? null,
|
|
31
|
+
billingInfo,
|
|
32
|
+
billingState,
|
|
33
|
+
directory,
|
|
34
|
+
seats,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=operator-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operator-view.js","sourceRoot":"","sources":["../../src/workspaces/operator-view.ts"],"names":[],"mappings":";;AAmCA,8DAgCC;AAnED,uEAAwD;AACxD,6FAAqE;AACrE,qDAAwE;AAExE,oDAG0B;AAC1B,8BAUe;AACf,0DAAsE;AAEtE,MAAM,cAAc,GAAG,GAAG,CAAC;AAcpB,KAAK,UAAU,yBAAyB,CAC7C,QAAgB;IAEhB,MAAM,MAAM,GAAG,MAAM,IAAA,wCAAQ,EAAC,gBAAW,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACzD,IAAA,2BAAM,EAAC,MAAM,EAAE,cAAc,EAAE,iCAAiC,CAAC,CAAC;IAClE,MAAM,CAAC,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACrE,IAAA,wCAAQ,EAAC,4BAAuB,EAAE,QAAQ,CAAC,CAAC,OAAO,EAAE;QACrD,IAAA,wCAAQ,EAAC,2BAAsB,EAAE,QAAQ,CAAC,CAAC,OAAO,EAAE;QACpD,IAAA,wCAAQ,EAAC,4BAAuB,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC;QACxD,IAAA,4BAAY,EAAC,QAAQ,CAAC;KACvB,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,IAAA,kCAAkB,EAAC,YAAY,CAAC,CAAC;IACtD,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC1C,YAAY,EAAE,MAAM;YAClB,CAAC,CAAC,IAAA,wCAAQ,EAAC,cAAS,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC;YAC9C,CAAC,CAAC,SAAS;QACb,IAAA,4CAA4B,EAC1B,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,QAAQ,CACT;KACF,CAAC,CAAC;IACH,OAAO;QACL,MAAM;QACN,YAAY;QACZ,IAAI,EAAE,IAAI,IAAI,IAAI;QAClB,WAAW;QACX,YAAY;QACZ,SAAS;QACT,KAAK;KACN,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type TenantMember } from "@antelopejs/interface-dms/db";
|
|
2
|
+
export interface WorkspaceOwnerContact {
|
|
3
|
+
name: string;
|
|
4
|
+
email: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function listWorkspaceOwnerContacts(members: TenantMember[]): Promise<WorkspaceOwnerContact[]>;
|
|
7
|
+
export declare function findWorkspaceOwnerContact(tenantId: string): Promise<WorkspaceOwnerContact | null>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listWorkspaceOwnerContacts = listWorkspaceOwnerContacts;
|
|
4
|
+
exports.findWorkspaceOwnerContact = findWorkspaceOwnerContact;
|
|
5
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
6
|
+
const db_1 = require("@antelopejs/interface-dms/db");
|
|
7
|
+
const db_2 = require("@antelopejs/interface-dms/auth/db");
|
|
8
|
+
function toContact(user) {
|
|
9
|
+
return { name: user.name || user.email, email: user.email };
|
|
10
|
+
}
|
|
11
|
+
async function listWorkspaceOwnerContacts(members) {
|
|
12
|
+
const users = await Promise.all(members
|
|
13
|
+
.filter((member) => member.isTenantOwner)
|
|
14
|
+
.map((owner) => (0, interface_database_decorators_1.GetModel)(db_2.UserModel).get(owner.userId)));
|
|
15
|
+
return users.flatMap((user) => (user ? [toContact(user)] : []));
|
|
16
|
+
}
|
|
17
|
+
async function findWorkspaceOwnerContact(tenantId) {
|
|
18
|
+
const [owner] = await (0, interface_database_decorators_1.GetModel)(db_1.TenantMemberModel, tenantId).listOwners();
|
|
19
|
+
if (!owner)
|
|
20
|
+
return null;
|
|
21
|
+
const user = await (0, interface_database_decorators_1.GetModel)(db_2.UserModel).get(owner.userId);
|
|
22
|
+
return user ? toContact(user) : null;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=owner-contact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"owner-contact.js","sourceRoot":"","sources":["../../src/workspaces/owner-contact.ts"],"names":[],"mappings":";;AAuBA,gEASC;AAQD,8DAOC;AA/CD,6FAAqE;AACrE,qDAGsC;AACtC,0DAAyE;AAQzE,SAAS,SAAS,CAAC,IAAU;IAC3B,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;AAC9D,CAAC;AAQM,KAAK,UAAU,0BAA0B,CAC9C,OAAuB;IAEvB,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAC7B,OAAO;SACJ,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC;SACxC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,wCAAQ,EAAC,cAAS,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CACzD,CAAC;IACF,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAClE,CAAC;AAQM,KAAK,UAAU,yBAAyB,CAC7C,QAAgB;IAEhB,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,IAAA,wCAAQ,EAAC,sBAAiB,EAAE,QAAQ,CAAC,CAAC,UAAU,EAAE,CAAC;IACzE,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,MAAM,IAAI,GAAG,MAAM,IAAA,wCAAQ,EAAC,cAAS,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACzD,OAAO,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { User } from "@antelopejs/interface-dms/auth/db";
|
|
2
|
+
import { type InvitationEmailDelivery } from "./invitations";
|
|
3
|
+
export interface OwnerInvitationEmail {
|
|
4
|
+
tenantId: string;
|
|
5
|
+
workspaceName: string;
|
|
6
|
+
email: string;
|
|
7
|
+
inviteId: string;
|
|
8
|
+
token: string;
|
|
9
|
+
operator: User;
|
|
10
|
+
}
|
|
11
|
+
export declare function sendOwnerInvitationEmail(invitation: OwnerInvitationEmail): Promise<InvitationEmailDelivery>;
|
|
12
|
+
export declare function sendOwnerInvitationEmailInBackground(invitation: OwnerInvitationEmail): void;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendOwnerInvitationEmail = sendOwnerInvitationEmail;
|
|
4
|
+
exports.sendOwnerInvitationEmailInBackground = sendOwnerInvitationEmailInBackground;
|
|
5
|
+
const logging_1 = require("@antelopejs/interface-core/logging");
|
|
6
|
+
const notifications_1 = require("../notifications");
|
|
7
|
+
const invitation_commands_1 = require("../operator-actions/invitation-commands");
|
|
8
|
+
const paths_1 = require("../pages/platform/paths");
|
|
9
|
+
const invitations_1 = require("./invitations");
|
|
10
|
+
const LOG_PREFIX = "[dms-saas:owner-invitation]";
|
|
11
|
+
const FAILED_ICON = "i-ph-envelope-simple";
|
|
12
|
+
const FAILED_PAYLOAD = "$saas.notifications.payload.invitation_email_failed";
|
|
13
|
+
function deliver(invitation) {
|
|
14
|
+
const { operator } = invitation;
|
|
15
|
+
return (0, invitations_1.deliverInvitationEmail)({
|
|
16
|
+
email: invitation.email,
|
|
17
|
+
token: invitation.token,
|
|
18
|
+
firstname: null,
|
|
19
|
+
lastname: null,
|
|
20
|
+
language: operator.language,
|
|
21
|
+
}, {
|
|
22
|
+
workspaceName: invitation.workspaceName,
|
|
23
|
+
inviterName: (0, invitations_1.inviterNameOf)(operator),
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
async function reportUndelivered(invitation) {
|
|
27
|
+
await (0, notifications_1.notifyUser)(invitation.operator._id, notifications_1.invitationEmailFailedSubject, {
|
|
28
|
+
icon: FAILED_ICON,
|
|
29
|
+
title: `${FAILED_PAYLOAD}.title`,
|
|
30
|
+
description: `${FAILED_PAYLOAD}.description`,
|
|
31
|
+
params: { workspace: invitation.workspaceName, email: invitation.email },
|
|
32
|
+
linkTo: (0, paths_1.workspaceDetailPath)(invitation.tenantId),
|
|
33
|
+
eventId: `invitation-email-failed:${invitation.inviteId}`,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
async function sendOwnerInvitationEmail(invitation) {
|
|
37
|
+
const delivery = await (0, invitation_commands_1.sendInvitationCommand)({
|
|
38
|
+
tenantId: invitation.tenantId,
|
|
39
|
+
inviteId: invitation.inviteId,
|
|
40
|
+
actor: { id: invitation.operator._id, email: invitation.operator.email },
|
|
41
|
+
email: invitation.email,
|
|
42
|
+
send: () => deliver(invitation),
|
|
43
|
+
});
|
|
44
|
+
if (delivery === "failed")
|
|
45
|
+
await reportUndelivered(invitation);
|
|
46
|
+
return delivery;
|
|
47
|
+
}
|
|
48
|
+
function sendOwnerInvitationEmailInBackground(invitation) {
|
|
49
|
+
void sendOwnerInvitationEmail(invitation).catch((error) => {
|
|
50
|
+
logging_1.Logging.Error(`${LOG_PREFIX} invitation of ${invitation.tenantId} needs a look`, error);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=owner-invitation-email.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"owner-invitation-email.js","sourceRoot":"","sources":["../../src/workspaces/owner-invitation-email.ts"],"names":[],"mappings":";;AAqEA,4DAYC;AAMD,oFASC;AAhGD,gEAA6D;AAE7D,oDAA4E;AAC5E,iFAAgF;AAChF,mDAA8D;AAC9D,+CAIuB;AAEvB,MAAM,UAAU,GAAG,6BAA6B,CAAC;AACjD,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAC3C,MAAM,cAAc,GAAG,qDAAqD,CAAC;AAY7E,SAAS,OAAO,CACd,UAAgC;IAEhC,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC;IAGhC,OAAO,IAAA,oCAAsB,EAC3B;QACE,KAAK,EAAE,UAAU,CA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CAAC;AAClB,CAAC;AAMD,SAAgB,oCAAoC,CAClD,UAAgC;IAEhC,KAAK,wBAAwB,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACxD,iBAAO,CAAC,KAAK,CACX,GAAG,UAAU,kBAAkB,UAAU,CAAC,QAAQ,eAAe,EACjE,KAAK,CACN,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -12,6 +12,7 @@ export interface WorkspaceProvisioningPayload extends WorkspaceBillingProfile {
|
|
|
12
12
|
workspaceName: string;
|
|
13
13
|
planId: string;
|
|
14
14
|
paymentMethodId?: string;
|
|
15
|
+
awaitsFirstPayment?: boolean;
|
|
15
16
|
extras?: Record<string, unknown>;
|
|
16
17
|
}
|
|
17
18
|
export interface StripeCustomerProfile extends WorkspaceBillingProfile {
|
|
@@ -33,6 +34,7 @@ export interface CardDetails {
|
|
|
33
34
|
}
|
|
34
35
|
export interface WorkspaceProvisioningInput {
|
|
35
36
|
userId: string;
|
|
37
|
+
ownerLanguage?: string;
|
|
36
38
|
payload: WorkspaceProvisioningPayload;
|
|
37
39
|
stripeCustomerProfile: StripeCustomerProfile;
|
|
38
40
|
card: CardDetails;
|
|
@@ -19,10 +19,12 @@ const lifecycle_outbox_1 = require("../operator-actions/lifecycle-outbox");
|
|
|
19
19
|
const stripe_sync_1 = require("../plans/stripe-sync");
|
|
20
20
|
const stripe_1 = require("../stripe");
|
|
21
21
|
const utils_1 = require("../utils");
|
|
22
|
+
const default_member_role_1 = require("./default-member-role");
|
|
22
23
|
const default_plan_1 = require("./default-plan");
|
|
23
24
|
const free_plan_1 = require("./free-plan");
|
|
24
25
|
const subscription_create_params_1 = require("./subscription-create-params");
|
|
25
26
|
const provisioning_state_1 = require("./provisioning-state");
|
|
27
|
+
const plan_audience_1 = require("../plans/plan-audience");
|
|
26
28
|
var provisioning_rollback_1 = require("./provisioning-rollback");
|
|
27
29
|
Object.defineProperty(exports, "rollbackWorkspaceProvisioning", { enumerable: true, get: function () { return provisioning_rollback_1.rollbackWorkspaceProvisioning; } });
|
|
28
30
|
const HTTP_BAD_REQUEST = 400;
|
|
@@ -30,26 +32,31 @@ const HTTP_NOT_FOUND = 404;
|
|
|
30
32
|
const HTTP_CONFLICT = 409;
|
|
31
33
|
const ACTIVE_STATUS = "active";
|
|
32
34
|
const TRIALING_STATUS = "trialing";
|
|
35
|
+
const PENDING_PAYMENT_STATUS = "pending_payment";
|
|
33
36
|
function assertBillingCountry(address) {
|
|
34
37
|
(0, interface_api_util_1.assert)(address?.country, HTTP_BAD_REQUEST, "saas.errors.billing.country_required");
|
|
35
38
|
}
|
|
36
39
|
async function ensurePlanIsAvailableForCustomer(planId, customerType) {
|
|
37
40
|
const plan = await (0, interface_database_decorators_1.GetModel)(db_3.PlanModel).get(planId);
|
|
38
41
|
(0, interface_api_util_1.assert)(plan && !plan.isDeleted && plan.isActive, HTTP_NOT_FOUND, "saas.errors.plan.not_available");
|
|
39
|
-
(0, interface_api_util_1.assert)(
|
|
42
|
+
(0, interface_api_util_1.assert)((0, plan_audience_1.isPlanOfferedTo)(plan, customerType), HTTP_BAD_REQUEST, "saas.errors.plan.not_available_for_customer_type");
|
|
40
43
|
return plan;
|
|
41
44
|
}
|
|
42
45
|
const NO_CARD = { fingerprint: null, billingAddress: undefined };
|
|
46
|
+
const LOCAL_SUBSCRIPTION = {
|
|
47
|
+
stripeSubscriptionId: null,
|
|
48
|
+
startedAt: null,
|
|
49
|
+
isTrialing: false,
|
|
50
|
+
currentPeriodEnd: null,
|
|
51
|
+
latestInvoiceId: null,
|
|
52
|
+
};
|
|
43
53
|
const CARDLESS_BILLING = {
|
|
44
54
|
stripeCustomerId: null,
|
|
45
|
-
subscription:
|
|
46
|
-
stripeSubscriptionId: null,
|
|
47
|
-
startedAt: null,
|
|
48
|
-
isTrialing: false,
|
|
49
|
-
currentPeriodEnd: null,
|
|
50
|
-
latestInvoiceId: null,
|
|
51
|
-
},
|
|
55
|
+
subscription: LOCAL_SUBSCRIPTION,
|
|
52
56
|
};
|
|
57
|
+
function isBilledOffStripe(plan) {
|
|
58
|
+
return (0, free_plan_1.isFreePlan)(plan) && !plan.paymentProviderRefs?.stripePriceId;
|
|
59
|
+
}
|
|
53
60
|
async function resolveCardDetails(paymentMethodId) {
|
|
54
61
|
if (!paymentMethodId)
|
|
55
62
|
return NO_CARD;
|
|
@@ -75,7 +82,8 @@ async function resolveRegistrationPlan() {
|
|
|
75
82
|
(0, interface_api_util_1.assert)(freePlan, HTTP_CONFLICT, "saas.errors.plan.no_free_plan");
|
|
76
83
|
return freePlan;
|
|
77
84
|
}
|
|
78
|
-
async function createStripeCustomer(
|
|
85
|
+
async function createStripeCustomer(input, paymentMethodId) {
|
|
86
|
+
const { stripeCustomerProfile: profile, handles } = input;
|
|
79
87
|
const stripe = (0, stripe_1.getStripeClient)();
|
|
80
88
|
const metadata = {
|
|
81
89
|
customerType: profile.customerType,
|
|
@@ -89,8 +97,10 @@ async function createStripeCustomer(profile, paymentMethodId, handles) {
|
|
|
89
97
|
? profile.companyName
|
|
90
98
|
: profile.fallbackName,
|
|
91
99
|
address: (0, stripe_1.toStripeAddress)(profile.address),
|
|
100
|
+
preferred_locales: (0, stripe_1.toStripePreferredLocales)(input.ownerLanguage),
|
|
92
101
|
metadata: { ...metadata, provisioningAttempt: handles.tenantId ?? "" },
|
|
93
102
|
}, { idempotencyKey: `provisioning-customer:${handles.tenantId}` });
|
|
103
|
+
(0, stripe_1.rememberCustomerLocale)(customer.id, input.ownerLanguage);
|
|
94
104
|
handles.stripeCustomerId = customer.id;
|
|
95
105
|
await (0, provisioning_state_1.recordProvisioningState)(handles);
|
|
96
106
|
await stripe.paymentMethods.attach(paymentMethodId, {
|
|
@@ -181,11 +191,16 @@ function initialPaidUsagePeriods(subscription) {
|
|
|
181
191
|
return [];
|
|
182
192
|
return [{ stripeSubscriptionId, start: startedAt, end: null }];
|
|
183
193
|
}
|
|
194
|
+
function initialStatus(payload, subscription) {
|
|
195
|
+
if (payload.awaitsFirstPayment)
|
|
196
|
+
return PENDING_PAYMENT_STATUS;
|
|
197
|
+
return subscription.isTrialing ? TRIALING_STATUS : ACTIVE_STATUS;
|
|
198
|
+
}
|
|
184
199
|
async function insertTenantRecords(input) {
|
|
185
200
|
const { tenantId, payload, subscription } = input;
|
|
186
201
|
const subscriptionPatch = {
|
|
187
202
|
planId: payload.planId,
|
|
188
|
-
status: subscription
|
|
203
|
+
status: initialStatus(payload, subscription),
|
|
189
204
|
isComplimentary: false,
|
|
190
205
|
paidUsagePeriods: initialPaidUsagePeriods(subscription),
|
|
191
206
|
stripeCustomerId: input.stripeCustomerId,
|
|
@@ -207,7 +222,8 @@ async function insertTenantRecords(input) {
|
|
|
207
222
|
await (0, utils_1.insertOrUpdateById)((0, interface_database_decorators_1.GetModel)(db_3.TenantBillingInfoModel, tenantId), tenantId, { ...billingInfo, _id: tenantId }, billingInfo);
|
|
208
223
|
await (0, billing_state_1.recomputeTenantBillingState)(tenantId);
|
|
209
224
|
}
|
|
210
|
-
async function createOwnedTenant(
|
|
225
|
+
async function createOwnedTenant(input) {
|
|
226
|
+
const { userId, handles } = input;
|
|
211
227
|
const tenantId = handles.tenantId;
|
|
212
228
|
if (!tenantId)
|
|
213
229
|
throw new Error("Provisioning intent must precede tenant creation");
|
|
@@ -216,7 +232,7 @@ async function createOwnedTenant(workspaceName, userId, handles) {
|
|
|
216
232
|
await (0, interface_database_decorators_1.GetModel)(db_1.TenantModel).insert([
|
|
217
233
|
{
|
|
218
234
|
_id: tenantId,
|
|
219
|
-
name: workspaceName,
|
|
235
|
+
name: input.payload.workspaceName,
|
|
220
236
|
createdAt: new Date(),
|
|
221
237
|
updatedAt: new Date(),
|
|
222
238
|
},
|
|
@@ -225,13 +241,16 @@ async function createOwnedTenant(workspaceName, userId, handles) {
|
|
|
225
241
|
roleIds: [],
|
|
226
242
|
isTenantOwner: true,
|
|
227
243
|
});
|
|
244
|
+
await (0, default_member_role_1.createDefaultMemberRole)(tenantId, input.ownerLanguage);
|
|
228
245
|
return tenantId;
|
|
229
246
|
});
|
|
230
247
|
}
|
|
231
248
|
async function provisionWorkspace(input) {
|
|
232
249
|
const plan = await (0, stripe_sync_1.loadBillablePlan)(input.payload.planId);
|
|
233
250
|
(0, interface_api_util_1.assert)(plan, HTTP_NOT_FOUND, "saas.errors.plan.not_available");
|
|
234
|
-
(0, interface_api_util_1.assert)(input.payload.paymentMethodId ||
|
|
251
|
+
(0, interface_api_util_1.assert)(input.payload.paymentMethodId ||
|
|
252
|
+
(0, free_plan_1.isFreePlan)(plan) ||
|
|
253
|
+
input.payload.awaitsFirstPayment, HTTP_BAD_REQUEST, "saas.errors.workspace.payment_method_required");
|
|
235
254
|
await (0, provisioning_state_1.beginProvisioningAttempt)(input, plan);
|
|
236
255
|
try {
|
|
237
256
|
const provisioned = await runProvisioning(input);
|
|
@@ -245,7 +264,10 @@ async function provisionWorkspace(input) {
|
|
|
245
264
|
}
|
|
246
265
|
async function provisionStripeBilling(input, plan, paymentMethodId) {
|
|
247
266
|
const { stripeCustomerProfile, handles } = input;
|
|
248
|
-
const stripeCustomerId = await createStripeCustomer(
|
|
267
|
+
const stripeCustomerId = await createStripeCustomer(input, paymentMethodId);
|
|
268
|
+
if (isBilledOffStripe(plan)) {
|
|
269
|
+
return { stripeCustomerId, subscription: LOCAL_SUBSCRIPTION };
|
|
270
|
+
}
|
|
249
271
|
const subscription = await createSubscription({
|
|
250
272
|
stripeCustomerId,
|
|
251
273
|
plan,
|
|
@@ -263,7 +285,7 @@ async function runProvisioning(input) {
|
|
|
263
285
|
const { stripeCustomerId, subscription } = payload.paymentMethodId
|
|
264
286
|
? await provisionStripeBilling(input, plan, payload.paymentMethodId)
|
|
265
287
|
: CARDLESS_BILLING;
|
|
266
|
-
const tenantId = await createOwnedTenant(
|
|
288
|
+
const tenantId = await createOwnedTenant(input);
|
|
267
289
|
await (0, tenant_lifecycle_1.runTenantLifecycleOperation)(tenantId, () => insertTenantRecords({
|
|
268
290
|
tenantId,
|
|
269
291
|
userId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provisioning.js","sourceRoot":"","sources":["../../src/workspaces/provisioning.ts"],"names":[],"mappings":";;;AAsJA,oDAQC;AAED,4EAgBC;AAwBD,gDAoBC;AASD,0DAIC;AAiQD,gDAwBC;AAlgBD,uEAAwD;AACxD,6FAAqE;AACrE,qDAA2D;AAC3D,iFAAkF;AAClF,iFAAyF;AACzF,0DAA8D;AAC9D,oDAA+D;AAO/D,8BAKe;AACf,sEAA0E;AAC1E,2EAK8C;AAC9C,sDAAwD;AACxD,sCAOmB;AACnB,oCAA8E;AAC9E,iDAAoD;AACpD,2CAAyC;AACzC,6EAA6E;AAC7E,6DAI8B;AAC9B,iEAAwE;AAA/D,sIAAA,6BAA6B,OAAA;AAEtC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,aAAa,GAA6B,QAAQ,CAAC;AACzD,MAAM,eAAe,GAA6B,UAAU,CAAC;AAoG7D,SAAgB,oBAAoB,CAClC,OAA0C;IAE1C,IAAA,2BAAM,EACJ,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAChB,sCAAsC,CACvC,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,gCAAgC,CACpD,MAAc,EACd,YAAmC;IAEnC,MAAM,IAAI,GAAG,MAAM,IAAA,wCAAQ,EAAC,cAAS,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACnD,IAAA,2BAAM,EACJ,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,QAAQ,EACxC,cAAc,EACd,gCAAgC,CACjC,CAAC;IACF,IAAA,2BAAM,EACJ,IAAI,CAAC,QAAQ,KAAK,KAAK,IAAI,IAAI,CAAC,QAAQ,KAAK,YAAY,EACzD,gBAAgB,EAChB,kD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