@antelopejs/dms-saas 0.1.8 → 0.2.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/README.md +262 -13
- package/dist/auth/subscription-access-gate.d.ts +1 -1
- package/dist/billing-state/index.d.ts +1 -0
- package/dist/billing-state/index.js +1 -0
- package/dist/billing-state/index.js.map +1 -1
- package/dist/billing-state/past-due-banner.d.ts +4 -0
- package/dist/billing-state/past-due-banner.js +25 -0
- package/dist/billing-state/past-due-banner.js.map +1 -0
- package/dist/config/runtime.d.ts +6 -1
- package/dist/config/runtime.js +50 -1
- package/dist/config/runtime.js.map +1 -1
- package/dist/crons/recompute-billing-state.js +4 -1
- package/dist/crons/recompute-billing-state.js.map +1 -1
- package/dist/data-api/platformOwner/index.d.ts +1 -0
- package/dist/data-api/platformOwner/index.js +1 -0
- package/dist/data-api/platformOwner/index.js.map +1 -1
- package/dist/data-api/platformOwner/invitations.d.ts +22 -0
- package/dist/data-api/platformOwner/invitations.js +121 -0
- package/dist/data-api/platformOwner/invitations.js.map +1 -0
- package/dist/data-api/platformOwner/workspaces.d.ts +3 -0
- package/dist/data-api/platformOwner/workspaces.js +64 -12
- package/dist/data-api/platformOwner/workspaces.js.map +1 -1
- package/dist/data-api/tenant/tenant-invoices.js +2 -10
- package/dist/data-api/tenant/tenant-invoices.js.map +1 -1
- package/dist/hooks/register.js +2 -1
- package/dist/hooks/register.js.map +1 -1
- package/dist/implementations/dms-saas/billing.d.ts +2 -1
- package/dist/implementations/dms-saas/billing.js +6 -0
- package/dist/implementations/dms-saas/billing.js.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/invoice-line-items/injection.d.ts +10 -0
- package/dist/invoice-line-items/injection.js +7 -3
- package/dist/invoice-line-items/injection.js.map +1 -1
- package/dist/notifications/subjects.d.ts +19 -19
- package/dist/operator-actions/index.d.ts +1 -0
- package/dist/operator-actions/index.js +1 -0
- package/dist/operator-actions/index.js.map +1 -1
- package/dist/operator-actions/invitation-commands.d.ts +12 -0
- package/dist/operator-actions/invitation-commands.js +46 -0
- package/dist/operator-actions/invitation-commands.js.map +1 -0
- package/dist/operator-actions/types.d.ts +1 -1
- package/dist/pages/platform/categories.d.ts +6 -6
- package/dist/pages/platform/credit-notes.d.ts +1 -1
- package/dist/pages/platform/dashboard.d.ts +2 -2
- package/dist/pages/platform/dashboard.js +2 -4
- package/dist/pages/platform/dashboard.js.map +1 -1
- package/dist/pages/platform/features.d.ts +1 -1
- package/dist/pages/platform/invoices.d.ts +1 -1
- package/dist/pages/platform/plans/edit.d.ts +2 -2
- package/dist/pages/platform/plans/index.d.ts +1 -1
- package/dist/pages/platform/plans/migrations.d.ts +1 -1
- package/dist/pages/platform/segments/index.d.ts +1 -1
- package/dist/pages/platform/settings.d.ts +1 -1
- package/dist/pages/platform/users/detail.d.ts +1 -1
- package/dist/pages/platform/users/index.d.ts +1 -1
- package/dist/pages/platform/workspaces/detail.d.ts +1 -1
- package/dist/pages/platform/workspaces/detail.js +40 -1
- package/dist/pages/platform/workspaces/detail.js.map +1 -1
- package/dist/pages/platform/workspaces/index.d.ts +4 -10
- package/dist/pages/platform/workspaces/index.js +27 -111
- package/dist/pages/platform/workspaces/index.js.map +1 -1
- package/dist/pages/public/legal/privacy-policy.js +2 -1
- package/dist/pages/public/legal/privacy-policy.js.map +1 -1
- package/dist/pages/public/legal/terms-and-conditions.js +2 -1
- package/dist/pages/public/legal/terms-and-conditions.js.map +1 -1
- package/dist/pages/public/legal/terms-of-use.js +2 -1
- package/dist/pages/public/legal/terms-of-use.js.map +1 -1
- package/dist/pages/tenant/billing.d.ts +1 -1
- package/dist/plans/index.d.ts +1 -0
- package/dist/plans/index.js +1 -0
- package/dist/plans/index.js.map +1 -1
- package/dist/plans/platform-support.d.ts +2 -0
- package/dist/plans/platform-support.js +19 -0
- package/dist/plans/platform-support.js.map +1 -0
- package/dist/plans/seat-capacity.d.ts +9 -2
- package/dist/plans/seat-capacity.js +59 -12
- package/dist/plans/seat-capacity.js.map +1 -1
- package/dist/plans/seat-hooks.js +34 -13
- package/dist/plans/seat-hooks.js.map +1 -1
- package/dist/routes/platformOwner/billing-settings.d.ts +2 -2
- package/dist/routes/platformOwner/dashboard.d.ts +8 -6
- package/dist/routes/platformOwner/dashboard.js +31 -17
- package/dist/routes/platformOwner/dashboard.js.map +1 -1
- package/dist/routes/platformOwner/index.d.ts +1 -0
- package/dist/routes/platformOwner/index.js +1 -0
- package/dist/routes/platformOwner/index.js.map +1 -1
- package/dist/routes/platformOwner/plan-deletion.d.ts +1 -1
- package/dist/routes/platformOwner/plans.d.ts +5 -5
- package/dist/routes/platformOwner/segments.d.ts +1 -1
- package/dist/routes/platformOwner/workspace-invitations.d.ts +13 -0
- package/dist/routes/platformOwner/workspace-invitations.js +73 -0
- package/dist/routes/platformOwner/workspace-invitations.js.map +1 -0
- package/dist/routes/public/legal-documents.d.ts +2 -2
- package/dist/routes/public/register.d.ts +7 -3
- package/dist/routes/public/register.js +42 -27
- package/dist/routes/public/register.js.map +1 -1
- package/dist/routes/tenant/tenant-billing.d.ts +7 -11
- package/dist/routes/tenant/tenant-billing.js +34 -26
- package/dist/routes/tenant/tenant-billing.js.map +1 -1
- package/dist/routes/tenant/tenant-plan.d.ts +1 -0
- package/dist/routes/tenant/tenant-plan.js +27 -2
- package/dist/routes/tenant/tenant-plan.js.map +1 -1
- package/dist/routes/tenant/tenant-seats.d.ts +2 -4
- package/dist/routes/tenant/tenant-seats.js.map +1 -1
- package/dist/routes/tenant/workspaces.d.ts +3 -1
- package/dist/routes/tenant/workspaces.js +10 -4
- package/dist/routes/tenant/workspaces.js.map +1 -1
- package/dist/stripe/upcoming-invoice.d.ts +21 -0
- package/dist/stripe/upcoming-invoice.js +42 -0
- package/dist/stripe/upcoming-invoice.js.map +1 -0
- package/dist/stripe/webhook-dispatch.js +2 -0
- package/dist/stripe/webhook-dispatch.js.map +1 -1
- package/dist/types/config.d.ts +9 -0
- package/dist/types/config.js +7 -0
- package/dist/types/config.js.map +1 -1
- package/dist/upcoming-invoice/db/preview-cache.model.d.ts +38 -0
- package/dist/upcoming-invoice/db/preview-cache.model.js +57 -0
- package/dist/upcoming-invoice/db/preview-cache.model.js.map +1 -0
- package/dist/upcoming-invoice/db/preview-cache.table.d.ts +10 -0
- package/dist/upcoming-invoice/db/preview-cache.table.js +42 -0
- package/dist/upcoming-invoice/db/preview-cache.table.js.map +1 -0
- package/dist/upcoming-invoice/eligibility.d.ts +17 -0
- package/dist/upcoming-invoice/eligibility.js +52 -0
- package/dist/upcoming-invoice/eligibility.js.map +1 -0
- package/dist/upcoming-invoice/invalidation.d.ts +2 -0
- package/dist/upcoming-invoice/invalidation.js +39 -0
- package/dist/upcoming-invoice/invalidation.js.map +1 -0
- package/dist/upcoming-invoice/mapping.d.ts +8 -0
- package/dist/upcoming-invoice/mapping.js +82 -0
- package/dist/upcoming-invoice/mapping.js.map +1 -0
- package/dist/upcoming-invoice/outcomes.d.ts +13 -0
- package/dist/upcoming-invoice/outcomes.js +15 -0
- package/dist/upcoming-invoice/outcomes.js.map +1 -0
- package/dist/upcoming-invoice/preview.d.ts +3 -0
- package/dist/upcoming-invoice/preview.js +80 -0
- package/dist/upcoming-invoice/preview.js.map +1 -0
- package/dist/upcoming-invoice/pricing.d.ts +3 -0
- package/dist/upcoming-invoice/pricing.js +84 -0
- package/dist/upcoming-invoice/pricing.js.map +1 -0
- package/dist/upcoming-invoice/usage.d.ts +14 -0
- package/dist/upcoming-invoice/usage.js +53 -0
- package/dist/upcoming-invoice/usage.js.map +1 -0
- package/dist/utils/invoice-lines-type.d.ts +1 -1
- package/dist/workspaces/billing-identity.d.ts +19 -0
- package/dist/workspaces/billing-identity.js +51 -0
- package/dist/workspaces/billing-identity.js.map +1 -0
- package/dist/workspaces/default-plan.d.ts +5 -0
- package/dist/workspaces/default-plan.js +109 -0
- package/dist/workspaces/default-plan.js.map +1 -0
- package/dist/workspaces/index.d.ts +2 -0
- package/dist/workspaces/index.js +2 -0
- package/dist/workspaces/index.js.map +1 -1
- package/dist/workspaces/invitations.d.ts +26 -0
- package/dist/workspaces/invitations.js +112 -0
- package/dist/workspaces/invitations.js.map +1 -0
- package/dist/workspaces/provisioning.d.ts +3 -3
- package/dist/workspaces/provisioning.js +39 -11
- package/dist/workspaces/provisioning.js.map +1 -1
- package/frontend-vue/app/components/BillingIdentityFields.vue +179 -0
- package/frontend-vue/app/components/PastDueBanner.vue +81 -0
- package/frontend-vue/app/components/PaymentMethodCard.vue +94 -38
- package/frontend-vue/app/components/PlanComparisonModal.vue +62 -26
- package/frontend-vue/app/components/PlanUpgradeModal.vue +181 -0
- package/frontend-vue/app/components/PlatformNotes.vue +4 -0
- package/frontend-vue/app/components/RefundButton.vue +10 -1
- package/frontend-vue/app/components/Register.vue +49 -92
- package/frontend-vue/app/components/SeatQuotaBanner.vue +28 -0
- package/frontend-vue/app/components/TenantBillingForm.vue +52 -128
- package/frontend-vue/app/components/TenantPlanCard.vue +68 -10
- package/frontend-vue/app/components/UserSummaryCard.vue +12 -10
- package/frontend-vue/app/components/WorkspaceAdminCreateModal.vue +202 -0
- package/frontend-vue/app/components/WorkspaceCreateModal.vue +46 -9
- package/frontend-vue/app/components/WorkspaceInvitationLink.vue +106 -0
- package/frontend-vue/app/components/WorkspaceSummaryCard.vue +39 -15
- package/frontend-vue/app/components/WorkspaceSuspended.vue +3 -5
- package/frontend-vue/app/components/WorkspaceSwitcherWidget.vue +8 -5
- package/frontend-vue/app/composables/useBillingCountries.ts +25 -5
- package/frontend-vue/app/composables/useBillingIdentity.ts +141 -0
- package/frontend-vue/app/composables/useInvitationLink.ts +69 -0
- package/frontend-vue/app/composables/usePastDueBannerAction.ts +20 -0
- package/frontend-vue/app/composables/usePlanComparison.ts +15 -0
- package/frontend-vue/app/composables/usePlanFeatureFormat.ts +312 -20
- package/frontend-vue/app/composables/usePlanFeatureLabel.ts +24 -0
- package/frontend-vue/app/composables/useSaasRegistration.ts +110 -223
- package/frontend-vue/app/composables/useSeatQuota.ts +8 -0
- package/frontend-vue/app/composables/useStripePaymentElement.ts +3 -3
- package/frontend-vue/app/composables/useWorkspaceAccessCache.ts +29 -2
- package/frontend-vue/app/composables/useWorkspaceFinalization.ts +7 -32
- package/frontend-vue/app/custom-pages/auth/no-workspace.vue +49 -194
- package/frontend-vue/app/plugins/auth-links.ts +0 -4
- package/frontend-vue/app/types/runtime-config.ts +13 -0
- package/frontend-vue/dms.frontend.ts +10 -4
- package/frontend-vue/i18n/locales/saas-en-GB.json +161 -36
- package/frontend-vue/i18n/locales/saas-fr-FR.json +162 -37
- package/frontend-vue/package.json +0 -1
- package/frontend-vue/pnpm-lock.yaml +1 -125
- package/package.json +15 -15
- package/frontend-vue/app/middleware/workspace-suspended.global.ts +0 -59
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/dms-saas",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
11
|
+
"!dist/.tsbuildinfo",
|
|
11
12
|
"frontend-vue",
|
|
12
13
|
"package.json",
|
|
13
14
|
"README.md",
|
|
@@ -30,23 +31,23 @@
|
|
|
30
31
|
"dependencies": {
|
|
31
32
|
"@antelopejs/interface-api": ">=0.0.13 <1.0.0",
|
|
32
33
|
"@antelopejs/interface-api-util": ">=0.1.2 <1.0.0",
|
|
33
|
-
"@antelopejs/interface-core": ">=0.
|
|
34
|
+
"@antelopejs/interface-core": ">=0.1.1 <1.0.0",
|
|
34
35
|
"@antelopejs/interface-data-api": ">=0.1.9 <1.0.0",
|
|
35
36
|
"@antelopejs/interface-database": ">=0.1.7 <1.0.0",
|
|
36
37
|
"@antelopejs/interface-database-decorators": ">=0.1.6 <1.0.0",
|
|
37
|
-
"@antelopejs/interface-dms": ">=0.
|
|
38
|
-
"@antelopejs/interface-dms-saas": ">=0.
|
|
38
|
+
"@antelopejs/interface-dms": ">=0.2.6 <1.0.0",
|
|
39
|
+
"@antelopejs/interface-dms-saas": ">=0.1.2 <1.0.0",
|
|
39
40
|
"@antelopejs/interface-file-storage": ">=0.1.3 <1.0.0",
|
|
40
41
|
"node-cron": "^4.2.1",
|
|
41
42
|
"stripe": "^17.5.0",
|
|
42
43
|
"zod": "^3.24.4"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"@antelopejs/core": "1.
|
|
46
|
-
"@antelopejs/dms": ">=0.
|
|
47
|
-
"@antelopejs/dms-frontend": "0.2
|
|
48
|
-
"@antelopejs/file-storage-local": "0.1.
|
|
49
|
-
"@antelopejs/mongodb": "1.3.
|
|
46
|
+
"@antelopejs/core": "1.9.1",
|
|
47
|
+
"@antelopejs/dms": ">=0.4.7 <1.0.0",
|
|
48
|
+
"@antelopejs/dms-frontend": "0.3.2",
|
|
49
|
+
"@antelopejs/file-storage-local": "0.1.5",
|
|
50
|
+
"@antelopejs/mongodb": "1.3.1",
|
|
50
51
|
"@antelopejs/tooling-configs": ">=0.0.6 <1.0.0",
|
|
51
52
|
"@types/node": "^24.0.0",
|
|
52
53
|
"@types/node-cron": "^3.0.11",
|
|
@@ -58,11 +59,11 @@
|
|
|
58
59
|
"release-it": "^19.2.4",
|
|
59
60
|
"release-it-changelogen": "^0.1.0",
|
|
60
61
|
"rimraf": "^6.1.3",
|
|
61
|
-
"typescript": "^
|
|
62
|
+
"typescript": "^6.0.3",
|
|
62
63
|
"vitest": "^4.1.10"
|
|
63
64
|
},
|
|
64
65
|
"optionalDependencies": {
|
|
65
|
-
"@antelopejs/interface-dms-automation": ">=0.0
|
|
66
|
+
"@antelopejs/interface-dms-automation": ">=0.1.0 <1.0.0"
|
|
66
67
|
},
|
|
67
68
|
"antelopeJs": {
|
|
68
69
|
"baseUrl": "dist",
|
|
@@ -71,18 +72,17 @@
|
|
|
71
72
|
]
|
|
72
73
|
},
|
|
73
74
|
"scripts": {
|
|
74
|
-
"build": "pnpm --filter @antelopejs/interface-dms-saas build && rimraf dist && tsc
|
|
75
|
+
"build": "pnpm --filter @antelopejs/interface-dms-saas build && rimraf dist && tsc",
|
|
75
76
|
"test:frontend": "ajs dms verify-source --layer node_modules/@antelopejs/dms/frontend-vue --module frontend-vue",
|
|
76
77
|
"frontend:dev": "cd playground && pnpm frontend:dev",
|
|
77
78
|
"dev": "ajs project run -w -p playground",
|
|
78
79
|
"stripe:webhooks": "stripe listen --forward-to localhost:5010/api/saas/webhooks/stripe",
|
|
79
80
|
"lint:fix": "oxlint --fix --max-warnings=1000000 && oxfmt . && cd frontend-vue && pnpm lint:fix",
|
|
80
81
|
"lint": "oxlint && oxfmt --check . && cd frontend-vue && pnpm lint",
|
|
81
|
-
"typecheck": "tsc
|
|
82
|
+
"typecheck": "tsc --noEmit",
|
|
82
83
|
"format": "oxfmt . && cd frontend-vue && pnpm format",
|
|
83
|
-
"check:package-contract": "node scripts/check-package-contract.mjs",
|
|
84
84
|
"verify:interface": "node scripts/verify-interface-package.cjs",
|
|
85
|
-
"test": "pnpm run build && pnpm --filter @antelopejs/interface-dms-saas run check:
|
|
85
|
+
"test": "pnpm run build && pnpm --filter @antelopejs/interface-dms-saas run check:exports && pnpm run test:unit",
|
|
86
86
|
"test:unit": "vitest run",
|
|
87
87
|
"release": "pnpm --filter @antelopejs/interface-dms-saas build && pnpm --dir frontend-vue install --frozen-lockfile && pnpm run verify:interface && release-it",
|
|
88
88
|
"knip": "knip --dependencies",
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
const ACCESS_ENDPOINT = "/api/saas/billing/access";
|
|
2
|
-
const SUSPENDED_PATH = "/workspace-suspended";
|
|
3
|
-
// The billing page carries `bypassTenantAccessGate`, so the gate lets it
|
|
4
|
-
// through: redirecting it here would close the recovery path the flag opens.
|
|
5
|
-
const BILLING_PATH = "/settings/workspace/billing";
|
|
6
|
-
|
|
7
|
-
// Paths a blocked workspace member must still reach: auth flows, the
|
|
8
|
-
// suspended screen itself, billing, registration and legal pages.
|
|
9
|
-
const EXEMPT_PREFIXES = [
|
|
10
|
-
"/auth",
|
|
11
|
-
SUSPENDED_PATH,
|
|
12
|
-
BILLING_PATH,
|
|
13
|
-
"/register",
|
|
14
|
-
"/legal",
|
|
15
|
-
"/terms-of-use",
|
|
16
|
-
"/terms-and-conditions",
|
|
17
|
-
"/privacy-policy",
|
|
18
|
-
];
|
|
19
|
-
|
|
20
|
-
function isExempt(path: string): boolean {
|
|
21
|
-
return EXEMPT_PREFIXES.some(
|
|
22
|
-
(prefix) => path === prefix || path.startsWith(`${prefix}/`),
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export default defineDmsMiddleware(async (to) => {
|
|
27
|
-
if (import.meta.env.SSR) return;
|
|
28
|
-
if (isExempt(to.path)) return;
|
|
29
|
-
|
|
30
|
-
const { loggedIn, session } = useUserSession();
|
|
31
|
-
if (!loggedIn.value) return;
|
|
32
|
-
|
|
33
|
-
const tenantId =
|
|
34
|
-
(session.value as { activeTenantId?: string } | null)?.activeTenantId ??
|
|
35
|
-
"default";
|
|
36
|
-
|
|
37
|
-
// Cached per workspace: the entry is invalidated when the active tenant
|
|
38
|
-
// changes, and cleared by the suspended screen once the workspace
|
|
39
|
-
// unblocks. An active→blocked transition is enforced server-side by the
|
|
40
|
-
// tenant access gate (typed 403s) until the next reload.
|
|
41
|
-
const cached = useWorkspaceAccessCache();
|
|
42
|
-
|
|
43
|
-
if (cached.value === null || cached.value.tenantId !== tenantId) {
|
|
44
|
-
const { $authFetch } = useAuthFetch();
|
|
45
|
-
try {
|
|
46
|
-
const access = await $authFetch<WorkspaceAccess>(ACCESS_ENDPOINT);
|
|
47
|
-
cached.value = { tenantId, access };
|
|
48
|
-
} catch {
|
|
49
|
-
// Fail open on transport errors: the backend gate still denies every
|
|
50
|
-
// tenant surface, so the worst case is a 403 toast instead of the
|
|
51
|
-
// dedicated screen.
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (cached.value?.access.blocked) {
|
|
57
|
-
return SUSPENDED_PATH;
|
|
58
|
-
}
|
|
59
|
-
});
|