@saasicat/nest 1.0.0-rc.20 → 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 (112) hide show
  1. package/dist/.build-stamp +1 -1
  2. package/dist/_entries.cjs +3570 -2574
  3. package/dist/admin/index.d.cts +5 -4
  4. package/dist/admin/index.d.ts +5 -4
  5. package/dist/admin/index.js +2 -1
  6. package/dist/{admin-resources.module-aOJ_0rur.d.cts → admin-resources.module-B4XNvdH-.d.cts} +0 -1
  7. package/dist/{admin-resources.module-BENMc0Wh.d.ts → admin-resources.module-CWqdI9BV.d.ts} +0 -1
  8. package/dist/{admin-stats.service-cwLMrkGl.d.ts → admin-stats.service-CsLNt19Z.d.ts} +10 -6
  9. package/dist/{admin-stats.service-BJdzHCtJ.d.cts → admin-stats.service-DrZrU8IJ.d.cts} +10 -6
  10. package/dist/{aggregation-CtIjlWHT.d.ts → aggregation-ChpZDh0g.d.ts} +20 -4
  11. package/dist/{aggregation-BHo7a_In.d.cts → aggregation-OpnhwzF5.d.cts} +20 -4
  12. package/dist/billing/index.d.cts +23 -16
  13. package/dist/billing/index.d.ts +23 -16
  14. package/dist/billing/index.js +20 -15
  15. package/dist/catalog/index.d.cts +17 -8
  16. package/dist/catalog/index.d.ts +17 -8
  17. package/dist/catalog/index.js +5 -3
  18. package/dist/{catalog.module-B5E8tsl7.d.ts → catalog.module-C9O7BxRq.d.ts} +80 -7
  19. package/dist/{catalog.module-DKVvsPsl.d.cts → catalog.module-T-I5Ricz.d.cts} +80 -7
  20. package/dist/checkout-offer/index.d.cts +5 -4
  21. package/dist/checkout-offer/index.d.ts +5 -4
  22. package/dist/checkout-offer/index.js +15 -14
  23. package/dist/{checkout-offer.service-BP4CoZle.d.ts → checkout-offer.service-BeHgYikI.d.ts} +51 -8
  24. package/dist/{checkout-offer.service-Bk5mHEoR.d.cts → checkout-offer.service-CCVxG9b2.d.cts} +51 -8
  25. package/dist/{chunk-AOQJEYOL.js → chunk-3QVGA6JX.js} +3 -1
  26. package/dist/chunk-3RLWML2S.js +896 -0
  27. package/dist/{chunk-DTIYUJH5.js → chunk-4SDSYV4A.js} +16 -6
  28. package/dist/{chunk-X4PDUYBX.js → chunk-55QEDAMX.js} +106 -302
  29. package/dist/chunk-6PJE7EWO.js +185 -0
  30. package/dist/{chunk-CRCNY3U6.js → chunk-7NJKVC5X.js} +54 -14
  31. package/dist/{chunk-RSAPMUGB.js → chunk-AOS2JPDD.js} +67 -64
  32. package/dist/{chunk-NCXGXNQK.js → chunk-CQ2ZZMTD.js} +174 -72
  33. package/dist/{chunk-NEICZJE4.js → chunk-F5X66HF5.js} +1 -1
  34. package/dist/{chunk-323FB6TD.js → chunk-FEQZCWUL.js} +67 -19
  35. package/dist/{chunk-FQS5FPH2.js → chunk-G6EZWECL.js} +42 -21
  36. package/dist/{chunk-XDRJ4FRG.js → chunk-JBCC6C3M.js} +84 -20
  37. package/dist/chunk-LF6J4YYN.js +301 -0
  38. package/dist/{chunk-OAUN2FPJ.js → chunk-LLYVYRGJ.js} +50 -21
  39. package/dist/{chunk-6ISJMNW7.js → chunk-M47BNEY2.js} +125 -108
  40. package/dist/{chunk-U465NU23.js → chunk-NDLC5GYK.js} +40 -33
  41. package/dist/{chunk-YFCTBLM5.js → chunk-QPVDCKYS.js} +237 -60
  42. package/dist/{chunk-IORLRWJZ.js → chunk-R5YCJBHY.js} +2 -2
  43. package/dist/{chunk-QBF7KLSA.js → chunk-TBBZWZQT.js} +8 -6
  44. package/dist/chunk-TOEFN7DN.js +295 -0
  45. package/dist/{chunk-ZUOCCEWB.js → chunk-WHJSYKNC.js} +2 -2
  46. package/dist/chunk-WOEJ6K7M.js +55 -0
  47. package/dist/{chunk-WYXLTSUZ.js → chunk-XSSWYPP5.js} +6 -4
  48. package/dist/contract-line-item-money-B0Z3Ogur.d.cts +43 -0
  49. package/dist/contract-line-item-money-B0Z3Ogur.d.ts +43 -0
  50. package/dist/{enforce-quota.interceptor-CLyCNVIm.d.cts → enforce-quota.interceptor-BFyVdWe8.d.cts} +6 -6
  51. package/dist/{enforce-quota.interceptor-DQ_BN_jV.d.ts → enforce-quota.interceptor-GaBXboGx.d.ts} +6 -6
  52. package/dist/entitlement/index.d.cts +2 -1
  53. package/dist/entitlement/index.d.ts +2 -1
  54. package/dist/entitlement/index.js +6 -7
  55. package/dist/index.d.cts +27 -26
  56. package/dist/index.d.ts +27 -26
  57. package/dist/index.js +47 -33
  58. package/dist/{issuer-identity.check-B8Wzugbf.d.cts → issuer-identity.check-CBO0vcsq.d.cts} +5 -5
  59. package/dist/{issuer-identity.check-q-Uha5XY.d.ts → issuer-identity.check-Cz9CEMkZ.d.ts} +5 -5
  60. package/dist/{module-options-C5EBOxzm.d.ts → module-options-DmQ3G4sZ.d.ts} +17 -7
  61. package/dist/{module-options-Cr5FkELF.d.cts → module-options-qAOwinHR.d.cts} +17 -7
  62. package/dist/{payment-callback.service-DPUfjp-F.d.cts → payment-callback.service-CR84Xw1Z.d.cts} +31 -3
  63. package/dist/{payment-callback.service-DPUfjp-F.d.ts → payment-callback.service-CR84Xw1Z.d.ts} +31 -3
  64. package/dist/payments/index.d.cts +59 -5
  65. package/dist/payments/index.d.ts +59 -5
  66. package/dist/payments/index.js +11 -5
  67. package/dist/{payments.module-Da26YttL.d.cts → payments.module-BdUq9ot_.d.cts} +5 -2
  68. package/dist/{payments.module-C6r6dJdn.d.ts → payments.module-CQGv_VG7.d.ts} +5 -2
  69. package/dist/plan-catalog-source-DWe-BGY1.d.cts +21 -0
  70. package/dist/plan-catalog-source-DWe-BGY1.d.ts +21 -0
  71. package/dist/{plan-versions.service-BTlw-aEX.d.ts → plan-versions.service-C0N-Em2W.d.ts} +2 -48
  72. package/dist/{plan-versions.service-BM7lKLr1.d.cts → plan-versions.service-DARLh-qI.d.cts} +2 -48
  73. package/dist/platform/index.d.cts +20 -19
  74. package/dist/platform/index.d.ts +20 -19
  75. package/dist/platform/index.js +22 -21
  76. package/dist/promo/index.d.cts +9 -6
  77. package/dist/promo/index.d.ts +9 -6
  78. package/dist/promo/index.js +7 -6
  79. package/dist/{promo.module-YfF6ADDf.d.cts → promo.module-CKkECmU8.d.cts} +8 -2
  80. package/dist/{promo.module-KmIpp1Gb.d.ts → promo.module-DuIJdK3U.d.ts} +8 -2
  81. package/dist/promo.service-BYBu6dy3.d.cts +215 -0
  82. package/dist/promo.service-CFjfF0Xm.d.ts +215 -0
  83. package/dist/registration/index.d.cts +29 -4
  84. package/dist/registration/index.d.ts +29 -4
  85. package/dist/registration/index.js +12 -5
  86. package/dist/subscriber/index.d.cts +2 -2
  87. package/dist/subscriber/index.d.ts +2 -2
  88. package/dist/subscriber/index.js +5 -4
  89. package/dist/{subscriber.service-BZsvHw1V.d.cts → subscriber.service-5W6Gi-1B.d.cts} +14 -3
  90. package/dist/{subscriber.service-BZsvHw1V.d.ts → subscriber.service-5W6Gi-1B.d.ts} +14 -3
  91. package/dist/subscription-contract/index.d.cts +3 -3
  92. package/dist/subscription-contract/index.d.ts +3 -3
  93. package/dist/subscription-contract/index.js +11 -9
  94. package/dist/{subscription-contract.service-Duv_Ns1W.d.ts → subscription-contract.service-CPZrTM9C.d.ts} +1 -1
  95. package/dist/{subscription-contract.service-D7Qb_Ns-.d.cts → subscription-contract.service-CfNApLuP.d.cts} +1 -1
  96. package/dist/{tenant-billing.controller-0HZ_2DQH.d.ts → tenant-billing.controller-BLqbsONe.d.ts} +7 -6
  97. package/dist/{tenant-billing.controller-CN9DgasV.d.cts → tenant-billing.controller-DKbAqTbM.d.cts} +7 -6
  98. package/dist/{tenant-billing.module-CPybDf7c.d.cts → tenant-billing.module-ClbjzocC.d.cts} +24 -16
  99. package/dist/{tenant-billing.module-C1sLBCW-.d.ts → tenant-billing.module-DohgJJ2m.d.ts} +24 -16
  100. package/dist/testing/index.d.cts +11 -10
  101. package/dist/testing/index.d.ts +11 -10
  102. package/dist/testing/index.js +20 -20
  103. package/package.json +3 -3
  104. package/dist/chunk-3HT3REXB.js +0 -110
  105. package/dist/chunk-5BCYJ3QY.js +0 -44
  106. package/dist/chunk-QSBMFY4I.js +0 -33
  107. package/dist/chunk-U4X2YRRO.js +0 -214
  108. package/dist/chunk-XWAZNKAB.js +0 -638
  109. package/dist/contract-line-item-money-BWWQhRul.d.cts +0 -11
  110. package/dist/contract-line-item-money-BWWQhRul.d.ts +0 -11
  111. package/dist/promo.service-CBMm9RU7.d.cts +0 -113
  112. package/dist/promo.service-CBMm9RU7.d.ts +0 -113
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  PromoCodesModule
3
- } from "./chunk-DTIYUJH5.js";
3
+ } from "./chunk-4SDSYV4A.js";
4
4
  import {
5
5
  SubscriptionContractModule
6
- } from "./chunk-WYXLTSUZ.js";
6
+ } from "./chunk-XSSWYPP5.js";
7
7
  import {
8
8
  AdminManifestModule,
9
9
  AdminManifestService,
@@ -11,7 +11,7 @@ import {
11
11
  AdminResourcesModule,
12
12
  AdminStatsModule,
13
13
  SuperAdminGuard
14
- } from "./chunk-OAUN2FPJ.js";
14
+ } from "./chunk-LLYVYRGJ.js";
15
15
  import {
16
16
  FEATURE_GUARD_MARKER,
17
17
  PublicCatalogModule,
@@ -21,29 +21,32 @@ import {
21
21
  catalogSource,
22
22
  isPlatformFeatureGuard,
23
23
  loadPlanCatalogFromFile
24
- } from "./chunk-6ISJMNW7.js";
24
+ } from "./chunk-M47BNEY2.js";
25
25
  import {
26
26
  CatalogModule,
27
27
  WebAuditLogger,
28
28
  actorTagOf,
29
29
  defaultActorFromRequest
30
- } from "./chunk-NCXGXNQK.js";
30
+ } from "./chunk-CQ2ZZMTD.js";
31
31
  import {
32
32
  MfaService
33
33
  } from "./chunk-34XVPR6P.js";
34
34
  import {
35
35
  CheckoutOfferModule
36
- } from "./chunk-X4PDUYBX.js";
36
+ } from "./chunk-TOEFN7DN.js";
37
37
  import {
38
38
  DiscoveryModule
39
39
  } from "./chunk-S33SO5XX.js";
40
40
  import {
41
41
  EntitlementModule
42
- } from "./chunk-ZUOCCEWB.js";
42
+ } from "./chunk-WHJSYKNC.js";
43
43
  import {
44
44
  LimitExceededError,
45
45
  cancellationHasLanded
46
- } from "./chunk-FQS5FPH2.js";
46
+ } from "./chunk-G6EZWECL.js";
47
+ import {
48
+ findPlan
49
+ } from "./chunk-TBBZWZQT.js";
47
50
  import {
48
51
  SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN
49
52
  } from "./chunk-VBRYPU7V.js";
@@ -52,7 +55,10 @@ import {
52
55
  } from "./chunk-QUZU2M33.js";
53
56
  import {
54
57
  PaymentsModule
55
- } from "./chunk-YFCTBLM5.js";
58
+ } from "./chunk-QPVDCKYS.js";
59
+ import {
60
+ PaymentGatewayRegistry
61
+ } from "./chunk-7NJKVC5X.js";
56
62
  import {
57
63
  RLS_BYPASS_PORT_TOKEN
58
64
  } from "./chunk-SZ7RFPXA.js";
@@ -60,9 +66,10 @@ import {
60
66
  SaaSiCatPublicRoute
61
67
  } from "./chunk-YSC46BGM.js";
62
68
  import {
63
- PLAN_CATALOG_TOKEN,
69
+ PLAN_CATALOG_SETTINGS_TOKEN,
70
+ PLAN_CATALOG_SOURCE_TOKEN,
64
71
  PlanCatalogModule
65
- } from "./chunk-323FB6TD.js";
72
+ } from "./chunk-FEQZCWUL.js";
66
73
  import {
67
74
  asProvider,
68
75
  codedError
@@ -409,16 +416,16 @@ var SettingsChangeNotifier = class _SettingsChangeNotifier {
409
416
  static {
410
417
  __name(this, "SettingsChangeNotifier");
411
418
  }
412
- catalog;
419
+ settings;
413
420
  email;
414
421
  logger = new Logger(_SettingsChangeNotifier.name);
415
- constructor(catalog, email = null) {
416
- this.catalog = catalog;
422
+ constructor(settings, email = null) {
423
+ this.settings = settings;
417
424
  this.email = email;
418
425
  }
419
426
  /** The addresses `config/saas.yaml` names under `notifications.settingsChanged`. */
420
427
  get addresses() {
421
- return this.catalog.notifications?.settingsChanged ?? [];
428
+ return this.settings.notifications?.settingsChanged ?? [];
422
429
  }
423
430
  /**
424
431
  * Which of the two it is, said once at boot — and only where the question
@@ -450,7 +457,7 @@ var SettingsChangeNotifier = class _SettingsChangeNotifier {
450
457
  kind: "no-email-port",
451
458
  addresses
452
459
  };
453
- const message = describeChange(this.catalog.app.name, change);
460
+ const message = describeChange(this.settings.app.name, change);
454
461
  const failed = [];
455
462
  for (const to of addresses) {
456
463
  try {
@@ -472,12 +479,12 @@ var SettingsChangeNotifier = class _SettingsChangeNotifier {
472
479
  };
473
480
  SettingsChangeNotifier = _ts_decorate4([
474
481
  Injectable2(),
475
- _ts_param3(0, Inject2(PLAN_CATALOG_TOKEN)),
482
+ _ts_param3(0, Inject2(PLAN_CATALOG_SETTINGS_TOKEN)),
476
483
  _ts_param3(1, Optional()),
477
484
  _ts_param3(1, Inject2(EMAIL_PORT_TOKEN)),
478
485
  _ts_metadata3("design:type", Function),
479
486
  _ts_metadata3("design:paramtypes", [
480
- typeof PlanCatalog === "undefined" ? Object : PlanCatalog,
487
+ typeof PlanCatalogSettings === "undefined" ? Object : PlanCatalogSettings,
481
488
  Object
482
489
  ])
483
490
  ], SettingsChangeNotifier);
@@ -556,13 +563,13 @@ var AppliedSettingsRecorder = class _AppliedSettingsRecorder {
556
563
  static {
557
564
  __name(this, "AppliedSettingsRecorder");
558
565
  }
559
- catalog;
566
+ settings;
560
567
  source;
561
568
  port;
562
569
  notifier;
563
570
  logger = new Logger2(_AppliedSettingsRecorder.name);
564
- constructor(catalog, source, port = null, notifier = null) {
565
- this.catalog = catalog;
571
+ constructor(settings, source, port = null, notifier = null) {
572
+ this.settings = settings;
566
573
  this.source = source;
567
574
  this.port = port;
568
575
  this.notifier = notifier;
@@ -614,7 +621,7 @@ var AppliedSettingsRecorder = class _AppliedSettingsRecorder {
614
621
  * order the record never went through.
615
622
  */
616
623
  async record(port, clock) {
617
- const settings = settingsSubtreeOf(this.catalog);
624
+ const settings = settingsSubtreeOf(this.settings);
618
625
  const fingerprint = fingerprintOf(settings);
619
626
  for (let attempt = 1; attempt <= RECORD_ATTEMPTS; attempt++) {
620
627
  const previous = await port.readApplied();
@@ -686,7 +693,7 @@ var AppliedSettingsRecorder = class _AppliedSettingsRecorder {
686
693
  };
687
694
  AppliedSettingsRecorder = _ts_decorate5([
688
695
  Injectable3(),
689
- _ts_param4(0, Inject3(PLAN_CATALOG_TOKEN)),
696
+ _ts_param4(0, Inject3(PLAN_CATALOG_SETTINGS_TOKEN)),
690
697
  _ts_param4(1, Inject3(SETTINGS_SOURCE_TOKEN)),
691
698
  _ts_param4(2, Optional2()),
692
699
  _ts_param4(2, Inject3(APPLIED_SETTINGS_PORT_TOKEN)),
@@ -694,7 +701,7 @@ AppliedSettingsRecorder = _ts_decorate5([
694
701
  _ts_param4(3, Inject3(SettingsChangeNotifier)),
695
702
  _ts_metadata4("design:type", Function),
696
703
  _ts_metadata4("design:paramtypes", [
697
- typeof PlanCatalog === "undefined" ? Object : PlanCatalog,
704
+ typeof PlanCatalogSettings === "undefined" ? Object : PlanCatalogSettings,
698
705
  String,
699
706
  Object,
700
707
  Object
@@ -728,19 +735,19 @@ function buildSettingsController(guards) {
728
735
  static {
729
736
  __name(this, "GeneratedSettingsController");
730
737
  }
731
- catalog;
738
+ settings;
732
739
  source;
733
740
  port;
734
741
  audit;
735
742
  // Explicit @Inject: tsup/esbuild emit no `design:paramtypes`.
736
- constructor(catalog, source, port, audit = null) {
737
- this.catalog = catalog;
743
+ constructor(settings, source, port, audit = null) {
744
+ this.settings = settings;
738
745
  this.source = source;
739
746
  this.port = port;
740
747
  this.audit = audit;
741
748
  }
742
749
  async getSettings() {
743
- const settings = settingsSubtreeOf2(this.catalog);
750
+ const settings = settingsSubtreeOf2(this.settings);
744
751
  const fingerprint = fingerprintOf(settings);
745
752
  const base = {
746
753
  source: this.source,
@@ -804,14 +811,14 @@ function buildSettingsController(guards) {
804
811
  GeneratedSettingsController = _ts_decorate6([
805
812
  Controller2("admin"),
806
813
  UseGuards(...guards),
807
- _ts_param5(0, Inject4(PLAN_CATALOG_TOKEN)),
814
+ _ts_param5(0, Inject4(PLAN_CATALOG_SETTINGS_TOKEN)),
808
815
  _ts_param5(1, Inject4(SETTINGS_SOURCE_TOKEN)),
809
816
  _ts_param5(2, Inject4(APPLIED_SETTINGS_PORT_TOKEN)),
810
817
  _ts_param5(3, Optional3()),
811
818
  _ts_param5(3, Inject4(WebAuditLogger)),
812
819
  _ts_metadata5("design:type", Function),
813
820
  _ts_metadata5("design:paramtypes", [
814
- typeof PlanCatalog === "undefined" ? Object : PlanCatalog,
821
+ typeof PlanCatalogSettings === "undefined" ? Object : PlanCatalogSettings,
815
822
  String,
816
823
  Object,
817
824
  Object
@@ -1079,7 +1086,7 @@ var IssuerIdentityInspector = class _IssuerIdentityInspector {
1079
1086
  static {
1080
1087
  __name(this, "IssuerIdentityInspector");
1081
1088
  }
1082
- catalog;
1089
+ fileSettings;
1083
1090
  source;
1084
1091
  settings;
1085
1092
  contracts;
@@ -1087,8 +1094,8 @@ var IssuerIdentityInspector = class _IssuerIdentityInspector {
1087
1094
  logger = new Logger3(_IssuerIdentityInspector.name);
1088
1095
  /** This start's answer, settled the first time anything asks for it. */
1089
1096
  verdict = null;
1090
- constructor(catalog, source, settings = null, contracts = null, rlsBypass = null) {
1091
- this.catalog = catalog;
1097
+ constructor(fileSettings, source, settings = null, contracts = null, rlsBypass = null) {
1098
+ this.fileSettings = fileSettings;
1092
1099
  this.source = source;
1093
1100
  this.settings = settings;
1094
1101
  this.contracts = contracts;
@@ -1130,7 +1137,7 @@ var IssuerIdentityInspector = class _IssuerIdentityInspector {
1130
1137
  kind: "not-compared",
1131
1138
  why: recorded.why
1132
1139
  };
1133
- const change = classifyIssuerChange(recordedIssuerIdentity(recorded.settings), this.catalog.issuer);
1140
+ const change = classifyIssuerChange(recordedIssuerIdentity(recorded.settings), this.fileSettings.issuer);
1134
1141
  if (change.kind !== "undeclared") return {
1135
1142
  kind: "settled",
1136
1143
  change
@@ -1168,7 +1175,7 @@ var IssuerIdentityInspector = class _IssuerIdentityInspector {
1168
1175
  };
1169
1176
  } catch (error) {
1170
1177
  const why = `the applied settings could not be read: ${messageOf(error)}`;
1171
- if (this.catalog.issuer) {
1178
+ if (this.fileSettings.issuer) {
1172
1179
  throw new Error(`The issuer named in ${this.source} could not be compared with the one this installation recorded, because ${why}`, {
1173
1180
  cause: error
1174
1181
  });
@@ -1244,7 +1251,7 @@ var IssuerIdentityInspector = class _IssuerIdentityInspector {
1244
1251
  };
1245
1252
  IssuerIdentityInspector = _ts_decorate9([
1246
1253
  Injectable5(),
1247
- _ts_param7(0, Inject6(PLAN_CATALOG_TOKEN)),
1254
+ _ts_param7(0, Inject6(PLAN_CATALOG_SETTINGS_TOKEN)),
1248
1255
  _ts_param7(1, Inject6(SETTINGS_SOURCE_TOKEN)),
1249
1256
  _ts_param7(2, Optional5()),
1250
1257
  _ts_param7(2, Inject6(APPLIED_SETTINGS_PORT_TOKEN)),
@@ -1254,7 +1261,7 @@ IssuerIdentityInspector = _ts_decorate9([
1254
1261
  _ts_param7(4, Inject6(RLS_BYPASS_PORT_TOKEN)),
1255
1262
  _ts_metadata7("design:type", Function),
1256
1263
  _ts_metadata7("design:paramtypes", [
1257
- typeof PlanCatalog === "undefined" ? Object : PlanCatalog,
1264
+ typeof PlanCatalogSettings === "undefined" ? Object : PlanCatalogSettings,
1258
1265
  String,
1259
1266
  Object,
1260
1267
  Object,
@@ -1733,7 +1740,13 @@ function composeCatalog({ options, persistence }) {
1733
1740
  autoSyncDiscoveryAtBoot: config.autoSyncDiscoveryAtBoot,
1734
1741
  marketedOnlyFeatures: config.marketedOnlyFeatures,
1735
1742
  featureUiRegistry: config.featureUiRegistry,
1736
- publicMarketingCatalog: config.publicMarketingCatalog
1743
+ // What the public catalogue says about payment methods comes from
1744
+ // the same option that wires the gateways, so the two cannot
1745
+ // disagree: no `payments`, nothing takes new payment methods.
1746
+ publicMarketingCatalog: config.publicMarketingCatalog && {
1747
+ ...config.publicMarketingCatalog,
1748
+ newPaymentMethodsFrom: config.publicMarketingCatalog.newPaymentMethodsFrom ?? (options.payments ? PaymentGatewayRegistry : null)
1749
+ }
1737
1750
  })
1738
1751
  ];
1739
1752
  if (config.publicCatalog !== false) {
@@ -1874,6 +1887,7 @@ function composePromoCodes({ options, adapters, persistence }) {
1874
1887
  validationLogRepository: promo.validationLogRepository,
1875
1888
  subscriptionLookup: promo.subscriptionLookup,
1876
1889
  revenueAggregator: promo.revenueAggregator,
1890
+ holdRepository: promo.holdRepository,
1877
1891
  transactionRunner: adapters.transactionRunner,
1878
1892
  firstTimeCustomerCheck: firstTimeCustomerCheck ?? {
1879
1893
  hasExistingCustomerForEmail: /* @__PURE__ */ __name(async () => false, "hasExistingCustomerForEmail")
@@ -2096,10 +2110,10 @@ var StaticEntitlementService = class {
2096
2110
  static {
2097
2111
  __name(this, "StaticEntitlementService");
2098
2112
  }
2099
- catalog;
2113
+ catalogs;
2100
2114
  resolver;
2101
- constructor(catalog, resolver) {
2102
- this.catalog = catalog;
2115
+ constructor(catalogs, resolver) {
2116
+ this.catalogs = catalogs;
2103
2117
  this.resolver = resolver;
2104
2118
  }
2105
2119
  /**
@@ -2116,7 +2130,7 @@ var StaticEntitlementService = class {
2116
2130
  quotas: {}
2117
2131
  };
2118
2132
  }
2119
- const plan = this.findPlan(planId);
2133
+ const plan = findPlan(await this.catalogs.current(), planId);
2120
2134
  if (!plan) {
2121
2135
  return {
2122
2136
  planId,
@@ -2140,17 +2154,14 @@ var StaticEntitlementService = class {
2140
2154
  const value = snap.quotas[quotaKey];
2141
2155
  return value === void 0 ? null : value;
2142
2156
  }
2143
- findPlan(planId) {
2144
- return (this.catalog.plans ?? []).find((p) => p.id === planId);
2145
- }
2146
2157
  };
2147
2158
  StaticEntitlementService = _ts_decorate10([
2148
2159
  Injectable6(),
2149
- _ts_param8(0, Inject7(PLAN_CATALOG_TOKEN)),
2160
+ _ts_param8(0, Inject7(PLAN_CATALOG_SOURCE_TOKEN)),
2150
2161
  _ts_param8(1, Inject7(PLAN_RESOLVER_PORT_TOKEN)),
2151
2162
  _ts_metadata8("design:type", Function),
2152
2163
  _ts_metadata8("design:paramtypes", [
2153
- typeof PlanCatalog === "undefined" ? Object : PlanCatalog,
2164
+ typeof PlanCatalogSource === "undefined" ? Object : PlanCatalogSource,
2154
2165
  typeof PlanResolverPort === "undefined" ? Object : PlanResolverPort
2155
2166
  ])
2156
2167
  ], StaticEntitlementService);
@@ -2547,33 +2558,25 @@ function buildStandardManifestContribution(catalog, adminResources, promoCodes)
2547
2558
  __name(buildStandardManifestContribution, "buildStandardManifestContribution");
2548
2559
  function buildMinimalManifestConfig() {
2549
2560
  return {
2550
- useFactory: /* @__PURE__ */ __name((catalog) => ({
2561
+ useFactory: /* @__PURE__ */ __name((settings) => ({
2551
2562
  project: {
2552
2563
  // One name, from the one place an installation carries it.
2553
- key: catalog.app.name,
2554
- displayName: catalog.app.name,
2555
- label: catalog.app.label,
2556
- icon: catalog.app.icon,
2557
- logoUrl: catalog.app.logoUrl,
2564
+ key: settings.app.name,
2565
+ displayName: settings.app.name,
2566
+ label: settings.app.label,
2567
+ icon: settings.app.icon,
2568
+ logoUrl: settings.app.logoUrl,
2558
2569
  environment: process.env.NODE_ENV === "production" ? "production" : "development",
2559
- availableLocales: catalog.marketing?.availableLocales,
2560
- defaultLocale: catalog.marketing?.availableLocales?.[0]
2570
+ availableLocales: settings.marketing?.availableLocales,
2571
+ defaultLocale: settings.marketing?.availableLocales?.[0]
2561
2572
  },
2562
2573
  build: {
2563
2574
  platformPackageVersion: "0.0.0",
2564
2575
  appVersion: "0.0.0"
2565
- },
2566
- planCatalogSnapshot: {
2567
- source: "saasicat-module",
2568
- hash: "sha256-quickstart",
2569
- currency: catalog.currency,
2570
- vatRate: catalog.vatRate,
2571
- plans: catalog.plans ?? [],
2572
- features: catalog.features ?? []
2573
2576
  }
2574
2577
  }), "useFactory"),
2575
2578
  inject: [
2576
- PLAN_CATALOG_TOKEN
2579
+ PLAN_CATALOG_SETTINGS_TOKEN
2577
2580
  ]
2578
2581
  };
2579
2582
  }