@antelopejs/dms-saas 0.7.4 → 0.8.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 +5 -5
- package/dist/auth/owner-only-permissions-resolver.js +3 -2
- package/dist/auth/owner-only-permissions-resolver.js.map +1 -1
- package/dist/auth/plan-permissions-resolver.js +6 -3
- package/dist/auth/plan-permissions-resolver.js.map +1 -1
- package/dist/billing-state/directory.d.ts +2 -0
- package/dist/billing-state/directory.js +48 -3
- package/dist/billing-state/directory.js.map +1 -1
- package/dist/billing-state/past-due-banner.js +2 -0
- package/dist/billing-state/past-due-banner.js.map +1 -1
- package/dist/billing-state/recovery.js +4 -0
- package/dist/billing-state/recovery.js.map +1 -1
- package/dist/billing-state/trial-ending-banner.js +1 -0
- package/dist/billing-state/trial-ending-banner.js.map +1 -1
- package/dist/config/runtime.d.ts +2 -2
- package/dist/config/runtime.js +12 -4
- package/dist/config/runtime.js.map +1 -1
- package/dist/crons/recompute-billing-state.js +1 -4
- package/dist/crons/recompute-billing-state.js.map +1 -1
- package/dist/data-api/platformOwner/plans.d.ts +2 -0
- package/dist/data-api/platformOwner/plans.js +16 -0
- package/dist/data-api/platformOwner/plans.js.map +1 -1
- package/dist/frontend-module.d.ts +3 -0
- package/dist/frontend-module.js +29 -0
- package/dist/frontend-module.js.map +1 -0
- package/dist/hooks/register.js +8 -1
- package/dist/hooks/register.js.map +1 -1
- package/dist/hooks/tenant-provisioning.js +2 -2
- package/dist/hooks/tenant-provisioning.js.map +1 -1
- package/dist/implementations/dms-saas/billing.d.ts +2 -1
- package/dist/implementations/dms-saas/billing.js +15 -0
- package/dist/implementations/dms-saas/billing.js.map +1 -1
- package/dist/implementations/dms-saas/invoice-line-items.d.ts +2 -2
- package/dist/implementations/dms-saas/invoice-line-items.js +6 -6
- package/dist/implementations/dms-saas/invoice-line-items.js.map +1 -1
- package/dist/index.js +2 -19
- package/dist/index.js.map +1 -1
- package/dist/invoice-line-items/billing-window.d.ts +6 -2
- package/dist/invoice-line-items/billing-window.js.map +1 -1
- package/dist/invoice-line-items/recovery/admission.js +2 -5
- package/dist/invoice-line-items/recovery/admission.js.map +1 -1
- package/dist/invoice-line-items/recovery/process.d.ts +1 -0
- package/dist/invoice-line-items/recovery/process.js +119 -47
- package/dist/invoice-line-items/recovery/process.js.map +1 -1
- package/dist/invoice-line-items/recovery/task.model.js +1 -1
- package/dist/invoice-line-items/recovery/task.model.js.map +1 -1
- package/dist/invoice-line-items/recovery/task.table.d.ts +2 -2
- package/dist/invoice-line-items/recovery/task.table.js +3 -4
- package/dist/invoice-line-items/recovery/task.table.js.map +1 -1
- package/dist/metrics/revenue.d.ts +15 -3
- package/dist/metrics/revenue.js +58 -12
- package/dist/metrics/revenue.js.map +1 -1
- package/dist/operator-actions/previews.d.ts +1 -1
- package/dist/operator-actions/previews.js +13 -6
- package/dist/operator-actions/previews.js.map +1 -1
- package/dist/operator-billing/billing-settings-store.d.ts +2 -0
- package/dist/operator-billing/billing-settings-store.js +8 -2
- package/dist/operator-billing/billing-settings-store.js.map +1 -1
- package/dist/pages/platform/dashboard.d.ts +1 -1
- package/dist/pages/platform/dashboard.js +13 -10
- package/dist/pages/platform/dashboard.js.map +1 -1
- package/dist/pages/platform/plans/edit.js +4 -0
- package/dist/pages/platform/plans/edit.js.map +1 -1
- package/dist/pages/platform/plans/index.js +4 -0
- package/dist/pages/platform/plans/index.js.map +1 -1
- package/dist/pages/platform/plans/migrations.d.ts +1 -0
- package/dist/pages/platform/plans/migrations.js +3 -0
- package/dist/pages/platform/plans/migrations.js.map +1 -1
- package/dist/pages/platform/segments/edit.js +1 -0
- package/dist/pages/platform/segments/edit.js.map +1 -1
- package/dist/pages/platform/settings.js +11 -3
- package/dist/pages/platform/settings.js.map +1 -1
- package/dist/pages/platform/workspaces/index.js +1 -4
- package/dist/pages/platform/workspaces/index.js.map +1 -1
- package/dist/pages/tenant/billing.js +1 -2
- package/dist/pages/tenant/billing.js.map +1 -1
- package/dist/plans/catalogue-summary.d.ts +1 -0
- package/dist/plans/catalogue-summary.js +10 -4
- package/dist/plans/catalogue-summary.js.map +1 -1
- package/dist/plans/catalogue-usage.js +4 -2
- package/dist/plans/catalogue-usage.js.map +1 -1
- package/dist/plans/plan-audience.d.ts +1 -0
- package/dist/plans/plan-audience.js +4 -0
- package/dist/plans/plan-audience.js.map +1 -1
- package/dist/plans/plan-write.d.ts +9 -3
- package/dist/plans/plan-write.js +27 -1
- package/dist/plans/plan-write.js.map +1 -1
- package/dist/plans/seat-hooks.js +25 -16
- package/dist/plans/seat-hooks.js.map +1 -1
- package/dist/plans/stripe-sync.js +11 -3
- package/dist/plans/stripe-sync.js.map +1 -1
- package/dist/routes/platformOwner/credit-notes-issue.js +18 -12
- package/dist/routes/platformOwner/credit-notes-issue.js.map +1 -1
- package/dist/routes/platformOwner/dashboard.d.ts +4 -8
- package/dist/routes/platformOwner/dashboard.js +9 -28
- package/dist/routes/platformOwner/dashboard.js.map +1 -1
- package/dist/routes/platformOwner/plan-dialogs.js +2 -1
- package/dist/routes/platformOwner/plan-dialogs.js.map +1 -1
- package/dist/routes/platformOwner/plans.d.ts +9 -29
- package/dist/routes/platformOwner/plans.js +58 -18
- package/dist/routes/platformOwner/plans.js.map +1 -1
- package/dist/routes/platformOwner/workspace-detail.js +4 -2
- package/dist/routes/platformOwner/workspace-detail.js.map +1 -1
- package/dist/routes/platformOwner/workspace-operator-actions.js +6 -1
- package/dist/routes/platformOwner/workspace-operator-actions.js.map +1 -1
- package/dist/routes/platformOwner/workspaces-admin.d.ts +1 -1
- package/dist/routes/platformOwner/workspaces-admin.js +15 -7
- package/dist/routes/platformOwner/workspaces-admin.js.map +1 -1
- package/dist/routes/public/public-plan-catalog.js +3 -2
- package/dist/routes/public/public-plan-catalog.js.map +1 -1
- package/dist/routes/public/register.js +6 -5
- package/dist/routes/public/register.js.map +1 -1
- package/dist/routes/tenant/billing-portal.js +1 -1
- package/dist/routes/tenant/billing-portal.js.map +1 -1
- package/dist/routes/tenant/tenant-plan-checkout.js +4 -4
- package/dist/routes/tenant/tenant-plan-checkout.js.map +1 -1
- package/dist/routes/tenant/tenant-plan-resubscription.js +2 -1
- package/dist/routes/tenant/tenant-plan-resubscription.js.map +1 -1
- package/dist/routes/tenant/tenant-plan.d.ts +0 -1
- package/dist/routes/tenant/tenant-plan.js +20 -20
- package/dist/routes/tenant/tenant-plan.js.map +1 -1
- package/dist/routes/tenant/workspaces.d.ts +1 -1
- package/dist/routes/tenant/workspaces.js +13 -8
- package/dist/routes/tenant/workspaces.js.map +1 -1
- package/dist/stripe/availability.d.ts +5 -0
- package/dist/stripe/availability.js +43 -0
- package/dist/stripe/availability.js.map +1 -0
- package/dist/stripe/customer-billing.js +2 -0
- package/dist/stripe/customer-billing.js.map +1 -1
- package/dist/stripe/customer-locale.d.ts +3 -0
- package/dist/stripe/customer-locale.js +11 -0
- package/dist/stripe/customer-locale.js.map +1 -1
- package/dist/stripe/index.d.ts +1 -0
- package/dist/stripe/index.js +1 -0
- package/dist/stripe/index.js.map +1 -1
- package/dist/stripe/payload-shapes.d.ts +6 -0
- package/dist/stripe/payload-shapes.js +13 -0
- package/dist/stripe/payload-shapes.js.map +1 -1
- package/dist/stripe/subscription-cancellation.js +2 -0
- package/dist/stripe/subscription-cancellation.js.map +1 -1
- package/dist/stripe/sync-plan.js +8 -7
- package/dist/stripe/sync-plan.js.map +1 -1
- package/dist/stripe/webhook-checkout.js +1 -1
- package/dist/stripe/webhook-checkout.js.map +1 -1
- package/dist/stripe/webhook-handlers.js +5 -3
- package/dist/stripe/webhook-handlers.js.map +1 -1
- package/dist/utils/segment-matching.d.ts +4 -3
- package/dist/utils/segment-matching.js +29 -13
- package/dist/utils/segment-matching.js.map +1 -1
- package/dist/workspaces/default-plan.d.ts +1 -1
- package/dist/workspaces/default-plan.js +11 -7
- package/dist/workspaces/default-plan.js.map +1 -1
- package/dist/workspaces/provisioning.d.ts +0 -1
- package/dist/workspaces/provisioning.js +3 -6
- package/dist/workspaces/provisioning.js.map +1 -1
- package/dist/workspaces/self-serve-creation.d.ts +2 -2
- package/dist/workspaces/self-serve-creation.js +12 -6
- package/dist/workspaces/self-serve-creation.js.map +1 -1
- package/frontend-vue/app/build/period-range.ts +57 -0
- package/frontend-vue/app/build/plan-catalog.ts +2 -0
- package/frontend-vue/app/build/public/RegistrationPlanCard.vue +1 -2
- package/frontend-vue/app/components/BillingIdentityFields.vue +64 -76
- package/frontend-vue/app/components/PlanCard.vue +14 -2
- package/frontend-vue/app/components/PlanCardPublic.vue +1 -2
- package/frontend-vue/app/components/PlanEditorPreview.vue +26 -12
- package/frontend-vue/app/components/PlanUpgradeModal.vue +45 -3
- package/frontend-vue/app/components/TenantBillingForm.vue +2 -0
- package/frontend-vue/app/components/TenantPlanCard.vue +1 -2
- package/frontend-vue/app/components/WorkspaceCreateModal.vue +1 -2
- package/frontend-vue/app/composables/useBillingAddress.ts +108 -0
- package/frontend-vue/app/composables/useBillingCountries.ts +3 -69
- package/frontend-vue/app/composables/useBillingIdentity.ts +7 -5
- package/frontend-vue/app/composables/usePlanChangeReview.ts +21 -0
- package/frontend-vue/app/plugins/billing-data-types.ts +6 -13
- package/frontend-vue/i18n/locales/saas-en-GB.json +4 -0
- package/frontend-vue/i18n/locales/saas-fr-FR.json +4 -0
- package/frontend-vue/i18n/locales/saas-operator-catalog-en-GB.json +9 -2
- package/frontend-vue/i18n/locales/saas-operator-catalog-fr-FR.json +9 -2
- package/frontend-vue/i18n/locales/saas-operator-workspaces-en-GB.json +7 -2
- package/frontend-vue/i18n/locales/saas-operator-workspaces-fr-FR.json +7 -2
- package/frontend-vue/i18n/locales/saas-tenant-billing-en-GB.json +5 -7
- package/frontend-vue/i18n/locales/saas-tenant-billing-fr-FR.json +5 -7
- package/frontend-vue/package.json +1 -1
- package/package.json +11 -10
- package/skills/dms-saas/SKILL.md +22 -2
- package/frontend-vue/app/composables/usePlanDescription.ts +0 -12
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
"editor_preview_description": "Voir la carte de l’offre telle que les clients la voient et son état de synchronisation Stripe pendant l’édition",
|
|
11
11
|
"migrations_attention": "Migrations à traiter",
|
|
12
12
|
"migrations_attention_description": "Voir les migrations d’offre qui attendent un opérateur",
|
|
13
|
+
"migration_toolbar": "Mode direct de la migration",
|
|
14
|
+
"migration_toolbar_description": "Mettre en pause ou reprendre le suivi en direct d’une migration en cours et voir quand elle a été lue",
|
|
13
15
|
"migration_header": "En-tête de la migration",
|
|
14
16
|
"migration_header_description": "Voir où en est une migration d’offre, la relancer, l’exporter ou la clôturer",
|
|
15
17
|
"migration_totals": "Totaux de la migration",
|
|
@@ -130,7 +132,7 @@
|
|
|
130
132
|
"on_sale": "Offres en vente",
|
|
131
133
|
"on_sale_detail": "{public} publiques · {sales} sur devis",
|
|
132
134
|
"workspaces": "Espaces de travail",
|
|
133
|
-
"workspaces_detail": "{paying} payants · {free} gratuits · {trialing} en essai",
|
|
135
|
+
"workspaces_detail": "{paying} payants · {free} gratuits · {trialing} en essai · {other} autres",
|
|
134
136
|
"mrr": "MRR du catalogue",
|
|
135
137
|
"mrr_detail": "Normalisé · annuel ÷ 12, sièges comptés",
|
|
136
138
|
"mrr_detail_other": "Normalisé · plus {other}",
|
|
@@ -142,6 +144,8 @@
|
|
|
142
144
|
"public": "Publique",
|
|
143
145
|
"hidden": "Masquée",
|
|
144
146
|
"not_on_sale": "Plus en vente",
|
|
147
|
+
"not_on_stripe": "Pas sur Stripe",
|
|
148
|
+
"not_on_stripe_hint": "Cette offre a un prix mais pas encore de prix Stripe : aucun espace ne peut y souscrire avant sa synchronisation.",
|
|
145
149
|
"legacy": "Ancienne",
|
|
146
150
|
"on_sale": "En vente",
|
|
147
151
|
"more": "Plus d’actions",
|
|
@@ -174,7 +178,10 @@
|
|
|
174
178
|
"limit_error": "Une limite doit être d’au moins 1 membre. Pour aucune limite, cochez Illimité.",
|
|
175
179
|
"notice": {
|
|
176
180
|
"price_changed": "Un nouveau prix Stripe a été créé",
|
|
177
|
-
"price_changed_description": "Les nouvelles inscriptions paient le nouveau prix. Les abonnés actuels gardent le leur jusqu’à leur migration."
|
|
181
|
+
"price_changed_description": "Les nouvelles inscriptions paient le nouveau prix. Les abonnés actuels gardent le leur jusqu’à leur migration.",
|
|
182
|
+
"stripe_not_synced": "Offre enregistrée, mais non synchronisée avec Stripe",
|
|
183
|
+
"stripe_not_synced_not_configured": "Stripe n’est pas configuré : aucun espace ne peut souscrire à cette offre payante tant qu’il ne l’est pas.",
|
|
184
|
+
"stripe_not_synced_out_of_sync": "Stripe n’a pas pris la modification. Elle est retentée la prochaine fois que l’offre est proposée ou au démarrage du serveur ; d’ici là, l’offre ne peut pas être souscrite à ses nouvelles conditions."
|
|
178
185
|
},
|
|
179
186
|
"section": {
|
|
180
187
|
"identity": "Identité",
|
|
@@ -35,7 +35,10 @@
|
|
|
35
35
|
"title": "Paid invoices",
|
|
36
36
|
"description": "Collected and credited, in the reporting currency",
|
|
37
37
|
"collected": "Collected",
|
|
38
|
-
"credited": "Credited / refunded"
|
|
38
|
+
"credited": "Credited / refunded",
|
|
39
|
+
"collected_previous_period": "Collected, previous period",
|
|
40
|
+
"collected_previous_year": "Collected, previous year",
|
|
41
|
+
"collected_compared": "Collected, compared period"
|
|
39
42
|
},
|
|
40
43
|
"by_status": {
|
|
41
44
|
"title": "Workspaces by status",
|
|
@@ -45,7 +48,7 @@
|
|
|
45
48
|
"plans": {
|
|
46
49
|
"title": "Plans by MRR",
|
|
47
50
|
"subtitle": "Normalised MRR each plan brings",
|
|
48
|
-
"description": "No workspace · {price} | 1 workspace · {price} | {count} workspaces · {price}",
|
|
51
|
+
"description": "No paying workspace · {price} | 1 paying workspace · {price} | {count} paying workspaces · {price}",
|
|
49
52
|
"empty": "No plan brings recurring revenue yet.",
|
|
50
53
|
"open_catalogue": "Catalogue"
|
|
51
54
|
},
|
|
@@ -519,6 +522,8 @@
|
|
|
519
522
|
"workspaces": {
|
|
520
523
|
"create": "Create workspace",
|
|
521
524
|
"create_description": "Create a workspace for a customer and choose how it is paid",
|
|
525
|
+
"toolbar": "Dashboard toolbar",
|
|
526
|
+
"toolbar_description": "See when the dashboard figures were last read and read them again",
|
|
522
527
|
"period": "Dashboard period",
|
|
523
528
|
"period_description": "Choose the period the dashboard figures cover",
|
|
524
529
|
"attention": "Needs attention",
|
|
@@ -35,7 +35,10 @@
|
|
|
35
35
|
"title": "Factures payées",
|
|
36
36
|
"description": "Encaissé et crédité, dans la devise de reporting",
|
|
37
37
|
"collected": "Encaissé",
|
|
38
|
-
"credited": "Crédité / remboursé"
|
|
38
|
+
"credited": "Crédité / remboursé",
|
|
39
|
+
"collected_previous_period": "Encaissé, période précédente",
|
|
40
|
+
"collected_previous_year": "Encaissé, année précédente",
|
|
41
|
+
"collected_compared": "Encaissé, période comparée"
|
|
39
42
|
},
|
|
40
43
|
"by_status": {
|
|
41
44
|
"title": "Espaces par statut",
|
|
@@ -45,7 +48,7 @@
|
|
|
45
48
|
"plans": {
|
|
46
49
|
"title": "Offres par MRR",
|
|
47
50
|
"subtitle": "MRR normalisé apporté par chaque offre",
|
|
48
|
-
"description": "Aucun espace · {price} | 1 espace · {price} | {count} espaces · {price}",
|
|
51
|
+
"description": "Aucun espace payant · {price} | 1 espace payant · {price} | {count} espaces payants · {price}",
|
|
49
52
|
"empty": "Aucune offre n'apporte encore de revenu récurrent.",
|
|
50
53
|
"open_catalogue": "Catalogue"
|
|
51
54
|
},
|
|
@@ -519,6 +522,8 @@
|
|
|
519
522
|
"workspaces": {
|
|
520
523
|
"create": "Créer un espace",
|
|
521
524
|
"create_description": "Créer un espace pour un client et choisir comment il est payé",
|
|
525
|
+
"toolbar": "Barre du tableau de bord",
|
|
526
|
+
"toolbar_description": "Voir quand les chiffres du tableau de bord ont été lus et les relire",
|
|
522
527
|
"period": "Période du tableau de bord",
|
|
523
528
|
"period_description": "Choisir la période couverte par les chiffres du tableau de bord",
|
|
524
529
|
"attention": "À traiter",
|
|
@@ -192,11 +192,6 @@
|
|
|
192
192
|
"pending": "Verification in progress",
|
|
193
193
|
"unverified": "Not verified"
|
|
194
194
|
},
|
|
195
|
-
"address_line1": "Address",
|
|
196
|
-
"postal_code": "Postal code",
|
|
197
|
-
"city": "City",
|
|
198
|
-
"country": "Country",
|
|
199
|
-
"country_placeholder": "Select a country",
|
|
200
195
|
"billing_email": "Billing email",
|
|
201
196
|
"billing_email_hint": "Receives invoices and payment reminders.",
|
|
202
197
|
"sections": {
|
|
@@ -225,13 +220,15 @@
|
|
|
225
220
|
"postalCode": "Postal code",
|
|
226
221
|
"city": "City",
|
|
227
222
|
"country": "Country",
|
|
228
|
-
"billingEmail": "Billing email"
|
|
223
|
+
"billingEmail": "Billing email",
|
|
224
|
+
"line2": "Address line 2",
|
|
225
|
+
"state": "State or province"
|
|
229
226
|
},
|
|
230
227
|
"errors": {
|
|
231
228
|
"customerType": "Choose a customer type.",
|
|
232
229
|
"companyName": "The company name is required.",
|
|
233
230
|
"country": "Choose the billing country.",
|
|
234
|
-
"line1": "The
|
|
231
|
+
"line1": "The street is required.",
|
|
235
232
|
"postalCode": "The postal code is required.",
|
|
236
233
|
"city": "The city is required.",
|
|
237
234
|
"billingEmail": "Enter a valid email address."
|
|
@@ -387,6 +384,7 @@
|
|
|
387
384
|
"excl_tax": "{amount} excl. VAT",
|
|
388
385
|
"first_charge": "First charge {amount} on {date}, then every {interval}. Cancel before {date} and you pay nothing.",
|
|
389
386
|
"tax_on_stripe": "VAT is computed on Stripe's payment page from the billing country.",
|
|
387
|
+
"preview_failed": "This plan cannot be paid for right now. Try again later or contact us.",
|
|
390
388
|
"card_note": "Card entered on Stripe's secure payment page, never stored on our side.",
|
|
391
389
|
"confirm": "Continue to secure payment"
|
|
392
390
|
}
|
|
@@ -192,11 +192,6 @@
|
|
|
192
192
|
"pending": "Vérification en cours",
|
|
193
193
|
"unverified": "Non vérifié"
|
|
194
194
|
},
|
|
195
|
-
"address_line1": "Adresse",
|
|
196
|
-
"postal_code": "Code postal",
|
|
197
|
-
"city": "Ville",
|
|
198
|
-
"country": "Pays",
|
|
199
|
-
"country_placeholder": "Choisissez un pays",
|
|
200
195
|
"billing_email": "E-mail de facturation",
|
|
201
196
|
"billing_email_hint": "Reçoit les factures et les relances de paiement.",
|
|
202
197
|
"sections": {
|
|
@@ -225,13 +220,15 @@
|
|
|
225
220
|
"postalCode": "Code postal",
|
|
226
221
|
"city": "Ville",
|
|
227
222
|
"country": "Pays",
|
|
228
|
-
"billingEmail": "E-mail de facturation"
|
|
223
|
+
"billingEmail": "E-mail de facturation",
|
|
224
|
+
"line2": "Complément d'adresse",
|
|
225
|
+
"state": "Région ou province"
|
|
229
226
|
},
|
|
230
227
|
"errors": {
|
|
231
228
|
"customerType": "Choisissez un type de client.",
|
|
232
229
|
"companyName": "La raison sociale est obligatoire.",
|
|
233
230
|
"country": "Choisissez le pays de facturation.",
|
|
234
|
-
"line1": "
|
|
231
|
+
"line1": "La rue est obligatoire.",
|
|
235
232
|
"postalCode": "Le code postal est obligatoire.",
|
|
236
233
|
"city": "La ville est obligatoire.",
|
|
237
234
|
"billingEmail": "Saisissez une adresse e-mail valide."
|
|
@@ -387,6 +384,7 @@
|
|
|
387
384
|
"excl_tax": "{amount} HT",
|
|
388
385
|
"first_charge": "Premier prélèvement de {amount} le {date}, puis chaque {interval}. Résiliez avant le {date} et vous ne payez rien.",
|
|
389
386
|
"tax_on_stripe": "La TVA est calculée sur la page de paiement de Stripe d'après le pays de facturation.",
|
|
387
|
+
"preview_failed": "Cette offre ne peut pas être payée pour le moment. Réessayez plus tard ou contactez-nous.",
|
|
390
388
|
"card_note": "Carte saisie sur la page de paiement sécurisée de Stripe, jamais conservée chez nous.",
|
|
391
389
|
"confirm": "Continuer vers le paiement sécurisé"
|
|
392
390
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/dms-saas",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "SaaS module for the AntelopeJS DMS: self-service sign-up and pricing, plans that gate features, Stripe billing, workspace settings and a back office.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antelopejs",
|
|
@@ -48,20 +48,20 @@
|
|
|
48
48
|
"@antelopejs/interface-api": ">=0.0.15 <1.0.0",
|
|
49
49
|
"@antelopejs/interface-api-util": ">=0.1.3 <1.0.0",
|
|
50
50
|
"@antelopejs/interface-core": ">=0.2.4 <1.0.0",
|
|
51
|
-
"@antelopejs/interface-data-api": ">=0.
|
|
52
|
-
"@antelopejs/interface-database": ">=0.1.
|
|
53
|
-
"@antelopejs/interface-database-decorators": ">=0.1.
|
|
54
|
-
"@antelopejs/interface-dms": ">=0.
|
|
51
|
+
"@antelopejs/interface-data-api": ">=0.4.0 <1.0.0",
|
|
52
|
+
"@antelopejs/interface-database": ">=0.1.11 <1.0.0",
|
|
53
|
+
"@antelopejs/interface-database-decorators": ">=0.1.10 <1.0.0",
|
|
54
|
+
"@antelopejs/interface-dms": ">=0.9.0 <1.0.0",
|
|
55
55
|
"node-cron": "^4.2.1",
|
|
56
56
|
"stripe": "^22.6.2",
|
|
57
57
|
"zod": "^3.24.4",
|
|
58
|
-
"@antelopejs/interface-dms-saas": "^0.
|
|
58
|
+
"@antelopejs/interface-dms-saas": "^0.6.1"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@antelopejs/core": "1.
|
|
62
|
-
"@antelopejs/dms": ">=0.
|
|
63
|
-
"@antelopejs/dms-frontend": ">=0.
|
|
64
|
-
"@antelopejs/mongodb": "1.
|
|
61
|
+
"@antelopejs/core": "1.17.1",
|
|
62
|
+
"@antelopejs/dms": ">=0.11.0 <1.0.0",
|
|
63
|
+
"@antelopejs/dms-frontend": ">=0.9.0 <0.10.0",
|
|
64
|
+
"@antelopejs/mongodb": "1.5.0",
|
|
65
65
|
"@antelopejs/tooling-configs": ">=0.0.9 <1.0.0",
|
|
66
66
|
"@types/node": "^24.0.0",
|
|
67
67
|
"knip": "^6.34.0",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"./skills"
|
|
88
88
|
]
|
|
89
89
|
},
|
|
90
|
+
"dmsFrontend": "dist/frontend-module.js",
|
|
90
91
|
"scripts": {
|
|
91
92
|
"build": "pnpm --filter @antelopejs/interface-dms-saas build && rimraf dist && tsc",
|
|
92
93
|
"test:frontend": "ajs dms verify-source --layer node_modules/@antelopejs/dms/frontend-vue --module frontend-vue",
|
package/skills/dms-saas/SKILL.md
CHANGED
|
@@ -17,10 +17,14 @@ User docs: `docs/` of this package, published at https://dms.antelopejs.com/docs
|
|
|
17
17
|
- dms-saas 0.6 requires `@antelopejs/dms` >=0.9 (interface-dms 0.7, renderer `@antelopejs/dms-frontend` 0.6);
|
|
18
18
|
0.5 is the DMS 0.8 line.
|
|
19
19
|
- `ajs project modules add @antelopejs/dms-saas`; config `stripe.{secretKey,publishableKey,webhookSecret}` from env
|
|
20
|
-
(`envOverrides`). Placeholder keys disable Stripe calls
|
|
20
|
+
(`envOverrides`). Placeholder keys disable Stripe calls: plan sync skipped, registration
|
|
21
|
+
takes no card whatever `registration.paymentMethod` says. Stripe refusing the key or unreachable → handled
|
|
22
|
+
`503 saas.errors.stripe.unavailable`, not a 500. A new route that calls Stripe wraps its calls in
|
|
23
|
+
`withStripeAvailability()` and, when it cannot work without Stripe, calls `assertStripeConfigured()` first
|
|
24
|
+
(`503 saas.errors.stripe.not_configured`) — see `src/stripe/availability.ts`.
|
|
21
25
|
- Stripe webhook endpoint → `/api/saas/webhooks/stripe`, API version `2026-08-26.dahlia`.
|
|
22
26
|
- Frontend server env: `DMS_AUTH_ESTABLISH_ENDPOINTS=/api/saas/register/finalize`, else sign-ups stay signed out (403).
|
|
23
|
-
- `allowedRedirectHosts` for Checkout / billing-portal return URLs (loopback auto-allowed in dev only).
|
|
27
|
+
- `allowedRedirectHosts` for Checkout / billing-portal return URLs: defaults to the DMS `clientBaseUrl` host, a value replaces it (loopback auto-allowed in dev only).
|
|
24
28
|
- A free plan must exist (or `defaultPlanSlug`): registration opens it, and every workspace without a subscription gets it.
|
|
25
29
|
- Options: `admissionMode` (`open` | `invitation-only`), `registration.paymentMethod` (`required` default | `optional` | `none`),
|
|
26
30
|
`publicScreens.{register,pricing}`, `upcomingInvoicePreviewCacheTtlSeconds`, `reportingCurrency`,
|
|
@@ -30,9 +34,13 @@ User docs: `docs/` of this package, published at https://dms.antelopejs.com/docs
|
|
|
30
34
|
|
|
31
35
|
- The `dms-saas.plan-intersection` resolver keeps, per member, roles ∩ plan; the workspace owner gets every plan
|
|
32
36
|
permission (never `*`). A plan grants exactly the ids it lists: list every component id, not just the page.
|
|
37
|
+
- Role preview (`context.preview` in a resolver): roles ∩ plan with no owner grant and no owner-only screens, `*` kept
|
|
38
|
+
only for a `*` role. Resolvers of your own keyed on the user must read the context the same way.
|
|
33
39
|
- New project page or block → add its permission ids to the plans that should get it, or tenants lose it.
|
|
34
40
|
- Seeding plans from code: write name, price, currency, interval, billing mode; leave `paymentProviderRefs` to dms-saas.
|
|
41
|
+
`name`, `description` and `borderLabel` are localized (`{ en, fr }` + `.localize("*")`), never i18n keys; Stripe gets the `en` text.
|
|
35
42
|
- Features: `displayName` / `tooltip` are localized (`{ en, fr }` + `.localize("*")`), never i18n keys.
|
|
43
|
+
- Plan `description` and `borderLabel` may be `$i18n.key` (translated on every screen); `name` stays plain text.
|
|
36
44
|
|
|
37
45
|
## Extension points (`@antelopejs/interface-dms-saas`)
|
|
38
46
|
|
|
@@ -47,10 +55,22 @@ User docs: `docs/` of this package, published at https://dms.antelopejs.com/docs
|
|
|
47
55
|
| React to create/suspend/reactivate | `RegisterTenantLifecycleConsumer` from `/tenant-lifecycle` (root namespace `tenantLifecycle`); dedupe by `operationId`; gate on `IsTenantProvisioningCommitted` |
|
|
48
56
|
|
|
49
57
|
Pages you add stay backend-declared blocks; only the missing block is a `CustomComponent`, with `.meta({ name, description, icon })`.
|
|
58
|
+
A page with a period or live data opens with the DMS page toolbar (`pageToolbar()` / `PageToolbar()` from
|
|
59
|
+
`@antelopejs/interface-dms/base`), as the dashboard (period, `rememberKey: "saas"`, no `live`) and the migration detail (`live`, no period) do.
|
|
60
|
+
A period with figures to compare offers `comparisons: ["previous-period", "previous-year", "none"]` (through `pageToolbar()`, several comparisons give the menu on `"previous-period"` by default: set neither `defaultComparison` nor `comparisonControl`); its routes read the window from `compareFrom` / `compareTo` (`readPeriodQuery`), lay comparison series on the current buckets, and send no delta for `comparison=none`.
|
|
50
61
|
|
|
51
62
|
## Gotchas
|
|
52
63
|
|
|
53
64
|
- `reconciliation_required` (operator actions, migrations, webhooks) is deliberate: never delete records or replay blindly.
|
|
65
|
+
- Stripe is the only billing path: demos and tests use a Stripe **test** account (`sk_test_`/`pk_test_`) with webhooks
|
|
66
|
+
forwarded (`stripe listen --forward-to localhost:5010/api/saas/webhooks/stripe`). Webhooks move checkout → active,
|
|
67
|
+
trial end, failed and recovered payments, cancellation; nothing else advances a trial or a renewal.
|
|
68
|
+
- Without webhooks only the crons move states: 01:00 past due → suspended after `autoSuspendDelayDays` (14) from
|
|
69
|
+
`pastDueSince`; 02:00 complimentary `freeUntil` passed → past due; 04:30 cancelled → workspace **and data deleted**
|
|
70
|
+
`dataRetentionDaysAfterCancellation` (30) days after the subscription's last write (`updatedAt`).
|
|
71
|
+
- Direct table seeds (like the playground): keep dates relative to now, an `active` row without `stripeSubscriptionId`
|
|
72
|
+
is free (0 MRR), fake Stripe ids make Stripe-calling actions fail; call `RecomputeTenantBillingState(tenantId)` after.
|
|
73
|
+
A workspace first published already cancelled counts churn only when it has a paid invoice above 0.
|
|
54
74
|
- Checkout errors: `422 checkout_rejected` (retry), `503 checkout_unavailable`, `409 checkout_in_progress`.
|
|
55
75
|
- Upgrading old databases needs manual row fixes (`isComplimentary`, `documentType`, `revision`, `paidUsagePeriods`, localized features).
|
|
56
76
|
- Passwords follow the DMS policy: letters, digits and `@$!%*?&` only.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reader for a plan's catalogue description. It follows the DMS display
|
|
3
|
-
* string convention, like feature labels: a stored value starting with `$` is
|
|
4
|
-
* an i18n key the module seeding the plan ships in its own locales, anything
|
|
5
|
-
* else is shown as written.
|
|
6
|
-
*/
|
|
7
|
-
export function usePlanDescription() {
|
|
8
|
-
const { processI18n } = useTranslation()
|
|
9
|
-
|
|
10
|
-
return (description: string | null | undefined): string =>
|
|
11
|
-
description ? processI18n(description) : ''
|
|
12
|
-
}
|