@saasicat/nest 0.2.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 +202 -0
- package/README.md +53 -0
- package/dist/admin/index.cjs +1283 -0
- package/dist/admin/index.d.cts +225 -0
- package/dist/admin/index.d.ts +225 -0
- package/dist/admin/index.js +58 -0
- package/dist/admin-audit.service-9IqXMlZm.d.cts +30 -0
- package/dist/admin-audit.service-9IqXMlZm.d.ts +30 -0
- package/dist/admin-manifest.config-DyrQNT7M.d.cts +10 -0
- package/dist/admin-manifest.config-DyrQNT7M.d.ts +10 -0
- package/dist/aggregation-CJ3qQf92.d.cts +288 -0
- package/dist/aggregation-Dvz9e8X2.d.ts +288 -0
- package/dist/billing/index.cjs +5205 -0
- package/dist/billing/index.d.cts +1326 -0
- package/dist/billing/index.d.ts +1326 -0
- package/dist/billing/index.js +197 -0
- package/dist/catalog/index.cjs +6449 -0
- package/dist/catalog/index.d.cts +1073 -0
- package/dist/catalog/index.d.ts +1073 -0
- package/dist/catalog/index.js +158 -0
- package/dist/checkout-offer/index.cjs +807 -0
- package/dist/checkout-offer/index.d.cts +120 -0
- package/dist/checkout-offer/index.d.ts +120 -0
- package/dist/checkout-offer/index.js +20 -0
- package/dist/chunk-2FR6ZL7R.js +0 -0
- package/dist/chunk-2PNX2QL2.js +347 -0
- package/dist/chunk-2VNZYRDV.js +326 -0
- package/dist/chunk-7MLGHWKO.js +12 -0
- package/dist/chunk-ABB2CRAS.js +31 -0
- package/dist/chunk-AJ3EPELS.js +157 -0
- package/dist/chunk-E56W4U2P.js +90 -0
- package/dist/chunk-HRU3CP57.js +71 -0
- package/dist/chunk-L4SUWH5B.js +14 -0
- package/dist/chunk-M6CZQYPY.js +314 -0
- package/dist/chunk-MDIZUVIK.js +87 -0
- package/dist/chunk-MV6LW5UB.js +217 -0
- package/dist/chunk-NYLON2VC.js +6 -0
- package/dist/chunk-P6MYZMXQ.js +951 -0
- package/dist/chunk-Q53N43LQ.js +13 -0
- package/dist/chunk-QJVPRD3R.js +573 -0
- package/dist/chunk-RIGLQ4BV.js +3367 -0
- package/dist/chunk-SABTXESR.js +24 -0
- package/dist/chunk-SHUYVCID.js +6 -0
- package/dist/chunk-SYEVGPFC.js +686 -0
- package/dist/chunk-V7HUZ6UQ.js +5923 -0
- package/dist/chunk-WPUVJRIN.js +29 -0
- package/dist/chunk-XCZ3TTFK.js +22 -0
- package/dist/chunk-XSGU2Y2O.js +1611 -0
- package/dist/chunk-YNEW3L63.js +190 -0
- package/dist/chunk-YXGHPILG.js +614 -0
- package/dist/chunk-ZL4LLE2Z.js +465 -0
- package/dist/di-CcNeq9v-.d.cts +16 -0
- package/dist/di-CcNeq9v-.d.ts +16 -0
- package/dist/discovery/index.cjs +588 -0
- package/dist/discovery/index.d.cts +299 -0
- package/dist/discovery/index.d.ts +299 -0
- package/dist/discovery/index.js +49 -0
- package/dist/discovery.scanner-CUYLKlYT.d.cts +59 -0
- package/dist/discovery.scanner-CUYLKlYT.d.ts +59 -0
- package/dist/entitlement/index.cjs +805 -0
- package/dist/entitlement/index.d.cts +60 -0
- package/dist/entitlement/index.d.ts +60 -0
- package/dist/entitlement/index.js +57 -0
- package/dist/index.cjs +15918 -0
- package/dist/index.d.cts +85 -0
- package/dist/index.d.ts +85 -0
- package/dist/index.js +956 -0
- package/dist/plan-resolution-CFCoUkrE.d.cts +41 -0
- package/dist/plan-resolution-CFCoUkrE.d.ts +41 -0
- package/dist/platform/index.cjs +2772 -0
- package/dist/platform/index.d.cts +118 -0
- package/dist/platform/index.d.ts +118 -0
- package/dist/platform/index.js +37 -0
- package/dist/promo/index.cjs +995 -0
- package/dist/promo/index.d.cts +121 -0
- package/dist/promo/index.d.ts +121 -0
- package/dist/promo/index.js +58 -0
- package/dist/registration/index.cjs +1687 -0
- package/dist/registration/index.d.cts +444 -0
- package/dist/registration/index.d.ts +444 -0
- package/dist/registration/index.js +82 -0
- package/dist/saas-platform.module-CgZ2omgg.d.cts +180 -0
- package/dist/saas-platform.module-DT9TnCzk.d.ts +180 -0
- package/dist/service-DX8KbGXl.d.cts +109 -0
- package/dist/service-DX8KbGXl.d.ts +109 -0
- package/dist/subscription-contract/index.cjs +471 -0
- package/dist/subscription-contract/index.d.cts +17 -0
- package/dist/subscription-contract/index.d.ts +17 -0
- package/dist/subscription-contract/index.js +21 -0
- package/dist/subscription-contract.service--cm47ZJJ.d.cts +39 -0
- package/dist/subscription-contract.service--cm47ZJJ.d.ts +39 -0
- package/dist/testing/index.cjs +3942 -0
- package/dist/testing/index.d.cts +279 -0
- package/dist/testing/index.d.ts +279 -0
- package/dist/testing/index.js +1195 -0
- package/package.json +185 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export { B as BundleVersionSnapshot, a as BusinessTypeVersionSnapshot, C as CustomLimitsShape, E as EffectiveLimits, b as EffectiveLimitsSnapshot, c as EnforceLimitInput, d as EntitlementService, L as LimitExceededError, P as PlanVersionSnapshot, S as SubscriptionBundleSnapshot, e as SubscriptionLimitsInput, f as aggregateBusinessTypeQuotas, g as aggregateContractLineItemEntitlements, h as aggregateLimits, i as aggregateSubscriptionBundleQuotas, j as applyCustomLimits, k as collectBusinessTypeFeatures, l as collectSubscriptionBundleFeatures, m as filterActiveSubscriptionBundles, n as filterPlannedOnlyFeatures, o as hasAnyFeature, p as hasFeature, t as toEffectiveLimitsSnapshot } from '../aggregation-CJ3qQf92.cjs';
|
|
2
|
+
import { DiscoveredFeature, SubscriptionRepository, PlanVersionRepository, TransactionRunner, SubscriptionContractRepository, SubscriptionBundleRepository, BundleRepository } from '@saasicat/types';
|
|
3
|
+
import { E as EntitlementResolutionConfig } from '../plan-resolution-CFCoUkrE.cjs';
|
|
4
|
+
export { a as EntitlementResolutionInput, r as resolveEntitlementPlan } from '../plan-resolution-CFCoUkrE.cjs';
|
|
5
|
+
import { DynamicModule } from '@nestjs/common';
|
|
6
|
+
import { P as ProviderSpec } from '../di-CcNeq9v-.cjs';
|
|
7
|
+
|
|
8
|
+
/** Old feature key → direct successor keys (from their `replaces`). */
|
|
9
|
+
type ReplacedByIndex = ReadonlyMap<string, readonly string[]>;
|
|
10
|
+
type FeatureReplacesSource = Pick<DiscoveredFeature, 'featureKey' | 'replaces'>;
|
|
11
|
+
/**
|
|
12
|
+
* Builds the edge index `oldKey → [successorKeys]` from the snapshot's
|
|
13
|
+
* `replaces` declarations. Multiple successors per old key are allowed
|
|
14
|
+
* (feature split: the old key then delivers all successors).
|
|
15
|
+
* Self-references are ignored; cycles (A replaces B, B replaces A) are a
|
|
16
|
+
* code error and throw.
|
|
17
|
+
*/
|
|
18
|
+
declare function buildReplacedByIndex(features: readonly FeatureReplacesSource[]): ReplacedByIndex;
|
|
19
|
+
/**
|
|
20
|
+
* Expands granted feature keys along the replaces chains: every granted
|
|
21
|
+
* old key transitively also grants its successors. The old keys remain
|
|
22
|
+
* included (defense in depth — guards that still check the old key keep
|
|
23
|
+
* working).
|
|
24
|
+
*/
|
|
25
|
+
declare function expandReplacedFeatures(granted: ReadonlySet<string>, index: ReplacedByIndex): Set<string>;
|
|
26
|
+
|
|
27
|
+
interface EntitlementModuleOptions {
|
|
28
|
+
/** Consumer implementation of the `SubscriptionRepository` interface. */
|
|
29
|
+
subscriptionRepository: ProviderSpec<SubscriptionRepository>;
|
|
30
|
+
/** Consumer implementation of the `PlanVersionRepository` interface. */
|
|
31
|
+
planVersionRepository: ProviderSpec<PlanVersionRepository>;
|
|
32
|
+
/** Consumer implementation of the `TransactionRunner` interface. */
|
|
33
|
+
transactionRunner: ProviderSpec<TransactionRunner>;
|
|
34
|
+
/** Optional consumer resolution strategy (Pilot/Trial/Pending). */
|
|
35
|
+
resolutionConfig?: EntitlementResolutionConfig;
|
|
36
|
+
/** Optional V3 contract adapter. If set, the service reads contracts first. */
|
|
37
|
+
subscriptionContractRepository?: ProviderSpec<SubscriptionContractRepository>;
|
|
38
|
+
/**
|
|
39
|
+
* Optional (P11.7.3/#61) — BOTH together enable the aggregation of
|
|
40
|
+
* independently booked catalog bundles (`subscription_bundles`) in
|
|
41
|
+
* `computeLimits`. Without them, only plan + BusinessType count — bundles
|
|
42
|
+
* booked mid-cycle would then NOT be in the entitlements (and a contract
|
|
43
|
+
* re-freeze would not freeze them in).
|
|
44
|
+
*/
|
|
45
|
+
subscriptionBundleRepository?: ProviderSpec<SubscriptionBundleRepository>;
|
|
46
|
+
/** See `subscriptionBundleRepository` — resolves BundleVersion features/quotas. */
|
|
47
|
+
bundleRepository?: ProviderSpec<BundleRepository>;
|
|
48
|
+
/** Register the module globally — default `false`. */
|
|
49
|
+
global?: boolean;
|
|
50
|
+
}
|
|
51
|
+
declare class EntitlementModule {
|
|
52
|
+
static forRoot(options: EntitlementModuleOptions): DynamicModule;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare const SUBSCRIPTION_REPOSITORY_TOKEN: unique symbol;
|
|
56
|
+
declare const PLAN_VERSION_REPOSITORY_TOKEN: unique symbol;
|
|
57
|
+
declare const TRANSACTION_RUNNER_TOKEN: unique symbol;
|
|
58
|
+
declare const ENTITLEMENT_RESOLUTION_CONFIG_TOKEN: unique symbol;
|
|
59
|
+
|
|
60
|
+
export { ENTITLEMENT_RESOLUTION_CONFIG_TOKEN, EntitlementModule, type EntitlementModuleOptions, EntitlementResolutionConfig, PLAN_VERSION_REPOSITORY_TOKEN, type ReplacedByIndex, SUBSCRIPTION_REPOSITORY_TOKEN, TRANSACTION_RUNNER_TOKEN, buildReplacedByIndex, expandReplacedFeatures };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export { B as BundleVersionSnapshot, a as BusinessTypeVersionSnapshot, C as CustomLimitsShape, E as EffectiveLimits, b as EffectiveLimitsSnapshot, c as EnforceLimitInput, d as EntitlementService, L as LimitExceededError, P as PlanVersionSnapshot, S as SubscriptionBundleSnapshot, e as SubscriptionLimitsInput, f as aggregateBusinessTypeQuotas, g as aggregateContractLineItemEntitlements, h as aggregateLimits, i as aggregateSubscriptionBundleQuotas, j as applyCustomLimits, k as collectBusinessTypeFeatures, l as collectSubscriptionBundleFeatures, m as filterActiveSubscriptionBundles, n as filterPlannedOnlyFeatures, o as hasAnyFeature, p as hasFeature, t as toEffectiveLimitsSnapshot } from '../aggregation-Dvz9e8X2.js';
|
|
2
|
+
import { DiscoveredFeature, SubscriptionRepository, PlanVersionRepository, TransactionRunner, SubscriptionContractRepository, SubscriptionBundleRepository, BundleRepository } from '@saasicat/types';
|
|
3
|
+
import { E as EntitlementResolutionConfig } from '../plan-resolution-CFCoUkrE.js';
|
|
4
|
+
export { a as EntitlementResolutionInput, r as resolveEntitlementPlan } from '../plan-resolution-CFCoUkrE.js';
|
|
5
|
+
import { DynamicModule } from '@nestjs/common';
|
|
6
|
+
import { P as ProviderSpec } from '../di-CcNeq9v-.js';
|
|
7
|
+
|
|
8
|
+
/** Old feature key → direct successor keys (from their `replaces`). */
|
|
9
|
+
type ReplacedByIndex = ReadonlyMap<string, readonly string[]>;
|
|
10
|
+
type FeatureReplacesSource = Pick<DiscoveredFeature, 'featureKey' | 'replaces'>;
|
|
11
|
+
/**
|
|
12
|
+
* Builds the edge index `oldKey → [successorKeys]` from the snapshot's
|
|
13
|
+
* `replaces` declarations. Multiple successors per old key are allowed
|
|
14
|
+
* (feature split: the old key then delivers all successors).
|
|
15
|
+
* Self-references are ignored; cycles (A replaces B, B replaces A) are a
|
|
16
|
+
* code error and throw.
|
|
17
|
+
*/
|
|
18
|
+
declare function buildReplacedByIndex(features: readonly FeatureReplacesSource[]): ReplacedByIndex;
|
|
19
|
+
/**
|
|
20
|
+
* Expands granted feature keys along the replaces chains: every granted
|
|
21
|
+
* old key transitively also grants its successors. The old keys remain
|
|
22
|
+
* included (defense in depth — guards that still check the old key keep
|
|
23
|
+
* working).
|
|
24
|
+
*/
|
|
25
|
+
declare function expandReplacedFeatures(granted: ReadonlySet<string>, index: ReplacedByIndex): Set<string>;
|
|
26
|
+
|
|
27
|
+
interface EntitlementModuleOptions {
|
|
28
|
+
/** Consumer implementation of the `SubscriptionRepository` interface. */
|
|
29
|
+
subscriptionRepository: ProviderSpec<SubscriptionRepository>;
|
|
30
|
+
/** Consumer implementation of the `PlanVersionRepository` interface. */
|
|
31
|
+
planVersionRepository: ProviderSpec<PlanVersionRepository>;
|
|
32
|
+
/** Consumer implementation of the `TransactionRunner` interface. */
|
|
33
|
+
transactionRunner: ProviderSpec<TransactionRunner>;
|
|
34
|
+
/** Optional consumer resolution strategy (Pilot/Trial/Pending). */
|
|
35
|
+
resolutionConfig?: EntitlementResolutionConfig;
|
|
36
|
+
/** Optional V3 contract adapter. If set, the service reads contracts first. */
|
|
37
|
+
subscriptionContractRepository?: ProviderSpec<SubscriptionContractRepository>;
|
|
38
|
+
/**
|
|
39
|
+
* Optional (P11.7.3/#61) — BOTH together enable the aggregation of
|
|
40
|
+
* independently booked catalog bundles (`subscription_bundles`) in
|
|
41
|
+
* `computeLimits`. Without them, only plan + BusinessType count — bundles
|
|
42
|
+
* booked mid-cycle would then NOT be in the entitlements (and a contract
|
|
43
|
+
* re-freeze would not freeze them in).
|
|
44
|
+
*/
|
|
45
|
+
subscriptionBundleRepository?: ProviderSpec<SubscriptionBundleRepository>;
|
|
46
|
+
/** See `subscriptionBundleRepository` — resolves BundleVersion features/quotas. */
|
|
47
|
+
bundleRepository?: ProviderSpec<BundleRepository>;
|
|
48
|
+
/** Register the module globally — default `false`. */
|
|
49
|
+
global?: boolean;
|
|
50
|
+
}
|
|
51
|
+
declare class EntitlementModule {
|
|
52
|
+
static forRoot(options: EntitlementModuleOptions): DynamicModule;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare const SUBSCRIPTION_REPOSITORY_TOKEN: unique symbol;
|
|
56
|
+
declare const PLAN_VERSION_REPOSITORY_TOKEN: unique symbol;
|
|
57
|
+
declare const TRANSACTION_RUNNER_TOKEN: unique symbol;
|
|
58
|
+
declare const ENTITLEMENT_RESOLUTION_CONFIG_TOKEN: unique symbol;
|
|
59
|
+
|
|
60
|
+
export { ENTITLEMENT_RESOLUTION_CONFIG_TOKEN, EntitlementModule, type EntitlementModuleOptions, EntitlementResolutionConfig, PLAN_VERSION_REPOSITORY_TOKEN, type ReplacedByIndex, SUBSCRIPTION_REPOSITORY_TOKEN, TRANSACTION_RUNNER_TOKEN, buildReplacedByIndex, expandReplacedFeatures };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import "../chunk-2FR6ZL7R.js";
|
|
2
|
+
import {
|
|
3
|
+
EntitlementModule,
|
|
4
|
+
EntitlementService,
|
|
5
|
+
LimitExceededError,
|
|
6
|
+
aggregateBusinessTypeQuotas,
|
|
7
|
+
aggregateContractLineItemEntitlements,
|
|
8
|
+
aggregateLimits,
|
|
9
|
+
aggregateSubscriptionBundleQuotas,
|
|
10
|
+
applyCustomLimits,
|
|
11
|
+
buildReplacedByIndex,
|
|
12
|
+
collectBusinessTypeFeatures,
|
|
13
|
+
collectSubscriptionBundleFeatures,
|
|
14
|
+
expandReplacedFeatures,
|
|
15
|
+
filterActiveSubscriptionBundles,
|
|
16
|
+
filterPlannedOnlyFeatures,
|
|
17
|
+
hasAnyFeature,
|
|
18
|
+
hasFeature,
|
|
19
|
+
resolveEntitlementPlan,
|
|
20
|
+
toEffectiveLimitsSnapshot
|
|
21
|
+
} from "../chunk-YXGHPILG.js";
|
|
22
|
+
import "../chunk-MV6LW5UB.js";
|
|
23
|
+
import "../chunk-NYLON2VC.js";
|
|
24
|
+
import {
|
|
25
|
+
ENTITLEMENT_RESOLUTION_CONFIG_TOKEN,
|
|
26
|
+
PLAN_VERSION_REPOSITORY_TOKEN,
|
|
27
|
+
SUBSCRIPTION_REPOSITORY_TOKEN,
|
|
28
|
+
TRANSACTION_RUNNER_TOKEN
|
|
29
|
+
} from "../chunk-7MLGHWKO.js";
|
|
30
|
+
import "../chunk-XCZ3TTFK.js";
|
|
31
|
+
import "../chunk-SABTXESR.js";
|
|
32
|
+
import "../chunk-L4SUWH5B.js";
|
|
33
|
+
import "../chunk-SHUYVCID.js";
|
|
34
|
+
export {
|
|
35
|
+
ENTITLEMENT_RESOLUTION_CONFIG_TOKEN,
|
|
36
|
+
EntitlementModule,
|
|
37
|
+
EntitlementService,
|
|
38
|
+
LimitExceededError,
|
|
39
|
+
PLAN_VERSION_REPOSITORY_TOKEN,
|
|
40
|
+
SUBSCRIPTION_REPOSITORY_TOKEN,
|
|
41
|
+
TRANSACTION_RUNNER_TOKEN,
|
|
42
|
+
aggregateBusinessTypeQuotas,
|
|
43
|
+
aggregateContractLineItemEntitlements,
|
|
44
|
+
aggregateLimits,
|
|
45
|
+
aggregateSubscriptionBundleQuotas,
|
|
46
|
+
applyCustomLimits,
|
|
47
|
+
buildReplacedByIndex,
|
|
48
|
+
collectBusinessTypeFeatures,
|
|
49
|
+
collectSubscriptionBundleFeatures,
|
|
50
|
+
expandReplacedFeatures,
|
|
51
|
+
filterActiveSubscriptionBundles,
|
|
52
|
+
filterPlannedOnlyFeatures,
|
|
53
|
+
hasAnyFeature,
|
|
54
|
+
hasFeature,
|
|
55
|
+
resolveEntitlementPlan,
|
|
56
|
+
toEffectiveLimitsSnapshot
|
|
57
|
+
};
|