@saasicat/nest 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_entries.cjs +17678 -0
- package/dist/admin/index.cjs +4 -1533
- package/dist/admin/index.d.cts +10 -173
- package/dist/admin/index.d.ts +10 -173
- package/dist/admin/index.js +3 -2
- package/dist/{admin-resources.module-BybEjZs-.d.cts → admin-resources.module-BZN_yBFj.d.cts} +1 -1
- package/dist/{admin-resources.module-CUCLlUAi.d.ts → admin-resources.module-Cms8MY6h.d.ts} +1 -1
- package/dist/admin-stats.module-15ac5KY3.d.ts +201 -0
- package/dist/admin-stats.module-v4SVvWzj.d.cts +201 -0
- package/dist/billing/index.cjs +4 -5130
- package/dist/billing/index.d.cts +8 -437
- package/dist/billing/index.d.ts +8 -437
- package/dist/billing/index.js +4 -4
- package/dist/catalog/index.cjs +4 -5624
- package/dist/catalog/index.d.cts +5 -328
- package/dist/catalog/index.d.ts +5 -328
- package/dist/catalog/index.js +4 -4
- package/dist/checkout-offer/index.cjs +4 -807
- package/dist/checkout-offer/index.d.cts +5 -84
- package/dist/checkout-offer/index.d.ts +5 -84
- package/dist/checkout-offer/index.js +3 -2
- package/dist/checkout-offer.module-Y0hDOVrq.d.ts +85 -0
- package/dist/checkout-offer.module-ZYF5IsDY.d.cts +85 -0
- package/dist/{chunk-PBQRPDO2.js → chunk-33TP26MR.js} +2 -2
- package/dist/{chunk-CK54YKVK.js → chunk-75JABGZK.js} +16 -16
- package/dist/{chunk-HRU3CP57.js → chunk-BOADBIGB.js} +1 -1
- package/dist/chunk-DBZGV3HC.js +0 -0
- package/dist/{chunk-ZLUGQE5D.js → chunk-E7AJ42AB.js} +8 -8
- package/dist/{chunk-HXAWPPFW.js → chunk-F3VV6EXG.js} +9 -9
- package/dist/{chunk-3M6VLT5N.js → chunk-FVT7KTUI.js} +2 -2
- package/dist/{chunk-GW2I3JZD.js → chunk-GBDUH6DO.js} +1 -1
- package/dist/{chunk-K3OPNVFR.js → chunk-HBFU5AN3.js} +5 -9
- package/dist/{chunk-OFBDEO45.js → chunk-IRWZC3GC.js} +1 -1
- package/dist/chunk-L4KTQ6CL.js +20 -0
- package/dist/{chunk-WGVTXSYW.js → chunk-LZHLGUQI.js} +1 -1
- package/dist/{chunk-ZZMAHX22.js → chunk-PUXLPUVH.js} +15 -12
- package/dist/{chunk-7K5PT2LX.js → chunk-TXDH4FUA.js} +1 -1
- package/dist/chunk-UF53DWWR.js +0 -0
- package/dist/{chunk-AJ3EPELS.js → chunk-V34AA7C7.js} +1 -1
- package/dist/chunk-WJ6BMDL3.js +313 -0
- package/dist/{chunk-M6CZQYPY.js → chunk-Z3FWN3HJ.js} +2 -2
- package/dist/discovery/index.cjs +4 -588
- package/dist/discovery/index.js +3 -3
- package/dist/{enforce-quota.interceptor-SqrQVF91.d.cts → enforce-quota.interceptor-BhkX5nq2.d.cts} +35 -2
- package/dist/{enforce-quota.interceptor-B3CL5MSw.d.ts → enforce-quota.interceptor-CcqZc0Yu.d.ts} +35 -2
- package/dist/entitlement/index.cjs +4 -781
- package/dist/entitlement/index.js +2 -2
- package/dist/index.cjs +4 -15671
- package/dist/index.d.cts +21 -56
- package/dist/index.d.ts +21 -56
- package/dist/index.js +39 -334
- package/dist/{module-DeH_Jkcq.d.cts → module-CSN8j8Tp.d.cts} +1 -1
- package/dist/{module-B5m080F0.d.ts → module-DgYJur6f.d.ts} +1 -1
- package/dist/plan-versions.service-BB36Q1bg.d.ts +329 -0
- package/dist/plan-versions.service-CUR2Whyr.d.cts +329 -0
- package/dist/platform/index.cjs +4 -12925
- package/dist/platform/index.d.cts +17 -9
- package/dist/platform/index.d.ts +17 -9
- package/dist/platform/index.js +98 -14
- package/dist/promo/index.cjs +4 -1520
- package/dist/promo/index.d.cts +6 -21
- package/dist/promo/index.d.ts +6 -21
- package/dist/promo/index.js +2 -2
- package/dist/rate-limit.guard-dntqAlfZ.d.cts +19 -0
- package/dist/rate-limit.guard-dntqAlfZ.d.ts +19 -0
- package/dist/registration/index.cjs +4 -1655
- package/dist/registration/index.js +1 -1
- package/dist/{service-DlhMnYjW.d.ts → service-DX8KbGXl.d.cts} +1 -1
- package/dist/{service-DlhMnYjW.d.cts → service-DX8KbGXl.d.ts} +1 -1
- package/dist/setup.service-BPwJ7My_.d.cts +45 -0
- package/dist/setup.service-D2mrdDDB.d.ts +45 -0
- package/dist/subscription-bundle-preview.service-BkJXHAeP.d.cts +438 -0
- package/dist/subscription-bundle-preview.service-DBbrE_cw.d.ts +438 -0
- package/dist/subscription-contract/index.cjs +4 -471
- package/dist/subscription-contract/index.d.cts +5 -13
- package/dist/subscription-contract/index.d.ts +5 -13
- package/dist/subscription-contract.module-CG9fPKAr.d.cts +14 -0
- package/dist/subscription-contract.module-CVebZzHR.d.ts +14 -0
- package/dist/testing/index.cjs +4 -13888
- package/dist/testing/index.d.cts +5 -5
- package/dist/testing/index.d.ts +5 -5
- package/dist/testing/index.js +10 -10
- package/package.json +4 -4
- package/dist/admin-manifest.service-BMeSLRW4.d.ts +0 -33
- package/dist/admin-manifest.service-StAQe6QO.d.cts +0 -33
- package/dist/chunk-N3WANKSA.js +0 -20
package/dist/{enforce-quota.interceptor-B3CL5MSw.d.ts → enforce-quota.interceptor-CcqZc0Yu.d.ts}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Type, CanActivate, DynamicModule, ForwardReference, FactoryProvider, Provider, ExecutionContext, NestInterceptor, CallHandler } from '@nestjs/common';
|
|
2
2
|
import { PlanCatalog, SaasicatPersistenceAdapter, MfaPort, AuditPort, RlsBypassPort, PlanCatalogReadSink, SubscriptionRepository, PlanVersionRepository, TransactionRunner, QuotaProvider, FeatureUiRegistry, SubscriptionUsagePort, UsageSnapshotPort, TenantSubscriptionWritePort, AdminResourcesPort, FirstTimeCustomerCheck } from '@saasicat/types';
|
|
3
3
|
import { P as ProviderSpec } from './di-CcNeq9v-.js';
|
|
4
|
-
import {
|
|
4
|
+
import { b as AdminManifestConfig, d as AdminResourcesModuleOptions } from './admin-resources.module-Cms8MY6h.js';
|
|
5
5
|
import { E as EntitlementResolutionConfig } from './plan-resolution-CFCoUkrE.js';
|
|
6
|
-
import { a as PromoCodesModuleOptions } from './module-
|
|
6
|
+
import { a as PromoCodesModuleOptions } from './module-DgYJur6f.js';
|
|
7
7
|
import { b as DiscoveryAppInfo } from './discovery.scanner-DLgEvuoy.js';
|
|
8
8
|
import { b as CatalogModuleOptions } from './catalog.module-BKObceo0.js';
|
|
9
9
|
import { t as TenantBillingModuleOptions, p as SubscriptionBundleModuleOptions, n as SubscriptionBundleControllerOptions } from './subscription-bundles.module-BQmoozm5.js';
|
|
@@ -125,6 +125,15 @@ interface SaasPlatformPromoCodesOptions extends Omit<PromoCodesModuleOptions, 'p
|
|
|
125
125
|
firstTimeCustomerCheck?: ProviderSpec<FirstTimeCustomerCheck>;
|
|
126
126
|
/** Override the default controller guards + `SuperAdminGuard` chain. */
|
|
127
127
|
adminGuards?: Array<Type<CanActivate>>;
|
|
128
|
+
/**
|
|
129
|
+
* Mount the SuperAdmin promo-code CRUD controller. Default `true`.
|
|
130
|
+
*
|
|
131
|
+
* Set `false` when the app serves `/admin/promo-codes` itself — two
|
|
132
|
+
* controllers on one path abort the boot with a duplicate-route error.
|
|
133
|
+
* The promo domain service stays available either way, so an app-owned
|
|
134
|
+
* controller can still delegate its validation to the platform.
|
|
135
|
+
*/
|
|
136
|
+
adminController?: false;
|
|
128
137
|
}
|
|
129
138
|
interface SaasPlatformModuleOptions {
|
|
130
139
|
/**
|
|
@@ -178,6 +187,16 @@ interface SaasPlatformModuleOptions {
|
|
|
178
187
|
* `MfaGuard`). Optional.
|
|
179
188
|
*/
|
|
180
189
|
reloadGuards?: Array<Type<CanActivate>>;
|
|
190
|
+
/**
|
|
191
|
+
* Mount the platform's `GET /admin/manifest` + `POST /admin/manifest/reload`
|
|
192
|
+
* controller. Default `true`.
|
|
193
|
+
*
|
|
194
|
+
* Set `false` when the app serves those routes from its own controller —
|
|
195
|
+
* two controllers on one path abort the boot with a duplicate-route error
|
|
196
|
+
* (`FST_ERR_DUPLICATED_ROUTE` under Fastify), so this is not something the
|
|
197
|
+
* app can simply override.
|
|
198
|
+
*/
|
|
199
|
+
includeManifestController?: boolean;
|
|
181
200
|
/**
|
|
182
201
|
* Modules whose providers must be visible in the DI scope (typically:
|
|
183
202
|
* `AuthModule` with the `JwtAuthGuard`).
|
|
@@ -265,6 +284,20 @@ interface SaasPlatformModuleOptions {
|
|
|
265
284
|
* `controller.guards`.
|
|
266
285
|
*/
|
|
267
286
|
tenantManifest?: true | TenantManifestControllerOptions;
|
|
287
|
+
/**
|
|
288
|
+
* Bind `StaticFeatureGuard` as a global `APP_GUARD`. Default `true`.
|
|
289
|
+
*
|
|
290
|
+
* Set `false` when the app authenticates in a controller-local guard.
|
|
291
|
+
* Nest runs every global guard before every controller-local one, so a
|
|
292
|
+
* global feature guard sees no `request.user` and rejects with 403 before
|
|
293
|
+
* authentication has run. Apps in that shape bind the guard themselves,
|
|
294
|
+
* behind their auth guard: `@UseGuards(JwtAuthGuard, FeatureGuard)`.
|
|
295
|
+
*
|
|
296
|
+
* Only the guard is affected. `EnforceQuotaInterceptor` stays global
|
|
297
|
+
* either way — interceptors run after all guards, so it does see the
|
|
298
|
+
* authenticated request.
|
|
299
|
+
*/
|
|
300
|
+
globalFeatureGuard?: boolean;
|
|
268
301
|
}
|
|
269
302
|
/**
|
|
270
303
|
* Bundles PlanCatalog + Discovery + Admin + AdminManifest (+ optionally
|