@endora-commerce/contracts 0.107.0 → 0.108.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-feedback.d.ts +61 -0
- package/dist/admin-feedback.d.ts.map +1 -0
- package/dist/admin-feedback.js +71 -0
- package/dist/admin-feedback.js.map +1 -0
- package/dist/admin-name.d.ts +21 -0
- package/dist/admin-name.d.ts.map +1 -0
- package/dist/admin-name.js +30 -0
- package/dist/admin-name.js.map +1 -0
- package/dist/carts.d.ts +197 -1
- package/dist/carts.d.ts.map +1 -1
- package/dist/carts.js +29 -0
- package/dist/carts.js.map +1 -1
- package/dist/catalog.d.ts +243 -10
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +107 -4
- package/dist/catalog.js.map +1 -1
- package/dist/common.d.ts +4 -0
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +14 -0
- package/dist/common.js.map +1 -1
- package/dist/comparisons.d.ts +7 -0
- package/dist/comparisons.d.ts.map +1 -1
- package/dist/comparisons.js +2 -0
- package/dist/comparisons.js.map +1 -1
- package/dist/credit-limits.d.ts.map +1 -1
- package/dist/credit-limits.js +3 -2
- package/dist/credit-limits.js.map +1 -1
- package/dist/crm-rich-text.d.ts +64 -0
- package/dist/crm-rich-text.d.ts.map +1 -0
- package/dist/crm-rich-text.js +303 -0
- package/dist/crm-rich-text.js.map +1 -0
- package/dist/crm.d.ts +91 -1
- package/dist/crm.d.ts.map +1 -1
- package/dist/crm.js +49 -34
- package/dist/crm.js.map +1 -1
- package/dist/custom-fields.d.ts +414 -1
- package/dist/custom-fields.d.ts.map +1 -1
- package/dist/custom-fields.js +319 -10
- package/dist/custom-fields.js.map +1 -1
- package/dist/document-templates.d.ts +184 -8
- package/dist/document-templates.d.ts.map +1 -1
- package/dist/document-templates.js +98 -1
- package/dist/document-templates.js.map +1 -1
- package/dist/document-values.d.ts +4 -1
- package/dist/document-values.d.ts.map +1 -1
- package/dist/document-values.js +18 -6
- package/dist/document-values.js.map +1 -1
- package/dist/errors.d.ts +37 -8
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +66 -8
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/dist/invoices.d.ts.map +1 -1
- package/dist/invoices.js +7 -4
- package/dist/invoices.js.map +1 -1
- package/dist/line-groups.d.ts +80 -0
- package/dist/line-groups.d.ts.map +1 -0
- package/dist/line-groups.js +130 -0
- package/dist/line-groups.js.map +1 -0
- package/dist/localized-name.d.ts +20 -0
- package/dist/localized-name.d.ts.map +1 -0
- package/dist/localized-name.js +45 -0
- package/dist/localized-name.js.map +1 -0
- package/dist/money-decimal.d.ts +162 -0
- package/dist/money-decimal.d.ts.map +1 -0
- package/dist/money-decimal.js +365 -0
- package/dist/money-decimal.js.map +1 -0
- package/dist/money-input.d.ts +64 -0
- package/dist/money-input.d.ts.map +1 -0
- package/dist/money-input.js +111 -0
- package/dist/money-input.js.map +1 -0
- package/dist/order-minimums.d.ts +111 -0
- package/dist/order-minimums.d.ts.map +1 -0
- package/dist/order-minimums.js +196 -0
- package/dist/order-minimums.js.map +1 -0
- package/dist/orders.d.ts +181 -2
- package/dist/orders.d.ts.map +1 -1
- package/dist/orders.js +92 -5
- package/dist/orders.js.map +1 -1
- package/dist/payment-methods.d.ts.map +1 -1
- package/dist/payment-methods.js +2 -1
- package/dist/payment-methods.js.map +1 -1
- package/dist/price-book-decimal.d.ts +84 -0
- package/dist/price-book-decimal.d.ts.map +1 -0
- package/dist/price-book-decimal.js +175 -0
- package/dist/price-book-decimal.js.map +1 -0
- package/dist/price-books.d.ts +2206 -0
- package/dist/price-books.d.ts.map +1 -0
- package/dist/price-books.js +777 -0
- package/dist/price-books.js.map +1 -0
- package/dist/price-lists.d.ts +268 -607
- package/dist/price-lists.d.ts.map +1 -1
- package/dist/price-lists.js +92 -455
- package/dist/price-lists.js.map +1 -1
- package/dist/product-feeds.d.ts +89 -8
- package/dist/product-feeds.d.ts.map +1 -1
- package/dist/product-feeds.js +18 -1
- package/dist/product-feeds.js.map +1 -1
- package/dist/product-value-resolver.d.ts +6 -0
- package/dist/product-value-resolver.d.ts.map +1 -1
- package/dist/product-value-resolver.js +6 -1
- package/dist/product-value-resolver.js.map +1 -1
- package/dist/promotions.d.ts +2 -2
- package/dist/promotions.d.ts.map +1 -1
- package/dist/promotions.js +8 -2
- package/dist/promotions.js.map +1 -1
- package/dist/quick-order.d.ts +39 -0
- package/dist/quick-order.d.ts.map +1 -1
- package/dist/quick-order.js +43 -0
- package/dist/quick-order.js.map +1 -1
- package/dist/quote-requests.d.ts +270 -1
- package/dist/quote-requests.d.ts.map +1 -1
- package/dist/quote-requests.js +150 -6
- package/dist/quote-requests.js.map +1 -1
- package/dist/returns.d.ts +55 -2
- package/dist/returns.d.ts.map +1 -1
- package/dist/returns.js +39 -4
- package/dist/returns.js.map +1 -1
- package/dist/sales-channels.d.ts +2 -0
- package/dist/sales-channels.d.ts.map +1 -1
- package/dist/sales-channels.js +2 -0
- package/dist/sales-channels.js.map +1 -1
- package/dist/search.d.ts +60 -0
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +4 -0
- package/dist/search.js.map +1 -1
- package/dist/shipping-methods.d.ts.map +1 -1
- package/dist/shipping-methods.js +2 -1
- package/dist/shipping-methods.js.map +1 -1
- package/dist/shopping-lists.d.ts +24 -0
- package/dist/shopping-lists.d.ts.map +1 -1
- package/dist/shopping-lists.js +20 -1
- package/dist/shopping-lists.js.map +1 -1
- package/dist/storefront-value-overrides.d.ts +67 -0
- package/dist/storefront-value-overrides.d.ts.map +1 -0
- package/dist/storefront-value-overrides.js +93 -0
- package/dist/storefront-value-overrides.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"price-lists.d.ts","sourceRoot":"","sources":["../src/price-lists.ts"],"names":[],"mappings":"AAAA,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,CAAC;IACtC,sEAAsE;IACtE,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;IACzC;;;;;;;OAOG;IACH,mBAAmB,CAAC,KAAK,EAAE;QACzB,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;QACrC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;KAChC,GAAG,OAAO,CAAC,2BAA2B,EAAE,CAAC,CAAC;CAC5C;AAED,iEAAiE;AACjE,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,WAAW,GAAG,QAAQ,CAAC;IAC/B,MAAM,EAAE,cAAc,GAAG,UAAU,GAAG,gBAAgB,CAAC;IACvD,2EAA2E;IAC3E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB"}
|
package/dist/price-lists.js
CHANGED
|
@@ -1,331 +1,23 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { isoDateTimeSchema, uuidSchema } from './common.js';
|
|
3
|
+
import { priceSourceSchema } from './price-books.js';
|
|
4
4
|
/**
|
|
5
|
-
* Pricing contracts
|
|
5
|
+
* Pricing contracts — what every consumer of a price reads.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* `priceListAssignmentSchema`, etc.) were retired by T011 alongside
|
|
16
|
-
* their entity files and admin endpoints.
|
|
7
|
+
* Feature 160 (D-287 P1) replaced the feature-011 engine with price books:
|
|
8
|
+
* the book, its rows, its sets and the explanation are in `price-books.ts`;
|
|
9
|
+
* this file keeps what a *price* looks like to its readers — the listing and
|
|
10
|
+
* line answers, the ports that produce them, the display-mode chain, the price
|
|
11
|
+
* ordering, and the price-list read port. The Application-rule tree and its
|
|
12
|
+
* evaluator, the bracket and roster shapes, the matrix-entry v1 shapes and the
|
|
13
|
+
* `priceListAdminPort` were removed with the old model (`priceBookWritePort`, in
|
|
14
|
+
* `price-books.ts`, replaces the last).
|
|
17
15
|
*/
|
|
18
16
|
const CURRENCY = z.string().regex(/^[A-Z]{3}$/, 'ISO 4217 currency code');
|
|
19
17
|
const POSITIVE_INT = z.number().int().positive();
|
|
20
18
|
const DECIMAL_STRING = z
|
|
21
19
|
.string()
|
|
22
20
|
.regex(/^\d+(\.\d{1,4})?$/, 'decimal as string with up to 4 fractional digits');
|
|
23
|
-
// --- Customer Group ---------------------------------------------------------
|
|
24
|
-
//
|
|
25
|
-
// The schemas, the record and the read port moved to `customer-accounts.ts`
|
|
26
|
-
// with the entity (feature 076, D-79): a customer group describes the customer,
|
|
27
|
-
// and a price list merely refers to one by id. Nothing here imports them back —
|
|
28
|
-
// `PriceListAssignment` and the rule-target types carry a `customerGroupId`
|
|
29
|
-
// string, never the record.
|
|
30
|
-
// =============================================================================
|
|
31
|
-
// FEATURE 011 — pricing-engine schemas
|
|
32
|
-
// =============================================================================
|
|
33
|
-
// --- Application Rule AST ---------------------------------------------------
|
|
34
|
-
export const ruleCriterionTypeSchema = z.enum([
|
|
35
|
-
'salesChannel',
|
|
36
|
-
'customerGroup',
|
|
37
|
-
'organization',
|
|
38
|
-
'category',
|
|
39
|
-
'currency',
|
|
40
|
-
]);
|
|
41
|
-
const ruleCriterionNodeSchema = z.object({
|
|
42
|
-
kind: z.literal('criterion'),
|
|
43
|
-
type: ruleCriterionTypeSchema,
|
|
44
|
-
values: z.array(z.string()).max(1000),
|
|
45
|
-
});
|
|
46
|
-
const ruleAllNodeSchema = z.object({ kind: z.literal('all') });
|
|
47
|
-
const ruleNodeSchema = z.lazy(() => z.discriminatedUnion('kind', [
|
|
48
|
-
ruleAllNodeSchema,
|
|
49
|
-
ruleCriterionNodeSchema,
|
|
50
|
-
z.object({
|
|
51
|
-
kind: z.literal('group'),
|
|
52
|
-
op: z.enum(['AND', 'OR']),
|
|
53
|
-
children: z.array(ruleNodeSchema).min(1).max(20),
|
|
54
|
-
}),
|
|
55
|
-
]));
|
|
56
|
-
function ruleDepth(node) {
|
|
57
|
-
if (node.kind !== 'group')
|
|
58
|
-
return 0;
|
|
59
|
-
return 1 + Math.max(...node.children.map(ruleDepth));
|
|
60
|
-
}
|
|
61
|
-
export const applicationRuleSchema = ruleNodeSchema.refine((node) => ruleDepth(node) <= 5, { message: 'rule_depth_exceeds_5' });
|
|
62
|
-
// --- Price list (engine shape) ---------------------------------------------
|
|
63
|
-
export const priceListTypeSchema = z.enum(['base', 'sale']);
|
|
64
|
-
export const priceListStatusSchema = z.enum([
|
|
65
|
-
'draft',
|
|
66
|
-
'active',
|
|
67
|
-
'scheduled',
|
|
68
|
-
'expired',
|
|
69
|
-
]);
|
|
70
|
-
export const priceListEngineSchema = z.object({
|
|
71
|
-
id: uuidSchema,
|
|
72
|
-
name: z.string().min(1).max(200),
|
|
73
|
-
type: priceListTypeSchema,
|
|
74
|
-
status: priceListStatusSchema,
|
|
75
|
-
startsAt: isoDateTimeSchema.nullable(),
|
|
76
|
-
endsAt: isoDateTimeSchema.nullable(),
|
|
77
|
-
applicationRule: applicationRuleSchema,
|
|
78
|
-
isSystem: z.boolean(),
|
|
79
|
-
modifiedAt: isoDateTimeSchema,
|
|
80
|
-
createdAt: isoDateTimeSchema,
|
|
81
|
-
});
|
|
82
|
-
export const createPriceListEngineRequestSchema = z.object({
|
|
83
|
-
name: z.string().min(1).max(200),
|
|
84
|
-
type: priceListTypeSchema,
|
|
85
|
-
startsAt: isoDateTimeSchema.nullable().optional(),
|
|
86
|
-
endsAt: isoDateTimeSchema.nullable().optional(),
|
|
87
|
-
applicationRule: applicationRuleSchema.optional(),
|
|
88
|
-
});
|
|
89
|
-
export const patchPriceListEngineRequestSchema = z
|
|
90
|
-
.object({
|
|
91
|
-
name: z.string().min(1).max(200).optional(),
|
|
92
|
-
type: priceListTypeSchema.optional(),
|
|
93
|
-
startsAt: isoDateTimeSchema.nullable().optional(),
|
|
94
|
-
endsAt: isoDateTimeSchema.nullable().optional(),
|
|
95
|
-
applicationRule: applicationRuleSchema.optional(),
|
|
96
|
-
})
|
|
97
|
-
.refine((v) => Object.keys(v).length > 0, { message: 'patch_body_empty' });
|
|
98
|
-
// --- Price brackets ---------------------------------------------------------
|
|
99
|
-
export const priceListBracketSchema = z.object({
|
|
100
|
-
priceListId: uuidSchema,
|
|
101
|
-
productId: uuidSchema,
|
|
102
|
-
currencyCode: CURRENCY,
|
|
103
|
-
minQuantity: POSITIVE_INT,
|
|
104
|
-
maxQuantity: POSITIVE_INT.nullable(),
|
|
105
|
-
amount: DECIMAL_STRING,
|
|
106
|
-
});
|
|
107
|
-
export const replaceBracketsRequestSchema = z.object({
|
|
108
|
-
bracketsByCurrency: z.record(CURRENCY, z.array(z.object({
|
|
109
|
-
minQuantity: POSITIVE_INT,
|
|
110
|
-
maxQuantity: POSITIVE_INT.nullable(),
|
|
111
|
-
amount: DECIMAL_STRING,
|
|
112
|
-
}))),
|
|
113
|
-
});
|
|
114
|
-
export const productAssignmentSchema = z.object({
|
|
115
|
-
priceListId: uuidSchema,
|
|
116
|
-
productId: uuidSchema,
|
|
117
|
-
bracketsByCurrency: z.record(CURRENCY, z.array(priceListBracketSchema)),
|
|
118
|
-
});
|
|
119
|
-
export const replaceProductsRequestSchema = z.object({
|
|
120
|
-
productIds: z.array(uuidSchema),
|
|
121
|
-
});
|
|
122
|
-
// --- Price matrix (feature 148) ---------------------------------------------
|
|
123
|
-
//
|
|
124
|
-
// A matrix entry prices a *selection* of products (one product, a category, an
|
|
125
|
-
// attribute value, a category and an attribute value, or every product) for an
|
|
126
|
-
// optional organization and a quantity window, at a fixed unit price or a
|
|
127
|
-
// percentage off the reference price. It lives inside a price list: the list's
|
|
128
|
-
// application rule still decides which buyers the list serves, and the entry
|
|
129
|
-
// decides the price within it. Resolution semantics:
|
|
130
|
-
// `specs/148-price-list-matrix-rules/contracts/pricing-resolution-matrix.md`.
|
|
131
|
-
/** At most this many entries per price list (spec FR-007) — a product decision. */
|
|
132
|
-
export const PRICE_MATRIX_MAX_ENTRIES_PER_LIST = 5000;
|
|
133
|
-
export const priceMatrixPriceTypeSchema = z.enum(['fixed', 'discount_percent']);
|
|
134
|
-
/** Derived from which selection coordinates are set; never stored. */
|
|
135
|
-
export const priceMatrixSelectionKindSchema = z.enum([
|
|
136
|
-
'product',
|
|
137
|
-
'category_attribute',
|
|
138
|
-
'attribute',
|
|
139
|
-
'category',
|
|
140
|
-
'all',
|
|
141
|
-
]);
|
|
142
|
-
/** A percentage with at most two decimals, greater than 0 and at most 100. */
|
|
143
|
-
const PRICE_MATRIX_PERCENT_SHAPE = /^\d{1,3}(\.\d{1,2})?$/;
|
|
144
|
-
const PRICE_MATRIX_PERCENT = z.string().superRefine((v, ctx) => {
|
|
145
|
-
if (!PRICE_MATRIX_PERCENT_SHAPE.test(v)) {
|
|
146
|
-
ctx.addIssue({ code: 'custom', message: 'percentage with up to 2 fractional digits' });
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
const n = Number(v);
|
|
150
|
-
if (!(n > 0 && n <= 100)) {
|
|
151
|
-
ctx.addIssue({ code: 'custom', message: 'percentage must be greater than 0 and at most 100' });
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
export const priceMatrixAttributeSchema = z.object({
|
|
155
|
-
key: z.string().min(1).max(64),
|
|
156
|
-
value: z.string().min(1).max(255),
|
|
157
|
-
});
|
|
158
|
-
export const priceMatrixPriceSchema = z.discriminatedUnion('type', [
|
|
159
|
-
z.object({ type: z.literal('fixed'), amount: DECIMAL_STRING, currencyCode: CURRENCY }),
|
|
160
|
-
z.object({ type: z.literal('discount_percent'), percent: PRICE_MATRIX_PERCENT }),
|
|
161
|
-
]);
|
|
162
|
-
/** `selectionKind` of an entry, from which selection coordinates are set. */
|
|
163
|
-
export function priceMatrixSelectionKind(entry) {
|
|
164
|
-
if (entry.productId !== null)
|
|
165
|
-
return 'product';
|
|
166
|
-
if (entry.categoryId !== null && entry.attribute !== null)
|
|
167
|
-
return 'category_attribute';
|
|
168
|
-
if (entry.attribute !== null)
|
|
169
|
-
return 'attribute';
|
|
170
|
-
if (entry.categoryId !== null)
|
|
171
|
-
return 'category';
|
|
172
|
-
return 'all';
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* The cross-field rules of an entry — the CHECK constraints of
|
|
176
|
-
* `price_list_matrix_entries` that a single field cannot express (data-model
|
|
177
|
-
* §1). One function so the create schema and the service's merge-then-validate
|
|
178
|
-
* of a PATCH apply exactly the same rules.
|
|
179
|
-
*/
|
|
180
|
-
export function priceMatrixEntryShapeIssues(entry) {
|
|
181
|
-
const out = [];
|
|
182
|
-
if (entry.productId !== null && (entry.categoryId !== null || entry.attribute !== null)) {
|
|
183
|
-
out.push({
|
|
184
|
-
path: ['productId'],
|
|
185
|
-
message: 'A product selection cannot be combined with a category or an attribute.',
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
if (entry.productId !== null && entry.organizationId === null) {
|
|
189
|
-
out.push({
|
|
190
|
-
path: ['organizationId'],
|
|
191
|
-
message: "A product selection needs an organization — without one it is the list's own product price.",
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
if (entry.maxQuantity !== null && entry.maxQuantity < entry.minQuantity) {
|
|
195
|
-
out.push({ path: ['maxQuantity'], message: 'maxQuantity must be at least minQuantity.' });
|
|
196
|
-
}
|
|
197
|
-
if (entry.price.type === 'fixed' &&
|
|
198
|
-
entry.productId === null &&
|
|
199
|
-
entry.categoryId === null &&
|
|
200
|
-
entry.attribute === null) {
|
|
201
|
-
out.push({
|
|
202
|
-
path: ['price', 'type'],
|
|
203
|
-
message: 'A fixed price needs a product, category or attribute selection.',
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
return out;
|
|
207
|
-
}
|
|
208
|
-
const priceMatrixEntryFields = {
|
|
209
|
-
productId: uuidSchema.nullable().default(null),
|
|
210
|
-
categoryId: uuidSchema.nullable().default(null),
|
|
211
|
-
attribute: priceMatrixAttributeSchema.nullable().default(null),
|
|
212
|
-
organizationId: uuidSchema.nullable().default(null),
|
|
213
|
-
minQuantity: POSITIVE_INT,
|
|
214
|
-
maxQuantity: POSITIVE_INT.nullable().default(null),
|
|
215
|
-
price: priceMatrixPriceSchema,
|
|
216
|
-
};
|
|
217
|
-
/** Body of `POST /api/v1/admin/price-lists-engine/:id/matrix`. */
|
|
218
|
-
export const priceMatrixEntryInputSchema = z
|
|
219
|
-
.object(priceMatrixEntryFields)
|
|
220
|
-
.superRefine((value, ctx) => {
|
|
221
|
-
for (const issue of priceMatrixEntryShapeIssues(value)) {
|
|
222
|
-
ctx.addIssue({ code: 'custom', path: issue.path, message: issue.message });
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
/**
|
|
226
|
-
* Body of `PATCH …/matrix/:entryId` — every field optional, at least one
|
|
227
|
-
* present. The cross-field rules run on the merged entry in the service.
|
|
228
|
-
*/
|
|
229
|
-
export const priceMatrixEntryPatchSchema = z
|
|
230
|
-
.object({
|
|
231
|
-
productId: uuidSchema.nullable().optional(),
|
|
232
|
-
categoryId: uuidSchema.nullable().optional(),
|
|
233
|
-
attribute: priceMatrixAttributeSchema.nullable().optional(),
|
|
234
|
-
organizationId: uuidSchema.nullable().optional(),
|
|
235
|
-
minQuantity: POSITIVE_INT.optional(),
|
|
236
|
-
maxQuantity: POSITIVE_INT.nullable().optional(),
|
|
237
|
-
price: priceMatrixPriceSchema.optional(),
|
|
238
|
-
})
|
|
239
|
-
.refine((v) => Object.keys(v).length > 0, { message: 'patch_body_empty' });
|
|
240
|
-
/** Query of `GET …/matrix`. `organizationId = 'none'` lists not organization-specific entries. */
|
|
241
|
-
export const priceMatrixListQuerySchema = z.object({
|
|
242
|
-
page: z.coerce.number().int().min(0).default(0),
|
|
243
|
-
pageSize: z.coerce.number().int().min(1).max(200).default(50),
|
|
244
|
-
selectionKind: priceMatrixSelectionKindSchema.optional(),
|
|
245
|
-
organizationId: z.union([uuidSchema, z.literal('none')]).optional(),
|
|
246
|
-
productId: uuidSchema.optional(),
|
|
247
|
-
categoryId: uuidSchema.optional(),
|
|
248
|
-
});
|
|
249
|
-
/** Why an attribute entry does not price anything right now (spec FR-010). */
|
|
250
|
-
export const priceMatrixInactiveReasonSchema = z.enum([
|
|
251
|
-
'attribute_not_flagged',
|
|
252
|
-
'attribute_not_found',
|
|
253
|
-
'attribute_language_scoped',
|
|
254
|
-
'attribute_channel_scoped',
|
|
255
|
-
'attribute_value_type',
|
|
256
|
-
]);
|
|
257
|
-
export const priceMatrixEntrySchema = z.object({
|
|
258
|
-
id: uuidSchema,
|
|
259
|
-
priceListId: uuidSchema,
|
|
260
|
-
selectionKind: priceMatrixSelectionKindSchema,
|
|
261
|
-
productId: uuidSchema.nullable(),
|
|
262
|
-
categoryId: uuidSchema.nullable(),
|
|
263
|
-
attribute: priceMatrixAttributeSchema.nullable(),
|
|
264
|
-
organizationId: uuidSchema.nullable(),
|
|
265
|
-
minQuantity: POSITIVE_INT,
|
|
266
|
-
maxQuantity: POSITIVE_INT.nullable(),
|
|
267
|
-
price: priceMatrixPriceSchema,
|
|
268
|
-
/** `false` ⇒ the attribute is no longer eligible; always `true` for non-attribute entries. */
|
|
269
|
-
active: z.boolean(),
|
|
270
|
-
inactiveReason: priceMatrixInactiveReasonSchema.nullable(),
|
|
271
|
-
/**
|
|
272
|
-
* `true` when the named product, category or organization no longer resolves
|
|
273
|
-
* as live (soft-deleted — the foreign-key cascade only fires on a purge).
|
|
274
|
-
*/
|
|
275
|
-
targetDeleted: z.boolean(),
|
|
276
|
-
/** Display labels resolved server-side, so the table needs no request per row. */
|
|
277
|
-
labels: z.object({
|
|
278
|
-
product: z.object({ sku: z.string(), name: z.string() }).nullable(),
|
|
279
|
-
category: z.string().nullable(),
|
|
280
|
-
attribute: z.object({ label: z.string(), valueLabel: z.string() }).nullable(),
|
|
281
|
-
organization: z.string().nullable(),
|
|
282
|
-
}),
|
|
283
|
-
createdAt: isoDateTimeSchema,
|
|
284
|
-
updatedAt: isoDateTimeSchema,
|
|
285
|
-
});
|
|
286
|
-
export const priceMatrixListResponseSchema = z.object({
|
|
287
|
-
data: z.object({
|
|
288
|
-
items: z.array(priceMatrixEntrySchema),
|
|
289
|
-
total: z.number().int().min(0),
|
|
290
|
-
page: z.number().int().min(0),
|
|
291
|
-
pageSize: z.number().int().min(1),
|
|
292
|
-
limit: z.number().int().min(1),
|
|
293
|
-
}),
|
|
294
|
-
});
|
|
295
|
-
export const priceMatrixEntryResponseSchema = z.object({ data: priceMatrixEntrySchema });
|
|
296
|
-
/** One item of `GET /api/v1/admin/pricing/rule-targets/attributes`. */
|
|
297
|
-
export const priceMatrixAttributeTargetSchema = z.object({
|
|
298
|
-
key: z.string(),
|
|
299
|
-
label: z.string(),
|
|
300
|
-
valueType: z.enum(['select', 'enum', 'multiselect', 'boolean']),
|
|
301
|
-
options: z.array(z.object({ value: z.string(), label: z.string() })),
|
|
302
|
-
});
|
|
303
|
-
/** Route params of every `/api/v1/admin/price-lists-engine/:id/...` route. */
|
|
304
|
-
export const priceListIdParamsSchema = z.object({ id: uuidSchema });
|
|
305
|
-
/**
|
|
306
|
-
* Body of `POST /api/v1/admin/price-lists-engine/:id/products/bulk-add`: add
|
|
307
|
-
* the products to the list's roster in one audited write. Additive — products
|
|
308
|
-
* already on the roster keep their brackets. At least one id, at most
|
|
309
|
-
* {@link ADMIN_PRODUCT_SELECTION_MAX}.
|
|
310
|
-
*/
|
|
311
|
-
export const bulkAddPriceListProductsRequestSchema = z.object({
|
|
312
|
-
productIds: z.array(uuidSchema).min(1).max(ADMIN_PRODUCT_SELECTION_MAX),
|
|
313
|
-
});
|
|
314
|
-
/** Why a product of a bulk add was not added. `product_not_found`: unknown or deleted. */
|
|
315
|
-
export const bulkAddPriceListProductFailureReasonSchema = z.enum(['product_not_found']);
|
|
316
|
-
/**
|
|
317
|
-
* Per-product outcome of a bulk add, over the de-duplicated ids: `added` now
|
|
318
|
-
* on the roster, `unchanged` already on it (a retry is safe), `failed` with a
|
|
319
|
-
* reason.
|
|
320
|
-
*/
|
|
321
|
-
export const bulkAddPriceListProductsResultSchema = z.object({
|
|
322
|
-
added: z.array(uuidSchema),
|
|
323
|
-
unchanged: z.array(uuidSchema),
|
|
324
|
-
failed: z.array(z.object({ productId: uuidSchema, reason: bulkAddPriceListProductFailureReasonSchema })),
|
|
325
|
-
});
|
|
326
|
-
export const bulkAddPriceListProductsResponseSchema = z.object({
|
|
327
|
-
data: bulkAddPriceListProductsResultSchema,
|
|
328
|
-
});
|
|
329
21
|
// --- Display modes ----------------------------------------------------------
|
|
330
22
|
export const displayModeSchema = z.enum([
|
|
331
23
|
'gross_only',
|
|
@@ -333,6 +25,32 @@ export const displayModeSchema = z.enum([
|
|
|
333
25
|
'both',
|
|
334
26
|
'none',
|
|
335
27
|
]);
|
|
28
|
+
/**
|
|
29
|
+
* Feature 160 (FR-029, owner ruling 2026-10-23) — why a price book pinned to a
|
|
30
|
+
* product feed publishes no prices now. A feed is fetched by a provider, which
|
|
31
|
+
* is nobody's buyer, so a pinned book publishes only while it would price an
|
|
32
|
+
* anonymous buyer on the feed's channel: `active` or `scheduled` and inside its
|
|
33
|
+
* schedule window (`outside_schedule`, else `not_active`), bound to that
|
|
34
|
+
* channel with the channel offering its currency (`not_on_channel`; a base book
|
|
35
|
+
* is channel-independent), and for everyone (`audience_restricted`). A book in
|
|
36
|
+
* another currency than the feed's (`currency_mismatch`) or one that does not
|
|
37
|
+
* exist (`not_found`) prices nothing either.
|
|
38
|
+
*/
|
|
39
|
+
export const pinnedPriceBookUnpublishableReasonSchema = z.enum([
|
|
40
|
+
'not_found',
|
|
41
|
+
'currency_mismatch',
|
|
42
|
+
'not_active',
|
|
43
|
+
'outside_schedule',
|
|
44
|
+
'not_on_channel',
|
|
45
|
+
'audience_restricted',
|
|
46
|
+
]);
|
|
47
|
+
/**
|
|
48
|
+
* `productResolvedPriceSchema` (in `catalog.ts`, which this file imports and so
|
|
49
|
+
* cannot import back) spells the display modes out; this keeps the two lists
|
|
50
|
+
* identical at compile time.
|
|
51
|
+
*/
|
|
52
|
+
const displayModesAgree = true;
|
|
53
|
+
void displayModesAgree;
|
|
336
54
|
export const displayModeOverrideScopeSchema = z.enum([
|
|
337
55
|
'organization',
|
|
338
56
|
'category',
|
|
@@ -348,37 +66,65 @@ export const upsertDisplayModeOverrideRequestSchema = z.object({
|
|
|
348
66
|
mode: displayModeSchema.or(z.literal('inherit')),
|
|
349
67
|
});
|
|
350
68
|
// --- Resolved price (storefront/cart consumer) ------------------------------
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
69
|
+
/** A price as the resolver answers it: the amount as a decimal string, never a float. */
|
|
70
|
+
const RESOLVED_MONEY = z.object({ amount: DECIMAL_STRING, currency: CURRENCY });
|
|
71
|
+
/**
|
|
72
|
+
* `GET /api/v1/storefront/products/:id/resolved-price`. A product no price book
|
|
73
|
+
* prices for the buyer (FR-018) is **unpriced**: `baseListId`, `basePrice` and
|
|
74
|
+
* `quantityBracket` are all `null` together — never an empty-string id.
|
|
75
|
+
*/
|
|
76
|
+
export const resolvedPriceEngineSchema = z
|
|
77
|
+
.object({
|
|
78
|
+
baseListId: uuidSchema.nullable(),
|
|
79
|
+
basePrice: RESOLVED_MONEY.nullable(),
|
|
354
80
|
saleListId: uuidSchema.nullable(),
|
|
355
|
-
salePrice:
|
|
81
|
+
salePrice: RESOLVED_MONEY.nullable(),
|
|
356
82
|
displayMode: displayModeSchema,
|
|
357
83
|
currencyCode: CURRENCY,
|
|
358
|
-
quantityBracket: z
|
|
84
|
+
quantityBracket: z
|
|
85
|
+
.object({
|
|
359
86
|
minQuantity: POSITIVE_INT,
|
|
360
87
|
maxQuantity: POSITIVE_INT.nullable(),
|
|
361
|
-
})
|
|
88
|
+
})
|
|
89
|
+
.nullable(),
|
|
90
|
+
/** Feature 160 — which tier priced the charged line; `null` when nothing did. */
|
|
91
|
+
source: priceSourceSchema.nullable().optional(),
|
|
92
|
+
/** Feature 160 — the buyer price a charged sale undercut. */
|
|
93
|
+
compareAt: z.string().nullable().optional(),
|
|
94
|
+
/** Feature 160 (G9) — the catalogue price beside a lower buyer price, when shown. */
|
|
95
|
+
listPrice: z.object({ amount: z.string(), currency: CURRENCY }).optional(),
|
|
96
|
+
})
|
|
97
|
+
.superRefine((value, ctx) => {
|
|
98
|
+
const priced = [value.baseListId !== null, value.basePrice !== null, value.quantityBracket !== null];
|
|
99
|
+
if (priced.some((p) => p !== priced[0])) {
|
|
100
|
+
ctx.addIssue({
|
|
101
|
+
code: 'custom',
|
|
102
|
+
message: 'baseListId, basePrice and quantityBracket are null together (unpriced) or set together (priced).',
|
|
103
|
+
path: ['baseListId'],
|
|
104
|
+
});
|
|
105
|
+
}
|
|
362
106
|
});
|
|
363
107
|
// --- Listing price (catalogue listing / search / compare / links) -----------
|
|
364
108
|
/**
|
|
365
109
|
* What a catalogue listing may show as a product's price — issue #132.
|
|
366
110
|
*
|
|
367
|
-
*
|
|
368
|
-
* listing normally takes. The product ruling names the whole chain and this
|
|
369
|
-
* union is that chain, one arm each:
|
|
111
|
+
* Two arms:
|
|
370
112
|
*
|
|
371
|
-
* `price_list` —
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
* `none` —
|
|
113
|
+
* `price_list` — a price book priced this product for this buyer (the base
|
|
114
|
+
* book, an everyone book of the channel, a buyer book or a
|
|
115
|
+
* sale; `priceSource` names the tier);
|
|
116
|
+
* `none` — nothing prices it, and the listing renders no price.
|
|
117
|
+
*
|
|
118
|
+
* Feature 160 removed the third arm, `product` — the price assigned directly
|
|
119
|
+
* to the Product (the legacy `defaultPrice` attribute): a product has no price
|
|
120
|
+
* of its own any more (FR-042).
|
|
375
121
|
*
|
|
376
122
|
* The `none` arm carries **no `amount` field**, following the `ResolvedTax`
|
|
377
123
|
* precedent (issue #124): a listing showing nothing and a listing offering a
|
|
378
124
|
* free product are different pages, so a caller has to narrow on `source`
|
|
379
125
|
* before it can read a figure. A product priced at zero comes back as
|
|
380
|
-
* `{ source: 'price_list'
|
|
381
|
-
*
|
|
126
|
+
* `{ source: 'price_list', amount: '0.00' }` and renders as zero — `amount` is
|
|
127
|
+
* never a falsy sentinel for absence.
|
|
382
128
|
*
|
|
383
129
|
* As with `ResolvedTax`, "the `price_lists` module is absent" is deliberately
|
|
384
130
|
* not an arm: absence is not a value, and the port gate throws
|
|
@@ -391,11 +137,18 @@ export const listingPriceSchema = z.discriminatedUnion('source', [
|
|
|
391
137
|
currency: CURRENCY,
|
|
392
138
|
priceListId: uuidSchema,
|
|
393
139
|
isSale: z.boolean(),
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
140
|
+
/**
|
|
141
|
+
* Feature 160 (D-287 P1) — which tier of the price-book resolution priced
|
|
142
|
+
* the card. Named `priceSource` because `source` is this union's
|
|
143
|
+
* discriminant.
|
|
144
|
+
*/
|
|
145
|
+
priceSource: priceSourceSchema.optional(),
|
|
146
|
+
/** Feature 160 — the buyer price, struck through, when a sale is charged (FR-025). */
|
|
147
|
+
compareAtAmount: DECIMAL_STRING.optional(),
|
|
148
|
+
/** Feature 160 — the variants of the product resolve to different prices (FR-024). */
|
|
149
|
+
variesByVariant: z.boolean().optional(),
|
|
150
|
+
/** Feature 160 — the highest variant price; `amount` is the lowest ("from"). */
|
|
151
|
+
maxAmount: DECIMAL_STRING.optional(),
|
|
399
152
|
}),
|
|
400
153
|
z.object({ source: z.literal('none') }),
|
|
401
154
|
]);
|
|
@@ -466,120 +219,4 @@ export const PRICING_SETTING_CODES = {
|
|
|
466
219
|
DEFAULT_DISPLAY_MODE: 'pricing.default_display_mode',
|
|
467
220
|
UNAUTHENTICATED_DISPLAY_MODE: 'pricing.unauthenticated_display_mode',
|
|
468
221
|
};
|
|
469
|
-
const NO_EXPLICIT = new Set();
|
|
470
|
-
/**
|
|
471
|
-
* Pure rule evaluator (feature 011 / FR-022, FR-023, FR-026, FR-029).
|
|
472
|
-
*
|
|
473
|
-
* Walks the discriminated-union AST and returns:
|
|
474
|
-
* - `matched`: the overall AST truth value against the resolution context.
|
|
475
|
-
* - `explicitOn`: the criterion types that contributed to the match AND had
|
|
476
|
-
* non-empty value lists. The resolver's priority chain consults this to
|
|
477
|
-
* award the per-step boost (FR-026 steps 1..4).
|
|
478
|
-
*
|
|
479
|
-
* Notes:
|
|
480
|
-
* - The `category` criterion is product-driven (FR-029): it matches when the
|
|
481
|
-
* product belongs to any category named in the rule's value list.
|
|
482
|
-
* - The `currency` criterion never appears in the priority chain even when
|
|
483
|
-
* explicit; it is purely a matching criterion.
|
|
484
|
-
* - `{ kind: 'all' }` and any criterion with `values: []` are treated as
|
|
485
|
-
* always-true and contribute nothing to `explicitOn` (FR-022).
|
|
486
|
-
*/
|
|
487
|
-
export function evaluateApplicationRule(rule, ctx) {
|
|
488
|
-
if (rule.kind === 'all') {
|
|
489
|
-
return { matched: true, explicitOn: NO_EXPLICIT };
|
|
490
|
-
}
|
|
491
|
-
if (rule.kind === 'criterion') {
|
|
492
|
-
if (rule.values.length === 0) {
|
|
493
|
-
return { matched: true, explicitOn: NO_EXPLICIT };
|
|
494
|
-
}
|
|
495
|
-
if (rule.type === 'organization') {
|
|
496
|
-
const rank = organizationMatchRank(rule.values, ctx);
|
|
497
|
-
if (rank === undefined)
|
|
498
|
-
return { matched: false, explicitOn: NO_EXPLICIT };
|
|
499
|
-
return { matched: true, explicitOn: new Set(['organization']), organizationRank: rank };
|
|
500
|
-
}
|
|
501
|
-
const matched = matchesCriterion(rule.type, rule.values, ctx);
|
|
502
|
-
return {
|
|
503
|
-
matched,
|
|
504
|
-
explicitOn: matched ? new Set([rule.type]) : NO_EXPLICIT,
|
|
505
|
-
};
|
|
506
|
-
}
|
|
507
|
-
// group node
|
|
508
|
-
if (rule.children.length === 0) {
|
|
509
|
-
// defensive — schema disallows, but evaluate as always-true (empty AND/OR)
|
|
510
|
-
return { matched: true, explicitOn: NO_EXPLICIT };
|
|
511
|
-
}
|
|
512
|
-
const childEvaluations = rule.children.map((c) => evaluateApplicationRule(c, ctx));
|
|
513
|
-
if (rule.op === 'AND') {
|
|
514
|
-
const allMatch = childEvaluations.every((e) => e.matched);
|
|
515
|
-
if (!allMatch)
|
|
516
|
-
return { matched: false, explicitOn: NO_EXPLICIT };
|
|
517
|
-
return {
|
|
518
|
-
matched: true,
|
|
519
|
-
explicitOn: unionExplicit(childEvaluations),
|
|
520
|
-
...withRank(minRank(childEvaluations)),
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
// OR
|
|
524
|
-
const matchingChildren = childEvaluations.filter((e) => e.matched);
|
|
525
|
-
if (matchingChildren.length === 0)
|
|
526
|
-
return { matched: false, explicitOn: NO_EXPLICIT };
|
|
527
|
-
// Only matching children contribute to the explicit set + nearness rank.
|
|
528
|
-
return {
|
|
529
|
-
matched: true,
|
|
530
|
-
explicitOn: unionExplicit(matchingChildren),
|
|
531
|
-
...withRank(minRank(matchingChildren)),
|
|
532
|
-
};
|
|
533
|
-
}
|
|
534
|
-
/**
|
|
535
|
-
* The nearness rank of the nearest org (in `ctx.organizationChain`, else
|
|
536
|
-
* `[organizationId]`) named by `values`, or `undefined` when none match.
|
|
537
|
-
*/
|
|
538
|
-
function organizationMatchRank(values, ctx) {
|
|
539
|
-
const chain = ctx.organizationChain && ctx.organizationChain.length > 0
|
|
540
|
-
? ctx.organizationChain
|
|
541
|
-
: ctx.organizationId !== null
|
|
542
|
-
? [ctx.organizationId]
|
|
543
|
-
: [];
|
|
544
|
-
const valueSet = new Set(values);
|
|
545
|
-
for (let i = 0; i < chain.length; i += 1) {
|
|
546
|
-
if (valueSet.has(chain[i]))
|
|
547
|
-
return i; // nearest-first → first hit is the nearest
|
|
548
|
-
}
|
|
549
|
-
return undefined;
|
|
550
|
-
}
|
|
551
|
-
function minRank(evaluations) {
|
|
552
|
-
let min;
|
|
553
|
-
for (const e of evaluations) {
|
|
554
|
-
if (e.organizationRank !== undefined && (min === undefined || e.organizationRank < min)) {
|
|
555
|
-
min = e.organizationRank;
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
return min;
|
|
559
|
-
}
|
|
560
|
-
function withRank(rank) {
|
|
561
|
-
return rank === undefined ? {} : { organizationRank: rank };
|
|
562
|
-
}
|
|
563
|
-
function matchesCriterion(type, values, ctx) {
|
|
564
|
-
switch (type) {
|
|
565
|
-
case 'salesChannel':
|
|
566
|
-
return values.includes(ctx.salesChannelId);
|
|
567
|
-
case 'organization':
|
|
568
|
-
return organizationMatchRank(values, ctx) !== undefined;
|
|
569
|
-
case 'customerGroup':
|
|
570
|
-
return ctx.customerGroupId !== null && values.includes(ctx.customerGroupId);
|
|
571
|
-
case 'category':
|
|
572
|
-
return values.some((c) => ctx.productCategoryIds.has(c));
|
|
573
|
-
case 'currency':
|
|
574
|
-
return values.includes(ctx.currencyCode);
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
function unionExplicit(evaluations) {
|
|
578
|
-
const out = new Set();
|
|
579
|
-
for (const e of evaluations) {
|
|
580
|
-
for (const t of e.explicitOn)
|
|
581
|
-
out.add(t);
|
|
582
|
-
}
|
|
583
|
-
return out;
|
|
584
|
-
}
|
|
585
222
|
//# sourceMappingURL=price-lists.js.map
|