@saasicat/nest 1.0.0-rc.2 → 1.0.0-rc.21
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/README.md +44 -8
- package/dist/.build-stamp +1 -1
- package/dist/_entries.cjs +10214 -4796
- package/dist/admin/index.d.cts +5 -4
- package/dist/admin/index.d.ts +5 -4
- package/dist/admin/index.js +13 -9
- package/dist/{admin-resources.module-CpvzcfCc.d.cts → admin-resources.module-B4XNvdH-.d.cts} +1 -2
- package/dist/{admin-resources.module-DF5_Q7RD.d.ts → admin-resources.module-CWqdI9BV.d.ts} +1 -2
- package/dist/{admin-stats.service-TYiSUwIR.d.ts → admin-stats.service-CsLNt19Z.d.ts} +11 -7
- package/dist/{admin-stats.service-DfKupywR.d.cts → admin-stats.service-DrZrU8IJ.d.cts} +11 -7
- package/dist/{aggregation-B3CD0v_d.d.cts → aggregation-ChpZDh0g.d.ts} +39 -6
- package/dist/{aggregation-BFzW07DE.d.ts → aggregation-OpnhwzF5.d.cts} +39 -6
- package/dist/billing/index.d.cts +448 -108
- package/dist/billing/index.d.ts +448 -108
- package/dist/billing/index.js +108 -41
- package/dist/catalog/index.d.cts +74 -45
- package/dist/catalog/index.d.ts +74 -45
- package/dist/catalog/index.js +21 -13
- package/dist/catalog.module-C9O7BxRq.d.ts +180 -0
- package/dist/catalog.module-T-I5Ricz.d.cts +180 -0
- package/dist/checkout-offer/index.d.cts +17 -22
- package/dist/checkout-offer/index.d.ts +17 -22
- package/dist/checkout-offer/index.js +21 -7
- package/dist/checkout-offer.module-DFhGy6JO.d.cts +58 -0
- package/dist/checkout-offer.module-x7SP_dX4.d.ts +58 -0
- package/dist/checkout-offer.service-BeHgYikI.d.ts +242 -0
- package/dist/checkout-offer.service-CCVxG9b2.d.cts +242 -0
- package/dist/chunk-34XVPR6P.js +222 -0
- package/dist/{chunk-AOQJEYOL.js → chunk-3QVGA6JX.js} +3 -1
- package/dist/chunk-3RLWML2S.js +896 -0
- package/dist/{chunk-TXC3LHHB.js → chunk-4SDSYV4A.js} +21 -13
- package/dist/chunk-55QEDAMX.js +946 -0
- package/dist/chunk-5CKC7O52.js +140 -0
- package/dist/chunk-6PJE7EWO.js +185 -0
- package/dist/chunk-7NJKVC5X.js +353 -0
- package/dist/{chunk-RUNZ3X4C.js → chunk-AOS2JPDD.js} +1263 -185
- package/dist/{chunk-WOVQPXV4.js → chunk-CQ2ZZMTD.js} +702 -725
- package/dist/{chunk-NA6O63B7.js → chunk-F5X66HF5.js} +5 -5
- package/dist/chunk-FEQZCWUL.js +174 -0
- package/dist/{chunk-VIJ5NJWC.js → chunk-G6EZWECL.js} +107 -31
- package/dist/chunk-G7RQO2XO.js +0 -0
- package/dist/{chunk-N3L3AICU.js → chunk-GPQWGA6B.js} +5 -6
- package/dist/chunk-GZTL64QK.js +7 -0
- package/dist/{chunk-SABTXESR.js → chunk-J7NJRK3K.js} +17 -1
- package/dist/{chunk-SEPN52AD.js → chunk-JBCC6C3M.js} +566 -307
- package/dist/{chunk-I7GTA3RX.js → chunk-JQRA724W.js} +1 -1
- package/dist/{chunk-WXYJHZCN.js → chunk-JVAEKTJ4.js} +2 -14
- package/dist/chunk-KPEMTBOP.js +26 -0
- package/dist/chunk-LF6J4YYN.js +301 -0
- package/dist/{chunk-LTT736P3.js → chunk-LLYVYRGJ.js} +228 -387
- package/dist/{chunk-6Z7JR4EW.js → chunk-M47BNEY2.js} +1897 -633
- package/dist/{chunk-KFT5AIIH.js → chunk-NDLC5GYK.js} +206 -24
- package/dist/{chunk-O2J2HDXA.js → chunk-OOTEXP47.js} +3 -8
- package/dist/chunk-QPVDCKYS.js +702 -0
- package/dist/{chunk-NHVDCYK5.js → chunk-R5YCJBHY.js} +71 -106
- package/dist/{chunk-XBYAFEOR.js → chunk-S33SO5XX.js} +1 -1
- package/dist/chunk-SZ7RFPXA.js +10 -0
- package/dist/chunk-TBBZWZQT.js +98 -0
- package/dist/chunk-TOEFN7DN.js +295 -0
- package/dist/{chunk-7ZEGFL42.js → chunk-WHJSYKNC.js} +6 -6
- package/dist/chunk-WOEJ6K7M.js +55 -0
- package/dist/{chunk-AU3OOREM.js → chunk-XSSWYPP5.js} +16 -3
- package/dist/contract-line-item-money-B0Z3Ogur.d.cts +43 -0
- package/dist/contract-line-item-money-B0Z3Ogur.d.ts +43 -0
- package/dist/discovery/index.d.cts +2 -2
- package/dist/discovery/index.d.ts +2 -2
- package/dist/discovery/index.js +6 -6
- package/dist/{discovery.scanner-9cMqF95o.d.cts → discovery.scanner-DXKc6JkV.d.cts} +1 -1
- package/dist/{discovery.scanner-9cMqF95o.d.ts → discovery.scanner-DXKc6JkV.d.ts} +1 -1
- package/dist/{enforce-quota.interceptor-Df0e3OWe.d.cts → enforce-quota.interceptor-BFyVdWe8.d.cts} +6 -6
- package/dist/{enforce-quota.interceptor-DW3etVyI.d.ts → enforce-quota.interceptor-GaBXboGx.d.ts} +6 -6
- package/dist/entitlement/index.d.cts +27 -4
- package/dist/entitlement/index.d.ts +27 -4
- package/dist/entitlement/index.js +13 -8
- package/dist/index.d.cts +209 -28
- package/dist/index.d.ts +209 -28
- package/dist/index.js +285 -163
- package/dist/issuer-identity.check-CBO0vcsq.d.cts +197 -0
- package/dist/issuer-identity.check-Cz9CEMkZ.d.ts +197 -0
- package/dist/{module-options-COSEb0VW.d.ts → module-options-DmQ3G4sZ.d.ts} +135 -41
- package/dist/{module-options-BG3MzQva.d.cts → module-options-qAOwinHR.d.cts} +135 -41
- package/dist/payment-callback.service-CR84Xw1Z.d.cts +125 -0
- package/dist/payment-callback.service-CR84Xw1Z.d.ts +125 -0
- package/dist/payments/index.cjs +4 -0
- package/dist/payments/index.d.cts +187 -0
- package/dist/payments/index.d.ts +187 -0
- package/dist/payments/index.js +141 -0
- package/dist/payments.module-BdUq9ot_.d.cts +57 -0
- package/dist/payments.module-CQGv_VG7.d.ts +57 -0
- package/dist/plan-catalog-source-DWe-BGY1.d.cts +21 -0
- package/dist/plan-catalog-source-DWe-BGY1.d.ts +21 -0
- package/dist/{plan-resolution-Cgo_TR1H.d.cts → plan-resolution-CwUy_OqC.d.cts} +14 -0
- package/dist/{plan-resolution-Cgo_TR1H.d.ts → plan-resolution-CwUy_OqC.d.ts} +14 -0
- package/dist/{plan-versions.service-DChhbK6h.d.ts → plan-versions.service-C0N-Em2W.d.ts} +38 -64
- package/dist/{plan-versions.service-TPEtbN0r.d.cts → plan-versions.service-DARLh-qI.d.cts} +38 -64
- package/dist/platform/index.d.cts +52 -23
- package/dist/platform/index.d.ts +52 -23
- package/dist/platform/index.js +57 -36
- package/dist/promo/index.d.cts +23 -8
- package/dist/promo/index.d.ts +23 -8
- package/dist/promo/index.js +15 -7
- package/dist/{promo.module-DtvIycpt.d.cts → promo.module-CKkECmU8.d.cts} +9 -3
- package/dist/{promo.module-Z8h1PNX-.d.ts → promo.module-DuIJdK3U.d.ts} +9 -3
- package/dist/promo.service-BYBu6dy3.d.cts +215 -0
- package/dist/promo.service-CFjfF0Xm.d.ts +215 -0
- package/dist/registration/index.d.cts +104 -47
- package/dist/registration/index.d.ts +104 -47
- package/dist/registration/index.js +15 -9
- package/dist/subscriber/index.cjs +4 -0
- package/dist/subscriber/index.d.cts +28 -0
- package/dist/subscriber/index.d.ts +28 -0
- package/dist/subscriber/index.js +16 -0
- package/dist/subscriber.service-5W6Gi-1B.d.cts +68 -0
- package/dist/subscriber.service-5W6Gi-1B.d.ts +68 -0
- package/dist/subscription-contract/index.d.cts +4 -2
- package/dist/subscription-contract/index.d.ts +4 -2
- package/dist/subscription-contract/index.js +13 -5
- package/dist/{subscription-contract.module-fDFdQ0jm.d.ts → subscription-contract.module-BfIRpc1o.d.ts} +8 -2
- package/dist/{subscription-contract.module-CEK8HS5-.d.cts → subscription-contract.module-DTMuUJYd.d.cts} +8 -2
- package/dist/{subscription-contract.service-hD87MKyg.d.cts → subscription-contract.service-CPZrTM9C.d.ts} +32 -3
- package/dist/{subscription-contract.service-hD87MKyg.d.ts → subscription-contract.service-CfNApLuP.d.cts} +32 -3
- package/dist/tenant-billing.controller-BLqbsONe.d.ts +812 -0
- package/dist/tenant-billing.controller-DKbAqTbM.d.cts +812 -0
- package/dist/tenant-billing.module-ClbjzocC.d.cts +364 -0
- package/dist/tenant-billing.module-DohgJJ2m.d.ts +364 -0
- package/dist/tenant-billing.tokens-G-1xOlMr.d.cts +129 -0
- package/dist/tenant-billing.tokens-G-1xOlMr.d.ts +129 -0
- package/dist/testing/index.d.cts +44 -17
- package/dist/testing/index.d.ts +44 -17
- package/dist/testing/index.js +189 -40
- package/package.json +24 -4
- package/dist/catalog.module-BDDO6iwq.d.cts +0 -103
- package/dist/catalog.module-BTnMsE6u.d.ts +0 -103
- package/dist/checkout-offer.module-CMtiQJTT.d.ts +0 -39
- package/dist/checkout-offer.module-CVpWrzbe.d.cts +0 -39
- package/dist/checkout-offer.service-BLOv2HOo.d.cts +0 -49
- package/dist/checkout-offer.service-BLOv2HOo.d.ts +0 -49
- package/dist/chunk-57V6ZTI6.js +0 -22
- package/dist/chunk-BSK6YBLI.js +0 -87
- package/dist/chunk-DQKCK7DX.js +0 -217
- package/dist/chunk-VXEYLNIB.js +0 -632
- package/dist/chunk-WUDYIPYH.js +0 -715
- package/dist/define-saasicat-DROBe-b1.d.ts +0 -69
- package/dist/define-saasicat-vGBCkFys.d.cts +0 -69
- package/dist/promo.service-BJbKAmw3.d.cts +0 -112
- package/dist/promo.service-BJbKAmw3.d.ts +0 -112
- package/dist/tenant-billing.controller-BQ67mlmI.d.ts +0 -438
- package/dist/tenant-billing.controller-DS8kB8a7.d.cts +0 -438
- package/dist/tenant-billing.module-BznC3XtW.d.cts +0 -299
- package/dist/tenant-billing.module-wUbsQSFG.d.ts +0 -299
- /package/dist/{chunk-2FR6ZL7R.js → chunk-BHZOH2DY.js} +0 -0
- /package/dist/{chunk-2SLTRKXC.js → chunk-DFOW3JVO.js} +0 -0
- /package/dist/{chunk-DBZGV3HC.js → chunk-DU56UKEH.js} +0 -0
- /package/dist/{chunk-OYNHOY45.js → chunk-GAUEVIAE.js} +0 -0
package/dist/admin/index.d.cts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { f as AdminStatsService, g as AdminStatsSnapshot } from '../admin-stats.service-
|
|
2
|
-
export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions,
|
|
1
|
+
import { f as AdminStatsService, g as AdminStatsSnapshot } from '../admin-stats.service-DrZrU8IJ.cjs';
|
|
2
|
+
export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions, h as MfaGuard, M as MfaService, P as PLATFORM_CORE_CONTRIBUTION_TOKEN, R as REQUIRE_MFA_KEY, i as RequireMfa, S as SuperAdminGuard, T as TotpSetupResult, V as VerifyTotpInput } from '../admin-stats.service-DrZrU8IJ.cjs';
|
|
3
3
|
export { A as AdminAuditService } from '../admin-audit.service-4P3Djdxk.cjs';
|
|
4
|
-
import { b as AdminManifestConfig } from '../admin-resources.module-
|
|
5
|
-
export {
|
|
4
|
+
import { b as AdminManifestConfig } from '../admin-resources.module-B4XNvdH-.cjs';
|
|
5
|
+
export { c as ADMIN_MANIFEST_CONFIG, d as ADMIN_RESOURCES_PORT_TOKEN, e as AdminResourcesModule, A as AdminResourcesModuleOptions, f as AdminResourcesService, g as AdminStatsModule, a as AdminStatsModuleOptions, S as SuspendTenantDto } from '../admin-resources.module-B4XNvdH-.cjs';
|
|
6
6
|
import { PublicBootResponse, ManifestContribution } from '@saasicat/core';
|
|
7
7
|
import { Type, CanActivate } from '@nestjs/common';
|
|
8
8
|
import '@nestjs/core';
|
|
9
9
|
import 'rxjs';
|
|
10
10
|
import '../di-CcNeq9v-.cjs';
|
|
11
|
+
import '../plan-catalog-source-DWe-BGY1.cjs';
|
|
11
12
|
|
|
12
13
|
declare const MFA_PORT_TOKEN: unique symbol;
|
|
13
14
|
declare const AUDIT_PORT_TOKEN: unique symbol;
|
package/dist/admin/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { f as AdminStatsService, g as AdminStatsSnapshot } from '../admin-stats.service-
|
|
2
|
-
export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions,
|
|
1
|
+
import { f as AdminStatsService, g as AdminStatsSnapshot } from '../admin-stats.service-CsLNt19Z.js';
|
|
2
|
+
export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions, h as MfaGuard, M as MfaService, P as PLATFORM_CORE_CONTRIBUTION_TOKEN, R as REQUIRE_MFA_KEY, i as RequireMfa, S as SuperAdminGuard, T as TotpSetupResult, V as VerifyTotpInput } from '../admin-stats.service-CsLNt19Z.js';
|
|
3
3
|
export { A as AdminAuditService } from '../admin-audit.service-4P3Djdxk.js';
|
|
4
|
-
import { b as AdminManifestConfig } from '../admin-resources.module-
|
|
5
|
-
export {
|
|
4
|
+
import { b as AdminManifestConfig } from '../admin-resources.module-CWqdI9BV.js';
|
|
5
|
+
export { c as ADMIN_MANIFEST_CONFIG, d as ADMIN_RESOURCES_PORT_TOKEN, e as AdminResourcesModule, A as AdminResourcesModuleOptions, f as AdminResourcesService, g as AdminStatsModule, a as AdminStatsModuleOptions, S as SuspendTenantDto } from '../admin-resources.module-CWqdI9BV.js';
|
|
6
6
|
import { PublicBootResponse, ManifestContribution } from '@saasicat/core';
|
|
7
7
|
import { Type, CanActivate } from '@nestjs/common';
|
|
8
8
|
import '@nestjs/core';
|
|
9
9
|
import 'rxjs';
|
|
10
10
|
import '../di-CcNeq9v-.js';
|
|
11
|
+
import '../plan-catalog-source-DWe-BGY1.js';
|
|
11
12
|
|
|
12
13
|
declare const MFA_PORT_TOKEN: unique symbol;
|
|
13
14
|
declare const AUDIT_PORT_TOKEN: unique symbol;
|
package/dist/admin/index.js
CHANGED
|
@@ -14,27 +14,31 @@ import {
|
|
|
14
14
|
AdminStatsController,
|
|
15
15
|
AdminStatsModule,
|
|
16
16
|
AdminStatsService,
|
|
17
|
-
MfaGuard,
|
|
18
|
-
MfaService,
|
|
19
17
|
PLATFORM_CORE_CONTRIBUTION_TOKEN,
|
|
20
18
|
PLATFORM_CORE_MANIFEST_CONTRIBUTION,
|
|
21
19
|
PROMO_CODE_STATS_PORT_TOKEN,
|
|
22
|
-
REQUIRE_MFA_KEY,
|
|
23
|
-
RequireMfa,
|
|
24
20
|
SUBSCRIPTION_STATS_PORT_TOKEN,
|
|
25
21
|
SuperAdminGuard,
|
|
26
22
|
SuspendTenantDto,
|
|
27
23
|
buildAdminStatsController
|
|
28
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-LLYVYRGJ.js";
|
|
25
|
+
import {
|
|
26
|
+
MfaGuard,
|
|
27
|
+
MfaService,
|
|
28
|
+
REQUIRE_MFA_KEY,
|
|
29
|
+
RequireMfa
|
|
30
|
+
} from "../chunk-34XVPR6P.js";
|
|
31
|
+
import {
|
|
32
|
+
AdminAuditService
|
|
33
|
+
} from "../chunk-OOTEXP47.js";
|
|
29
34
|
import {
|
|
30
35
|
AUDIT_PORT_TOKEN,
|
|
31
|
-
AdminAuditService,
|
|
32
36
|
MFA_PORT_TOKEN,
|
|
33
37
|
RLS_BYPASS_PORT_TOKEN
|
|
34
|
-
} from "../chunk-
|
|
38
|
+
} from "../chunk-SZ7RFPXA.js";
|
|
35
39
|
import "../chunk-YSC46BGM.js";
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
40
|
+
import "../chunk-FEQZCWUL.js";
|
|
41
|
+
import "../chunk-J7NJRK3K.js";
|
|
38
42
|
import "../chunk-SHUYVCID.js";
|
|
39
43
|
export {
|
|
40
44
|
ADMIN_MANIFEST_CONFIG,
|
package/dist/{admin-resources.module-CpvzcfCc.d.cts → admin-resources.module-B4XNvdH-.d.cts}
RENAMED
|
@@ -7,7 +7,6 @@ declare const ADMIN_MANIFEST_CONFIG: unique symbol;
|
|
|
7
7
|
interface AdminManifestConfig {
|
|
8
8
|
project: AdminManifest['project'];
|
|
9
9
|
build: Omit<AdminManifest['build'], 'manifestHash'>;
|
|
10
|
-
planCatalogSnapshot: AdminManifest['planCatalogSnapshot'];
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
interface AdminStatsModuleOptions {
|
|
@@ -63,4 +62,4 @@ declare class AdminResourcesModule {
|
|
|
63
62
|
static forRoot(options: AdminResourcesModuleOptions): DynamicModule;
|
|
64
63
|
}
|
|
65
64
|
|
|
66
|
-
export {
|
|
65
|
+
export { type AdminResourcesModuleOptions as A, SuspendTenantDto as S, type AdminStatsModuleOptions as a, type AdminManifestConfig as b, ADMIN_MANIFEST_CONFIG as c, ADMIN_RESOURCES_PORT_TOKEN as d, AdminResourcesModule as e, AdminResourcesService as f, AdminStatsModule as g };
|
|
@@ -7,7 +7,6 @@ declare const ADMIN_MANIFEST_CONFIG: unique symbol;
|
|
|
7
7
|
interface AdminManifestConfig {
|
|
8
8
|
project: AdminManifest['project'];
|
|
9
9
|
build: Omit<AdminManifest['build'], 'manifestHash'>;
|
|
10
|
-
planCatalogSnapshot: AdminManifest['planCatalogSnapshot'];
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
interface AdminStatsModuleOptions {
|
|
@@ -63,4 +62,4 @@ declare class AdminResourcesModule {
|
|
|
63
62
|
static forRoot(options: AdminResourcesModuleOptions): DynamicModule;
|
|
64
63
|
}
|
|
65
64
|
|
|
66
|
-
export {
|
|
65
|
+
export { type AdminResourcesModuleOptions as A, SuspendTenantDto as S, type AdminStatsModuleOptions as a, type AdminManifestConfig as b, ADMIN_MANIFEST_CONFIG as c, ADMIN_RESOURCES_PORT_TOKEN as d, AdminResourcesModule as e, AdminResourcesService as f, AdminStatsModule as g };
|
|
@@ -3,7 +3,8 @@ import { Reflector } from '@nestjs/core';
|
|
|
3
3
|
import { MfaPort, RlsBypassPort, AuditPort, ManifestContribution, AdminManifest, SubscriptionStatsPort, PromoCodeStatsPort, AuditStatsPort, SubscriptionStatsSnapshot, PromoCodeStatsSnapshot, AuditStatsSnapshot } from '@saasicat/core';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import { P as ProviderSpec } from './di-CcNeq9v-.js';
|
|
6
|
-
import {
|
|
6
|
+
import { P as PlanCatalogSource } from './plan-catalog-source-DWe-BGY1.js';
|
|
7
|
+
import { b as AdminManifestConfig } from './admin-resources.module-CWqdI9BV.js';
|
|
7
8
|
|
|
8
9
|
declare class SuperAdminGuard implements CanActivate {
|
|
9
10
|
canActivate(context: ExecutionContext): boolean;
|
|
@@ -87,13 +88,16 @@ declare class AdminModule {
|
|
|
87
88
|
declare const PLATFORM_CORE_CONTRIBUTION_TOKEN: unique symbol;
|
|
88
89
|
declare class AdminManifestService {
|
|
89
90
|
private readonly config;
|
|
91
|
+
private readonly planCatalogs;
|
|
90
92
|
private readonly logger;
|
|
91
93
|
private readonly contributions;
|
|
92
|
-
private
|
|
93
|
-
|
|
94
|
+
private merged;
|
|
95
|
+
private lastHash;
|
|
96
|
+
constructor(config: AdminManifestConfig, planCatalogs: PlanCatalogSource, platformCore?: ManifestContribution | null);
|
|
94
97
|
register(contribution: ManifestContribution): void;
|
|
95
|
-
getManifest(): AdminManifest
|
|
96
|
-
|
|
98
|
+
getManifest(): Promise<AdminManifest>;
|
|
99
|
+
/** Merges the contributions again, then serves the manifest as `getManifest` does. */
|
|
100
|
+
rebuild(): Promise<AdminManifest>;
|
|
97
101
|
private build;
|
|
98
102
|
private mergeContributions;
|
|
99
103
|
/**
|
|
@@ -108,7 +112,7 @@ declare class AdminManifestService {
|
|
|
108
112
|
|
|
109
113
|
type ConfigSpec = AdminManifestConfig | Pick<FactoryProvider<AdminManifestConfig>, 'useFactory' | 'inject'>;
|
|
110
114
|
interface AdminManifestModuleOptions {
|
|
111
|
-
/** AdminManifestConfig as a value or via a factory (e.g. with a
|
|
115
|
+
/** AdminManifestConfig as a value or via a factory (e.g. with a PLAN_CATALOG_SETTINGS_TOKEN inject). */
|
|
112
116
|
config: ConfigSpec;
|
|
113
117
|
/**
|
|
114
118
|
* Default `true`. Set to `false` when the consumer registers its own
|
|
@@ -177,4 +181,4 @@ declare class AdminStatsService {
|
|
|
177
181
|
getSnapshot(): Promise<AdminStatsSnapshot>;
|
|
178
182
|
}
|
|
179
183
|
|
|
180
|
-
export { AdminBypassRlsInterceptor as A,
|
|
184
|
+
export { AdminBypassRlsInterceptor as A, MfaService as M, PLATFORM_CORE_CONTRIBUTION_TOKEN as P, REQUIRE_MFA_KEY as R, SuperAdminGuard as S, type TotpSetupResult as T, type VerifyTotpInput as V, AdminManifestModule as a, type AdminManifestModuleOptions as b, AdminManifestService as c, AdminModule as d, type AdminModuleOptions as e, AdminStatsService as f, type AdminStatsSnapshot as g, MfaGuard as h, RequireMfa as i };
|
|
@@ -3,7 +3,8 @@ import { Reflector } from '@nestjs/core';
|
|
|
3
3
|
import { MfaPort, RlsBypassPort, AuditPort, ManifestContribution, AdminManifest, SubscriptionStatsPort, PromoCodeStatsPort, AuditStatsPort, SubscriptionStatsSnapshot, PromoCodeStatsSnapshot, AuditStatsSnapshot } from '@saasicat/core';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import { P as ProviderSpec } from './di-CcNeq9v-.cjs';
|
|
6
|
-
import {
|
|
6
|
+
import { P as PlanCatalogSource } from './plan-catalog-source-DWe-BGY1.cjs';
|
|
7
|
+
import { b as AdminManifestConfig } from './admin-resources.module-B4XNvdH-.cjs';
|
|
7
8
|
|
|
8
9
|
declare class SuperAdminGuard implements CanActivate {
|
|
9
10
|
canActivate(context: ExecutionContext): boolean;
|
|
@@ -87,13 +88,16 @@ declare class AdminModule {
|
|
|
87
88
|
declare const PLATFORM_CORE_CONTRIBUTION_TOKEN: unique symbol;
|
|
88
89
|
declare class AdminManifestService {
|
|
89
90
|
private readonly config;
|
|
91
|
+
private readonly planCatalogs;
|
|
90
92
|
private readonly logger;
|
|
91
93
|
private readonly contributions;
|
|
92
|
-
private
|
|
93
|
-
|
|
94
|
+
private merged;
|
|
95
|
+
private lastHash;
|
|
96
|
+
constructor(config: AdminManifestConfig, planCatalogs: PlanCatalogSource, platformCore?: ManifestContribution | null);
|
|
94
97
|
register(contribution: ManifestContribution): void;
|
|
95
|
-
getManifest(): AdminManifest
|
|
96
|
-
|
|
98
|
+
getManifest(): Promise<AdminManifest>;
|
|
99
|
+
/** Merges the contributions again, then serves the manifest as `getManifest` does. */
|
|
100
|
+
rebuild(): Promise<AdminManifest>;
|
|
97
101
|
private build;
|
|
98
102
|
private mergeContributions;
|
|
99
103
|
/**
|
|
@@ -108,7 +112,7 @@ declare class AdminManifestService {
|
|
|
108
112
|
|
|
109
113
|
type ConfigSpec = AdminManifestConfig | Pick<FactoryProvider<AdminManifestConfig>, 'useFactory' | 'inject'>;
|
|
110
114
|
interface AdminManifestModuleOptions {
|
|
111
|
-
/** AdminManifestConfig as a value or via a factory (e.g. with a
|
|
115
|
+
/** AdminManifestConfig as a value or via a factory (e.g. with a PLAN_CATALOG_SETTINGS_TOKEN inject). */
|
|
112
116
|
config: ConfigSpec;
|
|
113
117
|
/**
|
|
114
118
|
* Default `true`. Set to `false` when the consumer registers its own
|
|
@@ -177,4 +181,4 @@ declare class AdminStatsService {
|
|
|
177
181
|
getSnapshot(): Promise<AdminStatsSnapshot>;
|
|
178
182
|
}
|
|
179
183
|
|
|
180
|
-
export { AdminBypassRlsInterceptor as A,
|
|
184
|
+
export { AdminBypassRlsInterceptor as A, MfaService as M, PLATFORM_CORE_CONTRIBUTION_TOKEN as P, REQUIRE_MFA_KEY as R, SuperAdminGuard as S, type TotpSetupResult as T, type VerifyTotpInput as V, AdminManifestModule as a, type AdminManifestModuleOptions as b, AdminManifestService as c, AdminModule as d, type AdminModuleOptions as e, AdminStatsService as f, type AdminStatsSnapshot as g, MfaGuard as h, RequireMfa as i };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { PlanId, QuotaKey, FeatureKey,
|
|
2
|
-
import {
|
|
1
|
+
import { PlanId, QuotaKey, FeatureKey, SubscriptionRepository, PlanVersionRepository, TransactionRunner, SubscriptionBundleRepository, BundleRepository, SubscriptionContractRepository, DiscoverySnapshot, PlanCatalog, SubscriptionRecord, TransactionContext, ContractLineItemRecord, SubscriptionContractRecord } from '@saasicat/core';
|
|
2
|
+
import { P as PlanCatalogSource } from './plan-catalog-source-DWe-BGY1.js';
|
|
3
|
+
import { E as EntitlementResolutionConfig } from './plan-resolution-CwUy_OqC.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Snapshot of the binding `PlanVersion` of a subscription. Quotas are
|
|
@@ -113,7 +114,7 @@ interface EnforceLimitInput<T> {
|
|
|
113
114
|
now?: Date;
|
|
114
115
|
}
|
|
115
116
|
declare class EntitlementService {
|
|
116
|
-
private readonly
|
|
117
|
+
private readonly catalogs;
|
|
117
118
|
private readonly subscriptions;
|
|
118
119
|
private readonly planVersions;
|
|
119
120
|
private readonly tx;
|
|
@@ -124,8 +125,16 @@ declare class EntitlementService {
|
|
|
124
125
|
private readonly discoverySnapshot;
|
|
125
126
|
private readonly cache;
|
|
126
127
|
private replacedByIndex;
|
|
127
|
-
constructor(
|
|
128
|
-
|
|
128
|
+
constructor(catalogs: PlanCatalogSource, subscriptions: SubscriptionRepository, planVersions: PlanVersionRepository, tx: TransactionRunner, resolutionConfig?: EntitlementResolutionConfig | null, subscriptionBundles?: SubscriptionBundleRepository | null, bundles?: BundleRepository | null, subscriptionContracts?: SubscriptionContractRepository | null, discoverySnapshot?: DiscoverySnapshot | null);
|
|
129
|
+
/**
|
|
130
|
+
* The tenant's effective limits, answered from the cache for up to
|
|
131
|
+
* `CACHE_TTL_MS`. A caller that has already read the catalogue for its own
|
|
132
|
+
* operation passes it as `catalog`: the answer is then computed against
|
|
133
|
+
* that reading and kept out of the cache in both directions — not taken
|
|
134
|
+
* from it, and not written to it, since a reading the caller holds may be
|
|
135
|
+
* older than the one everybody else should be answered from.
|
|
136
|
+
*/
|
|
137
|
+
computeLimits(tenantId: string, now?: Date, catalog?: PlanCatalog): Promise<EffectiveLimits>;
|
|
129
138
|
/**
|
|
130
139
|
* Clears a tenant's cache entry. MUST be called as soon as a mutation
|
|
131
140
|
* changes the subscription, a bundle booking, or a PlanVersion binding —
|
|
@@ -140,12 +149,36 @@ declare class EntitlementService {
|
|
|
140
149
|
* have a `SubscriptionRecord` (e.g. within a transaction).
|
|
141
150
|
*/
|
|
142
151
|
deriveLimits(sub: SubscriptionRecord, now: Date, tx?: TransactionContext): Promise<EffectiveLimits>;
|
|
152
|
+
/**
|
|
153
|
+
* `deriveLimits` against a catalogue already read. The catalogue decides
|
|
154
|
+
* which features are `plannedOnly`, and it is read outside any transaction
|
|
155
|
+
* a caller holds, so that checking a limit does not wait for a second
|
|
156
|
+
* connection while the subscription row is locked.
|
|
157
|
+
*/
|
|
158
|
+
private limitsFor;
|
|
159
|
+
/**
|
|
160
|
+
* The last thing every path does, so that no path can skip it.
|
|
161
|
+
*
|
|
162
|
+
* Two steps, in this order. Grandfathering (#39): granted old feature keys
|
|
163
|
+
* transitively grant their successors from the `replaces` chains of the
|
|
164
|
+
* discovery snapshot — a no-op without a snapshot or without replaces
|
|
165
|
+
* declarations. Then `plannedOnly` features come out.
|
|
166
|
+
*
|
|
167
|
+
* The filter sits here rather than in each branch because it used to sit
|
|
168
|
+
* in each branch and one of them did not have it: limits read from a
|
|
169
|
+
* frozen contract were handed over as they stood, so a feature the
|
|
170
|
+
* catalogue says has no code behind it was granted to whoever had signed
|
|
171
|
+
* before it was marked. A successor pulled in by an alias could arrive the
|
|
172
|
+
* same way. `SC-ENTL-003` says "never … wherever it comes from", and one
|
|
173
|
+
* place is what makes that answerable.
|
|
174
|
+
*/
|
|
175
|
+
private asGrantable;
|
|
143
176
|
/**
|
|
144
177
|
* Grandfathering (#39): granted old feature keys transitively grant
|
|
145
178
|
* their successors from the `replaces` chains of the discovery snapshot.
|
|
146
179
|
* A no-op without a snapshot or without replaces declarations.
|
|
147
180
|
*/
|
|
148
|
-
private
|
|
181
|
+
private replaceFeatureAliases;
|
|
149
182
|
private findActiveContract;
|
|
150
183
|
/**
|
|
151
184
|
* Loads a subscription's active bundle bookings and resolves the
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { PlanId, QuotaKey, FeatureKey,
|
|
2
|
-
import {
|
|
1
|
+
import { PlanId, QuotaKey, FeatureKey, SubscriptionRepository, PlanVersionRepository, TransactionRunner, SubscriptionBundleRepository, BundleRepository, SubscriptionContractRepository, DiscoverySnapshot, PlanCatalog, SubscriptionRecord, TransactionContext, ContractLineItemRecord, SubscriptionContractRecord } from '@saasicat/core';
|
|
2
|
+
import { P as PlanCatalogSource } from './plan-catalog-source-DWe-BGY1.cjs';
|
|
3
|
+
import { E as EntitlementResolutionConfig } from './plan-resolution-CwUy_OqC.cjs';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Snapshot of the binding `PlanVersion` of a subscription. Quotas are
|
|
@@ -113,7 +114,7 @@ interface EnforceLimitInput<T> {
|
|
|
113
114
|
now?: Date;
|
|
114
115
|
}
|
|
115
116
|
declare class EntitlementService {
|
|
116
|
-
private readonly
|
|
117
|
+
private readonly catalogs;
|
|
117
118
|
private readonly subscriptions;
|
|
118
119
|
private readonly planVersions;
|
|
119
120
|
private readonly tx;
|
|
@@ -124,8 +125,16 @@ declare class EntitlementService {
|
|
|
124
125
|
private readonly discoverySnapshot;
|
|
125
126
|
private readonly cache;
|
|
126
127
|
private replacedByIndex;
|
|
127
|
-
constructor(
|
|
128
|
-
|
|
128
|
+
constructor(catalogs: PlanCatalogSource, subscriptions: SubscriptionRepository, planVersions: PlanVersionRepository, tx: TransactionRunner, resolutionConfig?: EntitlementResolutionConfig | null, subscriptionBundles?: SubscriptionBundleRepository | null, bundles?: BundleRepository | null, subscriptionContracts?: SubscriptionContractRepository | null, discoverySnapshot?: DiscoverySnapshot | null);
|
|
129
|
+
/**
|
|
130
|
+
* The tenant's effective limits, answered from the cache for up to
|
|
131
|
+
* `CACHE_TTL_MS`. A caller that has already read the catalogue for its own
|
|
132
|
+
* operation passes it as `catalog`: the answer is then computed against
|
|
133
|
+
* that reading and kept out of the cache in both directions — not taken
|
|
134
|
+
* from it, and not written to it, since a reading the caller holds may be
|
|
135
|
+
* older than the one everybody else should be answered from.
|
|
136
|
+
*/
|
|
137
|
+
computeLimits(tenantId: string, now?: Date, catalog?: PlanCatalog): Promise<EffectiveLimits>;
|
|
129
138
|
/**
|
|
130
139
|
* Clears a tenant's cache entry. MUST be called as soon as a mutation
|
|
131
140
|
* changes the subscription, a bundle booking, or a PlanVersion binding —
|
|
@@ -140,12 +149,36 @@ declare class EntitlementService {
|
|
|
140
149
|
* have a `SubscriptionRecord` (e.g. within a transaction).
|
|
141
150
|
*/
|
|
142
151
|
deriveLimits(sub: SubscriptionRecord, now: Date, tx?: TransactionContext): Promise<EffectiveLimits>;
|
|
152
|
+
/**
|
|
153
|
+
* `deriveLimits` against a catalogue already read. The catalogue decides
|
|
154
|
+
* which features are `plannedOnly`, and it is read outside any transaction
|
|
155
|
+
* a caller holds, so that checking a limit does not wait for a second
|
|
156
|
+
* connection while the subscription row is locked.
|
|
157
|
+
*/
|
|
158
|
+
private limitsFor;
|
|
159
|
+
/**
|
|
160
|
+
* The last thing every path does, so that no path can skip it.
|
|
161
|
+
*
|
|
162
|
+
* Two steps, in this order. Grandfathering (#39): granted old feature keys
|
|
163
|
+
* transitively grant their successors from the `replaces` chains of the
|
|
164
|
+
* discovery snapshot — a no-op without a snapshot or without replaces
|
|
165
|
+
* declarations. Then `plannedOnly` features come out.
|
|
166
|
+
*
|
|
167
|
+
* The filter sits here rather than in each branch because it used to sit
|
|
168
|
+
* in each branch and one of them did not have it: limits read from a
|
|
169
|
+
* frozen contract were handed over as they stood, so a feature the
|
|
170
|
+
* catalogue says has no code behind it was granted to whoever had signed
|
|
171
|
+
* before it was marked. A successor pulled in by an alias could arrive the
|
|
172
|
+
* same way. `SC-ENTL-003` says "never … wherever it comes from", and one
|
|
173
|
+
* place is what makes that answerable.
|
|
174
|
+
*/
|
|
175
|
+
private asGrantable;
|
|
143
176
|
/**
|
|
144
177
|
* Grandfathering (#39): granted old feature keys transitively grant
|
|
145
178
|
* their successors from the `replaces` chains of the discovery snapshot.
|
|
146
179
|
* A no-op without a snapshot or without replaces declarations.
|
|
147
180
|
*/
|
|
148
|
-
private
|
|
181
|
+
private replaceFeatureAliases;
|
|
149
182
|
private findActiveContract;
|
|
150
183
|
/**
|
|
151
184
|
* Loads a subscription's active bundle bookings and resolves the
|