@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,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OperatorActionModel = void 0;
|
|
4
|
+
const node_crypto_1 = require("node:crypto");
|
|
5
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
6
|
+
const operator_action_table_1 = require("./operator-action.table");
|
|
7
|
+
class OperatorActionModel extends (0, interface_database_decorators_1.BasicDataModel)(operator_action_table_1.OperatorAction, operator_action_table_1.operatorActionsTableName) {
|
|
8
|
+
async beginAttempt(current) {
|
|
9
|
+
if (!["pending", "failed"].includes(current.status))
|
|
10
|
+
throw new Error("Operator action requires reconciliation");
|
|
11
|
+
return this.mutate(current, {
|
|
12
|
+
status: "running",
|
|
13
|
+
attemptCount: current.attemptCount + 1,
|
|
14
|
+
startedAt: new Date(),
|
|
15
|
+
completedAt: null,
|
|
16
|
+
lastErrorCode: null,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async markSucceeded(current, outcome) {
|
|
20
|
+
return this.mutate(current, {
|
|
21
|
+
status: "succeeded",
|
|
22
|
+
...outcome,
|
|
23
|
+
completedAt: new Date(),
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
async markFailed(current, errorCode) {
|
|
27
|
+
return this.mutate(current, {
|
|
28
|
+
status: "failed",
|
|
29
|
+
lastErrorCode: errorCode,
|
|
30
|
+
completedAt: new Date(),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
async markReconciliationRequired(current, errorCode) {
|
|
34
|
+
return this.mutate(current, {
|
|
35
|
+
status: "reconciliation_required",
|
|
36
|
+
lastErrorCode: errorCode,
|
|
37
|
+
completedAt: new Date(),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
async updateDetails(current, details) {
|
|
41
|
+
return this.mutate(current, { details });
|
|
42
|
+
}
|
|
43
|
+
async mutate(current, patch) {
|
|
44
|
+
const revision = (0, node_crypto_1.randomUUID)();
|
|
45
|
+
const updatedAt = new Date();
|
|
46
|
+
const outcome = await this.table
|
|
47
|
+
.atomicMutation(current._id, {
|
|
48
|
+
type: "update",
|
|
49
|
+
revisionField: "revision",
|
|
50
|
+
expectedRevision: current.revision === undefined
|
|
51
|
+
? { kind: "missing" }
|
|
52
|
+
: current.revision,
|
|
53
|
+
nextRevision: revision,
|
|
54
|
+
patch: { ...patch, updatedAt },
|
|
55
|
+
})
|
|
56
|
+
.run();
|
|
57
|
+
if (outcome !== "applied")
|
|
58
|
+
throw new Error(`Operator action ${outcome}; reconciliation required`);
|
|
59
|
+
return Object.assign(current, patch, { revision, updatedAt });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.OperatorActionModel = OperatorActionModel;
|
|
63
|
+
//# sourceMappingURL=operator-action.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operator-action.model.js","sourceRoot":"","sources":["../../../src/operator-actions/db/operator-action.model.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AACzC,6FAA2E;AAE3E,mEAGiC;AAQjC,MAAa,mBAAoB,SAAQ,IAAA,8CAAc,EACrD,sCAAc,EACd,gDAAwB,CACzB;IAEC,KAAK,CAAC,YAAY,CAAC,OAAuB;QACxC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;YACjD,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;QAC7D,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;YAC1B,MAAM,EAAE,SAAS;YACjB,YAAY,EAAE,OAAO,CAAC,YAAY,GAAG,CAAC;YACtC,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,WAAW,EAAE,IAAI;YACjB,aAAa,EAAE,IAAI;SACpB,CAAC,CAAC;IACL,CAAC;IAGD,KAAK,CAAC,aAAa,CACjB,OAAuB,EACvB,OAA8B;QAE9B,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;YAC1B,MAAM,EAAE,WAAW;YACnB,GAAG,OAAO;YACV,WAAW,EAAE,IAAI,IAAI,EAAE;SACxB,CAAC,CAAC;IACL,CAAC;IAGD,KAAK,CAAC,UAAU,CACd,OAAuB,EACvB,SAAiB;QAEjB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;YAC1B,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,SAAS;YACxB,WAAW,EAAE,IAAI,IAAI,EAAE;SACxB,CAAC,CAAC;IACL,CAAC;IAGD,KAAK,CAAC,0BAA0B,CAC9B,OAAuB,EACvB,SAAiB;QAEjB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;YAC1B,MAAM,EAAE,yBAAyB;YACjC,aAAa,EAAE,SAAS;YACxB,WAAW,EAAE,IAAI,IAAI,EAAE;SACxB,CAAC,CAAC;IACL,CAAC;IAGD,KAAK,CAAC,aAAa,CACjB,OAAuB,EACvB,OAA8B;QAE9B,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAC3C,CAAC;IAEO,KAAK,CAAC,MAAM,CAClB,OAAuB,EACvB,KAA8B;QAE9B,MAAM,QAAQ,GAAG,IAAA,wBAAU,GAAE,CAAC;QAC9B,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;QAC7B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,KAAK;aAC7B,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE;YAC3B,IAAI,EAAE,QAAQ;YACd,aAAa,EAAE,UAAU;YACzB,gBAAgB,EACd,OAAO,CAAC,QAAQ,KAAK,SAAS;gBAC5B,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE;gBACrB,CAAC,CAAC,OAAO,CAAC,QAAQ;YACtB,YAAY,EAAE,QAAQ;YACtB,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE;SAC/B,CAAC;aACD,GAAG,EAAE,CAAC;QACT,IAAI,OAAO,KAAK,SAAS;YACvB,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,2BAA2B,CAAC,CAAC;QACzE,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC;IAChE,CAAC;CACF;AAnFD,kDAmFC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Table } from "@antelopejs/interface-database-decorators";
|
|
2
|
+
import type { OperatorActionDetails, OperatorActionStatus, WorkspaceOperatorAction } from "../types";
|
|
3
|
+
export declare const operatorActionsTableName = "saas_operator_actions";
|
|
4
|
+
export declare class OperatorAction extends Table {
|
|
5
|
+
_id: string;
|
|
6
|
+
tenantId: string;
|
|
7
|
+
actorId: string;
|
|
8
|
+
actorEmail: string;
|
|
9
|
+
action: WorkspaceOperatorAction;
|
|
10
|
+
status: OperatorActionStatus;
|
|
11
|
+
requestFingerprint: string;
|
|
12
|
+
details: OperatorActionDetails;
|
|
13
|
+
attemptCount: number;
|
|
14
|
+
revision?: string;
|
|
15
|
+
lastErrorCode: string | null;
|
|
16
|
+
effectiveAt: Date | null;
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
startedAt: Date | null;
|
|
19
|
+
completedAt: Date | null;
|
|
20
|
+
updatedAt: Date;
|
|
21
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.OperatorAction = exports.operatorActionsTableName = void 0;
|
|
13
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
14
|
+
const constants_1 = require("@antelopejs/interface-dms/constants");
|
|
15
|
+
const tenants_table_1 = require("@antelopejs/interface-dms/db/tables/tenants.table");
|
|
16
|
+
exports.operatorActionsTableName = "saas_operator_actions";
|
|
17
|
+
let OperatorAction = class OperatorAction extends interface_database_decorators_1.Table {
|
|
18
|
+
};
|
|
19
|
+
exports.OperatorAction = OperatorAction;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], OperatorAction.prototype, "_id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, interface_database_decorators_1.Index)(),
|
|
26
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
27
|
+
(0, interface_database_decorators_1.Relation)({ to: () => tenants_table_1.Tenant }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], OperatorAction.prototype, "tenantId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, interface_database_decorators_1.Index)(),
|
|
32
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], OperatorAction.prototype, "actorId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], OperatorAction.prototype, "actorEmail", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, interface_database_decorators_1.Index)(),
|
|
41
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], OperatorAction.prototype, "action", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, interface_database_decorators_1.Index)(),
|
|
46
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], OperatorAction.prototype, "status", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], OperatorAction.prototype, "requestFingerprint", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, interface_database_decorators_1.Field)("any"),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], OperatorAction.prototype, "details", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, interface_database_decorators_1.Field)("number"),
|
|
59
|
+
__metadata("design:type", Number)
|
|
60
|
+
], OperatorAction.prototype, "attemptCount", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], OperatorAction.prototype, "revision", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], OperatorAction.prototype, "lastErrorCode", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
71
|
+
__metadata("design:type", Object)
|
|
72
|
+
], OperatorAction.prototype, "effectiveAt", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, interface_database_decorators_1.CreationTime)(),
|
|
75
|
+
(0, interface_database_decorators_1.Index)(),
|
|
76
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
77
|
+
__metadata("design:type", Date)
|
|
78
|
+
], OperatorAction.prototype, "createdAt", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
81
|
+
__metadata("design:type", Object)
|
|
82
|
+
], OperatorAction.prototype, "startedAt", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
85
|
+
__metadata("design:type", Object)
|
|
86
|
+
], OperatorAction.prototype, "completedAt", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, interface_database_decorators_1.UpdateTime)(),
|
|
89
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
90
|
+
__metadata("design:type", Date)
|
|
91
|
+
], OperatorAction.prototype, "updatedAt", void 0);
|
|
92
|
+
exports.OperatorAction = OperatorAction = __decorate([
|
|
93
|
+
(0, interface_database_decorators_1.RegisterTable)(exports.operatorActionsTableName, constants_1.CORE_SCHEMA_NAME)
|
|
94
|
+
], OperatorAction);
|
|
95
|
+
//# sourceMappingURL=operator-action.table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operator-action.table.js","sourceRoot":"","sources":["../../../src/operator-actions/db/operator-action.table.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6FAQmD;AACnD,mEAAuE;AACvE,qFAA2E;AAO9D,QAAA,wBAAwB,GAAG,uBAAuB,CAAC;AAGzD,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,qCAAK;CAwDxC,CAAA;AAxDY,wCAAc;AAEjB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;2CACI;AAKZ;IAHP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,QAAQ,CAAC;IACf,IAAA,wCAAQ,EAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,sBAAM,EAAE,CAAC;;gDACN;AAIjB;IAFP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;+CACQ;AAGhB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;kDACW;AAInB;IAFP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;8CACwB;AAIhC;IAFP,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;8CACqB;AAG7B;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;0DACmB;AAG3B;IADP,IAAA,qCAAK,EAAC,KAAK,CAAC;;+CAC0B;AAG/B;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;oDACa;AAGrB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;gDACU;AAGlB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;qDACqB;AAG7B;IADP,IAAA,qCAAK,EAAC,MAAM,CAAC;;mDACmB;AAKzB;IAHP,IAAA,4CAAY,GAAE;IACd,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;iDAAC;AAGhB;IADP,IAAA,qCAAK,EAAC,MAAM,CAAC;;iDACiB;AAGvB;IADP,IAAA,qCAAK,EAAC,MAAM,CAAC;;mDACmB;AAIzB;IAFP,IAAA,0CAAU,GAAE;IACZ,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;iDAAC;yBAvDb,cAAc;IAD1B,IAAA,6CAAa,EAAC,gCAAwB,EAAE,4BAAgB,CAAC;GAC7C,cAAc,CAwD1B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./commands"), exports);
|
|
18
|
+
__exportStar(require("./journal"), exports);
|
|
19
|
+
__exportStar(require("./lifecycle-outbox"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/operator-actions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,qDAAmC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { OperatorActionModel, type OperatorActionSuccess } from "./db/operator-action.model";
|
|
2
|
+
import type { OperatorAction } from "./db/operator-action.table";
|
|
3
|
+
import type { OperatorActionDetails, OperatorCommandResult, WorkspaceOperatorAction } from "./types";
|
|
4
|
+
export declare const CUSTOMER_BALANCE_CREDIT_SAFE_RETRY_WINDOW_MS: number;
|
|
5
|
+
export interface OperatorActor {
|
|
6
|
+
id: string;
|
|
7
|
+
email: string;
|
|
8
|
+
}
|
|
9
|
+
export interface OperatorActionRequest {
|
|
10
|
+
operationId: string;
|
|
11
|
+
tenantId: string;
|
|
12
|
+
actor: OperatorActor;
|
|
13
|
+
action: WorkspaceOperatorAction;
|
|
14
|
+
details: OperatorActionDetails;
|
|
15
|
+
}
|
|
16
|
+
export type OperatorActionEffect = (action: OperatorAction) => Promise<OperatorActionSuccess>;
|
|
17
|
+
export declare function operatorActionFingerprint(request: OperatorActionRequest): string;
|
|
18
|
+
export declare function assertOperationId(operationId: string): void;
|
|
19
|
+
export declare function ensureOperatorActionIntent(model: OperatorActionModel, request: OperatorActionRequest): Promise<OperatorAction>;
|
|
20
|
+
export declare function executeOperatorAction(request: OperatorActionRequest, effect: OperatorActionEffect): Promise<OperatorAction>;
|
|
21
|
+
export declare function toOperatorCommandResult(action: OperatorAction): OperatorCommandResult;
|
|
22
|
+
export declare function checkpointOperatorActionDetails(action: OperatorAction, patch: OperatorActionDetails): Promise<void>;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CUSTOMER_BALANCE_CREDIT_SAFE_RETRY_WINDOW_MS = void 0;
|
|
4
|
+
exports.operatorActionFingerprint = operatorActionFingerprint;
|
|
5
|
+
exports.assertOperationId = assertOperationId;
|
|
6
|
+
exports.ensureOperatorActionIntent = ensureOperatorActionIntent;
|
|
7
|
+
exports.executeOperatorAction = executeOperatorAction;
|
|
8
|
+
exports.toOperatorCommandResult = toOperatorCommandResult;
|
|
9
|
+
exports.checkpointOperatorActionDetails = checkpointOperatorActionDetails;
|
|
10
|
+
const node_crypto_1 = require("node:crypto");
|
|
11
|
+
const interface_api_1 = require("@antelopejs/interface-api");
|
|
12
|
+
const interface_api_util_1 = require("@antelopejs/interface-api-util");
|
|
13
|
+
const logging_1 = require("@antelopejs/interface-core/logging");
|
|
14
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
15
|
+
const db_1 = require("../db");
|
|
16
|
+
const operator_action_model_1 = require("./db/operator-action.model");
|
|
17
|
+
const HTTP_BAD_REQUEST = 400;
|
|
18
|
+
const HTTP_CONFLICT = 409;
|
|
19
|
+
const HTTP_BAD_GATEWAY = 502;
|
|
20
|
+
const HOUR_MS = 60 * 60 * 1000;
|
|
21
|
+
const STRIPE_MINIMUM_IDEMPOTENCY_RETENTION_MS = 24 * HOUR_MS;
|
|
22
|
+
const STRIPE_IDEMPOTENCY_SAFETY_MARGIN_MS = HOUR_MS;
|
|
23
|
+
const OPERATION_ID_PATTERN = /^[A-Za-z0-9-]{8,64}$/;
|
|
24
|
+
const GENERIC_FAILURE_CODE = "saas.errors.operator.external_effect_failed";
|
|
25
|
+
const RECONCILIATION_REQUIRED_CODE = "saas.errors.operator.reconciliation_required";
|
|
26
|
+
exports.CUSTOMER_BALANCE_CREDIT_SAFE_RETRY_WINDOW_MS = STRIPE_MINIMUM_IDEMPOTENCY_RETENTION_MS - STRIPE_IDEMPOTENCY_SAFETY_MARGIN_MS;
|
|
27
|
+
function canonicalize(value) {
|
|
28
|
+
if (value === null ||
|
|
29
|
+
["boolean", "number", "string"].includes(typeof value)) {
|
|
30
|
+
return value;
|
|
31
|
+
}
|
|
32
|
+
if (Array.isArray(value))
|
|
33
|
+
return value.map(canonicalize);
|
|
34
|
+
const entries = Object.entries(value)
|
|
35
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
36
|
+
.map(([key, entry]) => [key, canonicalize(entry)]);
|
|
37
|
+
return Object.fromEntries(entries);
|
|
38
|
+
}
|
|
39
|
+
function operatorActionFingerprint(request) {
|
|
40
|
+
const payload = canonicalize({
|
|
41
|
+
tenantId: request.tenantId,
|
|
42
|
+
action: request.action,
|
|
43
|
+
details: request.details,
|
|
44
|
+
});
|
|
45
|
+
return (0, node_crypto_1.createHash)("sha256").update(JSON.stringify(payload)).digest("hex");
|
|
46
|
+
}
|
|
47
|
+
function assertOperationId(operationId) {
|
|
48
|
+
(0, interface_api_util_1.assert)(OPERATION_ID_PATTERN.test(operationId), HTTP_BAD_REQUEST, "saas.errors.operator.invalid_operation_id");
|
|
49
|
+
}
|
|
50
|
+
async function insertIntent(model, request, fingerprint) {
|
|
51
|
+
const now = new Date();
|
|
52
|
+
await model.insert({
|
|
53
|
+
_id: request.operationId,
|
|
54
|
+
tenantId: request.tenantId,
|
|
55
|
+
actorId: request.actor.id,
|
|
56
|
+
actorEmail: request.actor.email,
|
|
57
|
+
action: request.action,
|
|
58
|
+
status: "pending",
|
|
59
|
+
requestFingerprint: fingerprint,
|
|
60
|
+
details: request.details,
|
|
61
|
+
attemptCount: 0,
|
|
62
|
+
revision: (0, node_crypto_1.randomUUID)(),
|
|
63
|
+
lastErrorCode: null,
|
|
64
|
+
effectiveAt: null,
|
|
65
|
+
createdAt: now,
|
|
66
|
+
startedAt: null,
|
|
67
|
+
completedAt: null,
|
|
68
|
+
updatedAt: now,
|
|
69
|
+
});
|
|
70
|
+
const inserted = await model.get(request.operationId);
|
|
71
|
+
if (!inserted)
|
|
72
|
+
throw new Error("Operator action intent was not persisted");
|
|
73
|
+
return inserted;
|
|
74
|
+
}
|
|
75
|
+
async function ensureOperatorActionIntent(model, request) {
|
|
76
|
+
assertOperationId(request.operationId);
|
|
77
|
+
const fingerprint = operatorActionFingerprint(request);
|
|
78
|
+
try {
|
|
79
|
+
return await insertIntent(model, request, fingerprint);
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
const existing = await model.get(request.operationId);
|
|
83
|
+
if (!existing)
|
|
84
|
+
throw error;
|
|
85
|
+
(0, interface_api_util_1.assert)(existing.requestFingerprint === fingerprint, HTTP_CONFLICT, "saas.errors.operator.idempotency_mismatch");
|
|
86
|
+
return existing;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function errorCodeOf(error) {
|
|
90
|
+
if (!(error instanceof interface_api_1.HTTPResult))
|
|
91
|
+
return GENERIC_FAILURE_CODE;
|
|
92
|
+
const body = error.getBody();
|
|
93
|
+
return typeof body === "string" && body.startsWith("saas.errors.")
|
|
94
|
+
? body
|
|
95
|
+
: GENERIC_FAILURE_CODE;
|
|
96
|
+
}
|
|
97
|
+
function throwSafeActionError(error, operationId) {
|
|
98
|
+
if (error instanceof interface_api_1.HTTPResult &&
|
|
99
|
+
errorCodeOf(error) !== GENERIC_FAILURE_CODE) {
|
|
100
|
+
throw error;
|
|
101
|
+
}
|
|
102
|
+
logging_1.Logging.Error(`[dms-saas:operator] operation ${operationId} failed`, error);
|
|
103
|
+
throw new interface_api_1.HTTPResult(HTTP_BAD_GATEWAY, GENERIC_FAILURE_CODE);
|
|
104
|
+
}
|
|
105
|
+
async function isRetryableValidationFailure(action, error) {
|
|
106
|
+
if (!(error instanceof interface_api_1.HTTPResult))
|
|
107
|
+
return false;
|
|
108
|
+
try {
|
|
109
|
+
const subscription = await (0, interface_database_decorators_1.GetModel)(db_1.TenantSubscriptionModel, action.tenantId).findOne();
|
|
110
|
+
return subscription?.domainTransition?.operationId !== action._id;
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
async function failAction(model, action, error) {
|
|
117
|
+
const failure = (await isRetryableValidationFailure(action, error))
|
|
118
|
+
? model.markFailed(action, errorCodeOf(error))
|
|
119
|
+
: model.markReconciliationRequired(action, RECONCILIATION_REQUIRED_CODE);
|
|
120
|
+
await failure.catch(() => { });
|
|
121
|
+
throwSafeActionError(error, action._id);
|
|
122
|
+
}
|
|
123
|
+
async function runEffect(model, action, effect) {
|
|
124
|
+
try {
|
|
125
|
+
const outcome = await effect(action);
|
|
126
|
+
await model.markSucceeded(action, outcome);
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
return failAction(model, action, error);
|
|
130
|
+
}
|
|
131
|
+
const completed = await model.get(action._id);
|
|
132
|
+
if (!completed)
|
|
133
|
+
throw new Error("Completed operator action is missing");
|
|
134
|
+
await completeSubscriptionIntent(completed);
|
|
135
|
+
return completed;
|
|
136
|
+
}
|
|
137
|
+
async function completeSubscriptionIntent(action) {
|
|
138
|
+
if (action.status !== "succeeded")
|
|
139
|
+
return;
|
|
140
|
+
if (action.action === "customer_balance.credit")
|
|
141
|
+
return;
|
|
142
|
+
const subscriptions = (0, interface_database_decorators_1.GetModel)(db_1.TenantSubscriptionModel, action.tenantId);
|
|
143
|
+
const subscription = await subscriptions.findOne();
|
|
144
|
+
if (subscription?.domainTransition?.operationId !== action._id)
|
|
145
|
+
return;
|
|
146
|
+
await subscriptions.completeTransition(subscription._id, action._id, {});
|
|
147
|
+
}
|
|
148
|
+
async function blockUnsafeRetry(model, action) {
|
|
149
|
+
const expired = action.attemptCount > 0 &&
|
|
150
|
+
Date.now() - action.createdAt.getTime() >=
|
|
151
|
+
exports.CUSTOMER_BALANCE_CREDIT_SAFE_RETRY_WINDOW_MS;
|
|
152
|
+
if (action.status !== "running" && !expired)
|
|
153
|
+
return;
|
|
154
|
+
await model.markReconciliationRequired(action, RECONCILIATION_REQUIRED_CODE);
|
|
155
|
+
throw new interface_api_1.HTTPResult(HTTP_CONFLICT, RECONCILIATION_REQUIRED_CODE);
|
|
156
|
+
}
|
|
157
|
+
async function executeOperatorAction(request, effect) {
|
|
158
|
+
const model = (0, interface_database_decorators_1.GetModel)(operator_action_model_1.OperatorActionModel);
|
|
159
|
+
const action = await ensureOperatorActionIntent(model, request);
|
|
160
|
+
if (action.status === "succeeded") {
|
|
161
|
+
await completeSubscriptionIntent(action);
|
|
162
|
+
return action;
|
|
163
|
+
}
|
|
164
|
+
if (action.status === "reconciliation_required") {
|
|
165
|
+
throw new interface_api_1.HTTPResult(HTTP_CONFLICT, RECONCILIATION_REQUIRED_CODE);
|
|
166
|
+
}
|
|
167
|
+
await blockUnsafeRetry(model, action);
|
|
168
|
+
const running = await model.beginAttempt(action);
|
|
169
|
+
return runEffect(model, running, effect);
|
|
170
|
+
}
|
|
171
|
+
function toOperatorCommandResult(action) {
|
|
172
|
+
return {
|
|
173
|
+
operationId: action._id,
|
|
174
|
+
status: action.status,
|
|
175
|
+
effectiveAt: action.effectiveAt,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
async function checkpointOperatorActionDetails(action, patch) {
|
|
179
|
+
(0, interface_api_util_1.assert)(action.status === "running", HTTP_CONFLICT, "saas.errors.operator.operation_in_progress");
|
|
180
|
+
const details = { ...action.details, ...patch };
|
|
181
|
+
await (0, interface_database_decorators_1.GetModel)(operator_action_model_1.OperatorActionModel).updateDetails(action, details);
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=journal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journal.js","sourceRoot":"","sources":["../../src/operator-actions/journal.ts"],"names":[],"mappings":";;;AA2EA,8DASC;AAED,8CAMC;AA+BD,gEAkBC;AA0FD,sDAgBC;AAED,0DAQC;AAED,0EAWC;AA9QD,6CAAqD;AACrD,6DAAuD;AACvD,uEAAwD;AACxD,gEAA6D;AAC7D,6FAAqE;AACrE,8BAAgD;AAChD,sEAGoC;AAQpC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,OAAO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KAAK,WAAW,EAAE,CAAC;QAClC,MAAM,0BAA0B,CAAC,MAAM,CAAC,CAAC;QACzC,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,yBAAyB,EAAE,CAAC;QAChD,MAAM,IAAI,0BAAU,CAAC,aAAa,EAAE,4BAA4B,CAAC,CAAC;IACpE,CAAC;IACD,MAAM,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IACjD,OAAO,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC;AAED,SAAgB,uBAAuB,CACrC,MAAsB;IAEtB,OAAO;QACL,WAAW,EAAE,MAAM,CAAC,GAAG;QACvB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,WAAW,EAAE,MAAM,CAAC,WAAW;KAChC,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,+BAA+B,CACnD,MAAsB,EACtB,KAA4B;IAE5B,IAAA,2BAAM,EACJ,MAAM,CAAC,MAAM,KAAK,SAAS,EAC3B,aAAa,EACb,4CAA4C,CAC7C,CAAC;IACF,MAAM,OAAO,GAAG,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,KAAK,EAAE,CAAC;IAChD,MAAM,IAAA,wCAAQ,EAAC,2CAAmB,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACrE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { WorkspaceLifecycleConsumer } from "@antelopejs/interface-dms-saas/workspace-lifecycle";
|
|
2
|
+
declare function register(name: string, consumer: WorkspaceLifecycleConsumer): void;
|
|
3
|
+
declare function unregister(name: string): void;
|
|
4
|
+
export declare namespace internal {
|
|
5
|
+
const RegisterWorkspaceLifecycleConsumer: {
|
|
6
|
+
register: typeof register;
|
|
7
|
+
unregister: typeof unregister;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export declare function getWorkspaceLifecycleConsumers(): WorkspaceLifecycleConsumer[];
|
|
11
|
+
export declare function getWorkspaceLifecycleConsumer(name: string): WorkspaceLifecycleConsumer | undefined;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.internal = void 0;
|
|
4
|
+
exports.getWorkspaceLifecycleConsumers = getWorkspaceLifecycleConsumers;
|
|
5
|
+
exports.getWorkspaceLifecycleConsumer = getWorkspaceLifecycleConsumer;
|
|
6
|
+
const logging_1 = require("@antelopejs/interface-core/logging");
|
|
7
|
+
const LOG_PREFIX = "[dms-saas:workspace-lifecycle]";
|
|
8
|
+
const consumers = new Map();
|
|
9
|
+
function register(name, consumer) {
|
|
10
|
+
if (consumers.has(name)) {
|
|
11
|
+
logging_1.Logging.Error(`${LOG_PREFIX} consumer name '${name}' is already taken: the previous consumer is replaced`);
|
|
12
|
+
}
|
|
13
|
+
consumers.set(name, consumer);
|
|
14
|
+
}
|
|
15
|
+
function unregister(name) {
|
|
16
|
+
consumers.delete(name);
|
|
17
|
+
}
|
|
18
|
+
var internal;
|
|
19
|
+
(function (internal) {
|
|
20
|
+
internal.RegisterWorkspaceLifecycleConsumer = { register, unregister };
|
|
21
|
+
})(internal || (exports.internal = internal = {}));
|
|
22
|
+
function getWorkspaceLifecycleConsumers() {
|
|
23
|
+
return [...consumers.values()].sort((left, right) => left.name.localeCompare(right.name));
|
|
24
|
+
}
|
|
25
|
+
function getWorkspaceLifecycleConsumer(name) {
|
|
26
|
+
return consumers.get(name);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=lifecycle-consumers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle-consumers.js","sourceRoot":"","sources":["../../src/operator-actions/lifecycle-consumers.ts"],"names":[],"mappings":";;;AA2BA,wEAIC;AAGD,sEAIC;AAtCD,gEAA6D;AAG7D,MAAM,UAAU,GAAG,gCAAgC,CAAC;AACpD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAsC,CAAC;AAKhE,SAAS,QAAQ,CAAC,IAAY,EAAE,QAAoC;IAClE,IAAI,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,iBAAO,CAAC,KAAK,CACX,GAAG,UAAU,mBAAmB,IAAI,uDAAuD,CAC5F,CAAC;IACJ,CAAC;IACD,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED,IAAiB,QAAQ,CAExB;AAFD,WAAiB,QAAQ;IACV,2CAAkC,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;AAC7E,CAAC,EAFgB,QAAQ,wBAAR,QAAQ,QAExB;AAGD,SAAgB,8BAA8B;IAC5C,OAAO,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAClD,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CACpC,CAAC;AACJ,CAAC;AAGD,SAAgB,6BAA6B,CAC3C,IAAY;IAEZ,OAAO,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { WorkspaceLifecycleTransition } from "@antelopejs/interface-dms-saas/workspace-lifecycle";
|
|
2
|
+
export interface LifecycleDispatchInput {
|
|
3
|
+
tenantId: string;
|
|
4
|
+
operationId: string;
|
|
5
|
+
transition: WorkspaceLifecycleTransition;
|
|
6
|
+
requestedAt: Date;
|
|
7
|
+
}
|
|
8
|
+
export interface LifecycleReconciliationResult {
|
|
9
|
+
delivered: number;
|
|
10
|
+
failed: number;
|
|
11
|
+
waitingForConsumer: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function beginWorkspaceCreation(tenantId: string): Promise<void>;
|
|
14
|
+
export declare function prepareWorkspaceCreated(tenantId: string, invoiceId: string | null): Promise<void>;
|
|
15
|
+
export declare function isWorkspaceProvisioningCommitted(tenantId: string): Promise<boolean>;
|
|
16
|
+
export declare function cancelWorkspaceCreated(tenantId: string): Promise<void>;
|
|
17
|
+
export declare function deliverWorkspaceCreated(tenantId: string): Promise<void>;
|
|
18
|
+
export declare function dispatchWorkspaceLifecycle(input: LifecycleDispatchInput): Promise<void>;
|
|
19
|
+
export declare function reconcileWorkspaceLifecycleDeliveries(): Promise<LifecycleReconciliationResult>;
|