@saasicat/nest 0.9.0 → 0.10.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/_entries.cjs +17678 -0
- package/dist/admin/index.cjs +4 -1533
- package/dist/admin/index.d.cts +10 -173
- package/dist/admin/index.d.ts +10 -173
- package/dist/admin/index.js +3 -2
- package/dist/{admin-resources.module-BybEjZs-.d.cts → admin-resources.module-BZN_yBFj.d.cts} +1 -1
- package/dist/{admin-resources.module-CUCLlUAi.d.ts → admin-resources.module-Cms8MY6h.d.ts} +1 -1
- package/dist/admin-stats.module-15ac5KY3.d.ts +201 -0
- package/dist/admin-stats.module-v4SVvWzj.d.cts +201 -0
- package/dist/billing/index.cjs +4 -5130
- package/dist/billing/index.d.cts +8 -437
- package/dist/billing/index.d.ts +8 -437
- package/dist/billing/index.js +4 -4
- package/dist/catalog/index.cjs +4 -5624
- package/dist/catalog/index.d.cts +5 -328
- package/dist/catalog/index.d.ts +5 -328
- package/dist/catalog/index.js +4 -4
- package/dist/checkout-offer/index.cjs +4 -807
- package/dist/checkout-offer/index.d.cts +5 -84
- package/dist/checkout-offer/index.d.ts +5 -84
- package/dist/checkout-offer/index.js +3 -2
- package/dist/checkout-offer.module-Y0hDOVrq.d.ts +85 -0
- package/dist/checkout-offer.module-ZYF5IsDY.d.cts +85 -0
- package/dist/{chunk-PBQRPDO2.js → chunk-33TP26MR.js} +2 -2
- package/dist/{chunk-CK54YKVK.js → chunk-75JABGZK.js} +16 -16
- package/dist/{chunk-HRU3CP57.js → chunk-BOADBIGB.js} +1 -1
- package/dist/chunk-DBZGV3HC.js +0 -0
- package/dist/{chunk-ZLUGQE5D.js → chunk-E7AJ42AB.js} +8 -8
- package/dist/{chunk-HXAWPPFW.js → chunk-F3VV6EXG.js} +9 -9
- package/dist/{chunk-3M6VLT5N.js → chunk-FVT7KTUI.js} +2 -2
- package/dist/{chunk-GW2I3JZD.js → chunk-GBDUH6DO.js} +1 -1
- package/dist/{chunk-K3OPNVFR.js → chunk-HBFU5AN3.js} +5 -9
- package/dist/{chunk-OFBDEO45.js → chunk-IRWZC3GC.js} +1 -1
- package/dist/chunk-L4KTQ6CL.js +20 -0
- package/dist/{chunk-WGVTXSYW.js → chunk-LZHLGUQI.js} +1 -1
- package/dist/{chunk-ZZMAHX22.js → chunk-PUXLPUVH.js} +15 -12
- package/dist/{chunk-7K5PT2LX.js → chunk-TXDH4FUA.js} +1 -1
- package/dist/chunk-UF53DWWR.js +0 -0
- package/dist/{chunk-AJ3EPELS.js → chunk-V34AA7C7.js} +1 -1
- package/dist/chunk-WJ6BMDL3.js +313 -0
- package/dist/{chunk-M6CZQYPY.js → chunk-Z3FWN3HJ.js} +2 -2
- package/dist/discovery/index.cjs +4 -588
- package/dist/discovery/index.js +3 -3
- package/dist/{enforce-quota.interceptor-SqrQVF91.d.cts → enforce-quota.interceptor-BhkX5nq2.d.cts} +35 -2
- package/dist/{enforce-quota.interceptor-B3CL5MSw.d.ts → enforce-quota.interceptor-CcqZc0Yu.d.ts} +35 -2
- package/dist/entitlement/index.cjs +4 -781
- package/dist/entitlement/index.js +2 -2
- package/dist/index.cjs +4 -15671
- package/dist/index.d.cts +21 -56
- package/dist/index.d.ts +21 -56
- package/dist/index.js +39 -334
- package/dist/{module-DeH_Jkcq.d.cts → module-CSN8j8Tp.d.cts} +1 -1
- package/dist/{module-B5m080F0.d.ts → module-DgYJur6f.d.ts} +1 -1
- package/dist/plan-versions.service-BB36Q1bg.d.ts +329 -0
- package/dist/plan-versions.service-CUR2Whyr.d.cts +329 -0
- package/dist/platform/index.cjs +4 -12925
- package/dist/platform/index.d.cts +17 -9
- package/dist/platform/index.d.ts +17 -9
- package/dist/platform/index.js +98 -14
- package/dist/promo/index.cjs +4 -1520
- package/dist/promo/index.d.cts +6 -21
- package/dist/promo/index.d.ts +6 -21
- package/dist/promo/index.js +2 -2
- package/dist/rate-limit.guard-dntqAlfZ.d.cts +19 -0
- package/dist/rate-limit.guard-dntqAlfZ.d.ts +19 -0
- package/dist/registration/index.cjs +4 -1655
- package/dist/registration/index.js +1 -1
- package/dist/{service-DlhMnYjW.d.ts → service-DX8KbGXl.d.cts} +1 -1
- package/dist/{service-DlhMnYjW.d.cts → service-DX8KbGXl.d.ts} +1 -1
- package/dist/setup.service-BPwJ7My_.d.cts +45 -0
- package/dist/setup.service-D2mrdDDB.d.ts +45 -0
- package/dist/subscription-bundle-preview.service-BkJXHAeP.d.cts +438 -0
- package/dist/subscription-bundle-preview.service-DBbrE_cw.d.ts +438 -0
- package/dist/subscription-contract/index.cjs +4 -471
- package/dist/subscription-contract/index.d.cts +5 -13
- package/dist/subscription-contract/index.d.ts +5 -13
- package/dist/subscription-contract.module-CG9fPKAr.d.cts +14 -0
- package/dist/subscription-contract.module-CVebZzHR.d.ts +14 -0
- package/dist/testing/index.cjs +4 -13888
- package/dist/testing/index.d.cts +5 -5
- package/dist/testing/index.d.ts +5 -5
- package/dist/testing/index.js +10 -10
- package/package.json +4 -4
- package/dist/admin-manifest.service-BMeSLRW4.d.ts +0 -33
- package/dist/admin-manifest.service-StAQe6QO.d.cts +0 -33
- package/dist/chunk-N3WANKSA.js +0 -20
|
@@ -1,89 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import { Type, CanActivate
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
declare class CheckoutOfferService {
|
|
6
|
-
private readonly repo;
|
|
7
|
-
private readonly bundles;
|
|
8
|
-
private readonly plans;
|
|
9
|
-
private readonly catalogEntries;
|
|
10
|
-
constructor(repo: CheckoutOfferRepository, bundles?: BundleRepository | null, plans?: PlanRepository | null, catalogEntries?: CatalogEntryRepository | null);
|
|
11
|
-
list(filter: CheckoutOfferFilter): Promise<CheckoutOfferRow[]>;
|
|
12
|
-
getById(id: string): Promise<CheckoutOfferRow>;
|
|
13
|
-
create(data: CreateCheckoutOfferData): Promise<CheckoutOfferRow>;
|
|
14
|
-
/** Customization in onboarding — only while the offer is `open`. */
|
|
15
|
-
update(id: string, data: UpdateCheckoutOfferData): Promise<CheckoutOfferRow>;
|
|
16
|
-
/**
|
|
17
|
-
* Freezes the offer (`status = 'consumed'`). Returns the final
|
|
18
|
-
* snapshot — the caller (registration/billing) writes it
|
|
19
|
-
* as `Subscription.packageSnapshot`.
|
|
20
|
-
*/
|
|
21
|
-
consume(id: string): Promise<CheckoutOfferRow>;
|
|
22
|
-
/**
|
|
23
|
-
* #35 P6 — server-side requires validation: the dependencies of all
|
|
24
|
-
* features (plan ∪ selected bundles) must be covered within the
|
|
25
|
-
* selection, otherwise an offer would be created whose features cannot
|
|
26
|
-
* work at the tenant (an app-specific validateModuleDependencies check is
|
|
27
|
-
* thereby replaced on the platform side). The requires source are the
|
|
28
|
-
* curated FeatureCatalogEntries; without CatalogEntryRepository it is
|
|
29
|
-
* skipped (graceful — no requires data available).
|
|
30
|
-
*/
|
|
31
|
-
private assertFeatureRequiresSatisfied;
|
|
32
|
-
/**
|
|
33
|
-
* Plan features preferably from the server SSOT (PlanRepository); fallback
|
|
34
|
-
* is the frozen featuresSnapshot of the plan LineItem (adapter without
|
|
35
|
-
* PlanRepository wiring).
|
|
36
|
-
*/
|
|
37
|
-
private resolvePlanFeatures;
|
|
38
|
-
/** Bundle features from the BundleVersions; fallback featuresSnapshot. */
|
|
39
|
-
private resolveBundleFeatures;
|
|
40
|
-
private assertBundleVersionsStillBookable;
|
|
41
|
-
private normalizeCreateData;
|
|
42
|
-
private normalizeUpdateData;
|
|
43
|
-
private resolveLineItems;
|
|
44
|
-
private defaultPlanLineItem;
|
|
45
|
-
private assertOpen;
|
|
46
|
-
private isExpired;
|
|
47
|
-
private dateIsAfterNow;
|
|
48
|
-
private isValidUntilExpired;
|
|
49
|
-
}
|
|
1
|
+
export { C as CheckoutOfferControllerConfig, a as CheckoutOfferModule, b as CheckoutOfferModuleOptions, c as CheckoutOfferService } from '../checkout-offer.module-ZYF5IsDY.cjs';
|
|
2
|
+
import { Type, CanActivate } from '@nestjs/common';
|
|
3
|
+
import { CheckoutOfferPriceBreakdown, CheckoutOfferLineItem, CheckoutOfferPromotionSnapshot, CheckoutOfferPromoCodeSnapshot } from '@saasicat/types';
|
|
4
|
+
import '../di-CcNeq9v-.cjs';
|
|
50
5
|
|
|
51
6
|
declare function buildCheckoutOfferController(guards: Array<Type<CanActivate>>): Type;
|
|
52
7
|
|
|
53
|
-
interface CheckoutOfferControllerConfig {
|
|
54
|
-
/** Class-level guards; `[]` for auth-free public endpoints. */
|
|
55
|
-
guards: Array<Type<CanActivate>>;
|
|
56
|
-
}
|
|
57
|
-
interface CheckoutOfferModuleOptions {
|
|
58
|
-
checkoutOfferRepository: ProviderSpec<CheckoutOfferRepository>;
|
|
59
|
-
/**
|
|
60
|
-
* Optional for V3 revalidation on consume: if set, the service checks
|
|
61
|
-
* whether referenced bundle versions are still bookable. Also provides
|
|
62
|
-
* the bundle features for the requires validation (#35 P6).
|
|
63
|
-
*/
|
|
64
|
-
bundleRepository?: ProviderSpec<BundleRepository>;
|
|
65
|
-
/**
|
|
66
|
-
* Optional for the requires validation (#35 P6): plan features of the
|
|
67
|
-
* chosen plan version. Without wiring, falls back to the featuresSnapshot
|
|
68
|
-
* of the plan line item.
|
|
69
|
-
*/
|
|
70
|
-
planRepository?: ProviderSpec<PlanRepository>;
|
|
71
|
-
/**
|
|
72
|
-
* Optional for the requires validation (#35 P6): requires source =
|
|
73
|
-
* curated FeatureCatalogEntries. Without wiring, the validation is
|
|
74
|
-
* skipped (graceful).
|
|
75
|
-
*/
|
|
76
|
-
catalogEntryRepository?: ProviderSpec<CatalogEntryRepository>;
|
|
77
|
-
/** Controller mount for `/public/checkout-offer`. Omitted = service only. */
|
|
78
|
-
controller?: CheckoutOfferControllerConfig;
|
|
79
|
-
imports?: Array<Type<unknown> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
|
|
80
|
-
extraProviders?: Provider[];
|
|
81
|
-
global?: boolean;
|
|
82
|
-
}
|
|
83
|
-
declare class CheckoutOfferModule {
|
|
84
|
-
static forRoot(options: CheckoutOfferModuleOptions): DynamicModule;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
8
|
/** Repository for `checkout_offers`. */
|
|
88
9
|
declare const CHECKOUT_OFFER_REPOSITORY_TOKEN: unique symbol;
|
|
89
10
|
|
|
@@ -117,4 +38,4 @@ declare class UpdateCheckoutOfferDto {
|
|
|
117
38
|
validUntil?: string | null;
|
|
118
39
|
}
|
|
119
40
|
|
|
120
|
-
export { CHECKOUT_OFFER_REPOSITORY_TOKEN,
|
|
41
|
+
export { CHECKOUT_OFFER_REPOSITORY_TOKEN, CreateCheckoutOfferDto, UpdateCheckoutOfferDto, buildCheckoutOfferController };
|
|
@@ -1,89 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import { Type, CanActivate
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
declare class CheckoutOfferService {
|
|
6
|
-
private readonly repo;
|
|
7
|
-
private readonly bundles;
|
|
8
|
-
private readonly plans;
|
|
9
|
-
private readonly catalogEntries;
|
|
10
|
-
constructor(repo: CheckoutOfferRepository, bundles?: BundleRepository | null, plans?: PlanRepository | null, catalogEntries?: CatalogEntryRepository | null);
|
|
11
|
-
list(filter: CheckoutOfferFilter): Promise<CheckoutOfferRow[]>;
|
|
12
|
-
getById(id: string): Promise<CheckoutOfferRow>;
|
|
13
|
-
create(data: CreateCheckoutOfferData): Promise<CheckoutOfferRow>;
|
|
14
|
-
/** Customization in onboarding — only while the offer is `open`. */
|
|
15
|
-
update(id: string, data: UpdateCheckoutOfferData): Promise<CheckoutOfferRow>;
|
|
16
|
-
/**
|
|
17
|
-
* Freezes the offer (`status = 'consumed'`). Returns the final
|
|
18
|
-
* snapshot — the caller (registration/billing) writes it
|
|
19
|
-
* as `Subscription.packageSnapshot`.
|
|
20
|
-
*/
|
|
21
|
-
consume(id: string): Promise<CheckoutOfferRow>;
|
|
22
|
-
/**
|
|
23
|
-
* #35 P6 — server-side requires validation: the dependencies of all
|
|
24
|
-
* features (plan ∪ selected bundles) must be covered within the
|
|
25
|
-
* selection, otherwise an offer would be created whose features cannot
|
|
26
|
-
* work at the tenant (an app-specific validateModuleDependencies check is
|
|
27
|
-
* thereby replaced on the platform side). The requires source are the
|
|
28
|
-
* curated FeatureCatalogEntries; without CatalogEntryRepository it is
|
|
29
|
-
* skipped (graceful — no requires data available).
|
|
30
|
-
*/
|
|
31
|
-
private assertFeatureRequiresSatisfied;
|
|
32
|
-
/**
|
|
33
|
-
* Plan features preferably from the server SSOT (PlanRepository); fallback
|
|
34
|
-
* is the frozen featuresSnapshot of the plan LineItem (adapter without
|
|
35
|
-
* PlanRepository wiring).
|
|
36
|
-
*/
|
|
37
|
-
private resolvePlanFeatures;
|
|
38
|
-
/** Bundle features from the BundleVersions; fallback featuresSnapshot. */
|
|
39
|
-
private resolveBundleFeatures;
|
|
40
|
-
private assertBundleVersionsStillBookable;
|
|
41
|
-
private normalizeCreateData;
|
|
42
|
-
private normalizeUpdateData;
|
|
43
|
-
private resolveLineItems;
|
|
44
|
-
private defaultPlanLineItem;
|
|
45
|
-
private assertOpen;
|
|
46
|
-
private isExpired;
|
|
47
|
-
private dateIsAfterNow;
|
|
48
|
-
private isValidUntilExpired;
|
|
49
|
-
}
|
|
1
|
+
export { C as CheckoutOfferControllerConfig, a as CheckoutOfferModule, b as CheckoutOfferModuleOptions, c as CheckoutOfferService } from '../checkout-offer.module-Y0hDOVrq.js';
|
|
2
|
+
import { Type, CanActivate } from '@nestjs/common';
|
|
3
|
+
import { CheckoutOfferPriceBreakdown, CheckoutOfferLineItem, CheckoutOfferPromotionSnapshot, CheckoutOfferPromoCodeSnapshot } from '@saasicat/types';
|
|
4
|
+
import '../di-CcNeq9v-.js';
|
|
50
5
|
|
|
51
6
|
declare function buildCheckoutOfferController(guards: Array<Type<CanActivate>>): Type;
|
|
52
7
|
|
|
53
|
-
interface CheckoutOfferControllerConfig {
|
|
54
|
-
/** Class-level guards; `[]` for auth-free public endpoints. */
|
|
55
|
-
guards: Array<Type<CanActivate>>;
|
|
56
|
-
}
|
|
57
|
-
interface CheckoutOfferModuleOptions {
|
|
58
|
-
checkoutOfferRepository: ProviderSpec<CheckoutOfferRepository>;
|
|
59
|
-
/**
|
|
60
|
-
* Optional for V3 revalidation on consume: if set, the service checks
|
|
61
|
-
* whether referenced bundle versions are still bookable. Also provides
|
|
62
|
-
* the bundle features for the requires validation (#35 P6).
|
|
63
|
-
*/
|
|
64
|
-
bundleRepository?: ProviderSpec<BundleRepository>;
|
|
65
|
-
/**
|
|
66
|
-
* Optional for the requires validation (#35 P6): plan features of the
|
|
67
|
-
* chosen plan version. Without wiring, falls back to the featuresSnapshot
|
|
68
|
-
* of the plan line item.
|
|
69
|
-
*/
|
|
70
|
-
planRepository?: ProviderSpec<PlanRepository>;
|
|
71
|
-
/**
|
|
72
|
-
* Optional for the requires validation (#35 P6): requires source =
|
|
73
|
-
* curated FeatureCatalogEntries. Without wiring, the validation is
|
|
74
|
-
* skipped (graceful).
|
|
75
|
-
*/
|
|
76
|
-
catalogEntryRepository?: ProviderSpec<CatalogEntryRepository>;
|
|
77
|
-
/** Controller mount for `/public/checkout-offer`. Omitted = service only. */
|
|
78
|
-
controller?: CheckoutOfferControllerConfig;
|
|
79
|
-
imports?: Array<Type<unknown> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
|
|
80
|
-
extraProviders?: Provider[];
|
|
81
|
-
global?: boolean;
|
|
82
|
-
}
|
|
83
|
-
declare class CheckoutOfferModule {
|
|
84
|
-
static forRoot(options: CheckoutOfferModuleOptions): DynamicModule;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
8
|
/** Repository for `checkout_offers`. */
|
|
88
9
|
declare const CHECKOUT_OFFER_REPOSITORY_TOKEN: unique symbol;
|
|
89
10
|
|
|
@@ -117,4 +38,4 @@ declare class UpdateCheckoutOfferDto {
|
|
|
117
38
|
validUntil?: string | null;
|
|
118
39
|
}
|
|
119
40
|
|
|
120
|
-
export { CHECKOUT_OFFER_REPOSITORY_TOKEN,
|
|
41
|
+
export { CHECKOUT_OFFER_REPOSITORY_TOKEN, CreateCheckoutOfferDto, UpdateCheckoutOfferDto, buildCheckoutOfferController };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "../chunk-DBZGV3HC.js";
|
|
1
2
|
import {
|
|
2
3
|
CHECKOUT_OFFER_REPOSITORY_TOKEN,
|
|
3
4
|
CheckoutOfferModule,
|
|
@@ -5,9 +6,9 @@ import {
|
|
|
5
6
|
CreateCheckoutOfferDto,
|
|
6
7
|
UpdateCheckoutOfferDto,
|
|
7
8
|
buildCheckoutOfferController
|
|
8
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-HBFU5AN3.js";
|
|
9
10
|
import "../chunk-MDIZUVIK.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-L4KTQ6CL.js";
|
|
11
12
|
import "../chunk-SABTXESR.js";
|
|
12
13
|
import "../chunk-SHUYVCID.js";
|
|
13
14
|
export {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { CheckoutOfferRepository, BundleRepository, PlanRepository, CatalogEntryRepository, CheckoutOfferFilter, CheckoutOfferRow, CreateCheckoutOfferData, UpdateCheckoutOfferData } from '@saasicat/types';
|
|
2
|
+
import { Type, CanActivate, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
3
|
+
import { P as ProviderSpec } from './di-CcNeq9v-.js';
|
|
4
|
+
|
|
5
|
+
declare class CheckoutOfferService {
|
|
6
|
+
private readonly repo;
|
|
7
|
+
private readonly bundles;
|
|
8
|
+
private readonly plans;
|
|
9
|
+
private readonly catalogEntries;
|
|
10
|
+
constructor(repo: CheckoutOfferRepository, bundles?: BundleRepository | null, plans?: PlanRepository | null, catalogEntries?: CatalogEntryRepository | null);
|
|
11
|
+
list(filter: CheckoutOfferFilter): Promise<CheckoutOfferRow[]>;
|
|
12
|
+
getById(id: string): Promise<CheckoutOfferRow>;
|
|
13
|
+
create(data: CreateCheckoutOfferData): Promise<CheckoutOfferRow>;
|
|
14
|
+
/** Customization in onboarding — only while the offer is `open`. */
|
|
15
|
+
update(id: string, data: UpdateCheckoutOfferData): Promise<CheckoutOfferRow>;
|
|
16
|
+
/**
|
|
17
|
+
* Freezes the offer (`status = 'consumed'`). Returns the final
|
|
18
|
+
* snapshot — the caller (registration/billing) writes it
|
|
19
|
+
* as `Subscription.packageSnapshot`.
|
|
20
|
+
*/
|
|
21
|
+
consume(id: string): Promise<CheckoutOfferRow>;
|
|
22
|
+
/**
|
|
23
|
+
* #35 P6 — server-side requires validation: the dependencies of all
|
|
24
|
+
* features (plan ∪ selected bundles) must be covered within the
|
|
25
|
+
* selection, otherwise an offer would be created whose features cannot
|
|
26
|
+
* work at the tenant (an app-specific validateModuleDependencies check is
|
|
27
|
+
* thereby replaced on the platform side). The requires source are the
|
|
28
|
+
* curated FeatureCatalogEntries; without CatalogEntryRepository it is
|
|
29
|
+
* skipped (graceful — no requires data available).
|
|
30
|
+
*/
|
|
31
|
+
private assertFeatureRequiresSatisfied;
|
|
32
|
+
/**
|
|
33
|
+
* Plan features preferably from the server SSOT (PlanRepository); fallback
|
|
34
|
+
* is the frozen featuresSnapshot of the plan LineItem (adapter without
|
|
35
|
+
* PlanRepository wiring).
|
|
36
|
+
*/
|
|
37
|
+
private resolvePlanFeatures;
|
|
38
|
+
/** Bundle features from the BundleVersions; fallback featuresSnapshot. */
|
|
39
|
+
private resolveBundleFeatures;
|
|
40
|
+
private assertBundleVersionsStillBookable;
|
|
41
|
+
private normalizeCreateData;
|
|
42
|
+
private normalizeUpdateData;
|
|
43
|
+
private resolveLineItems;
|
|
44
|
+
private defaultPlanLineItem;
|
|
45
|
+
private assertOpen;
|
|
46
|
+
private isExpired;
|
|
47
|
+
private dateIsAfterNow;
|
|
48
|
+
private isValidUntilExpired;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface CheckoutOfferControllerConfig {
|
|
52
|
+
/** Class-level guards; `[]` for auth-free public endpoints. */
|
|
53
|
+
guards: Array<Type<CanActivate>>;
|
|
54
|
+
}
|
|
55
|
+
interface CheckoutOfferModuleOptions {
|
|
56
|
+
checkoutOfferRepository: ProviderSpec<CheckoutOfferRepository>;
|
|
57
|
+
/**
|
|
58
|
+
* Optional for V3 revalidation on consume: if set, the service checks
|
|
59
|
+
* whether referenced bundle versions are still bookable. Also provides
|
|
60
|
+
* the bundle features for the requires validation (#35 P6).
|
|
61
|
+
*/
|
|
62
|
+
bundleRepository?: ProviderSpec<BundleRepository>;
|
|
63
|
+
/**
|
|
64
|
+
* Optional for the requires validation (#35 P6): plan features of the
|
|
65
|
+
* chosen plan version. Without wiring, falls back to the featuresSnapshot
|
|
66
|
+
* of the plan line item.
|
|
67
|
+
*/
|
|
68
|
+
planRepository?: ProviderSpec<PlanRepository>;
|
|
69
|
+
/**
|
|
70
|
+
* Optional for the requires validation (#35 P6): requires source =
|
|
71
|
+
* curated FeatureCatalogEntries. Without wiring, the validation is
|
|
72
|
+
* skipped (graceful).
|
|
73
|
+
*/
|
|
74
|
+
catalogEntryRepository?: ProviderSpec<CatalogEntryRepository>;
|
|
75
|
+
/** Controller mount for `/public/checkout-offer`. Omitted = service only. */
|
|
76
|
+
controller?: CheckoutOfferControllerConfig;
|
|
77
|
+
imports?: Array<Type<unknown> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
|
|
78
|
+
extraProviders?: Provider[];
|
|
79
|
+
global?: boolean;
|
|
80
|
+
}
|
|
81
|
+
declare class CheckoutOfferModule {
|
|
82
|
+
static forRoot(options: CheckoutOfferModuleOptions): DynamicModule;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export { type CheckoutOfferControllerConfig as C, CheckoutOfferModule as a, type CheckoutOfferModuleOptions as b, CheckoutOfferService as c };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { CheckoutOfferRepository, BundleRepository, PlanRepository, CatalogEntryRepository, CheckoutOfferFilter, CheckoutOfferRow, CreateCheckoutOfferData, UpdateCheckoutOfferData } from '@saasicat/types';
|
|
2
|
+
import { Type, CanActivate, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
3
|
+
import { P as ProviderSpec } from './di-CcNeq9v-.cjs';
|
|
4
|
+
|
|
5
|
+
declare class CheckoutOfferService {
|
|
6
|
+
private readonly repo;
|
|
7
|
+
private readonly bundles;
|
|
8
|
+
private readonly plans;
|
|
9
|
+
private readonly catalogEntries;
|
|
10
|
+
constructor(repo: CheckoutOfferRepository, bundles?: BundleRepository | null, plans?: PlanRepository | null, catalogEntries?: CatalogEntryRepository | null);
|
|
11
|
+
list(filter: CheckoutOfferFilter): Promise<CheckoutOfferRow[]>;
|
|
12
|
+
getById(id: string): Promise<CheckoutOfferRow>;
|
|
13
|
+
create(data: CreateCheckoutOfferData): Promise<CheckoutOfferRow>;
|
|
14
|
+
/** Customization in onboarding — only while the offer is `open`. */
|
|
15
|
+
update(id: string, data: UpdateCheckoutOfferData): Promise<CheckoutOfferRow>;
|
|
16
|
+
/**
|
|
17
|
+
* Freezes the offer (`status = 'consumed'`). Returns the final
|
|
18
|
+
* snapshot — the caller (registration/billing) writes it
|
|
19
|
+
* as `Subscription.packageSnapshot`.
|
|
20
|
+
*/
|
|
21
|
+
consume(id: string): Promise<CheckoutOfferRow>;
|
|
22
|
+
/**
|
|
23
|
+
* #35 P6 — server-side requires validation: the dependencies of all
|
|
24
|
+
* features (plan ∪ selected bundles) must be covered within the
|
|
25
|
+
* selection, otherwise an offer would be created whose features cannot
|
|
26
|
+
* work at the tenant (an app-specific validateModuleDependencies check is
|
|
27
|
+
* thereby replaced on the platform side). The requires source are the
|
|
28
|
+
* curated FeatureCatalogEntries; without CatalogEntryRepository it is
|
|
29
|
+
* skipped (graceful — no requires data available).
|
|
30
|
+
*/
|
|
31
|
+
private assertFeatureRequiresSatisfied;
|
|
32
|
+
/**
|
|
33
|
+
* Plan features preferably from the server SSOT (PlanRepository); fallback
|
|
34
|
+
* is the frozen featuresSnapshot of the plan LineItem (adapter without
|
|
35
|
+
* PlanRepository wiring).
|
|
36
|
+
*/
|
|
37
|
+
private resolvePlanFeatures;
|
|
38
|
+
/** Bundle features from the BundleVersions; fallback featuresSnapshot. */
|
|
39
|
+
private resolveBundleFeatures;
|
|
40
|
+
private assertBundleVersionsStillBookable;
|
|
41
|
+
private normalizeCreateData;
|
|
42
|
+
private normalizeUpdateData;
|
|
43
|
+
private resolveLineItems;
|
|
44
|
+
private defaultPlanLineItem;
|
|
45
|
+
private assertOpen;
|
|
46
|
+
private isExpired;
|
|
47
|
+
private dateIsAfterNow;
|
|
48
|
+
private isValidUntilExpired;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface CheckoutOfferControllerConfig {
|
|
52
|
+
/** Class-level guards; `[]` for auth-free public endpoints. */
|
|
53
|
+
guards: Array<Type<CanActivate>>;
|
|
54
|
+
}
|
|
55
|
+
interface CheckoutOfferModuleOptions {
|
|
56
|
+
checkoutOfferRepository: ProviderSpec<CheckoutOfferRepository>;
|
|
57
|
+
/**
|
|
58
|
+
* Optional for V3 revalidation on consume: if set, the service checks
|
|
59
|
+
* whether referenced bundle versions are still bookable. Also provides
|
|
60
|
+
* the bundle features for the requires validation (#35 P6).
|
|
61
|
+
*/
|
|
62
|
+
bundleRepository?: ProviderSpec<BundleRepository>;
|
|
63
|
+
/**
|
|
64
|
+
* Optional for the requires validation (#35 P6): plan features of the
|
|
65
|
+
* chosen plan version. Without wiring, falls back to the featuresSnapshot
|
|
66
|
+
* of the plan line item.
|
|
67
|
+
*/
|
|
68
|
+
planRepository?: ProviderSpec<PlanRepository>;
|
|
69
|
+
/**
|
|
70
|
+
* Optional for the requires validation (#35 P6): requires source =
|
|
71
|
+
* curated FeatureCatalogEntries. Without wiring, the validation is
|
|
72
|
+
* skipped (graceful).
|
|
73
|
+
*/
|
|
74
|
+
catalogEntryRepository?: ProviderSpec<CatalogEntryRepository>;
|
|
75
|
+
/** Controller mount for `/public/checkout-offer`. Omitted = service only. */
|
|
76
|
+
controller?: CheckoutOfferControllerConfig;
|
|
77
|
+
imports?: Array<Type<unknown> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
|
|
78
|
+
extraProviders?: Provider[];
|
|
79
|
+
global?: boolean;
|
|
80
|
+
}
|
|
81
|
+
declare class CheckoutOfferModule {
|
|
82
|
+
static forRoot(options: CheckoutOfferModuleOptions): DynamicModule;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export { type CheckoutOfferControllerConfig as C, CheckoutOfferModule as a, type CheckoutOfferModuleOptions as b, CheckoutOfferService as c };
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-E56W4U2P.js";
|
|
11
11
|
import {
|
|
12
12
|
DiscoveryScanner
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-Z3FWN3HJ.js";
|
|
14
14
|
import {
|
|
15
15
|
SUBSCRIPTION_REPOSITORY_TOKEN
|
|
16
16
|
} from "./chunk-WKVBNTYC.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
MARKETING_SETTINGS_REPOSITORY_TOKEN,
|
|
24
24
|
PLAN_REPOSITORY_TOKEN,
|
|
25
25
|
PROMOTION_REPOSITORY_TOKEN
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-L4KTQ6CL.js";
|
|
27
27
|
import {
|
|
28
28
|
asProvider
|
|
29
29
|
} from "./chunk-SABTXESR.js";
|
|
@@ -35,22 +35,22 @@ function slugify(name) {
|
|
|
35
35
|
__name(slugify, "slugify");
|
|
36
36
|
|
|
37
37
|
// src/registration/tokens.ts
|
|
38
|
-
var PENDING_REGISTRATION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("
|
|
39
|
-
var REGISTRATION_OTP_DELIVERY_TOKEN = /* @__PURE__ */ Symbol("
|
|
40
|
-
var USER_ACCOUNT_LOOKUP_TOKEN = /* @__PURE__ */ Symbol("
|
|
41
|
-
var SLUG_AVAILABILITY_CHECK_TOKEN = /* @__PURE__ */ Symbol("
|
|
42
|
-
var PASSWORD_HASHER_TOKEN = /* @__PURE__ */ Symbol("
|
|
43
|
-
var PLAN_CATALOG_LOOKUP_TOKEN = /* @__PURE__ */ Symbol("
|
|
44
|
-
var PAYMENT_PROVIDER_TOKEN = /* @__PURE__ */ Symbol("
|
|
45
|
-
var PAYMENT_EVENT_LOG_TOKEN = /* @__PURE__ */ Symbol("
|
|
46
|
-
var ACTIVATION_ORCHESTRATOR_TOKEN = /* @__PURE__ */ Symbol("
|
|
47
|
-
var REGISTRATION_AUDIT_LOGGER_TOKEN = /* @__PURE__ */ Symbol("
|
|
48
|
-
var REGISTRATION_RESUME_TOKEN_SIGNER_TOKEN = /* @__PURE__ */ Symbol("
|
|
49
|
-
var REGISTRATION_RESUME_DELIVERY_TOKEN = /* @__PURE__ */ Symbol("
|
|
50
|
-
var REGISTRATION_RESUME_BASE_URL_TOKEN = /* @__PURE__ */ Symbol("
|
|
51
|
-
var REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN = /* @__PURE__ */ Symbol("
|
|
52
|
-
var REGISTRATION_PROMO_PREVIEW_TOKEN = /* @__PURE__ */ Symbol("
|
|
53
|
-
var REGISTRATION_CONFIG_TOKEN = /* @__PURE__ */ Symbol("
|
|
38
|
+
var PENDING_REGISTRATION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PendingRegistrationRepository");
|
|
39
|
+
var REGISTRATION_OTP_DELIVERY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/RegistrationOtpDelivery");
|
|
40
|
+
var USER_ACCOUNT_LOOKUP_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/UserAccountLookup");
|
|
41
|
+
var SLUG_AVAILABILITY_CHECK_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/SlugAvailabilityCheck");
|
|
42
|
+
var PASSWORD_HASHER_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PasswordHasher");
|
|
43
|
+
var PLAN_CATALOG_LOOKUP_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PlanCatalogLookup");
|
|
44
|
+
var PAYMENT_PROVIDER_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PaymentProvider");
|
|
45
|
+
var PAYMENT_EVENT_LOG_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PaymentEventLog");
|
|
46
|
+
var ACTIVATION_ORCHESTRATOR_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/ActivationOrchestrator");
|
|
47
|
+
var REGISTRATION_AUDIT_LOGGER_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/RegistrationAuditLogger");
|
|
48
|
+
var REGISTRATION_RESUME_TOKEN_SIGNER_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/RegistrationResumeTokenSigner");
|
|
49
|
+
var REGISTRATION_RESUME_DELIVERY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/RegistrationResumeDelivery");
|
|
50
|
+
var REGISTRATION_RESUME_BASE_URL_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/RegistrationResumeBaseUrl");
|
|
51
|
+
var REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/RegistrationConfiguratorLookup");
|
|
52
|
+
var REGISTRATION_PROMO_PREVIEW_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/RegistrationPromoPreview");
|
|
53
|
+
var REGISTRATION_CONFIG_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/RegistrationConfig");
|
|
54
54
|
|
|
55
55
|
// src/registration/pending-registration.service.ts
|
|
56
56
|
import { BadRequestException, Inject, Injectable, Logger, NotFoundException, Optional } from "@nestjs/common";
|
|
File without changes
|
|
@@ -63,14 +63,14 @@ function buildLabel(code, cycle) {
|
|
|
63
63
|
__name(buildLabel, "buildLabel");
|
|
64
64
|
|
|
65
65
|
// src/promo/tokens.ts
|
|
66
|
-
var PROMO_CODE_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("
|
|
67
|
-
var PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("
|
|
68
|
-
var PROMO_CODE_VALIDATION_LOG_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("
|
|
69
|
-
var PROMO_FIRST_TIME_CUSTOMER_CHECK_TOKEN = /* @__PURE__ */ Symbol("
|
|
70
|
-
var PROMO_SUBSCRIPTION_LOOKUP_TOKEN = /* @__PURE__ */ Symbol("
|
|
71
|
-
var PROMO_REVENUE_DEDUCTION_AGGREGATOR_TOKEN = /* @__PURE__ */ Symbol("
|
|
72
|
-
var PROMO_TRANSACTION_RUNNER_TOKEN = /* @__PURE__ */ Symbol("
|
|
73
|
-
var PROMO_SERVICE_CONFIG_TOKEN = /* @__PURE__ */ Symbol("
|
|
66
|
+
var PROMO_CODE_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PromoCodeRepository");
|
|
67
|
+
var PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PromoCodeRedemptionRepository");
|
|
68
|
+
var PROMO_CODE_VALIDATION_LOG_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PromoCodeValidationLogRepository");
|
|
69
|
+
var PROMO_FIRST_TIME_CUSTOMER_CHECK_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PromoFirstTimeCustomerCheck");
|
|
70
|
+
var PROMO_SUBSCRIPTION_LOOKUP_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PromoSubscriptionLookup");
|
|
71
|
+
var PROMO_REVENUE_DEDUCTION_AGGREGATOR_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PromoRevenueDeductionAggregator");
|
|
72
|
+
var PROMO_TRANSACTION_RUNNER_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PromoTransactionRunner");
|
|
73
|
+
var PROMO_SERVICE_CONFIG_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PromoServiceConfig");
|
|
74
74
|
|
|
75
75
|
// src/promo/service.ts
|
|
76
76
|
import { BadRequestException, Inject, Injectable, NotFoundException } from "@nestjs/common";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PromoCodesService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E7AJ42AB.js";
|
|
4
4
|
import {
|
|
5
5
|
SubscriptionContractService
|
|
6
6
|
} from "./chunk-2PNX2QL2.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN,
|
|
26
26
|
isLimitExceededError,
|
|
27
27
|
toEffectiveLimitsSnapshot
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-GBDUH6DO.js";
|
|
29
29
|
import {
|
|
30
30
|
PLAN_CATALOG_TOKEN,
|
|
31
31
|
findPlan,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
BUNDLE_REPOSITORY_TOKEN,
|
|
43
43
|
CATALOG_ENTRY_REPOSITORY_TOKEN,
|
|
44
44
|
PLAN_REPOSITORY_TOKEN
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-L4KTQ6CL.js";
|
|
46
46
|
import {
|
|
47
47
|
asProvider
|
|
48
48
|
} from "./chunk-SABTXESR.js";
|
|
@@ -174,7 +174,7 @@ var REQUIRE_FEATURE_KEY = "require-feature";
|
|
|
174
174
|
var RequireFeature = /* @__PURE__ */ __name((...features) => SetMetadata(REQUIRE_FEATURE_KEY, features), "RequireFeature");
|
|
175
175
|
|
|
176
176
|
// src/billing/feature-guard.tokens.ts
|
|
177
|
-
var FEATURE_GUARD_CONFIG_TOKEN = /* @__PURE__ */ Symbol("
|
|
177
|
+
var FEATURE_GUARD_CONFIG_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/FeatureGuardConfig");
|
|
178
178
|
|
|
179
179
|
// src/billing/feature.guard.ts
|
|
180
180
|
import { ForbiddenException, Inject, Injectable, Logger, Optional } from "@nestjs/common";
|
|
@@ -297,10 +297,10 @@ import { Inject as Inject2, Injectable as Injectable2, Optional as Optional2 } f
|
|
|
297
297
|
import { buildFeatureRequiresIndex, collectUnsatisfiedRequires } from "@saasicat/types";
|
|
298
298
|
|
|
299
299
|
// src/billing/public-catalog.tokens.ts
|
|
300
|
-
var PUBLIC_CATALOG_PROJECT_KEY_TOKEN = /* @__PURE__ */ Symbol("
|
|
301
|
-
var PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("
|
|
302
|
-
var PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("
|
|
303
|
-
var PUBLIC_CATALOG_CATALOG_ENTRY_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("
|
|
300
|
+
var PUBLIC_CATALOG_PROJECT_KEY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PublicCatalogProjectKey");
|
|
301
|
+
var PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PublicCatalogBundleRepository");
|
|
302
|
+
var PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PublicCatalogMarketingRepository");
|
|
303
|
+
var PUBLIC_CATALOG_CATALOG_ENTRY_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PublicCatalogCatalogEntryRepository");
|
|
304
304
|
|
|
305
305
|
// src/billing/catalog-bundle-upsell-resolver.ts
|
|
306
306
|
function _ts_decorate2(decorators, target, key, desc) {
|
|
@@ -554,7 +554,7 @@ function _ts_param3(paramIndex, decorator) {
|
|
|
554
554
|
};
|
|
555
555
|
}
|
|
556
556
|
__name(_ts_param3, "_ts_param");
|
|
557
|
-
var PLAN_CATALOG_IMPORT_SINK_TOKEN = /* @__PURE__ */ Symbol("
|
|
557
|
+
var PLAN_CATALOG_IMPORT_SINK_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PlanCatalogImportSink");
|
|
558
558
|
var IMPORT_CHANGE_NOTE = "Initial import from saas.yaml (SPEC_V2 \xA711.1 M6 Pack 2c)";
|
|
559
559
|
var PlanCatalogImporterService = class {
|
|
560
560
|
static {
|
|
@@ -316,7 +316,7 @@ AdminModule = _ts_decorate5([
|
|
|
316
316
|
], AdminModule);
|
|
317
317
|
|
|
318
318
|
// src/admin/admin-manifest.config.ts
|
|
319
|
-
var ADMIN_MANIFEST_CONFIG = /* @__PURE__ */ Symbol("
|
|
319
|
+
var ADMIN_MANIFEST_CONFIG = /* @__PURE__ */ Symbol.for("saas-platform/AdminManifestConfig");
|
|
320
320
|
|
|
321
321
|
// src/admin/admin-manifest.service.ts
|
|
322
322
|
import { Inject as Inject4, Injectable as Injectable5, Logger as Logger3, Optional } from "@nestjs/common";
|
|
@@ -338,7 +338,7 @@ function _ts_param4(paramIndex, decorator) {
|
|
|
338
338
|
};
|
|
339
339
|
}
|
|
340
340
|
__name(_ts_param4, "_ts_param");
|
|
341
|
-
var PLATFORM_CORE_CONTRIBUTION_TOKEN = /* @__PURE__ */ Symbol("
|
|
341
|
+
var PLATFORM_CORE_CONTRIBUTION_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PlatformCoreContribution");
|
|
342
342
|
var AdminManifestService = class _AdminManifestService {
|
|
343
343
|
static {
|
|
344
344
|
__name(this, "AdminManifestService");
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
BUNDLE_REPOSITORY_TOKEN,
|
|
6
6
|
CATALOG_ENTRY_REPOSITORY_TOKEN,
|
|
7
7
|
PLAN_REPOSITORY_TOKEN
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-L4KTQ6CL.js";
|
|
9
9
|
import {
|
|
10
10
|
asProvider
|
|
11
11
|
} from "./chunk-SABTXESR.js";
|
|
@@ -13,14 +13,12 @@ import {
|
|
|
13
13
|
__name
|
|
14
14
|
} from "./chunk-SHUYVCID.js";
|
|
15
15
|
|
|
16
|
-
// src/checkout-offer/checkout-offer.service.ts
|
|
17
|
-
import { ConflictException, Inject, Injectable, NotFoundException, Optional, UnprocessableEntityException } from "@nestjs/common";
|
|
18
|
-
import { buildFeatureRequiresIndex, collectUnsatisfiedRequires, startOfUtcDay } from "@saasicat/types";
|
|
19
|
-
|
|
20
16
|
// src/checkout-offer/tokens.ts
|
|
21
|
-
var CHECKOUT_OFFER_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol("
|
|
17
|
+
var CHECKOUT_OFFER_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/CheckoutOfferRepository");
|
|
22
18
|
|
|
23
19
|
// src/checkout-offer/checkout-offer.service.ts
|
|
20
|
+
import { ConflictException, Inject, Injectable, NotFoundException, Optional, UnprocessableEntityException } from "@nestjs/common";
|
|
21
|
+
import { buildFeatureRequiresIndex, collectUnsatisfiedRequires, startOfUtcDay } from "@saasicat/types";
|
|
24
22
|
function _ts_decorate(decorators, target, key, desc) {
|
|
25
23
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
26
24
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -344,9 +342,6 @@ CheckoutOfferService = _ts_decorate([
|
|
|
344
342
|
])
|
|
345
343
|
], CheckoutOfferService);
|
|
346
344
|
|
|
347
|
-
// src/checkout-offer/checkout-offer.controller.ts
|
|
348
|
-
import { Body, Controller, Get, Inject as Inject2, Param, ParseUUIDPipe, Patch, Post, UseGuards } from "@nestjs/common";
|
|
349
|
-
|
|
350
345
|
// src/checkout-offer/dto/checkout-offer.dto.ts
|
|
351
346
|
import { IsArray, IsDateString, IsDefined, IsIn, IsObject, IsOptional, IsString, Matches, MaxLength } from "class-validator";
|
|
352
347
|
function _ts_decorate2(decorators, target, key, desc) {
|
|
@@ -547,6 +542,7 @@ _ts_decorate2([
|
|
|
547
542
|
], UpdateCheckoutOfferDto.prototype, "validUntil", void 0);
|
|
548
543
|
|
|
549
544
|
// src/checkout-offer/checkout-offer.controller.ts
|
|
545
|
+
import { Body, Controller, Get, Inject as Inject2, Param, ParseUUIDPipe, Patch, Post, UseGuards } from "@nestjs/common";
|
|
550
546
|
function _ts_decorate3(decorators, target, key, desc) {
|
|
551
547
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
552
548
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// src/catalog/tokens.ts
|
|
2
|
+
var PLAN_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PlanRepository");
|
|
3
|
+
var BUNDLE_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/BundleRepository");
|
|
4
|
+
var MARKETING_PROJECTION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/MarketingProjectionRepository");
|
|
5
|
+
var CATALOG_ENTRY_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/CatalogEntryRepository");
|
|
6
|
+
var PROMOTION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PromotionRepository");
|
|
7
|
+
var MARKETING_SETTINGS_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/MarketingSettingsRepository");
|
|
8
|
+
var CATALOG_SERVICE_CONFIG_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/CatalogServiceConfig");
|
|
9
|
+
var FEATURE_UI_REGISTRY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/CatalogFeatureUiRegistry");
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
PLAN_REPOSITORY_TOKEN,
|
|
13
|
+
BUNDLE_REPOSITORY_TOKEN,
|
|
14
|
+
MARKETING_PROJECTION_REPOSITORY_TOKEN,
|
|
15
|
+
CATALOG_ENTRY_REPOSITORY_TOKEN,
|
|
16
|
+
PROMOTION_REPOSITORY_TOKEN,
|
|
17
|
+
MARKETING_SETTINGS_REPOSITORY_TOKEN,
|
|
18
|
+
CATALOG_SERVICE_CONFIG_TOKEN,
|
|
19
|
+
FEATURE_UI_REGISTRY_TOKEN
|
|
20
|
+
};
|