@saasicat/nest 0.26.1 → 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/LICENSE +90 -201
- package/dist/.build-stamp +1 -0
- package/dist/_entries.cjs +3175 -2756
- 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 +7 -7
- package/dist/billing/index.d.ts +7 -7
- package/dist/billing/index.js +38 -36
- 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-2FR6ZL7R.js +0 -0
- package/dist/chunk-2SLTRKXC.js +0 -0
- 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-H3W6QDQH.js +85 -0
- package/dist/{chunk-YYUXKLXK.js → chunk-I7GTA3RX.js} +2 -2
- package/dist/{chunk-SN5UOC43.js → chunk-IPOLCDKN.js} +11 -11
- package/dist/{chunk-B7NRY2LV.js → chunk-IVEA6M3B.js} +2 -40
- package/dist/chunk-JCAZT727.js +1883 -0
- package/dist/chunk-JTLKWP3Q.js +792 -0
- 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-YWDLYOFN.js → chunk-WSPHIIGS.js} +429 -1205
- package/dist/{chunk-5ZXBXYXU.js → chunk-WXYJHZCN.js} +3 -3
- package/dist/{chunk-6WL6VQ7Z.js → chunk-XBYAFEOR.js} +2 -2
- package/dist/{chunk-NNNXXUPT.js → chunk-XEW6YXL5.js} +28 -93
- package/dist/chunk-Y43SGD5J.js +50 -0
- package/dist/{define-saasicat-BK6RRWWG.d.ts → define-saasicat-BFgeoVG9.d.ts} +28 -5
- package/dist/{define-saasicat-D30I-WET.d.cts → define-saasicat-CNUWjfNK.d.cts} +28 -5
- package/dist/discovery/index.js +4 -4
- package/dist/{enforce-quota.interceptor-B9QueAFf.d.ts → enforce-quota.interceptor-BYqmdFB5.d.ts} +3 -3
- package/dist/{enforce-quota.interceptor-DY6CLjoP.d.cts → enforce-quota.interceptor-BxIR63Wn.d.cts} +3 -3
- package/dist/entitlement/index.js +9 -6
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +61 -52
- package/dist/{saas-platform.module-D1mUZPrz.d.ts → module-options-BymIkAsh.d.ts} +68 -55
- package/dist/{saas-platform.module-CgalxzcT.d.cts → module-options-DgwBKVpC.d.cts} +68 -55
- package/dist/platform/index.d.cts +204 -22
- package/dist/platform/index.d.ts +204 -22
- package/dist/platform/index.js +49 -25
- 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 +6 -3
- package/dist/{tenant-billing.controller-BSlpFqVA.d.ts → tenant-billing.controller-BQPy5yXh.d.ts} +2 -2
- package/dist/{tenant-billing.controller-DHSUrT_N.d.cts → tenant-billing.controller-CODIYzlI.d.cts} +2 -2
- package/dist/{subscription-bundles.module-BDbODWvA.d.ts → tenant-billing.module-B0stLoJn.d.ts} +51 -51
- package/dist/{subscription-bundles.module-Cfi-lFWF.d.cts → tenant-billing.module-BxJS6fX4.d.cts} +51 -51
- package/dist/testing/index.d.cts +14 -14
- package/dist/testing/index.d.ts +14 -14
- package/dist/testing/index.js +31 -29
- package/package.json +6 -6
- package/dist/chunk-L4KTQ6CL.js +0 -20
- package/dist/chunk-TCBYOFAC.js +0 -1464
- /package/dist/{chunk-FY4EJTV4.js → chunk-OYNHOY45.js} +0 -0
- /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/index.js
CHANGED
|
@@ -37,8 +37,35 @@ import {
|
|
|
37
37
|
resolveModel,
|
|
38
38
|
slugify,
|
|
39
39
|
verifyOtpCode
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-P5D5CYO2.js";
|
|
41
|
+
import "./chunk-2SLTRKXC.js";
|
|
41
42
|
import "./chunk-UF53DWWR.js";
|
|
43
|
+
import {
|
|
44
|
+
CatalogBundleUpsellResolver,
|
|
45
|
+
ConfiguratorCatalogBuilder,
|
|
46
|
+
FEATURE_GUARD_CONFIG_TOKEN,
|
|
47
|
+
FeatureGuard,
|
|
48
|
+
LimitExceededFilter,
|
|
49
|
+
PLAN_CATALOG_IMPORT_SINK_TOKEN,
|
|
50
|
+
PlanCatalogImportDto,
|
|
51
|
+
PlanCatalogImporterModule,
|
|
52
|
+
PlanCatalogImporterService,
|
|
53
|
+
PlanCatalogValidationError,
|
|
54
|
+
PublishValidationError,
|
|
55
|
+
UPSELL_OFFER_CURRENCY_TOKEN,
|
|
56
|
+
UPSELL_OFFER_RESOLVER_TOKEN,
|
|
57
|
+
assertBaseVersionFresh,
|
|
58
|
+
assertChangeNote,
|
|
59
|
+
assertDraftPublishable,
|
|
60
|
+
assertOptimisticLockHeld,
|
|
61
|
+
buildPlanCatalogImporterController,
|
|
62
|
+
clearPendingPlanVersionFields,
|
|
63
|
+
computeCarriedTrialEndsAt,
|
|
64
|
+
computeNextPeriod,
|
|
65
|
+
decideRenewal,
|
|
66
|
+
loadPlanCatalogFromFile,
|
|
67
|
+
loadPlanCatalogFromString
|
|
68
|
+
} from "./chunk-JTLKWP3Q.js";
|
|
42
69
|
import {
|
|
43
70
|
formatPreflightReport,
|
|
44
71
|
formatSeedGateReport,
|
|
@@ -47,7 +74,7 @@ import {
|
|
|
47
74
|
runSeedGateFromFile,
|
|
48
75
|
seedGateExitCode,
|
|
49
76
|
validateSeedAgainstSnapshot
|
|
50
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-3UZW7TU4.js";
|
|
51
78
|
import "./chunk-DBZGV3HC.js";
|
|
52
79
|
import {
|
|
53
80
|
DefinesQuota,
|
|
@@ -55,22 +82,23 @@ import {
|
|
|
55
82
|
ImplementsCapability,
|
|
56
83
|
RequiresCapability,
|
|
57
84
|
runHeadlessDiscoveryScan
|
|
58
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-I7GTA3RX.js";
|
|
59
86
|
import {
|
|
60
87
|
DiscoverySnapshotNotFoundError,
|
|
61
88
|
loadDiscoverySnapshotFromFile
|
|
62
89
|
} from "./chunk-74SCJ4HF.js";
|
|
90
|
+
import "./chunk-2FR6ZL7R.js";
|
|
63
91
|
import {
|
|
64
92
|
defineSaaSiCat
|
|
65
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-OYNHOY45.js";
|
|
66
94
|
import {
|
|
67
95
|
SETUP_CONFIG_TOKEN,
|
|
68
96
|
SETUP_PROVISIONING_PORT_TOKEN,
|
|
69
|
-
|
|
97
|
+
SaaSiCatModule,
|
|
70
98
|
SetupController,
|
|
71
99
|
SetupModule,
|
|
72
100
|
SetupService
|
|
73
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-JCAZT727.js";
|
|
74
102
|
import {
|
|
75
103
|
CreatePromoCodeDto,
|
|
76
104
|
PreviewPromoCodeDto,
|
|
@@ -82,7 +110,10 @@ import {
|
|
|
82
110
|
buildPromoCodeAdminController,
|
|
83
111
|
hashIp,
|
|
84
112
|
ipFingerprint
|
|
85
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-VTMCMVYQ.js";
|
|
114
|
+
import {
|
|
115
|
+
SubscriptionContractModule
|
|
116
|
+
} from "./chunk-Y43SGD5J.js";
|
|
86
117
|
import {
|
|
87
118
|
ADMIN_MANIFEST_CONFIG,
|
|
88
119
|
ADMIN_RESOURCES_PORT_TOKEN,
|
|
@@ -109,36 +140,25 @@ import {
|
|
|
109
140
|
SuperAdminGuard,
|
|
110
141
|
SuspendTenantDto,
|
|
111
142
|
buildAdminStatsController
|
|
112
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-IPOLCDKN.js";
|
|
113
144
|
import {
|
|
145
|
+
BILLING_FEATURE_UI_REGISTRY_TOKEN,
|
|
114
146
|
CONTRACT_FREEZE_PORT_TOKEN,
|
|
115
147
|
CONTRACT_FREEZE_PROJECT_KEY_TOKEN,
|
|
116
148
|
CONTRACT_FREEZE_SOURCE_PORT_TOKEN,
|
|
117
149
|
CancelSubscriptionDto,
|
|
118
|
-
CatalogBundleUpsellResolver,
|
|
119
150
|
ChangePlanDto,
|
|
120
151
|
CompleteOnboardingSubscriptionDto,
|
|
121
152
|
ComposedTenantAuthGuard,
|
|
122
|
-
ConfiguratorCatalogBuilder,
|
|
123
|
-
FEATURE_GUARD_CONFIG_TOKEN,
|
|
124
153
|
FEATURE_GUARD_MARKER,
|
|
125
|
-
FEATURE_UI_REGISTRY_TOKEN,
|
|
126
|
-
FeatureGuard,
|
|
127
|
-
LimitExceededFilter,
|
|
128
|
-
PLAN_CATALOG_IMPORT_SINK_TOKEN,
|
|
129
154
|
PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN,
|
|
130
155
|
PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN,
|
|
131
156
|
PUBLIC_CATALOG_PROJECT_KEY_TOKEN,
|
|
132
157
|
PendingPlanMaterializationService,
|
|
133
|
-
PlanCatalogImportDto,
|
|
134
|
-
PlanCatalogImporterModule,
|
|
135
|
-
PlanCatalogImporterService,
|
|
136
|
-
PlanCatalogValidationError,
|
|
137
158
|
PlanChangePreviewService,
|
|
138
159
|
PreviewPlanChangeDto,
|
|
139
160
|
PublicCatalogController,
|
|
140
161
|
PublicCatalogModule,
|
|
141
|
-
PublishValidationError,
|
|
142
162
|
REQUIRE_FEATURE_KEY,
|
|
143
163
|
RequireFeature,
|
|
144
164
|
SELF_SERVICE_BLOCKED_BUNDLES_TOKEN,
|
|
@@ -150,29 +170,16 @@ import {
|
|
|
150
170
|
TenantAdminGuard,
|
|
151
171
|
TenantBillingController,
|
|
152
172
|
TenantBillingModule,
|
|
153
|
-
UPSELL_OFFER_CURRENCY_TOKEN,
|
|
154
|
-
UPSELL_OFFER_RESOLVER_TOKEN,
|
|
155
173
|
addMonths,
|
|
156
|
-
assertBaseVersionFresh,
|
|
157
|
-
assertChangeNote,
|
|
158
|
-
assertDraftPublishable,
|
|
159
|
-
assertOptimisticLockHeld,
|
|
160
|
-
buildPlanCatalogImporterController,
|
|
161
174
|
buildTenantSubscriptionBundlesController,
|
|
162
|
-
clearPendingPlanVersionFields,
|
|
163
|
-
computeCarriedTrialEndsAt,
|
|
164
|
-
computeNextPeriod,
|
|
165
175
|
computeProration,
|
|
166
|
-
decideRenewal,
|
|
167
176
|
initialPeriodWindow,
|
|
168
177
|
isPlatformFeatureGuard,
|
|
169
|
-
loadPlanCatalogFromFile,
|
|
170
|
-
loadPlanCatalogFromString,
|
|
171
178
|
periodEndAfter,
|
|
172
179
|
periodEndWithMinLead,
|
|
173
180
|
resolveBundleCancelEffectiveAt,
|
|
174
181
|
resolveBundlePriceNet
|
|
175
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-WSPHIIGS.js";
|
|
176
183
|
import {
|
|
177
184
|
PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN,
|
|
178
185
|
PROMO_CODE_REPOSITORY_TOKEN,
|
|
@@ -188,14 +195,13 @@ import {
|
|
|
188
195
|
computeDiscountGross,
|
|
189
196
|
computeDiscountedGross,
|
|
190
197
|
computeRegularStartsAt
|
|
191
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-V4OJ43K2.js";
|
|
192
199
|
import {
|
|
193
|
-
SubscriptionContractModule,
|
|
194
200
|
SubscriptionContractService,
|
|
195
201
|
contractLineItemToInvoiceLineItem,
|
|
196
202
|
sortContractLineItemsForInvoice,
|
|
197
203
|
subscriptionContractToInvoiceSnapshot
|
|
198
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-IVEA6M3B.js";
|
|
199
205
|
import {
|
|
200
206
|
ADVISORY_STRICT_MODE_CODES,
|
|
201
207
|
BundlesService,
|
|
@@ -244,7 +250,7 @@ import {
|
|
|
244
250
|
quotaApprovalSignature,
|
|
245
251
|
validateBundleDraft,
|
|
246
252
|
validatePlanDraft
|
|
247
|
-
} from "./chunk-
|
|
253
|
+
} from "./chunk-SH7J5IU7.js";
|
|
248
254
|
import {
|
|
249
255
|
AUDIT_CONTEXT_RESOLVER_TOKEN,
|
|
250
256
|
PENDING_PLAN_QUERY_PORT_TOKEN,
|
|
@@ -258,13 +264,13 @@ import {
|
|
|
258
264
|
USER_ID_RESOLVER_TOKEN,
|
|
259
265
|
classifyBundleVersionDiff,
|
|
260
266
|
classifyPlanDiff
|
|
261
|
-
} from "./chunk-
|
|
267
|
+
} from "./chunk-S6BAD5XM.js";
|
|
262
268
|
import {
|
|
263
269
|
AUDIT_PORT_TOKEN,
|
|
264
270
|
AdminAuditService,
|
|
265
271
|
MFA_PORT_TOKEN,
|
|
266
272
|
RLS_BYPASS_PORT_TOKEN
|
|
267
|
-
} from "./chunk-
|
|
273
|
+
} from "./chunk-O2J2HDXA.js";
|
|
268
274
|
import {
|
|
269
275
|
CHECKOUT_OFFER_REPOSITORY_TOKEN,
|
|
270
276
|
CheckoutOfferModule,
|
|
@@ -272,7 +278,7 @@ import {
|
|
|
272
278
|
CreateCheckoutOfferDto,
|
|
273
279
|
UpdateCheckoutOfferDto,
|
|
274
280
|
buildCheckoutOfferController
|
|
275
|
-
} from "./chunk-
|
|
281
|
+
} from "./chunk-AEEK64XD.js";
|
|
276
282
|
import "./chunk-BSK6YBLI.js";
|
|
277
283
|
import {
|
|
278
284
|
SAASICAT_PUBLIC_ROUTE_KEY,
|
|
@@ -282,15 +288,17 @@ import {
|
|
|
282
288
|
import {
|
|
283
289
|
DiscoveryModule,
|
|
284
290
|
buildDiscoveryController
|
|
285
|
-
} from "./chunk-
|
|
291
|
+
} from "./chunk-XBYAFEOR.js";
|
|
286
292
|
import {
|
|
287
293
|
DISCOVERY_APP_INFO_TOKEN,
|
|
288
294
|
DISCOVERY_SNAPSHOT_PATH_TOKEN,
|
|
289
295
|
DiscoveryScanner,
|
|
290
296
|
computeSnapshotHash
|
|
291
|
-
} from "./chunk-
|
|
297
|
+
} from "./chunk-WXYJHZCN.js";
|
|
298
|
+
import {
|
|
299
|
+
EntitlementModule
|
|
300
|
+
} from "./chunk-H3W6QDQH.js";
|
|
292
301
|
import {
|
|
293
|
-
EntitlementModule,
|
|
294
302
|
EntitlementService,
|
|
295
303
|
LimitExceededError,
|
|
296
304
|
SUBSCRIPTION_BUNDLE_CONFIG_TOKEN,
|
|
@@ -312,7 +320,7 @@ import {
|
|
|
312
320
|
mergeSubscriptionBundlesIntoLimits,
|
|
313
321
|
resolveEntitlementPlan,
|
|
314
322
|
toEffectiveLimitsSnapshot
|
|
315
|
-
} from "./chunk-
|
|
323
|
+
} from "./chunk-XEW6YXL5.js";
|
|
316
324
|
import {
|
|
317
325
|
PLAN_CATALOG_READ_SINK_TOKEN,
|
|
318
326
|
PLAN_CATALOG_TOKEN,
|
|
@@ -333,7 +341,7 @@ import {
|
|
|
333
341
|
} from "./chunk-DQKCK7DX.js";
|
|
334
342
|
import {
|
|
335
343
|
SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN
|
|
336
|
-
} from "./chunk-
|
|
344
|
+
} from "./chunk-VBRYPU7V.js";
|
|
337
345
|
import {
|
|
338
346
|
codedError
|
|
339
347
|
} from "./chunk-EBJJNTW6.js";
|
|
@@ -343,16 +351,17 @@ import {
|
|
|
343
351
|
PLAN_VERSION_REPOSITORY_TOKEN,
|
|
344
352
|
SUBSCRIPTION_REPOSITORY_TOKEN,
|
|
345
353
|
TRANSACTION_RUNNER_TOKEN
|
|
346
|
-
} from "./chunk-
|
|
354
|
+
} from "./chunk-OUDSQ3PU.js";
|
|
347
355
|
import {
|
|
348
356
|
BUNDLE_REPOSITORY_TOKEN,
|
|
349
357
|
CATALOG_ENTRY_REPOSITORY_TOKEN,
|
|
358
|
+
CATALOG_FEATURE_UI_REGISTRY_TOKEN,
|
|
350
359
|
CATALOG_SERVICE_CONFIG_TOKEN,
|
|
351
360
|
MARKETING_PROJECTION_REPOSITORY_TOKEN,
|
|
352
361
|
MARKETING_SETTINGS_REPOSITORY_TOKEN,
|
|
353
362
|
PLAN_REPOSITORY_TOKEN,
|
|
354
363
|
PROMOTION_REPOSITORY_TOKEN
|
|
355
|
-
} from "./chunk-
|
|
364
|
+
} from "./chunk-AOQJEYOL.js";
|
|
356
365
|
import {
|
|
357
366
|
asProvider
|
|
358
367
|
} from "./chunk-SABTXESR.js";
|
|
@@ -362,7 +371,7 @@ import {
|
|
|
362
371
|
ENFORCE_QUOTA_KEY,
|
|
363
372
|
IMPLEMENTS_CAPABILITY_KEY,
|
|
364
373
|
REQUIRES_CAPABILITY_KEY
|
|
365
|
-
} from "./chunk-
|
|
374
|
+
} from "./chunk-QUZU2M33.js";
|
|
366
375
|
import "./chunk-SHUYVCID.js";
|
|
367
376
|
export {
|
|
368
377
|
ACTIVATION_ORCHESTRATOR_TOKEN,
|
|
@@ -384,10 +393,12 @@ export {
|
|
|
384
393
|
AdminStatsController,
|
|
385
394
|
AdminStatsModule,
|
|
386
395
|
AdminStatsService,
|
|
396
|
+
BILLING_FEATURE_UI_REGISTRY_TOKEN,
|
|
387
397
|
BUNDLE_REPOSITORY_TOKEN,
|
|
388
398
|
BaseIpRateLimitGuard,
|
|
389
399
|
BundlesService,
|
|
390
400
|
CATALOG_ENTRY_REPOSITORY_TOKEN,
|
|
401
|
+
CATALOG_FEATURE_UI_REGISTRY_TOKEN,
|
|
391
402
|
CATALOG_SERVICE_CONFIG_TOKEN,
|
|
392
403
|
CHECKOUT_OFFER_REPOSITORY_TOKEN,
|
|
393
404
|
CONTRACT_FREEZE_PORT_TOKEN,
|
|
@@ -429,7 +440,6 @@ export {
|
|
|
429
440
|
EntitlementService,
|
|
430
441
|
FEATURE_GUARD_CONFIG_TOKEN,
|
|
431
442
|
FEATURE_GUARD_MARKER,
|
|
432
|
-
FEATURE_UI_REGISTRY_TOKEN,
|
|
433
443
|
FeatureGuard,
|
|
434
444
|
IMPLEMENTS_CAPABILITY_KEY,
|
|
435
445
|
ImplementsCapability,
|
|
@@ -531,9 +541,8 @@ export {
|
|
|
531
541
|
SUBSCRIPTION_STATS_PORT_TOKEN,
|
|
532
542
|
SUBSCRIPTION_USAGE_PORT_TOKEN,
|
|
533
543
|
SUBSCRIPTION_WRITE_PORT_TOKEN,
|
|
534
|
-
|
|
544
|
+
SaaSiCatModule,
|
|
535
545
|
SaaSiCatPublicRoute,
|
|
536
|
-
SaasPlatformModule,
|
|
537
546
|
SaveRegistrationConfigDto,
|
|
538
547
|
SaveRegistrationConfigSelectionDto,
|
|
539
548
|
SelectRegistrationPlanDto,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Type, DynamicModule, ForwardReference, Provider, CanActivate, FactoryProvider } from '@nestjs/common';
|
|
2
|
-
import { SuperAdminProvisioningPort,
|
|
2
|
+
import { SuperAdminProvisioningPort, MfaPort, AuditPort, RlsBypassPort, PlanCatalogReadSink, SubscriptionRepository, PlanVersionRepository, TransactionRunner, AdminResourcesPort, FeatureUiRegistry, PlanCatalog, SaaSiCatPersistenceAdapter, QuotaProvider, SubscriptionUsagePort, UsageSnapshotPort, TenantSubscriptionWritePort, FirstTimeCustomerCheck } from '@saasicat/types';
|
|
3
3
|
import { P as ProviderSpec } from './di-CcNeq9v-.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { a as SubscriptionContractModuleOptions } from './subscription-contract.module-edyhBr4n.js';
|
|
7
|
-
import { a as PromoCodesModuleOptions } from './module-BE17XFLg.js';
|
|
8
|
-
import { b as DiscoveryAppInfo } from './discovery.scanner-DLgEvuoy.js';
|
|
4
|
+
import { d as AdminResourcesModuleOptions, g as AdminStatsModuleOptions, b as AdminManifestConfig } from './admin-resources.module-BY5r_1MG.js';
|
|
5
|
+
import { t as TenantBillingModuleOptions, p as SubscriptionBundleModuleOptions, n as SubscriptionBundleControllerOptions } from './tenant-billing.module-B0stLoJn.js';
|
|
9
6
|
import { b as CatalogModuleOptions } from './catalog.module-CQr1FpkI.js';
|
|
7
|
+
import { b as DiscoveryAppInfo } from './discovery.scanner-DLgEvuoy.js';
|
|
8
|
+
import { E as EntitlementResolutionConfig } from './plan-resolution-CFCoUkrE.js';
|
|
9
|
+
import { a as PromoCodesModuleOptions } from './promo.module-CnzddtJ0.js';
|
|
10
10
|
import { b as CheckoutOfferModuleOptions } from './checkout-offer.module-Ca3_TieR.js';
|
|
11
|
-
import {
|
|
11
|
+
import { a as SubscriptionContractModuleOptions } from './subscription-contract.module-edyhBr4n.js';
|
|
12
12
|
|
|
13
13
|
interface SetupModuleOptions {
|
|
14
14
|
/**
|
|
@@ -46,7 +46,7 @@ interface PlanResolverPort {
|
|
|
46
46
|
* for local development and for apps that do not yet have a contract concept.
|
|
47
47
|
*
|
|
48
48
|
* The quickstart path uses this implicitly when `adapters.planResolver` is
|
|
49
|
-
* not set and `defaultPlanId` was provided in
|
|
49
|
+
* not set and `defaultPlanId` was provided in SaaSiCatModule.forRoot().
|
|
50
50
|
*/
|
|
51
51
|
declare class StaticPlanResolver implements PlanResolverPort {
|
|
52
52
|
private readonly planId;
|
|
@@ -78,7 +78,7 @@ declare function buildTenantManifestController(options: TenantManifestController
|
|
|
78
78
|
* when wiring adapters without a bundle. The module validates that each port
|
|
79
79
|
* ends up provided by exactly one of the two paths.
|
|
80
80
|
*/
|
|
81
|
-
interface
|
|
81
|
+
interface SaaSiCatAdapters {
|
|
82
82
|
mfa?: ProviderSpec<MfaPort>;
|
|
83
83
|
audit?: ProviderSpec<AuditPort>;
|
|
84
84
|
rlsBypass?: ProviderSpec<RlsBypassPort>;
|
|
@@ -105,7 +105,7 @@ interface SaasPlatformAdapters {
|
|
|
105
105
|
transactionRunner?: ProviderSpec<TransactionRunner>;
|
|
106
106
|
}
|
|
107
107
|
type PlatformImports = Array<Type<unknown> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
|
|
108
|
-
interface
|
|
108
|
+
interface SaaSiCatCatalogOptions extends Pick<CatalogModuleOptions, 'strictModeCheckMode' | 'autoSyncDiscoveryAtBoot' | 'marketedOnlyFeatures' | 'publicMarketingCatalog' | 'extraProviders'> {
|
|
109
109
|
/** Labels/icons used by discovery review and the public catalog. */
|
|
110
110
|
featureUiRegistry: FeatureUiRegistry;
|
|
111
111
|
/** Mount the SuperAdmin catalog controllers. Default `true`. */
|
|
@@ -115,31 +115,31 @@ interface SaasPlatformCatalogOptions extends Pick<CatalogModuleOptions, 'strictM
|
|
|
115
115
|
/** Override the top-level module imports for catalog adapter factories. */
|
|
116
116
|
imports?: PlatformImports;
|
|
117
117
|
}
|
|
118
|
-
type
|
|
119
|
-
interface
|
|
118
|
+
type SaaSiCatTenantAuthGuards = Array<Type<CanActivate>> | ProviderSpec<ReadonlyArray<CanActivate>>;
|
|
119
|
+
interface SaaSiCatTenantBillingOptions extends Omit<TenantBillingModuleOptions, 'authGuards' | 'subscriptionUsagePort' | 'usageSnapshotPort' | 'subscriptionWritePort' | 'global'> {
|
|
120
120
|
/**
|
|
121
121
|
* Tenant guards as classes (the common path) or as a custom provider
|
|
122
122
|
* factory. Guard classes are resolved from `imports`.
|
|
123
123
|
*/
|
|
124
|
-
authGuards:
|
|
124
|
+
authGuards: SaaSiCatTenantAuthGuards;
|
|
125
125
|
/** Optional overrides; otherwise the persistence bundle supplies them. */
|
|
126
126
|
subscriptionUsagePort?: ProviderSpec<SubscriptionUsagePort>;
|
|
127
127
|
usageSnapshotPort?: ProviderSpec<UsageSnapshotPort>;
|
|
128
128
|
subscriptionWritePort?: ProviderSpec<TenantSubscriptionWritePort>;
|
|
129
129
|
}
|
|
130
|
-
interface
|
|
130
|
+
interface SaaSiCatSubscriptionBundlesOptions extends Omit<SubscriptionBundleModuleOptions, 'subscriptionBundleRepository' | 'bundleRepository' | 'controller' | 'imports' | 'extraProviders' | 'global'> {
|
|
131
131
|
/** Default mounts the tenant controller and reuses tenant-billing auth. */
|
|
132
132
|
controller?: false | Omit<SubscriptionBundleControllerOptions, 'authGuards' | 'subscriptionUsagePort'>;
|
|
133
133
|
imports?: PlatformImports;
|
|
134
134
|
extraProviders?: Provider[];
|
|
135
135
|
}
|
|
136
|
-
interface
|
|
136
|
+
interface SaaSiCatAdminResourcesOptions extends Omit<AdminResourcesModuleOptions, 'resources' | 'guards' | 'global'> {
|
|
137
137
|
/** Override the default controller guards + `SuperAdminGuard` chain. */
|
|
138
138
|
guards?: Array<Type<CanActivate>>;
|
|
139
139
|
/** Custom schema override; the persistence bundle supplies the default. */
|
|
140
140
|
resources?: ProviderSpec<AdminResourcesPort>;
|
|
141
141
|
}
|
|
142
|
-
interface
|
|
142
|
+
interface SaaSiCatPromoCodesOptions extends Omit<PromoCodesModuleOptions, 'promoCodeRepository' | 'redemptionRepository' | 'validationLogRepository' | 'subscriptionLookup' | 'revenueAggregator' | 'transactionRunner' | 'firstTimeCustomerCheck' | 'adminController' | 'global'> {
|
|
143
143
|
/**
|
|
144
144
|
* Required when the public preview/redeem flow is enabled. Admin-only
|
|
145
145
|
* setups do not need an app-specific customer-history check.
|
|
@@ -158,27 +158,44 @@ interface SaasPlatformPromoCodesOptions extends Omit<PromoCodesModuleOptions, 'p
|
|
|
158
158
|
adminController?: false;
|
|
159
159
|
}
|
|
160
160
|
/** First-run setup, deriving the provisioning adapter from persistence by default. */
|
|
161
|
-
interface
|
|
161
|
+
interface SaaSiCatSetupOptions extends Omit<SetupModuleOptions, 'provisioningPort' | 'global'> {
|
|
162
162
|
provisioningPort?: SetupModuleOptions['provisioningPort'];
|
|
163
163
|
}
|
|
164
164
|
/** Admin dashboard statistics; the audit port can come from persistence. */
|
|
165
|
-
interface
|
|
165
|
+
interface SaaSiCatAdminStatsOptions extends Omit<AdminStatsModuleOptions, 'auditStatsPort' | 'global'> {
|
|
166
166
|
auditStatsPort?: AdminStatsModuleOptions['auditStatsPort'];
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
169
169
|
* Public checkout-offer flow. Catalog repositories default to the persistence
|
|
170
170
|
* bundle, while the app still supplies its checkout-offer repository.
|
|
171
171
|
*/
|
|
172
|
-
interface
|
|
172
|
+
interface SaaSiCatCheckoutOfferOptions extends Omit<CheckoutOfferModuleOptions, 'bundleRepository' | 'planRepository' | 'catalogEntryRepository' | 'global'> {
|
|
173
173
|
bundleRepository?: CheckoutOfferModuleOptions['bundleRepository'];
|
|
174
174
|
planRepository?: CheckoutOfferModuleOptions['planRepository'];
|
|
175
175
|
catalogEntryRepository?: CheckoutOfferModuleOptions['catalogEntryRepository'];
|
|
176
176
|
}
|
|
177
177
|
/** Subscription-contract service, deriving its repository from persistence by default. */
|
|
178
|
-
interface
|
|
178
|
+
interface SaaSiCatSubscriptionContractOptions extends Omit<SubscriptionContractModuleOptions, 'subscriptionContractRepository' | 'global'> {
|
|
179
179
|
subscriptionContractRepository?: SubscriptionContractModuleOptions['subscriptionContractRepository'];
|
|
180
180
|
}
|
|
181
|
-
|
|
181
|
+
/**
|
|
182
|
+
* What `SaaSiCatModule.forRoot()` composes.
|
|
183
|
+
*
|
|
184
|
+
* One subsystem is deliberately absent: **self-registration**. A prospect
|
|
185
|
+
* signing themselves up — mail address, OTP, plan choice, payment, activation —
|
|
186
|
+
* is `RegistrationModule` from `@saasicat/nest/registration`, and it is
|
|
187
|
+
* hand-wired: ten required ports, none of which a persistence bundle supplies.
|
|
188
|
+
*
|
|
189
|
+
* That is a decision with a reason and a plan, not an omission: the ten ports
|
|
190
|
+
* have no executable contract yet (`@saasicat/persistence-testing` covers the
|
|
191
|
+
* catalogue, subscription, promo and audit ports and none of these), and
|
|
192
|
+
* folding unverified ports into a bundle would move the problem rather than
|
|
193
|
+
* check it. See `docs/self-registration.md`.
|
|
194
|
+
*
|
|
195
|
+
* Everything else — an operator creating tenants through the SuperAdmin UI, a
|
|
196
|
+
* CLI, or your own onboarding form — is composed here.
|
|
197
|
+
*/
|
|
198
|
+
interface SaaSiCatModuleOptions {
|
|
182
199
|
/**
|
|
183
200
|
* Plan catalog. Either as an already-loaded object (quickstart, comes
|
|
184
201
|
* directly from `loadPlanCatalogFromFile('config/saas.yaml')`) or via DB
|
|
@@ -207,12 +224,12 @@ interface SaasPlatformModuleOptions {
|
|
|
207
224
|
* `capabilities` are validated fail-fast against the enabled feature set
|
|
208
225
|
* (e.g. `entitlement: true` requires transactions + pessimistic locking).
|
|
209
226
|
*/
|
|
210
|
-
persistence?:
|
|
227
|
+
persistence?: SaaSiCatPersistenceAdapter;
|
|
211
228
|
/**
|
|
212
229
|
* Individual adapter bindings. Optional when `persistence` provides the
|
|
213
230
|
* respective port; explicit entries take precedence over the bundle.
|
|
214
231
|
*/
|
|
215
|
-
adapters?:
|
|
232
|
+
adapters?: SaaSiCatAdapters;
|
|
216
233
|
/**
|
|
217
234
|
* Class-level guards for the platform controllers (`GET /admin/discovery`
|
|
218
235
|
* and `GET /admin/manifest`). REQUIRED — otherwise the platform throws at
|
|
@@ -299,43 +316,43 @@ interface SaasPlatformModuleOptions {
|
|
|
299
316
|
* Standard DB-backed catalog stack. Repositories are taken from
|
|
300
317
|
* `persistence.catalog`; no consumer forwarding module is needed.
|
|
301
318
|
*/
|
|
302
|
-
catalog?: false |
|
|
319
|
+
catalog?: false | SaaSiCatCatalogOptions;
|
|
303
320
|
/**
|
|
304
321
|
* Standard tenant self-service stack. Subscription read/write adapters
|
|
305
322
|
* come from `persistence.tenantBilling`; usage is derived from
|
|
306
323
|
* `quotaProviders` unless explicitly overridden.
|
|
307
324
|
*/
|
|
308
|
-
tenantBilling?: false |
|
|
325
|
+
tenantBilling?: false | SaaSiCatTenantBillingOptions;
|
|
309
326
|
/**
|
|
310
327
|
* Add-on bundle service and tenant controller. `true` uses defaults and
|
|
311
328
|
* reuses tenant-billing auth/usage; an object customizes policy.
|
|
312
329
|
*/
|
|
313
|
-
subscriptionBundles?: false | true |
|
|
330
|
+
subscriptionBundles?: false | true | SaaSiCatSubscriptionBundlesOptions;
|
|
314
331
|
/**
|
|
315
332
|
* Standard SuperAdmin Tenant/User/Audit/Subscription endpoints. `true`
|
|
316
333
|
* uses `persistence.adminResources` and the standard guard chain.
|
|
317
334
|
*/
|
|
318
|
-
adminResources?: false | true |
|
|
335
|
+
adminResources?: false | true | SaaSiCatAdminResourcesOptions;
|
|
319
336
|
/**
|
|
320
337
|
* Promo-code domain and SuperAdmin CRUD. `true` enables the admin API
|
|
321
338
|
* without the public preview endpoint; pass an object to enable preview.
|
|
322
339
|
*/
|
|
323
|
-
promoCodes?: false | true |
|
|
340
|
+
promoCodes?: false | true | SaaSiCatPromoCodesOptions;
|
|
324
341
|
/**
|
|
325
342
|
* First-run SuperAdmin setup. `true` uses
|
|
326
343
|
* `persistence.core.superAdminProvisioning`; an object customizes it or
|
|
327
344
|
* supplies an app-specific provisioning adapter.
|
|
328
345
|
*/
|
|
329
|
-
setup?: false | true |
|
|
346
|
+
setup?: false | true | SaaSiCatSetupOptions;
|
|
330
347
|
/** SuperAdmin dashboard statistics with app-specific subscription/promo ports. */
|
|
331
|
-
adminStats?: false |
|
|
348
|
+
adminStats?: false | SaaSiCatAdminStatsOptions;
|
|
332
349
|
/** Public checkout-offer flow; catalog repositories reuse `persistence.catalog`. */
|
|
333
|
-
checkoutOffer?: false |
|
|
350
|
+
checkoutOffer?: false | SaaSiCatCheckoutOfferOptions;
|
|
334
351
|
/**
|
|
335
352
|
* Subscription-contract service. `true` reuses
|
|
336
353
|
* `persistence.entitlement.subscriptionContractRepository`.
|
|
337
354
|
*/
|
|
338
|
-
subscriptionContract?: false | true |
|
|
355
|
+
subscriptionContract?: false | true | SaaSiCatSubscriptionContractOptions;
|
|
339
356
|
/**
|
|
340
357
|
* Enable the tenant manifest — the app UI gets a filtered manifest per
|
|
341
358
|
* tenant with features, quotas and visible navigation. Requires that
|
|
@@ -366,28 +383,24 @@ interface SaasPlatformModuleOptions {
|
|
|
366
383
|
* authenticated request.
|
|
367
384
|
*/
|
|
368
385
|
globalFeatureGuard?: boolean;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
* and override bundle slices field by field.
|
|
388
|
-
*/
|
|
389
|
-
declare class SaasPlatformModule {
|
|
390
|
-
static forRoot(options: SaasPlatformModuleOptions): DynamicModule;
|
|
386
|
+
/**
|
|
387
|
+
* Run the enforcement-chain check at bootstrap. Default `true`.
|
|
388
|
+
*
|
|
389
|
+
* It refuses to start an application whose `@RequireFeature` routes have
|
|
390
|
+
* nothing enforcing them — the failure that otherwise shows up as a
|
|
391
|
+
* customer using a feature they never bought.
|
|
392
|
+
*
|
|
393
|
+
* Two shapes it cannot recognise, and they are the reason this switch
|
|
394
|
+
* exists rather than being an argument about the check: a feature guard of
|
|
395
|
+
* your own that WRAPS ours without carrying `FEATURE_GUARD_MARKER`, and one
|
|
396
|
+
* you bind globally as an `APP_GUARD` instead of per controller. Both are
|
|
397
|
+
* correctly enforced and both look uncovered from here.
|
|
398
|
+
*
|
|
399
|
+
* Turning it off buys silence, not safety: those routes are then unchecked
|
|
400
|
+
* by anything, and whether they are covered is back to being something you
|
|
401
|
+
* know rather than something the boot verifies.
|
|
402
|
+
*/
|
|
403
|
+
enforcementChainCheck?: boolean;
|
|
391
404
|
}
|
|
392
405
|
|
|
393
|
-
export { PLAN_RESOLVER_PORT_TOKEN as P,
|
|
406
|
+
export { PLAN_RESOLVER_PORT_TOKEN as P, type SaaSiCatAdapters as S, type TenantManifestControllerOptions as T, type SaaSiCatAdminResourcesOptions as a, type SaaSiCatAdminStatsOptions as b, type SaaSiCatCatalogOptions as c, type SaaSiCatCheckoutOfferOptions as d, type SaaSiCatModuleOptions as e, type SaaSiCatPromoCodesOptions as f, type SaaSiCatSetupOptions as g, type SaaSiCatSubscriptionBundlesOptions as h, type SaaSiCatSubscriptionContractOptions as i, type SaaSiCatTenantAuthGuards as j, type SaaSiCatTenantBillingOptions as k, SetupModule as l, type SetupModuleOptions as m, StaticPlanResolver as n, type PlanResolverPort as o, buildTenantManifestController as p };
|