@saasicat/nest 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/index.d.cts +2 -2
- package/dist/admin/index.d.ts +2 -2
- package/dist/{admin-manifest.config-DyrQNT7M.d.cts → admin-manifest.config-DxTfZ8-L.d.cts} +1 -1
- package/dist/{admin-manifest.config-DyrQNT7M.d.ts → admin-manifest.config-DxTfZ8-L.d.ts} +1 -1
- package/dist/{aggregation-CJ3qQf92.d.cts → aggregation-Bt1i_whS.d.cts} +1 -8
- package/dist/{aggregation-Dvz9e8X2.d.ts → aggregation-DGCyoN5d.d.ts} +1 -8
- package/dist/billing/index.cjs +13 -2
- package/dist/billing/index.d.cts +5 -5
- package/dist/billing/index.d.ts +5 -5
- package/dist/billing/index.js +12 -12
- package/dist/catalog/index.d.cts +1 -1
- package/dist/catalog/index.d.ts +1 -1
- package/dist/catalog/index.js +3 -3
- package/dist/{chunk-YXGHPILG.js → chunk-K42EQPBB.js} +14 -7
- package/dist/{chunk-QJVPRD3R.js → chunk-SG34XT7J.js} +61 -27
- package/dist/{chunk-RIGLQ4BV.js → chunk-VHEHZMHB.js} +21 -16
- package/dist/discovery/index.d.cts +2 -2
- package/dist/discovery/index.d.ts +2 -2
- package/dist/discovery/index.js +4 -4
- package/dist/{discovery.scanner-CUYLKlYT.d.cts → discovery.scanner-DLgEvuoy.d.cts} +1 -1
- package/dist/{discovery.scanner-CUYLKlYT.d.ts → discovery.scanner-DLgEvuoy.d.ts} +1 -1
- package/dist/{saas-platform.module-DT9TnCzk.d.ts → enforce-quota.interceptor-3HmbeHTM.d.ts} +93 -15
- package/dist/{saas-platform.module-CgZ2omgg.d.cts → enforce-quota.interceptor-HmdZFg41.d.cts} +93 -15
- package/dist/entitlement/index.cjs +8 -0
- package/dist/entitlement/index.d.cts +18 -2
- package/dist/entitlement/index.d.ts +18 -2
- package/dist/entitlement/index.js +5 -3
- package/dist/index.cjs +29 -16
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +81 -79
- package/dist/platform/index.cjs +59 -22
- package/dist/platform/index.d.cts +9 -62
- package/dist/platform/index.d.ts +9 -62
- package/dist/platform/index.js +4 -4
- package/dist/registration/index.d.cts +3 -6
- package/dist/registration/index.d.ts +3 -6
- package/dist/testing/index.cjs +69 -22
- package/dist/testing/index.d.cts +6 -8
- package/dist/testing/index.d.ts +6 -8
- package/dist/testing/index.js +15 -5
- package/package.json +5 -3
- package/dist/{chunk-V7HUZ6UQ.js → chunk-FN65XZKH.js} +6 -6
package/dist/index.d.cts
CHANGED
|
@@ -4,19 +4,19 @@ export { PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN, PROMO_CODE_REPOSITORY_TOKEN, PR
|
|
|
4
4
|
export { P as PreviewInput, a as PreviewInvalid, b as PreviewReason, c as PreviewResult, d as PreviewValid, e as PromoCodeStats, f as PromoCodesService, g as PromoServiceConfig, R as RedeemInput } from './service-DX8KbGXl.cjs';
|
|
5
5
|
export { AUDIT_CONTEXT_RESOLVER_TOKEN, AddBundleToSubscriptionInput, AjvErrorLike, AuditContextResolver, AuthGuardList, BundlePreviewSnapshot, CONTRACT_FREEZE_PORT_TOKEN, CONTRACT_FREEZE_PROJECT_KEY_TOKEN, CONTRACT_FREEZE_SOURCE_PORT_TOKEN, CancelBundleFromSubscriptionInput, CancelSubscriptionDto, CatalogBundleUpsellResolver, ChangePlanDto, CompleteOnboardingSubscriptionDto, ComposedTenantAuthGuard, ConfiguratorCatalogBuilder, ContractFreezeBundleSnapshot, ContractFreezePort, ContractFreezeSourcePort, DuePendingPlanChange, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_UI_REGISTRY_TOKEN, FeatureGuard, FeatureGuardConfig, LimitExceededFilter, LimitsCheckRow, LoadPlanCatalogOptions, MarketingFields, NextPeriodWindow, PENDING_PLAN_QUERY_PORT_TOKEN, PLAN_CATALOG_IMPORT_SINK_TOKEN, PLAN_CATALOG_READ_SINK_TOKEN, PLAN_CATALOG_TOKEN, PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN, PUBLIC_CATALOG_BUSINESS_TYPE_REPOSITORY_TOKEN, PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN, PUBLIC_CATALOG_PROJECT_KEY_TOKEN, PendingPlanMaterializationService, PendingPlanQueryPort, PeriodRollInput, PlanCatalogBuildSettings, PlanCatalogImportDto, PlanCatalogImporterControllerConfig, PlanCatalogImporterModule, PlanCatalogImporterModuleOptions, PlanCatalogImporterService, PlanCatalogModule, PlanCatalogModuleOptions, PlanCatalogValidationError, PlanChangeContext, PlanChangePreviewDto, PlanChangePreviewIssue, PlanChangePreviewService, PlanChangeType, PlanResponseEntry, PlanSnapshotDto, PreviewPlanChangeDto, ProrationDto, ProrationInput, PublicBundleEntry, PublicBusinessTypeEntry, PublicCatalogController, PublicCatalogModule, PublicCatalogModuleOptions, PublishValidationError, PublishablePlanVersion, REQUIRE_FEATURE_KEY, RedundantFeatureHint, RenewalDecision, RenewalSubInput, RequireFeature, SELF_SERVICE_BLOCKED_BUNDLES_TOKEN, SELF_SERVICE_BLOCKED_PLANS_TOKEN, SUBSCRIPTION_BUNDLE_CONFIG_TOKEN, SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN, SUBSCRIPTION_USAGE_PORT_TOKEN, SUBSCRIPTION_WRITE_PORT_TOKEN, SelfServiceBlockedBundles, SelfServiceBlockedPlans, SubscriptionBundleAddPreviewDto, SubscriptionBundleCancelPreviewDto, SubscriptionBundleConfig, SubscriptionBundleControllerOptions, SubscriptionBundleModule, SubscriptionBundleModuleOptions, SubscriptionBundlePreviewContext, SubscriptionBundlePreviewIssue, SubscriptionBundlePreviewService, SubscriptionBundlesService, SubscriptionContractFreezeService, TENANT_AUTH_GUARDS_TOKEN, TENANT_ID_RESOLVER_TOKEN, TRIAL_PROJECTION_PORT_TOKEN, TenantAdminGuard, TenantBillingController, TenantBillingModule, TenantBillingModuleOptions, TenantIdResolver, TrialProjectionInput, TrialProjectionPort, UPSELL_OFFER_CURRENCY_TOKEN, UPSELL_OFFER_RESOLVER_TOKEN, USAGE_SNAPSHOT_PORT_TOKEN, USER_EMAIL_RESOLVER_TOKEN, USER_ID_RESOLVER_TOKEN, UsageResponse, UserEmailResolver, UserIdResolver, addMonths, assertBaseVersionFresh, assertChangeNote, assertDraftPublishable, assertOptimisticLockHeld, buildPlanCatalogFromSnapshot, buildPlanCatalogImporterController, buildTenantSubscriptionBundlesController, clearPendingPlanVersionFields, computeCarriedTrialEndsAt, computeNextPeriod, computeProration, decideRenewal, findPlan, getActiveFeatureKeys, getMarketedPlans, getPlanOrThrow, getPlanPriceGross, getPlanPriceNet, getPlanQuota, initialPeriodWindow, isFeatureInPlan, isFeaturePlannedOnly, loadPlanCatalogFromFile, loadPlanCatalogFromString, periodEndAfter, periodEndWithMinLead, resolveBundleCancelEffectiveAt, resolveBundlePriceNet } from './billing/index.cjs';
|
|
6
6
|
import { SuperAdminProvisioningPort, SetupStatusResponse, SetupRequest, SetupResult, SetupConfirmMfaRequest, SetupConfirmMfaResponse } from '@saasicat/types';
|
|
7
|
-
export { BundleVersionFields, ChangeDirection, DiffResult, DiscoveredCapability, DiscoveredFeature, DiscoveredQuota, DiscoverySnapshot, PlanVersionFields, VersionChange, VersionChangeDirection, classifyBundleVersionDiff, classifyPlanDiff } from '@saasicat/types';
|
|
8
|
-
export { B as BundleVersionSnapshot, a as BusinessTypeVersionSnapshot, C as CustomLimitsShape, E as EffectiveLimits, b as EffectiveLimitsSnapshot, c as EnforceLimitInput, d as EntitlementService,
|
|
9
|
-
export { ENTITLEMENT_RESOLUTION_CONFIG_TOKEN, EntitlementModule, EntitlementModuleOptions, PLAN_VERSION_REPOSITORY_TOKEN, ReplacedByIndex, SUBSCRIPTION_REPOSITORY_TOKEN, TRANSACTION_RUNNER_TOKEN, buildReplacedByIndex, expandReplacedFeatures } from './entitlement/index.cjs';
|
|
7
|
+
export { BundleVersionFields, ChangeDirection, DiffResult, DiscoveredCapability, DiscoveredFeature, DiscoveredQuota, DiscoverySnapshot, PasswordHasher, PlanVersionFields, VersionChange, VersionChangeDirection, classifyBundleVersionDiff, classifyPlanDiff } from '@saasicat/types';
|
|
8
|
+
export { B as BundleVersionSnapshot, a as BusinessTypeVersionSnapshot, C as CustomLimitsShape, E as EffectiveLimits, b as EffectiveLimitsSnapshot, c as EnforceLimitInput, d as EntitlementService, P as PlanVersionSnapshot, S as SubscriptionBundleSnapshot, e as SubscriptionLimitsInput, f as aggregateBusinessTypeQuotas, g as aggregateContractLineItemEntitlements, h as aggregateLimits, i as aggregateSubscriptionBundleQuotas, j as applyCustomLimits, k as collectBusinessTypeFeatures, l as collectSubscriptionBundleFeatures, m as filterActiveSubscriptionBundles, n as filterPlannedOnlyFeatures, o as hasAnyFeature, p as hasFeature, t as toEffectiveLimitsSnapshot } from './aggregation-Bt1i_whS.cjs';
|
|
9
|
+
export { ENTITLEMENT_RESOLUTION_CONFIG_TOKEN, EntitlementModule, EntitlementModuleOptions, LimitExceededError, PLAN_VERSION_REPOSITORY_TOKEN, ReplacedByIndex, SUBSCRIPTION_REPOSITORY_TOKEN, TRANSACTION_RUNNER_TOKEN, buildReplacedByIndex, expandReplacedFeatures, isLimitExceededError } from './entitlement/index.cjs';
|
|
10
10
|
export { E as EntitlementResolutionConfig, a as EntitlementResolutionInput, r as resolveEntitlementPlan } from './plan-resolution-CFCoUkrE.cjs';
|
|
11
11
|
import { MfaService } from './admin/index.cjs';
|
|
12
12
|
export { ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN, AUDIT_PORT_TOKEN, AUDIT_STATS_PORT_TOKEN, AdminBypassRlsInterceptor, AdminManifestModule, AdminManifestModuleOptions, AdminManifestService, AdminModule, AdminModuleOptions, AdminPublicBootController, AdminStatsController, AdminStatsModule, AdminStatsModuleOptions, AdminStatsService, AdminStatsSnapshot, MFA_PORT_TOKEN, MfaGuard, PLATFORM_CORE_CONTRIBUTION_TOKEN, PLATFORM_CORE_MANIFEST_CONTRIBUTION, PROMO_CODE_STATS_PORT_TOKEN, REQUIRE_MFA_KEY, RLS_BYPASS_PORT_TOKEN, RequireMfa, SUBSCRIPTION_STATS_PORT_TOKEN, SuperAdminGuard, TotpSetupResult, VerifyTotpInput } from './admin/index.cjs';
|
|
13
13
|
export { A as AdminAuditService } from './admin-audit.service-9IqXMlZm.cjs';
|
|
14
|
-
export {
|
|
14
|
+
export { A as ADMIN_MANIFEST_CONFIG, a as AdminManifestConfig } from './admin-manifest.config-DxTfZ8-L.cjs';
|
|
15
15
|
import { DynamicModule } from '@nestjs/common';
|
|
16
16
|
export { Type as NestType } from '@nestjs/common';
|
|
17
|
-
export { ACTIVATION_ORCHESTRATOR_TOKEN, BaseIpRateLimitGuard, ContinueRegistrationDto, PASSWORD_HASHER_TOKEN, PAYMENT_EVENT_LOG_TOKEN, PAYMENT_PROVIDER_TOKEN, PENDING_REGISTRATION_REPOSITORY_TOKEN, PLAN_CATALOG_LOOKUP_TOKEN,
|
|
17
|
+
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_BUSINESS_TYPE_LOOKUP_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';
|
|
18
18
|
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';
|
|
19
|
-
export {
|
|
19
|
+
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';
|
|
20
20
|
export { ADVISORY_STRICT_MODE_CODES, BUNDLE_REPOSITORY_TOKEN, BUSINESS_TYPE_REPOSITORY_TOKEN, BundlesService, BusinessTypeBundleInputDto, BusinessTypesService, CATALOG_ENTRY_REPOSITORY_TOKEN, CATALOG_SERVICE_CONFIG_TOKEN, CatalogControllerConfig, CatalogEntriesService, CatalogModule, CatalogModuleOptions, CatalogServiceConfig, CreateBundleDto, CreateBundleVersionDraftDto, CreateBusinessTypeDto, CreateBusinessTypeVersionDraftDto, CreateMarketingProjectionDto, CreatePlanDto, CreatePlanVersionDraftDto, CreatePromotionDto, ListCatalogEntriesQueryDto, ListMarketingProjectionsQueryDto, ListMarketingSettingsQueryDto, ListPromotionsQueryDto, MARKETING_PROJECTION_REPOSITORY_TOKEN, MARKETING_SETTINGS_REPOSITORY_TOKEN, MarketingProjectionsService, MarketingSettingsService, PLAN_REPOSITORY_TOKEN, PROMOTION_REPOSITORY_TOKEN, PlanVersionsService, PlansService, PreflightFinding, PreflightInput, PreflightReport, PromotionsService, PublicMarketingCatalogService, PublishBundleVersionDto, PublishBusinessTypeVersionDto, PublishPlanVersionDto, ReviewCatalogEntryDto, SeedBundleDraft, SeedGateFinding, SeedGateInput, SeedGateMode, SeedGateReport, SeedGateRunOptions, SeedPlanDraft, SyncDiscoveryDto, UpdateBundleDto, UpdateBundleVersionDraftDto, UpdateBusinessTypeDto, UpdateBusinessTypeVersionDraftDto, UpdateCatalogEntryI18nDto, UpdateMarketingProjectionDto, UpdateMarketingSettingsDto, UpdatePlanDto, UpdatePlanVersionDraftDto, UpdatePromotionDto, blockingStrictModeWarnings, buildBundleVersionsController, buildBundlesController, buildBusinessTypeVersionsController, buildBusinessTypesController, buildCatalogEntriesController, buildMarketingProjectionsController, buildMarketingSettingsController, buildPlanVersionsController, buildPlansController, buildPromotionsController, buildPublicMarketingCatalogController, featureApprovalSignature, formatPreflightReport, formatSeedGateReport, loadApprovedCatalogKeys, preflightExitCode, quotaApprovalSignature, runPreflight, runSeedGateFromFile, seedGateExitCode, validateBundleDraft, validateBusinessTypeDraft, validatePlanDraft, validateSeedAgainstSnapshot } from './catalog/index.cjs';
|
|
21
21
|
export { CHECKOUT_OFFER_REPOSITORY_TOKEN, CheckoutOfferControllerConfig, CheckoutOfferModule, CheckoutOfferModuleOptions, CheckoutOfferService, CreateCheckoutOfferDto, UpdateCheckoutOfferDto, buildCheckoutOfferController } from './checkout-offer/index.cjs';
|
|
22
22
|
export { C as CreateContractFromOfferOptions, S as SubscriptionContractService, c as contractLineItemToInvoiceLineItem, s as sortContractLineItemsForInvoice, a as subscriptionContractToInvoiceSnapshot } from './subscription-contract.service--cm47ZJJ.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -4,19 +4,19 @@ export { PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN, PROMO_CODE_REPOSITORY_TOKEN, PR
|
|
|
4
4
|
export { P as PreviewInput, a as PreviewInvalid, b as PreviewReason, c as PreviewResult, d as PreviewValid, e as PromoCodeStats, f as PromoCodesService, g as PromoServiceConfig, R as RedeemInput } from './service-DX8KbGXl.js';
|
|
5
5
|
export { AUDIT_CONTEXT_RESOLVER_TOKEN, AddBundleToSubscriptionInput, AjvErrorLike, AuditContextResolver, AuthGuardList, BundlePreviewSnapshot, CONTRACT_FREEZE_PORT_TOKEN, CONTRACT_FREEZE_PROJECT_KEY_TOKEN, CONTRACT_FREEZE_SOURCE_PORT_TOKEN, CancelBundleFromSubscriptionInput, CancelSubscriptionDto, CatalogBundleUpsellResolver, ChangePlanDto, CompleteOnboardingSubscriptionDto, ComposedTenantAuthGuard, ConfiguratorCatalogBuilder, ContractFreezeBundleSnapshot, ContractFreezePort, ContractFreezeSourcePort, DuePendingPlanChange, FEATURE_GUARD_CONFIG_TOKEN, FEATURE_UI_REGISTRY_TOKEN, FeatureGuard, FeatureGuardConfig, LimitExceededFilter, LimitsCheckRow, LoadPlanCatalogOptions, MarketingFields, NextPeriodWindow, PENDING_PLAN_QUERY_PORT_TOKEN, PLAN_CATALOG_IMPORT_SINK_TOKEN, PLAN_CATALOG_READ_SINK_TOKEN, PLAN_CATALOG_TOKEN, PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN, PUBLIC_CATALOG_BUSINESS_TYPE_REPOSITORY_TOKEN, PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN, PUBLIC_CATALOG_PROJECT_KEY_TOKEN, PendingPlanMaterializationService, PendingPlanQueryPort, PeriodRollInput, PlanCatalogBuildSettings, PlanCatalogImportDto, PlanCatalogImporterControllerConfig, PlanCatalogImporterModule, PlanCatalogImporterModuleOptions, PlanCatalogImporterService, PlanCatalogModule, PlanCatalogModuleOptions, PlanCatalogValidationError, PlanChangeContext, PlanChangePreviewDto, PlanChangePreviewIssue, PlanChangePreviewService, PlanChangeType, PlanResponseEntry, PlanSnapshotDto, PreviewPlanChangeDto, ProrationDto, ProrationInput, PublicBundleEntry, PublicBusinessTypeEntry, PublicCatalogController, PublicCatalogModule, PublicCatalogModuleOptions, PublishValidationError, PublishablePlanVersion, REQUIRE_FEATURE_KEY, RedundantFeatureHint, RenewalDecision, RenewalSubInput, RequireFeature, SELF_SERVICE_BLOCKED_BUNDLES_TOKEN, SELF_SERVICE_BLOCKED_PLANS_TOKEN, SUBSCRIPTION_BUNDLE_CONFIG_TOKEN, SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN, SUBSCRIPTION_USAGE_PORT_TOKEN, SUBSCRIPTION_WRITE_PORT_TOKEN, SelfServiceBlockedBundles, SelfServiceBlockedPlans, SubscriptionBundleAddPreviewDto, SubscriptionBundleCancelPreviewDto, SubscriptionBundleConfig, SubscriptionBundleControllerOptions, SubscriptionBundleModule, SubscriptionBundleModuleOptions, SubscriptionBundlePreviewContext, SubscriptionBundlePreviewIssue, SubscriptionBundlePreviewService, SubscriptionBundlesService, SubscriptionContractFreezeService, TENANT_AUTH_GUARDS_TOKEN, TENANT_ID_RESOLVER_TOKEN, TRIAL_PROJECTION_PORT_TOKEN, TenantAdminGuard, TenantBillingController, TenantBillingModule, TenantBillingModuleOptions, TenantIdResolver, TrialProjectionInput, TrialProjectionPort, UPSELL_OFFER_CURRENCY_TOKEN, UPSELL_OFFER_RESOLVER_TOKEN, USAGE_SNAPSHOT_PORT_TOKEN, USER_EMAIL_RESOLVER_TOKEN, USER_ID_RESOLVER_TOKEN, UsageResponse, UserEmailResolver, UserIdResolver, addMonths, assertBaseVersionFresh, assertChangeNote, assertDraftPublishable, assertOptimisticLockHeld, buildPlanCatalogFromSnapshot, buildPlanCatalogImporterController, buildTenantSubscriptionBundlesController, clearPendingPlanVersionFields, computeCarriedTrialEndsAt, computeNextPeriod, computeProration, decideRenewal, findPlan, getActiveFeatureKeys, getMarketedPlans, getPlanOrThrow, getPlanPriceGross, getPlanPriceNet, getPlanQuota, initialPeriodWindow, isFeatureInPlan, isFeaturePlannedOnly, loadPlanCatalogFromFile, loadPlanCatalogFromString, periodEndAfter, periodEndWithMinLead, resolveBundleCancelEffectiveAt, resolveBundlePriceNet } from './billing/index.js';
|
|
6
6
|
import { SuperAdminProvisioningPort, SetupStatusResponse, SetupRequest, SetupResult, SetupConfirmMfaRequest, SetupConfirmMfaResponse } from '@saasicat/types';
|
|
7
|
-
export { BundleVersionFields, ChangeDirection, DiffResult, DiscoveredCapability, DiscoveredFeature, DiscoveredQuota, DiscoverySnapshot, PlanVersionFields, VersionChange, VersionChangeDirection, classifyBundleVersionDiff, classifyPlanDiff } from '@saasicat/types';
|
|
8
|
-
export { B as BundleVersionSnapshot, a as BusinessTypeVersionSnapshot, C as CustomLimitsShape, E as EffectiveLimits, b as EffectiveLimitsSnapshot, c as EnforceLimitInput, d as EntitlementService,
|
|
9
|
-
export { ENTITLEMENT_RESOLUTION_CONFIG_TOKEN, EntitlementModule, EntitlementModuleOptions, PLAN_VERSION_REPOSITORY_TOKEN, ReplacedByIndex, SUBSCRIPTION_REPOSITORY_TOKEN, TRANSACTION_RUNNER_TOKEN, buildReplacedByIndex, expandReplacedFeatures } from './entitlement/index.js';
|
|
7
|
+
export { BundleVersionFields, ChangeDirection, DiffResult, DiscoveredCapability, DiscoveredFeature, DiscoveredQuota, DiscoverySnapshot, PasswordHasher, PlanVersionFields, VersionChange, VersionChangeDirection, classifyBundleVersionDiff, classifyPlanDiff } from '@saasicat/types';
|
|
8
|
+
export { B as BundleVersionSnapshot, a as BusinessTypeVersionSnapshot, C as CustomLimitsShape, E as EffectiveLimits, b as EffectiveLimitsSnapshot, c as EnforceLimitInput, d as EntitlementService, P as PlanVersionSnapshot, S as SubscriptionBundleSnapshot, e as SubscriptionLimitsInput, f as aggregateBusinessTypeQuotas, g as aggregateContractLineItemEntitlements, h as aggregateLimits, i as aggregateSubscriptionBundleQuotas, j as applyCustomLimits, k as collectBusinessTypeFeatures, l as collectSubscriptionBundleFeatures, m as filterActiveSubscriptionBundles, n as filterPlannedOnlyFeatures, o as hasAnyFeature, p as hasFeature, t as toEffectiveLimitsSnapshot } from './aggregation-DGCyoN5d.js';
|
|
9
|
+
export { ENTITLEMENT_RESOLUTION_CONFIG_TOKEN, EntitlementModule, EntitlementModuleOptions, LimitExceededError, PLAN_VERSION_REPOSITORY_TOKEN, ReplacedByIndex, SUBSCRIPTION_REPOSITORY_TOKEN, TRANSACTION_RUNNER_TOKEN, buildReplacedByIndex, expandReplacedFeatures, isLimitExceededError } from './entitlement/index.js';
|
|
10
10
|
export { E as EntitlementResolutionConfig, a as EntitlementResolutionInput, r as resolveEntitlementPlan } from './plan-resolution-CFCoUkrE.js';
|
|
11
11
|
import { MfaService } from './admin/index.js';
|
|
12
12
|
export { ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN, AUDIT_PORT_TOKEN, AUDIT_STATS_PORT_TOKEN, AdminBypassRlsInterceptor, AdminManifestModule, AdminManifestModuleOptions, AdminManifestService, AdminModule, AdminModuleOptions, AdminPublicBootController, AdminStatsController, AdminStatsModule, AdminStatsModuleOptions, AdminStatsService, AdminStatsSnapshot, MFA_PORT_TOKEN, MfaGuard, PLATFORM_CORE_CONTRIBUTION_TOKEN, PLATFORM_CORE_MANIFEST_CONTRIBUTION, PROMO_CODE_STATS_PORT_TOKEN, REQUIRE_MFA_KEY, RLS_BYPASS_PORT_TOKEN, RequireMfa, SUBSCRIPTION_STATS_PORT_TOKEN, SuperAdminGuard, TotpSetupResult, VerifyTotpInput } from './admin/index.js';
|
|
13
13
|
export { A as AdminAuditService } from './admin-audit.service-9IqXMlZm.js';
|
|
14
|
-
export {
|
|
14
|
+
export { A as ADMIN_MANIFEST_CONFIG, a as AdminManifestConfig } from './admin-manifest.config-DxTfZ8-L.js';
|
|
15
15
|
import { DynamicModule } from '@nestjs/common';
|
|
16
16
|
export { Type as NestType } from '@nestjs/common';
|
|
17
|
-
export { ACTIVATION_ORCHESTRATOR_TOKEN, BaseIpRateLimitGuard, ContinueRegistrationDto, PASSWORD_HASHER_TOKEN, PAYMENT_EVENT_LOG_TOKEN, PAYMENT_PROVIDER_TOKEN, PENDING_REGISTRATION_REPOSITORY_TOKEN, PLAN_CATALOG_LOOKUP_TOKEN,
|
|
17
|
+
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_BUSINESS_TYPE_LOOKUP_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';
|
|
18
18
|
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';
|
|
19
|
-
export {
|
|
19
|
+
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';
|
|
20
20
|
export { ADVISORY_STRICT_MODE_CODES, BUNDLE_REPOSITORY_TOKEN, BUSINESS_TYPE_REPOSITORY_TOKEN, BundlesService, BusinessTypeBundleInputDto, BusinessTypesService, CATALOG_ENTRY_REPOSITORY_TOKEN, CATALOG_SERVICE_CONFIG_TOKEN, CatalogControllerConfig, CatalogEntriesService, CatalogModule, CatalogModuleOptions, CatalogServiceConfig, CreateBundleDto, CreateBundleVersionDraftDto, CreateBusinessTypeDto, CreateBusinessTypeVersionDraftDto, CreateMarketingProjectionDto, CreatePlanDto, CreatePlanVersionDraftDto, CreatePromotionDto, ListCatalogEntriesQueryDto, ListMarketingProjectionsQueryDto, ListMarketingSettingsQueryDto, ListPromotionsQueryDto, MARKETING_PROJECTION_REPOSITORY_TOKEN, MARKETING_SETTINGS_REPOSITORY_TOKEN, MarketingProjectionsService, MarketingSettingsService, PLAN_REPOSITORY_TOKEN, PROMOTION_REPOSITORY_TOKEN, PlanVersionsService, PlansService, PreflightFinding, PreflightInput, PreflightReport, PromotionsService, PublicMarketingCatalogService, PublishBundleVersionDto, PublishBusinessTypeVersionDto, PublishPlanVersionDto, ReviewCatalogEntryDto, SeedBundleDraft, SeedGateFinding, SeedGateInput, SeedGateMode, SeedGateReport, SeedGateRunOptions, SeedPlanDraft, SyncDiscoveryDto, UpdateBundleDto, UpdateBundleVersionDraftDto, UpdateBusinessTypeDto, UpdateBusinessTypeVersionDraftDto, UpdateCatalogEntryI18nDto, UpdateMarketingProjectionDto, UpdateMarketingSettingsDto, UpdatePlanDto, UpdatePlanVersionDraftDto, UpdatePromotionDto, blockingStrictModeWarnings, buildBundleVersionsController, buildBundlesController, buildBusinessTypeVersionsController, buildBusinessTypesController, buildCatalogEntriesController, buildMarketingProjectionsController, buildMarketingSettingsController, buildPlanVersionsController, buildPlansController, buildPromotionsController, buildPublicMarketingCatalogController, featureApprovalSignature, formatPreflightReport, formatSeedGateReport, loadApprovedCatalogKeys, preflightExitCode, quotaApprovalSignature, runPreflight, runSeedGateFromFile, seedGateExitCode, validateBundleDraft, validateBusinessTypeDraft, validatePlanDraft, validateSeedAgainstSnapshot } from './catalog/index.js';
|
|
21
21
|
export { CHECKOUT_OFFER_REPOSITORY_TOKEN, CheckoutOfferControllerConfig, CheckoutOfferModule, CheckoutOfferModuleOptions, CheckoutOfferService, CreateCheckoutOfferDto, UpdateCheckoutOfferDto, buildCheckoutOfferController } from './checkout-offer/index.js';
|
|
22
22
|
export { C as CreateContractFromOfferOptions, S as SubscriptionContractService, c as contractLineItemToInvoiceLineItem, s as sortContractLineItemsForInvoice, a as subscriptionContractToInvoiceSnapshot } from './subscription-contract.service--cm47ZJJ.js';
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PreviewPromoCodeDto,
|
|
3
|
-
PromoCodeExpirer,
|
|
4
|
-
PromoCodePublicController,
|
|
5
|
-
PromoCodeRateLimitGuard,
|
|
6
|
-
PromoCodesModule,
|
|
7
|
-
hashIp,
|
|
8
|
-
ipFingerprint
|
|
9
|
-
} from "./chunk-2VNZYRDV.js";
|
|
10
1
|
import {
|
|
11
2
|
ACTIVATION_ORCHESTRATOR_TOKEN,
|
|
12
3
|
BaseIpRateLimitGuard,
|
|
@@ -56,6 +47,21 @@ import {
|
|
|
56
47
|
PROMO_CODE_STATS_PORT_TOKEN,
|
|
57
48
|
SUBSCRIPTION_STATS_PORT_TOKEN
|
|
58
49
|
} from "./chunk-YNEW3L63.js";
|
|
50
|
+
import {
|
|
51
|
+
ADMIN_MANIFEST_CONFIG,
|
|
52
|
+
AdminBypassRlsInterceptor,
|
|
53
|
+
AdminManifestModule,
|
|
54
|
+
AdminManifestService,
|
|
55
|
+
AdminModule,
|
|
56
|
+
AdminPublicBootController,
|
|
57
|
+
MfaGuard,
|
|
58
|
+
MfaService,
|
|
59
|
+
PLATFORM_CORE_CONTRIBUTION_TOKEN,
|
|
60
|
+
PLATFORM_CORE_MANIFEST_CONTRIBUTION,
|
|
61
|
+
REQUIRE_MFA_KEY,
|
|
62
|
+
RequireMfa,
|
|
63
|
+
SuperAdminGuard
|
|
64
|
+
} from "./chunk-P6MYZMXQ.js";
|
|
59
65
|
import {
|
|
60
66
|
CONTRACT_FREEZE_PORT_TOKEN,
|
|
61
67
|
CONTRACT_FREEZE_PROJECT_KEY_TOKEN,
|
|
@@ -115,23 +121,7 @@ import {
|
|
|
115
121
|
periodEndWithMinLead,
|
|
116
122
|
resolveBundleCancelEffectiveAt,
|
|
117
123
|
resolveBundlePriceNet
|
|
118
|
-
} from "./chunk-
|
|
119
|
-
import {
|
|
120
|
-
PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN,
|
|
121
|
-
PROMO_CODE_REPOSITORY_TOKEN,
|
|
122
|
-
PROMO_CODE_VALIDATION_LOG_REPOSITORY_TOKEN,
|
|
123
|
-
PROMO_FIRST_TIME_CUSTOMER_CHECK_TOKEN,
|
|
124
|
-
PROMO_REVENUE_DEDUCTION_AGGREGATOR_TOKEN,
|
|
125
|
-
PROMO_SERVICE_CONFIG_TOKEN,
|
|
126
|
-
PROMO_SUBSCRIPTION_LOOKUP_TOKEN,
|
|
127
|
-
PROMO_TRANSACTION_RUNNER_TOKEN,
|
|
128
|
-
PromoCodesService,
|
|
129
|
-
addCycles,
|
|
130
|
-
buildLabel,
|
|
131
|
-
computeDiscountGross,
|
|
132
|
-
computeDiscountedGross,
|
|
133
|
-
computeRegularStartsAt
|
|
134
|
-
} from "./chunk-ZL4LLE2Z.js";
|
|
124
|
+
} from "./chunk-VHEHZMHB.js";
|
|
135
125
|
import {
|
|
136
126
|
SubscriptionContractModule,
|
|
137
127
|
SubscriptionContractService,
|
|
@@ -139,6 +129,10 @@ import {
|
|
|
139
129
|
sortContractLineItemsForInvoice,
|
|
140
130
|
subscriptionContractToInvoiceSnapshot
|
|
141
131
|
} from "./chunk-2PNX2QL2.js";
|
|
132
|
+
import {
|
|
133
|
+
REQUIRE_FEATURE_KEY,
|
|
134
|
+
RequireFeature
|
|
135
|
+
} from "./chunk-Q53N43LQ.js";
|
|
142
136
|
import {
|
|
143
137
|
ADVISORY_STRICT_MODE_CODES,
|
|
144
138
|
BundlesService,
|
|
@@ -204,7 +198,7 @@ import {
|
|
|
204
198
|
validateBusinessTypeDraft,
|
|
205
199
|
validatePlanDraft,
|
|
206
200
|
validateSeedAgainstSnapshot
|
|
207
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-FN65XZKH.js";
|
|
208
202
|
import {
|
|
209
203
|
AUDIT_CONTEXT_RESOLVER_TOKEN,
|
|
210
204
|
PENDING_PLAN_QUERY_PORT_TOKEN,
|
|
@@ -219,6 +213,12 @@ import {
|
|
|
219
213
|
classifyBundleVersionDiff,
|
|
220
214
|
classifyPlanDiff
|
|
221
215
|
} from "./chunk-WPUVJRIN.js";
|
|
216
|
+
import {
|
|
217
|
+
AUDIT_PORT_TOKEN,
|
|
218
|
+
AdminAuditService,
|
|
219
|
+
MFA_PORT_TOKEN,
|
|
220
|
+
RLS_BYPASS_PORT_TOKEN
|
|
221
|
+
} from "./chunk-E56W4U2P.js";
|
|
222
222
|
import {
|
|
223
223
|
CHECKOUT_OFFER_REPOSITORY_TOKEN,
|
|
224
224
|
CheckoutOfferModule,
|
|
@@ -235,46 +235,21 @@ import {
|
|
|
235
235
|
RequiresCapability,
|
|
236
236
|
runHeadlessDiscoveryScan
|
|
237
237
|
} from "./chunk-HRU3CP57.js";
|
|
238
|
-
import {
|
|
239
|
-
DiscoverySnapshotNotFoundError,
|
|
240
|
-
loadDiscoverySnapshotFromFile
|
|
241
|
-
} from "./chunk-ABB2CRAS.js";
|
|
242
|
-
import "./chunk-2FR6ZL7R.js";
|
|
243
|
-
import {
|
|
244
|
-
ADMIN_MANIFEST_CONFIG,
|
|
245
|
-
AdminBypassRlsInterceptor,
|
|
246
|
-
AdminManifestModule,
|
|
247
|
-
AdminManifestService,
|
|
248
|
-
AdminModule,
|
|
249
|
-
AdminPublicBootController,
|
|
250
|
-
MfaGuard,
|
|
251
|
-
MfaService,
|
|
252
|
-
PLATFORM_CORE_CONTRIBUTION_TOKEN,
|
|
253
|
-
PLATFORM_CORE_MANIFEST_CONTRIBUTION,
|
|
254
|
-
REQUIRE_MFA_KEY,
|
|
255
|
-
RequireMfa,
|
|
256
|
-
SuperAdminGuard
|
|
257
|
-
} from "./chunk-P6MYZMXQ.js";
|
|
258
|
-
import {
|
|
259
|
-
REQUIRE_FEATURE_KEY,
|
|
260
|
-
RequireFeature
|
|
261
|
-
} from "./chunk-Q53N43LQ.js";
|
|
262
|
-
import {
|
|
263
|
-
AUDIT_PORT_TOKEN,
|
|
264
|
-
AdminAuditService,
|
|
265
|
-
MFA_PORT_TOKEN,
|
|
266
|
-
RLS_BYPASS_PORT_TOKEN
|
|
267
|
-
} from "./chunk-E56W4U2P.js";
|
|
268
238
|
import {
|
|
269
239
|
DiscoveryModule,
|
|
270
240
|
buildDiscoveryController
|
|
271
241
|
} from "./chunk-AJ3EPELS.js";
|
|
242
|
+
import {
|
|
243
|
+
DiscoverySnapshotNotFoundError,
|
|
244
|
+
loadDiscoverySnapshotFromFile
|
|
245
|
+
} from "./chunk-ABB2CRAS.js";
|
|
272
246
|
import {
|
|
273
247
|
DISCOVERY_APP_INFO_TOKEN,
|
|
274
248
|
DISCOVERY_SNAPSHOT_PATH_TOKEN,
|
|
275
249
|
DiscoveryScanner,
|
|
276
250
|
computeSnapshotHash
|
|
277
251
|
} from "./chunk-M6CZQYPY.js";
|
|
252
|
+
import "./chunk-2FR6ZL7R.js";
|
|
278
253
|
import {
|
|
279
254
|
EntitlementModule,
|
|
280
255
|
EntitlementService,
|
|
@@ -294,27 +269,10 @@ import {
|
|
|
294
269
|
filterPlannedOnlyFeatures,
|
|
295
270
|
hasAnyFeature,
|
|
296
271
|
hasFeature,
|
|
272
|
+
isLimitExceededError,
|
|
297
273
|
resolveEntitlementPlan,
|
|
298
274
|
toEffectiveLimitsSnapshot
|
|
299
|
-
} from "./chunk-
|
|
300
|
-
import {
|
|
301
|
-
PLAN_CATALOG_READ_SINK_TOKEN,
|
|
302
|
-
PLAN_CATALOG_TOKEN,
|
|
303
|
-
PlanCatalogModule,
|
|
304
|
-
buildPlanCatalogFromSnapshot,
|
|
305
|
-
computeIncludedVat,
|
|
306
|
-
findPlan,
|
|
307
|
-
getActiveFeatureKeys,
|
|
308
|
-
getMarketedPlans,
|
|
309
|
-
getPlanOrThrow,
|
|
310
|
-
getPlanPriceGross,
|
|
311
|
-
getPlanPriceNet,
|
|
312
|
-
getPlanQuota,
|
|
313
|
-
grossFromNet,
|
|
314
|
-
isFeatureInPlan,
|
|
315
|
-
isFeaturePlannedOnly,
|
|
316
|
-
round2
|
|
317
|
-
} from "./chunk-MV6LW5UB.js";
|
|
275
|
+
} from "./chunk-K42EQPBB.js";
|
|
318
276
|
import {
|
|
319
277
|
SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN
|
|
320
278
|
} from "./chunk-NYLON2VC.js";
|
|
@@ -334,9 +292,6 @@ import {
|
|
|
334
292
|
PLAN_REPOSITORY_TOKEN,
|
|
335
293
|
PROMOTION_REPOSITORY_TOKEN
|
|
336
294
|
} from "./chunk-XCZ3TTFK.js";
|
|
337
|
-
import {
|
|
338
|
-
asProvider
|
|
339
|
-
} from "./chunk-SABTXESR.js";
|
|
340
295
|
import {
|
|
341
296
|
DEFINES_QUOTA_KEY,
|
|
342
297
|
DISCOVERY_SNAPSHOT_TOKEN,
|
|
@@ -344,6 +299,52 @@ import {
|
|
|
344
299
|
IMPLEMENTS_CAPABILITY_KEY,
|
|
345
300
|
REQUIRES_CAPABILITY_KEY
|
|
346
301
|
} from "./chunk-L4SUWH5B.js";
|
|
302
|
+
import {
|
|
303
|
+
PreviewPromoCodeDto,
|
|
304
|
+
PromoCodeExpirer,
|
|
305
|
+
PromoCodePublicController,
|
|
306
|
+
PromoCodeRateLimitGuard,
|
|
307
|
+
PromoCodesModule,
|
|
308
|
+
hashIp,
|
|
309
|
+
ipFingerprint
|
|
310
|
+
} from "./chunk-2VNZYRDV.js";
|
|
311
|
+
import {
|
|
312
|
+
PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN,
|
|
313
|
+
PROMO_CODE_REPOSITORY_TOKEN,
|
|
314
|
+
PROMO_CODE_VALIDATION_LOG_REPOSITORY_TOKEN,
|
|
315
|
+
PROMO_FIRST_TIME_CUSTOMER_CHECK_TOKEN,
|
|
316
|
+
PROMO_REVENUE_DEDUCTION_AGGREGATOR_TOKEN,
|
|
317
|
+
PROMO_SERVICE_CONFIG_TOKEN,
|
|
318
|
+
PROMO_SUBSCRIPTION_LOOKUP_TOKEN,
|
|
319
|
+
PROMO_TRANSACTION_RUNNER_TOKEN,
|
|
320
|
+
PromoCodesService,
|
|
321
|
+
addCycles,
|
|
322
|
+
buildLabel,
|
|
323
|
+
computeDiscountGross,
|
|
324
|
+
computeDiscountedGross,
|
|
325
|
+
computeRegularStartsAt
|
|
326
|
+
} from "./chunk-ZL4LLE2Z.js";
|
|
327
|
+
import {
|
|
328
|
+
PLAN_CATALOG_READ_SINK_TOKEN,
|
|
329
|
+
PLAN_CATALOG_TOKEN,
|
|
330
|
+
PlanCatalogModule,
|
|
331
|
+
buildPlanCatalogFromSnapshot,
|
|
332
|
+
computeIncludedVat,
|
|
333
|
+
findPlan,
|
|
334
|
+
getActiveFeatureKeys,
|
|
335
|
+
getMarketedPlans,
|
|
336
|
+
getPlanOrThrow,
|
|
337
|
+
getPlanPriceGross,
|
|
338
|
+
getPlanPriceNet,
|
|
339
|
+
getPlanQuota,
|
|
340
|
+
grossFromNet,
|
|
341
|
+
isFeatureInPlan,
|
|
342
|
+
isFeaturePlannedOnly,
|
|
343
|
+
round2
|
|
344
|
+
} from "./chunk-MV6LW5UB.js";
|
|
345
|
+
import {
|
|
346
|
+
asProvider
|
|
347
|
+
} from "./chunk-SABTXESR.js";
|
|
347
348
|
import {
|
|
348
349
|
__name
|
|
349
350
|
} from "./chunk-SHUYVCID.js";
|
|
@@ -927,6 +928,7 @@ export {
|
|
|
927
928
|
ipFingerprint,
|
|
928
929
|
isFeatureInPlan,
|
|
929
930
|
isFeaturePlannedOnly,
|
|
931
|
+
isLimitExceededError,
|
|
930
932
|
loadApprovedCatalogKeys,
|
|
931
933
|
loadDiscoverySnapshotFromFile,
|
|
932
934
|
loadPlanCatalogFromFile,
|
package/dist/platform/index.cjs
CHANGED
|
@@ -47,6 +47,7 @@ module.exports = __toCommonJS(platform_exports);
|
|
|
47
47
|
// src/platform/saas-platform.module.ts
|
|
48
48
|
var import_common22 = require("@nestjs/common");
|
|
49
49
|
var import_core6 = require("@nestjs/core");
|
|
50
|
+
var import_types = require("@saasicat/types");
|
|
50
51
|
|
|
51
52
|
// src/core/di.ts
|
|
52
53
|
function asProvider(token, impl) {
|
|
@@ -1889,6 +1890,7 @@ function assertNoReplacesCycle(index) {
|
|
|
1889
1890
|
__name(assertNoReplacesCycle, "assertNoReplacesCycle");
|
|
1890
1891
|
|
|
1891
1892
|
// src/entitlement/limit-exceeded-error.ts
|
|
1893
|
+
var LIMIT_EXCEEDED = "LIMIT_EXCEEDED";
|
|
1892
1894
|
var LimitExceededError = class extends Error {
|
|
1893
1895
|
static {
|
|
1894
1896
|
__name(this, "LimitExceededError");
|
|
@@ -1896,6 +1898,7 @@ var LimitExceededError = class extends Error {
|
|
|
1896
1898
|
dimension;
|
|
1897
1899
|
max;
|
|
1898
1900
|
used;
|
|
1901
|
+
code = LIMIT_EXCEEDED;
|
|
1899
1902
|
constructor(dimension, max, used) {
|
|
1900
1903
|
super(`Limit f\xFCr ${dimension} erreicht: ${used}/${max}.`), this.dimension = dimension, this.max = max, this.used = used;
|
|
1901
1904
|
this.name = "LimitExceededError";
|
|
@@ -2649,30 +2652,59 @@ var SaasPlatformModule = class _SaasPlatformModule {
|
|
|
2649
2652
|
__name(this, "SaasPlatformModule");
|
|
2650
2653
|
}
|
|
2651
2654
|
static forRoot(options) {
|
|
2652
|
-
|
|
2653
|
-
|
|
2655
|
+
const explicit = options.adapters ?? {};
|
|
2656
|
+
const persistence = options.persistence;
|
|
2657
|
+
const adapters = {
|
|
2658
|
+
mfa: explicit.mfa ?? persistence?.core.mfa,
|
|
2659
|
+
audit: explicit.audit ?? persistence?.core.audit,
|
|
2660
|
+
rlsBypass: explicit.rlsBypass ?? persistence?.core.rlsBypass,
|
|
2661
|
+
planCatalogReadSink: explicit.planCatalogReadSink ?? persistence?.planCatalogReadSink,
|
|
2662
|
+
planResolver: explicit.planResolver,
|
|
2663
|
+
subscriptionRepository: explicit.subscriptionRepository ?? persistence?.entitlement?.subscriptionRepository,
|
|
2664
|
+
planVersionRepository: explicit.planVersionRepository ?? persistence?.entitlement?.planVersionRepository,
|
|
2665
|
+
transactionRunner: explicit.transactionRunner ?? persistence?.core.transactionRunner
|
|
2666
|
+
};
|
|
2667
|
+
const missingCore = [
|
|
2668
|
+
"mfa",
|
|
2669
|
+
"audit",
|
|
2670
|
+
"rlsBypass"
|
|
2671
|
+
].filter((key) => adapters[key] === void 0);
|
|
2672
|
+
if (missingCore.length) {
|
|
2673
|
+
throw new Error(`SaasPlatformModule.forRoot: adapters missing (provide them via \`adapters\` or a \`persistence\` bundle): ${missingCore.join(", ")}`);
|
|
2674
|
+
}
|
|
2675
|
+
if (!options.planCatalog && (!adapters.planCatalogReadSink || !options.dbCatalog)) {
|
|
2676
|
+
throw new Error("SaasPlatformModule.forRoot: either set `planCatalog` (quickstart YAML path) or, for DB hydration, BOTH a planCatalogReadSink (`adapters`/`persistence`) AND `dbCatalog` ({ projectKey, currency, vatRate }).");
|
|
2654
2677
|
}
|
|
2655
2678
|
if (options.entitlement) {
|
|
2656
2679
|
const missing = [];
|
|
2657
|
-
if (!
|
|
2658
|
-
if (!
|
|
2659
|
-
if (!
|
|
2680
|
+
if (!adapters.subscriptionRepository) missing.push("subscriptionRepository");
|
|
2681
|
+
if (!adapters.planVersionRepository) missing.push("planVersionRepository");
|
|
2682
|
+
if (!adapters.transactionRunner) missing.push("transactionRunner");
|
|
2660
2683
|
if (missing.length) {
|
|
2661
|
-
throw new Error(`SaasPlatformModule.forRoot: entitlement
|
|
2684
|
+
throw new Error(`SaasPlatformModule.forRoot: entitlement active, but adapters are missing: ${missing.join(", ")}`);
|
|
2685
|
+
}
|
|
2686
|
+
if (persistence) {
|
|
2687
|
+
(0, import_types.assertPersistenceCapabilities)(persistence.capabilities, {
|
|
2688
|
+
transactions: true,
|
|
2689
|
+
pessimisticLocking: true
|
|
2690
|
+
}, "SaasPlatformModule entitlement (transactional enforceLimit)");
|
|
2662
2691
|
}
|
|
2663
2692
|
}
|
|
2693
|
+
const dbCatalog = options.dbCatalog;
|
|
2664
2694
|
const planCatalogModule = options.planCatalog ? PlanCatalogModule.forRootWithCatalog(options.planCatalog, {
|
|
2665
2695
|
global: true
|
|
2666
2696
|
}) : PlanCatalogModule.forRoot({
|
|
2667
|
-
projectKey:
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2697
|
+
projectKey: dbCatalog.projectKey,
|
|
2698
|
+
app: dbCatalog.app,
|
|
2699
|
+
currency: dbCatalog.currency,
|
|
2700
|
+
vatRate: dbCatalog.vatRate,
|
|
2701
|
+
marketing: dbCatalog.marketing,
|
|
2702
|
+
sink: adapters.planCatalogReadSink,
|
|
2671
2703
|
imports: options.imports
|
|
2672
2704
|
});
|
|
2673
2705
|
const appInfo = options.app ?? {
|
|
2674
|
-
key: options.planCatalog?.projectKey ?? "app",
|
|
2675
|
-
version: options.planCatalog?.app?.version ?? "0.0.0"
|
|
2706
|
+
key: options.planCatalog?.projectKey ?? options.dbCatalog?.projectKey ?? "app",
|
|
2707
|
+
version: options.planCatalog?.app?.version ?? options.dbCatalog?.app?.version ?? "0.0.0"
|
|
2676
2708
|
};
|
|
2677
2709
|
const imports = [
|
|
2678
2710
|
planCatalogModule,
|
|
@@ -2685,9 +2717,9 @@ var SaasPlatformModule = class _SaasPlatformModule {
|
|
|
2685
2717
|
snapshotPath: options.discoverySnapshotPath === void 0 ? "var/discovery-snapshot.json" : options.discoverySnapshotPath
|
|
2686
2718
|
}),
|
|
2687
2719
|
AdminModule.forRoot({
|
|
2688
|
-
mfaPort:
|
|
2689
|
-
auditPort:
|
|
2690
|
-
rlsBypassPort:
|
|
2720
|
+
mfaPort: adapters.mfa,
|
|
2721
|
+
auditPort: adapters.audit,
|
|
2722
|
+
rlsBypassPort: adapters.rlsBypass,
|
|
2691
2723
|
global: true
|
|
2692
2724
|
}),
|
|
2693
2725
|
AdminManifestModule.forRoot({
|
|
@@ -2698,18 +2730,21 @@ var SaasPlatformModule = class _SaasPlatformModule {
|
|
|
2698
2730
|
];
|
|
2699
2731
|
if (options.entitlement) {
|
|
2700
2732
|
imports.push(EntitlementModule.forRoot({
|
|
2701
|
-
subscriptionRepository:
|
|
2702
|
-
planVersionRepository:
|
|
2703
|
-
transactionRunner:
|
|
2704
|
-
resolutionConfig: options.entitlement.resolutionConfig
|
|
2733
|
+
subscriptionRepository: adapters.subscriptionRepository,
|
|
2734
|
+
planVersionRepository: adapters.planVersionRepository,
|
|
2735
|
+
transactionRunner: adapters.transactionRunner,
|
|
2736
|
+
resolutionConfig: options.entitlement.resolutionConfig,
|
|
2737
|
+
subscriptionContractRepository: persistence?.entitlement?.subscriptionContractRepository,
|
|
2738
|
+
subscriptionBundleRepository: persistence?.entitlement?.subscriptionBundleRepository,
|
|
2739
|
+
bundleRepository: persistence?.entitlement?.bundleRepository
|
|
2705
2740
|
}));
|
|
2706
2741
|
}
|
|
2707
2742
|
const lightweightProviders = [];
|
|
2708
2743
|
const lightweightExports = [];
|
|
2709
|
-
const hasResolver = !!
|
|
2744
|
+
const hasResolver = !!adapters.planResolver;
|
|
2710
2745
|
const hasFallback = !!options.defaultPlanId;
|
|
2711
2746
|
if (hasResolver || hasFallback) {
|
|
2712
|
-
lightweightProviders.push(hasResolver ? asProvider(PLAN_RESOLVER_PORT_TOKEN,
|
|
2747
|
+
lightweightProviders.push(hasResolver ? asProvider(PLAN_RESOLVER_PORT_TOKEN, adapters.planResolver) : {
|
|
2713
2748
|
provide: PLAN_RESOLVER_PORT_TOKEN,
|
|
2714
2749
|
useValue: new StaticPlanResolver(options.defaultPlanId)
|
|
2715
2750
|
}, StaticEntitlementService, StaticFeatureGuard, EnforceQuotaInterceptor, ...options.quotaProviders ?? [], {
|
|
@@ -2743,11 +2778,13 @@ var SaasPlatformModule = class _SaasPlatformModule {
|
|
|
2743
2778
|
PlanCatalogModule,
|
|
2744
2779
|
DiscoveryModule,
|
|
2745
2780
|
AdminModule,
|
|
2781
|
+
// ADMIN_MANIFEST_CONFIG travels transitively: re-exporting an
|
|
2782
|
+
// imported module's token directly is an UnknownExportException
|
|
2783
|
+
// at boot — the module export below already carries it.
|
|
2746
2784
|
AdminManifestModule,
|
|
2747
2785
|
...options.entitlement ? [
|
|
2748
2786
|
EntitlementModule
|
|
2749
2787
|
] : [],
|
|
2750
|
-
ADMIN_MANIFEST_CONFIG,
|
|
2751
2788
|
...lightweightExports
|
|
2752
2789
|
],
|
|
2753
2790
|
global: true
|
|
@@ -1,66 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { Reflector } from '@nestjs/core';
|
|
6
|
-
import { Observable } from 'rxjs';
|
|
1
|
+
import { S as StaticEntitlementService } from '../enforce-quota.interceptor-HmdZFg41.cjs';
|
|
2
|
+
export { E as EnforceQuotaInterceptor, P as PLAN_RESOLVER_PORT_TOKEN, a as PlanResolverPort, Q as QUOTA_PROVIDERS_TOKEN, b as STATIC_FEATURE_GUARD_CONFIG_TOKEN, c as SaasPlatformAdapters, d as SaasPlatformModule, e as SaasPlatformModuleOptions, f as StaticEntitlementSnapshot, g as StaticFeatureGuard, h as StaticFeatureGuardConfig, i as StaticPlanResolver, T as TenantManifestControllerOptions, j as buildTenantManifestController } from '../enforce-quota.interceptor-HmdZFg41.cjs';
|
|
3
|
+
import '@nestjs/common';
|
|
4
|
+
import '@saasicat/types';
|
|
7
5
|
import '../di-CcNeq9v-.cjs';
|
|
8
|
-
import '../admin-manifest.config-
|
|
9
|
-
import '../discovery.scanner-
|
|
6
|
+
import '../admin-manifest.config-DxTfZ8-L.cjs';
|
|
7
|
+
import '../discovery.scanner-DLgEvuoy.cjs';
|
|
8
|
+
import '@nestjs/core';
|
|
10
9
|
import '../plan-resolution-CFCoUkrE.cjs';
|
|
11
|
-
|
|
12
|
-
interface StaticEntitlementSnapshot {
|
|
13
|
-
planId: string | null;
|
|
14
|
-
features: readonly string[];
|
|
15
|
-
/** quotaKey → limit (`-1` = unlimited). */
|
|
16
|
-
quotas: Readonly<Record<string, number>>;
|
|
17
|
-
}
|
|
18
|
-
declare class StaticEntitlementService {
|
|
19
|
-
private readonly catalog;
|
|
20
|
-
private readonly resolver;
|
|
21
|
-
constructor(catalog: PlanCatalog, resolver: PlanResolverPort);
|
|
22
|
-
/**
|
|
23
|
-
* Returns the effective features + quotas of a tenant from the
|
|
24
|
-
* plan catalog. When the plan is missing: an empty snapshot (no feature,
|
|
25
|
-
* all quotas at 0).
|
|
26
|
-
*/
|
|
27
|
-
snapshot(tenantId: string): Promise<StaticEntitlementSnapshot>;
|
|
28
|
-
/** Convenience helper for tests / synchronous checks in the UI manifest. */
|
|
29
|
-
hasFeature(tenantId: string, featureKey: string): Promise<boolean>;
|
|
30
|
-
quotaLimit(tenantId: string, quotaKey: string): Promise<number | null>;
|
|
31
|
-
private findPlan;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
declare const STATIC_FEATURE_GUARD_CONFIG_TOKEN: unique symbol;
|
|
35
|
-
interface StaticFeatureGuardConfig {
|
|
36
|
-
/**
|
|
37
|
-
* Resolver for the user role (e.g. `(user) => user.platformRole`).
|
|
38
|
-
* SUPER_ADMIN gets a bypass.
|
|
39
|
-
*/
|
|
40
|
-
userRoleResolver?: (user: unknown) => string | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* Resolver for the tenant ID from the request. Default:
|
|
43
|
-
* `request.tenantId ?? request.user?.tenantId`.
|
|
44
|
-
*/
|
|
45
|
-
tenantIdResolver?: (request: unknown) => string | undefined;
|
|
46
|
-
}
|
|
47
|
-
declare class StaticFeatureGuard implements CanActivate {
|
|
48
|
-
private readonly reflector;
|
|
49
|
-
private readonly entitlements;
|
|
50
|
-
private readonly config;
|
|
51
|
-
constructor(reflector: Reflector, entitlements: StaticEntitlementService, config?: StaticFeatureGuardConfig | null);
|
|
52
|
-
canActivate(context: ExecutionContext): Promise<boolean>;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
declare const QUOTA_PROVIDERS_TOKEN: unique symbol;
|
|
56
|
-
declare class EnforceQuotaInterceptor implements NestInterceptor {
|
|
57
|
-
private readonly reflector;
|
|
58
|
-
private readonly entitlements;
|
|
59
|
-
private readonly providers;
|
|
60
|
-
constructor(reflector: Reflector, entitlements: StaticEntitlementService, providers?: ReadonlyArray<QuotaProvider> | null);
|
|
61
|
-
intercept(context: ExecutionContext, next: CallHandler): Observable<unknown>;
|
|
62
|
-
private check;
|
|
63
|
-
}
|
|
10
|
+
import 'rxjs';
|
|
64
11
|
|
|
65
12
|
interface TenantNavItem {
|
|
66
13
|
/** Unique slug, e.g. "notes", "billing", "settings". */
|
|
@@ -115,4 +62,4 @@ declare class TenantManifestService {
|
|
|
115
62
|
getManifest(tenantId: string): Promise<TenantManifest>;
|
|
116
63
|
}
|
|
117
64
|
|
|
118
|
-
export {
|
|
65
|
+
export { StaticEntitlementService, type TenantManifest, TenantManifestService, type TenantNavItem };
|
package/dist/platform/index.d.ts
CHANGED
|
@@ -1,66 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { Reflector } from '@nestjs/core';
|
|
6
|
-
import { Observable } from 'rxjs';
|
|
1
|
+
import { S as StaticEntitlementService } from '../enforce-quota.interceptor-3HmbeHTM.js';
|
|
2
|
+
export { E as EnforceQuotaInterceptor, P as PLAN_RESOLVER_PORT_TOKEN, a as PlanResolverPort, Q as QUOTA_PROVIDERS_TOKEN, b as STATIC_FEATURE_GUARD_CONFIG_TOKEN, c as SaasPlatformAdapters, d as SaasPlatformModule, e as SaasPlatformModuleOptions, f as StaticEntitlementSnapshot, g as StaticFeatureGuard, h as StaticFeatureGuardConfig, i as StaticPlanResolver, T as TenantManifestControllerOptions, j as buildTenantManifestController } from '../enforce-quota.interceptor-3HmbeHTM.js';
|
|
3
|
+
import '@nestjs/common';
|
|
4
|
+
import '@saasicat/types';
|
|
7
5
|
import '../di-CcNeq9v-.js';
|
|
8
|
-
import '../admin-manifest.config-
|
|
9
|
-
import '../discovery.scanner-
|
|
6
|
+
import '../admin-manifest.config-DxTfZ8-L.js';
|
|
7
|
+
import '../discovery.scanner-DLgEvuoy.js';
|
|
8
|
+
import '@nestjs/core';
|
|
10
9
|
import '../plan-resolution-CFCoUkrE.js';
|
|
11
|
-
|
|
12
|
-
interface StaticEntitlementSnapshot {
|
|
13
|
-
planId: string | null;
|
|
14
|
-
features: readonly string[];
|
|
15
|
-
/** quotaKey → limit (`-1` = unlimited). */
|
|
16
|
-
quotas: Readonly<Record<string, number>>;
|
|
17
|
-
}
|
|
18
|
-
declare class StaticEntitlementService {
|
|
19
|
-
private readonly catalog;
|
|
20
|
-
private readonly resolver;
|
|
21
|
-
constructor(catalog: PlanCatalog, resolver: PlanResolverPort);
|
|
22
|
-
/**
|
|
23
|
-
* Returns the effective features + quotas of a tenant from the
|
|
24
|
-
* plan catalog. When the plan is missing: an empty snapshot (no feature,
|
|
25
|
-
* all quotas at 0).
|
|
26
|
-
*/
|
|
27
|
-
snapshot(tenantId: string): Promise<StaticEntitlementSnapshot>;
|
|
28
|
-
/** Convenience helper for tests / synchronous checks in the UI manifest. */
|
|
29
|
-
hasFeature(tenantId: string, featureKey: string): Promise<boolean>;
|
|
30
|
-
quotaLimit(tenantId: string, quotaKey: string): Promise<number | null>;
|
|
31
|
-
private findPlan;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
declare const STATIC_FEATURE_GUARD_CONFIG_TOKEN: unique symbol;
|
|
35
|
-
interface StaticFeatureGuardConfig {
|
|
36
|
-
/**
|
|
37
|
-
* Resolver for the user role (e.g. `(user) => user.platformRole`).
|
|
38
|
-
* SUPER_ADMIN gets a bypass.
|
|
39
|
-
*/
|
|
40
|
-
userRoleResolver?: (user: unknown) => string | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* Resolver for the tenant ID from the request. Default:
|
|
43
|
-
* `request.tenantId ?? request.user?.tenantId`.
|
|
44
|
-
*/
|
|
45
|
-
tenantIdResolver?: (request: unknown) => string | undefined;
|
|
46
|
-
}
|
|
47
|
-
declare class StaticFeatureGuard implements CanActivate {
|
|
48
|
-
private readonly reflector;
|
|
49
|
-
private readonly entitlements;
|
|
50
|
-
private readonly config;
|
|
51
|
-
constructor(reflector: Reflector, entitlements: StaticEntitlementService, config?: StaticFeatureGuardConfig | null);
|
|
52
|
-
canActivate(context: ExecutionContext): Promise<boolean>;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
declare const QUOTA_PROVIDERS_TOKEN: unique symbol;
|
|
56
|
-
declare class EnforceQuotaInterceptor implements NestInterceptor {
|
|
57
|
-
private readonly reflector;
|
|
58
|
-
private readonly entitlements;
|
|
59
|
-
private readonly providers;
|
|
60
|
-
constructor(reflector: Reflector, entitlements: StaticEntitlementService, providers?: ReadonlyArray<QuotaProvider> | null);
|
|
61
|
-
intercept(context: ExecutionContext, next: CallHandler): Observable<unknown>;
|
|
62
|
-
private check;
|
|
63
|
-
}
|
|
10
|
+
import 'rxjs';
|
|
64
11
|
|
|
65
12
|
interface TenantNavItem {
|
|
66
13
|
/** Unique slug, e.g. "notes", "billing", "settings". */
|
|
@@ -115,4 +62,4 @@ declare class TenantManifestService {
|
|
|
115
62
|
getManifest(tenantId: string): Promise<TenantManifest>;
|
|
116
63
|
}
|
|
117
64
|
|
|
118
|
-
export {
|
|
65
|
+
export { StaticEntitlementService, type TenantManifest, TenantManifestService, type TenantNavItem };
|