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

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 (101) hide show
  1. package/dist/.build-stamp +1 -1
  2. package/dist/_entries.cjs +15561 -12478
  3. package/dist/admin/index.d.cts +4 -4
  4. package/dist/admin/index.d.ts +4 -4
  5. package/dist/admin/index.js +8 -5
  6. package/dist/{admin-resources.module-CWqdI9BV.d.ts → admin-resources.module-DtWAFI-G.d.ts} +1 -1
  7. package/dist/{admin-resources.module-B4XNvdH-.d.cts → admin-resources.module-pS7LbdbI.d.cts} +1 -1
  8. package/dist/{admin-stats.service-CsLNt19Z.d.ts → admin-stats.service--1sRNpUx.d.ts} +2 -2
  9. package/dist/{admin-stats.service-DrZrU8IJ.d.cts → admin-stats.service-ChATI9YK.d.cts} +2 -2
  10. package/dist/{aggregation-ChpZDh0g.d.ts → aggregation-B8iZBesJ.d.ts} +63 -4
  11. package/dist/{aggregation-OpnhwzF5.d.cts → aggregation-BRzgRXDb.d.cts} +63 -4
  12. package/dist/billing/index.d.cts +280 -13
  13. package/dist/billing/index.d.ts +280 -13
  14. package/dist/billing/index.js +32 -8
  15. package/dist/catalog/index.d.cts +2 -2
  16. package/dist/catalog/index.d.ts +2 -2
  17. package/dist/catalog/index.js +4 -2
  18. package/dist/{catalog.module-T-I5Ricz.d.cts → catalog.module-CeKslGHW.d.cts} +1 -1
  19. package/dist/{catalog.module-C9O7BxRq.d.ts → catalog.module-CiurcIjI.d.ts} +1 -1
  20. package/dist/checkout-offer/index.d.cts +4 -4
  21. package/dist/checkout-offer/index.d.ts +4 -4
  22. package/dist/checkout-offer/index.js +5 -5
  23. package/dist/{checkout-offer.module-x7SP_dX4.d.ts → checkout-offer.module-C761mcEv.d.ts} +1 -1
  24. package/dist/{checkout-offer.module-DFhGy6JO.d.cts → checkout-offer.module-CSHB4bB8.d.cts} +1 -1
  25. package/dist/{checkout-offer.service-BeHgYikI.d.ts → checkout-offer.service-Dux8EgEM.d.ts} +3 -3
  26. package/dist/{checkout-offer.service-CCVxG9b2.d.cts → checkout-offer.service-HKoTZ3JH.d.cts} +3 -3
  27. package/dist/{chunk-F5X66HF5.js → chunk-2ECX7BST.js} +1 -1
  28. package/dist/{chunk-G6EZWECL.js → chunk-2XBWYMOL.js} +141 -26
  29. package/dist/{chunk-R5YCJBHY.js → chunk-3HBP2HK3.js} +6 -2
  30. package/dist/{chunk-S33SO5XX.js → chunk-4OFJLVVH.js} +4 -0
  31. package/dist/{chunk-AOS2JPDD.js → chunk-5LL2554P.js} +757 -163
  32. package/dist/chunk-5MZH3VVU.js +292 -0
  33. package/dist/{chunk-WHJSYKNC.js → chunk-7LHUENAT.js} +2 -2
  34. package/dist/{chunk-M47BNEY2.js → chunk-7MLB6T5B.js} +2072 -407
  35. package/dist/{chunk-NDLC5GYK.js → chunk-CVCKXKGT.js} +138 -21
  36. package/dist/{chunk-VBRYPU7V.js → chunk-E224LKO2.js} +3 -1
  37. package/dist/{chunk-QPVDCKYS.js → chunk-ESEWSAOV.js} +4 -3
  38. package/dist/{chunk-CQ2ZZMTD.js → chunk-MU4O4EKX.js} +711 -828
  39. package/dist/{chunk-JBCC6C3M.js → chunk-NQIPQI2Q.js} +26 -7
  40. package/dist/{chunk-4SDSYV4A.js → chunk-PBL7N5J3.js} +18 -2
  41. package/dist/{chunk-LLYVYRGJ.js → chunk-QTJEZDKC.js} +15 -275
  42. package/dist/{chunk-3RLWML2S.js → chunk-QWKBOLBH.js} +35 -0
  43. package/dist/{chunk-XSSWYPP5.js → chunk-TR3L6FRF.js} +6 -2
  44. package/dist/chunk-TSLGMPGZ.js +21 -0
  45. package/dist/chunk-UJZCESIC.js +466 -0
  46. package/dist/{chunk-TOEFN7DN.js → chunk-W6VNCMOQ.js} +3 -3
  47. package/dist/{chunk-7NJKVC5X.js → chunk-WQNOCOI2.js} +53 -6
  48. package/dist/chunk-YZSILFW4.js +142 -0
  49. package/dist/{chunk-55QEDAMX.js → chunk-ZCXW24NH.js} +4 -9
  50. package/dist/discovery/index.js +2 -1
  51. package/dist/{enforce-quota.interceptor-BFyVdWe8.d.cts → enforce-quota.interceptor-Dc-1_zQf.d.cts} +2 -2
  52. package/dist/{enforce-quota.interceptor-GaBXboGx.d.ts → enforce-quota.interceptor-MXpwsOJ2.d.ts} +2 -2
  53. package/dist/entitlement/index.d.cts +1 -1
  54. package/dist/entitlement/index.d.ts +1 -1
  55. package/dist/entitlement/index.js +5 -3
  56. package/dist/index.d.cts +62 -25
  57. package/dist/index.d.ts +62 -25
  58. package/dist/index.js +81 -26
  59. package/dist/{issuer-identity.check-CBO0vcsq.d.cts → issuer-identity.check-BrZXesOF.d.cts} +3 -3
  60. package/dist/{issuer-identity.check-Cz9CEMkZ.d.ts → issuer-identity.check-BzlFSmSZ.d.ts} +3 -3
  61. package/dist/maintenance.service-CNMI3tSm.d.cts +133 -0
  62. package/dist/maintenance.service-yx6fxjUj.d.ts +133 -0
  63. package/dist/{module-options-DmQ3G4sZ.d.ts → module-options-BSYxlA38.d.ts} +50 -9
  64. package/dist/{module-options-qAOwinHR.d.cts → module-options-BkufuqlM.d.cts} +50 -9
  65. package/dist/payments/index.d.cts +2 -2
  66. package/dist/payments/index.d.ts +2 -2
  67. package/dist/payments/index.js +2 -2
  68. package/dist/{payments.module-BdUq9ot_.d.cts → payments.module-CwLeaflk.d.cts} +1 -1
  69. package/dist/{payments.module-CQGv_VG7.d.ts → payments.module-DmIN-HWx.d.ts} +1 -1
  70. package/dist/{plan-versions.service-DARLh-qI.d.cts → plan-versions.service-2mD0iEvY.d.cts} +1 -1
  71. package/dist/{plan-versions.service-C0N-Em2W.d.ts → plan-versions.service-C4a9aCEU.d.ts} +1 -1
  72. package/dist/platform/index.d.cts +34 -25
  73. package/dist/platform/index.d.ts +34 -25
  74. package/dist/platform/index.js +22 -17
  75. package/dist/promo/index.d.cts +15 -5
  76. package/dist/promo/index.d.ts +15 -5
  77. package/dist/promo/index.js +9 -3
  78. package/dist/{promo.module-CKkECmU8.d.cts → promo.module-Ddx-swUV.d.cts} +1 -1
  79. package/dist/{promo.module-DuIJdK3U.d.ts → promo.module-PsIvDcUp.d.ts} +1 -1
  80. package/dist/{promo.service-BYBu6dy3.d.cts → promo.service-BextPvx5.d.cts} +23 -1
  81. package/dist/{promo.service-CFjfF0Xm.d.ts → promo.service-Dqqh0JXn.d.ts} +23 -1
  82. package/dist/registration/index.d.cts +7 -4
  83. package/dist/registration/index.d.ts +7 -4
  84. package/dist/registration/index.js +11 -6
  85. package/dist/subscription-contract/index.d.cts +13 -3
  86. package/dist/subscription-contract/index.d.ts +13 -3
  87. package/dist/subscription-contract/index.js +5 -3
  88. package/dist/{subscription-contract.module-BfIRpc1o.d.ts → subscription-contract.module-B5wrmzkz.d.ts} +8 -1
  89. package/dist/{subscription-contract.module-DTMuUJYd.d.cts → subscription-contract.module-qaswPXwT.d.cts} +8 -1
  90. package/dist/{subscription-contract.service-CfNApLuP.d.cts → subscription-contract.service-CH2TKw-j.d.cts} +45 -3
  91. package/dist/{subscription-contract.service-CPZrTM9C.d.ts → subscription-contract.service-Dm2xEFZi.d.ts} +45 -3
  92. package/dist/{tenant-billing.controller-BLqbsONe.d.ts → tenant-billing.controller-BMH9YODT.d.ts} +92 -11
  93. package/dist/{tenant-billing.controller-DKbAqTbM.d.cts → tenant-billing.controller-BX3VExL3.d.cts} +92 -11
  94. package/dist/{tenant-billing.module-ClbjzocC.d.cts → tenant-billing.module-Do3QyKbr.d.cts} +33 -3
  95. package/dist/{tenant-billing.module-DohgJJ2m.d.ts → tenant-billing.module-W5_Y4ogN.d.ts} +33 -3
  96. package/dist/{tenant-billing.tokens-G-1xOlMr.d.cts → tenant-billing.tokens-D0vr1lfj.d.cts} +1 -1
  97. package/dist/{tenant-billing.tokens-G-1xOlMr.d.ts → tenant-billing.tokens-D0vr1lfj.d.ts} +1 -1
  98. package/dist/testing/index.d.cts +14 -13
  99. package/dist/testing/index.d.ts +14 -13
  100. package/dist/testing/index.js +54 -35
  101. package/package.json +5 -3
@@ -1,7 +1,7 @@
1
1
  import { PlanCatalogSettings, PlanRepository, BundleRepository, PromotionRepository, CheckoutOfferPriceBreakdown, CheckoutOfferLineItem, CheckoutOfferPromotionSnapshot, CheckoutOfferPromoCodeSnapshot, CheckoutOfferRow, CheckoutOfferRepository, CatalogEntryRepository, TransactionRunner, CheckoutOfferFilter, CheckoutOfferSelection, CheckoutOfferSelectionUpdate, NewSubscriberDetails, TransactionContext, SubscriptionContractRecord } from '@saasicat/core';
2
- import { S as SubscriptionContractService, C as CreateContractFromOfferOptions } from './subscription-contract.service-CfNApLuP.cjs';
2
+ import { S as SubscriptionContractService, C as CreateContractFromOfferOptions } from './subscription-contract.service-CH2TKw-j.cjs';
3
3
  import { S as SubscriberService } from './subscriber.service-5W6Gi-1B.cjs';
4
- import { a as PromoCodesService } from './promo.service-BYBu6dy3.cjs';
4
+ import { a as PromoCodesService } from './promo.service-BextPvx5.cjs';
5
5
 
6
6
  type Cycle = 'monthly' | 'yearly';
7
7
  /** What pricing needs to know about a selection. */
@@ -239,4 +239,4 @@ declare class CheckoutOfferService {
239
239
  private isExpired;
240
240
  }
241
241
 
242
- export { CheckoutOfferPricing as C, type PricedCheckoutOffer as P, type CheckoutOfferPricingInput as a, CheckoutOfferService as b, type ConcludeCheckoutOfferOptions as c, type ConcludeCheckoutOfferWithin as d, type ConcludedCheckoutOffer as e };
242
+ export { CheckoutOfferPricing as C, type PricedCheckoutOffer as P, CheckoutOfferService as a, type CheckoutOfferPricingInput as b, type ConcludeCheckoutOfferOptions as c, type ConcludeCheckoutOfferWithin as d, type ConcludedCheckoutOffer as e };
@@ -2,7 +2,7 @@ import {
2
2
  ADVISORY_STRICT_MODE_CODES,
3
3
  validateBundleDraft,
4
4
  validatePlanDraft
5
- } from "./chunk-CQ2ZZMTD.js";
5
+ } from "./chunk-MU4O4EKX.js";
6
6
  import {
7
7
  DiscoverySnapshotNotFoundError,
8
8
  loadDiscoverySnapshotFromFile
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-TBBZWZQT.js";
10
10
  import {
11
11
  SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN
12
- } from "./chunk-VBRYPU7V.js";
12
+ } from "./chunk-E224LKO2.js";
13
13
  import {
14
14
  BUNDLE_REPOSITORY_TOKEN
15
15
  } from "./chunk-3QVGA6JX.js";
@@ -46,6 +46,10 @@ function filterActiveSubscriptionBundles(bundles, now) {
46
46
  return bundles.filter((b) => b.canceledEffectiveAt === null || b.canceledEffectiveAt > now);
47
47
  }
48
48
  __name(filterActiveSubscriptionBundles, "filterActiveSubscriptionBundles");
49
+ function isCancellationDeclared(booking) {
50
+ return booking.canceledEffectiveAt !== null;
51
+ }
52
+ __name(isCancellationDeclared, "isCancellationDeclared");
49
53
  function aggregateSubscriptionBundleQuotas(bundles) {
50
54
  const sums = {};
51
55
  for (const bundle of bundles) {
@@ -112,6 +116,10 @@ function contractBundleVersionIds(contract) {
112
116
  ids.add(item.sourceVersionId);
113
117
  }
114
118
  }
119
+ const leftOut = contract.entitlementSnapshot?.leftOutBundleVersionIds;
120
+ if (Array.isArray(leftOut)) {
121
+ for (const id of leftOut) ids.delete(id);
122
+ }
115
123
  return ids;
116
124
  }
117
125
  __name(contractBundleVersionIds, "contractBundleVersionIds");
@@ -390,20 +398,81 @@ var EntitlementService = class {
390
398
  const cached = this.readCache(tenantId, now.getTime());
391
399
  if (cached) return cached;
392
400
  }
401
+ const sub = await this.requireSubscription(tenantId);
402
+ if (catalog) return (await this.answerFor(sub, now, catalog)).limits;
403
+ const answer = await this.answerFor(sub, now, await this.catalogs.current());
404
+ this.writeCache(tenantId, answer.limits, now.getTime(), firstAfter(now, [
405
+ cancellationLandsAt(sub),
406
+ answer.nextBookingEnd
407
+ ]));
408
+ return answer.limits;
409
+ }
410
+ /**
411
+ * What a contract frozen at `now` records as its entitlements: what
412
+ * `computeLimits` would grant with no contract in force, less the add-ons
413
+ * whose cancellation is declared. The contract in force is not read, so a
414
+ * successor can be composed — and shown — before the one it replaces ends.
415
+ *
416
+ * Those are granted until their effective date by the booking rather than
417
+ * by the contract (`mergeSubscriptionBundlesIntoLimits`), so their end
418
+ * needs nobody to write the contract again. Frozen into the snapshot, they
419
+ * would be granted for as long as the contract runs. Never cached, like
420
+ * `computeLimits` with a catalogue.
421
+ */
422
+ async computeContractLimits(tenantId, now, catalog) {
423
+ const sub = await this.requireSubscription(tenantId);
424
+ const { limits, leftOutBundleVersionIds } = await this.answerFor(sub, now, catalog, void 0, {
425
+ freezing: true
426
+ });
427
+ return {
428
+ limits,
429
+ leftOutBundleVersionIds
430
+ };
431
+ }
432
+ /**
433
+ * The features a contract of the tenant covering exactly `bundleVersionIds`
434
+ * records when frozen now, and the plan version they are read from — or
435
+ * `null` where the tenant has no subscription. They are the plan version
436
+ * the subscription is bound to and those add-on versions, each as its row
437
+ * reads today, with the subscription's own arrangement — aliased and
438
+ * filtered the way every grant is.
439
+ *
440
+ * The add-ons are the ones the caller names, not the bookings running now:
441
+ * a vocabulary carried into a contract changes what the add-ons it already
442
+ * covers are called, not which add-ons it covers. Quotas are not asked
443
+ * for, for the same reason.
444
+ */
445
+ async contractFeaturesFor(tenantId, bundleVersionIds, catalog) {
393
446
  const sub = await this.subscriptions.findByTenantId(tenantId);
394
- if (!sub) {
395
- throw new NotFoundException({
396
- code: BILLING_ERROR_CODES.SUBSCRIPTION_NOT_FOUND,
397
- message: `No subscription for tenant ${tenantId}`,
398
- params: {
399
- tenantId
400
- }
401
- });
447
+ if (!sub) return null;
448
+ const features = new Set(sub.planVersion.features);
449
+ for (const id of bundleVersionIds) {
450
+ const version = this.bundles ? await this.bundles.findVersionById(id) : null;
451
+ if (!version) {
452
+ throw new Error(`The contract covers add-on version '${id}', which cannot be read` + (this.bundles ? "." : ": no BundleRepository is configured."));
453
+ }
454
+ for (const feature of version.features) features.add(feature);
402
455
  }
403
- if (catalog) return this.limitsFor(sub, now, catalog);
404
- const limits = await this.limitsFor(sub, now, await this.catalogs.current());
405
- this.writeCache(tenantId, limits, now.getTime(), cancellationLandsAt(sub));
406
- return limits;
456
+ for (const feature of sub.customLimits?.features ?? []) features.add(feature);
457
+ return {
458
+ planVersionId: sub.planVersionId,
459
+ features: this.asGrantable(catalog, {
460
+ plan: sub.plan,
461
+ quotas: {},
462
+ features
463
+ }).features
464
+ };
465
+ }
466
+ /**
467
+ * `features` with every successor a `replaces` declaration carries them to —
468
+ * what a contract holding them is granted beyond its own keys.
469
+ */
470
+ withReplacements(features) {
471
+ return new Set(this.replaceFeatureAliases({
472
+ plan: "",
473
+ quotas: {},
474
+ features: new Set(features)
475
+ }).features);
407
476
  }
408
477
  /**
409
478
  * Clears a tenant's cache entry. MUST be called as soon as a mutation
@@ -423,7 +492,20 @@ var EntitlementService = class {
423
492
  * have a `SubscriptionRecord` (e.g. within a transaction).
424
493
  */
425
494
  async deriveLimits(sub, now, tx) {
426
- return this.limitsFor(sub, now, await this.catalogs.current(), tx);
495
+ return (await this.answerFor(sub, now, await this.catalogs.current(), tx)).limits;
496
+ }
497
+ async requireSubscription(tenantId) {
498
+ const sub = await this.subscriptions.findByTenantId(tenantId);
499
+ if (!sub) {
500
+ throw new NotFoundException({
501
+ code: BILLING_ERROR_CODES.SUBSCRIPTION_NOT_FOUND,
502
+ message: `No subscription for tenant ${tenantId}`,
503
+ params: {
504
+ tenantId
505
+ }
506
+ });
507
+ }
508
+ return sub;
427
509
  }
428
510
  /**
429
511
  * `deriveLimits` against a catalogue already read. The catalogue decides
@@ -431,38 +513,61 @@ var EntitlementService = class {
431
513
  * a caller holds, so that checking a limit does not wait for a second
432
514
  * connection while the subscription row is locked.
433
515
  */
434
- async limitsFor(sub, now, catalog, tx) {
516
+ async answerFor(sub, now, catalog, tx, options = {}) {
435
517
  if (cancellationHasLanded(sub, now)) {
436
518
  const floor = this.resolutionConfig?.canceledEntitlementPlan;
437
519
  if (floor === void 0) {
438
520
  return {
439
- plan: sub.plan,
440
- quotas: {},
441
- features: /* @__PURE__ */ new Set()
521
+ limits: {
522
+ plan: sub.plan,
523
+ quotas: {},
524
+ features: /* @__PURE__ */ new Set()
525
+ },
526
+ nextBookingEnd: null,
527
+ leftOutBundleVersionIds: []
442
528
  };
443
529
  }
444
530
  const floorVersion = await this.findActivePlanVersionOrFallback(floor, now, tx);
445
- return this.asGrantable(catalog, aggregateLimits({
531
+ const limits2 = this.asGrantable(catalog, aggregateLimits({
446
532
  plan: floor,
447
533
  planVersion: floorVersion,
448
534
  subscriptionBundles: [],
449
535
  customLimits: null
450
536
  }, catalog, now));
537
+ return {
538
+ limits: limits2,
539
+ nextBookingEnd: null,
540
+ leftOutBundleVersionIds: []
541
+ };
451
542
  }
452
- const contract = await this.findActiveContract(sub.tenantId, now, tx);
543
+ const bundles = await this.loadSubscriptionBundleSnapshots(sub.id, now, tx);
544
+ const leftOut = options.freezing ? bundles.filter(isCancellationDeclared) : [];
545
+ const counted = bundles.filter((booking) => !leftOut.includes(booking));
546
+ const leftOutBundleVersionIds = leftOut.map((booking) => booking.bundleVersionId);
547
+ const nextBookingEnd = firstAfter(now, counted.map((booking) => booking.canceledEffectiveAt));
548
+ const contract = options.freezing ? null : await this.findActiveContract(sub.tenantId, now, tx);
453
549
  if (contract) {
454
- const bundles = await this.loadSubscriptionBundleSnapshots(sub.id, now, tx);
455
- return this.asGrantable(catalog, mergeSubscriptionBundlesIntoLimits(contractLimits(contract), bundles, contractBundleVersionIds(contract), catalog, now));
550
+ const covered = contractBundleVersionIds(contract);
551
+ const limits2 = this.asGrantable(catalog, mergeSubscriptionBundlesIntoLimits(contractLimits(contract), counted, covered, catalog, now));
552
+ return {
553
+ limits: limits2,
554
+ nextBookingEnd,
555
+ leftOutBundleVersionIds: []
556
+ };
456
557
  }
457
558
  const effectivePlan = resolveEntitlementPlan(sub, this.resolutionConfig ?? {}, now);
458
559
  const planVersion = effectivePlan === sub.plan ? sub.planVersion : await this.findActivePlanVersionOrFallback(effectivePlan, now, tx);
459
- const subscriptionBundles = await this.loadSubscriptionBundleSnapshots(sub.id, now, tx);
460
- return this.asGrantable(catalog, aggregateLimits({
560
+ const limits = this.asGrantable(catalog, aggregateLimits({
461
561
  plan: effectivePlan,
462
562
  planVersion,
463
- subscriptionBundles,
563
+ subscriptionBundles: counted,
464
564
  customLimits: sub.customLimits ?? null
465
565
  }, catalog, now));
566
+ return {
567
+ limits,
568
+ nextBookingEnd,
569
+ leftOutBundleVersionIds
570
+ };
466
571
  }
467
572
  /**
468
573
  * The last thing every path does, so that no path can skip it.
@@ -551,7 +656,7 @@ var EntitlementService = class {
551
656
  }
552
657
  });
553
658
  }
554
- const limits = await this.limitsFor(sub, now, catalog, tx);
659
+ const { limits } = await this.answerFor(sub, now, catalog, tx);
555
660
  const max = limits.quotas[input.dimension];
556
661
  if (max === void 0) {
557
662
  throw new InternalServerErrorException(codedError(BILLING_ERROR_CODES.QUOTA_DIMENSION_UNKNOWN, {
@@ -644,6 +749,15 @@ EntitlementService = _ts_decorate([
644
749
  Object
645
750
  ])
646
751
  ], EntitlementService);
752
+ function firstAfter(now, dates) {
753
+ let first = null;
754
+ for (const date of dates) {
755
+ if (date === null || date <= now) continue;
756
+ if (first === null || date < first) first = date;
757
+ }
758
+ return first;
759
+ }
760
+ __name(firstAfter, "firstAfter");
647
761
 
648
762
  export {
649
763
  SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN,
@@ -651,6 +765,7 @@ export {
651
765
  cancellationHasLanded,
652
766
  cancellationLandsAt,
653
767
  filterActiveSubscriptionBundles,
768
+ isCancellationDeclared,
654
769
  aggregateSubscriptionBundleQuotas,
655
770
  collectSubscriptionBundleFeatures,
656
771
  aggregateContractLineItemEntitlements,
@@ -7,14 +7,17 @@ import {
7
7
  REQUIRE_FEATURE_KEY,
8
8
  loadPlanCatalogFromString,
9
9
  periodEndAfter
10
- } from "./chunk-M47BNEY2.js";
10
+ } from "./chunk-7MLB6T5B.js";
11
11
  import {
12
12
  EnforceMfa
13
13
  } from "./chunk-34XVPR6P.js";
14
+ import {
15
+ AllowDuringMaintenance
16
+ } from "./chunk-TSLGMPGZ.js";
14
17
  import {
15
18
  EntitlementService,
16
19
  isLimitExceededError
17
- } from "./chunk-G6EZWECL.js";
20
+ } from "./chunk-2XBWYMOL.js";
18
21
  import {
19
22
  ENTITLEMENT_SERVICE_TOKEN
20
23
  } from "./chunk-OUDSQ3PU.js";
@@ -613,6 +616,7 @@ function buildPlanCatalogImporterController(guards) {
613
616
  ], GeneratedPlanCatalogImporterController.prototype, "import", null);
614
617
  GeneratedPlanCatalogImporterController = _ts_decorate5([
615
618
  Controller("admin/billing/plan-catalog"),
619
+ AllowDuringMaintenance(),
616
620
  UseGuards(...guards),
617
621
  _ts_param4(0, Inject4(PlanCatalogImporterService)),
618
622
  _ts_metadata4("design:type", Function),
@@ -3,6 +3,9 @@ import {
3
3
  DISCOVERY_SNAPSHOT_PATH_TOKEN,
4
4
  DiscoveryScanner
5
5
  } from "./chunk-JVAEKTJ4.js";
6
+ import {
7
+ AllowDuringMaintenance
8
+ } from "./chunk-TSLGMPGZ.js";
6
9
  import {
7
10
  DISCOVERY_SNAPSHOT_TOKEN
8
11
  } from "./chunk-QUZU2M33.js";
@@ -82,6 +85,7 @@ function buildDiscoveryController(guards) {
82
85
  ], GeneratedDiscoveryController.prototype, "rescanDiscovery", null);
83
86
  GeneratedDiscoveryController = _ts_decorate([
84
87
  Controller("admin"),
88
+ AllowDuringMaintenance(),
85
89
  UseGuards(...guards),
86
90
  _ts_param(0, Inject(DiscoveryScanner)),
87
91
  _ts_metadata("design:type", Function),