@saasicat/nest 0.13.0 → 0.15.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/_entries.cjs +1529 -1345
- package/dist/admin/index.d.cts +8 -6
- package/dist/admin/index.d.ts +8 -6
- package/dist/admin/index.js +13 -12
- package/dist/{admin-resources.module-Cms8MY6h.d.ts → admin-resources.module-BY5r_1MG.d.ts} +29 -3
- package/dist/{admin-resources.module-BZN_yBFj.d.cts → admin-resources.module-DGgGSdzN.d.cts} +29 -3
- package/dist/{admin-stats.module-15ac5KY3.d.ts → admin-stats.service-Db2exT_d.d.ts} +2 -23
- package/dist/{admin-stats.module-v4SVvWzj.d.cts → admin-stats.service-HUZIU448.d.cts} +2 -23
- package/dist/{aggregation-CfI0bOsQ.d.cts → aggregation-SKfXu09x.d.cts} +35 -3
- package/dist/{aggregation-BibpEO0t.d.ts → aggregation-o0LMenvl.d.ts} +35 -3
- package/dist/billing/index.d.cts +2 -2
- package/dist/billing/index.d.ts +2 -2
- package/dist/billing/index.js +4 -3
- package/dist/catalog/index.js +3 -2
- package/dist/checkout-offer/index.d.cts +2 -1
- package/dist/checkout-offer/index.d.ts +2 -1
- package/dist/checkout-offer/index.js +2 -1
- package/dist/checkout-offer.module-Ca3_TieR.d.ts +39 -0
- package/dist/checkout-offer.module-DmlpPevf.d.cts +39 -0
- package/dist/{checkout-offer.module-Y0hDOVrq.d.ts → checkout-offer.service-BX51dljL.d.cts} +1 -37
- package/dist/{checkout-offer.module-ZYF5IsDY.d.cts → checkout-offer.service-BX51dljL.d.ts} +1 -37
- package/dist/{chunk-2PNX2QL2.js → chunk-32EMXPU2.js} +1 -0
- package/dist/{chunk-DVFPKVLO.js → chunk-5KH2O4SF.js} +16 -4
- package/dist/{chunk-TXDH4FUA.js → chunk-7RRWI5LH.js} +1 -1
- package/dist/chunk-EWPF57AG.js +13 -0
- package/dist/{chunk-2WNM5THV.js → chunk-EXOLOJFZ.js} +58 -15
- package/dist/{chunk-HBFU5AN3.js → chunk-GJBXOCRZ.js} +4 -0
- package/dist/{chunk-IRWZC3GC.js → chunk-GLLCB4BP.js} +4 -0
- package/dist/{chunk-33TP26MR.js → chunk-P3DP6GJE.js} +4 -0
- package/dist/{chunk-FVT7KTUI.js → chunk-PLJEAUFU.js} +275 -61
- package/dist/{chunk-J3BMIR4W.js → chunk-YITTE646.js} +463 -83
- package/dist/chunk-YSC46BGM.js +21 -0
- package/dist/define-saasicat-CeDBX9ji.d.cts +46 -0
- package/dist/define-saasicat-Rc0rXrYG.d.ts +46 -0
- package/dist/enforce-quota.interceptor-CmbWX39L.d.ts +60 -0
- package/dist/enforce-quota.interceptor-DMw-bPyk.d.cts +60 -0
- package/dist/entitlement/index.d.cts +1 -1
- package/dist/entitlement/index.d.ts +1 -1
- package/dist/entitlement/index.js +7 -1
- package/dist/index.d.cts +12 -10
- package/dist/index.d.ts +12 -10
- package/dist/index.js +40 -19
- package/dist/platform/index.d.cts +13 -17
- package/dist/platform/index.d.ts +13 -17
- package/dist/platform/index.js +25 -26
- package/dist/promo/index.js +2 -1
- package/dist/{enforce-quota.interceptor-Dse3jSpU.d.cts → saas-platform.module-D3rUTiho.d.cts} +69 -62
- package/dist/{enforce-quota.interceptor-DMEvL-bE.d.ts → saas-platform.module-DLhoqKNA.d.ts} +69 -62
- package/dist/subscription-contract/index.d.cts +1 -1
- package/dist/subscription-contract/index.d.ts +1 -1
- package/dist/subscription-contract/index.js +1 -1
- package/dist/{subscription-contract.module-CG9fPKAr.d.cts → subscription-contract.module-B2uNvUJL.d.cts} +3 -1
- package/dist/{subscription-contract.module-CVebZzHR.d.ts → subscription-contract.module-edyhBr4n.d.ts} +3 -1
- package/dist/{subscription-bundle-preview.service-DBbrE_cw.d.ts → tenant-billing.controller-BwZRnJ3q.d.ts} +106 -106
- package/dist/{subscription-bundle-preview.service-BkJXHAeP.d.cts → tenant-billing.controller-CG4CaFUP.d.cts} +106 -106
- package/dist/testing/index.d.cts +6 -3
- package/dist/testing/index.d.ts +6 -3
- package/dist/testing/index.js +9 -7
- package/package.json +3 -3
- package/dist/chunk-LZHLGUQI.js +0 -190
- package/dist/chunk-WJ6BMDL3.js +0 -313
- package/dist/setup.service-BPwJ7My_.d.cts +0 -45
- package/dist/setup.service-D2mrdDDB.d.ts +0 -45
package/dist/admin/index.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
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-HUZIU448.cjs';
|
|
2
|
+
export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions, M as MfaGuard, h as MfaService, P as PLATFORM_CORE_CONTRIBUTION_TOKEN, R as REQUIRE_MFA_KEY, i as RequireMfa, S as SuperAdminGuard, T as TotpSetupResult, V as VerifyTotpInput } from '../admin-stats.service-HUZIU448.cjs';
|
|
3
3
|
export { A as AdminAuditService } from '../admin-audit.service-9IqXMlZm.cjs';
|
|
4
|
-
import { b as AdminManifestConfig } from '../admin-resources.module-
|
|
5
|
-
export { A as ADMIN_MANIFEST_CONFIG, a as ADMIN_RESOURCES_PORT_TOKEN, c as AdminResourcesModule, d as AdminResourcesModuleOptions, e as AdminResourcesService, S as SuspendTenantDto } from '../admin-resources.module-
|
|
4
|
+
import { b as AdminManifestConfig } from '../admin-resources.module-DGgGSdzN.cjs';
|
|
5
|
+
export { A as ADMIN_MANIFEST_CONFIG, a as ADMIN_RESOURCES_PORT_TOKEN, c as AdminResourcesModule, d as AdminResourcesModuleOptions, e as AdminResourcesService, f as AdminStatsModule, g as AdminStatsModuleOptions, S as SuspendTenantDto } from '../admin-resources.module-DGgGSdzN.cjs';
|
|
6
6
|
import { PublicBootResponse, ManifestContribution } from '@saasicat/types';
|
|
7
|
-
import '@nestjs/common';
|
|
7
|
+
import { Type, CanActivate } from '@nestjs/common';
|
|
8
8
|
import '@nestjs/core';
|
|
9
9
|
import 'rxjs';
|
|
10
10
|
import '../di-CcNeq9v-.cjs';
|
|
@@ -32,5 +32,7 @@ declare class AdminStatsController {
|
|
|
32
32
|
constructor(stats: AdminStatsService);
|
|
33
33
|
getDashboardSnapshot(): Promise<AdminStatsSnapshot>;
|
|
34
34
|
}
|
|
35
|
+
/** Builds the stats controller with an explicit, ordered authentication chain. */
|
|
36
|
+
declare function buildAdminStatsController(guards: Array<Type<CanActivate>>): Type;
|
|
35
37
|
|
|
36
|
-
export { ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN, AUDIT_PORT_TOKEN, AUDIT_STATS_PORT_TOKEN, AdminManifestConfig, AdminPublicBootController, AdminStatsController, AdminStatsService, AdminStatsSnapshot, MFA_PORT_TOKEN, PLATFORM_CORE_MANIFEST_CONTRIBUTION, PROMO_CODE_STATS_PORT_TOKEN, RLS_BYPASS_PORT_TOKEN, SUBSCRIPTION_STATS_PORT_TOKEN };
|
|
38
|
+
export { ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN, AUDIT_PORT_TOKEN, AUDIT_STATS_PORT_TOKEN, AdminManifestConfig, AdminPublicBootController, AdminStatsController, AdminStatsService, AdminStatsSnapshot, MFA_PORT_TOKEN, PLATFORM_CORE_MANIFEST_CONTRIBUTION, PROMO_CODE_STATS_PORT_TOKEN, RLS_BYPASS_PORT_TOKEN, SUBSCRIPTION_STATS_PORT_TOKEN, buildAdminStatsController };
|
package/dist/admin/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
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-Db2exT_d.js';
|
|
2
|
+
export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions, M as MfaGuard, h as MfaService, P as PLATFORM_CORE_CONTRIBUTION_TOKEN, R as REQUIRE_MFA_KEY, i as RequireMfa, S as SuperAdminGuard, T as TotpSetupResult, V as VerifyTotpInput } from '../admin-stats.service-Db2exT_d.js';
|
|
3
3
|
export { A as AdminAuditService } from '../admin-audit.service-9IqXMlZm.js';
|
|
4
|
-
import { b as AdminManifestConfig } from '../admin-resources.module-
|
|
5
|
-
export { A as ADMIN_MANIFEST_CONFIG, a as ADMIN_RESOURCES_PORT_TOKEN, c as AdminResourcesModule, d as AdminResourcesModuleOptions, e as AdminResourcesService, S as SuspendTenantDto } from '../admin-resources.module-
|
|
4
|
+
import { b as AdminManifestConfig } from '../admin-resources.module-BY5r_1MG.js';
|
|
5
|
+
export { A as ADMIN_MANIFEST_CONFIG, a as ADMIN_RESOURCES_PORT_TOKEN, c as AdminResourcesModule, d as AdminResourcesModuleOptions, e as AdminResourcesService, f as AdminStatsModule, g as AdminStatsModuleOptions, S as SuspendTenantDto } from '../admin-resources.module-BY5r_1MG.js';
|
|
6
6
|
import { PublicBootResponse, ManifestContribution } from '@saasicat/types';
|
|
7
|
-
import '@nestjs/common';
|
|
7
|
+
import { Type, CanActivate } from '@nestjs/common';
|
|
8
8
|
import '@nestjs/core';
|
|
9
9
|
import 'rxjs';
|
|
10
10
|
import '../di-CcNeq9v-.js';
|
|
@@ -32,5 +32,7 @@ declare class AdminStatsController {
|
|
|
32
32
|
constructor(stats: AdminStatsService);
|
|
33
33
|
getDashboardSnapshot(): Promise<AdminStatsSnapshot>;
|
|
34
34
|
}
|
|
35
|
+
/** Builds the stats controller with an explicit, ordered authentication chain. */
|
|
36
|
+
declare function buildAdminStatsController(guards: Array<Type<CanActivate>>): Type;
|
|
35
37
|
|
|
36
|
-
export { ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN, AUDIT_PORT_TOKEN, AUDIT_STATS_PORT_TOKEN, AdminManifestConfig, AdminPublicBootController, AdminStatsController, AdminStatsService, AdminStatsSnapshot, MFA_PORT_TOKEN, PLATFORM_CORE_MANIFEST_CONTRIBUTION, PROMO_CODE_STATS_PORT_TOKEN, RLS_BYPASS_PORT_TOKEN, SUBSCRIPTION_STATS_PORT_TOKEN };
|
|
38
|
+
export { ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN, AUDIT_PORT_TOKEN, AUDIT_STATS_PORT_TOKEN, AdminManifestConfig, AdminPublicBootController, AdminStatsController, AdminStatsService, AdminStatsSnapshot, MFA_PORT_TOKEN, PLATFORM_CORE_MANIFEST_CONTRIBUTION, PROMO_CODE_STATS_PORT_TOKEN, RLS_BYPASS_PORT_TOKEN, SUBSCRIPTION_STATS_PORT_TOKEN, buildAdminStatsController };
|
package/dist/admin/index.js
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
import "../chunk-UF53DWWR.js";
|
|
2
|
-
import {
|
|
3
|
-
ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN,
|
|
4
|
-
AUDIT_STATS_PORT_TOKEN,
|
|
5
|
-
AdminStatsController,
|
|
6
|
-
AdminStatsModule,
|
|
7
|
-
AdminStatsService,
|
|
8
|
-
PROMO_CODE_STATS_PORT_TOKEN,
|
|
9
|
-
SUBSCRIPTION_STATS_PORT_TOKEN
|
|
10
|
-
} from "../chunk-LZHLGUQI.js";
|
|
11
2
|
import {
|
|
12
3
|
ADMIN_MANIFEST_CONFIG,
|
|
13
4
|
ADMIN_RESOURCES_PORT_TOKEN,
|
|
5
|
+
ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN,
|
|
6
|
+
AUDIT_STATS_PORT_TOKEN,
|
|
14
7
|
AdminBypassRlsInterceptor,
|
|
15
8
|
AdminManifestModule,
|
|
16
9
|
AdminManifestService,
|
|
@@ -18,21 +11,28 @@ import {
|
|
|
18
11
|
AdminPublicBootController,
|
|
19
12
|
AdminResourcesModule,
|
|
20
13
|
AdminResourcesService,
|
|
14
|
+
AdminStatsController,
|
|
15
|
+
AdminStatsModule,
|
|
16
|
+
AdminStatsService,
|
|
21
17
|
MfaGuard,
|
|
22
18
|
MfaService,
|
|
23
19
|
PLATFORM_CORE_CONTRIBUTION_TOKEN,
|
|
24
20
|
PLATFORM_CORE_MANIFEST_CONTRIBUTION,
|
|
21
|
+
PROMO_CODE_STATS_PORT_TOKEN,
|
|
25
22
|
REQUIRE_MFA_KEY,
|
|
26
23
|
RequireMfa,
|
|
24
|
+
SUBSCRIPTION_STATS_PORT_TOKEN,
|
|
27
25
|
SuperAdminGuard,
|
|
28
|
-
SuspendTenantDto
|
|
29
|
-
|
|
26
|
+
SuspendTenantDto,
|
|
27
|
+
buildAdminStatsController
|
|
28
|
+
} from "../chunk-PLJEAUFU.js";
|
|
30
29
|
import {
|
|
31
30
|
AUDIT_PORT_TOKEN,
|
|
32
31
|
AdminAuditService,
|
|
33
32
|
MFA_PORT_TOKEN,
|
|
34
33
|
RLS_BYPASS_PORT_TOKEN
|
|
35
34
|
} from "../chunk-E56W4U2P.js";
|
|
35
|
+
import "../chunk-YSC46BGM.js";
|
|
36
36
|
import "../chunk-SABTXESR.js";
|
|
37
37
|
import "../chunk-SHUYVCID.js";
|
|
38
38
|
export {
|
|
@@ -63,5 +63,6 @@ export {
|
|
|
63
63
|
RequireMfa,
|
|
64
64
|
SUBSCRIPTION_STATS_PORT_TOKEN,
|
|
65
65
|
SuperAdminGuard,
|
|
66
|
-
SuspendTenantDto
|
|
66
|
+
SuspendTenantDto,
|
|
67
|
+
buildAdminStatsController
|
|
67
68
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AdminManifest, AdminResourcesPort, AdminTenantListFilter, AdminTenantListRow, AdminTenantDetail, AdminUserListFilter, AdminUserListRow, AdminAuditListFilter, AuditEntry, AdminSubscriptionListRow, AdminActor, AdminTenantStateResult } from '@saasicat/types';
|
|
2
|
-
import { Type,
|
|
1
|
+
import { AdminManifest, SubscriptionStatsPort, PromoCodeStatsPort, AuditStatsPort, AdminResourcesPort, AdminTenantListFilter, AdminTenantListRow, AdminTenantDetail, AdminUserListFilter, AdminUserListRow, AdminAuditListFilter, AuditEntry, AdminSubscriptionListRow, AdminActor, AdminTenantStateResult } from '@saasicat/types';
|
|
2
|
+
import { Type, DynamicModule, ForwardReference, Provider, CanActivate } from '@nestjs/common';
|
|
3
3
|
import { P as ProviderSpec } from './di-CcNeq9v-.js';
|
|
4
4
|
import { A as AdminAuditService } from './admin-audit.service-9IqXMlZm.js';
|
|
5
5
|
|
|
@@ -10,6 +10,32 @@ interface AdminManifestConfig {
|
|
|
10
10
|
planCatalogSnapshot: AdminManifest['planCatalogSnapshot'];
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
interface AdminStatsModuleOptions {
|
|
14
|
+
subscriptionStatsPort: ProviderSpec<SubscriptionStatsPort>;
|
|
15
|
+
promoCodeStatsPort: ProviderSpec<PromoCodeStatsPort>;
|
|
16
|
+
auditStatsPort: ProviderSpec<AuditStatsPort>;
|
|
17
|
+
/** Audit window in days for the "last N days" KPI. Default 7. */
|
|
18
|
+
auditWindowDays?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Modules whose providers must be visible in the DI scope of this
|
|
21
|
+
* DynamicModule — e.g. the app module that registers the adapter classes
|
|
22
|
+
* referenced by the factory `inject` lists.
|
|
23
|
+
*/
|
|
24
|
+
imports?: Array<Type<unknown> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
|
|
25
|
+
/** Additional providers registered in the DynamicModule itself. */
|
|
26
|
+
extraProviders?: Provider[];
|
|
27
|
+
/**
|
|
28
|
+
* Complete ordered guard chain for the dashboard endpoint. When omitted,
|
|
29
|
+
* the backwards-compatible default is `SuperAdminGuard` only.
|
|
30
|
+
*/
|
|
31
|
+
guards?: Array<Type<CanActivate>>;
|
|
32
|
+
/** Register the module globally — default `false`. */
|
|
33
|
+
global?: boolean;
|
|
34
|
+
}
|
|
35
|
+
declare class AdminStatsModule {
|
|
36
|
+
static forRoot(options: AdminStatsModuleOptions): DynamicModule;
|
|
37
|
+
}
|
|
38
|
+
|
|
13
39
|
declare const ADMIN_RESOURCES_PORT_TOKEN: unique symbol;
|
|
14
40
|
declare class SuspendTenantDto {
|
|
15
41
|
reason?: string;
|
|
@@ -37,4 +63,4 @@ declare class AdminResourcesModule {
|
|
|
37
63
|
static forRoot(options: AdminResourcesModuleOptions): DynamicModule;
|
|
38
64
|
}
|
|
39
65
|
|
|
40
|
-
export { ADMIN_MANIFEST_CONFIG as A, SuspendTenantDto as S, ADMIN_RESOURCES_PORT_TOKEN as a, type AdminManifestConfig as b, AdminResourcesModule as c, type AdminResourcesModuleOptions as d, AdminResourcesService as e };
|
|
66
|
+
export { ADMIN_MANIFEST_CONFIG as A, SuspendTenantDto as S, ADMIN_RESOURCES_PORT_TOKEN as a, type AdminManifestConfig as b, AdminResourcesModule as c, type AdminResourcesModuleOptions as d, AdminResourcesService as e, AdminStatsModule as f, type AdminStatsModuleOptions as g };
|
package/dist/{admin-resources.module-BZN_yBFj.d.cts → admin-resources.module-DGgGSdzN.d.cts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AdminManifest, AdminResourcesPort, AdminTenantListFilter, AdminTenantListRow, AdminTenantDetail, AdminUserListFilter, AdminUserListRow, AdminAuditListFilter, AuditEntry, AdminSubscriptionListRow, AdminActor, AdminTenantStateResult } from '@saasicat/types';
|
|
2
|
-
import { Type,
|
|
1
|
+
import { AdminManifest, SubscriptionStatsPort, PromoCodeStatsPort, AuditStatsPort, AdminResourcesPort, AdminTenantListFilter, AdminTenantListRow, AdminTenantDetail, AdminUserListFilter, AdminUserListRow, AdminAuditListFilter, AuditEntry, AdminSubscriptionListRow, AdminActor, AdminTenantStateResult } from '@saasicat/types';
|
|
2
|
+
import { Type, DynamicModule, ForwardReference, Provider, CanActivate } from '@nestjs/common';
|
|
3
3
|
import { P as ProviderSpec } from './di-CcNeq9v-.cjs';
|
|
4
4
|
import { A as AdminAuditService } from './admin-audit.service-9IqXMlZm.cjs';
|
|
5
5
|
|
|
@@ -10,6 +10,32 @@ interface AdminManifestConfig {
|
|
|
10
10
|
planCatalogSnapshot: AdminManifest['planCatalogSnapshot'];
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
interface AdminStatsModuleOptions {
|
|
14
|
+
subscriptionStatsPort: ProviderSpec<SubscriptionStatsPort>;
|
|
15
|
+
promoCodeStatsPort: ProviderSpec<PromoCodeStatsPort>;
|
|
16
|
+
auditStatsPort: ProviderSpec<AuditStatsPort>;
|
|
17
|
+
/** Audit window in days for the "last N days" KPI. Default 7. */
|
|
18
|
+
auditWindowDays?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Modules whose providers must be visible in the DI scope of this
|
|
21
|
+
* DynamicModule — e.g. the app module that registers the adapter classes
|
|
22
|
+
* referenced by the factory `inject` lists.
|
|
23
|
+
*/
|
|
24
|
+
imports?: Array<Type<unknown> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
|
|
25
|
+
/** Additional providers registered in the DynamicModule itself. */
|
|
26
|
+
extraProviders?: Provider[];
|
|
27
|
+
/**
|
|
28
|
+
* Complete ordered guard chain for the dashboard endpoint. When omitted,
|
|
29
|
+
* the backwards-compatible default is `SuperAdminGuard` only.
|
|
30
|
+
*/
|
|
31
|
+
guards?: Array<Type<CanActivate>>;
|
|
32
|
+
/** Register the module globally — default `false`. */
|
|
33
|
+
global?: boolean;
|
|
34
|
+
}
|
|
35
|
+
declare class AdminStatsModule {
|
|
36
|
+
static forRoot(options: AdminStatsModuleOptions): DynamicModule;
|
|
37
|
+
}
|
|
38
|
+
|
|
13
39
|
declare const ADMIN_RESOURCES_PORT_TOKEN: unique symbol;
|
|
14
40
|
declare class SuspendTenantDto {
|
|
15
41
|
reason?: string;
|
|
@@ -37,4 +63,4 @@ declare class AdminResourcesModule {
|
|
|
37
63
|
static forRoot(options: AdminResourcesModuleOptions): DynamicModule;
|
|
38
64
|
}
|
|
39
65
|
|
|
40
|
-
export { ADMIN_MANIFEST_CONFIG as A, SuspendTenantDto as S, ADMIN_RESOURCES_PORT_TOKEN as a, type AdminManifestConfig as b, AdminResourcesModule as c, type AdminResourcesModuleOptions as d, AdminResourcesService as e };
|
|
66
|
+
export { ADMIN_MANIFEST_CONFIG as A, SuspendTenantDto as S, ADMIN_RESOURCES_PORT_TOKEN as a, type AdminManifestConfig as b, AdminResourcesModule as c, type AdminResourcesModuleOptions as d, AdminResourcesService as e, AdminStatsModule as f, type AdminStatsModuleOptions as g };
|
|
@@ -3,7 +3,7 @@ import { Reflector } from '@nestjs/core';
|
|
|
3
3
|
import { MfaPort, RlsBypassPort, AuditPort, ManifestContribution, AdminManifest, SubscriptionStatsPort, PromoCodeStatsPort, AuditStatsPort, SubscriptionStatsSnapshot, PromoCodeStatsSnapshot, AuditStatsSnapshot } from '@saasicat/types';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import { P as ProviderSpec } from './di-CcNeq9v-.js';
|
|
6
|
-
import { b as AdminManifestConfig } from './admin-resources.module-
|
|
6
|
+
import { b as AdminManifestConfig } from './admin-resources.module-BY5r_1MG.js';
|
|
7
7
|
|
|
8
8
|
declare class SuperAdminGuard implements CanActivate {
|
|
9
9
|
canActivate(context: ExecutionContext): boolean;
|
|
@@ -177,25 +177,4 @@ declare class AdminStatsService {
|
|
|
177
177
|
getSnapshot(): Promise<AdminStatsSnapshot>;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
|
|
181
|
-
subscriptionStatsPort: ProviderSpec<SubscriptionStatsPort>;
|
|
182
|
-
promoCodeStatsPort: ProviderSpec<PromoCodeStatsPort>;
|
|
183
|
-
auditStatsPort: ProviderSpec<AuditStatsPort>;
|
|
184
|
-
/** Audit window in days for the "last N days" KPI. Default 7. */
|
|
185
|
-
auditWindowDays?: number;
|
|
186
|
-
/**
|
|
187
|
-
* Modules whose providers must be visible in the DI scope of this
|
|
188
|
-
* DynamicModule — e.g. the app module that registers the adapter classes
|
|
189
|
-
* referenced by the factory `inject` lists.
|
|
190
|
-
*/
|
|
191
|
-
imports?: Array<Type<unknown> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
|
|
192
|
-
/** Additional providers registered in the DynamicModule itself. */
|
|
193
|
-
extraProviders?: Provider[];
|
|
194
|
-
/** Register the module globally — default `false`. */
|
|
195
|
-
global?: boolean;
|
|
196
|
-
}
|
|
197
|
-
declare class AdminStatsModule {
|
|
198
|
-
static forRoot(options: AdminStatsModuleOptions): DynamicModule;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export { AdminBypassRlsInterceptor as A, MfaGuard 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, AdminStatsModule as f, type AdminStatsModuleOptions as g, AdminStatsService as h, type AdminStatsSnapshot as i, MfaService as j, RequireMfa as k };
|
|
180
|
+
export { AdminBypassRlsInterceptor as A, MfaGuard 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, MfaService as h, RequireMfa as i };
|
|
@@ -3,7 +3,7 @@ import { Reflector } from '@nestjs/core';
|
|
|
3
3
|
import { MfaPort, RlsBypassPort, AuditPort, ManifestContribution, AdminManifest, SubscriptionStatsPort, PromoCodeStatsPort, AuditStatsPort, SubscriptionStatsSnapshot, PromoCodeStatsSnapshot, AuditStatsSnapshot } from '@saasicat/types';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import { P as ProviderSpec } from './di-CcNeq9v-.cjs';
|
|
6
|
-
import { b as AdminManifestConfig } from './admin-resources.module-
|
|
6
|
+
import { b as AdminManifestConfig } from './admin-resources.module-DGgGSdzN.cjs';
|
|
7
7
|
|
|
8
8
|
declare class SuperAdminGuard implements CanActivate {
|
|
9
9
|
canActivate(context: ExecutionContext): boolean;
|
|
@@ -177,25 +177,4 @@ declare class AdminStatsService {
|
|
|
177
177
|
getSnapshot(): Promise<AdminStatsSnapshot>;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
|
|
181
|
-
subscriptionStatsPort: ProviderSpec<SubscriptionStatsPort>;
|
|
182
|
-
promoCodeStatsPort: ProviderSpec<PromoCodeStatsPort>;
|
|
183
|
-
auditStatsPort: ProviderSpec<AuditStatsPort>;
|
|
184
|
-
/** Audit window in days for the "last N days" KPI. Default 7. */
|
|
185
|
-
auditWindowDays?: number;
|
|
186
|
-
/**
|
|
187
|
-
* Modules whose providers must be visible in the DI scope of this
|
|
188
|
-
* DynamicModule — e.g. the app module that registers the adapter classes
|
|
189
|
-
* referenced by the factory `inject` lists.
|
|
190
|
-
*/
|
|
191
|
-
imports?: Array<Type<unknown> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
|
|
192
|
-
/** Additional providers registered in the DynamicModule itself. */
|
|
193
|
-
extraProviders?: Provider[];
|
|
194
|
-
/** Register the module globally — default `false`. */
|
|
195
|
-
global?: boolean;
|
|
196
|
-
}
|
|
197
|
-
declare class AdminStatsModule {
|
|
198
|
-
static forRoot(options: AdminStatsModuleOptions): DynamicModule;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export { AdminBypassRlsInterceptor as A, MfaGuard 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, AdminStatsModule as f, type AdminStatsModuleOptions as g, AdminStatsService as h, type AdminStatsSnapshot as i, MfaService as j, RequireMfa as k };
|
|
180
|
+
export { AdminBypassRlsInterceptor as A, MfaGuard 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, MfaService as h, RequireMfa as i };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PlanId, QuotaKey, FeatureKey, PlanCatalog, SubscriptionRepository, PlanVersionRepository, TransactionRunner, SubscriptionBundleRepository, BundleRepository, SubscriptionContractRepository, DiscoverySnapshot, SubscriptionRecord, TransactionContext, ContractLineItemRecord } from '@saasicat/types';
|
|
1
|
+
import { PlanId, QuotaKey, FeatureKey, PlanCatalog, SubscriptionRepository, PlanVersionRepository, TransactionRunner, SubscriptionBundleRepository, BundleRepository, SubscriptionContractRepository, DiscoverySnapshot, SubscriptionRecord, TransactionContext, ContractLineItemRecord, SubscriptionContractRecord } from '@saasicat/types';
|
|
2
2
|
import { E as EntitlementResolutionConfig } from './plan-resolution-CFCoUkrE.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -27,6 +27,12 @@ interface PlanVersionSnapshot {
|
|
|
27
27
|
*/
|
|
28
28
|
interface SubscriptionBundleSnapshot {
|
|
29
29
|
bundleKey: string;
|
|
30
|
+
/**
|
|
31
|
+
* Booked `BundleVersion`. Lets the contract path tell bundles that are
|
|
32
|
+
* already part of a frozen contract from ones booked afterwards, so their
|
|
33
|
+
* quotas are not counted twice.
|
|
34
|
+
*/
|
|
35
|
+
bundleVersionId: string;
|
|
30
36
|
features: FeatureKey[];
|
|
31
37
|
quotas: Record<QuotaKey, number>;
|
|
32
38
|
/**
|
|
@@ -140,7 +146,7 @@ declare class EntitlementService {
|
|
|
140
146
|
* A no-op without a snapshot or without replaces declarations.
|
|
141
147
|
*/
|
|
142
148
|
private withReplacedFeatureAliases;
|
|
143
|
-
private
|
|
149
|
+
private findActiveContract;
|
|
144
150
|
/**
|
|
145
151
|
* Loads a subscription's active bundle bookings and resolves the
|
|
146
152
|
* `BundleVersion` features/quotas per entry. Without a registered
|
|
@@ -186,6 +192,32 @@ declare function collectSubscriptionBundleFeatures(bundles: readonly Subscriptio
|
|
|
186
192
|
* `quotaEffectsSnapshot` are the contractual truth.
|
|
187
193
|
*/
|
|
188
194
|
declare function aggregateContractLineItemEntitlements(lineItems: readonly Pick<ContractLineItemRecord, 'kind' | 'sourceKey' | 'featuresSnapshot' | 'quotaEffectsSnapshot'>[], fallbackPlan?: string): EffectiveLimits;
|
|
195
|
+
/**
|
|
196
|
+
* Limits as frozen in the contract: the entitlement snapshot when present,
|
|
197
|
+
* otherwise aggregated from the line items.
|
|
198
|
+
*/
|
|
199
|
+
declare function contractLimits(contract: Pick<SubscriptionContractRecord, 'entitlementSnapshot' | 'lineItems'>): EffectiveLimits;
|
|
200
|
+
/**
|
|
201
|
+
* `BundleVersion`s the contract already accounts for — from the freeze
|
|
202
|
+
* (`originalBundleVersionIds`) and from its bundle line items.
|
|
203
|
+
*/
|
|
204
|
+
declare function contractBundleVersionIds(contract: Pick<SubscriptionContractRecord, 'originalBundleVersionIds' | 'lineItems'>): Set<string>;
|
|
205
|
+
/**
|
|
206
|
+
* Adds bundle bookings on top of limits that came from a contract.
|
|
207
|
+
*
|
|
208
|
+
* A contract freezes what was agreed at signing time. Bundles booked *later*
|
|
209
|
+
* are separate purchases and must take effect immediately — otherwise the
|
|
210
|
+
* purchase stays without consequence until someone re-freezes the contract.
|
|
211
|
+
* Bundles that are already part of the contract (`coveredBundleVersionIds`,
|
|
212
|
+
* i.e. `originalBundleVersionIds` plus the bundle line items) are skipped, so
|
|
213
|
+
* their quotas are not counted twice.
|
|
214
|
+
*
|
|
215
|
+
* Features are a set union, quotas add up with `-1` (unlimited) dominance, and
|
|
216
|
+
* `plannedOnly` features stay out — same rules as `aggregateLimits`. The
|
|
217
|
+
* contract's own features are passed through untouched: what was agreed stays
|
|
218
|
+
* agreed.
|
|
219
|
+
*/
|
|
220
|
+
declare function mergeSubscriptionBundlesIntoLimits(limits: EffectiveLimits, bundles: readonly SubscriptionBundleSnapshot[], coveredBundleVersionIds: ReadonlySet<string>, catalog: PlanCatalog, now: Date): EffectiveLimits;
|
|
189
221
|
/**
|
|
190
222
|
* Consistently filters out `plannedOnly` features — regardless of whether they
|
|
191
223
|
* come from the plan, a bundle or customLimits. `plannedOnly` means: the feature
|
|
@@ -225,4 +257,4 @@ declare function hasAnyFeature(limits: EffectiveLimits, features: readonly Featu
|
|
|
225
257
|
*/
|
|
226
258
|
declare function toEffectiveLimitsSnapshot(limits: EffectiveLimits): EffectiveLimitsSnapshot;
|
|
227
259
|
|
|
228
|
-
export { type CustomLimitsShape as C, type EffectiveLimits as E, type PlanVersionSnapshot as P, type SubscriptionBundleSnapshot as S, type EffectiveLimitsSnapshot as a, type EnforceLimitInput as b, EntitlementService as c, type SubscriptionLimitsInput as d, aggregateContractLineItemEntitlements as e, aggregateLimits as f, aggregateSubscriptionBundleQuotas as g, applyCustomLimits as h, collectSubscriptionBundleFeatures as i,
|
|
260
|
+
export { type CustomLimitsShape as C, type EffectiveLimits as E, type PlanVersionSnapshot as P, type SubscriptionBundleSnapshot as S, type EffectiveLimitsSnapshot as a, type EnforceLimitInput as b, EntitlementService as c, type SubscriptionLimitsInput as d, aggregateContractLineItemEntitlements as e, aggregateLimits as f, aggregateSubscriptionBundleQuotas as g, applyCustomLimits as h, collectSubscriptionBundleFeatures as i, contractBundleVersionIds as j, contractLimits as k, filterActiveSubscriptionBundles as l, filterPlannedOnlyFeatures as m, hasAnyFeature as n, hasFeature as o, mergeSubscriptionBundlesIntoLimits as p, toEffectiveLimitsSnapshot as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PlanId, QuotaKey, FeatureKey, PlanCatalog, SubscriptionRepository, PlanVersionRepository, TransactionRunner, SubscriptionBundleRepository, BundleRepository, SubscriptionContractRepository, DiscoverySnapshot, SubscriptionRecord, TransactionContext, ContractLineItemRecord } from '@saasicat/types';
|
|
1
|
+
import { PlanId, QuotaKey, FeatureKey, PlanCatalog, SubscriptionRepository, PlanVersionRepository, TransactionRunner, SubscriptionBundleRepository, BundleRepository, SubscriptionContractRepository, DiscoverySnapshot, SubscriptionRecord, TransactionContext, ContractLineItemRecord, SubscriptionContractRecord } from '@saasicat/types';
|
|
2
2
|
import { E as EntitlementResolutionConfig } from './plan-resolution-CFCoUkrE.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -27,6 +27,12 @@ interface PlanVersionSnapshot {
|
|
|
27
27
|
*/
|
|
28
28
|
interface SubscriptionBundleSnapshot {
|
|
29
29
|
bundleKey: string;
|
|
30
|
+
/**
|
|
31
|
+
* Booked `BundleVersion`. Lets the contract path tell bundles that are
|
|
32
|
+
* already part of a frozen contract from ones booked afterwards, so their
|
|
33
|
+
* quotas are not counted twice.
|
|
34
|
+
*/
|
|
35
|
+
bundleVersionId: string;
|
|
30
36
|
features: FeatureKey[];
|
|
31
37
|
quotas: Record<QuotaKey, number>;
|
|
32
38
|
/**
|
|
@@ -140,7 +146,7 @@ declare class EntitlementService {
|
|
|
140
146
|
* A no-op without a snapshot or without replaces declarations.
|
|
141
147
|
*/
|
|
142
148
|
private withReplacedFeatureAliases;
|
|
143
|
-
private
|
|
149
|
+
private findActiveContract;
|
|
144
150
|
/**
|
|
145
151
|
* Loads a subscription's active bundle bookings and resolves the
|
|
146
152
|
* `BundleVersion` features/quotas per entry. Without a registered
|
|
@@ -186,6 +192,32 @@ declare function collectSubscriptionBundleFeatures(bundles: readonly Subscriptio
|
|
|
186
192
|
* `quotaEffectsSnapshot` are the contractual truth.
|
|
187
193
|
*/
|
|
188
194
|
declare function aggregateContractLineItemEntitlements(lineItems: readonly Pick<ContractLineItemRecord, 'kind' | 'sourceKey' | 'featuresSnapshot' | 'quotaEffectsSnapshot'>[], fallbackPlan?: string): EffectiveLimits;
|
|
195
|
+
/**
|
|
196
|
+
* Limits as frozen in the contract: the entitlement snapshot when present,
|
|
197
|
+
* otherwise aggregated from the line items.
|
|
198
|
+
*/
|
|
199
|
+
declare function contractLimits(contract: Pick<SubscriptionContractRecord, 'entitlementSnapshot' | 'lineItems'>): EffectiveLimits;
|
|
200
|
+
/**
|
|
201
|
+
* `BundleVersion`s the contract already accounts for — from the freeze
|
|
202
|
+
* (`originalBundleVersionIds`) and from its bundle line items.
|
|
203
|
+
*/
|
|
204
|
+
declare function contractBundleVersionIds(contract: Pick<SubscriptionContractRecord, 'originalBundleVersionIds' | 'lineItems'>): Set<string>;
|
|
205
|
+
/**
|
|
206
|
+
* Adds bundle bookings on top of limits that came from a contract.
|
|
207
|
+
*
|
|
208
|
+
* A contract freezes what was agreed at signing time. Bundles booked *later*
|
|
209
|
+
* are separate purchases and must take effect immediately — otherwise the
|
|
210
|
+
* purchase stays without consequence until someone re-freezes the contract.
|
|
211
|
+
* Bundles that are already part of the contract (`coveredBundleVersionIds`,
|
|
212
|
+
* i.e. `originalBundleVersionIds` plus the bundle line items) are skipped, so
|
|
213
|
+
* their quotas are not counted twice.
|
|
214
|
+
*
|
|
215
|
+
* Features are a set union, quotas add up with `-1` (unlimited) dominance, and
|
|
216
|
+
* `plannedOnly` features stay out — same rules as `aggregateLimits`. The
|
|
217
|
+
* contract's own features are passed through untouched: what was agreed stays
|
|
218
|
+
* agreed.
|
|
219
|
+
*/
|
|
220
|
+
declare function mergeSubscriptionBundlesIntoLimits(limits: EffectiveLimits, bundles: readonly SubscriptionBundleSnapshot[], coveredBundleVersionIds: ReadonlySet<string>, catalog: PlanCatalog, now: Date): EffectiveLimits;
|
|
189
221
|
/**
|
|
190
222
|
* Consistently filters out `plannedOnly` features — regardless of whether they
|
|
191
223
|
* come from the plan, a bundle or customLimits. `plannedOnly` means: the feature
|
|
@@ -225,4 +257,4 @@ declare function hasAnyFeature(limits: EffectiveLimits, features: readonly Featu
|
|
|
225
257
|
*/
|
|
226
258
|
declare function toEffectiveLimitsSnapshot(limits: EffectiveLimits): EffectiveLimitsSnapshot;
|
|
227
259
|
|
|
228
|
-
export { type CustomLimitsShape as C, type EffectiveLimits as E, type PlanVersionSnapshot as P, type SubscriptionBundleSnapshot as S, type EffectiveLimitsSnapshot as a, type EnforceLimitInput as b, EntitlementService as c, type SubscriptionLimitsInput as d, aggregateContractLineItemEntitlements as e, aggregateLimits as f, aggregateSubscriptionBundleQuotas as g, applyCustomLimits as h, collectSubscriptionBundleFeatures as i,
|
|
260
|
+
export { type CustomLimitsShape as C, type EffectiveLimits as E, type PlanVersionSnapshot as P, type SubscriptionBundleSnapshot as S, type EffectiveLimitsSnapshot as a, type EnforceLimitInput as b, EntitlementService as c, type SubscriptionLimitsInput as d, aggregateContractLineItemEntitlements as e, aggregateLimits as f, aggregateSubscriptionBundleQuotas as g, applyCustomLimits as h, collectSubscriptionBundleFeatures as i, contractBundleVersionIds as j, contractLimits as k, filterActiveSubscriptionBundles as l, filterPlannedOnlyFeatures as m, hasAnyFeature as n, hasFeature as o, mergeSubscriptionBundlesIntoLimits as p, toEffectiveLimitsSnapshot as t };
|
package/dist/billing/index.d.cts
CHANGED
|
@@ -4,11 +4,11 @@ import * as _nestjs_common from '@nestjs/common';
|
|
|
4
4
|
import { CanActivate, ExecutionContext, ArgumentsHost, Type, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
5
5
|
export { Type as NestType } from '@nestjs/common';
|
|
6
6
|
import { Reflector, BaseExceptionFilter } from '@nestjs/core';
|
|
7
|
-
import { c as EntitlementService } from '../aggregation-
|
|
7
|
+
import { c as EntitlementService } from '../aggregation-SKfXu09x.cjs';
|
|
8
8
|
import { P as ProviderSpec } from '../di-CcNeq9v-.cjs';
|
|
9
9
|
import { f as ContractFreezePort, g as ContractFreezeSourcePort } from '../subscription-bundles.module-DCpV-Pb5.cjs';
|
|
10
10
|
export { A as AUDIT_CONTEXT_RESOLVER_TOKEN, a as AuditContextResolver, b as AuthGuardList, C as CONTRACT_FREEZE_PORT_TOKEN, c as CONTRACT_FREEZE_PROJECT_KEY_TOKEN, d as CONTRACT_FREEZE_SOURCE_PORT_TOKEN, e as ContractFreezeBundleSnapshot, D as DuePendingPlanChange, P as PENDING_PLAN_QUERY_PORT_TOKEN, h as PendingPlanQueryPort, S as SELF_SERVICE_BLOCKED_BUNDLES_TOKEN, i as SELF_SERVICE_BLOCKED_PLANS_TOKEN, j as SUBSCRIPTION_USAGE_PORT_TOKEN, k as SUBSCRIPTION_WRITE_PORT_TOKEN, l as SelfServiceBlockedBundles, m as SelfServiceBlockedPlans, n as SubscriptionBundleControllerOptions, o as SubscriptionBundleModule, p as SubscriptionBundleModuleOptions, T as TENANT_AUTH_GUARDS_TOKEN, q as TENANT_ID_RESOLVER_TOKEN, r as TRIAL_PROJECTION_PORT_TOKEN, s as TenantBillingModule, t as TenantBillingModuleOptions, u as TenantIdResolver, v as TrialProjectionInput, w as TrialProjectionPort, U as USAGE_SNAPSHOT_PORT_TOKEN, x as USER_EMAIL_RESOLVER_TOKEN, y as USER_ID_RESOLVER_TOKEN, z as UserEmailResolver, B as UserIdResolver } from '../subscription-bundles.module-DCpV-Pb5.cjs';
|
|
11
|
-
export { A as AddBundleToSubscriptionInput, B as BundlePreviewSnapshot, C as CancelBundleFromSubscriptionInput, a as CancelSubscriptionDto, b as ChangePlanDto, c as CompleteOnboardingSubscriptionDto, d as ComposedTenantAuthGuard, L as LimitsCheckRow, P as PendingPlanMaterializationService, e as PlanChangeContext, f as PlanChangePreviewDto, g as PlanChangePreviewIssue, h as PlanChangePreviewService, i as PlanChangeType, j as PlanSnapshotDto, k as PreviewPlanChangeDto, l as ProrationDto, m as ProrationInput, R as RedundantFeatureHint, S as SubscriptionBundleAddPreviewDto, n as SubscriptionBundleCancelPreviewDto, o as SubscriptionBundleConfig, p as SubscriptionBundlePreviewContext, q as SubscriptionBundlePreviewIssue, r as SubscriptionBundlePreviewService, s as SubscriptionBundlesService, T as TenantAdminGuard, t as TenantBillingController, U as UsageResponse, u as addMonths, v as computeProration, w as resolveBundleCancelEffectiveAt, x as resolveBundlePriceNet } from '../
|
|
11
|
+
export { A as AddBundleToSubscriptionInput, B as BundlePreviewSnapshot, C as CancelBundleFromSubscriptionInput, a as CancelSubscriptionDto, b as ChangePlanDto, c as CompleteOnboardingSubscriptionDto, d as ComposedTenantAuthGuard, L as LimitsCheckRow, P as PendingPlanMaterializationService, e as PlanChangeContext, f as PlanChangePreviewDto, g as PlanChangePreviewIssue, h as PlanChangePreviewService, i as PlanChangeType, j as PlanSnapshotDto, k as PreviewPlanChangeDto, l as ProrationDto, m as ProrationInput, R as RedundantFeatureHint, S as SubscriptionBundleAddPreviewDto, n as SubscriptionBundleCancelPreviewDto, o as SubscriptionBundleConfig, p as SubscriptionBundlePreviewContext, q as SubscriptionBundlePreviewIssue, r as SubscriptionBundlePreviewService, s as SubscriptionBundlesService, T as TenantAdminGuard, t as TenantBillingController, U as UsageResponse, u as addMonths, v as computeProration, w as resolveBundleCancelEffectiveAt, x as resolveBundlePriceNet } from '../tenant-billing.controller-CG4CaFUP.cjs';
|
|
12
12
|
import { S as SubscriptionContractService } from '../subscription-contract.service--cm47ZJJ.cjs';
|
|
13
13
|
import '../plan-resolution-CFCoUkrE.cjs';
|
|
14
14
|
import '../service-DX8KbGXl.cjs';
|
package/dist/billing/index.d.ts
CHANGED
|
@@ -4,11 +4,11 @@ import * as _nestjs_common from '@nestjs/common';
|
|
|
4
4
|
import { CanActivate, ExecutionContext, ArgumentsHost, Type, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
5
5
|
export { Type as NestType } from '@nestjs/common';
|
|
6
6
|
import { Reflector, BaseExceptionFilter } from '@nestjs/core';
|
|
7
|
-
import { c as EntitlementService } from '../aggregation-
|
|
7
|
+
import { c as EntitlementService } from '../aggregation-o0LMenvl.js';
|
|
8
8
|
import { P as ProviderSpec } from '../di-CcNeq9v-.js';
|
|
9
9
|
import { f as ContractFreezePort, g as ContractFreezeSourcePort } from '../subscription-bundles.module-BQmoozm5.js';
|
|
10
10
|
export { A as AUDIT_CONTEXT_RESOLVER_TOKEN, a as AuditContextResolver, b as AuthGuardList, C as CONTRACT_FREEZE_PORT_TOKEN, c as CONTRACT_FREEZE_PROJECT_KEY_TOKEN, d as CONTRACT_FREEZE_SOURCE_PORT_TOKEN, e as ContractFreezeBundleSnapshot, D as DuePendingPlanChange, P as PENDING_PLAN_QUERY_PORT_TOKEN, h as PendingPlanQueryPort, S as SELF_SERVICE_BLOCKED_BUNDLES_TOKEN, i as SELF_SERVICE_BLOCKED_PLANS_TOKEN, j as SUBSCRIPTION_USAGE_PORT_TOKEN, k as SUBSCRIPTION_WRITE_PORT_TOKEN, l as SelfServiceBlockedBundles, m as SelfServiceBlockedPlans, n as SubscriptionBundleControllerOptions, o as SubscriptionBundleModule, p as SubscriptionBundleModuleOptions, T as TENANT_AUTH_GUARDS_TOKEN, q as TENANT_ID_RESOLVER_TOKEN, r as TRIAL_PROJECTION_PORT_TOKEN, s as TenantBillingModule, t as TenantBillingModuleOptions, u as TenantIdResolver, v as TrialProjectionInput, w as TrialProjectionPort, U as USAGE_SNAPSHOT_PORT_TOKEN, x as USER_EMAIL_RESOLVER_TOKEN, y as USER_ID_RESOLVER_TOKEN, z as UserEmailResolver, B as UserIdResolver } from '../subscription-bundles.module-BQmoozm5.js';
|
|
11
|
-
export { A as AddBundleToSubscriptionInput, B as BundlePreviewSnapshot, C as CancelBundleFromSubscriptionInput, a as CancelSubscriptionDto, b as ChangePlanDto, c as CompleteOnboardingSubscriptionDto, d as ComposedTenantAuthGuard, L as LimitsCheckRow, P as PendingPlanMaterializationService, e as PlanChangeContext, f as PlanChangePreviewDto, g as PlanChangePreviewIssue, h as PlanChangePreviewService, i as PlanChangeType, j as PlanSnapshotDto, k as PreviewPlanChangeDto, l as ProrationDto, m as ProrationInput, R as RedundantFeatureHint, S as SubscriptionBundleAddPreviewDto, n as SubscriptionBundleCancelPreviewDto, o as SubscriptionBundleConfig, p as SubscriptionBundlePreviewContext, q as SubscriptionBundlePreviewIssue, r as SubscriptionBundlePreviewService, s as SubscriptionBundlesService, T as TenantAdminGuard, t as TenantBillingController, U as UsageResponse, u as addMonths, v as computeProration, w as resolveBundleCancelEffectiveAt, x as resolveBundlePriceNet } from '../
|
|
11
|
+
export { A as AddBundleToSubscriptionInput, B as BundlePreviewSnapshot, C as CancelBundleFromSubscriptionInput, a as CancelSubscriptionDto, b as ChangePlanDto, c as CompleteOnboardingSubscriptionDto, d as ComposedTenantAuthGuard, L as LimitsCheckRow, P as PendingPlanMaterializationService, e as PlanChangeContext, f as PlanChangePreviewDto, g as PlanChangePreviewIssue, h as PlanChangePreviewService, i as PlanChangeType, j as PlanSnapshotDto, k as PreviewPlanChangeDto, l as ProrationDto, m as ProrationInput, R as RedundantFeatureHint, S as SubscriptionBundleAddPreviewDto, n as SubscriptionBundleCancelPreviewDto, o as SubscriptionBundleConfig, p as SubscriptionBundlePreviewContext, q as SubscriptionBundlePreviewIssue, r as SubscriptionBundlePreviewService, s as SubscriptionBundlesService, T as TenantAdminGuard, t as TenantBillingController, U as UsageResponse, u as addMonths, v as computeProration, w as resolveBundleCancelEffectiveAt, x as resolveBundlePriceNet } from '../tenant-billing.controller-BwZRnJ3q.js';
|
|
12
12
|
import { S as SubscriptionContractService } from '../subscription-contract.service--cm47ZJJ.js';
|
|
13
13
|
import '../plan-resolution-CFCoUkrE.js';
|
|
14
14
|
import '../service-DX8KbGXl.js';
|
package/dist/billing/index.js
CHANGED
|
@@ -58,9 +58,9 @@ import {
|
|
|
58
58
|
periodEndWithMinLead,
|
|
59
59
|
resolveBundleCancelEffectiveAt,
|
|
60
60
|
resolveBundlePriceNet
|
|
61
|
-
} from "../chunk-
|
|
61
|
+
} from "../chunk-5KH2O4SF.js";
|
|
62
62
|
import "../chunk-E7AJ42AB.js";
|
|
63
|
-
import "../chunk-
|
|
63
|
+
import "../chunk-32EMXPU2.js";
|
|
64
64
|
import {
|
|
65
65
|
AUDIT_CONTEXT_RESOLVER_TOKEN,
|
|
66
66
|
PENDING_PLAN_QUERY_PORT_TOKEN,
|
|
@@ -77,10 +77,11 @@ import {
|
|
|
77
77
|
} from "../chunk-WPUVJRIN.js";
|
|
78
78
|
import "../chunk-E56W4U2P.js";
|
|
79
79
|
import "../chunk-MDIZUVIK.js";
|
|
80
|
+
import "../chunk-YSC46BGM.js";
|
|
80
81
|
import {
|
|
81
82
|
SUBSCRIPTION_BUNDLE_CONFIG_TOKEN,
|
|
82
83
|
SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN
|
|
83
|
-
} from "../chunk-
|
|
84
|
+
} from "../chunk-EXOLOJFZ.js";
|
|
84
85
|
import {
|
|
85
86
|
PLAN_CATALOG_READ_SINK_TOKEN,
|
|
86
87
|
PLAN_CATALOG_TOKEN,
|
package/dist/catalog/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
runSeedGateFromFile,
|
|
7
7
|
seedGateExitCode,
|
|
8
8
|
validateSeedAgainstSnapshot
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-7RRWI5LH.js";
|
|
10
10
|
import "../chunk-ABB2CRAS.js";
|
|
11
11
|
import {
|
|
12
12
|
ADVISORY_STRICT_MODE_CODES,
|
|
@@ -56,9 +56,10 @@ import {
|
|
|
56
56
|
quotaApprovalSignature,
|
|
57
57
|
validateBundleDraft,
|
|
58
58
|
validatePlanDraft
|
|
59
|
-
} from "../chunk-
|
|
59
|
+
} from "../chunk-P3DP6GJE.js";
|
|
60
60
|
import "../chunk-WPUVJRIN.js";
|
|
61
61
|
import "../chunk-E56W4U2P.js";
|
|
62
|
+
import "../chunk-YSC46BGM.js";
|
|
62
63
|
import "../chunk-Z3FWN3HJ.js";
|
|
63
64
|
import "../chunk-WKVBNTYC.js";
|
|
64
65
|
import {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { C as
|
|
1
|
+
export { C as CheckoutOfferService } from '../checkout-offer.service-BX51dljL.cjs';
|
|
2
2
|
import { Type, CanActivate } from '@nestjs/common';
|
|
3
|
+
export { C as CheckoutOfferControllerConfig, a as CheckoutOfferModule, b as CheckoutOfferModuleOptions } from '../checkout-offer.module-DmlpPevf.cjs';
|
|
3
4
|
import { CheckoutOfferPriceBreakdown, CheckoutOfferLineItem, CheckoutOfferPromotionSnapshot, CheckoutOfferPromoCodeSnapshot } from '@saasicat/types';
|
|
4
5
|
import '../di-CcNeq9v-.cjs';
|
|
5
6
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { C as
|
|
1
|
+
export { C as CheckoutOfferService } from '../checkout-offer.service-BX51dljL.js';
|
|
2
2
|
import { Type, CanActivate } from '@nestjs/common';
|
|
3
|
+
export { C as CheckoutOfferControllerConfig, a as CheckoutOfferModule, b as CheckoutOfferModuleOptions } from '../checkout-offer.module-Ca3_TieR.js';
|
|
3
4
|
import { CheckoutOfferPriceBreakdown, CheckoutOfferLineItem, CheckoutOfferPromotionSnapshot, CheckoutOfferPromoCodeSnapshot } from '@saasicat/types';
|
|
4
5
|
import '../di-CcNeq9v-.js';
|
|
5
6
|
|
|
@@ -6,8 +6,9 @@ import {
|
|
|
6
6
|
CreateCheckoutOfferDto,
|
|
7
7
|
UpdateCheckoutOfferDto,
|
|
8
8
|
buildCheckoutOfferController
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-GJBXOCRZ.js";
|
|
10
10
|
import "../chunk-MDIZUVIK.js";
|
|
11
|
+
import "../chunk-YSC46BGM.js";
|
|
11
12
|
import "../chunk-L4KTQ6CL.js";
|
|
12
13
|
import "../chunk-SABTXESR.js";
|
|
13
14
|
import "../chunk-SHUYVCID.js";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Type, CanActivate, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
2
|
+
import { CheckoutOfferRepository, BundleRepository, PlanRepository, CatalogEntryRepository } from '@saasicat/types';
|
|
3
|
+
import { P as ProviderSpec } from './di-CcNeq9v-.js';
|
|
4
|
+
|
|
5
|
+
interface CheckoutOfferControllerConfig {
|
|
6
|
+
/** Class-level guards; `[]` for auth-free public endpoints. */
|
|
7
|
+
guards: Array<Type<CanActivate>>;
|
|
8
|
+
}
|
|
9
|
+
interface CheckoutOfferModuleOptions {
|
|
10
|
+
checkoutOfferRepository: ProviderSpec<CheckoutOfferRepository>;
|
|
11
|
+
/**
|
|
12
|
+
* Optional for V3 revalidation on consume: if set, the service checks
|
|
13
|
+
* whether referenced bundle versions are still bookable. Also provides
|
|
14
|
+
* the bundle features for the requires validation (#35 P6).
|
|
15
|
+
*/
|
|
16
|
+
bundleRepository?: ProviderSpec<BundleRepository>;
|
|
17
|
+
/**
|
|
18
|
+
* Optional for the requires validation (#35 P6): plan features of the
|
|
19
|
+
* chosen plan version. Without wiring, falls back to the featuresSnapshot
|
|
20
|
+
* of the plan line item.
|
|
21
|
+
*/
|
|
22
|
+
planRepository?: ProviderSpec<PlanRepository>;
|
|
23
|
+
/**
|
|
24
|
+
* Optional for the requires validation (#35 P6): requires source =
|
|
25
|
+
* curated FeatureCatalogEntries. Without wiring, the validation is
|
|
26
|
+
* skipped (graceful).
|
|
27
|
+
*/
|
|
28
|
+
catalogEntryRepository?: ProviderSpec<CatalogEntryRepository>;
|
|
29
|
+
/** Controller mount for `/public/checkout-offer`. Omitted = service only. */
|
|
30
|
+
controller?: CheckoutOfferControllerConfig;
|
|
31
|
+
imports?: Array<Type<unknown> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
|
|
32
|
+
extraProviders?: Provider[];
|
|
33
|
+
global?: boolean;
|
|
34
|
+
}
|
|
35
|
+
declare class CheckoutOfferModule {
|
|
36
|
+
static forRoot(options: CheckoutOfferModuleOptions): DynamicModule;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { type CheckoutOfferControllerConfig as C, CheckoutOfferModule as a, type CheckoutOfferModuleOptions as b };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Type, CanActivate, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
2
|
+
import { CheckoutOfferRepository, BundleRepository, PlanRepository, CatalogEntryRepository } from '@saasicat/types';
|
|
3
|
+
import { P as ProviderSpec } from './di-CcNeq9v-.cjs';
|
|
4
|
+
|
|
5
|
+
interface CheckoutOfferControllerConfig {
|
|
6
|
+
/** Class-level guards; `[]` for auth-free public endpoints. */
|
|
7
|
+
guards: Array<Type<CanActivate>>;
|
|
8
|
+
}
|
|
9
|
+
interface CheckoutOfferModuleOptions {
|
|
10
|
+
checkoutOfferRepository: ProviderSpec<CheckoutOfferRepository>;
|
|
11
|
+
/**
|
|
12
|
+
* Optional for V3 revalidation on consume: if set, the service checks
|
|
13
|
+
* whether referenced bundle versions are still bookable. Also provides
|
|
14
|
+
* the bundle features for the requires validation (#35 P6).
|
|
15
|
+
*/
|
|
16
|
+
bundleRepository?: ProviderSpec<BundleRepository>;
|
|
17
|
+
/**
|
|
18
|
+
* Optional for the requires validation (#35 P6): plan features of the
|
|
19
|
+
* chosen plan version. Without wiring, falls back to the featuresSnapshot
|
|
20
|
+
* of the plan line item.
|
|
21
|
+
*/
|
|
22
|
+
planRepository?: ProviderSpec<PlanRepository>;
|
|
23
|
+
/**
|
|
24
|
+
* Optional for the requires validation (#35 P6): requires source =
|
|
25
|
+
* curated FeatureCatalogEntries. Without wiring, the validation is
|
|
26
|
+
* skipped (graceful).
|
|
27
|
+
*/
|
|
28
|
+
catalogEntryRepository?: ProviderSpec<CatalogEntryRepository>;
|
|
29
|
+
/** Controller mount for `/public/checkout-offer`. Omitted = service only. */
|
|
30
|
+
controller?: CheckoutOfferControllerConfig;
|
|
31
|
+
imports?: Array<Type<unknown> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
|
|
32
|
+
extraProviders?: Provider[];
|
|
33
|
+
global?: boolean;
|
|
34
|
+
}
|
|
35
|
+
declare class CheckoutOfferModule {
|
|
36
|
+
static forRoot(options: CheckoutOfferModuleOptions): DynamicModule;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { type CheckoutOfferControllerConfig as C, CheckoutOfferModule as a, type CheckoutOfferModuleOptions as b };
|