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

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 (46) hide show
  1. package/dist/.build-stamp +1 -1
  2. package/dist/_entries.cjs +18 -3
  3. package/dist/billing/index.d.cts +2 -2
  4. package/dist/billing/index.d.ts +2 -2
  5. package/dist/billing/index.js +10 -10
  6. package/dist/catalog/index.js +7 -7
  7. package/dist/checkout-offer/index.js +2 -2
  8. package/dist/{chunk-W6YEIY4R.js → chunk-6Z7JR4EW.js} +19 -19
  9. package/dist/{chunk-BGS4CWV2.js → chunk-7ZEGFL42.js} +1 -1
  10. package/dist/{chunk-IQTQLQD3.js → chunk-NA6O63B7.js} +5 -5
  11. package/dist/{chunk-VG2NU3CG.js → chunk-NHVDCYK5.js} +2 -2
  12. package/dist/{chunk-XMA4XYC5.js → chunk-RUNZ3X4C.js} +16 -16
  13. package/dist/{chunk-NARZ2WWK.js → chunk-SEPN52AD.js} +11 -2
  14. package/dist/{chunk-YZPVQUIW.js → chunk-TXC3LHHB.js} +1 -1
  15. package/dist/{chunk-7TVZI3KY.js → chunk-VXEYLNIB.js} +4 -1
  16. package/dist/{define-saasicat-DN-dRObd.d.ts → define-saasicat-DROBe-b1.d.ts} +1 -1
  17. package/dist/{define-saasicat-B5RmWiD2.d.cts → define-saasicat-vGBCkFys.d.cts} +1 -1
  18. package/dist/discovery/index.js +4 -4
  19. package/dist/{enforce-quota.interceptor-Cseo35Ki.d.ts → enforce-quota.interceptor-DW3etVyI.d.ts} +1 -1
  20. package/dist/{enforce-quota.interceptor-CnieZsdB.d.cts → enforce-quota.interceptor-Df0e3OWe.d.cts} +1 -1
  21. package/dist/entitlement/index.js +5 -5
  22. package/dist/index.d.cts +6 -6
  23. package/dist/index.d.ts +6 -6
  24. package/dist/index.js +138 -132
  25. package/dist/{module-options-CjeSSaBf.d.cts → module-options-BG3MzQva.d.cts} +1 -1
  26. package/dist/{module-options-DtcJqwjv.d.ts → module-options-COSEb0VW.d.ts} +1 -1
  27. package/dist/platform/index.d.cts +8 -8
  28. package/dist/platform/index.d.ts +8 -8
  29. package/dist/platform/index.js +25 -25
  30. package/dist/promo/index.d.cts +3 -3
  31. package/dist/promo/index.d.ts +3 -3
  32. package/dist/promo/index.js +8 -2
  33. package/dist/{promo.module-BY2YHHLn.d.cts → promo.module-DtvIycpt.d.cts} +1 -1
  34. package/dist/{promo.module-BUKcUWDf.d.ts → promo.module-Z8h1PNX-.d.ts} +1 -1
  35. package/dist/{promo.service-2qFgqF-a.d.cts → promo.service-BJbKAmw3.d.cts} +4 -1
  36. package/dist/{promo.service-2qFgqF-a.d.ts → promo.service-BJbKAmw3.d.ts} +4 -1
  37. package/dist/registration/index.js +1 -1
  38. package/dist/{tenant-billing.controller-DpgHCT9r.d.ts → tenant-billing.controller-BQ67mlmI.d.ts} +1 -1
  39. package/dist/{tenant-billing.controller-B6UTheK_.d.cts → tenant-billing.controller-DS8kB8a7.d.cts} +1 -1
  40. package/dist/testing/index.d.cts +5 -5
  41. package/dist/testing/index.d.ts +5 -5
  42. package/dist/testing/index.js +15 -15
  43. package/package.json +5 -4
  44. package/dist/{chunk-PK6C5R7B.js → chunk-VIJ5NJWC.js} +7 -7
  45. package/dist/{chunk-VNADKD5U.js → chunk-WOVQPXV4.js} +11 -11
  46. package/dist/{chunk-L23MLBEC.js → chunk-WUDYIPYH.js} +3 -3
package/dist/.build-stamp CHANGED
@@ -1 +1 @@
1
- 4ce374e6c108c24caab052bfab48fadc9ffe16f6573d65584b558ab5434fdbd8
1
+ a28abfbcf4bf929f9e39c7a90142778963051c310b7cf8c8f6c9ab454e4222ee
package/dist/_entries.cjs CHANGED
@@ -4744,7 +4744,7 @@ function _ts_param22(paramIndex, decorator) {
4744
4744
  __name(_ts_param22, "_ts_param");
4745
4745
  var CODE_MIN_LENGTH = 4;
4746
4746
  var CODE_MAX_LENGTH = 32;
4747
- var CODE_PATTERN = new RegExp(`^[A-Z0-9_-]{${CODE_MIN_LENGTH},${CODE_MAX_LENGTH}}$`);
4747
+ var CODE_PATTERN = /^[A-Z0-9_-]{4,32}$/;
4748
4748
  var PERCENT_MIN_EXCLUSIVE = 0;
4749
4749
  var PERCENT_MAX = 100;
4750
4750
  var DURATION_MIN = 1;
@@ -16309,6 +16309,9 @@ __name(defineSaaSiCat, "defineSaaSiCat");
16309
16309
  // src/promo/index.ts
16310
16310
  var promo_exports = {};
16311
16311
  __export(promo_exports, {
16312
+ CODE_MAX_LENGTH: () => CODE_MAX_LENGTH,
16313
+ CODE_MIN_LENGTH: () => CODE_MIN_LENGTH,
16314
+ CODE_PATTERN: () => CODE_PATTERN,
16312
16315
  CreatePromoCodeDto: () => CreatePromoCodeDto,
16313
16316
  PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN: () => PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN,
16314
16317
  PROMO_CODE_REPOSITORY_TOKEN: () => PROMO_CODE_REPOSITORY_TOKEN,
@@ -16404,10 +16407,18 @@ function verifyOtpCode(expectedHash, code) {
16404
16407
  __name(verifyOtpCode, "verifyOtpCode");
16405
16408
  function slugify(name) {
16406
16409
  const transliterated = name.toLowerCase().replace(/ß/g, "ss").replace(/ä/g, "ae").replace(/ö/g, "oe").replace(/ü/g, "ue").normalize("NFKD").replace(/[̀-ͯ]/g, "");
16407
- const slug = transliterated.replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
16410
+ const slug = trimDashes(transliterated.replace(/[^a-z0-9]+/g, "-"));
16408
16411
  return slug || "tenant";
16409
16412
  }
16410
16413
  __name(slugify, "slugify");
16414
+ function trimDashes(value) {
16415
+ let start = 0;
16416
+ let end = value.length;
16417
+ while (start < end && value[start] === "-") start += 1;
16418
+ while (end > start && value[end - 1] === "-") end -= 1;
16419
+ return value.slice(start, end);
16420
+ }
16421
+ __name(trimDashes, "trimDashes");
16411
16422
 
16412
16423
  // src/registration/registration.tokens.ts
16413
16424
  var PENDING_REGISTRATION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/PendingRegistrationRepository");
@@ -16938,7 +16949,8 @@ var PendingRegistrationService = class _PendingRegistrationService {
16938
16949
  pendingRegistrationId: pending.id,
16939
16950
  ttlMinutes: import_core43.REGISTRATION_RESUME_TTL_MINUTES
16940
16951
  });
16941
- const base = (this.resumeBaseUrl ?? "http://localhost").replace(/\/+$/, "");
16952
+ let base = this.resumeBaseUrl ?? "http://localhost";
16953
+ while (base.endsWith("/")) base = base.slice(0, -1);
16942
16954
  const url = `${base}/login?resume=${encodeURIComponent(token)}`;
16943
16955
  try {
16944
16956
  await this.resumeDelivery.sendResumeEmail({
@@ -17892,6 +17904,9 @@ __export(src_exports, {
17892
17904
  CATALOG_FEATURE_UI_REGISTRY_TOKEN: () => CATALOG_FEATURE_UI_REGISTRY_TOKEN,
17893
17905
  CATALOG_SERVICE_CONFIG_TOKEN: () => CATALOG_SERVICE_CONFIG_TOKEN,
17894
17906
  CHECKOUT_OFFER_REPOSITORY_TOKEN: () => CHECKOUT_OFFER_REPOSITORY_TOKEN,
17907
+ CODE_MAX_LENGTH: () => CODE_MAX_LENGTH,
17908
+ CODE_MIN_LENGTH: () => CODE_MIN_LENGTH,
17909
+ CODE_PATTERN: () => CODE_PATTERN,
17895
17910
  CONTRACT_FREEZE_PORT_TOKEN: () => CONTRACT_FREEZE_PORT_TOKEN,
17896
17911
  CONTRACT_FREEZE_PROJECT_KEY_TOKEN: () => CONTRACT_FREEZE_PROJECT_KEY_TOKEN,
17897
17912
  CONTRACT_FREEZE_SOURCE_PORT_TOKEN: () => CONTRACT_FREEZE_SOURCE_PORT_TOKEN,
@@ -8,10 +8,10 @@ export { Type as NestType } from '@nestjs/common';
8
8
  import { Reflector, BaseExceptionFilter } from '@nestjs/core';
9
9
  import { c as EntitlementService } from '../aggregation-B3CD0v_d.cjs';
10
10
  import { P as ProviderSpec } from '../di-CcNeq9v-.cjs';
11
- 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-B6UTheK_.cjs';
11
+ 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-DS8kB8a7.cjs';
12
12
  import { S as SubscriptionContractService } from '../subscription-contract.service-hD87MKyg.cjs';
13
13
  import '../plan-resolution-Cgo_TR1H.cjs';
14
- import '../promo.service-2qFgqF-a.cjs';
14
+ import '../promo.service-BJbKAmw3.cjs';
15
15
  import '../admin-audit.service-4P3Djdxk.cjs';
16
16
 
17
17
  /**
@@ -8,10 +8,10 @@ export { Type as NestType } from '@nestjs/common';
8
8
  import { Reflector, BaseExceptionFilter } from '@nestjs/core';
9
9
  import { c as EntitlementService } from '../aggregation-BFzW07DE.js';
10
10
  import { P as ProviderSpec } from '../di-CcNeq9v-.js';
11
- 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-DpgHCT9r.js';
11
+ 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-BQ67mlmI.js';
12
12
  import { S as SubscriptionContractService } from '../subscription-contract.service-hD87MKyg.js';
13
13
  import '../plan-resolution-Cgo_TR1H.js';
14
- import '../promo.service-2qFgqF-a.js';
14
+ import '../promo.service-BJbKAmw3.js';
15
15
  import '../admin-audit.service-4P3Djdxk.js';
16
16
 
17
17
  /**
@@ -23,7 +23,7 @@ import {
23
23
  decideRenewal,
24
24
  loadPlanCatalogFromFile,
25
25
  loadPlanCatalogFromString
26
- } from "../chunk-VG2NU3CG.js";
26
+ } from "../chunk-NHVDCYK5.js";
27
27
  import {
28
28
  BILLING_FEATURE_UI_REGISTRY_TOKEN,
29
29
  CONTRACT_FREEZE_PORT_TOKEN,
@@ -62,7 +62,8 @@ import {
62
62
  periodEndWithMinLead,
63
63
  resolveBundleCancelEffectiveAt,
64
64
  resolveBundlePriceNet
65
- } from "../chunk-W6YEIY4R.js";
65
+ } from "../chunk-6Z7JR4EW.js";
66
+ import "../chunk-VXEYLNIB.js";
66
67
  import "../chunk-KFT5AIIH.js";
67
68
  import {
68
69
  AUDIT_CONTEXT_RESOLVER_TOKEN,
@@ -78,18 +79,13 @@ import {
78
79
  classifyBundleVersionDiff,
79
80
  classifyPlanDiff
80
81
  } from "../chunk-N3L3AICU.js";
82
+ import "../chunk-O2J2HDXA.js";
81
83
  import "../chunk-BSK6YBLI.js";
84
+ import "../chunk-YSC46BGM.js";
82
85
  import {
83
86
  SUBSCRIPTION_BUNDLE_CONFIG_TOKEN,
84
87
  SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN
85
- } from "../chunk-PK6C5R7B.js";
86
- import "../chunk-VBRYPU7V.js";
87
- import "../chunk-OUDSQ3PU.js";
88
- import "../chunk-AOQJEYOL.js";
89
- import "../chunk-QUZU2M33.js";
90
- import "../chunk-7TVZI3KY.js";
91
- import "../chunk-O2J2HDXA.js";
92
- import "../chunk-YSC46BGM.js";
88
+ } from "../chunk-VIJ5NJWC.js";
93
89
  import {
94
90
  PLAN_CATALOG_READ_SINK_TOKEN,
95
91
  PLAN_CATALOG_TOKEN,
@@ -105,8 +101,12 @@ import {
105
101
  isFeatureInPlan,
106
102
  isFeaturePlannedOnly
107
103
  } from "../chunk-DQKCK7DX.js";
104
+ import "../chunk-VBRYPU7V.js";
108
105
  import "../chunk-57V6ZTI6.js";
106
+ import "../chunk-OUDSQ3PU.js";
107
+ import "../chunk-AOQJEYOL.js";
109
108
  import "../chunk-SABTXESR.js";
109
+ import "../chunk-QUZU2M33.js";
110
110
  import "../chunk-SHUYVCID.js";
111
111
  export {
112
112
  AUDIT_CONTEXT_RESOLVER_TOKEN,
@@ -6,7 +6,8 @@ import {
6
6
  runSeedGateFromFile,
7
7
  seedGateExitCode,
8
8
  validateSeedAgainstSnapshot
9
- } from "../chunk-IQTQLQD3.js";
9
+ } from "../chunk-NA6O63B7.js";
10
+ import "../chunk-74SCJ4HF.js";
10
11
  import {
11
12
  ADVISORY_STRICT_MODE_CODES,
12
13
  BundlesService,
@@ -55,10 +56,10 @@ import {
55
56
  quotaApprovalSignature,
56
57
  validateBundleDraft,
57
58
  validatePlanDraft
58
- } from "../chunk-VNADKD5U.js";
59
+ } from "../chunk-WOVQPXV4.js";
59
60
  import "../chunk-N3L3AICU.js";
60
- import "../chunk-74SCJ4HF.js";
61
- import "../chunk-WXYJHZCN.js";
61
+ import "../chunk-O2J2HDXA.js";
62
+ import "../chunk-YSC46BGM.js";
62
63
  import "../chunk-OUDSQ3PU.js";
63
64
  import {
64
65
  BUNDLE_REPOSITORY_TOKEN,
@@ -70,10 +71,9 @@ import {
70
71
  PLAN_REPOSITORY_TOKEN,
71
72
  PROMOTION_REPOSITORY_TOKEN
72
73
  } from "../chunk-AOQJEYOL.js";
73
- import "../chunk-QUZU2M33.js";
74
- import "../chunk-O2J2HDXA.js";
75
- import "../chunk-YSC46BGM.js";
76
74
  import "../chunk-SABTXESR.js";
75
+ import "../chunk-WXYJHZCN.js";
76
+ import "../chunk-QUZU2M33.js";
77
77
  import "../chunk-SHUYVCID.js";
78
78
  export {
79
79
  ADVISORY_STRICT_MODE_CODES,
@@ -6,10 +6,10 @@ import {
6
6
  CreateCheckoutOfferDto,
7
7
  UpdateCheckoutOfferDto,
8
8
  buildCheckoutOfferController
9
- } from "../chunk-L23MLBEC.js";
9
+ } from "../chunk-WUDYIPYH.js";
10
10
  import "../chunk-BSK6YBLI.js";
11
- import "../chunk-AOQJEYOL.js";
12
11
  import "../chunk-YSC46BGM.js";
12
+ import "../chunk-AOQJEYOL.js";
13
13
  import "../chunk-SABTXESR.js";
14
14
  import "../chunk-SHUYVCID.js";
15
15
  export {
@@ -1,3 +1,6 @@
1
+ import {
2
+ PromoCodesService
3
+ } from "./chunk-VXEYLNIB.js";
1
4
  import {
2
5
  SubscriptionContractService
3
6
  } from "./chunk-KFT5AIIH.js";
@@ -13,15 +16,30 @@ import {
13
16
  USER_EMAIL_RESOLVER_TOKEN,
14
17
  USER_ID_RESOLVER_TOKEN
15
18
  } from "./chunk-N3L3AICU.js";
19
+ import {
20
+ AdminAuditService
21
+ } from "./chunk-O2J2HDXA.js";
22
+ import {
23
+ SaaSiCatPublicRoute
24
+ } from "./chunk-YSC46BGM.js";
16
25
  import {
17
26
  EntitlementService,
18
27
  SUBSCRIPTION_BUNDLE_CONFIG_TOKEN,
19
28
  SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN,
20
29
  toEffectiveLimitsSnapshot
21
- } from "./chunk-PK6C5R7B.js";
30
+ } from "./chunk-VIJ5NJWC.js";
31
+ import {
32
+ PLAN_CATALOG_TOKEN,
33
+ findPlan,
34
+ getMarketedPlans,
35
+ getPlanPriceNet
36
+ } from "./chunk-DQKCK7DX.js";
22
37
  import {
23
38
  SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN
24
39
  } from "./chunk-VBRYPU7V.js";
40
+ import {
41
+ codedError
42
+ } from "./chunk-57V6ZTI6.js";
25
43
  import {
26
44
  ENTITLEMENT_SERVICE_TOKEN
27
45
  } from "./chunk-OUDSQ3PU.js";
@@ -30,24 +48,6 @@ import {
30
48
  CATALOG_ENTRY_REPOSITORY_TOKEN,
31
49
  PLAN_REPOSITORY_TOKEN
32
50
  } from "./chunk-AOQJEYOL.js";
33
- import {
34
- PromoCodesService
35
- } from "./chunk-7TVZI3KY.js";
36
- import {
37
- AdminAuditService
38
- } from "./chunk-O2J2HDXA.js";
39
- import {
40
- SaaSiCatPublicRoute
41
- } from "./chunk-YSC46BGM.js";
42
- import {
43
- PLAN_CATALOG_TOKEN,
44
- findPlan,
45
- getMarketedPlans,
46
- getPlanPriceNet
47
- } from "./chunk-DQKCK7DX.js";
48
- import {
49
- codedError
50
- } from "./chunk-57V6ZTI6.js";
51
51
  import {
52
52
  asProvider
53
53
  } from "./chunk-SABTXESR.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  EntitlementService,
3
3
  SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN
4
- } from "./chunk-PK6C5R7B.js";
4
+ } from "./chunk-VIJ5NJWC.js";
5
5
  import {
6
6
  SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN
7
7
  } from "./chunk-VBRYPU7V.js";
@@ -1,12 +1,12 @@
1
- import {
2
- ADVISORY_STRICT_MODE_CODES,
3
- validateBundleDraft,
4
- validatePlanDraft
5
- } from "./chunk-VNADKD5U.js";
6
1
  import {
7
2
  DiscoverySnapshotNotFoundError,
8
3
  loadDiscoverySnapshotFromFile
9
4
  } from "./chunk-74SCJ4HF.js";
5
+ import {
6
+ ADVISORY_STRICT_MODE_CODES,
7
+ validateBundleDraft,
8
+ validatePlanDraft
9
+ } from "./chunk-WOVQPXV4.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-SHUYVCID.js";
@@ -5,11 +5,11 @@ import {
5
5
  PUBLIC_CATALOG_PROJECT_KEY_TOKEN,
6
6
  REQUIRE_FEATURE_KEY,
7
7
  periodEndAfter
8
- } from "./chunk-W6YEIY4R.js";
8
+ } from "./chunk-6Z7JR4EW.js";
9
9
  import {
10
10
  EntitlementService,
11
11
  isLimitExceededError
12
- } from "./chunk-PK6C5R7B.js";
12
+ } from "./chunk-VIJ5NJWC.js";
13
13
  import {
14
14
  ENTITLEMENT_SERVICE_TOKEN
15
15
  } from "./chunk-OUDSQ3PU.js";
@@ -1,3 +1,6 @@
1
+ import {
2
+ PromoCodesModule
3
+ } from "./chunk-TXC3LHHB.js";
1
4
  import {
2
5
  SubscriptionContractModule
3
6
  } from "./chunk-AU3OOREM.js";
@@ -17,31 +20,22 @@ import {
17
20
  SubscriptionBundleModule,
18
21
  TenantBillingModule,
19
22
  isPlatformFeatureGuard
20
- } from "./chunk-W6YEIY4R.js";
23
+ } from "./chunk-6Z7JR4EW.js";
21
24
  import {
22
25
  CatalogModule
23
- } from "./chunk-VNADKD5U.js";
26
+ } from "./chunk-WOVQPXV4.js";
24
27
  import {
25
28
  CheckoutOfferModule
26
- } from "./chunk-L23MLBEC.js";
29
+ } from "./chunk-WUDYIPYH.js";
27
30
  import {
28
- DiscoveryModule
29
- } from "./chunk-XBYAFEOR.js";
31
+ SaaSiCatPublicRoute
32
+ } from "./chunk-YSC46BGM.js";
30
33
  import {
31
34
  EntitlementModule
32
- } from "./chunk-BGS4CWV2.js";
35
+ } from "./chunk-7ZEGFL42.js";
33
36
  import {
34
37
  LimitExceededError
35
- } from "./chunk-PK6C5R7B.js";
36
- import {
37
- ENFORCE_QUOTA_KEY
38
- } from "./chunk-QUZU2M33.js";
39
- import {
40
- PromoCodesModule
41
- } from "./chunk-YZPVQUIW.js";
42
- import {
43
- SaaSiCatPublicRoute
44
- } from "./chunk-YSC46BGM.js";
38
+ } from "./chunk-VIJ5NJWC.js";
45
39
  import {
46
40
  PLAN_CATALOG_TOKEN,
47
41
  PlanCatalogModule
@@ -52,6 +46,12 @@ import {
52
46
  import {
53
47
  asProvider
54
48
  } from "./chunk-SABTXESR.js";
49
+ import {
50
+ DiscoveryModule
51
+ } from "./chunk-XBYAFEOR.js";
52
+ import {
53
+ ENFORCE_QUOTA_KEY
54
+ } from "./chunk-QUZU2M33.js";
55
55
  import {
56
56
  __name
57
57
  } from "./chunk-SHUYVCID.js";
@@ -32,10 +32,18 @@ function verifyOtpCode(expectedHash, code) {
32
32
  __name(verifyOtpCode, "verifyOtpCode");
33
33
  function slugify(name) {
34
34
  const transliterated = name.toLowerCase().replace(/ß/g, "ss").replace(/ä/g, "ae").replace(/ö/g, "oe").replace(/ü/g, "ue").normalize("NFKD").replace(/[̀-ͯ]/g, "");
35
- const slug = transliterated.replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
35
+ const slug = trimDashes(transliterated.replace(/[^a-z0-9]+/g, "-"));
36
36
  return slug || "tenant";
37
37
  }
38
38
  __name(slugify, "slugify");
39
+ function trimDashes(value) {
40
+ let start = 0;
41
+ let end = value.length;
42
+ while (start < end && value[start] === "-") start += 1;
43
+ while (end > start && value[end - 1] === "-") end -= 1;
44
+ return value.slice(start, end);
45
+ }
46
+ __name(trimDashes, "trimDashes");
39
47
 
40
48
  // src/registration/registration.tokens.ts
41
49
  var PENDING_REGISTRATION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/PendingRegistrationRepository");
@@ -566,7 +574,8 @@ var PendingRegistrationService = class _PendingRegistrationService {
566
574
  pendingRegistrationId: pending.id,
567
575
  ttlMinutes: REGISTRATION_RESUME_TTL_MINUTES
568
576
  });
569
- const base = (this.resumeBaseUrl ?? "http://localhost").replace(/\/+$/, "");
577
+ let base = this.resumeBaseUrl ?? "http://localhost";
578
+ while (base.endsWith("/")) base = base.slice(0, -1);
570
579
  const url = `${base}/login?resume=${encodeURIComponent(token)}`;
571
580
  try {
572
581
  await this.resumeDelivery.sendResumeEmail({
@@ -8,7 +8,7 @@ import {
8
8
  PROMO_SUBSCRIPTION_LOOKUP_TOKEN,
9
9
  PROMO_TRANSACTION_RUNNER_TOKEN,
10
10
  PromoCodesService
11
- } from "./chunk-7TVZI3KY.js";
11
+ } from "./chunk-VXEYLNIB.js";
12
12
  import {
13
13
  AdminAuditService
14
14
  } from "./chunk-O2J2HDXA.js";
@@ -114,7 +114,7 @@ function _ts_param(paramIndex, decorator) {
114
114
  __name(_ts_param, "_ts_param");
115
115
  var CODE_MIN_LENGTH = 4;
116
116
  var CODE_MAX_LENGTH = 32;
117
- var CODE_PATTERN = new RegExp(`^[A-Z0-9_-]{${CODE_MIN_LENGTH},${CODE_MAX_LENGTH}}$`);
117
+ var CODE_PATTERN = /^[A-Z0-9_-]{4,32}$/;
118
118
  var PERCENT_MIN_EXCLUSIVE = 0;
119
119
  var PERCENT_MAX = 100;
120
120
  var DURATION_MIN = 1;
@@ -625,5 +625,8 @@ export {
625
625
  PROMO_REVENUE_DEDUCTION_AGGREGATOR_TOKEN,
626
626
  PROMO_TRANSACTION_RUNNER_TOKEN,
627
627
  PROMO_SERVICE_CONFIG_TOKEN,
628
+ CODE_MIN_LENGTH,
629
+ CODE_MAX_LENGTH,
630
+ CODE_PATTERN,
628
631
  PromoCodesService
629
632
  };
@@ -3,7 +3,7 @@ import { ExecutionContext, DynamicModule } from '@nestjs/common';
3
3
  import { Reflector } from '@nestjs/core';
4
4
  import { SuperAdminProvisioningPort, SetupStatusResponse, SetupRequest, SetupResult, SetupConfirmMfaRequest, SetupConfirmMfaResponse } from '@saasicat/core';
5
5
  import { h as MfaService } from './admin-stats.service-TYiSUwIR.js';
6
- import { e as SaaSiCatModuleOptions } from './module-options-DtcJqwjv.js';
6
+ import { e as SaaSiCatModuleOptions } from './module-options-COSEb0VW.js';
7
7
 
8
8
  /**
9
9
  * Shared metadata key for endpoints that intentionally run without application
@@ -3,7 +3,7 @@ import { ExecutionContext, DynamicModule } from '@nestjs/common';
3
3
  import { Reflector } from '@nestjs/core';
4
4
  import { SuperAdminProvisioningPort, SetupStatusResponse, SetupRequest, SetupResult, SetupConfirmMfaRequest, SetupConfirmMfaResponse } from '@saasicat/core';
5
5
  import { h as MfaService } from './admin-stats.service-DfKupywR.cjs';
6
- import { e as SaaSiCatModuleOptions } from './module-options-CjeSSaBf.cjs';
6
+ import { e as SaaSiCatModuleOptions } from './module-options-BG3MzQva.cjs';
7
7
 
8
8
  /**
9
9
  * Shared metadata key for endpoints that intentionally run without application
@@ -5,14 +5,14 @@ import {
5
5
  RequiresCapability,
6
6
  runHeadlessDiscoveryScan
7
7
  } from "../chunk-I7GTA3RX.js";
8
- import {
9
- DiscoveryModule,
10
- buildDiscoveryController
11
- } from "../chunk-XBYAFEOR.js";
12
8
  import {
13
9
  DiscoverySnapshotNotFoundError,
14
10
  loadDiscoverySnapshotFromFile
15
11
  } from "../chunk-74SCJ4HF.js";
12
+ import {
13
+ DiscoveryModule,
14
+ buildDiscoveryController
15
+ } from "../chunk-XBYAFEOR.js";
16
16
  import {
17
17
  DISCOVERY_APP_INFO_TOKEN,
18
18
  DISCOVERY_SNAPSHOT_PATH_TOKEN,
@@ -3,7 +3,7 @@ import { Reflector } from '@nestjs/core';
3
3
  import { F as FEATURE_GUARD_MARKER } from './tenant-billing.module-wUbsQSFG.js';
4
4
  import { Observable } from 'rxjs';
5
5
  import { PlanCatalog, QuotaProvider } from '@saasicat/core';
6
- import { o as PlanResolverPort } from './module-options-DtcJqwjv.js';
6
+ import { o as PlanResolverPort } from './module-options-COSEb0VW.js';
7
7
 
8
8
  interface StaticEntitlementSnapshot {
9
9
  planId: string | null;
@@ -3,7 +3,7 @@ import { Reflector } from '@nestjs/core';
3
3
  import { F as FEATURE_GUARD_MARKER } from './tenant-billing.module-BznC3XtW.cjs';
4
4
  import { Observable } from 'rxjs';
5
5
  import { PlanCatalog, QuotaProvider } from '@saasicat/core';
6
- import { o as PlanResolverPort } from './module-options-CjeSSaBf.cjs';
6
+ import { o as PlanResolverPort } from './module-options-BG3MzQva.cjs';
7
7
 
8
8
  interface StaticEntitlementSnapshot {
9
9
  planId: string | null;
@@ -1,7 +1,7 @@
1
1
  import "../chunk-2FR6ZL7R.js";
2
2
  import {
3
3
  EntitlementModule
4
- } from "../chunk-BGS4CWV2.js";
4
+ } from "../chunk-7ZEGFL42.js";
5
5
  import {
6
6
  EntitlementService,
7
7
  LimitExceededError,
@@ -22,8 +22,10 @@ import {
22
22
  mergeSubscriptionBundlesIntoLimits,
23
23
  resolveEntitlementPlan,
24
24
  toEffectiveLimitsSnapshot
25
- } from "../chunk-PK6C5R7B.js";
25
+ } from "../chunk-VIJ5NJWC.js";
26
+ import "../chunk-DQKCK7DX.js";
26
27
  import "../chunk-VBRYPU7V.js";
28
+ import "../chunk-57V6ZTI6.js";
27
29
  import {
28
30
  ENTITLEMENT_RESOLUTION_CONFIG_TOKEN,
29
31
  ENTITLEMENT_SERVICE_TOKEN,
@@ -32,10 +34,8 @@ import {
32
34
  TRANSACTION_RUNNER_TOKEN
33
35
  } from "../chunk-OUDSQ3PU.js";
34
36
  import "../chunk-AOQJEYOL.js";
35
- import "../chunk-QUZU2M33.js";
36
- import "../chunk-DQKCK7DX.js";
37
- import "../chunk-57V6ZTI6.js";
38
37
  import "../chunk-SABTXESR.js";
38
+ import "../chunk-QUZU2M33.js";
39
39
  import "../chunk-SHUYVCID.js";
40
40
  export {
41
41
  ENTITLEMENT_RESOLUTION_CONFIG_TOKEN,
package/dist/index.d.cts CHANGED
@@ -1,15 +1,15 @@
1
1
  export { P as ProviderSpec, a as asProvider } from './di-CcNeq9v-.cjs';
2
- import { S as SetupService } from './define-saasicat-B5RmWiD2.cjs';
3
- export { a as SAASICAT_PUBLIC_ROUTE_KEY, b as SETUP_CONFIG_TOKEN, c as SETUP_PROVISIONING_PORT_TOKEN, d as SaaSiCatModule, e as SaaSiCatPublicRoute, f as SetupConfig, g as defineSaaSiCat, i as isSaaSiCatPublicRoute } from './define-saasicat-B5RmWiD2.cjs';
2
+ import { S as SetupService } from './define-saasicat-vGBCkFys.cjs';
3
+ export { a as SAASICAT_PUBLIC_ROUTE_KEY, b as SETUP_CONFIG_TOKEN, c as SETUP_PROVISIONING_PORT_TOKEN, d as SaaSiCatModule, e as SaaSiCatPublicRoute, f as SetupConfig, g as defineSaaSiCat, i as isSaaSiCatPublicRoute } from './define-saasicat-vGBCkFys.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, PromoLabelOptions, UpdatePromoCodeDto, addCycles, buildLabel, buildPromoCodeAdminController, computeDiscountGross, computeDiscountedGross, computeIncludedVat, computeRegularStartsAt, grossFromNet, round2 } from './promo/index.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 './promo.service-2qFgqF-a.cjs';
5
+ export { C as CODE_MAX_LENGTH, a as CODE_MIN_LENGTH, b as CODE_PATTERN, c as PreviewInput, d as PreviewInvalid, e as PreviewReason, f as PreviewResult, g as PreviewValid, h as PromoCodeStats, i as PromoCodesService, P as PromoServiceConfig, R as RedeemInput } from './promo.service-BJbKAmw3.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 './promo.module-BY2YHHLn.cjs';
7
+ export { P as PromoCodesModule, a as PromoCodesModuleOptions } from './promo.module-DtvIycpt.cjs';
8
8
  export { AjvErrorLike, BILLING_FEATURE_UI_REGISTRY_TOKEN, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, FEATURE_GUARD_CONFIG_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
9
  import { SetupStatusResponse, SetupResult, SetupConfirmMfaResponse, PlatformErrorCode, PlatformErrorBody } from '@saasicat/core';
10
10
  export { BundleVersionFields, ChangeDirection, DiffResult, DiscoveredCapability, DiscoveredFeature, DiscoveredQuota, DiscoverySnapshot, PasswordHasher, PlanVersionFields, VersionChange, VersionChangeDirection, classifyBundleVersionDiff, classifyPlanDiff } from '@saasicat/core';
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, F as FEATURE_GUARD_MARKER, M as MarkedFeatureGuard, 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, E as isPlatformFeatureGuard } from './tenant-billing.module-BznC3XtW.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-B6UTheK_.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-DS8kB8a7.cjs';
13
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-B3CD0v_d.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-Cgo_TR1H.cjs';
@@ -17,7 +17,7 @@ export { ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN, AUDIT_PORT_TOKEN, AUDIT_STATS_PORT
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-DfKupywR.cjs';
18
18
  export { A as AdminAuditService } from './admin-audit.service-4P3Djdxk.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-CpvzcfCc.cjs';
20
- export { S as SaaSiCatAdapters, a as SaaSiCatAdminResourcesOptions, b as SaaSiCatAdminStatsOptions, c as SaaSiCatCatalogOptions, d as SaaSiCatCheckoutOfferOptions, e as SaaSiCatModuleOptions, f as SaaSiCatPromoCodesOptions, g as SaaSiCatSetupOptions, h as SaaSiCatSubscriptionBundlesOptions, i as SaaSiCatSubscriptionContractOptions, j as SaaSiCatTenantAuthGuards, k as SaaSiCatTenantBillingOptions, l as SetupModule, m as SetupModuleOptions } from './module-options-CjeSSaBf.cjs';
20
+ export { S as SaaSiCatAdapters, a as SaaSiCatAdminResourcesOptions, b as SaaSiCatAdminStatsOptions, c as SaaSiCatCatalogOptions, d as SaaSiCatCheckoutOfferOptions, e as SaaSiCatModuleOptions, f as SaaSiCatPromoCodesOptions, g as SaaSiCatSetupOptions, h as SaaSiCatSubscriptionBundlesOptions, i as SaaSiCatSubscriptionContractOptions, j as SaaSiCatTenantAuthGuards, k as SaaSiCatTenantBillingOptions, l as SetupModule, m as SetupModuleOptions } from './module-options-BG3MzQva.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-9cMqF95o.cjs';
package/dist/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  export { P as ProviderSpec, a as asProvider } from './di-CcNeq9v-.js';
2
- import { S as SetupService } from './define-saasicat-DN-dRObd.js';
3
- export { a as SAASICAT_PUBLIC_ROUTE_KEY, b as SETUP_CONFIG_TOKEN, c as SETUP_PROVISIONING_PORT_TOKEN, d as SaaSiCatModule, e as SaaSiCatPublicRoute, f as SetupConfig, g as defineSaaSiCat, i as isSaaSiCatPublicRoute } from './define-saasicat-DN-dRObd.js';
2
+ import { S as SetupService } from './define-saasicat-DROBe-b1.js';
3
+ export { a as SAASICAT_PUBLIC_ROUTE_KEY, b as SETUP_CONFIG_TOKEN, c as SETUP_PROVISIONING_PORT_TOKEN, d as SaaSiCatModule, e as SaaSiCatPublicRoute, f as SetupConfig, g as defineSaaSiCat, i as isSaaSiCatPublicRoute } from './define-saasicat-DROBe-b1.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, PromoLabelOptions, UpdatePromoCodeDto, addCycles, buildLabel, buildPromoCodeAdminController, computeDiscountGross, computeDiscountedGross, computeIncludedVat, computeRegularStartsAt, grossFromNet, round2 } from './promo/index.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 './promo.service-2qFgqF-a.js';
5
+ export { C as CODE_MAX_LENGTH, a as CODE_MIN_LENGTH, b as CODE_PATTERN, c as PreviewInput, d as PreviewInvalid, e as PreviewReason, f as PreviewResult, g as PreviewValid, h as PromoCodeStats, i as PromoCodesService, P as PromoServiceConfig, R as RedeemInput } from './promo.service-BJbKAmw3.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 './promo.module-BUKcUWDf.js';
7
+ export { P as PromoCodesModule, a as PromoCodesModuleOptions } from './promo.module-Z8h1PNX-.js';
8
8
  export { AjvErrorLike, BILLING_FEATURE_UI_REGISTRY_TOKEN, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, FEATURE_GUARD_CONFIG_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
9
  import { SetupStatusResponse, SetupResult, SetupConfirmMfaResponse, PlatformErrorCode, PlatformErrorBody } from '@saasicat/core';
10
10
  export { BundleVersionFields, ChangeDirection, DiffResult, DiscoveredCapability, DiscoveredFeature, DiscoveredQuota, DiscoverySnapshot, PasswordHasher, PlanVersionFields, VersionChange, VersionChangeDirection, classifyBundleVersionDiff, classifyPlanDiff } from '@saasicat/core';
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, F as FEATURE_GUARD_MARKER, M as MarkedFeatureGuard, 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, E as isPlatformFeatureGuard } from './tenant-billing.module-wUbsQSFG.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-DpgHCT9r.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-BQ67mlmI.js';
13
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-BFzW07DE.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-Cgo_TR1H.js';
@@ -17,7 +17,7 @@ export { ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN, AUDIT_PORT_TOKEN, AUDIT_STATS_PORT
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-TYiSUwIR.js';
18
18
  export { A as AdminAuditService } from './admin-audit.service-4P3Djdxk.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-DF5_Q7RD.js';
20
- export { S as SaaSiCatAdapters, a as SaaSiCatAdminResourcesOptions, b as SaaSiCatAdminStatsOptions, c as SaaSiCatCatalogOptions, d as SaaSiCatCheckoutOfferOptions, e as SaaSiCatModuleOptions, f as SaaSiCatPromoCodesOptions, g as SaaSiCatSetupOptions, h as SaaSiCatSubscriptionBundlesOptions, i as SaaSiCatSubscriptionContractOptions, j as SaaSiCatTenantAuthGuards, k as SaaSiCatTenantBillingOptions, l as SetupModule, m as SetupModuleOptions } from './module-options-DtcJqwjv.js';
20
+ export { S as SaaSiCatAdapters, a as SaaSiCatAdminResourcesOptions, b as SaaSiCatAdminStatsOptions, c as SaaSiCatCatalogOptions, d as SaaSiCatCheckoutOfferOptions, e as SaaSiCatModuleOptions, f as SaaSiCatPromoCodesOptions, g as SaaSiCatSetupOptions, h as SaaSiCatSubscriptionBundlesOptions, i as SaaSiCatSubscriptionContractOptions, j as SaaSiCatTenantAuthGuards, k as SaaSiCatTenantBillingOptions, l as SetupModule, m as SetupModuleOptions } from './module-options-COSEb0VW.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-9cMqF95o.js';