@saasicat/nest 0.22.0 → 0.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_entries.cjs +394 -263
- package/dist/billing/index.d.cts +6 -4
- package/dist/billing/index.d.ts +6 -4
- package/dist/billing/index.js +15 -11
- package/dist/catalog/index.js +5 -5
- package/dist/checkout-offer/index.js +3 -3
- package/dist/{chunk-UO64MK3Q.js → chunk-4BSSMDLL.js} +36 -22
- package/dist/{chunk-UFS344JD.js → chunk-FPEQPHJE.js} +196 -81
- package/dist/{chunk-7ZPFQXHM.js → chunk-UOWK2HYG.js} +1 -1
- package/dist/{define-saasicat-C99hWAUK.d.ts → define-saasicat-BK6RRWWG.d.ts} +1 -1
- package/dist/{define-saasicat-ByPjtKPy.d.cts → define-saasicat-D30I-WET.d.cts} +1 -1
- package/dist/{enforce-quota.interceptor-BrsU1UYJ.d.cts → enforce-quota.interceptor-B9QueAFf.d.ts} +4 -1
- package/dist/{enforce-quota.interceptor-reO-i71U.d.ts → enforce-quota.interceptor-DY6CLjoP.d.cts} +4 -1
- package/dist/entitlement/index.js +5 -5
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +155 -151
- package/dist/platform/index.d.cts +28 -10
- package/dist/platform/index.d.ts +28 -10
- package/dist/platform/index.js +43 -41
- package/dist/{saas-platform.module-HCDNZTiE.d.cts → saas-platform.module-CgalxzcT.d.cts} +1 -1
- package/dist/{saas-platform.module-DolE41YY.d.ts → saas-platform.module-D1mUZPrz.d.ts} +1 -1
- package/dist/{subscription-bundles.module-BQmoozm5.d.ts → subscription-bundles.module-BDbODWvA.d.ts} +9 -1
- package/dist/{subscription-bundles.module-DCpV-Pb5.d.cts → subscription-bundles.module-Cfi-lFWF.d.cts} +9 -1
- package/dist/{tenant-billing.controller-7o4ObzGs.d.ts → tenant-billing.controller-BSlpFqVA.d.ts} +1 -1
- package/dist/{tenant-billing.controller-DubP6-Md.d.cts → tenant-billing.controller-DHSUrT_N.d.cts} +1 -1
- package/dist/testing/index.d.cts +4 -4
- package/dist/testing/index.d.ts +4 -4
- package/dist/testing/index.js +15 -15
- package/package.json +3 -3
- package/dist/{chunk-XTVAFJ3P.js → chunk-ES5AN53A.js} +6 -6
- package/dist/{chunk-EWPF57AG.js → chunk-FY4EJTV4.js} +0 -0
- package/dist/{chunk-NNNXXUPT.js → chunk-NXD7763W.js} +13 -13
- package/dist/{chunk-7X5MSAIL.js → chunk-QB7MICKQ.js} +9 -9
package/dist/billing/index.d.cts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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 '../subscription-bundles.module-Cfi-lFWF.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 '../subscription-bundles.module-Cfi-lFWF.cjs';
|
|
3
5
|
import * as _nestjs_common from '@nestjs/common';
|
|
4
6
|
import { CanActivate, ExecutionContext, ArgumentsHost, Type, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
5
7
|
export { Type as NestType } from '@nestjs/common';
|
|
6
8
|
import { Reflector, BaseExceptionFilter } from '@nestjs/core';
|
|
7
9
|
import { c as EntitlementService } from '../aggregation-mZ7WZROK.cjs';
|
|
8
10
|
import { P as ProviderSpec } from '../di-CcNeq9v-.cjs';
|
|
9
|
-
|
|
10
|
-
export { A as AUDIT_CONTEXT_RESOLVER_TOKEN, a as AuditContextResolver, b as AuthGuardList, C as CONTRACT_FREEZE_PORT_TOKEN, c as CONTRACT_FREEZE_PROJECT_KEY_TOKEN, d as CONTRACT_FREEZE_SOURCE_PORT_TOKEN, e as ContractFreezeBundleSnapshot, D as DuePendingPlanChange, P as PENDING_PLAN_QUERY_PORT_TOKEN, h as PendingPlanQueryPort, S as SELF_SERVICE_BLOCKED_BUNDLES_TOKEN, i as SELF_SERVICE_BLOCKED_PLANS_TOKEN, j as SUBSCRIPTION_USAGE_PORT_TOKEN, k as SUBSCRIPTION_WRITE_PORT_TOKEN, l as SelfServiceBlockedBundles, m as SelfServiceBlockedPlans, n as SubscriptionBundleControllerOptions, o as SubscriptionBundleModule, p as SubscriptionBundleModuleOptions, T as TENANT_AUTH_GUARDS_TOKEN, q as TENANT_ID_RESOLVER_TOKEN, r as TRIAL_PROJECTION_PORT_TOKEN, s as TenantBillingModule, t as TenantBillingModuleOptions, u as TenantIdResolver, v as TrialProjectionInput, w as TrialProjectionPort, U as USAGE_SNAPSHOT_PORT_TOKEN, x as USER_EMAIL_RESOLVER_TOKEN, y as USER_ID_RESOLVER_TOKEN, z as UserEmailResolver, B as UserIdResolver } from '../subscription-bundles.module-DCpV-Pb5.cjs';
|
|
11
|
-
export { A as AddBundleToSubscriptionInput, B as BundlePreviewSnapshot, C as CancelBundleFromSubscriptionInput, a as CancelSubscriptionDto, b as ChangePlanDto, c as CompleteOnboardingSubscriptionDto, d as ComposedTenantAuthGuard, L as LimitsCheckRow, P as PendingPlanMaterializationService, e as PlanChangeContext, f as PlanChangePreviewDto, g as PlanChangePreviewIssue, h as PlanChangePreviewService, i as PlanChangeType, j as PlanSnapshotDto, k as PreviewPlanChangeDto, l as ProrationDto, m as ProrationInput, R as RedundantFeatureHint, S as SubscriptionBundleAddPreviewDto, n as SubscriptionBundleCancelPreviewDto, o as SubscriptionBundleConfig, p as SubscriptionBundlePreviewContext, q as SubscriptionBundlePreviewIssue, r as SubscriptionBundlePreviewService, s as SubscriptionBundlesService, T as TenantAdminGuard, t as TenantBillingController, U as UsageResponse, u as addMonths, v as computeProration, w as resolveBundleCancelEffectiveAt, x as resolveBundlePriceNet } from '../tenant-billing.controller-DubP6-Md.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-DHSUrT_N.cjs';
|
|
12
12
|
import { S as SubscriptionContractService } from '../subscription-contract.service--cm47ZJJ.cjs';
|
|
13
13
|
import '../plan-resolution-CFCoUkrE.cjs';
|
|
14
14
|
import '../service-D48clObR.cjs';
|
|
@@ -193,6 +193,8 @@ declare class FeatureGuard implements CanActivate {
|
|
|
193
193
|
private readonly entitlements;
|
|
194
194
|
private readonly config;
|
|
195
195
|
private readonly upsellResolver;
|
|
196
|
+
/** Lets `FeatureGuardCoverageCheck` recognise this guard across CJS entries. */
|
|
197
|
+
static readonly [FEATURE_GUARD_MARKER] = true;
|
|
196
198
|
private readonly logger;
|
|
197
199
|
constructor(reflector: Reflector, entitlements: EntitlementService, config?: FeatureGuardConfig | null, upsellResolver?: UpsellOfferResolver | null);
|
|
198
200
|
canActivate(context: ExecutionContext): Promise<boolean>;
|
|
@@ -594,4 +596,4 @@ declare const SUBSCRIPTION_BUNDLE_CONFIG_TOKEN: unique symbol;
|
|
|
594
596
|
*/
|
|
595
597
|
declare function buildTenantSubscriptionBundlesController(extraGuards?: Array<Type<CanActivate>>): Type;
|
|
596
598
|
|
|
597
|
-
export { type AjvErrorLike, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, ContractFreezePort, ContractFreezeSourcePort, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_UI_REGISTRY_TOKEN, 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 };
|
|
599
|
+
export { type AjvErrorLike, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, ContractFreezePort, ContractFreezeSourcePort, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_GUARD_MARKER, FEATURE_UI_REGISTRY_TOKEN, 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,14 +1,14 @@
|
|
|
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 '../subscription-bundles.module-BDbODWvA.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 '../subscription-bundles.module-BDbODWvA.js';
|
|
3
5
|
import * as _nestjs_common from '@nestjs/common';
|
|
4
6
|
import { CanActivate, ExecutionContext, ArgumentsHost, Type, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
5
7
|
export { Type as NestType } from '@nestjs/common';
|
|
6
8
|
import { Reflector, BaseExceptionFilter } from '@nestjs/core';
|
|
7
9
|
import { c as EntitlementService } from '../aggregation-DP5zfKbU.js';
|
|
8
10
|
import { P as ProviderSpec } from '../di-CcNeq9v-.js';
|
|
9
|
-
|
|
10
|
-
export { A as AUDIT_CONTEXT_RESOLVER_TOKEN, a as AuditContextResolver, b as AuthGuardList, C as CONTRACT_FREEZE_PORT_TOKEN, c as CONTRACT_FREEZE_PROJECT_KEY_TOKEN, d as CONTRACT_FREEZE_SOURCE_PORT_TOKEN, e as ContractFreezeBundleSnapshot, D as DuePendingPlanChange, P as PENDING_PLAN_QUERY_PORT_TOKEN, h as PendingPlanQueryPort, S as SELF_SERVICE_BLOCKED_BUNDLES_TOKEN, i as SELF_SERVICE_BLOCKED_PLANS_TOKEN, j as SUBSCRIPTION_USAGE_PORT_TOKEN, k as SUBSCRIPTION_WRITE_PORT_TOKEN, l as SelfServiceBlockedBundles, m as SelfServiceBlockedPlans, n as SubscriptionBundleControllerOptions, o as SubscriptionBundleModule, p as SubscriptionBundleModuleOptions, T as TENANT_AUTH_GUARDS_TOKEN, q as TENANT_ID_RESOLVER_TOKEN, r as TRIAL_PROJECTION_PORT_TOKEN, s as TenantBillingModule, t as TenantBillingModuleOptions, u as TenantIdResolver, v as TrialProjectionInput, w as TrialProjectionPort, U as USAGE_SNAPSHOT_PORT_TOKEN, x as USER_EMAIL_RESOLVER_TOKEN, y as USER_ID_RESOLVER_TOKEN, z as UserEmailResolver, B as UserIdResolver } from '../subscription-bundles.module-BQmoozm5.js';
|
|
11
|
-
export { A as AddBundleToSubscriptionInput, B as BundlePreviewSnapshot, C as CancelBundleFromSubscriptionInput, a as CancelSubscriptionDto, b as ChangePlanDto, c as CompleteOnboardingSubscriptionDto, d as ComposedTenantAuthGuard, L as LimitsCheckRow, P as PendingPlanMaterializationService, e as PlanChangeContext, f as PlanChangePreviewDto, g as PlanChangePreviewIssue, h as PlanChangePreviewService, i as PlanChangeType, j as PlanSnapshotDto, k as PreviewPlanChangeDto, l as ProrationDto, m as ProrationInput, R as RedundantFeatureHint, S as SubscriptionBundleAddPreviewDto, n as SubscriptionBundleCancelPreviewDto, o as SubscriptionBundleConfig, p as SubscriptionBundlePreviewContext, q as SubscriptionBundlePreviewIssue, r as SubscriptionBundlePreviewService, s as SubscriptionBundlesService, T as TenantAdminGuard, t as TenantBillingController, U as UsageResponse, u as addMonths, v as computeProration, w as resolveBundleCancelEffectiveAt, x as resolveBundlePriceNet } from '../tenant-billing.controller-7o4ObzGs.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-BSlpFqVA.js';
|
|
12
12
|
import { S as SubscriptionContractService } from '../subscription-contract.service--cm47ZJJ.js';
|
|
13
13
|
import '../plan-resolution-CFCoUkrE.js';
|
|
14
14
|
import '../service-D48clObR.js';
|
|
@@ -193,6 +193,8 @@ declare class FeatureGuard implements CanActivate {
|
|
|
193
193
|
private readonly entitlements;
|
|
194
194
|
private readonly config;
|
|
195
195
|
private readonly upsellResolver;
|
|
196
|
+
/** Lets `FeatureGuardCoverageCheck` recognise this guard across CJS entries. */
|
|
197
|
+
static readonly [FEATURE_GUARD_MARKER] = true;
|
|
196
198
|
private readonly logger;
|
|
197
199
|
constructor(reflector: Reflector, entitlements: EntitlementService, config?: FeatureGuardConfig | null, upsellResolver?: UpsellOfferResolver | null);
|
|
198
200
|
canActivate(context: ExecutionContext): Promise<boolean>;
|
|
@@ -594,4 +596,4 @@ declare const SUBSCRIPTION_BUNDLE_CONFIG_TOKEN: unique symbol;
|
|
|
594
596
|
*/
|
|
595
597
|
declare function buildTenantSubscriptionBundlesController(extraGuards?: Array<Type<CanActivate>>): Type;
|
|
596
598
|
|
|
597
|
-
export { type AjvErrorLike, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, ContractFreezePort, ContractFreezeSourcePort, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_UI_REGISTRY_TOKEN, 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 };
|
|
599
|
+
export { type AjvErrorLike, CatalogBundleUpsellResolver, ConfiguratorCatalogBuilder, ContractFreezePort, ContractFreezeSourcePort, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_GUARD_MARKER, FEATURE_UI_REGISTRY_TOKEN, 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
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
ComposedTenantAuthGuard,
|
|
10
10
|
ConfiguratorCatalogBuilder,
|
|
11
11
|
FEATURE_GUARD_CONFIG_TOKEN,
|
|
12
|
+
FEATURE_GUARD_MARKER,
|
|
12
13
|
FEATURE_UI_REGISTRY_TOKEN,
|
|
13
14
|
FeatureGuard,
|
|
14
15
|
LimitExceededFilter,
|
|
@@ -52,15 +53,14 @@ import {
|
|
|
52
53
|
computeProration,
|
|
53
54
|
decideRenewal,
|
|
54
55
|
initialPeriodWindow,
|
|
56
|
+
isPlatformFeatureGuard,
|
|
55
57
|
loadPlanCatalogFromFile,
|
|
56
58
|
loadPlanCatalogFromString,
|
|
57
59
|
periodEndAfter,
|
|
58
60
|
periodEndWithMinLead,
|
|
59
61
|
resolveBundleCancelEffectiveAt,
|
|
60
62
|
resolveBundlePriceNet
|
|
61
|
-
} from "../chunk-
|
|
62
|
-
import "../chunk-VQQWF7MW.js";
|
|
63
|
-
import "../chunk-B7NRY2LV.js";
|
|
63
|
+
} from "../chunk-4BSSMDLL.js";
|
|
64
64
|
import {
|
|
65
65
|
AUDIT_CONTEXT_RESOLVER_TOKEN,
|
|
66
66
|
PENDING_PLAN_QUERY_PORT_TOKEN,
|
|
@@ -75,13 +75,16 @@ import {
|
|
|
75
75
|
classifyBundleVersionDiff,
|
|
76
76
|
classifyPlanDiff
|
|
77
77
|
} from "../chunk-WPUVJRIN.js";
|
|
78
|
-
import "../chunk-E56W4U2P.js";
|
|
79
|
-
import "../chunk-BSK6YBLI.js";
|
|
80
|
-
import "../chunk-YSC46BGM.js";
|
|
81
78
|
import {
|
|
82
79
|
SUBSCRIPTION_BUNDLE_CONFIG_TOKEN,
|
|
83
80
|
SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN
|
|
84
|
-
} from "../chunk-
|
|
81
|
+
} from "../chunk-NXD7763W.js";
|
|
82
|
+
import "../chunk-WKVBNTYC.js";
|
|
83
|
+
import "../chunk-L4KTQ6CL.js";
|
|
84
|
+
import "../chunk-L4SUWH5B.js";
|
|
85
|
+
import "../chunk-VQQWF7MW.js";
|
|
86
|
+
import "../chunk-E56W4U2P.js";
|
|
87
|
+
import "../chunk-YSC46BGM.js";
|
|
85
88
|
import {
|
|
86
89
|
PLAN_CATALOG_READ_SINK_TOKEN,
|
|
87
90
|
PLAN_CATALOG_TOKEN,
|
|
@@ -97,12 +100,11 @@ import {
|
|
|
97
100
|
isFeatureInPlan,
|
|
98
101
|
isFeaturePlannedOnly
|
|
99
102
|
} from "../chunk-DQKCK7DX.js";
|
|
100
|
-
import "../chunk-NYLON2VC.js";
|
|
101
103
|
import "../chunk-EBJJNTW6.js";
|
|
102
|
-
import "../chunk-
|
|
103
|
-
import "../chunk-
|
|
104
|
+
import "../chunk-B7NRY2LV.js";
|
|
105
|
+
import "../chunk-BSK6YBLI.js";
|
|
106
|
+
import "../chunk-NYLON2VC.js";
|
|
104
107
|
import "../chunk-SABTXESR.js";
|
|
105
|
-
import "../chunk-L4SUWH5B.js";
|
|
106
108
|
import "../chunk-SHUYVCID.js";
|
|
107
109
|
export {
|
|
108
110
|
AUDIT_CONTEXT_RESOLVER_TOKEN,
|
|
@@ -116,6 +118,7 @@ export {
|
|
|
116
118
|
ComposedTenantAuthGuard,
|
|
117
119
|
ConfiguratorCatalogBuilder,
|
|
118
120
|
FEATURE_GUARD_CONFIG_TOKEN,
|
|
121
|
+
FEATURE_GUARD_MARKER,
|
|
119
122
|
FEATURE_UI_REGISTRY_TOKEN,
|
|
120
123
|
FeatureGuard,
|
|
121
124
|
LimitExceededFilter,
|
|
@@ -185,6 +188,7 @@ export {
|
|
|
185
188
|
initialPeriodWindow,
|
|
186
189
|
isFeatureInPlan,
|
|
187
190
|
isFeaturePlannedOnly,
|
|
191
|
+
isPlatformFeatureGuard,
|
|
188
192
|
loadPlanCatalogFromFile,
|
|
189
193
|
loadPlanCatalogFromString,
|
|
190
194
|
periodEndAfter,
|
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-UOWK2HYG.js";
|
|
10
10
|
import "../chunk-74SCJ4HF.js";
|
|
11
11
|
import {
|
|
12
12
|
ADVISORY_STRICT_MODE_CODES,
|
|
@@ -56,10 +56,8 @@ import {
|
|
|
56
56
|
quotaApprovalSignature,
|
|
57
57
|
validateBundleDraft,
|
|
58
58
|
validatePlanDraft
|
|
59
|
-
} from "../chunk-
|
|
59
|
+
} from "../chunk-QB7MICKQ.js";
|
|
60
60
|
import "../chunk-WPUVJRIN.js";
|
|
61
|
-
import "../chunk-E56W4U2P.js";
|
|
62
|
-
import "../chunk-YSC46BGM.js";
|
|
63
61
|
import "../chunk-5ZXBXYXU.js";
|
|
64
62
|
import "../chunk-WKVBNTYC.js";
|
|
65
63
|
import {
|
|
@@ -71,8 +69,10 @@ import {
|
|
|
71
69
|
PLAN_REPOSITORY_TOKEN,
|
|
72
70
|
PROMOTION_REPOSITORY_TOKEN
|
|
73
71
|
} from "../chunk-L4KTQ6CL.js";
|
|
74
|
-
import "../chunk-SABTXESR.js";
|
|
75
72
|
import "../chunk-L4SUWH5B.js";
|
|
73
|
+
import "../chunk-E56W4U2P.js";
|
|
74
|
+
import "../chunk-YSC46BGM.js";
|
|
75
|
+
import "../chunk-SABTXESR.js";
|
|
76
76
|
import "../chunk-SHUYVCID.js";
|
|
77
77
|
export {
|
|
78
78
|
ADVISORY_STRICT_MODE_CODES,
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
CreateCheckoutOfferDto,
|
|
7
7
|
UpdateCheckoutOfferDto,
|
|
8
8
|
buildCheckoutOfferController
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-BSK6YBLI.js";
|
|
11
|
-
import "../chunk-YSC46BGM.js";
|
|
9
|
+
} from "../chunk-ES5AN53A.js";
|
|
12
10
|
import "../chunk-L4KTQ6CL.js";
|
|
11
|
+
import "../chunk-YSC46BGM.js";
|
|
12
|
+
import "../chunk-BSK6YBLI.js";
|
|
13
13
|
import "../chunk-SABTXESR.js";
|
|
14
14
|
import "../chunk-SHUYVCID.js";
|
|
15
15
|
export {
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PromoCodesService
|
|
3
|
-
} from "./chunk-VQQWF7MW.js";
|
|
4
|
-
import {
|
|
5
|
-
SubscriptionContractService
|
|
6
|
-
} from "./chunk-B7NRY2LV.js";
|
|
7
1
|
import {
|
|
8
2
|
AUDIT_CONTEXT_RESOLVER_TOKEN,
|
|
9
3
|
PENDING_PLAN_QUERY_PORT_TOKEN,
|
|
@@ -16,39 +10,45 @@ import {
|
|
|
16
10
|
USER_EMAIL_RESOLVER_TOKEN,
|
|
17
11
|
USER_ID_RESOLVER_TOKEN
|
|
18
12
|
} from "./chunk-WPUVJRIN.js";
|
|
19
|
-
import {
|
|
20
|
-
AdminAuditService
|
|
21
|
-
} from "./chunk-E56W4U2P.js";
|
|
22
|
-
import {
|
|
23
|
-
SaaSiCatPublicRoute
|
|
24
|
-
} from "./chunk-YSC46BGM.js";
|
|
25
13
|
import {
|
|
26
14
|
EntitlementService,
|
|
27
15
|
SUBSCRIPTION_BUNDLE_CONFIG_TOKEN,
|
|
28
16
|
SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN,
|
|
29
17
|
isLimitExceededError,
|
|
30
18
|
toEffectiveLimitsSnapshot
|
|
31
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-NXD7763W.js";
|
|
20
|
+
import {
|
|
21
|
+
ENTITLEMENT_SERVICE_TOKEN
|
|
22
|
+
} from "./chunk-WKVBNTYC.js";
|
|
23
|
+
import {
|
|
24
|
+
BUNDLE_REPOSITORY_TOKEN,
|
|
25
|
+
CATALOG_ENTRY_REPOSITORY_TOKEN,
|
|
26
|
+
PLAN_REPOSITORY_TOKEN
|
|
27
|
+
} from "./chunk-L4KTQ6CL.js";
|
|
28
|
+
import {
|
|
29
|
+
PromoCodesService
|
|
30
|
+
} from "./chunk-VQQWF7MW.js";
|
|
31
|
+
import {
|
|
32
|
+
AdminAuditService
|
|
33
|
+
} from "./chunk-E56W4U2P.js";
|
|
34
|
+
import {
|
|
35
|
+
SaaSiCatPublicRoute
|
|
36
|
+
} from "./chunk-YSC46BGM.js";
|
|
32
37
|
import {
|
|
33
38
|
PLAN_CATALOG_TOKEN,
|
|
34
39
|
findPlan,
|
|
35
40
|
getMarketedPlans,
|
|
36
41
|
getPlanPriceNet
|
|
37
42
|
} from "./chunk-DQKCK7DX.js";
|
|
38
|
-
import {
|
|
39
|
-
SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN
|
|
40
|
-
} from "./chunk-NYLON2VC.js";
|
|
41
43
|
import {
|
|
42
44
|
codedError
|
|
43
45
|
} from "./chunk-EBJJNTW6.js";
|
|
44
46
|
import {
|
|
45
|
-
|
|
46
|
-
} from "./chunk-
|
|
47
|
+
SubscriptionContractService
|
|
48
|
+
} from "./chunk-B7NRY2LV.js";
|
|
47
49
|
import {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
PLAN_REPOSITORY_TOKEN
|
|
51
|
-
} from "./chunk-L4KTQ6CL.js";
|
|
50
|
+
SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN
|
|
51
|
+
} from "./chunk-NYLON2VC.js";
|
|
52
52
|
import {
|
|
53
53
|
asProvider
|
|
54
54
|
} from "./chunk-SABTXESR.js";
|
|
@@ -174,6 +174,16 @@ function computeNextPeriod(sub, now) {
|
|
|
174
174
|
}
|
|
175
175
|
__name(computeNextPeriod, "computeNextPeriod");
|
|
176
176
|
|
|
177
|
+
// src/billing/feature-guard-marker.ts
|
|
178
|
+
var FEATURE_GUARD_MARKER = /* @__PURE__ */ Symbol.for("saasicat/nest/feature-guard");
|
|
179
|
+
function isPlatformFeatureGuard(target) {
|
|
180
|
+
if (target === null || typeof target !== "function" && typeof target !== "object") {
|
|
181
|
+
return false;
|
|
182
|
+
}
|
|
183
|
+
return target[FEATURE_GUARD_MARKER] === true;
|
|
184
|
+
}
|
|
185
|
+
__name(isPlatformFeatureGuard, "isPlatformFeatureGuard");
|
|
186
|
+
|
|
177
187
|
// src/billing/require-feature.decorator.ts
|
|
178
188
|
import { SetMetadata } from "@nestjs/common";
|
|
179
189
|
var REQUIRE_FEATURE_KEY = "require-feature";
|
|
@@ -217,6 +227,8 @@ var FeatureGuard = class _FeatureGuard {
|
|
|
217
227
|
entitlements;
|
|
218
228
|
config;
|
|
219
229
|
upsellResolver;
|
|
230
|
+
/** Lets `FeatureGuardCoverageCheck` recognise this guard across CJS entries. */
|
|
231
|
+
static [FEATURE_GUARD_MARKER] = true;
|
|
220
232
|
logger = new Logger(_FeatureGuard.name);
|
|
221
233
|
constructor(reflector, entitlements, config = null, upsellResolver = null) {
|
|
222
234
|
this.reflector = reflector;
|
|
@@ -3461,6 +3473,8 @@ export {
|
|
|
3461
3473
|
decideRenewal,
|
|
3462
3474
|
clearPendingPlanVersionFields,
|
|
3463
3475
|
computeNextPeriod,
|
|
3476
|
+
FEATURE_GUARD_MARKER,
|
|
3477
|
+
isPlatformFeatureGuard,
|
|
3464
3478
|
REQUIRE_FEATURE_KEY,
|
|
3465
3479
|
RequireFeature,
|
|
3466
3480
|
FEATURE_GUARD_CONFIG_TOKEN,
|