@saasicat/nest 0.26.1 → 0.27.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/LICENSE +90 -201
- package/dist/_entries.cjs +3265 -2846
- package/dist/billing/index.d.cts +4 -4
- package/dist/billing/index.d.ts +4 -4
- package/dist/billing/index.js +29 -27
- package/dist/chunk-2FR6ZL7R.js +0 -0
- package/dist/chunk-2JTISFUZ.js +792 -0
- package/dist/chunk-2SLTRKXC.js +0 -0
- package/dist/chunk-3E6ONOMG.js +50 -0
- package/dist/{chunk-B7NRY2LV.js → chunk-CJFAOD7K.js} +1 -39
- package/dist/{chunk-TCBYOFAC.js → chunk-EHKMPP6J.js} +1164 -745
- package/dist/{chunk-NNNXXUPT.js → chunk-F4B2NJUZ.js} +23 -88
- package/dist/chunk-H4DOTO7S.js +85 -0
- package/dist/{chunk-YWDLYOFN.js → chunk-UHD6FJBQ.js} +412 -1188
- package/dist/{define-saasicat-BK6RRWWG.d.ts → define-saasicat-3ois8t8s.d.ts} +26 -3
- package/dist/{define-saasicat-D30I-WET.d.cts → define-saasicat-CFxut1VR.d.cts} +26 -3
- package/dist/{enforce-quota.interceptor-B9QueAFf.d.ts → enforce-quota.interceptor-CYDNvAQz.d.ts} +3 -3
- package/dist/{enforce-quota.interceptor-DY6CLjoP.d.cts → enforce-quota.interceptor-N80KC34N.d.cts} +3 -3
- package/dist/entitlement/index.js +5 -2
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +39 -31
- package/dist/{saas-platform.module-D1mUZPrz.d.ts → module-options-ByJL7FZm.d.ts} +40 -27
- package/dist/{saas-platform.module-CgalxzcT.d.cts → module-options-klrPnWGF.d.cts} +40 -27
- package/dist/platform/index.d.cts +201 -19
- package/dist/platform/index.d.ts +201 -19
- package/dist/platform/index.js +34 -9
- package/dist/subscription-contract/index.js +5 -2
- package/dist/{tenant-billing.controller-DHSUrT_N.d.cts → tenant-billing.controller-CAMMdfn1.d.cts} +1 -1
- package/dist/{tenant-billing.controller-BSlpFqVA.d.ts → tenant-billing.controller-CYYK0CpT.d.ts} +1 -1
- package/dist/{subscription-bundles.module-BDbODWvA.d.ts → tenant-billing.module-B0stLoJn.d.ts} +51 -51
- package/dist/{subscription-bundles.module-Cfi-lFWF.d.cts → tenant-billing.module-BxJS6fX4.d.cts} +51 -51
- package/dist/testing/index.d.cts +8 -8
- package/dist/testing/index.d.ts +8 -8
- package/dist/testing/index.js +6 -4
- package/package.json +4 -4
- /package/dist/{chunk-FY4EJTV4.js → chunk-OYNHOY45.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as _nestjs_common from '@nestjs/common';
|
|
2
|
-
import { ExecutionContext } from '@nestjs/common';
|
|
2
|
+
import { ExecutionContext, DynamicModule } from '@nestjs/common';
|
|
3
3
|
import { Reflector } from '@nestjs/core';
|
|
4
4
|
import { SuperAdminProvisioningPort, SetupStatusResponse, SetupRequest, SetupResult, SetupConfirmMfaRequest, SetupConfirmMfaResponse } from '@saasicat/types';
|
|
5
5
|
import { h as MfaService } from './admin-stats.service-Db2exT_d.js';
|
|
6
|
-
import {
|
|
6
|
+
import { e as SaasPlatformModuleOptions } from './module-options-ByJL7FZm.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Shared metadata key for endpoints that intentionally run without application
|
|
@@ -36,6 +36,29 @@ declare class SetupService {
|
|
|
36
36
|
private assertNoSuperAdmin;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Bundles the complete standard SaaSiCat backend stack into a single
|
|
41
|
+
* `forRoot({...})` call. Reduces AppModule boilerplate and eliminates the
|
|
42
|
+
* ordering trap.
|
|
43
|
+
*
|
|
44
|
+
* Quickstart path (Prisma + PostgreSQL on the canonical schema):
|
|
45
|
+
*
|
|
46
|
+
* ```ts
|
|
47
|
+
* SaasPlatformModule.forRoot({
|
|
48
|
+
* planCatalog: loadPlanCatalogFromFile({ path: 'config/saas.yaml' }),
|
|
49
|
+
* controller: { guards: [JwtAuthGuard] },
|
|
50
|
+
* imports: [AuthModule],
|
|
51
|
+
* persistence: prismaPersistence({ client: PrismaService }), // @saasicat/adapter-prisma
|
|
52
|
+
* })
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* Individual `adapters` entries stay supported (custom schema / other ORM)
|
|
56
|
+
* and override bundle slices field by field.
|
|
57
|
+
*/
|
|
58
|
+
declare class SaasPlatformModule {
|
|
59
|
+
static forRoot(options: SaasPlatformModuleOptions): DynamicModule;
|
|
60
|
+
}
|
|
61
|
+
|
|
39
62
|
/**
|
|
40
63
|
* Typed identity helper for the high-level SaaSiCat configuration. It keeps
|
|
41
64
|
* literal types and gives editors one place for completion without adding
|
|
@@ -43,4 +66,4 @@ declare class SetupService {
|
|
|
43
66
|
*/
|
|
44
67
|
declare function defineSaaSiCat<const T extends SaasPlatformModuleOptions>(options: T): T;
|
|
45
68
|
|
|
46
|
-
export { SetupService as S, SAASICAT_PUBLIC_ROUTE_KEY as a, SETUP_CONFIG_TOKEN as b, SETUP_PROVISIONING_PORT_TOKEN as c,
|
|
69
|
+
export { SetupService as S, SAASICAT_PUBLIC_ROUTE_KEY as a, SETUP_CONFIG_TOKEN as b, SETUP_PROVISIONING_PORT_TOKEN as c, SaasPlatformModule as d, SaaSiCatPublicRoute as e, type SetupConfig as f, defineSaaSiCat as g, isSaaSiCatPublicRoute as i };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as _nestjs_common from '@nestjs/common';
|
|
2
|
-
import { ExecutionContext } from '@nestjs/common';
|
|
2
|
+
import { ExecutionContext, DynamicModule } from '@nestjs/common';
|
|
3
3
|
import { Reflector } from '@nestjs/core';
|
|
4
4
|
import { SuperAdminProvisioningPort, SetupStatusResponse, SetupRequest, SetupResult, SetupConfirmMfaRequest, SetupConfirmMfaResponse } from '@saasicat/types';
|
|
5
5
|
import { h as MfaService } from './admin-stats.service-HUZIU448.cjs';
|
|
6
|
-
import {
|
|
6
|
+
import { e as SaasPlatformModuleOptions } from './module-options-klrPnWGF.cjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Shared metadata key for endpoints that intentionally run without application
|
|
@@ -36,6 +36,29 @@ declare class SetupService {
|
|
|
36
36
|
private assertNoSuperAdmin;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Bundles the complete standard SaaSiCat backend stack into a single
|
|
41
|
+
* `forRoot({...})` call. Reduces AppModule boilerplate and eliminates the
|
|
42
|
+
* ordering trap.
|
|
43
|
+
*
|
|
44
|
+
* Quickstart path (Prisma + PostgreSQL on the canonical schema):
|
|
45
|
+
*
|
|
46
|
+
* ```ts
|
|
47
|
+
* SaasPlatformModule.forRoot({
|
|
48
|
+
* planCatalog: loadPlanCatalogFromFile({ path: 'config/saas.yaml' }),
|
|
49
|
+
* controller: { guards: [JwtAuthGuard] },
|
|
50
|
+
* imports: [AuthModule],
|
|
51
|
+
* persistence: prismaPersistence({ client: PrismaService }), // @saasicat/adapter-prisma
|
|
52
|
+
* })
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* Individual `adapters` entries stay supported (custom schema / other ORM)
|
|
56
|
+
* and override bundle slices field by field.
|
|
57
|
+
*/
|
|
58
|
+
declare class SaasPlatformModule {
|
|
59
|
+
static forRoot(options: SaasPlatformModuleOptions): DynamicModule;
|
|
60
|
+
}
|
|
61
|
+
|
|
39
62
|
/**
|
|
40
63
|
* Typed identity helper for the high-level SaaSiCat configuration. It keeps
|
|
41
64
|
* literal types and gives editors one place for completion without adding
|
|
@@ -43,4 +66,4 @@ declare class SetupService {
|
|
|
43
66
|
*/
|
|
44
67
|
declare function defineSaaSiCat<const T extends SaasPlatformModuleOptions>(options: T): T;
|
|
45
68
|
|
|
46
|
-
export { SetupService as S, SAASICAT_PUBLIC_ROUTE_KEY as a, SETUP_CONFIG_TOKEN as b, SETUP_PROVISIONING_PORT_TOKEN as c,
|
|
69
|
+
export { SetupService as S, SAASICAT_PUBLIC_ROUTE_KEY as a, SETUP_CONFIG_TOKEN as b, SETUP_PROVISIONING_PORT_TOKEN as c, SaasPlatformModule as d, SaaSiCatPublicRoute as e, type SetupConfig as f, defineSaaSiCat as g, isSaaSiCatPublicRoute as i };
|
package/dist/{enforce-quota.interceptor-B9QueAFf.d.ts → enforce-quota.interceptor-CYDNvAQz.d.ts}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CanActivate, ExecutionContext, NestInterceptor, CallHandler } from '@nestjs/common';
|
|
2
2
|
import { Reflector } from '@nestjs/core';
|
|
3
|
-
import { F as FEATURE_GUARD_MARKER } from './
|
|
3
|
+
import { F as FEATURE_GUARD_MARKER } from './tenant-billing.module-B0stLoJn.js';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import { PlanCatalog, QuotaProvider } from '@saasicat/types';
|
|
6
|
-
import {
|
|
6
|
+
import { o as PlanResolverPort } from './module-options-ByJL7FZm.js';
|
|
7
7
|
|
|
8
8
|
interface StaticEntitlementSnapshot {
|
|
9
9
|
planId: string | null;
|
|
@@ -44,7 +44,7 @@ declare class StaticFeatureGuard implements CanActivate {
|
|
|
44
44
|
private readonly reflector;
|
|
45
45
|
private readonly entitlements;
|
|
46
46
|
private readonly config;
|
|
47
|
-
/** Lets `
|
|
47
|
+
/** Lets `EnforcementChainCheck` recognise this guard across CJS entries. */
|
|
48
48
|
static readonly [FEATURE_GUARD_MARKER] = true;
|
|
49
49
|
constructor(reflector: Reflector, entitlements: StaticEntitlementService, config?: StaticFeatureGuardConfig | null);
|
|
50
50
|
canActivate(context: ExecutionContext): Promise<boolean>;
|
package/dist/{enforce-quota.interceptor-DY6CLjoP.d.cts → enforce-quota.interceptor-N80KC34N.d.cts}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CanActivate, ExecutionContext, NestInterceptor, CallHandler } from '@nestjs/common';
|
|
2
2
|
import { Reflector } from '@nestjs/core';
|
|
3
|
-
import { F as FEATURE_GUARD_MARKER } from './
|
|
3
|
+
import { F as FEATURE_GUARD_MARKER } from './tenant-billing.module-BxJS6fX4.cjs';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import { PlanCatalog, QuotaProvider } from '@saasicat/types';
|
|
6
|
-
import {
|
|
6
|
+
import { o as PlanResolverPort } from './module-options-klrPnWGF.cjs';
|
|
7
7
|
|
|
8
8
|
interface StaticEntitlementSnapshot {
|
|
9
9
|
planId: string | null;
|
|
@@ -44,7 +44,7 @@ declare class StaticFeatureGuard implements CanActivate {
|
|
|
44
44
|
private readonly reflector;
|
|
45
45
|
private readonly entitlements;
|
|
46
46
|
private readonly config;
|
|
47
|
-
/** Lets `
|
|
47
|
+
/** Lets `EnforcementChainCheck` recognise this guard across CJS entries. */
|
|
48
48
|
static readonly [FEATURE_GUARD_MARKER] = true;
|
|
49
49
|
constructor(reflector: Reflector, entitlements: StaticEntitlementService, config?: StaticFeatureGuardConfig | null);
|
|
50
50
|
canActivate(context: ExecutionContext): Promise<boolean>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import "../chunk-2FR6ZL7R.js";
|
|
2
|
+
import {
|
|
3
|
+
EntitlementModule
|
|
4
|
+
} from "../chunk-H4DOTO7S.js";
|
|
1
5
|
import {
|
|
2
|
-
EntitlementModule,
|
|
3
6
|
EntitlementService,
|
|
4
7
|
LimitExceededError,
|
|
5
8
|
aggregateContractLineItemEntitlements,
|
|
@@ -19,7 +22,7 @@ import {
|
|
|
19
22
|
mergeSubscriptionBundlesIntoLimits,
|
|
20
23
|
resolveEntitlementPlan,
|
|
21
24
|
toEffectiveLimitsSnapshot
|
|
22
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-F4B2NJUZ.js";
|
|
23
26
|
import "../chunk-DQKCK7DX.js";
|
|
24
27
|
import "../chunk-NYLON2VC.js";
|
|
25
28
|
import "../chunk-EBJJNTW6.js";
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { P as ProviderSpec, a as asProvider } from './di-CcNeq9v-.cjs';
|
|
2
|
-
import { S as SetupService } from './define-saasicat-
|
|
3
|
-
export { a as SAASICAT_PUBLIC_ROUTE_KEY, b as SETUP_CONFIG_TOKEN, c as SETUP_PROVISIONING_PORT_TOKEN, d as
|
|
2
|
+
import { S as SetupService } from './define-saasicat-CFxut1VR.cjs';
|
|
3
|
+
export { a as SAASICAT_PUBLIC_ROUTE_KEY, b as SETUP_CONFIG_TOKEN, c as SETUP_PROVISIONING_PORT_TOKEN, d as SaaSiCatModule, e as SaaSiCatPublicRoute, d as SaasPlatformModule, f as SetupConfig, g as defineSaaSiCat, i as isSaaSiCatPublicRoute } from './define-saasicat-CFxut1VR.cjs';
|
|
4
4
|
export { CreatePromoCodeDto, PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN, PROMO_CODE_REPOSITORY_TOKEN, PROMO_CODE_VALIDATION_LOG_REPOSITORY_TOKEN, PROMO_FIRST_TIME_CUSTOMER_CHECK_TOKEN, PROMO_REVENUE_DEDUCTION_AGGREGATOR_TOKEN, PROMO_SERVICE_CONFIG_TOKEN, PROMO_SUBSCRIPTION_LOOKUP_TOKEN, PROMO_TRANSACTION_RUNNER_TOKEN, PreviewPromoCodeDto, PromoCodeExpirer, PromoCodeForCalc, PromoCodePublicController, PromoLabelOptions, UpdatePromoCodeDto, addCycles, buildLabel, buildPromoCodeAdminController, computeDiscountGross, computeDiscountedGross, computeIncludedVat, computeRegularStartsAt, grossFromNet, round2 } from './promo/index.cjs';
|
|
5
5
|
export { a as PreviewInput, b as PreviewInvalid, c as PreviewReason, d as PreviewResult, e as PreviewValid, f as PromoCodeStats, g as PromoCodesService, P as PromoServiceConfig, R as RedeemInput } from './service-D48clObR.cjs';
|
|
6
6
|
export { P as PromoCodeRateLimitGuard, h as hashIp, i as ipFingerprint } from './rate-limit.guard-dntqAlfZ.cjs';
|
|
@@ -8,8 +8,8 @@ export { P as PromoCodesModule, a as PromoCodesModuleOptions } from './module-CH
|
|
|
8
8
|
export { AjvErrorLike, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_UI_REGISTRY_TOKEN, FeatureGuard, FeatureGuardConfig, LimitExceededFilter, LoadPlanCatalogOptions, MarketingFields, NextPeriodWindow, PLAN_CATALOG_IMPORT_SINK_TOKEN, PLAN_CATALOG_READ_SINK_TOKEN, PLAN_CATALOG_TOKEN, PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN, PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN, PUBLIC_CATALOG_PROJECT_KEY_TOKEN, PeriodRollInput, PlanCatalogBuildSettings, PlanCatalogImportDto, PlanCatalogImporterControllerConfig, PlanCatalogImporterModule, PlanCatalogImporterModuleOptions, PlanCatalogImporterService, PlanCatalogModule, PlanCatalogModuleOptions, PlanCatalogValidationError, PlanResponseEntry, PublicBundleEntry, PublicCatalogController, PublicCatalogModule, PublicCatalogModuleOptions, PublishValidationError, PublishablePlanVersion, REQUIRE_FEATURE_KEY, RenewalDecision, RenewalSubInput, RequireFeature, SUBSCRIPTION_BUNDLE_CONFIG_TOKEN, SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN, SubscriptionContractFreezeService, UPSELL_OFFER_CURRENCY_TOKEN, UPSELL_OFFER_RESOLVER_TOKEN, assertBaseVersionFresh, assertChangeNote, assertDraftPublishable, assertOptimisticLockHeld, buildPlanCatalogFromSnapshot, buildPlanCatalogImporterController, buildTenantSubscriptionBundlesController, clearPendingPlanVersionFields, computeCarriedTrialEndsAt, computeNextPeriod, decideRenewal, findPlan, getActiveFeatureKeys, getMarketedPlans, getPlanOrThrow, getPlanPriceGross, getPlanPriceNet, getPlanQuota, initialPeriodWindow, isFeatureInPlan, isFeaturePlannedOnly, loadPlanCatalogFromFile, loadPlanCatalogFromString, periodEndAfter, periodEndWithMinLead } from './billing/index.cjs';
|
|
9
9
|
import { SetupStatusResponse, SetupResult, SetupConfirmMfaResponse, PlatformErrorCode, PlatformErrorBody } from '@saasicat/types';
|
|
10
10
|
export { BundleVersionFields, ChangeDirection, DiffResult, DiscoveredCapability, DiscoveredFeature, DiscoveredQuota, DiscoverySnapshot, PasswordHasher, PlanVersionFields, VersionChange, VersionChangeDirection, classifyBundleVersionDiff, classifyPlanDiff } from '@saasicat/types';
|
|
11
|
-
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, f as ContractFreezePort, g as ContractFreezeSourcePort, D as DuePendingPlanChange, F as FEATURE_GUARD_MARKER, M as MarkedFeatureGuard, 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, E as isPlatformFeatureGuard } from './
|
|
12
|
-
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-
|
|
11
|
+
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, f as ContractFreezePort, g as ContractFreezeSourcePort, D as DuePendingPlanChange, F as FEATURE_GUARD_MARKER, M as MarkedFeatureGuard, 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, E as isPlatformFeatureGuard } from './tenant-billing.module-BxJS6fX4.cjs';
|
|
12
|
+
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-CAMMdfn1.cjs';
|
|
13
13
|
export { C as CustomLimitsShape, E as EffectiveLimits, a as EffectiveLimitsSnapshot, b as EnforceLimitInput, c as EntitlementService, P as PlanVersionSnapshot, S as SubscriptionBundleSnapshot, d as SubscriptionLimitsInput, e as aggregateContractLineItemEntitlements, f as aggregateLimits, g as aggregateSubscriptionBundleQuotas, h as applyCustomLimits, i as collectSubscriptionBundleFeatures, j as contractBundleVersionIds, k as contractLimits, l as filterActiveSubscriptionBundles, m as filterPlannedOnlyFeatures, n as hasAnyFeature, o as hasFeature, p as mergeSubscriptionBundlesIntoLimits, t as toEffectiveLimitsSnapshot } from './aggregation-mZ7WZROK.cjs';
|
|
14
14
|
export { ENTITLEMENT_RESOLUTION_CONFIG_TOKEN, ENTITLEMENT_SERVICE_TOKEN, EntitlementModule, EntitlementModuleOptions, LimitExceededError, PLAN_VERSION_REPOSITORY_TOKEN, ReplacedByIndex, SUBSCRIPTION_REPOSITORY_TOKEN, TRANSACTION_RUNNER_TOKEN, buildReplacedByIndex, expandReplacedFeatures, isLimitExceededError } from './entitlement/index.cjs';
|
|
15
15
|
export { E as EntitlementResolutionConfig, a as EntitlementResolutionInput, r as resolveEntitlementPlan } from './plan-resolution-CFCoUkrE.cjs';
|
|
@@ -17,7 +17,7 @@ export { ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN, AUDIT_PORT_TOKEN, AUDIT_STATS_PORT
|
|
|
17
17
|
export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions, f as AdminStatsService, g as AdminStatsSnapshot, 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';
|
|
18
18
|
export { A as AdminAuditService } from './admin-audit.service-9IqXMlZm.cjs';
|
|
19
19
|
export { A as ADMIN_MANIFEST_CONFIG, a as ADMIN_RESOURCES_PORT_TOKEN, b as AdminManifestConfig, c as AdminResourcesModule, d as AdminResourcesModuleOptions, e as AdminResourcesService, f as AdminStatsModule, g as AdminStatsModuleOptions, S as SuspendTenantDto } from './admin-resources.module-DGgGSdzN.cjs';
|
|
20
|
-
export { S as
|
|
20
|
+
export { S as SaasPlatformAdapters, a as SaasPlatformAdminResourcesOptions, b as SaasPlatformAdminStatsOptions, c as SaasPlatformCatalogOptions, d as SaasPlatformCheckoutOfferOptions, e as SaasPlatformModuleOptions, f as SaasPlatformPromoCodesOptions, g as SaasPlatformSetupOptions, h as SaasPlatformSubscriptionBundlesOptions, i as SaasPlatformSubscriptionContractOptions, j as SaasPlatformTenantAuthGuards, k as SaasPlatformTenantBillingOptions, l as SetupModule, m as SetupModuleOptions } from './module-options-klrPnWGF.cjs';
|
|
21
21
|
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, 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, RegistrationModuleOptions, ResendRegistrationOtpDto, SLUG_AVAILABILITY_CHECK_TOKEN, SaveRegistrationConfigDto, SaveRegistrationConfigSelectionDto, SelectRegistrationPlanDto, StartRegistrationCheckoutDto, USER_ACCOUNT_LOOKUP_TOKEN, VerifyRegistrationOtpDto, computeBreakdown, generateOtpCode, hashOtpCode, resolveModel, slugify, verifyOtpCode } from './registration/index.cjs';
|
|
22
22
|
export { DEFINES_QUOTA_KEY, DISCOVERY_SNAPSHOT_TOKEN, DefinesQuota, DefinesQuotaOptions, DiscoveryControllerConfig, DiscoveryModule, DiscoveryModuleOptions, DiscoverySnapshotNotFoundError, ENFORCE_QUOTA_KEY, EnforceQuota, EnforceQuotaMetadata, EnforceQuotaOptions, HeadlessScanOptions, IMPLEMENTS_CAPABILITY_KEY, ImplementsCapability, ImplementsCapabilityMetadata, ImplementsCapabilityOptions, REQUIRES_CAPABILITY_KEY, RequiresCapability, RequiresCapabilityKeys, buildDiscoveryController, loadDiscoverySnapshotFromFile, runHeadlessDiscoveryScan } from './discovery/index.cjs';
|
|
23
23
|
export { D as DISCOVERY_APP_INFO_TOKEN, a as DISCOVERY_SNAPSHOT_PATH_TOKEN, b as DiscoveryAppInfo, c as DiscoveryScanner, d as computeSnapshotHash } from './discovery.scanner-DLgEvuoy.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { P as ProviderSpec, a as asProvider } from './di-CcNeq9v-.js';
|
|
2
|
-
import { S as SetupService } from './define-saasicat-
|
|
3
|
-
export { a as SAASICAT_PUBLIC_ROUTE_KEY, b as SETUP_CONFIG_TOKEN, c as SETUP_PROVISIONING_PORT_TOKEN, d as
|
|
2
|
+
import { S as SetupService } from './define-saasicat-3ois8t8s.js';
|
|
3
|
+
export { a as SAASICAT_PUBLIC_ROUTE_KEY, b as SETUP_CONFIG_TOKEN, c as SETUP_PROVISIONING_PORT_TOKEN, d as SaaSiCatModule, e as SaaSiCatPublicRoute, d as SaasPlatformModule, f as SetupConfig, g as defineSaaSiCat, i as isSaaSiCatPublicRoute } from './define-saasicat-3ois8t8s.js';
|
|
4
4
|
export { CreatePromoCodeDto, PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN, PROMO_CODE_REPOSITORY_TOKEN, PROMO_CODE_VALIDATION_LOG_REPOSITORY_TOKEN, PROMO_FIRST_TIME_CUSTOMER_CHECK_TOKEN, PROMO_REVENUE_DEDUCTION_AGGREGATOR_TOKEN, PROMO_SERVICE_CONFIG_TOKEN, PROMO_SUBSCRIPTION_LOOKUP_TOKEN, PROMO_TRANSACTION_RUNNER_TOKEN, PreviewPromoCodeDto, PromoCodeExpirer, PromoCodeForCalc, PromoCodePublicController, PromoLabelOptions, UpdatePromoCodeDto, addCycles, buildLabel, buildPromoCodeAdminController, computeDiscountGross, computeDiscountedGross, computeIncludedVat, computeRegularStartsAt, grossFromNet, round2 } from './promo/index.js';
|
|
5
5
|
export { a as PreviewInput, b as PreviewInvalid, c as PreviewReason, d as PreviewResult, e as PreviewValid, f as PromoCodeStats, g as PromoCodesService, P as PromoServiceConfig, R as RedeemInput } from './service-D48clObR.js';
|
|
6
6
|
export { P as PromoCodeRateLimitGuard, h as hashIp, i as ipFingerprint } from './rate-limit.guard-dntqAlfZ.js';
|
|
@@ -8,8 +8,8 @@ export { P as PromoCodesModule, a as PromoCodesModuleOptions } from './module-BE
|
|
|
8
8
|
export { AjvErrorLike, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_UI_REGISTRY_TOKEN, FeatureGuard, FeatureGuardConfig, LimitExceededFilter, LoadPlanCatalogOptions, MarketingFields, NextPeriodWindow, PLAN_CATALOG_IMPORT_SINK_TOKEN, PLAN_CATALOG_READ_SINK_TOKEN, PLAN_CATALOG_TOKEN, PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN, PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN, PUBLIC_CATALOG_PROJECT_KEY_TOKEN, PeriodRollInput, PlanCatalogBuildSettings, PlanCatalogImportDto, PlanCatalogImporterControllerConfig, PlanCatalogImporterModule, PlanCatalogImporterModuleOptions, PlanCatalogImporterService, PlanCatalogModule, PlanCatalogModuleOptions, PlanCatalogValidationError, PlanResponseEntry, PublicBundleEntry, PublicCatalogController, PublicCatalogModule, PublicCatalogModuleOptions, PublishValidationError, PublishablePlanVersion, REQUIRE_FEATURE_KEY, RenewalDecision, RenewalSubInput, RequireFeature, SUBSCRIPTION_BUNDLE_CONFIG_TOKEN, SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN, SubscriptionContractFreezeService, UPSELL_OFFER_CURRENCY_TOKEN, UPSELL_OFFER_RESOLVER_TOKEN, assertBaseVersionFresh, assertChangeNote, assertDraftPublishable, assertOptimisticLockHeld, buildPlanCatalogFromSnapshot, buildPlanCatalogImporterController, buildTenantSubscriptionBundlesController, clearPendingPlanVersionFields, computeCarriedTrialEndsAt, computeNextPeriod, decideRenewal, findPlan, getActiveFeatureKeys, getMarketedPlans, getPlanOrThrow, getPlanPriceGross, getPlanPriceNet, getPlanQuota, initialPeriodWindow, isFeatureInPlan, isFeaturePlannedOnly, loadPlanCatalogFromFile, loadPlanCatalogFromString, periodEndAfter, periodEndWithMinLead } from './billing/index.js';
|
|
9
9
|
import { SetupStatusResponse, SetupResult, SetupConfirmMfaResponse, PlatformErrorCode, PlatformErrorBody } from '@saasicat/types';
|
|
10
10
|
export { BundleVersionFields, ChangeDirection, DiffResult, DiscoveredCapability, DiscoveredFeature, DiscoveredQuota, DiscoverySnapshot, PasswordHasher, PlanVersionFields, VersionChange, VersionChangeDirection, classifyBundleVersionDiff, classifyPlanDiff } from '@saasicat/types';
|
|
11
|
-
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, f as ContractFreezePort, g as ContractFreezeSourcePort, D as DuePendingPlanChange, F as FEATURE_GUARD_MARKER, M as MarkedFeatureGuard, 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, E as isPlatformFeatureGuard } from './
|
|
12
|
-
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-
|
|
11
|
+
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, f as ContractFreezePort, g as ContractFreezeSourcePort, D as DuePendingPlanChange, F as FEATURE_GUARD_MARKER, M as MarkedFeatureGuard, 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, E as isPlatformFeatureGuard } from './tenant-billing.module-B0stLoJn.js';
|
|
12
|
+
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-CYYK0CpT.js';
|
|
13
13
|
export { C as CustomLimitsShape, E as EffectiveLimits, a as EffectiveLimitsSnapshot, b as EnforceLimitInput, c as EntitlementService, P as PlanVersionSnapshot, S as SubscriptionBundleSnapshot, d as SubscriptionLimitsInput, e as aggregateContractLineItemEntitlements, f as aggregateLimits, g as aggregateSubscriptionBundleQuotas, h as applyCustomLimits, i as collectSubscriptionBundleFeatures, j as contractBundleVersionIds, k as contractLimits, l as filterActiveSubscriptionBundles, m as filterPlannedOnlyFeatures, n as hasAnyFeature, o as hasFeature, p as mergeSubscriptionBundlesIntoLimits, t as toEffectiveLimitsSnapshot } from './aggregation-DP5zfKbU.js';
|
|
14
14
|
export { ENTITLEMENT_RESOLUTION_CONFIG_TOKEN, ENTITLEMENT_SERVICE_TOKEN, EntitlementModule, EntitlementModuleOptions, LimitExceededError, PLAN_VERSION_REPOSITORY_TOKEN, ReplacedByIndex, SUBSCRIPTION_REPOSITORY_TOKEN, TRANSACTION_RUNNER_TOKEN, buildReplacedByIndex, expandReplacedFeatures, isLimitExceededError } from './entitlement/index.js';
|
|
15
15
|
export { E as EntitlementResolutionConfig, a as EntitlementResolutionInput, r as resolveEntitlementPlan } from './plan-resolution-CFCoUkrE.js';
|
|
@@ -17,7 +17,7 @@ export { ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN, AUDIT_PORT_TOKEN, AUDIT_STATS_PORT
|
|
|
17
17
|
export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions, f as AdminStatsService, g as AdminStatsSnapshot, 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';
|
|
18
18
|
export { A as AdminAuditService } from './admin-audit.service-9IqXMlZm.js';
|
|
19
19
|
export { A as ADMIN_MANIFEST_CONFIG, a as ADMIN_RESOURCES_PORT_TOKEN, b as AdminManifestConfig, 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';
|
|
20
|
-
export { S as
|
|
20
|
+
export { S as SaasPlatformAdapters, a as SaasPlatformAdminResourcesOptions, b as SaasPlatformAdminStatsOptions, c as SaasPlatformCatalogOptions, d as SaasPlatformCheckoutOfferOptions, e as SaasPlatformModuleOptions, f as SaasPlatformPromoCodesOptions, g as SaasPlatformSetupOptions, h as SaasPlatformSubscriptionBundlesOptions, i as SaasPlatformSubscriptionContractOptions, j as SaasPlatformTenantAuthGuards, k as SaasPlatformTenantBillingOptions, l as SetupModule, m as SetupModuleOptions } from './module-options-ByJL7FZm.js';
|
|
21
21
|
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, 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, RegistrationModuleOptions, ResendRegistrationOtpDto, SLUG_AVAILABILITY_CHECK_TOKEN, SaveRegistrationConfigDto, SaveRegistrationConfigSelectionDto, SelectRegistrationPlanDto, StartRegistrationCheckoutDto, USER_ACCOUNT_LOOKUP_TOKEN, VerifyRegistrationOtpDto, computeBreakdown, generateOtpCode, hashOtpCode, resolveModel, slugify, verifyOtpCode } from './registration/index.js';
|
|
22
22
|
export { DEFINES_QUOTA_KEY, DISCOVERY_SNAPSHOT_TOKEN, DefinesQuota, DefinesQuotaOptions, DiscoveryControllerConfig, DiscoveryModule, DiscoveryModuleOptions, DiscoverySnapshotNotFoundError, ENFORCE_QUOTA_KEY, EnforceQuota, EnforceQuotaMetadata, EnforceQuotaOptions, HeadlessScanOptions, IMPLEMENTS_CAPABILITY_KEY, ImplementsCapability, ImplementsCapabilityMetadata, ImplementsCapabilityOptions, REQUIRES_CAPABILITY_KEY, RequiresCapability, RequiresCapabilityKeys, buildDiscoveryController, loadDiscoverySnapshotFromFile, runHeadlessDiscoveryScan } from './discovery/index.js';
|
|
23
23
|
export { D as DISCOVERY_APP_INFO_TOKEN, a as DISCOVERY_SNAPSHOT_PATH_TOKEN, b as DiscoveryAppInfo, c as DiscoveryScanner, d as computeSnapshotHash } from './discovery.scanner-DLgEvuoy.js';
|
package/dist/index.js
CHANGED
|
@@ -38,7 +38,34 @@ import {
|
|
|
38
38
|
slugify,
|
|
39
39
|
verifyOtpCode
|
|
40
40
|
} from "./chunk-MJ32VNZD.js";
|
|
41
|
+
import "./chunk-2SLTRKXC.js";
|
|
41
42
|
import "./chunk-UF53DWWR.js";
|
|
43
|
+
import {
|
|
44
|
+
CatalogBundleUpsellResolver,
|
|
45
|
+
ConfiguratorCatalogBuilder,
|
|
46
|
+
FEATURE_GUARD_CONFIG_TOKEN,
|
|
47
|
+
FeatureGuard,
|
|
48
|
+
LimitExceededFilter,
|
|
49
|
+
PLAN_CATALOG_IMPORT_SINK_TOKEN,
|
|
50
|
+
PlanCatalogImportDto,
|
|
51
|
+
PlanCatalogImporterModule,
|
|
52
|
+
PlanCatalogImporterService,
|
|
53
|
+
PlanCatalogValidationError,
|
|
54
|
+
PublishValidationError,
|
|
55
|
+
UPSELL_OFFER_CURRENCY_TOKEN,
|
|
56
|
+
UPSELL_OFFER_RESOLVER_TOKEN,
|
|
57
|
+
assertBaseVersionFresh,
|
|
58
|
+
assertChangeNote,
|
|
59
|
+
assertDraftPublishable,
|
|
60
|
+
assertOptimisticLockHeld,
|
|
61
|
+
buildPlanCatalogImporterController,
|
|
62
|
+
clearPendingPlanVersionFields,
|
|
63
|
+
computeCarriedTrialEndsAt,
|
|
64
|
+
computeNextPeriod,
|
|
65
|
+
decideRenewal,
|
|
66
|
+
loadPlanCatalogFromFile,
|
|
67
|
+
loadPlanCatalogFromString
|
|
68
|
+
} from "./chunk-2JTISFUZ.js";
|
|
42
69
|
import {
|
|
43
70
|
formatPreflightReport,
|
|
44
71
|
formatSeedGateReport,
|
|
@@ -60,9 +87,10 @@ import {
|
|
|
60
87
|
DiscoverySnapshotNotFoundError,
|
|
61
88
|
loadDiscoverySnapshotFromFile
|
|
62
89
|
} from "./chunk-74SCJ4HF.js";
|
|
90
|
+
import "./chunk-2FR6ZL7R.js";
|
|
63
91
|
import {
|
|
64
92
|
defineSaaSiCat
|
|
65
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-OYNHOY45.js";
|
|
66
94
|
import {
|
|
67
95
|
SETUP_CONFIG_TOKEN,
|
|
68
96
|
SETUP_PROVISIONING_PORT_TOKEN,
|
|
@@ -70,7 +98,7 @@ import {
|
|
|
70
98
|
SetupController,
|
|
71
99
|
SetupModule,
|
|
72
100
|
SetupService
|
|
73
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-EHKMPP6J.js";
|
|
74
102
|
import {
|
|
75
103
|
CreatePromoCodeDto,
|
|
76
104
|
PreviewPromoCodeDto,
|
|
@@ -83,6 +111,9 @@ import {
|
|
|
83
111
|
hashIp,
|
|
84
112
|
ipFingerprint
|
|
85
113
|
} from "./chunk-B6IWLV7R.js";
|
|
114
|
+
import {
|
|
115
|
+
SubscriptionContractModule
|
|
116
|
+
} from "./chunk-3E6ONOMG.js";
|
|
86
117
|
import {
|
|
87
118
|
ADMIN_MANIFEST_CONFIG,
|
|
88
119
|
ADMIN_RESOURCES_PORT_TOKEN,
|
|
@@ -115,30 +146,19 @@ import {
|
|
|
115
146
|
CONTRACT_FREEZE_PROJECT_KEY_TOKEN,
|
|
116
147
|
CONTRACT_FREEZE_SOURCE_PORT_TOKEN,
|
|
117
148
|
CancelSubscriptionDto,
|
|
118
|
-
CatalogBundleUpsellResolver,
|
|
119
149
|
ChangePlanDto,
|
|
120
150
|
CompleteOnboardingSubscriptionDto,
|
|
121
151
|
ComposedTenantAuthGuard,
|
|
122
|
-
ConfiguratorCatalogBuilder,
|
|
123
|
-
FEATURE_GUARD_CONFIG_TOKEN,
|
|
124
152
|
FEATURE_GUARD_MARKER,
|
|
125
153
|
FEATURE_UI_REGISTRY_TOKEN,
|
|
126
|
-
FeatureGuard,
|
|
127
|
-
LimitExceededFilter,
|
|
128
|
-
PLAN_CATALOG_IMPORT_SINK_TOKEN,
|
|
129
154
|
PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN,
|
|
130
155
|
PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN,
|
|
131
156
|
PUBLIC_CATALOG_PROJECT_KEY_TOKEN,
|
|
132
157
|
PendingPlanMaterializationService,
|
|
133
|
-
PlanCatalogImportDto,
|
|
134
|
-
PlanCatalogImporterModule,
|
|
135
|
-
PlanCatalogImporterService,
|
|
136
|
-
PlanCatalogValidationError,
|
|
137
158
|
PlanChangePreviewService,
|
|
138
159
|
PreviewPlanChangeDto,
|
|
139
160
|
PublicCatalogController,
|
|
140
161
|
PublicCatalogModule,
|
|
141
|
-
PublishValidationError,
|
|
142
162
|
REQUIRE_FEATURE_KEY,
|
|
143
163
|
RequireFeature,
|
|
144
164
|
SELF_SERVICE_BLOCKED_BUNDLES_TOKEN,
|
|
@@ -150,29 +170,16 @@ import {
|
|
|
150
170
|
TenantAdminGuard,
|
|
151
171
|
TenantBillingController,
|
|
152
172
|
TenantBillingModule,
|
|
153
|
-
UPSELL_OFFER_CURRENCY_TOKEN,
|
|
154
|
-
UPSELL_OFFER_RESOLVER_TOKEN,
|
|
155
173
|
addMonths,
|
|
156
|
-
assertBaseVersionFresh,
|
|
157
|
-
assertChangeNote,
|
|
158
|
-
assertDraftPublishable,
|
|
159
|
-
assertOptimisticLockHeld,
|
|
160
|
-
buildPlanCatalogImporterController,
|
|
161
174
|
buildTenantSubscriptionBundlesController,
|
|
162
|
-
clearPendingPlanVersionFields,
|
|
163
|
-
computeCarriedTrialEndsAt,
|
|
164
|
-
computeNextPeriod,
|
|
165
175
|
computeProration,
|
|
166
|
-
decideRenewal,
|
|
167
176
|
initialPeriodWindow,
|
|
168
177
|
isPlatformFeatureGuard,
|
|
169
|
-
loadPlanCatalogFromFile,
|
|
170
|
-
loadPlanCatalogFromString,
|
|
171
178
|
periodEndAfter,
|
|
172
179
|
periodEndWithMinLead,
|
|
173
180
|
resolveBundleCancelEffectiveAt,
|
|
174
181
|
resolveBundlePriceNet
|
|
175
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-UHD6FJBQ.js";
|
|
176
183
|
import {
|
|
177
184
|
PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN,
|
|
178
185
|
PROMO_CODE_REPOSITORY_TOKEN,
|
|
@@ -190,12 +197,11 @@ import {
|
|
|
190
197
|
computeRegularStartsAt
|
|
191
198
|
} from "./chunk-37HEKVDH.js";
|
|
192
199
|
import {
|
|
193
|
-
SubscriptionContractModule,
|
|
194
200
|
SubscriptionContractService,
|
|
195
201
|
contractLineItemToInvoiceLineItem,
|
|
196
202
|
sortContractLineItemsForInvoice,
|
|
197
203
|
subscriptionContractToInvoiceSnapshot
|
|
198
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-CJFAOD7K.js";
|
|
199
205
|
import {
|
|
200
206
|
ADVISORY_STRICT_MODE_CODES,
|
|
201
207
|
BundlesService,
|
|
@@ -290,7 +296,9 @@ import {
|
|
|
290
296
|
computeSnapshotHash
|
|
291
297
|
} from "./chunk-5ZXBXYXU.js";
|
|
292
298
|
import {
|
|
293
|
-
EntitlementModule
|
|
299
|
+
EntitlementModule
|
|
300
|
+
} from "./chunk-H4DOTO7S.js";
|
|
301
|
+
import {
|
|
294
302
|
EntitlementService,
|
|
295
303
|
LimitExceededError,
|
|
296
304
|
SUBSCRIPTION_BUNDLE_CONFIG_TOKEN,
|
|
@@ -312,7 +320,7 @@ import {
|
|
|
312
320
|
mergeSubscriptionBundlesIntoLimits,
|
|
313
321
|
resolveEntitlementPlan,
|
|
314
322
|
toEffectiveLimitsSnapshot
|
|
315
|
-
} from "./chunk-
|
|
323
|
+
} from "./chunk-F4B2NJUZ.js";
|
|
316
324
|
import {
|
|
317
325
|
PLAN_CATALOG_READ_SINK_TOKEN,
|
|
318
326
|
PLAN_CATALOG_TOKEN,
|
|
@@ -2,13 +2,13 @@ import { Type, DynamicModule, ForwardReference, Provider, CanActivate, FactoryPr
|
|
|
2
2
|
import { SuperAdminProvisioningPort, PlanCatalog, SaasicatPersistenceAdapter, MfaPort, AuditPort, RlsBypassPort, PlanCatalogReadSink, SubscriptionRepository, PlanVersionRepository, TransactionRunner, QuotaProvider, FeatureUiRegistry, SubscriptionUsagePort, UsageSnapshotPort, TenantSubscriptionWritePort, AdminResourcesPort, FirstTimeCustomerCheck } from '@saasicat/types';
|
|
3
3
|
import { P as ProviderSpec } from './di-CcNeq9v-.js';
|
|
4
4
|
import { b as AdminManifestConfig, d as AdminResourcesModuleOptions, g as AdminStatsModuleOptions } from './admin-resources.module-BY5r_1MG.js';
|
|
5
|
+
import { t as TenantBillingModuleOptions, p as SubscriptionBundleModuleOptions, n as SubscriptionBundleControllerOptions } from './tenant-billing.module-B0stLoJn.js';
|
|
6
|
+
import { b as CatalogModuleOptions } from './catalog.module-CQr1FpkI.js';
|
|
7
|
+
import { b as DiscoveryAppInfo } from './discovery.scanner-DLgEvuoy.js';
|
|
5
8
|
import { E as EntitlementResolutionConfig } from './plan-resolution-CFCoUkrE.js';
|
|
6
|
-
import { a as SubscriptionContractModuleOptions } from './subscription-contract.module-edyhBr4n.js';
|
|
7
9
|
import { a as PromoCodesModuleOptions } from './module-BE17XFLg.js';
|
|
8
|
-
import { b as DiscoveryAppInfo } from './discovery.scanner-DLgEvuoy.js';
|
|
9
|
-
import { b as CatalogModuleOptions } from './catalog.module-CQr1FpkI.js';
|
|
10
10
|
import { b as CheckoutOfferModuleOptions } from './checkout-offer.module-Ca3_TieR.js';
|
|
11
|
-
import {
|
|
11
|
+
import { a as SubscriptionContractModuleOptions } from './subscription-contract.module-edyhBr4n.js';
|
|
12
12
|
|
|
13
13
|
interface SetupModuleOptions {
|
|
14
14
|
/**
|
|
@@ -178,6 +178,23 @@ interface SaasPlatformCheckoutOfferOptions extends Omit<CheckoutOfferModuleOptio
|
|
|
178
178
|
interface SaasPlatformSubscriptionContractOptions extends Omit<SubscriptionContractModuleOptions, 'subscriptionContractRepository' | 'global'> {
|
|
179
179
|
subscriptionContractRepository?: SubscriptionContractModuleOptions['subscriptionContractRepository'];
|
|
180
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* What `SaaSiCatModule.forRoot()` composes.
|
|
183
|
+
*
|
|
184
|
+
* One subsystem is deliberately absent: **self-registration**. A prospect
|
|
185
|
+
* signing themselves up — mail address, OTP, plan choice, payment, activation —
|
|
186
|
+
* is `RegistrationModule` from `@saasicat/nest/registration`, and it is
|
|
187
|
+
* hand-wired: ten required ports, none of which a persistence bundle supplies.
|
|
188
|
+
*
|
|
189
|
+
* That is a decision with a reason and a plan, not an omission: the ten ports
|
|
190
|
+
* have no executable contract yet (`@saasicat/persistence-testing` covers the
|
|
191
|
+
* catalogue, subscription, promo and audit ports and none of these), and
|
|
192
|
+
* folding unverified ports into a bundle would move the problem rather than
|
|
193
|
+
* check it. See `docs/self-registration.md`.
|
|
194
|
+
*
|
|
195
|
+
* Everything else — an operator creating tenants through the SuperAdmin UI, a
|
|
196
|
+
* CLI, or your own onboarding form — is composed here.
|
|
197
|
+
*/
|
|
181
198
|
interface SaasPlatformModuleOptions {
|
|
182
199
|
/**
|
|
183
200
|
* Plan catalog. Either as an already-loaded object (quickstart, comes
|
|
@@ -366,28 +383,24 @@ interface SaasPlatformModuleOptions {
|
|
|
366
383
|
* authenticated request.
|
|
367
384
|
*/
|
|
368
385
|
globalFeatureGuard?: boolean;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
* and override bundle slices field by field.
|
|
388
|
-
*/
|
|
389
|
-
declare class SaasPlatformModule {
|
|
390
|
-
static forRoot(options: SaasPlatformModuleOptions): DynamicModule;
|
|
386
|
+
/**
|
|
387
|
+
* Run the enforcement-chain check at bootstrap. Default `true`.
|
|
388
|
+
*
|
|
389
|
+
* It refuses to start an application whose `@RequireFeature` routes have
|
|
390
|
+
* nothing enforcing them — the failure that otherwise shows up as a
|
|
391
|
+
* customer using a feature they never bought.
|
|
392
|
+
*
|
|
393
|
+
* Two shapes it cannot recognise, and they are the reason this switch
|
|
394
|
+
* exists rather than being an argument about the check: a feature guard of
|
|
395
|
+
* your own that WRAPS ours without carrying `FEATURE_GUARD_MARKER`, and one
|
|
396
|
+
* you bind globally as an `APP_GUARD` instead of per controller. Both are
|
|
397
|
+
* correctly enforced and both look uncovered from here.
|
|
398
|
+
*
|
|
399
|
+
* Turning it off buys silence, not safety: those routes are then unchecked
|
|
400
|
+
* by anything, and whether they are covered is back to being something you
|
|
401
|
+
* know rather than something the boot verifies.
|
|
402
|
+
*/
|
|
403
|
+
enforcementChainCheck?: boolean;
|
|
391
404
|
}
|
|
392
405
|
|
|
393
|
-
export { PLAN_RESOLVER_PORT_TOKEN as P,
|
|
406
|
+
export { PLAN_RESOLVER_PORT_TOKEN as P, type SaasPlatformAdapters as S, type TenantManifestControllerOptions as T, type SaasPlatformAdminResourcesOptions as a, type SaasPlatformAdminStatsOptions as b, type SaasPlatformCatalogOptions as c, type SaasPlatformCheckoutOfferOptions as d, type SaasPlatformModuleOptions as e, type SaasPlatformPromoCodesOptions as f, type SaasPlatformSetupOptions as g, type SaasPlatformSubscriptionBundlesOptions as h, type SaasPlatformSubscriptionContractOptions as i, type SaasPlatformTenantAuthGuards as j, type SaasPlatformTenantBillingOptions as k, SetupModule as l, type SetupModuleOptions as m, StaticPlanResolver as n, type PlanResolverPort as o, buildTenantManifestController as p };
|
|
@@ -2,13 +2,13 @@ import { Type, DynamicModule, ForwardReference, Provider, CanActivate, FactoryPr
|
|
|
2
2
|
import { SuperAdminProvisioningPort, PlanCatalog, SaasicatPersistenceAdapter, MfaPort, AuditPort, RlsBypassPort, PlanCatalogReadSink, SubscriptionRepository, PlanVersionRepository, TransactionRunner, QuotaProvider, FeatureUiRegistry, SubscriptionUsagePort, UsageSnapshotPort, TenantSubscriptionWritePort, AdminResourcesPort, FirstTimeCustomerCheck } from '@saasicat/types';
|
|
3
3
|
import { P as ProviderSpec } from './di-CcNeq9v-.cjs';
|
|
4
4
|
import { b as AdminManifestConfig, d as AdminResourcesModuleOptions, g as AdminStatsModuleOptions } from './admin-resources.module-DGgGSdzN.cjs';
|
|
5
|
+
import { t as TenantBillingModuleOptions, p as SubscriptionBundleModuleOptions, n as SubscriptionBundleControllerOptions } from './tenant-billing.module-BxJS6fX4.cjs';
|
|
6
|
+
import { b as CatalogModuleOptions } from './catalog.module-D-_pQDNA.cjs';
|
|
7
|
+
import { b as DiscoveryAppInfo } from './discovery.scanner-DLgEvuoy.cjs';
|
|
5
8
|
import { E as EntitlementResolutionConfig } from './plan-resolution-CFCoUkrE.cjs';
|
|
6
|
-
import { a as SubscriptionContractModuleOptions } from './subscription-contract.module-B2uNvUJL.cjs';
|
|
7
9
|
import { a as PromoCodesModuleOptions } from './module-CHMIyWlf.cjs';
|
|
8
|
-
import { b as DiscoveryAppInfo } from './discovery.scanner-DLgEvuoy.cjs';
|
|
9
|
-
import { b as CatalogModuleOptions } from './catalog.module-D-_pQDNA.cjs';
|
|
10
10
|
import { b as CheckoutOfferModuleOptions } from './checkout-offer.module-DmlpPevf.cjs';
|
|
11
|
-
import {
|
|
11
|
+
import { a as SubscriptionContractModuleOptions } from './subscription-contract.module-B2uNvUJL.cjs';
|
|
12
12
|
|
|
13
13
|
interface SetupModuleOptions {
|
|
14
14
|
/**
|
|
@@ -178,6 +178,23 @@ interface SaasPlatformCheckoutOfferOptions extends Omit<CheckoutOfferModuleOptio
|
|
|
178
178
|
interface SaasPlatformSubscriptionContractOptions extends Omit<SubscriptionContractModuleOptions, 'subscriptionContractRepository' | 'global'> {
|
|
179
179
|
subscriptionContractRepository?: SubscriptionContractModuleOptions['subscriptionContractRepository'];
|
|
180
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* What `SaaSiCatModule.forRoot()` composes.
|
|
183
|
+
*
|
|
184
|
+
* One subsystem is deliberately absent: **self-registration**. A prospect
|
|
185
|
+
* signing themselves up — mail address, OTP, plan choice, payment, activation —
|
|
186
|
+
* is `RegistrationModule` from `@saasicat/nest/registration`, and it is
|
|
187
|
+
* hand-wired: ten required ports, none of which a persistence bundle supplies.
|
|
188
|
+
*
|
|
189
|
+
* That is a decision with a reason and a plan, not an omission: the ten ports
|
|
190
|
+
* have no executable contract yet (`@saasicat/persistence-testing` covers the
|
|
191
|
+
* catalogue, subscription, promo and audit ports and none of these), and
|
|
192
|
+
* folding unverified ports into a bundle would move the problem rather than
|
|
193
|
+
* check it. See `docs/self-registration.md`.
|
|
194
|
+
*
|
|
195
|
+
* Everything else — an operator creating tenants through the SuperAdmin UI, a
|
|
196
|
+
* CLI, or your own onboarding form — is composed here.
|
|
197
|
+
*/
|
|
181
198
|
interface SaasPlatformModuleOptions {
|
|
182
199
|
/**
|
|
183
200
|
* Plan catalog. Either as an already-loaded object (quickstart, comes
|
|
@@ -366,28 +383,24 @@ interface SaasPlatformModuleOptions {
|
|
|
366
383
|
* authenticated request.
|
|
367
384
|
*/
|
|
368
385
|
globalFeatureGuard?: boolean;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
* and override bundle slices field by field.
|
|
388
|
-
*/
|
|
389
|
-
declare class SaasPlatformModule {
|
|
390
|
-
static forRoot(options: SaasPlatformModuleOptions): DynamicModule;
|
|
386
|
+
/**
|
|
387
|
+
* Run the enforcement-chain check at bootstrap. Default `true`.
|
|
388
|
+
*
|
|
389
|
+
* It refuses to start an application whose `@RequireFeature` routes have
|
|
390
|
+
* nothing enforcing them — the failure that otherwise shows up as a
|
|
391
|
+
* customer using a feature they never bought.
|
|
392
|
+
*
|
|
393
|
+
* Two shapes it cannot recognise, and they are the reason this switch
|
|
394
|
+
* exists rather than being an argument about the check: a feature guard of
|
|
395
|
+
* your own that WRAPS ours without carrying `FEATURE_GUARD_MARKER`, and one
|
|
396
|
+
* you bind globally as an `APP_GUARD` instead of per controller. Both are
|
|
397
|
+
* correctly enforced and both look uncovered from here.
|
|
398
|
+
*
|
|
399
|
+
* Turning it off buys silence, not safety: those routes are then unchecked
|
|
400
|
+
* by anything, and whether they are covered is back to being something you
|
|
401
|
+
* know rather than something the boot verifies.
|
|
402
|
+
*/
|
|
403
|
+
enforcementChainCheck?: boolean;
|
|
391
404
|
}
|
|
392
405
|
|
|
393
|
-
export { PLAN_RESOLVER_PORT_TOKEN as P,
|
|
406
|
+
export { PLAN_RESOLVER_PORT_TOKEN as P, type SaasPlatformAdapters as S, type TenantManifestControllerOptions as T, type SaasPlatformAdminResourcesOptions as a, type SaasPlatformAdminStatsOptions as b, type SaasPlatformCatalogOptions as c, type SaasPlatformCheckoutOfferOptions as d, type SaasPlatformModuleOptions as e, type SaasPlatformPromoCodesOptions as f, type SaasPlatformSetupOptions as g, type SaasPlatformSubscriptionBundlesOptions as h, type SaasPlatformSubscriptionContractOptions as i, type SaasPlatformTenantAuthGuards as j, type SaasPlatformTenantBillingOptions as k, SetupModule as l, type SetupModuleOptions as m, StaticPlanResolver as n, type PlanResolverPort as o, buildTenantManifestController as p };
|