@saasicat/nest 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/_entries.cjs +1309 -519
  2. package/dist/admin/index.js +1 -1
  3. package/dist/billing/index.d.cts +7 -4
  4. package/dist/billing/index.d.ts +7 -4
  5. package/dist/billing/index.js +6 -6
  6. package/dist/catalog/index.js +4 -4
  7. package/dist/checkout-offer/index.js +2 -2
  8. package/dist/{chunk-Z3FWN3HJ.js → chunk-5ZXBXYXU.js} +3 -3
  9. package/dist/{chunk-RZVSKKXX.js → chunk-6WA4X5U3.js} +46 -45
  10. package/dist/{chunk-V34AA7C7.js → chunk-6WL6VQ7Z.js} +1 -1
  11. package/dist/{chunk-ABB2CRAS.js → chunk-74SCJ4HF.js} +1 -1
  12. package/dist/{chunk-PLJEAUFU.js → chunk-7JIHG53V.js} +76 -39
  13. package/dist/{chunk-7RRWI5LH.js → chunk-AFK2IE2L.js} +10 -10
  14. package/dist/{chunk-32EMXPU2.js → chunk-B7NRY2LV.js} +48 -17
  15. package/dist/{chunk-MDIZUVIK.js → chunk-BSK6YBLI.js} +1 -1
  16. package/dist/{chunk-R2QOSVAA.js → chunk-DQKCK7DX.js} +1 -1
  17. package/dist/{chunk-GLLCB4BP.js → chunk-EUU3B6NB.js} +17 -13
  18. package/dist/{chunk-EXOLOJFZ.js → chunk-F6DCLVBB.js} +29 -8
  19. package/dist/{chunk-5KH2O4SF.js → chunk-I77VS3YH.js} +287 -105
  20. package/dist/{chunk-YITTE646.js → chunk-KUDKD7ZG.js} +34 -14
  21. package/dist/{chunk-P3DP6GJE.js → chunk-LXUBCLRK.js} +486 -160
  22. package/dist/{chunk-GJBXOCRZ.js → chunk-ORWIGSNN.js} +45 -17
  23. package/dist/{chunk-E7AJ42AB.js → chunk-QLJHIIOY.js} +168 -28
  24. package/dist/{chunk-BOADBIGB.js → chunk-YYUXKLXK.js} +2 -2
  25. package/dist/{define-saasicat-Rc0rXrYG.d.ts → define-saasicat-CqkhnHn-.d.ts} +1 -1
  26. package/dist/{define-saasicat-CeDBX9ji.d.cts → define-saasicat-D8c6Bs4T.d.cts} +1 -1
  27. package/dist/discovery/index.d.cts +2 -2
  28. package/dist/discovery/index.d.ts +2 -2
  29. package/dist/discovery/index.js +4 -4
  30. package/dist/{enforce-quota.interceptor-DMw-bPyk.d.cts → enforce-quota.interceptor-Dk0eEtzV.d.cts} +1 -1
  31. package/dist/{enforce-quota.interceptor-CmbWX39L.d.ts → enforce-quota.interceptor-Dp8wTYro.d.ts} +1 -1
  32. package/dist/entitlement/index.js +2 -2
  33. package/dist/index.d.cts +6 -6
  34. package/dist/index.d.ts +6 -6
  35. package/dist/index.js +17 -17
  36. package/dist/{module-DgYJur6f.d.ts → module-BwD-wAor.d.ts} +1 -1
  37. package/dist/{module-CSN8j8Tp.d.cts → module-DsDkbawm.d.cts} +1 -1
  38. package/dist/platform/index.d.cts +8 -8
  39. package/dist/platform/index.d.ts +8 -8
  40. package/dist/platform/index.js +13 -13
  41. package/dist/promo/index.d.cts +3 -3
  42. package/dist/promo/index.d.ts +3 -3
  43. package/dist/promo/index.js +3 -3
  44. package/dist/registration/index.js +1 -1
  45. package/dist/{saas-platform.module-DLhoqKNA.d.ts → saas-platform.module-BQmrDGVU.d.ts} +1 -1
  46. package/dist/{saas-platform.module-D3rUTiho.d.cts → saas-platform.module-DducnQ9s.d.cts} +1 -1
  47. package/dist/{service-DX8KbGXl.d.cts → service-DPZ2W1E-.d.cts} +2 -2
  48. package/dist/{service-DX8KbGXl.d.ts → service-DPZ2W1E-.d.ts} +2 -2
  49. package/dist/subscription-contract/index.js +2 -2
  50. package/dist/{tenant-billing.controller-BwZRnJ3q.d.ts → tenant-billing.controller-b1G1yB09.d.ts} +2 -2
  51. package/dist/{tenant-billing.controller-CG4CaFUP.d.cts → tenant-billing.controller-m42YQ_Ei.d.cts} +2 -2
  52. package/dist/testing/index.d.cts +5 -5
  53. package/dist/testing/index.d.ts +5 -5
  54. package/dist/testing/index.js +33 -33
  55. package/package.json +3 -3
@@ -5,22 +5,22 @@ import {
5
5
  StaticEntitlementService,
6
6
  StaticFeatureGuard,
7
7
  StaticPlanResolver
8
- } from "../chunk-YITTE646.js";
9
- import "../chunk-GLLCB4BP.js";
10
- import "../chunk-PLJEAUFU.js";
11
- import "../chunk-5KH2O4SF.js";
12
- import "../chunk-E7AJ42AB.js";
13
- import "../chunk-32EMXPU2.js";
14
- import "../chunk-P3DP6GJE.js";
8
+ } from "../chunk-KUDKD7ZG.js";
9
+ import "../chunk-EUU3B6NB.js";
10
+ import "../chunk-7JIHG53V.js";
11
+ import "../chunk-I77VS3YH.js";
12
+ import "../chunk-QLJHIIOY.js";
13
+ import "../chunk-B7NRY2LV.js";
14
+ import "../chunk-LXUBCLRK.js";
15
15
  import "../chunk-WPUVJRIN.js";
16
16
  import "../chunk-E56W4U2P.js";
17
- import "../chunk-GJBXOCRZ.js";
18
- import "../chunk-MDIZUVIK.js";
17
+ import "../chunk-ORWIGSNN.js";
18
+ import "../chunk-BSK6YBLI.js";
19
19
  import "../chunk-YSC46BGM.js";
20
- import "../chunk-V34AA7C7.js";
21
- import "../chunk-Z3FWN3HJ.js";
22
- import "../chunk-EXOLOJFZ.js";
23
- import "../chunk-R2QOSVAA.js";
20
+ import "../chunk-6WL6VQ7Z.js";
21
+ import "../chunk-5ZXBXYXU.js";
22
+ import "../chunk-F6DCLVBB.js";
23
+ import "../chunk-DQKCK7DX.js";
24
24
  import "../chunk-NYLON2VC.js";
25
25
  import "../chunk-WKVBNTYC.js";
26
26
  import "../chunk-L4KTQ6CL.js";
@@ -122,10 +122,10 @@ var FakeSubscriptionBundleRepository = class {
122
122
  async cancel(subscriptionBundleId, data) {
123
123
  const existing = this.byId.get(subscriptionBundleId);
124
124
  if (!existing) {
125
- throw new Error(`SubscriptionBundle '${subscriptionBundleId}' nicht gefunden`);
125
+ throw new Error(`SubscriptionBundle '${subscriptionBundleId}' not found`);
126
126
  }
127
127
  if (existing.canceledAt !== null) {
128
- throw new Error(`SubscriptionBundle '${subscriptionBundleId}' ist bereits gek\xFCndigt`);
128
+ throw new Error(`SubscriptionBundle '${subscriptionBundleId}' is already cancelled`);
129
129
  }
130
130
  const updated = {
131
131
  ...existing,
@@ -139,7 +139,7 @@ var FakeSubscriptionBundleRepository = class {
139
139
  async reactivate(subscriptionBundleId) {
140
140
  const existing = this.byId.get(subscriptionBundleId);
141
141
  if (!existing) {
142
- throw new Error(`SubscriptionBundle '${subscriptionBundleId}' nicht gefunden`);
142
+ throw new Error(`SubscriptionBundle '${subscriptionBundleId}' not found`);
143
143
  }
144
144
  const updated = {
145
145
  ...existing,
@@ -249,7 +249,7 @@ var FakeSubscriptionContractRepository = class {
249
249
  }
250
250
  async terminate(contractId, data) {
251
251
  const existing = this.byId.get(contractId);
252
- if (!existing) throw new Error(`SubscriptionContract '${contractId}' nicht gefunden`);
252
+ if (!existing) throw new Error(`SubscriptionContract '${contractId}' not found`);
253
253
  const updated = {
254
254
  ...existing,
255
255
  status: data.status,
@@ -409,7 +409,7 @@ var FakeBundleRepository = class {
409
409
  }
410
410
  async update(bundleId, data) {
411
411
  const existing = this.bundles.get(bundleId);
412
- if (!existing) throw new Error(`Bundle '${bundleId}' nicht gefunden`);
412
+ if (!existing) throw new Error(`Bundle '${bundleId}' not found`);
413
413
  const updated = {
414
414
  ...existing,
415
415
  label: data.label ?? existing.label,
@@ -424,7 +424,7 @@ var FakeBundleRepository = class {
424
424
  }
425
425
  async softDelete(bundleId) {
426
426
  const existing = this.bundles.get(bundleId);
427
- if (!existing) throw new Error(`Bundle '${bundleId}' nicht gefunden`);
427
+ if (!existing) throw new Error(`Bundle '${bundleId}' not found`);
428
428
  this.bundles.set(bundleId, {
429
429
  ...existing,
430
430
  deletedAt: this.nowIso()
@@ -456,7 +456,7 @@ var FakeBundleRepository = class {
456
456
  async createDraft(data) {
457
457
  const draft = await this.findCurrentDraft(data.bundleId);
458
458
  if (draft) {
459
- throw new Error(`Bundle '${data.bundleId}' hat bereits eine Draft-Version v${draft.version}`);
459
+ throw new Error(`Bundle '${data.bundleId}' already has a draft version v${draft.version}`);
460
460
  }
461
461
  const all = await this.listVersions(data.bundleId);
462
462
  const nextVersion = all.length === 0 ? 1 : Math.max(...all.map((v) => v.version)) + 1;
@@ -492,7 +492,7 @@ var FakeBundleRepository = class {
492
492
  }
493
493
  async updateDraft(versionId, data) {
494
494
  const existing = this.versions.get(versionId);
495
- if (!existing) throw new Error(`BundleVersion '${versionId}' nicht gefunden`);
495
+ if (!existing) throw new Error(`BundleVersion '${versionId}' not found`);
496
496
  const updated = {
497
497
  ...existing,
498
498
  features: data.features ?? existing.features,
@@ -514,15 +514,15 @@ var FakeBundleRepository = class {
514
514
  const existing = this.versions.get(versionId);
515
515
  if (!existing) return;
516
516
  if (existing.publishedAt !== null) {
517
- throw new Error(`BundleVersion '${versionId}' ist bereits published`);
517
+ throw new Error(`BundleVersion '${versionId}' is already published`);
518
518
  }
519
519
  this.versions.delete(versionId);
520
520
  }
521
521
  async publishDraft(versionId, publishMeta) {
522
522
  const draft = this.versions.get(versionId);
523
- if (!draft) throw new Error(`BundleVersion '${versionId}' nicht gefunden`);
523
+ if (!draft) throw new Error(`BundleVersion '${versionId}' not found`);
524
524
  if (draft.publishedAt !== null) {
525
- throw new Error(`BundleVersion '${versionId}' ist bereits published`);
525
+ throw new Error(`BundleVersion '${versionId}' is already published`);
526
526
  }
527
527
  const now = this.nowIso();
528
528
  const validFromIso = publishMeta.validFrom.toISOString();
@@ -598,7 +598,7 @@ var FakeMarketingProjectionRepository = class {
598
598
  const locale = data.locale ?? "de";
599
599
  const existing = await this.findByTarget(data.targetType, data.targetVersionId, locale);
600
600
  if (existing) {
601
- throw new Error(`MarketingProjection f\xFCr ${data.targetType}/${data.targetVersionId}/${locale} existiert bereits`);
601
+ throw new Error(`Marketing projection for ${data.targetType}/${data.targetVersionId}/${locale} already exists`);
602
602
  }
603
603
  const now = this.nowIso();
604
604
  const row = {
@@ -626,7 +626,7 @@ var FakeMarketingProjectionRepository = class {
626
626
  }
627
627
  async update(id, data) {
628
628
  const existing = this.rows.get(id);
629
- if (!existing) throw new Error(`MarketingProjection '${id}' nicht gefunden`);
629
+ if (!existing) throw new Error(`MarketingProjection '${id}' not found`);
630
630
  const updated = {
631
631
  ...existing,
632
632
  displayLabel: data.displayLabel ?? existing.displayLabel,
@@ -646,7 +646,7 @@ var FakeMarketingProjectionRepository = class {
646
646
  return updated;
647
647
  }
648
648
  async delete(id) {
649
- if (!this.rows.has(id)) throw new Error(`MarketingProjection '${id}' nicht gefunden`);
649
+ if (!this.rows.has(id)) throw new Error(`MarketingProjection '${id}' not found`);
650
650
  this.rows.delete(id);
651
651
  }
652
652
  };
@@ -720,7 +720,7 @@ var FakePlanRepository = class {
720
720
  }
721
721
  async update(planId, data) {
722
722
  const existing = this.plans.get(planId);
723
- if (!existing) throw new Error(`Plan '${planId}' nicht gefunden`);
723
+ if (!existing) throw new Error(`Plan '${planId}' not found`);
724
724
  const updated = {
725
725
  ...existing,
726
726
  label: data.label ?? existing.label,
@@ -734,7 +734,7 @@ var FakePlanRepository = class {
734
734
  }
735
735
  async softDelete(planId) {
736
736
  const existing = this.plans.get(planId);
737
- if (!existing) throw new Error(`Plan '${planId}' nicht gefunden`);
737
+ if (!existing) throw new Error(`Plan '${planId}' not found`);
738
738
  const updated = {
739
739
  ...existing,
740
740
  deletedAt: this.nowIso(),
@@ -851,7 +851,7 @@ var FakePlanRepository = class {
851
851
  }
852
852
  async updatePlanVersionDraft(versionId, data) {
853
853
  const existing = this.versions.get(versionId);
854
- if (!existing) throw new Error(`PlanVersion '${versionId}' nicht gefunden`);
854
+ if (!existing) throw new Error(`PlanVersion '${versionId}' not found`);
855
855
  const updated = {
856
856
  ...existing,
857
857
  features: data.features ?? existing.features,
@@ -868,7 +868,7 @@ var FakePlanRepository = class {
868
868
  }
869
869
  async publishPlanVersionDraft(versionId, publishMeta) {
870
870
  const draft = this.versions.get(versionId);
871
- if (!draft) throw new Error(`PlanVersion '${versionId}' nicht gefunden`);
871
+ if (!draft) throw new Error(`PlanVersion '${versionId}' not found`);
872
872
  const planKey = draft.planId;
873
873
  const now = this.nowIso();
874
874
  const dayMs = 24 * 60 * 60 * 1e3;
@@ -900,14 +900,14 @@ var FakePlanRepository = class {
900
900
  const existing = this.versions.get(versionId);
901
901
  if (!existing) return;
902
902
  if (existing.publishedAt !== null) {
903
- throw new Error(`FakePlanRepository: PlanVersion '${versionId}' ist bereits published \u2014 Discard nicht erlaubt`);
903
+ throw new Error(`FakePlanRepository: plan version '${versionId}' is already published \u2014 discard is not allowed`);
904
904
  }
905
905
  this.versions.delete(versionId);
906
906
  }
907
907
  async terminate(versionId, endsAt) {
908
908
  const existing = this.versions.get(versionId);
909
909
  if (!existing) {
910
- throw new Error(`FakePlanRepository: PlanVersion '${versionId}' nicht gefunden`);
910
+ throw new Error(`FakePlanRepository: PlanVersion '${versionId}' not found`);
911
911
  }
912
912
  const updated = {
913
913
  ...existing,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasicat/nest",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "NestJS implementation of SaaSiCat: capability discovery, catalog packaging, contracts, entitlement enforcement, billing and admin APIs.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -137,8 +137,8 @@
137
137
  "js-yaml": "^4.3.1",
138
138
  "otplib": "^13.4.1",
139
139
  "qrcode": "^1.5.4",
140
- "@saasicat/spec": "^0.18.0",
141
- "@saasicat/types": "^0.18.0"
140
+ "@saasicat/spec": "^0.19.0",
141
+ "@saasicat/types": "^0.19.0"
142
142
  },
143
143
  "peerDependencies": {
144
144
  "@nestjs/common": "^11.0.0",