@antelopejs/dms-saas 0.3.15 → 0.5.0

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 (819) hide show
  1. package/README.md +61 -14
  2. package/dist/auth/index.d.ts +1 -0
  3. package/dist/auth/index.js +1 -0
  4. package/dist/auth/index.js.map +1 -1
  5. package/dist/auth/owner-only-permissions-resolver.d.ts +1 -0
  6. package/dist/auth/owner-only-permissions-resolver.js +25 -0
  7. package/dist/auth/owner-only-permissions-resolver.js.map +1 -0
  8. package/dist/billing-state/directory-hooks.d.ts +1 -0
  9. package/dist/billing-state/directory-hooks.js +35 -0
  10. package/dist/billing-state/directory-hooks.js.map +1 -0
  11. package/dist/billing-state/directory.d.ts +29 -0
  12. package/dist/billing-state/directory.js +152 -0
  13. package/dist/billing-state/directory.js.map +1 -0
  14. package/dist/billing-state/index.d.ts +5 -1
  15. package/dist/billing-state/index.js +14 -2
  16. package/dist/billing-state/index.js.map +1 -1
  17. package/dist/billing-state/past-due-banner.d.ts +4 -3
  18. package/dist/billing-state/past-due-banner.js +30 -10
  19. package/dist/billing-state/past-due-banner.js.map +1 -1
  20. package/dist/billing-state/recovery.d.ts +4 -0
  21. package/dist/billing-state/recovery.js +7 -5
  22. package/dist/billing-state/recovery.js.map +1 -1
  23. package/dist/billing-state/trial-ending-banner.d.ts +4 -0
  24. package/dist/billing-state/trial-ending-banner.js +66 -0
  25. package/dist/billing-state/trial-ending-banner.js.map +1 -0
  26. package/dist/config/runtime.d.ts +1 -0
  27. package/dist/config/runtime.js +5 -0
  28. package/dist/config/runtime.js.map +1 -1
  29. package/dist/crons/auto-suspend-past-due.js +4 -5
  30. package/dist/crons/auto-suspend-past-due.js.map +1 -1
  31. package/dist/data-api/platformOwner/admin-user-invoices.d.ts +6 -4
  32. package/dist/data-api/platformOwner/admin-user-invoices.js +52 -30
  33. package/dist/data-api/platformOwner/admin-user-invoices.js.map +1 -1
  34. package/dist/data-api/platformOwner/admin-user-workspaces.d.ts +2 -0
  35. package/dist/data-api/platformOwner/admin-user-workspaces.js +69 -3
  36. package/dist/data-api/platformOwner/admin-user-workspaces.js.map +1 -1
  37. package/dist/data-api/platformOwner/credit-note-rows.d.ts +11 -0
  38. package/dist/data-api/platformOwner/credit-note-rows.js +54 -0
  39. package/dist/data-api/platformOwner/credit-note-rows.js.map +1 -0
  40. package/dist/data-api/platformOwner/credit-notes.d.ts +13 -0
  41. package/dist/data-api/platformOwner/credit-notes.js +149 -10
  42. package/dist/data-api/platformOwner/credit-notes.js.map +1 -1
  43. package/dist/data-api/platformOwner/features.d.ts +8 -2
  44. package/dist/data-api/platformOwner/features.js +155 -35
  45. package/dist/data-api/platformOwner/features.js.map +1 -1
  46. package/dist/data-api/platformOwner/invitations.js +29 -9
  47. package/dist/data-api/platformOwner/invitations.js.map +1 -1
  48. package/dist/data-api/platformOwner/invoice-cells.d.ts +5 -0
  49. package/dist/data-api/platformOwner/invoice-cells.js +51 -0
  50. package/dist/data-api/platformOwner/invoice-cells.js.map +1 -0
  51. package/dist/data-api/platformOwner/invoice-options.js.map +1 -1
  52. package/dist/data-api/platformOwner/invoice-rows.d.ts +9 -0
  53. package/dist/data-api/platformOwner/invoice-rows.js +39 -0
  54. package/dist/data-api/platformOwner/invoice-rows.js.map +1 -0
  55. package/dist/data-api/platformOwner/invoices.d.ts +24 -6
  56. package/dist/data-api/platformOwner/invoices.js +192 -11
  57. package/dist/data-api/platformOwner/invoices.js.map +1 -1
  58. package/dist/data-api/platformOwner/members.d.ts +2 -1
  59. package/dist/data-api/platformOwner/members.js +56 -20
  60. package/dist/data-api/platformOwner/members.js.map +1 -1
  61. package/dist/data-api/platformOwner/plan-migrations.d.ts +14 -2
  62. package/dist/data-api/platformOwner/plan-migrations.js +179 -33
  63. package/dist/data-api/platformOwner/plan-migrations.js.map +1 -1
  64. package/dist/data-api/platformOwner/plans.d.ts +30 -6
  65. package/dist/data-api/platformOwner/plans.js +269 -44
  66. package/dist/data-api/platformOwner/plans.js.map +1 -1
  67. package/dist/data-api/platformOwner/segments.d.ts +9 -7
  68. package/dist/data-api/platformOwner/segments.js +108 -101
  69. package/dist/data-api/platformOwner/segments.js.map +1 -1
  70. package/dist/data-api/platformOwner/table-scope.d.ts +6 -0
  71. package/dist/data-api/platformOwner/table-scope.js +8 -0
  72. package/dist/data-api/platformOwner/table-scope.js.map +1 -0
  73. package/dist/data-api/platformOwner/users.d.ts +15 -2
  74. package/dist/data-api/platformOwner/users.js +171 -15
  75. package/dist/data-api/platformOwner/users.js.map +1 -1
  76. package/dist/data-api/platformOwner/workspace-cells.d.ts +12 -0
  77. package/dist/data-api/platformOwner/workspace-cells.js +90 -0
  78. package/dist/data-api/platformOwner/workspace-cells.js.map +1 -0
  79. package/dist/data-api/platformOwner/workspaces.d.ts +26 -4
  80. package/dist/data-api/platformOwner/workspaces.js +269 -97
  81. package/dist/data-api/platformOwner/workspaces.js.map +1 -1
  82. package/dist/data-api/tenant/tenant-invoices.d.ts +4 -0
  83. package/dist/data-api/tenant/tenant-invoices.js +68 -4
  84. package/dist/data-api/tenant/tenant-invoices.js.map +1 -1
  85. package/dist/hooks/register.js +5 -1
  86. package/dist/hooks/register.js.map +1 -1
  87. package/dist/i18n/composed-text.d.ts +17 -0
  88. package/dist/i18n/composed-text.js +71 -0
  89. package/dist/i18n/composed-text.js.map +1 -0
  90. package/dist/implementations/dms-saas/billing.d.ts +1 -0
  91. package/dist/implementations/dms-saas/billing.js +4 -1
  92. package/dist/implementations/dms-saas/billing.js.map +1 -1
  93. package/dist/implementations/dms-saas/pages.d.ts +0 -1
  94. package/dist/implementations/dms-saas/pages.js +0 -4
  95. package/dist/implementations/dms-saas/pages.js.map +1 -1
  96. package/dist/index.js +5 -1
  97. package/dist/index.js.map +1 -1
  98. package/dist/metrics/activity-sources.d.ts +2 -0
  99. package/dist/metrics/activity-sources.js +60 -0
  100. package/dist/metrics/activity-sources.js.map +1 -0
  101. package/dist/metrics/activity.d.ts +25 -0
  102. package/dist/metrics/activity.js +197 -0
  103. package/dist/metrics/activity.js.map +1 -0
  104. package/dist/metrics/directory-summary.d.ts +30 -0
  105. package/dist/metrics/directory-summary.js +95 -0
  106. package/dist/metrics/directory-summary.js.map +1 -0
  107. package/dist/metrics/headline-items.d.ts +32 -0
  108. package/dist/metrics/headline-items.js +242 -0
  109. package/dist/metrics/headline-items.js.map +1 -0
  110. package/dist/metrics/normalised-mrr.d.ts +32 -0
  111. package/dist/metrics/normalised-mrr.js +75 -0
  112. package/dist/metrics/normalised-mrr.js.map +1 -0
  113. package/dist/metrics/revenue.d.ts +30 -0
  114. package/dist/metrics/revenue.js +126 -0
  115. package/dist/metrics/revenue.js.map +1 -0
  116. package/dist/notifications/recipients.d.ts +1 -0
  117. package/dist/notifications/recipients.js +4 -0
  118. package/dist/notifications/recipients.js.map +1 -1
  119. package/dist/notifications/subjects.d.ts +18 -17
  120. package/dist/notifications/subjects.js +7 -1
  121. package/dist/notifications/subjects.js.map +1 -1
  122. package/dist/operator-actions/commands.js +9 -6
  123. package/dist/operator-actions/commands.js.map +1 -1
  124. package/dist/operator-actions/invitation-commands.d.ts +7 -1
  125. package/dist/operator-actions/invitation-commands.js +16 -0
  126. package/dist/operator-actions/invitation-commands.js.map +1 -1
  127. package/dist/operator-actions/previews.d.ts +50 -0
  128. package/dist/operator-actions/previews.js +113 -0
  129. package/dist/operator-actions/previews.js.map +1 -0
  130. package/dist/operator-actions/types.d.ts +1 -1
  131. package/dist/operator-actions/upgrade-preview.d.ts +35 -0
  132. package/dist/operator-actions/upgrade-preview.js +110 -0
  133. package/dist/operator-actions/upgrade-preview.js.map +1 -0
  134. package/dist/operator-billing/billing-rules.d.ts +58 -0
  135. package/dist/operator-billing/billing-rules.js +90 -0
  136. package/dist/operator-billing/billing-rules.js.map +1 -0
  137. package/dist/operator-billing/billing-settings-store.d.ts +3 -0
  138. package/dist/operator-billing/billing-settings-store.js +34 -0
  139. package/dist/operator-billing/billing-settings-store.js.map +1 -0
  140. package/dist/operator-billing/billing-stats.d.ts +37 -0
  141. package/dist/operator-billing/billing-stats.js +197 -0
  142. package/dist/operator-billing/billing-stats.js.map +1 -0
  143. package/dist/operator-billing/credit-allowance.d.ts +17 -0
  144. package/dist/operator-billing/credit-allowance.js +44 -0
  145. package/dist/operator-billing/credit-allowance.js.map +1 -0
  146. package/dist/operator-billing/credit-note-request.d.ts +39 -0
  147. package/dist/operator-billing/credit-note-request.js +73 -0
  148. package/dist/operator-billing/credit-note-request.js.map +1 -0
  149. package/dist/operator-billing/index.d.ts +8 -0
  150. package/dist/operator-billing/index.js +25 -0
  151. package/dist/operator-billing/index.js.map +1 -0
  152. package/dist/operator-billing/invoice-credit.d.ts +41 -0
  153. package/dist/operator-billing/invoice-credit.js +111 -0
  154. package/dist/operator-billing/invoice-credit.js.map +1 -0
  155. package/dist/operator-billing/legal-documents-store.d.ts +12 -0
  156. package/dist/operator-billing/legal-documents-store.js +46 -0
  157. package/dist/operator-billing/legal-documents-store.js.map +1 -0
  158. package/dist/operator-billing/legal-versions.d.ts +5 -0
  159. package/dist/operator-billing/legal-versions.js +31 -0
  160. package/dist/operator-billing/legal-versions.js.map +1 -0
  161. package/dist/pages/block-meta.d.ts +15 -0
  162. package/dist/pages/block-meta.js +21 -0
  163. package/dist/pages/block-meta.js.map +1 -0
  164. package/dist/pages/module.d.ts +1 -3
  165. package/dist/pages/module.js +1 -8
  166. package/dist/pages/module.js.map +1 -1
  167. package/dist/pages/platform/credit-notes.d.ts +1 -0
  168. package/dist/pages/platform/credit-notes.js +63 -5
  169. package/dist/pages/platform/credit-notes.js.map +1 -1
  170. package/dist/pages/platform/dashboard.d.ts +4 -1
  171. package/dist/pages/platform/dashboard.js +123 -64
  172. package/dist/pages/platform/dashboard.js.map +1 -1
  173. package/dist/pages/platform/features.js +83 -12
  174. package/dist/pages/platform/features.js.map +1 -1
  175. package/dist/pages/platform/index.d.ts +1 -0
  176. package/dist/pages/platform/index.js +1 -0
  177. package/dist/pages/platform/index.js.map +1 -1
  178. package/dist/pages/platform/invoices.d.ts +6 -0
  179. package/dist/pages/platform/invoices.js +84 -28
  180. package/dist/pages/platform/invoices.js.map +1 -1
  181. package/dist/pages/platform/paths.d.ts +9 -0
  182. package/dist/pages/platform/paths.js +25 -0
  183. package/dist/pages/platform/paths.js.map +1 -0
  184. package/dist/pages/platform/plans/edit.d.ts +2 -2
  185. package/dist/pages/platform/plans/edit.js +170 -105
  186. package/dist/pages/platform/plans/edit.js.map +1 -1
  187. package/dist/pages/platform/plans/index.d.ts +1 -0
  188. package/dist/pages/platform/plans/index.js +172 -54
  189. package/dist/pages/platform/plans/index.js.map +1 -1
  190. package/dist/pages/platform/plans/migrations.d.ts +12 -0
  191. package/dist/pages/platform/plans/migrations.js +259 -13
  192. package/dist/pages/platform/plans/migrations.js.map +1 -1
  193. package/dist/pages/platform/segments/edit.d.ts +17 -0
  194. package/dist/pages/platform/segments/edit.js +124 -0
  195. package/dist/pages/platform/segments/edit.js.map +1 -0
  196. package/dist/pages/platform/segments/index.js +68 -8
  197. package/dist/pages/platform/segments/index.js.map +1 -1
  198. package/dist/pages/platform/settings.d.ts +1 -1
  199. package/dist/pages/platform/settings.js +164 -105
  200. package/dist/pages/platform/settings.js.map +1 -1
  201. package/dist/pages/platform/users/detail.js +104 -33
  202. package/dist/pages/platform/users/detail.js.map +1 -1
  203. package/dist/pages/platform/users/index.js +52 -18
  204. package/dist/pages/platform/users/index.js.map +1 -1
  205. package/dist/pages/platform/workspaces/detail.d.ts +3 -1
  206. package/dist/pages/platform/workspaces/detail.js +184 -113
  207. package/dist/pages/platform/workspaces/detail.js.map +1 -1
  208. package/dist/pages/platform/workspaces/index.d.ts +1 -20
  209. package/dist/pages/platform/workspaces/index.js +152 -180
  210. package/dist/pages/platform/workspaces/index.js.map +1 -1
  211. package/dist/pages/platform/workspaces/shared.d.ts +11 -0
  212. package/dist/pages/platform/workspaces/shared.js +53 -0
  213. package/dist/pages/platform/workspaces/shared.js.map +1 -0
  214. package/dist/pages/public/auth/no-workspace.js +7 -2
  215. package/dist/pages/public/auth/no-workspace.js.map +1 -1
  216. package/dist/pages/public/index.js.map +1 -1
  217. package/dist/pages/public/legal/privacy-policy.d.ts +1 -0
  218. package/dist/pages/public/legal/privacy-policy.js +9 -4
  219. package/dist/pages/public/legal/privacy-policy.js.map +1 -1
  220. package/dist/pages/public/legal/terms-and-conditions.d.ts +1 -0
  221. package/dist/pages/public/legal/terms-and-conditions.js +9 -4
  222. package/dist/pages/public/legal/terms-and-conditions.js.map +1 -1
  223. package/dist/pages/public/legal/terms-of-use.d.ts +1 -0
  224. package/dist/pages/public/legal/terms-of-use.js +9 -4
  225. package/dist/pages/public/legal/terms-of-use.js.map +1 -1
  226. package/dist/pages/public/nav-bar.d.ts +2 -0
  227. package/dist/pages/public/nav-bar.js +14 -0
  228. package/dist/pages/public/nav-bar.js.map +1 -0
  229. package/dist/pages/public/pricing.d.ts +10 -0
  230. package/dist/pages/public/pricing.js +32 -0
  231. package/dist/pages/public/pricing.js.map +1 -0
  232. package/dist/pages/public/register.d.ts +1 -0
  233. package/dist/pages/public/register.js +6 -3
  234. package/dist/pages/public/register.js.map +1 -1
  235. package/dist/pages/public/screens.js +1 -0
  236. package/dist/pages/public/screens.js.map +1 -1
  237. package/dist/pages/tenant/billing.d.ts +7 -7
  238. package/dist/pages/tenant/billing.js +141 -63
  239. package/dist/pages/tenant/billing.js.map +1 -1
  240. package/dist/pages/tenant/data-export.d.ts +3 -1
  241. package/dist/pages/tenant/data-export.js +25 -6
  242. package/dist/pages/tenant/data-export.js.map +1 -1
  243. package/dist/pages/tenant/general.d.ts +3 -2
  244. package/dist/pages/tenant/general.js +91 -11
  245. package/dist/pages/tenant/general.js.map +1 -1
  246. package/dist/pages/tenant/index.d.ts +1 -0
  247. package/dist/pages/tenant/index.js +1 -0
  248. package/dist/pages/tenant/index.js.map +1 -1
  249. package/dist/pages/tenant/members-seat-quota.d.ts +3 -0
  250. package/dist/pages/tenant/members-seat-quota.js +18 -6
  251. package/dist/pages/tenant/members-seat-quota.js.map +1 -1
  252. package/dist/pages/tenant/owner-only.d.ts +1 -0
  253. package/dist/pages/tenant/owner-only.js +14 -0
  254. package/dist/pages/tenant/owner-only.js.map +1 -0
  255. package/dist/pages/tenant/workspace-suspended.js +7 -3
  256. package/dist/pages/tenant/workspace-suspended.js.map +1 -1
  257. package/dist/plan-changes/applied-upgrade.d.ts +5 -0
  258. package/dist/plan-changes/applied-upgrade.js +51 -0
  259. package/dist/plan-changes/applied-upgrade.js.map +1 -0
  260. package/dist/plan-changes/deferred.js +9 -40
  261. package/dist/plan-changes/deferred.js.map +1 -1
  262. package/dist/plan-changes/immediate.d.ts +4 -0
  263. package/dist/plan-changes/immediate.js +34 -0
  264. package/dist/plan-changes/immediate.js.map +1 -0
  265. package/dist/plan-changes/index.d.ts +1 -0
  266. package/dist/plan-changes/index.js +1 -0
  267. package/dist/plan-changes/index.js.map +1 -1
  268. package/dist/plan-changes/pending-target.d.ts +17 -0
  269. package/dist/plan-changes/pending-target.js +62 -0
  270. package/dist/plan-changes/pending-target.js.map +1 -0
  271. package/dist/plans/catalogue-summary.d.ts +24 -0
  272. package/dist/plans/catalogue-summary.js +97 -0
  273. package/dist/plans/catalogue-summary.js.map +1 -0
  274. package/dist/plans/catalogue-usage.d.ts +36 -0
  275. package/dist/plans/catalogue-usage.js +120 -0
  276. package/dist/plans/catalogue-usage.js.map +1 -0
  277. package/dist/plans/feature-guards.d.ts +5 -0
  278. package/dist/plans/feature-guards.js +31 -0
  279. package/dist/plans/feature-guards.js.map +1 -0
  280. package/dist/plans/feature-usage.d.ts +4 -0
  281. package/dist/plans/feature-usage.js +22 -0
  282. package/dist/plans/feature-usage.js.map +1 -0
  283. package/dist/plans/migration-blocks.d.ts +13 -0
  284. package/dist/plans/migration-blocks.js +337 -0
  285. package/dist/plans/migration-blocks.js.map +1 -0
  286. package/dist/plans/migration-detail.d.ts +48 -0
  287. package/dist/plans/migration-detail.js +80 -0
  288. package/dist/plans/migration-detail.js.map +1 -0
  289. package/dist/plans/migration-dialogs.d.ts +8 -0
  290. package/dist/plans/migration-dialogs.js +103 -0
  291. package/dist/plans/migration-dialogs.js.map +1 -0
  292. package/dist/plans/migration-outcomes.d.ts +7 -0
  293. package/dist/plans/migration-outcomes.js +38 -0
  294. package/dist/plans/migration-outcomes.js.map +1 -0
  295. package/dist/plans/migration-realtime.d.ts +2 -0
  296. package/dist/plans/migration-realtime.js +19 -0
  297. package/dist/plans/migration-realtime.js.map +1 -0
  298. package/dist/plans/migration-workspaces.d.ts +40 -0
  299. package/dist/plans/migration-workspaces.js +121 -0
  300. package/dist/plans/migration-workspaces.js.map +1 -0
  301. package/dist/plans/money.d.ts +1 -0
  302. package/dist/plans/money.js +11 -0
  303. package/dist/plans/money.js.map +1 -0
  304. package/dist/plans/plan-access-type.d.ts +25 -0
  305. package/dist/plans/plan-access-type.js +49 -0
  306. package/dist/plans/plan-access-type.js.map +1 -0
  307. package/dist/plans/plan-audience.d.ts +3 -0
  308. package/dist/plans/plan-audience.js +9 -0
  309. package/dist/plans/plan-audience.js.map +1 -0
  310. package/dist/plans/plan-diff.d.ts +13 -0
  311. package/dist/plans/plan-diff.js +73 -0
  312. package/dist/plans/plan-diff.js.map +1 -0
  313. package/dist/plans/plan-permission-tree.d.ts +11 -0
  314. package/dist/plans/plan-permission-tree.js +58 -0
  315. package/dist/plans/plan-permission-tree.js.map +1 -0
  316. package/dist/plans/plan-write.d.ts +17 -0
  317. package/dist/plans/plan-write.js +111 -0
  318. package/dist/plans/plan-write.js.map +1 -0
  319. package/dist/plans/seat-capacity.d.ts +3 -1
  320. package/dist/plans/seat-capacity.js +10 -2
  321. package/dist/plans/seat-capacity.js.map +1 -1
  322. package/dist/plans/seat-hooks.d.ts +1 -0
  323. package/dist/plans/seat-hooks.js +1 -0
  324. package/dist/plans/seat-hooks.js.map +1 -1
  325. package/dist/plans/stripe-sync.d.ts +3 -0
  326. package/dist/plans/stripe-sync.js +16 -0
  327. package/dist/plans/stripe-sync.js.map +1 -1
  328. package/dist/routes/platformOwner/billing-settings.d.ts +11 -35
  329. package/dist/routes/platformOwner/billing-settings.js +77 -47
  330. package/dist/routes/platformOwner/billing-settings.js.map +1 -1
  331. package/dist/routes/platformOwner/billing-stats.d.ts +15 -0
  332. package/dist/routes/platformOwner/billing-stats.js +106 -0
  333. package/dist/routes/platformOwner/billing-stats.js.map +1 -0
  334. package/dist/routes/platformOwner/block-payloads.d.ts +7 -0
  335. package/dist/routes/platformOwner/block-payloads.js +3 -0
  336. package/dist/routes/platformOwner/block-payloads.js.map +1 -0
  337. package/dist/routes/platformOwner/credit-notes-issue.d.ts +7 -8
  338. package/dist/routes/platformOwner/credit-notes-issue.js +28 -16
  339. package/dist/routes/platformOwner/credit-notes-issue.js.map +1 -1
  340. package/dist/routes/platformOwner/dashboard.d.ts +14 -57
  341. package/dist/routes/platformOwner/dashboard.js +126 -247
  342. package/dist/routes/platformOwner/dashboard.js.map +1 -1
  343. package/dist/routes/platformOwner/index.d.ts +7 -0
  344. package/dist/routes/platformOwner/index.js +7 -0
  345. package/dist/routes/platformOwner/index.js.map +1 -1
  346. package/dist/routes/platformOwner/plan-deletion.d.ts +77 -19
  347. package/dist/routes/platformOwner/plan-deletion.js +219 -67
  348. package/dist/routes/platformOwner/plan-deletion.js.map +1 -1
  349. package/dist/routes/platformOwner/plan-dialogs.d.ts +22 -0
  350. package/dist/routes/platformOwner/plan-dialogs.js +211 -0
  351. package/dist/routes/platformOwner/plan-dialogs.js.map +1 -0
  352. package/dist/routes/platformOwner/plan-migration-context.d.ts +9 -0
  353. package/dist/routes/platformOwner/plan-migration-context.js +147 -0
  354. package/dist/routes/platformOwner/plan-migration-context.js.map +1 -0
  355. package/dist/routes/platformOwner/plan-migration-export.d.ts +12 -0
  356. package/dist/routes/platformOwner/plan-migration-export.js +100 -0
  357. package/dist/routes/platformOwner/plan-migration-export.js.map +1 -0
  358. package/dist/routes/platformOwner/plan-migrations.d.ts +43 -0
  359. package/dist/routes/platformOwner/plan-migrations.js +260 -0
  360. package/dist/routes/platformOwner/plan-migrations.js.map +1 -0
  361. package/dist/routes/platformOwner/plans.d.ts +45 -42
  362. package/dist/routes/platformOwner/plans.js +162 -143
  363. package/dist/routes/platformOwner/plans.js.map +1 -1
  364. package/dist/routes/platformOwner/platform-owners.d.ts +8 -6
  365. package/dist/routes/platformOwner/platform-owners.js +40 -12
  366. package/dist/routes/platformOwner/platform-owners.js.map +1 -1
  367. package/dist/routes/platformOwner/segments-export.d.ts +15 -0
  368. package/dist/routes/platformOwner/segments-export.js +143 -0
  369. package/dist/routes/platformOwner/segments-export.js.map +1 -0
  370. package/dist/routes/platformOwner/segments.d.ts +17 -11
  371. package/dist/routes/platformOwner/segments.js +62 -113
  372. package/dist/routes/platformOwner/segments.js.map +1 -1
  373. package/dist/routes/platformOwner/stripe-dashboard.d.ts +6 -0
  374. package/dist/routes/platformOwner/stripe-dashboard.js +29 -0
  375. package/dist/routes/platformOwner/stripe-dashboard.js.map +1 -0
  376. package/dist/routes/platformOwner/users-detail.d.ts +12 -22
  377. package/dist/routes/platformOwner/users-detail.js +60 -53
  378. package/dist/routes/platformOwner/users-detail.js.map +1 -1
  379. package/dist/routes/platformOwner/workspace-detail.d.ts +36 -0
  380. package/dist/routes/platformOwner/workspace-detail.js +222 -0
  381. package/dist/routes/platformOwner/workspace-detail.js.map +1 -0
  382. package/dist/routes/platformOwner/workspace-invitations.d.ts +4 -0
  383. package/dist/routes/platformOwner/workspace-invitations.js +18 -0
  384. package/dist/routes/platformOwner/workspace-invitations.js.map +1 -1
  385. package/dist/routes/platformOwner/workspace-operator-actions.d.ts +14 -2
  386. package/dist/routes/platformOwner/workspace-operator-actions.js +42 -4
  387. package/dist/routes/platformOwner/workspace-operator-actions.js.map +1 -1
  388. package/dist/routes/platformOwner/workspaces-admin.d.ts +17 -12
  389. package/dist/routes/platformOwner/workspaces-admin.js +122 -28
  390. package/dist/routes/platformOwner/workspaces-admin.js.map +1 -1
  391. package/dist/routes/public/index.d.ts +1 -0
  392. package/dist/routes/public/index.js +1 -0
  393. package/dist/routes/public/index.js.map +1 -1
  394. package/dist/routes/public/legal-documents.d.ts +2 -8
  395. package/dist/routes/public/legal-documents.js +4 -39
  396. package/dist/routes/public/legal-documents.js.map +1 -1
  397. package/dist/routes/public/pricing.d.ts +12 -0
  398. package/dist/routes/public/pricing.js +50 -0
  399. package/dist/routes/public/pricing.js.map +1 -0
  400. package/dist/routes/public/public-plan-catalog.d.ts +37 -0
  401. package/dist/routes/public/public-plan-catalog.js +63 -0
  402. package/dist/routes/public/public-plan-catalog.js.map +1 -0
  403. package/dist/routes/public/register.d.ts +13 -0
  404. package/dist/routes/public/register.js +88 -4
  405. package/dist/routes/public/register.js.map +1 -1
  406. package/dist/routes/tenant/billing-pay-invoice.d.ts +13 -0
  407. package/dist/routes/tenant/billing-pay-invoice.js +82 -0
  408. package/dist/routes/tenant/billing-pay-invoice.js.map +1 -0
  409. package/dist/routes/tenant/billing-portal.d.ts +8 -3
  410. package/dist/routes/tenant/billing-portal.js +34 -16
  411. package/dist/routes/tenant/billing-portal.js.map +1 -1
  412. package/dist/routes/tenant/billing-self-refund.d.ts +26 -1
  413. package/dist/routes/tenant/billing-self-refund.js +95 -46
  414. package/dist/routes/tenant/billing-self-refund.js.map +1 -1
  415. package/dist/routes/tenant/complimentary-banner.d.ts +12 -0
  416. package/dist/routes/tenant/complimentary-banner.js +64 -0
  417. package/dist/routes/tenant/complimentary-banner.js.map +1 -0
  418. package/dist/routes/tenant/data-export.js +14 -0
  419. package/dist/routes/tenant/data-export.js.map +1 -1
  420. package/dist/routes/tenant/index.d.ts +7 -0
  421. package/dist/routes/tenant/index.js +7 -0
  422. package/dist/routes/tenant/index.js.map +1 -1
  423. package/dist/routes/tenant/tenant-billing.d.ts +1 -0
  424. package/dist/routes/tenant/tenant-billing.js +18 -13
  425. package/dist/routes/tenant/tenant-billing.js.map +1 -1
  426. package/dist/routes/tenant/tenant-plan-authentication.d.ts +13 -0
  427. package/dist/routes/tenant/tenant-plan-authentication.js +79 -0
  428. package/dist/routes/tenant/tenant-plan-authentication.js.map +1 -0
  429. package/dist/routes/tenant/tenant-plan-cancellation.d.ts +12 -0
  430. package/dist/routes/tenant/tenant-plan-cancellation.js +87 -0
  431. package/dist/routes/tenant/tenant-plan-cancellation.js.map +1 -0
  432. package/dist/routes/tenant/tenant-plan-checkout.d.ts +3 -0
  433. package/dist/routes/tenant/tenant-plan-checkout.js +21 -11
  434. package/dist/routes/tenant/tenant-plan-checkout.js.map +1 -1
  435. package/dist/routes/tenant/tenant-plan-ops.d.ts +32 -2
  436. package/dist/routes/tenant/tenant-plan-ops.js +112 -39
  437. package/dist/routes/tenant/tenant-plan-ops.js.map +1 -1
  438. package/dist/routes/tenant/tenant-plan-preview.d.ts +33 -0
  439. package/dist/routes/tenant/tenant-plan-preview.js +216 -0
  440. package/dist/routes/tenant/tenant-plan-preview.js.map +1 -0
  441. package/dist/routes/tenant/tenant-plan-resubscription.d.ts +2 -0
  442. package/dist/routes/tenant/tenant-plan-resubscription.js +61 -0
  443. package/dist/routes/tenant/tenant-plan-resubscription.js.map +1 -0
  444. package/dist/routes/tenant/tenant-plan.d.ts +9 -4
  445. package/dist/routes/tenant/tenant-plan.js +125 -15
  446. package/dist/routes/tenant/tenant-plan.js.map +1 -1
  447. package/dist/routes/tenant/tenant-seats.d.ts +6 -1
  448. package/dist/routes/tenant/tenant-seats.js +26 -5
  449. package/dist/routes/tenant/tenant-seats.js.map +1 -1
  450. package/dist/routes/tenant/tenant-upcoming-invoice.d.ts +26 -0
  451. package/dist/routes/tenant/tenant-upcoming-invoice.js +200 -0
  452. package/dist/routes/tenant/tenant-upcoming-invoice.js.map +1 -0
  453. package/dist/routes/tenant/workspace-access.d.ts +67 -0
  454. package/dist/routes/tenant/workspace-access.js +224 -0
  455. package/dist/routes/tenant/workspace-access.js.map +1 -0
  456. package/dist/routes/tenant/workspaces.d.ts +12 -43
  457. package/dist/routes/tenant/workspaces.js +82 -192
  458. package/dist/routes/tenant/workspaces.js.map +1 -1
  459. package/dist/segments/index.d.ts +29 -0
  460. package/dist/segments/index.js +116 -0
  461. package/dist/segments/index.js.map +1 -0
  462. package/dist/stripe/client.d.ts +1 -0
  463. package/dist/stripe/client.js +11 -0
  464. package/dist/stripe/client.js.map +1 -1
  465. package/dist/stripe/customer-locale.d.ts +3 -0
  466. package/dist/stripe/customer-locale.js +36 -0
  467. package/dist/stripe/customer-locale.js.map +1 -0
  468. package/dist/stripe/dashboard-links.d.ts +2 -0
  469. package/dist/stripe/dashboard-links.js +8 -0
  470. package/dist/stripe/dashboard-links.js.map +1 -0
  471. package/dist/stripe/index.d.ts +3 -0
  472. package/dist/stripe/index.js +3 -0
  473. package/dist/stripe/index.js.map +1 -1
  474. package/dist/stripe/pending-update.d.ts +5 -0
  475. package/dist/stripe/pending-update.js +56 -0
  476. package/dist/stripe/pending-update.js.map +1 -0
  477. package/dist/stripe/plan-schedule.js +4 -1
  478. package/dist/stripe/plan-schedule.js.map +1 -1
  479. package/dist/stripe/subscription-cancellation.d.ts +3 -0
  480. package/dist/stripe/subscription-cancellation.js +26 -0
  481. package/dist/stripe/subscription-cancellation.js.map +1 -0
  482. package/dist/stripe/sync-plan.js +5 -6
  483. package/dist/stripe/sync-plan.js.map +1 -1
  484. package/dist/stripe/upcoming-invoice.d.ts +9 -0
  485. package/dist/stripe/upcoming-invoice.js +19 -3
  486. package/dist/stripe/upcoming-invoice.js.map +1 -1
  487. package/dist/stripe/webhook-checkout.js +2 -0
  488. package/dist/stripe/webhook-checkout.js.map +1 -1
  489. package/dist/stripe/webhook-credit-notes.js +15 -0
  490. package/dist/stripe/webhook-credit-notes.js.map +1 -1
  491. package/dist/stripe/webhook-dispatch.js +2 -0
  492. package/dist/stripe/webhook-dispatch.js.map +1 -1
  493. package/dist/stripe/webhook-handlers.d.ts +1 -0
  494. package/dist/stripe/webhook-handlers.js +34 -9
  495. package/dist/stripe/webhook-handlers.js.map +1 -1
  496. package/dist/stripe/webhook-shared.d.ts +3 -1
  497. package/dist/stripe/webhook-shared.js +20 -1
  498. package/dist/stripe/webhook-shared.js.map +1 -1
  499. package/dist/stripe/workspace-checkout.d.ts +2 -0
  500. package/dist/stripe/workspace-checkout.js +4 -0
  501. package/dist/stripe/workspace-checkout.js.map +1 -1
  502. package/dist/types/config.d.ts +2 -0
  503. package/dist/types/config.js.map +1 -1
  504. package/dist/upcoming-invoice/mapping.js +1 -0
  505. package/dist/upcoming-invoice/mapping.js.map +1 -1
  506. package/dist/users/index.d.ts +4 -0
  507. package/dist/users/index.js +21 -0
  508. package/dist/users/index.js.map +1 -0
  509. package/dist/users/platform-role.d.ts +18 -0
  510. package/dist/users/platform-role.js +127 -0
  511. package/dist/users/platform-role.js.map +1 -0
  512. package/dist/users/user-detail.d.ts +43 -0
  513. package/dist/users/user-detail.js +100 -0
  514. package/dist/users/user-detail.js.map +1 -0
  515. package/dist/users/user-facts.d.ts +10 -0
  516. package/dist/users/user-facts.js +157 -0
  517. package/dist/users/user-facts.js.map +1 -0
  518. package/dist/users/user-segments.d.ts +10 -0
  519. package/dist/users/user-segments.js +32 -0
  520. package/dist/users/user-segments.js.map +1 -0
  521. package/dist/utils/billing-displays.d.ts +6 -0
  522. package/dist/utils/billing-displays.js +17 -0
  523. package/dist/utils/billing-displays.js.map +1 -0
  524. package/dist/utils/billing-document-status.d.ts +0 -4
  525. package/dist/utils/billing-document-status.js +1 -13
  526. package/dist/utils/billing-document-status.js.map +1 -1
  527. package/dist/utils/billing-document-type.d.ts +6 -0
  528. package/dist/utils/billing-document-type.js +13 -0
  529. package/dist/utils/billing-document-type.js.map +1 -1
  530. package/dist/utils/content-language.d.ts +2 -0
  531. package/dist/utils/content-language.js +12 -0
  532. package/dist/utils/content-language.js.map +1 -0
  533. package/dist/utils/csv-file.d.ts +2 -0
  534. package/dist/utils/csv-file.js +23 -0
  535. package/dist/utils/csv-file.js.map +1 -0
  536. package/dist/utils/form-insight-type.d.ts +8 -0
  537. package/dist/utils/form-insight-type.js +34 -0
  538. package/dist/utils/form-insight-type.js.map +1 -0
  539. package/dist/utils/index.d.ts +9 -0
  540. package/dist/utils/index.js +9 -0
  541. package/dist/utils/index.js.map +1 -1
  542. package/dist/utils/language.d.ts +1 -0
  543. package/dist/utils/language.js +7 -0
  544. package/dist/utils/language.js.map +1 -0
  545. package/dist/utils/money.d.ts +2 -0
  546. package/dist/utils/money.js +24 -0
  547. package/dist/utils/money.js.map +1 -0
  548. package/dist/utils/segment-evaluator.d.ts +4 -0
  549. package/dist/utils/segment-evaluator.js +15 -8
  550. package/dist/utils/segment-evaluator.js.map +1 -1
  551. package/dist/utils/segment-explain.d.ts +10 -0
  552. package/dist/utils/segment-explain.js +31 -0
  553. package/dist/utils/segment-explain.js.map +1 -0
  554. package/dist/utils/segment-fields.d.ts +13 -2
  555. package/dist/utils/segment-fields.js +137 -116
  556. package/dist/utils/segment-fields.js.map +1 -1
  557. package/dist/utils/segment-matching.d.ts +14 -3
  558. package/dist/utils/segment-matching.js +47 -13
  559. package/dist/utils/segment-matching.js.map +1 -1
  560. package/dist/utils/segment-preview.d.ts +31 -0
  561. package/dist/utils/segment-preview.js +83 -0
  562. package/dist/utils/segment-preview.js.map +1 -0
  563. package/dist/utils/segment-user-projection.d.ts +3 -0
  564. package/dist/utils/segment-user-projection.js +31 -0
  565. package/dist/utils/segment-user-projection.js.map +1 -0
  566. package/dist/utils/segment-validation.d.ts +14 -0
  567. package/dist/utils/segment-validation.js +98 -0
  568. package/dist/utils/segment-validation.js.map +1 -0
  569. package/dist/utils/status-vocabulary.d.ts +57 -0
  570. package/dist/utils/status-vocabulary.js +92 -0
  571. package/dist/utils/status-vocabulary.js.map +1 -0
  572. package/dist/workers/index.d.ts +1 -0
  573. package/dist/workers/index.js +1 -0
  574. package/dist/workers/index.js.map +1 -1
  575. package/dist/workers/plan-migration-resolution.d.ts +14 -0
  576. package/dist/workers/plan-migration-resolution.js +99 -0
  577. package/dist/workers/plan-migration-resolution.js.map +1 -0
  578. package/dist/workers/plan-migration.d.ts +6 -1
  579. package/dist/workers/plan-migration.js +152 -37
  580. package/dist/workers/plan-migration.js.map +1 -1
  581. package/dist/workspaces/billing-identity-lock.d.ts +1 -0
  582. package/dist/workspaces/billing-identity-lock.js +18 -0
  583. package/dist/workspaces/billing-identity-lock.js.map +1 -0
  584. package/dist/workspaces/complimentary-banner.d.ts +11 -0
  585. package/dist/workspaces/complimentary-banner.js +83 -0
  586. package/dist/workspaces/complimentary-banner.js.map +1 -0
  587. package/dist/workspaces/default-member-role.d.ts +2 -0
  588. package/dist/workspaces/default-member-role.js +43 -0
  589. package/dist/workspaces/default-member-role.js.map +1 -0
  590. package/dist/workspaces/deletion-request.d.ts +2 -0
  591. package/dist/workspaces/deletion-request.js +5 -0
  592. package/dist/workspaces/deletion-request.js.map +1 -0
  593. package/dist/workspaces/deletion.d.ts +1 -1
  594. package/dist/workspaces/deletion.js +19 -7
  595. package/dist/workspaces/deletion.js.map +1 -1
  596. package/dist/workspaces/detail-items.d.ts +15 -0
  597. package/dist/workspaces/detail-items.js +226 -0
  598. package/dist/workspaces/detail-items.js.map +1 -0
  599. package/dist/workspaces/first-payment.d.ts +5 -0
  600. package/dist/workspaces/first-payment.js +28 -0
  601. package/dist/workspaces/first-payment.js.map +1 -0
  602. package/dist/workspaces/free-workspaces-per-card.d.ts +6 -0
  603. package/dist/workspaces/free-workspaces-per-card.js +58 -0
  604. package/dist/workspaces/free-workspaces-per-card.js.map +1 -0
  605. package/dist/workspaces/index.d.ts +7 -0
  606. package/dist/workspaces/index.js +7 -0
  607. package/dist/workspaces/index.js.map +1 -1
  608. package/dist/workspaces/invitations.d.ts +2 -1
  609. package/dist/workspaces/invitations.js +16 -6
  610. package/dist/workspaces/invitations.js.map +1 -1
  611. package/dist/workspaces/my-workspaces.d.ts +13 -0
  612. package/dist/workspaces/my-workspaces.js +68 -0
  613. package/dist/workspaces/my-workspaces.js.map +1 -0
  614. package/dist/workspaces/operator-creation.d.ts +39 -0
  615. package/dist/workspaces/operator-creation.js +123 -0
  616. package/dist/workspaces/operator-creation.js.map +1 -0
  617. package/dist/workspaces/operator-view.d.ts +13 -0
  618. package/dist/workspaces/operator-view.js +37 -0
  619. package/dist/workspaces/operator-view.js.map +1 -0
  620. package/dist/workspaces/owner-contact.d.ts +7 -0
  621. package/dist/workspaces/owner-contact.js +24 -0
  622. package/dist/workspaces/owner-contact.js.map +1 -0
  623. package/dist/workspaces/owner-invitation-email.d.ts +12 -0
  624. package/dist/workspaces/owner-invitation-email.js +53 -0
  625. package/dist/workspaces/owner-invitation-email.js.map +1 -0
  626. package/dist/workspaces/provisioning.d.ts +2 -0
  627. package/dist/workspaces/provisioning.js +37 -15
  628. package/dist/workspaces/provisioning.js.map +1 -1
  629. package/dist/workspaces/self-serve-creation.d.ts +38 -0
  630. package/dist/workspaces/self-serve-creation.js +106 -0
  631. package/dist/workspaces/self-serve-creation.js.map +1 -0
  632. package/dist/workspaces/workspace-glance.d.ts +3 -0
  633. package/dist/workspaces/workspace-glance.js +93 -0
  634. package/dist/workspaces/workspace-glance.js.map +1 -0
  635. package/dist/workspaces/workspace-name.d.ts +2 -0
  636. package/dist/workspaces/workspace-name.js +14 -0
  637. package/dist/workspaces/workspace-name.js.map +1 -0
  638. package/dist/workspaces/workspace-overview.d.ts +41 -0
  639. package/dist/workspaces/workspace-overview.js +84 -0
  640. package/dist/workspaces/workspace-overview.js.map +1 -0
  641. package/dist/workspaces/workspace-owner.d.ts +7 -0
  642. package/dist/workspaces/workspace-owner.js +14 -0
  643. package/dist/workspaces/workspace-owner.js.map +1 -0
  644. package/frontend-vue/app/build/PayInvoiceDialog.vue +40 -0
  645. package/frontend-vue/app/build/PayInvoicePanel.vue +203 -0
  646. package/frontend-vue/app/build/PlanChangeReview.vue +415 -0
  647. package/frontend-vue/app/build/PlanFeatureValueInput.vue +143 -0
  648. package/frontend-vue/app/build/PlanPermissionPicker.vue +246 -0
  649. package/frontend-vue/app/build/WorkspaceSwitcherRow.vue +116 -0
  650. package/frontend-vue/app/build/components/CreditNoteInvoiceSummary.vue +82 -0
  651. package/frontend-vue/app/build/components/FormFieldRow.vue +97 -0
  652. package/frontend-vue/app/build/components/FormRows.vue +26 -0
  653. package/frontend-vue/app/build/components/RequiredLegend.vue +7 -0
  654. package/frontend-vue/app/build/composables/useCreditNoteDraft.ts +142 -0
  655. package/frontend-vue/app/build/composables/useCreditNoteTexts.ts +123 -0
  656. package/frontend-vue/app/build/composables/useLiveFormValues.ts +49 -0
  657. package/frontend-vue/app/build/day-formats.ts +17 -0
  658. package/frontend-vue/app/build/highlight.ts +28 -0
  659. package/frontend-vue/app/build/plan-catalog.ts +161 -0
  660. package/frontend-vue/app/build/plan-change-heading.ts +81 -0
  661. package/frontend-vue/app/build/plan-permissions.ts +92 -0
  662. package/frontend-vue/app/build/plan-retire.ts +83 -0
  663. package/frontend-vue/app/build/public/AccessTimeline.vue +68 -0
  664. package/frontend-vue/app/build/public/LegalAcceptance.vue +51 -0
  665. package/frontend-vue/app/build/public/OtherWorkspaces.vue +88 -0
  666. package/frontend-vue/app/build/public/PricingComparison.vue +227 -0
  667. package/frontend-vue/app/build/public/PricingFaq.vue +76 -0
  668. package/frontend-vue/app/build/public/PublicStage.vue +72 -0
  669. package/frontend-vue/app/build/public/RegistrationCardField.vue +71 -0
  670. package/frontend-vue/app/build/public/RegistrationPlanCard.vue +122 -0
  671. package/frontend-vue/app/build/public/access.ts +118 -0
  672. package/frontend-vue/app/build/public/chosen-plan.ts +36 -0
  673. package/frontend-vue/app/build/public/legal.ts +99 -0
  674. package/frontend-vue/app/build/public/pricing.ts +175 -0
  675. package/frontend-vue/app/build/public/routes.ts +122 -0
  676. package/frontend-vue/app/build/public/usePublicFetch.ts +44 -0
  677. package/frontend-vue/app/build/public/usePublicPlanFormat.ts +52 -0
  678. package/frontend-vue/app/build/segments/tree.ts +137 -0
  679. package/frontend-vue/app/build/segments/types.ts +119 -0
  680. package/frontend-vue/app/build/segments/useSegmentCatalog.ts +58 -0
  681. package/frontend-vue/app/build/segments/useSegmentDraft.ts +33 -0
  682. package/frontend-vue/app/build/segments/useSegmentPreview.ts +78 -0
  683. package/frontend-vue/app/build/segments/useSegmentSentence.ts +60 -0
  684. package/frontend-vue/app/build/segments/useSegmentWords.ts +204 -0
  685. package/frontend-vue/app/build/useWorkspaceName.ts +14 -0
  686. package/frontend-vue/app/build/users/useUserDetail.ts +82 -0
  687. package/frontend-vue/app/build/workspace-detail/ComplimentaryDialog.vue +219 -0
  688. package/frontend-vue/app/build/workspace-detail/CreditDialog.vue +243 -0
  689. package/frontend-vue/app/build/workspace-detail/UpgradeDialog.vue +258 -0
  690. package/frontend-vue/app/build/workspace-detail/WorkspaceActionDialogs.vue +82 -0
  691. package/frontend-vue/app/build/workspace-detail/planPrice.ts +26 -0
  692. package/frontend-vue/app/build/workspace-detail/types.ts +138 -0
  693. package/frontend-vue/app/build/workspace-detail/useWorkspaceActions.ts +177 -0
  694. package/frontend-vue/app/build/workspace-detail/useWorkspaceOverview.ts +44 -0
  695. package/frontend-vue/app/build/workspace-paths.ts +8 -0
  696. package/frontend-vue/app/components/BillingIdentityFields.vue +294 -161
  697. package/frontend-vue/app/components/CustomerPortalButton.vue +80 -32
  698. package/frontend-vue/app/components/DataExport.vue +250 -260
  699. package/frontend-vue/app/components/DataExportHistory.vue +246 -0
  700. package/frontend-vue/app/components/DunningTimeline.vue +120 -0
  701. package/frontend-vue/app/components/IssueCreditNoteModal.vue +318 -116
  702. package/frontend-vue/app/components/LegalDocumentRelease.vue +64 -0
  703. package/frontend-vue/app/components/LegalLayout.vue +284 -46
  704. package/frontend-vue/app/components/MigrationStripeCheck.vue +133 -0
  705. package/frontend-vue/app/components/PastDueAlert.vue +186 -78
  706. package/frontend-vue/app/components/PastDueBanner.vue +96 -67
  707. package/frontend-vue/app/components/PayInvoiceModal.vue +57 -0
  708. package/frontend-vue/app/components/PaymentMethodCard.vue +159 -163
  709. package/frontend-vue/app/components/PendingCheckoutModal.vue +61 -61
  710. package/frontend-vue/app/components/PlanAccessEditor.vue +410 -0
  711. package/frontend-vue/app/components/PlanCard.vue +358 -261
  712. package/frontend-vue/app/components/PlanCardPublic.vue +123 -51
  713. package/frontend-vue/app/components/PlanComparisonModal.vue +373 -310
  714. package/frontend-vue/app/components/PlanEditorPreview.vue +374 -0
  715. package/frontend-vue/app/components/PlanLimitInput.vue +92 -0
  716. package/frontend-vue/app/components/PlanTaxSync.vue +118 -0
  717. package/frontend-vue/app/components/PlanUpgradeModal.vue +265 -156
  718. package/frontend-vue/app/components/PlatformNotes.vue +215 -255
  719. package/frontend-vue/app/components/Pricing.vue +236 -0
  720. package/frontend-vue/app/components/PublicNavBar.vue +70 -0
  721. package/frontend-vue/app/components/RefundButton.vue +264 -113
  722. package/frontend-vue/app/components/RefundExample.vue +86 -0
  723. package/frontend-vue/app/components/Register.vue +217 -121
  724. package/frontend-vue/app/components/RegistrationClosed.vue +30 -13
  725. package/frontend-vue/app/components/RetirePlanModal.vue +829 -0
  726. package/frontend-vue/app/components/SeatQuotaBanner.vue +240 -90
  727. package/frontend-vue/app/components/SegmentConditionRow.vue +171 -0
  728. package/frontend-vue/app/components/SegmentConditionsBuilder.vue +89 -162
  729. package/frontend-vue/app/components/SegmentConditionsGroup.vue +273 -463
  730. package/frontend-vue/app/components/SegmentLivePreview.vue +301 -0
  731. package/frontend-vue/app/components/SegmentLogicToggle.vue +24 -0
  732. package/frontend-vue/app/components/SegmentRulesText.vue +57 -0
  733. package/frontend-vue/app/components/SegmentValueInput.vue +165 -0
  734. package/frontend-vue/app/components/SegmentWords.vue +36 -0
  735. package/frontend-vue/app/components/TenantBillingForm.vue +142 -103
  736. package/frontend-vue/app/components/TenantPlanCard.vue +635 -281
  737. package/frontend-vue/app/components/TrialEndingBanner.vue +76 -0
  738. package/frontend-vue/app/components/UserPlatformRoleCard.vue +102 -0
  739. package/frontend-vue/app/components/UserSegmentMatches.vue +123 -0
  740. package/frontend-vue/app/components/UserSummaryCard.vue +107 -158
  741. package/frontend-vue/app/components/WorkspaceAdminCreateModal.vue +354 -177
  742. package/frontend-vue/app/components/WorkspaceCreateModal.vue +372 -252
  743. package/frontend-vue/app/components/WorkspaceDangerZone.vue +178 -126
  744. package/frontend-vue/app/components/WorkspaceDetailHeader.vue +262 -19
  745. package/frontend-vue/app/components/WorkspaceInvitationLink.vue +108 -86
  746. package/frontend-vue/app/components/WorkspaceOperatorActions.vue +105 -330
  747. package/frontend-vue/app/components/WorkspaceSuspendButton.vue +34 -158
  748. package/frontend-vue/app/components/WorkspaceSuspended.vue +390 -149
  749. package/frontend-vue/app/components/WorkspaceSwitcherWidget.vue +145 -161
  750. package/frontend-vue/app/composables/useBillingIdentity.ts +97 -95
  751. package/frontend-vue/app/composables/useBillingStatus.ts +56 -24
  752. package/frontend-vue/app/composables/useCurrentWorkspace.ts +15 -30
  753. package/frontend-vue/app/composables/useDaysLeft.ts +20 -0
  754. package/frontend-vue/app/composables/useExportHistory.ts +209 -120
  755. package/frontend-vue/app/composables/useInvitationLink.ts +39 -53
  756. package/frontend-vue/app/composables/useMoneyFormat.ts +64 -33
  757. package/frontend-vue/app/composables/useMyWorkspaces.ts +41 -32
  758. package/frontend-vue/app/composables/useNextInvoice.ts +20 -0
  759. package/frontend-vue/app/composables/usePayInvoice.ts +52 -0
  760. package/frontend-vue/app/composables/usePendingCheckout.ts +71 -67
  761. package/frontend-vue/app/composables/usePlanCatalog.ts +16 -0
  762. package/frontend-vue/app/composables/usePlanChangeReview.ts +115 -0
  763. package/frontend-vue/app/composables/usePlanComparison.ts +17 -8
  764. package/frontend-vue/app/composables/usePlanDowngrade.ts +25 -23
  765. package/frontend-vue/app/composables/usePlanFeatureFormat.ts +238 -202
  766. package/frontend-vue/app/composables/usePlanPriceLabel.ts +28 -0
  767. package/frontend-vue/app/composables/useSaasRegistration.ts +516 -301
  768. package/frontend-vue/app/composables/useSaasStatus.ts +81 -0
  769. package/frontend-vue/app/composables/useSeatQuota.ts +27 -17
  770. package/frontend-vue/app/composables/useServerConfirm.ts +44 -0
  771. package/frontend-vue/app/composables/useStripePaymentElement.ts +3 -5
  772. package/frontend-vue/app/composables/useTenantPlan.ts +235 -99
  773. package/frontend-vue/app/composables/useUpgradeAuthentication.ts +37 -0
  774. package/frontend-vue/app/composables/useWorkspaceFinalization.ts +4 -0
  775. package/frontend-vue/app/composables/useWorkspaceOverview.ts +58 -0
  776. package/frontend-vue/app/composables/useWorkspaceRenamed.ts +33 -0
  777. package/frontend-vue/app/custom-pages/auth/no-workspace.vue +391 -312
  778. package/frontend-vue/app/plugins/auth-links.ts +38 -17
  779. package/frontend-vue/app/plugins/billing-data-types.ts +111 -58
  780. package/frontend-vue/app/plugins/footer-links.ts +13 -33
  781. package/frontend-vue/app/plugins/segment-conditions-data-type.ts +45 -0
  782. package/frontend-vue/app/plugins/sidebar-widgets.ts +13 -10
  783. package/frontend-vue/app/types/runtime-config.ts +9 -4
  784. package/frontend-vue/dms.frontend.build.ts +7 -0
  785. package/frontend-vue/dms.frontend.ts +6 -13
  786. package/frontend-vue/i18n/locales/saas-en-GB.json +499 -1380
  787. package/frontend-vue/i18n/locales/saas-fr-FR.json +499 -1380
  788. package/frontend-vue/i18n/locales/saas-operator-billing-en-GB.json +282 -0
  789. package/frontend-vue/i18n/locales/saas-operator-billing-fr-FR.json +282 -0
  790. package/frontend-vue/i18n/locales/saas-operator-catalog-en-GB.json +597 -0
  791. package/frontend-vue/i18n/locales/saas-operator-catalog-fr-FR.json +597 -0
  792. package/frontend-vue/i18n/locales/saas-operator-users-en-GB.json +505 -0
  793. package/frontend-vue/i18n/locales/saas-operator-users-fr-FR.json +505 -0
  794. package/frontend-vue/i18n/locales/saas-operator-workspaces-en-GB.json +595 -0
  795. package/frontend-vue/i18n/locales/saas-operator-workspaces-fr-FR.json +595 -0
  796. package/frontend-vue/i18n/locales/saas-public-en-GB.json +304 -0
  797. package/frontend-vue/i18n/locales/saas-public-fr-FR.json +304 -0
  798. package/frontend-vue/i18n/locales/saas-tenant-billing-en-GB.json +434 -0
  799. package/frontend-vue/i18n/locales/saas-tenant-billing-fr-FR.json +434 -0
  800. package/frontend-vue/i18n/locales/saas-tenant-workspace-en-GB.json +252 -0
  801. package/frontend-vue/i18n/locales/saas-tenant-workspace-fr-FR.json +252 -0
  802. package/frontend-vue/package.json +1 -1
  803. package/package.json +10 -10
  804. package/frontend-vue/app/components/CardGrid.vue +0 -77
  805. package/frontend-vue/app/components/DeletePlanModal.vue +0 -223
  806. package/frontend-vue/app/components/FreeAccessBanner.vue +0 -70
  807. package/frontend-vue/app/components/PlanCardsDisplay.vue +0 -127
  808. package/frontend-vue/app/components/PlanInheritancePicker.vue +0 -329
  809. package/frontend-vue/app/components/RecentActivity.vue +0 -72
  810. package/frontend-vue/app/components/WorkspaceBillingInfo.vue +0 -68
  811. package/frontend-vue/app/components/WorkspaceCompAccessButton.vue +0 -198
  812. package/frontend-vue/app/components/WorkspaceIdentity.vue +0 -99
  813. package/frontend-vue/app/components/WorkspaceJoinButton.vue +0 -50
  814. package/frontend-vue/app/components/WorkspaceSummaryCard.vue +0 -185
  815. package/frontend-vue/app/composables/useDetailRefresh.ts +0 -17
  816. package/frontend-vue/app/composables/usePastDueBannerAction.ts +0 -20
  817. package/frontend-vue/app/composables/usePlanFeatureLabel.ts +0 -24
  818. package/frontend-vue/app/plugins/plan-cards-display.client.ts +0 -16
  819. package/frontend-vue/app/plugins/segment-conditions-data-type.client.ts +0 -122
@@ -0,0 +1,32 @@
1
+ import type { BillingState, PlanBillingMode, PlanInterval } from "../db";
2
+ export declare function isBilledState(billingState: BillingState): boolean;
3
+ export interface MrrPlanTerms {
4
+ price: number;
5
+ currency: string;
6
+ interval: PlanInterval;
7
+ billingMode: PlanBillingMode;
8
+ }
9
+ export interface MrrInput {
10
+ billingState: BillingState;
11
+ isComplimentary: boolean;
12
+ plan: MrrPlanTerms | null;
13
+ billedSeats: number;
14
+ }
15
+ export interface MinorAmount {
16
+ amountMinor: number;
17
+ currency: string;
18
+ }
19
+ export interface ReportingTotal extends MinorAmount {
20
+ otherCurrencies: MinorAmount[];
21
+ }
22
+ export declare function planUnitAmountMinor(plan: Pick<MrrPlanTerms, "price" | "currency">): number;
23
+ export interface BilledTerms {
24
+ unitAmountMinor: number;
25
+ interval: PlanInterval;
26
+ billingMode: PlanBillingMode;
27
+ }
28
+ export declare function monthlyAmountMinor(terms: BilledTerms, billedSeats: number): number;
29
+ export declare function monthlyPlanAmountMinor(plan: MrrPlanTerms, billedSeats: number): number;
30
+ export declare function normalisedMrr(input: MrrInput): MinorAmount;
31
+ export declare function reportingMajorUnits(amount: MinorAmount, reportingCurrency: string): number;
32
+ export declare function sumInReportingCurrency(amounts: readonly MinorAmount[], reportingCurrency: string): ReportingTotal;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isBilledState = isBilledState;
4
+ exports.planUnitAmountMinor = planUnitAmountMinor;
5
+ exports.monthlyAmountMinor = monthlyAmountMinor;
6
+ exports.monthlyPlanAmountMinor = monthlyPlanAmountMinor;
7
+ exports.normalisedMrr = normalisedMrr;
8
+ exports.reportingMajorUnits = reportingMajorUnits;
9
+ exports.sumInReportingCurrency = sumInReportingCurrency;
10
+ const money_1 = require("../utils/money");
11
+ const MONTHS_PER_INTERVAL = {
12
+ month: 1,
13
+ year: 12,
14
+ };
15
+ const BILLED_STATES = new Set([
16
+ "active",
17
+ "past_due",
18
+ ]);
19
+ const MIN_BILLED_SEATS = 1;
20
+ function isBilledState(billingState) {
21
+ return BILLED_STATES.has(billingState);
22
+ }
23
+ function planUnitAmountMinor(plan) {
24
+ return (0, money_1.toMinorUnits)(plan.price, plan.currency);
25
+ }
26
+ function monthlyAmountMinor(terms, billedSeats) {
27
+ const seats = terms.billingMode === "seat" ? Math.max(MIN_BILLED_SEATS, billedSeats) : 1;
28
+ return Math.round((terms.unitAmountMinor * seats) / MONTHS_PER_INTERVAL[terms.interval]);
29
+ }
30
+ function monthlyPlanAmountMinor(plan, billedSeats) {
31
+ return monthlyAmountMinor({
32
+ unitAmountMinor: planUnitAmountMinor(plan),
33
+ interval: plan.interval,
34
+ billingMode: plan.billingMode,
35
+ }, billedSeats);
36
+ }
37
+ function normalisedMrr(input) {
38
+ const currency = (input.plan?.currency ?? "").toUpperCase();
39
+ const isBilled = !!input.plan &&
40
+ !input.isComplimentary &&
41
+ isBilledState(input.billingState) &&
42
+ input.plan.price > 0;
43
+ if (!isBilled || !input.plan)
44
+ return { amountMinor: 0, currency };
45
+ return {
46
+ amountMinor: monthlyPlanAmountMinor(input.plan, input.billedSeats),
47
+ currency,
48
+ };
49
+ }
50
+ function reportingMajorUnits(amount, reportingCurrency) {
51
+ return amount.currency === reportingCurrency
52
+ ? (0, money_1.fromMinorUnits)(amount.amountMinor, amount.currency)
53
+ : 0;
54
+ }
55
+ function addTo(totals, { currency, amountMinor }) {
56
+ totals.set(currency, (totals.get(currency) ?? 0) + amountMinor);
57
+ return totals;
58
+ }
59
+ function sumInReportingCurrency(amounts, reportingCurrency) {
60
+ const currency = reportingCurrency.toUpperCase();
61
+ const totals = amounts
62
+ .filter((amount) => amount.amountMinor !== 0 && amount.currency)
63
+ .map((amount) => ({ ...amount, currency: amount.currency.toUpperCase() }))
64
+ .reduce(addTo, new Map());
65
+ const otherCurrencies = [...totals.entries()]
66
+ .filter(([code]) => code !== currency)
67
+ .map(([code, amountMinor]) => ({ currency: code, amountMinor }))
68
+ .sort((left, right) => left.currency.localeCompare(right.currency));
69
+ return {
70
+ amountMinor: totals.get(currency) ?? 0,
71
+ currency,
72
+ otherCurrencies,
73
+ };
74
+ }
75
+ //# sourceMappingURL=normalised-mrr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalised-mrr.js","sourceRoot":"","sources":["../../src/metrics/normalised-mrr.ts"],"names":[],"mappings":";;AAkBA,sCAEC;AAiCD,kDAIC;AAaD,gDASC;AAGD,wDAYC;AAOD,sCAYC;AAMD,kDAOC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,EAAE,CAAC,CAAC;SACzE,MAAM,CAAC,KAAK,EAAE,IAAI,GAAG,EAAkB,CAAC,CAAC;IAC5C,MAAM,eAAe,GAAG,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;SAC1C,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,QAAQ,CAAC;SACrC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;SAC/D,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;IACtE,OAAO;QACL,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;QACtC,QAAQ;QACR,eAAe;KAChB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { Invoice } from "../db";
2
+ import type { DirectoryRow } from "./directory-summary";
3
+ import { type ReportingTotal } from "./normalised-mrr";
4
+ export interface PeriodRange {
5
+ from: Date;
6
+ to: Date;
7
+ }
8
+ export interface SeriesPoint {
9
+ x: string;
10
+ y: number;
11
+ }
12
+ export interface ChartSeries {
13
+ name: string;
14
+ data: SeriesPoint[];
15
+ }
16
+ export interface ChartCardPayload {
17
+ value: number;
18
+ previousValue?: number;
19
+ delta?: number;
20
+ series: ChartSeries[];
21
+ }
22
+ export interface ChurnFigures {
23
+ rate: number;
24
+ cancellations: number;
25
+ lost: ReportingTotal;
26
+ }
27
+ export declare function parsePeriod(from: unknown, to: unknown, now?: Date): PeriodRange;
28
+ export declare function parseComparison(from: unknown, to: unknown): PeriodRange | null;
29
+ export declare function paidInvoicesChart(documents: Invoice[], range: PeriodRange, comparison: PeriodRange | null, reportingCurrency: string): ChartCardPayload;
30
+ export declare function churnOver(rows: DirectoryRow[], range: PeriodRange, currentMrr: ReportingTotal): ChurnFigures;
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parsePeriod = parsePeriod;
4
+ exports.parseComparison = parseComparison;
5
+ exports.paidInvoicesChart = paidInvoicesChart;
6
+ exports.churnOver = churnOver;
7
+ const time_1 = require("../utils/time");
8
+ const normalised_mrr_1 = require("./normalised-mrr");
9
+ const money_1 = require("../utils/money");
10
+ const DEFAULT_PERIOD_DAYS = 30;
11
+ const DAILY_BUCKETS_MAX_DAYS = 92;
12
+ const PERCENT = 100;
13
+ const DAY_KEY_LENGTH = 10;
14
+ const MONTH_KEY_LENGTH = 7;
15
+ const COLLECTED_SERIES = "$saas.dashboard.paid_invoices.collected";
16
+ const CREDITED_SERIES = "$saas.dashboard.paid_invoices.credited";
17
+ const CREDIT_NOTE_DOCUMENT = "credit_note";
18
+ function parseDate(value) {
19
+ if (typeof value !== "string" || !value)
20
+ return null;
21
+ const date = new Date(value);
22
+ return Number.isNaN(date.getTime()) ? null : date;
23
+ }
24
+ function parsePeriod(from, to, now = new Date()) {
25
+ const end = parseDate(to) ?? now;
26
+ const start = parseDate(from) ??
27
+ new Date(end.getTime() - DEFAULT_PERIOD_DAYS * time_1.MS_PER_DAY);
28
+ return { from: start, to: end };
29
+ }
30
+ function parseComparison(from, to) {
31
+ const start = parseDate(from);
32
+ const end = parseDate(to);
33
+ return start && end ? { from: start, to: end } : null;
34
+ }
35
+ function isWithin(date, range) {
36
+ return date >= range.from && date <= range.to;
37
+ }
38
+ function bucketLength(range) {
39
+ const days = (range.to.getTime() - range.from.getTime()) / time_1.MS_PER_DAY;
40
+ return days <= DAILY_BUCKETS_MAX_DAYS ? DAY_KEY_LENGTH : MONTH_KEY_LENGTH;
41
+ }
42
+ function bucketKeys(range, length) {
43
+ const keys = new Set();
44
+ for (let time = range.from.getTime(); time <= range.to.getTime(); time += time_1.MS_PER_DAY) {
45
+ keys.add(new Date(time).toISOString().slice(0, length));
46
+ }
47
+ keys.add(range.to.toISOString().slice(0, length));
48
+ return [...keys];
49
+ }
50
+ function documentDate(document) {
51
+ return new Date(document.paidAt ?? document.issuedAt);
52
+ }
53
+ function inReportingCurrency(document, currency) {
54
+ return document.currency.toUpperCase() === currency;
55
+ }
56
+ function majorUnitsOf(document) {
57
+ return (0, money_1.fromMinorUnits)(document.total, document.currency);
58
+ }
59
+ function sumMajorUnits(documents) {
60
+ return documents.reduce((sum, document) => sum + majorUnitsOf(document), 0);
61
+ }
62
+ function seriesOf(documents, keys, length) {
63
+ const totals = new Map(keys.map((bucket) => [bucket, 0]));
64
+ for (const document of documents) {
65
+ const bucket = documentDate(document).toISOString().slice(0, length);
66
+ totals.set(bucket, (totals.get(bucket) ?? 0) + majorUnitsOf(document));
67
+ }
68
+ return keys.map((bucket) => ({ x: bucket, y: totals.get(bucket) ?? 0 }));
69
+ }
70
+ function totalOf(points) {
71
+ return points.reduce((sum, point) => sum + point.y, 0);
72
+ }
73
+ function collectedIn(documents, range, currency) {
74
+ return documents.filter((document) => document.documentType !== CREDIT_NOTE_DOCUMENT &&
75
+ document.status === "paid" &&
76
+ inReportingCurrency(document, currency) &&
77
+ isWithin(documentDate(document), range));
78
+ }
79
+ function creditedIn(documents, range, currency) {
80
+ return documents.filter((document) => document.documentType === CREDIT_NOTE_DOCUMENT &&
81
+ document.status === "issued" &&
82
+ inReportingCurrency(document, currency) &&
83
+ isWithin(documentDate(document), range));
84
+ }
85
+ function percentChange(current, previous) {
86
+ if (previous === 0)
87
+ return undefined;
88
+ return ((current - previous) / previous) * PERCENT;
89
+ }
90
+ function paidInvoicesChart(documents, range, comparison, reportingCurrency) {
91
+ const length = bucketLength(range);
92
+ const keys = bucketKeys(range, length);
93
+ const collected = seriesOf(collectedIn(documents, range, reportingCurrency), keys, length);
94
+ const credited = seriesOf(creditedIn(documents, range, reportingCurrency), keys, length);
95
+ const value = totalOf(collected);
96
+ const previousValue = comparison
97
+ ? sumMajorUnits(collectedIn(documents, comparison, reportingCurrency))
98
+ : undefined;
99
+ return {
100
+ value,
101
+ previousValue,
102
+ delta: previousValue === undefined
103
+ ? undefined
104
+ : percentChange(value, previousValue),
105
+ series: [
106
+ { name: COLLECTED_SERIES, data: collected },
107
+ { name: CREDITED_SERIES, data: credited },
108
+ ],
109
+ };
110
+ }
111
+ function churnOver(rows, range, currentMrr) {
112
+ const cancelled = rows.filter((row) => row.billingState === "cancelled" &&
113
+ !!row.stateSince &&
114
+ isWithin(new Date(row.stateSince), range));
115
+ const lost = (0, normalised_mrr_1.sumInReportingCurrency)(cancelled.map((row) => ({
116
+ amountMinor: row.previousMrrMinor,
117
+ currency: row.currency ?? "",
118
+ })), currentMrr.currency);
119
+ const base = currentMrr.amountMinor + lost.amountMinor;
120
+ return {
121
+ rate: base === 0 ? 0 : (lost.amountMinor / base) * PERCENT,
122
+ cancellations: cancelled.length,
123
+ lost,
124
+ };
125
+ }
126
+ //# sourceMappingURL=revenue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revenue.js","sourceRoot":"","sources":["../../src/metrics/revenue.ts"],"names":[],"mappings":";;AAyDA,kCAUC;AAGD,0CAOC;AA8FD,8CAkCC;AAOD,8BAwBC;AA3OD,wCAA2C;AAE3C,qDAA+E;AAC/E,0CAAgD;AAoChD,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAE/B,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,OAAO,GAAG,GAAG,CAAC;AACpB,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,MAAM,gBAAgB,GAAG,yCAAyC,CAAC;AACnE,MAAM,eAAe,GAAG,wCAAwC,CAAC;AACjE,MAAM,oBAAoB,GAAG,aAAa,CAAC;AAE3C,SAAS,SAAS,CAAC,KAAc;IAC/B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK;QAAE,OAAO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aAAa,CAAC,KAAK,EAAE,aAAa,CAAC;QACzC,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,SAAS,EAAE;YAC3C,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC1C;KACF,CAAC;AACJ,CAAC;AAOD,SAAgB,SAAS,CACvB,IAAoB,EACpB,KAAkB,EAClB,UAA0B;IAE1B,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAC3B,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,YAAY,KAAK,WAAW;QAChC,CAAC,CAAC,GAAG,CAAC,UAAU;QAChB,QAAQ,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,CAC5C,CAAC;IACF,MAAM,IAAI,GAAG,IAAA,uCAAsB,EACjC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACtB,WAAW,EAAE,GAAG,CAAC,gBAAgB;QACjC,QAAQ,EAAE,GAAG,CAAC,QAAQ,IAAI,EAAE;KAC7B,CAAC,CAAC,EACH,UAAU,CAAC,QAAQ,CACpB,CAAC;IACF,MAAM,IAAI,GAAG,UAAU,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;IACvD,OAAO;QACL,IAAI,EAAE,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,OAAO;QAC1D,aAAa,EAAE,SAAS,CAAC,MAAM;QAC/B,IAAI;KACL,CAAC;AACJ,CAAC"}
@@ -13,3 +13,4 @@ export declare function notifyTenantMembers(tenantId: string, subject: Notificat
13
13
  export declare function notifyTenantOwners(tenantId: string, subject: NotificationSubjectInfo, payload: SaasNotificationPayload): Promise<void>;
14
14
  export declare function resolvePlatformOwners(excludeUserId?: string): Promise<string[]>;
15
15
  export declare function notifyAllPlatformOwners(subject: NotificationSubjectInfo, payload: SaasNotificationPayload, excludeUserId?: string): Promise<void>;
16
+ export declare function notifyUser(userId: string, subject: NotificationSubjectInfo, payload: SaasNotificationPayload): Promise<void>;
@@ -6,6 +6,7 @@ exports.notifyTenantMembers = notifyTenantMembers;
6
6
  exports.notifyTenantOwners = notifyTenantOwners;
7
7
  exports.resolvePlatformOwners = resolvePlatformOwners;
8
8
  exports.notifyAllPlatformOwners = notifyAllPlatformOwners;
9
+ exports.notifyUser = notifyUser;
9
10
  const logging_1 = require("@antelopejs/interface-core/logging");
10
11
  const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
11
12
  const db_1 = require("@antelopejs/interface-dms/db");
@@ -80,4 +81,7 @@ async function resolvePlatformOwners(excludeUserId) {
80
81
  async function notifyAllPlatformOwners(subject, payload, excludeUserId) {
81
82
  await deliverNotification(() => resolvePlatformOwners(excludeUserId), subject, payload);
82
83
  }
84
+ async function notifyUser(userId, subject, payload) {
85
+ await deliverNotification(async () => [userId], subject, payload);
86
+ }
83
87
  //# sourceMappingURL=recipients.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recipients.js","sourceRoot":"","sources":["../../src/notifications/recipients.ts"],"names":[],"mappings":";;AAiGA,sEAMC;AAED,kDAIC;AAOD,kDAUC;AAGD,gDAUC;AAED,sDAaC;AAED,0DAUC;AAtKD,gEAA6D;AAC7D,6FAAqE;AACrE,qDAAiE;AACjE,0DAA8D;AAC9D,2EAAuE;AAcvE,SAAS,iBAAiB,CACxB,OAAgC,EAChC,OAAgC;IAEhC,MAAM,OAAO,GAAG,IAAA,4BAAY,GAAE;SAC3B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;SAClB,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;SACpB,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC;SAChC,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,IAAI,OAAO,CAAC,MAAM;QAAE,OAAO,CAAC,MAAM,C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AAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AACpE,CAAC"}
@@ -1,19 +1,20 @@
1
1
  import { NotificationSubject } from "@antelopejs/interface-dms/notifications";
2
2
  export type NotificationSubjectInfo = ReturnType<typeof NotificationSubject>;
3
- export declare const SaasCategory: import("@antelopejs/interface-dms/notifications/types").NotificationCategoryInfo;
4
- export declare const planMigratedSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
5
- export declare const trialEndingSoonSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
6
- export declare const trialEndedBlockedSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
7
- export declare const paymentFailedSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
8
- export declare const workspaceSuspendedSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
9
- export declare const freeWorkspaceExpiredSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
10
- export declare const freeWorkspaceEndingSoonSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
11
- export declare const subscriptionCancelledSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
12
- export declare const creditNoteIssuedSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
13
- export declare const refundProcessedSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
14
- export declare const platformOwnerAddedSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
15
- export declare const platformOwnerRemovedSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
16
- export declare const workspaceReactivatedSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
17
- export declare const seatOverageSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
18
- export declare const complimentaryAccessGrantedSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
19
- export declare const automationNotificationSubject: import("@antelopejs/interface-dms/notifications/types").NotificationSubjectInfo;
3
+ export declare const SaasCategory: import("@antelopejs/interface-dms/notifications").NotificationCategoryInfo;
4
+ export declare const planMigratedSubject: import("@antelopejs/interface-dms/notifications").NotificationSubjectInfo;
5
+ export declare const trialEndingSoonSubject: import("@antelopejs/interface-dms/notifications").NotificationSubjectInfo;
6
+ export declare const trialEndedBlockedSubject: import("@antelopejs/interface-dms/notifications").NotificationSubjectInfo;
7
+ export declare const paymentFailedSubject: import("@antelopejs/interface-dms/notifications").NotificationSubjectInfo;
8
+ export declare const workspaceSuspendedSubject: import("@antelopejs/interface-dms/notifications").NotificationSubjectInfo;
9
+ export declare const freeWorkspaceExpiredSubject: import("@antelopejs/interface-dms/notifications").NotificationSubjectInfo;
10
+ export declare const freeWorkspaceEndingSoonSubject: import("@antelopejs/interface-dms/notifications").NotificationSubjectInfo;
11
+ export declare const subscriptionCancelledSubject: import("@antelopejs/interface-dms/notifications").NotificationSubjectInfo;
12
+ export declare const creditNoteIssuedSubject: import("@antelopejs/interface-dms/notifications").NotificationSubjectInfo;
13
+ export declare const refundProcessedSubject: import("@antelopejs/interface-dms/notifications").NotificationSubjectInfo;
14
+ export declare const platformOwnerAddedSubject: import("@antelopejs/interface-dms/notifications").NotificationSubjectInfo;
15
+ export declare const platformOwnerRemovedSubject: import("@antelopejs/interface-dms/notifications").NotificationSubjectInfo;
16
+ export declare const workspaceReactivatedSubject: import("@antelopejs/interface-dms/notifications").NotificationSubjectInfo;
17
+ export declare const seatOverageSubject: import("@antelopejs/interface-dms/notifications").NotificationSubjectInfo;
18
+ export declare const complimentaryAccessGrantedSubject: import("@antelopejs/interface-dms/notifications").NotificationSubjectInfo;
19
+ export declare const invitationEmailFailedSubject: import("@antelopejs/interface-dms/notifications").NotificationSubjectInfo;
20
+ export declare const automationNotificationSubject: import("@antelopejs/interface-dms/notifications").NotificationSubjectInfo;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.automationNotificationSubject = exports.complimentaryAccessGrantedSubject = exports.seatOverageSubject = exports.workspaceReactivatedSubject = exports.platformOwnerRemovedSubject = exports.platformOwnerAddedSubject = exports.refundProcessedSubject = exports.creditNoteIssuedSubject = exports.subscriptionCancelledSubject = exports.freeWorkspaceEndingSoonSubject = exports.freeWorkspaceExpiredSubject = exports.workspaceSuspendedSubject = exports.paymentFailedSubject = exports.trialEndedBlockedSubject = exports.trialEndingSoonSubject = exports.planMigratedSubject = exports.SaasCategory = void 0;
3
+ exports.automationNotificationSubject = exports.invitationEmailFailedSubject = exports.complimentaryAccessGrantedSubject = exports.seatOverageSubject = exports.workspaceReactivatedSubject = exports.platformOwnerRemovedSubject = exports.platformOwnerAddedSubject = exports.refundProcessedSubject = exports.creditNoteIssuedSubject = exports.subscriptionCancelledSubject = exports.freeWorkspaceEndingSoonSubject = exports.freeWorkspaceExpiredSubject = exports.workspaceSuspendedSubject = exports.paymentFailedSubject = exports.trialEndedBlockedSubject = exports.trialEndingSoonSubject = exports.planMigratedSubject = exports.SaasCategory = void 0;
4
4
  const notifications_1 = require("@antelopejs/interface-dms/notifications");
5
5
  exports.SaasCategory = (0, notifications_1.NotificationCategory)("saas", {
6
6
  labelKey: "saas.notifications.category.label",
@@ -25,6 +25,7 @@ const SUBJECT_KEYS = {
25
25
  seatOverage: "saas.notifications.subjects.seat_overage",
26
26
  complimentaryAccessGranted: "saas.notifications.subjects.complimentary_access_granted",
27
27
  automation: "saas.notifications.subjects.automation",
28
+ invitationEmailFailed: "saas.notifications.subjects.invitation_email_failed",
28
29
  };
29
30
  exports.planMigratedSubject = (0, notifications_1.NotificationSubject)("saas.plan_migrated", {
30
31
  category: exports.SaasCategory,
@@ -101,6 +102,11 @@ exports.complimentaryAccessGrantedSubject = (0, notifications_1.NotificationSubj
101
102
  labelKey: SUBJECT_KEYS.complimentaryAccessGranted,
102
103
  togglePermission: "default",
103
104
  });
105
+ exports.invitationEmailFailedSubject = (0, notifications_1.NotificationSubject)("saas.invitation_email_failed", {
106
+ category: exports.SaasCategory,
107
+ labelKey: SUBJECT_KEYS.invitationEmailFailed,
108
+ togglePermission: "forbidden",
109
+ });
104
110
  exports.automationNotificationSubject = (0, notifications_1.NotificationSubject)("saas.automation", {
105
111
  category: exports.SaasCategory,
106
112
  labelKey: SUBJECT_KEYS.automation,
@@ -1 +1 @@
1
- {"version":3,"file":"subjects.js","sourceRoot":"","sources":["../../src/notifications/subjects.ts"],"names":[],"mappings":";;;AAAA,2EAGiD;AAIpC,QAAA,YAAY,GAAG,IAAA,oCAAoB,EAAC,MAAM,EAAE;IACvD,QAAQ,EAAE,mCAAmC;IAC7C,cAAc,EAAE,yCAAyC;IACzD,IAAI,EAAE,gBAAgB;IACtB,gBAAgB,EAAE,SAAS;CAC5B,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG;IACnB,YAAY,EAAE,2CAA2C;IACzD,eAAe,EAAE,+CAA+C;IAChE,iBAAiB,EAAE,iDAAiD;IACpE,aAAa,EAAE,4CAA4C;IAC3D,kBAAkB,EAAE,iDAAiD;IACrE,qBAAqB,EAAE,oDAAoD;IAC3E,gBAAgB,EAAE,gDAAgD;IAClE,eAAe,EAAE,8CAA8C;IAC/D,kBAAkB,EAAE,kDAAkD;IACtE,oBAAoB,EAAE,oDAAoD;IAC1E,oBAAoB,EAAE,oDAAoD;IAC1E,uBAAuB,EACrB,wDAAwD;IAC1D,oBAAoB,EAAE,mDAAmD;IACzE,WAAW,EAAE,0CAA0C;IACvD,0BAA0B,EACxB,0DAA0D;IAC5D,UAAU,EAAE,wCAAwC;CAC5C,CAAC;AAEE,QAAA,mBAAmB,GAAG,IAAA,mCAAmB,EAAC,oBAAoB,EAAE;IAC3E,QAAQ,EAAE,oBAAY;IACtB,QAAQ,EAAE,YAAY,CAAC,YAAY;IACnC,gBAAgB,EAAE,SAAS;CAC5B,CAAC,CAAC;AACU,QAAA,sBAAsB,GAAG,IAAA,mCAAmB,E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EAAE,YAAY,CAAC,UAAU;IACjC,gBAAgB,EAAE,SAAS;CAC5B,CACF,CAAC"}
@@ -19,6 +19,7 @@ const customer_balance_1 = require("../stripe/customer-balance");
19
19
  const utils_1 = require("../utils");
20
20
  const suspension_1 = require("../workspaces/suspension");
21
21
  const journal_1 = require("./journal");
22
+ const plan_audience_1 = require("../plans/plan-audience");
22
23
  const HTTP_BAD_REQUEST = 400;
23
24
  const HTTP_NOT_FOUND = 404;
24
25
  const HTTP_CONFLICT = 409;
@@ -62,15 +63,14 @@ async function reactivateWorkspaceCommand(input) {
62
63
  return executeSuspensionCommand(input, "workspace.unsuspend");
63
64
  }
64
65
  function isEligibleManualUpgradeTarget(target, current, customerType, occupiedSeats) {
65
- const hasAudience = !!customerType &&
66
- (target.audience === "any" || target.audience === customerType);
66
+ const hasAudience = !!customerType && (0, plan_audience_1.isPlanOfferedTo)(target, customerType);
67
67
  return (target._id !== current._id &&
68
68
  target.isActive &&
69
69
  !target.isDeleted &&
70
70
  target.price > 0 &&
71
71
  (0, tenant_plan_ops_1.isPaidPlan)(target) &&
72
72
  hasAudience &&
73
- !(0, plans_1.isDowngrade)(current, target) &&
73
+ !(0, plans_1.isDowngrade)(current, target, occupiedSeats) &&
74
74
  (0, seat_capacity_1.fitsWithinSeatLimit)(target.maxMembers, occupiedSeats));
75
75
  }
76
76
  async function loadUpgradeContext(input) {
@@ -97,13 +97,16 @@ async function executeManualUpgradeEffect(input, action) {
97
97
  effectiveAt: new Date(),
98
98
  };
99
99
  }
100
- function assertManualUpgrade(context) {
100
+ function assertManualUpgrade(context, occupiedSeats) {
101
101
  (0, interface_api_util_1.assert)(context.subscription.planId !== context.targetPlan._id, HTTP_CONFLICT, "saas.errors.operator.plan_already_applied");
102
102
  (0, interface_api_util_1.assert)(context.targetPlan.price > 0 && (0, tenant_plan_ops_1.isPaidPlan)(context.targetPlan), HTTP_BAD_REQUEST, "saas.errors.operator.paid_plan_required");
103
- (0, interface_api_util_1.assert)(!(0, plans_1.isDowngrade)(context.currentPlan, context.targetPlan), HTTP_BAD_REQUEST, "saas.errors.operator.upgrade_only");
103
+ (0, interface_api_util_1.assert)(!(0, plans_1.isDowngrade)(context.currentPlan, context.targetPlan, occupiedSeats), HTTP_BAD_REQUEST, "saas.errors.operator.upgrade_only");
104
104
  }
105
105
  async function applyManualUpgrade(input, action, context) {
106
- assertManualUpgrade(context);
106
+ assertManualUpgrade(context, await (0, seat_capacity_1.countSeatsToCompare)(input.tenantId, [
107
+ context.currentPlan,
108
+ context.targetPlan,
109
+ ]));
107
110
  await (0, tenant_plan_ops_1.assertSeatLimit)(input.tenantId, context.targetPlan);
108
111
  await (0, journal_1.checkpointOperatorActionDetails)(action, {
109
112
  previousPlanId: context.currentPlan._id,
@@ -1 +1 @@
1
- {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/operator-actions/commands.ts"],"names":[],"mappings":";;AA4GA,0CAEC;AAmCD,0DAIC;AAED,gEAIC;AAED,sEAmBC;AA6FD,0EAYC;AAED,gEAgBC;AA6DD,8DAiBC;AAuCD,kEA+BC;AA/bD,uEAAwD;AACxD,6FAAqE;AAErE,8BAMe;AACf,oCAAuC;AACvC,0DAGgC;AAChC,sEAK0C;AAC1C,6CAAmD;AACnD,iEAA2E;AAC3E,oCAA+C;AAC/C,yDAGkC;AAGlC,uCAKmB;AAGnB,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,wBAAwB,GAAG,GAAG,CAAC;AACrC,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAqDrC,SAAS,6BAA6B,CACpC,YAA4C;IAE5C,OAAO,CACL,CAAC,CAAC,YAAY,EAAE,oBAAoB;QACpC,YAAY,CAAC,MAAM,KAAK,gBAAgB,CACzC,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,IAAU;IACzB,OAAO,EAAE,EAAE,EAAE,IAA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AE,MAAM;QAClC,CAAC,CAAC,MAAM,IAAA,wCAAQ,EAAC,cAAS,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC;QACpD,CAAC,CAAC,SAAS,CAAC;IACd,MAAM,WAAW,GAAG,MAAM,IAAA,wCAAQ,EAChC,2BAAsB,EACtB,QAAQ,CACT,CAAC,OAAO,EAAE,CAAC;IACZ,MAAM,qBAAqB,GAAG,6BAA6B,CAAC,YAAY,CAAC,CAAC;IAC1E,MAAM,QAAQ,GAAG,qBAAqB;QACpC,CAAC,CAAC,MAAM,wBAAwB,CAC5B,QAAQ,EACR,OAAO,EACP,WAAW,EAAE,YAAY,CAC1B;QACH,CAAC,CAAC,EAAE,CAAC;IACP,OAAO;QACL,aAAa,EAAE,OAAO,EAAE,GAAG,IAAI,IAAI;QACnC,eAAe,EAAE,OAAO,EAAE,IAAI,IAAI,IAAI;QACtC,QAAQ,EAAE,OAAO,EAAE,QAAQ,IAAI,IAAI;QACnC,oBAAoB,EAAE,MAAM,uBAAuB,CAAC,YAAY,CAAC;QACjE,iBAAiB,EAAE,CAAC,CAAC,YAAY,EAAE,gBAAgB;QACnD,qBAAqB;QACrB,oBAAoB,EAAE,QAAQ;KAC/B,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type InvitationLink, type ReissuedInvitation } from "../workspaces/invitations";
1
+ import { type InvitationEmailDelivery, type InvitationLink, type ReissuedInvitation } from "../workspaces/invitations";
2
2
  import { type OperatorActor } from "./journal";
3
3
  export interface InvitationCommandInput {
4
4
  tenantId: string;
@@ -8,5 +8,11 @@ export interface InvitationCommandInput {
8
8
  export interface ResendInvitationCommandInput extends InvitationCommandInput {
9
9
  inviterName?: string;
10
10
  }
11
+ export interface SendInvitationCommandInput extends InvitationCommandInput {
12
+ email: string;
13
+ send: () => Promise<InvitationEmailDelivery>;
14
+ }
15
+ export declare function sendInvitationCommand(input: SendInvitationCommandInput): Promise<InvitationEmailDelivery>;
11
16
  export declare function resendInvitationCommand(input: ResendInvitationCommandInput): Promise<ReissuedInvitation>;
12
17
  export declare function copyInvitationLinkCommand(input: InvitationCommandInput): Promise<InvitationLink>;
18
+ export declare function revokeInvitationCommand(input: InvitationCommandInput): Promise<void>;
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendInvitationCommand = sendInvitationCommand;
3
4
  exports.resendInvitationCommand = resendInvitationCommand;
4
5
  exports.copyInvitationLinkCommand = copyInvitationLinkCommand;
6
+ exports.revokeInvitationCommand = revokeInvitationCommand;
5
7
  const node_crypto_1 = require("node:crypto");
6
8
  const invitations_1 = require("../workspaces/invitations");
7
9
  const journal_1 = require("./journal");
@@ -26,6 +28,13 @@ async function runJournaled(input, effect) {
26
28
  throw new Error("Journaled effect did not run");
27
29
  return outcome;
28
30
  }
31
+ async function sendInvitationCommand(input) {
32
+ return runJournaled(input, {
33
+ action: "invitation.send",
34
+ run: input.send,
35
+ detailsOf: (emailDelivery) => ({ email: input.email, emailDelivery }),
36
+ });
37
+ }
29
38
  async function resendInvitationCommand(input) {
30
39
  return runJournaled(input, {
31
40
  action: "invitation.resend",
@@ -43,4 +52,11 @@ async function copyInvitationLinkCommand(input) {
43
52
  detailsOf: ({ expiresAt }) => ({ expiresAt: expiresAt.toISOString() }),
44
53
  });
45
54
  }
55
+ async function revokeInvitationCommand(input) {
56
+ await runJournaled(input, {
57
+ action: "invitation.revoke",
58
+ run: () => (0, invitations_1.revokeInvitation)(input.tenantId, input.inviteId),
59
+ detailsOf: ({ email }) => ({ email }),
60
+ });
61
+ }
46
62
  //# sourceMappingURL=invitation-commands.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"invitation-commands.js","sourceRoot":"","sources":["../../src/operator-actions/invitation-commands.ts"],"names":[],"mappings":";;AA0DA,0DAYC;AAOD,8DAQC;AArFD,6CAAyC;AACzC,2DAKmC;AACnC,uCAAsE;AAoBtE,KAAK,UAAU,YAAY,CACzB,KAA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,KAAK,EAAE;QACxB,MAAM,EAAE,mBAAmB;QAC3B,GAAG,EAAE,GAAG,EAAE,CAAC,IAAA,8BAAgB,EAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;QAC3D,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;KACtC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,50 @@
1
+ import type { UpcomingInvoicePreview } from "@antelopejs/interface-dms-saas/billing";
2
+ import { type WorkspaceOperatorView } from "../workspaces/operator-view";
3
+ export interface NextInvoiceRef {
4
+ amountMinor: number;
5
+ currency: string;
6
+ date: string;
7
+ }
8
+ export interface OwnerRef {
9
+ name: string | null;
10
+ email: string | null;
11
+ }
12
+ export interface SuspensionImpact {
13
+ workspaceName: string;
14
+ status: string;
15
+ members: number;
16
+ stripeSubscriptionId: string | null;
17
+ nextInvoice: NextInvoiceRef | null;
18
+ owner: OwnerRef | null;
19
+ suspendedSince: string | null;
20
+ suspendedBy: string | null;
21
+ }
22
+ export interface ComplimentaryPlanOption {
23
+ id: string;
24
+ name: string;
25
+ unitAmountMinor: number;
26
+ currency: string;
27
+ interval: string;
28
+ billingMode: string;
29
+ maxMembers: number;
30
+ fits: boolean;
31
+ }
32
+ export interface ComplimentaryImpact {
33
+ workspaceName: string;
34
+ currentPlanId: string | null;
35
+ isComplimentary: boolean;
36
+ freeUntil: string | null;
37
+ stripeSubscriptionId: string | null;
38
+ mrrMinor: number;
39
+ currency: string | null;
40
+ nextInvoice: NextInvoiceRef | null;
41
+ seats: number;
42
+ owner: OwnerRef | null;
43
+ plans: ComplimentaryPlanOption[];
44
+ }
45
+ export declare function balanceCreditCeilingMinor(view: WorkspaceOperatorView): number;
46
+ export declare function assertBalanceCreditWithinCeiling(view: WorkspaceOperatorView, amountMinor: number): void;
47
+ export declare function nextInvoiceOf(preview: UpcomingInvoicePreview | null): NextInvoiceRef | null;
48
+ export declare function safeUpcomingInvoice(tenantId: string): Promise<UpcomingInvoicePreview | null>;
49
+ export declare function loadSuspensionImpact(tenantId: string): Promise<SuspensionImpact>;
50
+ export declare function loadComplimentaryImpact(tenantId: string): Promise<ComplimentaryImpact>;