@antelopejs/dms-saas 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +190 -0
- package/README.md +658 -0
- package/dist/auth/index.d.ts +3 -0
- package/dist/auth/index.js +20 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/oauth-entry.d.ts +5 -0
- package/dist/auth/oauth-entry.js +10 -0
- package/dist/auth/oauth-entry.js.map +1 -0
- package/dist/auth/plan-permissions-resolver.d.ts +1 -0
- package/dist/auth/plan-permissions-resolver.js +44 -0
- package/dist/auth/plan-permissions-resolver.js.map +1 -0
- package/dist/auth/subscription-access-gate.d.ts +8 -0
- package/dist/auth/subscription-access-gate.js +38 -0
- package/dist/auth/subscription-access-gate.js.map +1 -0
- package/dist/automation/index.d.ts +44 -0
- package/dist/automation/index.js +209 -0
- package/dist/automation/index.js.map +1 -0
- package/dist/billing-state/index.d.ts +5 -0
- package/dist/billing-state/index.js +58 -0
- package/dist/billing-state/index.js.map +1 -0
- package/dist/billing-state/recovery.d.ts +22 -0
- package/dist/billing-state/recovery.js +81 -0
- package/dist/billing-state/recovery.js.map +1 -0
- package/dist/config/dev-mode.d.ts +3 -0
- package/dist/config/dev-mode.js +27 -0
- package/dist/config/dev-mode.js.map +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.js +19 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/runtime.d.ts +6 -0
- package/dist/config/runtime.js +54 -0
- package/dist/config/runtime.js.map +1 -0
- package/dist/crons/auto-suspend-past-due.d.ts +2 -0
- package/dist/crons/auto-suspend-past-due.js +43 -0
- package/dist/crons/auto-suspend-past-due.js.map +1 -0
- package/dist/crons/cleanup-stripe-webhook-events.d.ts +2 -0
- package/dist/crons/cleanup-stripe-webhook-events.js +27 -0
- package/dist/crons/cleanup-stripe-webhook-events.js.map +1 -0
- package/dist/crons/expire-free-workspaces.d.ts +2 -0
- package/dist/crons/expire-free-workspaces.js +36 -0
- package/dist/crons/expire-free-workspaces.js.map +1 -0
- package/dist/crons/hard-delete-cancelled.d.ts +2 -0
- package/dist/crons/hard-delete-cancelled.js +55 -0
- package/dist/crons/hard-delete-cancelled.js.map +1 -0
- package/dist/crons/index.d.ts +8 -0
- package/dist/crons/index.js +25 -0
- package/dist/crons/index.js.map +1 -0
- package/dist/crons/notify-free-workspaces-ending-soon.d.ts +2 -0
- package/dist/crons/notify-free-workspaces-ending-soon.js +69 -0
- package/dist/crons/notify-free-workspaces-ending-soon.js.map +1 -0
- package/dist/crons/recompute-billing-state.d.ts +2 -0
- package/dist/crons/recompute-billing-state.js +19 -0
- package/dist/crons/recompute-billing-state.js.map +1 -0
- package/dist/crons/recompute-segments.d.ts +2 -0
- package/dist/crons/recompute-segments.js +19 -0
- package/dist/crons/recompute-segments.js.map +1 -0
- package/dist/crons/reconcile-workspace-lifecycle.d.ts +2 -0
- package/dist/crons/reconcile-workspace-lifecycle.js +19 -0
- package/dist/crons/reconcile-workspace-lifecycle.js.map +1 -0
- package/dist/crons/register.d.ts +2 -0
- package/dist/crons/register.js +24 -0
- package/dist/crons/register.js.map +1 -0
- package/dist/crons/subscription-notifications.d.ts +2 -0
- package/dist/crons/subscription-notifications.js +55 -0
- package/dist/crons/subscription-notifications.js.map +1 -0
- package/dist/data-api/index.d.ts +2 -0
- package/dist/data-api/index.js +19 -0
- package/dist/data-api/index.js.map +1 -0
- package/dist/data-api/platformOwner/admin-user-invoices.d.ts +27 -0
- package/dist/data-api/platformOwner/admin-user-invoices.js +158 -0
- package/dist/data-api/platformOwner/admin-user-invoices.js.map +1 -0
- package/dist/data-api/platformOwner/admin-user-workspaces.d.ts +22 -0
- package/dist/data-api/platformOwner/admin-user-workspaces.js +97 -0
- package/dist/data-api/platformOwner/admin-user-workspaces.js.map +1 -0
- package/dist/data-api/platformOwner/credit-notes.d.ts +24 -0
- package/dist/data-api/platformOwner/credit-notes.js +133 -0
- package/dist/data-api/platformOwner/credit-notes.js.map +1 -0
- package/dist/data-api/platformOwner/features.d.ts +30 -0
- package/dist/data-api/platformOwner/features.js +141 -0
- package/dist/data-api/platformOwner/features.js.map +1 -0
- package/dist/data-api/platformOwner/hidden-filter.d.ts +1 -0
- package/dist/data-api/platformOwner/hidden-filter.js +18 -0
- package/dist/data-api/platformOwner/hidden-filter.js.map +1 -0
- package/dist/data-api/platformOwner/index.d.ts +12 -0
- package/dist/data-api/platformOwner/index.js +29 -0
- package/dist/data-api/platformOwner/index.js.map +1 -0
- package/dist/data-api/platformOwner/invoice-options.d.ts +7 -0
- package/dist/data-api/platformOwner/invoice-options.js +14 -0
- package/dist/data-api/platformOwner/invoice-options.js.map +1 -0
- package/dist/data-api/platformOwner/invoices.d.ts +26 -0
- package/dist/data-api/platformOwner/invoices.js +147 -0
- package/dist/data-api/platformOwner/invoices.js.map +1 -0
- package/dist/data-api/platformOwner/members.d.ts +24 -0
- package/dist/data-api/platformOwner/members.js +125 -0
- package/dist/data-api/platformOwner/members.js.map +1 -0
- package/dist/data-api/platformOwner/plan-migrations.d.ts +24 -0
- package/dist/data-api/platformOwner/plan-migrations.js +138 -0
- package/dist/data-api/platformOwner/plan-migrations.js.map +1 -0
- package/dist/data-api/platformOwner/plans.d.ts +30 -0
- package/dist/data-api/platformOwner/plans.js +228 -0
- package/dist/data-api/platformOwner/plans.js.map +1 -0
- package/dist/data-api/platformOwner/segments.d.ts +29 -0
- package/dist/data-api/platformOwner/segments.js +223 -0
- package/dist/data-api/platformOwner/segments.js.map +1 -0
- package/dist/data-api/platformOwner/support.d.ts +58 -0
- package/dist/data-api/platformOwner/support.js +111 -0
- package/dist/data-api/platformOwner/support.js.map +1 -0
- package/dist/data-api/platformOwner/users.d.ts +22 -0
- package/dist/data-api/platformOwner/users.js +128 -0
- package/dist/data-api/platformOwner/users.js.map +1 -0
- package/dist/data-api/platformOwner/workspaces.d.ts +22 -0
- package/dist/data-api/platformOwner/workspaces.js +153 -0
- package/dist/data-api/platformOwner/workspaces.js.map +1 -0
- package/dist/data-api/support-fields.d.ts +49 -0
- package/dist/data-api/support-fields.js +166 -0
- package/dist/data-api/support-fields.js.map +1 -0
- package/dist/data-api/support-routes.d.ts +10 -0
- package/dist/data-api/support-routes.js +71 -0
- package/dist/data-api/support-routes.js.map +1 -0
- package/dist/data-api/tenant/index.d.ts +2 -0
- package/dist/data-api/tenant/index.js +19 -0
- package/dist/data-api/tenant/index.js.map +1 -0
- package/dist/data-api/tenant/support.d.ts +39 -0
- package/dist/data-api/tenant/support.js +53 -0
- package/dist/data-api/tenant/support.js.map +1 -0
- package/dist/data-api/tenant/tenant-invoices.d.ts +37 -0
- package/dist/data-api/tenant/tenant-invoices.js +242 -0
- package/dist/data-api/tenant/tenant-invoices.js.map +1 -0
- package/dist/db/index.d.ts +1 -0
- package/dist/db/index.js +18 -0
- package/dist/db/index.js.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.js +20 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/register.d.ts +1 -0
- package/dist/hooks/register.js +57 -0
- package/dist/hooks/register.js.map +1 -0
- package/dist/hooks/tenant-export.d.ts +2 -0
- package/dist/hooks/tenant-export.js +64 -0
- package/dist/hooks/tenant-export.js.map +1 -0
- package/dist/hooks/tenant-provisioning.d.ts +3 -0
- package/dist/hooks/tenant-provisioning.js +12 -0
- package/dist/hooks/tenant-provisioning.js.map +1 -0
- package/dist/implementations/dms-saas/billing.d.ts +2 -0
- package/dist/implementations/dms-saas/billing.js +49 -0
- package/dist/implementations/dms-saas/billing.js.map +1 -0
- package/dist/implementations/dms-saas/invoice-line-items.d.ts +11 -0
- package/dist/implementations/dms-saas/invoice-line-items.js +24 -0
- package/dist/implementations/dms-saas/invoice-line-items.js.map +1 -0
- package/dist/implementations/dms-saas/pages.d.ts +3 -0
- package/dist/implementations/dms-saas/pages.js +12 -0
- package/dist/implementations/dms-saas/pages.js.map +1 -0
- package/dist/implementations/dms-saas/workspace-lifecycle.d.ts +2 -0
- package/dist/implementations/dms-saas/workspace-lifecycle.js +23 -0
- package/dist/implementations/dms-saas/workspace-lifecycle.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +107 -0
- package/dist/index.js.map +1 -0
- package/dist/invoice-line-items/billing-window.d.ts +3 -0
- package/dist/invoice-line-items/billing-window.js +19 -0
- package/dist/invoice-line-items/billing-window.js.map +1 -0
- package/dist/invoice-line-items/index.d.ts +1 -0
- package/dist/invoice-line-items/index.js +18 -0
- package/dist/invoice-line-items/index.js.map +1 -0
- package/dist/invoice-line-items/injection.d.ts +2 -0
- package/dist/invoice-line-items/injection.js +171 -0
- package/dist/invoice-line-items/injection.js.map +1 -0
- package/dist/notifications/index.d.ts +2 -0
- package/dist/notifications/index.js +19 -0
- package/dist/notifications/index.js.map +1 -0
- package/dist/notifications/recipients.d.ts +14 -0
- package/dist/notifications/recipients.js +87 -0
- package/dist/notifications/recipients.js.map +1 -0
- package/dist/notifications/subjects.d.ts +21 -0
- package/dist/notifications/subjects.js +121 -0
- package/dist/notifications/subjects.js.map +1 -0
- package/dist/operator-actions/commands.d.ts +41 -0
- package/dist/operator-actions/commands.js +233 -0
- package/dist/operator-actions/commands.js.map +1 -0
- package/dist/operator-actions/db/index.d.ts +4 -0
- package/dist/operator-actions/db/index.js +21 -0
- package/dist/operator-actions/db/index.js.map +1 -0
- package/dist/operator-actions/db/lifecycle-delivery.model.d.ts +29 -0
- package/dist/operator-actions/db/lifecycle-delivery.model.js +85 -0
- package/dist/operator-actions/db/lifecycle-delivery.model.js.map +1 -0
- package/dist/operator-actions/db/lifecycle-delivery.table.d.ts +26 -0
- package/dist/operator-actions/db/lifecycle-delivery.table.js +107 -0
- package/dist/operator-actions/db/lifecycle-delivery.table.js.map +1 -0
- package/dist/operator-actions/db/operator-action.model.d.ts +33 -0
- package/dist/operator-actions/db/operator-action.model.js +63 -0
- package/dist/operator-actions/db/operator-action.model.js.map +1 -0
- package/dist/operator-actions/db/operator-action.table.d.ts +21 -0
- package/dist/operator-actions/db/operator-action.table.js +95 -0
- package/dist/operator-actions/db/operator-action.table.js.map +1 -0
- package/dist/operator-actions/index.d.ts +3 -0
- package/dist/operator-actions/index.js +20 -0
- package/dist/operator-actions/index.js.map +1 -0
- package/dist/operator-actions/journal.d.ts +22 -0
- package/dist/operator-actions/journal.js +183 -0
- package/dist/operator-actions/journal.js.map +1 -0
- package/dist/operator-actions/lifecycle-consumers.d.ts +12 -0
- package/dist/operator-actions/lifecycle-consumers.js +28 -0
- package/dist/operator-actions/lifecycle-consumers.js.map +1 -0
- package/dist/operator-actions/lifecycle-outbox.d.ts +19 -0
- package/dist/operator-actions/lifecycle-outbox.js +229 -0
- package/dist/operator-actions/lifecycle-outbox.js.map +1 -0
- package/dist/operator-actions/types.d.ts +11 -0
- package/dist/operator-actions/types.js +3 -0
- package/dist/operator-actions/types.js.map +1 -0
- package/dist/pages/definitions.d.ts +1 -0
- package/dist/pages/definitions.js +18 -0
- package/dist/pages/definitions.js.map +1 -0
- package/dist/pages/index.d.ts +4 -0
- package/dist/pages/index.js +21 -0
- package/dist/pages/index.js.map +1 -0
- package/dist/pages/module.d.ts +5 -0
- package/dist/pages/module.js +15 -0
- package/dist/pages/module.js.map +1 -0
- package/dist/pages/platform/categories.d.ts +6 -0
- package/dist/pages/platform/categories.js +48 -0
- package/dist/pages/platform/categories.js.map +1 -0
- package/dist/pages/platform/credit-notes.d.ts +9 -0
- package/dist/pages/platform/credit-notes.js +40 -0
- package/dist/pages/platform/credit-notes.js.map +1 -0
- package/dist/pages/platform/dashboard.d.ts +10 -0
- package/dist/pages/platform/dashboard.js +95 -0
- package/dist/pages/platform/dashboard.js.map +1 -0
- package/dist/pages/platform/features.d.ts +9 -0
- package/dist/pages/platform/features.js +42 -0
- package/dist/pages/platform/features.js.map +1 -0
- package/dist/pages/platform/index.d.ts +15 -0
- package/dist/pages/platform/index.js +32 -0
- package/dist/pages/platform/index.js.map +1 -0
- package/dist/pages/platform/invoices.d.ts +9 -0
- package/dist/pages/platform/invoices.js +63 -0
- package/dist/pages/platform/invoices.js.map +1 -0
- package/dist/pages/platform/plans/edit.d.ts +17 -0
- package/dist/pages/platform/plans/edit.js +213 -0
- package/dist/pages/platform/plans/edit.js.map +1 -0
- package/dist/pages/platform/plans/index.d.ts +9 -0
- package/dist/pages/platform/plans/index.js +99 -0
- package/dist/pages/platform/plans/index.js.map +1 -0
- package/dist/pages/platform/plans/migrations.d.ts +9 -0
- package/dist/pages/platform/plans/migrations.js +38 -0
- package/dist/pages/platform/plans/migrations.js.map +1 -0
- package/dist/pages/platform/segments/index.d.ts +9 -0
- package/dist/pages/platform/segments/index.js +59 -0
- package/dist/pages/platform/segments/index.js.map +1 -0
- package/dist/pages/platform/settings.d.ts +9 -0
- package/dist/pages/platform/settings.js +147 -0
- package/dist/pages/platform/settings.js.map +1 -0
- package/dist/pages/platform/support.d.ts +9 -0
- package/dist/pages/platform/support.js +29 -0
- package/dist/pages/platform/support.js.map +1 -0
- package/dist/pages/platform/users/detail.d.ts +9 -0
- package/dist/pages/platform/users/detail.js +78 -0
- package/dist/pages/platform/users/detail.js.map +1 -0
- package/dist/pages/platform/users/index.d.ts +9 -0
- package/dist/pages/platform/users/index.js +77 -0
- package/dist/pages/platform/users/index.js.map +1 -0
- package/dist/pages/platform/workspaces/detail.d.ts +9 -0
- package/dist/pages/platform/workspaces/detail.js +120 -0
- package/dist/pages/platform/workspaces/detail.js.map +1 -0
- package/dist/pages/platform/workspaces/index.d.ts +35 -0
- package/dist/pages/platform/workspaces/index.js +300 -0
- package/dist/pages/platform/workspaces/index.js.map +1 -0
- package/dist/pages/public/auth/index.d.ts +1 -0
- package/dist/pages/public/auth/index.js +18 -0
- package/dist/pages/public/auth/index.js.map +1 -0
- package/dist/pages/public/auth/no-workspace.d.ts +9 -0
- package/dist/pages/public/auth/no-workspace.js +26 -0
- package/dist/pages/public/auth/no-workspace.js.map +1 -0
- package/dist/pages/public/index.d.ts +3 -0
- package/dist/pages/public/index.js +20 -0
- package/dist/pages/public/index.js.map +1 -0
- package/dist/pages/public/legal/index.d.ts +3 -0
- package/dist/pages/public/legal/index.js +20 -0
- package/dist/pages/public/legal/index.js.map +1 -0
- package/dist/pages/public/legal/privacy-policy.d.ts +9 -0
- package/dist/pages/public/legal/privacy-policy.js +29 -0
- package/dist/pages/public/legal/privacy-policy.js.map +1 -0
- package/dist/pages/public/legal/terms-and-conditions.d.ts +9 -0
- package/dist/pages/public/legal/terms-and-conditions.js +29 -0
- package/dist/pages/public/legal/terms-and-conditions.js.map +1 -0
- package/dist/pages/public/legal/terms-of-use.d.ts +9 -0
- package/dist/pages/public/legal/terms-of-use.js +29 -0
- package/dist/pages/public/legal/terms-of-use.js.map +1 -0
- package/dist/pages/public/register.d.ts +9 -0
- package/dist/pages/public/register.js +29 -0
- package/dist/pages/public/register.js.map +1 -0
- package/dist/pages/public/screens.d.ts +3 -0
- package/dist/pages/public/screens.js +50 -0
- package/dist/pages/public/screens.js.map +1 -0
- package/dist/pages/tenant/billing.d.ts +15 -0
- package/dist/pages/tenant/billing.js +87 -0
- package/dist/pages/tenant/billing.js.map +1 -0
- package/dist/pages/tenant/data-export.d.ts +10 -0
- package/dist/pages/tenant/data-export.js +32 -0
- package/dist/pages/tenant/data-export.js.map +1 -0
- package/dist/pages/tenant/general.d.ts +10 -0
- package/dist/pages/tenant/general.js +33 -0
- package/dist/pages/tenant/general.js.map +1 -0
- package/dist/pages/tenant/index.d.ts +6 -0
- package/dist/pages/tenant/index.js +23 -0
- package/dist/pages/tenant/index.js.map +1 -0
- package/dist/pages/tenant/members-seat-quota.d.ts +3 -0
- package/dist/pages/tenant/members-seat-quota.js +25 -0
- package/dist/pages/tenant/members-seat-quota.js.map +1 -0
- package/dist/pages/tenant/support.d.ts +9 -0
- package/dist/pages/tenant/support.js +27 -0
- package/dist/pages/tenant/support.js.map +1 -0
- package/dist/pages/tenant/workspace-suspended.d.ts +9 -0
- package/dist/pages/tenant/workspace-suspended.js +26 -0
- package/dist/pages/tenant/workspace-suspended.js.map +1 -0
- package/dist/plan-changes/deferred.d.ts +18 -0
- package/dist/plan-changes/deferred.js +225 -0
- package/dist/plan-changes/deferred.js.map +1 -0
- package/dist/plan-changes/index.d.ts +1 -0
- package/dist/plan-changes/index.js +18 -0
- package/dist/plan-changes/index.js.map +1 -0
- package/dist/plans/index.d.ts +4 -0
- package/dist/plans/index.js +21 -0
- package/dist/plans/index.js.map +1 -0
- package/dist/plans/seat-capacity.d.ts +9 -0
- package/dist/plans/seat-capacity.js +38 -0
- package/dist/plans/seat-capacity.js.map +1 -0
- package/dist/plans/seat-hooks.d.ts +1 -0
- package/dist/plans/seat-hooks.js +80 -0
- package/dist/plans/seat-hooks.js.map +1 -0
- package/dist/plans/seat-sync.d.ts +10 -0
- package/dist/plans/seat-sync.js +23 -0
- package/dist/plans/seat-sync.js.map +1 -0
- package/dist/routes/index.d.ts +3 -0
- package/dist/routes/index.js +20 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/platformOwner/billing-settings.d.ts +20 -0
- package/dist/routes/platformOwner/billing-settings.js +98 -0
- package/dist/routes/platformOwner/billing-settings.js.map +1 -0
- package/dist/routes/platformOwner/credit-notes-issue.d.ts +16 -0
- package/dist/routes/platformOwner/credit-notes-issue.js +56 -0
- package/dist/routes/platformOwner/credit-notes-issue.js.map +1 -0
- package/dist/routes/platformOwner/dashboard.d.ts +62 -0
- package/dist/routes/platformOwner/dashboard.js +310 -0
- package/dist/routes/platformOwner/dashboard.js.map +1 -0
- package/dist/routes/platformOwner/index.d.ts +12 -0
- package/dist/routes/platformOwner/index.js +29 -0
- package/dist/routes/platformOwner/index.js.map +1 -0
- package/dist/routes/platformOwner/plan-deletion.d.ts +30 -0
- package/dist/routes/platformOwner/plan-deletion.js +156 -0
- package/dist/routes/platformOwner/plan-deletion.js.map +1 -0
- package/dist/routes/platformOwner/plans.d.ts +99 -0
- package/dist/routes/platformOwner/plans.js +376 -0
- package/dist/routes/platformOwner/plans.js.map +1 -0
- package/dist/routes/platformOwner/platform-notes.d.ts +36 -0
- package/dist/routes/platformOwner/platform-notes.js +149 -0
- package/dist/routes/platformOwner/platform-notes.js.map +1 -0
- package/dist/routes/platformOwner/platform-owners.d.ts +12 -0
- package/dist/routes/platformOwner/platform-owners.js +77 -0
- package/dist/routes/platformOwner/platform-owners.js.map +1 -0
- package/dist/routes/platformOwner/segments.d.ts +24 -0
- package/dist/routes/platformOwner/segments.js +174 -0
- package/dist/routes/platformOwner/segments.js.map +1 -0
- package/dist/routes/platformOwner/support.d.ts +21 -0
- package/dist/routes/platformOwner/support.js +180 -0
- package/dist/routes/platformOwner/support.js.map +1 -0
- package/dist/routes/platformOwner/users-detail.d.ts +26 -0
- package/dist/routes/platformOwner/users-detail.js +82 -0
- package/dist/routes/platformOwner/users-detail.js.map +1 -0
- package/dist/routes/platformOwner/workspace-operator-actions.d.ts +34 -0
- package/dist/routes/platformOwner/workspace-operator-actions.js +183 -0
- package/dist/routes/platformOwner/workspace-operator-actions.js.map +1 -0
- package/dist/routes/platformOwner/workspaces-admin.d.ts +27 -0
- package/dist/routes/platformOwner/workspaces-admin.js +140 -0
- package/dist/routes/platformOwner/workspaces-admin.js.map +1 -0
- package/dist/routes/public/index.d.ts +3 -0
- package/dist/routes/public/index.js +20 -0
- package/dist/routes/public/index.js.map +1 -0
- package/dist/routes/public/legal-documents.d.ts +15 -0
- package/dist/routes/public/legal-documents.js +72 -0
- package/dist/routes/public/legal-documents.js.map +1 -0
- package/dist/routes/public/register.d.ts +48 -0
- package/dist/routes/public/register.js +193 -0
- package/dist/routes/public/register.js.map +1 -0
- package/dist/routes/public/webhooks/index.d.ts +1 -0
- package/dist/routes/public/webhooks/index.js +18 -0
- package/dist/routes/public/webhooks/index.js.map +1 -0
- package/dist/routes/public/webhooks/stripe.d.ts +7 -0
- package/dist/routes/public/webhooks/stripe.js +41 -0
- package/dist/routes/public/webhooks/stripe.js.map +1 -0
- package/dist/routes/tenant/billing-portal.d.ts +31 -0
- package/dist/routes/tenant/billing-portal.js +117 -0
- package/dist/routes/tenant/billing-portal.js.map +1 -0
- package/dist/routes/tenant/billing-self-refund.d.ts +18 -0
- package/dist/routes/tenant/billing-self-refund.js +199 -0
- package/dist/routes/tenant/billing-self-refund.js.map +1 -0
- package/dist/routes/tenant/data-export.d.ts +16 -0
- package/dist/routes/tenant/data-export.js +102 -0
- package/dist/routes/tenant/data-export.js.map +1 -0
- package/dist/routes/tenant/index.d.ts +9 -0
- package/dist/routes/tenant/index.js +26 -0
- package/dist/routes/tenant/index.js.map +1 -0
- package/dist/routes/tenant/support.d.ts +27 -0
- package/dist/routes/tenant/support.js +185 -0
- package/dist/routes/tenant/support.js.map +1 -0
- package/dist/routes/tenant/tenant-billing.d.ts +26 -0
- package/dist/routes/tenant/tenant-billing.js +148 -0
- package/dist/routes/tenant/tenant-billing.js.map +1 -0
- package/dist/routes/tenant/tenant-plan-ops.d.ts +57 -0
- package/dist/routes/tenant/tenant-plan-ops.js +244 -0
- package/dist/routes/tenant/tenant-plan-ops.js.map +1 -0
- package/dist/routes/tenant/tenant-plan.d.ts +19 -0
- package/dist/routes/tenant/tenant-plan.js +172 -0
- package/dist/routes/tenant/tenant-plan.js.map +1 -0
- package/dist/routes/tenant/tenant-seats.d.ts +17 -0
- package/dist/routes/tenant/tenant-seats.js +58 -0
- package/dist/routes/tenant/tenant-seats.js.map +1 -0
- package/dist/routes/tenant/workspaces.d.ts +78 -0
- package/dist/routes/tenant/workspaces.js +301 -0
- package/dist/routes/tenant/workspaces.js.map +1 -0
- package/dist/stripe/client.d.ts +6 -0
- package/dist/stripe/client.js +44 -0
- package/dist/stripe/client.js.map +1 -0
- package/dist/stripe/customer-balance.d.ts +12 -0
- package/dist/stripe/customer-balance.js +16 -0
- package/dist/stripe/customer-balance.js.map +1 -0
- package/dist/stripe/customer-billing.d.ts +33 -0
- package/dist/stripe/customer-billing.js +140 -0
- package/dist/stripe/customer-billing.js.map +1 -0
- package/dist/stripe/index.d.ts +11 -0
- package/dist/stripe/index.js +28 -0
- package/dist/stripe/index.js.map +1 -0
- package/dist/stripe/plan-schedule.d.ts +9 -0
- package/dist/stripe/plan-schedule.js +83 -0
- package/dist/stripe/plan-schedule.js.map +1 -0
- package/dist/stripe/proration.d.ts +2 -0
- package/dist/stripe/proration.js +19 -0
- package/dist/stripe/proration.js.map +1 -0
- package/dist/stripe/sync-plan.d.ts +2 -0
- package/dist/stripe/sync-plan.js +66 -0
- package/dist/stripe/sync-plan.js.map +1 -0
- package/dist/stripe/webhook-checkout.d.ts +3 -0
- package/dist/stripe/webhook-checkout.js +157 -0
- package/dist/stripe/webhook-checkout.js.map +1 -0
- package/dist/stripe/webhook-credit-notes.d.ts +3 -0
- package/dist/stripe/webhook-credit-notes.js +192 -0
- package/dist/stripe/webhook-credit-notes.js.map +1 -0
- package/dist/stripe/webhook-dispatch.d.ts +2 -0
- package/dist/stripe/webhook-dispatch.js +45 -0
- package/dist/stripe/webhook-dispatch.js.map +1 -0
- package/dist/stripe/webhook-handlers.d.ts +11 -0
- package/dist/stripe/webhook-handlers.js +318 -0
- package/dist/stripe/webhook-handlers.js.map +1 -0
- package/dist/stripe/webhook-shared.d.ts +28 -0
- package/dist/stripe/webhook-shared.js +126 -0
- package/dist/stripe/webhook-shared.js.map +1 -0
- package/dist/stripe/workspace-checkout.d.ts +29 -0
- package/dist/stripe/workspace-checkout.js +106 -0
- package/dist/stripe/workspace-checkout.js.map +1 -0
- package/dist/support/admissions.d.ts +36 -0
- package/dist/support/admissions.js +136 -0
- package/dist/support/admissions.js.map +1 -0
- package/dist/support/attachments.d.ts +12 -0
- package/dist/support/attachments.js +56 -0
- package/dist/support/attachments.js.map +1 -0
- package/dist/support/config.d.ts +19 -0
- package/dist/support/config.js +75 -0
- package/dist/support/config.js.map +1 -0
- package/dist/support/index.d.ts +6 -0
- package/dist/support/index.js +23 -0
- package/dist/support/index.js.map +1 -0
- package/dist/support/operations.d.ts +51 -0
- package/dist/support/operations.js +109 -0
- package/dist/support/operations.js.map +1 -0
- package/dist/support/plans.d.ts +6 -0
- package/dist/support/plans.js +130 -0
- package/dist/support/plans.js.map +1 -0
- package/dist/support/publications.d.ts +8 -0
- package/dist/support/publications.js +106 -0
- package/dist/support/publications.js.map +1 -0
- package/dist/support/recovery.d.ts +7 -0
- package/dist/support/recovery.js +43 -0
- package/dist/support/recovery.js.map +1 -0
- package/dist/support/service.d.ts +51 -0
- package/dist/support/service.js +143 -0
- package/dist/support/service.js.map +1 -0
- package/dist/support/transitions.d.ts +4 -0
- package/dist/support/transitions.js +29 -0
- package/dist/support/transitions.js.map +1 -0
- package/dist/support/uploads.d.ts +39 -0
- package/dist/support/uploads.js +115 -0
- package/dist/support/uploads.js.map +1 -0
- package/dist/support/validation.d.ts +15 -0
- package/dist/support/validation.js +54 -0
- package/dist/support/validation.js.map +1 -0
- package/dist/types/config.d.ts +16 -0
- package/dist/types/config.js +3 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/billing-document-type.d.ts +3 -0
- package/dist/utils/billing-document-type.js +18 -0
- package/dist/utils/billing-document-type.js.map +1 -0
- package/dist/utils/billing-period-type.d.ts +3 -0
- package/dist/utils/billing-period-type.js +18 -0
- package/dist/utils/billing-period-type.js.map +1 -0
- package/dist/utils/email-hash.d.ts +1 -0
- package/dist/utils/email-hash.js +8 -0
- package/dist/utils/email-hash.js.map +1 -0
- package/dist/utils/export-dataset-stream.d.ts +19 -0
- package/dist/utils/export-dataset-stream.js +40 -0
- package/dist/utils/export-dataset-stream.js.map +1 -0
- package/dist/utils/index.d.ts +15 -0
- package/dist/utils/index.js +32 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/invoice-lines-type.d.ts +27 -0
- package/dist/utils/invoice-lines-type.js +34 -0
- package/dist/utils/invoice-lines-type.js.map +1 -0
- package/dist/utils/money-cents-type.d.ts +3 -0
- package/dist/utils/money-cents-type.js +18 -0
- package/dist/utils/money-cents-type.js.map +1 -0
- package/dist/utils/pagination.d.ts +22 -0
- package/dist/utils/pagination.js +35 -0
- package/dist/utils/pagination.js.map +1 -0
- package/dist/utils/parse-future-date.d.ts +1 -0
- package/dist/utils/parse-future-date.js +15 -0
- package/dist/utils/parse-future-date.js.map +1 -0
- package/dist/utils/row-instance.d.ts +1 -0
- package/dist/utils/row-instance.js +8 -0
- package/dist/utils/row-instance.js.map +1 -0
- package/dist/utils/segment-conditions-type.d.ts +33 -0
- package/dist/utils/segment-conditions-type.js +86 -0
- package/dist/utils/segment-conditions-type.js.map +1 -0
- package/dist/utils/segment-evaluator.d.ts +3 -0
- package/dist/utils/segment-evaluator.js +117 -0
- package/dist/utils/segment-evaluator.js.map +1 -0
- package/dist/utils/segment-fields.d.ts +19 -0
- package/dist/utils/segment-fields.js +212 -0
- package/dist/utils/segment-fields.js.map +1 -0
- package/dist/utils/segment-matching.d.ts +56 -0
- package/dist/utils/segment-matching.js +200 -0
- package/dist/utils/segment-matching.js.map +1 -0
- package/dist/utils/segment-name-cache.d.ts +2 -0
- package/dist/utils/segment-name-cache.js +22 -0
- package/dist/utils/segment-name-cache.js.map +1 -0
- package/dist/utils/time.d.ts +3 -0
- package/dist/utils/time.js +10 -0
- package/dist/utils/time.js.map +1 -0
- package/dist/workers/index.d.ts +1 -0
- package/dist/workers/index.js +18 -0
- package/dist/workers/index.js.map +1 -0
- package/dist/workers/plan-migration.d.ts +4 -0
- package/dist/workers/plan-migration.js +206 -0
- package/dist/workers/plan-migration.js.map +1 -0
- package/dist/workspaces/billing-profile.d.ts +3 -0
- package/dist/workspaces/billing-profile.js +55 -0
- package/dist/workspaces/billing-profile.js.map +1 -0
- package/dist/workspaces/complimentary.d.ts +7 -0
- package/dist/workspaces/complimentary.js +47 -0
- package/dist/workspaces/complimentary.js.map +1 -0
- package/dist/workspaces/db/card-capacity.model.d.ts +30 -0
- package/dist/workspaces/db/card-capacity.model.js +98 -0
- package/dist/workspaces/db/card-capacity.model.js.map +1 -0
- package/dist/workspaces/db/card-capacity.table.d.ts +11 -0
- package/dist/workspaces/db/card-capacity.table.js +34 -0
- package/dist/workspaces/db/card-capacity.table.js.map +1 -0
- package/dist/workspaces/db/provisioning-attempt.model.d.ts +24 -0
- package/dist/workspaces/db/provisioning-attempt.model.js +33 -0
- package/dist/workspaces/db/provisioning-attempt.model.js.map +1 -0
- package/dist/workspaces/db/provisioning-attempt.table.d.ts +18 -0
- package/dist/workspaces/db/provisioning-attempt.table.js +77 -0
- package/dist/workspaces/db/provisioning-attempt.table.js.map +1 -0
- package/dist/workspaces/db/trial-identity.model.d.ts +25 -0
- package/dist/workspaces/db/trial-identity.model.js +62 -0
- package/dist/workspaces/db/trial-identity.model.js.map +1 -0
- package/dist/workspaces/db/trial-identity.table.d.ts +7 -0
- package/dist/workspaces/db/trial-identity.table.js +34 -0
- package/dist/workspaces/db/trial-identity.table.js.map +1 -0
- package/dist/workspaces/deletion.d.ts +8 -0
- package/dist/workspaces/deletion.js +75 -0
- package/dist/workspaces/deletion.js.map +1 -0
- package/dist/workspaces/free-workspace-guard.d.ts +11 -0
- package/dist/workspaces/free-workspace-guard.js +96 -0
- package/dist/workspaces/free-workspace-guard.js.map +1 -0
- package/dist/workspaces/index.d.ts +6 -0
- package/dist/workspaces/index.js +23 -0
- package/dist/workspaces/index.js.map +1 -0
- package/dist/workspaces/provisioning-rollback.d.ts +2 -0
- package/dist/workspaces/provisioning-rollback.js +78 -0
- package/dist/workspaces/provisioning-rollback.js.map +1 -0
- package/dist/workspaces/provisioning-state.d.ts +6 -0
- package/dist/workspaces/provisioning-state.js +91 -0
- package/dist/workspaces/provisioning-state.js.map +1 -0
- package/dist/workspaces/provisioning.d.ts +49 -0
- package/dist/workspaces/provisioning.js +263 -0
- package/dist/workspaces/provisioning.js.map +1 -0
- package/dist/workspaces/registration-extras.d.ts +1 -0
- package/dist/workspaces/registration-extras.js +50 -0
- package/dist/workspaces/registration-extras.js.map +1 -0
- package/dist/workspaces/suspension.d.ts +13 -0
- package/dist/workspaces/suspension.js +124 -0
- package/dist/workspaces/suspension.js.map +1 -0
- package/frontend-vue/.editorconfig +12 -0
- package/frontend-vue/.prettierrc +11 -0
- package/frontend-vue/app/build/.gitkeep +0 -0
- package/frontend-vue/app/components/CardGrid.vue +77 -0
- package/frontend-vue/app/components/CustomerPortalButton.vue +45 -0
- package/frontend-vue/app/components/DataExport.vue +300 -0
- package/frontend-vue/app/components/DeletePlanModal.vue +223 -0
- package/frontend-vue/app/components/FreeAccessBanner.vue +70 -0
- package/frontend-vue/app/components/InvoiceLines.vue +57 -0
- package/frontend-vue/app/components/IssueCreditNoteModal.vue +128 -0
- package/frontend-vue/app/components/LegalLayout.vue +63 -0
- package/frontend-vue/app/components/LoadFailure.vue +25 -0
- package/frontend-vue/app/components/PastDueAlert.vue +96 -0
- package/frontend-vue/app/components/PaymentMethodCard.vue +86 -0
- package/frontend-vue/app/components/PlanCard.vue +294 -0
- package/frontend-vue/app/components/PlanCardPublic.vue +59 -0
- package/frontend-vue/app/components/PlanCardsDisplay.vue +127 -0
- package/frontend-vue/app/components/PlanComparisonModal.vue +213 -0
- package/frontend-vue/app/components/PlanInheritancePicker.vue +329 -0
- package/frontend-vue/app/components/PlatformNotes.vue +281 -0
- package/frontend-vue/app/components/PlatformSupport.vue +461 -0
- package/frontend-vue/app/components/RecentActivity.vue +72 -0
- package/frontend-vue/app/components/RefundButton.vue +126 -0
- package/frontend-vue/app/components/Register.vue +174 -0
- package/frontend-vue/app/components/RegistrationClosed.vue +15 -0
- package/frontend-vue/app/components/SeatQuotaBanner.vue +78 -0
- package/frontend-vue/app/components/SegmentConditionsBuilder.vue +176 -0
- package/frontend-vue/app/components/SegmentConditionsGroup.vue +494 -0
- package/frontend-vue/app/components/SupportAttachmentUpload.vue +140 -0
- package/frontend-vue/app/components/SupportThreadHistory.vue +139 -0
- package/frontend-vue/app/components/TenantBillingForm.vue +208 -0
- package/frontend-vue/app/components/TenantPlanCard.vue +223 -0
- package/frontend-vue/app/components/TenantSupport.vue +415 -0
- package/frontend-vue/app/components/UserSummaryCard.vue +166 -0
- package/frontend-vue/app/components/WorkspaceBillingInfo.vue +68 -0
- package/frontend-vue/app/components/WorkspaceCompAccessButton.vue +198 -0
- package/frontend-vue/app/components/WorkspaceCreateModal.vue +256 -0
- package/frontend-vue/app/components/WorkspaceDangerZone.vue +146 -0
- package/frontend-vue/app/components/WorkspaceDetailHeader.vue +24 -0
- package/frontend-vue/app/components/WorkspaceIdentity.vue +99 -0
- package/frontend-vue/app/components/WorkspaceJoinButton.vue +50 -0
- package/frontend-vue/app/components/WorkspaceOperatorActions.vue +340 -0
- package/frontend-vue/app/components/WorkspaceSummaryCard.vue +161 -0
- package/frontend-vue/app/components/WorkspaceSuspendButton.vue +167 -0
- package/frontend-vue/app/components/WorkspaceSuspended.vue +164 -0
- package/frontend-vue/app/components/WorkspaceSwitcherWidget.vue +247 -0
- package/frontend-vue/app/composables/useApiErrorMessage.ts +35 -0
- package/frontend-vue/app/composables/useBillingCountries.ts +54 -0
- package/frontend-vue/app/composables/useBillingDocumentType.ts +7 -0
- package/frontend-vue/app/composables/useBillingStatus.ts +39 -0
- package/frontend-vue/app/composables/useCurrentWorkspace.ts +43 -0
- package/frontend-vue/app/composables/useDetailRefresh.ts +17 -0
- package/frontend-vue/app/composables/useExportHistory.ts +143 -0
- package/frontend-vue/app/composables/useInvoiceLines.ts +22 -0
- package/frontend-vue/app/composables/useMoneyFormat.ts +49 -0
- package/frontend-vue/app/composables/useMyWorkspaces.ts +47 -0
- package/frontend-vue/app/composables/usePlanFeatureFormat.ts +60 -0
- package/frontend-vue/app/composables/usePlanIntervalLabel.ts +30 -0
- package/frontend-vue/app/composables/useSaasRegistration.ts +522 -0
- package/frontend-vue/app/composables/useSeatQuota.ts +18 -0
- package/frontend-vue/app/composables/useSharedRequest.ts +54 -0
- package/frontend-vue/app/composables/useStripePaymentElement.ts +74 -0
- package/frontend-vue/app/composables/useSubscriptionAccess.ts +12 -0
- package/frontend-vue/app/composables/useSupportRequest.ts +74 -0
- package/frontend-vue/app/composables/useTenantPlan.ts +95 -0
- package/frontend-vue/app/composables/useTenantSwitch.ts +22 -0
- package/frontend-vue/app/composables/useWorkspaceAccessCache.ts +25 -0
- package/frontend-vue/app/custom-pages/auth/no-workspace.vue +495 -0
- package/frontend-vue/app/middleware/workspace-suspended.global.ts +56 -0
- package/frontend-vue/app/plugins/auth-links.ts +24 -0
- package/frontend-vue/app/plugins/billing-data-types.ts +62 -0
- package/frontend-vue/app/plugins/footer-links.ts +36 -0
- package/frontend-vue/app/plugins/plan-cards-display.client.ts +16 -0
- package/frontend-vue/app/plugins/segment-conditions-data-type.client.ts +122 -0
- package/frontend-vue/app/plugins/sidebar-widgets.ts +13 -0
- package/frontend-vue/app/types/support.ts +123 -0
- package/frontend-vue/dms.frontend.ts +68 -0
- package/frontend-vue/eslint.config.mjs +13 -0
- package/frontend-vue/i18n/locales/saas-en-GB.json +1285 -0
- package/frontend-vue/i18n/locales/saas-fr-FR.json +1285 -0
- package/frontend-vue/package.json +27 -0
- package/frontend-vue/pnpm-lock.yaml +4948 -0
- package/frontend-vue/pnpm-workspace.yaml +2 -0
- package/frontend-vue/server/routes/auth/finalize-workspace.post.ts +61 -0
- package/package.json +91 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
messages: SupportPageView<SupportMessageView>;
|
|
6
|
+
events: SupportPageView<SupportTicketEventView>;
|
|
7
|
+
assigneeLabels?: Record<string, string>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface HistoryEmits {
|
|
11
|
+
attachment: [resourceKey: string];
|
|
12
|
+
messagesPage: [page: number];
|
|
13
|
+
eventsPage: [page: number];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
17
|
+
assigneeLabels: () => ({}),
|
|
18
|
+
});
|
|
19
|
+
const emit = defineEmits<HistoryEmits>();
|
|
20
|
+
const { t } = useI18n();
|
|
21
|
+
|
|
22
|
+
const chronologicalMessages = computed(() =>
|
|
23
|
+
[...props.messages.results].reverse(),
|
|
24
|
+
);
|
|
25
|
+
const messagesPage = computed(
|
|
26
|
+
() => Math.floor(props.messages.offset / props.messages.limit) + 1,
|
|
27
|
+
);
|
|
28
|
+
const eventsPage = computed(
|
|
29
|
+
() => Math.floor(props.events.offset / props.events.limit) + 1,
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
function formatDate(value: string): string {
|
|
33
|
+
return new Intl.DateTimeFormat(undefined, {
|
|
34
|
+
dateStyle: "medium",
|
|
35
|
+
timeStyle: "short",
|
|
36
|
+
}).format(new Date(value));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function eventValue(
|
|
40
|
+
event: SupportTicketEventView,
|
|
41
|
+
value: string | null,
|
|
42
|
+
): string {
|
|
43
|
+
if (!value) return t("saas.support.platform.unassigned");
|
|
44
|
+
if (event.type === "status_changed")
|
|
45
|
+
return t(`saas.support.status.${value}`);
|
|
46
|
+
return props.assigneeLabels[value] ?? value;
|
|
47
|
+
}
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<template>
|
|
51
|
+
<section class="flex flex-col gap-4">
|
|
52
|
+
<div class="flex items-center justify-between gap-3">
|
|
53
|
+
<h3 class="font-medium">{{ $t("saas.support.conversation") }}</h3>
|
|
54
|
+
<span v-if="messagesPage === 1" class="text-muted text-xs">
|
|
55
|
+
{{ $t("saas.support.pagination.latest_page") }}
|
|
56
|
+
</span>
|
|
57
|
+
</div>
|
|
58
|
+
<article
|
|
59
|
+
v-for="message in chronologicalMessages"
|
|
60
|
+
:key="message._id"
|
|
61
|
+
class="rounded-lg p-4"
|
|
62
|
+
:class="
|
|
63
|
+
message.authorType === 'platform' ? 'bg-primary/10' : 'bg-elevated'
|
|
64
|
+
"
|
|
65
|
+
>
|
|
66
|
+
<div class="text-muted mb-2 flex justify-between text-xs">
|
|
67
|
+
<span>{{ $t(`saas.support.author.${message.authorType}`) }}</span>
|
|
68
|
+
<time>{{ formatDate(message.createdAt) }}</time>
|
|
69
|
+
</div>
|
|
70
|
+
<p class="whitespace-pre-wrap text-sm">{{ message.body }}</p>
|
|
71
|
+
<div
|
|
72
|
+
v-if="message.attachments.length"
|
|
73
|
+
class="mt-3 flex flex-wrap gap-2"
|
|
74
|
+
>
|
|
75
|
+
<UButton
|
|
76
|
+
v-for="(attachment, index) in message.attachments"
|
|
77
|
+
:key="attachment"
|
|
78
|
+
size="xs"
|
|
79
|
+
color="neutral"
|
|
80
|
+
variant="outline"
|
|
81
|
+
icon="i-ph-paperclip"
|
|
82
|
+
@click="emit('attachment', attachment)"
|
|
83
|
+
>
|
|
84
|
+
{{ $t("saas.support.attachment", { number: index + 1 }) }}
|
|
85
|
+
</UButton>
|
|
86
|
+
</div>
|
|
87
|
+
</article>
|
|
88
|
+
<div
|
|
89
|
+
v-if="messages.total > messages.limit"
|
|
90
|
+
class="flex flex-col items-center gap-1"
|
|
91
|
+
>
|
|
92
|
+
<span class="text-muted text-xs">
|
|
93
|
+
{{ $t("saas.support.pagination.older_messages") }}
|
|
94
|
+
</span>
|
|
95
|
+
<UPagination
|
|
96
|
+
:page="messagesPage"
|
|
97
|
+
:total="messages.total"
|
|
98
|
+
:items-per-page="messages.limit"
|
|
99
|
+
size="sm"
|
|
100
|
+
@update:page="emit('messagesPage', $event)"
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
</section>
|
|
104
|
+
|
|
105
|
+
<USeparator />
|
|
106
|
+
<section class="flex flex-col gap-3">
|
|
107
|
+
<h3 class="font-medium">{{ $t("saas.support.history.title") }}</h3>
|
|
108
|
+
<p v-if="!events.results.length" class="text-muted text-sm">
|
|
109
|
+
{{ $t("saas.support.history.empty") }}
|
|
110
|
+
</p>
|
|
111
|
+
<div
|
|
112
|
+
v-for="event in events.results"
|
|
113
|
+
:key="event._id"
|
|
114
|
+
class="bg-elevated rounded-lg p-3 text-sm"
|
|
115
|
+
>
|
|
116
|
+
<p>
|
|
117
|
+
{{
|
|
118
|
+
$t(`saas.support.history.${event.type}`, {
|
|
119
|
+
actor: event.actorName,
|
|
120
|
+
previous: eventValue(event, event.previousValue),
|
|
121
|
+
next: eventValue(event, event.newValue),
|
|
122
|
+
})
|
|
123
|
+
}}
|
|
124
|
+
</p>
|
|
125
|
+
<time class="text-muted text-xs">
|
|
126
|
+
{{ formatDate(event.createdAt) }}
|
|
127
|
+
</time>
|
|
128
|
+
</div>
|
|
129
|
+
<UPagination
|
|
130
|
+
v-if="events.total > events.limit"
|
|
131
|
+
:page="eventsPage"
|
|
132
|
+
:total="events.total"
|
|
133
|
+
:items-per-page="events.limit"
|
|
134
|
+
size="sm"
|
|
135
|
+
class="self-center"
|
|
136
|
+
@update:page="emit('eventsPage', $event)"
|
|
137
|
+
/>
|
|
138
|
+
</section>
|
|
139
|
+
</template>
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, onMounted, ref } from "vue";
|
|
3
|
+
|
|
4
|
+
interface BillingAddress {
|
|
5
|
+
line1: string | null;
|
|
6
|
+
line2: string | null;
|
|
7
|
+
postalCode: string | null;
|
|
8
|
+
city: string | null;
|
|
9
|
+
state: string | null;
|
|
10
|
+
country: string | null;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type VatVerificationStatus = "pending" | "verified" | "unverified";
|
|
14
|
+
|
|
15
|
+
interface BillingInfoResponse {
|
|
16
|
+
customerType: "individual" | "business" | null;
|
|
17
|
+
companyName: string | null;
|
|
18
|
+
vatNumber: string | null;
|
|
19
|
+
vatVerificationStatus: VatVerificationStatus | null;
|
|
20
|
+
billingEmail: string | null;
|
|
21
|
+
address: BillingAddress | null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const VAT_BADGE_COLORS: Record<VatVerificationStatus, "success" | "warning"> = {
|
|
25
|
+
verified: "success",
|
|
26
|
+
pending: "warning",
|
|
27
|
+
unverified: "warning",
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const BILLING_INFO_ENDPOINT = "/api/saas/tenant/billing-info";
|
|
31
|
+
|
|
32
|
+
const { $authFetch } = useAuthFetch();
|
|
33
|
+
const nuxtApp = useDmsApp();
|
|
34
|
+
const toast = useToast();
|
|
35
|
+
const { resolveApiError } = useApiErrorMessage();
|
|
36
|
+
const { countryItems } = useBillingCountries();
|
|
37
|
+
const { data: billingStatus, load: loadBillingStatus } = useBillingStatus();
|
|
38
|
+
|
|
39
|
+
/** Saving is owner-only server-side; a member gets the form read-only
|
|
40
|
+
* instead of a save button that can only end in a 403 toast. */
|
|
41
|
+
const isTenantOwner = computed(() => !!billingStatus.value?.isTenantOwner);
|
|
42
|
+
|
|
43
|
+
const customerType = ref<"individual" | "business" | null>(null);
|
|
44
|
+
const companyName = ref("");
|
|
45
|
+
const vatNumber = ref("");
|
|
46
|
+
const vatVerificationStatus = ref<VatVerificationStatus | null>(null);
|
|
47
|
+
const billingEmail = ref("");
|
|
48
|
+
const country = ref("");
|
|
49
|
+
const addressLine1 = ref("");
|
|
50
|
+
const postalCode = ref("");
|
|
51
|
+
const city = ref("");
|
|
52
|
+
const isLoading = ref(true);
|
|
53
|
+
const loadFailed = ref(false);
|
|
54
|
+
const isSaving = ref(false);
|
|
55
|
+
|
|
56
|
+
const isBusiness = computed(() => customerType.value === "business");
|
|
57
|
+
|
|
58
|
+
const customerTypeLabel = computed(() => {
|
|
59
|
+
if (!customerType.value) return "—";
|
|
60
|
+
return nuxtApp.$i18n.t(`saas.register.customer_type.${customerType.value}`);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
async function load(): Promise<void> {
|
|
64
|
+
isLoading.value = true;
|
|
65
|
+
loadFailed.value = false;
|
|
66
|
+
try {
|
|
67
|
+
const info = await $authFetch<BillingInfoResponse>(BILLING_INFO_ENDPOINT);
|
|
68
|
+
customerType.value = info.customerType;
|
|
69
|
+
companyName.value = info.companyName ?? "";
|
|
70
|
+
vatNumber.value = info.vatNumber ?? "";
|
|
71
|
+
vatVerificationStatus.value = info.vatVerificationStatus;
|
|
72
|
+
billingEmail.value = info.billingEmail ?? "";
|
|
73
|
+
country.value = info.address?.country ?? "";
|
|
74
|
+
addressLine1.value = info.address?.line1 ?? "";
|
|
75
|
+
postalCode.value = info.address?.postalCode ?? "";
|
|
76
|
+
city.value = info.address?.city ?? "";
|
|
77
|
+
} catch {
|
|
78
|
+
loadFailed.value = true;
|
|
79
|
+
} finally {
|
|
80
|
+
isLoading.value = false;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
async function save(): Promise<void> {
|
|
85
|
+
isSaving.value = true;
|
|
86
|
+
try {
|
|
87
|
+
const updated = await $authFetch<BillingInfoResponse>(
|
|
88
|
+
BILLING_INFO_ENDPOINT,
|
|
89
|
+
{
|
|
90
|
+
method: "PUT",
|
|
91
|
+
body: {
|
|
92
|
+
companyName: isBusiness.value ? companyName.value : undefined,
|
|
93
|
+
vatNumber: isBusiness.value ? vatNumber.value : undefined,
|
|
94
|
+
billingEmail: billingEmail.value || null,
|
|
95
|
+
address: {
|
|
96
|
+
country: country.value || undefined,
|
|
97
|
+
line1: addressLine1.value || undefined,
|
|
98
|
+
postalCode: postalCode.value || undefined,
|
|
99
|
+
city: city.value || undefined,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
);
|
|
104
|
+
customerType.value = updated.customerType;
|
|
105
|
+
vatVerificationStatus.value = updated.vatVerificationStatus;
|
|
106
|
+
toast.add({
|
|
107
|
+
title: nuxtApp.$i18n.t("saas.workspace.billing.info_saved"),
|
|
108
|
+
color: "success",
|
|
109
|
+
icon: "i-ph-check-circle",
|
|
110
|
+
});
|
|
111
|
+
} catch (error) {
|
|
112
|
+
toast.add({
|
|
113
|
+
title: resolveApiError(error, "saas.workspace.billing.info_save_error"),
|
|
114
|
+
color: "error",
|
|
115
|
+
icon: "i-ph-warning-circle",
|
|
116
|
+
});
|
|
117
|
+
} finally {
|
|
118
|
+
isSaving.value = false;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
onMounted(() => {
|
|
123
|
+
void loadBillingStatus();
|
|
124
|
+
return load();
|
|
125
|
+
});
|
|
126
|
+
</script>
|
|
127
|
+
|
|
128
|
+
<template>
|
|
129
|
+
<UCard>
|
|
130
|
+
<template #header>
|
|
131
|
+
<div>
|
|
132
|
+
<h3 class="font-semibold">
|
|
133
|
+
{{ $t("saas.workspace.billing.info_title") }}
|
|
134
|
+
</h3>
|
|
135
|
+
<p class="text-muted mt-1 text-sm">
|
|
136
|
+
{{ $t("saas.workspace.billing.info_description") }}
|
|
137
|
+
</p>
|
|
138
|
+
</div>
|
|
139
|
+
</template>
|
|
140
|
+
|
|
141
|
+
<div v-if="isLoading" class="flex flex-col gap-3">
|
|
142
|
+
<USkeleton class="h-10 w-full" />
|
|
143
|
+
<USkeleton class="h-10 w-full" />
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
<DmsSaasLoadFailure v-else-if="loadFailed" @retry="load" />
|
|
147
|
+
|
|
148
|
+
<form v-else class="flex flex-col gap-4" @submit.prevent="save">
|
|
149
|
+
<UFormField :label="$t('saas.register.customer_type.label')">
|
|
150
|
+
<UBadge color="neutral" variant="subtle">
|
|
151
|
+
{{ customerTypeLabel }}
|
|
152
|
+
</UBadge>
|
|
153
|
+
</UFormField>
|
|
154
|
+
|
|
155
|
+
<template v-if="isBusiness">
|
|
156
|
+
<UFormField :label="$t('saas.register.field.company_name')">
|
|
157
|
+
<UInput v-model="companyName" class="w-full" />
|
|
158
|
+
</UFormField>
|
|
159
|
+
<UFormField :label="$t('saas.register.field.vat_number')">
|
|
160
|
+
<div class="flex flex-wrap items-center gap-2">
|
|
161
|
+
<UInput v-model="vatNumber" class="min-w-40 grow" />
|
|
162
|
+
<UBadge
|
|
163
|
+
v-if="vatVerificationStatus"
|
|
164
|
+
:color="VAT_BADGE_COLORS[vatVerificationStatus]"
|
|
165
|
+
variant="subtle"
|
|
166
|
+
>
|
|
167
|
+
{{ $t(`saas.workspace.billing.vat.${vatVerificationStatus}`) }}
|
|
168
|
+
</UBadge>
|
|
169
|
+
</div>
|
|
170
|
+
</UFormField>
|
|
171
|
+
</template>
|
|
172
|
+
|
|
173
|
+
<h4 class="font-semibold">{{ $t("saas.register.billing_address") }}</h4>
|
|
174
|
+
<UFormField :label="$t('saas.register.field.country')">
|
|
175
|
+
<USelect v-model="country" :items="countryItems" class="w-full" />
|
|
176
|
+
</UFormField>
|
|
177
|
+
<UFormField :label="$t('saas.register.field.address_line1')">
|
|
178
|
+
<UInput v-model="addressLine1" class="w-full" />
|
|
179
|
+
</UFormField>
|
|
180
|
+
<div class="grid grid-cols-2 gap-4">
|
|
181
|
+
<UFormField :label="$t('saas.register.field.postal_code')">
|
|
182
|
+
<UInput v-model="postalCode" class="w-full" />
|
|
183
|
+
</UFormField>
|
|
184
|
+
<UFormField :label="$t('saas.register.field.city')">
|
|
185
|
+
<UInput v-model="city" class="w-full" />
|
|
186
|
+
</UFormField>
|
|
187
|
+
</div>
|
|
188
|
+
|
|
189
|
+
<UFormField
|
|
190
|
+
:label="$t('saas.workspace.billing.billing_email.label')"
|
|
191
|
+
:description="$t('saas.workspace.billing.billing_email.hint')"
|
|
192
|
+
>
|
|
193
|
+
<UInput v-model="billingEmail" type="email" class="w-full" />
|
|
194
|
+
</UFormField>
|
|
195
|
+
|
|
196
|
+
<div v-if="isTenantOwner" class="flex justify-end">
|
|
197
|
+
<UButton
|
|
198
|
+
type="submit"
|
|
199
|
+
color="primary"
|
|
200
|
+
icon="i-ph-floppy-disk"
|
|
201
|
+
:loading="isSaving"
|
|
202
|
+
>
|
|
203
|
+
{{ $t("saas.workspace.billing.info_save") }}
|
|
204
|
+
</UButton>
|
|
205
|
+
</div>
|
|
206
|
+
</form>
|
|
207
|
+
</UCard>
|
|
208
|
+
</template>
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, onMounted, ref } from "vue";
|
|
3
|
+
|
|
4
|
+
const FREE_PLAN_PRICE = 0;
|
|
5
|
+
const FULL_DATE_FORMAT: Intl.DateTimeFormatOptions = {
|
|
6
|
+
year: "numeric",
|
|
7
|
+
month: "long",
|
|
8
|
+
day: "numeric",
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const toast = useToast();
|
|
12
|
+
const { resolveApiError } = useApiErrorMessage();
|
|
13
|
+
const {
|
|
14
|
+
load,
|
|
15
|
+
refresh: refetchPlan,
|
|
16
|
+
error: loadError,
|
|
17
|
+
cancelPendingChange,
|
|
18
|
+
} = useTenantPlan();
|
|
19
|
+
const { data: billingStatus, load: loadBillingStatus } = useBillingStatus();
|
|
20
|
+
const { formatMajorUnits } = useMoneyFormat();
|
|
21
|
+
const { t, locale } = useI18n();
|
|
22
|
+
const planIntervalLabel = usePlanIntervalLabel("saas.workspace.plan.interval");
|
|
23
|
+
|
|
24
|
+
const data = ref<TenantPlanResponse | null>(null);
|
|
25
|
+
const isLoading = ref(true);
|
|
26
|
+
const isCancelling = ref(false);
|
|
27
|
+
const isComparisonOpen = ref(false);
|
|
28
|
+
|
|
29
|
+
const current = computed(() => data.value?.current ?? null);
|
|
30
|
+
const pendingPlan = computed(() => data.value?.pendingPlan ?? null);
|
|
31
|
+
const isPaid = computed(() => (current.value?.price ?? 0) > FREE_PLAN_PRICE);
|
|
32
|
+
|
|
33
|
+
/** The card is readable on a blocked workspace's billing page, but plan
|
|
34
|
+
* mutations stay gated server-side: settling the invoice comes first. */
|
|
35
|
+
const isAccessBlocked = computed(
|
|
36
|
+
() =>
|
|
37
|
+
isBlockingSubscriptionStatus(data.value?.status) &&
|
|
38
|
+
!data.value?.canRecoverComplimentary,
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
/** Plan mutations are owner-only server-side; a member gets the read-only
|
|
42
|
+
* card instead of buttons that can only end in a 403 toast. */
|
|
43
|
+
const isTenantOwner = computed(() => !!billingStatus.value?.isTenantOwner);
|
|
44
|
+
|
|
45
|
+
function formatDay(value: string | null | undefined): string | null {
|
|
46
|
+
return formatDate(value, locale.value, FULL_DATE_FORMAT);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const renewalDate = computed(() => formatDay(data.value?.currentPeriodEnd));
|
|
50
|
+
|
|
51
|
+
const pendingDowngradeLabel = computed(() => {
|
|
52
|
+
const pending = pendingPlan.value;
|
|
53
|
+
if (!pending) return null;
|
|
54
|
+
const date = formatDay(pending.effectiveAt);
|
|
55
|
+
return date
|
|
56
|
+
? t("saas.workspace.plan.pending_downgrade_on", {
|
|
57
|
+
plan: pending.planName,
|
|
58
|
+
date,
|
|
59
|
+
})
|
|
60
|
+
: t("saas.workspace.plan.pending_downgrade", { plan: pending.planName });
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
/** A workspace still on Free is being asked to convert, not to switch: the
|
|
64
|
+
* button carries the primary weight and different copy. */
|
|
65
|
+
const changeAction = computed(() =>
|
|
66
|
+
isPaid.value
|
|
67
|
+
? { color: "neutral" as const, variant: "subtle" as const, key: "change" }
|
|
68
|
+
: { color: "primary" as const, variant: "solid" as const, key: "go_paid" },
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
const priceLabel = computed(() =>
|
|
72
|
+
current.value
|
|
73
|
+
? formatMajorUnits(current.value.price, current.value.currency)
|
|
74
|
+
: "",
|
|
75
|
+
);
|
|
76
|
+
const currentIntervalLabel = computed(() =>
|
|
77
|
+
current.value ? planIntervalLabel(current.value.interval) : "",
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
async function fetchPlan(force: boolean): Promise<void> {
|
|
81
|
+
isLoading.value = true;
|
|
82
|
+
try {
|
|
83
|
+
data.value = force ? await refetchPlan() : await load();
|
|
84
|
+
} finally {
|
|
85
|
+
isLoading.value = false;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function refresh(): Promise<void> {
|
|
90
|
+
return fetchPlan(true);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
async function cancelDowngrade(): Promise<void> {
|
|
94
|
+
isCancelling.value = true;
|
|
95
|
+
try {
|
|
96
|
+
await cancelPendingChange();
|
|
97
|
+
toast.add({
|
|
98
|
+
title: t("saas.workspace.plan.downgrade_cancelled"),
|
|
99
|
+
color: "success",
|
|
100
|
+
icon: "i-ph-check-circle",
|
|
101
|
+
});
|
|
102
|
+
await refresh();
|
|
103
|
+
} catch (error) {
|
|
104
|
+
toast.add({
|
|
105
|
+
title: resolveApiError(error, "saas.workspace.plan.change_error"),
|
|
106
|
+
color: "error",
|
|
107
|
+
icon: "i-ph-warning-circle",
|
|
108
|
+
});
|
|
109
|
+
} finally {
|
|
110
|
+
isCancelling.value = false;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
onMounted(() => {
|
|
115
|
+
void loadBillingStatus();
|
|
116
|
+
return fetchPlan(false);
|
|
117
|
+
});
|
|
118
|
+
</script>
|
|
119
|
+
|
|
120
|
+
<template>
|
|
121
|
+
<UCard>
|
|
122
|
+
<template #header>
|
|
123
|
+
<div class="flex flex-wrap items-center gap-2">
|
|
124
|
+
<h3 class="font-semibold">
|
|
125
|
+
{{ $t("saas.workspace.plan.current") }}
|
|
126
|
+
</h3>
|
|
127
|
+
<UBadge v-if="pendingDowngradeLabel" color="warning" variant="subtle">
|
|
128
|
+
{{ pendingDowngradeLabel }}
|
|
129
|
+
</UBadge>
|
|
130
|
+
</div>
|
|
131
|
+
</template>
|
|
132
|
+
|
|
133
|
+
<div v-if="isLoading" class="flex flex-col gap-3">
|
|
134
|
+
<USkeleton class="h-8 w-48" />
|
|
135
|
+
<USkeleton class="h-4 w-full" />
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
<DmsSaasLoadFailure v-else-if="loadError && !data" @retry="refresh" />
|
|
139
|
+
|
|
140
|
+
<div v-else-if="data" class="flex flex-col gap-4">
|
|
141
|
+
<div class="flex flex-wrap items-start gap-4">
|
|
142
|
+
<div class="min-w-60 grow">
|
|
143
|
+
<h2 class="text-lg font-semibold">
|
|
144
|
+
{{ current?.name ?? $t("saas.workspace.plan.none") }}
|
|
145
|
+
</h2>
|
|
146
|
+
<p v-if="current?.description" class="text-muted mt-1 text-sm">
|
|
147
|
+
{{ current.description }}
|
|
148
|
+
</p>
|
|
149
|
+
</div>
|
|
150
|
+
<div v-if="current" class="text-right">
|
|
151
|
+
<span class="text-2xl font-semibold tabular-nums">
|
|
152
|
+
{{ priceLabel }}
|
|
153
|
+
</span>
|
|
154
|
+
<span v-if="currentIntervalLabel" class="text-muted text-sm">
|
|
155
|
+
/{{ currentIntervalLabel }}
|
|
156
|
+
</span>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
<div
|
|
161
|
+
v-if="data.isComplimentary && current"
|
|
162
|
+
class="border-default border-t pt-4 text-sm"
|
|
163
|
+
>
|
|
164
|
+
<div class="flex justify-between gap-4">
|
|
165
|
+
<span>{{ $t("saas.admission.complimentary_reduction") }}</span>
|
|
166
|
+
<span class="tabular-nums">−{{ priceLabel }}</span>
|
|
167
|
+
</div>
|
|
168
|
+
<div class="mt-2 flex justify-between gap-4 font-semibold">
|
|
169
|
+
<span>{{ $t("saas.admission.total") }}</span>
|
|
170
|
+
<span class="tabular-nums">{{
|
|
171
|
+
formatMajorUnits(0, current.currency)
|
|
172
|
+
}}</span>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
|
|
176
|
+
<p
|
|
177
|
+
v-if="renewalDate && isPaid && !data.isComplimentary"
|
|
178
|
+
class="text-muted text-sm"
|
|
179
|
+
>
|
|
180
|
+
{{ $t("saas.workspace.plan.next_renewal", { date: renewalDate }) }}
|
|
181
|
+
</p>
|
|
182
|
+
|
|
183
|
+
<p v-if="isAccessBlocked" class="text-muted text-sm">
|
|
184
|
+
{{ $t("saas.workspace.plan.blocked_hint") }}
|
|
185
|
+
</p>
|
|
186
|
+
|
|
187
|
+
<p v-else-if="data.isPlanChangeLocked" class="text-muted text-sm">
|
|
188
|
+
{{ $t("saas.admission.plan_managed") }}
|
|
189
|
+
</p>
|
|
190
|
+
|
|
191
|
+
<div v-else-if="isTenantOwner" class="flex flex-wrap gap-2">
|
|
192
|
+
<UButton
|
|
193
|
+
v-if="pendingPlan"
|
|
194
|
+
color="neutral"
|
|
195
|
+
variant="subtle"
|
|
196
|
+
icon="i-ph-arrow-u-up-left"
|
|
197
|
+
:loading="isCancelling"
|
|
198
|
+
@click="cancelDowngrade"
|
|
199
|
+
>
|
|
200
|
+
{{ $t("saas.workspace.plan.cancel_downgrade") }}
|
|
201
|
+
</UButton>
|
|
202
|
+
<UButton
|
|
203
|
+
:color="changeAction.color"
|
|
204
|
+
:variant="changeAction.variant"
|
|
205
|
+
icon="i-ph-stack"
|
|
206
|
+
@click="isComparisonOpen = true"
|
|
207
|
+
>
|
|
208
|
+
{{ $t(`saas.workspace.plan.${changeAction.key}`) }}
|
|
209
|
+
</UButton>
|
|
210
|
+
</div>
|
|
211
|
+
|
|
212
|
+
<DmsSaasPlanComparisonModal
|
|
213
|
+
v-model:open="isComparisonOpen"
|
|
214
|
+
:plans="data.available"
|
|
215
|
+
:features="data.features"
|
|
216
|
+
:current-plan-id="current?._id ?? null"
|
|
217
|
+
:pending-plan-id="pendingPlan?.planId ?? null"
|
|
218
|
+
:is-recovery="data.canRecoverComplimentary"
|
|
219
|
+
@changed="refresh"
|
|
220
|
+
/>
|
|
221
|
+
</div>
|
|
222
|
+
</UCard>
|
|
223
|
+
</template>
|