@saasicat/nest 1.0.0-rc.2 → 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/README.md +44 -8
- package/dist/.build-stamp +1 -1
- package/dist/_entries.cjs +10214 -4796
- package/dist/admin/index.d.cts +5 -4
- package/dist/admin/index.d.ts +5 -4
- package/dist/admin/index.js +13 -9
- package/dist/{admin-resources.module-CpvzcfCc.d.cts → admin-resources.module-B4XNvdH-.d.cts} +1 -2
- package/dist/{admin-resources.module-DF5_Q7RD.d.ts → admin-resources.module-CWqdI9BV.d.ts} +1 -2
- package/dist/{admin-stats.service-TYiSUwIR.d.ts → admin-stats.service-CsLNt19Z.d.ts} +11 -7
- package/dist/{admin-stats.service-DfKupywR.d.cts → admin-stats.service-DrZrU8IJ.d.cts} +11 -7
- package/dist/{aggregation-B3CD0v_d.d.cts → aggregation-ChpZDh0g.d.ts} +39 -6
- package/dist/{aggregation-BFzW07DE.d.ts → aggregation-OpnhwzF5.d.cts} +39 -6
- package/dist/billing/index.d.cts +448 -108
- package/dist/billing/index.d.ts +448 -108
- package/dist/billing/index.js +108 -41
- package/dist/catalog/index.d.cts +74 -45
- package/dist/catalog/index.d.ts +74 -45
- package/dist/catalog/index.js +21 -13
- package/dist/catalog.module-C9O7BxRq.d.ts +180 -0
- package/dist/catalog.module-T-I5Ricz.d.cts +180 -0
- package/dist/checkout-offer/index.d.cts +17 -22
- package/dist/checkout-offer/index.d.ts +17 -22
- package/dist/checkout-offer/index.js +21 -7
- package/dist/checkout-offer.module-DFhGy6JO.d.cts +58 -0
- package/dist/checkout-offer.module-x7SP_dX4.d.ts +58 -0
- package/dist/checkout-offer.service-BeHgYikI.d.ts +242 -0
- package/dist/checkout-offer.service-CCVxG9b2.d.cts +242 -0
- package/dist/chunk-34XVPR6P.js +222 -0
- package/dist/{chunk-AOQJEYOL.js → chunk-3QVGA6JX.js} +3 -1
- package/dist/chunk-3RLWML2S.js +896 -0
- package/dist/{chunk-TXC3LHHB.js → chunk-4SDSYV4A.js} +21 -13
- package/dist/chunk-55QEDAMX.js +946 -0
- package/dist/chunk-5CKC7O52.js +140 -0
- package/dist/chunk-6PJE7EWO.js +185 -0
- package/dist/chunk-7NJKVC5X.js +353 -0
- package/dist/{chunk-RUNZ3X4C.js → chunk-AOS2JPDD.js} +1263 -185
- package/dist/{chunk-WOVQPXV4.js → chunk-CQ2ZZMTD.js} +702 -725
- package/dist/{chunk-NA6O63B7.js → chunk-F5X66HF5.js} +5 -5
- package/dist/chunk-FEQZCWUL.js +174 -0
- package/dist/{chunk-VIJ5NJWC.js → chunk-G6EZWECL.js} +107 -31
- package/dist/chunk-G7RQO2XO.js +0 -0
- package/dist/{chunk-N3L3AICU.js → chunk-GPQWGA6B.js} +5 -6
- package/dist/chunk-GZTL64QK.js +7 -0
- package/dist/{chunk-SABTXESR.js → chunk-J7NJRK3K.js} +17 -1
- package/dist/{chunk-SEPN52AD.js → chunk-JBCC6C3M.js} +566 -307
- package/dist/{chunk-I7GTA3RX.js → chunk-JQRA724W.js} +1 -1
- package/dist/{chunk-WXYJHZCN.js → chunk-JVAEKTJ4.js} +2 -14
- package/dist/chunk-KPEMTBOP.js +26 -0
- package/dist/chunk-LF6J4YYN.js +301 -0
- package/dist/{chunk-LTT736P3.js → chunk-LLYVYRGJ.js} +228 -387
- package/dist/{chunk-6Z7JR4EW.js → chunk-M47BNEY2.js} +1897 -633
- package/dist/{chunk-KFT5AIIH.js → chunk-NDLC5GYK.js} +206 -24
- package/dist/{chunk-O2J2HDXA.js → chunk-OOTEXP47.js} +3 -8
- package/dist/chunk-QPVDCKYS.js +702 -0
- package/dist/{chunk-NHVDCYK5.js → chunk-R5YCJBHY.js} +71 -106
- package/dist/{chunk-XBYAFEOR.js → chunk-S33SO5XX.js} +1 -1
- package/dist/chunk-SZ7RFPXA.js +10 -0
- package/dist/chunk-TBBZWZQT.js +98 -0
- package/dist/chunk-TOEFN7DN.js +295 -0
- package/dist/{chunk-7ZEGFL42.js → chunk-WHJSYKNC.js} +6 -6
- package/dist/chunk-WOEJ6K7M.js +55 -0
- package/dist/{chunk-AU3OOREM.js → chunk-XSSWYPP5.js} +16 -3
- package/dist/contract-line-item-money-B0Z3Ogur.d.cts +43 -0
- package/dist/contract-line-item-money-B0Z3Ogur.d.ts +43 -0
- package/dist/discovery/index.d.cts +2 -2
- package/dist/discovery/index.d.ts +2 -2
- package/dist/discovery/index.js +6 -6
- package/dist/{discovery.scanner-9cMqF95o.d.cts → discovery.scanner-DXKc6JkV.d.cts} +1 -1
- package/dist/{discovery.scanner-9cMqF95o.d.ts → discovery.scanner-DXKc6JkV.d.ts} +1 -1
- package/dist/{enforce-quota.interceptor-Df0e3OWe.d.cts → enforce-quota.interceptor-BFyVdWe8.d.cts} +6 -6
- package/dist/{enforce-quota.interceptor-DW3etVyI.d.ts → enforce-quota.interceptor-GaBXboGx.d.ts} +6 -6
- package/dist/entitlement/index.d.cts +27 -4
- package/dist/entitlement/index.d.ts +27 -4
- package/dist/entitlement/index.js +13 -8
- package/dist/index.d.cts +209 -28
- package/dist/index.d.ts +209 -28
- package/dist/index.js +285 -163
- package/dist/issuer-identity.check-CBO0vcsq.d.cts +197 -0
- package/dist/issuer-identity.check-Cz9CEMkZ.d.ts +197 -0
- package/dist/{module-options-COSEb0VW.d.ts → module-options-DmQ3G4sZ.d.ts} +135 -41
- package/dist/{module-options-BG3MzQva.d.cts → module-options-qAOwinHR.d.cts} +135 -41
- package/dist/payment-callback.service-CR84Xw1Z.d.cts +125 -0
- package/dist/payment-callback.service-CR84Xw1Z.d.ts +125 -0
- package/dist/payments/index.cjs +4 -0
- package/dist/payments/index.d.cts +187 -0
- package/dist/payments/index.d.ts +187 -0
- package/dist/payments/index.js +141 -0
- package/dist/payments.module-BdUq9ot_.d.cts +57 -0
- package/dist/payments.module-CQGv_VG7.d.ts +57 -0
- 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-resolution-Cgo_TR1H.d.cts → plan-resolution-CwUy_OqC.d.cts} +14 -0
- package/dist/{plan-resolution-Cgo_TR1H.d.ts → plan-resolution-CwUy_OqC.d.ts} +14 -0
- package/dist/{plan-versions.service-DChhbK6h.d.ts → plan-versions.service-C0N-Em2W.d.ts} +38 -64
- package/dist/{plan-versions.service-TPEtbN0r.d.cts → plan-versions.service-DARLh-qI.d.cts} +38 -64
- package/dist/platform/index.d.cts +52 -23
- package/dist/platform/index.d.ts +52 -23
- package/dist/platform/index.js +57 -36
- package/dist/promo/index.d.cts +23 -8
- package/dist/promo/index.d.ts +23 -8
- package/dist/promo/index.js +15 -7
- package/dist/{promo.module-DtvIycpt.d.cts → promo.module-CKkECmU8.d.cts} +9 -3
- package/dist/{promo.module-Z8h1PNX-.d.ts → promo.module-DuIJdK3U.d.ts} +9 -3
- package/dist/promo.service-BYBu6dy3.d.cts +215 -0
- package/dist/promo.service-CFjfF0Xm.d.ts +215 -0
- package/dist/registration/index.d.cts +104 -47
- package/dist/registration/index.d.ts +104 -47
- package/dist/registration/index.js +15 -9
- package/dist/subscriber/index.cjs +4 -0
- package/dist/subscriber/index.d.cts +28 -0
- package/dist/subscriber/index.d.ts +28 -0
- package/dist/subscriber/index.js +16 -0
- package/dist/subscriber.service-5W6Gi-1B.d.cts +68 -0
- package/dist/subscriber.service-5W6Gi-1B.d.ts +68 -0
- package/dist/subscription-contract/index.d.cts +4 -2
- package/dist/subscription-contract/index.d.ts +4 -2
- package/dist/subscription-contract/index.js +13 -5
- package/dist/{subscription-contract.module-fDFdQ0jm.d.ts → subscription-contract.module-BfIRpc1o.d.ts} +8 -2
- package/dist/{subscription-contract.module-CEK8HS5-.d.cts → subscription-contract.module-DTMuUJYd.d.cts} +8 -2
- package/dist/{subscription-contract.service-hD87MKyg.d.cts → subscription-contract.service-CPZrTM9C.d.ts} +32 -3
- package/dist/{subscription-contract.service-hD87MKyg.d.ts → subscription-contract.service-CfNApLuP.d.cts} +32 -3
- package/dist/tenant-billing.controller-BLqbsONe.d.ts +812 -0
- package/dist/tenant-billing.controller-DKbAqTbM.d.cts +812 -0
- package/dist/tenant-billing.module-ClbjzocC.d.cts +364 -0
- package/dist/tenant-billing.module-DohgJJ2m.d.ts +364 -0
- package/dist/tenant-billing.tokens-G-1xOlMr.d.cts +129 -0
- package/dist/tenant-billing.tokens-G-1xOlMr.d.ts +129 -0
- package/dist/testing/index.d.cts +44 -17
- package/dist/testing/index.d.ts +44 -17
- package/dist/testing/index.js +189 -40
- package/package.json +24 -4
- package/dist/catalog.module-BDDO6iwq.d.cts +0 -103
- package/dist/catalog.module-BTnMsE6u.d.ts +0 -103
- package/dist/checkout-offer.module-CMtiQJTT.d.ts +0 -39
- package/dist/checkout-offer.module-CVpWrzbe.d.cts +0 -39
- package/dist/checkout-offer.service-BLOv2HOo.d.cts +0 -49
- package/dist/checkout-offer.service-BLOv2HOo.d.ts +0 -49
- package/dist/chunk-57V6ZTI6.js +0 -22
- package/dist/chunk-BSK6YBLI.js +0 -87
- package/dist/chunk-DQKCK7DX.js +0 -217
- package/dist/chunk-VXEYLNIB.js +0 -632
- package/dist/chunk-WUDYIPYH.js +0 -715
- package/dist/define-saasicat-DROBe-b1.d.ts +0 -69
- package/dist/define-saasicat-vGBCkFys.d.cts +0 -69
- package/dist/promo.service-BJbKAmw3.d.cts +0 -112
- package/dist/promo.service-BJbKAmw3.d.ts +0 -112
- package/dist/tenant-billing.controller-BQ67mlmI.d.ts +0 -438
- package/dist/tenant-billing.controller-DS8kB8a7.d.cts +0 -438
- package/dist/tenant-billing.module-BznC3XtW.d.cts +0 -299
- package/dist/tenant-billing.module-wUbsQSFG.d.ts +0 -299
- /package/dist/{chunk-2FR6ZL7R.js → chunk-BHZOH2DY.js} +0 -0
- /package/dist/{chunk-2SLTRKXC.js → chunk-DFOW3JVO.js} +0 -0
- /package/dist/{chunk-DBZGV3HC.js → chunk-DU56UKEH.js} +0 -0
- /package/dist/{chunk-OYNHOY45.js → chunk-GAUEVIAE.js} +0 -0
package/dist/billing/index.js
CHANGED
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
PlanCatalogImportDto,
|
|
9
9
|
PlanCatalogImporterModule,
|
|
10
10
|
PlanCatalogImporterService,
|
|
11
|
-
PlanCatalogValidationError,
|
|
12
11
|
PublishValidationError,
|
|
13
12
|
UPSELL_OFFER_CURRENCY_TOKEN,
|
|
14
13
|
UPSELL_OFFER_RESOLVER_TOKEN,
|
|
@@ -20,26 +19,29 @@ import {
|
|
|
20
19
|
clearPendingPlanVersionFields,
|
|
21
20
|
computeCarriedTrialEndsAt,
|
|
22
21
|
computeNextPeriod,
|
|
23
|
-
decideRenewal
|
|
24
|
-
|
|
25
|
-
loadPlanCatalogFromString
|
|
26
|
-
} from "../chunk-NHVDCYK5.js";
|
|
22
|
+
decideRenewal
|
|
23
|
+
} from "../chunk-R5YCJBHY.js";
|
|
27
24
|
import {
|
|
25
|
+
AddSubscriptionBundleDto,
|
|
28
26
|
BILLING_FEATURE_UI_REGISTRY_TOKEN,
|
|
27
|
+
BundlePriceLookupDto,
|
|
29
28
|
CONTRACT_FREEZE_PORT_TOKEN,
|
|
30
|
-
CONTRACT_FREEZE_PROJECT_KEY_TOKEN,
|
|
31
29
|
CONTRACT_FREEZE_SOURCE_PORT_TOKEN,
|
|
30
|
+
CancelSubscriptionBundleDto,
|
|
32
31
|
CancelSubscriptionDto,
|
|
33
32
|
ChangePlanDto,
|
|
34
33
|
CompleteOnboardingSubscriptionDto,
|
|
35
|
-
|
|
34
|
+
DEFAULT_BUNDLE_MINIMUM_TERM_MONTHS,
|
|
36
35
|
FEATURE_GUARD_MARKER,
|
|
36
|
+
NO_NOTICE_PERIOD,
|
|
37
|
+
PLAN_CATALOG_UNREADABLE_ERROR,
|
|
37
38
|
PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN,
|
|
38
39
|
PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN,
|
|
39
|
-
PUBLIC_CATALOG_PROJECT_KEY_TOKEN,
|
|
40
40
|
PendingPlanMaterializationService,
|
|
41
|
+
PlanCatalogValidationError,
|
|
41
42
|
PlanChangePreviewService,
|
|
42
43
|
PreviewPlanChangeDto,
|
|
44
|
+
PreviewSubscriptionBundleDto,
|
|
43
45
|
PublicCatalogController,
|
|
44
46
|
PublicCatalogModule,
|
|
45
47
|
REQUIRE_FEATURE_KEY,
|
|
@@ -54,43 +56,48 @@ import {
|
|
|
54
56
|
TenantBillingController,
|
|
55
57
|
TenantBillingModule,
|
|
56
58
|
addMonths,
|
|
59
|
+
advanceOneCycle,
|
|
60
|
+
billingAnchorDay,
|
|
57
61
|
buildTenantSubscriptionBundlesController,
|
|
62
|
+
bundleCycleFitsPlan,
|
|
63
|
+
bundleFirstPeriodEnd,
|
|
64
|
+
bundleFirstPeriodStart,
|
|
65
|
+
bundleNextPeriodEnd,
|
|
66
|
+
catalogSource,
|
|
67
|
+
clampToParent,
|
|
68
|
+
computeNextBundlePeriod,
|
|
58
69
|
computeProration,
|
|
70
|
+
decideCancellation,
|
|
71
|
+
decideCancellationFor,
|
|
59
72
|
initialPeriodWindow,
|
|
60
73
|
isPlatformFeatureGuard,
|
|
74
|
+
loadPlanCatalogFromFile,
|
|
75
|
+
loadPlanCatalogFromString,
|
|
76
|
+
noticeDaysFor,
|
|
61
77
|
periodEndAfter,
|
|
62
78
|
periodEndWithMinLead,
|
|
63
79
|
resolveBundleCancelEffectiveAt,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
import "../chunk-KFT5AIIH.js";
|
|
80
|
+
resolvePlanAnchorDay,
|
|
81
|
+
retreatOneCycle
|
|
82
|
+
} from "../chunk-M47BNEY2.js";
|
|
68
83
|
import {
|
|
69
|
-
AUDIT_CONTEXT_RESOLVER_TOKEN,
|
|
70
|
-
PENDING_PLAN_QUERY_PORT_TOKEN,
|
|
71
|
-
SUBSCRIPTION_USAGE_PORT_TOKEN,
|
|
72
|
-
SUBSCRIPTION_WRITE_PORT_TOKEN,
|
|
73
|
-
TENANT_AUTH_GUARDS_TOKEN,
|
|
74
|
-
TENANT_ID_RESOLVER_TOKEN,
|
|
75
|
-
TRIAL_PROJECTION_PORT_TOKEN,
|
|
76
|
-
USAGE_SNAPSHOT_PORT_TOKEN,
|
|
77
|
-
USER_EMAIL_RESOLVER_TOKEN,
|
|
78
|
-
USER_ID_RESOLVER_TOKEN,
|
|
79
84
|
classifyBundleVersionDiff,
|
|
80
85
|
classifyPlanDiff
|
|
81
|
-
} from "../chunk-
|
|
82
|
-
import "../chunk-
|
|
83
|
-
import "../chunk-
|
|
84
|
-
import "../chunk-
|
|
86
|
+
} from "../chunk-GZTL64QK.js";
|
|
87
|
+
import "../chunk-34XVPR6P.js";
|
|
88
|
+
import "../chunk-OOTEXP47.js";
|
|
89
|
+
import "../chunk-3RLWML2S.js";
|
|
90
|
+
import "../chunk-NDLC5GYK.js";
|
|
91
|
+
import {
|
|
92
|
+
cyclesSoldFor,
|
|
93
|
+
resolveBundlePriceNet
|
|
94
|
+
} from "../chunk-KPEMTBOP.js";
|
|
85
95
|
import {
|
|
86
96
|
SUBSCRIPTION_BUNDLE_CONFIG_TOKEN,
|
|
87
97
|
SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN
|
|
88
|
-
} from "../chunk-
|
|
98
|
+
} from "../chunk-G6EZWECL.js";
|
|
99
|
+
import "../chunk-OUDSQ3PU.js";
|
|
89
100
|
import {
|
|
90
|
-
PLAN_CATALOG_READ_SINK_TOKEN,
|
|
91
|
-
PLAN_CATALOG_TOKEN,
|
|
92
|
-
PlanCatalogModule,
|
|
93
|
-
buildPlanCatalogFromSnapshot,
|
|
94
101
|
findPlan,
|
|
95
102
|
getActiveFeatureKeys,
|
|
96
103
|
getMarketedPlans,
|
|
@@ -99,38 +106,78 @@ import {
|
|
|
99
106
|
getPlanPriceNet,
|
|
100
107
|
getPlanQuota,
|
|
101
108
|
isFeatureInPlan,
|
|
102
|
-
isFeaturePlannedOnly
|
|
103
|
-
|
|
109
|
+
isFeaturePlannedOnly,
|
|
110
|
+
isPlanNotSoldInCycle,
|
|
111
|
+
listPriceNet,
|
|
112
|
+
planNotSoldInCycle
|
|
113
|
+
} from "../chunk-TBBZWZQT.js";
|
|
104
114
|
import "../chunk-VBRYPU7V.js";
|
|
105
|
-
import "../chunk-
|
|
106
|
-
import "../chunk-
|
|
107
|
-
import "../chunk-AOQJEYOL.js";
|
|
108
|
-
import "../chunk-SABTXESR.js";
|
|
115
|
+
import "../chunk-6PJE7EWO.js";
|
|
116
|
+
import "../chunk-3QVGA6JX.js";
|
|
109
117
|
import "../chunk-QUZU2M33.js";
|
|
118
|
+
import {
|
|
119
|
+
BillingPermissionGuard,
|
|
120
|
+
ComposedTenantAuthGuard
|
|
121
|
+
} from "../chunk-5CKC7O52.js";
|
|
122
|
+
import {
|
|
123
|
+
AUDIT_CONTEXT_RESOLVER_TOKEN,
|
|
124
|
+
BILLING_PERMISSION_GUARDS_TOKEN,
|
|
125
|
+
CANCELLATION_NOTICE_DAYS_TOKEN,
|
|
126
|
+
PENDING_PLAN_QUERY_PORT_TOKEN,
|
|
127
|
+
SUBSCRIPTION_USAGE_PORT_TOKEN,
|
|
128
|
+
SUBSCRIPTION_WRITE_PORT_TOKEN,
|
|
129
|
+
TENANT_AUTH_GUARDS_TOKEN,
|
|
130
|
+
TENANT_ID_RESOLVER_TOKEN,
|
|
131
|
+
TRIAL_PROJECTION_PORT_TOKEN,
|
|
132
|
+
USAGE_SNAPSHOT_PORT_TOKEN,
|
|
133
|
+
USER_EMAIL_RESOLVER_TOKEN,
|
|
134
|
+
USER_ID_RESOLVER_TOKEN
|
|
135
|
+
} from "../chunk-GPQWGA6B.js";
|
|
136
|
+
import "../chunk-SZ7RFPXA.js";
|
|
137
|
+
import "../chunk-WOEJ6K7M.js";
|
|
138
|
+
import "../chunk-LF6J4YYN.js";
|
|
139
|
+
import "../chunk-YSC46BGM.js";
|
|
140
|
+
import {
|
|
141
|
+
PLAN_CATALOG_READ_SINK_TOKEN,
|
|
142
|
+
PLAN_CATALOG_SETTINGS_TOKEN,
|
|
143
|
+
PLAN_CATALOG_SOURCE_TOKEN,
|
|
144
|
+
PlanCatalogModule,
|
|
145
|
+
buildPlanCatalogFromSnapshot,
|
|
146
|
+
givenPlanCatalogSource
|
|
147
|
+
} from "../chunk-FEQZCWUL.js";
|
|
148
|
+
import "../chunk-J7NJRK3K.js";
|
|
110
149
|
import "../chunk-SHUYVCID.js";
|
|
111
150
|
export {
|
|
112
151
|
AUDIT_CONTEXT_RESOLVER_TOKEN,
|
|
152
|
+
AddSubscriptionBundleDto,
|
|
113
153
|
BILLING_FEATURE_UI_REGISTRY_TOKEN,
|
|
154
|
+
BILLING_PERMISSION_GUARDS_TOKEN,
|
|
155
|
+
BillingPermissionGuard,
|
|
156
|
+
BundlePriceLookupDto,
|
|
157
|
+
CANCELLATION_NOTICE_DAYS_TOKEN,
|
|
114
158
|
CONTRACT_FREEZE_PORT_TOKEN,
|
|
115
|
-
CONTRACT_FREEZE_PROJECT_KEY_TOKEN,
|
|
116
159
|
CONTRACT_FREEZE_SOURCE_PORT_TOKEN,
|
|
160
|
+
CancelSubscriptionBundleDto,
|
|
117
161
|
CancelSubscriptionDto,
|
|
118
162
|
CatalogBundleUpsellResolver,
|
|
119
163
|
ChangePlanDto,
|
|
120
164
|
CompleteOnboardingSubscriptionDto,
|
|
121
165
|
ComposedTenantAuthGuard,
|
|
122
166
|
ConfiguratorCatalogBuilder,
|
|
167
|
+
DEFAULT_BUNDLE_MINIMUM_TERM_MONTHS,
|
|
123
168
|
FEATURE_GUARD_CONFIG_TOKEN,
|
|
124
169
|
FEATURE_GUARD_MARKER,
|
|
125
170
|
FeatureGuard,
|
|
126
171
|
LimitExceededFilter,
|
|
172
|
+
NO_NOTICE_PERIOD,
|
|
127
173
|
PENDING_PLAN_QUERY_PORT_TOKEN,
|
|
128
174
|
PLAN_CATALOG_IMPORT_SINK_TOKEN,
|
|
129
175
|
PLAN_CATALOG_READ_SINK_TOKEN,
|
|
130
|
-
|
|
176
|
+
PLAN_CATALOG_SETTINGS_TOKEN,
|
|
177
|
+
PLAN_CATALOG_SOURCE_TOKEN,
|
|
178
|
+
PLAN_CATALOG_UNREADABLE_ERROR,
|
|
131
179
|
PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN,
|
|
132
180
|
PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN,
|
|
133
|
-
PUBLIC_CATALOG_PROJECT_KEY_TOKEN,
|
|
134
181
|
PendingPlanMaterializationService,
|
|
135
182
|
PlanCatalogImportDto,
|
|
136
183
|
PlanCatalogImporterModule,
|
|
@@ -139,6 +186,7 @@ export {
|
|
|
139
186
|
PlanCatalogValidationError,
|
|
140
187
|
PlanChangePreviewService,
|
|
141
188
|
PreviewPlanChangeDto,
|
|
189
|
+
PreviewSubscriptionBundleDto,
|
|
142
190
|
PublicCatalogController,
|
|
143
191
|
PublicCatalogModule,
|
|
144
192
|
PublishValidationError,
|
|
@@ -166,19 +214,31 @@ export {
|
|
|
166
214
|
USER_EMAIL_RESOLVER_TOKEN,
|
|
167
215
|
USER_ID_RESOLVER_TOKEN,
|
|
168
216
|
addMonths,
|
|
217
|
+
advanceOneCycle,
|
|
169
218
|
assertBaseVersionFresh,
|
|
170
219
|
assertChangeNote,
|
|
171
220
|
assertDraftPublishable,
|
|
172
221
|
assertOptimisticLockHeld,
|
|
222
|
+
billingAnchorDay,
|
|
173
223
|
buildPlanCatalogFromSnapshot,
|
|
174
224
|
buildPlanCatalogImporterController,
|
|
175
225
|
buildTenantSubscriptionBundlesController,
|
|
226
|
+
bundleCycleFitsPlan,
|
|
227
|
+
bundleFirstPeriodEnd,
|
|
228
|
+
bundleFirstPeriodStart,
|
|
229
|
+
bundleNextPeriodEnd,
|
|
230
|
+
catalogSource,
|
|
231
|
+
clampToParent,
|
|
176
232
|
classifyBundleVersionDiff,
|
|
177
233
|
classifyPlanDiff,
|
|
178
234
|
clearPendingPlanVersionFields,
|
|
179
235
|
computeCarriedTrialEndsAt,
|
|
236
|
+
computeNextBundlePeriod,
|
|
180
237
|
computeNextPeriod,
|
|
181
238
|
computeProration,
|
|
239
|
+
cyclesSoldFor,
|
|
240
|
+
decideCancellation,
|
|
241
|
+
decideCancellationFor,
|
|
182
242
|
decideRenewal,
|
|
183
243
|
findPlan,
|
|
184
244
|
getActiveFeatureKeys,
|
|
@@ -187,14 +247,21 @@ export {
|
|
|
187
247
|
getPlanPriceGross,
|
|
188
248
|
getPlanPriceNet,
|
|
189
249
|
getPlanQuota,
|
|
250
|
+
givenPlanCatalogSource,
|
|
190
251
|
initialPeriodWindow,
|
|
191
252
|
isFeatureInPlan,
|
|
192
253
|
isFeaturePlannedOnly,
|
|
254
|
+
isPlanNotSoldInCycle,
|
|
193
255
|
isPlatformFeatureGuard,
|
|
256
|
+
listPriceNet,
|
|
194
257
|
loadPlanCatalogFromFile,
|
|
195
258
|
loadPlanCatalogFromString,
|
|
259
|
+
noticeDaysFor,
|
|
196
260
|
periodEndAfter,
|
|
197
261
|
periodEndWithMinLead,
|
|
262
|
+
planNotSoldInCycle,
|
|
198
263
|
resolveBundleCancelEffectiveAt,
|
|
199
|
-
resolveBundlePriceNet
|
|
264
|
+
resolveBundlePriceNet,
|
|
265
|
+
resolvePlanAnchorDay,
|
|
266
|
+
retreatOneCycle
|
|
200
267
|
};
|
package/dist/catalog/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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 {
|
|
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
|
-
import '../discovery.scanner-
|
|
5
|
+
import '../discovery.scanner-DXKc6JkV.cjs';
|
|
6
6
|
import '@nestjs/core';
|
|
7
7
|
import '../di-CcNeq9v-.cjs';
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ declare function buildPromotionsController(guards: Array<Type<CanActivate>>): Ty
|
|
|
12
12
|
|
|
13
13
|
declare function buildMarketingSettingsController(guards: Array<Type<CanActivate>>): Type;
|
|
14
14
|
|
|
15
|
-
declare function buildPublicMarketingCatalogController(guards: Array<Type<CanActivate>>,
|
|
15
|
+
declare function buildPublicMarketingCatalogController(guards: Array<Type<CanActivate>>, currency: string, vatRate: number): Type;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Builds the controller class at boot time with the guards configured by the
|
|
@@ -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
|
|
@@ -164,7 +171,7 @@ declare function featureApprovalSignature(featureKey: string, snapshot: Discover
|
|
|
164
171
|
*/
|
|
165
172
|
declare function quotaApprovalSignature(quota: DiscoveredQuota): string;
|
|
166
173
|
|
|
167
|
-
declare function loadApprovedCatalogKeys(repo: CatalogEntryRepository | null
|
|
174
|
+
declare function loadApprovedCatalogKeys(repo: CatalogEntryRepository | null): Promise<ApprovedCatalogKeys | null>;
|
|
168
175
|
|
|
169
176
|
interface PreflightInput {
|
|
170
177
|
snapshot: DiscoverySnapshot;
|
|
@@ -288,8 +295,41 @@ interface SeedGateRunOptions {
|
|
|
288
295
|
*/
|
|
289
296
|
declare function runSeedGateFromFile(options: SeedGateRunOptions): SeedGateReport | null;
|
|
290
297
|
|
|
298
|
+
/** What a caller may say about a version's window when publishing it. */
|
|
299
|
+
interface ValidityWindowInput {
|
|
300
|
+
validFrom?: string | null;
|
|
301
|
+
validUntil?: string | null;
|
|
302
|
+
}
|
|
303
|
+
/** The predecessor this version succeeds, or `null` for the first one. */
|
|
304
|
+
interface PreviousWindow {
|
|
305
|
+
validFrom?: string | null;
|
|
306
|
+
validUntil?: string | null;
|
|
307
|
+
}
|
|
308
|
+
/** The five refusals, named per entity so the caller keeps its own codes. */
|
|
309
|
+
interface ValidityWindowCodes {
|
|
310
|
+
readonly validFromRequired: string;
|
|
311
|
+
readonly validFromInvalid: string;
|
|
312
|
+
readonly validFromNotAfterPrevious: string;
|
|
313
|
+
readonly validFromNotGapless: string;
|
|
314
|
+
readonly validUntilInvalid: string;
|
|
315
|
+
readonly validUntilBeforeFrom: string;
|
|
316
|
+
}
|
|
317
|
+
declare const PLAN_VERSION_WINDOW_CODES: ValidityWindowCodes;
|
|
318
|
+
declare const BUNDLE_VERSION_WINDOW_CODES: ValidityWindowCodes;
|
|
319
|
+
/**
|
|
320
|
+
* Resolves the window a version is published with, or refuses the publish.
|
|
321
|
+
*
|
|
322
|
+
* `publishMeta` and `draft` are read differently on purpose. A start falls back
|
|
323
|
+
* to the draft's when the call does not carry one, but an END does so only when
|
|
324
|
+
* the call is SILENT about it: an explicit `null` there means "unbounded", and
|
|
325
|
+
* `??` would read that as "no answer" and take the draft's end instead.
|
|
326
|
+
*/
|
|
327
|
+
declare function resolveValidityWindow(publishMeta: ValidityWindowInput, draft: ValidityWindowInput, previous: PreviousWindow | null, codes: ValidityWindowCodes): {
|
|
328
|
+
validFrom: Date;
|
|
329
|
+
validUntil: Date | null;
|
|
330
|
+
};
|
|
331
|
+
|
|
291
332
|
declare class CreateBundleDto {
|
|
292
|
-
projectKey: string;
|
|
293
333
|
bundleKey: string;
|
|
294
334
|
label: string;
|
|
295
335
|
description?: string;
|
|
@@ -312,43 +352,45 @@ declare class UpdateBundleDto {
|
|
|
312
352
|
description?: string;
|
|
313
353
|
}>;
|
|
314
354
|
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
compatibility?: {
|
|
319
|
-
planIds?: string[];
|
|
320
|
-
};
|
|
321
|
-
pricingOverrides?: Array<{
|
|
322
|
-
planId?: string;
|
|
323
|
-
monthlyNet?: string | null;
|
|
324
|
-
yearlyNet?: string | null;
|
|
325
|
-
}>;
|
|
355
|
+
/** One plan's own price for a bundle version, in `pricingOverrides`. */
|
|
356
|
+
declare class BundlePricingOverrideDto {
|
|
357
|
+
planId?: string;
|
|
326
358
|
monthlyNet?: string | null;
|
|
327
359
|
yearlyNet?: string | null;
|
|
328
|
-
marketed?: boolean;
|
|
329
|
-
changeNote?: string;
|
|
330
|
-
baseVersionId?: string | null;
|
|
331
|
-
validFrom?: string | null;
|
|
332
|
-
validUntil?: string | null;
|
|
333
360
|
}
|
|
334
|
-
|
|
335
|
-
|
|
361
|
+
/**
|
|
362
|
+
* Everything a version draft may carry apart from its feature list.
|
|
363
|
+
*
|
|
364
|
+
* A base class rather than two copies, and the split is where the pair actually
|
|
365
|
+
* differs: a create needs features, an update may leave them alone. Everything
|
|
366
|
+
* else — quotas, compatibility, prices, the window — is optional on both, and
|
|
367
|
+
* was written out twice.
|
|
368
|
+
*
|
|
369
|
+
* `features` is deliberately NOT here. Declared in the base as optional, the
|
|
370
|
+
* inherited `@IsOptional()` would follow into the create DTO and make the one
|
|
371
|
+
* required field of that request optional again; class-validator reads the
|
|
372
|
+
* whole prototype chain.
|
|
373
|
+
*/
|
|
374
|
+
declare class BundleVersionDraftFieldsDto {
|
|
336
375
|
quotas?: Record<string, number>;
|
|
337
376
|
compatibility?: {
|
|
338
377
|
planIds?: string[];
|
|
339
378
|
};
|
|
340
|
-
pricingOverrides?:
|
|
341
|
-
planId?: string;
|
|
342
|
-
monthlyNet?: string | null;
|
|
343
|
-
yearlyNet?: string | null;
|
|
344
|
-
}>;
|
|
379
|
+
pricingOverrides?: BundlePricingOverrideDto[];
|
|
345
380
|
monthlyNet?: string | null;
|
|
346
381
|
yearlyNet?: string | null;
|
|
347
382
|
marketed?: boolean;
|
|
348
383
|
changeNote?: string;
|
|
384
|
+
baseVersionId?: string | null;
|
|
349
385
|
validFrom?: string | null;
|
|
350
386
|
validUntil?: string | null;
|
|
351
387
|
}
|
|
388
|
+
declare class CreateBundleVersionDraftDto extends BundleVersionDraftFieldsDto {
|
|
389
|
+
features: string[];
|
|
390
|
+
}
|
|
391
|
+
declare class UpdateBundleVersionDraftDto extends BundleVersionDraftFieldsDto {
|
|
392
|
+
features?: string[];
|
|
393
|
+
}
|
|
352
394
|
declare class PublishBundleVersionDto {
|
|
353
395
|
forceRegressive?: boolean;
|
|
354
396
|
/**
|
|
@@ -375,7 +417,6 @@ declare class MarketingTopFeatureDto {
|
|
|
375
417
|
strong: string;
|
|
376
418
|
}
|
|
377
419
|
declare class CreateMarketingProjectionDto {
|
|
378
|
-
projectKey: string;
|
|
379
420
|
targetType: 'PLAN' | 'BUNDLE';
|
|
380
421
|
targetVersionId: string;
|
|
381
422
|
locale?: string;
|
|
@@ -405,14 +446,12 @@ declare class UpdateMarketingProjectionDto {
|
|
|
405
446
|
highlight?: boolean;
|
|
406
447
|
}
|
|
407
448
|
declare class ListMarketingProjectionsQueryDto {
|
|
408
|
-
projectKey: string;
|
|
409
449
|
targetType?: 'PLAN' | 'BUNDLE';
|
|
410
450
|
targetVersionId?: string;
|
|
411
451
|
locale?: string;
|
|
412
452
|
}
|
|
413
453
|
|
|
414
454
|
declare class ListCatalogEntriesQueryDto {
|
|
415
|
-
projectKey: string;
|
|
416
455
|
/** Filter for features/quotas (approval lifecycle). */
|
|
417
456
|
discoveryStatus?: string;
|
|
418
457
|
/** Filter for capabilities (read-only code facts). */
|
|
@@ -431,19 +470,14 @@ declare class UpdateCatalogEntryI18nDto {
|
|
|
431
470
|
}
|
|
432
471
|
/**
|
|
433
472
|
* Body of `POST …/discovery/sync` — the discovery snapshot the UI
|
|
434
|
-
* previously loaded from `GET /admin/discovery`.
|
|
435
|
-
*
|
|
436
|
-
* SuperAdmin guard secures the source.
|
|
473
|
+
* previously loaded from `GET /admin/discovery`. Deep validation is not needed
|
|
474
|
+
* because the SuperAdmin guard secures the source.
|
|
437
475
|
*/
|
|
438
476
|
declare class SyncDiscoveryDto {
|
|
439
477
|
snapshot: DiscoverySnapshot;
|
|
440
478
|
}
|
|
441
479
|
|
|
442
|
-
declare class ListPromotionsQueryDto {
|
|
443
|
-
projectKey: string;
|
|
444
|
-
}
|
|
445
480
|
declare class CreatePromotionDto {
|
|
446
|
-
projectKey: string;
|
|
447
481
|
internalLabel: string;
|
|
448
482
|
type: PromotionType;
|
|
449
483
|
/** Type-dependent: number | { price, months }. */
|
|
@@ -477,17 +511,12 @@ declare class UpdatePromotionDto {
|
|
|
477
511
|
i18n?: PromotionI18n;
|
|
478
512
|
}
|
|
479
513
|
|
|
480
|
-
declare class ListMarketingSettingsQueryDto {
|
|
481
|
-
projectKey: string;
|
|
482
|
-
}
|
|
483
514
|
/** Body of `PUT /admin/catalog/marketing-settings`. */
|
|
484
515
|
declare class UpdateMarketingSettingsDto {
|
|
485
|
-
projectKey: string;
|
|
486
516
|
activeLocales: string[];
|
|
487
517
|
}
|
|
488
518
|
|
|
489
519
|
declare class CreatePlanDto {
|
|
490
|
-
projectKey: string;
|
|
491
520
|
planKey: string;
|
|
492
521
|
label: string;
|
|
493
522
|
description?: string;
|
|
@@ -547,4 +576,4 @@ declare class PublishPlanVersionDto {
|
|
|
547
576
|
validUntil?: string | null;
|
|
548
577
|
}
|
|
549
578
|
|
|
550
|
-
export { ADVISORY_STRICT_MODE_CODES, BUNDLE_REPOSITORY_TOKEN, CATALOG_ENTRY_REPOSITORY_TOKEN, CATALOG_FEATURE_UI_REGISTRY_TOKEN, CATALOG_SERVICE_CONFIG_TOKEN, CreateBundleDto, CreateBundleVersionDraftDto, CreateMarketingProjectionDto, CreatePlanDto, CreatePlanVersionDraftDto, CreatePromotionDto, ListCatalogEntriesQueryDto, ListMarketingProjectionsQueryDto,
|
|
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 };
|