@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
|
@@ -14,62 +14,77 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.SaasBillingSettingsController = void 0;
|
|
16
16
|
const interface_api_1 = require("@antelopejs/interface-api");
|
|
17
|
+
const interface_api_util_1 = require("@antelopejs/interface-api-util");
|
|
17
18
|
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
18
19
|
const auth_1 = require("@antelopejs/interface-dms/auth");
|
|
19
20
|
const db_1 = require("../../db");
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (body.autoSuspendDelayDays !== undefined)
|
|
27
|
-
out.autoSuspendDelayDays = body.autoSuspendDelayDays;
|
|
28
|
-
if (body.dataRetentionDaysAfterCancellation !== undefined)
|
|
29
|
-
out.dataRetentionDaysAfterCancellation =
|
|
30
|
-
body.dataRetentionDaysAfterCancellation;
|
|
31
|
-
if (body.moneyBackGuaranteeEnabled !== undefined)
|
|
32
|
-
out.moneyBackGuaranteeEnabled = body.moneyBackGuaranteeEnabled;
|
|
33
|
-
if (body.moneyBackGuaranteeWindowDays !== undefined)
|
|
34
|
-
out.moneyBackGuaranteeWindowDays = body.moneyBackGuaranteeWindowDays;
|
|
35
|
-
if (body.moneyBackGuaranteeMode !== undefined)
|
|
36
|
-
out.moneyBackGuaranteeMode = body.moneyBackGuaranteeMode;
|
|
37
|
-
if (body.autoProrataOnCancelEnabled !== undefined)
|
|
38
|
-
out.autoProrataOnCancelEnabled = body.autoProrataOnCancelEnabled;
|
|
39
|
-
if (body.stripeTaxCode !== undefined)
|
|
40
|
-
out.stripeTaxCode = body.stripeTaxCode || null;
|
|
41
|
-
return out;
|
|
21
|
+
const operator_billing_1 = require("../../operator-billing");
|
|
22
|
+
const stripe_sync_1 = require("../../plans/stripe-sync");
|
|
23
|
+
const client_1 = require("../../stripe/client");
|
|
24
|
+
const HTTP_CONFLICT = 409;
|
|
25
|
+
function parseBody(body) {
|
|
26
|
+
return (0, interface_api_util_1.assertValidation)(body, (value) => operator_billing_1.billingRulesBodySchema.parse(value), (error) => error.issues);
|
|
42
27
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (existing)
|
|
46
|
-
return existing;
|
|
47
|
-
const fresh = {
|
|
48
|
-
_id: db_1.BILLING_SETTINGS_SINGLETON_ID,
|
|
49
|
-
autoSuspendEnabled: true,
|
|
50
|
-
autoSuspendDelayDays: db_1.DEFAULT_AUTO_SUSPEND_DELAY_DAYS,
|
|
51
|
-
dataRetentionDaysAfterCancellation: db_1.DEFAULT_DATA_RETENTION_DAYS,
|
|
52
|
-
moneyBackGuaranteeEnabled: false,
|
|
53
|
-
moneyBackGuaranteeWindowDays: DEFAULT_MONEY_BACK_WINDOW_DAYS,
|
|
54
|
-
moneyBackGuaranteeMode: DEFAULT_REFUND_MODE,
|
|
55
|
-
autoProrataOnCancelEnabled: false,
|
|
56
|
-
stripeTaxCode: db_1.DEFAULT_STRIPE_TAX_CODE,
|
|
57
|
-
updatedAt: new Date(),
|
|
58
|
-
};
|
|
59
|
-
await billingSettingsModel.insert([fresh]);
|
|
60
|
-
return fresh;
|
|
28
|
+
function taxCodeOf(settings) {
|
|
29
|
+
return settings.stripeTaxCode || db_1.DEFAULT_STRIPE_TAX_CODE;
|
|
61
30
|
}
|
|
62
31
|
class SaasBillingSettingsController extends (0, interface_api_1.Controller)("/api/saas/settings/billing") {
|
|
32
|
+
async loadSettings() {
|
|
33
|
+
await (0, operator_billing_1.ensureBillingSettingsRow)(this.billingSettingsModel);
|
|
34
|
+
return (0, operator_billing_1.loadBillingSettings)(this.billingSettingsModel);
|
|
35
|
+
}
|
|
36
|
+
async planTaxSync(settings) {
|
|
37
|
+
const plans = await this.planModel.findActiveNotDeleted();
|
|
38
|
+
return (0, operator_billing_1.computePlanTaxSync)(plans, taxCodeOf(settings), settings.plansSyncedAt, (0, client_1.isStripeConfigured)());
|
|
39
|
+
}
|
|
40
|
+
async payload() {
|
|
41
|
+
const settings = await this.loadSettings();
|
|
42
|
+
const [legal, planTaxSync] = await Promise.all([
|
|
43
|
+
(0, operator_billing_1.readLegalDocuments)(this.legalDocumentsModel),
|
|
44
|
+
this.planTaxSync(settings),
|
|
45
|
+
]);
|
|
46
|
+
const { versions, updatedAt: _legalUpdatedAt, ...texts } = legal;
|
|
47
|
+
return {
|
|
48
|
+
...(0, operator_billing_1.pickBillingRules)(settings),
|
|
49
|
+
...texts,
|
|
50
|
+
...(0, operator_billing_1.legalDocumentReleases)(versions),
|
|
51
|
+
customerTimeline: {
|
|
52
|
+
autoSuspendEnabled: settings.autoSuspendEnabled,
|
|
53
|
+
autoSuspendDelayDays: settings.autoSuspendDelayDays,
|
|
54
|
+
dataRetentionDaysAfterCancellation: settings.dataRetentionDaysAfterCancellation,
|
|
55
|
+
},
|
|
56
|
+
refundExample: {
|
|
57
|
+
moneyBackGuaranteeMode: settings.moneyBackGuaranteeMode,
|
|
58
|
+
},
|
|
59
|
+
planTaxSync,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
63
62
|
get(_user) {
|
|
64
|
-
return
|
|
63
|
+
return this.payload();
|
|
65
64
|
}
|
|
66
|
-
async update(_user,
|
|
67
|
-
|
|
65
|
+
async update(_user, rawBody) {
|
|
66
|
+
const body = parseBody(rawBody);
|
|
67
|
+
const before = await this.loadSettings();
|
|
68
|
+
const now = new Date();
|
|
68
69
|
await this.billingSettingsModel.update(db_1.BILLING_SETTINGS_SINGLETON_ID, {
|
|
69
|
-
...
|
|
70
|
-
updatedAt:
|
|
70
|
+
...(0, operator_billing_1.pickSettingsUpdate)(body),
|
|
71
|
+
updatedAt: now,
|
|
71
72
|
});
|
|
72
|
-
|
|
73
|
+
await (0, operator_billing_1.saveLegalDocuments)(this.legalDocumentsModel, (0, operator_billing_1.pickLegalTexts)(body), now);
|
|
74
|
+
const isTaxCodeChanged = body.stripeTaxCode !== undefined &&
|
|
75
|
+
body.stripeTaxCode !== taxCodeOf(before);
|
|
76
|
+
if (isTaxCodeChanged && (0, client_1.isStripeConfigured)())
|
|
77
|
+
(0, stripe_sync_1.startPlanReconciliation)();
|
|
78
|
+
return this.payload();
|
|
79
|
+
}
|
|
80
|
+
async resyncPlans(_user) {
|
|
81
|
+
(0, interface_api_util_1.assert)((0, client_1.isStripeConfigured)(), HTTP_CONFLICT, "saas.errors.stripe.not_configured");
|
|
82
|
+
await this.loadSettings();
|
|
83
|
+
await (0, stripe_sync_1.reconcilePlansWithStripe)();
|
|
84
|
+
await this.billingSettingsModel.update(db_1.BILLING_SETTINGS_SINGLETON_ID, {
|
|
85
|
+
plansSyncedAt: new Date(),
|
|
86
|
+
});
|
|
87
|
+
return this.planTaxSync(await this.loadSettings());
|
|
73
88
|
}
|
|
74
89
|
}
|
|
75
90
|
exports.SaasBillingSettingsController = SaasBillingSettingsController;
|
|
@@ -77,12 +92,20 @@ __decorate([
|
|
|
77
92
|
(0, interface_database_decorators_1.Model)(db_1.BillingSettingsModel),
|
|
78
93
|
__metadata("design:type", db_1.BillingSettingsModel)
|
|
79
94
|
], SaasBillingSettingsController.prototype, "billingSettingsModel", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, interface_database_decorators_1.Model)(db_1.LegalDocumentsModel),
|
|
97
|
+
__metadata("design:type", db_1.LegalDocumentsModel)
|
|
98
|
+
], SaasBillingSettingsController.prototype, "legalDocumentsModel", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, interface_database_decorators_1.Model)(db_1.PlanModel),
|
|
101
|
+
__metadata("design:type", db_1.PlanModel)
|
|
102
|
+
], SaasBillingSettingsController.prototype, "planModel", void 0);
|
|
80
103
|
__decorate([
|
|
81
104
|
(0, interface_api_1.Get)("/"),
|
|
82
105
|
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
83
106
|
__metadata("design:type", Function),
|
|
84
107
|
__metadata("design:paramtypes", [Function]),
|
|
85
|
-
__metadata("design:returntype",
|
|
108
|
+
__metadata("design:returntype", Promise)
|
|
86
109
|
], SaasBillingSettingsController.prototype, "get", null);
|
|
87
110
|
__decorate([
|
|
88
111
|
(0, interface_api_1.Put)("/"),
|
|
@@ -92,4 +115,11 @@ __decorate([
|
|
|
92
115
|
__metadata("design:paramtypes", [Function, Object]),
|
|
93
116
|
__metadata("design:returntype", Promise)
|
|
94
117
|
], SaasBillingSettingsController.prototype, "update", null);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, interface_api_1.Post)("/resync-plans"),
|
|
120
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
121
|
+
__metadata("design:type", Function),
|
|
122
|
+
__metadata("design:paramtypes", [Function]),
|
|
123
|
+
__metadata("design:returntype", Promise)
|
|
124
|
+
], SaasBillingSettingsController.prototype, "resyncPlans", null);
|
|
95
125
|
//# sourceMappingURL=billing-settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-settings.js","sourceRoot":"","sources":["../../../src/routes/platformOwner/billing-settings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"billing-settings.js","sourceRoot":"","sources":["../../../src/routes/platformOwner/billing-settings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAMmC;AACnC,uEAA0E;AAC1E,6FAAkE;AAClE,yDAA+D;AAG/D,iCAOkB;AAClB,6DAagC;AAChC,yDAGiC;AACjC,gDAAyD;AAEzD,MAAM,aAAa,GAAG,GAAG,CAAC;AAS1B,SAAS,SAAS,CAAC,IAAa;IAC9B,OAAO,IAAA,qCAAgB,EACrB,IAAI,EACJ,CAAC,KAAK,EAAE,EAAE,CAAC,yCAAsB,CA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;QACjC,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,kCAA6B,EAAE;YACpE,aAAa,EAAE,IAAI,IAAI,EAAE;SAC1B,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;IACrD,CAAC;CACF;AAtGD,sEAsGC;AAlGS;IADP,IAAA,qCAAK,EAAC,yBAAoB,CAAC;8BACE,yBAAoB;2EAAC;AAG3C;IADP,IAAA,qCAAK,EAAC,wBAAmB,CAAC;8BACE,wBAAmB;0EAAC;AAGzC;IADP,IAAA,qCAAK,EAAC,cAAS,CAAC;8BACE,cAAS;gEAAC;AA4C7B;IADC,IAAA,mBAAG,EAAC,GAAG,CAAC;IACJ,WAAA,IAAA,oBAAa,GAAE,CAAA;;;;wDAEnB;AAQK;IADL,IAAA,mBAAG,EAAC,GAAG,CAAC;IAEN,WAAA,IAAA,oBAAa,GAAE,CAAA;IACf,WAAA,IAAA,wBAAQ,GAAE,CAAA;;;;2DAmBZ;AAIK;IADL,IAAA,oBAAI,EAAC,eAAe,CAAC;IACH,WAAA,IAAA,oBAAa,GAAE,CAAA;;;;gEAYjC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { User } from "@antelopejs/interface-dms/auth/db";
|
|
2
|
+
import { CreditNoteModel, InvoiceModel } from "../../db";
|
|
3
|
+
import { type BillingStats } from "../../operator-billing";
|
|
4
|
+
declare const SaasBillingStatsController_base: import("@antelopejs/interface-api").ControllerClass<object>;
|
|
5
|
+
export declare class SaasBillingStatsController extends SaasBillingStatsController_base {
|
|
6
|
+
invoiceModel: InvoiceModel;
|
|
7
|
+
creditNoteModel: CreditNoteModel;
|
|
8
|
+
private openInvoices;
|
|
9
|
+
private paidSince;
|
|
10
|
+
private writtenOffSince;
|
|
11
|
+
private creditNotesSince;
|
|
12
|
+
invoices(_user: User): Promise<BillingStats>;
|
|
13
|
+
creditNotes(_user: User): Promise<BillingStats>;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.SaasBillingStatsController = void 0;
|
|
16
|
+
const interface_api_1 = require("@antelopejs/interface-api");
|
|
17
|
+
const interface_database_1 = require("@antelopejs/interface-database");
|
|
18
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
19
|
+
const auth_1 = require("@antelopejs/interface-dms/auth");
|
|
20
|
+
const db_1 = require("../../db");
|
|
21
|
+
const operator_billing_1 = require("../../operator-billing");
|
|
22
|
+
const INVOICE_DOCUMENT_TYPE = "invoice";
|
|
23
|
+
const OPEN_STATUS = "open";
|
|
24
|
+
const PAID_STATUS = "paid";
|
|
25
|
+
const UNCOLLECTIBLE_STATUS = "uncollectible";
|
|
26
|
+
const MONEY_FIELDS = ["amount", "currency"];
|
|
27
|
+
const CREDIT_NOTE_FIELDS = [
|
|
28
|
+
...MONEY_FIELDS,
|
|
29
|
+
"type",
|
|
30
|
+
"status",
|
|
31
|
+
"refundId",
|
|
32
|
+
"metadata",
|
|
33
|
+
];
|
|
34
|
+
class SaasBillingStatsController extends (0, interface_api_1.Controller)("/api/saas/billing-stats") {
|
|
35
|
+
openInvoices() {
|
|
36
|
+
return this.invoiceModel.table
|
|
37
|
+
.getAll(OPEN_STATUS, "status")
|
|
38
|
+
.filter((row) => row.key("documentType").eq(INVOICE_DOCUMENT_TYPE))
|
|
39
|
+
.pluck(...MONEY_FIELDS, "amountPaid", "nextPaymentAttemptAt")
|
|
40
|
+
.run();
|
|
41
|
+
}
|
|
42
|
+
paidSince(since) {
|
|
43
|
+
return this.invoiceModel.table
|
|
44
|
+
.getAll(PAID_STATUS, "status")
|
|
45
|
+
.filter((row) => row.key("paidAt").ge(since))
|
|
46
|
+
.pluck(...MONEY_FIELDS, "amountPaid")
|
|
47
|
+
.run();
|
|
48
|
+
}
|
|
49
|
+
writtenOffSince(since) {
|
|
50
|
+
return this.invoiceModel.table
|
|
51
|
+
.getAll(UNCOLLECTIBLE_STATUS, "status")
|
|
52
|
+
.filter((row) => row.key("issuedAt").ge(since))
|
|
53
|
+
.pluck(...MONEY_FIELDS)
|
|
54
|
+
.run();
|
|
55
|
+
}
|
|
56
|
+
creditNotesSince(since) {
|
|
57
|
+
return this.creditNoteModel.table
|
|
58
|
+
.filter((row) => row.key("issuedAt").ge(since))
|
|
59
|
+
.pluck(...CREDIT_NOTE_FIELDS)
|
|
60
|
+
.run();
|
|
61
|
+
}
|
|
62
|
+
async invoices(_user) {
|
|
63
|
+
const now = new Date();
|
|
64
|
+
const monthStart = (0, operator_billing_1.startOfMonth)(now);
|
|
65
|
+
const [open, paidThisMonth, creditNotesThisMonth, writtenOffThisYear] = await Promise.all([
|
|
66
|
+
this.openInvoices(),
|
|
67
|
+
this.paidSince(monthStart),
|
|
68
|
+
this.creditNotesSince(monthStart),
|
|
69
|
+
this.writtenOffSince((0, operator_billing_1.startOfYear)(now)),
|
|
70
|
+
]);
|
|
71
|
+
return (0, operator_billing_1.computeInvoiceStats)({
|
|
72
|
+
open,
|
|
73
|
+
paidThisMonth,
|
|
74
|
+
creditNotesThisMonth,
|
|
75
|
+
writtenOffThisYear,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
async creditNotes(_user) {
|
|
79
|
+
const notes = await this.creditNotesSince((0, operator_billing_1.startOfMonth)(new Date()));
|
|
80
|
+
return (0, operator_billing_1.computeCreditNoteStats)(notes);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
exports.SaasBillingStatsController = SaasBillingStatsController;
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, interface_database_decorators_1.Model)(db_1.InvoiceModel, interface_database_1.CROSS_INSTANCE),
|
|
86
|
+
__metadata("design:type", db_1.InvoiceModel)
|
|
87
|
+
], SaasBillingStatsController.prototype, "invoiceModel", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, interface_database_decorators_1.Model)(db_1.CreditNoteModel, interface_database_1.CROSS_INSTANCE),
|
|
90
|
+
__metadata("design:type", db_1.CreditNoteModel)
|
|
91
|
+
], SaasBillingStatsController.prototype, "creditNoteModel", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, interface_api_1.Get)("/invoices"),
|
|
94
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
95
|
+
__metadata("design:type", Function),
|
|
96
|
+
__metadata("design:paramtypes", [Function]),
|
|
97
|
+
__metadata("design:returntype", Promise)
|
|
98
|
+
], SaasBillingStatsController.prototype, "invoices", null);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, interface_api_1.Get)("/credit-notes"),
|
|
101
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
102
|
+
__metadata("design:type", Function),
|
|
103
|
+
__metadata("design:paramtypes", [Function]),
|
|
104
|
+
__metadata("design:returntype", Promise)
|
|
105
|
+
], SaasBillingStatsController.prototype, "creditNotes", null);
|
|
106
|
+
//# sourceMappingURL=billing-stats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-stats.js","sourceRoot":"","sources":["../../../src/routes/platformOwner/billing-stats.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAA4D;AAC5D,uEAAgE;AAChE,6FAAkE;AAClE,yDAA+D;AAE/D,iCAAyD;AACzD,6DASgC;AAEhC,MAAM,qBAAqB,GAAG,SAAS,CAAC;AACxC,MAAM,WAAW,GAAG,MAAM,CAAC;AAC3B,MAAM,WAAW,GAAG,MAAM,CAAC;AAC3B,MAAM,oBAAoB,GAAG,eAAe,CAAC;AAC7C,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAU,CAAC;AACrD,MAAM,kBAAkB,GAAG;IACzB,GAAG,YAAY;IACf,MAAM;IACN,QAAQ;IACR,UAAU;IACV,UAAU;CACF,CAAC;AAGX,MAAa,0BAA2B,SAAQ,IAAA,0BAAU,EACxD,yBAAyB,CAC1B;IAOS,YAAY;QAClB,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK;aAC3B,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC;aAC7B,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC;aAClE,KAAK,CAAC,GAAG,YAAY,EAAE,YAAY,EAAE,sBAAsB,CAAC;aAC5D,GAAG,EAA+B,CAAC;IACxC,CAAC;IAEO,SAAS,CAAC,KAAW;QAC3B,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK;aAC3B,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC;aAC7B,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;aAC5C,KAAK,CAAC,GAAG,YAAY,EAAE,YAAY,CAAC;aACp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C5C,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAA,+BAAY,EAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC;QACpE,OAAO,IAAA,yCAAsB,EAAC,KAAK,CAAC,CAAC;IACvC,CAAC;CACF;AAhED,gEAgEC;AA5DS;IADP,IAAA,qCAAK,EAAC,iBAAY,EAAE,mCAAc,CAAC;8BACd,iBAAY;gEAAC;AAG3B;IADP,IAAA,qCAAK,EAAC,oBAAe,EAAE,mCAAc,CAAC;8BACd,oBAAe;mEAAC;AAkCnC;IADL,IAAA,mBAAG,EAAC,WAAW,CAAC;IACD,WAAA,IAAA,oBAAa,GAAE,CAAA;;;;0DAgB9B;AAGK;IADL,IAAA,mBAAG,EAAC,eAAe,CAAC;IACF,WAAA,IAAA,oBAAa,GAAE,CAAA;;;;6DAGjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-payloads.js","sourceRoot":"","sources":["../../../src/routes/platformOwner/block-payloads.ts"],"names":[],"mappings":""}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import type { User } from "@antelopejs/interface-dms/auth/db";
|
|
2
2
|
import { InvoiceModel } from "../../db";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { type CreditNotePreview } from "../../operator-billing";
|
|
4
|
+
export interface IssuedCreditNote {
|
|
5
|
+
stripeCreditNoteId: string;
|
|
6
|
+
number: string;
|
|
5
7
|
amount: number;
|
|
6
|
-
|
|
7
|
-
reason: string;
|
|
8
|
+
currency: string;
|
|
8
9
|
}
|
|
9
10
|
declare const SaasCreditNotesIssueController_base: import("@antelopejs/interface-api").ControllerClass<object>;
|
|
10
11
|
export declare class SaasCreditNotesIssueController extends SaasCreditNotesIssueController_base {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
number: string;
|
|
14
|
-
}>;
|
|
12
|
+
preview(_user: User, invoiceId: string, invoiceModel: InvoiceModel): Promise<CreditNotePreview>;
|
|
13
|
+
issue(user: User, rawBody: unknown, invoiceModel: InvoiceModel): Promise<IssuedCreditNote>;
|
|
15
14
|
}
|
|
16
15
|
export {};
|
|
@@ -19,32 +19,44 @@ const interface_database_1 = require("@antelopejs/interface-database");
|
|
|
19
19
|
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
20
20
|
const auth_1 = require("@antelopejs/interface-dms/auth");
|
|
21
21
|
const db_1 = require("../../db");
|
|
22
|
+
const operator_billing_1 = require("../../operator-billing");
|
|
22
23
|
const stripe_1 = require("../../stripe");
|
|
23
24
|
const HTTP_BAD_REQUEST = 400;
|
|
24
|
-
const
|
|
25
|
-
|
|
25
|
+
const HTTP_CONFLICT = 409;
|
|
26
|
+
function parseBody(body) {
|
|
27
|
+
return (0, interface_api_util_1.assertValidation)(body, (value) => operator_billing_1.issueCreditNoteBodySchema.parse(value), (error) => error.issues);
|
|
28
|
+
}
|
|
26
29
|
class SaasCreditNotesIssueController extends (0, interface_api_1.Controller)("/api/saas/credit-notes") {
|
|
27
|
-
async
|
|
28
|
-
const
|
|
29
|
-
(0,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
reason: "order_change",
|
|
40
|
-
});
|
|
30
|
+
async preview(_user, invoiceId, invoiceModel) {
|
|
31
|
+
const loaded = await (0, operator_billing_1.loadInvoice)(invoiceModel, invoiceId);
|
|
32
|
+
return (0, operator_billing_1.buildCreditNotePreview)(loaded);
|
|
33
|
+
}
|
|
34
|
+
async issue(user, rawBody, invoiceModel) {
|
|
35
|
+
const body = parseBody(rawBody);
|
|
36
|
+
const loaded = await (0, operator_billing_1.loadInvoice)(invoiceModel, body.invoiceId);
|
|
37
|
+
const { allowance } = await (0, operator_billing_1.resolveCreditAllowance)(loaded);
|
|
38
|
+
(0, interface_api_util_1.assert)(!allowance.blockReason, HTTP_CONFLICT, `saas.errors.credit_note.blocked.${allowance.blockReason}`);
|
|
39
|
+
(0, interface_api_util_1.assert)(allowance.modes.includes(body.mode), HTTP_BAD_REQUEST, "saas.errors.credit_note.mode_not_allowed");
|
|
40
|
+
(0, interface_api_util_1.assert)(body.amount <= allowance.creditable, HTTP_BAD_REQUEST, "saas.errors.credit_note.above_creditable");
|
|
41
|
+
const creditNote = await (0, stripe_1.getStripeClient)().creditNotes.create((0, operator_billing_1.buildCreditNoteParams)(loaded.invoice.stripeInvoiceId, body, user), { idempotencyKey: `saas-credit-note:${body.requestId}` });
|
|
41
42
|
return {
|
|
42
43
|
stripeCreditNoteId: creditNote.id,
|
|
43
44
|
number: creditNote.number,
|
|
45
|
+
amount: creditNote.amount,
|
|
46
|
+
currency: creditNote.currency,
|
|
44
47
|
};
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
50
|
exports.SaasCreditNotesIssueController = SaasCreditNotesIssueController;
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, interface_api_1.Get)("/preview/:invoiceId"),
|
|
53
|
+
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
54
|
+
__param(1, (0, interface_api_1.Parameter)("invoiceId", "param")),
|
|
55
|
+
__param(2, (0, interface_database_decorators_1.Model)(db_1.InvoiceModel, interface_database_1.CROSS_INSTANCE)),
|
|
56
|
+
__metadata("design:type", Function),
|
|
57
|
+
__metadata("design:paramtypes", [Function, String, db_1.InvoiceModel]),
|
|
58
|
+
__metadata("design:returntype", Promise)
|
|
59
|
+
], SaasCreditNotesIssueController.prototype, "preview", null);
|
|
48
60
|
__decorate([
|
|
49
61
|
(0, interface_api_1.Post)("/issue"),
|
|
50
62
|
__param(0, (0, auth_1.AuthOwnerOnly)()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credit-notes-issue.js","sourceRoot":"","sources":["../../../src/routes/platformOwner/credit-notes-issue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"credit-not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
-
|
|
2
|
+
import type { ActivityFeedItem, KeyValueListItem, NavCardItem, StatGroupItem, TopListItem } from "@antelopejs/interface-dms/base";
|
|
3
|
+
import { type ChartCardPayload } from "../../metrics/revenue";
|
|
4
|
+
import type { ItemsPayload } from "./block-payloads";
|
|
5
|
+
interface KpiPayload {
|
|
7
6
|
value: number;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
x: string;
|
|
11
|
-
y: number;
|
|
12
|
-
label?: string;
|
|
13
|
-
}
|
|
14
|
-
interface ChartSeries {
|
|
15
|
-
name: string;
|
|
16
|
-
data: ChartSeriesPoint[];
|
|
17
|
-
}
|
|
18
|
-
interface ChartCardPayload {
|
|
19
|
-
value: number;
|
|
20
|
-
series: ChartSeries[];
|
|
21
|
-
}
|
|
22
|
-
interface ActivityEntry {
|
|
23
|
-
id: string;
|
|
24
|
-
icon: string;
|
|
25
|
-
iconColor: string;
|
|
26
|
-
title: string;
|
|
27
|
-
subtitle: string;
|
|
28
|
-
timestamp: string;
|
|
7
|
+
previousValue?: number;
|
|
8
|
+
delta?: number;
|
|
29
9
|
}
|
|
30
10
|
declare const SaasDashboardController_base: import("@antelopejs/interface-api").ControllerClass<object>;
|
|
31
11
|
export declare class SaasDashboardController extends SaasDashboardController_base {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
kpiMrr(_user: User): Promise<{
|
|
41
|
-
value: number;
|
|
42
|
-
}>;
|
|
43
|
-
private countSubscriptionsByStatus;
|
|
44
|
-
kpiActive(_user: User): Promise<{
|
|
45
|
-
value: number;
|
|
46
|
-
}>;
|
|
47
|
-
kpiOpen(_user: User): Promise<{
|
|
48
|
-
value: number;
|
|
49
|
-
}>;
|
|
50
|
-
kpiStateActive(_user: User): Promise<{
|
|
51
|
-
value: number;
|
|
52
|
-
}>;
|
|
53
|
-
kpiStateFree(_user: User): Promise<{
|
|
54
|
-
value: number;
|
|
55
|
-
}>;
|
|
56
|
-
kpiStatePastDue(_user: User): Promise<{
|
|
57
|
-
value: number;
|
|
58
|
-
}>;
|
|
59
|
-
topPlans(_user: User): Promise<TopListItem[]>;
|
|
60
|
-
chartRevenue(_user: User): Promise<ChartCardPayload>;
|
|
61
|
-
chartSubscriptionsByStatus(_user: User): Promise<ChartCardPayload>;
|
|
62
|
-
recentActivity(_user: User): Promise<ActivityEntry[]>;
|
|
12
|
+
private summary;
|
|
13
|
+
headline(_user: User): Promise<ItemsPayload<StatGroupItem>>;
|
|
14
|
+
attention(_user: User): Promise<ItemsPayload<NavCardItem>>;
|
|
15
|
+
churn(_user: User, from: unknown, to: unknown, compareFrom: unknown, compareTo: unknown): Promise<KpiPayload>;
|
|
16
|
+
paidInvoices(_user: User, from: unknown, to: unknown, compareFrom: unknown, compareTo: unknown): Promise<ChartCardPayload>;
|
|
17
|
+
workspacesByStatus(_user: User): Promise<ItemsPayload<KeyValueListItem>>;
|
|
18
|
+
plansByMrr(_user: User): Promise<ItemsPayload<TopListItem>>;
|
|
19
|
+
activity(_user: User, kind: unknown): Promise<ItemsPayload<ActivityFeedItem>>;
|
|
63
20
|
}
|
|
64
21
|
export {};
|