@saasicat/nest 1.0.0-rc.2 → 1.0.0-rc.21

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 (154) hide show
  1. package/README.md +44 -8
  2. package/dist/.build-stamp +1 -1
  3. package/dist/_entries.cjs +10214 -4796
  4. package/dist/admin/index.d.cts +5 -4
  5. package/dist/admin/index.d.ts +5 -4
  6. package/dist/admin/index.js +13 -9
  7. package/dist/{admin-resources.module-CpvzcfCc.d.cts → admin-resources.module-B4XNvdH-.d.cts} +1 -2
  8. package/dist/{admin-resources.module-DF5_Q7RD.d.ts → admin-resources.module-CWqdI9BV.d.ts} +1 -2
  9. package/dist/{admin-stats.service-TYiSUwIR.d.ts → admin-stats.service-CsLNt19Z.d.ts} +11 -7
  10. package/dist/{admin-stats.service-DfKupywR.d.cts → admin-stats.service-DrZrU8IJ.d.cts} +11 -7
  11. package/dist/{aggregation-B3CD0v_d.d.cts → aggregation-ChpZDh0g.d.ts} +39 -6
  12. package/dist/{aggregation-BFzW07DE.d.ts → aggregation-OpnhwzF5.d.cts} +39 -6
  13. package/dist/billing/index.d.cts +448 -108
  14. package/dist/billing/index.d.ts +448 -108
  15. package/dist/billing/index.js +108 -41
  16. package/dist/catalog/index.d.cts +74 -45
  17. package/dist/catalog/index.d.ts +74 -45
  18. package/dist/catalog/index.js +21 -13
  19. package/dist/catalog.module-C9O7BxRq.d.ts +180 -0
  20. package/dist/catalog.module-T-I5Ricz.d.cts +180 -0
  21. package/dist/checkout-offer/index.d.cts +17 -22
  22. package/dist/checkout-offer/index.d.ts +17 -22
  23. package/dist/checkout-offer/index.js +21 -7
  24. package/dist/checkout-offer.module-DFhGy6JO.d.cts +58 -0
  25. package/dist/checkout-offer.module-x7SP_dX4.d.ts +58 -0
  26. package/dist/checkout-offer.service-BeHgYikI.d.ts +242 -0
  27. package/dist/checkout-offer.service-CCVxG9b2.d.cts +242 -0
  28. package/dist/chunk-34XVPR6P.js +222 -0
  29. package/dist/{chunk-AOQJEYOL.js → chunk-3QVGA6JX.js} +3 -1
  30. package/dist/chunk-3RLWML2S.js +896 -0
  31. package/dist/{chunk-TXC3LHHB.js → chunk-4SDSYV4A.js} +21 -13
  32. package/dist/chunk-55QEDAMX.js +946 -0
  33. package/dist/chunk-5CKC7O52.js +140 -0
  34. package/dist/chunk-6PJE7EWO.js +185 -0
  35. package/dist/chunk-7NJKVC5X.js +353 -0
  36. package/dist/{chunk-RUNZ3X4C.js → chunk-AOS2JPDD.js} +1263 -185
  37. package/dist/{chunk-WOVQPXV4.js → chunk-CQ2ZZMTD.js} +702 -725
  38. package/dist/{chunk-NA6O63B7.js → chunk-F5X66HF5.js} +5 -5
  39. package/dist/chunk-FEQZCWUL.js +174 -0
  40. package/dist/{chunk-VIJ5NJWC.js → chunk-G6EZWECL.js} +107 -31
  41. package/dist/chunk-G7RQO2XO.js +0 -0
  42. package/dist/{chunk-N3L3AICU.js → chunk-GPQWGA6B.js} +5 -6
  43. package/dist/chunk-GZTL64QK.js +7 -0
  44. package/dist/{chunk-SABTXESR.js → chunk-J7NJRK3K.js} +17 -1
  45. package/dist/{chunk-SEPN52AD.js → chunk-JBCC6C3M.js} +566 -307
  46. package/dist/{chunk-I7GTA3RX.js → chunk-JQRA724W.js} +1 -1
  47. package/dist/{chunk-WXYJHZCN.js → chunk-JVAEKTJ4.js} +2 -14
  48. package/dist/chunk-KPEMTBOP.js +26 -0
  49. package/dist/chunk-LF6J4YYN.js +301 -0
  50. package/dist/{chunk-LTT736P3.js → chunk-LLYVYRGJ.js} +228 -387
  51. package/dist/{chunk-6Z7JR4EW.js → chunk-M47BNEY2.js} +1897 -633
  52. package/dist/{chunk-KFT5AIIH.js → chunk-NDLC5GYK.js} +206 -24
  53. package/dist/{chunk-O2J2HDXA.js → chunk-OOTEXP47.js} +3 -8
  54. package/dist/chunk-QPVDCKYS.js +702 -0
  55. package/dist/{chunk-NHVDCYK5.js → chunk-R5YCJBHY.js} +71 -106
  56. package/dist/{chunk-XBYAFEOR.js → chunk-S33SO5XX.js} +1 -1
  57. package/dist/chunk-SZ7RFPXA.js +10 -0
  58. package/dist/chunk-TBBZWZQT.js +98 -0
  59. package/dist/chunk-TOEFN7DN.js +295 -0
  60. package/dist/{chunk-7ZEGFL42.js → chunk-WHJSYKNC.js} +6 -6
  61. package/dist/chunk-WOEJ6K7M.js +55 -0
  62. package/dist/{chunk-AU3OOREM.js → chunk-XSSWYPP5.js} +16 -3
  63. package/dist/contract-line-item-money-B0Z3Ogur.d.cts +43 -0
  64. package/dist/contract-line-item-money-B0Z3Ogur.d.ts +43 -0
  65. package/dist/discovery/index.d.cts +2 -2
  66. package/dist/discovery/index.d.ts +2 -2
  67. package/dist/discovery/index.js +6 -6
  68. package/dist/{discovery.scanner-9cMqF95o.d.cts → discovery.scanner-DXKc6JkV.d.cts} +1 -1
  69. package/dist/{discovery.scanner-9cMqF95o.d.ts → discovery.scanner-DXKc6JkV.d.ts} +1 -1
  70. package/dist/{enforce-quota.interceptor-Df0e3OWe.d.cts → enforce-quota.interceptor-BFyVdWe8.d.cts} +6 -6
  71. package/dist/{enforce-quota.interceptor-DW3etVyI.d.ts → enforce-quota.interceptor-GaBXboGx.d.ts} +6 -6
  72. package/dist/entitlement/index.d.cts +27 -4
  73. package/dist/entitlement/index.d.ts +27 -4
  74. package/dist/entitlement/index.js +13 -8
  75. package/dist/index.d.cts +209 -28
  76. package/dist/index.d.ts +209 -28
  77. package/dist/index.js +285 -163
  78. package/dist/issuer-identity.check-CBO0vcsq.d.cts +197 -0
  79. package/dist/issuer-identity.check-Cz9CEMkZ.d.ts +197 -0
  80. package/dist/{module-options-COSEb0VW.d.ts → module-options-DmQ3G4sZ.d.ts} +135 -41
  81. package/dist/{module-options-BG3MzQva.d.cts → module-options-qAOwinHR.d.cts} +135 -41
  82. package/dist/payment-callback.service-CR84Xw1Z.d.cts +125 -0
  83. package/dist/payment-callback.service-CR84Xw1Z.d.ts +125 -0
  84. package/dist/payments/index.cjs +4 -0
  85. package/dist/payments/index.d.cts +187 -0
  86. package/dist/payments/index.d.ts +187 -0
  87. package/dist/payments/index.js +141 -0
  88. package/dist/payments.module-BdUq9ot_.d.cts +57 -0
  89. package/dist/payments.module-CQGv_VG7.d.ts +57 -0
  90. package/dist/plan-catalog-source-DWe-BGY1.d.cts +21 -0
  91. package/dist/plan-catalog-source-DWe-BGY1.d.ts +21 -0
  92. package/dist/{plan-resolution-Cgo_TR1H.d.cts → plan-resolution-CwUy_OqC.d.cts} +14 -0
  93. package/dist/{plan-resolution-Cgo_TR1H.d.ts → plan-resolution-CwUy_OqC.d.ts} +14 -0
  94. package/dist/{plan-versions.service-DChhbK6h.d.ts → plan-versions.service-C0N-Em2W.d.ts} +38 -64
  95. package/dist/{plan-versions.service-TPEtbN0r.d.cts → plan-versions.service-DARLh-qI.d.cts} +38 -64
  96. package/dist/platform/index.d.cts +52 -23
  97. package/dist/platform/index.d.ts +52 -23
  98. package/dist/platform/index.js +57 -36
  99. package/dist/promo/index.d.cts +23 -8
  100. package/dist/promo/index.d.ts +23 -8
  101. package/dist/promo/index.js +15 -7
  102. package/dist/{promo.module-DtvIycpt.d.cts → promo.module-CKkECmU8.d.cts} +9 -3
  103. package/dist/{promo.module-Z8h1PNX-.d.ts → promo.module-DuIJdK3U.d.ts} +9 -3
  104. package/dist/promo.service-BYBu6dy3.d.cts +215 -0
  105. package/dist/promo.service-CFjfF0Xm.d.ts +215 -0
  106. package/dist/registration/index.d.cts +104 -47
  107. package/dist/registration/index.d.ts +104 -47
  108. package/dist/registration/index.js +15 -9
  109. package/dist/subscriber/index.cjs +4 -0
  110. package/dist/subscriber/index.d.cts +28 -0
  111. package/dist/subscriber/index.d.ts +28 -0
  112. package/dist/subscriber/index.js +16 -0
  113. package/dist/subscriber.service-5W6Gi-1B.d.cts +68 -0
  114. package/dist/subscriber.service-5W6Gi-1B.d.ts +68 -0
  115. package/dist/subscription-contract/index.d.cts +4 -2
  116. package/dist/subscription-contract/index.d.ts +4 -2
  117. package/dist/subscription-contract/index.js +13 -5
  118. package/dist/{subscription-contract.module-fDFdQ0jm.d.ts → subscription-contract.module-BfIRpc1o.d.ts} +8 -2
  119. package/dist/{subscription-contract.module-CEK8HS5-.d.cts → subscription-contract.module-DTMuUJYd.d.cts} +8 -2
  120. package/dist/{subscription-contract.service-hD87MKyg.d.cts → subscription-contract.service-CPZrTM9C.d.ts} +32 -3
  121. package/dist/{subscription-contract.service-hD87MKyg.d.ts → subscription-contract.service-CfNApLuP.d.cts} +32 -3
  122. package/dist/tenant-billing.controller-BLqbsONe.d.ts +812 -0
  123. package/dist/tenant-billing.controller-DKbAqTbM.d.cts +812 -0
  124. package/dist/tenant-billing.module-ClbjzocC.d.cts +364 -0
  125. package/dist/tenant-billing.module-DohgJJ2m.d.ts +364 -0
  126. package/dist/tenant-billing.tokens-G-1xOlMr.d.cts +129 -0
  127. package/dist/tenant-billing.tokens-G-1xOlMr.d.ts +129 -0
  128. package/dist/testing/index.d.cts +44 -17
  129. package/dist/testing/index.d.ts +44 -17
  130. package/dist/testing/index.js +189 -40
  131. package/package.json +24 -4
  132. package/dist/catalog.module-BDDO6iwq.d.cts +0 -103
  133. package/dist/catalog.module-BTnMsE6u.d.ts +0 -103
  134. package/dist/checkout-offer.module-CMtiQJTT.d.ts +0 -39
  135. package/dist/checkout-offer.module-CVpWrzbe.d.cts +0 -39
  136. package/dist/checkout-offer.service-BLOv2HOo.d.cts +0 -49
  137. package/dist/checkout-offer.service-BLOv2HOo.d.ts +0 -49
  138. package/dist/chunk-57V6ZTI6.js +0 -22
  139. package/dist/chunk-BSK6YBLI.js +0 -87
  140. package/dist/chunk-DQKCK7DX.js +0 -217
  141. package/dist/chunk-VXEYLNIB.js +0 -632
  142. package/dist/chunk-WUDYIPYH.js +0 -715
  143. package/dist/define-saasicat-DROBe-b1.d.ts +0 -69
  144. package/dist/define-saasicat-vGBCkFys.d.cts +0 -69
  145. package/dist/promo.service-BJbKAmw3.d.cts +0 -112
  146. package/dist/promo.service-BJbKAmw3.d.ts +0 -112
  147. package/dist/tenant-billing.controller-BQ67mlmI.d.ts +0 -438
  148. package/dist/tenant-billing.controller-DS8kB8a7.d.cts +0 -438
  149. package/dist/tenant-billing.module-BznC3XtW.d.cts +0 -299
  150. package/dist/tenant-billing.module-wUbsQSFG.d.ts +0 -299
  151. /package/dist/{chunk-2FR6ZL7R.js → chunk-BHZOH2DY.js} +0 -0
  152. /package/dist/{chunk-2SLTRKXC.js → chunk-DFOW3JVO.js} +0 -0
  153. /package/dist/{chunk-DBZGV3HC.js → chunk-DU56UKEH.js} +0 -0
  154. /package/dist/{chunk-OYNHOY45.js → chunk-GAUEVIAE.js} +0 -0
@@ -1,13 +1,14 @@
1
- import { f as AdminStatsService, g as AdminStatsSnapshot } from '../admin-stats.service-DfKupywR.cjs';
2
- export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions, M as MfaGuard, h as MfaService, P as PLATFORM_CORE_CONTRIBUTION_TOKEN, R as REQUIRE_MFA_KEY, i as RequireMfa, S as SuperAdminGuard, T as TotpSetupResult, V as VerifyTotpInput } from '../admin-stats.service-DfKupywR.cjs';
1
+ import { f as AdminStatsService, g as AdminStatsSnapshot } from '../admin-stats.service-DrZrU8IJ.cjs';
2
+ export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions, h as MfaGuard, M as MfaService, P as PLATFORM_CORE_CONTRIBUTION_TOKEN, R as REQUIRE_MFA_KEY, i as RequireMfa, S as SuperAdminGuard, T as TotpSetupResult, V as VerifyTotpInput } from '../admin-stats.service-DrZrU8IJ.cjs';
3
3
  export { A as AdminAuditService } from '../admin-audit.service-4P3Djdxk.cjs';
4
- import { b as AdminManifestConfig } from '../admin-resources.module-CpvzcfCc.cjs';
5
- export { A as ADMIN_MANIFEST_CONFIG, a as ADMIN_RESOURCES_PORT_TOKEN, c as AdminResourcesModule, d as AdminResourcesModuleOptions, e as AdminResourcesService, f as AdminStatsModule, g as AdminStatsModuleOptions, S as SuspendTenantDto } from '../admin-resources.module-CpvzcfCc.cjs';
4
+ import { b as AdminManifestConfig } from '../admin-resources.module-B4XNvdH-.cjs';
5
+ export { c as ADMIN_MANIFEST_CONFIG, d as ADMIN_RESOURCES_PORT_TOKEN, e as AdminResourcesModule, A as AdminResourcesModuleOptions, f as AdminResourcesService, g as AdminStatsModule, a as AdminStatsModuleOptions, S as SuspendTenantDto } from '../admin-resources.module-B4XNvdH-.cjs';
6
6
  import { PublicBootResponse, ManifestContribution } from '@saasicat/core';
7
7
  import { Type, CanActivate } from '@nestjs/common';
8
8
  import '@nestjs/core';
9
9
  import 'rxjs';
10
10
  import '../di-CcNeq9v-.cjs';
11
+ import '../plan-catalog-source-DWe-BGY1.cjs';
11
12
 
12
13
  declare const MFA_PORT_TOKEN: unique symbol;
13
14
  declare const AUDIT_PORT_TOKEN: unique symbol;
@@ -1,13 +1,14 @@
1
- import { f as AdminStatsService, g as AdminStatsSnapshot } from '../admin-stats.service-TYiSUwIR.js';
2
- export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions, M as MfaGuard, h as MfaService, P as PLATFORM_CORE_CONTRIBUTION_TOKEN, R as REQUIRE_MFA_KEY, i as RequireMfa, S as SuperAdminGuard, T as TotpSetupResult, V as VerifyTotpInput } from '../admin-stats.service-TYiSUwIR.js';
1
+ import { f as AdminStatsService, g as AdminStatsSnapshot } from '../admin-stats.service-CsLNt19Z.js';
2
+ export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions, h as MfaGuard, M as MfaService, P as PLATFORM_CORE_CONTRIBUTION_TOKEN, R as REQUIRE_MFA_KEY, i as RequireMfa, S as SuperAdminGuard, T as TotpSetupResult, V as VerifyTotpInput } from '../admin-stats.service-CsLNt19Z.js';
3
3
  export { A as AdminAuditService } from '../admin-audit.service-4P3Djdxk.js';
4
- import { b as AdminManifestConfig } from '../admin-resources.module-DF5_Q7RD.js';
5
- export { A as ADMIN_MANIFEST_CONFIG, a as ADMIN_RESOURCES_PORT_TOKEN, c as AdminResourcesModule, d as AdminResourcesModuleOptions, e as AdminResourcesService, f as AdminStatsModule, g as AdminStatsModuleOptions, S as SuspendTenantDto } from '../admin-resources.module-DF5_Q7RD.js';
4
+ import { b as AdminManifestConfig } from '../admin-resources.module-CWqdI9BV.js';
5
+ export { c as ADMIN_MANIFEST_CONFIG, d as ADMIN_RESOURCES_PORT_TOKEN, e as AdminResourcesModule, A as AdminResourcesModuleOptions, f as AdminResourcesService, g as AdminStatsModule, a as AdminStatsModuleOptions, S as SuspendTenantDto } from '../admin-resources.module-CWqdI9BV.js';
6
6
  import { PublicBootResponse, ManifestContribution } from '@saasicat/core';
7
7
  import { Type, CanActivate } from '@nestjs/common';
8
8
  import '@nestjs/core';
9
9
  import 'rxjs';
10
10
  import '../di-CcNeq9v-.js';
11
+ import '../plan-catalog-source-DWe-BGY1.js';
11
12
 
12
13
  declare const MFA_PORT_TOKEN: unique symbol;
13
14
  declare const AUDIT_PORT_TOKEN: unique symbol;
@@ -14,27 +14,31 @@ import {
14
14
  AdminStatsController,
15
15
  AdminStatsModule,
16
16
  AdminStatsService,
17
- MfaGuard,
18
- MfaService,
19
17
  PLATFORM_CORE_CONTRIBUTION_TOKEN,
20
18
  PLATFORM_CORE_MANIFEST_CONTRIBUTION,
21
19
  PROMO_CODE_STATS_PORT_TOKEN,
22
- REQUIRE_MFA_KEY,
23
- RequireMfa,
24
20
  SUBSCRIPTION_STATS_PORT_TOKEN,
25
21
  SuperAdminGuard,
26
22
  SuspendTenantDto,
27
23
  buildAdminStatsController
28
- } from "../chunk-LTT736P3.js";
24
+ } from "../chunk-LLYVYRGJ.js";
25
+ import {
26
+ MfaGuard,
27
+ MfaService,
28
+ REQUIRE_MFA_KEY,
29
+ RequireMfa
30
+ } from "../chunk-34XVPR6P.js";
31
+ import {
32
+ AdminAuditService
33
+ } from "../chunk-OOTEXP47.js";
29
34
  import {
30
35
  AUDIT_PORT_TOKEN,
31
- AdminAuditService,
32
36
  MFA_PORT_TOKEN,
33
37
  RLS_BYPASS_PORT_TOKEN
34
- } from "../chunk-O2J2HDXA.js";
38
+ } from "../chunk-SZ7RFPXA.js";
35
39
  import "../chunk-YSC46BGM.js";
36
- import "../chunk-57V6ZTI6.js";
37
- import "../chunk-SABTXESR.js";
40
+ import "../chunk-FEQZCWUL.js";
41
+ import "../chunk-J7NJRK3K.js";
38
42
  import "../chunk-SHUYVCID.js";
39
43
  export {
40
44
  ADMIN_MANIFEST_CONFIG,
@@ -7,7 +7,6 @@ declare const ADMIN_MANIFEST_CONFIG: unique symbol;
7
7
  interface AdminManifestConfig {
8
8
  project: AdminManifest['project'];
9
9
  build: Omit<AdminManifest['build'], 'manifestHash'>;
10
- planCatalogSnapshot: AdminManifest['planCatalogSnapshot'];
11
10
  }
12
11
 
13
12
  interface AdminStatsModuleOptions {
@@ -63,4 +62,4 @@ declare class AdminResourcesModule {
63
62
  static forRoot(options: AdminResourcesModuleOptions): DynamicModule;
64
63
  }
65
64
 
66
- export { ADMIN_MANIFEST_CONFIG as A, SuspendTenantDto as S, ADMIN_RESOURCES_PORT_TOKEN as a, type AdminManifestConfig as b, AdminResourcesModule as c, type AdminResourcesModuleOptions as d, AdminResourcesService as e, AdminStatsModule as f, type AdminStatsModuleOptions as g };
65
+ export { type AdminResourcesModuleOptions as A, SuspendTenantDto as S, type AdminStatsModuleOptions as a, type AdminManifestConfig as b, ADMIN_MANIFEST_CONFIG as c, ADMIN_RESOURCES_PORT_TOKEN as d, AdminResourcesModule as e, AdminResourcesService as f, AdminStatsModule as g };
@@ -7,7 +7,6 @@ declare const ADMIN_MANIFEST_CONFIG: unique symbol;
7
7
  interface AdminManifestConfig {
8
8
  project: AdminManifest['project'];
9
9
  build: Omit<AdminManifest['build'], 'manifestHash'>;
10
- planCatalogSnapshot: AdminManifest['planCatalogSnapshot'];
11
10
  }
12
11
 
13
12
  interface AdminStatsModuleOptions {
@@ -63,4 +62,4 @@ declare class AdminResourcesModule {
63
62
  static forRoot(options: AdminResourcesModuleOptions): DynamicModule;
64
63
  }
65
64
 
66
- export { ADMIN_MANIFEST_CONFIG as A, SuspendTenantDto as S, ADMIN_RESOURCES_PORT_TOKEN as a, type AdminManifestConfig as b, AdminResourcesModule as c, type AdminResourcesModuleOptions as d, AdminResourcesService as e, AdminStatsModule as f, type AdminStatsModuleOptions as g };
65
+ export { type AdminResourcesModuleOptions as A, SuspendTenantDto as S, type AdminStatsModuleOptions as a, type AdminManifestConfig as b, ADMIN_MANIFEST_CONFIG as c, ADMIN_RESOURCES_PORT_TOKEN as d, AdminResourcesModule as e, AdminResourcesService as f, AdminStatsModule as g };
@@ -3,7 +3,8 @@ import { Reflector } from '@nestjs/core';
3
3
  import { MfaPort, RlsBypassPort, AuditPort, ManifestContribution, AdminManifest, SubscriptionStatsPort, PromoCodeStatsPort, AuditStatsPort, SubscriptionStatsSnapshot, PromoCodeStatsSnapshot, AuditStatsSnapshot } from '@saasicat/core';
4
4
  import { Observable } from 'rxjs';
5
5
  import { P as ProviderSpec } from './di-CcNeq9v-.js';
6
- import { b as AdminManifestConfig } from './admin-resources.module-DF5_Q7RD.js';
6
+ import { P as PlanCatalogSource } from './plan-catalog-source-DWe-BGY1.js';
7
+ import { b as AdminManifestConfig } from './admin-resources.module-CWqdI9BV.js';
7
8
 
8
9
  declare class SuperAdminGuard implements CanActivate {
9
10
  canActivate(context: ExecutionContext): boolean;
@@ -87,13 +88,16 @@ declare class AdminModule {
87
88
  declare const PLATFORM_CORE_CONTRIBUTION_TOKEN: unique symbol;
88
89
  declare class AdminManifestService {
89
90
  private readonly config;
91
+ private readonly planCatalogs;
90
92
  private readonly logger;
91
93
  private readonly contributions;
92
- private cached;
93
- constructor(config: AdminManifestConfig, platformCore?: ManifestContribution | null);
94
+ private merged;
95
+ private lastHash;
96
+ constructor(config: AdminManifestConfig, planCatalogs: PlanCatalogSource, platformCore?: ManifestContribution | null);
94
97
  register(contribution: ManifestContribution): void;
95
- getManifest(): AdminManifest;
96
- rebuild(): AdminManifest;
98
+ getManifest(): Promise<AdminManifest>;
99
+ /** Merges the contributions again, then serves the manifest as `getManifest` does. */
100
+ rebuild(): Promise<AdminManifest>;
97
101
  private build;
98
102
  private mergeContributions;
99
103
  /**
@@ -108,7 +112,7 @@ declare class AdminManifestService {
108
112
 
109
113
  type ConfigSpec = AdminManifestConfig | Pick<FactoryProvider<AdminManifestConfig>, 'useFactory' | 'inject'>;
110
114
  interface AdminManifestModuleOptions {
111
- /** AdminManifestConfig as a value or via a factory (e.g. with a PLAN_CATALOG_TOKEN inject). */
115
+ /** AdminManifestConfig as a value or via a factory (e.g. with a PLAN_CATALOG_SETTINGS_TOKEN inject). */
112
116
  config: ConfigSpec;
113
117
  /**
114
118
  * Default `true`. Set to `false` when the consumer registers its own
@@ -177,4 +181,4 @@ declare class AdminStatsService {
177
181
  getSnapshot(): Promise<AdminStatsSnapshot>;
178
182
  }
179
183
 
180
- export { AdminBypassRlsInterceptor as A, MfaGuard as M, PLATFORM_CORE_CONTRIBUTION_TOKEN as P, REQUIRE_MFA_KEY as R, SuperAdminGuard as S, type TotpSetupResult as T, type VerifyTotpInput as V, AdminManifestModule as a, type AdminManifestModuleOptions as b, AdminManifestService as c, AdminModule as d, type AdminModuleOptions as e, AdminStatsService as f, type AdminStatsSnapshot as g, MfaService as h, RequireMfa as i };
184
+ export { AdminBypassRlsInterceptor as A, MfaService as M, PLATFORM_CORE_CONTRIBUTION_TOKEN as P, REQUIRE_MFA_KEY as R, SuperAdminGuard as S, type TotpSetupResult as T, type VerifyTotpInput as V, AdminManifestModule as a, type AdminManifestModuleOptions as b, AdminManifestService as c, AdminModule as d, type AdminModuleOptions as e, AdminStatsService as f, type AdminStatsSnapshot as g, MfaGuard as h, RequireMfa as i };
@@ -3,7 +3,8 @@ import { Reflector } from '@nestjs/core';
3
3
  import { MfaPort, RlsBypassPort, AuditPort, ManifestContribution, AdminManifest, SubscriptionStatsPort, PromoCodeStatsPort, AuditStatsPort, SubscriptionStatsSnapshot, PromoCodeStatsSnapshot, AuditStatsSnapshot } from '@saasicat/core';
4
4
  import { Observable } from 'rxjs';
5
5
  import { P as ProviderSpec } from './di-CcNeq9v-.cjs';
6
- import { b as AdminManifestConfig } from './admin-resources.module-CpvzcfCc.cjs';
6
+ import { P as PlanCatalogSource } from './plan-catalog-source-DWe-BGY1.cjs';
7
+ import { b as AdminManifestConfig } from './admin-resources.module-B4XNvdH-.cjs';
7
8
 
8
9
  declare class SuperAdminGuard implements CanActivate {
9
10
  canActivate(context: ExecutionContext): boolean;
@@ -87,13 +88,16 @@ declare class AdminModule {
87
88
  declare const PLATFORM_CORE_CONTRIBUTION_TOKEN: unique symbol;
88
89
  declare class AdminManifestService {
89
90
  private readonly config;
91
+ private readonly planCatalogs;
90
92
  private readonly logger;
91
93
  private readonly contributions;
92
- private cached;
93
- constructor(config: AdminManifestConfig, platformCore?: ManifestContribution | null);
94
+ private merged;
95
+ private lastHash;
96
+ constructor(config: AdminManifestConfig, planCatalogs: PlanCatalogSource, platformCore?: ManifestContribution | null);
94
97
  register(contribution: ManifestContribution): void;
95
- getManifest(): AdminManifest;
96
- rebuild(): AdminManifest;
98
+ getManifest(): Promise<AdminManifest>;
99
+ /** Merges the contributions again, then serves the manifest as `getManifest` does. */
100
+ rebuild(): Promise<AdminManifest>;
97
101
  private build;
98
102
  private mergeContributions;
99
103
  /**
@@ -108,7 +112,7 @@ declare class AdminManifestService {
108
112
 
109
113
  type ConfigSpec = AdminManifestConfig | Pick<FactoryProvider<AdminManifestConfig>, 'useFactory' | 'inject'>;
110
114
  interface AdminManifestModuleOptions {
111
- /** AdminManifestConfig as a value or via a factory (e.g. with a PLAN_CATALOG_TOKEN inject). */
115
+ /** AdminManifestConfig as a value or via a factory (e.g. with a PLAN_CATALOG_SETTINGS_TOKEN inject). */
112
116
  config: ConfigSpec;
113
117
  /**
114
118
  * Default `true`. Set to `false` when the consumer registers its own
@@ -177,4 +181,4 @@ declare class AdminStatsService {
177
181
  getSnapshot(): Promise<AdminStatsSnapshot>;
178
182
  }
179
183
 
180
- export { AdminBypassRlsInterceptor as A, MfaGuard as M, PLATFORM_CORE_CONTRIBUTION_TOKEN as P, REQUIRE_MFA_KEY as R, SuperAdminGuard as S, type TotpSetupResult as T, type VerifyTotpInput as V, AdminManifestModule as a, type AdminManifestModuleOptions as b, AdminManifestService as c, AdminModule as d, type AdminModuleOptions as e, AdminStatsService as f, type AdminStatsSnapshot as g, MfaService as h, RequireMfa as i };
184
+ export { AdminBypassRlsInterceptor as A, MfaService as M, PLATFORM_CORE_CONTRIBUTION_TOKEN as P, REQUIRE_MFA_KEY as R, SuperAdminGuard as S, type TotpSetupResult as T, type VerifyTotpInput as V, AdminManifestModule as a, type AdminManifestModuleOptions as b, AdminManifestService as c, AdminModule as d, type AdminModuleOptions as e, AdminStatsService as f, type AdminStatsSnapshot as g, MfaGuard as h, RequireMfa as i };
@@ -1,5 +1,6 @@
1
- import { PlanId, QuotaKey, FeatureKey, PlanCatalog, SubscriptionRepository, PlanVersionRepository, TransactionRunner, SubscriptionBundleRepository, BundleRepository, SubscriptionContractRepository, DiscoverySnapshot, SubscriptionRecord, TransactionContext, ContractLineItemRecord, SubscriptionContractRecord } from '@saasicat/core';
2
- import { E as EntitlementResolutionConfig } from './plan-resolution-Cgo_TR1H.cjs';
1
+ import { PlanId, QuotaKey, FeatureKey, SubscriptionRepository, PlanVersionRepository, TransactionRunner, SubscriptionBundleRepository, BundleRepository, SubscriptionContractRepository, DiscoverySnapshot, PlanCatalog, SubscriptionRecord, TransactionContext, ContractLineItemRecord, SubscriptionContractRecord } from '@saasicat/core';
2
+ import { P as PlanCatalogSource } from './plan-catalog-source-DWe-BGY1.js';
3
+ import { E as EntitlementResolutionConfig } from './plan-resolution-CwUy_OqC.js';
3
4
 
4
5
  /**
5
6
  * Snapshot of the binding `PlanVersion` of a subscription. Quotas are
@@ -113,7 +114,7 @@ interface EnforceLimitInput<T> {
113
114
  now?: Date;
114
115
  }
115
116
  declare class EntitlementService {
116
- private readonly catalog;
117
+ private readonly catalogs;
117
118
  private readonly subscriptions;
118
119
  private readonly planVersions;
119
120
  private readonly tx;
@@ -124,8 +125,16 @@ declare class EntitlementService {
124
125
  private readonly discoverySnapshot;
125
126
  private readonly cache;
126
127
  private replacedByIndex;
127
- constructor(catalog: PlanCatalog, subscriptions: SubscriptionRepository, planVersions: PlanVersionRepository, tx: TransactionRunner, resolutionConfig?: EntitlementResolutionConfig | null, subscriptionBundles?: SubscriptionBundleRepository | null, bundles?: BundleRepository | null, subscriptionContracts?: SubscriptionContractRepository | null, discoverySnapshot?: DiscoverySnapshot | null);
128
- computeLimits(tenantId: string, now?: Date): Promise<EffectiveLimits>;
128
+ constructor(catalogs: PlanCatalogSource, subscriptions: SubscriptionRepository, planVersions: PlanVersionRepository, tx: TransactionRunner, resolutionConfig?: EntitlementResolutionConfig | null, subscriptionBundles?: SubscriptionBundleRepository | null, bundles?: BundleRepository | null, subscriptionContracts?: SubscriptionContractRepository | null, discoverySnapshot?: DiscoverySnapshot | null);
129
+ /**
130
+ * The tenant's effective limits, answered from the cache for up to
131
+ * `CACHE_TTL_MS`. A caller that has already read the catalogue for its own
132
+ * operation passes it as `catalog`: the answer is then computed against
133
+ * that reading and kept out of the cache in both directions — not taken
134
+ * from it, and not written to it, since a reading the caller holds may be
135
+ * older than the one everybody else should be answered from.
136
+ */
137
+ computeLimits(tenantId: string, now?: Date, catalog?: PlanCatalog): Promise<EffectiveLimits>;
129
138
  /**
130
139
  * Clears a tenant's cache entry. MUST be called as soon as a mutation
131
140
  * changes the subscription, a bundle booking, or a PlanVersion binding —
@@ -140,12 +149,36 @@ declare class EntitlementService {
140
149
  * have a `SubscriptionRecord` (e.g. within a transaction).
141
150
  */
142
151
  deriveLimits(sub: SubscriptionRecord, now: Date, tx?: TransactionContext): Promise<EffectiveLimits>;
152
+ /**
153
+ * `deriveLimits` against a catalogue already read. The catalogue decides
154
+ * which features are `plannedOnly`, and it is read outside any transaction
155
+ * a caller holds, so that checking a limit does not wait for a second
156
+ * connection while the subscription row is locked.
157
+ */
158
+ private limitsFor;
159
+ /**
160
+ * The last thing every path does, so that no path can skip it.
161
+ *
162
+ * Two steps, in this order. Grandfathering (#39): granted old feature keys
163
+ * transitively grant their successors from the `replaces` chains of the
164
+ * discovery snapshot — a no-op without a snapshot or without replaces
165
+ * declarations. Then `plannedOnly` features come out.
166
+ *
167
+ * The filter sits here rather than in each branch because it used to sit
168
+ * in each branch and one of them did not have it: limits read from a
169
+ * frozen contract were handed over as they stood, so a feature the
170
+ * catalogue says has no code behind it was granted to whoever had signed
171
+ * before it was marked. A successor pulled in by an alias could arrive the
172
+ * same way. `SC-ENTL-003` says "never … wherever it comes from", and one
173
+ * place is what makes that answerable.
174
+ */
175
+ private asGrantable;
143
176
  /**
144
177
  * Grandfathering (#39): granted old feature keys transitively grant
145
178
  * their successors from the `replaces` chains of the discovery snapshot.
146
179
  * A no-op without a snapshot or without replaces declarations.
147
180
  */
148
- private withReplacedFeatureAliases;
181
+ private replaceFeatureAliases;
149
182
  private findActiveContract;
150
183
  /**
151
184
  * Loads a subscription's active bundle bookings and resolves the
@@ -1,5 +1,6 @@
1
- import { PlanId, QuotaKey, FeatureKey, PlanCatalog, SubscriptionRepository, PlanVersionRepository, TransactionRunner, SubscriptionBundleRepository, BundleRepository, SubscriptionContractRepository, DiscoverySnapshot, SubscriptionRecord, TransactionContext, ContractLineItemRecord, SubscriptionContractRecord } from '@saasicat/core';
2
- import { E as EntitlementResolutionConfig } from './plan-resolution-Cgo_TR1H.js';
1
+ import { PlanId, QuotaKey, FeatureKey, SubscriptionRepository, PlanVersionRepository, TransactionRunner, SubscriptionBundleRepository, BundleRepository, SubscriptionContractRepository, DiscoverySnapshot, PlanCatalog, SubscriptionRecord, TransactionContext, ContractLineItemRecord, SubscriptionContractRecord } from '@saasicat/core';
2
+ import { P as PlanCatalogSource } from './plan-catalog-source-DWe-BGY1.cjs';
3
+ import { E as EntitlementResolutionConfig } from './plan-resolution-CwUy_OqC.cjs';
3
4
 
4
5
  /**
5
6
  * Snapshot of the binding `PlanVersion` of a subscription. Quotas are
@@ -113,7 +114,7 @@ interface EnforceLimitInput<T> {
113
114
  now?: Date;
114
115
  }
115
116
  declare class EntitlementService {
116
- private readonly catalog;
117
+ private readonly catalogs;
117
118
  private readonly subscriptions;
118
119
  private readonly planVersions;
119
120
  private readonly tx;
@@ -124,8 +125,16 @@ declare class EntitlementService {
124
125
  private readonly discoverySnapshot;
125
126
  private readonly cache;
126
127
  private replacedByIndex;
127
- constructor(catalog: PlanCatalog, subscriptions: SubscriptionRepository, planVersions: PlanVersionRepository, tx: TransactionRunner, resolutionConfig?: EntitlementResolutionConfig | null, subscriptionBundles?: SubscriptionBundleRepository | null, bundles?: BundleRepository | null, subscriptionContracts?: SubscriptionContractRepository | null, discoverySnapshot?: DiscoverySnapshot | null);
128
- computeLimits(tenantId: string, now?: Date): Promise<EffectiveLimits>;
128
+ constructor(catalogs: PlanCatalogSource, subscriptions: SubscriptionRepository, planVersions: PlanVersionRepository, tx: TransactionRunner, resolutionConfig?: EntitlementResolutionConfig | null, subscriptionBundles?: SubscriptionBundleRepository | null, bundles?: BundleRepository | null, subscriptionContracts?: SubscriptionContractRepository | null, discoverySnapshot?: DiscoverySnapshot | null);
129
+ /**
130
+ * The tenant's effective limits, answered from the cache for up to
131
+ * `CACHE_TTL_MS`. A caller that has already read the catalogue for its own
132
+ * operation passes it as `catalog`: the answer is then computed against
133
+ * that reading and kept out of the cache in both directions — not taken
134
+ * from it, and not written to it, since a reading the caller holds may be
135
+ * older than the one everybody else should be answered from.
136
+ */
137
+ computeLimits(tenantId: string, now?: Date, catalog?: PlanCatalog): Promise<EffectiveLimits>;
129
138
  /**
130
139
  * Clears a tenant's cache entry. MUST be called as soon as a mutation
131
140
  * changes the subscription, a bundle booking, or a PlanVersion binding —
@@ -140,12 +149,36 @@ declare class EntitlementService {
140
149
  * have a `SubscriptionRecord` (e.g. within a transaction).
141
150
  */
142
151
  deriveLimits(sub: SubscriptionRecord, now: Date, tx?: TransactionContext): Promise<EffectiveLimits>;
152
+ /**
153
+ * `deriveLimits` against a catalogue already read. The catalogue decides
154
+ * which features are `plannedOnly`, and it is read outside any transaction
155
+ * a caller holds, so that checking a limit does not wait for a second
156
+ * connection while the subscription row is locked.
157
+ */
158
+ private limitsFor;
159
+ /**
160
+ * The last thing every path does, so that no path can skip it.
161
+ *
162
+ * Two steps, in this order. Grandfathering (#39): granted old feature keys
163
+ * transitively grant their successors from the `replaces` chains of the
164
+ * discovery snapshot — a no-op without a snapshot or without replaces
165
+ * declarations. Then `plannedOnly` features come out.
166
+ *
167
+ * The filter sits here rather than in each branch because it used to sit
168
+ * in each branch and one of them did not have it: limits read from a
169
+ * frozen contract were handed over as they stood, so a feature the
170
+ * catalogue says has no code behind it was granted to whoever had signed
171
+ * before it was marked. A successor pulled in by an alias could arrive the
172
+ * same way. `SC-ENTL-003` says "never … wherever it comes from", and one
173
+ * place is what makes that answerable.
174
+ */
175
+ private asGrantable;
143
176
  /**
144
177
  * Grandfathering (#39): granted old feature keys transitively grant
145
178
  * their successors from the `replaces` chains of the discovery snapshot.
146
179
  * A no-op without a snapshot or without replaces declarations.
147
180
  */
148
- private withReplacedFeatureAliases;
181
+ private replaceFeatureAliases;
149
182
  private findActiveContract;
150
183
  /**
151
184
  * Loads a subscription's active bundle bookings and resolves the