@endora-commerce/contracts 0.109.0 → 0.110.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/actor.d.ts +16 -0
- package/dist/actor.d.ts.map +1 -1
- package/dist/addresses.d.ts +35 -0
- package/dist/addresses.d.ts.map +1 -1
- package/dist/addresses.js +8 -1
- package/dist/addresses.js.map +1 -1
- package/dist/admin-contributions.d.ts +62 -7
- package/dist/admin-contributions.d.ts.map +1 -1
- package/dist/admin-contributions.js +27 -8
- package/dist/admin-contributions.js.map +1 -1
- package/dist/admin-roles.d.ts +8 -2
- package/dist/admin-roles.d.ts.map +1 -1
- package/dist/admin-roles.js.map +1 -1
- package/dist/admin-users.d.ts +9 -0
- package/dist/admin-users.d.ts.map +1 -1
- package/dist/admin.d.ts +77 -4
- package/dist/admin.d.ts.map +1 -1
- package/dist/admin.js +79 -3
- package/dist/admin.js.map +1 -1
- package/dist/assets-library.d.ts +26 -0
- package/dist/assets-library.d.ts.map +1 -1
- package/dist/assets-library.js +6 -3
- package/dist/assets-library.js.map +1 -1
- package/dist/audit-logs.d.ts +12 -0
- package/dist/audit-logs.d.ts.map +1 -1
- package/dist/audit-logs.js +12 -0
- package/dist/audit-logs.js.map +1 -1
- package/dist/blog.d.ts +382 -22
- package/dist/blog.d.ts.map +1 -1
- package/dist/blog.js +199 -17
- package/dist/blog.js.map +1 -1
- package/dist/carts.d.ts +394 -36
- package/dist/carts.d.ts.map +1 -1
- package/dist/carts.js +131 -8
- package/dist/carts.js.map +1 -1
- package/dist/catalog.d.ts +351 -219
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +209 -157
- package/dist/catalog.js.map +1 -1
- package/dist/cms-brand.d.ts +14 -14
- package/dist/cms.d.ts +41 -16
- package/dist/cms.d.ts.map +1 -1
- package/dist/cms.js.map +1 -1
- package/dist/common.d.ts +23 -6
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +25 -2
- package/dist/common.js.map +1 -1
- package/dist/comparisons.d.ts +28 -21
- package/dist/comparisons.d.ts.map +1 -1
- package/dist/comparisons.js +2 -1
- package/dist/comparisons.js.map +1 -1
- package/dist/credit-limits.d.ts +1 -0
- package/dist/credit-limits.d.ts.map +1 -1
- package/dist/credit-limits.js +14 -0
- package/dist/credit-limits.js.map +1 -1
- package/dist/crm.d.ts +79 -49
- package/dist/crm.d.ts.map +1 -1
- package/dist/crm.js +6 -0
- package/dist/crm.js.map +1 -1
- package/dist/custom-fields.d.ts +27 -13
- package/dist/custom-fields.d.ts.map +1 -1
- package/dist/custom-fields.js +15 -1
- package/dist/custom-fields.js.map +1 -1
- package/dist/customer-accounts.d.ts +186 -22
- package/dist/customer-accounts.d.ts.map +1 -1
- package/dist/customer-accounts.js +39 -0
- package/dist/customer-accounts.js.map +1 -1
- package/dist/customers.d.ts +40 -73
- package/dist/customers.d.ts.map +1 -1
- package/dist/customers.js +45 -10
- package/dist/customers.js.map +1 -1
- package/dist/document-templates.d.ts +12 -12
- package/dist/errors.d.ts +119 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +146 -1
- package/dist/errors.js.map +1 -1
- package/dist/forms-logic.d.ts +79 -0
- package/dist/forms-logic.d.ts.map +1 -0
- package/dist/forms-logic.fixtures.d.ts +52 -0
- package/dist/forms-logic.fixtures.d.ts.map +1 -0
- package/dist/forms-logic.fixtures.js +610 -0
- package/dist/forms-logic.fixtures.js.map +1 -0
- package/dist/forms-logic.js +699 -0
- package/dist/forms-logic.js.map +1 -0
- package/dist/forms.d.ts +9833 -0
- package/dist/forms.d.ts.map +1 -0
- package/dist/forms.js +827 -0
- package/dist/forms.js.map +1 -0
- package/dist/import-export.d.ts +180 -0
- package/dist/import-export.d.ts.map +1 -1
- package/dist/import-export.js +60 -0
- package/dist/import-export.js.map +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/dist/inventory.d.ts +9 -9
- package/dist/invoice-ledger.d.ts +7 -7
- package/dist/invoices.d.ts.map +1 -1
- package/dist/invoices.js +4 -0
- package/dist/invoices.js.map +1 -1
- package/dist/mfa.d.ts +124 -4
- package/dist/mfa.d.ts.map +1 -1
- package/dist/mfa.js +46 -0
- package/dist/mfa.js.map +1 -1
- package/dist/modules.d.ts +36 -4
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +68 -0
- package/dist/modules.js.map +1 -1
- package/dist/money-decimal.d.ts +54 -0
- package/dist/money-decimal.d.ts.map +1 -1
- package/dist/money-decimal.js +95 -0
- package/dist/money-decimal.js.map +1 -1
- package/dist/newsletter.d.ts +4 -4
- package/dist/orders.d.ts +105 -12
- package/dist/orders.d.ts.map +1 -1
- package/dist/orders.js +60 -4
- package/dist/orders.js.map +1 -1
- package/dist/organization-registry-lookup.d.ts +362 -0
- package/dist/organization-registry-lookup.d.ts.map +1 -0
- package/dist/organization-registry-lookup.js +196 -0
- package/dist/organization-registry-lookup.js.map +1 -0
- package/dist/organization-roles.d.ts +340 -0
- package/dist/organization-roles.d.ts.map +1 -0
- package/dist/organization-roles.js +211 -0
- package/dist/organization-roles.js.map +1 -0
- package/dist/organizations.d.ts +123 -89
- package/dist/organizations.d.ts.map +1 -1
- package/dist/organizations.js +68 -24
- package/dist/organizations.js.map +1 -1
- package/dist/page-builder-props.d.ts +56 -56
- package/dist/pim-connector.d.ts +7 -3
- package/dist/pim-connector.d.ts.map +1 -1
- package/dist/pim-connector.js +6 -2
- package/dist/pim-connector.js.map +1 -1
- package/dist/pim-field-path.d.ts +5 -1
- package/dist/pim-field-path.d.ts.map +1 -1
- package/dist/pim-field-path.js +37 -81
- package/dist/pim-field-path.js.map +1 -1
- package/dist/pim-locale-mapping.d.ts +131 -0
- package/dist/pim-locale-mapping.d.ts.map +1 -0
- package/dist/pim-locale-mapping.js +193 -0
- package/dist/pim-locale-mapping.js.map +1 -0
- package/dist/price-books.d.ts +67 -63
- package/dist/price-books.d.ts.map +1 -1
- package/dist/price-books.js +6 -2
- package/dist/price-books.js.map +1 -1
- package/dist/price-lists.d.ts +8 -8
- package/dist/product-feeds.d.ts +94 -94
- package/dist/product-feeds.d.ts.map +1 -1
- package/dist/product-feeds.js +5 -0
- package/dist/product-feeds.js.map +1 -1
- package/dist/product-scope-model.d.ts +161 -0
- package/dist/product-scope-model.d.ts.map +1 -0
- package/dist/product-scope-model.js +161 -0
- package/dist/product-scope-model.js.map +1 -0
- package/dist/product-scope-overrides.d.ts +0 -103
- package/dist/product-scope-overrides.d.ts.map +1 -1
- package/dist/product-scope-overrides.js +0 -54
- package/dist/product-scope-overrides.js.map +1 -1
- package/dist/product-scoped-values.d.ts +2610 -0
- package/dist/product-scoped-values.d.ts.map +1 -0
- package/dist/product-scoped-values.js +425 -0
- package/dist/product-scoped-values.js.map +1 -0
- package/dist/product-scopes.d.ts +182 -64
- package/dist/product-scopes.d.ts.map +1 -1
- package/dist/product-scopes.js +89 -18
- package/dist/product-scopes.js.map +1 -1
- package/dist/product-tax-rates.d.ts +38 -0
- package/dist/product-tax-rates.d.ts.map +1 -0
- package/dist/product-tax-rates.js +45 -0
- package/dist/product-tax-rates.js.map +1 -0
- package/dist/product-url-keys.d.ts +51 -45
- package/dist/product-url-keys.d.ts.map +1 -1
- package/dist/product-url-keys.js +73 -39
- package/dist/product-url-keys.js.map +1 -1
- package/dist/product-value-resolver.d.ts +37 -60
- package/dist/product-value-resolver.d.ts.map +1 -1
- package/dist/product-value-resolver.js +36 -96
- package/dist/product-value-resolver.js.map +1 -1
- package/dist/projects.d.ts +15 -0
- package/dist/projects.d.ts.map +1 -1
- package/dist/projects.js +6 -0
- package/dist/projects.js.map +1 -1
- package/dist/promotions.d.ts +10 -10
- package/dist/pwa.d.ts +2 -2
- package/dist/quick-order.d.ts +150 -6
- package/dist/quick-order.d.ts.map +1 -1
- package/dist/quick-order.js +75 -1
- package/dist/quick-order.js.map +1 -1
- package/dist/quote-requests.d.ts +63 -12
- package/dist/quote-requests.d.ts.map +1 -1
- package/dist/quote-requests.js +42 -1
- package/dist/quote-requests.js.map +1 -1
- package/dist/record-references.d.ts.map +1 -1
- package/dist/record-references.js +2 -3
- package/dist/record-references.js.map +1 -1
- package/dist/record-rich-text.d.ts.map +1 -1
- package/dist/record-rich-text.js +2 -1
- package/dist/record-rich-text.js.map +1 -1
- package/dist/returns.d.ts +208 -52
- package/dist/returns.d.ts.map +1 -1
- package/dist/returns.js +139 -26
- package/dist/returns.js.map +1 -1
- package/dist/saved-list-views.d.ts +28 -0
- package/dist/saved-list-views.d.ts.map +1 -1
- package/dist/saved-list-views.js +14 -1
- package/dist/saved-list-views.js.map +1 -1
- package/dist/scoped-write-encoding.d.ts +100 -0
- package/dist/scoped-write-encoding.d.ts.map +1 -0
- package/dist/scoped-write-encoding.js +135 -0
- package/dist/scoped-write-encoding.js.map +1 -0
- package/dist/search.d.ts +18 -16
- package/dist/search.d.ts.map +1 -1
- package/dist/seo.d.ts +81 -28
- package/dist/seo.d.ts.map +1 -1
- package/dist/seo.js +8 -1
- package/dist/seo.js.map +1 -1
- package/dist/settings.d.ts +129 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +36 -0
- package/dist/settings.js.map +1 -1
- package/dist/shopping-lists.d.ts +24 -3
- package/dist/shopping-lists.d.ts.map +1 -1
- package/dist/shopping-lists.js +20 -0
- package/dist/shopping-lists.js.map +1 -1
- package/dist/storefront-cache-tags.d.ts +12 -0
- package/dist/storefront-cache-tags.d.ts.map +1 -1
- package/dist/storefront-cache-tags.js +12 -0
- package/dist/storefront-cache-tags.js.map +1 -1
- package/dist/storefront-value-overrides.d.ts +18 -56
- package/dist/storefront-value-overrides.d.ts.map +1 -1
- package/dist/storefront-value-overrides.js +11 -86
- package/dist/storefront-value-overrides.js.map +1 -1
- package/dist/tasks.d.ts +6 -6
- package/dist/transactional-emails.d.ts +9 -9
- package/package.json +2 -2
- package/dist/scoped-translations.d.ts +0 -48
- package/dist/scoped-translations.d.ts.map +0 -1
- package/dist/scoped-translations.js +0 -78
- package/dist/scoped-translations.js.map +0 -1
package/dist/catalog.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import { type ProductVisibility } from './common.js';
|
|
|
3
3
|
import type { FulfilmentStrategy } from './inventory.js';
|
|
4
4
|
import type { BulkImportReport } from './import-export.js';
|
|
5
5
|
import type { AttributeScope } from './product-value-resolver.js';
|
|
6
|
+
import type { FieldPath, ScopeLevel } from './product-scope-model.js';
|
|
7
|
+
import type { ProductScopedWriteCell } from './product-scopes.js';
|
|
6
8
|
/**
|
|
7
9
|
* Catalog module contracts — Source of truth per Principle V.
|
|
8
10
|
* See specs/001-b2b-platform-foundation/contracts/catalog.contract.md.
|
|
@@ -46,8 +48,8 @@ export declare const stockModeSchema: z.ZodEnum<{
|
|
|
46
48
|
}>;
|
|
47
49
|
export type StockMode = z.infer<typeof stockModeSchema>;
|
|
48
50
|
export declare const stockIndicatorSchema: z.ZodEnum<{
|
|
49
|
-
available: "available";
|
|
50
51
|
out_of_stock: "out_of_stock";
|
|
52
|
+
available: "available";
|
|
51
53
|
to_order: "to_order";
|
|
52
54
|
}>;
|
|
53
55
|
export type StockIndicator = z.infer<typeof stockIndicatorSchema>;
|
|
@@ -67,9 +69,10 @@ export declare const attributeValueTypeSchema: z.ZodEnum<{
|
|
|
67
69
|
boolean: "boolean";
|
|
68
70
|
date: "date";
|
|
69
71
|
enum: "enum";
|
|
70
|
-
select: "select";
|
|
71
|
-
price: "price";
|
|
72
72
|
multiselect: "multiselect";
|
|
73
|
+
price: "price";
|
|
74
|
+
select: "select";
|
|
75
|
+
page_builder: "page_builder";
|
|
73
76
|
}>;
|
|
74
77
|
export type AttributeValueType = z.infer<typeof attributeValueTypeSchema>;
|
|
75
78
|
/**
|
|
@@ -79,9 +82,10 @@ export type AttributeValueType = z.infer<typeof attributeValueTypeSchema>;
|
|
|
79
82
|
export declare const apiAttributeTypeSchema: z.ZodEnum<{
|
|
80
83
|
number: "number";
|
|
81
84
|
input: "input";
|
|
82
|
-
select: "select";
|
|
83
|
-
price: "price";
|
|
84
85
|
multiselect: "multiselect";
|
|
86
|
+
price: "price";
|
|
87
|
+
select: "select";
|
|
88
|
+
page_builder: "page_builder";
|
|
85
89
|
slider: "slider";
|
|
86
90
|
}>;
|
|
87
91
|
export type ApiAttributeType = z.infer<typeof apiAttributeTypeSchema>;
|
|
@@ -161,20 +165,20 @@ export type ProductAsset = z.infer<typeof productAssetSchema>;
|
|
|
161
165
|
* storefront shows (`available` = stock not managed for the product).
|
|
162
166
|
*/
|
|
163
167
|
export declare const productAvailabilityBandSchema: z.ZodEnum<{
|
|
164
|
-
medium: "medium";
|
|
165
|
-
available: "available";
|
|
166
|
-
out_of_stock: "out_of_stock";
|
|
167
168
|
high: "high";
|
|
169
|
+
medium: "medium";
|
|
168
170
|
low: "low";
|
|
171
|
+
out_of_stock: "out_of_stock";
|
|
172
|
+
available: "available";
|
|
169
173
|
}>;
|
|
170
174
|
export type ProductAvailabilityBand = z.infer<typeof productAvailabilityBandSchema>;
|
|
171
175
|
export declare const productAvailabilitySchema: z.ZodObject<{
|
|
172
176
|
band: z.ZodEnum<{
|
|
173
|
-
medium: "medium";
|
|
174
|
-
available: "available";
|
|
175
|
-
out_of_stock: "out_of_stock";
|
|
176
177
|
high: "high";
|
|
178
|
+
medium: "medium";
|
|
177
179
|
low: "low";
|
|
180
|
+
out_of_stock: "out_of_stock";
|
|
181
|
+
available: "available";
|
|
178
182
|
}>;
|
|
179
183
|
inStock: z.ZodBoolean;
|
|
180
184
|
}, z.core.$strip>;
|
|
@@ -226,10 +230,10 @@ export declare const productResolvedPriceSchema: z.ZodObject<{
|
|
|
226
230
|
currency: z.ZodString;
|
|
227
231
|
}, z.core.$strip>>;
|
|
228
232
|
displayMode: z.ZodEnum<{
|
|
229
|
-
none: "none";
|
|
230
|
-
both: "both";
|
|
231
233
|
gross_only: "gross_only";
|
|
232
234
|
net_only: "net_only";
|
|
235
|
+
both: "both";
|
|
236
|
+
none: "none";
|
|
233
237
|
}>;
|
|
234
238
|
listPrice: z.ZodOptional<z.ZodObject<{
|
|
235
239
|
amount: z.ZodString;
|
|
@@ -262,19 +266,19 @@ export declare const productSummarySchema: z.ZodObject<{
|
|
|
262
266
|
}, z.core.$strip>>>;
|
|
263
267
|
priceVariesByVariant: z.ZodOptional<z.ZodBoolean>;
|
|
264
268
|
stockIndicator: z.ZodNullable<z.ZodEnum<{
|
|
265
|
-
available: "available";
|
|
266
269
|
out_of_stock: "out_of_stock";
|
|
270
|
+
available: "available";
|
|
267
271
|
to_order: "to_order";
|
|
268
272
|
}>>;
|
|
269
273
|
stockLevel: z.ZodNullable<z.ZodNumber>;
|
|
270
274
|
priceUnavailable: z.ZodOptional<z.ZodBoolean>;
|
|
271
275
|
availability: z.ZodOptional<z.ZodObject<{
|
|
272
276
|
band: z.ZodEnum<{
|
|
273
|
-
medium: "medium";
|
|
274
|
-
available: "available";
|
|
275
|
-
out_of_stock: "out_of_stock";
|
|
276
277
|
high: "high";
|
|
278
|
+
medium: "medium";
|
|
277
279
|
low: "low";
|
|
280
|
+
out_of_stock: "out_of_stock";
|
|
281
|
+
available: "available";
|
|
278
282
|
}>;
|
|
279
283
|
inStock: z.ZodBoolean;
|
|
280
284
|
}, z.core.$strip>>;
|
|
@@ -289,16 +293,17 @@ export declare const productSummarySchema: z.ZodObject<{
|
|
|
289
293
|
currency: z.ZodString;
|
|
290
294
|
}, z.core.$strip>>;
|
|
291
295
|
displayMode: z.ZodEnum<{
|
|
292
|
-
none: "none";
|
|
293
|
-
both: "both";
|
|
294
296
|
gross_only: "gross_only";
|
|
295
297
|
net_only: "net_only";
|
|
298
|
+
both: "both";
|
|
299
|
+
none: "none";
|
|
296
300
|
}>;
|
|
297
301
|
listPrice: z.ZodOptional<z.ZodObject<{
|
|
298
302
|
amount: z.ZodString;
|
|
299
303
|
currency: z.ZodString;
|
|
300
304
|
}, z.core.$strip>>;
|
|
301
305
|
}, z.core.$strip>>>;
|
|
306
|
+
vatRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
302
307
|
}, z.core.$strip>;
|
|
303
308
|
export type ProductSummary = z.infer<typeof productSummarySchema>;
|
|
304
309
|
export declare const productVariantSchema: z.ZodObject<{
|
|
@@ -318,6 +323,30 @@ export declare const seoMetaSchema: z.ZodObject<{
|
|
|
318
323
|
}, z.core.$strip>;
|
|
319
324
|
}, z.core.$strip>;
|
|
320
325
|
export type SeoMeta = z.infer<typeof seoMetaSchema>;
|
|
326
|
+
/**
|
|
327
|
+
* Feature 172 — one content attribute as the product page renders it: the
|
|
328
|
+
* attribute's key, the language its document was resolved to (FR-033), and
|
|
329
|
+
* that one document. No label: the storefront prints no heading of its own
|
|
330
|
+
* (OR-4, FR-037).
|
|
331
|
+
*/
|
|
332
|
+
export declare const productPageContentAttributeSchema: z.ZodObject<{
|
|
333
|
+
key: z.ZodString;
|
|
334
|
+
language: z.ZodString;
|
|
335
|
+
content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
336
|
+
}, z.core.$strip>;
|
|
337
|
+
export type ProductPageContentAttribute = z.infer<typeof productPageContentAttributeSchema>;
|
|
338
|
+
/**
|
|
339
|
+
* Feature 172 (research R-11) — the query of `GET /api/v1/catalog/products/:idOrSlug`.
|
|
340
|
+
* `include=content` asks for `contentAttributes`; without it the response is
|
|
341
|
+
* what it was before content attributes existed. Not strict: the route's
|
|
342
|
+
* other query parameters are not this schema's to judge.
|
|
343
|
+
*/
|
|
344
|
+
export declare const productDetailQuerySchema: z.ZodObject<{
|
|
345
|
+
include: z.ZodOptional<z.ZodEnum<{
|
|
346
|
+
content: "content";
|
|
347
|
+
}>>;
|
|
348
|
+
}, z.core.$strip>;
|
|
349
|
+
export type ProductDetailQuery = z.infer<typeof productDetailQuerySchema>;
|
|
321
350
|
export declare const productDetailSchema: z.ZodObject<{
|
|
322
351
|
id: z.ZodString;
|
|
323
352
|
sku: z.ZodString;
|
|
@@ -343,19 +372,19 @@ export declare const productDetailSchema: z.ZodObject<{
|
|
|
343
372
|
}, z.core.$strip>>>;
|
|
344
373
|
priceVariesByVariant: z.ZodOptional<z.ZodBoolean>;
|
|
345
374
|
stockIndicator: z.ZodNullable<z.ZodEnum<{
|
|
346
|
-
available: "available";
|
|
347
375
|
out_of_stock: "out_of_stock";
|
|
376
|
+
available: "available";
|
|
348
377
|
to_order: "to_order";
|
|
349
378
|
}>>;
|
|
350
379
|
stockLevel: z.ZodNullable<z.ZodNumber>;
|
|
351
380
|
priceUnavailable: z.ZodOptional<z.ZodBoolean>;
|
|
352
381
|
availability: z.ZodOptional<z.ZodObject<{
|
|
353
382
|
band: z.ZodEnum<{
|
|
354
|
-
medium: "medium";
|
|
355
|
-
available: "available";
|
|
356
|
-
out_of_stock: "out_of_stock";
|
|
357
383
|
high: "high";
|
|
384
|
+
medium: "medium";
|
|
358
385
|
low: "low";
|
|
386
|
+
out_of_stock: "out_of_stock";
|
|
387
|
+
available: "available";
|
|
359
388
|
}>;
|
|
360
389
|
inStock: z.ZodBoolean;
|
|
361
390
|
}, z.core.$strip>>;
|
|
@@ -370,16 +399,17 @@ export declare const productDetailSchema: z.ZodObject<{
|
|
|
370
399
|
currency: z.ZodString;
|
|
371
400
|
}, z.core.$strip>>;
|
|
372
401
|
displayMode: z.ZodEnum<{
|
|
373
|
-
none: "none";
|
|
374
|
-
both: "both";
|
|
375
402
|
gross_only: "gross_only";
|
|
376
403
|
net_only: "net_only";
|
|
404
|
+
both: "both";
|
|
405
|
+
none: "none";
|
|
377
406
|
}>;
|
|
378
407
|
listPrice: z.ZodOptional<z.ZodObject<{
|
|
379
408
|
amount: z.ZodString;
|
|
380
409
|
currency: z.ZodString;
|
|
381
410
|
}, z.core.$strip>>;
|
|
382
411
|
}, z.core.$strip>>>;
|
|
412
|
+
vatRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
383
413
|
description: z.ZodString;
|
|
384
414
|
attributeValues: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
385
415
|
assets: z.ZodArray<z.ZodObject<{
|
|
@@ -576,12 +606,18 @@ export declare const productDetailSchema: z.ZodObject<{
|
|
|
576
606
|
boolean: "boolean";
|
|
577
607
|
date: "date";
|
|
578
608
|
enum: "enum";
|
|
579
|
-
select: "select";
|
|
580
|
-
price: "price";
|
|
581
609
|
multiselect: "multiselect";
|
|
610
|
+
price: "price";
|
|
611
|
+
select: "select";
|
|
612
|
+
page_builder: "page_builder";
|
|
582
613
|
}>;
|
|
583
614
|
valueRendered: z.ZodString;
|
|
584
615
|
}, z.core.$strip>>>;
|
|
616
|
+
contentAttributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
617
|
+
key: z.ZodString;
|
|
618
|
+
language: z.ZodString;
|
|
619
|
+
content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
620
|
+
}, z.core.$strip>>>;
|
|
585
621
|
packagingUnits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
586
622
|
id: z.ZodString;
|
|
587
623
|
name: z.ZodString;
|
|
@@ -687,9 +723,10 @@ export declare const filterDefinitionSchema: z.ZodObject<{
|
|
|
687
723
|
boolean: "boolean";
|
|
688
724
|
date: "date";
|
|
689
725
|
enum: "enum";
|
|
690
|
-
select: "select";
|
|
691
|
-
price: "price";
|
|
692
726
|
multiselect: "multiselect";
|
|
727
|
+
price: "price";
|
|
728
|
+
select: "select";
|
|
729
|
+
page_builder: "page_builder";
|
|
693
730
|
}>;
|
|
694
731
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
695
732
|
value: z.ZodString;
|
|
@@ -703,6 +740,10 @@ export declare const filterDefinitionSchema: z.ZodObject<{
|
|
|
703
740
|
filterPosition: z.ZodDefault<z.ZodNumber>;
|
|
704
741
|
}, z.core.$strip>;
|
|
705
742
|
export type FilterDefinition = z.infer<typeof filterDefinitionSchema>;
|
|
743
|
+
/** Feature 174 (R21) — the longest product name at any scope. */
|
|
744
|
+
export declare const PRODUCT_NAME_MAX = 255;
|
|
745
|
+
/** Feature 174 (R21) — the longest product description at any scope. */
|
|
746
|
+
export declare const PRODUCT_DESCRIPTION_MAX = 20000;
|
|
706
747
|
export declare const createProductRequestSchema: z.ZodObject<{
|
|
707
748
|
sku: z.ZodString;
|
|
708
749
|
type: z.ZodEnum<{
|
|
@@ -712,8 +753,8 @@ export declare const createProductRequestSchema: z.ZodObject<{
|
|
|
712
753
|
bundle: "bundle";
|
|
713
754
|
virtual: "virtual";
|
|
714
755
|
}>;
|
|
715
|
-
name: z.
|
|
716
|
-
description: z.
|
|
756
|
+
name: z.ZodString;
|
|
757
|
+
description: z.ZodNullable<z.ZodString>;
|
|
717
758
|
categoryIds: z.ZodArray<z.ZodString>;
|
|
718
759
|
attributeValues: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
719
760
|
stockMode: z.ZodOptional<z.ZodEnum<{
|
|
@@ -755,22 +796,14 @@ export declare const createProductRequestSchema: z.ZodObject<{
|
|
|
755
796
|
}, z.core.$strip>;
|
|
756
797
|
export type CreateProductRequest = z.infer<typeof createProductRequestSchema>;
|
|
757
798
|
export declare const updateProductRequestSchema: z.ZodObject<{
|
|
758
|
-
description: z.ZodOptional<z.
|
|
799
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
800
|
+
name: z.ZodOptional<z.ZodString>;
|
|
759
801
|
status: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
760
802
|
active: "active";
|
|
761
803
|
inactive: "inactive";
|
|
762
804
|
}>>>;
|
|
763
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
764
|
-
public: "public";
|
|
765
|
-
logged_in_only: "logged_in_only";
|
|
766
|
-
organization_restricted: "organization_restricted";
|
|
767
|
-
}>>;
|
|
768
|
-
name: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
769
|
-
returnable: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
770
|
-
assetIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
771
|
-
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
772
|
-
sku: z.ZodOptional<z.ZodString>;
|
|
773
805
|
minOrderQuantity: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
806
|
+
returnable: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
774
807
|
manageStock: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
775
808
|
backorderEnabled: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
776
809
|
lowStockThreshold: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
@@ -778,14 +811,22 @@ export declare const updateProductRequestSchema: z.ZodObject<{
|
|
|
778
811
|
cumulative: "cumulative";
|
|
779
812
|
per_warehouse: "per_warehouse";
|
|
780
813
|
}>>>;
|
|
814
|
+
sku: z.ZodOptional<z.ZodString>;
|
|
815
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
816
|
+
public: "public";
|
|
817
|
+
logged_in_only: "logged_in_only";
|
|
818
|
+
organization_restricted: "organization_restricted";
|
|
819
|
+
}>>;
|
|
820
|
+
allowedOrganizationIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
781
821
|
attributeValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
782
822
|
downloadAssetId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
783
823
|
downloadUrl: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
824
|
+
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
784
825
|
stockMode: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
785
826
|
categorical: "categorical";
|
|
786
827
|
numeric: "numeric";
|
|
787
828
|
}>>>;
|
|
788
|
-
|
|
829
|
+
assetIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
789
830
|
initialStock: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
790
831
|
attributeSetId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
791
832
|
fulfilmentStrategy: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
@@ -798,6 +839,7 @@ export declare const updateProductRequestSchema: z.ZodObject<{
|
|
|
798
839
|
fulfilmentStrategyWarehouseOrder: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>>;
|
|
799
840
|
publishFrom: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
800
841
|
publishUntil: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
842
|
+
version: z.ZodOptional<z.ZodString>;
|
|
801
843
|
}, z.core.$strip>;
|
|
802
844
|
export type UpdateProductRequest = z.infer<typeof updateProductRequestSchema>;
|
|
803
845
|
export declare const batchByIdProductsRequestSchema: z.ZodObject<{
|
|
@@ -813,9 +855,9 @@ export declare const MAX_RESOLVE_SELECTION_SIZE = 10000;
|
|
|
813
855
|
* shows them beside the rest, `only` shows nothing else.
|
|
814
856
|
*/
|
|
815
857
|
export declare const productArchivedModeSchema: z.ZodEnum<{
|
|
816
|
-
only: "only";
|
|
817
|
-
exclude: "exclude";
|
|
818
858
|
include: "include";
|
|
859
|
+
exclude: "exclude";
|
|
860
|
+
only: "only";
|
|
819
861
|
}>;
|
|
820
862
|
export type ProductArchivedMode = z.infer<typeof productArchivedModeSchema>;
|
|
821
863
|
export declare const resolveProductIdsRequestSchema: z.ZodObject<{
|
|
@@ -833,9 +875,9 @@ export declare const resolveProductIdsRequestSchema: z.ZodObject<{
|
|
|
833
875
|
q: z.ZodOptional<z.ZodString>;
|
|
834
876
|
includeArchived: z.ZodOptional<z.ZodBoolean>;
|
|
835
877
|
archived: z.ZodOptional<z.ZodEnum<{
|
|
836
|
-
only: "only";
|
|
837
|
-
exclude: "exclude";
|
|
838
878
|
include: "include";
|
|
879
|
+
exclude: "exclude";
|
|
880
|
+
only: "only";
|
|
839
881
|
}>>;
|
|
840
882
|
}, z.core.$strip>;
|
|
841
883
|
export type ResolveProductIdsRequest = z.infer<typeof resolveProductIdsRequestSchema>;
|
|
@@ -880,9 +922,9 @@ export declare const bulkUpdateProductsRequestSchema: z.ZodObject<{
|
|
|
880
922
|
channelId: z.ZodString;
|
|
881
923
|
languageCode: z.ZodNullable<z.ZodString>;
|
|
882
924
|
value: z.ZodEnum<{
|
|
925
|
+
inherit: "inherit";
|
|
883
926
|
active: "active";
|
|
884
927
|
inactive: "inactive";
|
|
885
|
-
inherit: "inherit";
|
|
886
928
|
}>;
|
|
887
929
|
}, z.core.$strip>>;
|
|
888
930
|
archived: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -893,8 +935,8 @@ export declare const bulkUpdateProductResultSchema: z.ZodObject<{
|
|
|
893
935
|
productId: z.ZodString;
|
|
894
936
|
status: z.ZodEnum<{
|
|
895
937
|
failed: "failed";
|
|
896
|
-
succeeded: "succeeded";
|
|
897
938
|
skipped: "skipped";
|
|
939
|
+
succeeded: "succeeded";
|
|
898
940
|
}>;
|
|
899
941
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
900
942
|
product_not_found: "product_not_found";
|
|
@@ -926,8 +968,8 @@ export declare const bulkUpdateProductsResponseSchema: z.ZodObject<{
|
|
|
926
968
|
productId: z.ZodString;
|
|
927
969
|
status: z.ZodEnum<{
|
|
928
970
|
failed: "failed";
|
|
929
|
-
succeeded: "succeeded";
|
|
930
971
|
skipped: "skipped";
|
|
972
|
+
succeeded: "succeeded";
|
|
931
973
|
}>;
|
|
932
974
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
933
975
|
product_not_found: "product_not_found";
|
|
@@ -1019,8 +1061,8 @@ export declare const bulkOperationSchema: z.ZodObject<{
|
|
|
1019
1061
|
productId: z.ZodString;
|
|
1020
1062
|
status: z.ZodEnum<{
|
|
1021
1063
|
failed: "failed";
|
|
1022
|
-
succeeded: "succeeded";
|
|
1023
1064
|
skipped: "skipped";
|
|
1065
|
+
succeeded: "succeeded";
|
|
1024
1066
|
}>;
|
|
1025
1067
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
1026
1068
|
product_not_found: "product_not_found";
|
|
@@ -1101,8 +1143,8 @@ export declare const bulkOperationsListResponseSchema: z.ZodObject<{
|
|
|
1101
1143
|
productId: z.ZodString;
|
|
1102
1144
|
status: z.ZodEnum<{
|
|
1103
1145
|
failed: "failed";
|
|
1104
|
-
succeeded: "succeeded";
|
|
1105
1146
|
skipped: "skipped";
|
|
1147
|
+
succeeded: "succeeded";
|
|
1106
1148
|
}>;
|
|
1107
1149
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
1108
1150
|
product_not_found: "product_not_found";
|
|
@@ -1173,8 +1215,8 @@ export declare const bulkOperationResponseSchema: z.ZodObject<{
|
|
|
1173
1215
|
productId: z.ZodString;
|
|
1174
1216
|
status: z.ZodEnum<{
|
|
1175
1217
|
failed: "failed";
|
|
1176
|
-
succeeded: "succeeded";
|
|
1177
1218
|
skipped: "skipped";
|
|
1219
|
+
succeeded: "succeeded";
|
|
1178
1220
|
}>;
|
|
1179
1221
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
1180
1222
|
product_not_found: "product_not_found";
|
|
@@ -1281,15 +1323,25 @@ export declare const numericKindSchema: z.ZodEnum<{
|
|
|
1281
1323
|
price: "price";
|
|
1282
1324
|
}>;
|
|
1283
1325
|
export type NumericKind = z.infer<typeof numericKindSchema>;
|
|
1326
|
+
/**
|
|
1327
|
+
* The shape of an attribute key — the one rule an attribute is created with,
|
|
1328
|
+
* and the one a listing's `filter[attr.<key>]` is held to (issue #687): the
|
|
1329
|
+
* key is interpolated into the Meilisearch filter expression, so a key no
|
|
1330
|
+
* attribute could have is refused before either listing backend sees it.
|
|
1331
|
+
*/
|
|
1332
|
+
export declare const attributeKeyShapeSchema: z.ZodString;
|
|
1333
|
+
/** Whether `key` has the shape of an attribute key ({@link attributeKeyShapeSchema}). */
|
|
1334
|
+
export declare function isAttributeKey(key: string): boolean;
|
|
1284
1335
|
export declare const createAttributeRequestSchema: z.ZodObject<{
|
|
1285
1336
|
key: z.ZodString;
|
|
1286
1337
|
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1287
1338
|
type: z.ZodOptional<z.ZodEnum<{
|
|
1288
1339
|
number: "number";
|
|
1289
1340
|
input: "input";
|
|
1290
|
-
select: "select";
|
|
1291
|
-
price: "price";
|
|
1292
1341
|
multiselect: "multiselect";
|
|
1342
|
+
price: "price";
|
|
1343
|
+
select: "select";
|
|
1344
|
+
page_builder: "page_builder";
|
|
1293
1345
|
slider: "slider";
|
|
1294
1346
|
}>>;
|
|
1295
1347
|
numericKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1302,9 +1354,10 @@ export declare const createAttributeRequestSchema: z.ZodObject<{
|
|
|
1302
1354
|
boolean: "boolean";
|
|
1303
1355
|
date: "date";
|
|
1304
1356
|
enum: "enum";
|
|
1305
|
-
select: "select";
|
|
1306
|
-
price: "price";
|
|
1307
1357
|
multiselect: "multiselect";
|
|
1358
|
+
price: "price";
|
|
1359
|
+
select: "select";
|
|
1360
|
+
page_builder: "page_builder";
|
|
1308
1361
|
}>>;
|
|
1309
1362
|
enumValues: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1310
1363
|
isSearchable: z.ZodBoolean;
|
|
@@ -1318,8 +1371,7 @@ export declare const createAttributeRequestSchema: z.ZodObject<{
|
|
|
1318
1371
|
isPriceRule: z.ZodOptional<z.ZodBoolean>;
|
|
1319
1372
|
filterPosition: z.ZodOptional<z.ZodNumber>;
|
|
1320
1373
|
isVisibleOnProductPage: z.ZodOptional<z.ZodBoolean>;
|
|
1321
|
-
|
|
1322
|
-
languageScoped: z.ZodOptional<z.ZodBoolean>;
|
|
1374
|
+
scopable: z.ZodOptional<z.ZodBoolean>;
|
|
1323
1375
|
massEditable: z.ZodOptional<z.ZodBoolean>;
|
|
1324
1376
|
quickSearchable: z.ZodOptional<z.ZodBoolean>;
|
|
1325
1377
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1336,9 +1388,10 @@ export declare const updateAttributeRequestSchema: z.ZodObject<{
|
|
|
1336
1388
|
type: z.ZodOptional<z.ZodEnum<{
|
|
1337
1389
|
number: "number";
|
|
1338
1390
|
input: "input";
|
|
1339
|
-
select: "select";
|
|
1340
|
-
price: "price";
|
|
1341
1391
|
multiselect: "multiselect";
|
|
1392
|
+
price: "price";
|
|
1393
|
+
select: "select";
|
|
1394
|
+
page_builder: "page_builder";
|
|
1342
1395
|
slider: "slider";
|
|
1343
1396
|
}>>;
|
|
1344
1397
|
numericKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1357,8 +1410,7 @@ export declare const updateAttributeRequestSchema: z.ZodObject<{
|
|
|
1357
1410
|
isPriceRule: z.ZodOptional<z.ZodBoolean>;
|
|
1358
1411
|
filterPosition: z.ZodOptional<z.ZodNumber>;
|
|
1359
1412
|
isVisibleOnProductPage: z.ZodOptional<z.ZodBoolean>;
|
|
1360
|
-
|
|
1361
|
-
languageScoped: z.ZodOptional<z.ZodBoolean>;
|
|
1413
|
+
scopable: z.ZodOptional<z.ZodBoolean>;
|
|
1362
1414
|
massEditable: z.ZodOptional<z.ZodBoolean>;
|
|
1363
1415
|
quickSearchable: z.ZodOptional<z.ZodBoolean>;
|
|
1364
1416
|
}, z.core.$strict>;
|
|
@@ -1379,9 +1431,10 @@ export declare const adminAttributeResponseSchema: z.ZodObject<{
|
|
|
1379
1431
|
type: z.ZodEnum<{
|
|
1380
1432
|
number: "number";
|
|
1381
1433
|
input: "input";
|
|
1382
|
-
select: "select";
|
|
1383
|
-
price: "price";
|
|
1384
1434
|
multiselect: "multiselect";
|
|
1435
|
+
price: "price";
|
|
1436
|
+
select: "select";
|
|
1437
|
+
page_builder: "page_builder";
|
|
1385
1438
|
slider: "slider";
|
|
1386
1439
|
}>;
|
|
1387
1440
|
numericKind: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
@@ -1394,9 +1447,10 @@ export declare const adminAttributeResponseSchema: z.ZodObject<{
|
|
|
1394
1447
|
boolean: "boolean";
|
|
1395
1448
|
date: "date";
|
|
1396
1449
|
enum: "enum";
|
|
1397
|
-
select: "select";
|
|
1398
|
-
price: "price";
|
|
1399
1450
|
multiselect: "multiselect";
|
|
1451
|
+
price: "price";
|
|
1452
|
+
select: "select";
|
|
1453
|
+
page_builder: "page_builder";
|
|
1400
1454
|
}>;
|
|
1401
1455
|
enumValues: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
1402
1456
|
isSearchable: z.ZodBoolean;
|
|
@@ -1412,8 +1466,12 @@ export declare const adminAttributeResponseSchema: z.ZodObject<{
|
|
|
1412
1466
|
massEditable: z.ZodBoolean;
|
|
1413
1467
|
quickSearchable: z.ZodBoolean;
|
|
1414
1468
|
customFieldDefinitionId: z.ZodString;
|
|
1415
|
-
|
|
1416
|
-
|
|
1469
|
+
scopable: z.ZodOptional<z.ZodBoolean>;
|
|
1470
|
+
scopeLevels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1471
|
+
G: "G";
|
|
1472
|
+
C: "C";
|
|
1473
|
+
CL: "CL";
|
|
1474
|
+
}>>>;
|
|
1417
1475
|
createdAt: z.ZodString;
|
|
1418
1476
|
updatedAt: z.ZodString;
|
|
1419
1477
|
}, z.core.$strip>;
|
|
@@ -1437,14 +1495,21 @@ export declare const updateCategoryRequestSchema: z.ZodObject<{
|
|
|
1437
1495
|
}, z.core.$strict>;
|
|
1438
1496
|
export type UpdateCategoryRequest = z.infer<typeof updateCategoryRequestSchema>;
|
|
1439
1497
|
/**
|
|
1440
|
-
* The ceiling on one
|
|
1441
|
-
*
|
|
1498
|
+
* The ceiling on one stored Page Builder content envelope — a category's
|
|
1499
|
+
* content, or one product × content attribute value — in UTF-8 bytes of its
|
|
1500
|
+
* JSON serialisation, every language together.
|
|
1442
1501
|
*
|
|
1443
1502
|
* One mebibyte, because that is what a CMS page is held to today: the CMS
|
|
1444
1503
|
* declares no limit of its own and is bounded by the HTTP layer's default body
|
|
1445
1504
|
* limit, which is this number. Stated here so the bound also holds for a
|
|
1446
1505
|
* caller that does not arrive over HTTP.
|
|
1447
1506
|
*/
|
|
1507
|
+
export declare const PAGE_BUILDER_CONTENT_MAX_BYTES = 1048576;
|
|
1508
|
+
/**
|
|
1509
|
+
* The category content ceiling — {@link PAGE_BUILDER_CONTENT_MAX_BYTES}, kept
|
|
1510
|
+
* under its own name for its existing readers. Product content (feature 172)
|
|
1511
|
+
* is held to the same number.
|
|
1512
|
+
*/
|
|
1448
1513
|
export declare const CATEGORY_CONTENT_MAX_BYTES = 1048576;
|
|
1449
1514
|
/**
|
|
1450
1515
|
* The content an operator authors for a category's storefront page: one Page
|
|
@@ -1492,6 +1557,85 @@ export declare const categoryPageContentSchema: z.ZodObject<{
|
|
|
1492
1557
|
content: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1493
1558
|
}, z.core.$strip>;
|
|
1494
1559
|
export type CategoryPageContent = z.infer<typeof categoryPageContentSchema>;
|
|
1560
|
+
/**
|
|
1561
|
+
* One product × content attribute value: a Page Builder document per
|
|
1562
|
+
* language, the category envelope under the same ceiling. `null` means no
|
|
1563
|
+
* value. The writer drops a language with no block and stores nothing when
|
|
1564
|
+
* none remains (FR-013), so a stored envelope always holds a block.
|
|
1565
|
+
*/
|
|
1566
|
+
export declare const productContentEnvelopeSchema: z.ZodNullable<z.ZodObject<{
|
|
1567
|
+
languages: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1568
|
+
}, z.core.$strict>>;
|
|
1569
|
+
export type ProductContentEnvelope = z.infer<typeof productContentEnvelopeSchema>;
|
|
1570
|
+
/** `PUT /api/v1/admin/catalog/products/:id/content/:attributeKey` — replaces the value. */
|
|
1571
|
+
export declare const putProductContentRequestSchema: z.ZodObject<{
|
|
1572
|
+
content: z.ZodNullable<z.ZodObject<{
|
|
1573
|
+
languages: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1574
|
+
}, z.core.$strict>>;
|
|
1575
|
+
}, z.core.$strict>;
|
|
1576
|
+
export type PutProductContentRequest = z.infer<typeof putProductContentRequestSchema>;
|
|
1577
|
+
/** The single read and the write's answer: the whole stored (normalised) envelope. */
|
|
1578
|
+
export declare const adminProductContentSchema: z.ZodObject<{
|
|
1579
|
+
productId: z.ZodString;
|
|
1580
|
+
attributeKey: z.ZodString;
|
|
1581
|
+
content: z.ZodNullable<z.ZodObject<{
|
|
1582
|
+
languages: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1583
|
+
}, z.core.$strict>>;
|
|
1584
|
+
}, z.core.$strip>;
|
|
1585
|
+
export type AdminProductContent = z.infer<typeof adminProductContentSchema>;
|
|
1586
|
+
/** One stored language of a content value, as the product form's card shows it — never the document. */
|
|
1587
|
+
export declare const adminProductContentLanguageStatusSchema: z.ZodObject<{
|
|
1588
|
+
language: z.ZodString;
|
|
1589
|
+
filled: z.ZodBoolean;
|
|
1590
|
+
blocks: z.ZodNumber;
|
|
1591
|
+
excerpt: z.ZodNullable<z.ZodString>;
|
|
1592
|
+
}, z.core.$strip>;
|
|
1593
|
+
export type AdminProductContentLanguageStatus = z.infer<typeof adminProductContentLanguageStatusSchema>;
|
|
1594
|
+
/** One content attribute of the product's saved attribute set, with its stored languages. */
|
|
1595
|
+
export declare const adminProductContentAttributeSchema: z.ZodObject<{
|
|
1596
|
+
attributeId: z.ZodString;
|
|
1597
|
+
key: z.ZodString;
|
|
1598
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1599
|
+
labelDefault: z.ZodString;
|
|
1600
|
+
position: z.ZodNumber;
|
|
1601
|
+
languages: z.ZodArray<z.ZodObject<{
|
|
1602
|
+
language: z.ZodString;
|
|
1603
|
+
filled: z.ZodBoolean;
|
|
1604
|
+
blocks: z.ZodNumber;
|
|
1605
|
+
excerpt: z.ZodNullable<z.ZodString>;
|
|
1606
|
+
}, z.core.$strip>>;
|
|
1607
|
+
}, z.core.$strip>;
|
|
1608
|
+
export type AdminProductContentAttribute = z.infer<typeof adminProductContentAttributeSchema>;
|
|
1609
|
+
/** `GET /api/v1/admin/catalog/products/:id/content` — the cards, by position then key. */
|
|
1610
|
+
export declare const adminProductContentListSchema: z.ZodObject<{
|
|
1611
|
+
productId: z.ZodString;
|
|
1612
|
+
attributeSetId: z.ZodNullable<z.ZodString>;
|
|
1613
|
+
attributes: z.ZodArray<z.ZodObject<{
|
|
1614
|
+
attributeId: z.ZodString;
|
|
1615
|
+
key: z.ZodString;
|
|
1616
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1617
|
+
labelDefault: z.ZodString;
|
|
1618
|
+
position: z.ZodNumber;
|
|
1619
|
+
languages: z.ZodArray<z.ZodObject<{
|
|
1620
|
+
language: z.ZodString;
|
|
1621
|
+
filled: z.ZodBoolean;
|
|
1622
|
+
blocks: z.ZodNumber;
|
|
1623
|
+
excerpt: z.ZodNullable<z.ZodString>;
|
|
1624
|
+
}, z.core.$strip>>;
|
|
1625
|
+
}, z.core.$strip>>;
|
|
1626
|
+
}, z.core.$strip>;
|
|
1627
|
+
export type AdminProductContentList = z.infer<typeof adminProductContentListSchema>;
|
|
1628
|
+
/**
|
|
1629
|
+
* `GET /api/v1/admin/catalog/attributes/:idOrKey/usage` — what deleting an
|
|
1630
|
+
* attribute of any type would meet (feature 172, FR-007). `productValueCount`
|
|
1631
|
+
* is the count the delete guard refuses on, from the same query.
|
|
1632
|
+
*/
|
|
1633
|
+
export declare const adminAttributeUsageSchema: z.ZodObject<{
|
|
1634
|
+
attributeSetCount: z.ZodNumber;
|
|
1635
|
+
productValueCount: z.ZodNumber;
|
|
1636
|
+
productContentCount: z.ZodNumber;
|
|
1637
|
+
}, z.core.$strip>;
|
|
1638
|
+
export type AdminAttributeUsage = z.infer<typeof adminAttributeUsageSchema>;
|
|
1495
1639
|
/**
|
|
1496
1640
|
* The orderings the storefront listing accepts.
|
|
1497
1641
|
*
|
|
@@ -1605,12 +1749,18 @@ export declare const attributeSetAssignedAttributeSchema: z.ZodObject<{
|
|
|
1605
1749
|
boolean: "boolean";
|
|
1606
1750
|
date: "date";
|
|
1607
1751
|
enum: "enum";
|
|
1608
|
-
select: "select";
|
|
1609
|
-
price: "price";
|
|
1610
1752
|
multiselect: "multiselect";
|
|
1753
|
+
price: "price";
|
|
1754
|
+
select: "select";
|
|
1755
|
+
page_builder: "page_builder";
|
|
1611
1756
|
}>;
|
|
1612
1757
|
position: z.ZodNumber;
|
|
1613
|
-
|
|
1758
|
+
scopable: z.ZodBoolean;
|
|
1759
|
+
scopeLevels: z.ZodArray<z.ZodEnum<{
|
|
1760
|
+
G: "G";
|
|
1761
|
+
C: "C";
|
|
1762
|
+
CL: "CL";
|
|
1763
|
+
}>>;
|
|
1614
1764
|
}, z.core.$strip>;
|
|
1615
1765
|
export type AttributeSetAssignedAttribute = z.infer<typeof attributeSetAssignedAttributeSchema>;
|
|
1616
1766
|
export declare const attributeSetDetailSchema: z.ZodObject<{
|
|
@@ -1633,12 +1783,18 @@ export declare const attributeSetDetailSchema: z.ZodObject<{
|
|
|
1633
1783
|
boolean: "boolean";
|
|
1634
1784
|
date: "date";
|
|
1635
1785
|
enum: "enum";
|
|
1636
|
-
select: "select";
|
|
1637
|
-
price: "price";
|
|
1638
1786
|
multiselect: "multiselect";
|
|
1787
|
+
price: "price";
|
|
1788
|
+
select: "select";
|
|
1789
|
+
page_builder: "page_builder";
|
|
1639
1790
|
}>;
|
|
1640
1791
|
position: z.ZodNumber;
|
|
1641
|
-
|
|
1792
|
+
scopable: z.ZodBoolean;
|
|
1793
|
+
scopeLevels: z.ZodArray<z.ZodEnum<{
|
|
1794
|
+
G: "G";
|
|
1795
|
+
C: "C";
|
|
1796
|
+
CL: "CL";
|
|
1797
|
+
}>>;
|
|
1642
1798
|
}, z.core.$strip>>;
|
|
1643
1799
|
}, z.core.$strip>;
|
|
1644
1800
|
export type AttributeSetDetail = z.infer<typeof attributeSetDetailSchema>;
|
|
@@ -1668,10 +1824,8 @@ export declare const galleryLabelSchema: z.ZodEnum<{
|
|
|
1668
1824
|
thumbnail: "thumbnail";
|
|
1669
1825
|
}>;
|
|
1670
1826
|
export type GalleryLabel = z.infer<typeof galleryLabelSchema>;
|
|
1671
|
-
/** Feature 163
|
|
1827
|
+
/** Feature 163 / 174 — the longest alt text of one image at one scope. */
|
|
1672
1828
|
export declare const GALLERY_ALT_TEXT_MAX = 255;
|
|
1673
|
-
/** Feature 163 — the most channels one write names. */
|
|
1674
|
-
export declare const SCOPED_CHANNELS_MAX = 256;
|
|
1675
1829
|
export declare const galleryItemSchema: z.ZodObject<{
|
|
1676
1830
|
id: z.ZodString;
|
|
1677
1831
|
productId: z.ZodString;
|
|
@@ -1682,8 +1836,8 @@ export declare const galleryItemSchema: z.ZodObject<{
|
|
|
1682
1836
|
small_image: "small_image";
|
|
1683
1837
|
thumbnail: "thumbnail";
|
|
1684
1838
|
}>>;
|
|
1685
|
-
altText: z.ZodOptional<z.
|
|
1686
|
-
|
|
1839
|
+
altText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1840
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
1687
1841
|
createdAt: z.ZodString;
|
|
1688
1842
|
updatedAt: z.ZodString;
|
|
1689
1843
|
}, z.core.$strip>;
|
|
@@ -1698,48 +1852,15 @@ export declare const createGalleryItemRequestSchema: z.ZodObject<{
|
|
|
1698
1852
|
}>>>;
|
|
1699
1853
|
}, z.core.$strict>;
|
|
1700
1854
|
export type CreateGalleryItemRequest = z.infer<typeof createGalleryItemRequestSchema>;
|
|
1855
|
+
/**
|
|
1856
|
+
* Feature 174 (`contracts/scoped-values-api.md` §6) — a collection operation only: the item's
|
|
1857
|
+
* position. Its roles (`galleryRole:<label>`), alt text and hidden flag are scoped fields, written
|
|
1858
|
+
* at every scope, Global included, through `PUT …/products/:id/scoped-values`.
|
|
1859
|
+
*/
|
|
1701
1860
|
export declare const updateGalleryItemRequestSchema: z.ZodObject<{
|
|
1702
1861
|
position: z.ZodOptional<z.ZodNumber>;
|
|
1703
|
-
labels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1704
|
-
base_image: "base_image";
|
|
1705
|
-
small_image: "small_image";
|
|
1706
|
-
thumbnail: "thumbnail";
|
|
1707
|
-
}>>>;
|
|
1708
|
-
altText: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1709
|
-
hiddenInChannels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1710
1862
|
}, z.core.$strict>;
|
|
1711
1863
|
export type UpdateGalleryItemRequest = z.infer<typeof updateGalleryItemRequestSchema>;
|
|
1712
|
-
/**
|
|
1713
|
-
* Feature 163 (FR-076, R14) — a channel's own holders of the gallery roles. `null` =
|
|
1714
|
-
* the global holder applies there. Read with `GET …/gallery/channel-roles`.
|
|
1715
|
-
*
|
|
1716
|
-
* The keys are the camelCase names of the gallery labels (`baseImage` = the
|
|
1717
|
-
* `base_image` label, `smallImage` = `small_image`, `thumbnail` = `thumbnail`); the
|
|
1718
|
-
* label spelling stays a value (`galleryLabelSchema`), never an API key.
|
|
1719
|
-
*/
|
|
1720
|
-
export declare const galleryChannelRolesSchema: z.ZodObject<{
|
|
1721
|
-
channelId: z.ZodString;
|
|
1722
|
-
roles: z.ZodObject<{
|
|
1723
|
-
baseImage: z.ZodNullable<z.ZodString>;
|
|
1724
|
-
smallImage: z.ZodNullable<z.ZodString>;
|
|
1725
|
-
thumbnail: z.ZodNullable<z.ZodString>;
|
|
1726
|
-
}, z.core.$strip>;
|
|
1727
|
-
}, z.core.$strip>;
|
|
1728
|
-
export type GalleryChannelRoles = z.infer<typeof galleryChannelRolesSchema>;
|
|
1729
|
-
/**
|
|
1730
|
-
* `PUT …/gallery/channel-roles` — a role named with an item id moves to that item in
|
|
1731
|
-
* the channel, `null` = use inherited (the global holder), an absent role is left as
|
|
1732
|
-
* it is.
|
|
1733
|
-
*/
|
|
1734
|
-
export declare const putGalleryChannelRolesRequestSchema: z.ZodObject<{
|
|
1735
|
-
channelId: z.ZodString;
|
|
1736
|
-
roles: z.ZodObject<{
|
|
1737
|
-
baseImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1738
|
-
smallImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1739
|
-
thumbnail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1740
|
-
}, z.core.$strict>;
|
|
1741
|
-
}, z.core.$strict>;
|
|
1742
|
-
export type PutGalleryChannelRolesRequest = z.infer<typeof putGalleryChannelRolesRequestSchema>;
|
|
1743
1864
|
export declare const reorderGalleryRequestSchema: z.ZodObject<{
|
|
1744
1865
|
orderedGalleryItemIds: z.ZodArray<z.ZodString>;
|
|
1745
1866
|
}, z.core.$strict>;
|
|
@@ -1766,9 +1887,9 @@ export declare const updateAttachmentTypeRequestSchema: z.ZodObject<{
|
|
|
1766
1887
|
position: z.ZodOptional<z.ZodNumber>;
|
|
1767
1888
|
}, z.core.$strict>;
|
|
1768
1889
|
export type UpdateAttachmentTypeRequest = z.infer<typeof updateAttachmentTypeRequestSchema>;
|
|
1769
|
-
/** Feature 163
|
|
1890
|
+
/** Feature 163 / 174 — the longest attachment description at a Channel or Channel × language scope. */
|
|
1770
1891
|
export declare const ATTACHMENT_DESCRIPTION_TRANSLATION_MAX = 4000;
|
|
1771
|
-
/** Feature 163
|
|
1892
|
+
/** Feature 163 / 174 — an attachment name at any scope, as long as the Global one. */
|
|
1772
1893
|
export declare const ATTACHMENT_NAME_MAX = 160;
|
|
1773
1894
|
export declare const productAttachmentSchema: z.ZodObject<{
|
|
1774
1895
|
id: z.ZodString;
|
|
@@ -1778,9 +1899,7 @@ export declare const productAttachmentSchema: z.ZodObject<{
|
|
|
1778
1899
|
name: z.ZodString;
|
|
1779
1900
|
description: z.ZodNullable<z.ZodString>;
|
|
1780
1901
|
position: z.ZodNumber;
|
|
1781
|
-
|
|
1782
|
-
descriptionTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1783
|
-
hiddenInChannels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1902
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
1784
1903
|
createdAt: z.ZodString;
|
|
1785
1904
|
updatedAt: z.ZodString;
|
|
1786
1905
|
}, z.core.$strip>;
|
|
@@ -1791,22 +1910,19 @@ export declare const createAttachmentRequestSchema: z.ZodObject<{
|
|
|
1791
1910
|
name: z.ZodString;
|
|
1792
1911
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1793
1912
|
position: z.ZodOptional<z.ZodNumber>;
|
|
1794
|
-
nameTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1795
|
-
descriptionTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1796
|
-
hiddenInChannels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1797
1913
|
}, z.core.$strict>;
|
|
1798
1914
|
export type CreateAttachmentRequest = z.infer<typeof createAttachmentRequestSchema>;
|
|
1915
|
+
/**
|
|
1916
|
+
* Feature 174 (`contracts/scoped-values-api.md` §6) — the attachment's type and position. Its
|
|
1917
|
+
* name, description and hidden flag are scoped fields, written at every scope, Global included,
|
|
1918
|
+
* through `PUT …/products/:id/scoped-values`.
|
|
1919
|
+
*/
|
|
1799
1920
|
export declare const updateAttachmentRequestSchema: z.ZodObject<{
|
|
1800
1921
|
attachmentTypeId: z.ZodOptional<z.ZodString>;
|
|
1801
|
-
name: z.ZodOptional<z.ZodString>;
|
|
1802
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1803
1922
|
position: z.ZodOptional<z.ZodNumber>;
|
|
1804
|
-
nameTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1805
|
-
descriptionTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1806
|
-
hiddenInChannels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1807
1923
|
}, z.core.$strict>;
|
|
1808
1924
|
export type UpdateAttachmentRequest = z.infer<typeof updateAttachmentRequestSchema>;
|
|
1809
|
-
/** The longest packaging-unit name
|
|
1925
|
+
/** The longest packaging-unit name at any scope. */
|
|
1810
1926
|
export declare const PACKAGING_UNIT_NAME_MAX = 160;
|
|
1811
1927
|
/**
|
|
1812
1928
|
* A named ordering unit attached to a product (e.g. "Paleta" = 480 pieces).
|
|
@@ -1817,7 +1933,6 @@ export declare const packagingUnitSchema: z.ZodObject<{
|
|
|
1817
1933
|
id: z.ZodString;
|
|
1818
1934
|
productId: z.ZodString;
|
|
1819
1935
|
name: z.ZodString;
|
|
1820
|
-
nameTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1821
1936
|
baseQuantity: z.ZodNumber;
|
|
1822
1937
|
position: z.ZodNumber;
|
|
1823
1938
|
isDefault: z.ZodBoolean;
|
|
@@ -1832,16 +1947,18 @@ export declare const createPackagingUnitRequestSchema: z.ZodObject<{
|
|
|
1832
1947
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
1833
1948
|
position: z.ZodOptional<z.ZodNumber>;
|
|
1834
1949
|
minOrderUnits: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1835
|
-
nameTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1836
1950
|
}, z.core.$strict>;
|
|
1837
1951
|
export type CreatePackagingUnitRequest = z.infer<typeof createPackagingUnitRequestSchema>;
|
|
1952
|
+
/**
|
|
1953
|
+
* Feature 174 (`contracts/scoped-values-api.md` §6) — base quantity, default flag, position and
|
|
1954
|
+
* minimum. The unit's name is a scoped field, written at every scope, Global included, through
|
|
1955
|
+
* `PUT …/products/:id/scoped-values`.
|
|
1956
|
+
*/
|
|
1838
1957
|
export declare const updatePackagingUnitRequestSchema: z.ZodObject<{
|
|
1839
|
-
name: z.ZodOptional<z.ZodString>;
|
|
1840
1958
|
baseQuantity: z.ZodOptional<z.ZodNumber>;
|
|
1841
1959
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
1842
1960
|
position: z.ZodOptional<z.ZodNumber>;
|
|
1843
1961
|
minOrderUnits: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1844
|
-
nameTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1845
1962
|
}, z.core.$strict>;
|
|
1846
1963
|
export type UpdatePackagingUnitRequest = z.infer<typeof updatePackagingUnitRequestSchema>;
|
|
1847
1964
|
export declare const reorderPackagingUnitsRequestSchema: z.ZodObject<{
|
|
@@ -2039,9 +2156,13 @@ export interface CatalogProductRecord {
|
|
|
2039
2156
|
slug: string;
|
|
2040
2157
|
type: ProductType;
|
|
2041
2158
|
status: ProductStatus;
|
|
2042
|
-
/**
|
|
2043
|
-
|
|
2044
|
-
|
|
2159
|
+
/**
|
|
2160
|
+
* Feature 174 (FR-014, FR-031) — the Global name and description, one string each. A reader
|
|
2161
|
+
* with a channel resolves the effective texts at (C, L) through
|
|
2162
|
+
* `catalogProductAvailabilityPort.effectiveTexts`; one without a channel shows these.
|
|
2163
|
+
*/
|
|
2164
|
+
name: string;
|
|
2165
|
+
description: string | null;
|
|
2045
2166
|
/** Per-product override of the global stock mode; `null` ⇒ inherit. */
|
|
2046
2167
|
stockMode: StockMode | null;
|
|
2047
2168
|
visibility: ProductVisibility;
|
|
@@ -2302,12 +2423,6 @@ export interface CatalogPackagingUnitRecord {
|
|
|
2302
2423
|
updatedAt: Date;
|
|
2303
2424
|
/** Feature 155 — minimum units of this packaging unit per order of the product; `null` = none. */
|
|
2304
2425
|
minOrderUnits: number | null;
|
|
2305
|
-
/**
|
|
2306
|
-
* Feature 163 (FR-079) — the name per language; the snapshot of a basket or quote
|
|
2307
|
-
* line takes `effectivePackagingUnitName(record, L)`. Optional so other builders of
|
|
2308
|
-
* the record keep compiling; `catalog` always sets it.
|
|
2309
|
-
*/
|
|
2310
|
-
nameTranslations?: Record<string, string>;
|
|
2311
2426
|
}
|
|
2312
2427
|
/** A directed product↔product relation (cross-sell, up-sell, related). */
|
|
2313
2428
|
export interface CatalogProductLinkRow {
|
|
@@ -2373,7 +2488,13 @@ export interface CatalogProductLookupOptions {
|
|
|
2373
2488
|
export interface CatalogProductReadPort {
|
|
2374
2489
|
findById(id: string, options?: CatalogProductLookupOptions): Promise<CatalogProductRecord | null>;
|
|
2375
2490
|
findByIds(ids: readonly string[], options?: CatalogProductLookupOptions): Promise<CatalogProductRecord[]>;
|
|
2491
|
+
/**
|
|
2492
|
+
* A SKU is unique among live products only (issue #693): a deleted product keeps its SKU and
|
|
2493
|
+
* frees it for reuse. Without `liveOnly`, the lookup therefore answers the live product when
|
|
2494
|
+
* there is one, else the most recently deleted one holding the SKU.
|
|
2495
|
+
*/
|
|
2376
2496
|
findBySku(sku: string, options?: CatalogProductLookupOptions): Promise<CatalogProductRecord | null>;
|
|
2497
|
+
/** At most one product per SKU, chosen as {@link findBySku} chooses it. */
|
|
2377
2498
|
findBySkus(skus: readonly string[], options?: CatalogProductLookupOptions): Promise<CatalogProductRecord[]>;
|
|
2378
2499
|
/** `count === ids.length` existence check, without loading the rows. */
|
|
2379
2500
|
countByIds(ids: readonly string[]): Promise<number>;
|
|
@@ -2391,6 +2512,10 @@ export interface CatalogProductReadPort {
|
|
|
2391
2512
|
findPricingRefsByIds(ids: readonly string[]): Promise<CatalogProductPricingRef[]>;
|
|
2392
2513
|
/** Variants of the given parent products, ordered by sku. */
|
|
2393
2514
|
listVariantsByProductIds(productIds: readonly string[]): Promise<CatalogProductVariantRecord[]>;
|
|
2515
|
+
/**
|
|
2516
|
+
* At most one variant per SKU: the live one, else the most recently deleted. A variant is
|
|
2517
|
+
* deleted with its product and its SKU may then be reused (issue #693).
|
|
2518
|
+
*/
|
|
2394
2519
|
findVariantsBySkus(skus: readonly string[]): Promise<CatalogProductVariantRecord[]>;
|
|
2395
2520
|
/** A variant, but only if it belongs to that parent. */
|
|
2396
2521
|
findVariantInProduct(parentProductId: string, variantId: string): Promise<CatalogProductVariantRecord | null>;
|
|
@@ -2434,7 +2559,7 @@ export interface CatalogProductReadPort {
|
|
|
2434
2559
|
/**
|
|
2435
2560
|
* Feature 161 (G15, `specs/161-price-book-editor/research.md` R14) — one page
|
|
2436
2561
|
* of the products a caller's **membership seam** names, ordered by the stored
|
|
2437
|
-
* admin name key
|
|
2562
|
+
* admin name key (feature 174: one key over the Global name, for every admin language),
|
|
2438
2563
|
* then SKU, then id, and how many there are. `search` narrows to the products
|
|
2439
2564
|
* whose stored search key (folded shown name and SKU) or one of whose
|
|
2440
2565
|
* variants' SKU contains it — case- and accent-folded, taken literally. How
|
|
@@ -2468,8 +2593,6 @@ export interface CatalogProductMembership {
|
|
|
2468
2593
|
export interface CatalogAdminNamePageQuery {
|
|
2469
2594
|
readonly membership: CatalogProductMembership;
|
|
2470
2595
|
readonly search?: string | null;
|
|
2471
|
-
/** A language tag (`pl`, `pl-PL`); its primary subtag picks the key, `en` when it has none. */
|
|
2472
|
-
readonly language: string | null;
|
|
2473
2596
|
readonly offset: number;
|
|
2474
2597
|
readonly limit: number;
|
|
2475
2598
|
/** Default `true`. Without a search, `false` skips the count. */
|
|
@@ -2632,42 +2755,52 @@ export interface ProductImportRow {
|
|
|
2632
2755
|
sku: string;
|
|
2633
2756
|
status?: ProductStatus;
|
|
2634
2757
|
visibility?: ProductVisibility;
|
|
2635
|
-
/** Per-locale, merged into the stored JSONB rather than replacing it. */
|
|
2636
|
-
name?: Record<string, string>;
|
|
2637
|
-
description?: Record<string, string>;
|
|
2638
2758
|
/**
|
|
2639
|
-
* Feature
|
|
2640
|
-
*
|
|
2641
|
-
*
|
|
2642
|
-
*
|
|
2759
|
+
* Feature 174 (`contracts/import-profiles-and-csv.md` §2; FR-043, FR-110) — every scoped cell
|
|
2760
|
+
* of the row, Global included, already decoded with `decodeCsvScopedCell` and mapped through
|
|
2761
|
+
* the run's profile, channels by id. A (field, scope) the file has no column for is untouched;
|
|
2762
|
+
* refusals are per cell (the row's other cells apply) and reported in
|
|
2763
|
+
* `BulkImportReport.fieldErrors` under the cell's `column`.
|
|
2643
2764
|
*/
|
|
2644
|
-
|
|
2765
|
+
cells?: ProductImportCell[];
|
|
2645
2766
|
}
|
|
2646
|
-
/** One
|
|
2647
|
-
export interface
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2767
|
+
/** One cell of a {@link ProductImportRow}: a scoped write and the file column it came from. */
|
|
2768
|
+
export interface ProductImportCell extends ProductScopedWriteCell {
|
|
2769
|
+
/** Echoed in `BulkImportReport.fieldErrors[].column`; absent → `<field>@<scope>`. */
|
|
2770
|
+
column?: string;
|
|
2771
|
+
}
|
|
2772
|
+
/** One own value of a {@link ScopedValuesExport} cell: deliberately empty, a text, or a non-text value. */
|
|
2773
|
+
export type ScopedExportValue = {
|
|
2774
|
+
kind: 'empty';
|
|
2775
|
+
} | {
|
|
2776
|
+
kind: 'text';
|
|
2777
|
+
text: string;
|
|
2653
2778
|
}
|
|
2654
|
-
/**
|
|
2655
|
-
|
|
2656
|
-
|
|
2779
|
+
/** A minimum order quantity, a returnable flag, a number, date-less non-text or multiselect attribute value. */
|
|
2780
|
+
| {
|
|
2781
|
+
kind: 'value';
|
|
2782
|
+
value: number | boolean | string[];
|
|
2783
|
+
};
|
|
2784
|
+
/**
|
|
2785
|
+
* Feature 174 (`contracts/import-profiles-and-csv.md` §3; FR-043, FR-114) — the scoped columns of
|
|
2786
|
+
* a products export: one per (field, scope) at which any product holds an own value, and each
|
|
2787
|
+
* product's own values there. Fields: `name`, `description`, `status`, `urlKey`, every
|
|
2788
|
+
* `attribute:<key>`, and at C `minOrderQuantity` and `returnable`; scopes C and C×L (the Global
|
|
2789
|
+
* values are the products' own records). Orphans are not exported.
|
|
2790
|
+
*/
|
|
2791
|
+
export interface ScopedValuesExport {
|
|
2792
|
+
/** In a stable order: field, then channel code, then the channel scope before its languages. */
|
|
2657
2793
|
columns: Array<{
|
|
2794
|
+
field: FieldPath;
|
|
2795
|
+
channelId: string;
|
|
2658
2796
|
channelCode: string;
|
|
2659
2797
|
languageCode: string | null;
|
|
2660
2798
|
}>;
|
|
2661
|
-
/** Product id → column
|
|
2662
|
-
values: Record<string, Record<string,
|
|
2799
|
+
/** Product id → column key ({@link scopedColumn}) → the own value there. A scope that inherits is absent (`INHERIT`). */
|
|
2800
|
+
values: Record<string, Record<string, ScopedExportValue>>;
|
|
2663
2801
|
}
|
|
2664
|
-
/** The products-file column of a scope:
|
|
2665
|
-
export declare function
|
|
2666
|
-
/** The scope a products-file column names, or `null` when it is not a scoped-status column. */
|
|
2667
|
-
export declare function parseScopedStatusColumn(column: string): {
|
|
2668
|
-
channelCode: string;
|
|
2669
|
-
languageCode: string | null;
|
|
2670
|
-
} | null;
|
|
2802
|
+
/** The products-file column of a scope: `<field>@<channel code>` or `<field>@<channel code>/<language>`. */
|
|
2803
|
+
export declare function scopedColumn(field: string, channelCode: string, languageCode: string | null): string;
|
|
2671
2804
|
/**
|
|
2672
2805
|
* Container name: `catalogBulkImportPort`. Owner: `catalog`.
|
|
2673
2806
|
*
|
|
@@ -2683,9 +2816,30 @@ export declare function parseScopedStatusColumn(column: string): {
|
|
|
2683
2816
|
*/
|
|
2684
2817
|
export interface CatalogBulkImportPort {
|
|
2685
2818
|
importCategories(rows: readonly CategoryImportRow[]): Promise<BulkImportReport>;
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2819
|
+
/**
|
|
2820
|
+
* Feature 174 (`contracts/import-profiles-and-csv.md` §2) — **per product**: each row applies in
|
|
2821
|
+
* its own Command `product.scoped_values.import` (one audit entry, `source: 'import_export'`), so
|
|
2822
|
+
* one row's failure leaves the others applied. An unknown SKU is a row error; each refused cell
|
|
2823
|
+
* a field error (the codes of `ProductScopedWriteRefusalCode`, or `URL_KEY_TAKEN` for a key
|
|
2824
|
+
* another product holds), the row's other cells applying. The integration allowlist of
|
|
2825
|
+
* `integrationWritableField` applies to the cells, widened for the products file by
|
|
2826
|
+
* `minOrderQuantity` and `returnable` at G and C (the CSV grammar covers every scoped product
|
|
2827
|
+
* value; multiselect attributes are `attribute:<key>` cells). `status` / `visibility` write
|
|
2828
|
+
* Global. A stored `''` Global description counts as none: an empty cell there writes nothing.
|
|
2829
|
+
* `dryRun` validates every row and cell the same way and writes nothing (URL keys are checked
|
|
2830
|
+
* for grammar only).
|
|
2831
|
+
*/
|
|
2832
|
+
importProducts(rows: readonly ProductImportRow[], options?: {
|
|
2833
|
+
dryRun?: boolean;
|
|
2834
|
+
}): Promise<BulkImportReport>;
|
|
2835
|
+
/** Feature 174 (FR-043, FR-114) — the scoped columns of a products export, and their own values. */
|
|
2836
|
+
exportScopedValues(): Promise<ScopedValuesExport>;
|
|
2837
|
+
/**
|
|
2838
|
+
* Feature 172 (FR-041) — the keys of the Page Builder content attributes. A
|
|
2839
|
+
* products file may not carry a value under one: content is authored on the
|
|
2840
|
+
* product content screen only, so an importer refuses such a cell per row.
|
|
2841
|
+
*/
|
|
2842
|
+
contentAttributeKeys(): Promise<string[]>;
|
|
2689
2843
|
}
|
|
2690
2844
|
export interface CatalogAttributeOptionView {
|
|
2691
2845
|
/** `custom_field_options` id. */
|
|
@@ -2727,8 +2881,9 @@ export interface CatalogAttributeView {
|
|
|
2727
2881
|
isPriceRule: boolean;
|
|
2728
2882
|
filterPosition: number;
|
|
2729
2883
|
isVisibleOnProductPage: boolean;
|
|
2730
|
-
|
|
2731
|
-
|
|
2884
|
+
/** Feature 174 (R15) — the scope flag; {@link scopeLevels} is what it derives with the value type. */
|
|
2885
|
+
scopable: boolean;
|
|
2886
|
+
scopeLevels: readonly ScopeLevel[];
|
|
2732
2887
|
massEditable: boolean;
|
|
2733
2888
|
createdAt: Date;
|
|
2734
2889
|
updatedAt: Date;
|
|
@@ -2799,14 +2954,11 @@ export interface CatalogQuickSearchHit {
|
|
|
2799
2954
|
productId: string;
|
|
2800
2955
|
sku: string;
|
|
2801
2956
|
slug: string;
|
|
2802
|
-
/** Per-locale JSONB as stored — the caller picks its own language. */
|
|
2803
|
-
name: Record<string, string>;
|
|
2804
2957
|
/**
|
|
2805
|
-
* Feature
|
|
2806
|
-
*
|
|
2807
|
-
* baseline pick. What a type-ahead should display.
|
|
2958
|
+
* Feature 174 (`contracts/readers.md` §2) — the name effective at the search's (channel,
|
|
2959
|
+
* language) along C×L → C → G; the Global name when the search names no channel.
|
|
2808
2960
|
*/
|
|
2809
|
-
|
|
2961
|
+
name: string;
|
|
2810
2962
|
status: ProductStatus;
|
|
2811
2963
|
matchedOn: CatalogQuickSearchField[];
|
|
2812
2964
|
}
|
|
@@ -2893,8 +3045,7 @@ export declare function isSystemAttributeKey(key: string): key is SystemAttribut
|
|
|
2893
3045
|
* global-only).
|
|
2894
3046
|
*/
|
|
2895
3047
|
export declare function getAttributeScope(attributeKey: string, productAttributeRow?: {
|
|
2896
|
-
|
|
2897
|
-
languageScoped: boolean;
|
|
3048
|
+
scopable: boolean;
|
|
2898
3049
|
} | null): AttributeScope;
|
|
2899
3050
|
/** Optional metadata attaching an audit entry to an admin mutation. */
|
|
2900
3051
|
export interface CatalogAdminAuditContext {
|
|
@@ -2965,33 +3116,6 @@ export interface CatalogProductWritePort {
|
|
|
2965
3116
|
updateVariant(parentProductId: string, variantId: string, req: UpdateVariantRequest): Promise<CatalogProductVariantRecord>;
|
|
2966
3117
|
deleteVariant(parentProductId: string, variantId: string): Promise<void>;
|
|
2967
3118
|
}
|
|
2968
|
-
/**
|
|
2969
|
-
* One channel/language override upsert — feature 022 / product-scope-overrides.
|
|
2970
|
-
* Used by PIM importers (feature 089) to land channel-locale-scoped names and
|
|
2971
|
-
* descriptions without reaching `product_value_overrides` directly (Principle XII).
|
|
2972
|
-
*/
|
|
2973
|
-
export interface CatalogProductValueOverrideUpsert {
|
|
2974
|
-
attributeKey: string;
|
|
2975
|
-
channelId: string;
|
|
2976
|
-
languageCode: string | null;
|
|
2977
|
-
value: {
|
|
2978
|
-
v: unknown;
|
|
2979
|
-
};
|
|
2980
|
-
}
|
|
2981
|
-
/**
|
|
2982
|
-
* Container name: `catalogProductValueOverrideWritePort`. Owner: `catalog`.
|
|
2983
|
-
*
|
|
2984
|
-
* Bulk upsert of per-channel / per-language product attribute overrides. The
|
|
2985
|
-
* only consumer today is `pim_unopim` (feature 089 / FR-023); the admin SPA
|
|
2986
|
-
* still goes through `ProductOverridesService` inside catalog's own routes.
|
|
2987
|
-
*
|
|
2988
|
-
* **Owner off:** resolving this port throws `ModuleDisabledError` (503).
|
|
2989
|
-
*/
|
|
2990
|
-
export interface CatalogProductValueOverrideWritePort {
|
|
2991
|
-
applyBulk(productId: string, input: {
|
|
2992
|
-
upserts: readonly CatalogProductValueOverrideUpsert[];
|
|
2993
|
-
}): Promise<void>;
|
|
2994
|
-
}
|
|
2995
3119
|
/** The patch `updateCategory` accepts. Absent keys are left alone. */
|
|
2996
3120
|
export interface UpdateCategoryInput {
|
|
2997
3121
|
parentCategoryId?: string | null;
|
|
@@ -3137,8 +3261,12 @@ export interface CatalogGalleryPort {
|
|
|
3137
3261
|
* Feature 163 (FR-076, owner decision MED-1 = A) — `channelId` is the channel the
|
|
3138
3262
|
* caller serves (a feed's channel): an item hidden there is left out. `null` names no
|
|
3139
3263
|
* channel and answers the global gallery.
|
|
3264
|
+
*
|
|
3265
|
+
* Feature 174 (`data-model.md` §6) — `hidden` resolves C×L → C → Global: an item hidden
|
|
3266
|
+
* at Global is left out of the global gallery too. `languageCode` (optional, additive) is
|
|
3267
|
+
* the caller's language in the channel; omitted or `null` = the Channel level.
|
|
3140
3268
|
*/
|
|
3141
|
-
listForProducts(productIds: readonly string[], channelId: string | null): Promise<CatalogGalleryBatchItem[]>;
|
|
3269
|
+
listForProducts(productIds: readonly string[], channelId: string | null, languageCode?: string | null): Promise<CatalogGalleryBatchItem[]>;
|
|
3142
3270
|
/**
|
|
3143
3271
|
* The `base_image` url of each of a batch of products — `base_image` only,
|
|
3144
3272
|
* with no fallback to `thumbnail` or to the first item by position.
|
|
@@ -3159,8 +3287,12 @@ export interface CatalogGalleryPort {
|
|
|
3159
3287
|
* (the request's resolved channel): the channel's own holder of the role when it has
|
|
3160
3288
|
* one, else the global holder; `null` when that holder is hidden there. `null` names
|
|
3161
3289
|
* no channel and answers the global holder.
|
|
3290
|
+
*
|
|
3291
|
+
* Feature 174 (`data-model.md` §6b) — the holder resolves C×L → C → Global; an override
|
|
3292
|
+
* naming no item means no image holds the role there. `languageCode` as
|
|
3293
|
+
* {@link listForProducts}.
|
|
3162
3294
|
*/
|
|
3163
|
-
baseImageUrls(productIds: readonly string[], channelId: string | null): Promise<Map<string, string | null>>;
|
|
3295
|
+
baseImageUrls(productIds: readonly string[], channelId: string | null, languageCode?: string | null): Promise<Map<string, string | null>>;
|
|
3164
3296
|
create(productId: string, req: CreateGalleryItemRequest, options: CatalogGalleryWriteOptions): Promise<GalleryItem>;
|
|
3165
3297
|
delete(productId: string, itemId: string): Promise<void>;
|
|
3166
3298
|
reorder(productId: string, orderedIds: string[]): Promise<void>;
|