@saasicat/nest 0.4.0 → 0.6.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 +18 -106
- package/dist/billing/index.d.cts +8 -30
- package/dist/billing/index.d.ts +8 -30
- package/dist/billing/index.js +12 -14
- 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 +5 -27
- package/dist/checkout-offer/index.js +2 -2
- package/dist/{chunk-2VNZYRDV.js → chunk-52UTQRD3.js} +1 -1
- package/dist/{chunk-FN65XZKH.js → chunk-5DDCSGZC.js} +1110 -1923
- package/dist/{chunk-VHEHZMHB.js → chunk-BTL66TR6.js} +22 -75
- package/dist/{chunk-XSGU2Y2O.js → chunk-CK54YKVK.js} +2 -33
- package/dist/{chunk-SG34XT7J.js → chunk-FSGBRFLX.js} +18 -10
- package/dist/{chunk-SYEVGPFC.js → chunk-K3OPNVFR.js} +1 -1
- package/dist/{chunk-XCZ3TTFK.js → chunk-N3WANKSA.js} +0 -2
- package/dist/{chunk-K42EQPBB.js → chunk-ND7OOKOG.js} +18 -51
- package/dist/{chunk-MV6LW5UB.js → chunk-R2QOSVAA.js} +2 -2
- 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/discovery/index.js +4 -4
- 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 +7 -9
- package/dist/index.cjs +1348 -2300
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +85 -113
- 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 +10 -7
- 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 +7 -207
- package/package.json +3 -3
package/dist/platform/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
// src/platform/index.ts
|
|
32
32
|
var platform_exports = {};
|
|
33
33
|
__export(platform_exports, {
|
|
34
|
+
AdminManifestService: () => AdminManifestService,
|
|
34
35
|
EnforceQuotaInterceptor: () => EnforceQuotaInterceptor,
|
|
35
36
|
PLAN_RESOLVER_PORT_TOKEN: () => PLAN_RESOLVER_PORT_TOKEN,
|
|
36
37
|
QUOTA_PROVIDERS_TOKEN: () => QUOTA_PROVIDERS_TOKEN,
|
|
@@ -397,7 +398,8 @@ var SuperAdminGuard = class {
|
|
|
397
398
|
canActivate(context) {
|
|
398
399
|
const request = context.switchToHttp().getRequest();
|
|
399
400
|
if (!request.user) throw new import_common5.ForbiddenException("Nicht authentifiziert");
|
|
400
|
-
|
|
401
|
+
const role = request.user.platformRole ?? request.user.role;
|
|
402
|
+
if (role !== "SUPER_ADMIN") {
|
|
401
403
|
throw new import_common5.ForbiddenException("Nur SUPER_ADMIN-Rolle erlaubt");
|
|
402
404
|
}
|
|
403
405
|
return true;
|
|
@@ -676,7 +678,7 @@ var PLATFORM_CORE_MANIFEST_CONTRIBUTION = {
|
|
|
676
678
|
// section, see `DEFAULT_NAV_SECTIONS` in the nav-builder). The order per
|
|
677
679
|
// section is deliberately curated:
|
|
678
680
|
// Overview: dashboard
|
|
679
|
-
// Product catalog: discovery → bundles →
|
|
681
|
+
// Product catalog: discovery → bundles → plans →
|
|
680
682
|
// planVersions → marketingCatalog → promoCodes
|
|
681
683
|
// (promoCodes is appended by the app contributions
|
|
682
684
|
// and therefore lands at the end of the section)
|
|
@@ -701,12 +703,6 @@ var PLATFORM_CORE_MANIFEST_CONTRIBUTION = {
|
|
|
701
703
|
enabled: true,
|
|
702
704
|
requiredCapability: "bundles.read"
|
|
703
705
|
},
|
|
704
|
-
// SPEC_V2 §11.1 M3 — BusinessType editor in SuperAdmin.
|
|
705
|
-
// Apps with domain verticals set `businessTypes.read = true`.
|
|
706
|
-
businessTypes: {
|
|
707
|
-
enabled: true,
|
|
708
|
-
requiredCapability: "businessTypes.read"
|
|
709
|
-
},
|
|
710
706
|
plans: {
|
|
711
707
|
enabled: true,
|
|
712
708
|
requiredCapability: "plans.read"
|
|
@@ -1140,8 +1136,8 @@ function _ts_decorate10(decorators, target, key, desc) {
|
|
|
1140
1136
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1141
1137
|
}
|
|
1142
1138
|
__name(_ts_decorate10, "_ts_decorate");
|
|
1143
|
-
var PLAN_CATALOG_TOKEN = /* @__PURE__ */ Symbol("PLAN_CATALOG");
|
|
1144
|
-
var PLAN_CATALOG_READ_SINK_TOKEN = /* @__PURE__ */ Symbol("PLAN_CATALOG_READ_SINK");
|
|
1139
|
+
var PLAN_CATALOG_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/PLAN_CATALOG");
|
|
1140
|
+
var PLAN_CATALOG_READ_SINK_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/PLAN_CATALOG_READ_SINK");
|
|
1145
1141
|
var PlanCatalogModule = class _PlanCatalogModule {
|
|
1146
1142
|
static {
|
|
1147
1143
|
__name(this, "PlanCatalogModule");
|
|
@@ -1676,25 +1672,6 @@ function isFeaturePlannedOnly(catalog, featureKey) {
|
|
|
1676
1672
|
__name(isFeaturePlannedOnly, "isFeaturePlannedOnly");
|
|
1677
1673
|
|
|
1678
1674
|
// src/entitlement/aggregation.ts
|
|
1679
|
-
function aggregateBusinessTypeQuotas(snapshot) {
|
|
1680
|
-
const sums = {};
|
|
1681
|
-
for (const bundle of snapshot.bundles) {
|
|
1682
|
-
for (const [key, value] of Object.entries(bundle.quotas)) {
|
|
1683
|
-
if (sums[key] === -1 || value === -1) {
|
|
1684
|
-
sums[key] = -1;
|
|
1685
|
-
} else {
|
|
1686
|
-
sums[key] = (sums[key] ?? 0) + value;
|
|
1687
|
-
}
|
|
1688
|
-
}
|
|
1689
|
-
}
|
|
1690
|
-
for (const [key, value] of Object.entries(snapshot.quotaOverrides)) {
|
|
1691
|
-
if (value !== void 0) {
|
|
1692
|
-
sums[key] = value;
|
|
1693
|
-
}
|
|
1694
|
-
}
|
|
1695
|
-
return sums;
|
|
1696
|
-
}
|
|
1697
|
-
__name(aggregateBusinessTypeQuotas, "aggregateBusinessTypeQuotas");
|
|
1698
1675
|
function filterActiveSubscriptionBundles(bundles, now) {
|
|
1699
1676
|
return bundles.filter((b) => b.canceledEffectiveAt === null || b.canceledEffectiveAt > now);
|
|
1700
1677
|
}
|
|
@@ -1745,16 +1722,6 @@ function aggregateContractLineItemEntitlements(lineItems, fallbackPlan = "UNKNOW
|
|
|
1745
1722
|
};
|
|
1746
1723
|
}
|
|
1747
1724
|
__name(aggregateContractLineItemEntitlements, "aggregateContractLineItemEntitlements");
|
|
1748
|
-
function collectBusinessTypeFeatures(snapshot) {
|
|
1749
|
-
const set = /* @__PURE__ */ new Set();
|
|
1750
|
-
for (const bundle of snapshot.bundles) {
|
|
1751
|
-
for (const f of bundle.features) {
|
|
1752
|
-
set.add(f);
|
|
1753
|
-
}
|
|
1754
|
-
}
|
|
1755
|
-
return Array.from(set);
|
|
1756
|
-
}
|
|
1757
|
-
__name(collectBusinessTypeFeatures, "collectBusinessTypeFeatures");
|
|
1758
1725
|
function filterPlannedOnlyFeatures(features, catalog) {
|
|
1759
1726
|
const out = /* @__PURE__ */ new Set();
|
|
1760
1727
|
for (const f of features) {
|
|
@@ -1787,8 +1754,6 @@ function applyCustomLimits(base, custom) {
|
|
|
1787
1754
|
}
|
|
1788
1755
|
__name(applyCustomLimits, "applyCustomLimits");
|
|
1789
1756
|
function aggregateLimits(input, catalog, now) {
|
|
1790
|
-
const businessTypeQuotas = input.businessTypeVersion ? aggregateBusinessTypeQuotas(input.businessTypeVersion) : {};
|
|
1791
|
-
const businessTypeFeatures = input.businessTypeVersion ? collectBusinessTypeFeatures(input.businessTypeVersion) : [];
|
|
1792
1757
|
const activeBundles = filterActiveSubscriptionBundles(input.subscriptionBundles ?? [], now);
|
|
1793
1758
|
const subBundleQuotas = aggregateSubscriptionBundleQuotas(activeBundles);
|
|
1794
1759
|
const subBundleFeatures = collectSubscriptionBundleFeatures(activeBundles);
|
|
@@ -1796,13 +1761,6 @@ function aggregateLimits(input, catalog, now) {
|
|
|
1796
1761
|
for (const [k, v] of Object.entries(input.planVersion.quotas)) {
|
|
1797
1762
|
quotas[k] = v;
|
|
1798
1763
|
}
|
|
1799
|
-
for (const [k, v] of Object.entries(businessTypeQuotas)) {
|
|
1800
|
-
if (quotas[k] === -1 || v === -1) {
|
|
1801
|
-
quotas[k] = -1;
|
|
1802
|
-
} else {
|
|
1803
|
-
quotas[k] = (quotas[k] ?? 0) + v;
|
|
1804
|
-
}
|
|
1805
|
-
}
|
|
1806
1764
|
for (const [k, v] of Object.entries(subBundleQuotas)) {
|
|
1807
1765
|
if (quotas[k] === -1 || v === -1) {
|
|
1808
1766
|
quotas[k] = -1;
|
|
@@ -1812,7 +1770,6 @@ function aggregateLimits(input, catalog, now) {
|
|
|
1812
1770
|
}
|
|
1813
1771
|
const features = /* @__PURE__ */ new Set([
|
|
1814
1772
|
...input.planVersion.features,
|
|
1815
|
-
...businessTypeFeatures,
|
|
1816
1773
|
...subBundleFeatures
|
|
1817
1774
|
]);
|
|
1818
1775
|
const withCustom = applyCustomLimits({
|
|
@@ -1924,6 +1881,7 @@ function resolveEntitlementPlan(input, config, now) {
|
|
|
1924
1881
|
__name(resolveEntitlementPlan, "resolveEntitlementPlan");
|
|
1925
1882
|
|
|
1926
1883
|
// src/entitlement/tokens.ts
|
|
1884
|
+
var ENTITLEMENT_SERVICE_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/EntitlementService");
|
|
1927
1885
|
var SUBSCRIPTION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/SubscriptionRepository");
|
|
1928
1886
|
var PLAN_VERSION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PlanVersionRepository");
|
|
1929
1887
|
var TRANSACTION_RUNNER_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/TransactionRunner");
|
|
@@ -2193,7 +2151,13 @@ var EntitlementModule = class _EntitlementModule {
|
|
|
2193
2151
|
asProvider(SUBSCRIPTION_REPOSITORY_TOKEN, options.subscriptionRepository),
|
|
2194
2152
|
asProvider(PLAN_VERSION_REPOSITORY_TOKEN, options.planVersionRepository),
|
|
2195
2153
|
asProvider(TRANSACTION_RUNNER_TOKEN, options.transactionRunner),
|
|
2196
|
-
EntitlementService
|
|
2154
|
+
EntitlementService,
|
|
2155
|
+
// Cross-bundle-stable alias so consumers in other subpath bundles
|
|
2156
|
+
// (billing/TenantBillingModule) can inject the same instance.
|
|
2157
|
+
{
|
|
2158
|
+
provide: ENTITLEMENT_SERVICE_TOKEN,
|
|
2159
|
+
useExisting: EntitlementService
|
|
2160
|
+
}
|
|
2197
2161
|
];
|
|
2198
2162
|
if (options.resolutionConfig) {
|
|
2199
2163
|
providers.push({
|
|
@@ -2216,6 +2180,7 @@ var EntitlementModule = class _EntitlementModule {
|
|
|
2216
2180
|
providers,
|
|
2217
2181
|
exports: [
|
|
2218
2182
|
EntitlementService,
|
|
2183
|
+
ENTITLEMENT_SERVICE_TOKEN,
|
|
2219
2184
|
SUBSCRIPTION_REPOSITORY_TOKEN
|
|
2220
2185
|
]
|
|
2221
2186
|
};
|
|
@@ -2672,6 +2637,9 @@ var SaasPlatformModule = class _SaasPlatformModule {
|
|
|
2672
2637
|
if (missingCore.length) {
|
|
2673
2638
|
throw new Error(`SaasPlatformModule.forRoot: adapters missing (provide them via \`adapters\` or a \`persistence\` bundle): ${missingCore.join(", ")}`);
|
|
2674
2639
|
}
|
|
2640
|
+
const mfaPort = adapters.mfa;
|
|
2641
|
+
const auditPort = adapters.audit;
|
|
2642
|
+
const rlsBypassPort = adapters.rlsBypass;
|
|
2675
2643
|
if (!options.planCatalog && (!adapters.planCatalogReadSink || !options.dbCatalog)) {
|
|
2676
2644
|
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 }).");
|
|
2677
2645
|
}
|
|
@@ -2717,15 +2685,20 @@ var SaasPlatformModule = class _SaasPlatformModule {
|
|
|
2717
2685
|
snapshotPath: options.discoverySnapshotPath === void 0 ? "var/discovery-snapshot.json" : options.discoverySnapshotPath
|
|
2718
2686
|
}),
|
|
2719
2687
|
AdminModule.forRoot({
|
|
2720
|
-
mfaPort
|
|
2721
|
-
auditPort
|
|
2722
|
-
rlsBypassPort
|
|
2688
|
+
mfaPort,
|
|
2689
|
+
auditPort,
|
|
2690
|
+
rlsBypassPort,
|
|
2723
2691
|
global: true
|
|
2724
2692
|
}),
|
|
2725
2693
|
AdminManifestModule.forRoot({
|
|
2726
2694
|
config: options.adminManifestConfig ?? buildMinimalManifestConfig(),
|
|
2727
2695
|
guards: options.controller.guards,
|
|
2728
|
-
reloadGuards: options.reloadGuards
|
|
2696
|
+
reloadGuards: options.reloadGuards,
|
|
2697
|
+
// Global like AdminModule above: apps register their manifest
|
|
2698
|
+
// contribution by injecting AdminManifestService into one of
|
|
2699
|
+
// their own modules (handbook §6.6). Re-exporting the module
|
|
2700
|
+
// from here does not make that injection resolvable.
|
|
2701
|
+
global: true
|
|
2729
2702
|
})
|
|
2730
2703
|
];
|
|
2731
2704
|
if (options.entitlement) {
|
|
@@ -2796,6 +2769,7 @@ SaasPlatformModule = _ts_decorate21([
|
|
|
2796
2769
|
], SaasPlatformModule);
|
|
2797
2770
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2798
2771
|
0 && (module.exports = {
|
|
2772
|
+
AdminManifestService,
|
|
2799
2773
|
EnforceQuotaInterceptor,
|
|
2800
2774
|
PLAN_RESOLVER_PORT_TOKEN,
|
|
2801
2775
|
QUOTA_PROVIDERS_TOKEN,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { S as StaticEntitlementService } from '../enforce-quota.interceptor-
|
|
2
|
-
export { E as EnforceQuotaInterceptor, P as PLAN_RESOLVER_PORT_TOKEN, a as PlanResolverPort, Q as QUOTA_PROVIDERS_TOKEN, b as STATIC_FEATURE_GUARD_CONFIG_TOKEN, c as SaasPlatformAdapters, d as SaasPlatformModule, e as SaasPlatformModuleOptions, f as StaticEntitlementSnapshot, g as StaticFeatureGuard, h as StaticFeatureGuardConfig, i as StaticPlanResolver, T as TenantManifestControllerOptions, j as buildTenantManifestController } from '../enforce-quota.interceptor-
|
|
1
|
+
import { S as StaticEntitlementService } from '../enforce-quota.interceptor-cv7r80VM.cjs';
|
|
2
|
+
export { E as EnforceQuotaInterceptor, P as PLAN_RESOLVER_PORT_TOKEN, a as PlanResolverPort, Q as QUOTA_PROVIDERS_TOKEN, b as STATIC_FEATURE_GUARD_CONFIG_TOKEN, c as SaasPlatformAdapters, d as SaasPlatformModule, e as SaasPlatformModuleOptions, f as StaticEntitlementSnapshot, g as StaticFeatureGuard, h as StaticFeatureGuardConfig, i as StaticPlanResolver, T as TenantManifestControllerOptions, j as buildTenantManifestController } from '../enforce-quota.interceptor-cv7r80VM.cjs';
|
|
3
|
+
export { A as AdminManifestService } from '../admin-manifest.service-Cp6uwvmt.cjs';
|
|
3
4
|
import '@nestjs/common';
|
|
4
5
|
import '@saasicat/types';
|
|
5
6
|
import '../di-CcNeq9v-.cjs';
|
|
6
|
-
import '../admin-manifest.config-
|
|
7
|
+
import '../admin-manifest.config-DyrQNT7M.cjs';
|
|
7
8
|
import '../discovery.scanner-DLgEvuoy.cjs';
|
|
8
9
|
import '@nestjs/core';
|
|
9
10
|
import '../plan-resolution-CFCoUkrE.cjs';
|
package/dist/platform/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { S as StaticEntitlementService } from '../enforce-quota.interceptor-
|
|
2
|
-
export { E as EnforceQuotaInterceptor, P as PLAN_RESOLVER_PORT_TOKEN, a as PlanResolverPort, Q as QUOTA_PROVIDERS_TOKEN, b as STATIC_FEATURE_GUARD_CONFIG_TOKEN, c as SaasPlatformAdapters, d as SaasPlatformModule, e as SaasPlatformModuleOptions, f as StaticEntitlementSnapshot, g as StaticFeatureGuard, h as StaticFeatureGuardConfig, i as StaticPlanResolver, T as TenantManifestControllerOptions, j as buildTenantManifestController } from '../enforce-quota.interceptor-
|
|
1
|
+
import { S as StaticEntitlementService } from '../enforce-quota.interceptor-Dj1Kusr5.js';
|
|
2
|
+
export { E as EnforceQuotaInterceptor, P as PLAN_RESOLVER_PORT_TOKEN, a as PlanResolverPort, Q as QUOTA_PROVIDERS_TOKEN, b as STATIC_FEATURE_GUARD_CONFIG_TOKEN, c as SaasPlatformAdapters, d as SaasPlatformModule, e as SaasPlatformModuleOptions, f as StaticEntitlementSnapshot, g as StaticFeatureGuard, h as StaticFeatureGuardConfig, i as StaticPlanResolver, T as TenantManifestControllerOptions, j as buildTenantManifestController } from '../enforce-quota.interceptor-Dj1Kusr5.js';
|
|
3
|
+
export { A as AdminManifestService } from '../admin-manifest.service-UGgzR1x-.js';
|
|
3
4
|
import '@nestjs/common';
|
|
4
5
|
import '@saasicat/types';
|
|
5
6
|
import '../di-CcNeq9v-.js';
|
|
6
|
-
import '../admin-manifest.config-
|
|
7
|
+
import '../admin-manifest.config-DyrQNT7M.js';
|
|
7
8
|
import '../discovery.scanner-DLgEvuoy.js';
|
|
8
9
|
import '@nestjs/core';
|
|
9
10
|
import '../plan-resolution-CFCoUkrE.js';
|
package/dist/platform/index.js
CHANGED
|
@@ -9,21 +9,24 @@ import {
|
|
|
9
9
|
StaticPlanResolver,
|
|
10
10
|
TenantManifestService,
|
|
11
11
|
buildTenantManifestController
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import
|
|
12
|
+
} from "../chunk-FSGBRFLX.js";
|
|
13
|
+
import {
|
|
14
|
+
AdminManifestService
|
|
15
|
+
} from "../chunk-U6HT27J7.js";
|
|
14
16
|
import "../chunk-Q53N43LQ.js";
|
|
15
17
|
import "../chunk-E56W4U2P.js";
|
|
16
18
|
import "../chunk-AJ3EPELS.js";
|
|
17
19
|
import "../chunk-M6CZQYPY.js";
|
|
18
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-ND7OOKOG.js";
|
|
19
21
|
import "../chunk-NYLON2VC.js";
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-MV6LW5UB.js";
|
|
22
|
+
import "../chunk-R2QOSVAA.js";
|
|
23
|
+
import "../chunk-WKVBNTYC.js";
|
|
24
|
+
import "../chunk-N3WANKSA.js";
|
|
24
25
|
import "../chunk-SABTXESR.js";
|
|
26
|
+
import "../chunk-L4SUWH5B.js";
|
|
25
27
|
import "../chunk-SHUYVCID.js";
|
|
26
28
|
export {
|
|
29
|
+
AdminManifestService,
|
|
27
30
|
EnforceQuotaInterceptor,
|
|
28
31
|
PLAN_RESOLVER_PORT_TOKEN,
|
|
29
32
|
QUOTA_PROVIDERS_TOKEN,
|
package/dist/promo/index.cjs
CHANGED
|
@@ -202,8 +202,8 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
202
202
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
203
203
|
}
|
|
204
204
|
__name(_ts_decorate, "_ts_decorate");
|
|
205
|
-
var PLAN_CATALOG_TOKEN = /* @__PURE__ */ Symbol("PLAN_CATALOG");
|
|
206
|
-
var PLAN_CATALOG_READ_SINK_TOKEN = /* @__PURE__ */ Symbol("PLAN_CATALOG_READ_SINK");
|
|
205
|
+
var PLAN_CATALOG_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/PLAN_CATALOG");
|
|
206
|
+
var PLAN_CATALOG_READ_SINK_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/PLAN_CATALOG_READ_SINK");
|
|
207
207
|
var PlanCatalogModule = class _PlanCatalogModule {
|
|
208
208
|
static {
|
|
209
209
|
__name(this, "PlanCatalogModule");
|
package/dist/promo/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
PromoCodesModule,
|
|
7
7
|
hashIp,
|
|
8
8
|
ipFingerprint
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-52UTQRD3.js";
|
|
10
10
|
import {
|
|
11
11
|
PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN,
|
|
12
12
|
PROMO_CODE_REPOSITORY_TOKEN,
|
|
@@ -22,12 +22,12 @@ import {
|
|
|
22
22
|
computeDiscountGross,
|
|
23
23
|
computeDiscountedGross,
|
|
24
24
|
computeRegularStartsAt
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-ZLUGQE5D.js";
|
|
26
26
|
import {
|
|
27
27
|
computeIncludedVat,
|
|
28
28
|
grossFromNet,
|
|
29
29
|
round2
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-R2QOSVAA.js";
|
|
31
31
|
import "../chunk-SABTXESR.js";
|
|
32
32
|
import "../chunk-SHUYVCID.js";
|
|
33
33
|
export {
|
|
@@ -34,7 +34,6 @@ __export(registration_exports, {
|
|
|
34
34
|
PendingRegistrationService: () => PendingRegistrationService,
|
|
35
35
|
PreviewRegistrationPromoDto: () => PreviewRegistrationPromoDto,
|
|
36
36
|
REGISTRATION_AUDIT_LOGGER_TOKEN: () => REGISTRATION_AUDIT_LOGGER_TOKEN,
|
|
37
|
-
REGISTRATION_BUSINESS_TYPE_LOOKUP_TOKEN: () => REGISTRATION_BUSINESS_TYPE_LOOKUP_TOKEN,
|
|
38
37
|
REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN: () => REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN,
|
|
39
38
|
REGISTRATION_CONFIG_TOKEN: () => REGISTRATION_CONFIG_TOKEN,
|
|
40
39
|
REGISTRATION_OTP_DELIVERY_TOKEN: () => REGISTRATION_OTP_DELIVERY_TOKEN,
|
|
@@ -107,7 +106,6 @@ var REGISTRATION_RESUME_DELIVERY_TOKEN = /* @__PURE__ */ Symbol("REGISTRATION_RE
|
|
|
107
106
|
var REGISTRATION_RESUME_BASE_URL_TOKEN = /* @__PURE__ */ Symbol("REGISTRATION_RESUME_BASE_URL");
|
|
108
107
|
var REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN = /* @__PURE__ */ Symbol("REGISTRATION_CONFIGURATOR_LOOKUP");
|
|
109
108
|
var REGISTRATION_PROMO_PREVIEW_TOKEN = /* @__PURE__ */ Symbol("REGISTRATION_PROMO_PREVIEW");
|
|
110
|
-
var REGISTRATION_BUSINESS_TYPE_LOOKUP_TOKEN = /* @__PURE__ */ Symbol("REGISTRATION_BUSINESS_TYPE_LOOKUP");
|
|
111
109
|
var REGISTRATION_CONFIG_TOKEN = /* @__PURE__ */ Symbol("REGISTRATION_CONFIG");
|
|
112
110
|
|
|
113
111
|
// src/registration/pending-registration.service.ts
|
|
@@ -203,9 +201,8 @@ var PendingRegistrationService = class _PendingRegistrationService {
|
|
|
203
201
|
resumeBaseUrl;
|
|
204
202
|
configuratorLookup;
|
|
205
203
|
promoPreview;
|
|
206
|
-
businessTypeLookup;
|
|
207
204
|
logger = new import_common.Logger(_PendingRegistrationService.name);
|
|
208
|
-
constructor(repo, otpDelivery, userLookup, slugCheck, passwordHasher, planCatalog, paymentProvider, paymentEventLog, activationOrchestrator, audit, resumeTokenSigner, resumeDelivery, resumeBaseUrl, configuratorLookup, promoPreview
|
|
205
|
+
constructor(repo, otpDelivery, userLookup, slugCheck, passwordHasher, planCatalog, paymentProvider, paymentEventLog, activationOrchestrator, audit, resumeTokenSigner, resumeDelivery, resumeBaseUrl, configuratorLookup, promoPreview) {
|
|
209
206
|
this.repo = repo;
|
|
210
207
|
this.otpDelivery = otpDelivery;
|
|
211
208
|
this.userLookup = userLookup;
|
|
@@ -221,7 +218,6 @@ var PendingRegistrationService = class _PendingRegistrationService {
|
|
|
221
218
|
this.resumeBaseUrl = resumeBaseUrl;
|
|
222
219
|
this.configuratorLookup = configuratorLookup;
|
|
223
220
|
this.promoPreview = promoPreview;
|
|
224
|
-
this.businessTypeLookup = businessTypeLookup;
|
|
225
221
|
}
|
|
226
222
|
async record(eventType, pendingRegistrationId, context, metadata) {
|
|
227
223
|
try {
|
|
@@ -773,14 +769,6 @@ var PendingRegistrationService = class _PendingRegistrationService {
|
|
|
773
769
|
code: "MODEL_NOT_AVAILABLE"
|
|
774
770
|
});
|
|
775
771
|
}
|
|
776
|
-
if (input.selection.businessTypeVersionId && this.businessTypeLookup) {
|
|
777
|
-
const view = await this.businessTypeLookup.findPublishedVersion(input.selection.businessTypeVersionId);
|
|
778
|
-
if (!view) {
|
|
779
|
-
throw new import_common.BadRequestException({
|
|
780
|
-
code: "BUSINESS_TYPE_NOT_AVAILABLE"
|
|
781
|
-
});
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
772
|
let promoEval;
|
|
785
773
|
if (input.selection.appliedPromoCode && this.promoPreview) {
|
|
786
774
|
const dryRun = computeBreakdown(catalog, {
|
|
@@ -947,8 +935,6 @@ PendingRegistrationService = _ts_decorate([
|
|
|
947
935
|
_ts_param(13, (0, import_common.Inject)(REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN)),
|
|
948
936
|
_ts_param(14, (0, import_common.Optional)()),
|
|
949
937
|
_ts_param(14, (0, import_common.Inject)(REGISTRATION_PROMO_PREVIEW_TOKEN)),
|
|
950
|
-
_ts_param(15, (0, import_common.Optional)()),
|
|
951
|
-
_ts_param(15, (0, import_common.Inject)(REGISTRATION_BUSINESS_TYPE_LOOKUP_TOKEN)),
|
|
952
938
|
_ts_metadata("design:type", Function),
|
|
953
939
|
_ts_metadata("design:paramtypes", [
|
|
954
940
|
typeof PendingRegistrationRepository === "undefined" ? Object : PendingRegistrationRepository,
|
|
@@ -965,8 +951,7 @@ PendingRegistrationService = _ts_decorate([
|
|
|
965
951
|
typeof RegistrationResumeDelivery === "undefined" ? Object : RegistrationResumeDelivery,
|
|
966
952
|
String,
|
|
967
953
|
typeof RegistrationConfiguratorLookup === "undefined" ? Object : RegistrationConfiguratorLookup,
|
|
968
|
-
typeof RegistrationPromoPreview === "undefined" ? Object : RegistrationPromoPreview
|
|
969
|
-
typeof RegistrationBusinessTypeLookup === "undefined" ? Object : RegistrationBusinessTypeLookup
|
|
954
|
+
typeof RegistrationPromoPreview === "undefined" ? Object : RegistrationPromoPreview
|
|
970
955
|
])
|
|
971
956
|
], PendingRegistrationService);
|
|
972
957
|
function normalizeEmail(value) {
|
|
@@ -1200,9 +1185,6 @@ var RegistrationModule = class _RegistrationModule {
|
|
|
1200
1185
|
if (options.promoPreview) {
|
|
1201
1186
|
providers.push(asProvider(REGISTRATION_PROMO_PREVIEW_TOKEN, options.promoPreview));
|
|
1202
1187
|
}
|
|
1203
|
-
if (options.businessTypeLookup) {
|
|
1204
|
-
providers.push(asProvider(REGISTRATION_BUSINESS_TYPE_LOOKUP_TOKEN, options.businessTypeLookup));
|
|
1205
|
-
}
|
|
1206
1188
|
const includeCleanupCron = options.includeCleanupCron ?? true;
|
|
1207
1189
|
if (includeCleanupCron) {
|
|
1208
1190
|
providers.push(RegistrationCleanupCron);
|
|
@@ -1546,13 +1528,6 @@ var SaveRegistrationConfigSelectionDto = class {
|
|
|
1546
1528
|
modelId;
|
|
1547
1529
|
billingCycle;
|
|
1548
1530
|
appliedPromoCode;
|
|
1549
|
-
/**
|
|
1550
|
-
* SPEC_V2 §11.1 M5.3 — optional business-type choice. UUID of a
|
|
1551
|
-
* **published** BusinessTypeVersion. The service validates existence +
|
|
1552
|
-
* live status against `RegistrationBusinessTypeLookup`. `null` = no
|
|
1553
|
-
* choice (legacy Plan-only path).
|
|
1554
|
-
*/
|
|
1555
|
-
businessTypeVersionId;
|
|
1556
1531
|
/**
|
|
1557
1532
|
* METAMODELL §17a — Bundle consistency. ID of the `CheckoutOffer` that was
|
|
1558
1533
|
* created on the pricing page (`<app>/register?offer=<id>`). Passed
|
|
@@ -1581,12 +1556,6 @@ _ts_decorate12([
|
|
|
1581
1556
|
(0, import_class_validator8.MaxLength)(60),
|
|
1582
1557
|
_ts_metadata11("design:type", Object)
|
|
1583
1558
|
], SaveRegistrationConfigSelectionDto.prototype, "appliedPromoCode", void 0);
|
|
1584
|
-
_ts_decorate12([
|
|
1585
|
-
(0, import_class_validator8.IsOptional)(),
|
|
1586
|
-
(0, import_class_validator8.ValidateIf)((_o, value) => value !== null),
|
|
1587
|
-
(0, import_class_validator8.IsUUID)(),
|
|
1588
|
-
_ts_metadata11("design:type", Object)
|
|
1589
|
-
], SaveRegistrationConfigSelectionDto.prototype, "businessTypeVersionId", void 0);
|
|
1590
1559
|
_ts_decorate12([
|
|
1591
1560
|
(0, import_class_validator8.IsOptional)(),
|
|
1592
1561
|
(0, import_class_validator8.ValidateIf)((_o, value) => value !== null),
|
|
@@ -1659,7 +1628,6 @@ _ts_decorate13([
|
|
|
1659
1628
|
PendingRegistrationService,
|
|
1660
1629
|
PreviewRegistrationPromoDto,
|
|
1661
1630
|
REGISTRATION_AUDIT_LOGGER_TOKEN,
|
|
1662
|
-
REGISTRATION_BUSINESS_TYPE_LOOKUP_TOKEN,
|
|
1663
1631
|
REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN,
|
|
1664
1632
|
REGISTRATION_CONFIG_TOKEN,
|
|
1665
1633
|
REGISTRATION_OTP_DELIVERY_TOKEN,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PendingRegistrationRepository, RegistrationOtpDelivery, UserAccountLookup, SlugAvailabilityCheck, PasswordHasher, PlanCatalogLookup, PaymentProvider, PaymentEventLog, ActivationOrchestrator, RegistrationAuditLogger, RegistrationResumeTokenSigner, RegistrationResumeDelivery, RegistrationConfiguratorLookup, RegistrationPromoPreview,
|
|
1
|
+
import { PendingRegistrationRepository, RegistrationOtpDelivery, UserAccountLookup, SlugAvailabilityCheck, PasswordHasher, PlanCatalogLookup, PaymentProvider, PaymentEventLog, ActivationOrchestrator, RegistrationAuditLogger, RegistrationResumeTokenSigner, RegistrationResumeDelivery, RegistrationConfiguratorLookup, RegistrationPromoPreview, PublicSignupPlan, SelectPlanInput, RegistrationAuditContext, SelectPlanResult, StartCheckoutInput, StartCheckoutResult, HandlePaymentEventInput, HandlePaymentEventResult, CleanupResult, StartRegistrationInput, StartRegistrationResult, VerifyRegistrationOtpResult, ResumeRegistrationInput, ResumeRegistrationResult, ConfiguratorCatalog, SaveRegistrationConfigInput, SaveRegistrationConfigResult, ConfiguratorPriceBreakdown, RegistrationConfigSelection } from '@saasicat/types';
|
|
2
2
|
export { PasswordHasher } from '@saasicat/types';
|
|
3
3
|
import { CanActivate, ExecutionContext, Type, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
4
4
|
import { P as ProviderSpec } from '../di-CcNeq9v-.cjs';
|
|
@@ -36,8 +36,6 @@ declare const REGISTRATION_RESUME_DELIVERY_TOKEN: unique symbol;
|
|
|
36
36
|
declare const REGISTRATION_RESUME_BASE_URL_TOKEN: unique symbol;
|
|
37
37
|
declare const REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN: unique symbol;
|
|
38
38
|
declare const REGISTRATION_PROMO_PREVIEW_TOKEN: unique symbol;
|
|
39
|
-
/** SPEC_V2 §11.1 M5.3 — published BusinessTypeVersion lookup for configurator selection. */
|
|
40
|
-
declare const REGISTRATION_BUSINESS_TYPE_LOOKUP_TOKEN: unique symbol;
|
|
41
39
|
/** Optionally injectable configuration — falls back to default TTLs from saas-platform-types. */
|
|
42
40
|
declare const REGISTRATION_CONFIG_TOKEN: unique symbol;
|
|
43
41
|
|
|
@@ -72,9 +70,8 @@ declare class PendingRegistrationService {
|
|
|
72
70
|
private readonly resumeBaseUrl?;
|
|
73
71
|
private readonly configuratorLookup?;
|
|
74
72
|
private readonly promoPreview?;
|
|
75
|
-
private readonly businessTypeLookup?;
|
|
76
73
|
private readonly logger;
|
|
77
|
-
constructor(repo: PendingRegistrationRepository, otpDelivery: RegistrationOtpDelivery, userLookup: UserAccountLookup, slugCheck: SlugAvailabilityCheck, passwordHasher: PasswordHasher, planCatalog: PlanCatalogLookup, paymentProvider: PaymentProvider, paymentEventLog: PaymentEventLog, activationOrchestrator: ActivationOrchestrator, audit: RegistrationAuditLogger, resumeTokenSigner?: RegistrationResumeTokenSigner | undefined, resumeDelivery?: RegistrationResumeDelivery | undefined, resumeBaseUrl?: string | undefined, configuratorLookup?: RegistrationConfiguratorLookup | undefined, promoPreview?: RegistrationPromoPreview | undefined
|
|
74
|
+
constructor(repo: PendingRegistrationRepository, otpDelivery: RegistrationOtpDelivery, userLookup: UserAccountLookup, slugCheck: SlugAvailabilityCheck, passwordHasher: PasswordHasher, planCatalog: PlanCatalogLookup, paymentProvider: PaymentProvider, paymentEventLog: PaymentEventLog, activationOrchestrator: ActivationOrchestrator, audit: RegistrationAuditLogger, resumeTokenSigner?: RegistrationResumeTokenSigner | undefined, resumeDelivery?: RegistrationResumeDelivery | undefined, resumeBaseUrl?: string | undefined, configuratorLookup?: RegistrationConfiguratorLookup | undefined, promoPreview?: RegistrationPromoPreview | undefined);
|
|
78
75
|
private record;
|
|
79
76
|
/** Public signup plan list for step 3 (frontend `usePublicPlans()`). */
|
|
80
77
|
listPublicPlans(): Promise<PublicSignupPlan[]>;
|
|
@@ -263,14 +260,6 @@ interface RegistrationModuleOptions {
|
|
|
263
260
|
* is ignored (snapshot is stored, discount=0).
|
|
264
261
|
*/
|
|
265
262
|
promoPreview?: ProviderSpec<RegistrationPromoPreview>;
|
|
266
|
-
/**
|
|
267
|
-
* SPEC_V2 §11.1 M5.3: validates an optionally set
|
|
268
|
-
* `RegistrationConfigSelection.businessTypeVersionId` against the
|
|
269
|
-
* SuperAdmin catalog (published BusinessTypeVersions). Without an adapter
|
|
270
|
-
* the ID is passed through unchecked — fine for apps without a
|
|
271
|
-
* BusinessType catalog.
|
|
272
|
-
*/
|
|
273
|
-
businessTypeLookup?: ProviderSpec<RegistrationBusinessTypeLookup>;
|
|
274
263
|
/**
|
|
275
264
|
* Modules that should be visible in the DynamicModule scope — needed so
|
|
276
265
|
* that factory providers with `inject: [...]` can resolve classes from
|
|
@@ -387,13 +376,6 @@ declare class SaveRegistrationConfigSelectionDto {
|
|
|
387
376
|
modelId: string;
|
|
388
377
|
billingCycle: 'MONTHLY' | 'YEARLY';
|
|
389
378
|
appliedPromoCode?: string | null;
|
|
390
|
-
/**
|
|
391
|
-
* SPEC_V2 §11.1 M5.3 — optional business-type choice. UUID of a
|
|
392
|
-
* **published** BusinessTypeVersion. The service validates existence +
|
|
393
|
-
* live status against `RegistrationBusinessTypeLookup`. `null` = no
|
|
394
|
-
* choice (legacy Plan-only path).
|
|
395
|
-
*/
|
|
396
|
-
businessTypeVersionId?: string | null;
|
|
397
379
|
/**
|
|
398
380
|
* METAMODELL §17a — Bundle consistency. ID of the `CheckoutOffer` that was
|
|
399
381
|
* created on the pricing page (`<app>/register?offer=<id>`). Passed
|
|
@@ -438,4 +420,4 @@ declare function resolveModel(catalog: ConfiguratorCatalog, modelId: string): {
|
|
|
438
420
|
yearlyNet: number;
|
|
439
421
|
};
|
|
440
422
|
|
|
441
|
-
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, type PromoEvaluation, REGISTRATION_AUDIT_LOGGER_TOKEN,
|
|
423
|
+
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, type 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, type RegistrationModuleOptions, ResendRegistrationOtpDto, SLUG_AVAILABILITY_CHECK_TOKEN, SaveRegistrationConfigDto, SaveRegistrationConfigSelectionDto, SelectRegistrationPlanDto, StartRegistrationCheckoutDto, USER_ACCOUNT_LOOKUP_TOKEN, VerifyRegistrationOtpDto, computeBreakdown, generateOtpCode, hashOtpCode, resolveModel, slugify, verifyOtpCode };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PendingRegistrationRepository, RegistrationOtpDelivery, UserAccountLookup, SlugAvailabilityCheck, PasswordHasher, PlanCatalogLookup, PaymentProvider, PaymentEventLog, ActivationOrchestrator, RegistrationAuditLogger, RegistrationResumeTokenSigner, RegistrationResumeDelivery, RegistrationConfiguratorLookup, RegistrationPromoPreview,
|
|
1
|
+
import { PendingRegistrationRepository, RegistrationOtpDelivery, UserAccountLookup, SlugAvailabilityCheck, PasswordHasher, PlanCatalogLookup, PaymentProvider, PaymentEventLog, ActivationOrchestrator, RegistrationAuditLogger, RegistrationResumeTokenSigner, RegistrationResumeDelivery, RegistrationConfiguratorLookup, RegistrationPromoPreview, PublicSignupPlan, SelectPlanInput, RegistrationAuditContext, SelectPlanResult, StartCheckoutInput, StartCheckoutResult, HandlePaymentEventInput, HandlePaymentEventResult, CleanupResult, StartRegistrationInput, StartRegistrationResult, VerifyRegistrationOtpResult, ResumeRegistrationInput, ResumeRegistrationResult, ConfiguratorCatalog, SaveRegistrationConfigInput, SaveRegistrationConfigResult, ConfiguratorPriceBreakdown, RegistrationConfigSelection } from '@saasicat/types';
|
|
2
2
|
export { PasswordHasher } from '@saasicat/types';
|
|
3
3
|
import { CanActivate, ExecutionContext, Type, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
4
4
|
import { P as ProviderSpec } from '../di-CcNeq9v-.js';
|
|
@@ -36,8 +36,6 @@ declare const REGISTRATION_RESUME_DELIVERY_TOKEN: unique symbol;
|
|
|
36
36
|
declare const REGISTRATION_RESUME_BASE_URL_TOKEN: unique symbol;
|
|
37
37
|
declare const REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN: unique symbol;
|
|
38
38
|
declare const REGISTRATION_PROMO_PREVIEW_TOKEN: unique symbol;
|
|
39
|
-
/** SPEC_V2 §11.1 M5.3 — published BusinessTypeVersion lookup for configurator selection. */
|
|
40
|
-
declare const REGISTRATION_BUSINESS_TYPE_LOOKUP_TOKEN: unique symbol;
|
|
41
39
|
/** Optionally injectable configuration — falls back to default TTLs from saas-platform-types. */
|
|
42
40
|
declare const REGISTRATION_CONFIG_TOKEN: unique symbol;
|
|
43
41
|
|
|
@@ -72,9 +70,8 @@ declare class PendingRegistrationService {
|
|
|
72
70
|
private readonly resumeBaseUrl?;
|
|
73
71
|
private readonly configuratorLookup?;
|
|
74
72
|
private readonly promoPreview?;
|
|
75
|
-
private readonly businessTypeLookup?;
|
|
76
73
|
private readonly logger;
|
|
77
|
-
constructor(repo: PendingRegistrationRepository, otpDelivery: RegistrationOtpDelivery, userLookup: UserAccountLookup, slugCheck: SlugAvailabilityCheck, passwordHasher: PasswordHasher, planCatalog: PlanCatalogLookup, paymentProvider: PaymentProvider, paymentEventLog: PaymentEventLog, activationOrchestrator: ActivationOrchestrator, audit: RegistrationAuditLogger, resumeTokenSigner?: RegistrationResumeTokenSigner | undefined, resumeDelivery?: RegistrationResumeDelivery | undefined, resumeBaseUrl?: string | undefined, configuratorLookup?: RegistrationConfiguratorLookup | undefined, promoPreview?: RegistrationPromoPreview | undefined
|
|
74
|
+
constructor(repo: PendingRegistrationRepository, otpDelivery: RegistrationOtpDelivery, userLookup: UserAccountLookup, slugCheck: SlugAvailabilityCheck, passwordHasher: PasswordHasher, planCatalog: PlanCatalogLookup, paymentProvider: PaymentProvider, paymentEventLog: PaymentEventLog, activationOrchestrator: ActivationOrchestrator, audit: RegistrationAuditLogger, resumeTokenSigner?: RegistrationResumeTokenSigner | undefined, resumeDelivery?: RegistrationResumeDelivery | undefined, resumeBaseUrl?: string | undefined, configuratorLookup?: RegistrationConfiguratorLookup | undefined, promoPreview?: RegistrationPromoPreview | undefined);
|
|
78
75
|
private record;
|
|
79
76
|
/** Public signup plan list for step 3 (frontend `usePublicPlans()`). */
|
|
80
77
|
listPublicPlans(): Promise<PublicSignupPlan[]>;
|
|
@@ -263,14 +260,6 @@ interface RegistrationModuleOptions {
|
|
|
263
260
|
* is ignored (snapshot is stored, discount=0).
|
|
264
261
|
*/
|
|
265
262
|
promoPreview?: ProviderSpec<RegistrationPromoPreview>;
|
|
266
|
-
/**
|
|
267
|
-
* SPEC_V2 §11.1 M5.3: validates an optionally set
|
|
268
|
-
* `RegistrationConfigSelection.businessTypeVersionId` against the
|
|
269
|
-
* SuperAdmin catalog (published BusinessTypeVersions). Without an adapter
|
|
270
|
-
* the ID is passed through unchecked — fine for apps without a
|
|
271
|
-
* BusinessType catalog.
|
|
272
|
-
*/
|
|
273
|
-
businessTypeLookup?: ProviderSpec<RegistrationBusinessTypeLookup>;
|
|
274
263
|
/**
|
|
275
264
|
* Modules that should be visible in the DynamicModule scope — needed so
|
|
276
265
|
* that factory providers with `inject: [...]` can resolve classes from
|
|
@@ -387,13 +376,6 @@ declare class SaveRegistrationConfigSelectionDto {
|
|
|
387
376
|
modelId: string;
|
|
388
377
|
billingCycle: 'MONTHLY' | 'YEARLY';
|
|
389
378
|
appliedPromoCode?: string | null;
|
|
390
|
-
/**
|
|
391
|
-
* SPEC_V2 §11.1 M5.3 — optional business-type choice. UUID of a
|
|
392
|
-
* **published** BusinessTypeVersion. The service validates existence +
|
|
393
|
-
* live status against `RegistrationBusinessTypeLookup`. `null` = no
|
|
394
|
-
* choice (legacy Plan-only path).
|
|
395
|
-
*/
|
|
396
|
-
businessTypeVersionId?: string | null;
|
|
397
379
|
/**
|
|
398
380
|
* METAMODELL §17a — Bundle consistency. ID of the `CheckoutOffer` that was
|
|
399
381
|
* created on the pricing page (`<app>/register?offer=<id>`). Passed
|
|
@@ -438,4 +420,4 @@ declare function resolveModel(catalog: ConfiguratorCatalog, modelId: string): {
|
|
|
438
420
|
yearlyNet: number;
|
|
439
421
|
};
|
|
440
422
|
|
|
441
|
-
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, type PromoEvaluation, REGISTRATION_AUDIT_LOGGER_TOKEN,
|
|
423
|
+
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, type 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, type RegistrationModuleOptions, ResendRegistrationOtpDto, SLUG_AVAILABILITY_CHECK_TOKEN, SaveRegistrationConfigDto, SaveRegistrationConfigSelectionDto, SelectRegistrationPlanDto, StartRegistrationCheckoutDto, USER_ACCOUNT_LOOKUP_TOKEN, VerifyRegistrationOtpDto, computeBreakdown, generateOtpCode, hashOtpCode, resolveModel, slugify, verifyOtpCode };
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
PendingRegistrationService,
|
|
13
13
|
PreviewRegistrationPromoDto,
|
|
14
14
|
REGISTRATION_AUDIT_LOGGER_TOKEN,
|
|
15
|
-
REGISTRATION_BUSINESS_TYPE_LOOKUP_TOKEN,
|
|
16
15
|
REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN,
|
|
17
16
|
REGISTRATION_CONFIG_TOKEN,
|
|
18
17
|
REGISTRATION_OTP_DELIVERY_TOKEN,
|
|
@@ -37,7 +36,7 @@ import {
|
|
|
37
36
|
resolveModel,
|
|
38
37
|
slugify,
|
|
39
38
|
verifyOtpCode
|
|
40
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-CK54YKVK.js";
|
|
41
40
|
import "../chunk-SABTXESR.js";
|
|
42
41
|
import "../chunk-SHUYVCID.js";
|
|
43
42
|
export {
|
|
@@ -54,7 +53,6 @@ export {
|
|
|
54
53
|
PendingRegistrationService,
|
|
55
54
|
PreviewRegistrationPromoDto,
|
|
56
55
|
REGISTRATION_AUDIT_LOGGER_TOKEN,
|
|
57
|
-
REGISTRATION_BUSINESS_TYPE_LOOKUP_TOKEN,
|
|
58
56
|
REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN,
|
|
59
57
|
REGISTRATION_CONFIG_TOKEN,
|
|
60
58
|
REGISTRATION_OTP_DELIVERY_TOKEN,
|