@saasicat/nest 0.5.0 → 0.7.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.
- package/dist/admin/index.cjs +3 -8
- package/dist/admin/index.d.cts +5 -33
- package/dist/admin/index.d.ts +5 -33
- package/dist/admin/index.js +2 -2
- package/dist/{admin-manifest.config-DxTfZ8-L.d.cts → admin-manifest.config-DyrQNT7M.d.cts} +1 -1
- package/dist/{admin-manifest.config-DxTfZ8-L.d.ts → admin-manifest.config-DyrQNT7M.d.ts} +1 -1
- package/dist/admin-manifest.service-Cp6uwvmt.d.cts +33 -0
- package/dist/admin-manifest.service-UGgzR1x-.d.ts +33 -0
- package/dist/{aggregation-DGCyoN5d.d.ts → aggregation-BibpEO0t.d.ts} +6 -59
- package/dist/{aggregation-Bt1i_whS.d.cts → aggregation-CfI0bOsQ.d.cts} +6 -59
- package/dist/billing/index.cjs +19 -107
- package/dist/billing/index.d.cts +8 -30
- package/dist/billing/index.d.ts +8 -30
- package/dist/billing/index.js +6 -8
- package/dist/catalog/index.cjs +1160 -1985
- package/dist/catalog/index.d.cts +9 -124
- package/dist/catalog/index.d.ts +9 -124
- package/dist/catalog/index.js +3 -25
- package/dist/checkout-offer/index.js +2 -2
- package/dist/{chunk-2VNZYRDV.js → chunk-52UTQRD3.js} +1 -1
- package/dist/{chunk-V7HUZ6UQ.js → chunk-5DDCSGZC.js} +1106 -1919
- package/dist/{chunk-S2OZ5RIM.js → chunk-6LP7CDS2.js} +15 -68
- package/dist/{chunk-NWLOILP6.js → chunk-A2QBXDJC.js} +15 -7
- package/dist/{chunk-XSGU2Y2O.js → chunk-CK54YKVK.js} +2 -33
- package/dist/{chunk-SYEVGPFC.js → chunk-K3OPNVFR.js} +1 -1
- package/dist/{chunk-XCZ3TTFK.js → chunk-N3WANKSA.js} +0 -2
- package/dist/{chunk-MV6LW5UB.js → chunk-R2QOSVAA.js} +2 -2
- package/dist/{chunk-NFOSITWB.js → chunk-RZU4HIAN.js} +12 -45
- package/dist/{chunk-YNEW3L63.js → chunk-SD3TT2BR.js} +1 -1
- package/dist/{chunk-P6MYZMXQ.js → chunk-U6HT27J7.js} +3 -8
- package/dist/{chunk-7MLGHWKO.js → chunk-WKVBNTYC.js} +2 -0
- package/dist/{chunk-ZL4LLE2Z.js → chunk-ZLUGQE5D.js} +1 -1
- package/dist/{enforce-quota.interceptor-3HmbeHTM.d.ts → enforce-quota.interceptor-Dj1Kusr5.d.ts} +9 -4
- package/dist/{enforce-quota.interceptor-HmdZFg41.d.cts → enforce-quota.interceptor-cv7r80VM.d.cts} +9 -4
- package/dist/entitlement/index.cjs +13 -46
- package/dist/entitlement/index.d.cts +4 -3
- package/dist/entitlement/index.d.ts +4 -3
- package/dist/entitlement/index.js +6 -8
- package/dist/index.cjs +1348 -2300
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +14 -42
- package/dist/platform/index.cjs +28 -54
- package/dist/platform/index.d.cts +4 -3
- package/dist/platform/index.d.ts +4 -3
- package/dist/platform/index.js +9 -6
- package/dist/promo/index.cjs +2 -2
- package/dist/promo/index.js +3 -3
- package/dist/registration/index.cjs +2 -34
- package/dist/registration/index.d.cts +3 -21
- package/dist/registration/index.d.ts +3 -21
- package/dist/registration/index.js +1 -3
- package/dist/testing/index.cjs +26 -255
- package/dist/testing/index.d.cts +5 -37
- package/dist/testing/index.d.ts +5 -37
- package/dist/testing/index.js +6 -206
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PromoCodesService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZLUGQE5D.js";
|
|
4
4
|
import {
|
|
5
5
|
SubscriptionContractService
|
|
6
6
|
} from "./chunk-2PNX2QL2.js";
|
|
@@ -28,21 +28,24 @@ import {
|
|
|
28
28
|
SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN,
|
|
29
29
|
isLimitExceededError,
|
|
30
30
|
toEffectiveLimitsSnapshot
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-RZU4HIAN.js";
|
|
32
32
|
import {
|
|
33
33
|
PLAN_CATALOG_TOKEN,
|
|
34
34
|
findPlan,
|
|
35
35
|
getMarketedPlans,
|
|
36
36
|
getPlanPriceNet
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-R2QOSVAA.js";
|
|
38
38
|
import {
|
|
39
39
|
SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN
|
|
40
40
|
} from "./chunk-NYLON2VC.js";
|
|
41
|
+
import {
|
|
42
|
+
ENTITLEMENT_SERVICE_TOKEN
|
|
43
|
+
} from "./chunk-WKVBNTYC.js";
|
|
41
44
|
import {
|
|
42
45
|
BUNDLE_REPOSITORY_TOKEN,
|
|
43
46
|
CATALOG_ENTRY_REPOSITORY_TOKEN,
|
|
44
47
|
PLAN_REPOSITORY_TOKEN
|
|
45
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-N3WANKSA.js";
|
|
46
49
|
import {
|
|
47
50
|
asProvider
|
|
48
51
|
} from "./chunk-SABTXESR.js";
|
|
@@ -273,7 +276,7 @@ var FeatureGuard = class _FeatureGuard {
|
|
|
273
276
|
FeatureGuard = _ts_decorate([
|
|
274
277
|
Injectable(),
|
|
275
278
|
_ts_param(0, Inject(Reflector)),
|
|
276
|
-
_ts_param(1, Inject(
|
|
279
|
+
_ts_param(1, Inject(ENTITLEMENT_SERVICE_TOKEN)),
|
|
277
280
|
_ts_param(2, Optional()),
|
|
278
281
|
_ts_param(2, Inject(FEATURE_GUARD_CONFIG_TOKEN)),
|
|
279
282
|
_ts_param(3, Optional()),
|
|
@@ -294,7 +297,6 @@ import { buildFeatureRequiresIndex, collectUnsatisfiedRequires } from "@saasicat
|
|
|
294
297
|
// src/billing/public-catalog.tokens.ts
|
|
295
298
|
var PUBLIC_CATALOG_PROJECT_KEY_TOKEN = /* @__PURE__ */ Symbol("PUBLIC_CATALOG_PROJECT_KEY");
|
|
296
299
|
var PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("PUBLIC_CATALOG_BUNDLE_REPOSITORY");
|
|
297
|
-
var PUBLIC_CATALOG_BUSINESS_TYPE_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("PUBLIC_CATALOG_BUSINESS_TYPE_REPOSITORY");
|
|
298
300
|
var PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("PUBLIC_CATALOG_MARKETING_REPOSITORY");
|
|
299
301
|
var PUBLIC_CATALOG_CATALOG_ENTRY_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("PUBLIC_CATALOG_CATALOG_ENTRY_REPOSITORY");
|
|
300
302
|
|
|
@@ -782,15 +784,13 @@ var PublicCatalogController = class {
|
|
|
782
784
|
projectKey;
|
|
783
785
|
marketingRepo;
|
|
784
786
|
bundleRepo;
|
|
785
|
-
businessTypeRepo;
|
|
786
787
|
catalogEntryRepo;
|
|
787
|
-
constructor(planCatalog, featureRegistry, projectKey = null, marketingRepo = null, bundleRepo = null,
|
|
788
|
+
constructor(planCatalog, featureRegistry, projectKey = null, marketingRepo = null, bundleRepo = null, catalogEntryRepo = null) {
|
|
788
789
|
this.planCatalog = planCatalog;
|
|
789
790
|
this.featureRegistry = featureRegistry;
|
|
790
791
|
this.projectKey = projectKey;
|
|
791
792
|
this.marketingRepo = marketingRepo;
|
|
792
793
|
this.bundleRepo = bundleRepo;
|
|
793
|
-
this.businessTypeRepo = businessTypeRepo;
|
|
794
794
|
this.catalogEntryRepo = catalogEntryRepo;
|
|
795
795
|
}
|
|
796
796
|
async listPlans(lang, localeParam = "de") {
|
|
@@ -882,41 +882,6 @@ var PublicCatalogController = class {
|
|
|
882
882
|
return /* @__PURE__ */ new Map();
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
|
-
/**
|
|
886
|
-
* SPEC_V2 §11.1 M6 Pack 2c — public catalog endpoint for BusinessTypes
|
|
887
|
-
* (stem list with live versions + bundle composition + marketing).
|
|
888
|
-
*/
|
|
889
|
-
async listBusinessTypes(lang, localeParam = "de") {
|
|
890
|
-
const locale = lang || localeParam;
|
|
891
|
-
if (!this.businessTypeRepo || !this.bundleRepo || !this.projectKey) return [];
|
|
892
|
-
const stems = await this.businessTypeRepo.list({
|
|
893
|
-
projectKey: this.projectKey
|
|
894
|
-
});
|
|
895
|
-
const out = [];
|
|
896
|
-
for (const stem of stems) {
|
|
897
|
-
const versions = await this.businessTypeRepo.listVersions(stem.id);
|
|
898
|
-
const live = versions.find((v) => v.publishedAt !== null && v.supersededAt === null);
|
|
899
|
-
if (!live) continue;
|
|
900
|
-
const bundleKeys = [];
|
|
901
|
-
for (const ref of live.bundles) {
|
|
902
|
-
const bv = await this.bundleRepo.findVersionById(ref.bundleVersionId);
|
|
903
|
-
if (bv) bundleKeys.push(bv.bundleKey);
|
|
904
|
-
}
|
|
905
|
-
const marketing = await this.lookupMarketing("BUSINESS_TYPE", live.id, locale);
|
|
906
|
-
out.push({
|
|
907
|
-
businessTypeVersionId: live.id,
|
|
908
|
-
businessTypeKey: stem.businessTypeKey,
|
|
909
|
-
label: stem.label,
|
|
910
|
-
description: stem.description ?? null,
|
|
911
|
-
monthlyNet: live.monthlyNet,
|
|
912
|
-
yearlyNet: live.yearlyNet,
|
|
913
|
-
bundleKeys,
|
|
914
|
-
quotaOverrides: live.quotaOverrides,
|
|
915
|
-
marketing
|
|
916
|
-
});
|
|
917
|
-
}
|
|
918
|
-
return out;
|
|
919
|
-
}
|
|
920
885
|
async lookupMarketing(targetType, targetVersionId, locale) {
|
|
921
886
|
if (!this.marketingRepo || !this.projectKey) return void 0;
|
|
922
887
|
const rows = await this.marketingRepo.list({
|
|
@@ -985,17 +950,6 @@ _ts_decorate7([
|
|
|
985
950
|
]),
|
|
986
951
|
_ts_metadata5("design:returntype", Promise)
|
|
987
952
|
], PublicCatalogController.prototype, "listBundles", null);
|
|
988
|
-
_ts_decorate7([
|
|
989
|
-
Get("business-types"),
|
|
990
|
-
_ts_param5(0, Query("lang")),
|
|
991
|
-
_ts_param5(1, Query("locale")),
|
|
992
|
-
_ts_metadata5("design:type", Function),
|
|
993
|
-
_ts_metadata5("design:paramtypes", [
|
|
994
|
-
String,
|
|
995
|
-
void 0
|
|
996
|
-
]),
|
|
997
|
-
_ts_metadata5("design:returntype", Promise)
|
|
998
|
-
], PublicCatalogController.prototype, "listBusinessTypes", null);
|
|
999
953
|
PublicCatalogController = _ts_decorate7([
|
|
1000
954
|
Controller2("billing"),
|
|
1001
955
|
_ts_param5(0, Inject5(PLAN_CATALOG_TOKEN)),
|
|
@@ -1007,9 +961,7 @@ PublicCatalogController = _ts_decorate7([
|
|
|
1007
961
|
_ts_param5(4, Optional3()),
|
|
1008
962
|
_ts_param5(4, Inject5(PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN)),
|
|
1009
963
|
_ts_param5(5, Optional3()),
|
|
1010
|
-
_ts_param5(5, Inject5(
|
|
1011
|
-
_ts_param5(6, Optional3()),
|
|
1012
|
-
_ts_param5(6, Inject5(PUBLIC_CATALOG_CATALOG_ENTRY_REPOSITORY_TOKEN)),
|
|
964
|
+
_ts_param5(5, Inject5(PUBLIC_CATALOG_CATALOG_ENTRY_REPOSITORY_TOKEN)),
|
|
1013
965
|
_ts_metadata5("design:type", Function),
|
|
1014
966
|
_ts_metadata5("design:paramtypes", [
|
|
1015
967
|
typeof PlanCatalog === "undefined" ? Object : PlanCatalog,
|
|
@@ -1017,7 +969,6 @@ PublicCatalogController = _ts_decorate7([
|
|
|
1017
969
|
Object,
|
|
1018
970
|
Object,
|
|
1019
971
|
Object,
|
|
1020
|
-
Object,
|
|
1021
972
|
Object
|
|
1022
973
|
])
|
|
1023
974
|
], PublicCatalogController);
|
|
@@ -1052,9 +1003,6 @@ var PublicCatalogModule = class _PublicCatalogModule {
|
|
|
1052
1003
|
if (options.bundleRepository) {
|
|
1053
1004
|
providers.push(asProvider(PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN, options.bundleRepository));
|
|
1054
1005
|
}
|
|
1055
|
-
if (options.businessTypeRepository) {
|
|
1056
|
-
providers.push(asProvider(PUBLIC_CATALOG_BUSINESS_TYPE_REPOSITORY_TOKEN, options.businessTypeRepository));
|
|
1057
|
-
}
|
|
1058
1006
|
if (options.marketingRepository) {
|
|
1059
1007
|
providers.push(asProvider(PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN, options.marketingRepository));
|
|
1060
1008
|
}
|
|
@@ -1394,7 +1342,7 @@ var PlanChangePreviewService = class {
|
|
|
1394
1342
|
PlanChangePreviewService = _ts_decorate11([
|
|
1395
1343
|
Injectable6(),
|
|
1396
1344
|
_ts_param7(0, Inject7(PLAN_CATALOG_TOKEN)),
|
|
1397
|
-
_ts_param7(1, Inject7(
|
|
1345
|
+
_ts_param7(1, Inject7(ENTITLEMENT_SERVICE_TOKEN)),
|
|
1398
1346
|
_ts_param7(2, Inject7(SUBSCRIPTION_USAGE_PORT_TOKEN)),
|
|
1399
1347
|
_ts_param7(3, Inject7(USAGE_SNAPSHOT_PORT_TOKEN)),
|
|
1400
1348
|
_ts_param7(4, Optional5()),
|
|
@@ -1622,7 +1570,7 @@ var SubscriptionContractFreezeService = class {
|
|
|
1622
1570
|
SubscriptionContractFreezeService = _ts_decorate13([
|
|
1623
1571
|
Injectable8(),
|
|
1624
1572
|
_ts_param9(0, Inject9(PLAN_CATALOG_TOKEN)),
|
|
1625
|
-
_ts_param9(1, Inject9(
|
|
1573
|
+
_ts_param9(1, Inject9(ENTITLEMENT_SERVICE_TOKEN)),
|
|
1626
1574
|
_ts_param9(2, Inject9(SubscriptionContractService)),
|
|
1627
1575
|
_ts_param9(3, Inject9(CONTRACT_FREEZE_PROJECT_KEY_TOKEN)),
|
|
1628
1576
|
_ts_param9(4, Inject9(CONTRACT_FREEZE_SOURCE_PORT_TOKEN)),
|
|
@@ -2195,7 +2143,6 @@ var TenantBillingController = class _TenantBillingController {
|
|
|
2195
2143
|
periodEnd: period?.end ?? null,
|
|
2196
2144
|
nextStatus: wasTrial ? null : "ACTIVE"
|
|
2197
2145
|
});
|
|
2198
|
-
await this.tryFreezeOnPlanChange(tenantId, dto.plan, dto.billingCycle, wasTrial);
|
|
2199
2146
|
if (dto.promoCode) {
|
|
2200
2147
|
if (!this.promoCodes) {
|
|
2201
2148
|
warnings.push("Promo-Code wurde gesendet, aber PromoCodesModule ist nicht geladen \u2014 der Code wurde NICHT eingel\xF6st.");
|
|
@@ -2217,6 +2164,7 @@ var TenantBillingController = class _TenantBillingController {
|
|
|
2217
2164
|
}
|
|
2218
2165
|
}
|
|
2219
2166
|
}
|
|
2167
|
+
await this.tryFreezeOnPlanChange(tenantId, dto.plan, dto.billingCycle, wasTrial);
|
|
2220
2168
|
this.entitlements.invalidateTenant(tenantId);
|
|
2221
2169
|
await this.auditLog(req, userId, "Subscription", tenantId, "COMPLETE_ONBOARDING_SUBSCRIPTION", {
|
|
2222
2170
|
plan: planResult.plan,
|
|
@@ -2476,7 +2424,7 @@ _ts_decorate17([
|
|
|
2476
2424
|
TenantBillingController = _ts_decorate17([
|
|
2477
2425
|
Controller3("billing"),
|
|
2478
2426
|
UseGuards2(ComposedTenantAuthGuard),
|
|
2479
|
-
_ts_param11(0, Inject11(
|
|
2427
|
+
_ts_param11(0, Inject11(ENTITLEMENT_SERVICE_TOKEN)),
|
|
2480
2428
|
_ts_param11(1, Inject11(PlanChangePreviewService)),
|
|
2481
2429
|
_ts_param11(2, Inject11(SUBSCRIPTION_USAGE_PORT_TOKEN)),
|
|
2482
2430
|
_ts_param11(3, Inject11(USAGE_SNAPSHOT_PORT_TOKEN)),
|
|
@@ -2922,7 +2870,7 @@ SubscriptionBundlePreviewService = _ts_decorate20([
|
|
|
2922
2870
|
])
|
|
2923
2871
|
], SubscriptionBundlePreviewService);
|
|
2924
2872
|
function resolveBundlePriceNet(bundleVersion, planKey, billingCycle) {
|
|
2925
|
-
const override = (bundleVersion.pricingOverrides ?? []).find((o) => o.planId === planKey
|
|
2873
|
+
const override = (bundleVersion.pricingOverrides ?? []).find((o) => o.planId === planKey);
|
|
2926
2874
|
const yearly = billingCycle === "YEARLY";
|
|
2927
2875
|
const raw = yearly ? override?.yearlyNet !== void 0 ? override.yearlyNet : bundleVersion.yearlyNet : override?.monthlyNet !== void 0 ? override.monthlyNet : bundleVersion.monthlyNet;
|
|
2928
2876
|
if (raw === null || raw === void 0) return null;
|
|
@@ -3328,7 +3276,6 @@ export {
|
|
|
3328
3276
|
FeatureGuard,
|
|
3329
3277
|
PUBLIC_CATALOG_PROJECT_KEY_TOKEN,
|
|
3330
3278
|
PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN,
|
|
3331
|
-
PUBLIC_CATALOG_BUSINESS_TYPE_REPOSITORY_TOKEN,
|
|
3332
3279
|
PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN,
|
|
3333
3280
|
CatalogBundleUpsellResolver,
|
|
3334
3281
|
LimitExceededFilter,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AdminManifestModule,
|
|
3
3
|
AdminModule
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-U6HT27J7.js";
|
|
5
5
|
import {
|
|
6
6
|
REQUIRE_FEATURE_KEY
|
|
7
7
|
} from "./chunk-Q53N43LQ.js";
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
EntitlementModule,
|
|
13
13
|
LimitExceededError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RZU4HIAN.js";
|
|
15
15
|
import {
|
|
16
16
|
PLAN_CATALOG_TOKEN,
|
|
17
17
|
PlanCatalogModule
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-R2QOSVAA.js";
|
|
19
19
|
import {
|
|
20
20
|
asProvider
|
|
21
21
|
} from "./chunk-SABTXESR.js";
|
|
@@ -470,6 +470,9 @@ var SaasPlatformModule = class _SaasPlatformModule {
|
|
|
470
470
|
if (missingCore.length) {
|
|
471
471
|
throw new Error(`SaasPlatformModule.forRoot: adapters missing (provide them via \`adapters\` or a \`persistence\` bundle): ${missingCore.join(", ")}`);
|
|
472
472
|
}
|
|
473
|
+
const mfaPort = adapters.mfa;
|
|
474
|
+
const auditPort = adapters.audit;
|
|
475
|
+
const rlsBypassPort = adapters.rlsBypass;
|
|
473
476
|
if (!options.planCatalog && (!adapters.planCatalogReadSink || !options.dbCatalog)) {
|
|
474
477
|
throw new Error("SaasPlatformModule.forRoot: either set `planCatalog` (quickstart YAML path) or, for DB hydration, BOTH a planCatalogReadSink (`adapters`/`persistence`) AND `dbCatalog` ({ projectKey, currency, vatRate }).");
|
|
475
478
|
}
|
|
@@ -515,15 +518,20 @@ var SaasPlatformModule = class _SaasPlatformModule {
|
|
|
515
518
|
snapshotPath: options.discoverySnapshotPath === void 0 ? "var/discovery-snapshot.json" : options.discoverySnapshotPath
|
|
516
519
|
}),
|
|
517
520
|
AdminModule.forRoot({
|
|
518
|
-
mfaPort
|
|
519
|
-
auditPort
|
|
520
|
-
rlsBypassPort
|
|
521
|
+
mfaPort,
|
|
522
|
+
auditPort,
|
|
523
|
+
rlsBypassPort,
|
|
521
524
|
global: true
|
|
522
525
|
}),
|
|
523
526
|
AdminManifestModule.forRoot({
|
|
524
527
|
config: options.adminManifestConfig ?? buildMinimalManifestConfig(),
|
|
525
528
|
guards: options.controller.guards,
|
|
526
|
-
reloadGuards: options.reloadGuards
|
|
529
|
+
reloadGuards: options.reloadGuards,
|
|
530
|
+
// Global like AdminModule above: apps register their manifest
|
|
531
|
+
// contribution by injecting AdminManifestService into one of
|
|
532
|
+
// their own modules (handbook §6.6). Re-exporting the module
|
|
533
|
+
// from here does not make that injection resolvable.
|
|
534
|
+
global: true
|
|
527
535
|
})
|
|
528
536
|
];
|
|
529
537
|
if (options.entitlement) {
|
|
@@ -50,7 +50,6 @@ var REGISTRATION_RESUME_DELIVERY_TOKEN = /* @__PURE__ */ Symbol("REGISTRATION_RE
|
|
|
50
50
|
var REGISTRATION_RESUME_BASE_URL_TOKEN = /* @__PURE__ */ Symbol("REGISTRATION_RESUME_BASE_URL");
|
|
51
51
|
var REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN = /* @__PURE__ */ Symbol("REGISTRATION_CONFIGURATOR_LOOKUP");
|
|
52
52
|
var REGISTRATION_PROMO_PREVIEW_TOKEN = /* @__PURE__ */ Symbol("REGISTRATION_PROMO_PREVIEW");
|
|
53
|
-
var REGISTRATION_BUSINESS_TYPE_LOOKUP_TOKEN = /* @__PURE__ */ Symbol("REGISTRATION_BUSINESS_TYPE_LOOKUP");
|
|
54
53
|
var REGISTRATION_CONFIG_TOKEN = /* @__PURE__ */ Symbol("REGISTRATION_CONFIG");
|
|
55
54
|
|
|
56
55
|
// src/registration/pending-registration.service.ts
|
|
@@ -146,9 +145,8 @@ var PendingRegistrationService = class _PendingRegistrationService {
|
|
|
146
145
|
resumeBaseUrl;
|
|
147
146
|
configuratorLookup;
|
|
148
147
|
promoPreview;
|
|
149
|
-
businessTypeLookup;
|
|
150
148
|
logger = new Logger(_PendingRegistrationService.name);
|
|
151
|
-
constructor(repo, otpDelivery, userLookup, slugCheck, passwordHasher, planCatalog, paymentProvider, paymentEventLog, activationOrchestrator, audit, resumeTokenSigner, resumeDelivery, resumeBaseUrl, configuratorLookup, promoPreview
|
|
149
|
+
constructor(repo, otpDelivery, userLookup, slugCheck, passwordHasher, planCatalog, paymentProvider, paymentEventLog, activationOrchestrator, audit, resumeTokenSigner, resumeDelivery, resumeBaseUrl, configuratorLookup, promoPreview) {
|
|
152
150
|
this.repo = repo;
|
|
153
151
|
this.otpDelivery = otpDelivery;
|
|
154
152
|
this.userLookup = userLookup;
|
|
@@ -164,7 +162,6 @@ var PendingRegistrationService = class _PendingRegistrationService {
|
|
|
164
162
|
this.resumeBaseUrl = resumeBaseUrl;
|
|
165
163
|
this.configuratorLookup = configuratorLookup;
|
|
166
164
|
this.promoPreview = promoPreview;
|
|
167
|
-
this.businessTypeLookup = businessTypeLookup;
|
|
168
165
|
}
|
|
169
166
|
async record(eventType, pendingRegistrationId, context, metadata) {
|
|
170
167
|
try {
|
|
@@ -716,14 +713,6 @@ var PendingRegistrationService = class _PendingRegistrationService {
|
|
|
716
713
|
code: "MODEL_NOT_AVAILABLE"
|
|
717
714
|
});
|
|
718
715
|
}
|
|
719
|
-
if (input.selection.businessTypeVersionId && this.businessTypeLookup) {
|
|
720
|
-
const view = await this.businessTypeLookup.findPublishedVersion(input.selection.businessTypeVersionId);
|
|
721
|
-
if (!view) {
|
|
722
|
-
throw new BadRequestException({
|
|
723
|
-
code: "BUSINESS_TYPE_NOT_AVAILABLE"
|
|
724
|
-
});
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
716
|
let promoEval;
|
|
728
717
|
if (input.selection.appliedPromoCode && this.promoPreview) {
|
|
729
718
|
const dryRun = computeBreakdown(catalog, {
|
|
@@ -890,8 +879,6 @@ PendingRegistrationService = _ts_decorate([
|
|
|
890
879
|
_ts_param(13, Inject(REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN)),
|
|
891
880
|
_ts_param(14, Optional()),
|
|
892
881
|
_ts_param(14, Inject(REGISTRATION_PROMO_PREVIEW_TOKEN)),
|
|
893
|
-
_ts_param(15, Optional()),
|
|
894
|
-
_ts_param(15, Inject(REGISTRATION_BUSINESS_TYPE_LOOKUP_TOKEN)),
|
|
895
882
|
_ts_metadata("design:type", Function),
|
|
896
883
|
_ts_metadata("design:paramtypes", [
|
|
897
884
|
typeof PendingRegistrationRepository === "undefined" ? Object : PendingRegistrationRepository,
|
|
@@ -908,8 +895,7 @@ PendingRegistrationService = _ts_decorate([
|
|
|
908
895
|
typeof RegistrationResumeDelivery === "undefined" ? Object : RegistrationResumeDelivery,
|
|
909
896
|
String,
|
|
910
897
|
typeof RegistrationConfiguratorLookup === "undefined" ? Object : RegistrationConfiguratorLookup,
|
|
911
|
-
typeof RegistrationPromoPreview === "undefined" ? Object : RegistrationPromoPreview
|
|
912
|
-
typeof RegistrationBusinessTypeLookup === "undefined" ? Object : RegistrationBusinessTypeLookup
|
|
898
|
+
typeof RegistrationPromoPreview === "undefined" ? Object : RegistrationPromoPreview
|
|
913
899
|
])
|
|
914
900
|
], PendingRegistrationService);
|
|
915
901
|
function normalizeEmail(value) {
|
|
@@ -1124,9 +1110,6 @@ var RegistrationModule = class _RegistrationModule {
|
|
|
1124
1110
|
if (options.promoPreview) {
|
|
1125
1111
|
providers.push(asProvider(REGISTRATION_PROMO_PREVIEW_TOKEN, options.promoPreview));
|
|
1126
1112
|
}
|
|
1127
|
-
if (options.businessTypeLookup) {
|
|
1128
|
-
providers.push(asProvider(REGISTRATION_BUSINESS_TYPE_LOOKUP_TOKEN, options.businessTypeLookup));
|
|
1129
|
-
}
|
|
1130
1113
|
const includeCleanupCron = options.includeCleanupCron ?? true;
|
|
1131
1114
|
if (includeCleanupCron) {
|
|
1132
1115
|
providers.push(RegistrationCleanupCron);
|
|
@@ -1470,13 +1453,6 @@ var SaveRegistrationConfigSelectionDto = class {
|
|
|
1470
1453
|
modelId;
|
|
1471
1454
|
billingCycle;
|
|
1472
1455
|
appliedPromoCode;
|
|
1473
|
-
/**
|
|
1474
|
-
* SPEC_V2 §11.1 M5.3 — optional business-type choice. UUID of a
|
|
1475
|
-
* **published** BusinessTypeVersion. The service validates existence +
|
|
1476
|
-
* live status against `RegistrationBusinessTypeLookup`. `null` = no
|
|
1477
|
-
* choice (legacy Plan-only path).
|
|
1478
|
-
*/
|
|
1479
|
-
businessTypeVersionId;
|
|
1480
1456
|
/**
|
|
1481
1457
|
* METAMODELL §17a — Bundle consistency. ID of the `CheckoutOffer` that was
|
|
1482
1458
|
* created on the pricing page (`<app>/register?offer=<id>`). Passed
|
|
@@ -1505,12 +1481,6 @@ _ts_decorate12([
|
|
|
1505
1481
|
MaxLength6(60),
|
|
1506
1482
|
_ts_metadata11("design:type", Object)
|
|
1507
1483
|
], SaveRegistrationConfigSelectionDto.prototype, "appliedPromoCode", void 0);
|
|
1508
|
-
_ts_decorate12([
|
|
1509
|
-
IsOptional3(),
|
|
1510
|
-
ValidateIf((_o, value) => value !== null),
|
|
1511
|
-
IsUUID(),
|
|
1512
|
-
_ts_metadata11("design:type", Object)
|
|
1513
|
-
], SaveRegistrationConfigSelectionDto.prototype, "businessTypeVersionId", void 0);
|
|
1514
1484
|
_ts_decorate12([
|
|
1515
1485
|
IsOptional3(),
|
|
1516
1486
|
ValidateIf((_o, value) => value !== null),
|
|
@@ -1589,7 +1559,6 @@ export {
|
|
|
1589
1559
|
REGISTRATION_RESUME_BASE_URL_TOKEN,
|
|
1590
1560
|
REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN,
|
|
1591
1561
|
REGISTRATION_PROMO_PREVIEW_TOKEN,
|
|
1592
|
-
REGISTRATION_BUSINESS_TYPE_LOOKUP_TOKEN,
|
|
1593
1562
|
REGISTRATION_CONFIG_TOKEN,
|
|
1594
1563
|
computeBreakdown,
|
|
1595
1564
|
resolveModel,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// src/catalog/tokens.ts
|
|
2
2
|
var PLAN_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("PLAN_REPOSITORY");
|
|
3
3
|
var BUNDLE_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("BUNDLE_REPOSITORY");
|
|
4
|
-
var BUSINESS_TYPE_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("BUSINESS_TYPE_REPOSITORY");
|
|
5
4
|
var MARKETING_PROJECTION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("MARKETING_PROJECTION_REPOSITORY");
|
|
6
5
|
var CATALOG_ENTRY_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("CATALOG_ENTRY_REPOSITORY");
|
|
7
6
|
var PROMOTION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("PROMOTION_REPOSITORY");
|
|
@@ -12,7 +11,6 @@ var FEATURE_UI_REGISTRY_TOKEN = /* @__PURE__ */ Symbol("FEATURE_UI_REGISTRY");
|
|
|
12
11
|
export {
|
|
13
12
|
PLAN_REPOSITORY_TOKEN,
|
|
14
13
|
BUNDLE_REPOSITORY_TOKEN,
|
|
15
|
-
BUSINESS_TYPE_REPOSITORY_TOKEN,
|
|
16
14
|
MARKETING_PROJECTION_REPOSITORY_TOKEN,
|
|
17
15
|
CATALOG_ENTRY_REPOSITORY_TOKEN,
|
|
18
16
|
PROMOTION_REPOSITORY_TOKEN,
|
|
@@ -83,8 +83,8 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
83
83
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
84
84
|
}
|
|
85
85
|
__name(_ts_decorate, "_ts_decorate");
|
|
86
|
-
var PLAN_CATALOG_TOKEN = /* @__PURE__ */ Symbol("PLAN_CATALOG");
|
|
87
|
-
var PLAN_CATALOG_READ_SINK_TOKEN = /* @__PURE__ */ Symbol("PLAN_CATALOG_READ_SINK");
|
|
86
|
+
var PLAN_CATALOG_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/PLAN_CATALOG");
|
|
87
|
+
var PLAN_CATALOG_READ_SINK_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/PLAN_CATALOG_READ_SINK");
|
|
88
88
|
var PlanCatalogModule = class _PlanCatalogModule {
|
|
89
89
|
static {
|
|
90
90
|
__name(this, "PlanCatalogModule");
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PLAN_CATALOG_TOKEN,
|
|
3
3
|
isFeaturePlannedOnly
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-R2QOSVAA.js";
|
|
5
5
|
import {
|
|
6
6
|
SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN
|
|
7
7
|
} from "./chunk-NYLON2VC.js";
|
|
8
8
|
import {
|
|
9
9
|
ENTITLEMENT_RESOLUTION_CONFIG_TOKEN,
|
|
10
|
+
ENTITLEMENT_SERVICE_TOKEN,
|
|
10
11
|
PLAN_VERSION_REPOSITORY_TOKEN,
|
|
11
12
|
SUBSCRIPTION_REPOSITORY_TOKEN,
|
|
12
13
|
TRANSACTION_RUNNER_TOKEN
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WKVBNTYC.js";
|
|
14
15
|
import {
|
|
15
16
|
BUNDLE_REPOSITORY_TOKEN
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-N3WANKSA.js";
|
|
17
18
|
import {
|
|
18
19
|
asProvider
|
|
19
20
|
} from "./chunk-SABTXESR.js";
|
|
@@ -29,25 +30,6 @@ var SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-plat
|
|
|
29
30
|
var SUBSCRIPTION_BUNDLE_CONFIG_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/SubscriptionBundleConfig");
|
|
30
31
|
|
|
31
32
|
// src/entitlement/aggregation.ts
|
|
32
|
-
function aggregateBusinessTypeQuotas(snapshot) {
|
|
33
|
-
const sums = {};
|
|
34
|
-
for (const bundle of snapshot.bundles) {
|
|
35
|
-
for (const [key, value] of Object.entries(bundle.quotas)) {
|
|
36
|
-
if (sums[key] === -1 || value === -1) {
|
|
37
|
-
sums[key] = -1;
|
|
38
|
-
} else {
|
|
39
|
-
sums[key] = (sums[key] ?? 0) + value;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
for (const [key, value] of Object.entries(snapshot.quotaOverrides)) {
|
|
44
|
-
if (value !== void 0) {
|
|
45
|
-
sums[key] = value;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return sums;
|
|
49
|
-
}
|
|
50
|
-
__name(aggregateBusinessTypeQuotas, "aggregateBusinessTypeQuotas");
|
|
51
33
|
function filterActiveSubscriptionBundles(bundles, now) {
|
|
52
34
|
return bundles.filter((b) => b.canceledEffectiveAt === null || b.canceledEffectiveAt > now);
|
|
53
35
|
}
|
|
@@ -98,16 +80,6 @@ function aggregateContractLineItemEntitlements(lineItems, fallbackPlan = "UNKNOW
|
|
|
98
80
|
};
|
|
99
81
|
}
|
|
100
82
|
__name(aggregateContractLineItemEntitlements, "aggregateContractLineItemEntitlements");
|
|
101
|
-
function collectBusinessTypeFeatures(snapshot) {
|
|
102
|
-
const set = /* @__PURE__ */ new Set();
|
|
103
|
-
for (const bundle of snapshot.bundles) {
|
|
104
|
-
for (const f of bundle.features) {
|
|
105
|
-
set.add(f);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
return Array.from(set);
|
|
109
|
-
}
|
|
110
|
-
__name(collectBusinessTypeFeatures, "collectBusinessTypeFeatures");
|
|
111
83
|
function filterPlannedOnlyFeatures(features, catalog) {
|
|
112
84
|
const out = /* @__PURE__ */ new Set();
|
|
113
85
|
for (const f of features) {
|
|
@@ -140,8 +112,6 @@ function applyCustomLimits(base, custom) {
|
|
|
140
112
|
}
|
|
141
113
|
__name(applyCustomLimits, "applyCustomLimits");
|
|
142
114
|
function aggregateLimits(input, catalog, now) {
|
|
143
|
-
const businessTypeQuotas = input.businessTypeVersion ? aggregateBusinessTypeQuotas(input.businessTypeVersion) : {};
|
|
144
|
-
const businessTypeFeatures = input.businessTypeVersion ? collectBusinessTypeFeatures(input.businessTypeVersion) : [];
|
|
145
115
|
const activeBundles = filterActiveSubscriptionBundles(input.subscriptionBundles ?? [], now);
|
|
146
116
|
const subBundleQuotas = aggregateSubscriptionBundleQuotas(activeBundles);
|
|
147
117
|
const subBundleFeatures = collectSubscriptionBundleFeatures(activeBundles);
|
|
@@ -149,13 +119,6 @@ function aggregateLimits(input, catalog, now) {
|
|
|
149
119
|
for (const [k, v] of Object.entries(input.planVersion.quotas)) {
|
|
150
120
|
quotas[k] = v;
|
|
151
121
|
}
|
|
152
|
-
for (const [k, v] of Object.entries(businessTypeQuotas)) {
|
|
153
|
-
if (quotas[k] === -1 || v === -1) {
|
|
154
|
-
quotas[k] = -1;
|
|
155
|
-
} else {
|
|
156
|
-
quotas[k] = (quotas[k] ?? 0) + v;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
122
|
for (const [k, v] of Object.entries(subBundleQuotas)) {
|
|
160
123
|
if (quotas[k] === -1 || v === -1) {
|
|
161
124
|
quotas[k] = -1;
|
|
@@ -165,7 +128,6 @@ function aggregateLimits(input, catalog, now) {
|
|
|
165
128
|
}
|
|
166
129
|
const features = /* @__PURE__ */ new Set([
|
|
167
130
|
...input.planVersion.features,
|
|
168
|
-
...businessTypeFeatures,
|
|
169
131
|
...subBundleFeatures
|
|
170
132
|
]);
|
|
171
133
|
const withCustom = applyCustomLimits({
|
|
@@ -564,7 +526,13 @@ var EntitlementModule = class _EntitlementModule {
|
|
|
564
526
|
asProvider(SUBSCRIPTION_REPOSITORY_TOKEN, options.subscriptionRepository),
|
|
565
527
|
asProvider(PLAN_VERSION_REPOSITORY_TOKEN, options.planVersionRepository),
|
|
566
528
|
asProvider(TRANSACTION_RUNNER_TOKEN, options.transactionRunner),
|
|
567
|
-
EntitlementService
|
|
529
|
+
EntitlementService,
|
|
530
|
+
// Cross-bundle-stable alias so consumers in other subpath bundles
|
|
531
|
+
// (billing/TenantBillingModule) can inject the same instance.
|
|
532
|
+
{
|
|
533
|
+
provide: ENTITLEMENT_SERVICE_TOKEN,
|
|
534
|
+
useExisting: EntitlementService
|
|
535
|
+
}
|
|
568
536
|
];
|
|
569
537
|
if (options.resolutionConfig) {
|
|
570
538
|
providers.push({
|
|
@@ -587,6 +555,7 @@ var EntitlementModule = class _EntitlementModule {
|
|
|
587
555
|
providers,
|
|
588
556
|
exports: [
|
|
589
557
|
EntitlementService,
|
|
558
|
+
ENTITLEMENT_SERVICE_TOKEN,
|
|
590
559
|
SUBSCRIPTION_REPOSITORY_TOKEN
|
|
591
560
|
]
|
|
592
561
|
};
|
|
@@ -599,12 +568,10 @@ EntitlementModule = _ts_decorate2([
|
|
|
599
568
|
export {
|
|
600
569
|
SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN,
|
|
601
570
|
SUBSCRIPTION_BUNDLE_CONFIG_TOKEN,
|
|
602
|
-
aggregateBusinessTypeQuotas,
|
|
603
571
|
filterActiveSubscriptionBundles,
|
|
604
572
|
aggregateSubscriptionBundleQuotas,
|
|
605
573
|
collectSubscriptionBundleFeatures,
|
|
606
574
|
aggregateContractLineItemEntitlements,
|
|
607
|
-
collectBusinessTypeFeatures,
|
|
608
575
|
filterPlannedOnlyFeatures,
|
|
609
576
|
applyCustomLimits,
|
|
610
577
|
aggregateLimits,
|
|
@@ -27,7 +27,8 @@ var SuperAdminGuard = class {
|
|
|
27
27
|
canActivate(context) {
|
|
28
28
|
const request = context.switchToHttp().getRequest();
|
|
29
29
|
if (!request.user) throw new ForbiddenException("Nicht authentifiziert");
|
|
30
|
-
|
|
30
|
+
const role = request.user.platformRole ?? request.user.role;
|
|
31
|
+
if (role !== "SUPER_ADMIN") {
|
|
31
32
|
throw new ForbiddenException("Nur SUPER_ADMIN-Rolle erlaubt");
|
|
32
33
|
}
|
|
33
34
|
return true;
|
|
@@ -535,7 +536,7 @@ var PLATFORM_CORE_MANIFEST_CONTRIBUTION = {
|
|
|
535
536
|
// section, see `DEFAULT_NAV_SECTIONS` in the nav-builder). The order per
|
|
536
537
|
// section is deliberately curated:
|
|
537
538
|
// Overview: dashboard
|
|
538
|
-
// Product catalog: discovery → bundles →
|
|
539
|
+
// Product catalog: discovery → bundles → plans →
|
|
539
540
|
// planVersions → marketingCatalog → promoCodes
|
|
540
541
|
// (promoCodes is appended by the app contributions
|
|
541
542
|
// and therefore lands at the end of the section)
|
|
@@ -560,12 +561,6 @@ var PLATFORM_CORE_MANIFEST_CONTRIBUTION = {
|
|
|
560
561
|
enabled: true,
|
|
561
562
|
requiredCapability: "bundles.read"
|
|
562
563
|
},
|
|
563
|
-
// SPEC_V2 §11.1 M3 — BusinessType editor in SuperAdmin.
|
|
564
|
-
// Apps with domain verticals set `businessTypes.read = true`.
|
|
565
|
-
businessTypes: {
|
|
566
|
-
enabled: true,
|
|
567
|
-
requiredCapability: "businessTypes.read"
|
|
568
|
-
},
|
|
569
564
|
plans: {
|
|
570
565
|
enabled: true,
|
|
571
566
|
requiredCapability: "plans.read"
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// src/entitlement/tokens.ts
|
|
2
|
+
var ENTITLEMENT_SERVICE_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/EntitlementService");
|
|
2
3
|
var SUBSCRIPTION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/SubscriptionRepository");
|
|
3
4
|
var PLAN_VERSION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PlanVersionRepository");
|
|
4
5
|
var TRANSACTION_RUNNER_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/TransactionRunner");
|
|
5
6
|
var ENTITLEMENT_RESOLUTION_CONFIG_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/EntitlementResolutionConfig");
|
|
6
7
|
|
|
7
8
|
export {
|
|
9
|
+
ENTITLEMENT_SERVICE_TOKEN,
|
|
8
10
|
SUBSCRIPTION_REPOSITORY_TOKEN,
|
|
9
11
|
PLAN_VERSION_REPOSITORY_TOKEN,
|
|
10
12
|
TRANSACTION_RUNNER_TOKEN,
|
package/dist/{enforce-quota.interceptor-3HmbeHTM.d.ts → enforce-quota.interceptor-Dj1Kusr5.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type, CanActivate, DynamicModule, ForwardReference, FactoryProvider, ExecutionContext, NestInterceptor, CallHandler } from '@nestjs/common';
|
|
2
2
|
import { MfaPort, AuditPort, RlsBypassPort, PlanCatalogReadSink, SubscriptionRepository, PlanVersionRepository, TransactionRunner, PlanCatalog, SaasicatPersistenceAdapter, QuotaProvider } from '@saasicat/types';
|
|
3
3
|
import { P as ProviderSpec } from './di-CcNeq9v-.js';
|
|
4
|
-
import {
|
|
4
|
+
import { A as AdminManifestConfig } from './admin-manifest.config-DyrQNT7M.js';
|
|
5
5
|
import { b as DiscoveryAppInfo } from './discovery.scanner-DLgEvuoy.js';
|
|
6
6
|
import { E as EntitlementResolutionConfig } from './plan-resolution-CFCoUkrE.js';
|
|
7
7
|
import { Reflector } from '@nestjs/core';
|
|
@@ -47,11 +47,16 @@ declare function buildTenantManifestController(options: TenantManifestController
|
|
|
47
47
|
/**
|
|
48
48
|
* Adapter bindings for the platform ports. Accepted as class tokens, values
|
|
49
49
|
* or factory specs.
|
|
50
|
+
*
|
|
51
|
+
* `mfa`/`audit`/`rlsBypass` are optional because the `persistence` bundle
|
|
52
|
+
* supplies them by default; pass them here only to override the bundle, or
|
|
53
|
+
* when wiring adapters without a bundle. The module validates that each port
|
|
54
|
+
* ends up provided by exactly one of the two paths.
|
|
50
55
|
*/
|
|
51
56
|
interface SaasPlatformAdapters {
|
|
52
|
-
mfa
|
|
53
|
-
audit
|
|
54
|
-
rlsBypass
|
|
57
|
+
mfa?: ProviderSpec<MfaPort>;
|
|
58
|
+
audit?: ProviderSpec<AuditPort>;
|
|
59
|
+
rlsBypass?: ProviderSpec<RlsBypassPort>;
|
|
55
60
|
/**
|
|
56
61
|
* Optional. If provided, `PlanCatalogModule` is hydrated from this sink
|
|
57
62
|
* (DB read at boot). If omitted, `planCatalog` MUST be passed as a ready
|
package/dist/{enforce-quota.interceptor-HmdZFg41.d.cts → enforce-quota.interceptor-cv7r80VM.d.cts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type, CanActivate, DynamicModule, ForwardReference, FactoryProvider, ExecutionContext, NestInterceptor, CallHandler } from '@nestjs/common';
|
|
2
2
|
import { MfaPort, AuditPort, RlsBypassPort, PlanCatalogReadSink, SubscriptionRepository, PlanVersionRepository, TransactionRunner, PlanCatalog, SaasicatPersistenceAdapter, QuotaProvider } from '@saasicat/types';
|
|
3
3
|
import { P as ProviderSpec } from './di-CcNeq9v-.cjs';
|
|
4
|
-
import {
|
|
4
|
+
import { A as AdminManifestConfig } from './admin-manifest.config-DyrQNT7M.cjs';
|
|
5
5
|
import { b as DiscoveryAppInfo } from './discovery.scanner-DLgEvuoy.cjs';
|
|
6
6
|
import { E as EntitlementResolutionConfig } from './plan-resolution-CFCoUkrE.cjs';
|
|
7
7
|
import { Reflector } from '@nestjs/core';
|
|
@@ -47,11 +47,16 @@ declare function buildTenantManifestController(options: TenantManifestController
|
|
|
47
47
|
/**
|
|
48
48
|
* Adapter bindings for the platform ports. Accepted as class tokens, values
|
|
49
49
|
* or factory specs.
|
|
50
|
+
*
|
|
51
|
+
* `mfa`/`audit`/`rlsBypass` are optional because the `persistence` bundle
|
|
52
|
+
* supplies them by default; pass them here only to override the bundle, or
|
|
53
|
+
* when wiring adapters without a bundle. The module validates that each port
|
|
54
|
+
* ends up provided by exactly one of the two paths.
|
|
50
55
|
*/
|
|
51
56
|
interface SaasPlatformAdapters {
|
|
52
|
-
mfa
|
|
53
|
-
audit
|
|
54
|
-
rlsBypass
|
|
57
|
+
mfa?: ProviderSpec<MfaPort>;
|
|
58
|
+
audit?: ProviderSpec<AuditPort>;
|
|
59
|
+
rlsBypass?: ProviderSpec<RlsBypassPort>;
|
|
55
60
|
/**
|
|
56
61
|
* Optional. If provided, `PlanCatalogModule` is hydrated from this sink
|
|
57
62
|
* (DB read at boot). If omitted, `planCatalog` MUST be passed as a ready
|