@saasicat/nest 0.8.0 → 0.9.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/admin/index.cjs +261 -2
- package/dist/admin/index.d.cts +6 -4
- package/dist/admin/index.d.ts +6 -4
- package/dist/admin/index.js +12 -4
- package/dist/{admin-manifest.service-Cp6uwvmt.d.cts → admin-manifest.service-BMeSLRW4.d.ts} +1 -1
- package/dist/{admin-manifest.service-UGgzR1x-.d.ts → admin-manifest.service-StAQe6QO.d.cts} +1 -1
- package/dist/admin-resources.module-BybEjZs-.d.cts +40 -0
- package/dist/admin-resources.module-CUCLlUAi.d.ts +40 -0
- package/dist/billing/index.cjs +3 -1
- package/dist/billing/index.d.cts +5 -287
- package/dist/billing/index.d.ts +5 -287
- package/dist/billing/index.js +5 -8
- package/dist/catalog/index.d.cts +4 -101
- package/dist/catalog/index.d.ts +4 -101
- package/dist/catalog/index.js +12 -10
- package/dist/catalog.module-BKObceo0.d.ts +103 -0
- package/dist/catalog.module-Dw2Hrbyu.d.cts +103 -0
- package/dist/{chunk-PLDHI6NA.js → chunk-3M6VLT5N.js} +256 -1
- package/dist/chunk-7K5PT2LX.js +211 -0
- package/dist/{chunk-RZU4HIAN.js → chunk-GW2I3JZD.js} +25 -22
- package/dist/{chunk-6LP7CDS2.js → chunk-HXAWPPFW.js} +10 -5
- package/dist/chunk-OFBDEO45.js +755 -0
- package/dist/{chunk-5DDCSGZC.js → chunk-PBQRPDO2.js} +142 -354
- package/dist/{chunk-T5SXXAKG.js → chunk-WGVTXSYW.js} +1 -1
- package/dist/{chunk-YHHE4KDA.js → chunk-ZZMAHX22.js} +343 -16
- package/dist/{enforce-quota.interceptor-Dj1Kusr5.d.ts → enforce-quota.interceptor-B3CL5MSw.d.ts} +94 -12
- package/dist/{enforce-quota.interceptor-cv7r80VM.d.cts → enforce-quota.interceptor-SqrQVF91.d.cts} +94 -12
- package/dist/entitlement/index.cjs +1 -0
- package/dist/entitlement/index.d.cts +3 -1
- package/dist/entitlement/index.d.ts +3 -1
- package/dist/entitlement/index.js +1 -2
- package/dist/index.cjs +3501 -2805
- package/dist/index.d.cts +9 -6
- package/dist/index.d.ts +9 -6
- package/dist/index.js +75 -61
- package/dist/module-B5m080F0.d.ts +39 -0
- package/dist/module-DeH_Jkcq.d.cts +39 -0
- package/dist/platform/index.cjs +11110 -964
- package/dist/platform/index.d.cts +41 -7
- package/dist/platform/index.d.ts +41 -7
- package/dist/platform/index.js +26 -6
- package/dist/promo/index.cjs +530 -5
- package/dist/promo/index.d.cts +47 -30
- package/dist/promo/index.d.ts +47 -30
- package/dist/promo/index.js +9 -1
- package/dist/{service-DX8KbGXl.d.cts → service-DlhMnYjW.d.cts} +1 -1
- package/dist/{service-DX8KbGXl.d.ts → service-DlhMnYjW.d.ts} +1 -1
- package/dist/subscription-bundles.module-BQmoozm5.d.ts +291 -0
- package/dist/subscription-bundles.module-DCpV-Pb5.d.cts +291 -0
- package/dist/testing/index.cjs +11098 -966
- package/dist/testing/index.d.cts +9 -4
- package/dist/testing/index.d.ts +9 -4
- package/dist/testing/index.js +10 -4
- package/package.json +4 -4
- package/dist/admin-manifest.config-DyrQNT7M.d.cts +0 -10
- package/dist/admin-manifest.config-DyrQNT7M.d.ts +0 -10
- package/dist/chunk-52UTQRD3.js +0 -326
- package/dist/chunk-Q53N43LQ.js +0 -13
- /package/dist/{chunk-2FR6ZL7R.js → chunk-HWGIMNWR.js} +0 -0
|
@@ -1,15 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { E as EnforceQuotaInterceptor, P as PLAN_RESOLVER_PORT_TOKEN,
|
|
3
|
-
|
|
1
|
+
import { d as SaasPlatformModuleOptions, e as PlanResolverPort, a as StaticEntitlementService } from '../enforce-quota.interceptor-SqrQVF91.cjs';
|
|
2
|
+
export { E as EnforceQuotaInterceptor, P as PLAN_RESOLVER_PORT_TOKEN, Q as QUOTA_PROVIDERS_TOKEN, f as STATIC_FEATURE_GUARD_CONFIG_TOKEN, g as SaaSiCatModule, S as SaasPlatformAdapters, h as SaasPlatformAdminResourcesOptions, i as SaasPlatformCatalogOptions, g as SaasPlatformModule, j as SaasPlatformPromoCodesOptions, k as SaasPlatformSubscriptionBundlesOptions, l as SaasPlatformTenantAuthGuards, m as SaasPlatformTenantBillingOptions, n as StaticEntitlementSnapshot, b as StaticFeatureGuard, o as StaticFeatureGuardConfig, c as StaticPlanResolver, T as TenantManifestControllerOptions, p as buildTenantManifestController } from '../enforce-quota.interceptor-SqrQVF91.cjs';
|
|
3
|
+
import { SubscriptionRepository, UsageSnapshotPort, QuotaProvider } from '@saasicat/types';
|
|
4
|
+
export { A as AdminManifestService } from '../admin-manifest.service-StAQe6QO.cjs';
|
|
4
5
|
import '@nestjs/common';
|
|
5
|
-
import '@saasicat/types';
|
|
6
6
|
import '../di-CcNeq9v-.cjs';
|
|
7
|
-
import '../admin-
|
|
7
|
+
import '../admin-resources.module-BybEjZs-.cjs';
|
|
8
|
+
import '../admin-audit.service-9IqXMlZm.cjs';
|
|
9
|
+
import '../plan-resolution-CFCoUkrE.cjs';
|
|
10
|
+
import '../module-DeH_Jkcq.cjs';
|
|
11
|
+
import '../service-DlhMnYjW.cjs';
|
|
8
12
|
import '../discovery.scanner-DLgEvuoy.cjs';
|
|
9
13
|
import '@nestjs/core';
|
|
10
|
-
import '../
|
|
14
|
+
import '../catalog.module-Dw2Hrbyu.cjs';
|
|
15
|
+
import '../subscription-bundles.module-DCpV-Pb5.cjs';
|
|
11
16
|
import 'rxjs';
|
|
12
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Typed identity helper for the high-level SaaSiCat configuration. It keeps
|
|
20
|
+
* literal types and gives editors one place for completion without adding
|
|
21
|
+
* runtime behavior.
|
|
22
|
+
*/
|
|
23
|
+
declare function defineSaaSiCat<const T extends SaasPlatformModuleOptions>(options: T): T;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Standard `tenantId → planId` resolver backed by the canonical subscription
|
|
27
|
+
* repository. This removes the identical resolver class most applications
|
|
28
|
+
* previously had to write themselves.
|
|
29
|
+
*/
|
|
30
|
+
declare class SubscriptionPlanResolver implements PlanResolverPort {
|
|
31
|
+
private readonly subscriptions;
|
|
32
|
+
private readonly activeStatuses;
|
|
33
|
+
constructor(subscriptions: SubscriptionRepository, activeStatuses?: ReadonlySet<string>);
|
|
34
|
+
getPlanIdForTenant(tenantId: string): Promise<string | null>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Reuses the registered quota counters for the tenant usage response. A quota
|
|
39
|
+
* is counted once and serves both runtime enforcement and the billing UI.
|
|
40
|
+
*/
|
|
41
|
+
declare class QuotaProvidersUsageSnapshot implements UsageSnapshotPort {
|
|
42
|
+
private readonly providers;
|
|
43
|
+
constructor(providers: ReadonlyArray<QuotaProvider>);
|
|
44
|
+
snapshot(tenantId: string): Promise<Record<string, number>>;
|
|
45
|
+
}
|
|
46
|
+
|
|
13
47
|
interface TenantNavItem {
|
|
14
48
|
/** Unique slug, e.g. "notes", "billing", "settings". */
|
|
15
49
|
id: string;
|
|
@@ -63,4 +97,4 @@ declare class TenantManifestService {
|
|
|
63
97
|
getManifest(tenantId: string): Promise<TenantManifest>;
|
|
64
98
|
}
|
|
65
99
|
|
|
66
|
-
export { StaticEntitlementService, type TenantManifest, TenantManifestService, type TenantNavItem };
|
|
100
|
+
export { PlanResolverPort, QuotaProvidersUsageSnapshot, SaasPlatformModuleOptions, StaticEntitlementService, SubscriptionPlanResolver, type TenantManifest, TenantManifestService, type TenantNavItem, defineSaaSiCat };
|
package/dist/platform/index.d.ts
CHANGED
|
@@ -1,15 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { E as EnforceQuotaInterceptor, P as PLAN_RESOLVER_PORT_TOKEN,
|
|
3
|
-
|
|
1
|
+
import { d as SaasPlatformModuleOptions, e as PlanResolverPort, a as StaticEntitlementService } from '../enforce-quota.interceptor-B3CL5MSw.js';
|
|
2
|
+
export { E as EnforceQuotaInterceptor, P as PLAN_RESOLVER_PORT_TOKEN, Q as QUOTA_PROVIDERS_TOKEN, f as STATIC_FEATURE_GUARD_CONFIG_TOKEN, g as SaaSiCatModule, S as SaasPlatformAdapters, h as SaasPlatformAdminResourcesOptions, i as SaasPlatformCatalogOptions, g as SaasPlatformModule, j as SaasPlatformPromoCodesOptions, k as SaasPlatformSubscriptionBundlesOptions, l as SaasPlatformTenantAuthGuards, m as SaasPlatformTenantBillingOptions, n as StaticEntitlementSnapshot, b as StaticFeatureGuard, o as StaticFeatureGuardConfig, c as StaticPlanResolver, T as TenantManifestControllerOptions, p as buildTenantManifestController } from '../enforce-quota.interceptor-B3CL5MSw.js';
|
|
3
|
+
import { SubscriptionRepository, UsageSnapshotPort, QuotaProvider } from '@saasicat/types';
|
|
4
|
+
export { A as AdminManifestService } from '../admin-manifest.service-BMeSLRW4.js';
|
|
4
5
|
import '@nestjs/common';
|
|
5
|
-
import '@saasicat/types';
|
|
6
6
|
import '../di-CcNeq9v-.js';
|
|
7
|
-
import '../admin-
|
|
7
|
+
import '../admin-resources.module-CUCLlUAi.js';
|
|
8
|
+
import '../admin-audit.service-9IqXMlZm.js';
|
|
9
|
+
import '../plan-resolution-CFCoUkrE.js';
|
|
10
|
+
import '../module-B5m080F0.js';
|
|
11
|
+
import '../service-DlhMnYjW.js';
|
|
8
12
|
import '../discovery.scanner-DLgEvuoy.js';
|
|
9
13
|
import '@nestjs/core';
|
|
10
|
-
import '../
|
|
14
|
+
import '../catalog.module-BKObceo0.js';
|
|
15
|
+
import '../subscription-bundles.module-BQmoozm5.js';
|
|
11
16
|
import 'rxjs';
|
|
12
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Typed identity helper for the high-level SaaSiCat configuration. It keeps
|
|
20
|
+
* literal types and gives editors one place for completion without adding
|
|
21
|
+
* runtime behavior.
|
|
22
|
+
*/
|
|
23
|
+
declare function defineSaaSiCat<const T extends SaasPlatformModuleOptions>(options: T): T;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Standard `tenantId → planId` resolver backed by the canonical subscription
|
|
27
|
+
* repository. This removes the identical resolver class most applications
|
|
28
|
+
* previously had to write themselves.
|
|
29
|
+
*/
|
|
30
|
+
declare class SubscriptionPlanResolver implements PlanResolverPort {
|
|
31
|
+
private readonly subscriptions;
|
|
32
|
+
private readonly activeStatuses;
|
|
33
|
+
constructor(subscriptions: SubscriptionRepository, activeStatuses?: ReadonlySet<string>);
|
|
34
|
+
getPlanIdForTenant(tenantId: string): Promise<string | null>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Reuses the registered quota counters for the tenant usage response. A quota
|
|
39
|
+
* is counted once and serves both runtime enforcement and the billing UI.
|
|
40
|
+
*/
|
|
41
|
+
declare class QuotaProvidersUsageSnapshot implements UsageSnapshotPort {
|
|
42
|
+
private readonly providers;
|
|
43
|
+
constructor(providers: ReadonlyArray<QuotaProvider>);
|
|
44
|
+
snapshot(tenantId: string): Promise<Record<string, number>>;
|
|
45
|
+
}
|
|
46
|
+
|
|
13
47
|
interface TenantNavItem {
|
|
14
48
|
/** Unique slug, e.g. "notes", "billing", "settings". */
|
|
15
49
|
id: string;
|
|
@@ -63,4 +97,4 @@ declare class TenantManifestService {
|
|
|
63
97
|
getManifest(tenantId: string): Promise<TenantManifest>;
|
|
64
98
|
}
|
|
65
99
|
|
|
66
|
-
export { StaticEntitlementService, type TenantManifest, TenantManifestService, type TenantNavItem };
|
|
100
|
+
export { PlanResolverPort, QuotaProvidersUsageSnapshot, SaasPlatformModuleOptions, StaticEntitlementService, SubscriptionPlanResolver, type TenantManifest, TenantManifestService, type TenantNavItem, defineSaaSiCat };
|
package/dist/platform/index.js
CHANGED
|
@@ -2,39 +2,59 @@ import {
|
|
|
2
2
|
EnforceQuotaInterceptor,
|
|
3
3
|
PLAN_RESOLVER_PORT_TOKEN,
|
|
4
4
|
QUOTA_PROVIDERS_TOKEN,
|
|
5
|
+
QuotaProvidersUsageSnapshot,
|
|
5
6
|
STATIC_FEATURE_GUARD_CONFIG_TOKEN,
|
|
6
7
|
SaasPlatformModule,
|
|
7
8
|
StaticEntitlementService,
|
|
8
9
|
StaticFeatureGuard,
|
|
9
10
|
StaticPlanResolver,
|
|
11
|
+
SubscriptionPlanResolver,
|
|
10
12
|
TenantManifestService,
|
|
11
13
|
buildTenantManifestController
|
|
12
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-ZZMAHX22.js";
|
|
15
|
+
import "../chunk-OFBDEO45.js";
|
|
13
16
|
import {
|
|
14
17
|
AdminManifestService
|
|
15
|
-
} from "../chunk-
|
|
16
|
-
import "../chunk-
|
|
18
|
+
} from "../chunk-3M6VLT5N.js";
|
|
19
|
+
import "../chunk-HXAWPPFW.js";
|
|
20
|
+
import "../chunk-ZLUGQE5D.js";
|
|
21
|
+
import "../chunk-2PNX2QL2.js";
|
|
22
|
+
import "../chunk-PBQRPDO2.js";
|
|
23
|
+
import "../chunk-WPUVJRIN.js";
|
|
17
24
|
import "../chunk-E56W4U2P.js";
|
|
25
|
+
import "../chunk-MDIZUVIK.js";
|
|
18
26
|
import "../chunk-AJ3EPELS.js";
|
|
19
27
|
import "../chunk-M6CZQYPY.js";
|
|
20
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-GW2I3JZD.js";
|
|
21
29
|
import "../chunk-R2QOSVAA.js";
|
|
22
30
|
import "../chunk-NYLON2VC.js";
|
|
23
31
|
import "../chunk-WKVBNTYC.js";
|
|
24
32
|
import "../chunk-N3WANKSA.js";
|
|
25
33
|
import "../chunk-SABTXESR.js";
|
|
26
34
|
import "../chunk-L4SUWH5B.js";
|
|
27
|
-
import
|
|
35
|
+
import {
|
|
36
|
+
__name
|
|
37
|
+
} from "../chunk-SHUYVCID.js";
|
|
38
|
+
|
|
39
|
+
// src/platform/define-saasicat.ts
|
|
40
|
+
function defineSaaSiCat(options) {
|
|
41
|
+
return options;
|
|
42
|
+
}
|
|
43
|
+
__name(defineSaaSiCat, "defineSaaSiCat");
|
|
28
44
|
export {
|
|
29
45
|
AdminManifestService,
|
|
30
46
|
EnforceQuotaInterceptor,
|
|
31
47
|
PLAN_RESOLVER_PORT_TOKEN,
|
|
32
48
|
QUOTA_PROVIDERS_TOKEN,
|
|
49
|
+
QuotaProvidersUsageSnapshot,
|
|
33
50
|
STATIC_FEATURE_GUARD_CONFIG_TOKEN,
|
|
51
|
+
SaasPlatformModule as SaaSiCatModule,
|
|
34
52
|
SaasPlatformModule,
|
|
35
53
|
StaticEntitlementService,
|
|
36
54
|
StaticFeatureGuard,
|
|
37
55
|
StaticPlanResolver,
|
|
56
|
+
SubscriptionPlanResolver,
|
|
38
57
|
TenantManifestService,
|
|
39
|
-
buildTenantManifestController
|
|
58
|
+
buildTenantManifestController,
|
|
59
|
+
defineSaaSiCat
|
|
40
60
|
};
|