@saasicat/nest 0.27.0 → 1.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.build-stamp +1 -0
- package/dist/_entries.cjs +143 -143
- package/dist/admin/index.d.cts +2 -2
- package/dist/admin/index.d.ts +2 -2
- package/dist/admin/index.js +2 -2
- package/dist/{admin-stats.service-HUZIU448.d.cts → admin-stats.service-BroyovpL.d.cts} +1 -1
- package/dist/{admin-stats.service-Db2exT_d.d.ts → admin-stats.service-G53IEkkt.d.ts} +1 -1
- package/dist/billing/index.d.cts +4 -4
- package/dist/billing/index.d.ts +4 -4
- package/dist/billing/index.js +13 -13
- package/dist/catalog/index.d.cts +13 -1
- package/dist/catalog/index.d.ts +13 -1
- package/dist/catalog/index.js +10 -8
- package/dist/checkout-offer/index.js +2 -2
- package/dist/{chunk-7ZPFQXHM.js → chunk-3UZW7TU4.js} +1 -1
- package/dist/{chunk-XTVAFJ3P.js → chunk-AEEK64XD.js} +3 -3
- package/dist/chunk-AOQJEYOL.js +20 -0
- package/dist/{chunk-H4DOTO7S.js → chunk-H3W6QDQH.js} +5 -5
- package/dist/{chunk-YYUXKLXK.js → chunk-I7GTA3RX.js} +2 -2
- package/dist/{chunk-SN5UOC43.js → chunk-IPOLCDKN.js} +11 -11
- package/dist/{chunk-CJFAOD7K.js → chunk-IVEA6M3B.js} +1 -1
- package/dist/{chunk-EHKMPP6J.js → chunk-JCAZT727.js} +29 -29
- package/dist/{chunk-2JTISFUZ.js → chunk-JTLKWP3Q.js} +7 -7
- package/dist/{chunk-E56W4U2P.js → chunk-O2J2HDXA.js} +4 -4
- package/dist/{chunk-WKVBNTYC.js → chunk-OUDSQ3PU.js} +6 -6
- package/dist/{chunk-MJ32VNZD.js → chunk-P5D5CYO2.js} +18 -18
- package/dist/{chunk-L4SUWH5B.js → chunk-QUZU2M33.js} +2 -2
- package/dist/{chunk-WPUVJRIN.js → chunk-S6BAD5XM.js} +10 -10
- package/dist/{chunk-7X5MSAIL.js → chunk-SH7J5IU7.js} +9 -9
- package/dist/{chunk-37HEKVDH.js → chunk-V4OJ43K2.js} +10 -10
- package/dist/{chunk-NYLON2VC.js → chunk-VBRYPU7V.js} +2 -2
- package/dist/{chunk-B6IWLV7R.js → chunk-VTMCMVYQ.js} +6 -6
- package/dist/{chunk-UHD6FJBQ.js → chunk-WSPHIIGS.js} +22 -22
- package/dist/{chunk-5ZXBXYXU.js → chunk-WXYJHZCN.js} +3 -3
- package/dist/{chunk-6WL6VQ7Z.js → chunk-XBYAFEOR.js} +2 -2
- package/dist/{chunk-F4B2NJUZ.js → chunk-XEW6YXL5.js} +7 -7
- package/dist/{chunk-3E6ONOMG.js → chunk-Y43SGD5J.js} +2 -2
- package/dist/{define-saasicat-3ois8t8s.d.ts → define-saasicat-BFgeoVG9.d.ts} +7 -7
- package/dist/{define-saasicat-CFxut1VR.d.cts → define-saasicat-CNUWjfNK.d.cts} +7 -7
- package/dist/discovery/index.js +4 -4
- package/dist/{enforce-quota.interceptor-CYDNvAQz.d.ts → enforce-quota.interceptor-BYqmdFB5.d.ts} +1 -1
- package/dist/{enforce-quota.interceptor-N80KC34N.d.cts → enforce-quota.interceptor-BxIR63Wn.d.cts} +1 -1
- package/dist/entitlement/index.js +6 -6
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +29 -28
- package/dist/{module-options-ByJL7FZm.d.ts → module-options-BymIkAsh.d.ts} +29 -29
- package/dist/{module-options-klrPnWGF.d.cts → module-options-DgwBKVpC.d.cts} +29 -29
- package/dist/platform/index.d.cts +16 -16
- package/dist/platform/index.d.ts +16 -16
- package/dist/platform/index.js +21 -22
- package/dist/promo/index.d.cts +3 -3
- package/dist/promo/index.d.ts +3 -3
- package/dist/promo/index.js +3 -3
- package/dist/{module-BE17XFLg.d.ts → promo.module-CnzddtJ0.d.ts} +1 -1
- package/dist/{module-CHMIyWlf.d.cts → promo.module-DokmUGmm.d.cts} +1 -1
- package/dist/registration/index.d.cts +1 -1
- package/dist/registration/index.d.ts +1 -1
- package/dist/registration/index.js +1 -1
- package/dist/subscription-contract/index.js +3 -3
- package/dist/{tenant-billing.controller-CYYK0CpT.d.ts → tenant-billing.controller-BQPy5yXh.d.ts} +1 -1
- package/dist/{tenant-billing.controller-CAMMdfn1.d.cts → tenant-billing.controller-CODIYzlI.d.cts} +1 -1
- package/dist/testing/index.d.cts +10 -10
- package/dist/testing/index.d.ts +10 -10
- package/dist/testing/index.js +31 -31
- package/package.json +5 -5
- package/dist/chunk-L4KTQ6CL.js +0 -20
- /package/dist/{service-D48clObR.d.cts → promo.service-D48clObR.d.cts} +0 -0
- /package/dist/{service-D48clObR.d.ts → promo.service-D48clObR.d.ts} +0 -0
package/dist/platform/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
QuotaProvidersUsageSnapshot,
|
|
14
14
|
STATIC_FEATURE_GUARD_CONFIG_TOKEN,
|
|
15
15
|
SaaSiCatConfigurationError,
|
|
16
|
-
|
|
16
|
+
SaaSiCatModule,
|
|
17
17
|
SetupModule,
|
|
18
18
|
SetupService,
|
|
19
19
|
StaticEntitlementService,
|
|
@@ -28,13 +28,13 @@ import {
|
|
|
28
28
|
docsUrlFor,
|
|
29
29
|
findViolations,
|
|
30
30
|
headingSlug
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-JCAZT727.js";
|
|
32
32
|
import {
|
|
33
33
|
PromoCodeRateLimitGuard
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-VTMCMVYQ.js";
|
|
35
35
|
import {
|
|
36
36
|
SubscriptionContractModule
|
|
37
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-Y43SGD5J.js";
|
|
38
38
|
import {
|
|
39
39
|
AdminBypassRlsInterceptor,
|
|
40
40
|
AdminManifestModule,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
MfaGuard,
|
|
47
47
|
MfaService,
|
|
48
48
|
SuperAdminGuard
|
|
49
|
-
} from "../chunk-
|
|
49
|
+
} from "../chunk-IPOLCDKN.js";
|
|
50
50
|
import {
|
|
51
51
|
ComposedTenantAuthGuard,
|
|
52
52
|
PendingPlanMaterializationService,
|
|
@@ -55,13 +55,13 @@ import {
|
|
|
55
55
|
SubscriptionBundlesService,
|
|
56
56
|
TenantAdminGuard,
|
|
57
57
|
TenantBillingController
|
|
58
|
-
} from "../chunk-
|
|
58
|
+
} from "../chunk-WSPHIIGS.js";
|
|
59
59
|
import {
|
|
60
60
|
PromoCodesService
|
|
61
|
-
} from "../chunk-
|
|
61
|
+
} from "../chunk-V4OJ43K2.js";
|
|
62
62
|
import {
|
|
63
63
|
SubscriptionContractService
|
|
64
|
-
} from "../chunk-
|
|
64
|
+
} from "../chunk-IVEA6M3B.js";
|
|
65
65
|
import {
|
|
66
66
|
BundlesService,
|
|
67
67
|
CatalogEntriesService,
|
|
@@ -71,36 +71,36 @@ import {
|
|
|
71
71
|
PlansService,
|
|
72
72
|
PromotionsService,
|
|
73
73
|
PublicMarketingCatalogService
|
|
74
|
-
} from "../chunk-
|
|
75
|
-
import "../chunk-
|
|
74
|
+
} from "../chunk-SH7J5IU7.js";
|
|
75
|
+
import "../chunk-S6BAD5XM.js";
|
|
76
76
|
import {
|
|
77
77
|
AdminAuditService
|
|
78
|
-
} from "../chunk-
|
|
78
|
+
} from "../chunk-O2J2HDXA.js";
|
|
79
79
|
import {
|
|
80
80
|
CheckoutOfferModule,
|
|
81
81
|
CheckoutOfferService
|
|
82
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-AEEK64XD.js";
|
|
83
83
|
import "../chunk-BSK6YBLI.js";
|
|
84
84
|
import {
|
|
85
85
|
SAASICAT_PUBLIC_ROUTE_KEY,
|
|
86
86
|
SaaSiCatPublicRoute,
|
|
87
87
|
isSaaSiCatPublicRoute
|
|
88
88
|
} from "../chunk-YSC46BGM.js";
|
|
89
|
-
import "../chunk-
|
|
89
|
+
import "../chunk-XBYAFEOR.js";
|
|
90
90
|
import {
|
|
91
91
|
DiscoveryScanner
|
|
92
|
-
} from "../chunk-
|
|
93
|
-
import "../chunk-
|
|
92
|
+
} from "../chunk-WXYJHZCN.js";
|
|
93
|
+
import "../chunk-H3W6QDQH.js";
|
|
94
94
|
import {
|
|
95
95
|
EntitlementService
|
|
96
|
-
} from "../chunk-
|
|
96
|
+
} from "../chunk-XEW6YXL5.js";
|
|
97
97
|
import "../chunk-DQKCK7DX.js";
|
|
98
|
-
import "../chunk-
|
|
98
|
+
import "../chunk-VBRYPU7V.js";
|
|
99
99
|
import "../chunk-EBJJNTW6.js";
|
|
100
|
-
import "../chunk-
|
|
101
|
-
import "../chunk-
|
|
100
|
+
import "../chunk-OUDSQ3PU.js";
|
|
101
|
+
import "../chunk-AOQJEYOL.js";
|
|
102
102
|
import "../chunk-SABTXESR.js";
|
|
103
|
-
import "../chunk-
|
|
103
|
+
import "../chunk-QUZU2M33.js";
|
|
104
104
|
import "../chunk-SHUYVCID.js";
|
|
105
105
|
export {
|
|
106
106
|
AdminAuditService,
|
|
@@ -142,9 +142,8 @@ export {
|
|
|
142
142
|
SAASICAT_PUBLIC_ROUTE_KEY,
|
|
143
143
|
STATIC_FEATURE_GUARD_CONFIG_TOKEN,
|
|
144
144
|
SaaSiCatConfigurationError,
|
|
145
|
-
|
|
145
|
+
SaaSiCatModule,
|
|
146
146
|
SaaSiCatPublicRoute,
|
|
147
|
-
SaasPlatformModule,
|
|
148
147
|
SetupModule,
|
|
149
148
|
SetupService,
|
|
150
149
|
StaticEntitlementService,
|
package/dist/promo/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PromoCodeValueType, PromoCodeDurationType, BillingCycle, PromoCodeRepository, PromoCodeRedemptionRepository } from '@saasicat/types';
|
|
2
|
-
import { g as PromoCodesService, d as PreviewResult } from '../service-D48clObR.cjs';
|
|
3
|
-
export { a as PreviewInput, b as PreviewInvalid, c as PreviewReason, e as PreviewValid, f as PromoCodeStats, P as PromoServiceConfig, R as RedeemInput } from '../service-D48clObR.cjs';
|
|
2
|
+
import { g as PromoCodesService, d as PreviewResult } from '../promo.service-D48clObR.cjs';
|
|
3
|
+
export { a as PreviewInput, b as PreviewInvalid, c as PreviewReason, e as PreviewValid, f as PromoCodeStats, P as PromoServiceConfig, R as RedeemInput } from '../promo.service-D48clObR.cjs';
|
|
4
4
|
export { P as PromoCodeRateLimitGuard, h as hashIp, i as ipFingerprint } from '../rate-limit.guard-dntqAlfZ.cjs';
|
|
5
|
-
export { P as PromoCodesModule, a as PromoCodesModuleOptions } from '../module-
|
|
5
|
+
export { P as PromoCodesModule, a as PromoCodesModuleOptions } from '../promo.module-DokmUGmm.cjs';
|
|
6
6
|
import { Type, CanActivate } from '@nestjs/common';
|
|
7
7
|
import '../di-CcNeq9v-.cjs';
|
|
8
8
|
|
package/dist/promo/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PromoCodeValueType, PromoCodeDurationType, BillingCycle, PromoCodeRepository, PromoCodeRedemptionRepository } from '@saasicat/types';
|
|
2
|
-
import { g as PromoCodesService, d as PreviewResult } from '../service-D48clObR.js';
|
|
3
|
-
export { a as PreviewInput, b as PreviewInvalid, c as PreviewReason, e as PreviewValid, f as PromoCodeStats, P as PromoServiceConfig, R as RedeemInput } from '../service-D48clObR.js';
|
|
2
|
+
import { g as PromoCodesService, d as PreviewResult } from '../promo.service-D48clObR.js';
|
|
3
|
+
export { a as PreviewInput, b as PreviewInvalid, c as PreviewReason, e as PreviewValid, f as PromoCodeStats, P as PromoServiceConfig, R as RedeemInput } from '../promo.service-D48clObR.js';
|
|
4
4
|
export { P as PromoCodeRateLimitGuard, h as hashIp, i as ipFingerprint } from '../rate-limit.guard-dntqAlfZ.js';
|
|
5
|
-
export { P as PromoCodesModule, a as PromoCodesModuleOptions } from '../module-
|
|
5
|
+
export { P as PromoCodesModule, a as PromoCodesModuleOptions } from '../promo.module-CnzddtJ0.js';
|
|
6
6
|
import { Type, CanActivate } from '@nestjs/common';
|
|
7
7
|
import '../di-CcNeq9v-.js';
|
|
8
8
|
|
package/dist/promo/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
buildPromoCodeAdminController,
|
|
11
11
|
hashIp,
|
|
12
12
|
ipFingerprint
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-VTMCMVYQ.js";
|
|
14
14
|
import {
|
|
15
15
|
PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN,
|
|
16
16
|
PROMO_CODE_REPOSITORY_TOKEN,
|
|
@@ -26,8 +26,8 @@ import {
|
|
|
26
26
|
computeDiscountGross,
|
|
27
27
|
computeDiscountedGross,
|
|
28
28
|
computeRegularStartsAt
|
|
29
|
-
} from "../chunk-
|
|
30
|
-
import "../chunk-
|
|
29
|
+
} from "../chunk-V4OJ43K2.js";
|
|
30
|
+
import "../chunk-O2J2HDXA.js";
|
|
31
31
|
import "../chunk-YSC46BGM.js";
|
|
32
32
|
import {
|
|
33
33
|
computeIncludedVat,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type, CanActivate, DynamicModule, ForwardReference } from '@nestjs/common';
|
|
2
2
|
import { PromoCodeRepository, PromoCodeRedemptionRepository, PromoCodeValidationLogRepository, FirstTimeCustomerCheck, PromoSubscriptionLookup, PromoRevenueDeductionAggregator, TransactionRunner } from '@saasicat/types';
|
|
3
3
|
import { P as ProviderSpec } from './di-CcNeq9v-.js';
|
|
4
|
-
import { P as PromoServiceConfig } from './service-D48clObR.js';
|
|
4
|
+
import { P as PromoServiceConfig } from './promo.service-D48clObR.js';
|
|
5
5
|
|
|
6
6
|
interface PromoCodesModuleOptions {
|
|
7
7
|
promoCodeRepository: ProviderSpec<PromoCodeRepository>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type, CanActivate, DynamicModule, ForwardReference } from '@nestjs/common';
|
|
2
2
|
import { PromoCodeRepository, PromoCodeRedemptionRepository, PromoCodeValidationLogRepository, FirstTimeCustomerCheck, PromoSubscriptionLookup, PromoRevenueDeductionAggregator, TransactionRunner } from '@saasicat/types';
|
|
3
3
|
import { P as ProviderSpec } from './di-CcNeq9v-.cjs';
|
|
4
|
-
import { P as PromoServiceConfig } from './service-D48clObR.cjs';
|
|
4
|
+
import { P as PromoServiceConfig } from './promo.service-D48clObR.cjs';
|
|
5
5
|
|
|
6
6
|
interface PromoCodesModuleOptions {
|
|
7
7
|
promoCodeRepository: ProviderSpec<PromoCodeRepository>;
|
|
@@ -36,7 +36,7 @@ declare const REGISTRATION_RESUME_DELIVERY_TOKEN: unique symbol;
|
|
|
36
36
|
declare const REGISTRATION_RESUME_BASE_URL_TOKEN: unique symbol;
|
|
37
37
|
declare const REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN: unique symbol;
|
|
38
38
|
declare const REGISTRATION_PROMO_PREVIEW_TOKEN: unique symbol;
|
|
39
|
-
/** Optionally injectable configuration — falls back to default TTLs from
|
|
39
|
+
/** Optionally injectable configuration — falls back to default TTLs from @saasicat/types. */
|
|
40
40
|
declare const REGISTRATION_CONFIG_TOKEN: unique symbol;
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -36,7 +36,7 @@ declare const REGISTRATION_RESUME_DELIVERY_TOKEN: unique symbol;
|
|
|
36
36
|
declare const REGISTRATION_RESUME_BASE_URL_TOKEN: unique symbol;
|
|
37
37
|
declare const REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN: unique symbol;
|
|
38
38
|
declare const REGISTRATION_PROMO_PREVIEW_TOKEN: unique symbol;
|
|
39
|
-
/** Optionally injectable configuration — falls back to default TTLs from
|
|
39
|
+
/** Optionally injectable configuration — falls back to default TTLs from @saasicat/types. */
|
|
40
40
|
declare const REGISTRATION_CONFIG_TOKEN: unique symbol;
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import "../chunk-2SLTRKXC.js";
|
|
2
2
|
import {
|
|
3
3
|
SubscriptionContractModule
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-Y43SGD5J.js";
|
|
5
5
|
import {
|
|
6
6
|
SubscriptionContractService,
|
|
7
7
|
contractLineItemToInvoiceLineItem,
|
|
8
8
|
sortContractLineItemsForInvoice,
|
|
9
9
|
subscriptionContractToInvoiceSnapshot
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-IVEA6M3B.js";
|
|
11
11
|
import "../chunk-BSK6YBLI.js";
|
|
12
12
|
import {
|
|
13
13
|
SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-VBRYPU7V.js";
|
|
15
15
|
import "../chunk-SABTXESR.js";
|
|
16
16
|
import "../chunk-SHUYVCID.js";
|
|
17
17
|
export {
|
package/dist/{tenant-billing.controller-CYYK0CpT.d.ts → tenant-billing.controller-BQPy5yXh.d.ts}
RENAMED
|
@@ -2,7 +2,7 @@ import { CanActivate, ExecutionContext } from '@nestjs/common';
|
|
|
2
2
|
import { b as AuthGuardList, m as SelfServiceBlockedPlans, w as TrialProjectionPort, h as PendingPlanQueryPort, f as ContractFreezePort, l as SelfServiceBlockedBundles, u as TenantIdResolver, B as UserIdResolver, z as UserEmailResolver, a as AuditContextResolver } from './tenant-billing.module-B0stLoJn.js';
|
|
3
3
|
import { PlanCatalog, SubscriptionUsagePort, UsageSnapshotPort, TenantSubscriptionWritePort, SubscriptionBundleRepository, BundleRepository, SubscriptionBundleView, SubscriptionBundleRecord, PlanRepository, CatalogEntryRepository, BundleVersionRow, SubscriptionUsageRecord, OnboardingSelectionResponse } from '@saasicat/types';
|
|
4
4
|
import { c as EntitlementService, a as EffectiveLimitsSnapshot, t as toEffectiveLimitsSnapshot } from './aggregation-DP5zfKbU.js';
|
|
5
|
-
import { g as PromoCodesService } from './service-D48clObR.js';
|
|
5
|
+
import { g as PromoCodesService } from './promo.service-D48clObR.js';
|
|
6
6
|
import { A as AdminAuditService } from './admin-audit.service-9IqXMlZm.js';
|
|
7
7
|
|
|
8
8
|
declare class ComposedTenantAuthGuard implements CanActivate {
|
package/dist/{tenant-billing.controller-CAMMdfn1.d.cts → tenant-billing.controller-CODIYzlI.d.cts}
RENAMED
|
@@ -2,7 +2,7 @@ import { CanActivate, ExecutionContext } from '@nestjs/common';
|
|
|
2
2
|
import { b as AuthGuardList, m as SelfServiceBlockedPlans, w as TrialProjectionPort, h as PendingPlanQueryPort, f as ContractFreezePort, l as SelfServiceBlockedBundles, u as TenantIdResolver, B as UserIdResolver, z as UserEmailResolver, a as AuditContextResolver } from './tenant-billing.module-BxJS6fX4.cjs';
|
|
3
3
|
import { PlanCatalog, SubscriptionUsagePort, UsageSnapshotPort, TenantSubscriptionWritePort, SubscriptionBundleRepository, BundleRepository, SubscriptionBundleView, SubscriptionBundleRecord, PlanRepository, CatalogEntryRepository, BundleVersionRow, SubscriptionUsageRecord, OnboardingSelectionResponse } from '@saasicat/types';
|
|
4
4
|
import { c as EntitlementService, a as EffectiveLimitsSnapshot, t as toEffectiveLimitsSnapshot } from './aggregation-mZ7WZROK.cjs';
|
|
5
|
-
import { g as PromoCodesService } from './service-D48clObR.cjs';
|
|
5
|
+
import { g as PromoCodesService } from './promo.service-D48clObR.cjs';
|
|
6
6
|
import { A as AdminAuditService } from './admin-audit.service-9IqXMlZm.cjs';
|
|
7
7
|
|
|
8
8
|
declare class ComposedTenantAuthGuard implements CanActivate {
|
package/dist/testing/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BundleRepository, BundleRow, BundleVersionRow, BundleListFilter, CreateBundleData, UpdateBundleData, CreateBundleVersionDraftData, UpdateBundleVersionDraftData, VersionChange, MarketingProjectionRepository, MarketingProjectionRow, MarketingProjectionFilter, CreateMarketingProjectionData, UpdateMarketingProjectionData, PlanRepository, PlanRow, PlanVersionRow, PlanListFilter, CreatePlanData, UpdatePlanData, CreatePlanVersionDraftData, UpdatePlanVersionDraftData, PlanVersionRepository, PlanVersionRecord, TransactionContext, SubscriptionBundleRepository, SubscriptionBundleRecord, CreateSubscriptionBundleData, CancelSubscriptionBundleData, SubscriptionContractRepository, SubscriptionContractFilter, SubscriptionContractRecord, CreateSubscriptionContractData, TerminateSubscriptionContractData, SubscriptionRepository, SubscriptionRecord, TransactionRunner, PlanCatalog, QuotaProvider } from '@saasicat/types';
|
|
2
2
|
import { Type, DynamicModule } from '@nestjs/common';
|
|
3
|
-
import { S as
|
|
4
|
-
export { P as PLAN_RESOLVER_PORT_TOKEN, n as StaticPlanResolver } from '../module-options-
|
|
5
|
-
export { E as EnforceQuotaInterceptor, S as StaticEntitlementService, a as StaticFeatureGuard } from '../enforce-quota.interceptor-
|
|
3
|
+
import { S as SaaSiCatAdapters } from '../module-options-DgwBKVpC.cjs';
|
|
4
|
+
export { P as PLAN_RESOLVER_PORT_TOKEN, n as StaticPlanResolver } from '../module-options-DgwBKVpC.cjs';
|
|
5
|
+
export { E as EnforceQuotaInterceptor, S as StaticEntitlementService, a as StaticFeatureGuard } from '../enforce-quota.interceptor-BxIR63Wn.cjs';
|
|
6
6
|
import '../di-CcNeq9v-.cjs';
|
|
7
7
|
import '../admin-resources.module-DGgGSdzN.cjs';
|
|
8
8
|
import '../admin-audit.service-9IqXMlZm.cjs';
|
|
@@ -11,8 +11,8 @@ import '../catalog.module-D-_pQDNA.cjs';
|
|
|
11
11
|
import '../discovery.scanner-DLgEvuoy.cjs';
|
|
12
12
|
import '@nestjs/core';
|
|
13
13
|
import '../plan-resolution-CFCoUkrE.cjs';
|
|
14
|
-
import '../module-
|
|
15
|
-
import '../service-D48clObR.cjs';
|
|
14
|
+
import '../promo.module-DokmUGmm.cjs';
|
|
15
|
+
import '../promo.service-D48clObR.cjs';
|
|
16
16
|
import '../checkout-offer.module-DmlpPevf.cjs';
|
|
17
17
|
import '../subscription-contract.module-B2uNvUJL.cjs';
|
|
18
18
|
import 'rxjs';
|
|
@@ -234,20 +234,20 @@ declare class StubAuditPort {
|
|
|
234
234
|
declare class StubRlsBypassPort {
|
|
235
235
|
runWithBypass<T>(fn: () => Promise<T>): Promise<T>;
|
|
236
236
|
}
|
|
237
|
-
interface
|
|
237
|
+
interface CreateSaaSiCatTestModuleOptions {
|
|
238
238
|
planCatalog: PlanCatalog;
|
|
239
239
|
/** Default `'starter'` if the catalog has at least one plan. */
|
|
240
240
|
defaultPlanId?: string;
|
|
241
241
|
/** QuotaProvider classes for the `EnforceQuotaInterceptor`. */
|
|
242
242
|
quotaProviders?: Array<Type<QuotaProvider>>;
|
|
243
243
|
/** Overrides — if the test needs a different adapter. */
|
|
244
|
-
overrides?: Partial<Pick<
|
|
244
|
+
overrides?: Partial<Pick<SaaSiCatAdapters, 'mfa' | 'audit' | 'rlsBypass'>>;
|
|
245
245
|
}
|
|
246
246
|
/**
|
|
247
|
-
* Returns a `DynamicModule` that sets up the
|
|
247
|
+
* Returns a `DynamicModule` that sets up the SaaSiCatModule with stub
|
|
248
248
|
* adapters + the given PlanCatalog in static entitlement mode.
|
|
249
249
|
* Tests can drop this into `Test.createTestingModule({ imports: [...] })`.
|
|
250
250
|
*/
|
|
251
|
-
declare function
|
|
251
|
+
declare function createSaaSiCatTestModule(options: CreateSaaSiCatTestModuleOptions): DynamicModule;
|
|
252
252
|
|
|
253
|
-
export { type
|
|
253
|
+
export { type CreateSaaSiCatTestModuleOptions, FakeBundleRepository, FakeMarketingProjectionRepository, FakePlanRepository, FakePlanVersionRepository, FakeSubscriptionBundleRepository, FakeSubscriptionContractRepository, FakeSubscriptionRepository, FakeTransactionRunner, StubAuditPort, StubMfaPort, StubRlsBypassPort, createSaaSiCatTestModule };
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BundleRepository, BundleRow, BundleVersionRow, BundleListFilter, CreateBundleData, UpdateBundleData, CreateBundleVersionDraftData, UpdateBundleVersionDraftData, VersionChange, MarketingProjectionRepository, MarketingProjectionRow, MarketingProjectionFilter, CreateMarketingProjectionData, UpdateMarketingProjectionData, PlanRepository, PlanRow, PlanVersionRow, PlanListFilter, CreatePlanData, UpdatePlanData, CreatePlanVersionDraftData, UpdatePlanVersionDraftData, PlanVersionRepository, PlanVersionRecord, TransactionContext, SubscriptionBundleRepository, SubscriptionBundleRecord, CreateSubscriptionBundleData, CancelSubscriptionBundleData, SubscriptionContractRepository, SubscriptionContractFilter, SubscriptionContractRecord, CreateSubscriptionContractData, TerminateSubscriptionContractData, SubscriptionRepository, SubscriptionRecord, TransactionRunner, PlanCatalog, QuotaProvider } from '@saasicat/types';
|
|
2
2
|
import { Type, DynamicModule } from '@nestjs/common';
|
|
3
|
-
import { S as
|
|
4
|
-
export { P as PLAN_RESOLVER_PORT_TOKEN, n as StaticPlanResolver } from '../module-options-
|
|
5
|
-
export { E as EnforceQuotaInterceptor, S as StaticEntitlementService, a as StaticFeatureGuard } from '../enforce-quota.interceptor-
|
|
3
|
+
import { S as SaaSiCatAdapters } from '../module-options-BymIkAsh.js';
|
|
4
|
+
export { P as PLAN_RESOLVER_PORT_TOKEN, n as StaticPlanResolver } from '../module-options-BymIkAsh.js';
|
|
5
|
+
export { E as EnforceQuotaInterceptor, S as StaticEntitlementService, a as StaticFeatureGuard } from '../enforce-quota.interceptor-BYqmdFB5.js';
|
|
6
6
|
import '../di-CcNeq9v-.js';
|
|
7
7
|
import '../admin-resources.module-BY5r_1MG.js';
|
|
8
8
|
import '../admin-audit.service-9IqXMlZm.js';
|
|
@@ -11,8 +11,8 @@ import '../catalog.module-CQr1FpkI.js';
|
|
|
11
11
|
import '../discovery.scanner-DLgEvuoy.js';
|
|
12
12
|
import '@nestjs/core';
|
|
13
13
|
import '../plan-resolution-CFCoUkrE.js';
|
|
14
|
-
import '../module-
|
|
15
|
-
import '../service-D48clObR.js';
|
|
14
|
+
import '../promo.module-CnzddtJ0.js';
|
|
15
|
+
import '../promo.service-D48clObR.js';
|
|
16
16
|
import '../checkout-offer.module-Ca3_TieR.js';
|
|
17
17
|
import '../subscription-contract.module-edyhBr4n.js';
|
|
18
18
|
import 'rxjs';
|
|
@@ -234,20 +234,20 @@ declare class StubAuditPort {
|
|
|
234
234
|
declare class StubRlsBypassPort {
|
|
235
235
|
runWithBypass<T>(fn: () => Promise<T>): Promise<T>;
|
|
236
236
|
}
|
|
237
|
-
interface
|
|
237
|
+
interface CreateSaaSiCatTestModuleOptions {
|
|
238
238
|
planCatalog: PlanCatalog;
|
|
239
239
|
/** Default `'starter'` if the catalog has at least one plan. */
|
|
240
240
|
defaultPlanId?: string;
|
|
241
241
|
/** QuotaProvider classes for the `EnforceQuotaInterceptor`. */
|
|
242
242
|
quotaProviders?: Array<Type<QuotaProvider>>;
|
|
243
243
|
/** Overrides — if the test needs a different adapter. */
|
|
244
|
-
overrides?: Partial<Pick<
|
|
244
|
+
overrides?: Partial<Pick<SaaSiCatAdapters, 'mfa' | 'audit' | 'rlsBypass'>>;
|
|
245
245
|
}
|
|
246
246
|
/**
|
|
247
|
-
* Returns a `DynamicModule` that sets up the
|
|
247
|
+
* Returns a `DynamicModule` that sets up the SaaSiCatModule with stub
|
|
248
248
|
* adapters + the given PlanCatalog in static entitlement mode.
|
|
249
249
|
* Tests can drop this into `Test.createTestingModule({ imports: [...] })`.
|
|
250
250
|
*/
|
|
251
|
-
declare function
|
|
251
|
+
declare function createSaaSiCatTestModule(options: CreateSaaSiCatTestModuleOptions): DynamicModule;
|
|
252
252
|
|
|
253
|
-
export { type
|
|
253
|
+
export { type CreateSaaSiCatTestModuleOptions, FakeBundleRepository, FakeMarketingProjectionRepository, FakePlanRepository, FakePlanVersionRepository, FakeSubscriptionBundleRepository, FakeSubscriptionContractRepository, FakeSubscriptionRepository, FakeTransactionRunner, StubAuditPort, StubMfaPort, StubRlsBypassPort, createSaaSiCatTestModule };
|
package/dist/testing/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EnforceQuotaInterceptor,
|
|
3
3
|
PLAN_RESOLVER_PORT_TOKEN,
|
|
4
|
-
|
|
4
|
+
SaaSiCatModule,
|
|
5
5
|
StaticEntitlementService,
|
|
6
6
|
StaticFeatureGuard,
|
|
7
7
|
StaticPlanResolver
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-JCAZT727.js";
|
|
9
|
+
import "../chunk-VTMCMVYQ.js";
|
|
10
|
+
import "../chunk-Y43SGD5J.js";
|
|
11
|
+
import "../chunk-IPOLCDKN.js";
|
|
12
|
+
import "../chunk-WSPHIIGS.js";
|
|
13
|
+
import "../chunk-V4OJ43K2.js";
|
|
14
|
+
import "../chunk-IVEA6M3B.js";
|
|
15
|
+
import "../chunk-SH7J5IU7.js";
|
|
16
|
+
import "../chunk-S6BAD5XM.js";
|
|
17
|
+
import "../chunk-O2J2HDXA.js";
|
|
18
|
+
import "../chunk-AEEK64XD.js";
|
|
19
19
|
import "../chunk-BSK6YBLI.js";
|
|
20
20
|
import "../chunk-YSC46BGM.js";
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-XBYAFEOR.js";
|
|
22
|
+
import "../chunk-WXYJHZCN.js";
|
|
23
|
+
import "../chunk-H3W6QDQH.js";
|
|
24
|
+
import "../chunk-XEW6YXL5.js";
|
|
25
25
|
import "../chunk-DQKCK7DX.js";
|
|
26
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-VBRYPU7V.js";
|
|
27
27
|
import "../chunk-EBJJNTW6.js";
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-OUDSQ3PU.js";
|
|
29
|
+
import "../chunk-AOQJEYOL.js";
|
|
30
30
|
import "../chunk-SABTXESR.js";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-QUZU2M33.js";
|
|
32
32
|
import {
|
|
33
33
|
__name
|
|
34
34
|
} from "../chunk-SHUYVCID.js";
|
|
@@ -341,7 +341,7 @@ var FakeTransactionRunner = class _FakeTransactionRunner {
|
|
|
341
341
|
__name(this, "FakeTransactionRunner");
|
|
342
342
|
}
|
|
343
343
|
/** Sentinel value passed through as the TransactionContext. */
|
|
344
|
-
static TX_SENTINEL = /* @__PURE__ */ Symbol.for("FakeTransactionRunner.tx");
|
|
344
|
+
static TX_SENTINEL = /* @__PURE__ */ Symbol.for("saasicat/nest/FakeTransactionRunner.tx");
|
|
345
345
|
runCount = 0;
|
|
346
346
|
async run(fn) {
|
|
347
347
|
this.runCount += 1;
|
|
@@ -922,7 +922,7 @@ var FakePlanRepository = class {
|
|
|
922
922
|
}
|
|
923
923
|
};
|
|
924
924
|
|
|
925
|
-
// src/testing/create-
|
|
925
|
+
// src/testing/create-saasicat-test-module.ts
|
|
926
926
|
import { Module } from "@nestjs/common";
|
|
927
927
|
function _ts_decorate(decorators, target, key, desc) {
|
|
928
928
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -964,17 +964,17 @@ var StubRlsBypassPort = class {
|
|
|
964
964
|
return fn();
|
|
965
965
|
}
|
|
966
966
|
};
|
|
967
|
-
function
|
|
967
|
+
function createSaaSiCatTestModule(options) {
|
|
968
968
|
const defaultPlanId = options.defaultPlanId ?? options.planCatalog.plans?.[0]?.id;
|
|
969
|
-
let
|
|
969
|
+
let SaaSiCatTestHost = class SaaSiCatTestHost {
|
|
970
970
|
static {
|
|
971
|
-
__name(this, "
|
|
971
|
+
__name(this, "SaaSiCatTestHost");
|
|
972
972
|
}
|
|
973
973
|
};
|
|
974
|
-
|
|
974
|
+
SaaSiCatTestHost = _ts_decorate([
|
|
975
975
|
Module({
|
|
976
976
|
imports: [
|
|
977
|
-
|
|
977
|
+
SaaSiCatModule.forRoot({
|
|
978
978
|
planCatalog: options.planCatalog,
|
|
979
979
|
controller: {
|
|
980
980
|
guards: []
|
|
@@ -989,12 +989,12 @@ function createSaasPlatformTestModule(options) {
|
|
|
989
989
|
})
|
|
990
990
|
]
|
|
991
991
|
})
|
|
992
|
-
],
|
|
992
|
+
], SaaSiCatTestHost);
|
|
993
993
|
return {
|
|
994
|
-
module:
|
|
994
|
+
module: SaaSiCatTestHost
|
|
995
995
|
};
|
|
996
996
|
}
|
|
997
|
-
__name(
|
|
997
|
+
__name(createSaaSiCatTestModule, "createSaaSiCatTestModule");
|
|
998
998
|
export {
|
|
999
999
|
EnforceQuotaInterceptor,
|
|
1000
1000
|
FakeBundleRepository,
|
|
@@ -1012,5 +1012,5 @@ export {
|
|
|
1012
1012
|
StubAuditPort,
|
|
1013
1013
|
StubMfaPort,
|
|
1014
1014
|
StubRlsBypassPort,
|
|
1015
|
-
|
|
1015
|
+
createSaaSiCatTestModule
|
|
1016
1016
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saasicat/nest",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-rc.0",
|
|
4
4
|
"description": "NestJS implementation of SaaSiCat: capability discovery, catalog packaging, contracts, entitlement enforcement, billing and admin APIs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -137,8 +137,8 @@
|
|
|
137
137
|
"js-yaml": "^4.3.1",
|
|
138
138
|
"otplib": "^13.4.1",
|
|
139
139
|
"qrcode": "^1.5.4",
|
|
140
|
-
"@saasicat/spec": "^0.
|
|
141
|
-
"@saasicat/types": "^0.
|
|
140
|
+
"@saasicat/spec": "^1.0.0-rc.0",
|
|
141
|
+
"@saasicat/types": "^1.0.0-rc.0"
|
|
142
142
|
},
|
|
143
143
|
"peerDependencies": {
|
|
144
144
|
"@nestjs/common": "^11.0.0",
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"repository": {
|
|
172
172
|
"type": "git",
|
|
173
173
|
"url": "https://github.com/uelker70/saasicat.git",
|
|
174
|
-
"directory": "packages/
|
|
174
|
+
"directory": "packages/nest"
|
|
175
175
|
},
|
|
176
176
|
"bugs": {
|
|
177
177
|
"url": "https://github.com/uelker70/saasicat/issues"
|
|
@@ -182,6 +182,6 @@
|
|
|
182
182
|
"scripts": {
|
|
183
183
|
"build": "node ../../scripts/build-and-prune.mjs \"tsup && tsup --config tsup.cjs.config.ts && node scripts/build-cjs-stubs.mjs\"",
|
|
184
184
|
"pretest": "pnpm run build",
|
|
185
|
-
"test": "node --test tests
|
|
185
|
+
"test": "node --test 'tests/*.test.js'"
|
|
186
186
|
}
|
|
187
187
|
}
|
package/dist/chunk-L4KTQ6CL.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
};
|
|
File without changes
|
|
File without changes
|