@saasicat/nest 0.26.1 → 1.0.0-rc.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/.build-stamp +1 -0
- package/dist/_entries.cjs +3175 -2756
- package/dist/admin/index.d.cts +2 -2
- package/dist/admin/index.d.ts +2 -2
- package/dist/admin/index.js +2 -2
- package/dist/{admin-stats.service-HUZIU448.d.cts → admin-stats.service-BroyovpL.d.cts} +1 -1
- package/dist/{admin-stats.service-Db2exT_d.d.ts → admin-stats.service-G53IEkkt.d.ts} +1 -1
- package/dist/billing/index.d.cts +7 -7
- package/dist/billing/index.d.ts +7 -7
- package/dist/billing/index.js +38 -36
- package/dist/catalog/index.d.cts +13 -1
- package/dist/catalog/index.d.ts +13 -1
- package/dist/catalog/index.js +10 -8
- package/dist/checkout-offer/index.js +2 -2
- package/dist/chunk-2FR6ZL7R.js +0 -0
- package/dist/chunk-2SLTRKXC.js +0 -0
- package/dist/{chunk-7ZPFQXHM.js → chunk-3UZW7TU4.js} +1 -1
- package/dist/{chunk-XTVAFJ3P.js → chunk-AEEK64XD.js} +3 -3
- package/dist/chunk-AOQJEYOL.js +20 -0
- package/dist/chunk-H3W6QDQH.js +85 -0
- package/dist/{chunk-YYUXKLXK.js → chunk-I7GTA3RX.js} +2 -2
- package/dist/{chunk-SN5UOC43.js → chunk-IPOLCDKN.js} +11 -11
- package/dist/{chunk-B7NRY2LV.js → chunk-IVEA6M3B.js} +2 -40
- package/dist/chunk-JCAZT727.js +1883 -0
- package/dist/chunk-JTLKWP3Q.js +792 -0
- package/dist/{chunk-E56W4U2P.js → chunk-O2J2HDXA.js} +4 -4
- package/dist/{chunk-WKVBNTYC.js → chunk-OUDSQ3PU.js} +6 -6
- package/dist/{chunk-MJ32VNZD.js → chunk-P5D5CYO2.js} +18 -18
- package/dist/{chunk-L4SUWH5B.js → chunk-QUZU2M33.js} +2 -2
- package/dist/{chunk-WPUVJRIN.js → chunk-S6BAD5XM.js} +10 -10
- package/dist/{chunk-7X5MSAIL.js → chunk-SH7J5IU7.js} +9 -9
- package/dist/{chunk-37HEKVDH.js → chunk-V4OJ43K2.js} +10 -10
- package/dist/{chunk-NYLON2VC.js → chunk-VBRYPU7V.js} +2 -2
- package/dist/{chunk-B6IWLV7R.js → chunk-VTMCMVYQ.js} +6 -6
- package/dist/{chunk-YWDLYOFN.js → chunk-WSPHIIGS.js} +429 -1205
- package/dist/{chunk-5ZXBXYXU.js → chunk-WXYJHZCN.js} +3 -3
- package/dist/{chunk-6WL6VQ7Z.js → chunk-XBYAFEOR.js} +2 -2
- package/dist/{chunk-NNNXXUPT.js → chunk-XEW6YXL5.js} +28 -93
- package/dist/chunk-Y43SGD5J.js +50 -0
- package/dist/{define-saasicat-BK6RRWWG.d.ts → define-saasicat-BFgeoVG9.d.ts} +28 -5
- package/dist/{define-saasicat-D30I-WET.d.cts → define-saasicat-CNUWjfNK.d.cts} +28 -5
- package/dist/discovery/index.js +4 -4
- package/dist/{enforce-quota.interceptor-B9QueAFf.d.ts → enforce-quota.interceptor-BYqmdFB5.d.ts} +3 -3
- package/dist/{enforce-quota.interceptor-DY6CLjoP.d.cts → enforce-quota.interceptor-BxIR63Wn.d.cts} +3 -3
- package/dist/entitlement/index.js +9 -6
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +61 -52
- package/dist/{saas-platform.module-D1mUZPrz.d.ts → module-options-BymIkAsh.d.ts} +68 -55
- package/dist/{saas-platform.module-CgalxzcT.d.cts → module-options-DgwBKVpC.d.cts} +68 -55
- package/dist/platform/index.d.cts +204 -22
- package/dist/platform/index.d.ts +204 -22
- package/dist/platform/index.js +49 -25
- package/dist/promo/index.d.cts +3 -3
- package/dist/promo/index.d.ts +3 -3
- package/dist/promo/index.js +3 -3
- package/dist/{module-BE17XFLg.d.ts → promo.module-CnzddtJ0.d.ts} +1 -1
- package/dist/{module-CHMIyWlf.d.cts → promo.module-DokmUGmm.d.cts} +1 -1
- package/dist/registration/index.d.cts +1 -1
- package/dist/registration/index.d.ts +1 -1
- package/dist/registration/index.js +1 -1
- package/dist/subscription-contract/index.js +6 -3
- package/dist/{tenant-billing.controller-BSlpFqVA.d.ts → tenant-billing.controller-BQPy5yXh.d.ts} +2 -2
- package/dist/{tenant-billing.controller-DHSUrT_N.d.cts → tenant-billing.controller-CODIYzlI.d.cts} +2 -2
- 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 +14 -14
- package/dist/testing/index.d.ts +14 -14
- package/dist/testing/index.js +31 -29
- package/package.json +6 -6
- package/dist/chunk-L4KTQ6CL.js +0 -20
- package/dist/chunk-TCBYOFAC.js +0 -1464
- /package/dist/{chunk-FY4EJTV4.js → chunk-OYNHOY45.js} +0 -0
- /package/dist/{service-D48clObR.d.cts → promo.service-D48clObR.d.cts} +0 -0
- /package/dist/{service-D48clObR.d.ts → promo.service-D48clObR.d.ts} +0 -0
package/dist/admin/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as AdminStatsService, g as AdminStatsSnapshot } from '../admin-stats.service-
|
|
2
|
-
export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions, 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-
|
|
1
|
+
import { f as AdminStatsService, g as AdminStatsSnapshot } from '../admin-stats.service-BroyovpL.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-BroyovpL.cjs';
|
|
3
3
|
export { A as AdminAuditService } from '../admin-audit.service-9IqXMlZm.cjs';
|
|
4
4
|
import { b as AdminManifestConfig } from '../admin-resources.module-DGgGSdzN.cjs';
|
|
5
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';
|
package/dist/admin/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as AdminStatsService, g as AdminStatsSnapshot } from '../admin-stats.service-
|
|
2
|
-
export { A as AdminBypassRlsInterceptor, a as AdminManifestModule, b as AdminManifestModuleOptions, c as AdminManifestService, d as AdminModule, e as AdminModuleOptions, 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-
|
|
1
|
+
import { f as AdminStatsService, g as AdminStatsSnapshot } from '../admin-stats.service-G53IEkkt.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-G53IEkkt.js';
|
|
3
3
|
export { A as AdminAuditService } from '../admin-audit.service-9IqXMlZm.js';
|
|
4
4
|
import { b as AdminManifestConfig } from '../admin-resources.module-BY5r_1MG.js';
|
|
5
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';
|
package/dist/admin/index.js
CHANGED
|
@@ -25,13 +25,13 @@ import {
|
|
|
25
25
|
SuperAdminGuard,
|
|
26
26
|
SuspendTenantDto,
|
|
27
27
|
buildAdminStatsController
|
|
28
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-IPOLCDKN.js";
|
|
29
29
|
import {
|
|
30
30
|
AUDIT_PORT_TOKEN,
|
|
31
31
|
AdminAuditService,
|
|
32
32
|
MFA_PORT_TOKEN,
|
|
33
33
|
RLS_BYPASS_PORT_TOKEN
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-O2J2HDXA.js";
|
|
35
35
|
import "../chunk-YSC46BGM.js";
|
|
36
36
|
import "../chunk-EBJJNTW6.js";
|
|
37
37
|
import "../chunk-SABTXESR.js";
|
|
@@ -44,7 +44,7 @@ declare class MfaService {
|
|
|
44
44
|
isEnabled(userId: string): Promise<boolean>;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
declare const REQUIRE_MFA_KEY = "
|
|
47
|
+
declare const REQUIRE_MFA_KEY = "saasicat/nest/require-mfa";
|
|
48
48
|
/**
|
|
49
49
|
* Marks an endpoint as MFA-required. The frontend sends the TOTP code
|
|
50
50
|
* in the `X-Mfa-Code` header.
|
|
@@ -44,7 +44,7 @@ declare class MfaService {
|
|
|
44
44
|
isEnabled(userId: string): Promise<boolean>;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
declare const REQUIRE_MFA_KEY = "
|
|
47
|
+
declare const REQUIRE_MFA_KEY = "saasicat/nest/require-mfa";
|
|
48
48
|
/**
|
|
49
49
|
* Marks an endpoint as MFA-required. The frontend sends the TOTP code
|
|
50
50
|
* in the `X-Mfa-Code` header.
|
package/dist/billing/index.d.cts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { BillingCycle, FeatureKey, UpsellOfferResolver, BundleRepository, CatalogEntryRepository, UpsellOffer, PlanCatalog, PlanCatalogReadSink, PlanCatalogReadSnapshot, PlanCatalogImportSink, PlanCatalogImportReport, PlanId, PlanDef, QuotaKey, MarketingTopFeature, FeatureUiRegistry, MarketingProjectionRepository, ConfiguratorSourcesLookup, ConfiguratorMarketingProvider, ConfiguratorCatalog } from '@saasicat/types';
|
|
2
2
|
export { BundleVersionFields, ChangeDirection, DiffResult, PlanVersionFields, VersionChange, VersionChangeDirection, classifyBundleVersionDiff, classifyPlanDiff } from '@saasicat/types';
|
|
3
|
-
import { F as FEATURE_GUARD_MARKER, f as ContractFreezePort, g as ContractFreezeSourcePort } from '../
|
|
4
|
-
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, 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 '../
|
|
3
|
+
import { F as FEATURE_GUARD_MARKER, f as ContractFreezePort, g as ContractFreezeSourcePort } from '../tenant-billing.module-BxJS6fX4.cjs';
|
|
4
|
+
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, 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';
|
|
5
5
|
import * as _nestjs_common from '@nestjs/common';
|
|
6
6
|
import { CanActivate, ExecutionContext, ArgumentsHost, Type, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
7
7
|
export { Type as NestType } from '@nestjs/common';
|
|
8
8
|
import { Reflector, BaseExceptionFilter } from '@nestjs/core';
|
|
9
9
|
import { c as EntitlementService } from '../aggregation-mZ7WZROK.cjs';
|
|
10
10
|
import { P as ProviderSpec } from '../di-CcNeq9v-.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 '../tenant-billing.controller-
|
|
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-CODIYzlI.cjs';
|
|
12
12
|
import { S as SubscriptionContractService } from '../subscription-contract.service--cm47ZJJ.cjs';
|
|
13
13
|
import '../plan-resolution-CFCoUkrE.cjs';
|
|
14
|
-
import '../service-D48clObR.cjs';
|
|
14
|
+
import '../promo.service-D48clObR.cjs';
|
|
15
15
|
import '../admin-audit.service-9IqXMlZm.cjs';
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -193,7 +193,7 @@ declare class FeatureGuard implements CanActivate {
|
|
|
193
193
|
private readonly entitlements;
|
|
194
194
|
private readonly config;
|
|
195
195
|
private readonly upsellResolver;
|
|
196
|
-
/** Lets `
|
|
196
|
+
/** Lets `EnforcementChainCheck` recognise this guard across CJS entries. */
|
|
197
197
|
static readonly [FEATURE_GUARD_MARKER] = true;
|
|
198
198
|
private readonly logger;
|
|
199
199
|
constructor(reflector: Reflector, entitlements: EntitlementService, config?: FeatureGuardConfig | null, upsellResolver?: UpsellOfferResolver | null);
|
|
@@ -445,7 +445,7 @@ declare function getActiveFeatureKeys(catalog: PlanCatalog): FeatureKey[];
|
|
|
445
445
|
*/
|
|
446
446
|
declare function isFeaturePlannedOnly(catalog: PlanCatalog, featureKey: FeatureKey): boolean;
|
|
447
447
|
|
|
448
|
-
declare const
|
|
448
|
+
declare const BILLING_FEATURE_UI_REGISTRY_TOKEN: unique symbol;
|
|
449
449
|
|
|
450
450
|
interface MarketingFields {
|
|
451
451
|
displayLabel?: string;
|
|
@@ -596,4 +596,4 @@ declare const SUBSCRIPTION_BUNDLE_CONFIG_TOKEN: unique symbol;
|
|
|
596
596
|
*/
|
|
597
597
|
declare function buildTenantSubscriptionBundlesController(extraGuards?: Array<Type<CanActivate>>): Type;
|
|
598
598
|
|
|
599
|
-
export { type AjvErrorLike, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, ContractFreezePort, ContractFreezeSourcePort, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_GUARD_MARKER,
|
|
599
|
+
export { type AjvErrorLike, BILLING_FEATURE_UI_REGISTRY_TOKEN, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, ContractFreezePort, ContractFreezeSourcePort, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_GUARD_MARKER, FeatureGuard, type FeatureGuardConfig, LimitExceededFilter, type LoadPlanCatalogOptions, type MarketingFields, type 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, type PeriodRollInput, type PlanCatalogBuildSettings, PlanCatalogImportDto, type PlanCatalogImporterControllerConfig, PlanCatalogImporterModule, type PlanCatalogImporterModuleOptions, PlanCatalogImporterService, PlanCatalogModule, type PlanCatalogModuleOptions, PlanCatalogValidationError, type PlanResponseEntry, type PublicBundleEntry, PublicCatalogController, PublicCatalogModule, type PublicCatalogModuleOptions, PublishValidationError, type PublishablePlanVersion, REQUIRE_FEATURE_KEY, type RenewalDecision, type 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 };
|
package/dist/billing/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { BillingCycle, FeatureKey, UpsellOfferResolver, BundleRepository, CatalogEntryRepository, UpsellOffer, PlanCatalog, PlanCatalogReadSink, PlanCatalogReadSnapshot, PlanCatalogImportSink, PlanCatalogImportReport, PlanId, PlanDef, QuotaKey, MarketingTopFeature, FeatureUiRegistry, MarketingProjectionRepository, ConfiguratorSourcesLookup, ConfiguratorMarketingProvider, ConfiguratorCatalog } from '@saasicat/types';
|
|
2
2
|
export { BundleVersionFields, ChangeDirection, DiffResult, PlanVersionFields, VersionChange, VersionChangeDirection, classifyBundleVersionDiff, classifyPlanDiff } from '@saasicat/types';
|
|
3
|
-
import { F as FEATURE_GUARD_MARKER, f as ContractFreezePort, g as ContractFreezeSourcePort } from '../
|
|
4
|
-
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, 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 '../
|
|
3
|
+
import { F as FEATURE_GUARD_MARKER, f as ContractFreezePort, g as ContractFreezeSourcePort } from '../tenant-billing.module-B0stLoJn.js';
|
|
4
|
+
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, 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';
|
|
5
5
|
import * as _nestjs_common from '@nestjs/common';
|
|
6
6
|
import { CanActivate, ExecutionContext, ArgumentsHost, Type, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
7
7
|
export { Type as NestType } from '@nestjs/common';
|
|
8
8
|
import { Reflector, BaseExceptionFilter } from '@nestjs/core';
|
|
9
9
|
import { c as EntitlementService } from '../aggregation-DP5zfKbU.js';
|
|
10
10
|
import { P as ProviderSpec } from '../di-CcNeq9v-.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 '../tenant-billing.controller-
|
|
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-BQPy5yXh.js';
|
|
12
12
|
import { S as SubscriptionContractService } from '../subscription-contract.service--cm47ZJJ.js';
|
|
13
13
|
import '../plan-resolution-CFCoUkrE.js';
|
|
14
|
-
import '../service-D48clObR.js';
|
|
14
|
+
import '../promo.service-D48clObR.js';
|
|
15
15
|
import '../admin-audit.service-9IqXMlZm.js';
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -193,7 +193,7 @@ declare class FeatureGuard implements CanActivate {
|
|
|
193
193
|
private readonly entitlements;
|
|
194
194
|
private readonly config;
|
|
195
195
|
private readonly upsellResolver;
|
|
196
|
-
/** Lets `
|
|
196
|
+
/** Lets `EnforcementChainCheck` recognise this guard across CJS entries. */
|
|
197
197
|
static readonly [FEATURE_GUARD_MARKER] = true;
|
|
198
198
|
private readonly logger;
|
|
199
199
|
constructor(reflector: Reflector, entitlements: EntitlementService, config?: FeatureGuardConfig | null, upsellResolver?: UpsellOfferResolver | null);
|
|
@@ -445,7 +445,7 @@ declare function getActiveFeatureKeys(catalog: PlanCatalog): FeatureKey[];
|
|
|
445
445
|
*/
|
|
446
446
|
declare function isFeaturePlannedOnly(catalog: PlanCatalog, featureKey: FeatureKey): boolean;
|
|
447
447
|
|
|
448
|
-
declare const
|
|
448
|
+
declare const BILLING_FEATURE_UI_REGISTRY_TOKEN: unique symbol;
|
|
449
449
|
|
|
450
450
|
interface MarketingFields {
|
|
451
451
|
displayLabel?: string;
|
|
@@ -596,4 +596,4 @@ declare const SUBSCRIPTION_BUNDLE_CONFIG_TOKEN: unique symbol;
|
|
|
596
596
|
*/
|
|
597
597
|
declare function buildTenantSubscriptionBundlesController(extraGuards?: Array<Type<CanActivate>>): Type;
|
|
598
598
|
|
|
599
|
-
export { type AjvErrorLike, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, ContractFreezePort, ContractFreezeSourcePort, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_GUARD_MARKER,
|
|
599
|
+
export { type AjvErrorLike, BILLING_FEATURE_UI_REGISTRY_TOKEN, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, ContractFreezePort, ContractFreezeSourcePort, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_GUARD_MARKER, FeatureGuard, type FeatureGuardConfig, LimitExceededFilter, type LoadPlanCatalogOptions, type MarketingFields, type 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, type PeriodRollInput, type PlanCatalogBuildSettings, PlanCatalogImportDto, type PlanCatalogImporterControllerConfig, PlanCatalogImporterModule, type PlanCatalogImporterModuleOptions, PlanCatalogImporterService, PlanCatalogModule, type PlanCatalogModuleOptions, PlanCatalogValidationError, type PlanResponseEntry, type PublicBundleEntry, PublicCatalogController, PublicCatalogModule, type PublicCatalogModuleOptions, PublishValidationError, type PublishablePlanVersion, REQUIRE_FEATURE_KEY, type RenewalDecision, type 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 };
|
package/dist/billing/index.js
CHANGED
|
@@ -1,32 +1,47 @@
|
|
|
1
1
|
import {
|
|
2
|
+
CatalogBundleUpsellResolver,
|
|
3
|
+
ConfiguratorCatalogBuilder,
|
|
4
|
+
FEATURE_GUARD_CONFIG_TOKEN,
|
|
5
|
+
FeatureGuard,
|
|
6
|
+
LimitExceededFilter,
|
|
7
|
+
PLAN_CATALOG_IMPORT_SINK_TOKEN,
|
|
8
|
+
PlanCatalogImportDto,
|
|
9
|
+
PlanCatalogImporterModule,
|
|
10
|
+
PlanCatalogImporterService,
|
|
11
|
+
PlanCatalogValidationError,
|
|
12
|
+
PublishValidationError,
|
|
13
|
+
UPSELL_OFFER_CURRENCY_TOKEN,
|
|
14
|
+
UPSELL_OFFER_RESOLVER_TOKEN,
|
|
15
|
+
assertBaseVersionFresh,
|
|
16
|
+
assertChangeNote,
|
|
17
|
+
assertDraftPublishable,
|
|
18
|
+
assertOptimisticLockHeld,
|
|
19
|
+
buildPlanCatalogImporterController,
|
|
20
|
+
clearPendingPlanVersionFields,
|
|
21
|
+
computeCarriedTrialEndsAt,
|
|
22
|
+
computeNextPeriod,
|
|
23
|
+
decideRenewal,
|
|
24
|
+
loadPlanCatalogFromFile,
|
|
25
|
+
loadPlanCatalogFromString
|
|
26
|
+
} from "../chunk-JTLKWP3Q.js";
|
|
27
|
+
import {
|
|
28
|
+
BILLING_FEATURE_UI_REGISTRY_TOKEN,
|
|
2
29
|
CONTRACT_FREEZE_PORT_TOKEN,
|
|
3
30
|
CONTRACT_FREEZE_PROJECT_KEY_TOKEN,
|
|
4
31
|
CONTRACT_FREEZE_SOURCE_PORT_TOKEN,
|
|
5
32
|
CancelSubscriptionDto,
|
|
6
|
-
CatalogBundleUpsellResolver,
|
|
7
33
|
ChangePlanDto,
|
|
8
34
|
CompleteOnboardingSubscriptionDto,
|
|
9
35
|
ComposedTenantAuthGuard,
|
|
10
|
-
ConfiguratorCatalogBuilder,
|
|
11
|
-
FEATURE_GUARD_CONFIG_TOKEN,
|
|
12
36
|
FEATURE_GUARD_MARKER,
|
|
13
|
-
FEATURE_UI_REGISTRY_TOKEN,
|
|
14
|
-
FeatureGuard,
|
|
15
|
-
LimitExceededFilter,
|
|
16
|
-
PLAN_CATALOG_IMPORT_SINK_TOKEN,
|
|
17
37
|
PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN,
|
|
18
38
|
PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN,
|
|
19
39
|
PUBLIC_CATALOG_PROJECT_KEY_TOKEN,
|
|
20
40
|
PendingPlanMaterializationService,
|
|
21
|
-
PlanCatalogImportDto,
|
|
22
|
-
PlanCatalogImporterModule,
|
|
23
|
-
PlanCatalogImporterService,
|
|
24
|
-
PlanCatalogValidationError,
|
|
25
41
|
PlanChangePreviewService,
|
|
26
42
|
PreviewPlanChangeDto,
|
|
27
43
|
PublicCatalogController,
|
|
28
44
|
PublicCatalogModule,
|
|
29
|
-
PublishValidationError,
|
|
30
45
|
REQUIRE_FEATURE_KEY,
|
|
31
46
|
RequireFeature,
|
|
32
47
|
SELF_SERVICE_BLOCKED_BUNDLES_TOKEN,
|
|
@@ -38,31 +53,18 @@ import {
|
|
|
38
53
|
TenantAdminGuard,
|
|
39
54
|
TenantBillingController,
|
|
40
55
|
TenantBillingModule,
|
|
41
|
-
UPSELL_OFFER_CURRENCY_TOKEN,
|
|
42
|
-
UPSELL_OFFER_RESOLVER_TOKEN,
|
|
43
56
|
addMonths,
|
|
44
|
-
assertBaseVersionFresh,
|
|
45
|
-
assertChangeNote,
|
|
46
|
-
assertDraftPublishable,
|
|
47
|
-
assertOptimisticLockHeld,
|
|
48
|
-
buildPlanCatalogImporterController,
|
|
49
57
|
buildTenantSubscriptionBundlesController,
|
|
50
|
-
clearPendingPlanVersionFields,
|
|
51
|
-
computeCarriedTrialEndsAt,
|
|
52
|
-
computeNextPeriod,
|
|
53
58
|
computeProration,
|
|
54
|
-
decideRenewal,
|
|
55
59
|
initialPeriodWindow,
|
|
56
60
|
isPlatformFeatureGuard,
|
|
57
|
-
loadPlanCatalogFromFile,
|
|
58
|
-
loadPlanCatalogFromString,
|
|
59
61
|
periodEndAfter,
|
|
60
62
|
periodEndWithMinLead,
|
|
61
63
|
resolveBundleCancelEffectiveAt,
|
|
62
64
|
resolveBundlePriceNet
|
|
63
|
-
} from "../chunk-
|
|
64
|
-
import "../chunk-
|
|
65
|
-
import "../chunk-
|
|
65
|
+
} from "../chunk-WSPHIIGS.js";
|
|
66
|
+
import "../chunk-V4OJ43K2.js";
|
|
67
|
+
import "../chunk-IVEA6M3B.js";
|
|
66
68
|
import {
|
|
67
69
|
AUDIT_CONTEXT_RESOLVER_TOKEN,
|
|
68
70
|
PENDING_PLAN_QUERY_PORT_TOKEN,
|
|
@@ -76,14 +78,14 @@ import {
|
|
|
76
78
|
USER_ID_RESOLVER_TOKEN,
|
|
77
79
|
classifyBundleVersionDiff,
|
|
78
80
|
classifyPlanDiff
|
|
79
|
-
} from "../chunk-
|
|
80
|
-
import "../chunk-
|
|
81
|
+
} from "../chunk-S6BAD5XM.js";
|
|
82
|
+
import "../chunk-O2J2HDXA.js";
|
|
81
83
|
import "../chunk-BSK6YBLI.js";
|
|
82
84
|
import "../chunk-YSC46BGM.js";
|
|
83
85
|
import {
|
|
84
86
|
SUBSCRIPTION_BUNDLE_CONFIG_TOKEN,
|
|
85
87
|
SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN
|
|
86
|
-
} from "../chunk-
|
|
88
|
+
} from "../chunk-XEW6YXL5.js";
|
|
87
89
|
import {
|
|
88
90
|
PLAN_CATALOG_READ_SINK_TOKEN,
|
|
89
91
|
PLAN_CATALOG_TOKEN,
|
|
@@ -99,15 +101,16 @@ import {
|
|
|
99
101
|
isFeatureInPlan,
|
|
100
102
|
isFeaturePlannedOnly
|
|
101
103
|
} from "../chunk-DQKCK7DX.js";
|
|
102
|
-
import "../chunk-
|
|
104
|
+
import "../chunk-VBRYPU7V.js";
|
|
103
105
|
import "../chunk-EBJJNTW6.js";
|
|
104
|
-
import "../chunk-
|
|
105
|
-
import "../chunk-
|
|
106
|
+
import "../chunk-OUDSQ3PU.js";
|
|
107
|
+
import "../chunk-AOQJEYOL.js";
|
|
106
108
|
import "../chunk-SABTXESR.js";
|
|
107
|
-
import "../chunk-
|
|
109
|
+
import "../chunk-QUZU2M33.js";
|
|
108
110
|
import "../chunk-SHUYVCID.js";
|
|
109
111
|
export {
|
|
110
112
|
AUDIT_CONTEXT_RESOLVER_TOKEN,
|
|
113
|
+
BILLING_FEATURE_UI_REGISTRY_TOKEN,
|
|
111
114
|
CONTRACT_FREEZE_PORT_TOKEN,
|
|
112
115
|
CONTRACT_FREEZE_PROJECT_KEY_TOKEN,
|
|
113
116
|
CONTRACT_FREEZE_SOURCE_PORT_TOKEN,
|
|
@@ -119,7 +122,6 @@ export {
|
|
|
119
122
|
ConfiguratorCatalogBuilder,
|
|
120
123
|
FEATURE_GUARD_CONFIG_TOKEN,
|
|
121
124
|
FEATURE_GUARD_MARKER,
|
|
122
|
-
FEATURE_UI_REGISTRY_TOKEN,
|
|
123
125
|
FeatureGuard,
|
|
124
126
|
LimitExceededFilter,
|
|
125
127
|
PENDING_PLAN_QUERY_PORT_TOKEN,
|
package/dist/catalog/index.d.cts
CHANGED
|
@@ -56,6 +56,18 @@ declare const MARKETING_SETTINGS_REPOSITORY_TOKEN: unique symbol;
|
|
|
56
56
|
* Provided by CatalogModule.forRoot().
|
|
57
57
|
*/
|
|
58
58
|
declare const CATALOG_SERVICE_CONFIG_TOKEN: unique symbol;
|
|
59
|
+
/**
|
|
60
|
+
* Optional consumer-curated FeatureUiRegistry (label/description/icon per
|
|
61
|
+
* Feature). Feeds the Discovery auto-sync: empty `FeatureCatalogEntry` fields
|
|
62
|
+
* are seeded from it at boot (SuperAdmin edits remain untouched), so that
|
|
63
|
+
* the DB becomes the SSOT for UI metadata.
|
|
64
|
+
*
|
|
65
|
+
* Distinct from `billing/feature-ui-registry.tokens.ts`, which carries the
|
|
66
|
+
* registry for the PUBLIC catalog endpoints. Same exported name, different
|
|
67
|
+
* token on purpose — an app may curate the two surfaces differently. The key
|
|
68
|
+
* is namespaced accordingly so the two never collide.
|
|
69
|
+
*/
|
|
70
|
+
declare const CATALOG_FEATURE_UI_REGISTRY_TOKEN: unique symbol;
|
|
59
71
|
|
|
60
72
|
/**
|
|
61
73
|
* Advisory warnings (#35): they inform but never block — not even in
|
|
@@ -535,4 +547,4 @@ declare class PublishPlanVersionDto {
|
|
|
535
547
|
validUntil?: string | null;
|
|
536
548
|
}
|
|
537
549
|
|
|
538
|
-
export { ADVISORY_STRICT_MODE_CODES, BUNDLE_REPOSITORY_TOKEN, CATALOG_ENTRY_REPOSITORY_TOKEN, CATALOG_SERVICE_CONFIG_TOKEN, CreateBundleDto, CreateBundleVersionDraftDto, CreateMarketingProjectionDto, CreatePlanDto, CreatePlanVersionDraftDto, CreatePromotionDto, ListCatalogEntriesQueryDto, ListMarketingProjectionsQueryDto, ListMarketingSettingsQueryDto, ListPromotionsQueryDto, MARKETING_PROJECTION_REPOSITORY_TOKEN, MARKETING_SETTINGS_REPOSITORY_TOKEN, PLAN_REPOSITORY_TOKEN, PROMOTION_REPOSITORY_TOKEN, type PreflightFinding, type PreflightInput, type PreflightReport, PublishBundleVersionDto, PublishPlanVersionDto, ReviewCatalogEntryDto, type SeedBundleDraft, type SeedGateFinding, type SeedGateInput, type SeedGateMode, type SeedGateReport, type SeedGateRunOptions, type SeedPlanDraft, SyncDiscoveryDto, UpdateBundleDto, UpdateBundleVersionDraftDto, UpdateCatalogEntryI18nDto, UpdateMarketingProjectionDto, UpdateMarketingSettingsDto, UpdatePlanDto, UpdatePlanVersionDraftDto, UpdatePromotionDto, blockingStrictModeWarnings, buildBundleVersionsController, buildBundlesController, buildCatalogEntriesController, buildMarketingProjectionsController, buildMarketingSettingsController, buildPlanVersionsController, buildPlansController, buildPromotionsController, buildPublicMarketingCatalogController, featureApprovalSignature, formatPreflightReport, formatSeedGateReport, loadApprovedCatalogKeys, preflightExitCode, quotaApprovalSignature, runPreflight, runSeedGateFromFile, seedGateExitCode, validateBundleDraft, validatePlanDraft, validateSeedAgainstSnapshot };
|
|
550
|
+
export { ADVISORY_STRICT_MODE_CODES, BUNDLE_REPOSITORY_TOKEN, CATALOG_ENTRY_REPOSITORY_TOKEN, CATALOG_FEATURE_UI_REGISTRY_TOKEN, CATALOG_SERVICE_CONFIG_TOKEN, CreateBundleDto, CreateBundleVersionDraftDto, CreateMarketingProjectionDto, CreatePlanDto, CreatePlanVersionDraftDto, CreatePromotionDto, ListCatalogEntriesQueryDto, ListMarketingProjectionsQueryDto, ListMarketingSettingsQueryDto, ListPromotionsQueryDto, MARKETING_PROJECTION_REPOSITORY_TOKEN, MARKETING_SETTINGS_REPOSITORY_TOKEN, PLAN_REPOSITORY_TOKEN, PROMOTION_REPOSITORY_TOKEN, type PreflightFinding, type PreflightInput, type PreflightReport, PublishBundleVersionDto, PublishPlanVersionDto, ReviewCatalogEntryDto, type SeedBundleDraft, type SeedGateFinding, type SeedGateInput, type SeedGateMode, type SeedGateReport, type SeedGateRunOptions, type SeedPlanDraft, SyncDiscoveryDto, UpdateBundleDto, UpdateBundleVersionDraftDto, UpdateCatalogEntryI18nDto, UpdateMarketingProjectionDto, UpdateMarketingSettingsDto, UpdatePlanDto, UpdatePlanVersionDraftDto, UpdatePromotionDto, blockingStrictModeWarnings, buildBundleVersionsController, buildBundlesController, buildCatalogEntriesController, buildMarketingProjectionsController, buildMarketingSettingsController, buildPlanVersionsController, buildPlansController, buildPromotionsController, buildPublicMarketingCatalogController, featureApprovalSignature, formatPreflightReport, formatSeedGateReport, loadApprovedCatalogKeys, preflightExitCode, quotaApprovalSignature, runPreflight, runSeedGateFromFile, seedGateExitCode, validateBundleDraft, validatePlanDraft, validateSeedAgainstSnapshot };
|
package/dist/catalog/index.d.ts
CHANGED
|
@@ -56,6 +56,18 @@ declare const MARKETING_SETTINGS_REPOSITORY_TOKEN: unique symbol;
|
|
|
56
56
|
* Provided by CatalogModule.forRoot().
|
|
57
57
|
*/
|
|
58
58
|
declare const CATALOG_SERVICE_CONFIG_TOKEN: unique symbol;
|
|
59
|
+
/**
|
|
60
|
+
* Optional consumer-curated FeatureUiRegistry (label/description/icon per
|
|
61
|
+
* Feature). Feeds the Discovery auto-sync: empty `FeatureCatalogEntry` fields
|
|
62
|
+
* are seeded from it at boot (SuperAdmin edits remain untouched), so that
|
|
63
|
+
* the DB becomes the SSOT for UI metadata.
|
|
64
|
+
*
|
|
65
|
+
* Distinct from `billing/feature-ui-registry.tokens.ts`, which carries the
|
|
66
|
+
* registry for the PUBLIC catalog endpoints. Same exported name, different
|
|
67
|
+
* token on purpose — an app may curate the two surfaces differently. The key
|
|
68
|
+
* is namespaced accordingly so the two never collide.
|
|
69
|
+
*/
|
|
70
|
+
declare const CATALOG_FEATURE_UI_REGISTRY_TOKEN: unique symbol;
|
|
59
71
|
|
|
60
72
|
/**
|
|
61
73
|
* Advisory warnings (#35): they inform but never block — not even in
|
|
@@ -535,4 +547,4 @@ declare class PublishPlanVersionDto {
|
|
|
535
547
|
validUntil?: string | null;
|
|
536
548
|
}
|
|
537
549
|
|
|
538
|
-
export { ADVISORY_STRICT_MODE_CODES, BUNDLE_REPOSITORY_TOKEN, CATALOG_ENTRY_REPOSITORY_TOKEN, CATALOG_SERVICE_CONFIG_TOKEN, CreateBundleDto, CreateBundleVersionDraftDto, CreateMarketingProjectionDto, CreatePlanDto, CreatePlanVersionDraftDto, CreatePromotionDto, ListCatalogEntriesQueryDto, ListMarketingProjectionsQueryDto, ListMarketingSettingsQueryDto, ListPromotionsQueryDto, MARKETING_PROJECTION_REPOSITORY_TOKEN, MARKETING_SETTINGS_REPOSITORY_TOKEN, PLAN_REPOSITORY_TOKEN, PROMOTION_REPOSITORY_TOKEN, type PreflightFinding, type PreflightInput, type PreflightReport, PublishBundleVersionDto, PublishPlanVersionDto, ReviewCatalogEntryDto, type SeedBundleDraft, type SeedGateFinding, type SeedGateInput, type SeedGateMode, type SeedGateReport, type SeedGateRunOptions, type SeedPlanDraft, SyncDiscoveryDto, UpdateBundleDto, UpdateBundleVersionDraftDto, UpdateCatalogEntryI18nDto, UpdateMarketingProjectionDto, UpdateMarketingSettingsDto, UpdatePlanDto, UpdatePlanVersionDraftDto, UpdatePromotionDto, blockingStrictModeWarnings, buildBundleVersionsController, buildBundlesController, buildCatalogEntriesController, buildMarketingProjectionsController, buildMarketingSettingsController, buildPlanVersionsController, buildPlansController, buildPromotionsController, buildPublicMarketingCatalogController, featureApprovalSignature, formatPreflightReport, formatSeedGateReport, loadApprovedCatalogKeys, preflightExitCode, quotaApprovalSignature, runPreflight, runSeedGateFromFile, seedGateExitCode, validateBundleDraft, validatePlanDraft, validateSeedAgainstSnapshot };
|
|
550
|
+
export { ADVISORY_STRICT_MODE_CODES, BUNDLE_REPOSITORY_TOKEN, CATALOG_ENTRY_REPOSITORY_TOKEN, CATALOG_FEATURE_UI_REGISTRY_TOKEN, CATALOG_SERVICE_CONFIG_TOKEN, CreateBundleDto, CreateBundleVersionDraftDto, CreateMarketingProjectionDto, CreatePlanDto, CreatePlanVersionDraftDto, CreatePromotionDto, ListCatalogEntriesQueryDto, ListMarketingProjectionsQueryDto, ListMarketingSettingsQueryDto, ListPromotionsQueryDto, MARKETING_PROJECTION_REPOSITORY_TOKEN, MARKETING_SETTINGS_REPOSITORY_TOKEN, PLAN_REPOSITORY_TOKEN, PROMOTION_REPOSITORY_TOKEN, type PreflightFinding, type PreflightInput, type PreflightReport, PublishBundleVersionDto, PublishPlanVersionDto, ReviewCatalogEntryDto, type SeedBundleDraft, type SeedGateFinding, type SeedGateInput, type SeedGateMode, type SeedGateReport, type SeedGateRunOptions, type SeedPlanDraft, SyncDiscoveryDto, UpdateBundleDto, UpdateBundleVersionDraftDto, UpdateCatalogEntryI18nDto, UpdateMarketingProjectionDto, UpdateMarketingSettingsDto, UpdatePlanDto, UpdatePlanVersionDraftDto, UpdatePromotionDto, blockingStrictModeWarnings, buildBundleVersionsController, buildBundlesController, buildCatalogEntriesController, buildMarketingProjectionsController, buildMarketingSettingsController, buildPlanVersionsController, buildPlansController, buildPromotionsController, buildPublicMarketingCatalogController, featureApprovalSignature, formatPreflightReport, formatSeedGateReport, loadApprovedCatalogKeys, preflightExitCode, quotaApprovalSignature, runPreflight, runSeedGateFromFile, seedGateExitCode, validateBundleDraft, validatePlanDraft, validateSeedAgainstSnapshot };
|
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-3UZW7TU4.js";
|
|
10
10
|
import "../chunk-74SCJ4HF.js";
|
|
11
11
|
import {
|
|
12
12
|
ADVISORY_STRICT_MODE_CODES,
|
|
@@ -56,29 +56,31 @@ import {
|
|
|
56
56
|
quotaApprovalSignature,
|
|
57
57
|
validateBundleDraft,
|
|
58
58
|
validatePlanDraft
|
|
59
|
-
} from "../chunk-
|
|
60
|
-
import "../chunk-
|
|
61
|
-
import "../chunk-
|
|
59
|
+
} from "../chunk-SH7J5IU7.js";
|
|
60
|
+
import "../chunk-S6BAD5XM.js";
|
|
61
|
+
import "../chunk-O2J2HDXA.js";
|
|
62
62
|
import "../chunk-YSC46BGM.js";
|
|
63
|
-
import "../chunk-
|
|
64
|
-
import "../chunk-
|
|
63
|
+
import "../chunk-WXYJHZCN.js";
|
|
64
|
+
import "../chunk-OUDSQ3PU.js";
|
|
65
65
|
import {
|
|
66
66
|
BUNDLE_REPOSITORY_TOKEN,
|
|
67
67
|
CATALOG_ENTRY_REPOSITORY_TOKEN,
|
|
68
|
+
CATALOG_FEATURE_UI_REGISTRY_TOKEN,
|
|
68
69
|
CATALOG_SERVICE_CONFIG_TOKEN,
|
|
69
70
|
MARKETING_PROJECTION_REPOSITORY_TOKEN,
|
|
70
71
|
MARKETING_SETTINGS_REPOSITORY_TOKEN,
|
|
71
72
|
PLAN_REPOSITORY_TOKEN,
|
|
72
73
|
PROMOTION_REPOSITORY_TOKEN
|
|
73
|
-
} from "../chunk-
|
|
74
|
+
} from "../chunk-AOQJEYOL.js";
|
|
74
75
|
import "../chunk-SABTXESR.js";
|
|
75
|
-
import "../chunk-
|
|
76
|
+
import "../chunk-QUZU2M33.js";
|
|
76
77
|
import "../chunk-SHUYVCID.js";
|
|
77
78
|
export {
|
|
78
79
|
ADVISORY_STRICT_MODE_CODES,
|
|
79
80
|
BUNDLE_REPOSITORY_TOKEN,
|
|
80
81
|
BundlesService,
|
|
81
82
|
CATALOG_ENTRY_REPOSITORY_TOKEN,
|
|
83
|
+
CATALOG_FEATURE_UI_REGISTRY_TOKEN,
|
|
82
84
|
CATALOG_SERVICE_CONFIG_TOKEN,
|
|
83
85
|
CatalogEntriesService,
|
|
84
86
|
CatalogModule,
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
CreateCheckoutOfferDto,
|
|
7
7
|
UpdateCheckoutOfferDto,
|
|
8
8
|
buildCheckoutOfferController
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-AEEK64XD.js";
|
|
10
10
|
import "../chunk-BSK6YBLI.js";
|
|
11
11
|
import "../chunk-YSC46BGM.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-AOQJEYOL.js";
|
|
13
13
|
import "../chunk-SABTXESR.js";
|
|
14
14
|
import "../chunk-SHUYVCID.js";
|
|
15
15
|
export {
|
|
File without changes
|
|
File without changes
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
BUNDLE_REPOSITORY_TOKEN,
|
|
9
9
|
CATALOG_ENTRY_REPOSITORY_TOKEN,
|
|
10
10
|
PLAN_REPOSITORY_TOKEN
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AOQJEYOL.js";
|
|
12
12
|
import {
|
|
13
13
|
asProvider
|
|
14
14
|
} from "./chunk-SABTXESR.js";
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
__name
|
|
17
17
|
} from "./chunk-SHUYVCID.js";
|
|
18
18
|
|
|
19
|
-
// src/checkout-offer/tokens.ts
|
|
20
|
-
var CHECKOUT_OFFER_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("
|
|
19
|
+
// src/checkout-offer/checkout-offer.tokens.ts
|
|
20
|
+
var CHECKOUT_OFFER_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/CheckoutOfferRepository");
|
|
21
21
|
|
|
22
22
|
// src/checkout-offer/checkout-offer.service.ts
|
|
23
23
|
import { ConflictException, Inject, Injectable, NotFoundException, Optional, UnprocessableEntityException } from "@nestjs/common";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// src/catalog/catalog.tokens.ts
|
|
2
|
+
var PLAN_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/PlanRepository");
|
|
3
|
+
var BUNDLE_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/BundleRepository");
|
|
4
|
+
var MARKETING_PROJECTION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/MarketingProjectionRepository");
|
|
5
|
+
var CATALOG_ENTRY_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/CatalogEntryRepository");
|
|
6
|
+
var PROMOTION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/PromotionRepository");
|
|
7
|
+
var MARKETING_SETTINGS_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/MarketingSettingsRepository");
|
|
8
|
+
var CATALOG_SERVICE_CONFIG_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/CatalogServiceConfig");
|
|
9
|
+
var CATALOG_FEATURE_UI_REGISTRY_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/CatalogFeatureUiRegistry");
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
PLAN_REPOSITORY_TOKEN,
|
|
13
|
+
BUNDLE_REPOSITORY_TOKEN,
|
|
14
|
+
MARKETING_PROJECTION_REPOSITORY_TOKEN,
|
|
15
|
+
CATALOG_ENTRY_REPOSITORY_TOKEN,
|
|
16
|
+
PROMOTION_REPOSITORY_TOKEN,
|
|
17
|
+
MARKETING_SETTINGS_REPOSITORY_TOKEN,
|
|
18
|
+
CATALOG_SERVICE_CONFIG_TOKEN,
|
|
19
|
+
CATALOG_FEATURE_UI_REGISTRY_TOKEN
|
|
20
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EntitlementService,
|
|
3
|
+
SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN
|
|
4
|
+
} from "./chunk-XEW6YXL5.js";
|
|
5
|
+
import {
|
|
6
|
+
SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN
|
|
7
|
+
} from "./chunk-VBRYPU7V.js";
|
|
8
|
+
import {
|
|
9
|
+
ENTITLEMENT_RESOLUTION_CONFIG_TOKEN,
|
|
10
|
+
ENTITLEMENT_SERVICE_TOKEN,
|
|
11
|
+
PLAN_VERSION_REPOSITORY_TOKEN,
|
|
12
|
+
SUBSCRIPTION_REPOSITORY_TOKEN,
|
|
13
|
+
TRANSACTION_RUNNER_TOKEN
|
|
14
|
+
} from "./chunk-OUDSQ3PU.js";
|
|
15
|
+
import {
|
|
16
|
+
BUNDLE_REPOSITORY_TOKEN
|
|
17
|
+
} from "./chunk-AOQJEYOL.js";
|
|
18
|
+
import {
|
|
19
|
+
asProvider
|
|
20
|
+
} from "./chunk-SABTXESR.js";
|
|
21
|
+
import {
|
|
22
|
+
__name
|
|
23
|
+
} from "./chunk-SHUYVCID.js";
|
|
24
|
+
|
|
25
|
+
// src/entitlement/entitlement.module.ts
|
|
26
|
+
import { Module } from "@nestjs/common";
|
|
27
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
28
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
29
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
30
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
31
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
32
|
+
}
|
|
33
|
+
__name(_ts_decorate, "_ts_decorate");
|
|
34
|
+
var EntitlementModule = class _EntitlementModule {
|
|
35
|
+
static {
|
|
36
|
+
__name(this, "EntitlementModule");
|
|
37
|
+
}
|
|
38
|
+
static forRoot(options) {
|
|
39
|
+
const providers = [
|
|
40
|
+
asProvider(SUBSCRIPTION_REPOSITORY_TOKEN, options.subscriptionRepository),
|
|
41
|
+
asProvider(PLAN_VERSION_REPOSITORY_TOKEN, options.planVersionRepository),
|
|
42
|
+
asProvider(TRANSACTION_RUNNER_TOKEN, options.transactionRunner),
|
|
43
|
+
EntitlementService,
|
|
44
|
+
// Cross-bundle-stable alias so consumers in other subpath bundles
|
|
45
|
+
// (billing/TenantBillingModule) can inject the same instance.
|
|
46
|
+
{
|
|
47
|
+
provide: ENTITLEMENT_SERVICE_TOKEN,
|
|
48
|
+
useExisting: EntitlementService
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
if (options.resolutionConfig) {
|
|
52
|
+
providers.push({
|
|
53
|
+
provide: ENTITLEMENT_RESOLUTION_CONFIG_TOKEN,
|
|
54
|
+
useValue: options.resolutionConfig
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
if (options.subscriptionContractRepository) {
|
|
58
|
+
providers.push(asProvider(SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN, options.subscriptionContractRepository));
|
|
59
|
+
}
|
|
60
|
+
if (options.subscriptionBundleRepository) {
|
|
61
|
+
providers.push(asProvider(SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN, options.subscriptionBundleRepository));
|
|
62
|
+
}
|
|
63
|
+
if (options.bundleRepository) {
|
|
64
|
+
providers.push(asProvider(BUNDLE_REPOSITORY_TOKEN, options.bundleRepository));
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
module: _EntitlementModule,
|
|
68
|
+
global: options.global ?? false,
|
|
69
|
+
imports: options.imports ?? [],
|
|
70
|
+
providers,
|
|
71
|
+
exports: [
|
|
72
|
+
EntitlementService,
|
|
73
|
+
ENTITLEMENT_SERVICE_TOKEN,
|
|
74
|
+
SUBSCRIPTION_REPOSITORY_TOKEN
|
|
75
|
+
]
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
EntitlementModule = _ts_decorate([
|
|
80
|
+
Module({})
|
|
81
|
+
], EntitlementModule);
|
|
82
|
+
|
|
83
|
+
export {
|
|
84
|
+
EntitlementModule
|
|
85
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DiscoveryScanner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WXYJHZCN.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFINES_QUOTA_KEY,
|
|
6
6
|
DISCOVERY_SNAPSHOT_TOKEN,
|
|
7
7
|
ENFORCE_QUOTA_KEY,
|
|
8
8
|
IMPLEMENTS_CAPABILITY_KEY,
|
|
9
9
|
REQUIRES_CAPABILITY_KEY
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QUZU2M33.js";
|
|
11
11
|
import {
|
|
12
12
|
__name
|
|
13
13
|
} from "./chunk-SHUYVCID.js";
|