@endora-commerce/contracts 0.106.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-contributions.d.ts +11 -6
- package/dist/admin-contributions.d.ts.map +1 -1
- package/dist/admin-contributions.js +9 -6
- package/dist/admin-contributions.js.map +1 -1
- 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/admin-roles.d.ts +32 -2
- package/dist/admin-roles.d.ts.map +1 -1
- package/dist/admin-roles.js +21 -1
- package/dist/admin-roles.js.map +1 -1
- package/dist/admin-search.d.ts +655 -0
- package/dist/admin-search.d.ts.map +1 -0
- package/dist/admin-search.js +179 -0
- package/dist/admin-search.js.map +1 -0
- package/dist/analytics.d.ts +5 -0
- package/dist/analytics.d.ts.map +1 -1
- package/dist/analytics.js +8 -0
- package/dist/analytics.js.map +1 -1
- package/dist/api-keys.d.ts +6 -0
- package/dist/api-keys.d.ts.map +1 -1
- package/dist/api-keys.js +5 -0
- package/dist/api-keys.js.map +1 -1
- package/dist/assets-library.d.ts +102 -0
- package/dist/assets-library.d.ts.map +1 -1
- package/dist/assets-library.js +89 -0
- package/dist/assets-library.js.map +1 -1
- package/dist/auth.d.ts +20 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +20 -0
- package/dist/auth.js.map +1 -1
- package/dist/blog.d.ts +1 -1
- package/dist/carts.d.ts +218 -7
- 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 +299 -14
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +136 -2
- package/dist/catalog.js.map +1 -1
- package/dist/cms.d.ts +183 -3
- package/dist/cms.d.ts.map +1 -1
- package/dist/cms.js +132 -1
- package/dist/cms.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 +80 -0
- package/dist/comparisons.d.ts.map +1 -1
- package/dist/comparisons.js +24 -0
- package/dist/comparisons.js.map +1 -1
- package/dist/credentials.d.ts +23 -0
- package/dist/credentials.d.ts.map +1 -1
- package/dist/credentials.js +24 -0
- package/dist/credentials.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 +92 -2
- 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 +417 -4
- 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/customer-accounts.d.ts +92 -2
- package/dist/customer-accounts.d.ts.map +1 -1
- package/dist/document-templates.d.ts +1368 -0
- package/dist/document-templates.d.ts.map +1 -0
- package/dist/document-templates.js +569 -0
- package/dist/document-templates.js.map +1 -0
- package/dist/document-values.d.ts +159 -0
- package/dist/document-values.d.ts.map +1 -0
- package/dist/document-values.js +220 -0
- package/dist/document-values.js.map +1 -0
- package/dist/errors.d.ts +122 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +172 -0
- package/dist/errors.js.map +1 -1
- package/dist/import-export.d.ts +11 -0
- package/dist/import-export.d.ts.map +1 -1
- package/dist/import-export.js +9 -0
- package/dist/import-export.js.map +1 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -1
- package/dist/index.js.map +1 -1
- package/dist/invoice-ledger.d.ts +6 -6
- package/dist/invoices.d.ts +88 -0
- package/dist/invoices.d.ts.map +1 -1
- package/dist/invoices.js +19 -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/mfa.d.ts +20 -0
- package/dist/mfa.d.ts.map +1 -1
- package/dist/modules.d.ts +20 -10
- package/dist/modules.d.ts.map +1 -1
- 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/newsletter.d.ts +2 -0
- package/dist/newsletter.d.ts.map +1 -1
- package/dist/newsletter.js +4 -0
- package/dist/newsletter.js.map +1 -1
- 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 +212 -2
- package/dist/orders.d.ts.map +1 -1
- package/dist/orders.js +124 -21
- package/dist/orders.js.map +1 -1
- package/dist/organizations.d.ts +78 -0
- package/dist/organizations.d.ts.map +1 -1
- package/dist/organizations.js +54 -0
- package/dist/organizations.js.map +1 -1
- package/dist/payment-methods.d.ts +2 -2
- 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 +398 -248
- package/dist/price-lists.d.ts.map +1 -1
- package/dist/price-lists.js +136 -244
- package/dist/price-lists.js.map +1 -1
- package/dist/product-feeds.d.ts +102 -21
- 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/prompt-actions.d.ts +25 -6
- package/dist/prompt-actions.d.ts.map +1 -1
- package/dist/prompt-actions.js +17 -1
- package/dist/prompt-actions.js.map +1 -1
- package/dist/pwa.d.ts +25 -0
- package/dist/pwa.d.ts.map +1 -1
- package/dist/pwa.js +38 -0
- package/dist/pwa.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 +903 -9
- package/dist/quote-requests.d.ts.map +1 -1
- package/dist/quote-requests.js +515 -8
- 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 +48 -0
- package/dist/sales-channels.d.ts.map +1 -1
- package/dist/sales-channels.js +42 -0
- package/dist/sales-channels.js.map +1 -1
- package/dist/saved-list-views.d.ts +140 -0
- package/dist/saved-list-views.d.ts.map +1 -0
- package/dist/saved-list-views.js +108 -0
- package/dist/saved-list-views.js.map +1 -0
- package/dist/search.d.ts +66 -0
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +4 -0
- package/dist/search.js.map +1 -1
- package/dist/seo.d.ts +2 -0
- package/dist/seo.d.ts.map +1 -1
- package/dist/seo.js +11 -0
- package/dist/seo.js.map +1 -1
- package/dist/shipping-methods.d.ts +2 -2
- 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
|
@@ -0,0 +1,2206 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** A non-negative amount with at most four fractional digits. */
|
|
3
|
+
export declare const PRICE_BOOK_AMOUNT: z.ZodString;
|
|
4
|
+
/** A signed amount adjustment with at most four fractional digits. */
|
|
5
|
+
export declare const PRICE_BOOK_SIGNED_AMOUNT: z.ZodString;
|
|
6
|
+
/** The bounds of a signed percentage (owner ruling N9): a free line to an elevenfold price. */
|
|
7
|
+
export declare const PRICE_BOOK_PERCENT_MIN = -100;
|
|
8
|
+
export declare const PRICE_BOOK_PERCENT_MAX = 1000;
|
|
9
|
+
/** A signed percentage with at most two fractional digits, within the N9 bounds. */
|
|
10
|
+
export declare const PRICE_BOOK_PERCENT: z.ZodString;
|
|
11
|
+
/** `regular` prices the catalogue and buyer tiers; `sale` is charged only when lower. */
|
|
12
|
+
export declare const priceBookTypeSchema: z.ZodEnum<{
|
|
13
|
+
sale: "sale";
|
|
14
|
+
regular: "regular";
|
|
15
|
+
}>;
|
|
16
|
+
export type PriceBookType = z.infer<typeof priceBookTypeSchema>;
|
|
17
|
+
export declare const priceBookStatusSchema: z.ZodEnum<{
|
|
18
|
+
expired: "expired";
|
|
19
|
+
draft: "draft";
|
|
20
|
+
active: "active";
|
|
21
|
+
scheduled: "scheduled";
|
|
22
|
+
}>;
|
|
23
|
+
export type PriceBookStatus = z.infer<typeof priceBookStatusSchema>;
|
|
24
|
+
export declare const priceBookAudienceKindSchema: z.ZodEnum<{
|
|
25
|
+
organizations: "organizations";
|
|
26
|
+
everyone: "everyone";
|
|
27
|
+
customer_groups: "customer_groups";
|
|
28
|
+
}>;
|
|
29
|
+
export type PriceBookAudienceKind = z.infer<typeof priceBookAudienceKindSchema>;
|
|
30
|
+
/** Most members one audience set may name. */
|
|
31
|
+
export declare const PRICE_BOOK_MAX_MEMBERS = 1000;
|
|
32
|
+
/** Most channels one channel set may name. */
|
|
33
|
+
export declare const PRICE_BOOK_MAX_CHANNELS = 100;
|
|
34
|
+
/**
|
|
35
|
+
* The audience set (owner ruling Q1): one kind, never mixed. `everyone` names
|
|
36
|
+
* no member; the other two kinds name ids of that kind, which the service
|
|
37
|
+
* checks exist and are of the kind (FR-002, A4). A draft may name none; a book
|
|
38
|
+
* of those kinds needs at least one member to be activated.
|
|
39
|
+
*/
|
|
40
|
+
export declare const priceBookAudienceSchema: z.ZodObject<{
|
|
41
|
+
kind: z.ZodEnum<{
|
|
42
|
+
organizations: "organizations";
|
|
43
|
+
everyone: "everyone";
|
|
44
|
+
customer_groups: "customer_groups";
|
|
45
|
+
}>;
|
|
46
|
+
memberIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
export type PriceBookAudience = z.infer<typeof priceBookAudienceSchema>;
|
|
49
|
+
export declare const priceBookChannelIdsSchema: z.ZodArray<z.ZodString>;
|
|
50
|
+
/** Body of `POST /api/v1/admin/price-books` (FR-001). The book is created as a draft. */
|
|
51
|
+
export declare const priceBookCreateSchema: z.ZodObject<{
|
|
52
|
+
name: z.ZodString;
|
|
53
|
+
type: z.ZodEnum<{
|
|
54
|
+
sale: "sale";
|
|
55
|
+
regular: "regular";
|
|
56
|
+
}>;
|
|
57
|
+
currencyCode: z.ZodString;
|
|
58
|
+
channelIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
59
|
+
audience: z.ZodObject<{
|
|
60
|
+
kind: z.ZodEnum<{
|
|
61
|
+
organizations: "organizations";
|
|
62
|
+
everyone: "everyone";
|
|
63
|
+
customer_groups: "customer_groups";
|
|
64
|
+
}>;
|
|
65
|
+
memberIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
priority: z.ZodDefault<z.ZodNumber>;
|
|
68
|
+
startsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
|
+
endsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
export type PriceBookCreate = z.infer<typeof priceBookCreateSchema>;
|
|
72
|
+
/**
|
|
73
|
+
* Body of `PATCH /api/v1/admin/price-books/:id`. The currency is not here: it is
|
|
74
|
+
* immutable (FR-004). The audience kind may change only while the book has
|
|
75
|
+
* never been active, which the service decides.
|
|
76
|
+
*/
|
|
77
|
+
export declare const priceBookPatchSchema: z.ZodObject<{
|
|
78
|
+
name: z.ZodOptional<z.ZodString>;
|
|
79
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
startsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
81
|
+
endsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
82
|
+
channelIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
83
|
+
audience: z.ZodOptional<z.ZodObject<{
|
|
84
|
+
kind: z.ZodEnum<{
|
|
85
|
+
organizations: "organizations";
|
|
86
|
+
everyone: "everyone";
|
|
87
|
+
customer_groups: "customer_groups";
|
|
88
|
+
}>;
|
|
89
|
+
memberIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
90
|
+
}, z.core.$strip>>;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
export type PriceBookPatch = z.infer<typeof priceBookPatchSchema>;
|
|
93
|
+
/** Derived from which selection coordinates are set; never stored. */
|
|
94
|
+
export declare const priceBookSelectionKindSchema: z.ZodEnum<{
|
|
95
|
+
all: "all";
|
|
96
|
+
category: "category";
|
|
97
|
+
product: "product";
|
|
98
|
+
attribute: "attribute";
|
|
99
|
+
variant: "variant";
|
|
100
|
+
category_attribute: "category_attribute";
|
|
101
|
+
}>;
|
|
102
|
+
export type PriceBookSelectionKind = z.infer<typeof priceBookSelectionKindSchema>;
|
|
103
|
+
export declare const priceBookAttributeSchema: z.ZodObject<{
|
|
104
|
+
key: z.ZodString;
|
|
105
|
+
value: z.ZodString;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
export type PriceBookAttribute = z.infer<typeof priceBookAttributeSchema>;
|
|
108
|
+
export declare const priceBookSelectionSchema: z.ZodObject<{
|
|
109
|
+
variantId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
110
|
+
productId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
|
+
categoryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
112
|
+
attribute: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
113
|
+
key: z.ZodString;
|
|
114
|
+
value: z.ZodString;
|
|
115
|
+
}, z.core.$strip>>>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
export type PriceBookSelection = z.infer<typeof priceBookSelectionSchema>;
|
|
118
|
+
/** `selectionKind` of a selection: variant > product > category ∩ attribute > category > attribute > all. */
|
|
119
|
+
export declare function priceBookSelectionKind(selection: {
|
|
120
|
+
variantId?: string | null | undefined;
|
|
121
|
+
productId?: string | null | undefined;
|
|
122
|
+
categoryId?: string | null | undefined;
|
|
123
|
+
attribute?: {
|
|
124
|
+
key: string;
|
|
125
|
+
value: string;
|
|
126
|
+
} | null | undefined;
|
|
127
|
+
}): PriceBookSelectionKind;
|
|
128
|
+
export declare const priceBookRowPriceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
129
|
+
type: z.ZodLiteral<"fixed">;
|
|
130
|
+
amount: z.ZodString;
|
|
131
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
132
|
+
type: z.ZodLiteral<"percent">;
|
|
133
|
+
percent: z.ZodString;
|
|
134
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
135
|
+
type: z.ZodLiteral<"amount">;
|
|
136
|
+
amount: z.ZodString;
|
|
137
|
+
}, z.core.$strip>], "type">;
|
|
138
|
+
export type PriceBookRowPrice = z.infer<typeof priceBookRowPriceSchema>;
|
|
139
|
+
/**
|
|
140
|
+
* The cross-field rules of a row (FR-005, FR-006): the CHECK constraints of
|
|
141
|
+
* `price_list_matrix_entries` that one field cannot express. One function so
|
|
142
|
+
* the request schema and the service's merge-then-validate apply the same rules.
|
|
143
|
+
*/
|
|
144
|
+
export declare function priceBookRowShapeIssues(row: {
|
|
145
|
+
selection: PriceBookSelection;
|
|
146
|
+
minQuantity: number;
|
|
147
|
+
maxQuantity: number | null;
|
|
148
|
+
price: PriceBookRowPrice;
|
|
149
|
+
}): Array<{
|
|
150
|
+
path: string[];
|
|
151
|
+
message: string;
|
|
152
|
+
reason: PriceBookRowErrorReason;
|
|
153
|
+
}>;
|
|
154
|
+
export declare const priceBookRowInputSchema: z.ZodObject<{
|
|
155
|
+
id: z.ZodOptional<z.ZodString>;
|
|
156
|
+
selection: z.ZodObject<{
|
|
157
|
+
variantId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
158
|
+
productId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
159
|
+
categoryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
160
|
+
attribute: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
161
|
+
key: z.ZodString;
|
|
162
|
+
value: z.ZodString;
|
|
163
|
+
}, z.core.$strip>>>;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
minQuantity: z.ZodNumber;
|
|
166
|
+
maxQuantity: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
167
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
168
|
+
type: z.ZodLiteral<"fixed">;
|
|
169
|
+
amount: z.ZodString;
|
|
170
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
171
|
+
type: z.ZodLiteral<"percent">;
|
|
172
|
+
percent: z.ZodString;
|
|
173
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
174
|
+
type: z.ZodLiteral<"amount">;
|
|
175
|
+
amount: z.ZodString;
|
|
176
|
+
}, z.core.$strip>], "type">;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
export type PriceBookRowInput = z.infer<typeof priceBookRowInputSchema>;
|
|
179
|
+
/** At most this many rows per book, and per batch call (unchanged from feature 148). */
|
|
180
|
+
export declare const PRICE_BOOK_MAX_ROWS = 5000;
|
|
181
|
+
export declare const PRICE_BOOK_MAX_ROWS_PER_BATCH = 5000;
|
|
182
|
+
/** Body of `PUT /api/v1/admin/price-books/:id/rows` — one audited command (FR-035). */
|
|
183
|
+
export declare const priceBookRowBatchSchema: z.ZodObject<{
|
|
184
|
+
upsert: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
185
|
+
id: z.ZodOptional<z.ZodString>;
|
|
186
|
+
selection: z.ZodObject<{
|
|
187
|
+
variantId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
188
|
+
productId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
189
|
+
categoryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
190
|
+
attribute: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
191
|
+
key: z.ZodString;
|
|
192
|
+
value: z.ZodString;
|
|
193
|
+
}, z.core.$strip>>>;
|
|
194
|
+
}, z.core.$strip>;
|
|
195
|
+
minQuantity: z.ZodNumber;
|
|
196
|
+
maxQuantity: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
197
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
198
|
+
type: z.ZodLiteral<"fixed">;
|
|
199
|
+
amount: z.ZodString;
|
|
200
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
201
|
+
type: z.ZodLiteral<"percent">;
|
|
202
|
+
percent: z.ZodString;
|
|
203
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
204
|
+
type: z.ZodLiteral<"amount">;
|
|
205
|
+
amount: z.ZodString;
|
|
206
|
+
}, z.core.$strip>], "type">;
|
|
207
|
+
}, z.core.$strip>>>;
|
|
208
|
+
delete: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
209
|
+
}, z.core.$strip>;
|
|
210
|
+
export type PriceBookRowBatch = z.infer<typeof priceBookRowBatchSchema>;
|
|
211
|
+
export declare const basePriceTierSchema: z.ZodObject<{
|
|
212
|
+
minQuantity: z.ZodNumber;
|
|
213
|
+
maxQuantity: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
214
|
+
amount: z.ZodString;
|
|
215
|
+
}, z.core.$strip>;
|
|
216
|
+
export type BasePriceTier = z.infer<typeof basePriceTierSchema>;
|
|
217
|
+
/**
|
|
218
|
+
* A variant's base row: its own tiers, or a percentage or amount adjustment of
|
|
219
|
+
* its product's base price at the same quantity (#377's three cases). `null`
|
|
220
|
+
* in a write means "inherits the product's base".
|
|
221
|
+
*/
|
|
222
|
+
export declare const variantBaseRowSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
223
|
+
type: z.ZodLiteral<"fixed">;
|
|
224
|
+
tiers: z.ZodArray<z.ZodObject<{
|
|
225
|
+
minQuantity: z.ZodNumber;
|
|
226
|
+
maxQuantity: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
227
|
+
amount: z.ZodString;
|
|
228
|
+
}, z.core.$strip>>;
|
|
229
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
230
|
+
type: z.ZodLiteral<"percent">;
|
|
231
|
+
percent: z.ZodString;
|
|
232
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
233
|
+
type: z.ZodLiteral<"amount">;
|
|
234
|
+
amount: z.ZodString;
|
|
235
|
+
}, z.core.$strip>], "type">;
|
|
236
|
+
export type VariantBaseRow = z.infer<typeof variantBaseRowSchema>;
|
|
237
|
+
export declare const basePricesForCurrencySchema: z.ZodObject<{
|
|
238
|
+
product: z.ZodArray<z.ZodObject<{
|
|
239
|
+
minQuantity: z.ZodNumber;
|
|
240
|
+
maxQuantity: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
241
|
+
amount: z.ZodString;
|
|
242
|
+
}, z.core.$strip>>;
|
|
243
|
+
variants: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
244
|
+
type: z.ZodLiteral<"fixed">;
|
|
245
|
+
tiers: z.ZodArray<z.ZodObject<{
|
|
246
|
+
minQuantity: z.ZodNumber;
|
|
247
|
+
maxQuantity: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
248
|
+
amount: z.ZodString;
|
|
249
|
+
}, z.core.$strip>>;
|
|
250
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
251
|
+
type: z.ZodLiteral<"percent">;
|
|
252
|
+
percent: z.ZodString;
|
|
253
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
254
|
+
type: z.ZodLiteral<"amount">;
|
|
255
|
+
amount: z.ZodString;
|
|
256
|
+
}, z.core.$strip>], "type">>>>;
|
|
257
|
+
}, z.core.$strip>;
|
|
258
|
+
export type BasePricesForCurrency = z.infer<typeof basePricesForCurrencySchema>;
|
|
259
|
+
/** Body of `PUT /api/v1/admin/price-books/base-prices/:productId` — one command across currencies. */
|
|
260
|
+
export declare const basePricesWriteSchema: z.ZodObject<{
|
|
261
|
+
byCurrency: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
262
|
+
product: z.ZodArray<z.ZodObject<{
|
|
263
|
+
minQuantity: z.ZodNumber;
|
|
264
|
+
maxQuantity: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
265
|
+
amount: z.ZodString;
|
|
266
|
+
}, z.core.$strip>>;
|
|
267
|
+
variants: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
268
|
+
type: z.ZodLiteral<"fixed">;
|
|
269
|
+
tiers: z.ZodArray<z.ZodObject<{
|
|
270
|
+
minQuantity: z.ZodNumber;
|
|
271
|
+
maxQuantity: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
272
|
+
amount: z.ZodString;
|
|
273
|
+
}, z.core.$strip>>;
|
|
274
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
275
|
+
type: z.ZodLiteral<"percent">;
|
|
276
|
+
percent: z.ZodString;
|
|
277
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
278
|
+
type: z.ZodLiteral<"amount">;
|
|
279
|
+
amount: z.ZodString;
|
|
280
|
+
}, z.core.$strip>], "type">>>>;
|
|
281
|
+
}, z.core.$strip>>;
|
|
282
|
+
}, z.core.$strip>;
|
|
283
|
+
export type BasePricesWrite = z.infer<typeof basePricesWriteSchema>;
|
|
284
|
+
/** Which tier priced a line (FR-030). */
|
|
285
|
+
export declare const priceSourceSchema: z.ZodEnum<{
|
|
286
|
+
buyer: "buyer";
|
|
287
|
+
base: "base";
|
|
288
|
+
catalogue: "catalogue";
|
|
289
|
+
sale: "sale";
|
|
290
|
+
}>;
|
|
291
|
+
export type PriceSource = z.infer<typeof priceSourceSchema>;
|
|
292
|
+
/** What a cart or order line records about its unit price: a tier, or an agreed price. */
|
|
293
|
+
export declare const linePriceSourceSchema: z.ZodEnum<{
|
|
294
|
+
buyer: "buyer";
|
|
295
|
+
agreed: "agreed";
|
|
296
|
+
base: "base";
|
|
297
|
+
catalogue: "catalogue";
|
|
298
|
+
sale: "sale";
|
|
299
|
+
}>;
|
|
300
|
+
export type LinePriceSource = z.infer<typeof linePriceSourceSchema>;
|
|
301
|
+
/** The twelve buyer cells: audience kind × selection kind (decision-record §5.6). */
|
|
302
|
+
export declare const PRICE_BOOK_CELL_CODES: readonly ["org.variant", "org.product", "org.category_attribute", "org.category", "org.attribute", "org.all", "group.variant", "group.product", "group.category_attribute", "group.category", "group.attribute", "group.all"];
|
|
303
|
+
export declare const priceBookCellCodeSchema: z.ZodEnum<{
|
|
304
|
+
"org.variant": "org.variant";
|
|
305
|
+
"org.product": "org.product";
|
|
306
|
+
"org.category_attribute": "org.category_attribute";
|
|
307
|
+
"org.category": "org.category";
|
|
308
|
+
"org.attribute": "org.attribute";
|
|
309
|
+
"org.all": "org.all";
|
|
310
|
+
"group.variant": "group.variant";
|
|
311
|
+
"group.product": "group.product";
|
|
312
|
+
"group.category_attribute": "group.category_attribute";
|
|
313
|
+
"group.category": "group.category";
|
|
314
|
+
"group.attribute": "group.attribute";
|
|
315
|
+
"group.all": "group.all";
|
|
316
|
+
}>;
|
|
317
|
+
export type PriceBookCellCode = z.infer<typeof priceBookCellCodeSchema>;
|
|
318
|
+
/** Human labels of a row's selection, resolved in batch for the grid (G2). */
|
|
319
|
+
export declare const priceBookRowLabelsSchema: z.ZodObject<{
|
|
320
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
321
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
322
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
323
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
324
|
+
categoryPath: z.ZodNullable<z.ZodString>;
|
|
325
|
+
attributeLabel: z.ZodNullable<z.ZodString>;
|
|
326
|
+
attributeValueLabel: z.ZodNullable<z.ZodString>;
|
|
327
|
+
}, z.core.$strip>;
|
|
328
|
+
export type PriceBookRowLabels = z.infer<typeof priceBookRowLabelsSchema>;
|
|
329
|
+
/** Most runner-up candidates an explanation lists. */
|
|
330
|
+
export declare const PRICE_BOOK_MAX_EXPLANATION_CANDIDATES = 10;
|
|
331
|
+
export declare const priceBookExplanationCandidateSchema: z.ZodObject<{
|
|
332
|
+
cell: z.ZodNullable<z.ZodEnum<{
|
|
333
|
+
"org.variant": "org.variant";
|
|
334
|
+
"org.product": "org.product";
|
|
335
|
+
"org.category_attribute": "org.category_attribute";
|
|
336
|
+
"org.category": "org.category";
|
|
337
|
+
"org.attribute": "org.attribute";
|
|
338
|
+
"org.all": "org.all";
|
|
339
|
+
"group.variant": "group.variant";
|
|
340
|
+
"group.product": "group.product";
|
|
341
|
+
"group.category_attribute": "group.category_attribute";
|
|
342
|
+
"group.category": "group.category";
|
|
343
|
+
"group.attribute": "group.attribute";
|
|
344
|
+
"group.all": "group.all";
|
|
345
|
+
}>>;
|
|
346
|
+
bookId: z.ZodString;
|
|
347
|
+
bookName: z.ZodString;
|
|
348
|
+
rowId: z.ZodString;
|
|
349
|
+
labels: z.ZodObject<{
|
|
350
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
351
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
352
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
353
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
354
|
+
categoryPath: z.ZodNullable<z.ZodString>;
|
|
355
|
+
attributeLabel: z.ZodNullable<z.ZodString>;
|
|
356
|
+
attributeValueLabel: z.ZodNullable<z.ZodString>;
|
|
357
|
+
}, z.core.$strip>;
|
|
358
|
+
amount: z.ZodString;
|
|
359
|
+
}, z.core.$strip>;
|
|
360
|
+
export declare const priceBookExplanationSchema: z.ZodObject<{
|
|
361
|
+
tier: z.ZodNullable<z.ZodEnum<{
|
|
362
|
+
buyer: "buyer";
|
|
363
|
+
base: "base";
|
|
364
|
+
catalogue: "catalogue";
|
|
365
|
+
sale: "sale";
|
|
366
|
+
}>>;
|
|
367
|
+
cell: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
368
|
+
"org.variant": "org.variant";
|
|
369
|
+
"org.product": "org.product";
|
|
370
|
+
"org.category_attribute": "org.category_attribute";
|
|
371
|
+
"org.category": "org.category";
|
|
372
|
+
"org.attribute": "org.attribute";
|
|
373
|
+
"org.all": "org.all";
|
|
374
|
+
"group.variant": "group.variant";
|
|
375
|
+
"group.product": "group.product";
|
|
376
|
+
"group.category_attribute": "group.category_attribute";
|
|
377
|
+
"group.category": "group.category";
|
|
378
|
+
"group.attribute": "group.attribute";
|
|
379
|
+
"group.all": "group.all";
|
|
380
|
+
}>>>;
|
|
381
|
+
bookId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
382
|
+
bookName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
383
|
+
rowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
384
|
+
reference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
385
|
+
precedenceVersion: z.ZodNumber;
|
|
386
|
+
candidates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
387
|
+
cell: z.ZodNullable<z.ZodEnum<{
|
|
388
|
+
"org.variant": "org.variant";
|
|
389
|
+
"org.product": "org.product";
|
|
390
|
+
"org.category_attribute": "org.category_attribute";
|
|
391
|
+
"org.category": "org.category";
|
|
392
|
+
"org.attribute": "org.attribute";
|
|
393
|
+
"org.all": "org.all";
|
|
394
|
+
"group.variant": "group.variant";
|
|
395
|
+
"group.product": "group.product";
|
|
396
|
+
"group.category_attribute": "group.category_attribute";
|
|
397
|
+
"group.category": "group.category";
|
|
398
|
+
"group.attribute": "group.attribute";
|
|
399
|
+
"group.all": "group.all";
|
|
400
|
+
}>>;
|
|
401
|
+
bookId: z.ZodString;
|
|
402
|
+
bookName: z.ZodString;
|
|
403
|
+
rowId: z.ZodString;
|
|
404
|
+
labels: z.ZodObject<{
|
|
405
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
406
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
407
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
408
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
409
|
+
categoryPath: z.ZodNullable<z.ZodString>;
|
|
410
|
+
attributeLabel: z.ZodNullable<z.ZodString>;
|
|
411
|
+
attributeValueLabel: z.ZodNullable<z.ZodString>;
|
|
412
|
+
}, z.core.$strip>;
|
|
413
|
+
amount: z.ZodString;
|
|
414
|
+
}, z.core.$strip>>>;
|
|
415
|
+
}, z.core.$strip>;
|
|
416
|
+
export type PriceBookExplanation = z.infer<typeof priceBookExplanationSchema>;
|
|
417
|
+
export declare const precedenceDepthModeSchema: z.ZodEnum<{
|
|
418
|
+
within_cell: "within_cell";
|
|
419
|
+
nearest_organization_first: "nearest_organization_first";
|
|
420
|
+
}>;
|
|
421
|
+
export type PrecedenceDepthMode = z.infer<typeof precedenceDepthModeSchema>;
|
|
422
|
+
export declare const precedencePresetNameSchema: z.ZodEnum<{
|
|
423
|
+
AF: "AF";
|
|
424
|
+
SF: "SF";
|
|
425
|
+
HY: "HY";
|
|
426
|
+
"AF-N": "AF-N";
|
|
427
|
+
}>;
|
|
428
|
+
export type PrecedencePresetName = z.infer<typeof precedencePresetNameSchema>;
|
|
429
|
+
/**
|
|
430
|
+
* A precedence configuration: the order of the twelve buyer cells, the
|
|
431
|
+
* category-before-attribute toggle and the depth mode. The shape is checked
|
|
432
|
+
* here; the invariants I1–I5 are the pure `validatePrecedence` of
|
|
433
|
+
* `price_lists`, which the resolver and the (P3) write path share.
|
|
434
|
+
*/
|
|
435
|
+
export declare const precedenceConfigSchema: z.ZodObject<{
|
|
436
|
+
cells: z.ZodArray<z.ZodEnum<{
|
|
437
|
+
"org.variant": "org.variant";
|
|
438
|
+
"org.product": "org.product";
|
|
439
|
+
"org.category_attribute": "org.category_attribute";
|
|
440
|
+
"org.category": "org.category";
|
|
441
|
+
"org.attribute": "org.attribute";
|
|
442
|
+
"org.all": "org.all";
|
|
443
|
+
"group.variant": "group.variant";
|
|
444
|
+
"group.product": "group.product";
|
|
445
|
+
"group.category_attribute": "group.category_attribute";
|
|
446
|
+
"group.category": "group.category";
|
|
447
|
+
"group.attribute": "group.attribute";
|
|
448
|
+
"group.all": "group.all";
|
|
449
|
+
}>>;
|
|
450
|
+
categoryBeforeAttribute: z.ZodBoolean;
|
|
451
|
+
depthMode: z.ZodEnum<{
|
|
452
|
+
within_cell: "within_cell";
|
|
453
|
+
nearest_organization_first: "nearest_organization_first";
|
|
454
|
+
}>;
|
|
455
|
+
}, z.core.$strip>;
|
|
456
|
+
export type PrecedenceConfigShape = z.infer<typeof precedenceConfigSchema>;
|
|
457
|
+
/** A channel binding of a book; `dormant` while the channel does not offer the book's currency (FR-011). */
|
|
458
|
+
export declare const priceBookChannelBindingSchema: z.ZodObject<{
|
|
459
|
+
channelId: z.ZodString;
|
|
460
|
+
dormant: z.ZodBoolean;
|
|
461
|
+
}, z.core.$strip>;
|
|
462
|
+
export type PriceBookChannelBinding = z.infer<typeof priceBookChannelBindingSchema>;
|
|
463
|
+
/**
|
|
464
|
+
* A book as the admin reads it. `version` moves on every write to the book —
|
|
465
|
+
* header, channel set, members, rows — and a write that names an older one is
|
|
466
|
+
* refused `409 PRICE_BOOK_STALE` (G5). `tierStarts` is every `minQuantity` a
|
|
467
|
+
* row of the book uses, ascending (G4): the grid's columns.
|
|
468
|
+
*/
|
|
469
|
+
export declare const priceBookSchema: z.ZodObject<{
|
|
470
|
+
id: z.ZodString;
|
|
471
|
+
name: z.ZodString;
|
|
472
|
+
type: z.ZodEnum<{
|
|
473
|
+
sale: "sale";
|
|
474
|
+
regular: "regular";
|
|
475
|
+
}>;
|
|
476
|
+
status: z.ZodEnum<{
|
|
477
|
+
expired: "expired";
|
|
478
|
+
draft: "draft";
|
|
479
|
+
active: "active";
|
|
480
|
+
scheduled: "scheduled";
|
|
481
|
+
}>;
|
|
482
|
+
currencyCode: z.ZodString;
|
|
483
|
+
audience: z.ZodObject<{
|
|
484
|
+
kind: z.ZodEnum<{
|
|
485
|
+
organizations: "organizations";
|
|
486
|
+
everyone: "everyone";
|
|
487
|
+
customer_groups: "customer_groups";
|
|
488
|
+
}>;
|
|
489
|
+
memberIds: z.ZodArray<z.ZodString>;
|
|
490
|
+
}, z.core.$strip>;
|
|
491
|
+
priority: z.ZodNumber;
|
|
492
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
493
|
+
endsAt: z.ZodNullable<z.ZodString>;
|
|
494
|
+
isSystem: z.ZodBoolean;
|
|
495
|
+
everActivated: z.ZodBoolean;
|
|
496
|
+
version: z.ZodNumber;
|
|
497
|
+
tierStarts: z.ZodArray<z.ZodNumber>;
|
|
498
|
+
channels: z.ZodArray<z.ZodObject<{
|
|
499
|
+
channelId: z.ZodString;
|
|
500
|
+
dormant: z.ZodBoolean;
|
|
501
|
+
}, z.core.$strip>>;
|
|
502
|
+
rowCount: z.ZodNumber;
|
|
503
|
+
writable: z.ZodBoolean;
|
|
504
|
+
}, z.core.$strip>;
|
|
505
|
+
export type PriceBook = z.infer<typeof priceBookSchema>;
|
|
506
|
+
/** A row of a book that prices the product a book list was filtered by (G1). */
|
|
507
|
+
export declare const priceBookRowMatchSchema: z.ZodObject<{
|
|
508
|
+
rowId: z.ZodString;
|
|
509
|
+
selectionKind: z.ZodEnum<{
|
|
510
|
+
all: "all";
|
|
511
|
+
category: "category";
|
|
512
|
+
product: "product";
|
|
513
|
+
attribute: "attribute";
|
|
514
|
+
variant: "variant";
|
|
515
|
+
category_attribute: "category_attribute";
|
|
516
|
+
}>;
|
|
517
|
+
minQuantity: z.ZodNumber;
|
|
518
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
519
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
520
|
+
type: z.ZodLiteral<"fixed">;
|
|
521
|
+
amount: z.ZodString;
|
|
522
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
523
|
+
type: z.ZodLiteral<"percent">;
|
|
524
|
+
percent: z.ZodString;
|
|
525
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
526
|
+
type: z.ZodLiteral<"amount">;
|
|
527
|
+
amount: z.ZodString;
|
|
528
|
+
}, z.core.$strip>], "type">;
|
|
529
|
+
}, z.core.$strip>;
|
|
530
|
+
export type PriceBookRowMatch = z.infer<typeof priceBookRowMatchSchema>;
|
|
531
|
+
/** One line of the book list. */
|
|
532
|
+
export declare const priceBookSummarySchema: z.ZodObject<{
|
|
533
|
+
id: z.ZodString;
|
|
534
|
+
name: z.ZodString;
|
|
535
|
+
type: z.ZodEnum<{
|
|
536
|
+
sale: "sale";
|
|
537
|
+
regular: "regular";
|
|
538
|
+
}>;
|
|
539
|
+
status: z.ZodEnum<{
|
|
540
|
+
expired: "expired";
|
|
541
|
+
draft: "draft";
|
|
542
|
+
active: "active";
|
|
543
|
+
scheduled: "scheduled";
|
|
544
|
+
}>;
|
|
545
|
+
currencyCode: z.ZodString;
|
|
546
|
+
audienceKind: z.ZodEnum<{
|
|
547
|
+
organizations: "organizations";
|
|
548
|
+
everyone: "everyone";
|
|
549
|
+
customer_groups: "customer_groups";
|
|
550
|
+
}>;
|
|
551
|
+
priority: z.ZodNumber;
|
|
552
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
553
|
+
endsAt: z.ZodNullable<z.ZodString>;
|
|
554
|
+
isSystem: z.ZodBoolean;
|
|
555
|
+
version: z.ZodNumber;
|
|
556
|
+
tierStarts: z.ZodArray<z.ZodNumber>;
|
|
557
|
+
channelCount: z.ZodNumber;
|
|
558
|
+
memberCount: z.ZodNumber;
|
|
559
|
+
rowCount: z.ZodNumber;
|
|
560
|
+
appliesToNoOne: z.ZodBoolean;
|
|
561
|
+
appliesNowhere: z.ZodBoolean;
|
|
562
|
+
matches: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
563
|
+
rowId: z.ZodString;
|
|
564
|
+
selectionKind: z.ZodEnum<{
|
|
565
|
+
all: "all";
|
|
566
|
+
category: "category";
|
|
567
|
+
product: "product";
|
|
568
|
+
attribute: "attribute";
|
|
569
|
+
variant: "variant";
|
|
570
|
+
category_attribute: "category_attribute";
|
|
571
|
+
}>;
|
|
572
|
+
minQuantity: z.ZodNumber;
|
|
573
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
574
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
575
|
+
type: z.ZodLiteral<"fixed">;
|
|
576
|
+
amount: z.ZodString;
|
|
577
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
578
|
+
type: z.ZodLiteral<"percent">;
|
|
579
|
+
percent: z.ZodString;
|
|
580
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
581
|
+
type: z.ZodLiteral<"amount">;
|
|
582
|
+
amount: z.ZodString;
|
|
583
|
+
}, z.core.$strip>], "type">;
|
|
584
|
+
}, z.core.$strip>>>;
|
|
585
|
+
writable: z.ZodBoolean;
|
|
586
|
+
}, z.core.$strip>;
|
|
587
|
+
export type PriceBookSummary = z.infer<typeof priceBookSummarySchema>;
|
|
588
|
+
/**
|
|
589
|
+
* `GET /api/v1/admin/price-books`. With `productId` (and optionally
|
|
590
|
+
* `variantId`) the list holds only books with a row naming that product or
|
|
591
|
+
* variant directly, each carrying its `matches` (G1).
|
|
592
|
+
*/
|
|
593
|
+
export declare const priceBookListQuerySchema: z.ZodObject<{
|
|
594
|
+
type: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
595
|
+
sale: "sale";
|
|
596
|
+
regular: "regular";
|
|
597
|
+
}>>>>;
|
|
598
|
+
status: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
599
|
+
expired: "expired";
|
|
600
|
+
draft: "draft";
|
|
601
|
+
active: "active";
|
|
602
|
+
scheduled: "scheduled";
|
|
603
|
+
}>>>>;
|
|
604
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
605
|
+
channelId: z.ZodOptional<z.ZodString>;
|
|
606
|
+
audienceKind: z.ZodOptional<z.ZodEnum<{
|
|
607
|
+
organizations: "organizations";
|
|
608
|
+
everyone: "everyone";
|
|
609
|
+
customer_groups: "customer_groups";
|
|
610
|
+
}>>;
|
|
611
|
+
memberId: z.ZodOptional<z.ZodString>;
|
|
612
|
+
search: z.ZodOptional<z.ZodString>;
|
|
613
|
+
productId: z.ZodOptional<z.ZodString>;
|
|
614
|
+
variantId: z.ZodOptional<z.ZodString>;
|
|
615
|
+
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
616
|
+
pageSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
617
|
+
}, z.core.$strip>;
|
|
618
|
+
export type PriceBookListQuery = z.infer<typeof priceBookListQuerySchema>;
|
|
619
|
+
export declare const pageMetaSchema: z.ZodObject<{
|
|
620
|
+
page: z.ZodNumber;
|
|
621
|
+
pageSize: z.ZodNumber;
|
|
622
|
+
totalCount: z.ZodNumber;
|
|
623
|
+
}, z.core.$strip>;
|
|
624
|
+
export declare const priceBookListResponseSchema: z.ZodObject<{
|
|
625
|
+
data: z.ZodArray<z.ZodObject<{
|
|
626
|
+
id: z.ZodString;
|
|
627
|
+
name: z.ZodString;
|
|
628
|
+
type: z.ZodEnum<{
|
|
629
|
+
sale: "sale";
|
|
630
|
+
regular: "regular";
|
|
631
|
+
}>;
|
|
632
|
+
status: z.ZodEnum<{
|
|
633
|
+
expired: "expired";
|
|
634
|
+
draft: "draft";
|
|
635
|
+
active: "active";
|
|
636
|
+
scheduled: "scheduled";
|
|
637
|
+
}>;
|
|
638
|
+
currencyCode: z.ZodString;
|
|
639
|
+
audienceKind: z.ZodEnum<{
|
|
640
|
+
organizations: "organizations";
|
|
641
|
+
everyone: "everyone";
|
|
642
|
+
customer_groups: "customer_groups";
|
|
643
|
+
}>;
|
|
644
|
+
priority: z.ZodNumber;
|
|
645
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
646
|
+
endsAt: z.ZodNullable<z.ZodString>;
|
|
647
|
+
isSystem: z.ZodBoolean;
|
|
648
|
+
version: z.ZodNumber;
|
|
649
|
+
tierStarts: z.ZodArray<z.ZodNumber>;
|
|
650
|
+
channelCount: z.ZodNumber;
|
|
651
|
+
memberCount: z.ZodNumber;
|
|
652
|
+
rowCount: z.ZodNumber;
|
|
653
|
+
appliesToNoOne: z.ZodBoolean;
|
|
654
|
+
appliesNowhere: z.ZodBoolean;
|
|
655
|
+
matches: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
656
|
+
rowId: z.ZodString;
|
|
657
|
+
selectionKind: z.ZodEnum<{
|
|
658
|
+
all: "all";
|
|
659
|
+
category: "category";
|
|
660
|
+
product: "product";
|
|
661
|
+
attribute: "attribute";
|
|
662
|
+
variant: "variant";
|
|
663
|
+
category_attribute: "category_attribute";
|
|
664
|
+
}>;
|
|
665
|
+
minQuantity: z.ZodNumber;
|
|
666
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
667
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
668
|
+
type: z.ZodLiteral<"fixed">;
|
|
669
|
+
amount: z.ZodString;
|
|
670
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
671
|
+
type: z.ZodLiteral<"percent">;
|
|
672
|
+
percent: z.ZodString;
|
|
673
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
674
|
+
type: z.ZodLiteral<"amount">;
|
|
675
|
+
amount: z.ZodString;
|
|
676
|
+
}, z.core.$strip>], "type">;
|
|
677
|
+
}, z.core.$strip>>>;
|
|
678
|
+
writable: z.ZodBoolean;
|
|
679
|
+
}, z.core.$strip>>;
|
|
680
|
+
meta: z.ZodObject<{
|
|
681
|
+
page: z.ZodNumber;
|
|
682
|
+
pageSize: z.ZodNumber;
|
|
683
|
+
totalCount: z.ZodNumber;
|
|
684
|
+
creatableAudienceKinds: z.ZodArray<z.ZodEnum<{
|
|
685
|
+
organizations: "organizations";
|
|
686
|
+
everyone: "everyone";
|
|
687
|
+
customer_groups: "customer_groups";
|
|
688
|
+
}>>;
|
|
689
|
+
}, z.core.$strip>;
|
|
690
|
+
}, z.core.$strip>;
|
|
691
|
+
export type PriceBookListResponse = z.infer<typeof priceBookListResponseSchema>;
|
|
692
|
+
/** Body of `PATCH /api/v1/admin/price-books/:id`: the patch and the version it was made against (G5). */
|
|
693
|
+
export declare const priceBookPatchRequestSchema: z.ZodObject<{
|
|
694
|
+
name: z.ZodOptional<z.ZodString>;
|
|
695
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
696
|
+
startsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
697
|
+
endsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
698
|
+
channelIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
699
|
+
audience: z.ZodOptional<z.ZodObject<{
|
|
700
|
+
kind: z.ZodEnum<{
|
|
701
|
+
organizations: "organizations";
|
|
702
|
+
everyone: "everyone";
|
|
703
|
+
customer_groups: "customer_groups";
|
|
704
|
+
}>;
|
|
705
|
+
memberIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
706
|
+
}, z.core.$strip>>;
|
|
707
|
+
expectedVersion: z.ZodOptional<z.ZodNumber>;
|
|
708
|
+
}, z.core.$strip>;
|
|
709
|
+
export type PriceBookPatchRequest = z.infer<typeof priceBookPatchRequestSchema>;
|
|
710
|
+
/** Body of `POST /api/v1/admin/price-books/:id/duplicate` (FR-036). */
|
|
711
|
+
export declare const priceBookDuplicateSchema: z.ZodObject<{
|
|
712
|
+
name: z.ZodString;
|
|
713
|
+
channelIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
714
|
+
currencyCode: z.ZodString;
|
|
715
|
+
audience: z.ZodObject<{
|
|
716
|
+
kind: z.ZodEnum<{
|
|
717
|
+
organizations: "organizations";
|
|
718
|
+
everyone: "everyone";
|
|
719
|
+
customer_groups: "customer_groups";
|
|
720
|
+
}>;
|
|
721
|
+
memberIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
722
|
+
}, z.core.$strip>;
|
|
723
|
+
amountMultiplier: z.ZodDefault<z.ZodString>;
|
|
724
|
+
}, z.core.$strip>;
|
|
725
|
+
export type PriceBookDuplicate = z.infer<typeof priceBookDuplicateSchema>;
|
|
726
|
+
/** Why a stored row prices nothing now (FR-016 of 161). */
|
|
727
|
+
export declare const priceBookRowInactiveReasonSchema: z.ZodEnum<{
|
|
728
|
+
attribute_not_price_rule: "attribute_not_price_rule";
|
|
729
|
+
attribute_deleted: "attribute_deleted";
|
|
730
|
+
target_deleted: "target_deleted";
|
|
731
|
+
}>;
|
|
732
|
+
export type PriceBookRowInactiveReason = z.infer<typeof priceBookRowInactiveReasonSchema>;
|
|
733
|
+
/**
|
|
734
|
+
* The natural key of a row's selection (G10): what a CSV file names instead of
|
|
735
|
+
* ids. `categoryPath` is the category's slugs from the root, joined by `/`;
|
|
736
|
+
* `attribute.valueCode` is the option code stored on the row.
|
|
737
|
+
*/
|
|
738
|
+
export declare const priceBookNaturalKeySchema: z.ZodObject<{
|
|
739
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
740
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
741
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
742
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
743
|
+
key: z.ZodString;
|
|
744
|
+
valueCode: z.ZodString;
|
|
745
|
+
}, z.core.$strip>>;
|
|
746
|
+
}, z.core.$strip>;
|
|
747
|
+
export type PriceBookNaturalKey = z.infer<typeof priceBookNaturalKeySchema>;
|
|
748
|
+
export declare const priceBookRowSchema: z.ZodObject<{
|
|
749
|
+
id: z.ZodString;
|
|
750
|
+
selectionKind: z.ZodEnum<{
|
|
751
|
+
all: "all";
|
|
752
|
+
category: "category";
|
|
753
|
+
product: "product";
|
|
754
|
+
attribute: "attribute";
|
|
755
|
+
variant: "variant";
|
|
756
|
+
category_attribute: "category_attribute";
|
|
757
|
+
}>;
|
|
758
|
+
selection: z.ZodObject<{
|
|
759
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
760
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
761
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
762
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
763
|
+
key: z.ZodString;
|
|
764
|
+
value: z.ZodString;
|
|
765
|
+
}, z.core.$strip>>;
|
|
766
|
+
}, z.core.$strip>;
|
|
767
|
+
minQuantity: z.ZodNumber;
|
|
768
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
769
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
770
|
+
type: z.ZodLiteral<"fixed">;
|
|
771
|
+
amount: z.ZodString;
|
|
772
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
773
|
+
type: z.ZodLiteral<"percent">;
|
|
774
|
+
percent: z.ZodString;
|
|
775
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
776
|
+
type: z.ZodLiteral<"amount">;
|
|
777
|
+
amount: z.ZodString;
|
|
778
|
+
}, z.core.$strip>], "type">;
|
|
779
|
+
inactiveReason: z.ZodNullable<z.ZodEnum<{
|
|
780
|
+
attribute_not_price_rule: "attribute_not_price_rule";
|
|
781
|
+
attribute_deleted: "attribute_deleted";
|
|
782
|
+
target_deleted: "target_deleted";
|
|
783
|
+
}>>;
|
|
784
|
+
targetDeleted: z.ZodBoolean;
|
|
785
|
+
labels: z.ZodObject<{
|
|
786
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
787
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
788
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
789
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
790
|
+
categoryPath: z.ZodNullable<z.ZodString>;
|
|
791
|
+
attributeLabel: z.ZodNullable<z.ZodString>;
|
|
792
|
+
attributeValueLabel: z.ZodNullable<z.ZodString>;
|
|
793
|
+
}, z.core.$strip>;
|
|
794
|
+
naturalKey: z.ZodObject<{
|
|
795
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
796
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
797
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
798
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
799
|
+
key: z.ZodString;
|
|
800
|
+
valueCode: z.ZodString;
|
|
801
|
+
}, z.core.$strip>>;
|
|
802
|
+
}, z.core.$strip>;
|
|
803
|
+
}, z.core.$strip>;
|
|
804
|
+
export type PriceBookRow = z.infer<typeof priceBookRowSchema>;
|
|
805
|
+
/** `GET /api/v1/admin/price-books/:id/rows`; `search` matches the labels and SKUs (G3). */
|
|
806
|
+
export declare const priceBookRowsQuerySchema: z.ZodObject<{
|
|
807
|
+
selectionKind: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
808
|
+
all: "all";
|
|
809
|
+
category: "category";
|
|
810
|
+
product: "product";
|
|
811
|
+
attribute: "attribute";
|
|
812
|
+
variant: "variant";
|
|
813
|
+
category_attribute: "category_attribute";
|
|
814
|
+
}>>>>;
|
|
815
|
+
productId: z.ZodOptional<z.ZodString>;
|
|
816
|
+
variantId: z.ZodOptional<z.ZodString>;
|
|
817
|
+
categoryId: z.ZodOptional<z.ZodString>;
|
|
818
|
+
attributeKey: z.ZodOptional<z.ZodString>;
|
|
819
|
+
search: z.ZodOptional<z.ZodString>;
|
|
820
|
+
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
821
|
+
pageSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
822
|
+
}, z.core.$strip>;
|
|
823
|
+
export type PriceBookRowsQuery = z.infer<typeof priceBookRowsQuerySchema>;
|
|
824
|
+
/** Most lines one page of `GET …/:id/lines` answers. */
|
|
825
|
+
export declare const PRICE_BOOK_LINES_MAX_PAGE_SIZE = 500;
|
|
826
|
+
/**
|
|
827
|
+
* `GET /api/v1/admin/price-books/:id/lines` (feature 161, G15): the grid's
|
|
828
|
+
* pages, cut by **line** — a selection with every row it holds, a product with
|
|
829
|
+
* its variants — never by row. `kind` narrows to selection kinds (a `variant`
|
|
830
|
+
* filter answers the product lines that carry a variant line); `search`
|
|
831
|
+
* matches the labels of attribute and category lines and the catalogue's name
|
|
832
|
+
* and SKU search for product lines.
|
|
833
|
+
*/
|
|
834
|
+
export declare const priceBookLinesQuerySchema: z.ZodObject<{
|
|
835
|
+
kind: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
836
|
+
all: "all";
|
|
837
|
+
category: "category";
|
|
838
|
+
product: "product";
|
|
839
|
+
attribute: "attribute";
|
|
840
|
+
variant: "variant";
|
|
841
|
+
category_attribute: "category_attribute";
|
|
842
|
+
}>>>>;
|
|
843
|
+
search: z.ZodOptional<z.ZodString>;
|
|
844
|
+
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
845
|
+
pageSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
846
|
+
}, z.core.$strip>;
|
|
847
|
+
export type PriceBookLinesQuery = z.infer<typeof priceBookLinesQuerySchema>;
|
|
848
|
+
/** A variant's line, nested under its product's. */
|
|
849
|
+
export declare const priceBookVariantLineSchema: z.ZodObject<{
|
|
850
|
+
selectionKey: z.ZodString;
|
|
851
|
+
selectionKind: z.ZodEnum<{
|
|
852
|
+
all: "all";
|
|
853
|
+
category: "category";
|
|
854
|
+
product: "product";
|
|
855
|
+
attribute: "attribute";
|
|
856
|
+
variant: "variant";
|
|
857
|
+
category_attribute: "category_attribute";
|
|
858
|
+
}>;
|
|
859
|
+
selection: z.ZodObject<{
|
|
860
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
861
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
862
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
863
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
864
|
+
key: z.ZodString;
|
|
865
|
+
value: z.ZodString;
|
|
866
|
+
}, z.core.$strip>>;
|
|
867
|
+
}, z.core.$strip>;
|
|
868
|
+
labels: z.ZodObject<{
|
|
869
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
870
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
871
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
872
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
873
|
+
categoryPath: z.ZodNullable<z.ZodString>;
|
|
874
|
+
attributeLabel: z.ZodNullable<z.ZodString>;
|
|
875
|
+
attributeValueLabel: z.ZodNullable<z.ZodString>;
|
|
876
|
+
}, z.core.$strip>;
|
|
877
|
+
naturalKey: z.ZodObject<{
|
|
878
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
879
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
880
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
881
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
882
|
+
key: z.ZodString;
|
|
883
|
+
valueCode: z.ZodString;
|
|
884
|
+
}, z.core.$strip>>;
|
|
885
|
+
}, z.core.$strip>;
|
|
886
|
+
inactiveReason: z.ZodNullable<z.ZodEnum<{
|
|
887
|
+
attribute_not_price_rule: "attribute_not_price_rule";
|
|
888
|
+
attribute_deleted: "attribute_deleted";
|
|
889
|
+
target_deleted: "target_deleted";
|
|
890
|
+
}>>;
|
|
891
|
+
targetDeleted: z.ZodBoolean;
|
|
892
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
893
|
+
id: z.ZodString;
|
|
894
|
+
selectionKind: z.ZodEnum<{
|
|
895
|
+
all: "all";
|
|
896
|
+
category: "category";
|
|
897
|
+
product: "product";
|
|
898
|
+
attribute: "attribute";
|
|
899
|
+
variant: "variant";
|
|
900
|
+
category_attribute: "category_attribute";
|
|
901
|
+
}>;
|
|
902
|
+
selection: z.ZodObject<{
|
|
903
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
904
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
905
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
906
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
907
|
+
key: z.ZodString;
|
|
908
|
+
value: z.ZodString;
|
|
909
|
+
}, z.core.$strip>>;
|
|
910
|
+
}, z.core.$strip>;
|
|
911
|
+
minQuantity: z.ZodNumber;
|
|
912
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
913
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
914
|
+
type: z.ZodLiteral<"fixed">;
|
|
915
|
+
amount: z.ZodString;
|
|
916
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
917
|
+
type: z.ZodLiteral<"percent">;
|
|
918
|
+
percent: z.ZodString;
|
|
919
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
920
|
+
type: z.ZodLiteral<"amount">;
|
|
921
|
+
amount: z.ZodString;
|
|
922
|
+
}, z.core.$strip>], "type">;
|
|
923
|
+
inactiveReason: z.ZodNullable<z.ZodEnum<{
|
|
924
|
+
attribute_not_price_rule: "attribute_not_price_rule";
|
|
925
|
+
attribute_deleted: "attribute_deleted";
|
|
926
|
+
target_deleted: "target_deleted";
|
|
927
|
+
}>>;
|
|
928
|
+
targetDeleted: z.ZodBoolean;
|
|
929
|
+
labels: z.ZodObject<{
|
|
930
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
931
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
932
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
933
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
934
|
+
categoryPath: z.ZodNullable<z.ZodString>;
|
|
935
|
+
attributeLabel: z.ZodNullable<z.ZodString>;
|
|
936
|
+
attributeValueLabel: z.ZodNullable<z.ZodString>;
|
|
937
|
+
}, z.core.$strip>;
|
|
938
|
+
naturalKey: z.ZodObject<{
|
|
939
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
940
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
941
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
942
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
943
|
+
key: z.ZodString;
|
|
944
|
+
valueCode: z.ZodString;
|
|
945
|
+
}, z.core.$strip>>;
|
|
946
|
+
}, z.core.$strip>;
|
|
947
|
+
}, z.core.$strip>>;
|
|
948
|
+
}, z.core.$strip>;
|
|
949
|
+
export type PriceBookVariantLine = z.infer<typeof priceBookVariantLineSchema>;
|
|
950
|
+
/**
|
|
951
|
+
* One line of a book. A product line carries `variants` — its variants that
|
|
952
|
+
* the book prices — and exists even when only its variants hold rows (`rows`
|
|
953
|
+
* is then empty). Other kinds carry no `variants`.
|
|
954
|
+
*/
|
|
955
|
+
export declare const priceBookLineSchema: z.ZodObject<{
|
|
956
|
+
variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
957
|
+
selectionKey: z.ZodString;
|
|
958
|
+
selectionKind: z.ZodEnum<{
|
|
959
|
+
all: "all";
|
|
960
|
+
category: "category";
|
|
961
|
+
product: "product";
|
|
962
|
+
attribute: "attribute";
|
|
963
|
+
variant: "variant";
|
|
964
|
+
category_attribute: "category_attribute";
|
|
965
|
+
}>;
|
|
966
|
+
selection: z.ZodObject<{
|
|
967
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
968
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
969
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
970
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
971
|
+
key: z.ZodString;
|
|
972
|
+
value: z.ZodString;
|
|
973
|
+
}, z.core.$strip>>;
|
|
974
|
+
}, z.core.$strip>;
|
|
975
|
+
labels: z.ZodObject<{
|
|
976
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
977
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
978
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
979
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
980
|
+
categoryPath: z.ZodNullable<z.ZodString>;
|
|
981
|
+
attributeLabel: z.ZodNullable<z.ZodString>;
|
|
982
|
+
attributeValueLabel: z.ZodNullable<z.ZodString>;
|
|
983
|
+
}, z.core.$strip>;
|
|
984
|
+
naturalKey: z.ZodObject<{
|
|
985
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
986
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
987
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
988
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
989
|
+
key: z.ZodString;
|
|
990
|
+
valueCode: z.ZodString;
|
|
991
|
+
}, z.core.$strip>>;
|
|
992
|
+
}, z.core.$strip>;
|
|
993
|
+
inactiveReason: z.ZodNullable<z.ZodEnum<{
|
|
994
|
+
attribute_not_price_rule: "attribute_not_price_rule";
|
|
995
|
+
attribute_deleted: "attribute_deleted";
|
|
996
|
+
target_deleted: "target_deleted";
|
|
997
|
+
}>>;
|
|
998
|
+
targetDeleted: z.ZodBoolean;
|
|
999
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
1000
|
+
id: z.ZodString;
|
|
1001
|
+
selectionKind: z.ZodEnum<{
|
|
1002
|
+
all: "all";
|
|
1003
|
+
category: "category";
|
|
1004
|
+
product: "product";
|
|
1005
|
+
attribute: "attribute";
|
|
1006
|
+
variant: "variant";
|
|
1007
|
+
category_attribute: "category_attribute";
|
|
1008
|
+
}>;
|
|
1009
|
+
selection: z.ZodObject<{
|
|
1010
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1011
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
1012
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
1013
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
1014
|
+
key: z.ZodString;
|
|
1015
|
+
value: z.ZodString;
|
|
1016
|
+
}, z.core.$strip>>;
|
|
1017
|
+
}, z.core.$strip>;
|
|
1018
|
+
minQuantity: z.ZodNumber;
|
|
1019
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
1020
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1021
|
+
type: z.ZodLiteral<"fixed">;
|
|
1022
|
+
amount: z.ZodString;
|
|
1023
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1024
|
+
type: z.ZodLiteral<"percent">;
|
|
1025
|
+
percent: z.ZodString;
|
|
1026
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1027
|
+
type: z.ZodLiteral<"amount">;
|
|
1028
|
+
amount: z.ZodString;
|
|
1029
|
+
}, z.core.$strip>], "type">;
|
|
1030
|
+
inactiveReason: z.ZodNullable<z.ZodEnum<{
|
|
1031
|
+
attribute_not_price_rule: "attribute_not_price_rule";
|
|
1032
|
+
attribute_deleted: "attribute_deleted";
|
|
1033
|
+
target_deleted: "target_deleted";
|
|
1034
|
+
}>>;
|
|
1035
|
+
targetDeleted: z.ZodBoolean;
|
|
1036
|
+
labels: z.ZodObject<{
|
|
1037
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
1038
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
1039
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
1040
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
1041
|
+
categoryPath: z.ZodNullable<z.ZodString>;
|
|
1042
|
+
attributeLabel: z.ZodNullable<z.ZodString>;
|
|
1043
|
+
attributeValueLabel: z.ZodNullable<z.ZodString>;
|
|
1044
|
+
}, z.core.$strip>;
|
|
1045
|
+
naturalKey: z.ZodObject<{
|
|
1046
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
1047
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
1048
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
1049
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
1050
|
+
key: z.ZodString;
|
|
1051
|
+
valueCode: z.ZodString;
|
|
1052
|
+
}, z.core.$strip>>;
|
|
1053
|
+
}, z.core.$strip>;
|
|
1054
|
+
}, z.core.$strip>>;
|
|
1055
|
+
}, z.core.$strip>>>;
|
|
1056
|
+
selectionKey: z.ZodString;
|
|
1057
|
+
selectionKind: z.ZodEnum<{
|
|
1058
|
+
all: "all";
|
|
1059
|
+
category: "category";
|
|
1060
|
+
product: "product";
|
|
1061
|
+
attribute: "attribute";
|
|
1062
|
+
variant: "variant";
|
|
1063
|
+
category_attribute: "category_attribute";
|
|
1064
|
+
}>;
|
|
1065
|
+
selection: z.ZodObject<{
|
|
1066
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1067
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
1068
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
1069
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
1070
|
+
key: z.ZodString;
|
|
1071
|
+
value: z.ZodString;
|
|
1072
|
+
}, z.core.$strip>>;
|
|
1073
|
+
}, z.core.$strip>;
|
|
1074
|
+
labels: z.ZodObject<{
|
|
1075
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
1076
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
1077
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
1078
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
1079
|
+
categoryPath: z.ZodNullable<z.ZodString>;
|
|
1080
|
+
attributeLabel: z.ZodNullable<z.ZodString>;
|
|
1081
|
+
attributeValueLabel: z.ZodNullable<z.ZodString>;
|
|
1082
|
+
}, z.core.$strip>;
|
|
1083
|
+
naturalKey: z.ZodObject<{
|
|
1084
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
1085
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
1086
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
1087
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
1088
|
+
key: z.ZodString;
|
|
1089
|
+
valueCode: z.ZodString;
|
|
1090
|
+
}, z.core.$strip>>;
|
|
1091
|
+
}, z.core.$strip>;
|
|
1092
|
+
inactiveReason: z.ZodNullable<z.ZodEnum<{
|
|
1093
|
+
attribute_not_price_rule: "attribute_not_price_rule";
|
|
1094
|
+
attribute_deleted: "attribute_deleted";
|
|
1095
|
+
target_deleted: "target_deleted";
|
|
1096
|
+
}>>;
|
|
1097
|
+
targetDeleted: z.ZodBoolean;
|
|
1098
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
1099
|
+
id: z.ZodString;
|
|
1100
|
+
selectionKind: z.ZodEnum<{
|
|
1101
|
+
all: "all";
|
|
1102
|
+
category: "category";
|
|
1103
|
+
product: "product";
|
|
1104
|
+
attribute: "attribute";
|
|
1105
|
+
variant: "variant";
|
|
1106
|
+
category_attribute: "category_attribute";
|
|
1107
|
+
}>;
|
|
1108
|
+
selection: z.ZodObject<{
|
|
1109
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1110
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
1111
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
1112
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
1113
|
+
key: z.ZodString;
|
|
1114
|
+
value: z.ZodString;
|
|
1115
|
+
}, z.core.$strip>>;
|
|
1116
|
+
}, z.core.$strip>;
|
|
1117
|
+
minQuantity: z.ZodNumber;
|
|
1118
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
1119
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1120
|
+
type: z.ZodLiteral<"fixed">;
|
|
1121
|
+
amount: z.ZodString;
|
|
1122
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1123
|
+
type: z.ZodLiteral<"percent">;
|
|
1124
|
+
percent: z.ZodString;
|
|
1125
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1126
|
+
type: z.ZodLiteral<"amount">;
|
|
1127
|
+
amount: z.ZodString;
|
|
1128
|
+
}, z.core.$strip>], "type">;
|
|
1129
|
+
inactiveReason: z.ZodNullable<z.ZodEnum<{
|
|
1130
|
+
attribute_not_price_rule: "attribute_not_price_rule";
|
|
1131
|
+
attribute_deleted: "attribute_deleted";
|
|
1132
|
+
target_deleted: "target_deleted";
|
|
1133
|
+
}>>;
|
|
1134
|
+
targetDeleted: z.ZodBoolean;
|
|
1135
|
+
labels: z.ZodObject<{
|
|
1136
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
1137
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
1138
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
1139
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
1140
|
+
categoryPath: z.ZodNullable<z.ZodString>;
|
|
1141
|
+
attributeLabel: z.ZodNullable<z.ZodString>;
|
|
1142
|
+
attributeValueLabel: z.ZodNullable<z.ZodString>;
|
|
1143
|
+
}, z.core.$strip>;
|
|
1144
|
+
naturalKey: z.ZodObject<{
|
|
1145
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
1146
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
1147
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
1148
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
1149
|
+
key: z.ZodString;
|
|
1150
|
+
valueCode: z.ZodString;
|
|
1151
|
+
}, z.core.$strip>>;
|
|
1152
|
+
}, z.core.$strip>;
|
|
1153
|
+
}, z.core.$strip>>;
|
|
1154
|
+
}, z.core.$strip>;
|
|
1155
|
+
export type PriceBookLine = z.infer<typeof priceBookLineSchema>;
|
|
1156
|
+
/** Most products one `GET …/:id/product-lines` asks about (a product browser's pick is at most 200). */
|
|
1157
|
+
export declare const PRICE_BOOK_PRODUCT_LINES_MAX_IDS = 200;
|
|
1158
|
+
/**
|
|
1159
|
+
* `GET /api/v1/admin/price-books/:id/product-lines?productIds=a,b` (feature
|
|
1160
|
+
* 161, Checkpoint 5 review): which of the named products already have a line
|
|
1161
|
+
* in the book — a row of the product or of one of its variants — in one read,
|
|
1162
|
+
* so the grid refuses a picked product whose line sits on another page rather
|
|
1163
|
+
* than overwriting its price.
|
|
1164
|
+
*/
|
|
1165
|
+
export declare const priceBookProductLinesQuerySchema: z.ZodObject<{
|
|
1166
|
+
productIds: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodString>>;
|
|
1167
|
+
}, z.core.$strip>;
|
|
1168
|
+
export type PriceBookProductLinesQuery = z.infer<typeof priceBookProductLinesQuerySchema>;
|
|
1169
|
+
export declare const priceBookProductLinesResponseSchema: z.ZodObject<{
|
|
1170
|
+
data: z.ZodObject<{
|
|
1171
|
+
productIds: z.ZodArray<z.ZodString>;
|
|
1172
|
+
}, z.core.$strip>;
|
|
1173
|
+
}, z.core.$strip>;
|
|
1174
|
+
export type PriceBookProductLinesResponse = z.infer<typeof priceBookProductLinesResponseSchema>;
|
|
1175
|
+
/** The answer of `GET …/:id/lines`: general to specific, by label within a kind (FR-006). */
|
|
1176
|
+
export declare const priceBookLinesResponseSchema: z.ZodObject<{
|
|
1177
|
+
data: z.ZodArray<z.ZodObject<{
|
|
1178
|
+
variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1179
|
+
selectionKey: z.ZodString;
|
|
1180
|
+
selectionKind: z.ZodEnum<{
|
|
1181
|
+
all: "all";
|
|
1182
|
+
category: "category";
|
|
1183
|
+
product: "product";
|
|
1184
|
+
attribute: "attribute";
|
|
1185
|
+
variant: "variant";
|
|
1186
|
+
category_attribute: "category_attribute";
|
|
1187
|
+
}>;
|
|
1188
|
+
selection: z.ZodObject<{
|
|
1189
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1190
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
1191
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
1192
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
1193
|
+
key: z.ZodString;
|
|
1194
|
+
value: z.ZodString;
|
|
1195
|
+
}, z.core.$strip>>;
|
|
1196
|
+
}, z.core.$strip>;
|
|
1197
|
+
labels: z.ZodObject<{
|
|
1198
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
1199
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
1200
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
1201
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
1202
|
+
categoryPath: z.ZodNullable<z.ZodString>;
|
|
1203
|
+
attributeLabel: z.ZodNullable<z.ZodString>;
|
|
1204
|
+
attributeValueLabel: z.ZodNullable<z.ZodString>;
|
|
1205
|
+
}, z.core.$strip>;
|
|
1206
|
+
naturalKey: z.ZodObject<{
|
|
1207
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
1208
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
1209
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
1210
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
1211
|
+
key: z.ZodString;
|
|
1212
|
+
valueCode: z.ZodString;
|
|
1213
|
+
}, z.core.$strip>>;
|
|
1214
|
+
}, z.core.$strip>;
|
|
1215
|
+
inactiveReason: z.ZodNullable<z.ZodEnum<{
|
|
1216
|
+
attribute_not_price_rule: "attribute_not_price_rule";
|
|
1217
|
+
attribute_deleted: "attribute_deleted";
|
|
1218
|
+
target_deleted: "target_deleted";
|
|
1219
|
+
}>>;
|
|
1220
|
+
targetDeleted: z.ZodBoolean;
|
|
1221
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
1222
|
+
id: z.ZodString;
|
|
1223
|
+
selectionKind: z.ZodEnum<{
|
|
1224
|
+
all: "all";
|
|
1225
|
+
category: "category";
|
|
1226
|
+
product: "product";
|
|
1227
|
+
attribute: "attribute";
|
|
1228
|
+
variant: "variant";
|
|
1229
|
+
category_attribute: "category_attribute";
|
|
1230
|
+
}>;
|
|
1231
|
+
selection: z.ZodObject<{
|
|
1232
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1233
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
1234
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
1235
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
1236
|
+
key: z.ZodString;
|
|
1237
|
+
value: z.ZodString;
|
|
1238
|
+
}, z.core.$strip>>;
|
|
1239
|
+
}, z.core.$strip>;
|
|
1240
|
+
minQuantity: z.ZodNumber;
|
|
1241
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
1242
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1243
|
+
type: z.ZodLiteral<"fixed">;
|
|
1244
|
+
amount: z.ZodString;
|
|
1245
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1246
|
+
type: z.ZodLiteral<"percent">;
|
|
1247
|
+
percent: z.ZodString;
|
|
1248
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1249
|
+
type: z.ZodLiteral<"amount">;
|
|
1250
|
+
amount: z.ZodString;
|
|
1251
|
+
}, z.core.$strip>], "type">;
|
|
1252
|
+
inactiveReason: z.ZodNullable<z.ZodEnum<{
|
|
1253
|
+
attribute_not_price_rule: "attribute_not_price_rule";
|
|
1254
|
+
attribute_deleted: "attribute_deleted";
|
|
1255
|
+
target_deleted: "target_deleted";
|
|
1256
|
+
}>>;
|
|
1257
|
+
targetDeleted: z.ZodBoolean;
|
|
1258
|
+
labels: z.ZodObject<{
|
|
1259
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
1260
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
1261
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
1262
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
1263
|
+
categoryPath: z.ZodNullable<z.ZodString>;
|
|
1264
|
+
attributeLabel: z.ZodNullable<z.ZodString>;
|
|
1265
|
+
attributeValueLabel: z.ZodNullable<z.ZodString>;
|
|
1266
|
+
}, z.core.$strip>;
|
|
1267
|
+
naturalKey: z.ZodObject<{
|
|
1268
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
1269
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
1270
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
1271
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
1272
|
+
key: z.ZodString;
|
|
1273
|
+
valueCode: z.ZodString;
|
|
1274
|
+
}, z.core.$strip>>;
|
|
1275
|
+
}, z.core.$strip>;
|
|
1276
|
+
}, z.core.$strip>>;
|
|
1277
|
+
}, z.core.$strip>>>;
|
|
1278
|
+
selectionKey: z.ZodString;
|
|
1279
|
+
selectionKind: z.ZodEnum<{
|
|
1280
|
+
all: "all";
|
|
1281
|
+
category: "category";
|
|
1282
|
+
product: "product";
|
|
1283
|
+
attribute: "attribute";
|
|
1284
|
+
variant: "variant";
|
|
1285
|
+
category_attribute: "category_attribute";
|
|
1286
|
+
}>;
|
|
1287
|
+
selection: z.ZodObject<{
|
|
1288
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1289
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
1290
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
1291
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
1292
|
+
key: z.ZodString;
|
|
1293
|
+
value: z.ZodString;
|
|
1294
|
+
}, z.core.$strip>>;
|
|
1295
|
+
}, z.core.$strip>;
|
|
1296
|
+
labels: z.ZodObject<{
|
|
1297
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
1298
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
1299
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
1300
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
1301
|
+
categoryPath: z.ZodNullable<z.ZodString>;
|
|
1302
|
+
attributeLabel: z.ZodNullable<z.ZodString>;
|
|
1303
|
+
attributeValueLabel: z.ZodNullable<z.ZodString>;
|
|
1304
|
+
}, z.core.$strip>;
|
|
1305
|
+
naturalKey: z.ZodObject<{
|
|
1306
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
1307
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
1308
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
1309
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
1310
|
+
key: z.ZodString;
|
|
1311
|
+
valueCode: z.ZodString;
|
|
1312
|
+
}, z.core.$strip>>;
|
|
1313
|
+
}, z.core.$strip>;
|
|
1314
|
+
inactiveReason: z.ZodNullable<z.ZodEnum<{
|
|
1315
|
+
attribute_not_price_rule: "attribute_not_price_rule";
|
|
1316
|
+
attribute_deleted: "attribute_deleted";
|
|
1317
|
+
target_deleted: "target_deleted";
|
|
1318
|
+
}>>;
|
|
1319
|
+
targetDeleted: z.ZodBoolean;
|
|
1320
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
1321
|
+
id: z.ZodString;
|
|
1322
|
+
selectionKind: z.ZodEnum<{
|
|
1323
|
+
all: "all";
|
|
1324
|
+
category: "category";
|
|
1325
|
+
product: "product";
|
|
1326
|
+
attribute: "attribute";
|
|
1327
|
+
variant: "variant";
|
|
1328
|
+
category_attribute: "category_attribute";
|
|
1329
|
+
}>;
|
|
1330
|
+
selection: z.ZodObject<{
|
|
1331
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1332
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
1333
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
1334
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
1335
|
+
key: z.ZodString;
|
|
1336
|
+
value: z.ZodString;
|
|
1337
|
+
}, z.core.$strip>>;
|
|
1338
|
+
}, z.core.$strip>;
|
|
1339
|
+
minQuantity: z.ZodNumber;
|
|
1340
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
1341
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1342
|
+
type: z.ZodLiteral<"fixed">;
|
|
1343
|
+
amount: z.ZodString;
|
|
1344
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1345
|
+
type: z.ZodLiteral<"percent">;
|
|
1346
|
+
percent: z.ZodString;
|
|
1347
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1348
|
+
type: z.ZodLiteral<"amount">;
|
|
1349
|
+
amount: z.ZodString;
|
|
1350
|
+
}, z.core.$strip>], "type">;
|
|
1351
|
+
inactiveReason: z.ZodNullable<z.ZodEnum<{
|
|
1352
|
+
attribute_not_price_rule: "attribute_not_price_rule";
|
|
1353
|
+
attribute_deleted: "attribute_deleted";
|
|
1354
|
+
target_deleted: "target_deleted";
|
|
1355
|
+
}>>;
|
|
1356
|
+
targetDeleted: z.ZodBoolean;
|
|
1357
|
+
labels: z.ZodObject<{
|
|
1358
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
1359
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
1360
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
1361
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
1362
|
+
categoryPath: z.ZodNullable<z.ZodString>;
|
|
1363
|
+
attributeLabel: z.ZodNullable<z.ZodString>;
|
|
1364
|
+
attributeValueLabel: z.ZodNullable<z.ZodString>;
|
|
1365
|
+
}, z.core.$strip>;
|
|
1366
|
+
naturalKey: z.ZodObject<{
|
|
1367
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
1368
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
1369
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
1370
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
1371
|
+
key: z.ZodString;
|
|
1372
|
+
valueCode: z.ZodString;
|
|
1373
|
+
}, z.core.$strip>>;
|
|
1374
|
+
}, z.core.$strip>;
|
|
1375
|
+
}, z.core.$strip>>;
|
|
1376
|
+
}, z.core.$strip>>;
|
|
1377
|
+
meta: z.ZodObject<{
|
|
1378
|
+
page: z.ZodNumber;
|
|
1379
|
+
pageSize: z.ZodNumber;
|
|
1380
|
+
totalLines: z.ZodNumber;
|
|
1381
|
+
}, z.core.$strip>;
|
|
1382
|
+
}, z.core.$strip>;
|
|
1383
|
+
export type PriceBookLinesResponse = z.infer<typeof priceBookLinesResponseSchema>;
|
|
1384
|
+
/**
|
|
1385
|
+
* One row of an admin batch: by ids (`selection`, the grid) or by natural key
|
|
1386
|
+
* (`key`, a CSV import) — exactly one of the two (G10). A row without an `id`
|
|
1387
|
+
* whose selection and `minQuantity` equal a stored row's replaces that row.
|
|
1388
|
+
*/
|
|
1389
|
+
export declare const priceBookBatchRowInputSchema: z.ZodObject<{
|
|
1390
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1391
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
1392
|
+
variantId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1393
|
+
productId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1394
|
+
categoryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1395
|
+
attribute: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1396
|
+
key: z.ZodString;
|
|
1397
|
+
value: z.ZodString;
|
|
1398
|
+
}, z.core.$strip>>>;
|
|
1399
|
+
}, z.core.$strip>>;
|
|
1400
|
+
key: z.ZodOptional<z.ZodObject<{
|
|
1401
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
1402
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
1403
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
1404
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
1405
|
+
key: z.ZodString;
|
|
1406
|
+
valueCode: z.ZodString;
|
|
1407
|
+
}, z.core.$strip>>;
|
|
1408
|
+
}, z.core.$strip>>;
|
|
1409
|
+
minQuantity: z.ZodNumber;
|
|
1410
|
+
maxQuantity: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
1411
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1412
|
+
type: z.ZodLiteral<"fixed">;
|
|
1413
|
+
amount: z.ZodString;
|
|
1414
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1415
|
+
type: z.ZodLiteral<"percent">;
|
|
1416
|
+
percent: z.ZodString;
|
|
1417
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1418
|
+
type: z.ZodLiteral<"amount">;
|
|
1419
|
+
amount: z.ZodString;
|
|
1420
|
+
}, z.core.$strip>], "type">;
|
|
1421
|
+
}, z.core.$strip>;
|
|
1422
|
+
export type PriceBookBatchRowInput = z.infer<typeof priceBookBatchRowInputSchema>;
|
|
1423
|
+
/**
|
|
1424
|
+
* Body of `PUT /api/v1/admin/price-books/:id/rows` (and of its `?dryRun=true`
|
|
1425
|
+
* preview, G10). `merge` (default) upserts the rows and deletes `delete`;
|
|
1426
|
+
* `replace` makes the book's rows exactly `upsert` (`delete` must be empty).
|
|
1427
|
+
*/
|
|
1428
|
+
export declare const priceBookRowsWriteSchema: z.ZodObject<{
|
|
1429
|
+
expectedVersion: z.ZodOptional<z.ZodNumber>;
|
|
1430
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
1431
|
+
replace: "replace";
|
|
1432
|
+
merge: "merge";
|
|
1433
|
+
}>>;
|
|
1434
|
+
upsert: z.ZodDefault<z.ZodArray<z.ZodUnknown>>;
|
|
1435
|
+
delete: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1436
|
+
}, z.core.$strip>;
|
|
1437
|
+
export type PriceBookRowsWrite = z.infer<typeof priceBookRowsWriteSchema>;
|
|
1438
|
+
/**
|
|
1439
|
+
* Why one row of a batch was refused (G6). `index` is the row's position in
|
|
1440
|
+
* `upsert` (for an import, the file line the client maps it to); `rowId` names
|
|
1441
|
+
* a stored row (an overlap partner, a delete of a missing row).
|
|
1442
|
+
*/
|
|
1443
|
+
/**
|
|
1444
|
+
* The rule behind a refused row (feature 161, Checkpoint 11 ruling 2): one
|
|
1445
|
+
* code per rule, under its group `code`, so the consumer translates it
|
|
1446
|
+
* (`specs/conventions/module-i18n.md`); `priceBookRowShapeIssues` above
|
|
1447
|
+
* returns the shape rules' codes.
|
|
1448
|
+
*/
|
|
1449
|
+
export declare const PRICE_BOOK_ROW_ERROR_REASONS: readonly ["row_invalid", "selection_combined", "max_below_min", "fixed_on_all", "variant_needs_product", "base_book_kind", "base_product_fixed", "product_unknown", "variant_unknown", "variant_other_product", "category_unknown", "attribute_not_selectable", "attribute_value_unknown", "attribute_value_boolean", "row_not_in_book", "rows_overlap", "book_row_limit"];
|
|
1450
|
+
export declare const priceBookRowErrorReasonSchema: z.ZodEnum<{
|
|
1451
|
+
row_invalid: "row_invalid";
|
|
1452
|
+
selection_combined: "selection_combined";
|
|
1453
|
+
max_below_min: "max_below_min";
|
|
1454
|
+
fixed_on_all: "fixed_on_all";
|
|
1455
|
+
variant_needs_product: "variant_needs_product";
|
|
1456
|
+
base_book_kind: "base_book_kind";
|
|
1457
|
+
base_product_fixed: "base_product_fixed";
|
|
1458
|
+
product_unknown: "product_unknown";
|
|
1459
|
+
variant_unknown: "variant_unknown";
|
|
1460
|
+
variant_other_product: "variant_other_product";
|
|
1461
|
+
category_unknown: "category_unknown";
|
|
1462
|
+
attribute_not_selectable: "attribute_not_selectable";
|
|
1463
|
+
attribute_value_unknown: "attribute_value_unknown";
|
|
1464
|
+
attribute_value_boolean: "attribute_value_boolean";
|
|
1465
|
+
row_not_in_book: "row_not_in_book";
|
|
1466
|
+
rows_overlap: "rows_overlap";
|
|
1467
|
+
book_row_limit: "book_row_limit";
|
|
1468
|
+
}>;
|
|
1469
|
+
export type PriceBookRowErrorReason = z.infer<typeof priceBookRowErrorReasonSchema>;
|
|
1470
|
+
export declare const PRICE_BOOK_ROW_ERROR_CODES: readonly ["PRICE_BOOK_ROW_SHAPE", "PRICE_BOOK_ROW_OVERLAP", "PRICE_BOOK_ROW_TARGET", "PRICE_BOOK_ROW_LIMIT"];
|
|
1471
|
+
export declare const priceBookRowErrorSchema: z.ZodObject<{
|
|
1472
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
1473
|
+
rowId: z.ZodOptional<z.ZodString>;
|
|
1474
|
+
field: z.ZodString;
|
|
1475
|
+
code: z.ZodEnum<{
|
|
1476
|
+
PRICE_BOOK_ROW_OVERLAP: "PRICE_BOOK_ROW_OVERLAP";
|
|
1477
|
+
PRICE_BOOK_ROW_SHAPE: "PRICE_BOOK_ROW_SHAPE";
|
|
1478
|
+
PRICE_BOOK_ROW_TARGET: "PRICE_BOOK_ROW_TARGET";
|
|
1479
|
+
PRICE_BOOK_ROW_LIMIT: "PRICE_BOOK_ROW_LIMIT";
|
|
1480
|
+
}>;
|
|
1481
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
1482
|
+
row_invalid: "row_invalid";
|
|
1483
|
+
selection_combined: "selection_combined";
|
|
1484
|
+
max_below_min: "max_below_min";
|
|
1485
|
+
fixed_on_all: "fixed_on_all";
|
|
1486
|
+
variant_needs_product: "variant_needs_product";
|
|
1487
|
+
base_book_kind: "base_book_kind";
|
|
1488
|
+
base_product_fixed: "base_product_fixed";
|
|
1489
|
+
product_unknown: "product_unknown";
|
|
1490
|
+
variant_unknown: "variant_unknown";
|
|
1491
|
+
variant_other_product: "variant_other_product";
|
|
1492
|
+
category_unknown: "category_unknown";
|
|
1493
|
+
attribute_not_selectable: "attribute_not_selectable";
|
|
1494
|
+
attribute_value_unknown: "attribute_value_unknown";
|
|
1495
|
+
attribute_value_boolean: "attribute_value_boolean";
|
|
1496
|
+
row_not_in_book: "row_not_in_book";
|
|
1497
|
+
rows_overlap: "rows_overlap";
|
|
1498
|
+
book_row_limit: "book_row_limit";
|
|
1499
|
+
}>>;
|
|
1500
|
+
message: z.ZodString;
|
|
1501
|
+
}, z.core.$strip>;
|
|
1502
|
+
export type PriceBookRowError = z.infer<typeof priceBookRowErrorSchema>;
|
|
1503
|
+
/** A stored or resolved row in a diff (no labels). */
|
|
1504
|
+
export declare const priceBookDiffRowSchema: z.ZodObject<{
|
|
1505
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1506
|
+
selectionKind: z.ZodEnum<{
|
|
1507
|
+
all: "all";
|
|
1508
|
+
category: "category";
|
|
1509
|
+
product: "product";
|
|
1510
|
+
attribute: "attribute";
|
|
1511
|
+
variant: "variant";
|
|
1512
|
+
category_attribute: "category_attribute";
|
|
1513
|
+
}>;
|
|
1514
|
+
selection: z.ZodObject<{
|
|
1515
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1516
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
1517
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
1518
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
1519
|
+
key: z.ZodString;
|
|
1520
|
+
value: z.ZodString;
|
|
1521
|
+
}, z.core.$strip>>;
|
|
1522
|
+
}, z.core.$strip>;
|
|
1523
|
+
naturalKey: z.ZodObject<{
|
|
1524
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
1525
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
1526
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
1527
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
1528
|
+
key: z.ZodString;
|
|
1529
|
+
valueCode: z.ZodString;
|
|
1530
|
+
}, z.core.$strip>>;
|
|
1531
|
+
}, z.core.$strip>;
|
|
1532
|
+
minQuantity: z.ZodNumber;
|
|
1533
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
1534
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1535
|
+
type: z.ZodLiteral<"fixed">;
|
|
1536
|
+
amount: z.ZodString;
|
|
1537
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1538
|
+
type: z.ZodLiteral<"percent">;
|
|
1539
|
+
percent: z.ZodString;
|
|
1540
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1541
|
+
type: z.ZodLiteral<"amount">;
|
|
1542
|
+
amount: z.ZodString;
|
|
1543
|
+
}, z.core.$strip>], "type">;
|
|
1544
|
+
}, z.core.$strip>;
|
|
1545
|
+
export type PriceBookDiffRow = z.infer<typeof priceBookDiffRowSchema>;
|
|
1546
|
+
/** The answer of `PUT …/rows?dryRun=true` (G10): what the same body would write, writing nothing. */
|
|
1547
|
+
export declare const priceBookRowsDryRunSchema: z.ZodObject<{
|
|
1548
|
+
version: z.ZodNumber;
|
|
1549
|
+
resolved: z.ZodArray<z.ZodNullable<z.ZodObject<{
|
|
1550
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1551
|
+
selectionKind: z.ZodEnum<{
|
|
1552
|
+
all: "all";
|
|
1553
|
+
category: "category";
|
|
1554
|
+
product: "product";
|
|
1555
|
+
attribute: "attribute";
|
|
1556
|
+
variant: "variant";
|
|
1557
|
+
category_attribute: "category_attribute";
|
|
1558
|
+
}>;
|
|
1559
|
+
selection: z.ZodObject<{
|
|
1560
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1561
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
1562
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
1563
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
1564
|
+
key: z.ZodString;
|
|
1565
|
+
value: z.ZodString;
|
|
1566
|
+
}, z.core.$strip>>;
|
|
1567
|
+
}, z.core.$strip>;
|
|
1568
|
+
naturalKey: z.ZodObject<{
|
|
1569
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
1570
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
1571
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
1572
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
1573
|
+
key: z.ZodString;
|
|
1574
|
+
valueCode: z.ZodString;
|
|
1575
|
+
}, z.core.$strip>>;
|
|
1576
|
+
}, z.core.$strip>;
|
|
1577
|
+
minQuantity: z.ZodNumber;
|
|
1578
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
1579
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1580
|
+
type: z.ZodLiteral<"fixed">;
|
|
1581
|
+
amount: z.ZodString;
|
|
1582
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1583
|
+
type: z.ZodLiteral<"percent">;
|
|
1584
|
+
percent: z.ZodString;
|
|
1585
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1586
|
+
type: z.ZodLiteral<"amount">;
|
|
1587
|
+
amount: z.ZodString;
|
|
1588
|
+
}, z.core.$strip>], "type">;
|
|
1589
|
+
}, z.core.$strip>>>;
|
|
1590
|
+
diff: z.ZodObject<{
|
|
1591
|
+
added: z.ZodArray<z.ZodObject<{
|
|
1592
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1593
|
+
selectionKind: z.ZodEnum<{
|
|
1594
|
+
all: "all";
|
|
1595
|
+
category: "category";
|
|
1596
|
+
product: "product";
|
|
1597
|
+
attribute: "attribute";
|
|
1598
|
+
variant: "variant";
|
|
1599
|
+
category_attribute: "category_attribute";
|
|
1600
|
+
}>;
|
|
1601
|
+
selection: z.ZodObject<{
|
|
1602
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1603
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
1604
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
1605
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
1606
|
+
key: z.ZodString;
|
|
1607
|
+
value: z.ZodString;
|
|
1608
|
+
}, z.core.$strip>>;
|
|
1609
|
+
}, z.core.$strip>;
|
|
1610
|
+
naturalKey: z.ZodObject<{
|
|
1611
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
1612
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
1613
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
1614
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
1615
|
+
key: z.ZodString;
|
|
1616
|
+
valueCode: z.ZodString;
|
|
1617
|
+
}, z.core.$strip>>;
|
|
1618
|
+
}, z.core.$strip>;
|
|
1619
|
+
minQuantity: z.ZodNumber;
|
|
1620
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
1621
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1622
|
+
type: z.ZodLiteral<"fixed">;
|
|
1623
|
+
amount: z.ZodString;
|
|
1624
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1625
|
+
type: z.ZodLiteral<"percent">;
|
|
1626
|
+
percent: z.ZodString;
|
|
1627
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1628
|
+
type: z.ZodLiteral<"amount">;
|
|
1629
|
+
amount: z.ZodString;
|
|
1630
|
+
}, z.core.$strip>], "type">;
|
|
1631
|
+
}, z.core.$strip>>;
|
|
1632
|
+
changed: z.ZodArray<z.ZodObject<{
|
|
1633
|
+
before: z.ZodObject<{
|
|
1634
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1635
|
+
selectionKind: z.ZodEnum<{
|
|
1636
|
+
all: "all";
|
|
1637
|
+
category: "category";
|
|
1638
|
+
product: "product";
|
|
1639
|
+
attribute: "attribute";
|
|
1640
|
+
variant: "variant";
|
|
1641
|
+
category_attribute: "category_attribute";
|
|
1642
|
+
}>;
|
|
1643
|
+
selection: z.ZodObject<{
|
|
1644
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1645
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
1646
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
1647
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
1648
|
+
key: z.ZodString;
|
|
1649
|
+
value: z.ZodString;
|
|
1650
|
+
}, z.core.$strip>>;
|
|
1651
|
+
}, z.core.$strip>;
|
|
1652
|
+
naturalKey: z.ZodObject<{
|
|
1653
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
1654
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
1655
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
1656
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
1657
|
+
key: z.ZodString;
|
|
1658
|
+
valueCode: z.ZodString;
|
|
1659
|
+
}, z.core.$strip>>;
|
|
1660
|
+
}, z.core.$strip>;
|
|
1661
|
+
minQuantity: z.ZodNumber;
|
|
1662
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
1663
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1664
|
+
type: z.ZodLiteral<"fixed">;
|
|
1665
|
+
amount: z.ZodString;
|
|
1666
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1667
|
+
type: z.ZodLiteral<"percent">;
|
|
1668
|
+
percent: z.ZodString;
|
|
1669
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1670
|
+
type: z.ZodLiteral<"amount">;
|
|
1671
|
+
amount: z.ZodString;
|
|
1672
|
+
}, z.core.$strip>], "type">;
|
|
1673
|
+
}, z.core.$strip>;
|
|
1674
|
+
after: z.ZodObject<{
|
|
1675
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1676
|
+
selectionKind: z.ZodEnum<{
|
|
1677
|
+
all: "all";
|
|
1678
|
+
category: "category";
|
|
1679
|
+
product: "product";
|
|
1680
|
+
attribute: "attribute";
|
|
1681
|
+
variant: "variant";
|
|
1682
|
+
category_attribute: "category_attribute";
|
|
1683
|
+
}>;
|
|
1684
|
+
selection: z.ZodObject<{
|
|
1685
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1686
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
1687
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
1688
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
1689
|
+
key: z.ZodString;
|
|
1690
|
+
value: z.ZodString;
|
|
1691
|
+
}, z.core.$strip>>;
|
|
1692
|
+
}, z.core.$strip>;
|
|
1693
|
+
naturalKey: z.ZodObject<{
|
|
1694
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
1695
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
1696
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
1697
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
1698
|
+
key: z.ZodString;
|
|
1699
|
+
valueCode: z.ZodString;
|
|
1700
|
+
}, z.core.$strip>>;
|
|
1701
|
+
}, z.core.$strip>;
|
|
1702
|
+
minQuantity: z.ZodNumber;
|
|
1703
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
1704
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1705
|
+
type: z.ZodLiteral<"fixed">;
|
|
1706
|
+
amount: z.ZodString;
|
|
1707
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1708
|
+
type: z.ZodLiteral<"percent">;
|
|
1709
|
+
percent: z.ZodString;
|
|
1710
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1711
|
+
type: z.ZodLiteral<"amount">;
|
|
1712
|
+
amount: z.ZodString;
|
|
1713
|
+
}, z.core.$strip>], "type">;
|
|
1714
|
+
}, z.core.$strip>;
|
|
1715
|
+
}, z.core.$strip>>;
|
|
1716
|
+
removed: z.ZodArray<z.ZodObject<{
|
|
1717
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1718
|
+
selectionKind: z.ZodEnum<{
|
|
1719
|
+
all: "all";
|
|
1720
|
+
category: "category";
|
|
1721
|
+
product: "product";
|
|
1722
|
+
attribute: "attribute";
|
|
1723
|
+
variant: "variant";
|
|
1724
|
+
category_attribute: "category_attribute";
|
|
1725
|
+
}>;
|
|
1726
|
+
selection: z.ZodObject<{
|
|
1727
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1728
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
1729
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
1730
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
1731
|
+
key: z.ZodString;
|
|
1732
|
+
value: z.ZodString;
|
|
1733
|
+
}, z.core.$strip>>;
|
|
1734
|
+
}, z.core.$strip>;
|
|
1735
|
+
naturalKey: z.ZodObject<{
|
|
1736
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
1737
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
1738
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
1739
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
1740
|
+
key: z.ZodString;
|
|
1741
|
+
valueCode: z.ZodString;
|
|
1742
|
+
}, z.core.$strip>>;
|
|
1743
|
+
}, z.core.$strip>;
|
|
1744
|
+
minQuantity: z.ZodNumber;
|
|
1745
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
1746
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1747
|
+
type: z.ZodLiteral<"fixed">;
|
|
1748
|
+
amount: z.ZodString;
|
|
1749
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1750
|
+
type: z.ZodLiteral<"percent">;
|
|
1751
|
+
percent: z.ZodString;
|
|
1752
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1753
|
+
type: z.ZodLiteral<"amount">;
|
|
1754
|
+
amount: z.ZodString;
|
|
1755
|
+
}, z.core.$strip>], "type">;
|
|
1756
|
+
}, z.core.$strip>>;
|
|
1757
|
+
unchangedCount: z.ZodNumber;
|
|
1758
|
+
}, z.core.$strip>;
|
|
1759
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
1760
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
1761
|
+
rowId: z.ZodOptional<z.ZodString>;
|
|
1762
|
+
field: z.ZodString;
|
|
1763
|
+
code: z.ZodEnum<{
|
|
1764
|
+
PRICE_BOOK_ROW_OVERLAP: "PRICE_BOOK_ROW_OVERLAP";
|
|
1765
|
+
PRICE_BOOK_ROW_SHAPE: "PRICE_BOOK_ROW_SHAPE";
|
|
1766
|
+
PRICE_BOOK_ROW_TARGET: "PRICE_BOOK_ROW_TARGET";
|
|
1767
|
+
PRICE_BOOK_ROW_LIMIT: "PRICE_BOOK_ROW_LIMIT";
|
|
1768
|
+
}>;
|
|
1769
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
1770
|
+
row_invalid: "row_invalid";
|
|
1771
|
+
selection_combined: "selection_combined";
|
|
1772
|
+
max_below_min: "max_below_min";
|
|
1773
|
+
fixed_on_all: "fixed_on_all";
|
|
1774
|
+
variant_needs_product: "variant_needs_product";
|
|
1775
|
+
base_book_kind: "base_book_kind";
|
|
1776
|
+
base_product_fixed: "base_product_fixed";
|
|
1777
|
+
product_unknown: "product_unknown";
|
|
1778
|
+
variant_unknown: "variant_unknown";
|
|
1779
|
+
variant_other_product: "variant_other_product";
|
|
1780
|
+
category_unknown: "category_unknown";
|
|
1781
|
+
attribute_not_selectable: "attribute_not_selectable";
|
|
1782
|
+
attribute_value_unknown: "attribute_value_unknown";
|
|
1783
|
+
attribute_value_boolean: "attribute_value_boolean";
|
|
1784
|
+
row_not_in_book: "row_not_in_book";
|
|
1785
|
+
rows_overlap: "rows_overlap";
|
|
1786
|
+
book_row_limit: "book_row_limit";
|
|
1787
|
+
}>>;
|
|
1788
|
+
message: z.ZodString;
|
|
1789
|
+
}, z.core.$strip>>;
|
|
1790
|
+
}, z.core.$strip>;
|
|
1791
|
+
export type PriceBookRowsDryRun = z.infer<typeof priceBookRowsDryRunSchema>;
|
|
1792
|
+
/** The answer of a committed `PUT …/rows`. */
|
|
1793
|
+
export declare const priceBookRowsWriteResultSchema: z.ZodObject<{
|
|
1794
|
+
version: z.ZodNumber;
|
|
1795
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
1796
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1797
|
+
selectionKind: z.ZodEnum<{
|
|
1798
|
+
all: "all";
|
|
1799
|
+
category: "category";
|
|
1800
|
+
product: "product";
|
|
1801
|
+
attribute: "attribute";
|
|
1802
|
+
variant: "variant";
|
|
1803
|
+
category_attribute: "category_attribute";
|
|
1804
|
+
}>;
|
|
1805
|
+
selection: z.ZodObject<{
|
|
1806
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1807
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
1808
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
1809
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
1810
|
+
key: z.ZodString;
|
|
1811
|
+
value: z.ZodString;
|
|
1812
|
+
}, z.core.$strip>>;
|
|
1813
|
+
}, z.core.$strip>;
|
|
1814
|
+
naturalKey: z.ZodObject<{
|
|
1815
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
1816
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
1817
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
1818
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
1819
|
+
key: z.ZodString;
|
|
1820
|
+
valueCode: z.ZodString;
|
|
1821
|
+
}, z.core.$strip>>;
|
|
1822
|
+
}, z.core.$strip>;
|
|
1823
|
+
minQuantity: z.ZodNumber;
|
|
1824
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
1825
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1826
|
+
type: z.ZodLiteral<"fixed">;
|
|
1827
|
+
amount: z.ZodString;
|
|
1828
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1829
|
+
type: z.ZodLiteral<"percent">;
|
|
1830
|
+
percent: z.ZodString;
|
|
1831
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1832
|
+
type: z.ZodLiteral<"amount">;
|
|
1833
|
+
amount: z.ZodString;
|
|
1834
|
+
}, z.core.$strip>], "type">;
|
|
1835
|
+
}, z.core.$strip>>;
|
|
1836
|
+
}, z.core.$strip>;
|
|
1837
|
+
export type PriceBookRowsWriteResult = z.infer<typeof priceBookRowsWriteResultSchema>;
|
|
1838
|
+
/** The answer of `GET /api/v1/admin/price-books/:id/rows` (G3): one page of rows. */
|
|
1839
|
+
export declare const priceBookRowsResponseSchema: z.ZodObject<{
|
|
1840
|
+
data: z.ZodArray<z.ZodObject<{
|
|
1841
|
+
id: z.ZodString;
|
|
1842
|
+
selectionKind: z.ZodEnum<{
|
|
1843
|
+
all: "all";
|
|
1844
|
+
category: "category";
|
|
1845
|
+
product: "product";
|
|
1846
|
+
attribute: "attribute";
|
|
1847
|
+
variant: "variant";
|
|
1848
|
+
category_attribute: "category_attribute";
|
|
1849
|
+
}>;
|
|
1850
|
+
selection: z.ZodObject<{
|
|
1851
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1852
|
+
productId: z.ZodNullable<z.ZodString>;
|
|
1853
|
+
categoryId: z.ZodNullable<z.ZodString>;
|
|
1854
|
+
attribute: z.ZodNullable<z.ZodObject<{
|
|
1855
|
+
key: z.ZodString;
|
|
1856
|
+
value: z.ZodString;
|
|
1857
|
+
}, z.core.$strip>>;
|
|
1858
|
+
}, z.core.$strip>;
|
|
1859
|
+
minQuantity: z.ZodNumber;
|
|
1860
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
1861
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1862
|
+
type: z.ZodLiteral<"fixed">;
|
|
1863
|
+
amount: z.ZodString;
|
|
1864
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1865
|
+
type: z.ZodLiteral<"percent">;
|
|
1866
|
+
percent: z.ZodString;
|
|
1867
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1868
|
+
type: z.ZodLiteral<"amount">;
|
|
1869
|
+
amount: z.ZodString;
|
|
1870
|
+
}, z.core.$strip>], "type">;
|
|
1871
|
+
inactiveReason: z.ZodNullable<z.ZodEnum<{
|
|
1872
|
+
attribute_not_price_rule: "attribute_not_price_rule";
|
|
1873
|
+
attribute_deleted: "attribute_deleted";
|
|
1874
|
+
target_deleted: "target_deleted";
|
|
1875
|
+
}>>;
|
|
1876
|
+
targetDeleted: z.ZodBoolean;
|
|
1877
|
+
labels: z.ZodObject<{
|
|
1878
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
1879
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
1880
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
1881
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
1882
|
+
categoryPath: z.ZodNullable<z.ZodString>;
|
|
1883
|
+
attributeLabel: z.ZodNullable<z.ZodString>;
|
|
1884
|
+
attributeValueLabel: z.ZodNullable<z.ZodString>;
|
|
1885
|
+
}, z.core.$strip>;
|
|
1886
|
+
naturalKey: z.ZodObject<{
|
|
1887
|
+
productSku: z.ZodOptional<z.ZodString>;
|
|
1888
|
+
variantSku: z.ZodOptional<z.ZodString>;
|
|
1889
|
+
categoryPath: z.ZodOptional<z.ZodString>;
|
|
1890
|
+
attribute: z.ZodOptional<z.ZodObject<{
|
|
1891
|
+
key: z.ZodString;
|
|
1892
|
+
valueCode: z.ZodString;
|
|
1893
|
+
}, z.core.$strip>>;
|
|
1894
|
+
}, z.core.$strip>;
|
|
1895
|
+
}, z.core.$strip>>;
|
|
1896
|
+
meta: z.ZodObject<{
|
|
1897
|
+
page: z.ZodNumber;
|
|
1898
|
+
pageSize: z.ZodNumber;
|
|
1899
|
+
totalCount: z.ZodNumber;
|
|
1900
|
+
}, z.core.$strip>;
|
|
1901
|
+
}, z.core.$strip>;
|
|
1902
|
+
export type PriceBookRowsResponse = z.infer<typeof priceBookRowsResponseSchema>;
|
|
1903
|
+
/** `…/targets/organizations?search=` and `?ids=` (G12), scope-filtered. */
|
|
1904
|
+
export declare const priceBookTargetOrganizationSchema: z.ZodObject<{
|
|
1905
|
+
id: z.ZodString;
|
|
1906
|
+
name: z.ZodString;
|
|
1907
|
+
taxId: z.ZodString;
|
|
1908
|
+
}, z.core.$strip>;
|
|
1909
|
+
export type PriceBookTargetOrganization = z.infer<typeof priceBookTargetOrganizationSchema>;
|
|
1910
|
+
export declare const priceBookTargetOrganizationsResponseSchema: z.ZodObject<{
|
|
1911
|
+
data: z.ZodObject<{
|
|
1912
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1913
|
+
id: z.ZodString;
|
|
1914
|
+
name: z.ZodString;
|
|
1915
|
+
taxId: z.ZodString;
|
|
1916
|
+
}, z.core.$strip>>;
|
|
1917
|
+
}, z.core.$strip>;
|
|
1918
|
+
}, z.core.$strip>;
|
|
1919
|
+
/** `…/targets/customer-groups`. */
|
|
1920
|
+
export declare const priceBookTargetCustomerGroupSchema: z.ZodObject<{
|
|
1921
|
+
id: z.ZodString;
|
|
1922
|
+
code: z.ZodString;
|
|
1923
|
+
name: z.ZodString;
|
|
1924
|
+
}, z.core.$strip>;
|
|
1925
|
+
export type PriceBookTargetCustomerGroup = z.infer<typeof priceBookTargetCustomerGroupSchema>;
|
|
1926
|
+
export declare const priceBookTargetCustomerGroupsResponseSchema: z.ZodObject<{
|
|
1927
|
+
data: z.ZodObject<{
|
|
1928
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1929
|
+
id: z.ZodString;
|
|
1930
|
+
code: z.ZodString;
|
|
1931
|
+
name: z.ZodString;
|
|
1932
|
+
}, z.core.$strip>>;
|
|
1933
|
+
}, z.core.$strip>;
|
|
1934
|
+
}, z.core.$strip>;
|
|
1935
|
+
/** `…/targets/categories`: live categories, as a flat list with their parent; `name` by language tag. */
|
|
1936
|
+
export declare const priceBookTargetCategorySchema: z.ZodObject<{
|
|
1937
|
+
id: z.ZodString;
|
|
1938
|
+
slug: z.ZodString;
|
|
1939
|
+
name: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1940
|
+
parentCategoryId: z.ZodNullable<z.ZodString>;
|
|
1941
|
+
sortOrder: z.ZodNumber;
|
|
1942
|
+
}, z.core.$strip>;
|
|
1943
|
+
export type PriceBookTargetCategory = z.infer<typeof priceBookTargetCategorySchema>;
|
|
1944
|
+
export declare const priceBookTargetCategoriesResponseSchema: z.ZodObject<{
|
|
1945
|
+
data: z.ZodObject<{
|
|
1946
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1947
|
+
id: z.ZodString;
|
|
1948
|
+
slug: z.ZodString;
|
|
1949
|
+
name: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1950
|
+
parentCategoryId: z.ZodNullable<z.ZodString>;
|
|
1951
|
+
sortOrder: z.ZodNumber;
|
|
1952
|
+
}, z.core.$strip>>;
|
|
1953
|
+
}, z.core.$strip>;
|
|
1954
|
+
}, z.core.$strip>;
|
|
1955
|
+
/** `…/targets/attributes`: eligible *Price list rules* attributes with their option values. */
|
|
1956
|
+
export declare const priceBookTargetAttributeSchema: z.ZodObject<{
|
|
1957
|
+
key: z.ZodString;
|
|
1958
|
+
label: z.ZodString;
|
|
1959
|
+
valueType: z.ZodString;
|
|
1960
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1961
|
+
value: z.ZodString;
|
|
1962
|
+
label: z.ZodString;
|
|
1963
|
+
}, z.core.$strip>>;
|
|
1964
|
+
}, z.core.$strip>;
|
|
1965
|
+
export type PriceBookTargetAttribute = z.infer<typeof priceBookTargetAttributeSchema>;
|
|
1966
|
+
export declare const priceBookTargetAttributesResponseSchema: z.ZodObject<{
|
|
1967
|
+
data: z.ZodObject<{
|
|
1968
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1969
|
+
key: z.ZodString;
|
|
1970
|
+
label: z.ZodString;
|
|
1971
|
+
valueType: z.ZodString;
|
|
1972
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1973
|
+
value: z.ZodString;
|
|
1974
|
+
label: z.ZodString;
|
|
1975
|
+
}, z.core.$strip>>;
|
|
1976
|
+
}, z.core.$strip>>;
|
|
1977
|
+
}, z.core.$strip>;
|
|
1978
|
+
}, z.core.$strip>;
|
|
1979
|
+
/**
|
|
1980
|
+
* `…/targets/sales-channels?currency=`: channels, narrowed to those offering a
|
|
1981
|
+
* currency when one is asked; `name` by language tag.
|
|
1982
|
+
*/
|
|
1983
|
+
export declare const priceBookTargetSalesChannelSchema: z.ZodObject<{
|
|
1984
|
+
id: z.ZodString;
|
|
1985
|
+
code: z.ZodString;
|
|
1986
|
+
name: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1987
|
+
currencies: z.ZodArray<z.ZodString>;
|
|
1988
|
+
defaultCurrency: z.ZodString;
|
|
1989
|
+
}, z.core.$strip>;
|
|
1990
|
+
export type PriceBookTargetSalesChannel = z.infer<typeof priceBookTargetSalesChannelSchema>;
|
|
1991
|
+
export declare const priceBookTargetSalesChannelsResponseSchema: z.ZodObject<{
|
|
1992
|
+
data: z.ZodObject<{
|
|
1993
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1994
|
+
id: z.ZodString;
|
|
1995
|
+
code: z.ZodString;
|
|
1996
|
+
name: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1997
|
+
currencies: z.ZodArray<z.ZodString>;
|
|
1998
|
+
defaultCurrency: z.ZodString;
|
|
1999
|
+
}, z.core.$strip>>;
|
|
2000
|
+
}, z.core.$strip>;
|
|
2001
|
+
}, z.core.$strip>;
|
|
2002
|
+
/** `…/targets/currencies`: every currency a channel offers, with the channels' codes. */
|
|
2003
|
+
export declare const priceBookTargetCurrencySchema: z.ZodObject<{
|
|
2004
|
+
code: z.ZodString;
|
|
2005
|
+
exposedByChannels: z.ZodArray<z.ZodString>;
|
|
2006
|
+
}, z.core.$strip>;
|
|
2007
|
+
export type PriceBookTargetCurrency = z.infer<typeof priceBookTargetCurrencySchema>;
|
|
2008
|
+
export declare const priceBookTargetCurrenciesResponseSchema: z.ZodObject<{
|
|
2009
|
+
data: z.ZodObject<{
|
|
2010
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2011
|
+
code: z.ZodString;
|
|
2012
|
+
exposedByChannels: z.ZodArray<z.ZodString>;
|
|
2013
|
+
}, z.core.$strip>>;
|
|
2014
|
+
}, z.core.$strip>;
|
|
2015
|
+
}, z.core.$strip>;
|
|
2016
|
+
export declare const PRICE_BOOK_MAX_RESOLVE_LINES = 200;
|
|
2017
|
+
export declare const priceBookResolveRequestSchema: z.ZodObject<{
|
|
2018
|
+
salesChannelId: z.ZodOptional<z.ZodString>;
|
|
2019
|
+
currencyCode: z.ZodOptional<z.ZodString>;
|
|
2020
|
+
buyer: z.ZodDefault<z.ZodObject<{
|
|
2021
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
2022
|
+
customerAccountId: z.ZodOptional<z.ZodString>;
|
|
2023
|
+
}, z.core.$strip>>;
|
|
2024
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
2025
|
+
key: z.ZodString;
|
|
2026
|
+
productId: z.ZodString;
|
|
2027
|
+
variantId: z.ZodOptional<z.ZodString>;
|
|
2028
|
+
quantity: z.ZodDefault<z.ZodNumber>;
|
|
2029
|
+
}, z.core.$strip>>;
|
|
2030
|
+
}, z.core.$strip>;
|
|
2031
|
+
export type PriceBookResolveRequest = z.infer<typeof priceBookResolveRequestSchema>;
|
|
2032
|
+
export declare const priceBookResolvedLineSchema: z.ZodObject<{
|
|
2033
|
+
key: z.ZodString;
|
|
2034
|
+
price: z.ZodNullable<z.ZodObject<{
|
|
2035
|
+
amount: z.ZodString;
|
|
2036
|
+
currency: z.ZodString;
|
|
2037
|
+
source: z.ZodEnum<{
|
|
2038
|
+
buyer: "buyer";
|
|
2039
|
+
base: "base";
|
|
2040
|
+
catalogue: "catalogue";
|
|
2041
|
+
sale: "sale";
|
|
2042
|
+
}>;
|
|
2043
|
+
compareAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2044
|
+
}, z.core.$strip>>;
|
|
2045
|
+
explanation: z.ZodObject<{
|
|
2046
|
+
tier: z.ZodNullable<z.ZodEnum<{
|
|
2047
|
+
buyer: "buyer";
|
|
2048
|
+
base: "base";
|
|
2049
|
+
catalogue: "catalogue";
|
|
2050
|
+
sale: "sale";
|
|
2051
|
+
}>>;
|
|
2052
|
+
cell: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2053
|
+
"org.variant": "org.variant";
|
|
2054
|
+
"org.product": "org.product";
|
|
2055
|
+
"org.category_attribute": "org.category_attribute";
|
|
2056
|
+
"org.category": "org.category";
|
|
2057
|
+
"org.attribute": "org.attribute";
|
|
2058
|
+
"org.all": "org.all";
|
|
2059
|
+
"group.variant": "group.variant";
|
|
2060
|
+
"group.product": "group.product";
|
|
2061
|
+
"group.category_attribute": "group.category_attribute";
|
|
2062
|
+
"group.category": "group.category";
|
|
2063
|
+
"group.attribute": "group.attribute";
|
|
2064
|
+
"group.all": "group.all";
|
|
2065
|
+
}>>>;
|
|
2066
|
+
bookId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2067
|
+
bookName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2068
|
+
rowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2069
|
+
reference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2070
|
+
precedenceVersion: z.ZodNumber;
|
|
2071
|
+
candidates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2072
|
+
cell: z.ZodNullable<z.ZodEnum<{
|
|
2073
|
+
"org.variant": "org.variant";
|
|
2074
|
+
"org.product": "org.product";
|
|
2075
|
+
"org.category_attribute": "org.category_attribute";
|
|
2076
|
+
"org.category": "org.category";
|
|
2077
|
+
"org.attribute": "org.attribute";
|
|
2078
|
+
"org.all": "org.all";
|
|
2079
|
+
"group.variant": "group.variant";
|
|
2080
|
+
"group.product": "group.product";
|
|
2081
|
+
"group.category_attribute": "group.category_attribute";
|
|
2082
|
+
"group.category": "group.category";
|
|
2083
|
+
"group.attribute": "group.attribute";
|
|
2084
|
+
"group.all": "group.all";
|
|
2085
|
+
}>>;
|
|
2086
|
+
bookId: z.ZodString;
|
|
2087
|
+
bookName: z.ZodString;
|
|
2088
|
+
rowId: z.ZodString;
|
|
2089
|
+
labels: z.ZodObject<{
|
|
2090
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
2091
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
2092
|
+
variantLabel: z.ZodNullable<z.ZodString>;
|
|
2093
|
+
variantSku: z.ZodNullable<z.ZodString>;
|
|
2094
|
+
categoryPath: z.ZodNullable<z.ZodString>;
|
|
2095
|
+
attributeLabel: z.ZodNullable<z.ZodString>;
|
|
2096
|
+
attributeValueLabel: z.ZodNullable<z.ZodString>;
|
|
2097
|
+
}, z.core.$strip>;
|
|
2098
|
+
amount: z.ZodString;
|
|
2099
|
+
}, z.core.$strip>>>;
|
|
2100
|
+
}, z.core.$strip>;
|
|
2101
|
+
}, z.core.$strip>;
|
|
2102
|
+
export type PriceBookResolvedLine = z.infer<typeof priceBookResolvedLineSchema>;
|
|
2103
|
+
export declare const precedenceViewSchema: z.ZodObject<{
|
|
2104
|
+
cells: z.ZodArray<z.ZodEnum<{
|
|
2105
|
+
"org.variant": "org.variant";
|
|
2106
|
+
"org.product": "org.product";
|
|
2107
|
+
"org.category_attribute": "org.category_attribute";
|
|
2108
|
+
"org.category": "org.category";
|
|
2109
|
+
"org.attribute": "org.attribute";
|
|
2110
|
+
"org.all": "org.all";
|
|
2111
|
+
"group.variant": "group.variant";
|
|
2112
|
+
"group.product": "group.product";
|
|
2113
|
+
"group.category_attribute": "group.category_attribute";
|
|
2114
|
+
"group.category": "group.category";
|
|
2115
|
+
"group.attribute": "group.attribute";
|
|
2116
|
+
"group.all": "group.all";
|
|
2117
|
+
}>>;
|
|
2118
|
+
categoryBeforeAttribute: z.ZodBoolean;
|
|
2119
|
+
depthMode: z.ZodEnum<{
|
|
2120
|
+
within_cell: "within_cell";
|
|
2121
|
+
nearest_organization_first: "nearest_organization_first";
|
|
2122
|
+
}>;
|
|
2123
|
+
version: z.ZodNumber;
|
|
2124
|
+
preset: z.ZodNullable<z.ZodEnum<{
|
|
2125
|
+
AF: "AF";
|
|
2126
|
+
SF: "SF";
|
|
2127
|
+
HY: "HY";
|
|
2128
|
+
"AF-N": "AF-N";
|
|
2129
|
+
}>>;
|
|
2130
|
+
}, z.core.$strip>;
|
|
2131
|
+
export type PrecedenceView = z.infer<typeof precedenceViewSchema>;
|
|
2132
|
+
/** Setting code: show the catalogue price beside a lower buyer price (owner ruling Q8a, N4). */
|
|
2133
|
+
export declare const SHOW_LIST_PRICE_SETTING_CODE = "pricing.show_list_price";
|
|
2134
|
+
/** Body of `PUT /api/v1/admin/price-books/settings/show-list-price`. */
|
|
2135
|
+
export declare const showListPriceWriteSchema: z.ZodObject<{
|
|
2136
|
+
value: z.ZodBoolean;
|
|
2137
|
+
}, z.core.$strip>;
|
|
2138
|
+
export type ShowListPriceWrite = z.infer<typeof showListPriceWriteSchema>;
|
|
2139
|
+
/**
|
|
2140
|
+
* One product's base price per currency — the body of
|
|
2141
|
+
* `GET /api/v1/admin/price-books/base-prices?productId=` and the answer of
|
|
2142
|
+
* every {@link PriceBookWritePort} call. A variant's row is `null` when it
|
|
2143
|
+
* inherits the product's base price.
|
|
2144
|
+
*/
|
|
2145
|
+
export declare const productBasePricesSchema: z.ZodObject<{
|
|
2146
|
+
productId: z.ZodString;
|
|
2147
|
+
byCurrency: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2148
|
+
bookId: z.ZodString;
|
|
2149
|
+
product: z.ZodArray<z.ZodObject<{
|
|
2150
|
+
minQuantity: z.ZodNumber;
|
|
2151
|
+
maxQuantity: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
2152
|
+
amount: z.ZodString;
|
|
2153
|
+
}, z.core.$strip>>;
|
|
2154
|
+
variants: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2155
|
+
type: z.ZodLiteral<"fixed">;
|
|
2156
|
+
tiers: z.ZodArray<z.ZodObject<{
|
|
2157
|
+
minQuantity: z.ZodNumber;
|
|
2158
|
+
maxQuantity: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
2159
|
+
amount: z.ZodString;
|
|
2160
|
+
}, z.core.$strip>>;
|
|
2161
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2162
|
+
type: z.ZodLiteral<"percent">;
|
|
2163
|
+
percent: z.ZodString;
|
|
2164
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2165
|
+
type: z.ZodLiteral<"amount">;
|
|
2166
|
+
amount: z.ZodString;
|
|
2167
|
+
}, z.core.$strip>], "type">>>;
|
|
2168
|
+
}, z.core.$strip>>;
|
|
2169
|
+
writable: z.ZodBoolean;
|
|
2170
|
+
}, z.core.$strip>;
|
|
2171
|
+
export type ProductBasePrices = z.infer<typeof productBasePricesSchema>;
|
|
2172
|
+
/**
|
|
2173
|
+
* Container name: `priceBookWritePort`. Owner: `price_lists`
|
|
2174
|
+
* (`specs/160-pricing-model-v2/contracts/price-book-write-port.md`).
|
|
2175
|
+
*
|
|
2176
|
+
* What another module — the PIM connectors' price import — may do to a
|
|
2177
|
+
* product's **base prices**, and nothing more: read them, replace them, and
|
|
2178
|
+
* list the books that price the product directly for a field-protection
|
|
2179
|
+
* compare. It replaces `priceListAdminPort` (removed with the old model;
|
|
2180
|
+
* the method mapping is in the contract §3). Both writes are the admin API's
|
|
2181
|
+
* own base-price command: one audited Command Bus run, the base books' version
|
|
2182
|
+
* moved, the pricing caches told after the commit, the same refusals. A
|
|
2183
|
+
* currency with no base book gets one inside that command, as the admin write
|
|
2184
|
+
* does.
|
|
2185
|
+
*
|
|
2186
|
+
* **Owner off:** the seam fails closed — resolving this port throws
|
|
2187
|
+
* `ModuleDisabledError` and the call answers 503 `MODULE_DISABLED`, so nothing
|
|
2188
|
+
* half-executes. Whether `price_lists` has an off state at all is its manifest's
|
|
2189
|
+
* `activation` to say, not this line's: a module declaring
|
|
2190
|
+
* `nonDeactivatable` never enters one.
|
|
2191
|
+
*/
|
|
2192
|
+
export interface PriceBookWritePort {
|
|
2193
|
+
/** The product's base price per currency, each variant's row (`null` = inherits). */
|
|
2194
|
+
basePrices(productId: string): Promise<ProductBasePrices>;
|
|
2195
|
+
/**
|
|
2196
|
+
* Replace the product-level base tiers in each named currency (a code is
|
|
2197
|
+
* upper-cased); the variants' base rows stay as they are, and currencies not
|
|
2198
|
+
* named are untouched. Amounts are decimal strings.
|
|
2199
|
+
*/
|
|
2200
|
+
replaceProductBaseTiers(productId: string, tiersByCurrency: Readonly<Record<string, readonly BasePriceTier[]>>): Promise<ProductBasePrices>;
|
|
2201
|
+
/** Replace product and variant base rows per currency — exactly `PUT …/base-prices/:productId`. */
|
|
2202
|
+
replaceBasePrices(productId: string, write: BasePricesWrite): Promise<ProductBasePrices>;
|
|
2203
|
+
/** The books with a row naming the product (or the variant) directly — the admin G1 list, every page. */
|
|
2204
|
+
booksPricingProduct(productId: string, variantId?: string | null): Promise<PriceBookSummary[]>;
|
|
2205
|
+
}
|
|
2206
|
+
//# sourceMappingURL=price-books.d.ts.map
|