@saasicat/nest 0.4.0 → 0.6.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 +3 -8
- package/dist/admin/index.d.cts +5 -33
- package/dist/admin/index.d.ts +5 -33
- package/dist/admin/index.js +2 -2
- package/dist/{admin-manifest.config-DxTfZ8-L.d.cts → admin-manifest.config-DyrQNT7M.d.cts} +1 -1
- package/dist/{admin-manifest.config-DxTfZ8-L.d.ts → admin-manifest.config-DyrQNT7M.d.ts} +1 -1
- package/dist/admin-manifest.service-Cp6uwvmt.d.cts +33 -0
- package/dist/admin-manifest.service-UGgzR1x-.d.ts +33 -0
- package/dist/{aggregation-DGCyoN5d.d.ts → aggregation-BibpEO0t.d.ts} +6 -59
- package/dist/{aggregation-Bt1i_whS.d.cts → aggregation-CfI0bOsQ.d.cts} +6 -59
- package/dist/billing/index.cjs +18 -106
- package/dist/billing/index.d.cts +8 -30
- package/dist/billing/index.d.ts +8 -30
- package/dist/billing/index.js +12 -14
- package/dist/catalog/index.cjs +1160 -1985
- package/dist/catalog/index.d.cts +9 -124
- package/dist/catalog/index.d.ts +9 -124
- package/dist/catalog/index.js +5 -27
- package/dist/checkout-offer/index.js +2 -2
- package/dist/{chunk-2VNZYRDV.js → chunk-52UTQRD3.js} +1 -1
- package/dist/{chunk-FN65XZKH.js → chunk-5DDCSGZC.js} +1110 -1923
- package/dist/{chunk-VHEHZMHB.js → chunk-BTL66TR6.js} +22 -75
- package/dist/{chunk-XSGU2Y2O.js → chunk-CK54YKVK.js} +2 -33
- package/dist/{chunk-SG34XT7J.js → chunk-FSGBRFLX.js} +18 -10
- package/dist/{chunk-SYEVGPFC.js → chunk-K3OPNVFR.js} +1 -1
- package/dist/{chunk-XCZ3TTFK.js → chunk-N3WANKSA.js} +0 -2
- package/dist/{chunk-K42EQPBB.js → chunk-ND7OOKOG.js} +18 -51
- package/dist/{chunk-MV6LW5UB.js → chunk-R2QOSVAA.js} +2 -2
- package/dist/{chunk-YNEW3L63.js → chunk-SD3TT2BR.js} +1 -1
- package/dist/{chunk-P6MYZMXQ.js → chunk-U6HT27J7.js} +3 -8
- package/dist/{chunk-7MLGHWKO.js → chunk-WKVBNTYC.js} +2 -0
- package/dist/{chunk-ZL4LLE2Z.js → chunk-ZLUGQE5D.js} +1 -1
- package/dist/discovery/index.js +4 -4
- package/dist/{enforce-quota.interceptor-3HmbeHTM.d.ts → enforce-quota.interceptor-Dj1Kusr5.d.ts} +9 -4
- package/dist/{enforce-quota.interceptor-HmdZFg41.d.cts → enforce-quota.interceptor-cv7r80VM.d.cts} +9 -4
- package/dist/entitlement/index.cjs +13 -46
- package/dist/entitlement/index.d.cts +4 -3
- package/dist/entitlement/index.d.ts +4 -3
- package/dist/entitlement/index.js +7 -9
- package/dist/index.cjs +1348 -2300
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +85 -113
- package/dist/platform/index.cjs +28 -54
- package/dist/platform/index.d.cts +4 -3
- package/dist/platform/index.d.ts +4 -3
- package/dist/platform/index.js +10 -7
- package/dist/promo/index.cjs +2 -2
- package/dist/promo/index.js +3 -3
- package/dist/registration/index.cjs +2 -34
- package/dist/registration/index.d.cts +3 -21
- package/dist/registration/index.d.ts +3 -21
- package/dist/registration/index.js +1 -3
- package/dist/testing/index.cjs +26 -255
- package/dist/testing/index.d.cts +5 -37
- package/dist/testing/index.d.ts +5 -37
- package/dist/testing/index.js +7 -207
- package/package.json +3 -3
package/dist/{enforce-quota.interceptor-3HmbeHTM.d.ts → enforce-quota.interceptor-Dj1Kusr5.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type, CanActivate, DynamicModule, ForwardReference, FactoryProvider, ExecutionContext, NestInterceptor, CallHandler } from '@nestjs/common';
|
|
2
2
|
import { MfaPort, AuditPort, RlsBypassPort, PlanCatalogReadSink, SubscriptionRepository, PlanVersionRepository, TransactionRunner, PlanCatalog, SaasicatPersistenceAdapter, QuotaProvider } from '@saasicat/types';
|
|
3
3
|
import { P as ProviderSpec } from './di-CcNeq9v-.js';
|
|
4
|
-
import {
|
|
4
|
+
import { A as AdminManifestConfig } from './admin-manifest.config-DyrQNT7M.js';
|
|
5
5
|
import { b as DiscoveryAppInfo } from './discovery.scanner-DLgEvuoy.js';
|
|
6
6
|
import { E as EntitlementResolutionConfig } from './plan-resolution-CFCoUkrE.js';
|
|
7
7
|
import { Reflector } from '@nestjs/core';
|
|
@@ -47,11 +47,16 @@ declare function buildTenantManifestController(options: TenantManifestController
|
|
|
47
47
|
/**
|
|
48
48
|
* Adapter bindings for the platform ports. Accepted as class tokens, values
|
|
49
49
|
* or factory specs.
|
|
50
|
+
*
|
|
51
|
+
* `mfa`/`audit`/`rlsBypass` are optional because the `persistence` bundle
|
|
52
|
+
* supplies them by default; pass them here only to override the bundle, or
|
|
53
|
+
* when wiring adapters without a bundle. The module validates that each port
|
|
54
|
+
* ends up provided by exactly one of the two paths.
|
|
50
55
|
*/
|
|
51
56
|
interface SaasPlatformAdapters {
|
|
52
|
-
mfa
|
|
53
|
-
audit
|
|
54
|
-
rlsBypass
|
|
57
|
+
mfa?: ProviderSpec<MfaPort>;
|
|
58
|
+
audit?: ProviderSpec<AuditPort>;
|
|
59
|
+
rlsBypass?: ProviderSpec<RlsBypassPort>;
|
|
55
60
|
/**
|
|
56
61
|
* Optional. If provided, `PlanCatalogModule` is hydrated from this sink
|
|
57
62
|
* (DB read at boot). If omitted, `planCatalog` MUST be passed as a ready
|
package/dist/{enforce-quota.interceptor-HmdZFg41.d.cts → enforce-quota.interceptor-cv7r80VM.d.cts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type, CanActivate, DynamicModule, ForwardReference, FactoryProvider, ExecutionContext, NestInterceptor, CallHandler } from '@nestjs/common';
|
|
2
2
|
import { MfaPort, AuditPort, RlsBypassPort, PlanCatalogReadSink, SubscriptionRepository, PlanVersionRepository, TransactionRunner, PlanCatalog, SaasicatPersistenceAdapter, QuotaProvider } from '@saasicat/types';
|
|
3
3
|
import { P as ProviderSpec } from './di-CcNeq9v-.cjs';
|
|
4
|
-
import {
|
|
4
|
+
import { A as AdminManifestConfig } from './admin-manifest.config-DyrQNT7M.cjs';
|
|
5
5
|
import { b as DiscoveryAppInfo } from './discovery.scanner-DLgEvuoy.cjs';
|
|
6
6
|
import { E as EntitlementResolutionConfig } from './plan-resolution-CFCoUkrE.cjs';
|
|
7
7
|
import { Reflector } from '@nestjs/core';
|
|
@@ -47,11 +47,16 @@ declare function buildTenantManifestController(options: TenantManifestController
|
|
|
47
47
|
/**
|
|
48
48
|
* Adapter bindings for the platform ports. Accepted as class tokens, values
|
|
49
49
|
* or factory specs.
|
|
50
|
+
*
|
|
51
|
+
* `mfa`/`audit`/`rlsBypass` are optional because the `persistence` bundle
|
|
52
|
+
* supplies them by default; pass them here only to override the bundle, or
|
|
53
|
+
* when wiring adapters without a bundle. The module validates that each port
|
|
54
|
+
* ends up provided by exactly one of the two paths.
|
|
50
55
|
*/
|
|
51
56
|
interface SaasPlatformAdapters {
|
|
52
|
-
mfa
|
|
53
|
-
audit
|
|
54
|
-
rlsBypass
|
|
57
|
+
mfa?: ProviderSpec<MfaPort>;
|
|
58
|
+
audit?: ProviderSpec<AuditPort>;
|
|
59
|
+
rlsBypass?: ProviderSpec<RlsBypassPort>;
|
|
55
60
|
/**
|
|
56
61
|
* Optional. If provided, `PlanCatalogModule` is hydrated from this sink
|
|
57
62
|
* (DB read at boot). If omitted, `planCatalog` MUST be passed as a ready
|
|
@@ -22,19 +22,18 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
22
|
var entitlement_exports = {};
|
|
23
23
|
__export(entitlement_exports, {
|
|
24
24
|
ENTITLEMENT_RESOLUTION_CONFIG_TOKEN: () => ENTITLEMENT_RESOLUTION_CONFIG_TOKEN,
|
|
25
|
+
ENTITLEMENT_SERVICE_TOKEN: () => ENTITLEMENT_SERVICE_TOKEN,
|
|
25
26
|
EntitlementModule: () => EntitlementModule,
|
|
26
27
|
EntitlementService: () => EntitlementService,
|
|
27
28
|
LimitExceededError: () => LimitExceededError,
|
|
28
29
|
PLAN_VERSION_REPOSITORY_TOKEN: () => PLAN_VERSION_REPOSITORY_TOKEN,
|
|
29
30
|
SUBSCRIPTION_REPOSITORY_TOKEN: () => SUBSCRIPTION_REPOSITORY_TOKEN,
|
|
30
31
|
TRANSACTION_RUNNER_TOKEN: () => TRANSACTION_RUNNER_TOKEN,
|
|
31
|
-
aggregateBusinessTypeQuotas: () => aggregateBusinessTypeQuotas,
|
|
32
32
|
aggregateContractLineItemEntitlements: () => aggregateContractLineItemEntitlements,
|
|
33
33
|
aggregateLimits: () => aggregateLimits,
|
|
34
34
|
aggregateSubscriptionBundleQuotas: () => aggregateSubscriptionBundleQuotas,
|
|
35
35
|
applyCustomLimits: () => applyCustomLimits,
|
|
36
36
|
buildReplacedByIndex: () => buildReplacedByIndex,
|
|
37
|
-
collectBusinessTypeFeatures: () => collectBusinessTypeFeatures,
|
|
38
37
|
collectSubscriptionBundleFeatures: () => collectSubscriptionBundleFeatures,
|
|
39
38
|
expandReplacedFeatures: () => expandReplacedFeatures,
|
|
40
39
|
filterActiveSubscriptionBundles: () => filterActiveSubscriptionBundles,
|
|
@@ -55,25 +54,6 @@ function isFeaturePlannedOnly(catalog, featureKey) {
|
|
|
55
54
|
__name(isFeaturePlannedOnly, "isFeaturePlannedOnly");
|
|
56
55
|
|
|
57
56
|
// src/entitlement/aggregation.ts
|
|
58
|
-
function aggregateBusinessTypeQuotas(snapshot) {
|
|
59
|
-
const sums = {};
|
|
60
|
-
for (const bundle of snapshot.bundles) {
|
|
61
|
-
for (const [key, value] of Object.entries(bundle.quotas)) {
|
|
62
|
-
if (sums[key] === -1 || value === -1) {
|
|
63
|
-
sums[key] = -1;
|
|
64
|
-
} else {
|
|
65
|
-
sums[key] = (sums[key] ?? 0) + value;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
for (const [key, value] of Object.entries(snapshot.quotaOverrides)) {
|
|
70
|
-
if (value !== void 0) {
|
|
71
|
-
sums[key] = value;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return sums;
|
|
75
|
-
}
|
|
76
|
-
__name(aggregateBusinessTypeQuotas, "aggregateBusinessTypeQuotas");
|
|
77
57
|
function filterActiveSubscriptionBundles(bundles, now) {
|
|
78
58
|
return bundles.filter((b) => b.canceledEffectiveAt === null || b.canceledEffectiveAt > now);
|
|
79
59
|
}
|
|
@@ -124,16 +104,6 @@ function aggregateContractLineItemEntitlements(lineItems, fallbackPlan = "UNKNOW
|
|
|
124
104
|
};
|
|
125
105
|
}
|
|
126
106
|
__name(aggregateContractLineItemEntitlements, "aggregateContractLineItemEntitlements");
|
|
127
|
-
function collectBusinessTypeFeatures(snapshot) {
|
|
128
|
-
const set = /* @__PURE__ */ new Set();
|
|
129
|
-
for (const bundle of snapshot.bundles) {
|
|
130
|
-
for (const f of bundle.features) {
|
|
131
|
-
set.add(f);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
return Array.from(set);
|
|
135
|
-
}
|
|
136
|
-
__name(collectBusinessTypeFeatures, "collectBusinessTypeFeatures");
|
|
137
107
|
function filterPlannedOnlyFeatures(features, catalog) {
|
|
138
108
|
const out = /* @__PURE__ */ new Set();
|
|
139
109
|
for (const f of features) {
|
|
@@ -166,8 +136,6 @@ function applyCustomLimits(base, custom) {
|
|
|
166
136
|
}
|
|
167
137
|
__name(applyCustomLimits, "applyCustomLimits");
|
|
168
138
|
function aggregateLimits(input, catalog, now) {
|
|
169
|
-
const businessTypeQuotas = input.businessTypeVersion ? aggregateBusinessTypeQuotas(input.businessTypeVersion) : {};
|
|
170
|
-
const businessTypeFeatures = input.businessTypeVersion ? collectBusinessTypeFeatures(input.businessTypeVersion) : [];
|
|
171
139
|
const activeBundles = filterActiveSubscriptionBundles(input.subscriptionBundles ?? [], now);
|
|
172
140
|
const subBundleQuotas = aggregateSubscriptionBundleQuotas(activeBundles);
|
|
173
141
|
const subBundleFeatures = collectSubscriptionBundleFeatures(activeBundles);
|
|
@@ -175,13 +143,6 @@ function aggregateLimits(input, catalog, now) {
|
|
|
175
143
|
for (const [k, v] of Object.entries(input.planVersion.quotas)) {
|
|
176
144
|
quotas[k] = v;
|
|
177
145
|
}
|
|
178
|
-
for (const [k, v] of Object.entries(businessTypeQuotas)) {
|
|
179
|
-
if (quotas[k] === -1 || v === -1) {
|
|
180
|
-
quotas[k] = -1;
|
|
181
|
-
} else {
|
|
182
|
-
quotas[k] = (quotas[k] ?? 0) + v;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
146
|
for (const [k, v] of Object.entries(subBundleQuotas)) {
|
|
186
147
|
if (quotas[k] === -1 || v === -1) {
|
|
187
148
|
quotas[k] = -1;
|
|
@@ -191,7 +152,6 @@ function aggregateLimits(input, catalog, now) {
|
|
|
191
152
|
}
|
|
192
153
|
const features = /* @__PURE__ */ new Set([
|
|
193
154
|
...input.planVersion.features,
|
|
194
|
-
...businessTypeFeatures,
|
|
195
155
|
...subBundleFeatures
|
|
196
156
|
]);
|
|
197
157
|
const withCustom = applyCustomLimits({
|
|
@@ -413,8 +373,8 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
413
373
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
414
374
|
}
|
|
415
375
|
__name(_ts_decorate, "_ts_decorate");
|
|
416
|
-
var PLAN_CATALOG_TOKEN = /* @__PURE__ */ Symbol("PLAN_CATALOG");
|
|
417
|
-
var PLAN_CATALOG_READ_SINK_TOKEN = /* @__PURE__ */ Symbol("PLAN_CATALOG_READ_SINK");
|
|
376
|
+
var PLAN_CATALOG_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/PLAN_CATALOG");
|
|
377
|
+
var PLAN_CATALOG_READ_SINK_TOKEN = /* @__PURE__ */ Symbol.for("saasicat/nest/PLAN_CATALOG_READ_SINK");
|
|
418
378
|
var PlanCatalogModule = class _PlanCatalogModule {
|
|
419
379
|
static {
|
|
420
380
|
__name(this, "PlanCatalogModule");
|
|
@@ -484,6 +444,7 @@ var SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-pl
|
|
|
484
444
|
var DISCOVERY_SNAPSHOT_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/DiscoverySnapshot");
|
|
485
445
|
|
|
486
446
|
// src/entitlement/tokens.ts
|
|
447
|
+
var ENTITLEMENT_SERVICE_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/EntitlementService");
|
|
487
448
|
var SUBSCRIPTION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/SubscriptionRepository");
|
|
488
449
|
var PLAN_VERSION_REPOSITORY_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PlanVersionRepository");
|
|
489
450
|
var TRANSACTION_RUNNER_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/TransactionRunner");
|
|
@@ -754,7 +715,13 @@ var EntitlementModule = class _EntitlementModule {
|
|
|
754
715
|
asProvider(SUBSCRIPTION_REPOSITORY_TOKEN, options.subscriptionRepository),
|
|
755
716
|
asProvider(PLAN_VERSION_REPOSITORY_TOKEN, options.planVersionRepository),
|
|
756
717
|
asProvider(TRANSACTION_RUNNER_TOKEN, options.transactionRunner),
|
|
757
|
-
EntitlementService
|
|
718
|
+
EntitlementService,
|
|
719
|
+
// Cross-bundle-stable alias so consumers in other subpath bundles
|
|
720
|
+
// (billing/TenantBillingModule) can inject the same instance.
|
|
721
|
+
{
|
|
722
|
+
provide: ENTITLEMENT_SERVICE_TOKEN,
|
|
723
|
+
useExisting: EntitlementService
|
|
724
|
+
}
|
|
758
725
|
];
|
|
759
726
|
if (options.resolutionConfig) {
|
|
760
727
|
providers.push({
|
|
@@ -777,6 +744,7 @@ var EntitlementModule = class _EntitlementModule {
|
|
|
777
744
|
providers,
|
|
778
745
|
exports: [
|
|
779
746
|
EntitlementService,
|
|
747
|
+
ENTITLEMENT_SERVICE_TOKEN,
|
|
780
748
|
SUBSCRIPTION_REPOSITORY_TOKEN
|
|
781
749
|
]
|
|
782
750
|
};
|
|
@@ -788,19 +756,18 @@ EntitlementModule = _ts_decorate3([
|
|
|
788
756
|
// Annotate the CommonJS export names for ESM import in node:
|
|
789
757
|
0 && (module.exports = {
|
|
790
758
|
ENTITLEMENT_RESOLUTION_CONFIG_TOKEN,
|
|
759
|
+
ENTITLEMENT_SERVICE_TOKEN,
|
|
791
760
|
EntitlementModule,
|
|
792
761
|
EntitlementService,
|
|
793
762
|
LimitExceededError,
|
|
794
763
|
PLAN_VERSION_REPOSITORY_TOKEN,
|
|
795
764
|
SUBSCRIPTION_REPOSITORY_TOKEN,
|
|
796
765
|
TRANSACTION_RUNNER_TOKEN,
|
|
797
|
-
aggregateBusinessTypeQuotas,
|
|
798
766
|
aggregateContractLineItemEntitlements,
|
|
799
767
|
aggregateLimits,
|
|
800
768
|
aggregateSubscriptionBundleQuotas,
|
|
801
769
|
applyCustomLimits,
|
|
802
770
|
buildReplacedByIndex,
|
|
803
|
-
collectBusinessTypeFeatures,
|
|
804
771
|
collectSubscriptionBundleFeatures,
|
|
805
772
|
expandReplacedFeatures,
|
|
806
773
|
filterActiveSubscriptionBundles,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { C as CustomLimitsShape, E as EffectiveLimits, a as EffectiveLimitsSnapshot, b as EnforceLimitInput, c as EntitlementService, P as PlanVersionSnapshot, S as SubscriptionBundleSnapshot, d as SubscriptionLimitsInput, e as aggregateContractLineItemEntitlements, f as aggregateLimits, g as aggregateSubscriptionBundleQuotas, h as applyCustomLimits, i as collectSubscriptionBundleFeatures, j as filterActiveSubscriptionBundles, k as filterPlannedOnlyFeatures, l as hasAnyFeature, m as hasFeature, t as toEffectiveLimitsSnapshot } from '../aggregation-CfI0bOsQ.cjs';
|
|
2
2
|
import { DiscoveredFeature, SubscriptionRepository, PlanVersionRepository, TransactionRunner, SubscriptionContractRepository, SubscriptionBundleRepository, BundleRepository } from '@saasicat/types';
|
|
3
3
|
import { E as EntitlementResolutionConfig } from '../plan-resolution-CFCoUkrE.cjs';
|
|
4
4
|
export { a as EntitlementResolutionInput, r as resolveEntitlementPlan } from '../plan-resolution-CFCoUkrE.cjs';
|
|
@@ -54,7 +54,7 @@ interface EntitlementModuleOptions {
|
|
|
54
54
|
/**
|
|
55
55
|
* Optional (P11.7.3/#61) — BOTH together enable the aggregation of
|
|
56
56
|
* independently booked catalog bundles (`subscription_bundles`) in
|
|
57
|
-
* `computeLimits`. Without them, only plan
|
|
57
|
+
* `computeLimits`. Without them, only the plan counts — bundles
|
|
58
58
|
* booked mid-cycle would then NOT be in the entitlements (and a contract
|
|
59
59
|
* re-freeze would not freeze them in).
|
|
60
60
|
*/
|
|
@@ -68,9 +68,10 @@ declare class EntitlementModule {
|
|
|
68
68
|
static forRoot(options: EntitlementModuleOptions): DynamicModule;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
declare const ENTITLEMENT_SERVICE_TOKEN: unique symbol;
|
|
71
72
|
declare const SUBSCRIPTION_REPOSITORY_TOKEN: unique symbol;
|
|
72
73
|
declare const PLAN_VERSION_REPOSITORY_TOKEN: unique symbol;
|
|
73
74
|
declare const TRANSACTION_RUNNER_TOKEN: unique symbol;
|
|
74
75
|
declare const ENTITLEMENT_RESOLUTION_CONFIG_TOKEN: unique symbol;
|
|
75
76
|
|
|
76
|
-
export { ENTITLEMENT_RESOLUTION_CONFIG_TOKEN, EntitlementModule, type EntitlementModuleOptions, EntitlementResolutionConfig, LimitExceededError, PLAN_VERSION_REPOSITORY_TOKEN, type ReplacedByIndex, SUBSCRIPTION_REPOSITORY_TOKEN, TRANSACTION_RUNNER_TOKEN, buildReplacedByIndex, expandReplacedFeatures, isLimitExceededError };
|
|
77
|
+
export { ENTITLEMENT_RESOLUTION_CONFIG_TOKEN, ENTITLEMENT_SERVICE_TOKEN, EntitlementModule, type EntitlementModuleOptions, EntitlementResolutionConfig, LimitExceededError, PLAN_VERSION_REPOSITORY_TOKEN, type ReplacedByIndex, SUBSCRIPTION_REPOSITORY_TOKEN, TRANSACTION_RUNNER_TOKEN, buildReplacedByIndex, expandReplacedFeatures, isLimitExceededError };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { C as CustomLimitsShape, E as EffectiveLimits, a as EffectiveLimitsSnapshot, b as EnforceLimitInput, c as EntitlementService, P as PlanVersionSnapshot, S as SubscriptionBundleSnapshot, d as SubscriptionLimitsInput, e as aggregateContractLineItemEntitlements, f as aggregateLimits, g as aggregateSubscriptionBundleQuotas, h as applyCustomLimits, i as collectSubscriptionBundleFeatures, j as filterActiveSubscriptionBundles, k as filterPlannedOnlyFeatures, l as hasAnyFeature, m as hasFeature, t as toEffectiveLimitsSnapshot } from '../aggregation-BibpEO0t.js';
|
|
2
2
|
import { DiscoveredFeature, SubscriptionRepository, PlanVersionRepository, TransactionRunner, SubscriptionContractRepository, SubscriptionBundleRepository, BundleRepository } from '@saasicat/types';
|
|
3
3
|
import { E as EntitlementResolutionConfig } from '../plan-resolution-CFCoUkrE.js';
|
|
4
4
|
export { a as EntitlementResolutionInput, r as resolveEntitlementPlan } from '../plan-resolution-CFCoUkrE.js';
|
|
@@ -54,7 +54,7 @@ interface EntitlementModuleOptions {
|
|
|
54
54
|
/**
|
|
55
55
|
* Optional (P11.7.3/#61) — BOTH together enable the aggregation of
|
|
56
56
|
* independently booked catalog bundles (`subscription_bundles`) in
|
|
57
|
-
* `computeLimits`. Without them, only plan
|
|
57
|
+
* `computeLimits`. Without them, only the plan counts — bundles
|
|
58
58
|
* booked mid-cycle would then NOT be in the entitlements (and a contract
|
|
59
59
|
* re-freeze would not freeze them in).
|
|
60
60
|
*/
|
|
@@ -68,9 +68,10 @@ declare class EntitlementModule {
|
|
|
68
68
|
static forRoot(options: EntitlementModuleOptions): DynamicModule;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
declare const ENTITLEMENT_SERVICE_TOKEN: unique symbol;
|
|
71
72
|
declare const SUBSCRIPTION_REPOSITORY_TOKEN: unique symbol;
|
|
72
73
|
declare const PLAN_VERSION_REPOSITORY_TOKEN: unique symbol;
|
|
73
74
|
declare const TRANSACTION_RUNNER_TOKEN: unique symbol;
|
|
74
75
|
declare const ENTITLEMENT_RESOLUTION_CONFIG_TOKEN: unique symbol;
|
|
75
76
|
|
|
76
|
-
export { ENTITLEMENT_RESOLUTION_CONFIG_TOKEN, EntitlementModule, type EntitlementModuleOptions, EntitlementResolutionConfig, LimitExceededError, PLAN_VERSION_REPOSITORY_TOKEN, type ReplacedByIndex, SUBSCRIPTION_REPOSITORY_TOKEN, TRANSACTION_RUNNER_TOKEN, buildReplacedByIndex, expandReplacedFeatures, isLimitExceededError };
|
|
77
|
+
export { ENTITLEMENT_RESOLUTION_CONFIG_TOKEN, ENTITLEMENT_SERVICE_TOKEN, EntitlementModule, type EntitlementModuleOptions, EntitlementResolutionConfig, LimitExceededError, PLAN_VERSION_REPOSITORY_TOKEN, type ReplacedByIndex, SUBSCRIPTION_REPOSITORY_TOKEN, TRANSACTION_RUNNER_TOKEN, buildReplacedByIndex, expandReplacedFeatures, isLimitExceededError };
|
|
@@ -3,13 +3,11 @@ import {
|
|
|
3
3
|
EntitlementModule,
|
|
4
4
|
EntitlementService,
|
|
5
5
|
LimitExceededError,
|
|
6
|
-
aggregateBusinessTypeQuotas,
|
|
7
6
|
aggregateContractLineItemEntitlements,
|
|
8
7
|
aggregateLimits,
|
|
9
8
|
aggregateSubscriptionBundleQuotas,
|
|
10
9
|
applyCustomLimits,
|
|
11
10
|
buildReplacedByIndex,
|
|
12
|
-
collectBusinessTypeFeatures,
|
|
13
11
|
collectSubscriptionBundleFeatures,
|
|
14
12
|
expandReplacedFeatures,
|
|
15
13
|
filterActiveSubscriptionBundles,
|
|
@@ -19,34 +17,34 @@ import {
|
|
|
19
17
|
isLimitExceededError,
|
|
20
18
|
resolveEntitlementPlan,
|
|
21
19
|
toEffectiveLimitsSnapshot
|
|
22
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-ND7OOKOG.js";
|
|
23
21
|
import "../chunk-NYLON2VC.js";
|
|
22
|
+
import "../chunk-R2QOSVAA.js";
|
|
24
23
|
import {
|
|
25
24
|
ENTITLEMENT_RESOLUTION_CONFIG_TOKEN,
|
|
25
|
+
ENTITLEMENT_SERVICE_TOKEN,
|
|
26
26
|
PLAN_VERSION_REPOSITORY_TOKEN,
|
|
27
27
|
SUBSCRIPTION_REPOSITORY_TOKEN,
|
|
28
28
|
TRANSACTION_RUNNER_TOKEN
|
|
29
|
-
} from "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-L4SUWH5B.js";
|
|
32
|
-
import "../chunk-MV6LW5UB.js";
|
|
29
|
+
} from "../chunk-WKVBNTYC.js";
|
|
30
|
+
import "../chunk-N3WANKSA.js";
|
|
33
31
|
import "../chunk-SABTXESR.js";
|
|
32
|
+
import "../chunk-L4SUWH5B.js";
|
|
34
33
|
import "../chunk-SHUYVCID.js";
|
|
35
34
|
export {
|
|
36
35
|
ENTITLEMENT_RESOLUTION_CONFIG_TOKEN,
|
|
36
|
+
ENTITLEMENT_SERVICE_TOKEN,
|
|
37
37
|
EntitlementModule,
|
|
38
38
|
EntitlementService,
|
|
39
39
|
LimitExceededError,
|
|
40
40
|
PLAN_VERSION_REPOSITORY_TOKEN,
|
|
41
41
|
SUBSCRIPTION_REPOSITORY_TOKEN,
|
|
42
42
|
TRANSACTION_RUNNER_TOKEN,
|
|
43
|
-
aggregateBusinessTypeQuotas,
|
|
44
43
|
aggregateContractLineItemEntitlements,
|
|
45
44
|
aggregateLimits,
|
|
46
45
|
aggregateSubscriptionBundleQuotas,
|
|
47
46
|
applyCustomLimits,
|
|
48
47
|
buildReplacedByIndex,
|
|
49
|
-
collectBusinessTypeFeatures,
|
|
50
48
|
collectSubscriptionBundleFeatures,
|
|
51
49
|
expandReplacedFeatures,
|
|
52
50
|
filterActiveSubscriptionBundles,
|