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

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 (64) hide show
  1. package/dist/.build-stamp +1 -1
  2. package/dist/_entries.cjs +4887 -3609
  3. package/dist/admin/index.js +7 -5
  4. package/dist/{aggregation-ChpZDh0g.d.ts → aggregation-6fPkeV8i.d.ts} +39 -4
  5. package/dist/{aggregation-OpnhwzF5.d.cts → aggregation-DjQUc7yd.d.cts} +39 -4
  6. package/dist/billing/index.d.cts +68 -9
  7. package/dist/billing/index.d.ts +68 -9
  8. package/dist/billing/index.js +16 -5
  9. package/dist/checkout-offer/index.d.cts +2 -2
  10. package/dist/checkout-offer/index.d.ts +2 -2
  11. package/dist/checkout-offer/index.js +4 -4
  12. package/dist/{checkout-offer.service-CCVxG9b2.d.cts → checkout-offer.service-DmVGrT4v.d.cts} +1 -1
  13. package/dist/{checkout-offer.service-BeHgYikI.d.ts → checkout-offer.service-Yi30L4ry.d.ts} +1 -1
  14. package/dist/{chunk-WHJSYKNC.js → chunk-3U4N5UYD.js} +1 -1
  15. package/dist/{chunk-M47BNEY2.js → chunk-3YYLOYUT.js} +1373 -266
  16. package/dist/{chunk-G6EZWECL.js → chunk-B4YP7REK.js} +94 -26
  17. package/dist/{chunk-QPVDCKYS.js → chunk-ESEWSAOV.js} +4 -3
  18. package/dist/{chunk-NDLC5GYK.js → chunk-EU4N5LET.js} +4 -3
  19. package/dist/{chunk-LLYVYRGJ.js → chunk-F2PF4IXB.js} +1 -275
  20. package/dist/{chunk-AOS2JPDD.js → chunk-FJIOHAO5.js} +77 -41
  21. package/dist/{chunk-TOEFN7DN.js → chunk-FPMBQDW7.js} +2 -2
  22. package/dist/chunk-OSOP4KWL.js +288 -0
  23. package/dist/{chunk-3RLWML2S.js → chunk-QWKBOLBH.js} +35 -0
  24. package/dist/{chunk-JBCC6C3M.js → chunk-R3I5X262.js} +5 -4
  25. package/dist/{chunk-4SDSYV4A.js → chunk-T6WXDGIU.js} +1 -1
  26. package/dist/{chunk-R5YCJBHY.js → chunk-U5UPEFWC.js} +2 -2
  27. package/dist/{chunk-XSSWYPP5.js → chunk-UMZCOCT5.js} +1 -1
  28. package/dist/{chunk-7NJKVC5X.js → chunk-WQNOCOI2.js} +53 -6
  29. package/dist/{chunk-55QEDAMX.js → chunk-WTAS2CLM.js} +4 -9
  30. package/dist/{enforce-quota.interceptor-BFyVdWe8.d.cts → enforce-quota.interceptor-B9UhCBXx.d.cts} +2 -2
  31. package/dist/{enforce-quota.interceptor-GaBXboGx.d.ts → enforce-quota.interceptor-CR2waXNA.d.ts} +2 -2
  32. package/dist/entitlement/index.d.cts +1 -1
  33. package/dist/entitlement/index.d.ts +1 -1
  34. package/dist/entitlement/index.js +4 -2
  35. package/dist/index.d.cts +11 -11
  36. package/dist/index.d.ts +11 -11
  37. package/dist/index.js +36 -20
  38. package/dist/{issuer-identity.check-CBO0vcsq.d.cts → issuer-identity.check-BntcNdld.d.cts} +1 -1
  39. package/dist/{issuer-identity.check-Cz9CEMkZ.d.ts → issuer-identity.check-DFmS8whs.d.ts} +1 -1
  40. package/dist/{module-options-qAOwinHR.d.cts → module-options-C4S_StYF.d.cts} +2 -2
  41. package/dist/{module-options-DmQ3G4sZ.d.ts → module-options-DxJI-1iH.d.ts} +2 -2
  42. package/dist/payments/index.js +2 -2
  43. package/dist/platform/index.d.cts +25 -16
  44. package/dist/platform/index.d.ts +25 -16
  45. package/dist/platform/index.js +16 -14
  46. package/dist/promo/index.d.cts +11 -4
  47. package/dist/promo/index.d.ts +11 -4
  48. package/dist/promo/index.js +5 -3
  49. package/dist/{promo.module-CKkECmU8.d.cts → promo.module-Ddx-swUV.d.cts} +1 -1
  50. package/dist/{promo.module-DuIJdK3U.d.ts → promo.module-PsIvDcUp.d.ts} +1 -1
  51. package/dist/{promo.service-BYBu6dy3.d.cts → promo.service-BextPvx5.d.cts} +23 -1
  52. package/dist/{promo.service-CFjfF0Xm.d.ts → promo.service-Dqqh0JXn.d.ts} +23 -1
  53. package/dist/registration/index.d.cts +2 -2
  54. package/dist/registration/index.d.ts +2 -2
  55. package/dist/registration/index.js +5 -5
  56. package/dist/subscription-contract/index.js +2 -2
  57. package/dist/{tenant-billing.controller-DKbAqTbM.d.cts → tenant-billing.controller-BC6-S5cT.d.cts} +91 -10
  58. package/dist/{tenant-billing.controller-BLqbsONe.d.ts → tenant-billing.controller-BuQDQ76i.d.ts} +91 -10
  59. package/dist/{tenant-billing.module-ClbjzocC.d.cts → tenant-billing.module-C6MFfCKq.d.cts} +24 -1
  60. package/dist/{tenant-billing.module-DohgJJ2m.d.ts → tenant-billing.module-CUCQL0-k.d.ts} +24 -1
  61. package/dist/testing/index.d.cts +6 -6
  62. package/dist/testing/index.d.ts +6 -6
  63. package/dist/testing/index.js +33 -31
  64. package/package.json +3 -3
@@ -2,11 +2,11 @@ import { Type, DynamicModule, ForwardReference, Provider, CanActivate, FactoryPr
2
2
  import { SuperAdminProvisioningPort, MfaPort, AuditPort, RlsBypassPort, AppliedSettingsPort, EmailPort, PlanCatalogReadSink, SubscriptionRepository, PlanVersionRepository, TransactionRunner, AdminResourcesPort, FeatureUiRegistry, PlanCatalog, SaaSiCatPersistenceAdapter, QuotaProvider, SubscriptionUsagePort, UsageSnapshotPort, TenantSubscriptionWritePort, FirstTimeCustomerCheck } from '@saasicat/core';
3
3
  import { P as ProviderSpec } from './di-CcNeq9v-.js';
4
4
  import { A as AdminResourcesModuleOptions, a as AdminStatsModuleOptions, b as AdminManifestConfig } from './admin-resources.module-CWqdI9BV.js';
5
- import { L as LoadPlanCatalogOptions, T as TenantBillingModuleOptions, S as SubscriptionBundleModuleOptions, a as SubscriptionBundleControllerOptions } from './tenant-billing.module-DohgJJ2m.js';
5
+ import { L as LoadPlanCatalogOptions, T as TenantBillingModuleOptions, S as SubscriptionBundleModuleOptions, a as SubscriptionBundleControllerOptions } from './tenant-billing.module-CUCQL0-k.js';
6
6
  import { C as CatalogModuleOptions, P as PublicMarketingCatalogOptions, N as NewPaymentMethodsSource } from './catalog.module-C9O7BxRq.js';
7
7
  import { D as DiscoveryAppInfo } from './discovery.scanner-DXKc6JkV.js';
8
8
  import { E as EntitlementResolutionConfig } from './plan-resolution-CwUy_OqC.js';
9
- import { P as PromoCodesModuleOptions } from './promo.module-DuIJdK3U.js';
9
+ import { P as PromoCodesModuleOptions } from './promo.module-PsIvDcUp.js';
10
10
  import { C as CheckoutOfferModuleOptions } from './checkout-offer.module-x7SP_dX4.js';
11
11
  import { P as PaymentsModuleOptions, a as PaymentsTenantRoutesOptions } from './payments.module-CQGv_VG7.js';
12
12
  import { S as SubscriptionContractModuleOptions } from './subscription-contract.module-BfIRpc1o.js';
@@ -6,7 +6,7 @@ import {
6
6
  SubscriberPaymentMethodService,
7
7
  TenantBillingDetailsController,
8
8
  TenantPaymentMethodController
9
- } from "../chunk-QPVDCKYS.js";
9
+ } from "../chunk-ESEWSAOV.js";
10
10
  import {
11
11
  PAYMENT_EVENT_LOG_TOKEN,
12
12
  PAYMENT_GATEWAYS_TOKEN,
@@ -14,7 +14,7 @@ import {
14
14
  PaymentCallbackService,
15
15
  PaymentGatewayRegistry,
16
16
  SUBSCRIBER_PAYMENT_METHOD_REPOSITORY_TOKEN
17
- } from "../chunk-7NJKVC5X.js";
17
+ } from "../chunk-WQNOCOI2.js";
18
18
  import "../chunk-5CKC7O52.js";
19
19
  import "../chunk-GPQWGA6B.js";
20
20
  import "../chunk-SZ7RFPXA.js";
@@ -1,44 +1,45 @@
1
- export { I as IssuerIdentityCheck, a as IssuerIdentityInspector, b as IssuerIdentityVerdict, c as SAASICAT_PUBLIC_ROUTE_KEY, f as SaaSiCatModule, g as SaaSiCatPublicRoute, S as SetupService, i as defineSaaSiCat, j as isSaaSiCatPublicRoute } from '../issuer-identity.check-CBO0vcsq.cjs';
1
+ export { I as IssuerIdentityCheck, a as IssuerIdentityInspector, b as IssuerIdentityVerdict, c as SAASICAT_PUBLIC_ROUTE_KEY, f as SaaSiCatModule, g as SaaSiCatPublicRoute, S as SetupService, i as defineSaaSiCat, j as isSaaSiCatPublicRoute } from '../issuer-identity.check-BntcNdld.cjs';
2
2
  import { CanActivate, DynamicModule, OnApplicationBootstrap } from '@nestjs/common';
3
3
  import { SaaSiCatPersistenceAdapter, SubscriptionUsagePort, PlanCatalog, SubscriptionRepository, UsageSnapshotPort, QuotaProvider } from '@saasicat/core';
4
4
  import { P as ProviderSpec } from '../di-CcNeq9v-.cjs';
5
5
  import { D as DiscoveryAppInfo } from '../discovery.scanner-DXKc6JkV.cjs';
6
6
  export { a as DiscoveryScanner } from '../discovery.scanner-DXKc6JkV.cjs';
7
- import { c as SaaSiCatModuleOptions, S as SaaSiCatAdapters, b as PlanResolverPort } from '../module-options-qAOwinHR.cjs';
8
- export { D as DB_CATALOG_MEMBERS, p as DbCatalogOptions, P as PLAN_RESOLVER_PORT_TOKEN, d as SaaSiCatAdminResourcesOptions, e as SaaSiCatAdminStatsOptions, f as SaaSiCatCatalogOptions, g as SaaSiCatCheckoutOfferOptions, h as SaaSiCatPromoCodesOptions, i as SaaSiCatSetupOptions, j as SaaSiCatSubscriptionBundlesOptions, k as SaaSiCatSubscriptionContractOptions, l as SaaSiCatTenantAuthGuards, m as SaaSiCatTenantBillingOptions, n as SetupModule, o as SetupModuleOptions, a as StaticPlanResolver, T as TenantManifestControllerOptions, q as buildTenantManifestController } from '../module-options-qAOwinHR.cjs';
9
- import { S as StaticEntitlementService } from '../enforce-quota.interceptor-BFyVdWe8.cjs';
10
- export { E as EnforceQuotaInterceptor, Q as QUOTA_PROVIDERS_TOKEN, b as STATIC_FEATURE_GUARD_CONFIG_TOKEN, c as StaticEntitlementSnapshot, a as StaticFeatureGuard, d as StaticFeatureGuardConfig } from '../enforce-quota.interceptor-BFyVdWe8.cjs';
7
+ import { c as SaaSiCatModuleOptions, S as SaaSiCatAdapters, b as PlanResolverPort } from '../module-options-C4S_StYF.cjs';
8
+ export { D as DB_CATALOG_MEMBERS, p as DbCatalogOptions, P as PLAN_RESOLVER_PORT_TOKEN, d as SaaSiCatAdminResourcesOptions, e as SaaSiCatAdminStatsOptions, f as SaaSiCatCatalogOptions, g as SaaSiCatCheckoutOfferOptions, h as SaaSiCatPromoCodesOptions, i as SaaSiCatSetupOptions, j as SaaSiCatSubscriptionBundlesOptions, k as SaaSiCatSubscriptionContractOptions, l as SaaSiCatTenantAuthGuards, m as SaaSiCatTenantBillingOptions, n as SetupModule, o as SetupModuleOptions, a as StaticPlanResolver, T as TenantManifestControllerOptions, q as buildTenantManifestController } from '../module-options-C4S_StYF.cjs';
9
+ import { S as StaticEntitlementService } from '../enforce-quota.interceptor-B9UhCBXx.cjs';
10
+ export { E as EnforceQuotaInterceptor, Q as QUOTA_PROVIDERS_TOKEN, b as STATIC_FEATURE_GUARD_CONFIG_TOKEN, c as StaticEntitlementSnapshot, a as StaticFeatureGuard, d as StaticFeatureGuardConfig } from '../enforce-quota.interceptor-B9UhCBXx.cjs';
11
11
  import { DiscoveryService, MetadataScanner } from '@nestjs/core';
12
12
  export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions, f as AdminStatsService, h as MfaGuard, M as MfaService, S as SuperAdminGuard } from '../admin-stats.service-DrZrU8IJ.cjs';
13
13
  export { A as AdminAuditService } from '../admin-audit.service-4P3Djdxk.cjs';
14
14
  export { f as AdminResourcesService, g as AdminStatsModule, a as AdminStatsModuleOptions } from '../admin-resources.module-B4XNvdH-.cjs';
15
- export { c as EntitlementService } from '../aggregation-OpnhwzF5.cjs';
16
- export { g as ComposedTenantAuthGuard, P as PendingPlanMaterializationService, l as PlanChangePreviewService, w as SubscriptionBundlePreviewService, x as SubscriptionBundlesService, T as TenantAdminGuard, y as TenantBillingController } from '../tenant-billing.controller-DKbAqTbM.cjs';
15
+ export { d as EntitlementService } from '../aggregation-DjQUc7yd.cjs';
16
+ export { g as ComposedTenantAuthGuard, P as PendingPlanMaterializationService, l as PlanChangePreviewService, y as SubscriptionBundlePreviewService, z as SubscriptionBundlesService, T as TenantAdminGuard, D as TenantBillingController } from '../tenant-billing.controller-BC6-S5cT.cjs';
17
17
  export { B as BundlesService, C as CatalogEntriesService, M as MarketingProjectionsService, b as MarketingSettingsService, P as PlanVersionsService, c as PlansService, d as PromotionsService } from '../plan-versions.service-DARLh-qI.cjs';
18
18
  export { c as PublicMarketingCatalogService } from '../catalog.module-T-I5Ricz.cjs';
19
19
  export { P as PromoCodeRateLimitGuard } from '../rate-limit.guard-dntqAlfZ.cjs';
20
- export { a as PromoCodesService } from '../promo.service-BYBu6dy3.cjs';
20
+ export { a as PromoCodesService } from '../promo.service-BextPvx5.cjs';
21
21
  export { c as CheckoutOfferModule, C as CheckoutOfferModuleOptions } from '../checkout-offer.module-DFhGy6JO.cjs';
22
- export { C as CheckoutOfferPricing, b as CheckoutOfferService } from '../checkout-offer.service-CCVxG9b2.cjs';
22
+ export { C as CheckoutOfferPricing, b as CheckoutOfferService } from '../checkout-offer.service-DmVGrT4v.cjs';
23
23
  export { a as SubscriptionContractModule, S as SubscriptionContractModuleOptions } from '../subscription-contract.module-DTMuUJYd.cjs';
24
24
  export { S as SubscriptionContractService } from '../subscription-contract.service-CfNApLuP.cjs';
25
- import '../tenant-billing.module-ClbjzocC.cjs';
25
+ import '../tenant-billing.module-C6MFfCKq.cjs';
26
26
  import '../tenant-billing.tokens-G-1xOlMr.cjs';
27
27
  import '../contract-line-item-money-B0Z3Ogur.cjs';
28
28
  import '../plan-resolution-CwUy_OqC.cjs';
29
- import '../promo.module-CKkECmU8.cjs';
29
+ import '../promo.module-Ddx-swUV.cjs';
30
30
  import '../payments.module-BdUq9ot_.cjs';
31
31
  import 'rxjs';
32
32
  import '../plan-catalog-source-DWe-BGY1.cjs';
33
33
  import '../subscriber.service-5W6Gi-1B.cjs';
34
34
 
35
35
  /**
36
- * What `tenantBilling` resolved and its two dependants need.
36
+ * What `tenantBilling` resolved and its dependants need.
37
37
  *
38
- * Mutable, and the only mutable thing here: `composeTenantBilling` writes it,
39
- * `composeSubscriptionBundles` and the entitlement runtime read it. A composer
40
- * that runs before tenant billing sees the initial values, which is correct —
41
- * there was no tenant billing to resolve anything.
38
+ * Mutable, and the only mutable thing here: `composeTenantBilling` and
39
+ * `composeAdminResources` write it; `composeSubscriptionBundles`,
40
+ * `composeSubscriberAccount` and the entitlement runtime read it. A composer
41
+ * that runs before them sees the initial values, which is correct — there was
42
+ * nothing resolved yet.
42
43
  */
43
44
  interface SharedTenantBinding {
44
45
  /** Normalised `authGuards`, shared with the bundle controller. */
@@ -54,6 +55,14 @@ interface SharedTenantBinding {
54
55
  * `QuotaProvider` are two counters over the same rows.
55
56
  */
56
57
  quotaProvidersHostedByTenantBilling: boolean;
58
+ /**
59
+ * The modules that hold the administration's tenants and the tenant's
60
+ * billing, as the very objects the platform imports. A module that needs
61
+ * what they provide imports these objects: Nest builds a module once per
62
+ * object, so the adapters inside are not instantiated a second time.
63
+ */
64
+ adminResourcesModule?: DynamicModule;
65
+ tenantBillingModule?: DynamicModule;
57
66
  }
58
67
  interface CompositionContext {
59
68
  readonly options: SaaSiCatModuleOptions;
@@ -1,44 +1,45 @@
1
- export { I as IssuerIdentityCheck, a as IssuerIdentityInspector, b as IssuerIdentityVerdict, c as SAASICAT_PUBLIC_ROUTE_KEY, f as SaaSiCatModule, g as SaaSiCatPublicRoute, S as SetupService, i as defineSaaSiCat, j as isSaaSiCatPublicRoute } from '../issuer-identity.check-Cz9CEMkZ.js';
1
+ export { I as IssuerIdentityCheck, a as IssuerIdentityInspector, b as IssuerIdentityVerdict, c as SAASICAT_PUBLIC_ROUTE_KEY, f as SaaSiCatModule, g as SaaSiCatPublicRoute, S as SetupService, i as defineSaaSiCat, j as isSaaSiCatPublicRoute } from '../issuer-identity.check-DFmS8whs.js';
2
2
  import { CanActivate, DynamicModule, OnApplicationBootstrap } from '@nestjs/common';
3
3
  import { SaaSiCatPersistenceAdapter, SubscriptionUsagePort, PlanCatalog, SubscriptionRepository, UsageSnapshotPort, QuotaProvider } from '@saasicat/core';
4
4
  import { P as ProviderSpec } from '../di-CcNeq9v-.js';
5
5
  import { D as DiscoveryAppInfo } from '../discovery.scanner-DXKc6JkV.js';
6
6
  export { a as DiscoveryScanner } from '../discovery.scanner-DXKc6JkV.js';
7
- import { c as SaaSiCatModuleOptions, S as SaaSiCatAdapters, b as PlanResolverPort } from '../module-options-DmQ3G4sZ.js';
8
- export { D as DB_CATALOG_MEMBERS, p as DbCatalogOptions, P as PLAN_RESOLVER_PORT_TOKEN, d as SaaSiCatAdminResourcesOptions, e as SaaSiCatAdminStatsOptions, f as SaaSiCatCatalogOptions, g as SaaSiCatCheckoutOfferOptions, h as SaaSiCatPromoCodesOptions, i as SaaSiCatSetupOptions, j as SaaSiCatSubscriptionBundlesOptions, k as SaaSiCatSubscriptionContractOptions, l as SaaSiCatTenantAuthGuards, m as SaaSiCatTenantBillingOptions, n as SetupModule, o as SetupModuleOptions, a as StaticPlanResolver, T as TenantManifestControllerOptions, q as buildTenantManifestController } from '../module-options-DmQ3G4sZ.js';
9
- import { S as StaticEntitlementService } from '../enforce-quota.interceptor-GaBXboGx.js';
10
- export { E as EnforceQuotaInterceptor, Q as QUOTA_PROVIDERS_TOKEN, b as STATIC_FEATURE_GUARD_CONFIG_TOKEN, c as StaticEntitlementSnapshot, a as StaticFeatureGuard, d as StaticFeatureGuardConfig } from '../enforce-quota.interceptor-GaBXboGx.js';
7
+ import { c as SaaSiCatModuleOptions, S as SaaSiCatAdapters, b as PlanResolverPort } from '../module-options-DxJI-1iH.js';
8
+ export { D as DB_CATALOG_MEMBERS, p as DbCatalogOptions, P as PLAN_RESOLVER_PORT_TOKEN, d as SaaSiCatAdminResourcesOptions, e as SaaSiCatAdminStatsOptions, f as SaaSiCatCatalogOptions, g as SaaSiCatCheckoutOfferOptions, h as SaaSiCatPromoCodesOptions, i as SaaSiCatSetupOptions, j as SaaSiCatSubscriptionBundlesOptions, k as SaaSiCatSubscriptionContractOptions, l as SaaSiCatTenantAuthGuards, m as SaaSiCatTenantBillingOptions, n as SetupModule, o as SetupModuleOptions, a as StaticPlanResolver, T as TenantManifestControllerOptions, q as buildTenantManifestController } from '../module-options-DxJI-1iH.js';
9
+ import { S as StaticEntitlementService } from '../enforce-quota.interceptor-CR2waXNA.js';
10
+ export { E as EnforceQuotaInterceptor, Q as QUOTA_PROVIDERS_TOKEN, b as STATIC_FEATURE_GUARD_CONFIG_TOKEN, c as StaticEntitlementSnapshot, a as StaticFeatureGuard, d as StaticFeatureGuardConfig } from '../enforce-quota.interceptor-CR2waXNA.js';
11
11
  import { DiscoveryService, MetadataScanner } from '@nestjs/core';
12
12
  export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions, f as AdminStatsService, h as MfaGuard, M as MfaService, S as SuperAdminGuard } from '../admin-stats.service-CsLNt19Z.js';
13
13
  export { A as AdminAuditService } from '../admin-audit.service-4P3Djdxk.js';
14
14
  export { f as AdminResourcesService, g as AdminStatsModule, a as AdminStatsModuleOptions } from '../admin-resources.module-CWqdI9BV.js';
15
- export { c as EntitlementService } from '../aggregation-ChpZDh0g.js';
16
- export { g as ComposedTenantAuthGuard, P as PendingPlanMaterializationService, l as PlanChangePreviewService, w as SubscriptionBundlePreviewService, x as SubscriptionBundlesService, T as TenantAdminGuard, y as TenantBillingController } from '../tenant-billing.controller-BLqbsONe.js';
15
+ export { d as EntitlementService } from '../aggregation-6fPkeV8i.js';
16
+ export { g as ComposedTenantAuthGuard, P as PendingPlanMaterializationService, l as PlanChangePreviewService, y as SubscriptionBundlePreviewService, z as SubscriptionBundlesService, T as TenantAdminGuard, D as TenantBillingController } from '../tenant-billing.controller-BuQDQ76i.js';
17
17
  export { B as BundlesService, C as CatalogEntriesService, M as MarketingProjectionsService, b as MarketingSettingsService, P as PlanVersionsService, c as PlansService, d as PromotionsService } from '../plan-versions.service-C0N-Em2W.js';
18
18
  export { c as PublicMarketingCatalogService } from '../catalog.module-C9O7BxRq.js';
19
19
  export { P as PromoCodeRateLimitGuard } from '../rate-limit.guard-dntqAlfZ.js';
20
- export { a as PromoCodesService } from '../promo.service-CFjfF0Xm.js';
20
+ export { a as PromoCodesService } from '../promo.service-Dqqh0JXn.js';
21
21
  export { c as CheckoutOfferModule, C as CheckoutOfferModuleOptions } from '../checkout-offer.module-x7SP_dX4.js';
22
- export { C as CheckoutOfferPricing, b as CheckoutOfferService } from '../checkout-offer.service-BeHgYikI.js';
22
+ export { C as CheckoutOfferPricing, b as CheckoutOfferService } from '../checkout-offer.service-Yi30L4ry.js';
23
23
  export { a as SubscriptionContractModule, S as SubscriptionContractModuleOptions } from '../subscription-contract.module-BfIRpc1o.js';
24
24
  export { S as SubscriptionContractService } from '../subscription-contract.service-CPZrTM9C.js';
25
- import '../tenant-billing.module-DohgJJ2m.js';
25
+ import '../tenant-billing.module-CUCQL0-k.js';
26
26
  import '../tenant-billing.tokens-G-1xOlMr.js';
27
27
  import '../contract-line-item-money-B0Z3Ogur.js';
28
28
  import '../plan-resolution-CwUy_OqC.js';
29
- import '../promo.module-DuIJdK3U.js';
29
+ import '../promo.module-PsIvDcUp.js';
30
30
  import '../payments.module-CQGv_VG7.js';
31
31
  import 'rxjs';
32
32
  import '../plan-catalog-source-DWe-BGY1.js';
33
33
  import '../subscriber.service-5W6Gi-1B.js';
34
34
 
35
35
  /**
36
- * What `tenantBilling` resolved and its two dependants need.
36
+ * What `tenantBilling` resolved and its dependants need.
37
37
  *
38
- * Mutable, and the only mutable thing here: `composeTenantBilling` writes it,
39
- * `composeSubscriptionBundles` and the entitlement runtime read it. A composer
40
- * that runs before tenant billing sees the initial values, which is correct —
41
- * there was no tenant billing to resolve anything.
38
+ * Mutable, and the only mutable thing here: `composeTenantBilling` and
39
+ * `composeAdminResources` write it; `composeSubscriptionBundles`,
40
+ * `composeSubscriberAccount` and the entitlement runtime read it. A composer
41
+ * that runs before them sees the initial values, which is correct — there was
42
+ * nothing resolved yet.
42
43
  */
43
44
  interface SharedTenantBinding {
44
45
  /** Normalised `authGuards`, shared with the bundle controller. */
@@ -54,6 +55,14 @@ interface SharedTenantBinding {
54
55
  * `QuotaProvider` are two counters over the same rows.
55
56
  */
56
57
  quotaProvidersHostedByTenantBilling: boolean;
58
+ /**
59
+ * The modules that hold the administration's tenants and the tenant's
60
+ * billing, as the very objects the platform imports. A module that needs
61
+ * what they provide imports these objects: Nest builds a module once per
62
+ * object, so the adapters inside are not instantiated a second time.
63
+ */
64
+ adminResourcesModule?: DynamicModule;
65
+ tenantBillingModule?: DynamicModule;
57
66
  }
58
67
  interface CompositionContext {
59
68
  readonly options: SaaSiCatModuleOptions;
@@ -31,23 +31,22 @@ import {
31
31
  docsUrlFor,
32
32
  findViolations,
33
33
  headingSlug
34
- } from "../chunk-AOS2JPDD.js";
34
+ } from "../chunk-FJIOHAO5.js";
35
35
  import {
36
36
  PromoCodeRateLimitGuard
37
- } from "../chunk-4SDSYV4A.js";
37
+ } from "../chunk-T6WXDGIU.js";
38
38
  import {
39
39
  SubscriptionContractModule
40
- } from "../chunk-XSSWYPP5.js";
40
+ } from "../chunk-UMZCOCT5.js";
41
41
  import {
42
42
  AdminBypassRlsInterceptor,
43
43
  AdminManifestModule,
44
44
  AdminManifestService,
45
45
  AdminModule,
46
- AdminResourcesService,
47
46
  AdminStatsModule,
48
47
  AdminStatsService,
49
48
  SuperAdminGuard
50
- } from "../chunk-LLYVYRGJ.js";
49
+ } from "../chunk-F2PF4IXB.js";
51
50
  import {
52
51
  PendingPlanMaterializationService,
53
52
  PlanChangePreviewService,
@@ -55,7 +54,10 @@ import {
55
54
  SubscriptionBundlesService,
56
55
  TenantAdminGuard,
57
56
  TenantBillingController
58
- } from "../chunk-M47BNEY2.js";
57
+ } from "../chunk-3YYLOYUT.js";
58
+ import {
59
+ AdminResourcesService
60
+ } from "../chunk-OSOP4KWL.js";
59
61
  import {
60
62
  BundlesService,
61
63
  CatalogEntriesService,
@@ -76,34 +78,34 @@ import {
76
78
  } from "../chunk-OOTEXP47.js";
77
79
  import {
78
80
  CheckoutOfferModule
79
- } from "../chunk-TOEFN7DN.js";
81
+ } from "../chunk-FPMBQDW7.js";
80
82
  import {
81
83
  CheckoutOfferPricing,
82
84
  CheckoutOfferService
83
- } from "../chunk-55QEDAMX.js";
85
+ } from "../chunk-WTAS2CLM.js";
84
86
  import {
85
87
  PromoCodesService
86
- } from "../chunk-3RLWML2S.js";
88
+ } from "../chunk-QWKBOLBH.js";
87
89
  import {
88
90
  SubscriptionContractService
89
- } from "../chunk-NDLC5GYK.js";
91
+ } from "../chunk-EU4N5LET.js";
90
92
  import "../chunk-KPEMTBOP.js";
91
93
  import "../chunk-S33SO5XX.js";
92
94
  import {
93
95
  DiscoveryScanner
94
96
  } from "../chunk-JVAEKTJ4.js";
95
- import "../chunk-WHJSYKNC.js";
97
+ import "../chunk-3U4N5UYD.js";
96
98
  import {
97
99
  EntitlementService
98
- } from "../chunk-G6EZWECL.js";
100
+ } from "../chunk-B4YP7REK.js";
99
101
  import "../chunk-OUDSQ3PU.js";
100
102
  import "../chunk-TBBZWZQT.js";
101
103
  import "../chunk-VBRYPU7V.js";
102
104
  import "../chunk-6PJE7EWO.js";
103
105
  import "../chunk-3QVGA6JX.js";
104
106
  import "../chunk-QUZU2M33.js";
105
- import "../chunk-QPVDCKYS.js";
106
- import "../chunk-7NJKVC5X.js";
107
+ import "../chunk-ESEWSAOV.js";
108
+ import "../chunk-WQNOCOI2.js";
107
109
  import {
108
110
  ComposedTenantAuthGuard
109
111
  } from "../chunk-5CKC7O52.js";
@@ -1,8 +1,8 @@
1
1
  import { PromoCodeValueType, PromoCodeDurationType, BillingCycle, PromoCodeRepository, PromoCodeRedemptionRepository, PromoCodeHoldRepository } from '@saasicat/core';
2
- import { a as PromoCodesService, i as PreviewResult } from '../promo.service-BYBu6dy3.cjs';
3
- export { C as CODE_MAX_LENGTH, b as CODE_MIN_LENGTH, c as CODE_PATTERN, d as CheckoutHoldInput, e as PreviewInput, f as PreviewInvalid, g as PreviewOptions, h as PreviewReason, j as PreviewValid, k as PromoCodeStats, P as PromoServiceConfig, R as RedeemInput } from '../promo.service-BYBu6dy3.cjs';
2
+ import { a as PromoCodesService, i as PreviewResult } from '../promo.service-BextPvx5.cjs';
3
+ export { C as CODE_MAX_LENGTH, b as CODE_MIN_LENGTH, c as CODE_PATTERN, d as CheckoutHoldInput, e as PreviewInput, f as PreviewInvalid, g as PreviewOptions, h as PreviewReason, j as PreviewValid, k as PromoCodeStats, P as PromoServiceConfig, R as RedeemInput, l as RedeemedPromoCode } from '../promo.service-BextPvx5.cjs';
4
4
  export { P as PromoCodeRateLimitGuard, h as hashIp, i as ipFingerprint } from '../rate-limit.guard-dntqAlfZ.cjs';
5
- export { a as PromoCodesModule, P as PromoCodesModuleOptions } from '../promo.module-CKkECmU8.cjs';
5
+ export { a as PromoCodesModule, P as PromoCodesModuleOptions } from '../promo.module-Ddx-swUV.cjs';
6
6
  import { Type, CanActivate } from '@nestjs/common';
7
7
  import '../plan-catalog-source-DWe-BGY1.cjs';
8
8
  import '../di-CcNeq9v-.cjs';
@@ -24,6 +24,13 @@ interface PromoCodeForCalc {
24
24
  declare function computeDiscountGross(plan: {
25
25
  gross: number;
26
26
  }, code: Pick<PromoCodeForCalc, 'valueType' | 'value'>): number;
27
+ /**
28
+ * What a code takes off a plan's net price, in net: the discount is computed on
29
+ * the gross, the way the customer was shown it, capped at the price, and
30
+ * converted back. An offer and a contract resolve a code the same way, or the
31
+ * two state different amounts for one agreement.
32
+ */
33
+ declare function promoCodeDiscountNet(planNet: number, vatRate: number, code: Pick<PromoCodeForCalc, 'valueType' | 'value'>): number;
27
34
  declare function computeDiscountedGross(planGross: number, discountGross: number): number;
28
35
  /**
29
36
  * Next date on which the list price applies again (= end of the discount
@@ -181,4 +188,4 @@ declare class UpdatePromoCodeDto {
181
188
  revenueDeductionAccount?: string | null;
182
189
  }
183
190
 
184
- export { CreatePromoCodeDto, PROMO_CODE_HOLD_REPOSITORY_TOKEN, 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, PreviewResult, PromoCodeExpirer, type PromoCodeForCalc, PromoCodePublicController, PromoCodesService, type PromoLabelOptions, UpdatePromoCodeDto, addCycles, buildLabel, buildPromoCodeAdminController, computeDiscountGross, computeDiscountedGross, computeIncludedVat, computeRegularStartsAt, grossFromNet, isTaxRatePercent, netFromGross, round2 };
191
+ export { CreatePromoCodeDto, PROMO_CODE_HOLD_REPOSITORY_TOKEN, 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, PreviewResult, PromoCodeExpirer, type PromoCodeForCalc, PromoCodePublicController, PromoCodesService, type PromoLabelOptions, UpdatePromoCodeDto, addCycles, buildLabel, buildPromoCodeAdminController, computeDiscountGross, computeDiscountedGross, computeIncludedVat, computeRegularStartsAt, grossFromNet, isTaxRatePercent, netFromGross, promoCodeDiscountNet, round2 };
@@ -1,8 +1,8 @@
1
1
  import { PromoCodeValueType, PromoCodeDurationType, BillingCycle, PromoCodeRepository, PromoCodeRedemptionRepository, PromoCodeHoldRepository } from '@saasicat/core';
2
- import { a as PromoCodesService, i as PreviewResult } from '../promo.service-CFjfF0Xm.js';
3
- export { C as CODE_MAX_LENGTH, b as CODE_MIN_LENGTH, c as CODE_PATTERN, d as CheckoutHoldInput, e as PreviewInput, f as PreviewInvalid, g as PreviewOptions, h as PreviewReason, j as PreviewValid, k as PromoCodeStats, P as PromoServiceConfig, R as RedeemInput } from '../promo.service-CFjfF0Xm.js';
2
+ import { a as PromoCodesService, i as PreviewResult } from '../promo.service-Dqqh0JXn.js';
3
+ export { C as CODE_MAX_LENGTH, b as CODE_MIN_LENGTH, c as CODE_PATTERN, d as CheckoutHoldInput, e as PreviewInput, f as PreviewInvalid, g as PreviewOptions, h as PreviewReason, j as PreviewValid, k as PromoCodeStats, P as PromoServiceConfig, R as RedeemInput, l as RedeemedPromoCode } from '../promo.service-Dqqh0JXn.js';
4
4
  export { P as PromoCodeRateLimitGuard, h as hashIp, i as ipFingerprint } from '../rate-limit.guard-dntqAlfZ.js';
5
- export { a as PromoCodesModule, P as PromoCodesModuleOptions } from '../promo.module-DuIJdK3U.js';
5
+ export { a as PromoCodesModule, P as PromoCodesModuleOptions } from '../promo.module-PsIvDcUp.js';
6
6
  import { Type, CanActivate } from '@nestjs/common';
7
7
  import '../plan-catalog-source-DWe-BGY1.js';
8
8
  import '../di-CcNeq9v-.js';
@@ -24,6 +24,13 @@ interface PromoCodeForCalc {
24
24
  declare function computeDiscountGross(plan: {
25
25
  gross: number;
26
26
  }, code: Pick<PromoCodeForCalc, 'valueType' | 'value'>): number;
27
+ /**
28
+ * What a code takes off a plan's net price, in net: the discount is computed on
29
+ * the gross, the way the customer was shown it, capped at the price, and
30
+ * converted back. An offer and a contract resolve a code the same way, or the
31
+ * two state different amounts for one agreement.
32
+ */
33
+ declare function promoCodeDiscountNet(planNet: number, vatRate: number, code: Pick<PromoCodeForCalc, 'valueType' | 'value'>): number;
27
34
  declare function computeDiscountedGross(planGross: number, discountGross: number): number;
28
35
  /**
29
36
  * Next date on which the list price applies again (= end of the discount
@@ -181,4 +188,4 @@ declare class UpdatePromoCodeDto {
181
188
  revenueDeductionAccount?: string | null;
182
189
  }
183
190
 
184
- export { CreatePromoCodeDto, PROMO_CODE_HOLD_REPOSITORY_TOKEN, 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, PreviewResult, PromoCodeExpirer, type PromoCodeForCalc, PromoCodePublicController, PromoCodesService, type PromoLabelOptions, UpdatePromoCodeDto, addCycles, buildLabel, buildPromoCodeAdminController, computeDiscountGross, computeDiscountedGross, computeIncludedVat, computeRegularStartsAt, grossFromNet, isTaxRatePercent, netFromGross, round2 };
191
+ export { CreatePromoCodeDto, PROMO_CODE_HOLD_REPOSITORY_TOKEN, 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, PreviewResult, PromoCodeExpirer, type PromoCodeForCalc, PromoCodePublicController, PromoCodesService, type PromoLabelOptions, UpdatePromoCodeDto, addCycles, buildLabel, buildPromoCodeAdminController, computeDiscountGross, computeDiscountedGross, computeIncludedVat, computeRegularStartsAt, grossFromNet, isTaxRatePercent, netFromGross, promoCodeDiscountNet, round2 };
@@ -10,7 +10,7 @@ import {
10
10
  buildPromoCodeAdminController,
11
11
  hashIp,
12
12
  ipFingerprint
13
- } from "../chunk-4SDSYV4A.js";
13
+ } from "../chunk-T6WXDGIU.js";
14
14
  import "../chunk-OOTEXP47.js";
15
15
  import {
16
16
  CODE_MAX_LENGTH,
@@ -30,8 +30,9 @@ import {
30
30
  buildLabel,
31
31
  computeDiscountGross,
32
32
  computeDiscountedGross,
33
- computeRegularStartsAt
34
- } from "../chunk-3RLWML2S.js";
33
+ computeRegularStartsAt,
34
+ promoCodeDiscountNet
35
+ } from "../chunk-QWKBOLBH.js";
35
36
  import "../chunk-TBBZWZQT.js";
36
37
  import {
37
38
  computeIncludedVat,
@@ -78,5 +79,6 @@ export {
78
79
  ipFingerprint,
79
80
  isTaxRatePercent,
80
81
  netFromGross,
82
+ promoCodeDiscountNet,
81
83
  round2
82
84
  };
@@ -1,7 +1,7 @@
1
1
  import { Type, CanActivate, DynamicModule, ForwardReference } from '@nestjs/common';
2
2
  import { PromoCodeRepository, PromoCodeRedemptionRepository, PromoCodeValidationLogRepository, FirstTimeCustomerCheck, PromoSubscriptionLookup, PromoRevenueDeductionAggregator, TransactionRunner, PromoCodeHoldRepository } from '@saasicat/core';
3
3
  import { P as ProviderSpec } from './di-CcNeq9v-.cjs';
4
- import { P as PromoServiceConfig } from './promo.service-BYBu6dy3.cjs';
4
+ import { P as PromoServiceConfig } from './promo.service-BextPvx5.cjs';
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, PromoCodeHoldRepository } from '@saasicat/core';
3
3
  import { P as ProviderSpec } from './di-CcNeq9v-.js';
4
- import { P as PromoServiceConfig } from './promo.service-CFjfF0Xm.js';
4
+ import { P as PromoServiceConfig } from './promo.service-Dqqh0JXn.js';
5
5
 
6
6
  interface PromoCodesModuleOptions {
7
7
  promoCodeRepository: ProviderSpec<PromoCodeRepository>;
@@ -9,6 +9,16 @@ type PreviewInvalid = {
9
9
  valid: false;
10
10
  reason: PreviewReason;
11
11
  };
12
+ /** A code as it was applied to a subscription when it was redeemed. */
13
+ interface RedeemedPromoCode {
14
+ code: string;
15
+ valueType: PromoCodeRecord['valueType'];
16
+ /** Decimal-as-string, as the redemption recorded it. */
17
+ value: string;
18
+ durationType: PromoCodeRecord['durationType'];
19
+ durationValue: number | null;
20
+ redeemedAt: Date;
21
+ }
12
22
  interface PreviewValid {
13
23
  valid: true;
14
24
  code: string;
@@ -166,6 +176,18 @@ declare class PromoCodesService {
166
176
  * most the price it is redeemed against.
167
177
  */
168
178
  redeemInTransaction(input: RedeemInput, tx: TransactionContext): Promise<PromoCodeRedemptionRecord>;
179
+ /**
180
+ * The code redeemed for a subscription, with the values it was redeemed
181
+ * at, unless the redemption was reversed — or null.
182
+ *
183
+ * An expired redemption still counts. Its term is counted from the
184
+ * subscription's start, which lies before a trial, while a contract counts
185
+ * a discount from the first period that is paid: a code for one month
186
+ * redeemed in a thirty-day trial has expired before the customer has paid
187
+ * for anything. A code deleted since still names what was agreed, so it is
188
+ * read without the refusal `findOne` gives.
189
+ */
190
+ redeemedCodeFor(subscriptionId: string): Promise<RedeemedPromoCode | null>;
169
191
  reverse(subscriptionId: string): Promise<PromoCodeRedemptionRecord | null>;
170
192
  /**
171
193
  * Why a code does not apply to a plan, or what it takes off it. The plans
@@ -212,4 +234,4 @@ declare class PromoCodesService {
212
234
  private lowestApplicablePlanGross;
213
235
  }
214
236
 
215
- export { CODE_MAX_LENGTH as C, type PromoServiceConfig as P, type RedeemInput as R, PromoCodesService as a, CODE_MIN_LENGTH as b, CODE_PATTERN as c, type CheckoutHoldInput as d, type PreviewInput as e, type PreviewInvalid as f, type PreviewOptions as g, type PreviewReason as h, type PreviewResult as i, type PreviewValid as j, type PromoCodeStats as k };
237
+ export { CODE_MAX_LENGTH as C, type PromoServiceConfig as P, type RedeemInput as R, PromoCodesService as a, CODE_MIN_LENGTH as b, CODE_PATTERN as c, type CheckoutHoldInput as d, type PreviewInput as e, type PreviewInvalid as f, type PreviewOptions as g, type PreviewReason as h, type PreviewResult as i, type PreviewValid as j, type PromoCodeStats as k, type RedeemedPromoCode as l };
@@ -9,6 +9,16 @@ type PreviewInvalid = {
9
9
  valid: false;
10
10
  reason: PreviewReason;
11
11
  };
12
+ /** A code as it was applied to a subscription when it was redeemed. */
13
+ interface RedeemedPromoCode {
14
+ code: string;
15
+ valueType: PromoCodeRecord['valueType'];
16
+ /** Decimal-as-string, as the redemption recorded it. */
17
+ value: string;
18
+ durationType: PromoCodeRecord['durationType'];
19
+ durationValue: number | null;
20
+ redeemedAt: Date;
21
+ }
12
22
  interface PreviewValid {
13
23
  valid: true;
14
24
  code: string;
@@ -166,6 +176,18 @@ declare class PromoCodesService {
166
176
  * most the price it is redeemed against.
167
177
  */
168
178
  redeemInTransaction(input: RedeemInput, tx: TransactionContext): Promise<PromoCodeRedemptionRecord>;
179
+ /**
180
+ * The code redeemed for a subscription, with the values it was redeemed
181
+ * at, unless the redemption was reversed — or null.
182
+ *
183
+ * An expired redemption still counts. Its term is counted from the
184
+ * subscription's start, which lies before a trial, while a contract counts
185
+ * a discount from the first period that is paid: a code for one month
186
+ * redeemed in a thirty-day trial has expired before the customer has paid
187
+ * for anything. A code deleted since still names what was agreed, so it is
188
+ * read without the refusal `findOne` gives.
189
+ */
190
+ redeemedCodeFor(subscriptionId: string): Promise<RedeemedPromoCode | null>;
169
191
  reverse(subscriptionId: string): Promise<PromoCodeRedemptionRecord | null>;
170
192
  /**
171
193
  * Why a code does not apply to a plan, or what it takes off it. The plans
@@ -212,4 +234,4 @@ declare class PromoCodesService {
212
234
  private lowestApplicablePlanGross;
213
235
  }
214
236
 
215
- export { CODE_MAX_LENGTH as C, type PromoServiceConfig as P, type RedeemInput as R, PromoCodesService as a, CODE_MIN_LENGTH as b, CODE_PATTERN as c, type CheckoutHoldInput as d, type PreviewInput as e, type PreviewInvalid as f, type PreviewOptions as g, type PreviewReason as h, type PreviewResult as i, type PreviewValid as j, type PromoCodeStats as k };
237
+ export { CODE_MAX_LENGTH as C, type PromoServiceConfig as P, type RedeemInput as R, PromoCodesService as a, CODE_MIN_LENGTH as b, CODE_PATTERN as c, type CheckoutHoldInput as d, type PreviewInput as e, type PreviewInvalid as f, type PreviewOptions as g, type PreviewReason as h, type PreviewResult as i, type PreviewValid as j, type PromoCodeStats as k, type RedeemedPromoCode as l };
@@ -1,13 +1,13 @@
1
1
  import { PendingRegistrationRepository, ActivationOrchestrator, RegistrationAuditLogger, SubscriberPaymentMethodRepository, PendingRegistration, RegistrationBillingDetails, PaymentGatewayCallback, RegistrationOtpDelivery, UserAccountLookup, SlugAvailabilityCheck, PasswordHasher, PlanCatalogLookup, RegistrationResumeTokenSigner, RegistrationResumeDelivery, RegistrationConfiguratorLookup, RegistrationPromoPreview, PublicSignupPlan, SelectPlanInput, RegistrationAuditContext, SelectPlanResult, StartCheckoutInput, StartCheckoutResult, CleanupResult, StartRegistrationInput, StartRegistrationResult, VerifyRegistrationOtpResult, ResumeRegistrationInput, ResumeRegistrationResult, ConfiguratorCatalog, SaveRegistrationConfigInput, SaveRegistrationConfigResult, ConfiguratorPriceBreakdown, RegistrationConfigSelection } from '@saasicat/core';
2
2
  export { PasswordHasher } from '@saasicat/core';
3
- import { b as CheckoutOfferService } from '../checkout-offer.service-CCVxG9b2.cjs';
3
+ import { b as CheckoutOfferService } from '../checkout-offer.service-DmVGrT4v.cjs';
4
4
  import { OnModuleInit, OnApplicationBootstrap, CanActivate, ExecutionContext, Type, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
5
5
  import { P as PaymentGatewayRegistry, a as PaymentCallbackService } from '../payment-callback.service-CR84Xw1Z.cjs';
6
6
  import { P as ProviderSpec } from '../di-CcNeq9v-.cjs';
7
7
  export { CronExpression } from '@nestjs/schedule';
8
8
  import '../subscription-contract.service-CfNApLuP.cjs';
9
9
  import '../subscriber.service-5W6Gi-1B.cjs';
10
- import '../promo.service-BYBu6dy3.cjs';
10
+ import '../promo.service-BextPvx5.cjs';
11
11
  import '../plan-catalog-source-DWe-BGY1.cjs';
12
12
 
13
13
  /** 6-digit numeric OTP code, uniformly distributed from 100000..999999. */
@@ -1,13 +1,13 @@
1
1
  import { PendingRegistrationRepository, ActivationOrchestrator, RegistrationAuditLogger, SubscriberPaymentMethodRepository, PendingRegistration, RegistrationBillingDetails, PaymentGatewayCallback, RegistrationOtpDelivery, UserAccountLookup, SlugAvailabilityCheck, PasswordHasher, PlanCatalogLookup, RegistrationResumeTokenSigner, RegistrationResumeDelivery, RegistrationConfiguratorLookup, RegistrationPromoPreview, PublicSignupPlan, SelectPlanInput, RegistrationAuditContext, SelectPlanResult, StartCheckoutInput, StartCheckoutResult, CleanupResult, StartRegistrationInput, StartRegistrationResult, VerifyRegistrationOtpResult, ResumeRegistrationInput, ResumeRegistrationResult, ConfiguratorCatalog, SaveRegistrationConfigInput, SaveRegistrationConfigResult, ConfiguratorPriceBreakdown, RegistrationConfigSelection } from '@saasicat/core';
2
2
  export { PasswordHasher } from '@saasicat/core';
3
- import { b as CheckoutOfferService } from '../checkout-offer.service-BeHgYikI.js';
3
+ import { b as CheckoutOfferService } from '../checkout-offer.service-Yi30L4ry.js';
4
4
  import { OnModuleInit, OnApplicationBootstrap, CanActivate, ExecutionContext, Type, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
5
5
  import { P as PaymentGatewayRegistry, a as PaymentCallbackService } from '../payment-callback.service-CR84Xw1Z.js';
6
6
  import { P as ProviderSpec } from '../di-CcNeq9v-.js';
7
7
  export { CronExpression } from '@nestjs/schedule';
8
8
  import '../subscription-contract.service-CPZrTM9C.js';
9
9
  import '../subscriber.service-5W6Gi-1B.js';
10
- import '../promo.service-CFjfF0Xm.js';
10
+ import '../promo.service-Dqqh0JXn.js';
11
11
  import '../plan-catalog-source-DWe-BGY1.js';
12
12
 
13
13
  /** 6-digit numeric OTP code, uniformly distributed from 100000..999999. */
@@ -34,16 +34,16 @@ import {
34
34
  resolveModel,
35
35
  slugify,
36
36
  verifyOtpCode
37
- } from "../chunk-JBCC6C3M.js";
38
- import "../chunk-55QEDAMX.js";
39
- import "../chunk-3RLWML2S.js";
40
- import "../chunk-NDLC5GYK.js";
37
+ } from "../chunk-R3I5X262.js";
38
+ import "../chunk-WTAS2CLM.js";
39
+ import "../chunk-QWKBOLBH.js";
40
+ import "../chunk-EU4N5LET.js";
41
41
  import "../chunk-KPEMTBOP.js";
42
42
  import "../chunk-TBBZWZQT.js";
43
43
  import "../chunk-VBRYPU7V.js";
44
44
  import "../chunk-6PJE7EWO.js";
45
45
  import "../chunk-3QVGA6JX.js";
46
- import "../chunk-7NJKVC5X.js";
46
+ import "../chunk-WQNOCOI2.js";
47
47
  import "../chunk-LF6J4YYN.js";
48
48
  import "../chunk-FEQZCWUL.js";
49
49
  import "../chunk-J7NJRK3K.js";
@@ -1,13 +1,13 @@
1
1
  import "../chunk-BHZOH2DY.js";
2
2
  import {
3
3
  SubscriptionContractModule
4
- } from "../chunk-XSSWYPP5.js";
4
+ } from "../chunk-UMZCOCT5.js";
5
5
  import {
6
6
  SubscriptionContractService,
7
7
  contractLineItemToInvoiceLineItem,
8
8
  sortContractLineItemsForInvoice,
9
9
  subscriptionContractToInvoiceSnapshot
10
- } from "../chunk-NDLC5GYK.js";
10
+ } from "../chunk-EU4N5LET.js";
11
11
  import {
12
12
  SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN
13
13
  } from "../chunk-VBRYPU7V.js";