@parv0888/scheme-engine 0.1.1 → 0.1.2
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/calculators/discount-application.d.ts +44 -0
- package/dist/calculators/index.d.ts +65 -0
- package/dist/calculators/index.d.ts.map +1 -0
- package/dist/calculators/index.js +196 -0
- package/dist/calculators/index.js.map +1 -0
- package/dist/calculators/payout-types/article.d.ts +23 -0
- package/dist/calculators/payout-types/article.d.ts.map +1 -0
- package/dist/calculators/payout-types/article.js +73 -0
- package/dist/calculators/payout-types/article.js.map +1 -0
- package/dist/calculators/payout-types/basket.d.ts +49 -0
- package/dist/calculators/payout-types/basket.d.ts.map +1 -0
- package/dist/calculators/payout-types/basket.js +108 -0
- package/dist/calculators/payout-types/basket.js.map +1 -0
- package/dist/calculators/payout-types/coupon.d.ts +23 -0
- package/dist/calculators/payout-types/coupon.d.ts.map +1 -0
- package/dist/calculators/payout-types/coupon.js +74 -0
- package/dist/calculators/payout-types/coupon.js.map +1 -0
- package/dist/calculators/payout-types/discount.d.ts +21 -0
- package/dist/calculators/payout-types/discount.d.ts.map +1 -0
- package/dist/calculators/payout-types/discount.js +110 -0
- package/dist/calculators/payout-types/discount.js.map +1 -0
- package/dist/calculators/payout-types/fixed-discount.d.ts +31 -0
- package/dist/calculators/payout-types/fixed-discount.d.ts.map +1 -0
- package/dist/calculators/payout-types/fixed-discount.js +65 -0
- package/dist/calculators/payout-types/fixed-discount.js.map +1 -0
- package/dist/calculators/payout-types/foc.d.ts +30 -0
- package/dist/calculators/payout-types/foc.d.ts.map +1 -0
- package/dist/calculators/payout-types/foc.js +130 -0
- package/dist/calculators/payout-types/foc.js.map +1 -0
- package/dist/calculators/payout-types/mrp-percentage.d.ts +34 -0
- package/dist/calculators/payout-types/mrp-percentage.d.ts.map +1 -0
- package/dist/calculators/payout-types/mrp-percentage.js +77 -0
- package/dist/calculators/payout-types/mrp-percentage.js.map +1 -0
- package/dist/calculators/payout-types/nlp.d.ts +22 -0
- package/dist/calculators/payout-types/nlp.d.ts.map +1 -0
- package/dist/calculators/payout-types/nlp.js +59 -0
- package/dist/calculators/payout-types/nlp.js.map +1 -0
- package/dist/calculators/payout-types/per-unit.d.ts +32 -0
- package/dist/calculators/payout-types/per-unit.d.ts.map +1 -0
- package/dist/calculators/payout-types/per-unit.js +94 -0
- package/dist/calculators/payout-types/per-unit.js.map +1 -0
- package/dist/calculators/payout-types/product-new.d.ts +27 -0
- package/dist/calculators/payout-types/product-new.d.ts.map +1 -0
- package/dist/calculators/payout-types/product-new.js +85 -0
- package/dist/calculators/payout-types/product-new.js.map +1 -0
- package/dist/calculators/payout-types/product.d.ts +31 -0
- package/dist/calculators/payout-types/product.d.ts.map +1 -0
- package/dist/calculators/payout-types/product.js +73 -0
- package/dist/calculators/payout-types/product.js.map +1 -0
- package/dist/calculators/payout-types/topup.d.ts +19 -0
- package/dist/calculators/payout-types/topup.d.ts.map +1 -0
- package/dist/calculators/payout-types/topup.js +46 -0
- package/dist/calculators/payout-types/topup.js.map +1 -0
- package/dist/calculators/slab-matcher.d.ts +41 -0
- package/dist/calculators/slab-matcher.d.ts.map +1 -0
- package/dist/calculators/slab-matcher.js +68 -0
- package/dist/calculators/slab-matcher.js.map +1 -0
- package/dist/helpers/calc-type-checks.d.ts +21 -0
- package/dist/helpers/calc-type-checks.d.ts.map +1 -0
- package/dist/helpers/calc-type-checks.js +36 -0
- package/dist/helpers/calc-type-checks.js.map +1 -0
- package/dist/helpers/compare-value.d.ts +40 -0
- package/dist/helpers/compare-value.d.ts.map +1 -0
- package/dist/helpers/compare-value.js +120 -0
- package/dist/helpers/compare-value.js.map +1 -0
- package/dist/helpers/constraint-checks.d.ts +30 -0
- package/dist/helpers/constraint-checks.d.ts.map +1 -0
- package/dist/helpers/constraint-checks.js +73 -0
- package/dist/helpers/constraint-checks.js.map +1 -0
- package/dist/helpers/index.d.ts +8 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/index.js +24 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/helpers/math.d.ts +50 -0
- package/dist/helpers/math.d.ts.map +1 -0
- package/dist/helpers/math.js +96 -0
- package/dist/helpers/math.js.map +1 -0
- package/dist/helpers/payout-type-checks.d.ts +17 -0
- package/dist/helpers/payout-type-checks.d.ts.map +1 -0
- package/dist/helpers/payout-type-checks.js +34 -0
- package/dist/helpers/payout-type-checks.js.map +1 -0
- package/dist/helpers/qualifier-checks.d.ts +62 -0
- package/dist/helpers/qualifier-checks.d.ts.map +1 -0
- package/dist/helpers/qualifier-checks.js +194 -0
- package/dist/helpers/qualifier-checks.js.map +1 -0
- package/dist/helpers/scheme-applicability.d.ts +40 -0
- package/dist/helpers/scheme-applicability.d.ts.map +1 -0
- package/dist/helpers/scheme-applicability.js +99 -0
- package/dist/helpers/scheme-applicability.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/types/applied-scheme.d.ts +157 -0
- package/dist/types/applied-scheme.d.ts.map +1 -0
- package/dist/types/applied-scheme.js +22 -0
- package/dist/types/applied-scheme.js.map +1 -0
- package/dist/types/enums.d.ts +91 -0
- package/dist/types/enums.d.ts.map +1 -0
- package/dist/types/enums.js +118 -0
- package/dist/types/enums.js.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +21 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/item-props.d.ts +103 -0
- package/dist/types/item-props.d.ts.map +1 -0
- package/dist/types/item-props.js +3 -0
- package/dist/types/item-props.js.map +1 -0
- package/dist/types/scheme.d.ts +172 -0
- package/dist/types/scheme.d.ts.map +1 -0
- package/dist/types/scheme.js +3 -0
- package/dist/types/scheme.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { SchemeCategory, SchemePayoutType, SchemeBudgetType, AdditionalCalculationLogic, ThirdQualifierType, type SchemeConstraintTypeValue, type SchemeSchemeOnValue, type SchemePayoutInValue } from "./enums";
|
|
2
|
+
export interface OutletConstraints {
|
|
3
|
+
/** Allowed/required shop types for this scheme (outlet eligibility). */
|
|
4
|
+
requiredShopTypes?: any;
|
|
5
|
+
/** Allowed/required outlet segmentations for this scheme (outlet eligibility). */
|
|
6
|
+
requiredSegmentations?: any;
|
|
7
|
+
/** Whether scheme requires the outlet to be marked as focused. */
|
|
8
|
+
requiredIsFocused?: any;
|
|
9
|
+
/** Allowed/required channels for this scheme (GT/MT/etc.). */
|
|
10
|
+
requiredChannels?: any;
|
|
11
|
+
}
|
|
12
|
+
export interface FilterConstraints {
|
|
13
|
+
/** If provided, scheme applies only for items with MRP exactly in this list. */
|
|
14
|
+
mrp?: number[];
|
|
15
|
+
/** If provided, scheme applies only for items whose attribute text 1 matches one of these. */
|
|
16
|
+
attribute1?: string[];
|
|
17
|
+
/** If provided, scheme applies only for items whose attribute text 2 matches one of these. */
|
|
18
|
+
attribute2?: string[];
|
|
19
|
+
/** If provided, scheme applies only for items whose alternate category matches one of these. */
|
|
20
|
+
altCategory?: string[];
|
|
21
|
+
/** If provided, scheme applies only for manufacturing batch numbers in this list. */
|
|
22
|
+
manufacturingBatchNumbers?: string[];
|
|
23
|
+
}
|
|
24
|
+
export interface FirstQualifier {
|
|
25
|
+
/** The type of entity to qualify on (product/category/attribute). */
|
|
26
|
+
entityType: number;
|
|
27
|
+
/** The entity identifier/value (e.g. productId, categoryId, attributeText). */
|
|
28
|
+
entity: number | string;
|
|
29
|
+
/** Optional batch identifier constraint (MRP batch) for qualifier matching. */
|
|
30
|
+
batch: number | string | null;
|
|
31
|
+
/** Minimum required quantity for this qualifier to be satisfied. */
|
|
32
|
+
quantity: number;
|
|
33
|
+
/** Whether the matching items must be saleable/must-sell for qualifier to pass. */
|
|
34
|
+
isMustSell: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface BasketSlab {
|
|
37
|
+
/** Basket-slab identifier (row id). */
|
|
38
|
+
id: number;
|
|
39
|
+
/** Product id tied to this basket requirement (optional in some DB shapes). */
|
|
40
|
+
productId: number | null;
|
|
41
|
+
/** Required quantity/value threshold for this basket component. */
|
|
42
|
+
quantity: number;
|
|
43
|
+
/** Basket identifier this component belongs to. */
|
|
44
|
+
basketId: number;
|
|
45
|
+
/** Whether this basket component is mandatory to qualify for the slab. */
|
|
46
|
+
isBasketMandatory: boolean;
|
|
47
|
+
/** The parent scheme slab id this basket component is attached to. */
|
|
48
|
+
schemeSlabId: number;
|
|
49
|
+
}
|
|
50
|
+
export interface Basket {
|
|
51
|
+
/** Basket identifier. */
|
|
52
|
+
id: number;
|
|
53
|
+
/** Product IDs that constitute the basket group. */
|
|
54
|
+
productIds: number[];
|
|
55
|
+
}
|
|
56
|
+
export interface Slab {
|
|
57
|
+
/** Slab identifier. */
|
|
58
|
+
id: number;
|
|
59
|
+
/** Minimum threshold to qualify for this slab (qty/amount/units depending on scheme.constraintType). */
|
|
60
|
+
constraint: number;
|
|
61
|
+
/** Optional maximum threshold for the slab (used for range-based slabs). */
|
|
62
|
+
maxConstraint?: number;
|
|
63
|
+
/** Payout configured for PTR/ex-tax flows (percent/value depending on payout type). */
|
|
64
|
+
payout: number;
|
|
65
|
+
/** Payout configured for MRP billing flows (used when scheme is evaluated on MRP billing price). */
|
|
66
|
+
mrpPayout: number;
|
|
67
|
+
/** Priority/order among slabs (when multiple could match). */
|
|
68
|
+
priority: number;
|
|
69
|
+
/** Human-readable slab description (used for UI/printing). */
|
|
70
|
+
payoutDescription: string;
|
|
71
|
+
/** Product id to add/grant for PRODUCT/COUPON style payouts (DB can store any type). */
|
|
72
|
+
productId?: any;
|
|
73
|
+
/** Secondary qualifier value used for category/qualifier gating (legacy scheme model). */
|
|
74
|
+
secondQualifier: number;
|
|
75
|
+
/** Master batch id for payout product or scheme batch scoping (pricing batch). */
|
|
76
|
+
masterBatchId: string;
|
|
77
|
+
/** Basket invoice payout percent (used by basket schemes as discount percent). */
|
|
78
|
+
basketInvoicePayout: number;
|
|
79
|
+
/** Basket constraint type (qty vs amount) used in basket qualification. */
|
|
80
|
+
basketConstraintType: number;
|
|
81
|
+
/** Secondary qualifier type (e.g. LPC) describing how secondQualifier should be interpreted. */
|
|
82
|
+
secondQualifierType: number | null;
|
|
83
|
+
/** First-qualifier rules that must be satisfied for this slab to apply. */
|
|
84
|
+
firstQualifier: FirstQualifier[];
|
|
85
|
+
/** Basket qualifiers attached to this slab (mandatory/optional baskets). */
|
|
86
|
+
qualifierSchemeSlabs: BasketSlab[];
|
|
87
|
+
/** For step-multiplier schemes: the increment size above the base constraint. */
|
|
88
|
+
multiplierStepSize?: number | null;
|
|
89
|
+
/** Third qualifier values (often used for amount/quantity gating beyond second qualifier). */
|
|
90
|
+
thirdQualifier: number[] | null;
|
|
91
|
+
/** Type for the third qualifier (value vs quantity). */
|
|
92
|
+
thirdQualifierType: ThirdQualifierType | null;
|
|
93
|
+
}
|
|
94
|
+
export interface Scheme {
|
|
95
|
+
/** Scheme identifier. */
|
|
96
|
+
id: number;
|
|
97
|
+
/** Scheme name/code shown to users. */
|
|
98
|
+
name: string;
|
|
99
|
+
/** Scheme category: Primary vs Secondary (discount bucket). */
|
|
100
|
+
category: SchemeCategory | string;
|
|
101
|
+
/** The metric used to qualify slabs (Amount, Quantity, StdUnit, etc.). */
|
|
102
|
+
constraintType: SchemeConstraintTypeValue | string;
|
|
103
|
+
/** Business payout mechanic (Discount, FOC, Product, MRP%, etc.). */
|
|
104
|
+
payoutType: SchemePayoutType | string;
|
|
105
|
+
/** Calculation type for slabs (step/continuous/stepmultiplier/prorata). */
|
|
106
|
+
payoutCalculationType: string;
|
|
107
|
+
/** Field that indicates what discount is “on” (DB legacy; often used by client/UI). */
|
|
108
|
+
payoutOn: string;
|
|
109
|
+
/** Payout unit (quantity/standard unit) used for some payout types. */
|
|
110
|
+
payoutIn: SchemePayoutInValue | string;
|
|
111
|
+
/** True when payout should be interpreted as a range rather than discrete slabs. */
|
|
112
|
+
payoutAsRange?: boolean;
|
|
113
|
+
/** What entity the scheme is configured on (product/category/group/all/master batch). */
|
|
114
|
+
schemeOn: SchemeSchemeOnValue | string;
|
|
115
|
+
/** Scheme subtype used for extendable/non-extendable behaviors (and GST claim identification). */
|
|
116
|
+
schemeSubType: string;
|
|
117
|
+
/** Secondary subtype (e.g. claimable/non-claimable) for special flows like GST claim. */
|
|
118
|
+
schemeSubType2?: string;
|
|
119
|
+
/** Step size/step metadata from DB (used in some UIs and some step logic). */
|
|
120
|
+
schemeStep: number;
|
|
121
|
+
/** DB-provided block ids; meaning depends on schemeOn (legacy structure). */
|
|
122
|
+
schemeBlockArray: number[];
|
|
123
|
+
/** Selected product ids this scheme targets (product-level schemes). */
|
|
124
|
+
selectedProductBlockArray: number[];
|
|
125
|
+
/** Slab definitions (thresholds and payouts) for this scheme. */
|
|
126
|
+
slabs: Slab[];
|
|
127
|
+
/** Outlet-level constraints (who can avail the scheme). */
|
|
128
|
+
outletConstraints: OutletConstraints;
|
|
129
|
+
/** Item-level filter constraints (MRP, attributes, manufacturing batch numbers, etc.). */
|
|
130
|
+
filterConstraints?: FilterConstraints;
|
|
131
|
+
/** Long textual description for display/audit. */
|
|
132
|
+
stringDescription: string;
|
|
133
|
+
/** Whether the scheme is applied individually per line vs pooled across lines. */
|
|
134
|
+
isIndividual: boolean;
|
|
135
|
+
/** Whether the company is using MRP billing for this scheme evaluation. */
|
|
136
|
+
ismrpBilling?: boolean;
|
|
137
|
+
/** Whether this scheme is a markup-type scheme. */
|
|
138
|
+
isMarkup?: boolean;
|
|
139
|
+
/** Whether the scheme is marked preferred (used in conflict resolution). */
|
|
140
|
+
isPreferred?: boolean | null;
|
|
141
|
+
/** Budget amount for this scheme (if budgeted). */
|
|
142
|
+
schemeBudget: number | null;
|
|
143
|
+
/** Budget type (value vs quantity). */
|
|
144
|
+
schemeBudgetType: SchemeBudgetType | null;
|
|
145
|
+
/** Remaining budget specific to employee/user context (used for budget capping). */
|
|
146
|
+
employeeWiseRemainingBudget?: number;
|
|
147
|
+
/** Optional attribute text associated with scheme (used for tagging/reporting). */
|
|
148
|
+
attributeText: string | null;
|
|
149
|
+
/** Additional calculation logic modifier (e.g. discount value subtracted from price). */
|
|
150
|
+
additionalCalculationLogic?: AdditionalCalculationLogic | null;
|
|
151
|
+
/** When true, caller expects rounding/complete-number behavior for calculations. */
|
|
152
|
+
calculationOnCompleteNumber?: boolean;
|
|
153
|
+
/** UI hint: whether qty details should be shown for this scheme. */
|
|
154
|
+
showQtyDetails?: boolean;
|
|
155
|
+
/** Optional application sequence when multiple schemes exist. */
|
|
156
|
+
schemeSequence?: number | null;
|
|
157
|
+
/** If true, prevent other schemes from being applied once this scheme is applied. */
|
|
158
|
+
restrictProductsWithSchemeApplied?: boolean | null;
|
|
159
|
+
/** Additional applicability scope marker (legacy DB field). */
|
|
160
|
+
applicableOn?: number | null;
|
|
161
|
+
/** Alternate scheme link used for master-batch schemes and fallbacks. */
|
|
162
|
+
alternateSchemeId?: number | null;
|
|
163
|
+
/** Variant label/type (e.g. MasterBatch variant). */
|
|
164
|
+
schemeVariant?: string;
|
|
165
|
+
/** Discount-on type (e.g. group scheme) affecting qualifier checks. */
|
|
166
|
+
discountOn?: number | null;
|
|
167
|
+
/** ERP identifier for scheme, if synced from ERP. */
|
|
168
|
+
erpId?: any;
|
|
169
|
+
/** Distributor scoping for scheme (who is eligible to see/apply). */
|
|
170
|
+
distributors?: any;
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=scheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheme.d.ts","sourceRoot":"","sources":["../../src/types/scheme.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,0BAA0B,EAC1B,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,SAAS,C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AI,CAAC;IAC7B,yFAAyF;IACzF,0BAA0B,CAAC,EAAE,0BAA0B,GAAG,IAAI,CAAC;IAC/D,oFAAoF;IACpF,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,oEAAoE;IACpE,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,iEAAiE;IACjE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,qFAAqF;IACrF,iCAAiC,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACnD,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,yEAAyE;IACzE,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,qDAAqD;IACrD,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,qEAAqE;IACrE,YAAY,CAAC,EAAE,GAAG,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheme.js","sourceRoot":"","sources":["../../src/types/scheme.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parv0888/scheme-engine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Pure-function scheme calculation engine for FieldAssist DMS",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
|
-
"
|
|
12
|
+
"clean": "rm -rf dist tsconfig.tsbuildinfo",
|
|
13
|
+
"build": "npm run clean && tsc && tsc -p tsconfig.esm.json",
|
|
13
14
|
"test": "jest",
|
|
14
15
|
"prepublishOnly": "npm run build && npm test",
|
|
15
16
|
"db:download:secondary-discount-diffs": "node scripts/download_secondary_discount_diffs.js",
|