@antelopejs/dms-saas 0.9.1 → 0.10.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.
Files changed (206) hide show
  1. package/README.md +22 -26
  2. package/dist/auth/subscription-access-gate.d.ts +4 -0
  3. package/dist/auth/subscription-access-gate.js +7 -2
  4. package/dist/auth/subscription-access-gate.js.map +1 -1
  5. package/dist/automation/index.d.ts +10 -10
  6. package/dist/automation/index.js +4 -1
  7. package/dist/automation/index.js.map +1 -1
  8. package/dist/data-api/platformOwner/admin-user-invoices.d.ts +3 -3
  9. package/dist/data-api/platformOwner/admin-user-workspaces.d.ts +3 -3
  10. package/dist/data-api/platformOwner/credit-note-rows.js +7 -7
  11. package/dist/data-api/platformOwner/credit-note-rows.js.map +1 -1
  12. package/dist/data-api/platformOwner/credit-notes.d.ts +4 -4
  13. package/dist/data-api/platformOwner/features.d.ts +32 -10
  14. package/dist/data-api/platformOwner/invitations.d.ts +2 -2
  15. package/dist/data-api/platformOwner/invoice-options.d.ts +1 -1
  16. package/dist/data-api/platformOwner/invoices.d.ts +6 -6
  17. package/dist/data-api/platformOwner/members.d.ts +4 -3
  18. package/dist/data-api/platformOwner/plan-migrations.d.ts +4 -4
  19. package/dist/data-api/platformOwner/plans.d.ts +7 -7
  20. package/dist/data-api/platformOwner/segments.d.ts +4 -3
  21. package/dist/data-api/platformOwner/segments.js.map +1 -1
  22. package/dist/data-api/platformOwner/table-scope.d.ts +1 -1
  23. package/dist/data-api/platformOwner/users.d.ts +4 -4
  24. package/dist/data-api/platformOwner/users.js +1 -1
  25. package/dist/data-api/platformOwner/users.js.map +1 -1
  26. package/dist/data-api/platformOwner/workspaces.d.ts +5 -5
  27. package/dist/data-api/tenant/tenant-invoices.d.ts +4 -4
  28. package/dist/data-api/tenant/tenant-invoices.js +2 -3
  29. package/dist/data-api/tenant/tenant-invoices.js.map +1 -1
  30. package/dist/hooks/register.js +2 -1
  31. package/dist/hooks/register.js.map +1 -1
  32. package/dist/hooks/tenant-export.d.ts +1 -1
  33. package/dist/hooks/tenant-export.js.map +1 -1
  34. package/dist/invoice-line-items/recovery/process.js +7 -8
  35. package/dist/invoice-line-items/recovery/process.js.map +1 -1
  36. package/dist/invoice-line-items/recovery/task.model.d.ts +7 -5
  37. package/dist/metrics/activity-sources.js.map +1 -1
  38. package/dist/metrics/activity.js +19 -15
  39. package/dist/metrics/activity.js.map +1 -1
  40. package/dist/metrics/revenue.js +8 -5
  41. package/dist/metrics/revenue.js.map +1 -1
  42. package/dist/notifications/recipients.js +2 -1
  43. package/dist/notifications/recipients.js.map +1 -1
  44. package/dist/operator-actions/db/lifecycle-delivery.model.d.ts +7 -5
  45. package/dist/operator-actions/db/operator-action.model.d.ts +7 -5
  46. package/dist/operator-actions/journal.js +12 -21
  47. package/dist/operator-actions/journal.js.map +1 -1
  48. package/dist/operator-billing/billing-rules.d.ts +4 -1
  49. package/dist/operator-billing/billing-rules.js +16 -6
  50. package/dist/operator-billing/billing-rules.js.map +1 -1
  51. package/dist/operator-billing/legal-documents-store.js +1 -1
  52. package/dist/operator-billing/legal-documents-store.js.map +1 -1
  53. package/dist/pages/platform/plans/index.js.map +1 -1
  54. package/dist/pages/platform/users/index.js +1 -1
  55. package/dist/pages/platform/users/index.js.map +1 -1
  56. package/dist/pages/tenant/general.d.ts +1 -0
  57. package/dist/pages/tenant/general.js +3 -3
  58. package/dist/pages/tenant/general.js.map +1 -1
  59. package/dist/plan-changes/deferred.js +1 -1
  60. package/dist/plan-changes/deferred.js.map +1 -1
  61. package/dist/plan-changes/guarded-free.js +5 -1
  62. package/dist/plan-changes/guarded-free.js.map +1 -1
  63. package/dist/plan-changes/guarded-landing.js +4 -2
  64. package/dist/plan-changes/guarded-landing.js.map +1 -1
  65. package/dist/plan-changes/guarded-state.js +2 -0
  66. package/dist/plan-changes/guarded-state.js.map +1 -1
  67. package/dist/plan-changes/pending-target.d.ts +1 -1
  68. package/dist/plan-changes/pending-target.js +2 -3
  69. package/dist/plan-changes/pending-target.js.map +1 -1
  70. package/dist/plans/migration-blocks.js +6 -5
  71. package/dist/plans/migration-blocks.js.map +1 -1
  72. package/dist/plans/plan-access-type.d.ts +20 -7
  73. package/dist/plans/plan-access-type.js +7 -1
  74. package/dist/plans/plan-access-type.js.map +1 -1
  75. package/dist/plans/plan-diff.d.ts +3 -3
  76. package/dist/plans/plan-diff.js +19 -14
  77. package/dist/plans/plan-diff.js.map +1 -1
  78. package/dist/plans/plan-write.d.ts +9 -4
  79. package/dist/plans/plan-write.js +36 -6
  80. package/dist/plans/plan-write.js.map +1 -1
  81. package/dist/plans/stripe-sync.js +2 -0
  82. package/dist/plans/stripe-sync.js.map +1 -1
  83. package/dist/routes/platformOwner/billing-settings.d.ts +7 -3
  84. package/dist/routes/platformOwner/billing-settings.js +3 -4
  85. package/dist/routes/platformOwner/billing-settings.js.map +1 -1
  86. package/dist/routes/platformOwner/billing-stats.js.map +1 -1
  87. package/dist/routes/platformOwner/credit-notes-issue.js +3 -4
  88. package/dist/routes/platformOwner/credit-notes-issue.js.map +1 -1
  89. package/dist/routes/platformOwner/plan-migrations.js +3 -3
  90. package/dist/routes/platformOwner/plan-migrations.js.map +1 -1
  91. package/dist/routes/platformOwner/plans.d.ts +26 -0
  92. package/dist/routes/platformOwner/plans.js +9 -2
  93. package/dist/routes/platformOwner/plans.js.map +1 -1
  94. package/dist/routes/platformOwner/segments.d.ts +2 -1
  95. package/dist/routes/platformOwner/segments.js.map +1 -1
  96. package/dist/routes/platformOwner/workspace-operator-actions.d.ts +6 -5
  97. package/dist/routes/platformOwner/workspace-operator-actions.js.map +1 -1
  98. package/dist/routes/platformOwner/workspaces-admin.js +8 -2
  99. package/dist/routes/platformOwner/workspaces-admin.js.map +1 -1
  100. package/dist/routes/public/public-plan-catalog.d.ts +2 -1
  101. package/dist/routes/public/public-plan-catalog.js.map +1 -1
  102. package/dist/routes/public/register.d.ts +2 -0
  103. package/dist/routes/public/register.js +4 -1
  104. package/dist/routes/public/register.js.map +1 -1
  105. package/dist/routes/tenant/billing-pay-invoice.d.ts +3 -4
  106. package/dist/routes/tenant/billing-pay-invoice.js +15 -17
  107. package/dist/routes/tenant/billing-pay-invoice.js.map +1 -1
  108. package/dist/routes/tenant/billing-portal.d.ts +3 -5
  109. package/dist/routes/tenant/billing-portal.js +13 -12
  110. package/dist/routes/tenant/billing-portal.js.map +1 -1
  111. package/dist/routes/tenant/billing-self-refund.d.ts +4 -3
  112. package/dist/routes/tenant/billing-self-refund.js +38 -33
  113. package/dist/routes/tenant/billing-self-refund.js.map +1 -1
  114. package/dist/routes/tenant/complimentary-banner.d.ts +3 -3
  115. package/dist/routes/tenant/complimentary-banner.js +4 -6
  116. package/dist/routes/tenant/complimentary-banner.js.map +1 -1
  117. package/dist/routes/tenant/tenant-billing.d.ts +3 -3
  118. package/dist/routes/tenant/tenant-billing.js +10 -11
  119. package/dist/routes/tenant/tenant-billing.js.map +1 -1
  120. package/dist/routes/tenant/tenant-plan-authentication.d.ts +1 -1
  121. package/dist/routes/tenant/tenant-plan-authentication.js +4 -4
  122. package/dist/routes/tenant/tenant-plan-authentication.js.map +1 -1
  123. package/dist/routes/tenant/tenant-plan-cancellation.d.ts +2 -3
  124. package/dist/routes/tenant/tenant-plan-cancellation.js +9 -7
  125. package/dist/routes/tenant/tenant-plan-cancellation.js.map +1 -1
  126. package/dist/routes/tenant/tenant-plan-checkout.js +18 -16
  127. package/dist/routes/tenant/tenant-plan-checkout.js.map +1 -1
  128. package/dist/routes/tenant/tenant-plan-ops.js +9 -8
  129. package/dist/routes/tenant/tenant-plan-ops.js.map +1 -1
  130. package/dist/routes/tenant/tenant-plan.d.ts +9 -8
  131. package/dist/routes/tenant/tenant-plan.js +25 -30
  132. package/dist/routes/tenant/tenant-plan.js.map +1 -1
  133. package/dist/routes/tenant/tenant-seats.d.ts +2 -3
  134. package/dist/routes/tenant/tenant-seats.js +4 -6
  135. package/dist/routes/tenant/tenant-seats.js.map +1 -1
  136. package/dist/routes/tenant/workspace-access.js +1 -1
  137. package/dist/routes/tenant/workspace-access.js.map +1 -1
  138. package/dist/stripe/availability.d.ts +0 -1
  139. package/dist/stripe/availability.js +2 -5
  140. package/dist/stripe/availability.js.map +1 -1
  141. package/dist/stripe/customer-billing.js +9 -9
  142. package/dist/stripe/customer-billing.js.map +1 -1
  143. package/dist/stripe/sync-plan.js +16 -7
  144. package/dist/stripe/sync-plan.js.map +1 -1
  145. package/dist/stripe/webhook-handlers.js +4 -1
  146. package/dist/stripe/webhook-handlers.js.map +1 -1
  147. package/dist/stripe/webhook-shared.d.ts +5 -1
  148. package/dist/stripe/webhook-shared.js +1 -1
  149. package/dist/stripe/webhook-shared.js.map +1 -1
  150. package/dist/stripe/workspace-checkout.d.ts +1 -1
  151. package/dist/stripe/workspace-checkout.js +6 -12
  152. package/dist/stripe/workspace-checkout.js.map +1 -1
  153. package/dist/upcoming-invoice/db/preview-cache.model.d.ts +7 -5
  154. package/dist/upcoming-invoice/invalidation.js +1 -1
  155. package/dist/upcoming-invoice/invalidation.js.map +1 -1
  156. package/dist/upcoming-invoice/pricing.js +2 -11
  157. package/dist/upcoming-invoice/pricing.js.map +1 -1
  158. package/dist/utils/parse-future-date.d.ts +2 -1
  159. package/dist/utils/parse-future-date.js.map +1 -1
  160. package/dist/utils/rejection-reasons.d.ts +1 -0
  161. package/dist/utils/rejection-reasons.js +12 -0
  162. package/dist/utils/rejection-reasons.js.map +1 -0
  163. package/dist/utils/row-instance.js +5 -1
  164. package/dist/utils/row-instance.js.map +1 -1
  165. package/dist/utils/segment-conditions-type.d.ts +8 -9
  166. package/dist/utils/segment-conditions-type.js +2 -1
  167. package/dist/utils/segment-conditions-type.js.map +1 -1
  168. package/dist/utils/segment-evaluator.d.ts +7 -3
  169. package/dist/utils/segment-evaluator.js +49 -33
  170. package/dist/utils/segment-evaluator.js.map +1 -1
  171. package/dist/utils/segment-explain.d.ts +2 -1
  172. package/dist/utils/segment-explain.js.map +1 -1
  173. package/dist/utils/segment-matching.d.ts +2 -2
  174. package/dist/utils/segment-preview.js.map +1 -1
  175. package/dist/utils/segment-validation.d.ts +5 -4
  176. package/dist/utils/segment-validation.js +57 -32
  177. package/dist/utils/segment-validation.js.map +1 -1
  178. package/dist/utils/status-vocabulary.js +2 -1
  179. package/dist/utils/status-vocabulary.js.map +1 -1
  180. package/dist/utils/zod-json.d.ts +3 -0
  181. package/dist/utils/zod-json.js +21 -0
  182. package/dist/utils/zod-json.js.map +1 -0
  183. package/dist/workers/plan-migration.js +6 -1
  184. package/dist/workers/plan-migration.js.map +1 -1
  185. package/dist/workspaces/billing-identity.d.ts +1 -1
  186. package/dist/workspaces/billing-identity.js +5 -3
  187. package/dist/workspaces/billing-identity.js.map +1 -1
  188. package/dist/workspaces/db/provisioning-attempt.model.d.ts +7 -5
  189. package/dist/workspaces/db/trial-identity.model.d.ts +7 -5
  190. package/dist/workspaces/default-member-role.js +14 -10
  191. package/dist/workspaces/default-member-role.js.map +1 -1
  192. package/dist/workspaces/operator-creation.d.ts +6 -5
  193. package/dist/workspaces/operator-creation.js.map +1 -1
  194. package/dist/workspaces/owner-invitation-email.js.map +1 -1
  195. package/dist/workspaces/registration-extras.d.ts +2 -1
  196. package/dist/workspaces/registration-extras.js.map +1 -1
  197. package/frontend-vue/app/build/public/pricing.ts +3 -0
  198. package/frontend-vue/app/components/WorkspaceDetailHeader.vue +3 -1
  199. package/frontend-vue/app/composables/registrationCardPolicy.ts +56 -0
  200. package/frontend-vue/app/composables/useSaasRegistration.ts +14 -47
  201. package/frontend-vue/app/custom-pages/auth/no-workspace.vue +6 -4
  202. package/frontend-vue/i18n/locales/saas-en-GB.json +1 -0
  203. package/frontend-vue/i18n/locales/saas-fr-FR.json +1 -0
  204. package/frontend-vue/package.json +1 -1
  205. package/package.json +16 -15
  206. package/skills/dms-saas/SKILL.md +5 -2
@@ -4,18 +4,20 @@ declare const ProvisioningAttemptModel_base: {
4
4
  readonly table: import("@antelopejs/interface-database").Table<ProvisioningAttempt>;
5
5
  readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
6
6
  get(id: string): PromiseLike<ProvisioningAttempt | undefined>;
7
- getBy(index: keyof ProvisioningAttempt, ...keys: any[]): PromiseLike<ProvisioningAttempt[]>;
7
+ getBy(index: keyof ProvisioningAttempt, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<ProvisioningAttempt[]>;
8
8
  getAll(): PromiseLike<ProvisioningAttempt[]>;
9
9
  insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<ProvisioningAttempt> | import("@antelopejs/interface-database-decorators").DeepPartial<ProvisioningAttempt>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
10
10
  update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<ProvisioningAttempt>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
11
- update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<ProvisioningAttempt>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
11
+ update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<ProvisioningAttempt> & {
12
+ _id: string;
13
+ }, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
14
  delete(id: string): Promise<number>;
13
15
  };
14
- readonly schemaName: string;
16
+ readonly schemaName: string | undefined;
15
17
  readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<ProvisioningAttempt>;
16
- fromPlainData(obj: any): ProvisioningAttempt;
18
+ fromPlainData(obj: ProvisioningAttempt | import("@antelopejs/interface-database-decorators").PlainData<ProvisioningAttempt>): ProvisioningAttempt;
17
19
  fromDatabase(obj: any): ProvisioningAttempt | undefined;
18
- toDatabase(obj: any): Record<string, any>;
20
+ toDatabase(obj: ProvisioningAttempt | import("@antelopejs/interface-database-decorators").PlainData<ProvisioningAttempt>): import("@antelopejs/interface-database-decorators").StoredRow<ProvisioningAttempt>;
19
21
  validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
20
22
  };
21
23
  export declare class ProvisioningAttemptModel extends ProvisioningAttemptModel_base {
@@ -5,18 +5,20 @@ declare const TrialIdentityModel_base: {
5
5
  readonly table: import("@antelopejs/interface-database").Table<TrialIdentity>;
6
6
  readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
7
7
  get(id: string): PromiseLike<TrialIdentity | undefined>;
8
- getBy(index: keyof TrialIdentity, ...keys: any[]): PromiseLike<TrialIdentity[]>;
8
+ getBy(index: keyof TrialIdentity, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<TrialIdentity[]>;
9
9
  getAll(): PromiseLike<TrialIdentity[]>;
10
10
  insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<TrialIdentity> | import("@antelopejs/interface-database-decorators").DeepPartial<TrialIdentity>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
11
11
  update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<TrialIdentity>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
- update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<TrialIdentity>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
+ update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<TrialIdentity> & {
13
+ _id: string;
14
+ }, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
13
15
  delete(id: string): Promise<number>;
14
16
  };
15
- readonly schemaName: string;
17
+ readonly schemaName: string | undefined;
16
18
  readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<TrialIdentity>;
17
- fromPlainData(obj: any): TrialIdentity;
19
+ fromPlainData(obj: TrialIdentity | import("@antelopejs/interface-database-decorators").PlainData<TrialIdentity>): TrialIdentity;
18
20
  fromDatabase(obj: any): TrialIdentity | undefined;
19
- toDatabase(obj: any): Record<string, any>;
21
+ toDatabase(obj: TrialIdentity | import("@antelopejs/interface-database-decorators").PlainData<TrialIdentity>): import("@antelopejs/interface-database-decorators").StoredRow<TrialIdentity>;
20
22
  validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
21
23
  };
22
24
  export declare class TrialIdentityModel extends TrialIdentityModel_base {
@@ -9,22 +9,26 @@ const plan_permission_tree_1 = require("../plans/plan-permission-tree");
9
9
  const language_1 = require("../utils/language");
10
10
  const MEMBER_ROLE_SUFFIX = "member";
11
11
  const FALLBACK_LANGUAGE = "en";
12
- const MEMBER_ROLE_TEXTS = {
13
- en: {
14
- name: "Member",
15
- description: "Everything the workspace plan includes",
16
- },
17
- fr: {
18
- name: "Membre",
19
- description: "Tout ce que comprend l'offre de l'espace",
20
- },
12
+ const ENGLISH_ROLE_TEXT = {
13
+ name: "Member",
14
+ description: "Everything the workspace plan includes",
21
15
  };
16
+ const MEMBER_ROLE_TEXTS = new Map([
17
+ [FALLBACK_LANGUAGE, ENGLISH_ROLE_TEXT],
18
+ [
19
+ "fr",
20
+ {
21
+ name: "Membre",
22
+ description: "Tout ce que comprend l'offre de l'espace",
23
+ },
24
+ ],
25
+ ]);
22
26
  function defaultMemberRoleId(tenantId) {
23
27
  return `${tenantId}:${MEMBER_ROLE_SUFFIX}`;
24
28
  }
25
29
  function memberRoleText(language) {
26
30
  const base = (0, language_1.baseLanguage)(language) ?? FALLBACK_LANGUAGE;
27
- return MEMBER_ROLE_TEXTS[base] ?? MEMBER_ROLE_TEXTS[FALLBACK_LANGUAGE];
31
+ return MEMBER_ROLE_TEXTS.get(base) ?? ENGLISH_ROLE_TEXT;
28
32
  }
29
33
  async function createDefaultMemberRole(tenantId, language) {
30
34
  const permissions = (0, plan_permission_tree_1.grantablePermissionIds)(await (0, permissions_1.GetPermissions)());
@@ -1 +1 @@
1
- {"version":3,"file":"default-member-role.js","sourceRoot":"","sources":["../../src/workspaces/default-member-role.ts"],"names":[],"mappings":";;AA+BA,kDAEC;AAeD,0DAgBC;AAhED,6FAAqE;AACrE,qDAAyD;AACzD,uEAAuE;AACvE,wEAAuE;AACvE,gDAAiD;AAEjD,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AACpC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAY/B,MAAM,iBAAiB,GAA6B;IAClD,EAAE,EAAE;QACF,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,wCAAwC;KACtD;IACD,EAAE,EAAE;QACF,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,0CAA0C;KACxD;CACF,CAAC;AAGF,SAAgB,mBAAmB,CAAC,QAAgB;IAClD,OAAO,GAAG,QAAQ,IAAI,kBAAkB,EAAE,CAAC;AAC7C,CAAC;AAED,SAAS,cAAc,CAAC,QAA4B;IAClD,MAAM,IAAI,GAAG,IAAA,uBAAY,EAAC,QAAQ,CAAC,IAAI,iBAAiB,CAAC;IACzD,OAAO,iBAAiB,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;AACzE,CAAC;AAUM,KAAK,UAAU,uBAAuB,CAC3C,QAAgB,EAChB,QAA4B;IAE5B,MAAM,WAAW,GAAG,IAAA,6CAAsB,EAAC,MAAM,IAAA,4BAAc,GAAE,CAAC,CAAC;IACnE,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IACvB,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,IAAA,wCAAQ,EAAC,cAAS,EAAE,QAAQ,CAAC,CAAC,MAAM,CAAC;QAC1D;YACE,GAAG,EAAE,mBAAmB,CAAC,QAAQ,CAAC;YAClC,GAAG,cAAc,CAAC,QAAQ,CAAC;YAC3B,WAAW;YACX,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,GAAG;SACf;KACF,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"default-member-role.js","sourceRoot":"","sources":["../../src/workspaces/default-member-role.ts"],"names":[],"mappings":";;AA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B,CAAC"}
@@ -1,14 +1,15 @@
1
1
  import { type InviteUserToTenantResult } from "@antelopejs/interface-dms/invites";
2
2
  import { type User } from "@antelopejs/interface-dms/auth/db";
3
3
  import { type Plan } from "../db";
4
+ import type { JsonValue } from "@antelopejs/interface-dms-saas/json";
4
5
  declare const WORKSPACE_ACCESS_MODELS: readonly ["complimentary", "owner_pays"];
5
6
  export type WorkspaceAccessModel = (typeof WORKSPACE_ACCESS_MODELS)[number];
6
7
  export interface CreateWorkspaceBody {
7
- name?: unknown;
8
- planId?: unknown;
9
- ownerEmail?: unknown;
10
- access?: unknown;
11
- freeUntil?: unknown;
8
+ name?: JsonValue;
9
+ planId?: JsonValue;
10
+ ownerEmail?: JsonValue;
11
+ access?: JsonValue;
12
+ freeUntil?: JsonValue;
12
13
  }
13
14
  export interface ValidatedWorkspaceInput {
14
15
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"operator-creation.js","sourceRoot":"","sources":["../../src/workspaces/operator-creation.ts"],"names":[],"mappings":";;AAwGA,wDAuBC;AAMD,8CAgBC;AAGD,kCAYC;AAuED,0DAmBC;AA9PD,uEAAwD;AACxD,6FAAqE;AACrE,uEAAgE;AAChE,qDAA8E;AAC9E,+DAI2C;AAC3C,0DAAyE;AACzE,oDAA+D;AAC/D,8BAKe;AACf,kEAA6D;AAC7D,qEAAgF;AAChF,+DAAgE;AAChE,gEAAqD;AAErD,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAO7B,MAAM,uBAAuB,GAAG,CAAC,eAAe,EAAE,YAAY,CAAU,CAAC;AAkDzE,MAAM,kBAAkB,GAGpB;IACF,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACzB,MAAM,EAAE,QAAQ;QAChB,eAAe,EAAE,IAAI;QACrB,SAAS,EAAE,KAAK,CAAC,SAAS;KAC3B,CAAC;IACF,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;QACjB,MAAM,EAAE,iBAAiB;QACzB,eAAe,EAAE,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B,EAAC,UAAU,CAAC,QAAQ,CAAC;QAChD,OAAO,EAAE,2BAA2B,UAAU,CAAC,QAAQ,EAAE;KAC1D,CAAC,CAAC;AACL,CAAC;AAQM,KAAK,UAAU,wBAAwB,CAC5C,UAAgC;IAEhC,MAAM,QAAQ,GAAG,MAAM,IAAA,2CAAqB,EAAC;QAC3C,QAAQ,EAAE,UAAU,CAAC,QAAQ;QAC7B,QAAQ,EAAE,UAAU,CAAC,QAAQ;QAC7B,KAAK,EAAE,EAAE,EAAE,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC,KAAK,EAAE;QACxE,KAAK,EAAE,UAAU,CAAC,KAAK;QACvB,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;KAChC,CAAC,CAAC;IACH,IAAI,QAAQ,KAAK,QAAQ;QAAE,MAAM,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAC/D,OAAO,QAAQ,CAAC;AAClB,CAAC;AAMD,SAAgB,oCAAoC,CAClD,UAAgC;IAEhC,KAAK,wBAAwB,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;QACjE,iBAAO,CAAC,KAAK,CACX,GAAG,UAAU,kBAAkB,UAAU,CAAC,QAAQ,eAAe,EACjE,KAAK,CACN,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1,2 @@
1
- export declare function assertRegistrationExtras(extras: unknown): void;
1
+ import type { JsonValue } from "@antelopejs/interface-dms-saas/json";
2
+ export declare function assertRegistrationExtras(extras: JsonValue | undefined): void;
@@ -1 +1 @@
1
- {"version":3,"file":"registration-extras.js","sourceRoot":"","sources":["../../src/workspaces/registration-extras.ts"],"names":[],"mappings":";;AAmFA,4DAgBC;AAnGD,uEAAwD;AACxD,8EAAyF;AAEzF,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAU7B,MAAM,oBAAoB,GAAG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ACD,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;QAAE,OAAO,eAAe,CAAC;IAClD,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;SACzB,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,CACrB,eAAe,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;QAC1C,IAAI,EAAE,CAAC;QACP,KAAK;QACL,eAAe,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC;KAC9C,CAAC,CACH;SACA,MAAM,CAAC,eAAe,EAAE,EAAE,GAAG,eAAe,EAAE,KAAK,EAAE,CAAC,CAAC;AAC5D,CAAC;AAYD,SAAgB,wBAAwB,CAAC,MAA6B;IACpE,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO;IACpD,IAAA,2BAAM,EAAC,aAAa,CAAC,MAAM,CAAC,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAC;IAC/D,IAAA,2BAAM,EACJ,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,IAAI,oBAAoB,EACzE,gBAAgB,EAChB,eAAe,CAChB,CAAC;IAEF,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACrC,IAAA,2BAAM,EAAC,CAAC,SAAS,CAAC,eAAe,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAC;IACpE,IAAA,2BAAM,EACJ,SAAS,CAAC,IAAI,IAAI,QAAQ,IAAI,SAAS,CAAC,KAAK,IAAI,SAAS,EAC1D,gBAAgB,EAChB,iBAAiB,CAClB,CAAC;AACJ,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import type { PlanInterval } from '../../composables/usePlanIntervalLabel'
2
2
  import type { TenantPlanFeature } from '../../composables/useTenantPlan'
3
3
  import { PLAN_UNLIMITED } from '../plan-catalog'
4
+ import type { RegistrationPaymentMethodPolicy } from '../../types/runtime-config'
4
5
 
5
6
  export type PlanBillingMode = 'flat' | 'seat'
6
7
  export type RefundMode = 'full' | 'prorated'
@@ -50,6 +51,8 @@ export interface RegistrationPlanSummary {
50
51
  requestedPlan: PublicPlan | null
51
52
  features: TenantPlanFeature[]
52
53
  rules: PublicBillingRules
54
+ /** The card policy the backend applies to this registration. */
55
+ paymentMethod: RegistrationPaymentMethodPolicy
53
56
  }
54
57
 
55
58
  export interface SeatExample {
@@ -102,7 +102,8 @@ const menu = computed<DropdownMenuItem[][]>(() => {
102
102
  ? t(`${D}.grant_free_access`)
103
103
  : t(`${D}.immediate_upgrade`),
104
104
  icon: isBilled.value ? 'i-ph-gift' : 'i-ph-arrow-circle-up',
105
- disabled: !isBilled.value && !current?.stripeCustomerId,
105
+ disabled:
106
+ isCancelled.value || (!isBilled.value && !current?.stripeCustomerId),
106
107
  onSelect: () => openDialog(isBilled.value ? 'complimentary' : 'upgrade'),
107
108
  },
108
109
  {
@@ -157,6 +158,7 @@ async function runRequestedAction(
157
158
  if (!current || typeof requested !== 'string') return
158
159
  const { [ACTION_QUERY]: _action, ...query } = route.query
159
160
  await router.replace({ query })
161
+ if (current.status === 'cancelled') return
160
162
  QUERY_ACTIONS[requested]?.()
161
163
  }
162
164
 
@@ -0,0 +1,56 @@
1
+ import type { RegistrationPlanSummary } from '../build/public/pricing'
2
+
3
+ type PaymentStepRule = (skipsPaymentMethod: boolean) => boolean
4
+
5
+ const DEFAULT_PAYMENT_POLICY: RegistrationPaymentMethodPolicy = 'required'
6
+
7
+ const PAYMENT_STEP_RULES: Record<
8
+ RegistrationPaymentMethodPolicy,
9
+ PaymentStepRule
10
+ > = {
11
+ required: () => true,
12
+ optional: (skipsPaymentMethod) => !skipsPaymentMethod,
13
+ none: () => false,
14
+ }
15
+
16
+ /**
17
+ * The card policy a sign-up screen follows: the one the backend applies, from
18
+ * the registration plan summary, once it has loaded. Until then, the policy
19
+ * the deployment published, falling back to the backend's own default. The
20
+ * published policy is the configured one: the frontend server cannot tell
21
+ * whether the backend holds a usable Stripe key.
22
+ *
23
+ * @param config dms-saas public runtime config
24
+ * @param summary The registration plan summary, once it has loaded
25
+ * @returns The applied policy, else the configured one, else `required`
26
+ */
27
+ export function resolveRegistrationPaymentPolicy(
28
+ config: DmsSaasPublicRuntimeConfig | undefined,
29
+ summary?: Pick<RegistrationPlanSummary, 'paymentMethod'> | null,
30
+ ): RegistrationPaymentMethodPolicy {
31
+ return (
32
+ [summary?.paymentMethod, config?.registrationPaymentMethod].find(
33
+ isPaymentPolicy,
34
+ ) ?? DEFAULT_PAYMENT_POLICY
35
+ )
36
+ }
37
+
38
+ function isPaymentPolicy(
39
+ policy: string | undefined,
40
+ ): policy is RegistrationPaymentMethodPolicy {
41
+ return !!policy && policy in PAYMENT_STEP_RULES
42
+ }
43
+
44
+ /**
45
+ * Whether the registration still collects a card.
46
+ *
47
+ * @param policy Configured card policy
48
+ * @param skipsPaymentMethod Whether the visitor chose to add a card later
49
+ * @returns True when the card step is shown and must be completed
50
+ */
51
+ export function isPaymentStepShown(
52
+ policy: RegistrationPaymentMethodPolicy,
53
+ skipsPaymentMethod: boolean,
54
+ ): boolean {
55
+ return PAYMENT_STEP_RULES[policy](skipsPaymentMethod)
56
+ }
@@ -8,6 +8,10 @@ import {
8
8
  toValue,
9
9
  } from 'vue'
10
10
  import { REGISTER_PLAN_PARAM } from '../build/public/routes'
11
+ import {
12
+ isPaymentStepShown,
13
+ resolveRegistrationPaymentPolicy,
14
+ } from './registrationCardPolicy'
11
15
  import {
12
16
  registrationLandingPath,
13
17
  useSaasRegistrationPlan,
@@ -108,12 +112,9 @@ interface SetupIntentResponse {
108
112
  clientSecret: string | null
109
113
  }
110
114
 
111
- type PaymentStepRule = (skipsPaymentMethod: boolean) => boolean
112
-
113
115
  const SETUP_INTENT_ENDPOINT = '/api/saas/register/setup-intent'
114
116
  const REGISTER_ENDPOINT = '/api/saas/register'
115
117
  const DEFAULT_PAYMENT_ELEMENT_ID = 'dms-saas-register-payment-element'
116
- const DEFAULT_PAYMENT_POLICY: RegistrationPaymentMethodPolicy = 'required'
117
118
  const INVITATION_ONLY = 'invitation-only'
118
119
  const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
119
120
  const DEFAULT_WORKSPACE_NAME_KEY = 'saas.public.register.default_workspace_name'
@@ -121,15 +122,6 @@ const NO_PAYMENT_ERROR_KEY = 'saas.public.register.error.card_required'
121
122
  const SUBMIT_ERROR_KEY = 'saas.public.register.error.failed'
122
123
  const PASSWORD_POLICY_ERROR_KEY = 'saas.errors.registration.password_policy'
123
124
 
124
- const PAYMENT_STEP_RULES: Record<
125
- RegistrationPaymentMethodPolicy,
126
- PaymentStepRule
127
- > = {
128
- required: () => true,
129
- optional: (skipsPaymentMethod) => !skipsPaymentMethod,
130
- none: () => false,
131
- }
132
-
133
125
  /**
134
126
  * Checked in the order the visitor can act on them: the card field comes
135
127
  * before the legal checkbox on every screen.
@@ -215,36 +207,6 @@ export function registrationFieldOf(
215
207
  return (errorKey && API_ERROR_FIELDS[errorKey]) || null
216
208
  }
217
209
 
218
- /**
219
- * The card policy the deployment published, falling back to the backend's
220
- * own default when it published none.
221
- *
222
- * @param config dms-saas public runtime config
223
- * @returns The configured policy, or `required`
224
- */
225
- export function resolveRegistrationPaymentPolicy(
226
- config: DmsSaasPublicRuntimeConfig | undefined,
227
- ): RegistrationPaymentMethodPolicy {
228
- const policy = config?.registrationPaymentMethod
229
- return policy && policy in PAYMENT_STEP_RULES
230
- ? policy
231
- : DEFAULT_PAYMENT_POLICY
232
- }
233
-
234
- /**
235
- * Whether the registration still collects a card.
236
- *
237
- * @param policy Configured card policy
238
- * @param skipsPaymentMethod Whether the visitor chose to add a card later
239
- * @returns True when the card step is shown and must be completed
240
- */
241
- export function isPaymentStepShown(
242
- policy: RegistrationPaymentMethodPolicy,
243
- skipsPaymentMethod: boolean,
244
- ): boolean {
245
- return PAYMENT_STEP_RULES[policy](skipsPaymentMethod)
246
- }
247
-
248
210
  /**
249
211
  * Whether the deployment has closed public registration to invitations.
250
212
  *
@@ -336,13 +298,18 @@ export function useSaasRegistration(options: UseSaasRegistrationOptions = {}) {
336
298
 
337
299
  /** Registration by invitation only: render the closed state, not the form. */
338
300
  const isRegistrationClosed = isRegistrationClosedBy(saasConfig)
339
- const paymentMethodPolicy = resolveRegistrationPaymentPolicy(saasConfig)
301
+ /** The policy the backend applies, once the plan summary has loaded. */
302
+ const paymentMethodPolicy = computed(() =>
303
+ resolveRegistrationPaymentPolicy(saasConfig, plan.summary.value),
304
+ )
340
305
  /** Whether the screen should offer to add the card later. */
341
- const canSkipPaymentMethod = paymentMethodPolicy === 'optional'
306
+ const canSkipPaymentMethod = computed(
307
+ () => paymentMethodPolicy.value === 'optional',
308
+ )
342
309
 
343
310
  /** Bind the card field's visibility to this, with `v-show`, not `v-if`. */
344
311
  const isPaymentStepVisible = computed(() =>
345
- isPaymentStepShown(paymentMethodPolicy, form.skipsPaymentMethod),
312
+ isPaymentStepShown(paymentMethodPolicy.value, form.skipsPaymentMethod),
346
313
  )
347
314
 
348
315
  /**
@@ -542,8 +509,8 @@ export function useSaasRegistration(options: UseSaasRegistrationOptions = {}) {
542
509
  isLoading.value = false
543
510
  return
544
511
  }
545
- void plan.load()
546
- if (paymentMethodPolicy === 'none') {
512
+ await plan.load()
513
+ if (paymentMethodPolicy.value === 'none') {
547
514
  isLoading.value = false
548
515
  return
549
516
  }
@@ -65,12 +65,14 @@ const saasConfig = config.public.dmsSaas as
65
65
  | undefined
66
66
  const dmsRuntime = config.public.dms as DmsPublicRuntime
67
67
  const isRegistrationClosed = isRegistrationClosedBy(saasConfig)
68
- const paymentMethodPolicy = resolveRegistrationPaymentPolicy(saasConfig)
69
68
  const comparePlansTo = isPublicScreenServed(saasConfig, 'pricing')
70
69
  ? PRICING_PATH
71
70
  : null
72
71
 
73
72
  const plan = useSaasRegistrationPlan(readChosenPlan)
73
+ const paymentMethodPolicy = computed(() =>
74
+ resolveRegistrationPaymentPolicy(saasConfig, plan.summary.value),
75
+ )
74
76
 
75
77
  const tenantAssignmentToken = computed(() => {
76
78
  const value = route.query.token
@@ -95,7 +97,7 @@ const stripeHandle = ref<ReturnType<typeof useStripePaymentElement> | null>(
95
97
  )
96
98
 
97
99
  const isPaymentStepVisible = computed(() =>
98
- isPaymentStepShown(paymentMethodPolicy, skipsPaymentMethod.value),
100
+ isPaymentStepShown(paymentMethodPolicy.value, skipsPaymentMethod.value),
99
101
  )
100
102
 
101
103
  const entryProvider = computed<OAuthProviderOption | null>(() => {
@@ -185,7 +187,7 @@ async function createSetupIntent(): Promise<string | undefined> {
185
187
 
186
188
  async function mountPaymentElement(): Promise<void> {
187
189
  const publishableKey = saasConfig?.stripePublishableKey
188
- if (!publishableKey || paymentMethodPolicy === 'none') return
190
+ if (!publishableKey || paymentMethodPolicy.value === 'none') return
189
191
  try {
190
192
  const clientSecret = await createSetupIntent()
191
193
  if (!clientSecret) return
@@ -280,7 +282,7 @@ onMounted(async () => {
280
282
  // after a card has been entered.
281
283
  await loadPendingRegistration()
282
284
  if (entryFailure.value) return
283
- void plan.load()
285
+ await plan.load()
284
286
  await mountPaymentElement()
285
287
  })
286
288
  </script>
@@ -29,6 +29,7 @@
29
29
  "downgrade_exceeds_seat_limit": "This plan allows fewer members than the workspace currently has",
30
30
  "inheritance_cycle": "Plan inheritance would create a cycle",
31
31
  "inheritance_parent_missing": "Parent plan not found",
32
+ "invalid_billing_mode": "Plan billing mode must be Flat rate or Per seat",
32
33
  "invalid_interval": "Plan billing interval must be monthly or yearly",
33
34
  "no_stripe_price": "Plan has no Stripe price",
34
35
  "seat_limit_reached": "The plan's member limit has been reached",
@@ -29,6 +29,7 @@
29
29
  "downgrade_exceeds_seat_limit": "Cette offre autorise moins de membres que l'espace de travail n'en compte actuellement",
30
30
  "inheritance_cycle": "L'héritage d'offres créerait un cycle",
31
31
  "inheritance_parent_missing": "Offre parente introuvable",
32
+ "invalid_billing_mode": "Le mode de facturation de l'offre doit être Forfait ou Par siège",
32
33
  "invalid_interval": "L'intervalle de facturation de l'offre doit être mensuel ou annuel",
33
34
  "no_stripe_price": "L'offre n'a pas de tarif Stripe",
34
35
  "seat_limit_reached": "La limite de membres de l'offre est atteinte",
@@ -6,7 +6,7 @@
6
6
  "license": "Apache-2.0",
7
7
  "packageManager": "pnpm@10.6.5",
8
8
  "engines": {
9
- "@antelopejs/dms-frontend": ">=0.9.1 <0.10.0"
9
+ "@antelopejs/dms-frontend": ">=0.10.0 <0.11.0"
10
10
  },
11
11
  "scripts": {
12
12
  "format": "prettier --write .",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/dms-saas",
3
- "version": "0.9.1",
3
+ "version": "0.10.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",
@@ -45,23 +45,24 @@
45
45
  "registry": "https://registry.npmjs.org/"
46
46
  },
47
47
  "dependencies": {
48
- "@antelopejs/interface-api": ">=0.0.15 <1.0.0",
49
- "@antelopejs/interface-api-util": ">=0.1.3 <1.0.0",
50
- "@antelopejs/interface-core": ">=0.2.4 <1.0.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",
48
+ "@antelopejs/interface-api": ">=0.3.0 <1.0.0",
49
+ "@antelopejs/interface-api-util": ">=0.3.0 <1.0.0",
50
+ "@antelopejs/interface-core": ">=0.4.0 <1.0.0",
51
+ "@antelopejs/interface-data-api": ">=0.6.1 <1.0.0",
52
+ "@antelopejs/interface-database": ">=0.3.0 <1.0.0",
53
+ "@antelopejs/interface-database-decorators": ">=0.2.0 <1.0.0",
54
+ "@antelopejs/interface-dms": ">=0.12.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.6.1"
58
+ "@antelopejs/interface-dms-saas": "^0.7.1"
59
59
  },
60
60
  "devDependencies": {
61
- "@antelopejs/core": "1.17.1",
62
- "@antelopejs/dms": ">=0.13.1 <1.0.0",
63
- "@antelopejs/dms-frontend": ">=0.9.1 <0.10.0",
64
- "@antelopejs/mongodb": "1.5.0",
61
+ "@antelopejs/core": "1.21.0",
62
+ "@antelopejs/dms": ">=0.17.0 <1.0.0",
63
+ "@antelopejs/dms-frontend": ">=0.10.0 <1.0.0",
64
+ "@antelopejs/interface-mongodb": ">=0.0.6 <1.0.0",
65
+ "@antelopejs/mongodb": "1.6.2",
65
66
  "@total-typescript/shoehorn": "^0.1.2",
66
67
  "@types/node": "^24.0.0",
67
68
  "@vitejs/plugin-vue": "^6.0.10",
@@ -78,7 +79,7 @@
78
79
  "vue": "^3.5.18"
79
80
  },
80
81
  "optionalDependencies": {
81
- "@antelopejs/interface-dms-automation": ">=0.2.1 <1.0.0"
82
+ "@antelopejs/interface-dms-automation": ">=0.6.0 <1.0.0"
82
83
  },
83
84
  "antelopeJs": {
84
85
  "baseUrl": "dist",
@@ -97,7 +98,7 @@
97
98
  "dev": "ajs project run -w -p playground",
98
99
  "stripe:webhooks": "stripe listen --forward-to localhost:5010/api/saas/webhooks/stripe",
99
100
  "typecheck": "tsc --noEmit",
100
- "verify:interface": "node scripts/verify-interface-package.cjs",
101
+ "verify:interface": "node scripts/verify-interface-package.mjs",
101
102
  "test": "pnpm run build && pnpm --filter @antelopejs/interface-dms-saas run check:exports && pnpm run test:unit",
102
103
  "test:unit": "vitest run",
103
104
  "release": "pnpm --filter @antelopejs/interface-dms-saas build && pnpm --dir frontend-vue install --frozen-lockfile && pnpm run verify:interface && release-it",
@@ -14,7 +14,8 @@ User docs: `docs/` of this package, published at https://dms.antelopejs.com/docs
14
14
 
15
15
  ## Setup checklist
16
16
 
17
- - Requires `@antelopejs/dms` >=0.13.1 (interface-dms 0.9, renderer `@antelopejs/dms-frontend` 0.9).
17
+ - The DMS backend and renderer releases the module runs on are in the README compatibility block and in `engines["@antelopejs/dms-frontend"]` of `frontend-vue/package.json`;
18
+ 0.5 is the DMS 0.8 line.
18
19
  - `ajs project modules add @antelopejs/dms-saas`; config `stripe.{secretKey,publishableKey,webhookSecret}` from env
19
20
  (`envOverrides`). Placeholder keys disable Stripe calls: plan sync skipped, registration
20
21
  takes no card whatever `registration.paymentMethod` says. Stripe refusing the key or unreachable → handled
@@ -22,7 +23,9 @@ User docs: `docs/` of this package, published at https://dms.antelopejs.com/docs
22
23
  `withStripeAvailability()` and, when it cannot work without Stripe, calls `assertStripeConfigured()` first
23
24
  (`503 saas.errors.stripe.not_configured`) — see `src/stripe/availability.ts`.
24
25
  - Stripe webhook endpoint → `/api/saas/webhooks/stripe`, API version `2026-08-26.dahlia`.
25
- - Frontend server env: `DMS_AUTH_ESTABLISH_ENDPOINTS=/api/saas/register/finalize`, else sign-ups stay signed out (403).
26
+ - Sign-up completion needs no frontend server env: the module declares `/api/saas/register/finalize` as an
27
+ `authEstablishEndpoints` entry of its frontend module. A `403` from `/auth/establish` (sign-ups stay signed out)
28
+ means the frontend server does not serve this module's frontend (`faq`).
26
29
  - `allowedRedirectHosts` for Checkout / billing-portal return URLs: defaults to the DMS `clientBaseUrl` host, a value replaces it (loopback auto-allowed in dev only).
27
30
  - A free plan must exist (or `defaultPlanSlug`): registration opens it, and every workspace without a subscription gets it.
28
31
  - Options: `admissionMode` (`open` | `invitation-only`), `registration.paymentMethod` (`required` default | `optional` | `none`),