@saasicat/nest 1.0.0-rc.20 → 1.0.0-rc.21
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/.build-stamp +1 -1
- package/dist/_entries.cjs +3570 -2574
- package/dist/admin/index.d.cts +5 -4
- package/dist/admin/index.d.ts +5 -4
- package/dist/admin/index.js +2 -1
- package/dist/{admin-resources.module-aOJ_0rur.d.cts → admin-resources.module-B4XNvdH-.d.cts} +0 -1
- package/dist/{admin-resources.module-BENMc0Wh.d.ts → admin-resources.module-CWqdI9BV.d.ts} +0 -1
- package/dist/{admin-stats.service-cwLMrkGl.d.ts → admin-stats.service-CsLNt19Z.d.ts} +10 -6
- package/dist/{admin-stats.service-BJdzHCtJ.d.cts → admin-stats.service-DrZrU8IJ.d.cts} +10 -6
- package/dist/{aggregation-CtIjlWHT.d.ts → aggregation-ChpZDh0g.d.ts} +20 -4
- package/dist/{aggregation-BHo7a_In.d.cts → aggregation-OpnhwzF5.d.cts} +20 -4
- package/dist/billing/index.d.cts +23 -16
- package/dist/billing/index.d.ts +23 -16
- package/dist/billing/index.js +20 -15
- package/dist/catalog/index.d.cts +17 -8
- package/dist/catalog/index.d.ts +17 -8
- package/dist/catalog/index.js +5 -3
- package/dist/{catalog.module-B5E8tsl7.d.ts → catalog.module-C9O7BxRq.d.ts} +80 -7
- package/dist/{catalog.module-DKVvsPsl.d.cts → catalog.module-T-I5Ricz.d.cts} +80 -7
- package/dist/checkout-offer/index.d.cts +5 -4
- package/dist/checkout-offer/index.d.ts +5 -4
- package/dist/checkout-offer/index.js +15 -14
- package/dist/{checkout-offer.service-BP4CoZle.d.ts → checkout-offer.service-BeHgYikI.d.ts} +51 -8
- package/dist/{checkout-offer.service-Bk5mHEoR.d.cts → checkout-offer.service-CCVxG9b2.d.cts} +51 -8
- package/dist/{chunk-AOQJEYOL.js → chunk-3QVGA6JX.js} +3 -1
- package/dist/chunk-3RLWML2S.js +896 -0
- package/dist/{chunk-DTIYUJH5.js → chunk-4SDSYV4A.js} +16 -6
- package/dist/{chunk-X4PDUYBX.js → chunk-55QEDAMX.js} +106 -302
- package/dist/chunk-6PJE7EWO.js +185 -0
- package/dist/{chunk-CRCNY3U6.js → chunk-7NJKVC5X.js} +54 -14
- package/dist/{chunk-RSAPMUGB.js → chunk-AOS2JPDD.js} +67 -64
- package/dist/{chunk-NCXGXNQK.js → chunk-CQ2ZZMTD.js} +174 -72
- package/dist/{chunk-NEICZJE4.js → chunk-F5X66HF5.js} +1 -1
- package/dist/{chunk-323FB6TD.js → chunk-FEQZCWUL.js} +67 -19
- package/dist/{chunk-FQS5FPH2.js → chunk-G6EZWECL.js} +42 -21
- package/dist/{chunk-XDRJ4FRG.js → chunk-JBCC6C3M.js} +84 -20
- package/dist/chunk-LF6J4YYN.js +301 -0
- package/dist/{chunk-OAUN2FPJ.js → chunk-LLYVYRGJ.js} +50 -21
- package/dist/{chunk-6ISJMNW7.js → chunk-M47BNEY2.js} +125 -108
- package/dist/{chunk-U465NU23.js → chunk-NDLC5GYK.js} +40 -33
- package/dist/{chunk-YFCTBLM5.js → chunk-QPVDCKYS.js} +237 -60
- package/dist/{chunk-IORLRWJZ.js → chunk-R5YCJBHY.js} +2 -2
- package/dist/{chunk-QBF7KLSA.js → chunk-TBBZWZQT.js} +8 -6
- package/dist/chunk-TOEFN7DN.js +295 -0
- package/dist/{chunk-ZUOCCEWB.js → chunk-WHJSYKNC.js} +2 -2
- package/dist/chunk-WOEJ6K7M.js +55 -0
- package/dist/{chunk-WYXLTSUZ.js → chunk-XSSWYPP5.js} +6 -4
- package/dist/contract-line-item-money-B0Z3Ogur.d.cts +43 -0
- package/dist/contract-line-item-money-B0Z3Ogur.d.ts +43 -0
- package/dist/{enforce-quota.interceptor-CLyCNVIm.d.cts → enforce-quota.interceptor-BFyVdWe8.d.cts} +6 -6
- package/dist/{enforce-quota.interceptor-DQ_BN_jV.d.ts → enforce-quota.interceptor-GaBXboGx.d.ts} +6 -6
- package/dist/entitlement/index.d.cts +2 -1
- package/dist/entitlement/index.d.ts +2 -1
- package/dist/entitlement/index.js +6 -7
- package/dist/index.d.cts +27 -26
- package/dist/index.d.ts +27 -26
- package/dist/index.js +47 -33
- package/dist/{issuer-identity.check-B8Wzugbf.d.cts → issuer-identity.check-CBO0vcsq.d.cts} +5 -5
- package/dist/{issuer-identity.check-q-Uha5XY.d.ts → issuer-identity.check-Cz9CEMkZ.d.ts} +5 -5
- package/dist/{module-options-C5EBOxzm.d.ts → module-options-DmQ3G4sZ.d.ts} +17 -7
- package/dist/{module-options-Cr5FkELF.d.cts → module-options-qAOwinHR.d.cts} +17 -7
- package/dist/{payment-callback.service-DPUfjp-F.d.cts → payment-callback.service-CR84Xw1Z.d.cts} +31 -3
- package/dist/{payment-callback.service-DPUfjp-F.d.ts → payment-callback.service-CR84Xw1Z.d.ts} +31 -3
- package/dist/payments/index.d.cts +59 -5
- package/dist/payments/index.d.ts +59 -5
- package/dist/payments/index.js +11 -5
- package/dist/{payments.module-Da26YttL.d.cts → payments.module-BdUq9ot_.d.cts} +5 -2
- package/dist/{payments.module-C6r6dJdn.d.ts → payments.module-CQGv_VG7.d.ts} +5 -2
- package/dist/plan-catalog-source-DWe-BGY1.d.cts +21 -0
- package/dist/plan-catalog-source-DWe-BGY1.d.ts +21 -0
- package/dist/{plan-versions.service-BTlw-aEX.d.ts → plan-versions.service-C0N-Em2W.d.ts} +2 -48
- package/dist/{plan-versions.service-BM7lKLr1.d.cts → plan-versions.service-DARLh-qI.d.cts} +2 -48
- package/dist/platform/index.d.cts +20 -19
- package/dist/platform/index.d.ts +20 -19
- package/dist/platform/index.js +22 -21
- package/dist/promo/index.d.cts +9 -6
- package/dist/promo/index.d.ts +9 -6
- package/dist/promo/index.js +7 -6
- package/dist/{promo.module-YfF6ADDf.d.cts → promo.module-CKkECmU8.d.cts} +8 -2
- package/dist/{promo.module-KmIpp1Gb.d.ts → promo.module-DuIJdK3U.d.ts} +8 -2
- package/dist/promo.service-BYBu6dy3.d.cts +215 -0
- package/dist/promo.service-CFjfF0Xm.d.ts +215 -0
- package/dist/registration/index.d.cts +29 -4
- package/dist/registration/index.d.ts +29 -4
- package/dist/registration/index.js +12 -5
- package/dist/subscriber/index.d.cts +2 -2
- package/dist/subscriber/index.d.ts +2 -2
- package/dist/subscriber/index.js +5 -4
- package/dist/{subscriber.service-BZsvHw1V.d.cts → subscriber.service-5W6Gi-1B.d.cts} +14 -3
- package/dist/{subscriber.service-BZsvHw1V.d.ts → subscriber.service-5W6Gi-1B.d.ts} +14 -3
- package/dist/subscription-contract/index.d.cts +3 -3
- package/dist/subscription-contract/index.d.ts +3 -3
- package/dist/subscription-contract/index.js +11 -9
- package/dist/{subscription-contract.service-Duv_Ns1W.d.ts → subscription-contract.service-CPZrTM9C.d.ts} +1 -1
- package/dist/{subscription-contract.service-D7Qb_Ns-.d.cts → subscription-contract.service-CfNApLuP.d.cts} +1 -1
- package/dist/{tenant-billing.controller-0HZ_2DQH.d.ts → tenant-billing.controller-BLqbsONe.d.ts} +7 -6
- package/dist/{tenant-billing.controller-CN9DgasV.d.cts → tenant-billing.controller-DKbAqTbM.d.cts} +7 -6
- package/dist/{tenant-billing.module-CPybDf7c.d.cts → tenant-billing.module-ClbjzocC.d.cts} +24 -16
- package/dist/{tenant-billing.module-C1sLBCW-.d.ts → tenant-billing.module-DohgJJ2m.d.ts} +24 -16
- package/dist/testing/index.d.cts +11 -10
- package/dist/testing/index.d.ts +11 -10
- package/dist/testing/index.js +20 -20
- package/package.json +3 -3
- package/dist/chunk-3HT3REXB.js +0 -110
- package/dist/chunk-5BCYJ3QY.js +0 -44
- package/dist/chunk-QSBMFY4I.js +0 -33
- package/dist/chunk-U4X2YRRO.js +0 -214
- package/dist/chunk-XWAZNKAB.js +0 -638
- package/dist/contract-line-item-money-BWWQhRul.d.cts +0 -11
- package/dist/contract-line-item-money-BWWQhRul.d.ts +0 -11
- package/dist/promo.service-CBMm9RU7.d.cts +0 -113
- package/dist/promo.service-CBMm9RU7.d.ts +0 -113
package/dist/catalog/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { B as BundlesService, C as CatalogEntriesService, a as CatalogServiceConfig, M as MarketingProjectionsService, b as MarketingSettingsService, P as PlanVersionsService, c as PlansService, d as PromotionsService
|
|
1
|
+
export { B as BundlesService, C as CatalogEntriesService, a as CatalogServiceConfig, M as MarketingProjectionsService, b as MarketingSettingsService, P as PlanVersionsService, c as PlansService, d as PromotionsService } from '../plan-versions.service-DARLh-qI.cjs';
|
|
2
2
|
import { Type, CanActivate } from '@nestjs/common';
|
|
3
|
-
export { a as CatalogControllerConfig, b as CatalogModule, C as CatalogModuleOptions } from '../catalog.module-
|
|
3
|
+
export { a as CatalogControllerConfig, b as CatalogModule, C as CatalogModuleOptions, N as NewPaymentMethodsSource, P as PublicMarketingCatalogOptions, c as PublicMarketingCatalogService } from '../catalog.module-T-I5Ricz.cjs';
|
|
4
4
|
import { StrictModeWarningCode, StrictModeWarning, DiscoverySnapshot, ApprovedCatalogKeys, DiscoveredQuota, CatalogEntryRepository, PlanVersionRow, BundleVersionRow, DiscoveryStatus, CatalogEntryI18n, PromotionType, PromotionValue, PromotionTargetType, PromotionBillingCycle, PromotionI18n } from '@saasicat/core';
|
|
5
5
|
import '../discovery.scanner-DXKc6JkV.cjs';
|
|
6
6
|
import '@nestjs/core';
|
|
@@ -68,6 +68,13 @@ declare const CATALOG_SERVICE_CONFIG_TOKEN: unique symbol;
|
|
|
68
68
|
* is namespaced accordingly so the two never collide.
|
|
69
69
|
*/
|
|
70
70
|
declare const CATALOG_FEATURE_UI_REGISTRY_TOKEN: unique symbol;
|
|
71
|
+
/**
|
|
72
|
+
* Where the public catalogue reads what a new payment method is taken with —
|
|
73
|
+
* `PaymentGatewayRegistry` where the application wired payments, and `null`
|
|
74
|
+
* where it did not. Always provided, so a catalogue that answers the question
|
|
75
|
+
* cannot be wired without an answer to it.
|
|
76
|
+
*/
|
|
77
|
+
declare const NEW_PAYMENT_METHODS_SOURCE_TOKEN: unique symbol;
|
|
71
78
|
|
|
72
79
|
/**
|
|
73
80
|
* Advisory warnings (#35): they inform but never block — not even in
|
|
@@ -345,6 +352,12 @@ declare class UpdateBundleDto {
|
|
|
345
352
|
description?: string;
|
|
346
353
|
}>;
|
|
347
354
|
}
|
|
355
|
+
/** One plan's own price for a bundle version, in `pricingOverrides`. */
|
|
356
|
+
declare class BundlePricingOverrideDto {
|
|
357
|
+
planId?: string;
|
|
358
|
+
monthlyNet?: string | null;
|
|
359
|
+
yearlyNet?: string | null;
|
|
360
|
+
}
|
|
348
361
|
/**
|
|
349
362
|
* Everything a version draft may carry apart from its feature list.
|
|
350
363
|
*
|
|
@@ -363,11 +376,7 @@ declare class BundleVersionDraftFieldsDto {
|
|
|
363
376
|
compatibility?: {
|
|
364
377
|
planIds?: string[];
|
|
365
378
|
};
|
|
366
|
-
pricingOverrides?:
|
|
367
|
-
planId?: string;
|
|
368
|
-
monthlyNet?: string | null;
|
|
369
|
-
yearlyNet?: string | null;
|
|
370
|
-
}>;
|
|
379
|
+
pricingOverrides?: BundlePricingOverrideDto[];
|
|
371
380
|
monthlyNet?: string | null;
|
|
372
381
|
yearlyNet?: string | null;
|
|
373
382
|
marketed?: boolean;
|
|
@@ -567,4 +576,4 @@ declare class PublishPlanVersionDto {
|
|
|
567
576
|
validUntil?: string | null;
|
|
568
577
|
}
|
|
569
578
|
|
|
570
|
-
export { ADVISORY_STRICT_MODE_CODES, BUNDLE_REPOSITORY_TOKEN, BUNDLE_VERSION_WINDOW_CODES, CATALOG_ENTRY_REPOSITORY_TOKEN, CATALOG_FEATURE_UI_REGISTRY_TOKEN, CATALOG_SERVICE_CONFIG_TOKEN, CreateBundleDto, CreateBundleVersionDraftDto, CreateMarketingProjectionDto, CreatePlanDto, CreatePlanVersionDraftDto, CreatePromotionDto, ListCatalogEntriesQueryDto, ListMarketingProjectionsQueryDto, MARKETING_PROJECTION_REPOSITORY_TOKEN, MARKETING_SETTINGS_REPOSITORY_TOKEN, PLAN_REPOSITORY_TOKEN, PLAN_VERSION_WINDOW_CODES, PROMOTION_REPOSITORY_TOKEN, type PreflightFinding, type PreflightInput, type PreflightReport, type PreviousWindow, 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, type ValidityWindowCodes, type ValidityWindowInput, blockingStrictModeWarnings, buildBundleVersionsController, buildBundlesController, buildCatalogEntriesController, buildMarketingProjectionsController, buildMarketingSettingsController, buildPlanVersionsController, buildPlansController, buildPromotionsController, buildPublicMarketingCatalogController, featureApprovalSignature, formatPreflightReport, formatSeedGateReport, loadApprovedCatalogKeys, preflightExitCode, quotaApprovalSignature, resolveValidityWindow, runPreflight, runSeedGateFromFile, seedGateExitCode, validateBundleDraft, validatePlanDraft, validateSeedAgainstSnapshot };
|
|
579
|
+
export { ADVISORY_STRICT_MODE_CODES, BUNDLE_REPOSITORY_TOKEN, BUNDLE_VERSION_WINDOW_CODES, CATALOG_ENTRY_REPOSITORY_TOKEN, CATALOG_FEATURE_UI_REGISTRY_TOKEN, CATALOG_SERVICE_CONFIG_TOKEN, CreateBundleDto, CreateBundleVersionDraftDto, CreateMarketingProjectionDto, CreatePlanDto, CreatePlanVersionDraftDto, CreatePromotionDto, ListCatalogEntriesQueryDto, ListMarketingProjectionsQueryDto, MARKETING_PROJECTION_REPOSITORY_TOKEN, MARKETING_SETTINGS_REPOSITORY_TOKEN, NEW_PAYMENT_METHODS_SOURCE_TOKEN, PLAN_REPOSITORY_TOKEN, PLAN_VERSION_WINDOW_CODES, PROMOTION_REPOSITORY_TOKEN, type PreflightFinding, type PreflightInput, type PreflightReport, type PreviousWindow, 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, type ValidityWindowCodes, type ValidityWindowInput, blockingStrictModeWarnings, buildBundleVersionsController, buildBundlesController, buildCatalogEntriesController, buildMarketingProjectionsController, buildMarketingSettingsController, buildPlanVersionsController, buildPlansController, buildPromotionsController, buildPublicMarketingCatalogController, featureApprovalSignature, formatPreflightReport, formatSeedGateReport, loadApprovedCatalogKeys, preflightExitCode, quotaApprovalSignature, resolveValidityWindow, runPreflight, runSeedGateFromFile, seedGateExitCode, validateBundleDraft, validatePlanDraft, validateSeedAgainstSnapshot };
|
package/dist/catalog/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { B as BundlesService, C as CatalogEntriesService, a as CatalogServiceConfig, M as MarketingProjectionsService, b as MarketingSettingsService, P as PlanVersionsService, c as PlansService, d as PromotionsService
|
|
1
|
+
export { B as BundlesService, C as CatalogEntriesService, a as CatalogServiceConfig, M as MarketingProjectionsService, b as MarketingSettingsService, P as PlanVersionsService, c as PlansService, d as PromotionsService } from '../plan-versions.service-C0N-Em2W.js';
|
|
2
2
|
import { Type, CanActivate } from '@nestjs/common';
|
|
3
|
-
export { a as CatalogControllerConfig, b as CatalogModule, C as CatalogModuleOptions } from '../catalog.module-
|
|
3
|
+
export { a as CatalogControllerConfig, b as CatalogModule, C as CatalogModuleOptions, N as NewPaymentMethodsSource, P as PublicMarketingCatalogOptions, c as PublicMarketingCatalogService } from '../catalog.module-C9O7BxRq.js';
|
|
4
4
|
import { StrictModeWarningCode, StrictModeWarning, DiscoverySnapshot, ApprovedCatalogKeys, DiscoveredQuota, CatalogEntryRepository, PlanVersionRow, BundleVersionRow, DiscoveryStatus, CatalogEntryI18n, PromotionType, PromotionValue, PromotionTargetType, PromotionBillingCycle, PromotionI18n } from '@saasicat/core';
|
|
5
5
|
import '../discovery.scanner-DXKc6JkV.js';
|
|
6
6
|
import '@nestjs/core';
|
|
@@ -68,6 +68,13 @@ declare const CATALOG_SERVICE_CONFIG_TOKEN: unique symbol;
|
|
|
68
68
|
* is namespaced accordingly so the two never collide.
|
|
69
69
|
*/
|
|
70
70
|
declare const CATALOG_FEATURE_UI_REGISTRY_TOKEN: unique symbol;
|
|
71
|
+
/**
|
|
72
|
+
* Where the public catalogue reads what a new payment method is taken with —
|
|
73
|
+
* `PaymentGatewayRegistry` where the application wired payments, and `null`
|
|
74
|
+
* where it did not. Always provided, so a catalogue that answers the question
|
|
75
|
+
* cannot be wired without an answer to it.
|
|
76
|
+
*/
|
|
77
|
+
declare const NEW_PAYMENT_METHODS_SOURCE_TOKEN: unique symbol;
|
|
71
78
|
|
|
72
79
|
/**
|
|
73
80
|
* Advisory warnings (#35): they inform but never block — not even in
|
|
@@ -345,6 +352,12 @@ declare class UpdateBundleDto {
|
|
|
345
352
|
description?: string;
|
|
346
353
|
}>;
|
|
347
354
|
}
|
|
355
|
+
/** One plan's own price for a bundle version, in `pricingOverrides`. */
|
|
356
|
+
declare class BundlePricingOverrideDto {
|
|
357
|
+
planId?: string;
|
|
358
|
+
monthlyNet?: string | null;
|
|
359
|
+
yearlyNet?: string | null;
|
|
360
|
+
}
|
|
348
361
|
/**
|
|
349
362
|
* Everything a version draft may carry apart from its feature list.
|
|
350
363
|
*
|
|
@@ -363,11 +376,7 @@ declare class BundleVersionDraftFieldsDto {
|
|
|
363
376
|
compatibility?: {
|
|
364
377
|
planIds?: string[];
|
|
365
378
|
};
|
|
366
|
-
pricingOverrides?:
|
|
367
|
-
planId?: string;
|
|
368
|
-
monthlyNet?: string | null;
|
|
369
|
-
yearlyNet?: string | null;
|
|
370
|
-
}>;
|
|
379
|
+
pricingOverrides?: BundlePricingOverrideDto[];
|
|
371
380
|
monthlyNet?: string | null;
|
|
372
381
|
yearlyNet?: string | null;
|
|
373
382
|
marketed?: boolean;
|
|
@@ -567,4 +576,4 @@ declare class PublishPlanVersionDto {
|
|
|
567
576
|
validUntil?: string | null;
|
|
568
577
|
}
|
|
569
578
|
|
|
570
|
-
export { ADVISORY_STRICT_MODE_CODES, BUNDLE_REPOSITORY_TOKEN, BUNDLE_VERSION_WINDOW_CODES, CATALOG_ENTRY_REPOSITORY_TOKEN, CATALOG_FEATURE_UI_REGISTRY_TOKEN, CATALOG_SERVICE_CONFIG_TOKEN, CreateBundleDto, CreateBundleVersionDraftDto, CreateMarketingProjectionDto, CreatePlanDto, CreatePlanVersionDraftDto, CreatePromotionDto, ListCatalogEntriesQueryDto, ListMarketingProjectionsQueryDto, MARKETING_PROJECTION_REPOSITORY_TOKEN, MARKETING_SETTINGS_REPOSITORY_TOKEN, PLAN_REPOSITORY_TOKEN, PLAN_VERSION_WINDOW_CODES, PROMOTION_REPOSITORY_TOKEN, type PreflightFinding, type PreflightInput, type PreflightReport, type PreviousWindow, 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, type ValidityWindowCodes, type ValidityWindowInput, blockingStrictModeWarnings, buildBundleVersionsController, buildBundlesController, buildCatalogEntriesController, buildMarketingProjectionsController, buildMarketingSettingsController, buildPlanVersionsController, buildPlansController, buildPromotionsController, buildPublicMarketingCatalogController, featureApprovalSignature, formatPreflightReport, formatSeedGateReport, loadApprovedCatalogKeys, preflightExitCode, quotaApprovalSignature, resolveValidityWindow, runPreflight, runSeedGateFromFile, seedGateExitCode, validateBundleDraft, validatePlanDraft, validateSeedAgainstSnapshot };
|
|
579
|
+
export { ADVISORY_STRICT_MODE_CODES, BUNDLE_REPOSITORY_TOKEN, BUNDLE_VERSION_WINDOW_CODES, CATALOG_ENTRY_REPOSITORY_TOKEN, CATALOG_FEATURE_UI_REGISTRY_TOKEN, CATALOG_SERVICE_CONFIG_TOKEN, CreateBundleDto, CreateBundleVersionDraftDto, CreateMarketingProjectionDto, CreatePlanDto, CreatePlanVersionDraftDto, CreatePromotionDto, ListCatalogEntriesQueryDto, ListMarketingProjectionsQueryDto, MARKETING_PROJECTION_REPOSITORY_TOKEN, MARKETING_SETTINGS_REPOSITORY_TOKEN, NEW_PAYMENT_METHODS_SOURCE_TOKEN, PLAN_REPOSITORY_TOKEN, PLAN_VERSION_WINDOW_CODES, PROMOTION_REPOSITORY_TOKEN, type PreflightFinding, type PreflightInput, type PreflightReport, type PreviousWindow, 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, type ValidityWindowCodes, type ValidityWindowInput, blockingStrictModeWarnings, buildBundleVersionsController, buildBundlesController, buildCatalogEntriesController, buildMarketingProjectionsController, buildMarketingSettingsController, buildPlanVersionsController, buildPlansController, buildPromotionsController, buildPublicMarketingCatalogController, featureApprovalSignature, formatPreflightReport, formatSeedGateReport, loadApprovedCatalogKeys, preflightExitCode, quotaApprovalSignature, resolveValidityWindow, 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-F5X66HF5.js";
|
|
10
10
|
import {
|
|
11
11
|
ADVISORY_STRICT_MODE_CODES,
|
|
12
12
|
BUNDLE_VERSION_WINDOW_CODES,
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
resolveValidityWindow,
|
|
57
57
|
validateBundleDraft,
|
|
58
58
|
validatePlanDraft
|
|
59
|
-
} from "../chunk-
|
|
59
|
+
} from "../chunk-CQ2ZZMTD.js";
|
|
60
60
|
import "../chunk-GZTL64QK.js";
|
|
61
61
|
import "../chunk-34XVPR6P.js";
|
|
62
62
|
import "../chunk-OOTEXP47.js";
|
|
@@ -71,9 +71,10 @@ import {
|
|
|
71
71
|
CATALOG_SERVICE_CONFIG_TOKEN,
|
|
72
72
|
MARKETING_PROJECTION_REPOSITORY_TOKEN,
|
|
73
73
|
MARKETING_SETTINGS_REPOSITORY_TOKEN,
|
|
74
|
+
NEW_PAYMENT_METHODS_SOURCE_TOKEN,
|
|
74
75
|
PLAN_REPOSITORY_TOKEN,
|
|
75
76
|
PROMOTION_REPOSITORY_TOKEN
|
|
76
|
-
} from "../chunk-
|
|
77
|
+
} from "../chunk-3QVGA6JX.js";
|
|
77
78
|
import "../chunk-QUZU2M33.js";
|
|
78
79
|
import "../chunk-GPQWGA6B.js";
|
|
79
80
|
import "../chunk-SZ7RFPXA.js";
|
|
@@ -102,6 +103,7 @@ export {
|
|
|
102
103
|
MARKETING_SETTINGS_REPOSITORY_TOKEN,
|
|
103
104
|
MarketingProjectionsService,
|
|
104
105
|
MarketingSettingsService,
|
|
106
|
+
NEW_PAYMENT_METHODS_SOURCE_TOKEN,
|
|
105
107
|
PLAN_REPOSITORY_TOKEN,
|
|
106
108
|
PLAN_VERSION_WINDOW_CODES,
|
|
107
109
|
PROMOTION_REPOSITORY_TOKEN,
|
|
@@ -1,7 +1,84 @@
|
|
|
1
1
|
import { Type, CanActivate, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { PaymentMethodType, PlanRepository, MarketingProjectionRepository, PromotionRepository, CatalogEntryRepository, BundleRepository, PublicMarketingCatalogResponse, MarketingSettingsRepository, FeatureUiRegistry } from '@saasicat/core';
|
|
3
3
|
import { P as ProviderSpec } from './di-CcNeq9v-.js';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* What the catalogue needs of whatever knows the payment accounts: the account
|
|
7
|
+
* new payment methods are taken at, or `null` where none takes them.
|
|
8
|
+
* `PaymentGatewayRegistry` satisfies it; the shape keeps this module free of a
|
|
9
|
+
* dependency on the payments module.
|
|
10
|
+
*/
|
|
11
|
+
interface NewPaymentMethodsSource {
|
|
12
|
+
forNewPaymentMethods(): {
|
|
13
|
+
methods: readonly PaymentMethodType[];
|
|
14
|
+
} | null;
|
|
15
|
+
}
|
|
16
|
+
declare class PublicMarketingCatalogService {
|
|
17
|
+
private readonly planRepo;
|
|
18
|
+
private readonly marketingRepo;
|
|
19
|
+
private readonly promotionRepo;
|
|
20
|
+
private readonly catalogEntryRepo;
|
|
21
|
+
private readonly bundleRepo;
|
|
22
|
+
private readonly newPaymentMethodsSource;
|
|
23
|
+
constructor(planRepo: PlanRepository, marketingRepo: MarketingProjectionRepository, promotionRepo: PromotionRepository, catalogEntryRepo: (CatalogEntryRepository | null) | undefined, bundleRepo: (BundleRepository | null) | undefined, newPaymentMethodsSource: NewPaymentMethodsSource | null);
|
|
24
|
+
/** What a new payment method is taken with here, for the page that offers the plans. */
|
|
25
|
+
private newPaymentMethods;
|
|
26
|
+
getCatalog(locale: string, currency: string, vatRate: number, asOf?: Date): Promise<PublicMarketingCatalogResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* Loads all published-and-live bundle versions and filters on
|
|
29
|
+
* `marketed === true`. Without a registered `BundleRepository` (apps
|
|
30
|
+
* without the SuperAdmin bundle editor) the list is empty — the public
|
|
31
|
+
* catalog stays plan-only.
|
|
32
|
+
*/
|
|
33
|
+
private loadMarketedBundles;
|
|
34
|
+
/**
|
|
35
|
+
* Maps BundleVersionRow → PublicMarketingBundle. Locale resolution
|
|
36
|
+
* runs via `MarketingProjectionRepository.findByTarget('BUNDLE',
|
|
37
|
+
* bundleVersionId, locale)` — on a miss it falls back to
|
|
38
|
+
* `DEFAULT_LOCALE`. If the fallback is missing too, label/description
|
|
39
|
+
* come directly from the bundle root (denormalized in `BundleVersionRow`).
|
|
40
|
+
*
|
|
41
|
+
* If the marketing projection is `visible === false`, the bundle is
|
|
42
|
+
* hidden from the public response (preparation phase).
|
|
43
|
+
*/
|
|
44
|
+
private toPublicBundle;
|
|
45
|
+
/**
|
|
46
|
+
* Labels for bundle features ∪ their requires (#48): `comparison.features`
|
|
47
|
+
* only covers the plan-feature union — bundle-only features would
|
|
48
|
+
* otherwise get no label in the public payload. Curated keys only;
|
|
49
|
+
* without a CatalogEntryRepository the map stays empty (frontends fall
|
|
50
|
+
* back to the key).
|
|
51
|
+
*/
|
|
52
|
+
private resolveBundleFeatureLabels;
|
|
53
|
+
/** Loads the translated feature/quota labels (+ sortOrder) for a locale. */
|
|
54
|
+
private loadLabelMeta;
|
|
55
|
+
/**
|
|
56
|
+
* Resolves the displayed label of a top feature: the `label` override
|
|
57
|
+
* wins; otherwise the translated label of the referenced `key`.
|
|
58
|
+
*/
|
|
59
|
+
private resolveTopFeature;
|
|
60
|
+
/** Row definitions of the comparison matrix (feature/quota union + labels). */
|
|
61
|
+
private buildComparison;
|
|
62
|
+
private resolvePromo;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** What the auth-free pricing-page endpoint is mounted with. */
|
|
66
|
+
interface PublicMarketingCatalogOptions {
|
|
67
|
+
guards: Array<Type<CanActivate>>;
|
|
68
|
+
currency: string;
|
|
69
|
+
vatRate: number;
|
|
70
|
+
/**
|
|
71
|
+
* Where the catalogue reads what a new payment method is taken with —
|
|
72
|
+
* `PaymentGatewayRegistry` from `@saasicat/nest/payments` where the
|
|
73
|
+
* application wired payments, and `null` where nothing takes them.
|
|
74
|
+
*
|
|
75
|
+
* Required and nullable rather than optional, because leaving it out is not
|
|
76
|
+
* silence: the endpoint would publish that no payment method is taken,
|
|
77
|
+
* which is a claim, and an application whose form takes one would publish
|
|
78
|
+
* the opposite of what it does. `SaaSiCatModule` fills it from `payments`.
|
|
79
|
+
*/
|
|
80
|
+
newPaymentMethodsFrom: Type<NewPaymentMethodsSource> | null;
|
|
81
|
+
}
|
|
5
82
|
interface CatalogControllerConfig {
|
|
6
83
|
/**
|
|
7
84
|
* Class-level guards for `BundlesController` and `BundleVersionsController`.
|
|
@@ -45,11 +122,7 @@ interface CatalogModuleOptions {
|
|
|
45
122
|
*. Registered only when plan-, marketingProjection-
|
|
46
123
|
* and promotionRepository are set. `guards` is usually `[]`.
|
|
47
124
|
*/
|
|
48
|
-
publicMarketingCatalog?:
|
|
49
|
-
guards: Array<Type<CanActivate>>;
|
|
50
|
-
currency: string;
|
|
51
|
-
vatRate: number;
|
|
52
|
-
};
|
|
125
|
+
publicMarketingCatalog?: PublicMarketingCatalogOptions;
|
|
53
126
|
/**
|
|
54
127
|
* — adapter for `plans` master-record persistence.
|
|
55
128
|
* Optional; if omitted, PlansService + controller are not
|
|
@@ -104,4 +177,4 @@ declare class CatalogModule {
|
|
|
104
177
|
static forRoot(options: CatalogModuleOptions): DynamicModule;
|
|
105
178
|
}
|
|
106
179
|
|
|
107
|
-
export { type CatalogModuleOptions as C, type CatalogControllerConfig as a, CatalogModule as b };
|
|
180
|
+
export { type CatalogModuleOptions as C, type NewPaymentMethodsSource as N, type PublicMarketingCatalogOptions as P, type CatalogControllerConfig as a, CatalogModule as b, PublicMarketingCatalogService as c };
|
|
@@ -1,7 +1,84 @@
|
|
|
1
1
|
import { Type, CanActivate, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import { PaymentMethodType, PlanRepository, MarketingProjectionRepository, PromotionRepository, CatalogEntryRepository, BundleRepository, PublicMarketingCatalogResponse, MarketingSettingsRepository, FeatureUiRegistry } from '@saasicat/core';
|
|
3
3
|
import { P as ProviderSpec } from './di-CcNeq9v-.cjs';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* What the catalogue needs of whatever knows the payment accounts: the account
|
|
7
|
+
* new payment methods are taken at, or `null` where none takes them.
|
|
8
|
+
* `PaymentGatewayRegistry` satisfies it; the shape keeps this module free of a
|
|
9
|
+
* dependency on the payments module.
|
|
10
|
+
*/
|
|
11
|
+
interface NewPaymentMethodsSource {
|
|
12
|
+
forNewPaymentMethods(): {
|
|
13
|
+
methods: readonly PaymentMethodType[];
|
|
14
|
+
} | null;
|
|
15
|
+
}
|
|
16
|
+
declare class PublicMarketingCatalogService {
|
|
17
|
+
private readonly planRepo;
|
|
18
|
+
private readonly marketingRepo;
|
|
19
|
+
private readonly promotionRepo;
|
|
20
|
+
private readonly catalogEntryRepo;
|
|
21
|
+
private readonly bundleRepo;
|
|
22
|
+
private readonly newPaymentMethodsSource;
|
|
23
|
+
constructor(planRepo: PlanRepository, marketingRepo: MarketingProjectionRepository, promotionRepo: PromotionRepository, catalogEntryRepo: (CatalogEntryRepository | null) | undefined, bundleRepo: (BundleRepository | null) | undefined, newPaymentMethodsSource: NewPaymentMethodsSource | null);
|
|
24
|
+
/** What a new payment method is taken with here, for the page that offers the plans. */
|
|
25
|
+
private newPaymentMethods;
|
|
26
|
+
getCatalog(locale: string, currency: string, vatRate: number, asOf?: Date): Promise<PublicMarketingCatalogResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* Loads all published-and-live bundle versions and filters on
|
|
29
|
+
* `marketed === true`. Without a registered `BundleRepository` (apps
|
|
30
|
+
* without the SuperAdmin bundle editor) the list is empty — the public
|
|
31
|
+
* catalog stays plan-only.
|
|
32
|
+
*/
|
|
33
|
+
private loadMarketedBundles;
|
|
34
|
+
/**
|
|
35
|
+
* Maps BundleVersionRow → PublicMarketingBundle. Locale resolution
|
|
36
|
+
* runs via `MarketingProjectionRepository.findByTarget('BUNDLE',
|
|
37
|
+
* bundleVersionId, locale)` — on a miss it falls back to
|
|
38
|
+
* `DEFAULT_LOCALE`. If the fallback is missing too, label/description
|
|
39
|
+
* come directly from the bundle root (denormalized in `BundleVersionRow`).
|
|
40
|
+
*
|
|
41
|
+
* If the marketing projection is `visible === false`, the bundle is
|
|
42
|
+
* hidden from the public response (preparation phase).
|
|
43
|
+
*/
|
|
44
|
+
private toPublicBundle;
|
|
45
|
+
/**
|
|
46
|
+
* Labels for bundle features ∪ their requires (#48): `comparison.features`
|
|
47
|
+
* only covers the plan-feature union — bundle-only features would
|
|
48
|
+
* otherwise get no label in the public payload. Curated keys only;
|
|
49
|
+
* without a CatalogEntryRepository the map stays empty (frontends fall
|
|
50
|
+
* back to the key).
|
|
51
|
+
*/
|
|
52
|
+
private resolveBundleFeatureLabels;
|
|
53
|
+
/** Loads the translated feature/quota labels (+ sortOrder) for a locale. */
|
|
54
|
+
private loadLabelMeta;
|
|
55
|
+
/**
|
|
56
|
+
* Resolves the displayed label of a top feature: the `label` override
|
|
57
|
+
* wins; otherwise the translated label of the referenced `key`.
|
|
58
|
+
*/
|
|
59
|
+
private resolveTopFeature;
|
|
60
|
+
/** Row definitions of the comparison matrix (feature/quota union + labels). */
|
|
61
|
+
private buildComparison;
|
|
62
|
+
private resolvePromo;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** What the auth-free pricing-page endpoint is mounted with. */
|
|
66
|
+
interface PublicMarketingCatalogOptions {
|
|
67
|
+
guards: Array<Type<CanActivate>>;
|
|
68
|
+
currency: string;
|
|
69
|
+
vatRate: number;
|
|
70
|
+
/**
|
|
71
|
+
* Where the catalogue reads what a new payment method is taken with —
|
|
72
|
+
* `PaymentGatewayRegistry` from `@saasicat/nest/payments` where the
|
|
73
|
+
* application wired payments, and `null` where nothing takes them.
|
|
74
|
+
*
|
|
75
|
+
* Required and nullable rather than optional, because leaving it out is not
|
|
76
|
+
* silence: the endpoint would publish that no payment method is taken,
|
|
77
|
+
* which is a claim, and an application whose form takes one would publish
|
|
78
|
+
* the opposite of what it does. `SaaSiCatModule` fills it from `payments`.
|
|
79
|
+
*/
|
|
80
|
+
newPaymentMethodsFrom: Type<NewPaymentMethodsSource> | null;
|
|
81
|
+
}
|
|
5
82
|
interface CatalogControllerConfig {
|
|
6
83
|
/**
|
|
7
84
|
* Class-level guards for `BundlesController` and `BundleVersionsController`.
|
|
@@ -45,11 +122,7 @@ interface CatalogModuleOptions {
|
|
|
45
122
|
*. Registered only when plan-, marketingProjection-
|
|
46
123
|
* and promotionRepository are set. `guards` is usually `[]`.
|
|
47
124
|
*/
|
|
48
|
-
publicMarketingCatalog?:
|
|
49
|
-
guards: Array<Type<CanActivate>>;
|
|
50
|
-
currency: string;
|
|
51
|
-
vatRate: number;
|
|
52
|
-
};
|
|
125
|
+
publicMarketingCatalog?: PublicMarketingCatalogOptions;
|
|
53
126
|
/**
|
|
54
127
|
* — adapter for `plans` master-record persistence.
|
|
55
128
|
* Optional; if omitted, PlansService + controller are not
|
|
@@ -104,4 +177,4 @@ declare class CatalogModule {
|
|
|
104
177
|
static forRoot(options: CatalogModuleOptions): DynamicModule;
|
|
105
178
|
}
|
|
106
179
|
|
|
107
|
-
export { type CatalogModuleOptions as C, type CatalogControllerConfig as a, CatalogModule as b };
|
|
180
|
+
export { type CatalogModuleOptions as C, type NewPaymentMethodsSource as N, type PublicMarketingCatalogOptions as P, type CatalogControllerConfig as a, CatalogModule as b, PublicMarketingCatalogService as c };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export { C as CheckoutOfferPricing, a as CheckoutOfferPricingInput, b as CheckoutOfferService, c as ConcludeCheckoutOfferOptions, d as ConcludeCheckoutOfferWithin, e as ConcludedCheckoutOffer, P as PricedCheckoutOffer } from '../checkout-offer.service-
|
|
1
|
+
export { C as CheckoutOfferPricing, a as CheckoutOfferPricingInput, b as CheckoutOfferService, c as ConcludeCheckoutOfferOptions, d as ConcludeCheckoutOfferWithin, e as ConcludedCheckoutOffer, P as PricedCheckoutOffer } from '../checkout-offer.service-CCVxG9b2.cjs';
|
|
2
2
|
import { Type, CanActivate } from '@nestjs/common';
|
|
3
3
|
export { a as CheckoutOfferConclusionOptions, b as CheckoutOfferControllerConfig, c as CheckoutOfferModule, C as CheckoutOfferModuleOptions } from '../checkout-offer.module-DFhGy6JO.cjs';
|
|
4
4
|
import { CheckoutOfferSelection, CheckoutOfferSelectionUpdate } from '@saasicat/core';
|
|
5
|
-
import '../subscription-contract.service-
|
|
6
|
-
import '../subscriber.service-
|
|
7
|
-
import '../promo.service-
|
|
5
|
+
import '../subscription-contract.service-CfNApLuP.cjs';
|
|
6
|
+
import '../subscriber.service-5W6Gi-1B.cjs';
|
|
7
|
+
import '../promo.service-BYBu6dy3.cjs';
|
|
8
|
+
import '../plan-catalog-source-DWe-BGY1.cjs';
|
|
8
9
|
import '../di-CcNeq9v-.cjs';
|
|
9
10
|
|
|
10
11
|
declare function buildCheckoutOfferController(guards: Array<Type<CanActivate>>): Type;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export { C as CheckoutOfferPricing, a as CheckoutOfferPricingInput, b as CheckoutOfferService, c as ConcludeCheckoutOfferOptions, d as ConcludeCheckoutOfferWithin, e as ConcludedCheckoutOffer, P as PricedCheckoutOffer } from '../checkout-offer.service-
|
|
1
|
+
export { C as CheckoutOfferPricing, a as CheckoutOfferPricingInput, b as CheckoutOfferService, c as ConcludeCheckoutOfferOptions, d as ConcludeCheckoutOfferWithin, e as ConcludedCheckoutOffer, P as PricedCheckoutOffer } from '../checkout-offer.service-BeHgYikI.js';
|
|
2
2
|
import { Type, CanActivate } from '@nestjs/common';
|
|
3
3
|
export { a as CheckoutOfferConclusionOptions, b as CheckoutOfferControllerConfig, c as CheckoutOfferModule, C as CheckoutOfferModuleOptions } from '../checkout-offer.module-x7SP_dX4.js';
|
|
4
4
|
import { CheckoutOfferSelection, CheckoutOfferSelectionUpdate } from '@saasicat/core';
|
|
5
|
-
import '../subscription-contract.service-
|
|
6
|
-
import '../subscriber.service-
|
|
7
|
-
import '../promo.service-
|
|
5
|
+
import '../subscription-contract.service-CPZrTM9C.js';
|
|
6
|
+
import '../subscriber.service-5W6Gi-1B.js';
|
|
7
|
+
import '../promo.service-CFjfF0Xm.js';
|
|
8
|
+
import '../plan-catalog-source-DWe-BGY1.js';
|
|
8
9
|
import '../di-CcNeq9v-.js';
|
|
9
10
|
|
|
10
11
|
declare function buildCheckoutOfferController(guards: Array<Type<CanActivate>>): Type;
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import "../chunk-DFOW3JVO.js";
|
|
2
2
|
import {
|
|
3
|
-
CHECKOUT_OFFER_REPOSITORY_TOKEN,
|
|
4
|
-
CHECKOUT_OFFER_TRANSACTION_RUNNER_TOKEN,
|
|
5
3
|
CheckoutOfferModule,
|
|
6
|
-
CheckoutOfferPricing,
|
|
7
|
-
CheckoutOfferService,
|
|
8
4
|
CreateCheckoutOfferDto,
|
|
9
5
|
UpdateCheckoutOfferDto,
|
|
10
6
|
buildCheckoutOfferController
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import
|
|
13
|
-
|
|
7
|
+
} from "../chunk-TOEFN7DN.js";
|
|
8
|
+
import {
|
|
9
|
+
CHECKOUT_OFFER_REPOSITORY_TOKEN,
|
|
10
|
+
CHECKOUT_OFFER_TRANSACTION_RUNNER_TOKEN,
|
|
11
|
+
CheckoutOfferPricing,
|
|
12
|
+
CheckoutOfferService
|
|
13
|
+
} from "../chunk-55QEDAMX.js";
|
|
14
|
+
import "../chunk-3RLWML2S.js";
|
|
15
|
+
import "../chunk-NDLC5GYK.js";
|
|
14
16
|
import "../chunk-KPEMTBOP.js";
|
|
15
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-TBBZWZQT.js";
|
|
16
18
|
import "../chunk-VBRYPU7V.js";
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-3HT3REXB.js";
|
|
19
|
+
import "../chunk-6PJE7EWO.js";
|
|
20
|
+
import "../chunk-3QVGA6JX.js";
|
|
21
|
+
import "../chunk-WOEJ6K7M.js";
|
|
22
|
+
import "../chunk-LF6J4YYN.js";
|
|
22
23
|
import "../chunk-YSC46BGM.js";
|
|
23
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-FEQZCWUL.js";
|
|
24
25
|
import "../chunk-J7NJRK3K.js";
|
|
25
26
|
import "../chunk-SHUYVCID.js";
|
|
26
27
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as SubscriptionContractService, C as CreateContractFromOfferOptions } from './subscription-contract.service-
|
|
3
|
-
import { S as SubscriberService } from './subscriber.service-
|
|
4
|
-
import { a as PromoCodesService } from './promo.service-
|
|
1
|
+
import { PlanCatalogSettings, PlanRepository, BundleRepository, PromotionRepository, CheckoutOfferPriceBreakdown, CheckoutOfferLineItem, CheckoutOfferPromotionSnapshot, CheckoutOfferPromoCodeSnapshot, CheckoutOfferRow, CheckoutOfferRepository, CatalogEntryRepository, TransactionRunner, CheckoutOfferFilter, CheckoutOfferSelection, CheckoutOfferSelectionUpdate, NewSubscriberDetails, TransactionContext, SubscriptionContractRecord } from '@saasicat/core';
|
|
2
|
+
import { S as SubscriptionContractService, C as CreateContractFromOfferOptions } from './subscription-contract.service-CPZrTM9C.js';
|
|
3
|
+
import { S as SubscriberService } from './subscriber.service-5W6Gi-1B.js';
|
|
4
|
+
import { a as PromoCodesService } from './promo.service-CFjfF0Xm.js';
|
|
5
5
|
|
|
6
6
|
type Cycle = 'monthly' | 'yearly';
|
|
7
7
|
/** What pricing needs to know about a selection. */
|
|
@@ -11,6 +11,16 @@ interface CheckoutOfferPricingInput {
|
|
|
11
11
|
bundleVersionIds: readonly string[];
|
|
12
12
|
promoCode: string | null;
|
|
13
13
|
locale: string;
|
|
14
|
+
/**
|
|
15
|
+
* The offer when it is priced again. A slot of its promo code held for its
|
|
16
|
+
* checkout is its own, not counted against it.
|
|
17
|
+
*/
|
|
18
|
+
checkoutOfferId?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Priced as the offer is concluded: its held slot also keeps the code as it
|
|
21
|
+
* stood when the slot was taken.
|
|
22
|
+
*/
|
|
23
|
+
concluding?: boolean;
|
|
14
24
|
}
|
|
15
25
|
/** The part of a stored offer the server computes. */
|
|
16
26
|
interface PricedCheckoutOffer {
|
|
@@ -25,12 +35,12 @@ interface PricedCheckoutOffer {
|
|
|
25
35
|
promoCodeSnapshot: CheckoutOfferPromoCodeSnapshot | null;
|
|
26
36
|
}
|
|
27
37
|
declare class CheckoutOfferPricing {
|
|
28
|
-
private readonly
|
|
38
|
+
private readonly settings;
|
|
29
39
|
private readonly plans;
|
|
30
40
|
private readonly bundles;
|
|
31
41
|
private readonly promotions;
|
|
32
42
|
private readonly promoCodes;
|
|
33
|
-
constructor(
|
|
43
|
+
constructor(settings: PlanCatalogSettings, plans: PlanRepository, bundles?: BundleRepository | null, promotions?: PromotionRepository | null, promoCodes?: PromoCodesService | null);
|
|
34
44
|
/** Prices a selection against the plan version on sale now. */
|
|
35
45
|
price(input: CheckoutOfferPricingInput, asOf?: Date): Promise<PricedCheckoutOffer>;
|
|
36
46
|
/**
|
|
@@ -98,16 +108,43 @@ declare class CheckoutOfferService {
|
|
|
98
108
|
private readonly contracts;
|
|
99
109
|
private readonly transactions;
|
|
100
110
|
private readonly subscribers;
|
|
101
|
-
|
|
111
|
+
private readonly promoCodes;
|
|
112
|
+
constructor(repo: CheckoutOfferRepository, pricing: CheckoutOfferPricing, bundles?: BundleRepository | null, plans?: PlanRepository | null, catalogEntries?: CatalogEntryRepository | null, contracts?: SubscriptionContractService | null, transactions?: TransactionRunner | null, subscribers?: SubscriberService | null, promoCodes?: PromoCodesService | null);
|
|
102
113
|
list(filter: CheckoutOfferFilter): Promise<CheckoutOfferRow[]>;
|
|
103
114
|
getById(id: string): Promise<CheckoutOfferRow>;
|
|
104
115
|
/** Prices what the caller chose and stores it as an open offer. */
|
|
105
116
|
create(selection: CheckoutOfferSelection): Promise<CheckoutOfferRow>;
|
|
106
117
|
/**
|
|
107
118
|
* Customization in onboarding — only while the offer is `open`. The plan
|
|
108
|
-
* stays; whatever else changes, the whole offer is priced again.
|
|
119
|
+
* stays; whatever else changes, the whole offer is priced again. A slot of
|
|
120
|
+
* its promo code held for its checkout stays with it while the code does,
|
|
121
|
+
* and is given back when the code is changed or removed.
|
|
109
122
|
*/
|
|
110
123
|
update(id: string, change: CheckoutOfferSelectionUpdate): Promise<CheckoutOfferRow>;
|
|
124
|
+
/**
|
|
125
|
+
* Holds a slot of the offer's promo code for its checkout until `until` —
|
|
126
|
+
* what a sign-up does as its checkout starts, until a confirmation of its
|
|
127
|
+
* payment form can no longer arrive — so that the code cannot run out
|
|
128
|
+
* before the payment is confirmed and the offer concluded. A live slot the
|
|
129
|
+
* offer holds of that code already moves to `until`, never earlier. The
|
|
130
|
+
* conclusion turns the slot into the redemption; the slot goes back when
|
|
131
|
+
* the offer's code changes or `until` passes.
|
|
132
|
+
*
|
|
133
|
+
* Refused, and nothing held, when the offer is no longer open or its code
|
|
134
|
+
* cannot be held: `PROMO_CODE_NOT_REDEEMABLE` with the reason a preview
|
|
135
|
+
* gives, `EXHAUSTED` when every slot is redeemed or held. An offer without
|
|
136
|
+
* a code holds nothing.
|
|
137
|
+
*/
|
|
138
|
+
holdPromoCode(id: string, hold: {
|
|
139
|
+
email?: string;
|
|
140
|
+
until: Date;
|
|
141
|
+
}): Promise<void>;
|
|
142
|
+
/**
|
|
143
|
+
* Gives back the slot held for the offer's checkout while it is still held
|
|
144
|
+
* until `heldUntil`, as the caller wrote it. A slot another start of the
|
|
145
|
+
* checkout moved later stays with the form that start opened.
|
|
146
|
+
*/
|
|
147
|
+
releasePromoCodeHold(id: string, heldUntil: Date): Promise<void>;
|
|
111
148
|
/**
|
|
112
149
|
* Freezes the offer (`status = 'consumed'`). Returns the final
|
|
113
150
|
* snapshot — the caller (registration/billing) writes it
|
|
@@ -158,6 +195,12 @@ declare class CheckoutOfferService {
|
|
|
158
195
|
* where a refusal still undoes everything. Nothing checks the code again
|
|
159
196
|
* after `within`, so a redemption that takes its last slot does not refuse
|
|
160
197
|
* the offer it was redeemed for.
|
|
198
|
+
*
|
|
199
|
+
* A slot held for the offer's checkout (`holdPromoCode`) is the offer's own
|
|
200
|
+
* throughout: the checks before the transaction do not count it against
|
|
201
|
+
* the code and accept the code as it stood when the slot was held, and the
|
|
202
|
+
* redemption in `within` takes that slot rather than a free one. A slot
|
|
203
|
+
* `within` did not redeem is given back before the conclusion commits.
|
|
161
204
|
*/
|
|
162
205
|
conclude(id: string, options: ConcludeCheckoutOfferOptions, within?: ConcludeCheckoutOfferWithin): Promise<ConcludedCheckoutOffer>;
|
|
163
206
|
private assertConsumable;
|