@saasicat/nest 0.8.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 -1274
- package/dist/admin/index.d.cts +10 -171
- package/dist/admin/index.d.ts +10 -171
- package/dist/admin/index.js +13 -4
- package/dist/admin-resources.module-BZN_yBFj.d.cts +40 -0
- package/dist/admin-resources.module-Cms8MY6h.d.ts +40 -0
- 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 -5128
- package/dist/billing/index.d.cts +8 -719
- package/dist/billing/index.d.ts +8 -719
- package/dist/billing/index.js +7 -10
- package/dist/catalog/index.cjs +4 -5624
- package/dist/catalog/index.d.cts +7 -427
- package/dist/catalog/index.d.ts +7 -427
- package/dist/catalog/index.js +14 -12
- package/dist/catalog.module-BKObceo0.d.ts +103 -0
- package/dist/catalog.module-Dw2Hrbyu.d.cts +103 -0
- 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-5DDCSGZC.js → chunk-33TP26MR.js} +144 -356
- package/dist/{chunk-CK54YKVK.js → chunk-75JABGZK.js} +16 -16
- package/dist/{chunk-HRU3CP57.js → chunk-BOADBIGB.js} +1 -1
- package/dist/{chunk-ZLUGQE5D.js → chunk-E7AJ42AB.js} +8 -8
- package/dist/{chunk-6LP7CDS2.js → chunk-F3VV6EXG.js} +18 -13
- package/dist/{chunk-PLDHI6NA.js → chunk-FVT7KTUI.js} +258 -3
- package/dist/{chunk-RZU4HIAN.js → chunk-GBDUH6DO.js} +26 -23
- package/dist/{chunk-K3OPNVFR.js → chunk-HBFU5AN3.js} +5 -9
- package/dist/chunk-HWGIMNWR.js +0 -0
- package/dist/chunk-IRWZC3GC.js +755 -0
- package/dist/chunk-L4KTQ6CL.js +20 -0
- package/dist/{chunk-T5SXXAKG.js → chunk-LZHLGUQI.js} +1 -1
- package/dist/{chunk-YHHE4KDA.js → chunk-PUXLPUVH.js} +351 -21
- package/dist/chunk-TXDH4FUA.js +211 -0
- 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-cv7r80VM.d.cts → enforce-quota.interceptor-BhkX5nq2.d.cts} +127 -12
- package/dist/{enforce-quota.interceptor-Dj1Kusr5.d.ts → enforce-quota.interceptor-CcqZc0Yu.d.ts} +127 -12
- package/dist/entitlement/index.cjs +4 -780
- package/dist/entitlement/index.d.cts +3 -1
- package/dist/entitlement/index.d.ts +3 -1
- package/dist/entitlement/index.js +2 -3
- package/dist/index.cjs +4 -14975
- package/dist/index.d.cts +22 -54
- package/dist/index.d.ts +22 -54
- package/dist/index.js +88 -369
- package/dist/module-CSN8j8Tp.d.cts +39 -0
- package/dist/module-DgYJur6f.d.ts +39 -0
- 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 -2779
- package/dist/platform/index.d.cts +50 -8
- package/dist/platform/index.d.ts +50 -8
- package/dist/platform/index.js +116 -12
- package/dist/promo/index.cjs +4 -995
- package/dist/promo/index.d.cts +48 -46
- package/dist/promo/index.d.ts +48 -46
- package/dist/promo/index.js +10 -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/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-bundles.module-BQmoozm5.d.ts +291 -0
- package/dist/subscription-bundles.module-DCpV-Pb5.d.cts +291 -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 -3756
- package/dist/testing/index.d.cts +9 -4
- package/dist/testing/index.d.ts +9 -4
- package/dist/testing/index.js +13 -7
- package/package.json +5 -5
- package/dist/admin-manifest.config-DyrQNT7M.d.cts +0 -10
- package/dist/admin-manifest.config-DyrQNT7M.d.ts +0 -10
- package/dist/admin-manifest.service-Cp6uwvmt.d.cts +0 -33
- package/dist/admin-manifest.service-UGgzR1x-.d.ts +0 -33
- package/dist/chunk-52UTQRD3.js +0 -326
- package/dist/chunk-N3WANKSA.js +0 -20
- package/dist/chunk-Q53N43LQ.js +0 -13
- /package/dist/{chunk-2FR6ZL7R.js → chunk-DBZGV3HC.js} +0 -0
package/dist/promo/index.d.cts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { PromoCodeValueType, PromoCodeDurationType, BillingCycle, PromoCodeRepository, PromoCodeRedemptionRepository
|
|
2
|
-
import { f as PromoCodesService, c as PreviewResult
|
|
3
|
-
export { P as PreviewInput, a as PreviewInvalid, b as PreviewReason, d as PreviewValid, e as PromoCodeStats, R as RedeemInput } from '../service-DX8KbGXl.cjs';
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { PromoCodeValueType, PromoCodeDurationType, BillingCycle, PromoCodeRepository, PromoCodeRedemptionRepository } from '@saasicat/types';
|
|
2
|
+
import { f as PromoCodesService, c as PreviewResult } from '../service-DX8KbGXl.cjs';
|
|
3
|
+
export { P as PreviewInput, a as PreviewInvalid, b as PreviewReason, d as PreviewValid, e as PromoCodeStats, g as PromoServiceConfig, R as RedeemInput } from '../service-DX8KbGXl.cjs';
|
|
4
|
+
export { P as PromoCodeRateLimitGuard, h as hashIp, i as ipFingerprint } from '../rate-limit.guard-dntqAlfZ.cjs';
|
|
5
|
+
export { P as PromoCodesModule, a as PromoCodesModuleOptions } from '../module-CSN8j8Tp.cjs';
|
|
6
|
+
import { Type, CanActivate } from '@nestjs/common';
|
|
7
|
+
import '../di-CcNeq9v-.cjs';
|
|
6
8
|
|
|
7
9
|
/** Structural view of a PromoCode for the calculator functions.
|
|
8
10
|
*
|
|
@@ -45,22 +47,6 @@ declare class PromoCodeExpirer {
|
|
|
45
47
|
expirePromoCodes(): Promise<void>;
|
|
46
48
|
}
|
|
47
49
|
|
|
48
|
-
interface RequestLike$1 {
|
|
49
|
-
headers: Record<string, string | string[] | undefined>;
|
|
50
|
-
ip?: string;
|
|
51
|
-
user?: {
|
|
52
|
-
id?: string;
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
declare class PromoCodeRateLimitGuard implements CanActivate {
|
|
56
|
-
private ipBuckets;
|
|
57
|
-
private sessionBuckets;
|
|
58
|
-
canActivate(context: ExecutionContext): boolean;
|
|
59
|
-
private exceeded;
|
|
60
|
-
}
|
|
61
|
-
declare function ipFingerprint(req: RequestLike$1): string;
|
|
62
|
-
declare function hashIp(req: RequestLike$1): string;
|
|
63
|
-
|
|
64
50
|
declare const PROMO_CODE_REPOSITORY_TOKEN: unique symbol;
|
|
65
51
|
declare const PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN: unique symbol;
|
|
66
52
|
declare const PROMO_CODE_VALIDATION_LOG_REPOSITORY_TOKEN: unique symbol;
|
|
@@ -91,31 +77,47 @@ declare class PromoCodePublicController {
|
|
|
91
77
|
preview(dto: PreviewPromoCodeDto, req: RequestLike): Promise<PreviewResult>;
|
|
92
78
|
}
|
|
93
79
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
80
|
+
declare function buildPromoCodeAdminController(guards: Array<Type<CanActivate>>): Type;
|
|
81
|
+
|
|
82
|
+
declare const VALUE_TYPES: readonly ["PERCENT", "ABSOLUTE"];
|
|
83
|
+
declare const DURATION_TYPES: readonly ["ONCE", "MONTHS", "BILLING_CYCLES"];
|
|
84
|
+
declare const STATUSES: readonly ["ACTIVE", "PAUSED"];
|
|
85
|
+
declare const BILLING_CYCLES: readonly ["MONTHLY", "YEARLY"];
|
|
86
|
+
declare class CreatePromoCodeDto {
|
|
87
|
+
code: string;
|
|
88
|
+
valueType: (typeof VALUE_TYPES)[number];
|
|
89
|
+
value: number;
|
|
90
|
+
durationType: (typeof DURATION_TYPES)[number];
|
|
91
|
+
durationValue?: number | null;
|
|
92
|
+
maxRedemptions?: number | null;
|
|
93
|
+
validFrom?: string | null;
|
|
94
|
+
validUntil?: string | null;
|
|
95
|
+
appliesToPlans?: string[];
|
|
96
|
+
appliesToBilling?: (typeof BILLING_CYCLES)[number] | null;
|
|
97
|
+
firstTimeCustomersOnly?: boolean;
|
|
98
|
+
minimumPlanAmountGross?: number | null;
|
|
99
|
+
allowZeroInvoice?: boolean;
|
|
100
|
+
revenueDeductionAccount?: string | null;
|
|
101
|
+
campaignTag?: string | null;
|
|
102
|
+
description?: string | null;
|
|
116
103
|
}
|
|
117
|
-
declare class
|
|
118
|
-
|
|
104
|
+
declare class UpdatePromoCodeDto {
|
|
105
|
+
status?: (typeof STATUSES)[number];
|
|
106
|
+
valueType?: (typeof VALUE_TYPES)[number];
|
|
107
|
+
value?: number;
|
|
108
|
+
durationType?: (typeof DURATION_TYPES)[number];
|
|
109
|
+
durationValue?: number | null;
|
|
110
|
+
maxRedemptions?: number | null;
|
|
111
|
+
validFrom?: string | null;
|
|
112
|
+
validUntil?: string | null;
|
|
113
|
+
appliesToPlans?: string[];
|
|
114
|
+
appliesToBilling?: (typeof BILLING_CYCLES)[number] | null;
|
|
115
|
+
firstTimeCustomersOnly?: boolean;
|
|
116
|
+
minimumPlanAmountGross?: number | null;
|
|
117
|
+
allowZeroInvoice?: boolean;
|
|
118
|
+
description?: string | null;
|
|
119
|
+
campaignTag?: string | null;
|
|
120
|
+
revenueDeductionAccount?: string | null;
|
|
119
121
|
}
|
|
120
122
|
|
|
121
|
-
export { PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN, PROMO_CODE_REPOSITORY_TOKEN, PROMO_CODE_VALIDATION_LOG_REPOSITORY_TOKEN, PROMO_FIRST_TIME_CUSTOMER_CHECK_TOKEN, PROMO_REVENUE_DEDUCTION_AGGREGATOR_TOKEN, PROMO_SERVICE_CONFIG_TOKEN, PROMO_SUBSCRIPTION_LOOKUP_TOKEN, PROMO_TRANSACTION_RUNNER_TOKEN, PreviewPromoCodeDto, PreviewResult, PromoCodeExpirer, type PromoCodeForCalc, PromoCodePublicController,
|
|
123
|
+
export { CreatePromoCodeDto, PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN, PROMO_CODE_REPOSITORY_TOKEN, PROMO_CODE_VALIDATION_LOG_REPOSITORY_TOKEN, PROMO_FIRST_TIME_CUSTOMER_CHECK_TOKEN, PROMO_REVENUE_DEDUCTION_AGGREGATOR_TOKEN, PROMO_SERVICE_CONFIG_TOKEN, PROMO_SUBSCRIPTION_LOOKUP_TOKEN, PROMO_TRANSACTION_RUNNER_TOKEN, PreviewPromoCodeDto, PreviewResult, PromoCodeExpirer, type PromoCodeForCalc, PromoCodePublicController, PromoCodesService, UpdatePromoCodeDto, addCycles, buildLabel, buildPromoCodeAdminController, computeDiscountGross, computeDiscountedGross, computeIncludedVat, computeRegularStartsAt, grossFromNet, round2 };
|
package/dist/promo/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { PromoCodeValueType, PromoCodeDurationType, BillingCycle, PromoCodeRepository, PromoCodeRedemptionRepository
|
|
2
|
-
import { f as PromoCodesService, c as PreviewResult
|
|
3
|
-
export { P as PreviewInput, a as PreviewInvalid, b as PreviewReason, d as PreviewValid, e as PromoCodeStats, R as RedeemInput } from '../service-DX8KbGXl.js';
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { PromoCodeValueType, PromoCodeDurationType, BillingCycle, PromoCodeRepository, PromoCodeRedemptionRepository } from '@saasicat/types';
|
|
2
|
+
import { f as PromoCodesService, c as PreviewResult } from '../service-DX8KbGXl.js';
|
|
3
|
+
export { P as PreviewInput, a as PreviewInvalid, b as PreviewReason, d as PreviewValid, e as PromoCodeStats, g as PromoServiceConfig, R as RedeemInput } from '../service-DX8KbGXl.js';
|
|
4
|
+
export { P as PromoCodeRateLimitGuard, h as hashIp, i as ipFingerprint } from '../rate-limit.guard-dntqAlfZ.js';
|
|
5
|
+
export { P as PromoCodesModule, a as PromoCodesModuleOptions } from '../module-DgYJur6f.js';
|
|
6
|
+
import { Type, CanActivate } from '@nestjs/common';
|
|
7
|
+
import '../di-CcNeq9v-.js';
|
|
6
8
|
|
|
7
9
|
/** Structural view of a PromoCode for the calculator functions.
|
|
8
10
|
*
|
|
@@ -45,22 +47,6 @@ declare class PromoCodeExpirer {
|
|
|
45
47
|
expirePromoCodes(): Promise<void>;
|
|
46
48
|
}
|
|
47
49
|
|
|
48
|
-
interface RequestLike$1 {
|
|
49
|
-
headers: Record<string, string | string[] | undefined>;
|
|
50
|
-
ip?: string;
|
|
51
|
-
user?: {
|
|
52
|
-
id?: string;
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
declare class PromoCodeRateLimitGuard implements CanActivate {
|
|
56
|
-
private ipBuckets;
|
|
57
|
-
private sessionBuckets;
|
|
58
|
-
canActivate(context: ExecutionContext): boolean;
|
|
59
|
-
private exceeded;
|
|
60
|
-
}
|
|
61
|
-
declare function ipFingerprint(req: RequestLike$1): string;
|
|
62
|
-
declare function hashIp(req: RequestLike$1): string;
|
|
63
|
-
|
|
64
50
|
declare const PROMO_CODE_REPOSITORY_TOKEN: unique symbol;
|
|
65
51
|
declare const PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN: unique symbol;
|
|
66
52
|
declare const PROMO_CODE_VALIDATION_LOG_REPOSITORY_TOKEN: unique symbol;
|
|
@@ -91,31 +77,47 @@ declare class PromoCodePublicController {
|
|
|
91
77
|
preview(dto: PreviewPromoCodeDto, req: RequestLike): Promise<PreviewResult>;
|
|
92
78
|
}
|
|
93
79
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
80
|
+
declare function buildPromoCodeAdminController(guards: Array<Type<CanActivate>>): Type;
|
|
81
|
+
|
|
82
|
+
declare const VALUE_TYPES: readonly ["PERCENT", "ABSOLUTE"];
|
|
83
|
+
declare const DURATION_TYPES: readonly ["ONCE", "MONTHS", "BILLING_CYCLES"];
|
|
84
|
+
declare const STATUSES: readonly ["ACTIVE", "PAUSED"];
|
|
85
|
+
declare const BILLING_CYCLES: readonly ["MONTHLY", "YEARLY"];
|
|
86
|
+
declare class CreatePromoCodeDto {
|
|
87
|
+
code: string;
|
|
88
|
+
valueType: (typeof VALUE_TYPES)[number];
|
|
89
|
+
value: number;
|
|
90
|
+
durationType: (typeof DURATION_TYPES)[number];
|
|
91
|
+
durationValue?: number | null;
|
|
92
|
+
maxRedemptions?: number | null;
|
|
93
|
+
validFrom?: string | null;
|
|
94
|
+
validUntil?: string | null;
|
|
95
|
+
appliesToPlans?: string[];
|
|
96
|
+
appliesToBilling?: (typeof BILLING_CYCLES)[number] | null;
|
|
97
|
+
firstTimeCustomersOnly?: boolean;
|
|
98
|
+
minimumPlanAmountGross?: number | null;
|
|
99
|
+
allowZeroInvoice?: boolean;
|
|
100
|
+
revenueDeductionAccount?: string | null;
|
|
101
|
+
campaignTag?: string | null;
|
|
102
|
+
description?: string | null;
|
|
116
103
|
}
|
|
117
|
-
declare class
|
|
118
|
-
|
|
104
|
+
declare class UpdatePromoCodeDto {
|
|
105
|
+
status?: (typeof STATUSES)[number];
|
|
106
|
+
valueType?: (typeof VALUE_TYPES)[number];
|
|
107
|
+
value?: number;
|
|
108
|
+
durationType?: (typeof DURATION_TYPES)[number];
|
|
109
|
+
durationValue?: number | null;
|
|
110
|
+
maxRedemptions?: number | null;
|
|
111
|
+
validFrom?: string | null;
|
|
112
|
+
validUntil?: string | null;
|
|
113
|
+
appliesToPlans?: string[];
|
|
114
|
+
appliesToBilling?: (typeof BILLING_CYCLES)[number] | null;
|
|
115
|
+
firstTimeCustomersOnly?: boolean;
|
|
116
|
+
minimumPlanAmountGross?: number | null;
|
|
117
|
+
allowZeroInvoice?: boolean;
|
|
118
|
+
description?: string | null;
|
|
119
|
+
campaignTag?: string | null;
|
|
120
|
+
revenueDeductionAccount?: string | null;
|
|
119
121
|
}
|
|
120
122
|
|
|
121
|
-
export { PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN, PROMO_CODE_REPOSITORY_TOKEN, PROMO_CODE_VALIDATION_LOG_REPOSITORY_TOKEN, PROMO_FIRST_TIME_CUSTOMER_CHECK_TOKEN, PROMO_REVENUE_DEDUCTION_AGGREGATOR_TOKEN, PROMO_SERVICE_CONFIG_TOKEN, PROMO_SUBSCRIPTION_LOOKUP_TOKEN, PROMO_TRANSACTION_RUNNER_TOKEN, PreviewPromoCodeDto, PreviewResult, PromoCodeExpirer, type PromoCodeForCalc, PromoCodePublicController,
|
|
123
|
+
export { CreatePromoCodeDto, PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN, PROMO_CODE_REPOSITORY_TOKEN, PROMO_CODE_VALIDATION_LOG_REPOSITORY_TOKEN, PROMO_FIRST_TIME_CUSTOMER_CHECK_TOKEN, PROMO_REVENUE_DEDUCTION_AGGREGATOR_TOKEN, PROMO_SERVICE_CONFIG_TOKEN, PROMO_SUBSCRIPTION_LOOKUP_TOKEN, PROMO_TRANSACTION_RUNNER_TOKEN, PreviewPromoCodeDto, PreviewResult, PromoCodeExpirer, type PromoCodeForCalc, PromoCodePublicController, PromoCodesService, UpdatePromoCodeDto, addCycles, buildLabel, buildPromoCodeAdminController, computeDiscountGross, computeDiscountedGross, computeIncludedVat, computeRegularStartsAt, grossFromNet, round2 };
|
package/dist/promo/index.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import "../chunk-HWGIMNWR.js";
|
|
1
2
|
import {
|
|
3
|
+
CreatePromoCodeDto,
|
|
2
4
|
PreviewPromoCodeDto,
|
|
3
5
|
PromoCodeExpirer,
|
|
4
6
|
PromoCodePublicController,
|
|
5
7
|
PromoCodeRateLimitGuard,
|
|
6
8
|
PromoCodesModule,
|
|
9
|
+
UpdatePromoCodeDto,
|
|
10
|
+
buildPromoCodeAdminController,
|
|
7
11
|
hashIp,
|
|
8
12
|
ipFingerprint
|
|
9
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-IRWZC3GC.js";
|
|
10
14
|
import {
|
|
11
15
|
PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN,
|
|
12
16
|
PROMO_CODE_REPOSITORY_TOKEN,
|
|
@@ -22,7 +26,8 @@ import {
|
|
|
22
26
|
computeDiscountGross,
|
|
23
27
|
computeDiscountedGross,
|
|
24
28
|
computeRegularStartsAt
|
|
25
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-E7AJ42AB.js";
|
|
30
|
+
import "../chunk-E56W4U2P.js";
|
|
26
31
|
import {
|
|
27
32
|
computeIncludedVat,
|
|
28
33
|
grossFromNet,
|
|
@@ -31,6 +36,7 @@ import {
|
|
|
31
36
|
import "../chunk-SABTXESR.js";
|
|
32
37
|
import "../chunk-SHUYVCID.js";
|
|
33
38
|
export {
|
|
39
|
+
CreatePromoCodeDto,
|
|
34
40
|
PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN,
|
|
35
41
|
PROMO_CODE_REPOSITORY_TOKEN,
|
|
36
42
|
PROMO_CODE_VALIDATION_LOG_REPOSITORY_TOKEN,
|
|
@@ -45,8 +51,10 @@ export {
|
|
|
45
51
|
PromoCodeRateLimitGuard,
|
|
46
52
|
PromoCodesModule,
|
|
47
53
|
PromoCodesService,
|
|
54
|
+
UpdatePromoCodeDto,
|
|
48
55
|
addCycles,
|
|
49
56
|
buildLabel,
|
|
57
|
+
buildPromoCodeAdminController,
|
|
50
58
|
computeDiscountGross,
|
|
51
59
|
computeDiscountedGross,
|
|
52
60
|
computeIncludedVat,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CanActivate, ExecutionContext } from '@nestjs/common';
|
|
2
|
+
|
|
3
|
+
interface RequestLike {
|
|
4
|
+
headers: Record<string, string | string[] | undefined>;
|
|
5
|
+
ip?: string;
|
|
6
|
+
user?: {
|
|
7
|
+
id?: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
declare class PromoCodeRateLimitGuard implements CanActivate {
|
|
11
|
+
private ipBuckets;
|
|
12
|
+
private sessionBuckets;
|
|
13
|
+
canActivate(context: ExecutionContext): boolean;
|
|
14
|
+
private exceeded;
|
|
15
|
+
}
|
|
16
|
+
declare function ipFingerprint(req: RequestLike): string;
|
|
17
|
+
declare function hashIp(req: RequestLike): string;
|
|
18
|
+
|
|
19
|
+
export { PromoCodeRateLimitGuard as P, hashIp as h, ipFingerprint as i };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CanActivate, ExecutionContext } from '@nestjs/common';
|
|
2
|
+
|
|
3
|
+
interface RequestLike {
|
|
4
|
+
headers: Record<string, string | string[] | undefined>;
|
|
5
|
+
ip?: string;
|
|
6
|
+
user?: {
|
|
7
|
+
id?: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
declare class PromoCodeRateLimitGuard implements CanActivate {
|
|
11
|
+
private ipBuckets;
|
|
12
|
+
private sessionBuckets;
|
|
13
|
+
canActivate(context: ExecutionContext): boolean;
|
|
14
|
+
private exceeded;
|
|
15
|
+
}
|
|
16
|
+
declare function ipFingerprint(req: RequestLike): string;
|
|
17
|
+
declare function hashIp(req: RequestLike): string;
|
|
18
|
+
|
|
19
|
+
export { PromoCodeRateLimitGuard as P, hashIp as h, ipFingerprint as i };
|