@saasicat/nest 0.19.0 → 0.22.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 (59) hide show
  1. package/dist/_entries.cjs +358 -391
  2. package/dist/admin/index.js +2 -1
  3. package/dist/{aggregation-o0LMenvl.d.ts → aggregation-DP5zfKbU.d.ts} +3 -3
  4. package/dist/{aggregation-SKfXu09x.d.cts → aggregation-mZ7WZROK.d.cts} +3 -3
  5. package/dist/billing/index.d.cts +13 -12
  6. package/dist/billing/index.d.ts +13 -12
  7. package/dist/billing/index.js +4 -3
  8. package/dist/catalog/index.d.cts +10 -10
  9. package/dist/catalog/index.d.ts +10 -10
  10. package/dist/catalog/index.js +2 -2
  11. package/dist/{catalog.module-BKObceo0.d.ts → catalog.module-CQr1FpkI.d.ts} +6 -6
  12. package/dist/{catalog.module-Dw2Hrbyu.d.cts → catalog.module-D-_pQDNA.d.cts} +6 -6
  13. package/dist/checkout-offer/index.js +1 -1
  14. package/dist/{chunk-EUU3B6NB.js → chunk-4O6R6ARQ.js} +12 -6
  15. package/dist/{chunk-LXUBCLRK.js → chunk-7X5MSAIL.js} +16 -15
  16. package/dist/{chunk-AFK2IE2L.js → chunk-7ZPFQXHM.js} +1 -1
  17. package/dist/chunk-EBJJNTW6.js +22 -0
  18. package/dist/{chunk-6WA4X5U3.js → chunk-MJ32VNZD.js} +41 -91
  19. package/dist/{chunk-F6DCLVBB.js → chunk-NNNXXUPT.js} +9 -3
  20. package/dist/{chunk-7JIHG53V.js → chunk-SN5UOC43.js} +7 -4
  21. package/dist/{chunk-KUDKD7ZG.js → chunk-UFS344JD.js} +26 -22
  22. package/dist/{chunk-I77VS3YH.js → chunk-UO64MK3Q.js} +18 -24
  23. package/dist/{chunk-QLJHIIOY.js → chunk-VQQWF7MW.js} +7 -3
  24. package/dist/{chunk-ORWIGSNN.js → chunk-XTVAFJ3P.js} +2 -1
  25. package/dist/{define-saasicat-D8c6Bs4T.d.cts → define-saasicat-ByPjtKPy.d.cts} +1 -1
  26. package/dist/{define-saasicat-CqkhnHn-.d.ts → define-saasicat-C99hWAUK.d.ts} +1 -1
  27. package/dist/discovery/index.d.cts +2 -2
  28. package/dist/discovery/index.d.ts +2 -2
  29. package/dist/{enforce-quota.interceptor-Dk0eEtzV.d.cts → enforce-quota.interceptor-BrsU1UYJ.d.cts} +1 -1
  30. package/dist/{enforce-quota.interceptor-Dp8wTYro.d.ts → enforce-quota.interceptor-reO-i71U.d.ts} +1 -1
  31. package/dist/entitlement/index.d.cts +1 -1
  32. package/dist/entitlement/index.d.ts +1 -1
  33. package/dist/entitlement/index.js +2 -1
  34. package/dist/index.d.cts +30 -11
  35. package/dist/index.d.ts +30 -11
  36. package/dist/index.js +14 -10
  37. package/dist/{module-BwD-wAor.d.ts → module-BE17XFLg.d.ts} +1 -1
  38. package/dist/{module-DsDkbawm.d.cts → module-CHMIyWlf.d.cts} +1 -1
  39. package/dist/{plan-versions.service-BB36Q1bg.d.ts → plan-versions.service-B-YoE4SZ.d.ts} +1 -1
  40. package/dist/{plan-versions.service-CUR2Whyr.d.cts → plan-versions.service-_saKzb50.d.cts} +1 -1
  41. package/dist/platform/index.d.cts +11 -11
  42. package/dist/platform/index.d.ts +11 -11
  43. package/dist/platform/index.js +9 -8
  44. package/dist/promo/index.d.cts +3 -3
  45. package/dist/promo/index.d.ts +3 -3
  46. package/dist/promo/index.js +3 -2
  47. package/dist/registration/index.d.cts +1 -1
  48. package/dist/registration/index.d.ts +1 -1
  49. package/dist/registration/index.js +2 -1
  50. package/dist/{saas-platform.module-BQmrDGVU.d.ts → saas-platform.module-DolE41YY.d.ts} +2 -2
  51. package/dist/{saas-platform.module-DducnQ9s.d.cts → saas-platform.module-HCDNZTiE.d.cts} +2 -2
  52. package/dist/{service-DPZ2W1E-.d.cts → service-D48clObR.d.cts} +1 -1
  53. package/dist/{service-DPZ2W1E-.d.ts → service-D48clObR.d.ts} +1 -1
  54. package/dist/{tenant-billing.controller-b1G1yB09.d.ts → tenant-billing.controller-7o4ObzGs.d.ts} +3 -3
  55. package/dist/{tenant-billing.controller-m42YQ_Ei.d.cts → tenant-billing.controller-DubP6-Md.d.cts} +3 -3
  56. package/dist/testing/index.d.cts +6 -6
  57. package/dist/testing/index.d.ts +6 -6
  58. package/dist/testing/index.js +10 -9
  59. package/package.json +3 -3
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PromoCodesService
3
- } from "./chunk-QLJHIIOY.js";
3
+ } from "./chunk-VQQWF7MW.js";
4
4
  import {
5
5
  SubscriptionContractService
6
6
  } from "./chunk-B7NRY2LV.js";
@@ -28,7 +28,7 @@ import {
28
28
  SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN,
29
29
  isLimitExceededError,
30
30
  toEffectiveLimitsSnapshot
31
- } from "./chunk-F6DCLVBB.js";
31
+ } from "./chunk-NNNXXUPT.js";
32
32
  import {
33
33
  PLAN_CATALOG_TOKEN,
34
34
  findPlan,
@@ -38,6 +38,9 @@ import {
38
38
  import {
39
39
  SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN
40
40
  } from "./chunk-NYLON2VC.js";
41
+ import {
42
+ codedError
43
+ } from "./chunk-EBJJNTW6.js";
41
44
  import {
42
45
  ENTITLEMENT_SERVICE_TOKEN
43
46
  } from "./chunk-WKVBNTYC.js";
@@ -253,10 +256,11 @@ var FeatureGuard = class _FeatureGuard {
253
256
  return true;
254
257
  }
255
258
  /**
256
- * Upsell response (#36): with a registered `UpsellOfferResolver` the 403
257
- * becomes machine-readable (`FeatureNotLicensedBody`), so consumer UIs can
258
- * render a purchase offer. Without a resolver the body carries the same
259
- * `code` but no offers.
259
+ * Upsell response (#36): the 403 body is always the full
260
+ * `FeatureNotLicensedBody`, so a consumer that matches on `code` can read
261
+ * `featureKey`/`offers` unconditionally. Without a registered
262
+ * `UpsellOfferResolver` there is simply nothing to offer — `offers` is
263
+ * empty, the same degradation a failing resolver produces.
260
264
  *
261
265
  * Deliberately 403 + `code` field instead of 402 — rationale in
262
266
  * `@saasicat/types` upsell.types.ts (402 is reserved / inconsistently
@@ -267,22 +271,12 @@ var FeatureGuard = class _FeatureGuard {
267
271
  * classify the response by that prefix.
268
272
  */
269
273
  async buildNotLicensedException(required, tenantId) {
270
- const message = `Feature ${required.join(" / ")} is not included in the current plan.`;
271
- if (!this.upsellResolver) {
272
- return new ForbiddenException({
273
- code: FEATURE_NOT_LICENSED,
274
- message,
275
- params: {
276
- featureKeys: required
277
- }
278
- });
279
- }
280
274
  const body = {
281
275
  code: FEATURE_NOT_LICENSED,
282
276
  featureKey: required[0],
283
277
  featureKeys: required,
284
- offers: await this.resolveOffersSafe(required, tenantId),
285
- message
278
+ offers: this.upsellResolver ? await this.resolveOffersSafe(required, tenantId) : [],
279
+ message: `Feature ${required.join(" / ")} is not included in the current plan.`
286
280
  };
287
281
  return new ForbiddenException(body);
288
282
  }
@@ -583,7 +577,7 @@ function _ts_param3(paramIndex, decorator) {
583
577
  }
584
578
  __name(_ts_param3, "_ts_param");
585
579
  var PLAN_CATALOG_IMPORT_SINK_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PlanCatalogImportSink");
586
- var IMPORT_CHANGE_NOTE = "Initial import from saas.yaml (SPEC_V2 \xA711.1 M6 Pack 2c)";
580
+ var IMPORT_CHANGE_NOTE = "Initial import from saas.yaml";
587
581
  var PlanCatalogImporterService = class {
588
582
  static {
589
583
  __name(this, "PlanCatalogImporterService");
@@ -874,7 +868,7 @@ var PublicCatalogController = class {
874
868
  return merged;
875
869
  }
876
870
  /**
877
- * SPEC_V2 §11.1 M6 Pack 2c — public catalog endpoint for bundles
871
+ * — public catalog endpoint for bundles
878
872
  * (stem list with live versions). If a `MarketingProjection` with
879
873
  * `targetType=BUNDLE` + matching locale exists, it is merged in.
880
874
  */
@@ -1912,7 +1906,7 @@ var SubscriptionBundlesService = class {
1912
1906
  }
1913
1907
  if (existing.canceledAt !== null) {
1914
1908
  throw new UnprocessableEntityException({
1915
- code: BILLING_ERROR_CODES3.SUBSCRIPTION_BUNDLE_ALREADY_CANCELED,
1909
+ code: BILLING_ERROR_CODES3.SUBSCRIPTION_BUNDLE_ALREADY_CANCELLED,
1916
1910
  message: `SubscriptionBundle '${input.subscriptionBundleId}' is already cancelled.`,
1917
1911
  params: {
1918
1912
  subscriptionBundleId: input.subscriptionBundleId
@@ -1947,7 +1941,7 @@ var SubscriptionBundlesService = class {
1947
1941
  }
1948
1942
  if (existing.canceledAt === null) {
1949
1943
  throw new UnprocessableEntityException({
1950
- code: BILLING_ERROR_CODES3.SUBSCRIPTION_BUNDLE_NOT_CANCELED,
1944
+ code: BILLING_ERROR_CODES3.SUBSCRIPTION_BUNDLE_NOT_CANCELLED,
1951
1945
  message: `SubscriptionBundle '${subscriptionBundleId}' is not cancelled.`,
1952
1946
  params: {
1953
1947
  subscriptionBundleId
@@ -2910,7 +2904,7 @@ var SubscriptionBundlePreviewService = class {
2910
2904
  const warnings = [];
2911
2905
  if (existing.canceledAt !== null) {
2912
2906
  blockers.push({
2913
- code: "SUBSCRIPTION_BUNDLE_ALREADY_CANCELED",
2907
+ code: BILLING_ERROR_CODES5.SUBSCRIPTION_BUNDLE_ALREADY_CANCELLED,
2914
2908
  message: "This bundle booking is already cancelled."
2915
2909
  });
2916
2910
  }
@@ -3262,7 +3256,7 @@ function buildTenantSubscriptionBundlesController(extraGuards = []) {
3262
3256
  }
3263
3257
  requireSubscriptionPk(sub) {
3264
3258
  if (!sub.id) {
3265
- throw new NotFoundException5("SubscriptionUsageRecord without `id` \u2014 the adapter must return the subscription primary key (see SubscriptionUsageRecord.id).");
3259
+ throw new NotFoundException5(codedError(BILLING_ERROR_CODES6.SUBSCRIPTION_PK_MISSING));
3266
3260
  }
3267
3261
  return sub.id;
3268
3262
  }
@@ -261,7 +261,8 @@ var PromoCodesService = class {
261
261
  code: PROMO_ERROR_CODES.PROMO_CODE_NOT_FOUND,
262
262
  message: "Code not found",
263
263
  params: {
264
- promoCodeId: id
264
+ promoCodeId: id,
265
+ promoCode: null
265
266
  }
266
267
  });
267
268
  }
@@ -305,7 +306,8 @@ var PromoCodesService = class {
305
306
  code: PROMO_ERROR_CODES.PROMO_CODE_NOT_FOUND,
306
307
  message: "Code not found",
307
308
  params: {
308
- promoCodeId: id
309
+ promoCodeId: id,
310
+ promoCode: null
309
311
  }
310
312
  });
311
313
  }
@@ -438,8 +440,10 @@ var PromoCodesService = class {
438
440
  if (!promo || promo.deletedAt) {
439
441
  throw new BadRequestException({
440
442
  code: PROMO_ERROR_CODES.PROMO_CODE_NOT_FOUND,
443
+ // The lookup runs on the code string, so there is no id to report.
441
444
  message: "Code not found",
442
445
  params: {
446
+ promoCodeId: null,
443
447
  promoCode: code
444
448
  }
445
449
  });
@@ -450,7 +454,7 @@ var PromoCodesService = class {
450
454
  code: BILLING_ERROR_CODES.SUBSCRIPTION_NOT_FOUND,
451
455
  message: "Subscription not found",
452
456
  params: {
453
- subscriptionId: input.subscriptionId
457
+ tenantId: input.tenantId
454
458
  }
455
459
  });
456
460
  }
@@ -321,7 +321,8 @@ var CheckoutOfferService = class {
321
321
  message: `Checkout offer '${existing.id}' has expired and cannot be ${action}`,
322
322
  params: {
323
323
  offerId: existing.id,
324
- action
324
+ action,
325
+ validUntil: existing.validUntil ?? null
325
326
  }
326
327
  });
327
328
  }
@@ -3,7 +3,7 @@ import { ExecutionContext } from '@nestjs/common';
3
3
  import { Reflector } from '@nestjs/core';
4
4
  import { SuperAdminProvisioningPort, SetupStatusResponse, SetupRequest, SetupResult, SetupConfirmMfaRequest, SetupConfirmMfaResponse } from '@saasicat/types';
5
5
  import { h as MfaService } from './admin-stats.service-HUZIU448.cjs';
6
- import { f as SaasPlatformModuleOptions } from './saas-platform.module-DducnQ9s.cjs';
6
+ import { f as SaasPlatformModuleOptions } from './saas-platform.module-HCDNZTiE.cjs';
7
7
 
8
8
  /**
9
9
  * Shared metadata key for endpoints that intentionally run without application
@@ -3,7 +3,7 @@ import { ExecutionContext } from '@nestjs/common';
3
3
  import { Reflector } from '@nestjs/core';
4
4
  import { SuperAdminProvisioningPort, SetupStatusResponse, SetupRequest, SetupResult, SetupConfirmMfaRequest, SetupConfirmMfaResponse } from '@saasicat/types';
5
5
  import { h as MfaService } from './admin-stats.service-Db2exT_d.js';
6
- import { f as SaasPlatformModuleOptions } from './saas-platform.module-BQmrDGVU.js';
6
+ import { f as SaasPlatformModuleOptions } from './saas-platform.module-DolE41YY.js';
7
7
 
8
8
  /**
9
9
  * Shared metadata key for endpoints that intentionally run without application
@@ -16,7 +16,7 @@ interface ImplementsCapabilityOptions {
16
16
  /**
17
17
  * Aggregation wrapper: the feature key this capability belongs to.
18
18
  * Bundles are planned exclusively in the SuperAdmin UI and are
19
- * **deliberately not** part of the code decorator (SPEC_V2 §3.1).
19
+ * **deliberately not** part of the code decorator.
20
20
  */
21
21
  feature?: string;
22
22
  /**
@@ -109,7 +109,7 @@ interface ImplementsCapabilityMetadata extends ImplementsCapabilityOptions {
109
109
  * - `status` controls visibility/lifecycle (default `active`).
110
110
  * - `kind` declares the implementation kind (default `endpoint`).
111
111
  *
112
- * **Bundles are deliberately NOT declared in the decorator** (SPEC_V2 §3.1).
112
+ * **Bundles are deliberately NOT declared in the decorator**.
113
113
  * They are created exclusively in the SuperAdmin UI (DB table `bundles`),
114
114
  * by the admin grouping features there.
115
115
  *
@@ -16,7 +16,7 @@ interface ImplementsCapabilityOptions {
16
16
  /**
17
17
  * Aggregation wrapper: the feature key this capability belongs to.
18
18
  * Bundles are planned exclusively in the SuperAdmin UI and are
19
- * **deliberately not** part of the code decorator (SPEC_V2 §3.1).
19
+ * **deliberately not** part of the code decorator.
20
20
  */
21
21
  feature?: string;
22
22
  /**
@@ -109,7 +109,7 @@ interface ImplementsCapabilityMetadata extends ImplementsCapabilityOptions {
109
109
  * - `status` controls visibility/lifecycle (default `active`).
110
110
  * - `kind` declares the implementation kind (default `endpoint`).
111
111
  *
112
- * **Bundles are deliberately NOT declared in the decorator** (SPEC_V2 §3.1).
112
+ * **Bundles are deliberately NOT declared in the decorator**.
113
113
  * They are created exclusively in the SuperAdmin UI (DB table `bundles`),
114
114
  * by the admin grouping features there.
115
115
  *
@@ -2,7 +2,7 @@ import { CanActivate, ExecutionContext, NestInterceptor, CallHandler } from '@ne
2
2
  import { Reflector } from '@nestjs/core';
3
3
  import { Observable } from 'rxjs';
4
4
  import { PlanCatalog, QuotaProvider } from '@saasicat/types';
5
- import { p as PlanResolverPort } from './saas-platform.module-DducnQ9s.cjs';
5
+ import { p as PlanResolverPort } from './saas-platform.module-HCDNZTiE.cjs';
6
6
 
7
7
  interface StaticEntitlementSnapshot {
8
8
  planId: string | null;
@@ -2,7 +2,7 @@ import { CanActivate, ExecutionContext, NestInterceptor, CallHandler } from '@ne
2
2
  import { Reflector } from '@nestjs/core';
3
3
  import { Observable } from 'rxjs';
4
4
  import { PlanCatalog, QuotaProvider } from '@saasicat/types';
5
- import { p as PlanResolverPort } from './saas-platform.module-BQmrDGVU.js';
5
+ import { p as PlanResolverPort } from './saas-platform.module-DolE41YY.js';
6
6
 
7
7
  interface StaticEntitlementSnapshot {
8
8
  planId: string | null;
@@ -1,4 +1,4 @@
1
- export { C as CustomLimitsShape, E as EffectiveLimits, a as EffectiveLimitsSnapshot, b as EnforceLimitInput, c as EntitlementService, P as PlanVersionSnapshot, S as SubscriptionBundleSnapshot, d as SubscriptionLimitsInput, e as aggregateContractLineItemEntitlements, f as aggregateLimits, g as aggregateSubscriptionBundleQuotas, h as applyCustomLimits, i as collectSubscriptionBundleFeatures, j as contractBundleVersionIds, k as contractLimits, l as filterActiveSubscriptionBundles, m as filterPlannedOnlyFeatures, n as hasAnyFeature, o as hasFeature, p as mergeSubscriptionBundlesIntoLimits, t as toEffectiveLimitsSnapshot } from '../aggregation-SKfXu09x.cjs';
1
+ export { C as CustomLimitsShape, E as EffectiveLimits, a as EffectiveLimitsSnapshot, b as EnforceLimitInput, c as EntitlementService, P as PlanVersionSnapshot, S as SubscriptionBundleSnapshot, d as SubscriptionLimitsInput, e as aggregateContractLineItemEntitlements, f as aggregateLimits, g as aggregateSubscriptionBundleQuotas, h as applyCustomLimits, i as collectSubscriptionBundleFeatures, j as contractBundleVersionIds, k as contractLimits, l as filterActiveSubscriptionBundles, m as filterPlannedOnlyFeatures, n as hasAnyFeature, o as hasFeature, p as mergeSubscriptionBundlesIntoLimits, t as toEffectiveLimitsSnapshot } from '../aggregation-mZ7WZROK.cjs';
2
2
  import { DiscoveredFeature, SubscriptionRepository, PlanVersionRepository, TransactionRunner, SubscriptionContractRepository, SubscriptionBundleRepository, BundleRepository } from '@saasicat/types';
3
3
  import { E as EntitlementResolutionConfig } from '../plan-resolution-CFCoUkrE.cjs';
4
4
  export { a as EntitlementResolutionInput, r as resolveEntitlementPlan } from '../plan-resolution-CFCoUkrE.cjs';
@@ -1,4 +1,4 @@
1
- export { C as CustomLimitsShape, E as EffectiveLimits, a as EffectiveLimitsSnapshot, b as EnforceLimitInput, c as EntitlementService, P as PlanVersionSnapshot, S as SubscriptionBundleSnapshot, d as SubscriptionLimitsInput, e as aggregateContractLineItemEntitlements, f as aggregateLimits, g as aggregateSubscriptionBundleQuotas, h as applyCustomLimits, i as collectSubscriptionBundleFeatures, j as contractBundleVersionIds, k as contractLimits, l as filterActiveSubscriptionBundles, m as filterPlannedOnlyFeatures, n as hasAnyFeature, o as hasFeature, p as mergeSubscriptionBundlesIntoLimits, t as toEffectiveLimitsSnapshot } from '../aggregation-o0LMenvl.js';
1
+ export { C as CustomLimitsShape, E as EffectiveLimits, a as EffectiveLimitsSnapshot, b as EnforceLimitInput, c as EntitlementService, P as PlanVersionSnapshot, S as SubscriptionBundleSnapshot, d as SubscriptionLimitsInput, e as aggregateContractLineItemEntitlements, f as aggregateLimits, g as aggregateSubscriptionBundleQuotas, h as applyCustomLimits, i as collectSubscriptionBundleFeatures, j as contractBundleVersionIds, k as contractLimits, l as filterActiveSubscriptionBundles, m as filterPlannedOnlyFeatures, n as hasAnyFeature, o as hasFeature, p as mergeSubscriptionBundlesIntoLimits, t as toEffectiveLimitsSnapshot } from '../aggregation-DP5zfKbU.js';
2
2
  import { DiscoveredFeature, SubscriptionRepository, PlanVersionRepository, TransactionRunner, SubscriptionContractRepository, SubscriptionBundleRepository, BundleRepository } from '@saasicat/types';
3
3
  import { E as EntitlementResolutionConfig } from '../plan-resolution-CFCoUkrE.js';
4
4
  export { a as EntitlementResolutionInput, r as resolveEntitlementPlan } from '../plan-resolution-CFCoUkrE.js';
@@ -19,9 +19,10 @@ import {
19
19
  mergeSubscriptionBundlesIntoLimits,
20
20
  resolveEntitlementPlan,
21
21
  toEffectiveLimitsSnapshot
22
- } from "../chunk-F6DCLVBB.js";
22
+ } from "../chunk-NNNXXUPT.js";
23
23
  import "../chunk-DQKCK7DX.js";
24
24
  import "../chunk-NYLON2VC.js";
25
+ import "../chunk-EBJJNTW6.js";
25
26
  import {
26
27
  ENTITLEMENT_RESOLUTION_CONFIG_TOKEN,
27
28
  ENTITLEMENT_SERVICE_TOKEN,
package/dist/index.d.cts CHANGED
@@ -1,29 +1,29 @@
1
1
  export { P as ProviderSpec, a as asProvider } from './di-CcNeq9v-.cjs';
2
- import { S as SetupService } from './define-saasicat-D8c6Bs4T.cjs';
3
- export { a as SAASICAT_PUBLIC_ROUTE_KEY, b as SETUP_CONFIG_TOKEN, c as SETUP_PROVISIONING_PORT_TOKEN, d as SaaSiCatPublicRoute, e as SetupConfig, f as defineSaaSiCat, i as isSaaSiCatPublicRoute } from './define-saasicat-D8c6Bs4T.cjs';
2
+ import { S as SetupService } from './define-saasicat-ByPjtKPy.cjs';
3
+ export { a as SAASICAT_PUBLIC_ROUTE_KEY, b as SETUP_CONFIG_TOKEN, c as SETUP_PROVISIONING_PORT_TOKEN, d as SaaSiCatPublicRoute, e as SetupConfig, f as defineSaaSiCat, i as isSaaSiCatPublicRoute } from './define-saasicat-ByPjtKPy.cjs';
4
4
  export { CreatePromoCodeDto, PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN, PROMO_CODE_REPOSITORY_TOKEN, PROMO_CODE_VALIDATION_LOG_REPOSITORY_TOKEN, PROMO_FIRST_TIME_CUSTOMER_CHECK_TOKEN, PROMO_REVENUE_DEDUCTION_AGGREGATOR_TOKEN, PROMO_SERVICE_CONFIG_TOKEN, PROMO_SUBSCRIPTION_LOOKUP_TOKEN, PROMO_TRANSACTION_RUNNER_TOKEN, PreviewPromoCodeDto, PromoCodeExpirer, PromoCodeForCalc, PromoCodePublicController, UpdatePromoCodeDto, addCycles, buildLabel, buildPromoCodeAdminController, computeDiscountGross, computeDiscountedGross, computeIncludedVat, computeRegularStartsAt, grossFromNet, round2 } from './promo/index.cjs';
5
- export { P as PreviewInput, a as PreviewInvalid, b as PreviewReason, c as PreviewResult, d as PreviewValid, e as PromoCodeStats, f as PromoCodesService, g as PromoServiceConfig, R as RedeemInput } from './service-DPZ2W1E-.cjs';
5
+ export { a as PreviewInput, b as PreviewInvalid, c as PreviewReason, d as PreviewResult, e as PreviewValid, f as PromoCodeStats, g as PromoCodesService, P as PromoServiceConfig, R as RedeemInput } from './service-D48clObR.cjs';
6
6
  export { P as PromoCodeRateLimitGuard, h as hashIp, i as ipFingerprint } from './rate-limit.guard-dntqAlfZ.cjs';
7
- export { P as PromoCodesModule, a as PromoCodesModuleOptions } from './module-DsDkbawm.cjs';
7
+ export { P as PromoCodesModule, a as PromoCodesModuleOptions } from './module-CHMIyWlf.cjs';
8
8
  export { AjvErrorLike, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_UI_REGISTRY_TOKEN, FeatureGuard, FeatureGuardConfig, LimitExceededFilter, LoadPlanCatalogOptions, MarketingFields, NextPeriodWindow, PLAN_CATALOG_IMPORT_SINK_TOKEN, PLAN_CATALOG_READ_SINK_TOKEN, PLAN_CATALOG_TOKEN, PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN, PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN, PUBLIC_CATALOG_PROJECT_KEY_TOKEN, PeriodRollInput, PlanCatalogBuildSettings, PlanCatalogImportDto, PlanCatalogImporterControllerConfig, PlanCatalogImporterModule, PlanCatalogImporterModuleOptions, PlanCatalogImporterService, PlanCatalogModule, PlanCatalogModuleOptions, PlanCatalogValidationError, PlanResponseEntry, PublicBundleEntry, PublicCatalogController, PublicCatalogModule, PublicCatalogModuleOptions, PublishValidationError, PublishablePlanVersion, REQUIRE_FEATURE_KEY, RenewalDecision, RenewalSubInput, RequireFeature, SUBSCRIPTION_BUNDLE_CONFIG_TOKEN, SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN, SubscriptionContractFreezeService, UPSELL_OFFER_CURRENCY_TOKEN, UPSELL_OFFER_RESOLVER_TOKEN, assertBaseVersionFresh, assertChangeNote, assertDraftPublishable, assertOptimisticLockHeld, buildPlanCatalogFromSnapshot, buildPlanCatalogImporterController, buildTenantSubscriptionBundlesController, clearPendingPlanVersionFields, computeCarriedTrialEndsAt, computeNextPeriod, decideRenewal, findPlan, getActiveFeatureKeys, getMarketedPlans, getPlanOrThrow, getPlanPriceGross, getPlanPriceNet, getPlanQuota, initialPeriodWindow, isFeatureInPlan, isFeaturePlannedOnly, loadPlanCatalogFromFile, loadPlanCatalogFromString, periodEndAfter, periodEndWithMinLead } from './billing/index.cjs';
9
- import { SetupStatusResponse, SetupResult, SetupConfirmMfaResponse } from '@saasicat/types';
9
+ import { SetupStatusResponse, SetupResult, SetupConfirmMfaResponse, PlatformErrorCode, PlatformErrorBody } from '@saasicat/types';
10
10
  export { BundleVersionFields, ChangeDirection, DiffResult, DiscoveredCapability, DiscoveredFeature, DiscoveredQuota, DiscoverySnapshot, PasswordHasher, PlanVersionFields, VersionChange, VersionChangeDirection, classifyBundleVersionDiff, classifyPlanDiff } from '@saasicat/types';
11
11
  export { A as AUDIT_CONTEXT_RESOLVER_TOKEN, a as AuditContextResolver, b as AuthGuardList, C as CONTRACT_FREEZE_PORT_TOKEN, c as CONTRACT_FREEZE_PROJECT_KEY_TOKEN, d as CONTRACT_FREEZE_SOURCE_PORT_TOKEN, e as ContractFreezeBundleSnapshot, f as ContractFreezePort, g as ContractFreezeSourcePort, D as DuePendingPlanChange, P as PENDING_PLAN_QUERY_PORT_TOKEN, h as PendingPlanQueryPort, S as SELF_SERVICE_BLOCKED_BUNDLES_TOKEN, i as SELF_SERVICE_BLOCKED_PLANS_TOKEN, j as SUBSCRIPTION_USAGE_PORT_TOKEN, k as SUBSCRIPTION_WRITE_PORT_TOKEN, l as SelfServiceBlockedBundles, m as SelfServiceBlockedPlans, n as SubscriptionBundleControllerOptions, o as SubscriptionBundleModule, p as SubscriptionBundleModuleOptions, T as TENANT_AUTH_GUARDS_TOKEN, q as TENANT_ID_RESOLVER_TOKEN, r as TRIAL_PROJECTION_PORT_TOKEN, s as TenantBillingModule, t as TenantBillingModuleOptions, u as TenantIdResolver, v as TrialProjectionInput, w as TrialProjectionPort, U as USAGE_SNAPSHOT_PORT_TOKEN, x as USER_EMAIL_RESOLVER_TOKEN, y as USER_ID_RESOLVER_TOKEN, z as UserEmailResolver, B as UserIdResolver } from './subscription-bundles.module-DCpV-Pb5.cjs';
12
- export { A as AddBundleToSubscriptionInput, B as BundlePreviewSnapshot, C as CancelBundleFromSubscriptionInput, a as CancelSubscriptionDto, b as ChangePlanDto, c as CompleteOnboardingSubscriptionDto, d as ComposedTenantAuthGuard, L as LimitsCheckRow, P as PendingPlanMaterializationService, e as PlanChangeContext, f as PlanChangePreviewDto, g as PlanChangePreviewIssue, h as PlanChangePreviewService, i as PlanChangeType, j as PlanSnapshotDto, k as PreviewPlanChangeDto, l as ProrationDto, m as ProrationInput, R as RedundantFeatureHint, S as SubscriptionBundleAddPreviewDto, n as SubscriptionBundleCancelPreviewDto, o as SubscriptionBundleConfig, p as SubscriptionBundlePreviewContext, q as SubscriptionBundlePreviewIssue, r as SubscriptionBundlePreviewService, s as SubscriptionBundlesService, T as TenantAdminGuard, t as TenantBillingController, U as UsageResponse, u as addMonths, v as computeProration, w as resolveBundleCancelEffectiveAt, x as resolveBundlePriceNet } from './tenant-billing.controller-m42YQ_Ei.cjs';
13
- export { C as CustomLimitsShape, E as EffectiveLimits, a as EffectiveLimitsSnapshot, b as EnforceLimitInput, c as EntitlementService, P as PlanVersionSnapshot, S as SubscriptionBundleSnapshot, d as SubscriptionLimitsInput, e as aggregateContractLineItemEntitlements, f as aggregateLimits, g as aggregateSubscriptionBundleQuotas, h as applyCustomLimits, i as collectSubscriptionBundleFeatures, j as contractBundleVersionIds, k as contractLimits, l as filterActiveSubscriptionBundles, m as filterPlannedOnlyFeatures, n as hasAnyFeature, o as hasFeature, p as mergeSubscriptionBundlesIntoLimits, t as toEffectiveLimitsSnapshot } from './aggregation-SKfXu09x.cjs';
12
+ export { A as AddBundleToSubscriptionInput, B as BundlePreviewSnapshot, C as CancelBundleFromSubscriptionInput, a as CancelSubscriptionDto, b as ChangePlanDto, c as CompleteOnboardingSubscriptionDto, d as ComposedTenantAuthGuard, L as LimitsCheckRow, P as PendingPlanMaterializationService, e as PlanChangeContext, f as PlanChangePreviewDto, g as PlanChangePreviewIssue, h as PlanChangePreviewService, i as PlanChangeType, j as PlanSnapshotDto, k as PreviewPlanChangeDto, l as ProrationDto, m as ProrationInput, R as RedundantFeatureHint, S as SubscriptionBundleAddPreviewDto, n as SubscriptionBundleCancelPreviewDto, o as SubscriptionBundleConfig, p as SubscriptionBundlePreviewContext, q as SubscriptionBundlePreviewIssue, r as SubscriptionBundlePreviewService, s as SubscriptionBundlesService, T as TenantAdminGuard, t as TenantBillingController, U as UsageResponse, u as addMonths, v as computeProration, w as resolveBundleCancelEffectiveAt, x as resolveBundlePriceNet } from './tenant-billing.controller-DubP6-Md.cjs';
13
+ export { C as CustomLimitsShape, E as EffectiveLimits, a as EffectiveLimitsSnapshot, b as EnforceLimitInput, c as EntitlementService, P as PlanVersionSnapshot, S as SubscriptionBundleSnapshot, d as SubscriptionLimitsInput, e as aggregateContractLineItemEntitlements, f as aggregateLimits, g as aggregateSubscriptionBundleQuotas, h as applyCustomLimits, i as collectSubscriptionBundleFeatures, j as contractBundleVersionIds, k as contractLimits, l as filterActiveSubscriptionBundles, m as filterPlannedOnlyFeatures, n as hasAnyFeature, o as hasFeature, p as mergeSubscriptionBundlesIntoLimits, t as toEffectiveLimitsSnapshot } from './aggregation-mZ7WZROK.cjs';
14
14
  export { ENTITLEMENT_RESOLUTION_CONFIG_TOKEN, ENTITLEMENT_SERVICE_TOKEN, EntitlementModule, EntitlementModuleOptions, LimitExceededError, PLAN_VERSION_REPOSITORY_TOKEN, ReplacedByIndex, SUBSCRIPTION_REPOSITORY_TOKEN, TRANSACTION_RUNNER_TOKEN, buildReplacedByIndex, expandReplacedFeatures, isLimitExceededError } from './entitlement/index.cjs';
15
15
  export { E as EntitlementResolutionConfig, a as EntitlementResolutionInput, r as resolveEntitlementPlan } from './plan-resolution-CFCoUkrE.cjs';
16
16
  export { ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN, AUDIT_PORT_TOKEN, AUDIT_STATS_PORT_TOKEN, AdminPublicBootController, AdminStatsController, MFA_PORT_TOKEN, PLATFORM_CORE_MANIFEST_CONTRIBUTION, PROMO_CODE_STATS_PORT_TOKEN, RLS_BYPASS_PORT_TOKEN, SUBSCRIPTION_STATS_PORT_TOKEN, buildAdminStatsController } from './admin/index.cjs';
17
17
  export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions, f as AdminStatsService, g as AdminStatsSnapshot, 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-HUZIU448.cjs';
18
18
  export { A as AdminAuditService } from './admin-audit.service-9IqXMlZm.cjs';
19
19
  export { A as ADMIN_MANIFEST_CONFIG, a as ADMIN_RESOURCES_PORT_TOKEN, b as AdminManifestConfig, c as AdminResourcesModule, d as AdminResourcesModuleOptions, e as AdminResourcesService, f as AdminStatsModule, g as AdminStatsModuleOptions, S as SuspendTenantDto } from './admin-resources.module-DGgGSdzN.cjs';
20
- export { S as SaaSiCatModule, a as SaasPlatformAdapters, b as SaasPlatformAdminResourcesOptions, c as SaasPlatformAdminStatsOptions, d as SaasPlatformCatalogOptions, e as SaasPlatformCheckoutOfferOptions, S as SaasPlatformModule, f as SaasPlatformModuleOptions, g as SaasPlatformPromoCodesOptions, h as SaasPlatformSetupOptions, i as SaasPlatformSubscriptionBundlesOptions, j as SaasPlatformSubscriptionContractOptions, k as SaasPlatformTenantAuthGuards, l as SaasPlatformTenantBillingOptions, m as SetupModule, n as SetupModuleOptions } from './saas-platform.module-DducnQ9s.cjs';
20
+ export { S as SaaSiCatModule, a as SaasPlatformAdapters, b as SaasPlatformAdminResourcesOptions, c as SaasPlatformAdminStatsOptions, d as SaasPlatformCatalogOptions, e as SaasPlatformCheckoutOfferOptions, S as SaasPlatformModule, f as SaasPlatformModuleOptions, g as SaasPlatformPromoCodesOptions, h as SaasPlatformSetupOptions, i as SaasPlatformSubscriptionBundlesOptions, j as SaasPlatformSubscriptionContractOptions, k as SaasPlatformTenantAuthGuards, l as SaasPlatformTenantBillingOptions, m as SetupModule, n as SetupModuleOptions } from './saas-platform.module-HCDNZTiE.cjs';
21
21
  export { ACTIVATION_ORCHESTRATOR_TOKEN, BaseIpRateLimitGuard, ContinueRegistrationDto, PASSWORD_HASHER_TOKEN, PAYMENT_EVENT_LOG_TOKEN, PAYMENT_PROVIDER_TOKEN, PENDING_REGISTRATION_REPOSITORY_TOKEN, PLAN_CATALOG_LOOKUP_TOKEN, PaymentWebhookDto, PendingRegistrationService, PreviewRegistrationPromoDto, PromoEvaluation, REGISTRATION_AUDIT_LOGGER_TOKEN, REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN, REGISTRATION_CONFIG_TOKEN, REGISTRATION_OTP_DELIVERY_TOKEN, REGISTRATION_PROMO_PREVIEW_TOKEN, REGISTRATION_RESUME_BASE_URL_TOKEN, REGISTRATION_RESUME_DELIVERY_TOKEN, REGISTRATION_RESUME_TOKEN_SIGNER_TOKEN, RegisterStartDto, RegistrationCleanupCron, RegistrationModule, RegistrationModuleOptions, ResendRegistrationOtpDto, SLUG_AVAILABILITY_CHECK_TOKEN, SaveRegistrationConfigDto, SaveRegistrationConfigSelectionDto, SelectRegistrationPlanDto, StartRegistrationCheckoutDto, USER_ACCOUNT_LOOKUP_TOKEN, VerifyRegistrationOtpDto, computeBreakdown, generateOtpCode, hashOtpCode, resolveModel, slugify, verifyOtpCode } from './registration/index.cjs';
22
22
  export { DEFINES_QUOTA_KEY, DISCOVERY_SNAPSHOT_TOKEN, DefinesQuota, DefinesQuotaOptions, DiscoveryControllerConfig, DiscoveryModule, DiscoveryModuleOptions, DiscoverySnapshotNotFoundError, ENFORCE_QUOTA_KEY, EnforceQuota, EnforceQuotaMetadata, EnforceQuotaOptions, HeadlessScanOptions, IMPLEMENTS_CAPABILITY_KEY, ImplementsCapability, ImplementsCapabilityMetadata, ImplementsCapabilityOptions, REQUIRES_CAPABILITY_KEY, RequiresCapability, RequiresCapabilityKeys, buildDiscoveryController, loadDiscoverySnapshotFromFile, runHeadlessDiscoveryScan } from './discovery/index.cjs';
23
23
  export { D as DISCOVERY_APP_INFO_TOKEN, a as DISCOVERY_SNAPSHOT_PATH_TOKEN, b as DiscoveryAppInfo, c as DiscoveryScanner, d as computeSnapshotHash } from './discovery.scanner-DLgEvuoy.cjs';
24
- export { B as BundlesService, C as CatalogEntriesService, a as CatalogServiceConfig, M as MarketingProjectionsService, b as MarketingSettingsService, P as PlanVersionsService, c as PlansService, d as PromotionsService, e as PublicMarketingCatalogService } from './plan-versions.service-CUR2Whyr.cjs';
24
+ export { B as BundlesService, C as CatalogEntriesService, a as CatalogServiceConfig, M as MarketingProjectionsService, b as MarketingSettingsService, P as PlanVersionsService, c as PlansService, d as PromotionsService, e as PublicMarketingCatalogService } from './plan-versions.service-_saKzb50.cjs';
25
25
  export { ADVISORY_STRICT_MODE_CODES, BUNDLE_REPOSITORY_TOKEN, CATALOG_ENTRY_REPOSITORY_TOKEN, CATALOG_SERVICE_CONFIG_TOKEN, CreateBundleDto, CreateBundleVersionDraftDto, CreateMarketingProjectionDto, CreatePlanDto, CreatePlanVersionDraftDto, CreatePromotionDto, ListCatalogEntriesQueryDto, ListMarketingProjectionsQueryDto, ListMarketingSettingsQueryDto, ListPromotionsQueryDto, MARKETING_PROJECTION_REPOSITORY_TOKEN, MARKETING_SETTINGS_REPOSITORY_TOKEN, PLAN_REPOSITORY_TOKEN, PROMOTION_REPOSITORY_TOKEN, PreflightFinding, PreflightInput, PreflightReport, PublishBundleVersionDto, PublishPlanVersionDto, ReviewCatalogEntryDto, SeedBundleDraft, SeedGateFinding, SeedGateInput, SeedGateMode, SeedGateReport, SeedGateRunOptions, SeedPlanDraft, SyncDiscoveryDto, UpdateBundleDto, UpdateBundleVersionDraftDto, UpdateCatalogEntryI18nDto, UpdateMarketingProjectionDto, UpdateMarketingSettingsDto, UpdatePlanDto, UpdatePlanVersionDraftDto, UpdatePromotionDto, blockingStrictModeWarnings, buildBundleVersionsController, buildBundlesController, buildCatalogEntriesController, buildMarketingProjectionsController, buildMarketingSettingsController, buildPlanVersionsController, buildPlansController, buildPromotionsController, buildPublicMarketingCatalogController, featureApprovalSignature, formatPreflightReport, formatSeedGateReport, loadApprovedCatalogKeys, preflightExitCode, quotaApprovalSignature, runPreflight, runSeedGateFromFile, seedGateExitCode, validateBundleDraft, validatePlanDraft, validateSeedAgainstSnapshot } from './catalog/index.cjs';
26
- export { C as CatalogControllerConfig, a as CatalogModule, b as CatalogModuleOptions } from './catalog.module-Dw2Hrbyu.cjs';
26
+ export { C as CatalogControllerConfig, a as CatalogModule, b as CatalogModuleOptions } from './catalog.module-D-_pQDNA.cjs';
27
27
  export { C as CheckoutOfferService } from './checkout-offer.service-BX51dljL.cjs';
28
28
  export { CHECKOUT_OFFER_REPOSITORY_TOKEN, CreateCheckoutOfferDto, UpdateCheckoutOfferDto, buildCheckoutOfferController } from './checkout-offer/index.cjs';
29
29
  export { C as CheckoutOfferControllerConfig, a as CheckoutOfferModule, b as CheckoutOfferModuleOptions } from './checkout-offer.module-DmlpPevf.cjs';
@@ -53,4 +53,23 @@ declare class SetupController {
53
53
  confirm(dto: SetupConfirmMfaDto): Promise<SetupConfirmMfaResponse>;
54
54
  }
55
55
 
56
- export { SetupController, SetupService };
56
+ /**
57
+ * Builds the body of a coded exception.
58
+ *
59
+ * `PlatformErrorBody` declares `message` as required, but a throw site that
60
+ * passes only `{ code }` produces a body without one — NestJS hands an object
61
+ * argument through verbatim. A consumer typing the response then reads
62
+ * `undefined` where a string was promised, and `body.message.includes(...)`
63
+ * throws. Deriving the message from the shipped English catalogue closes that
64
+ * gap, and keeps the fallback text identical to the shipped default by
65
+ * construction.
66
+ *
67
+ * Use it wherever there is no reason to word the message differently from the
68
+ * catalogue:
69
+ *
70
+ * throw new BadRequestException(codedError(REGISTRATION_ERROR_CODES.OTP_INVALID));
71
+ * throw new NotFoundException(codedError(BILLING_ERROR_CODES.TENANT_NOT_FOUND, { slug }));
72
+ */
73
+ declare function codedError(code: PlatformErrorCode, params?: Record<string, unknown>): PlatformErrorBody;
74
+
75
+ export { SetupController, SetupService, codedError };
package/dist/index.d.ts CHANGED
@@ -1,29 +1,29 @@
1
1
  export { P as ProviderSpec, a as asProvider } from './di-CcNeq9v-.js';
2
- import { S as SetupService } from './define-saasicat-CqkhnHn-.js';
3
- export { a as SAASICAT_PUBLIC_ROUTE_KEY, b as SETUP_CONFIG_TOKEN, c as SETUP_PROVISIONING_PORT_TOKEN, d as SaaSiCatPublicRoute, e as SetupConfig, f as defineSaaSiCat, i as isSaaSiCatPublicRoute } from './define-saasicat-CqkhnHn-.js';
2
+ import { S as SetupService } from './define-saasicat-C99hWAUK.js';
3
+ export { a as SAASICAT_PUBLIC_ROUTE_KEY, b as SETUP_CONFIG_TOKEN, c as SETUP_PROVISIONING_PORT_TOKEN, d as SaaSiCatPublicRoute, e as SetupConfig, f as defineSaaSiCat, i as isSaaSiCatPublicRoute } from './define-saasicat-C99hWAUK.js';
4
4
  export { CreatePromoCodeDto, PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN, PROMO_CODE_REPOSITORY_TOKEN, PROMO_CODE_VALIDATION_LOG_REPOSITORY_TOKEN, PROMO_FIRST_TIME_CUSTOMER_CHECK_TOKEN, PROMO_REVENUE_DEDUCTION_AGGREGATOR_TOKEN, PROMO_SERVICE_CONFIG_TOKEN, PROMO_SUBSCRIPTION_LOOKUP_TOKEN, PROMO_TRANSACTION_RUNNER_TOKEN, PreviewPromoCodeDto, PromoCodeExpirer, PromoCodeForCalc, PromoCodePublicController, UpdatePromoCodeDto, addCycles, buildLabel, buildPromoCodeAdminController, computeDiscountGross, computeDiscountedGross, computeIncludedVat, computeRegularStartsAt, grossFromNet, round2 } from './promo/index.js';
5
- export { P as PreviewInput, a as PreviewInvalid, b as PreviewReason, c as PreviewResult, d as PreviewValid, e as PromoCodeStats, f as PromoCodesService, g as PromoServiceConfig, R as RedeemInput } from './service-DPZ2W1E-.js';
5
+ export { a as PreviewInput, b as PreviewInvalid, c as PreviewReason, d as PreviewResult, e as PreviewValid, f as PromoCodeStats, g as PromoCodesService, P as PromoServiceConfig, R as RedeemInput } from './service-D48clObR.js';
6
6
  export { P as PromoCodeRateLimitGuard, h as hashIp, i as ipFingerprint } from './rate-limit.guard-dntqAlfZ.js';
7
- export { P as PromoCodesModule, a as PromoCodesModuleOptions } from './module-BwD-wAor.js';
7
+ export { P as PromoCodesModule, a as PromoCodesModuleOptions } from './module-BE17XFLg.js';
8
8
  export { AjvErrorLike, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_UI_REGISTRY_TOKEN, FeatureGuard, FeatureGuardConfig, LimitExceededFilter, LoadPlanCatalogOptions, MarketingFields, NextPeriodWindow, PLAN_CATALOG_IMPORT_SINK_TOKEN, PLAN_CATALOG_READ_SINK_TOKEN, PLAN_CATALOG_TOKEN, PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN, PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN, PUBLIC_CATALOG_PROJECT_KEY_TOKEN, PeriodRollInput, PlanCatalogBuildSettings, PlanCatalogImportDto, PlanCatalogImporterControllerConfig, PlanCatalogImporterModule, PlanCatalogImporterModuleOptions, PlanCatalogImporterService, PlanCatalogModule, PlanCatalogModuleOptions, PlanCatalogValidationError, PlanResponseEntry, PublicBundleEntry, PublicCatalogController, PublicCatalogModule, PublicCatalogModuleOptions, PublishValidationError, PublishablePlanVersion, REQUIRE_FEATURE_KEY, RenewalDecision, RenewalSubInput, RequireFeature, SUBSCRIPTION_BUNDLE_CONFIG_TOKEN, SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN, SubscriptionContractFreezeService, UPSELL_OFFER_CURRENCY_TOKEN, UPSELL_OFFER_RESOLVER_TOKEN, assertBaseVersionFresh, assertChangeNote, assertDraftPublishable, assertOptimisticLockHeld, buildPlanCatalogFromSnapshot, buildPlanCatalogImporterController, buildTenantSubscriptionBundlesController, clearPendingPlanVersionFields, computeCarriedTrialEndsAt, computeNextPeriod, decideRenewal, findPlan, getActiveFeatureKeys, getMarketedPlans, getPlanOrThrow, getPlanPriceGross, getPlanPriceNet, getPlanQuota, initialPeriodWindow, isFeatureInPlan, isFeaturePlannedOnly, loadPlanCatalogFromFile, loadPlanCatalogFromString, periodEndAfter, periodEndWithMinLead } from './billing/index.js';
9
- import { SetupStatusResponse, SetupResult, SetupConfirmMfaResponse } from '@saasicat/types';
9
+ import { SetupStatusResponse, SetupResult, SetupConfirmMfaResponse, PlatformErrorCode, PlatformErrorBody } from '@saasicat/types';
10
10
  export { BundleVersionFields, ChangeDirection, DiffResult, DiscoveredCapability, DiscoveredFeature, DiscoveredQuota, DiscoverySnapshot, PasswordHasher, PlanVersionFields, VersionChange, VersionChangeDirection, classifyBundleVersionDiff, classifyPlanDiff } from '@saasicat/types';
11
11
  export { A as AUDIT_CONTEXT_RESOLVER_TOKEN, a as AuditContextResolver, b as AuthGuardList, C as CONTRACT_FREEZE_PORT_TOKEN, c as CONTRACT_FREEZE_PROJECT_KEY_TOKEN, d as CONTRACT_FREEZE_SOURCE_PORT_TOKEN, e as ContractFreezeBundleSnapshot, f as ContractFreezePort, g as ContractFreezeSourcePort, D as DuePendingPlanChange, P as PENDING_PLAN_QUERY_PORT_TOKEN, h as PendingPlanQueryPort, S as SELF_SERVICE_BLOCKED_BUNDLES_TOKEN, i as SELF_SERVICE_BLOCKED_PLANS_TOKEN, j as SUBSCRIPTION_USAGE_PORT_TOKEN, k as SUBSCRIPTION_WRITE_PORT_TOKEN, l as SelfServiceBlockedBundles, m as SelfServiceBlockedPlans, n as SubscriptionBundleControllerOptions, o as SubscriptionBundleModule, p as SubscriptionBundleModuleOptions, T as TENANT_AUTH_GUARDS_TOKEN, q as TENANT_ID_RESOLVER_TOKEN, r as TRIAL_PROJECTION_PORT_TOKEN, s as TenantBillingModule, t as TenantBillingModuleOptions, u as TenantIdResolver, v as TrialProjectionInput, w as TrialProjectionPort, U as USAGE_SNAPSHOT_PORT_TOKEN, x as USER_EMAIL_RESOLVER_TOKEN, y as USER_ID_RESOLVER_TOKEN, z as UserEmailResolver, B as UserIdResolver } from './subscription-bundles.module-BQmoozm5.js';
12
- export { A as AddBundleToSubscriptionInput, B as BundlePreviewSnapshot, C as CancelBundleFromSubscriptionInput, a as CancelSubscriptionDto, b as ChangePlanDto, c as CompleteOnboardingSubscriptionDto, d as ComposedTenantAuthGuard, L as LimitsCheckRow, P as PendingPlanMaterializationService, e as PlanChangeContext, f as PlanChangePreviewDto, g as PlanChangePreviewIssue, h as PlanChangePreviewService, i as PlanChangeType, j as PlanSnapshotDto, k as PreviewPlanChangeDto, l as ProrationDto, m as ProrationInput, R as RedundantFeatureHint, S as SubscriptionBundleAddPreviewDto, n as SubscriptionBundleCancelPreviewDto, o as SubscriptionBundleConfig, p as SubscriptionBundlePreviewContext, q as SubscriptionBundlePreviewIssue, r as SubscriptionBundlePreviewService, s as SubscriptionBundlesService, T as TenantAdminGuard, t as TenantBillingController, U as UsageResponse, u as addMonths, v as computeProration, w as resolveBundleCancelEffectiveAt, x as resolveBundlePriceNet } from './tenant-billing.controller-b1G1yB09.js';
13
- export { C as CustomLimitsShape, E as EffectiveLimits, a as EffectiveLimitsSnapshot, b as EnforceLimitInput, c as EntitlementService, P as PlanVersionSnapshot, S as SubscriptionBundleSnapshot, d as SubscriptionLimitsInput, e as aggregateContractLineItemEntitlements, f as aggregateLimits, g as aggregateSubscriptionBundleQuotas, h as applyCustomLimits, i as collectSubscriptionBundleFeatures, j as contractBundleVersionIds, k as contractLimits, l as filterActiveSubscriptionBundles, m as filterPlannedOnlyFeatures, n as hasAnyFeature, o as hasFeature, p as mergeSubscriptionBundlesIntoLimits, t as toEffectiveLimitsSnapshot } from './aggregation-o0LMenvl.js';
12
+ export { A as AddBundleToSubscriptionInput, B as BundlePreviewSnapshot, C as CancelBundleFromSubscriptionInput, a as CancelSubscriptionDto, b as ChangePlanDto, c as CompleteOnboardingSubscriptionDto, d as ComposedTenantAuthGuard, L as LimitsCheckRow, P as PendingPlanMaterializationService, e as PlanChangeContext, f as PlanChangePreviewDto, g as PlanChangePreviewIssue, h as PlanChangePreviewService, i as PlanChangeType, j as PlanSnapshotDto, k as PreviewPlanChangeDto, l as ProrationDto, m as ProrationInput, R as RedundantFeatureHint, S as SubscriptionBundleAddPreviewDto, n as SubscriptionBundleCancelPreviewDto, o as SubscriptionBundleConfig, p as SubscriptionBundlePreviewContext, q as SubscriptionBundlePreviewIssue, r as SubscriptionBundlePreviewService, s as SubscriptionBundlesService, T as TenantAdminGuard, t as TenantBillingController, U as UsageResponse, u as addMonths, v as computeProration, w as resolveBundleCancelEffectiveAt, x as resolveBundlePriceNet } from './tenant-billing.controller-7o4ObzGs.js';
13
+ export { C as CustomLimitsShape, E as EffectiveLimits, a as EffectiveLimitsSnapshot, b as EnforceLimitInput, c as EntitlementService, P as PlanVersionSnapshot, S as SubscriptionBundleSnapshot, d as SubscriptionLimitsInput, e as aggregateContractLineItemEntitlements, f as aggregateLimits, g as aggregateSubscriptionBundleQuotas, h as applyCustomLimits, i as collectSubscriptionBundleFeatures, j as contractBundleVersionIds, k as contractLimits, l as filterActiveSubscriptionBundles, m as filterPlannedOnlyFeatures, n as hasAnyFeature, o as hasFeature, p as mergeSubscriptionBundlesIntoLimits, t as toEffectiveLimitsSnapshot } from './aggregation-DP5zfKbU.js';
14
14
  export { ENTITLEMENT_RESOLUTION_CONFIG_TOKEN, ENTITLEMENT_SERVICE_TOKEN, EntitlementModule, EntitlementModuleOptions, LimitExceededError, PLAN_VERSION_REPOSITORY_TOKEN, ReplacedByIndex, SUBSCRIPTION_REPOSITORY_TOKEN, TRANSACTION_RUNNER_TOKEN, buildReplacedByIndex, expandReplacedFeatures, isLimitExceededError } from './entitlement/index.js';
15
15
  export { E as EntitlementResolutionConfig, a as EntitlementResolutionInput, r as resolveEntitlementPlan } from './plan-resolution-CFCoUkrE.js';
16
16
  export { ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN, AUDIT_PORT_TOKEN, AUDIT_STATS_PORT_TOKEN, AdminPublicBootController, AdminStatsController, MFA_PORT_TOKEN, PLATFORM_CORE_MANIFEST_CONTRIBUTION, PROMO_CODE_STATS_PORT_TOKEN, RLS_BYPASS_PORT_TOKEN, SUBSCRIPTION_STATS_PORT_TOKEN, buildAdminStatsController } from './admin/index.js';
17
17
  export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions, f as AdminStatsService, g as AdminStatsSnapshot, 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-Db2exT_d.js';
18
18
  export { A as AdminAuditService } from './admin-audit.service-9IqXMlZm.js';
19
19
  export { A as ADMIN_MANIFEST_CONFIG, a as ADMIN_RESOURCES_PORT_TOKEN, b as AdminManifestConfig, c as AdminResourcesModule, d as AdminResourcesModuleOptions, e as AdminResourcesService, f as AdminStatsModule, g as AdminStatsModuleOptions, S as SuspendTenantDto } from './admin-resources.module-BY5r_1MG.js';
20
- export { S as SaaSiCatModule, a as SaasPlatformAdapters, b as SaasPlatformAdminResourcesOptions, c as SaasPlatformAdminStatsOptions, d as SaasPlatformCatalogOptions, e as SaasPlatformCheckoutOfferOptions, S as SaasPlatformModule, f as SaasPlatformModuleOptions, g as SaasPlatformPromoCodesOptions, h as SaasPlatformSetupOptions, i as SaasPlatformSubscriptionBundlesOptions, j as SaasPlatformSubscriptionContractOptions, k as SaasPlatformTenantAuthGuards, l as SaasPlatformTenantBillingOptions, m as SetupModule, n as SetupModuleOptions } from './saas-platform.module-BQmrDGVU.js';
20
+ export { S as SaaSiCatModule, a as SaasPlatformAdapters, b as SaasPlatformAdminResourcesOptions, c as SaasPlatformAdminStatsOptions, d as SaasPlatformCatalogOptions, e as SaasPlatformCheckoutOfferOptions, S as SaasPlatformModule, f as SaasPlatformModuleOptions, g as SaasPlatformPromoCodesOptions, h as SaasPlatformSetupOptions, i as SaasPlatformSubscriptionBundlesOptions, j as SaasPlatformSubscriptionContractOptions, k as SaasPlatformTenantAuthGuards, l as SaasPlatformTenantBillingOptions, m as SetupModule, n as SetupModuleOptions } from './saas-platform.module-DolE41YY.js';
21
21
  export { ACTIVATION_ORCHESTRATOR_TOKEN, BaseIpRateLimitGuard, ContinueRegistrationDto, PASSWORD_HASHER_TOKEN, PAYMENT_EVENT_LOG_TOKEN, PAYMENT_PROVIDER_TOKEN, PENDING_REGISTRATION_REPOSITORY_TOKEN, PLAN_CATALOG_LOOKUP_TOKEN, PaymentWebhookDto, PendingRegistrationService, PreviewRegistrationPromoDto, PromoEvaluation, REGISTRATION_AUDIT_LOGGER_TOKEN, REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN, REGISTRATION_CONFIG_TOKEN, REGISTRATION_OTP_DELIVERY_TOKEN, REGISTRATION_PROMO_PREVIEW_TOKEN, REGISTRATION_RESUME_BASE_URL_TOKEN, REGISTRATION_RESUME_DELIVERY_TOKEN, REGISTRATION_RESUME_TOKEN_SIGNER_TOKEN, RegisterStartDto, RegistrationCleanupCron, RegistrationModule, RegistrationModuleOptions, ResendRegistrationOtpDto, SLUG_AVAILABILITY_CHECK_TOKEN, SaveRegistrationConfigDto, SaveRegistrationConfigSelectionDto, SelectRegistrationPlanDto, StartRegistrationCheckoutDto, USER_ACCOUNT_LOOKUP_TOKEN, VerifyRegistrationOtpDto, computeBreakdown, generateOtpCode, hashOtpCode, resolveModel, slugify, verifyOtpCode } from './registration/index.js';
22
22
  export { DEFINES_QUOTA_KEY, DISCOVERY_SNAPSHOT_TOKEN, DefinesQuota, DefinesQuotaOptions, DiscoveryControllerConfig, DiscoveryModule, DiscoveryModuleOptions, DiscoverySnapshotNotFoundError, ENFORCE_QUOTA_KEY, EnforceQuota, EnforceQuotaMetadata, EnforceQuotaOptions, HeadlessScanOptions, IMPLEMENTS_CAPABILITY_KEY, ImplementsCapability, ImplementsCapabilityMetadata, ImplementsCapabilityOptions, REQUIRES_CAPABILITY_KEY, RequiresCapability, RequiresCapabilityKeys, buildDiscoveryController, loadDiscoverySnapshotFromFile, runHeadlessDiscoveryScan } from './discovery/index.js';
23
23
  export { D as DISCOVERY_APP_INFO_TOKEN, a as DISCOVERY_SNAPSHOT_PATH_TOKEN, b as DiscoveryAppInfo, c as DiscoveryScanner, d as computeSnapshotHash } from './discovery.scanner-DLgEvuoy.js';
24
- export { B as BundlesService, C as CatalogEntriesService, a as CatalogServiceConfig, M as MarketingProjectionsService, b as MarketingSettingsService, P as PlanVersionsService, c as PlansService, d as PromotionsService, e as PublicMarketingCatalogService } from './plan-versions.service-BB36Q1bg.js';
24
+ export { B as BundlesService, C as CatalogEntriesService, a as CatalogServiceConfig, M as MarketingProjectionsService, b as MarketingSettingsService, P as PlanVersionsService, c as PlansService, d as PromotionsService, e as PublicMarketingCatalogService } from './plan-versions.service-B-YoE4SZ.js';
25
25
  export { ADVISORY_STRICT_MODE_CODES, BUNDLE_REPOSITORY_TOKEN, CATALOG_ENTRY_REPOSITORY_TOKEN, CATALOG_SERVICE_CONFIG_TOKEN, CreateBundleDto, CreateBundleVersionDraftDto, CreateMarketingProjectionDto, CreatePlanDto, CreatePlanVersionDraftDto, CreatePromotionDto, ListCatalogEntriesQueryDto, ListMarketingProjectionsQueryDto, ListMarketingSettingsQueryDto, ListPromotionsQueryDto, MARKETING_PROJECTION_REPOSITORY_TOKEN, MARKETING_SETTINGS_REPOSITORY_TOKEN, PLAN_REPOSITORY_TOKEN, PROMOTION_REPOSITORY_TOKEN, PreflightFinding, PreflightInput, PreflightReport, PublishBundleVersionDto, PublishPlanVersionDto, ReviewCatalogEntryDto, SeedBundleDraft, SeedGateFinding, SeedGateInput, SeedGateMode, SeedGateReport, SeedGateRunOptions, SeedPlanDraft, SyncDiscoveryDto, UpdateBundleDto, UpdateBundleVersionDraftDto, UpdateCatalogEntryI18nDto, UpdateMarketingProjectionDto, UpdateMarketingSettingsDto, UpdatePlanDto, UpdatePlanVersionDraftDto, UpdatePromotionDto, blockingStrictModeWarnings, buildBundleVersionsController, buildBundlesController, buildCatalogEntriesController, buildMarketingProjectionsController, buildMarketingSettingsController, buildPlanVersionsController, buildPlansController, buildPromotionsController, buildPublicMarketingCatalogController, featureApprovalSignature, formatPreflightReport, formatSeedGateReport, loadApprovedCatalogKeys, preflightExitCode, quotaApprovalSignature, runPreflight, runSeedGateFromFile, seedGateExitCode, validateBundleDraft, validatePlanDraft, validateSeedAgainstSnapshot } from './catalog/index.js';
26
- export { C as CatalogControllerConfig, a as CatalogModule, b as CatalogModuleOptions } from './catalog.module-BKObceo0.js';
26
+ export { C as CatalogControllerConfig, a as CatalogModule, b as CatalogModuleOptions } from './catalog.module-CQr1FpkI.js';
27
27
  export { C as CheckoutOfferService } from './checkout-offer.service-BX51dljL.js';
28
28
  export { CHECKOUT_OFFER_REPOSITORY_TOKEN, CreateCheckoutOfferDto, UpdateCheckoutOfferDto, buildCheckoutOfferController } from './checkout-offer/index.js';
29
29
  export { C as CheckoutOfferControllerConfig, a as CheckoutOfferModule, b as CheckoutOfferModuleOptions } from './checkout-offer.module-Ca3_TieR.js';
@@ -53,4 +53,23 @@ declare class SetupController {
53
53
  confirm(dto: SetupConfirmMfaDto): Promise<SetupConfirmMfaResponse>;
54
54
  }
55
55
 
56
- export { SetupController, SetupService };
56
+ /**
57
+ * Builds the body of a coded exception.
58
+ *
59
+ * `PlatformErrorBody` declares `message` as required, but a throw site that
60
+ * passes only `{ code }` produces a body without one — NestJS hands an object
61
+ * argument through verbatim. A consumer typing the response then reads
62
+ * `undefined` where a string was promised, and `body.message.includes(...)`
63
+ * throws. Deriving the message from the shipped English catalogue closes that
64
+ * gap, and keeps the fallback text identical to the shipped default by
65
+ * construction.
66
+ *
67
+ * Use it wherever there is no reason to word the message differently from the
68
+ * catalogue:
69
+ *
70
+ * throw new BadRequestException(codedError(REGISTRATION_ERROR_CODES.OTP_INVALID));
71
+ * throw new NotFoundException(codedError(BILLING_ERROR_CODES.TENANT_NOT_FOUND, { slug }));
72
+ */
73
+ declare function codedError(code: PlatformErrorCode, params?: Record<string, unknown>): PlatformErrorBody;
74
+
75
+ export { SetupController, SetupService, codedError };
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ import {
37
37
  resolveModel,
38
38
  slugify,
39
39
  verifyOtpCode
40
- } from "./chunk-6WA4X5U3.js";
40
+ } from "./chunk-MJ32VNZD.js";
41
41
  import "./chunk-UF53DWWR.js";
42
42
  import {
43
43
  formatPreflightReport,
@@ -47,7 +47,7 @@ import {
47
47
  runSeedGateFromFile,
48
48
  seedGateExitCode,
49
49
  validateSeedAgainstSnapshot
50
- } from "./chunk-AFK2IE2L.js";
50
+ } from "./chunk-7ZPFQXHM.js";
51
51
  import "./chunk-DBZGV3HC.js";
52
52
  import {
53
53
  DefinesQuota,
@@ -70,7 +70,7 @@ import {
70
70
  SetupController,
71
71
  SetupModule,
72
72
  SetupService
73
- } from "./chunk-KUDKD7ZG.js";
73
+ } from "./chunk-UFS344JD.js";
74
74
  import {
75
75
  CreatePromoCodeDto,
76
76
  PreviewPromoCodeDto,
@@ -82,7 +82,7 @@ import {
82
82
  buildPromoCodeAdminController,
83
83
  hashIp,
84
84
  ipFingerprint
85
- } from "./chunk-EUU3B6NB.js";
85
+ } from "./chunk-4O6R6ARQ.js";
86
86
  import {
87
87
  ADMIN_MANIFEST_CONFIG,
88
88
  ADMIN_RESOURCES_PORT_TOKEN,
@@ -109,7 +109,7 @@ import {
109
109
  SuperAdminGuard,
110
110
  SuspendTenantDto,
111
111
  buildAdminStatsController
112
- } from "./chunk-7JIHG53V.js";
112
+ } from "./chunk-SN5UOC43.js";
113
113
  import {
114
114
  CONTRACT_FREEZE_PORT_TOKEN,
115
115
  CONTRACT_FREEZE_PROJECT_KEY_TOKEN,
@@ -170,7 +170,7 @@ import {
170
170
  periodEndWithMinLead,
171
171
  resolveBundleCancelEffectiveAt,
172
172
  resolveBundlePriceNet
173
- } from "./chunk-I77VS3YH.js";
173
+ } from "./chunk-UO64MK3Q.js";
174
174
  import {
175
175
  PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN,
176
176
  PROMO_CODE_REPOSITORY_TOKEN,
@@ -186,7 +186,7 @@ import {
186
186
  computeDiscountGross,
187
187
  computeDiscountedGross,
188
188
  computeRegularStartsAt
189
- } from "./chunk-QLJHIIOY.js";
189
+ } from "./chunk-VQQWF7MW.js";
190
190
  import {
191
191
  SubscriptionContractModule,
192
192
  SubscriptionContractService,
@@ -242,7 +242,7 @@ import {
242
242
  quotaApprovalSignature,
243
243
  validateBundleDraft,
244
244
  validatePlanDraft
245
- } from "./chunk-LXUBCLRK.js";
245
+ } from "./chunk-7X5MSAIL.js";
246
246
  import {
247
247
  AUDIT_CONTEXT_RESOLVER_TOKEN,
248
248
  PENDING_PLAN_QUERY_PORT_TOKEN,
@@ -270,7 +270,7 @@ import {
270
270
  CreateCheckoutOfferDto,
271
271
  UpdateCheckoutOfferDto,
272
272
  buildCheckoutOfferController
273
- } from "./chunk-ORWIGSNN.js";
273
+ } from "./chunk-XTVAFJ3P.js";
274
274
  import "./chunk-BSK6YBLI.js";
275
275
  import {
276
276
  SAASICAT_PUBLIC_ROUTE_KEY,
@@ -310,7 +310,7 @@ import {
310
310
  mergeSubscriptionBundlesIntoLimits,
311
311
  resolveEntitlementPlan,
312
312
  toEffectiveLimitsSnapshot
313
- } from "./chunk-F6DCLVBB.js";
313
+ } from "./chunk-NNNXXUPT.js";
314
314
  import {
315
315
  PLAN_CATALOG_READ_SINK_TOKEN,
316
316
  PLAN_CATALOG_TOKEN,
@@ -332,6 +332,9 @@ import {
332
332
  import {
333
333
  SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN
334
334
  } from "./chunk-NYLON2VC.js";
335
+ import {
336
+ codedError
337
+ } from "./chunk-EBJJNTW6.js";
335
338
  import {
336
339
  ENTITLEMENT_RESOLUTION_CONFIG_TOKEN,
337
340
  ENTITLEMENT_SERVICE_TOKEN,
@@ -601,6 +604,7 @@ export {
601
604
  classifyBundleVersionDiff,
602
605
  classifyPlanDiff,
603
606
  clearPendingPlanVersionFields,
607
+ codedError,
604
608
  collectSubscriptionBundleFeatures,
605
609
  computeBreakdown,
606
610
  computeCarriedTrialEndsAt,
@@ -1,7 +1,7 @@
1
1
  import { Type, CanActivate, DynamicModule, ForwardReference } from '@nestjs/common';
2
2
  import { PromoCodeRepository, PromoCodeRedemptionRepository, PromoCodeValidationLogRepository, FirstTimeCustomerCheck, PromoSubscriptionLookup, PromoRevenueDeductionAggregator, TransactionRunner } from '@saasicat/types';
3
3
  import { P as ProviderSpec } from './di-CcNeq9v-.js';
4
- import { g as PromoServiceConfig } from './service-DPZ2W1E-.js';
4
+ import { P as PromoServiceConfig } from './service-D48clObR.js';
5
5
 
6
6
  interface PromoCodesModuleOptions {
7
7
  promoCodeRepository: ProviderSpec<PromoCodeRepository>;
@@ -1,7 +1,7 @@
1
1
  import { Type, CanActivate, DynamicModule, ForwardReference } from '@nestjs/common';
2
2
  import { PromoCodeRepository, PromoCodeRedemptionRepository, PromoCodeValidationLogRepository, FirstTimeCustomerCheck, PromoSubscriptionLookup, PromoRevenueDeductionAggregator, TransactionRunner } from '@saasicat/types';
3
3
  import { P as ProviderSpec } from './di-CcNeq9v-.cjs';
4
- import { g as PromoServiceConfig } from './service-DPZ2W1E-.cjs';
4
+ import { P as PromoServiceConfig } from './service-D48clObR.cjs';
5
5
 
6
6
  interface PromoCodesModuleOptions {
7
7
  promoCodeRepository: ProviderSpec<PromoCodeRepository>;
@@ -82,7 +82,7 @@ declare class BundlesService {
82
82
  * Publishes a draft version atomically. Steps:
83
83
  * 1. Strict check on the draft definition (warn-only or blocking)
84
84
  * 2. Enforce validFrom requirement + ordering against the predecessor
85
- * (SPEC_V2 §4.2 + §11.1 M6 Pack 2c, analogous to PlanVersion)
85
+ * (analogous to PlanVersion)
86
86
  * 3. Compute the diff against the predecessor version (latest live) →
87
87
  * `publishedChanges` + `nonRegressive` via `classifyBundleVersionDiff`
88
88
  * 4. Call Repository.publishDraft with the diff result + validity dates
@@ -82,7 +82,7 @@ declare class BundlesService {
82
82
  * Publishes a draft version atomically. Steps:
83
83
  * 1. Strict check on the draft definition (warn-only or blocking)
84
84
  * 2. Enforce validFrom requirement + ordering against the predecessor
85
- * (SPEC_V2 §4.2 + §11.1 M6 Pack 2c, analogous to PlanVersion)
85
+ * (analogous to PlanVersion)
86
86
  * 3. Compute the diff against the predecessor version (latest live) →
87
87
  * `publishedChanges` + `nonRegressive` via `classifyBundleVersionDiff`
88
88
  * 4. Call Repository.publishDraft with the diff result + validity dates