@endora-commerce/contracts 0.108.0 → 0.109.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-actions.d.ts +12 -3
- package/dist/admin-actions.d.ts.map +1 -1
- package/dist/admin-actions.js +34 -3
- package/dist/admin-actions.js.map +1 -1
- package/dist/admin-contributions.d.ts +35 -6
- package/dist/admin-contributions.d.ts.map +1 -1
- package/dist/admin-contributions.js +46 -0
- package/dist/admin-contributions.js.map +1 -1
- package/dist/admin-notifications.d.ts +17 -1
- package/dist/admin-notifications.d.ts.map +1 -1
- package/dist/admin-preferences.d.ts +108 -0
- package/dist/admin-preferences.d.ts.map +1 -0
- package/dist/admin-preferences.js +133 -0
- package/dist/admin-preferences.js.map +1 -0
- package/dist/admin.d.ts +15 -1
- package/dist/admin.d.ts.map +1 -1
- package/dist/admin.js +7 -0
- package/dist/admin.js.map +1 -1
- package/dist/assets-library.d.ts +97 -3
- package/dist/assets-library.d.ts.map +1 -1
- package/dist/assets-library.js +5 -0
- package/dist/assets-library.js.map +1 -1
- package/dist/blog.d.ts +57 -0
- package/dist/blog.d.ts.map +1 -1
- package/dist/blog.js +63 -1
- package/dist/blog.js.map +1 -1
- package/dist/carts.d.ts +113 -56
- package/dist/carts.d.ts.map +1 -1
- package/dist/carts.js +66 -13
- package/dist/carts.js.map +1 -1
- package/dist/catalog.d.ts +273 -34
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +256 -20
- package/dist/catalog.js.map +1 -1
- package/dist/cms-brand.d.ts +2233 -0
- package/dist/cms-brand.d.ts.map +1 -0
- package/dist/cms-brand.js +311 -0
- package/dist/cms-brand.js.map +1 -0
- package/dist/cms-contact-form.d.ts +55 -0
- package/dist/cms-contact-form.d.ts.map +1 -0
- package/dist/cms-contact-form.js +100 -0
- package/dist/cms-contact-form.js.map +1 -0
- package/dist/cms.d.ts +537 -3
- package/dist/cms.d.ts.map +1 -1
- package/dist/cms.js +251 -0
- package/dist/cms.js.map +1 -1
- package/dist/crm-rich-text.d.ts +10 -61
- package/dist/crm-rich-text.d.ts.map +1 -1
- package/dist/crm-rich-text.js +10 -300
- package/dist/crm-rich-text.js.map +1 -1
- package/dist/crm.d.ts +110 -82
- package/dist/crm.d.ts.map +1 -1
- package/dist/crm.js +29 -88
- package/dist/crm.js.map +1 -1
- package/dist/custom-fields.d.ts +27 -9
- package/dist/custom-fields.d.ts.map +1 -1
- package/dist/custom-fields.js +6 -0
- package/dist/custom-fields.js.map +1 -1
- package/dist/customer-accounts.d.ts +30 -0
- package/dist/customer-accounts.d.ts.map +1 -1
- package/dist/customer-accounts.js +31 -0
- package/dist/customer-accounts.js.map +1 -1
- package/dist/document-templates.d.ts +27 -15
- package/dist/document-templates.d.ts.map +1 -1
- package/dist/document-values.d.ts +8 -0
- package/dist/document-values.d.ts.map +1 -1
- package/dist/document-values.js +24 -6
- package/dist/document-values.js.map +1 -1
- package/dist/email.d.ts +5 -0
- package/dist/email.d.ts.map +1 -1
- package/dist/errors.d.ts +105 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +123 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -1
- package/dist/index.js.map +1 -1
- package/dist/inventory.d.ts +3 -3
- package/dist/invoices.d.ts +6 -2
- package/dist/invoices.d.ts.map +1 -1
- package/dist/invoices.js +3 -0
- package/dist/invoices.js.map +1 -1
- package/dist/megamenu.d.ts +674 -0
- package/dist/megamenu.d.ts.map +1 -1
- package/dist/megamenu.js +96 -3
- package/dist/megamenu.js.map +1 -1
- package/dist/mfa.d.ts +1 -0
- package/dist/mfa.d.ts.map +1 -1
- package/dist/mfa.js +8 -2
- package/dist/mfa.js.map +1 -1
- package/dist/modules.d.ts +8 -1
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +5 -0
- package/dist/modules.js.map +1 -1
- package/dist/newsletter.d.ts +3 -3
- package/dist/orders.d.ts +25 -0
- package/dist/orders.d.ts.map +1 -1
- package/dist/orders.js +14 -0
- package/dist/orders.js.map +1 -1
- package/dist/page-builder-props.d.ts +1401 -0
- package/dist/page-builder-props.d.ts.map +1 -0
- package/dist/page-builder-props.js +266 -0
- package/dist/page-builder-props.js.map +1 -0
- package/dist/page-builder-values.d.ts +95 -0
- package/dist/page-builder-values.d.ts.map +1 -0
- package/dist/page-builder-values.js +164 -0
- package/dist/page-builder-values.js.map +1 -0
- package/dist/pim-connector.d.ts +1 -1
- package/dist/platform-language.d.ts +9 -0
- package/dist/platform-language.d.ts.map +1 -1
- package/dist/platform-language.js +14 -0
- package/dist/platform-language.js.map +1 -1
- package/dist/price-books.d.ts +60 -60
- package/dist/price-lists.d.ts +44 -10
- package/dist/price-lists.d.ts.map +1 -1
- package/dist/price-lists.js +24 -1
- package/dist/price-lists.js.map +1 -1
- package/dist/product-feeds.d.ts +115 -55
- package/dist/product-feeds.d.ts.map +1 -1
- package/dist/product-feeds.js +18 -0
- package/dist/product-feeds.js.map +1 -1
- package/dist/product-scopes.d.ts +628 -0
- package/dist/product-scopes.d.ts.map +1 -0
- package/dist/product-scopes.js +365 -0
- package/dist/product-scopes.js.map +1 -0
- package/dist/product-summary-text.d.ts +23 -0
- package/dist/product-summary-text.d.ts.map +1 -0
- package/dist/product-summary-text.js +64 -0
- package/dist/product-summary-text.js.map +1 -0
- package/dist/product-url-keys.d.ts +204 -0
- package/dist/product-url-keys.d.ts.map +1 -0
- package/dist/product-url-keys.js +166 -0
- package/dist/product-url-keys.js.map +1 -0
- package/dist/projects.d.ts +2355 -0
- package/dist/projects.d.ts.map +1 -0
- package/dist/projects.js +837 -0
- package/dist/projects.js.map +1 -0
- package/dist/prompt-actions.d.ts +19 -1
- package/dist/prompt-actions.d.ts.map +1 -1
- package/dist/prompt-actions.js +31 -2
- package/dist/prompt-actions.js.map +1 -1
- package/dist/quick-order.d.ts +0 -1
- package/dist/quick-order.d.ts.map +1 -1
- package/dist/quick-order.js +1 -1
- package/dist/quick-order.js.map +1 -1
- package/dist/quote-requests.d.ts +36 -1
- package/dist/quote-requests.d.ts.map +1 -1
- package/dist/quote-requests.js +24 -0
- package/dist/quote-requests.js.map +1 -1
- package/dist/record-references.d.ts +252 -0
- package/dist/record-references.d.ts.map +1 -0
- package/dist/record-references.js +179 -0
- package/dist/record-references.js.map +1 -0
- package/dist/record-rich-text.d.ts +66 -0
- package/dist/record-rich-text.d.ts.map +1 -0
- package/dist/record-rich-text.js +303 -0
- package/dist/record-rich-text.js.map +1 -0
- package/dist/returns.d.ts +26 -0
- package/dist/returns.d.ts.map +1 -1
- package/dist/sales-channels.d.ts +51 -7
- package/dist/sales-channels.d.ts.map +1 -1
- package/dist/sales-channels.js +38 -4
- package/dist/sales-channels.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-translations.d.ts +48 -0
- package/dist/scoped-translations.d.ts.map +1 -0
- package/dist/scoped-translations.js +78 -0
- package/dist/scoped-translations.js.map +1 -0
- package/dist/search.d.ts +15 -7
- package/dist/search.d.ts.map +1 -1
- package/dist/seo.d.ts +64 -5
- package/dist/seo.d.ts.map +1 -1
- package/dist/seo.js +31 -4
- package/dist/seo.js.map +1 -1
- package/dist/settings.d.ts +32 -3
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +37 -3
- package/dist/settings.js.map +1 -1
- package/dist/storefront-cache-tags.d.ts +29 -0
- package/dist/storefront-cache-tags.d.ts.map +1 -1
- package/dist/storefront-cache-tags.js +24 -0
- package/dist/storefront-cache-tags.js.map +1 -1
- package/dist/storefront-language-path.d.ts +77 -0
- package/dist/storefront-language-path.d.ts.map +1 -0
- package/dist/storefront-language-path.js +123 -0
- package/dist/storefront-language-path.js.map +1 -0
- package/dist/tasks.d.ts +2842 -0
- package/dist/tasks.d.ts.map +1 -0
- package/dist/tasks.js +901 -0
- package/dist/tasks.js.map +1 -0
- package/dist/transactional-emails.d.ts +7 -4
- package/dist/transactional-emails.d.ts.map +1 -1
- package/dist/transactional-emails.js +13 -0
- package/dist/transactional-emails.js.map +1 -1
- package/package.json +2 -2
package/dist/catalog.d.ts
CHANGED
|
@@ -22,8 +22,13 @@ export declare const productTypeSchema: z.ZodEnum<{
|
|
|
22
22
|
virtual: "virtual";
|
|
23
23
|
}>;
|
|
24
24
|
export type ProductType = z.infer<typeof productTypeSchema>;
|
|
25
|
+
/**
|
|
26
|
+
* Feature 163, spec Session 2026-10-25 (FR-010, FR-112) — `active` | `inactive` at
|
|
27
|
+
* every scope; `inactive` is plain off. `draft` is gone and the legacy `archived`
|
|
28
|
+
* write alias is refused: archiving is the separate Archive / Restore action
|
|
29
|
+
* (`archivedAt`), never a status.
|
|
30
|
+
*/
|
|
25
31
|
export declare const productStatusSchema: z.ZodEnum<{
|
|
26
|
-
draft: "draft";
|
|
27
32
|
active: "active";
|
|
28
33
|
inactive: "inactive";
|
|
29
34
|
}>;
|
|
@@ -35,13 +40,6 @@ export type ProductStatus = z.infer<typeof productStatusSchema>;
|
|
|
35
40
|
* screen and the endpoint cannot disagree about it.
|
|
36
41
|
*/
|
|
37
42
|
export declare const ADMIN_PRODUCT_SELECTION_MAX = 200;
|
|
38
|
-
/** Maps legacy `archived` writes to `inactive` (feature 032). */
|
|
39
|
-
export declare function coerceProductStatusWrite(value: unknown): 'draft' | 'active' | 'inactive' | unknown;
|
|
40
|
-
export declare const productStatusWriteSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodEnum<{
|
|
41
|
-
draft: "draft";
|
|
42
|
-
active: "active";
|
|
43
|
-
inactive: "inactive";
|
|
44
|
-
}>>;
|
|
45
43
|
export declare const stockModeSchema: z.ZodEnum<{
|
|
46
44
|
categorical: "categorical";
|
|
47
45
|
numeric: "numeric";
|
|
@@ -163,19 +161,19 @@ export type ProductAsset = z.infer<typeof productAssetSchema>;
|
|
|
163
161
|
* storefront shows (`available` = stock not managed for the product).
|
|
164
162
|
*/
|
|
165
163
|
export declare const productAvailabilityBandSchema: z.ZodEnum<{
|
|
164
|
+
medium: "medium";
|
|
166
165
|
available: "available";
|
|
167
166
|
out_of_stock: "out_of_stock";
|
|
168
167
|
high: "high";
|
|
169
|
-
medium: "medium";
|
|
170
168
|
low: "low";
|
|
171
169
|
}>;
|
|
172
170
|
export type ProductAvailabilityBand = z.infer<typeof productAvailabilityBandSchema>;
|
|
173
171
|
export declare const productAvailabilitySchema: z.ZodObject<{
|
|
174
172
|
band: z.ZodEnum<{
|
|
173
|
+
medium: "medium";
|
|
175
174
|
available: "available";
|
|
176
175
|
out_of_stock: "out_of_stock";
|
|
177
176
|
high: "high";
|
|
178
|
-
medium: "medium";
|
|
179
177
|
low: "low";
|
|
180
178
|
}>;
|
|
181
179
|
inStock: z.ZodBoolean;
|
|
@@ -208,7 +206,13 @@ export type ProductPriceTier = z.infer<typeof productPriceTierSchema>;
|
|
|
208
206
|
* when that is what `price` came from; `salePrice` is set only when a sale list
|
|
209
207
|
* priced the product (it is then also `price`). Both are `null` when nothing
|
|
210
208
|
* prices the product; `displayMode` is still the viewer's, so a page can tell
|
|
211
|
-
* "sold on request only" (`none`) from "no price".
|
|
209
|
+
* "sold on request only" (`none`) from "no price".
|
|
210
|
+
*
|
|
211
|
+
* Issue #491 — under `displayMode: 'none'` the server sends **no amount**:
|
|
212
|
+
* `basePrice` and `salePrice` are `null`, `listPrice` is absent, and so are
|
|
213
|
+
* `ProductSummary.price`, `compareAtPrice` and `priceVariesByVariant` beside it,
|
|
214
|
+
* whatever the price books would charge. The storefront renders "price on
|
|
215
|
+
* request" from `displayMode`; there is no figure to hide. The display-mode values are
|
|
212
216
|
* `displayModeSchema`'s (`price-lists.ts`, which imports this file and checks
|
|
213
217
|
* the two agree at compile time).
|
|
214
218
|
*/
|
|
@@ -222,8 +226,8 @@ export declare const productResolvedPriceSchema: z.ZodObject<{
|
|
|
222
226
|
currency: z.ZodString;
|
|
223
227
|
}, z.core.$strip>>;
|
|
224
228
|
displayMode: z.ZodEnum<{
|
|
225
|
-
both: "both";
|
|
226
229
|
none: "none";
|
|
230
|
+
both: "both";
|
|
227
231
|
gross_only: "gross_only";
|
|
228
232
|
net_only: "net_only";
|
|
229
233
|
}>;
|
|
@@ -245,6 +249,7 @@ export declare const productSummarySchema: z.ZodObject<{
|
|
|
245
249
|
}>;
|
|
246
250
|
name: z.ZodString;
|
|
247
251
|
slug: z.ZodString;
|
|
252
|
+
summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
248
253
|
categorySlugs: z.ZodArray<z.ZodString>;
|
|
249
254
|
primaryAssetUrl: z.ZodNullable<z.ZodString>;
|
|
250
255
|
price: z.ZodNullable<z.ZodObject<{
|
|
@@ -265,10 +270,10 @@ export declare const productSummarySchema: z.ZodObject<{
|
|
|
265
270
|
priceUnavailable: z.ZodOptional<z.ZodBoolean>;
|
|
266
271
|
availability: z.ZodOptional<z.ZodObject<{
|
|
267
272
|
band: z.ZodEnum<{
|
|
273
|
+
medium: "medium";
|
|
268
274
|
available: "available";
|
|
269
275
|
out_of_stock: "out_of_stock";
|
|
270
276
|
high: "high";
|
|
271
|
-
medium: "medium";
|
|
272
277
|
low: "low";
|
|
273
278
|
}>;
|
|
274
279
|
inStock: z.ZodBoolean;
|
|
@@ -284,8 +289,8 @@ export declare const productSummarySchema: z.ZodObject<{
|
|
|
284
289
|
currency: z.ZodString;
|
|
285
290
|
}, z.core.$strip>>;
|
|
286
291
|
displayMode: z.ZodEnum<{
|
|
287
|
-
both: "both";
|
|
288
292
|
none: "none";
|
|
293
|
+
both: "both";
|
|
289
294
|
gross_only: "gross_only";
|
|
290
295
|
net_only: "net_only";
|
|
291
296
|
}>;
|
|
@@ -325,6 +330,7 @@ export declare const productDetailSchema: z.ZodObject<{
|
|
|
325
330
|
}>;
|
|
326
331
|
name: z.ZodString;
|
|
327
332
|
slug: z.ZodString;
|
|
333
|
+
summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
328
334
|
categorySlugs: z.ZodArray<z.ZodString>;
|
|
329
335
|
primaryAssetUrl: z.ZodNullable<z.ZodString>;
|
|
330
336
|
price: z.ZodNullable<z.ZodObject<{
|
|
@@ -345,10 +351,10 @@ export declare const productDetailSchema: z.ZodObject<{
|
|
|
345
351
|
priceUnavailable: z.ZodOptional<z.ZodBoolean>;
|
|
346
352
|
availability: z.ZodOptional<z.ZodObject<{
|
|
347
353
|
band: z.ZodEnum<{
|
|
354
|
+
medium: "medium";
|
|
348
355
|
available: "available";
|
|
349
356
|
out_of_stock: "out_of_stock";
|
|
350
357
|
high: "high";
|
|
351
|
-
medium: "medium";
|
|
352
358
|
low: "low";
|
|
353
359
|
}>;
|
|
354
360
|
inStock: z.ZodBoolean;
|
|
@@ -364,8 +370,8 @@ export declare const productDetailSchema: z.ZodObject<{
|
|
|
364
370
|
currency: z.ZodString;
|
|
365
371
|
}, z.core.$strip>>;
|
|
366
372
|
displayMode: z.ZodEnum<{
|
|
367
|
-
both: "both";
|
|
368
373
|
none: "none";
|
|
374
|
+
both: "both";
|
|
369
375
|
gross_only: "gross_only";
|
|
370
376
|
net_only: "net_only";
|
|
371
377
|
}>;
|
|
@@ -408,6 +414,14 @@ export declare const productDetailSchema: z.ZodObject<{
|
|
|
408
414
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
409
415
|
}, z.core.$strip>;
|
|
410
416
|
}, z.core.$strip>;
|
|
417
|
+
paths: z.ZodObject<{
|
|
418
|
+
canonical: z.ZodString;
|
|
419
|
+
alternates: z.ZodArray<z.ZodObject<{
|
|
420
|
+
languageCode: z.ZodString;
|
|
421
|
+
path: z.ZodString;
|
|
422
|
+
}, z.core.$strip>>;
|
|
423
|
+
xDefault: z.ZodString;
|
|
424
|
+
}, z.core.$strip>;
|
|
411
425
|
structuredDataJsonLd: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
412
426
|
attributeSet: z.ZodOptional<z.ZodObject<{
|
|
413
427
|
id: z.ZodString;
|
|
@@ -427,6 +441,7 @@ export declare const productDetailSchema: z.ZodObject<{
|
|
|
427
441
|
kind: z.ZodString;
|
|
428
442
|
url: z.ZodString;
|
|
429
443
|
}, z.core.$strip>;
|
|
444
|
+
altText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
430
445
|
}, z.core.$strip>>>;
|
|
431
446
|
groupedItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
432
447
|
id: z.ZodString;
|
|
@@ -710,11 +725,10 @@ export declare const createProductRequestSchema: z.ZodObject<{
|
|
|
710
725
|
logged_in_only: "logged_in_only";
|
|
711
726
|
organization_restricted: "organization_restricted";
|
|
712
727
|
}>;
|
|
713
|
-
status: z.ZodOptional<z.
|
|
714
|
-
draft: "draft";
|
|
728
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
715
729
|
active: "active";
|
|
716
730
|
inactive: "inactive";
|
|
717
|
-
}
|
|
731
|
+
}>>;
|
|
718
732
|
allowedOrganizationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
719
733
|
assetIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
720
734
|
initialStock: z.ZodOptional<z.ZodNumber>;
|
|
@@ -742,11 +756,10 @@ export declare const createProductRequestSchema: z.ZodObject<{
|
|
|
742
756
|
export type CreateProductRequest = z.infer<typeof createProductRequestSchema>;
|
|
743
757
|
export declare const updateProductRequestSchema: z.ZodObject<{
|
|
744
758
|
description: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
745
|
-
status: z.ZodOptional<z.ZodOptional<z.
|
|
746
|
-
draft: "draft";
|
|
759
|
+
status: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
747
760
|
active: "active";
|
|
748
761
|
inactive: "inactive";
|
|
749
|
-
}
|
|
762
|
+
}>>>;
|
|
750
763
|
visibility: z.ZodOptional<z.ZodEnum<{
|
|
751
764
|
public: "public";
|
|
752
765
|
logged_in_only: "logged_in_only";
|
|
@@ -783,6 +796,8 @@ export declare const updateProductRequestSchema: z.ZodObject<{
|
|
|
783
796
|
defined_order: "defined_order";
|
|
784
797
|
}>>>>;
|
|
785
798
|
fulfilmentStrategyWarehouseOrder: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>>;
|
|
799
|
+
publishFrom: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
800
|
+
publishUntil: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
786
801
|
}, z.core.$strip>;
|
|
787
802
|
export type UpdateProductRequest = z.infer<typeof updateProductRequestSchema>;
|
|
788
803
|
export declare const batchByIdProductsRequestSchema: z.ZodObject<{
|
|
@@ -792,9 +807,19 @@ export declare const batchByIdProductsRequestSchema: z.ZodObject<{
|
|
|
792
807
|
}, z.core.$strip>;
|
|
793
808
|
export type BatchByIdProductsRequest = z.infer<typeof batchByIdProductsRequestSchema>;
|
|
794
809
|
export declare const MAX_RESOLVE_SELECTION_SIZE = 10000;
|
|
810
|
+
/**
|
|
811
|
+
* Feature 163 (FR-113, research R30.4) — which archived products a list or a
|
|
812
|
+
* selection shows, independently of the status: `exclude` hides them, `include`
|
|
813
|
+
* shows them beside the rest, `only` shows nothing else.
|
|
814
|
+
*/
|
|
815
|
+
export declare const productArchivedModeSchema: z.ZodEnum<{
|
|
816
|
+
only: "only";
|
|
817
|
+
exclude: "exclude";
|
|
818
|
+
include: "include";
|
|
819
|
+
}>;
|
|
820
|
+
export type ProductArchivedMode = z.infer<typeof productArchivedModeSchema>;
|
|
795
821
|
export declare const resolveProductIdsRequestSchema: z.ZodObject<{
|
|
796
822
|
status: z.ZodOptional<z.ZodEnum<{
|
|
797
|
-
draft: "draft";
|
|
798
823
|
active: "active";
|
|
799
824
|
inactive: "inactive";
|
|
800
825
|
}>>;
|
|
@@ -807,6 +832,11 @@ export declare const resolveProductIdsRequestSchema: z.ZodObject<{
|
|
|
807
832
|
}>>;
|
|
808
833
|
q: z.ZodOptional<z.ZodString>;
|
|
809
834
|
includeArchived: z.ZodOptional<z.ZodBoolean>;
|
|
835
|
+
archived: z.ZodOptional<z.ZodEnum<{
|
|
836
|
+
only: "only";
|
|
837
|
+
exclude: "exclude";
|
|
838
|
+
include: "include";
|
|
839
|
+
}>>;
|
|
810
840
|
}, z.core.$strip>;
|
|
811
841
|
export type ResolveProductIdsRequest = z.infer<typeof resolveProductIdsRequestSchema>;
|
|
812
842
|
export declare const resolveProductIdsResponseSchema: z.ZodObject<{
|
|
@@ -819,11 +849,10 @@ export type ResolveProductIdsResponse = z.infer<typeof resolveProductIdsResponse
|
|
|
819
849
|
export declare const bulkUpdateProductsRequestSchema: z.ZodObject<{
|
|
820
850
|
productIds: z.ZodArray<z.ZodString>;
|
|
821
851
|
fields: z.ZodObject<{
|
|
822
|
-
status: z.ZodOptional<z.
|
|
823
|
-
draft: "draft";
|
|
852
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
824
853
|
active: "active";
|
|
825
854
|
inactive: "inactive";
|
|
826
|
-
}
|
|
855
|
+
}>>;
|
|
827
856
|
visibility: z.ZodOptional<z.ZodEnum<{
|
|
828
857
|
public: "public";
|
|
829
858
|
logged_in_only: "logged_in_only";
|
|
@@ -847,6 +876,16 @@ export declare const bulkUpdateProductsRequestSchema: z.ZodObject<{
|
|
|
847
876
|
attributeSetId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
848
877
|
attributeValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
849
878
|
returnable: z.ZodOptional<z.ZodBoolean>;
|
|
879
|
+
scopedStatus: z.ZodOptional<z.ZodObject<{
|
|
880
|
+
channelId: z.ZodString;
|
|
881
|
+
languageCode: z.ZodNullable<z.ZodString>;
|
|
882
|
+
value: z.ZodEnum<{
|
|
883
|
+
active: "active";
|
|
884
|
+
inactive: "inactive";
|
|
885
|
+
inherit: "inherit";
|
|
886
|
+
}>;
|
|
887
|
+
}, z.core.$strip>>;
|
|
888
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
850
889
|
}, z.core.$strip>;
|
|
851
890
|
}, z.core.$strip>;
|
|
852
891
|
export type BulkUpdateProductsRequest = z.infer<typeof bulkUpdateProductsRequestSchema>;
|
|
@@ -863,6 +902,8 @@ export declare const bulkUpdateProductResultSchema: z.ZodObject<{
|
|
|
863
902
|
validation_failed: "validation_failed";
|
|
864
903
|
permission_denied: "permission_denied";
|
|
865
904
|
concurrent_modification: "concurrent_modification";
|
|
905
|
+
scope_invalid: "scope_invalid";
|
|
906
|
+
completeness_gate: "completeness_gate";
|
|
866
907
|
}>>;
|
|
867
908
|
details: z.ZodOptional<z.ZodObject<{
|
|
868
909
|
code: z.ZodOptional<z.ZodString>;
|
|
@@ -894,6 +935,8 @@ export declare const bulkUpdateProductsResponseSchema: z.ZodObject<{
|
|
|
894
935
|
validation_failed: "validation_failed";
|
|
895
936
|
permission_denied: "permission_denied";
|
|
896
937
|
concurrent_modification: "concurrent_modification";
|
|
938
|
+
scope_invalid: "scope_invalid";
|
|
939
|
+
completeness_gate: "completeness_gate";
|
|
897
940
|
}>>;
|
|
898
941
|
details: z.ZodOptional<z.ZodObject<{
|
|
899
942
|
code: z.ZodOptional<z.ZodString>;
|
|
@@ -923,6 +966,12 @@ export type BulkOperationStatus = z.infer<typeof bulkOperationStatusSchema>;
|
|
|
923
966
|
/**
|
|
924
967
|
* One timestamped lifecycle event in a bulk operation's log trail, surfaced
|
|
925
968
|
* in the bulk-operations detail view next to the per-element results.
|
|
969
|
+
*
|
|
970
|
+
* The trail is stored and read later by administrators in languages of their
|
|
971
|
+
* own, so an entry carries `messageKey` — a key in `catalog`'s bundle and the
|
|
972
|
+
* params that fill it — for its reader to translate, and `message`, the
|
|
973
|
+
* finished English sentence, for a reader that cannot resolve the key. Entries
|
|
974
|
+
* written before `messageKey` existed carry only `message`.
|
|
926
975
|
*/
|
|
927
976
|
export declare const bulkOperationLogEntrySchema: z.ZodObject<{
|
|
928
977
|
ts: z.ZodString;
|
|
@@ -932,6 +981,10 @@ export declare const bulkOperationLogEntrySchema: z.ZodObject<{
|
|
|
932
981
|
warn: "warn";
|
|
933
982
|
}>;
|
|
934
983
|
message: z.ZodString;
|
|
984
|
+
messageKey: z.ZodOptional<z.ZodObject<{
|
|
985
|
+
key: z.ZodString;
|
|
986
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
987
|
+
}, z.core.$strip>>;
|
|
935
988
|
}, z.core.$strip>;
|
|
936
989
|
export type BulkOperationLogEntry = z.infer<typeof bulkOperationLogEntrySchema>;
|
|
937
990
|
/**
|
|
@@ -975,6 +1028,8 @@ export declare const bulkOperationSchema: z.ZodObject<{
|
|
|
975
1028
|
validation_failed: "validation_failed";
|
|
976
1029
|
permission_denied: "permission_denied";
|
|
977
1030
|
concurrent_modification: "concurrent_modification";
|
|
1031
|
+
scope_invalid: "scope_invalid";
|
|
1032
|
+
completeness_gate: "completeness_gate";
|
|
978
1033
|
}>>;
|
|
979
1034
|
details: z.ZodOptional<z.ZodObject<{
|
|
980
1035
|
code: z.ZodOptional<z.ZodString>;
|
|
@@ -991,6 +1046,10 @@ export declare const bulkOperationSchema: z.ZodObject<{
|
|
|
991
1046
|
warn: "warn";
|
|
992
1047
|
}>;
|
|
993
1048
|
message: z.ZodString;
|
|
1049
|
+
messageKey: z.ZodOptional<z.ZodObject<{
|
|
1050
|
+
key: z.ZodString;
|
|
1051
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
1052
|
+
}, z.core.$strip>>;
|
|
994
1053
|
}, z.core.$strip>>>;
|
|
995
1054
|
error: z.ZodNullable<z.ZodString>;
|
|
996
1055
|
createdAt: z.ZodString;
|
|
@@ -1051,6 +1110,8 @@ export declare const bulkOperationsListResponseSchema: z.ZodObject<{
|
|
|
1051
1110
|
validation_failed: "validation_failed";
|
|
1052
1111
|
permission_denied: "permission_denied";
|
|
1053
1112
|
concurrent_modification: "concurrent_modification";
|
|
1113
|
+
scope_invalid: "scope_invalid";
|
|
1114
|
+
completeness_gate: "completeness_gate";
|
|
1054
1115
|
}>>;
|
|
1055
1116
|
details: z.ZodOptional<z.ZodObject<{
|
|
1056
1117
|
code: z.ZodOptional<z.ZodString>;
|
|
@@ -1067,6 +1128,10 @@ export declare const bulkOperationsListResponseSchema: z.ZodObject<{
|
|
|
1067
1128
|
warn: "warn";
|
|
1068
1129
|
}>;
|
|
1069
1130
|
message: z.ZodString;
|
|
1131
|
+
messageKey: z.ZodOptional<z.ZodObject<{
|
|
1132
|
+
key: z.ZodString;
|
|
1133
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
1134
|
+
}, z.core.$strip>>;
|
|
1070
1135
|
}, z.core.$strip>>>;
|
|
1071
1136
|
error: z.ZodNullable<z.ZodString>;
|
|
1072
1137
|
createdAt: z.ZodString;
|
|
@@ -1117,6 +1182,8 @@ export declare const bulkOperationResponseSchema: z.ZodObject<{
|
|
|
1117
1182
|
validation_failed: "validation_failed";
|
|
1118
1183
|
permission_denied: "permission_denied";
|
|
1119
1184
|
concurrent_modification: "concurrent_modification";
|
|
1185
|
+
scope_invalid: "scope_invalid";
|
|
1186
|
+
completeness_gate: "completeness_gate";
|
|
1120
1187
|
}>>;
|
|
1121
1188
|
details: z.ZodOptional<z.ZodObject<{
|
|
1122
1189
|
code: z.ZodOptional<z.ZodString>;
|
|
@@ -1133,6 +1200,10 @@ export declare const bulkOperationResponseSchema: z.ZodObject<{
|
|
|
1133
1200
|
warn: "warn";
|
|
1134
1201
|
}>;
|
|
1135
1202
|
message: z.ZodString;
|
|
1203
|
+
messageKey: z.ZodOptional<z.ZodObject<{
|
|
1204
|
+
key: z.ZodString;
|
|
1205
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
1206
|
+
}, z.core.$strip>>;
|
|
1136
1207
|
}, z.core.$strip>>>;
|
|
1137
1208
|
error: z.ZodNullable<z.ZodString>;
|
|
1138
1209
|
createdAt: z.ZodString;
|
|
@@ -1313,10 +1384,10 @@ export declare const adminAttributeResponseSchema: z.ZodObject<{
|
|
|
1313
1384
|
multiselect: "multiselect";
|
|
1314
1385
|
slider: "slider";
|
|
1315
1386
|
}>;
|
|
1316
|
-
numericKind: z.ZodOptional<z.ZodEnum<{
|
|
1387
|
+
numericKind: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1317
1388
|
number: "number";
|
|
1318
1389
|
price: "price";
|
|
1319
|
-
}
|
|
1390
|
+
}>>>;
|
|
1320
1391
|
valueType: z.ZodEnum<{
|
|
1321
1392
|
string: "string";
|
|
1322
1393
|
number: "number";
|
|
@@ -1341,6 +1412,8 @@ export declare const adminAttributeResponseSchema: z.ZodObject<{
|
|
|
1341
1412
|
massEditable: z.ZodBoolean;
|
|
1342
1413
|
quickSearchable: z.ZodBoolean;
|
|
1343
1414
|
customFieldDefinitionId: z.ZodString;
|
|
1415
|
+
channelScoped: z.ZodOptional<z.ZodBoolean>;
|
|
1416
|
+
languageScoped: z.ZodOptional<z.ZodBoolean>;
|
|
1344
1417
|
createdAt: z.ZodString;
|
|
1345
1418
|
updatedAt: z.ZodString;
|
|
1346
1419
|
}, z.core.$strip>;
|
|
@@ -1439,8 +1512,33 @@ export declare const productListSortSchema: z.ZodEnum<{
|
|
|
1439
1512
|
export type ProductListSort = z.infer<typeof productListSortSchema>;
|
|
1440
1513
|
/** The two orderings feature 086 added, as a narrowing a consumer can reuse. */
|
|
1441
1514
|
export declare function isPriceSort(sort: ProductListSort | undefined): sort is 'price' | '-price';
|
|
1515
|
+
/**
|
|
1516
|
+
* Issue #590 — the most products one `GET /api/v1/catalog/products?ids=` names.
|
|
1517
|
+
* A hand-picked set (a blog post's related products) is a strip, not a
|
|
1518
|
+
* catalogue: two dozen is twice the widest strip any surface renders, and it
|
|
1519
|
+
* keeps the one batched price resolution behind the read small.
|
|
1520
|
+
*/
|
|
1521
|
+
export declare const PRODUCT_LIST_MAX_IDS = 24;
|
|
1522
|
+
/**
|
|
1523
|
+
* Issue #590 — `?ids=` on the public listing: a comma-separated list of product
|
|
1524
|
+
* ids, trimmed and de-duplicated (first occurrence wins), at least one and at
|
|
1525
|
+
* most {@link PRODUCT_LIST_MAX_IDS}. A value that is not a uuid is refused
|
|
1526
|
+
* (`400 VALIDATION_FAILED`) rather than dropped, because a caller naming
|
|
1527
|
+
* products by id is a program, and silently answering fewer products than it
|
|
1528
|
+
* asked for would hide its bug.
|
|
1529
|
+
*
|
|
1530
|
+
* The listing answers **the subset of those products this viewer may see** —
|
|
1531
|
+
* channel membership, status, window and audience are the listing's own
|
|
1532
|
+
* availability condition — each priced exactly as any listing card is: one
|
|
1533
|
+
* batched resolution for the viewer (`resolveListingPriceDetails`). An id that
|
|
1534
|
+
* is unknown, deleted, out of channel or hidden from the viewer is simply not
|
|
1535
|
+
* in the answer. The order is the listing's, not the list's; a caller that
|
|
1536
|
+
* cares about its own order re-orders by id.
|
|
1537
|
+
*/
|
|
1538
|
+
export declare const productListIdsSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodString>>;
|
|
1442
1539
|
export declare const productListQuerySchema: z.ZodObject<{
|
|
1443
1540
|
q: z.ZodOptional<z.ZodString>;
|
|
1541
|
+
ids: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodString>>>;
|
|
1444
1542
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
1445
1543
|
cursor: z.ZodOptional<z.ZodString>;
|
|
1446
1544
|
sort: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1462,8 +1560,8 @@ export type ProductListQuery = z.infer<typeof productListQuerySchema>;
|
|
|
1462
1560
|
*
|
|
1463
1561
|
* It rides on the listing response because the storefront has to decide whether
|
|
1464
1562
|
* to *render* the price controls, and the answer depends on the viewer and the
|
|
1465
|
-
* channel:
|
|
1466
|
-
*
|
|
1563
|
+
* channel: `pricing.unauthenticated_display_mode = none` hides prices until
|
|
1564
|
+
* login, on one channel or on all of them. A
|
|
1467
1565
|
* storefront that guessed would guess wrong on exactly the deployments that
|
|
1468
1566
|
* care, and a control that offers an ordering the API refuses is a worse defect
|
|
1469
1567
|
* than no control.
|
|
@@ -1570,6 +1668,10 @@ export declare const galleryLabelSchema: z.ZodEnum<{
|
|
|
1570
1668
|
thumbnail: "thumbnail";
|
|
1571
1669
|
}>;
|
|
1572
1670
|
export type GalleryLabel = z.infer<typeof galleryLabelSchema>;
|
|
1671
|
+
/** Feature 163 (FR-077) — the longest alt text of one image in one language. */
|
|
1672
|
+
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;
|
|
1573
1675
|
export declare const galleryItemSchema: z.ZodObject<{
|
|
1574
1676
|
id: z.ZodString;
|
|
1575
1677
|
productId: z.ZodString;
|
|
@@ -1580,6 +1682,8 @@ export declare const galleryItemSchema: z.ZodObject<{
|
|
|
1580
1682
|
small_image: "small_image";
|
|
1581
1683
|
thumbnail: "thumbnail";
|
|
1582
1684
|
}>>;
|
|
1685
|
+
altText: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1686
|
+
hiddenInChannels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1583
1687
|
createdAt: z.ZodString;
|
|
1584
1688
|
updatedAt: z.ZodString;
|
|
1585
1689
|
}, z.core.$strip>;
|
|
@@ -1601,8 +1705,41 @@ export declare const updateGalleryItemRequestSchema: z.ZodObject<{
|
|
|
1601
1705
|
small_image: "small_image";
|
|
1602
1706
|
thumbnail: "thumbnail";
|
|
1603
1707
|
}>>>;
|
|
1708
|
+
altText: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1709
|
+
hiddenInChannels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1604
1710
|
}, z.core.$strict>;
|
|
1605
1711
|
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>;
|
|
1606
1743
|
export declare const reorderGalleryRequestSchema: z.ZodObject<{
|
|
1607
1744
|
orderedGalleryItemIds: z.ZodArray<z.ZodString>;
|
|
1608
1745
|
}, z.core.$strict>;
|
|
@@ -1629,6 +1766,10 @@ export declare const updateAttachmentTypeRequestSchema: z.ZodObject<{
|
|
|
1629
1766
|
position: z.ZodOptional<z.ZodNumber>;
|
|
1630
1767
|
}, z.core.$strict>;
|
|
1631
1768
|
export type UpdateAttachmentTypeRequest = z.infer<typeof updateAttachmentTypeRequestSchema>;
|
|
1769
|
+
/** Feature 163 (FR-078) — the longest attachment description one language may carry. */
|
|
1770
|
+
export declare const ATTACHMENT_DESCRIPTION_TRANSLATION_MAX = 4000;
|
|
1771
|
+
/** Feature 163 (FR-078) — an attachment name per language, as long as the global one. */
|
|
1772
|
+
export declare const ATTACHMENT_NAME_MAX = 160;
|
|
1632
1773
|
export declare const productAttachmentSchema: z.ZodObject<{
|
|
1633
1774
|
id: z.ZodString;
|
|
1634
1775
|
productId: z.ZodString;
|
|
@@ -1637,6 +1778,9 @@ export declare const productAttachmentSchema: z.ZodObject<{
|
|
|
1637
1778
|
name: z.ZodString;
|
|
1638
1779
|
description: z.ZodNullable<z.ZodString>;
|
|
1639
1780
|
position: z.ZodNumber;
|
|
1781
|
+
nameTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1782
|
+
descriptionTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1783
|
+
hiddenInChannels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1640
1784
|
createdAt: z.ZodString;
|
|
1641
1785
|
updatedAt: z.ZodString;
|
|
1642
1786
|
}, z.core.$strip>;
|
|
@@ -1647,6 +1791,9 @@ export declare const createAttachmentRequestSchema: z.ZodObject<{
|
|
|
1647
1791
|
name: z.ZodString;
|
|
1648
1792
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1649
1793
|
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>>;
|
|
1650
1797
|
}, z.core.$strict>;
|
|
1651
1798
|
export type CreateAttachmentRequest = z.infer<typeof createAttachmentRequestSchema>;
|
|
1652
1799
|
export declare const updateAttachmentRequestSchema: z.ZodObject<{
|
|
@@ -1654,8 +1801,13 @@ export declare const updateAttachmentRequestSchema: z.ZodObject<{
|
|
|
1654
1801
|
name: z.ZodOptional<z.ZodString>;
|
|
1655
1802
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1656
1803
|
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>>;
|
|
1657
1807
|
}, z.core.$strict>;
|
|
1658
1808
|
export type UpdateAttachmentRequest = z.infer<typeof updateAttachmentRequestSchema>;
|
|
1809
|
+
/** The longest packaging-unit name, global or (feature 163, FR-079) per language. */
|
|
1810
|
+
export declare const PACKAGING_UNIT_NAME_MAX = 160;
|
|
1659
1811
|
/**
|
|
1660
1812
|
* A named ordering unit attached to a product (e.g. "Paleta" = 480 pieces).
|
|
1661
1813
|
* Managed in the Inventory section of the admin product card; surfaced on the
|
|
@@ -1665,6 +1817,7 @@ export declare const packagingUnitSchema: z.ZodObject<{
|
|
|
1665
1817
|
id: z.ZodString;
|
|
1666
1818
|
productId: z.ZodString;
|
|
1667
1819
|
name: z.ZodString;
|
|
1820
|
+
nameTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1668
1821
|
baseQuantity: z.ZodNumber;
|
|
1669
1822
|
position: z.ZodNumber;
|
|
1670
1823
|
isDefault: z.ZodBoolean;
|
|
@@ -1679,6 +1832,7 @@ export declare const createPackagingUnitRequestSchema: z.ZodObject<{
|
|
|
1679
1832
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
1680
1833
|
position: z.ZodOptional<z.ZodNumber>;
|
|
1681
1834
|
minOrderUnits: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1835
|
+
nameTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1682
1836
|
}, z.core.$strict>;
|
|
1683
1837
|
export type CreatePackagingUnitRequest = z.infer<typeof createPackagingUnitRequestSchema>;
|
|
1684
1838
|
export declare const updatePackagingUnitRequestSchema: z.ZodObject<{
|
|
@@ -1687,6 +1841,7 @@ export declare const updatePackagingUnitRequestSchema: z.ZodObject<{
|
|
|
1687
1841
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
1688
1842
|
position: z.ZodOptional<z.ZodNumber>;
|
|
1689
1843
|
minOrderUnits: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1844
|
+
nameTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1690
1845
|
}, z.core.$strict>;
|
|
1691
1846
|
export type UpdatePackagingUnitRequest = z.infer<typeof updatePackagingUnitRequestSchema>;
|
|
1692
1847
|
export declare const reorderPackagingUnitsRequestSchema: z.ZodObject<{
|
|
@@ -1910,6 +2065,13 @@ export interface CatalogProductRecord {
|
|
|
1910
2065
|
minOrderQuantity: number | null;
|
|
1911
2066
|
/** Feature 155 — the product's current flag; order lines record their own copy at placement. */
|
|
1912
2067
|
returnable: boolean;
|
|
2068
|
+
/**
|
|
2069
|
+
* Feature 163 — the global publication window, inclusive at both ends; `null` =
|
|
2070
|
+
* open on that side. Optional for good, so a record literal built without it keeps
|
|
2071
|
+
* compiling; the channel-effective window comes from `catalogProductAvailabilityPort`.
|
|
2072
|
+
*/
|
|
2073
|
+
publishFrom?: Date | null;
|
|
2074
|
+
publishUntil?: Date | null;
|
|
1913
2075
|
}
|
|
1914
2076
|
/**
|
|
1915
2077
|
* Who is asking for a product — the single input every enforcing read path
|
|
@@ -2140,6 +2302,12 @@ export interface CatalogPackagingUnitRecord {
|
|
|
2140
2302
|
updatedAt: Date;
|
|
2141
2303
|
/** Feature 155 — minimum units of this packaging unit per order of the product; `null` = none. */
|
|
2142
2304
|
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>;
|
|
2143
2311
|
}
|
|
2144
2312
|
/** A directed product↔product relation (cross-sell, up-sell, related). */
|
|
2145
2313
|
export interface CatalogProductLinkRow {
|
|
@@ -2467,7 +2635,39 @@ export interface ProductImportRow {
|
|
|
2467
2635
|
/** Per-locale, merged into the stored JSONB rather than replacing it. */
|
|
2468
2636
|
name?: Record<string, string>;
|
|
2469
2637
|
description?: Record<string, string>;
|
|
2638
|
+
/**
|
|
2639
|
+
* Feature 163 (FR-092) — the status at a sales channel (`languageCode: null`) or
|
|
2640
|
+
* a sales channel × language scope, one entry per `status@…` column the file
|
|
2641
|
+
* carries. `status: null` = use inherited. A scope the file has no column for is
|
|
2642
|
+
* untouched.
|
|
2643
|
+
*/
|
|
2644
|
+
scopedStatus?: ScopedStatusCell[];
|
|
2470
2645
|
}
|
|
2646
|
+
/** One `status@<channel code>[/<language>]` cell of a products file (feature 163, FR-092). */
|
|
2647
|
+
export interface ScopedStatusCell {
|
|
2648
|
+
channelCode: string;
|
|
2649
|
+
/** `null` = the channel scope. */
|
|
2650
|
+
languageCode: string | null;
|
|
2651
|
+
/** `null` = use inherited (an empty cell). */
|
|
2652
|
+
status: ProductStatus | null;
|
|
2653
|
+
}
|
|
2654
|
+
/** The scoped-status columns a products export carries, and each product's overrides in them. */
|
|
2655
|
+
export interface ScopedStatusExport {
|
|
2656
|
+
/** Every channel scope, then its channel × language scopes, in a stable order. */
|
|
2657
|
+
columns: Array<{
|
|
2658
|
+
channelCode: string;
|
|
2659
|
+
languageCode: string | null;
|
|
2660
|
+
}>;
|
|
2661
|
+
/** Product id → column name ({@link scopedStatusColumn}) → the override there. An inherited scope is absent. */
|
|
2662
|
+
values: Record<string, Record<string, ProductStatus>>;
|
|
2663
|
+
}
|
|
2664
|
+
/** The products-file column of a scope: `status@<channel code>` or `status@<channel code>/<language>`. */
|
|
2665
|
+
export declare function scopedStatusColumn(channelCode: string, languageCode: string | null): string;
|
|
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;
|
|
2471
2671
|
/**
|
|
2472
2672
|
* Container name: `catalogBulkImportPort`. Owner: `catalog`.
|
|
2473
2673
|
*
|
|
@@ -2484,6 +2684,8 @@ export interface ProductImportRow {
|
|
|
2484
2684
|
export interface CatalogBulkImportPort {
|
|
2485
2685
|
importCategories(rows: readonly CategoryImportRow[]): Promise<BulkImportReport>;
|
|
2486
2686
|
importProducts(rows: readonly ProductImportRow[]): Promise<BulkImportReport>;
|
|
2687
|
+
/** Feature 163 (FR-092) — the scoped-status columns of a products export, and their values. */
|
|
2688
|
+
exportScopedStatuses(): Promise<ScopedStatusExport>;
|
|
2487
2689
|
}
|
|
2488
2690
|
export interface CatalogAttributeOptionView {
|
|
2489
2691
|
/** `custom_field_options` id. */
|
|
@@ -2585,6 +2787,13 @@ export interface CatalogQuickSearchParams {
|
|
|
2585
2787
|
* See {@link CatalogQuickSearchPort} for what it restricts.
|
|
2586
2788
|
*/
|
|
2587
2789
|
organizationId: string;
|
|
2790
|
+
/**
|
|
2791
|
+
* Feature 163 — the request's language tag (its first `Accept-Language`
|
|
2792
|
+
* pick). Resolved against the channel's own languages by
|
|
2793
|
+
* `resolveScopeLanguage`; absent means the channel's default language. A
|
|
2794
|
+
* product switched off at (channel, that language) is not a hit.
|
|
2795
|
+
*/
|
|
2796
|
+
languageCode?: string | undefined;
|
|
2588
2797
|
}
|
|
2589
2798
|
export interface CatalogQuickSearchHit {
|
|
2590
2799
|
productId: string;
|
|
@@ -2592,6 +2801,12 @@ export interface CatalogQuickSearchHit {
|
|
|
2592
2801
|
slug: string;
|
|
2593
2802
|
/** Per-locale JSONB as stored — the caller picks its own language. */
|
|
2594
2803
|
name: Record<string, string>;
|
|
2804
|
+
/**
|
|
2805
|
+
* Feature 163 (FR-017 a) — the Name the storefront shows at the request's
|
|
2806
|
+
* (channel, language): the channel's override where one applies, else the
|
|
2807
|
+
* baseline pick. What a type-ahead should display.
|
|
2808
|
+
*/
|
|
2809
|
+
effectiveName?: string;
|
|
2595
2810
|
status: ProductStatus;
|
|
2596
2811
|
matchedOn: CatalogQuickSearchField[];
|
|
2597
2812
|
}
|
|
@@ -2918,8 +3133,12 @@ export interface CatalogGalleryPort {
|
|
|
2918
3133
|
* because both consumers render them identically (no image) and telling them
|
|
2919
3134
|
* apart would need exactly the product-existence probe that makes `list`
|
|
2920
3135
|
* unusable for a batch.
|
|
3136
|
+
*
|
|
3137
|
+
* Feature 163 (FR-076, owner decision MED-1 = A) — `channelId` is the channel the
|
|
3138
|
+
* caller serves (a feed's channel): an item hidden there is left out. `null` names no
|
|
3139
|
+
* channel and answers the global gallery.
|
|
2921
3140
|
*/
|
|
2922
|
-
listForProducts(productIds: readonly string[]): Promise<CatalogGalleryBatchItem[]>;
|
|
3141
|
+
listForProducts(productIds: readonly string[], channelId: string | null): Promise<CatalogGalleryBatchItem[]>;
|
|
2923
3142
|
/**
|
|
2924
3143
|
* The `base_image` url of each of a batch of products — `base_image` only,
|
|
2925
3144
|
* with no fallback to `thumbnail` or to the first item by position.
|
|
@@ -2935,8 +3154,13 @@ export interface CatalogGalleryPort {
|
|
|
2935
3154
|
* `gallery_items` plus the asset read port it already holds, so a consumer
|
|
2936
3155
|
* gets the url without joining `assets_library`'s table itself — which is the
|
|
2937
3156
|
* third of the three reaches this method retires (feature 075 / D-87).
|
|
3157
|
+
*
|
|
3158
|
+
* Feature 163 (FR-076, owner decision MED-1 = A) — the base image **in `channelId`**
|
|
3159
|
+
* (the request's resolved channel): the channel's own holder of the role when it has
|
|
3160
|
+
* one, else the global holder; `null` when that holder is hidden there. `null` names
|
|
3161
|
+
* no channel and answers the global holder.
|
|
2938
3162
|
*/
|
|
2939
|
-
baseImageUrls(productIds: readonly string[]): Promise<Map<string, string | null>>;
|
|
3163
|
+
baseImageUrls(productIds: readonly string[], channelId: string | null): Promise<Map<string, string | null>>;
|
|
2940
3164
|
create(productId: string, req: CreateGalleryItemRequest, options: CatalogGalleryWriteOptions): Promise<GalleryItem>;
|
|
2941
3165
|
delete(productId: string, itemId: string): Promise<void>;
|
|
2942
3166
|
reorder(productId: string, orderedIds: string[]): Promise<void>;
|
|
@@ -3163,6 +3387,19 @@ export interface CatalogSellableProductQuery {
|
|
|
3163
3387
|
afterId?: string | null;
|
|
3164
3388
|
/** Page size. Defaults to 500, the size the feed pipeline already walks in. */
|
|
3165
3389
|
limit?: number;
|
|
3390
|
+
/**
|
|
3391
|
+
* Feature 163 — where the products are sold: the feed's sales channel and
|
|
3392
|
+
* its language tag (resolved by `catalog` against the channel's own
|
|
3393
|
+
* languages; absent or unknown = the channel's default). When given, the
|
|
3394
|
+
* floor is **effective availability** there for the anonymous audience, now
|
|
3395
|
+
* (`isProductEffectivelyAvailable`: the scoped status at (channel, language),
|
|
3396
|
+
* the publication window and the channel's audience rule) instead of the
|
|
3397
|
+
* global `status` and audience columns — still not overridable by `filter`.
|
|
3398
|
+
*/
|
|
3399
|
+
scope?: {
|
|
3400
|
+
channelId: string;
|
|
3401
|
+
languageTag?: string | null | undefined;
|
|
3402
|
+
} | undefined;
|
|
3166
3403
|
}
|
|
3167
3404
|
/**
|
|
3168
3405
|
* Container name: `catalogProductFilterPort`. Owner: `catalog`.
|
|
@@ -3225,8 +3462,10 @@ export declare const ProductUpdatedEventV1Schema: z.ZodObject<{
|
|
|
3225
3462
|
}, z.core.$strict>;
|
|
3226
3463
|
export type ProductUpdatedEventV1 = z.infer<typeof ProductUpdatedEventV1Schema>;
|
|
3227
3464
|
/**
|
|
3228
|
-
* Payload of `product.archived.v1` —
|
|
3229
|
-
*
|
|
3465
|
+
* Payload of `product.archived.v1` — the product was archived by the Archive action
|
|
3466
|
+
* (feature 163, FR-019; `POST …/products/:id/archive` or bulk `fields.archived`).
|
|
3467
|
+
* Emitted after the `product.updated.v1` `['archivedAt']` of the same action. A
|
|
3468
|
+
* status write never emits it: `inactive` is plain off.
|
|
3230
3469
|
*/
|
|
3231
3470
|
export declare const ProductArchivedEventV1Schema: z.ZodObject<{
|
|
3232
3471
|
productId: z.ZodString;
|