@endora-commerce/contracts 0.108.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.
Files changed (309) hide show
  1. package/dist/actor.d.ts +16 -0
  2. package/dist/actor.d.ts.map +1 -1
  3. package/dist/addresses.d.ts +35 -0
  4. package/dist/addresses.d.ts.map +1 -1
  5. package/dist/addresses.js +8 -1
  6. package/dist/addresses.js.map +1 -1
  7. package/dist/admin-actions.d.ts +12 -3
  8. package/dist/admin-actions.d.ts.map +1 -1
  9. package/dist/admin-actions.js +34 -3
  10. package/dist/admin-actions.js.map +1 -1
  11. package/dist/admin-contributions.d.ts +94 -10
  12. package/dist/admin-contributions.d.ts.map +1 -1
  13. package/dist/admin-contributions.js +65 -0
  14. package/dist/admin-contributions.js.map +1 -1
  15. package/dist/admin-notifications.d.ts +17 -1
  16. package/dist/admin-notifications.d.ts.map +1 -1
  17. package/dist/admin-preferences.d.ts +108 -0
  18. package/dist/admin-preferences.d.ts.map +1 -0
  19. package/dist/admin-preferences.js +133 -0
  20. package/dist/admin-preferences.js.map +1 -0
  21. package/dist/admin-roles.d.ts +8 -2
  22. package/dist/admin-roles.d.ts.map +1 -1
  23. package/dist/admin-roles.js.map +1 -1
  24. package/dist/admin-users.d.ts +9 -0
  25. package/dist/admin-users.d.ts.map +1 -1
  26. package/dist/admin.d.ts +92 -5
  27. package/dist/admin.d.ts.map +1 -1
  28. package/dist/admin.js +86 -3
  29. package/dist/admin.js.map +1 -1
  30. package/dist/assets-library.d.ts +123 -3
  31. package/dist/assets-library.d.ts.map +1 -1
  32. package/dist/assets-library.js +11 -3
  33. package/dist/assets-library.js.map +1 -1
  34. package/dist/audit-logs.d.ts +12 -0
  35. package/dist/audit-logs.d.ts.map +1 -1
  36. package/dist/audit-logs.js +12 -0
  37. package/dist/audit-logs.js.map +1 -1
  38. package/dist/blog.d.ts +431 -14
  39. package/dist/blog.d.ts.map +1 -1
  40. package/dist/blog.js +251 -7
  41. package/dist/blog.js.map +1 -1
  42. package/dist/carts.d.ts +507 -92
  43. package/dist/carts.d.ts.map +1 -1
  44. package/dist/carts.js +197 -21
  45. package/dist/carts.js.map +1 -1
  46. package/dist/catalog.d.ts +515 -144
  47. package/dist/catalog.d.ts.map +1 -1
  48. package/dist/catalog.js +356 -68
  49. package/dist/catalog.js.map +1 -1
  50. package/dist/cms-brand.d.ts +2233 -0
  51. package/dist/cms-brand.d.ts.map +1 -0
  52. package/dist/cms-brand.js +311 -0
  53. package/dist/cms-brand.js.map +1 -0
  54. package/dist/cms-contact-form.d.ts +55 -0
  55. package/dist/cms-contact-form.d.ts.map +1 -0
  56. package/dist/cms-contact-form.js +100 -0
  57. package/dist/cms-contact-form.js.map +1 -0
  58. package/dist/cms.d.ts +576 -17
  59. package/dist/cms.d.ts.map +1 -1
  60. package/dist/cms.js +251 -0
  61. package/dist/cms.js.map +1 -1
  62. package/dist/common.d.ts +23 -6
  63. package/dist/common.d.ts.map +1 -1
  64. package/dist/common.js +25 -2
  65. package/dist/common.js.map +1 -1
  66. package/dist/comparisons.d.ts +28 -21
  67. package/dist/comparisons.d.ts.map +1 -1
  68. package/dist/comparisons.js +2 -1
  69. package/dist/comparisons.js.map +1 -1
  70. package/dist/credit-limits.d.ts +1 -0
  71. package/dist/credit-limits.d.ts.map +1 -1
  72. package/dist/credit-limits.js +14 -0
  73. package/dist/credit-limits.js.map +1 -1
  74. package/dist/crm-rich-text.d.ts +10 -61
  75. package/dist/crm-rich-text.d.ts.map +1 -1
  76. package/dist/crm-rich-text.js +10 -300
  77. package/dist/crm-rich-text.js.map +1 -1
  78. package/dist/crm.d.ts +173 -115
  79. package/dist/crm.d.ts.map +1 -1
  80. package/dist/crm.js +35 -88
  81. package/dist/crm.js.map +1 -1
  82. package/dist/custom-fields.d.ts +54 -22
  83. package/dist/custom-fields.d.ts.map +1 -1
  84. package/dist/custom-fields.js +21 -1
  85. package/dist/custom-fields.js.map +1 -1
  86. package/dist/customer-accounts.d.ts +216 -22
  87. package/dist/customer-accounts.d.ts.map +1 -1
  88. package/dist/customer-accounts.js +70 -0
  89. package/dist/customer-accounts.js.map +1 -1
  90. package/dist/customers.d.ts +40 -73
  91. package/dist/customers.d.ts.map +1 -1
  92. package/dist/customers.js +45 -10
  93. package/dist/customers.js.map +1 -1
  94. package/dist/document-templates.d.ts +35 -23
  95. package/dist/document-templates.d.ts.map +1 -1
  96. package/dist/document-values.d.ts +8 -0
  97. package/dist/document-values.d.ts.map +1 -1
  98. package/dist/document-values.js +24 -6
  99. package/dist/document-values.js.map +1 -1
  100. package/dist/email.d.ts +5 -0
  101. package/dist/email.d.ts.map +1 -1
  102. package/dist/errors.d.ts +224 -1
  103. package/dist/errors.d.ts.map +1 -1
  104. package/dist/errors.js +269 -1
  105. package/dist/errors.js.map +1 -1
  106. package/dist/forms-logic.d.ts +79 -0
  107. package/dist/forms-logic.d.ts.map +1 -0
  108. package/dist/forms-logic.fixtures.d.ts +52 -0
  109. package/dist/forms-logic.fixtures.d.ts.map +1 -0
  110. package/dist/forms-logic.fixtures.js +610 -0
  111. package/dist/forms-logic.fixtures.js.map +1 -0
  112. package/dist/forms-logic.js +699 -0
  113. package/dist/forms-logic.js.map +1 -0
  114. package/dist/forms.d.ts +9833 -0
  115. package/dist/forms.d.ts.map +1 -0
  116. package/dist/forms.js +827 -0
  117. package/dist/forms.js.map +1 -0
  118. package/dist/import-export.d.ts +180 -0
  119. package/dist/import-export.d.ts.map +1 -1
  120. package/dist/import-export.js +60 -0
  121. package/dist/import-export.js.map +1 -1
  122. package/dist/index.d.ts +22 -1
  123. package/dist/index.d.ts.map +1 -1
  124. package/dist/index.js +45 -1
  125. package/dist/index.js.map +1 -1
  126. package/dist/inventory.d.ts +6 -6
  127. package/dist/invoice-ledger.d.ts +7 -7
  128. package/dist/invoices.d.ts +6 -2
  129. package/dist/invoices.d.ts.map +1 -1
  130. package/dist/invoices.js +7 -0
  131. package/dist/invoices.js.map +1 -1
  132. package/dist/megamenu.d.ts +674 -0
  133. package/dist/megamenu.d.ts.map +1 -1
  134. package/dist/megamenu.js +96 -3
  135. package/dist/megamenu.js.map +1 -1
  136. package/dist/mfa.d.ts +125 -4
  137. package/dist/mfa.d.ts.map +1 -1
  138. package/dist/mfa.js +54 -2
  139. package/dist/mfa.js.map +1 -1
  140. package/dist/modules.d.ts +44 -5
  141. package/dist/modules.d.ts.map +1 -1
  142. package/dist/modules.js +73 -0
  143. package/dist/modules.js.map +1 -1
  144. package/dist/money-decimal.d.ts +54 -0
  145. package/dist/money-decimal.d.ts.map +1 -1
  146. package/dist/money-decimal.js +95 -0
  147. package/dist/money-decimal.js.map +1 -1
  148. package/dist/newsletter.d.ts +7 -7
  149. package/dist/orders.d.ts +128 -10
  150. package/dist/orders.d.ts.map +1 -1
  151. package/dist/orders.js +74 -4
  152. package/dist/orders.js.map +1 -1
  153. package/dist/organization-registry-lookup.d.ts +362 -0
  154. package/dist/organization-registry-lookup.d.ts.map +1 -0
  155. package/dist/organization-registry-lookup.js +196 -0
  156. package/dist/organization-registry-lookup.js.map +1 -0
  157. package/dist/organization-roles.d.ts +340 -0
  158. package/dist/organization-roles.d.ts.map +1 -0
  159. package/dist/organization-roles.js +211 -0
  160. package/dist/organization-roles.js.map +1 -0
  161. package/dist/organizations.d.ts +123 -89
  162. package/dist/organizations.d.ts.map +1 -1
  163. package/dist/organizations.js +68 -24
  164. package/dist/organizations.js.map +1 -1
  165. package/dist/page-builder-props.d.ts +1401 -0
  166. package/dist/page-builder-props.d.ts.map +1 -0
  167. package/dist/page-builder-props.js +266 -0
  168. package/dist/page-builder-props.js.map +1 -0
  169. package/dist/page-builder-values.d.ts +95 -0
  170. package/dist/page-builder-values.d.ts.map +1 -0
  171. package/dist/page-builder-values.js +164 -0
  172. package/dist/page-builder-values.js.map +1 -0
  173. package/dist/pim-connector.d.ts +6 -2
  174. package/dist/pim-connector.d.ts.map +1 -1
  175. package/dist/pim-connector.js +6 -2
  176. package/dist/pim-connector.js.map +1 -1
  177. package/dist/pim-field-path.d.ts +5 -1
  178. package/dist/pim-field-path.d.ts.map +1 -1
  179. package/dist/pim-field-path.js +37 -81
  180. package/dist/pim-field-path.js.map +1 -1
  181. package/dist/pim-locale-mapping.d.ts +131 -0
  182. package/dist/pim-locale-mapping.d.ts.map +1 -0
  183. package/dist/pim-locale-mapping.js +193 -0
  184. package/dist/pim-locale-mapping.js.map +1 -0
  185. package/dist/platform-language.d.ts +9 -0
  186. package/dist/platform-language.d.ts.map +1 -1
  187. package/dist/platform-language.js +14 -0
  188. package/dist/platform-language.js.map +1 -1
  189. package/dist/price-books.d.ts +47 -43
  190. package/dist/price-books.d.ts.map +1 -1
  191. package/dist/price-books.js +6 -2
  192. package/dist/price-books.js.map +1 -1
  193. package/dist/price-lists.d.ts +48 -14
  194. package/dist/price-lists.d.ts.map +1 -1
  195. package/dist/price-lists.js +24 -1
  196. package/dist/price-lists.js.map +1 -1
  197. package/dist/product-feeds.d.ts +144 -84
  198. package/dist/product-feeds.d.ts.map +1 -1
  199. package/dist/product-feeds.js +23 -0
  200. package/dist/product-feeds.js.map +1 -1
  201. package/dist/product-scope-model.d.ts +161 -0
  202. package/dist/product-scope-model.d.ts.map +1 -0
  203. package/dist/product-scope-model.js +161 -0
  204. package/dist/product-scope-model.js.map +1 -0
  205. package/dist/product-scope-overrides.d.ts +0 -103
  206. package/dist/product-scope-overrides.d.ts.map +1 -1
  207. package/dist/product-scope-overrides.js +0 -54
  208. package/dist/product-scope-overrides.js.map +1 -1
  209. package/dist/product-scoped-values.d.ts +2610 -0
  210. package/dist/product-scoped-values.d.ts.map +1 -0
  211. package/dist/product-scoped-values.js +425 -0
  212. package/dist/product-scoped-values.js.map +1 -0
  213. package/dist/product-scopes.d.ts +746 -0
  214. package/dist/product-scopes.d.ts.map +1 -0
  215. package/dist/product-scopes.js +436 -0
  216. package/dist/product-scopes.js.map +1 -0
  217. package/dist/product-summary-text.d.ts +23 -0
  218. package/dist/product-summary-text.d.ts.map +1 -0
  219. package/dist/product-summary-text.js +64 -0
  220. package/dist/product-summary-text.js.map +1 -0
  221. package/dist/product-tax-rates.d.ts +38 -0
  222. package/dist/product-tax-rates.d.ts.map +1 -0
  223. package/dist/product-tax-rates.js +45 -0
  224. package/dist/product-tax-rates.js.map +1 -0
  225. package/dist/product-url-keys.d.ts +210 -0
  226. package/dist/product-url-keys.d.ts.map +1 -0
  227. package/dist/product-url-keys.js +200 -0
  228. package/dist/product-url-keys.js.map +1 -0
  229. package/dist/product-value-resolver.d.ts +37 -60
  230. package/dist/product-value-resolver.d.ts.map +1 -1
  231. package/dist/product-value-resolver.js +36 -96
  232. package/dist/product-value-resolver.js.map +1 -1
  233. package/dist/projects.d.ts +2370 -0
  234. package/dist/projects.d.ts.map +1 -0
  235. package/dist/projects.js +843 -0
  236. package/dist/projects.js.map +1 -0
  237. package/dist/promotions.d.ts +10 -10
  238. package/dist/prompt-actions.d.ts +19 -1
  239. package/dist/prompt-actions.d.ts.map +1 -1
  240. package/dist/prompt-actions.js +31 -2
  241. package/dist/prompt-actions.js.map +1 -1
  242. package/dist/pwa.d.ts +2 -2
  243. package/dist/quick-order.d.ts +150 -7
  244. package/dist/quick-order.d.ts.map +1 -1
  245. package/dist/quick-order.js +76 -2
  246. package/dist/quick-order.js.map +1 -1
  247. package/dist/quote-requests.d.ts +99 -13
  248. package/dist/quote-requests.d.ts.map +1 -1
  249. package/dist/quote-requests.js +66 -1
  250. package/dist/quote-requests.js.map +1 -1
  251. package/dist/record-references.d.ts +252 -0
  252. package/dist/record-references.d.ts.map +1 -0
  253. package/dist/record-references.js +178 -0
  254. package/dist/record-references.js.map +1 -0
  255. package/dist/record-rich-text.d.ts +66 -0
  256. package/dist/record-rich-text.d.ts.map +1 -0
  257. package/dist/record-rich-text.js +304 -0
  258. package/dist/record-rich-text.js.map +1 -0
  259. package/dist/returns.d.ts +234 -52
  260. package/dist/returns.d.ts.map +1 -1
  261. package/dist/returns.js +139 -26
  262. package/dist/returns.js.map +1 -1
  263. package/dist/sales-channels.d.ts +51 -7
  264. package/dist/sales-channels.d.ts.map +1 -1
  265. package/dist/sales-channels.js +38 -4
  266. package/dist/sales-channels.js.map +1 -1
  267. package/dist/saved-list-views.d.ts +56 -0
  268. package/dist/saved-list-views.d.ts.map +1 -1
  269. package/dist/saved-list-views.js +27 -1
  270. package/dist/saved-list-views.js.map +1 -1
  271. package/dist/scoped-write-encoding.d.ts +100 -0
  272. package/dist/scoped-write-encoding.d.ts.map +1 -0
  273. package/dist/scoped-write-encoding.js +135 -0
  274. package/dist/scoped-write-encoding.js.map +1 -0
  275. package/dist/search.d.ts +25 -15
  276. package/dist/search.d.ts.map +1 -1
  277. package/dist/seo.d.ts +127 -15
  278. package/dist/seo.d.ts.map +1 -1
  279. package/dist/seo.js +38 -4
  280. package/dist/seo.js.map +1 -1
  281. package/dist/settings.d.ts +161 -3
  282. package/dist/settings.d.ts.map +1 -1
  283. package/dist/settings.js +73 -3
  284. package/dist/settings.js.map +1 -1
  285. package/dist/shopping-lists.d.ts +24 -3
  286. package/dist/shopping-lists.d.ts.map +1 -1
  287. package/dist/shopping-lists.js +20 -0
  288. package/dist/shopping-lists.js.map +1 -1
  289. package/dist/storefront-cache-tags.d.ts +41 -0
  290. package/dist/storefront-cache-tags.d.ts.map +1 -1
  291. package/dist/storefront-cache-tags.js +36 -0
  292. package/dist/storefront-cache-tags.js.map +1 -1
  293. package/dist/storefront-language-path.d.ts +77 -0
  294. package/dist/storefront-language-path.d.ts.map +1 -0
  295. package/dist/storefront-language-path.js +123 -0
  296. package/dist/storefront-language-path.js.map +1 -0
  297. package/dist/storefront-value-overrides.d.ts +18 -56
  298. package/dist/storefront-value-overrides.d.ts.map +1 -1
  299. package/dist/storefront-value-overrides.js +11 -86
  300. package/dist/storefront-value-overrides.js.map +1 -1
  301. package/dist/tasks.d.ts +2842 -0
  302. package/dist/tasks.d.ts.map +1 -0
  303. package/dist/tasks.js +901 -0
  304. package/dist/tasks.js.map +1 -0
  305. package/dist/transactional-emails.d.ts +14 -11
  306. package/dist/transactional-emails.d.ts.map +1 -1
  307. package/dist/transactional-emails.js +13 -0
  308. package/dist/transactional-emails.js.map +1 -1
  309. package/package.json +3 -3
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.
@@ -22,8 +24,13 @@ export declare const productTypeSchema: z.ZodEnum<{
22
24
  virtual: "virtual";
23
25
  }>;
24
26
  export type ProductType = z.infer<typeof productTypeSchema>;
27
+ /**
28
+ * Feature 163, spec Session 2026-10-25 (FR-010, FR-112) — `active` | `inactive` at
29
+ * every scope; `inactive` is plain off. `draft` is gone and the legacy `archived`
30
+ * write alias is refused: archiving is the separate Archive / Restore action
31
+ * (`archivedAt`), never a status.
32
+ */
25
33
  export declare const productStatusSchema: z.ZodEnum<{
26
- draft: "draft";
27
34
  active: "active";
28
35
  inactive: "inactive";
29
36
  }>;
@@ -35,21 +42,14 @@ export type ProductStatus = z.infer<typeof productStatusSchema>;
35
42
  * screen and the endpoint cannot disagree about it.
36
43
  */
37
44
  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
45
  export declare const stockModeSchema: z.ZodEnum<{
46
46
  categorical: "categorical";
47
47
  numeric: "numeric";
48
48
  }>;
49
49
  export type StockMode = z.infer<typeof stockModeSchema>;
50
50
  export declare const stockIndicatorSchema: z.ZodEnum<{
51
- available: "available";
52
51
  out_of_stock: "out_of_stock";
52
+ available: "available";
53
53
  to_order: "to_order";
54
54
  }>;
55
55
  export type StockIndicator = z.infer<typeof stockIndicatorSchema>;
@@ -69,9 +69,10 @@ export declare const attributeValueTypeSchema: z.ZodEnum<{
69
69
  boolean: "boolean";
70
70
  date: "date";
71
71
  enum: "enum";
72
- select: "select";
73
- price: "price";
74
72
  multiselect: "multiselect";
73
+ price: "price";
74
+ select: "select";
75
+ page_builder: "page_builder";
75
76
  }>;
76
77
  export type AttributeValueType = z.infer<typeof attributeValueTypeSchema>;
77
78
  /**
@@ -81,9 +82,10 @@ export type AttributeValueType = z.infer<typeof attributeValueTypeSchema>;
81
82
  export declare const apiAttributeTypeSchema: z.ZodEnum<{
82
83
  number: "number";
83
84
  input: "input";
84
- select: "select";
85
- price: "price";
86
85
  multiselect: "multiselect";
86
+ price: "price";
87
+ select: "select";
88
+ page_builder: "page_builder";
87
89
  slider: "slider";
88
90
  }>;
89
91
  export type ApiAttributeType = z.infer<typeof apiAttributeTypeSchema>;
@@ -163,20 +165,20 @@ export type ProductAsset = z.infer<typeof productAssetSchema>;
163
165
  * storefront shows (`available` = stock not managed for the product).
164
166
  */
165
167
  export declare const productAvailabilityBandSchema: z.ZodEnum<{
166
- available: "available";
167
- out_of_stock: "out_of_stock";
168
168
  high: "high";
169
169
  medium: "medium";
170
170
  low: "low";
171
+ out_of_stock: "out_of_stock";
172
+ available: "available";
171
173
  }>;
172
174
  export type ProductAvailabilityBand = z.infer<typeof productAvailabilityBandSchema>;
173
175
  export declare const productAvailabilitySchema: z.ZodObject<{
174
176
  band: z.ZodEnum<{
175
- available: "available";
176
- out_of_stock: "out_of_stock";
177
177
  high: "high";
178
178
  medium: "medium";
179
179
  low: "low";
180
+ out_of_stock: "out_of_stock";
181
+ available: "available";
180
182
  }>;
181
183
  inStock: z.ZodBoolean;
182
184
  }, z.core.$strip>;
@@ -208,7 +210,13 @@ export type ProductPriceTier = z.infer<typeof productPriceTierSchema>;
208
210
  * when that is what `price` came from; `salePrice` is set only when a sale list
209
211
  * priced the product (it is then also `price`). Both are `null` when nothing
210
212
  * prices the product; `displayMode` is still the viewer's, so a page can tell
211
- * "sold on request only" (`none`) from "no price". The display-mode values are
213
+ * "sold on request only" (`none`) from "no price".
214
+ *
215
+ * Issue #491 — under `displayMode: 'none'` the server sends **no amount**:
216
+ * `basePrice` and `salePrice` are `null`, `listPrice` is absent, and so are
217
+ * `ProductSummary.price`, `compareAtPrice` and `priceVariesByVariant` beside it,
218
+ * whatever the price books would charge. The storefront renders "price on
219
+ * request" from `displayMode`; there is no figure to hide. The display-mode values are
212
220
  * `displayModeSchema`'s (`price-lists.ts`, which imports this file and checks
213
221
  * the two agree at compile time).
214
222
  */
@@ -222,10 +230,10 @@ export declare const productResolvedPriceSchema: z.ZodObject<{
222
230
  currency: z.ZodString;
223
231
  }, z.core.$strip>>;
224
232
  displayMode: z.ZodEnum<{
225
- both: "both";
226
- none: "none";
227
233
  gross_only: "gross_only";
228
234
  net_only: "net_only";
235
+ both: "both";
236
+ none: "none";
229
237
  }>;
230
238
  listPrice: z.ZodOptional<z.ZodObject<{
231
239
  amount: z.ZodString;
@@ -245,6 +253,7 @@ export declare const productSummarySchema: z.ZodObject<{
245
253
  }>;
246
254
  name: z.ZodString;
247
255
  slug: z.ZodString;
256
+ summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
248
257
  categorySlugs: z.ZodArray<z.ZodString>;
249
258
  primaryAssetUrl: z.ZodNullable<z.ZodString>;
250
259
  price: z.ZodNullable<z.ZodObject<{
@@ -257,19 +266,19 @@ export declare const productSummarySchema: z.ZodObject<{
257
266
  }, z.core.$strip>>>;
258
267
  priceVariesByVariant: z.ZodOptional<z.ZodBoolean>;
259
268
  stockIndicator: z.ZodNullable<z.ZodEnum<{
260
- available: "available";
261
269
  out_of_stock: "out_of_stock";
270
+ available: "available";
262
271
  to_order: "to_order";
263
272
  }>>;
264
273
  stockLevel: z.ZodNullable<z.ZodNumber>;
265
274
  priceUnavailable: z.ZodOptional<z.ZodBoolean>;
266
275
  availability: z.ZodOptional<z.ZodObject<{
267
276
  band: z.ZodEnum<{
268
- available: "available";
269
- out_of_stock: "out_of_stock";
270
277
  high: "high";
271
278
  medium: "medium";
272
279
  low: "low";
280
+ out_of_stock: "out_of_stock";
281
+ available: "available";
273
282
  }>;
274
283
  inStock: z.ZodBoolean;
275
284
  }, z.core.$strip>>;
@@ -284,16 +293,17 @@ export declare const productSummarySchema: z.ZodObject<{
284
293
  currency: z.ZodString;
285
294
  }, z.core.$strip>>;
286
295
  displayMode: z.ZodEnum<{
287
- both: "both";
288
- none: "none";
289
296
  gross_only: "gross_only";
290
297
  net_only: "net_only";
298
+ both: "both";
299
+ none: "none";
291
300
  }>;
292
301
  listPrice: z.ZodOptional<z.ZodObject<{
293
302
  amount: z.ZodString;
294
303
  currency: z.ZodString;
295
304
  }, z.core.$strip>>;
296
305
  }, z.core.$strip>>>;
306
+ vatRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
297
307
  }, z.core.$strip>;
298
308
  export type ProductSummary = z.infer<typeof productSummarySchema>;
299
309
  export declare const productVariantSchema: z.ZodObject<{
@@ -313,6 +323,30 @@ export declare const seoMetaSchema: z.ZodObject<{
313
323
  }, z.core.$strip>;
314
324
  }, z.core.$strip>;
315
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>;
316
350
  export declare const productDetailSchema: z.ZodObject<{
317
351
  id: z.ZodString;
318
352
  sku: z.ZodString;
@@ -325,6 +359,7 @@ export declare const productDetailSchema: z.ZodObject<{
325
359
  }>;
326
360
  name: z.ZodString;
327
361
  slug: z.ZodString;
362
+ summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
328
363
  categorySlugs: z.ZodArray<z.ZodString>;
329
364
  primaryAssetUrl: z.ZodNullable<z.ZodString>;
330
365
  price: z.ZodNullable<z.ZodObject<{
@@ -337,19 +372,19 @@ export declare const productDetailSchema: z.ZodObject<{
337
372
  }, z.core.$strip>>>;
338
373
  priceVariesByVariant: z.ZodOptional<z.ZodBoolean>;
339
374
  stockIndicator: z.ZodNullable<z.ZodEnum<{
340
- available: "available";
341
375
  out_of_stock: "out_of_stock";
376
+ available: "available";
342
377
  to_order: "to_order";
343
378
  }>>;
344
379
  stockLevel: z.ZodNullable<z.ZodNumber>;
345
380
  priceUnavailable: z.ZodOptional<z.ZodBoolean>;
346
381
  availability: z.ZodOptional<z.ZodObject<{
347
382
  band: z.ZodEnum<{
348
- available: "available";
349
- out_of_stock: "out_of_stock";
350
383
  high: "high";
351
384
  medium: "medium";
352
385
  low: "low";
386
+ out_of_stock: "out_of_stock";
387
+ available: "available";
353
388
  }>;
354
389
  inStock: z.ZodBoolean;
355
390
  }, z.core.$strip>>;
@@ -364,16 +399,17 @@ export declare const productDetailSchema: z.ZodObject<{
364
399
  currency: z.ZodString;
365
400
  }, z.core.$strip>>;
366
401
  displayMode: z.ZodEnum<{
367
- both: "both";
368
- none: "none";
369
402
  gross_only: "gross_only";
370
403
  net_only: "net_only";
404
+ both: "both";
405
+ none: "none";
371
406
  }>;
372
407
  listPrice: z.ZodOptional<z.ZodObject<{
373
408
  amount: z.ZodString;
374
409
  currency: z.ZodString;
375
410
  }, z.core.$strip>>;
376
411
  }, z.core.$strip>>>;
412
+ vatRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
377
413
  description: z.ZodString;
378
414
  attributeValues: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
379
415
  assets: z.ZodArray<z.ZodObject<{
@@ -408,6 +444,14 @@ export declare const productDetailSchema: z.ZodObject<{
408
444
  imageUrl: z.ZodNullable<z.ZodString>;
409
445
  }, z.core.$strip>;
410
446
  }, z.core.$strip>;
447
+ paths: z.ZodObject<{
448
+ canonical: z.ZodString;
449
+ alternates: z.ZodArray<z.ZodObject<{
450
+ languageCode: z.ZodString;
451
+ path: z.ZodString;
452
+ }, z.core.$strip>>;
453
+ xDefault: z.ZodString;
454
+ }, z.core.$strip>;
411
455
  structuredDataJsonLd: z.ZodRecord<z.ZodString, z.ZodUnknown>;
412
456
  attributeSet: z.ZodOptional<z.ZodObject<{
413
457
  id: z.ZodString;
@@ -427,6 +471,7 @@ export declare const productDetailSchema: z.ZodObject<{
427
471
  kind: z.ZodString;
428
472
  url: z.ZodString;
429
473
  }, z.core.$strip>;
474
+ altText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
430
475
  }, z.core.$strip>>>;
431
476
  groupedItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
432
477
  id: z.ZodString;
@@ -561,12 +606,18 @@ export declare const productDetailSchema: z.ZodObject<{
561
606
  boolean: "boolean";
562
607
  date: "date";
563
608
  enum: "enum";
564
- select: "select";
565
- price: "price";
566
609
  multiselect: "multiselect";
610
+ price: "price";
611
+ select: "select";
612
+ page_builder: "page_builder";
567
613
  }>;
568
614
  valueRendered: z.ZodString;
569
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>>>;
570
621
  packagingUnits: z.ZodOptional<z.ZodArray<z.ZodObject<{
571
622
  id: z.ZodString;
572
623
  name: z.ZodString;
@@ -672,9 +723,10 @@ export declare const filterDefinitionSchema: z.ZodObject<{
672
723
  boolean: "boolean";
673
724
  date: "date";
674
725
  enum: "enum";
675
- select: "select";
676
- price: "price";
677
726
  multiselect: "multiselect";
727
+ price: "price";
728
+ select: "select";
729
+ page_builder: "page_builder";
678
730
  }>;
679
731
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
680
732
  value: z.ZodString;
@@ -688,6 +740,10 @@ export declare const filterDefinitionSchema: z.ZodObject<{
688
740
  filterPosition: z.ZodDefault<z.ZodNumber>;
689
741
  }, z.core.$strip>;
690
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;
691
747
  export declare const createProductRequestSchema: z.ZodObject<{
692
748
  sku: z.ZodString;
693
749
  type: z.ZodEnum<{
@@ -697,8 +753,8 @@ export declare const createProductRequestSchema: z.ZodObject<{
697
753
  bundle: "bundle";
698
754
  virtual: "virtual";
699
755
  }>;
700
- name: z.ZodRecord<z.ZodString, z.ZodString>;
701
- description: z.ZodRecord<z.ZodString, z.ZodString>;
756
+ name: z.ZodString;
757
+ description: z.ZodNullable<z.ZodString>;
702
758
  categoryIds: z.ZodArray<z.ZodString>;
703
759
  attributeValues: z.ZodRecord<z.ZodString, z.ZodUnknown>;
704
760
  stockMode: z.ZodOptional<z.ZodEnum<{
@@ -710,11 +766,10 @@ export declare const createProductRequestSchema: z.ZodObject<{
710
766
  logged_in_only: "logged_in_only";
711
767
  organization_restricted: "organization_restricted";
712
768
  }>;
713
- status: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodEnum<{
714
- draft: "draft";
769
+ status: z.ZodOptional<z.ZodEnum<{
715
770
  active: "active";
716
771
  inactive: "inactive";
717
- }>>>;
772
+ }>>;
718
773
  allowedOrganizationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
719
774
  assetIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
720
775
  initialStock: z.ZodOptional<z.ZodNumber>;
@@ -741,23 +796,14 @@ export declare const createProductRequestSchema: z.ZodObject<{
741
796
  }, z.core.$strip>;
742
797
  export type CreateProductRequest = z.infer<typeof createProductRequestSchema>;
743
798
  export declare const updateProductRequestSchema: z.ZodObject<{
744
- description: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
745
- status: z.ZodOptional<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodEnum<{
746
- draft: "draft";
799
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
800
+ name: z.ZodOptional<z.ZodString>;
801
+ status: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
747
802
  active: "active";
748
803
  inactive: "inactive";
749
- }>>>>;
750
- visibility: z.ZodOptional<z.ZodEnum<{
751
- public: "public";
752
- logged_in_only: "logged_in_only";
753
- organization_restricted: "organization_restricted";
754
- }>>;
755
- name: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
756
- returnable: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
757
- assetIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
758
- categoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
759
- sku: z.ZodOptional<z.ZodString>;
804
+ }>>>;
760
805
  minOrderQuantity: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
806
+ returnable: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
761
807
  manageStock: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
762
808
  backorderEnabled: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
763
809
  lowStockThreshold: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
@@ -765,14 +811,22 @@ export declare const updateProductRequestSchema: z.ZodObject<{
765
811
  cumulative: "cumulative";
766
812
  per_warehouse: "per_warehouse";
767
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>>>;
768
821
  attributeValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
769
822
  downloadAssetId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
770
823
  downloadUrl: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
824
+ categoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
771
825
  stockMode: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
772
826
  categorical: "categorical";
773
827
  numeric: "numeric";
774
828
  }>>>;
775
- allowedOrganizationIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
829
+ assetIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
776
830
  initialStock: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
777
831
  attributeSetId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
778
832
  fulfilmentStrategy: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
@@ -783,6 +837,9 @@ export declare const updateProductRequestSchema: z.ZodObject<{
783
837
  defined_order: "defined_order";
784
838
  }>>>>;
785
839
  fulfilmentStrategyWarehouseOrder: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>>;
840
+ publishFrom: z.ZodOptional<z.ZodNullable<z.ZodString>>;
841
+ publishUntil: z.ZodOptional<z.ZodNullable<z.ZodString>>;
842
+ version: z.ZodOptional<z.ZodString>;
786
843
  }, z.core.$strip>;
787
844
  export type UpdateProductRequest = z.infer<typeof updateProductRequestSchema>;
788
845
  export declare const batchByIdProductsRequestSchema: z.ZodObject<{
@@ -792,9 +849,19 @@ export declare const batchByIdProductsRequestSchema: z.ZodObject<{
792
849
  }, z.core.$strip>;
793
850
  export type BatchByIdProductsRequest = z.infer<typeof batchByIdProductsRequestSchema>;
794
851
  export declare const MAX_RESOLVE_SELECTION_SIZE = 10000;
852
+ /**
853
+ * Feature 163 (FR-113, research R30.4) — which archived products a list or a
854
+ * selection shows, independently of the status: `exclude` hides them, `include`
855
+ * shows them beside the rest, `only` shows nothing else.
856
+ */
857
+ export declare const productArchivedModeSchema: z.ZodEnum<{
858
+ include: "include";
859
+ exclude: "exclude";
860
+ only: "only";
861
+ }>;
862
+ export type ProductArchivedMode = z.infer<typeof productArchivedModeSchema>;
795
863
  export declare const resolveProductIdsRequestSchema: z.ZodObject<{
796
864
  status: z.ZodOptional<z.ZodEnum<{
797
- draft: "draft";
798
865
  active: "active";
799
866
  inactive: "inactive";
800
867
  }>>;
@@ -807,6 +874,11 @@ export declare const resolveProductIdsRequestSchema: z.ZodObject<{
807
874
  }>>;
808
875
  q: z.ZodOptional<z.ZodString>;
809
876
  includeArchived: z.ZodOptional<z.ZodBoolean>;
877
+ archived: z.ZodOptional<z.ZodEnum<{
878
+ include: "include";
879
+ exclude: "exclude";
880
+ only: "only";
881
+ }>>;
810
882
  }, z.core.$strip>;
811
883
  export type ResolveProductIdsRequest = z.infer<typeof resolveProductIdsRequestSchema>;
812
884
  export declare const resolveProductIdsResponseSchema: z.ZodObject<{
@@ -819,11 +891,10 @@ export type ResolveProductIdsResponse = z.infer<typeof resolveProductIdsResponse
819
891
  export declare const bulkUpdateProductsRequestSchema: z.ZodObject<{
820
892
  productIds: z.ZodArray<z.ZodString>;
821
893
  fields: z.ZodObject<{
822
- status: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodEnum<{
823
- draft: "draft";
894
+ status: z.ZodOptional<z.ZodEnum<{
824
895
  active: "active";
825
896
  inactive: "inactive";
826
- }>>>;
897
+ }>>;
827
898
  visibility: z.ZodOptional<z.ZodEnum<{
828
899
  public: "public";
829
900
  logged_in_only: "logged_in_only";
@@ -847,6 +918,16 @@ export declare const bulkUpdateProductsRequestSchema: z.ZodObject<{
847
918
  attributeSetId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
848
919
  attributeValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
849
920
  returnable: z.ZodOptional<z.ZodBoolean>;
921
+ scopedStatus: z.ZodOptional<z.ZodObject<{
922
+ channelId: z.ZodString;
923
+ languageCode: z.ZodNullable<z.ZodString>;
924
+ value: z.ZodEnum<{
925
+ inherit: "inherit";
926
+ active: "active";
927
+ inactive: "inactive";
928
+ }>;
929
+ }, z.core.$strip>>;
930
+ archived: z.ZodOptional<z.ZodBoolean>;
850
931
  }, z.core.$strip>;
851
932
  }, z.core.$strip>;
852
933
  export type BulkUpdateProductsRequest = z.infer<typeof bulkUpdateProductsRequestSchema>;
@@ -854,8 +935,8 @@ export declare const bulkUpdateProductResultSchema: z.ZodObject<{
854
935
  productId: z.ZodString;
855
936
  status: z.ZodEnum<{
856
937
  failed: "failed";
857
- succeeded: "succeeded";
858
938
  skipped: "skipped";
939
+ succeeded: "succeeded";
859
940
  }>;
860
941
  reason: z.ZodOptional<z.ZodEnum<{
861
942
  product_not_found: "product_not_found";
@@ -863,6 +944,8 @@ export declare const bulkUpdateProductResultSchema: z.ZodObject<{
863
944
  validation_failed: "validation_failed";
864
945
  permission_denied: "permission_denied";
865
946
  concurrent_modification: "concurrent_modification";
947
+ scope_invalid: "scope_invalid";
948
+ completeness_gate: "completeness_gate";
866
949
  }>>;
867
950
  details: z.ZodOptional<z.ZodObject<{
868
951
  code: z.ZodOptional<z.ZodString>;
@@ -885,8 +968,8 @@ export declare const bulkUpdateProductsResponseSchema: z.ZodObject<{
885
968
  productId: z.ZodString;
886
969
  status: z.ZodEnum<{
887
970
  failed: "failed";
888
- succeeded: "succeeded";
889
971
  skipped: "skipped";
972
+ succeeded: "succeeded";
890
973
  }>;
891
974
  reason: z.ZodOptional<z.ZodEnum<{
892
975
  product_not_found: "product_not_found";
@@ -894,6 +977,8 @@ export declare const bulkUpdateProductsResponseSchema: z.ZodObject<{
894
977
  validation_failed: "validation_failed";
895
978
  permission_denied: "permission_denied";
896
979
  concurrent_modification: "concurrent_modification";
980
+ scope_invalid: "scope_invalid";
981
+ completeness_gate: "completeness_gate";
897
982
  }>>;
898
983
  details: z.ZodOptional<z.ZodObject<{
899
984
  code: z.ZodOptional<z.ZodString>;
@@ -923,6 +1008,12 @@ export type BulkOperationStatus = z.infer<typeof bulkOperationStatusSchema>;
923
1008
  /**
924
1009
  * One timestamped lifecycle event in a bulk operation's log trail, surfaced
925
1010
  * in the bulk-operations detail view next to the per-element results.
1011
+ *
1012
+ * The trail is stored and read later by administrators in languages of their
1013
+ * own, so an entry carries `messageKey` — a key in `catalog`'s bundle and the
1014
+ * params that fill it — for its reader to translate, and `message`, the
1015
+ * finished English sentence, for a reader that cannot resolve the key. Entries
1016
+ * written before `messageKey` existed carry only `message`.
926
1017
  */
927
1018
  export declare const bulkOperationLogEntrySchema: z.ZodObject<{
928
1019
  ts: z.ZodString;
@@ -932,6 +1023,10 @@ export declare const bulkOperationLogEntrySchema: z.ZodObject<{
932
1023
  warn: "warn";
933
1024
  }>;
934
1025
  message: z.ZodString;
1026
+ messageKey: z.ZodOptional<z.ZodObject<{
1027
+ key: z.ZodString;
1028
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
1029
+ }, z.core.$strip>>;
935
1030
  }, z.core.$strip>;
936
1031
  export type BulkOperationLogEntry = z.infer<typeof bulkOperationLogEntrySchema>;
937
1032
  /**
@@ -966,8 +1061,8 @@ export declare const bulkOperationSchema: z.ZodObject<{
966
1061
  productId: z.ZodString;
967
1062
  status: z.ZodEnum<{
968
1063
  failed: "failed";
969
- succeeded: "succeeded";
970
1064
  skipped: "skipped";
1065
+ succeeded: "succeeded";
971
1066
  }>;
972
1067
  reason: z.ZodOptional<z.ZodEnum<{
973
1068
  product_not_found: "product_not_found";
@@ -975,6 +1070,8 @@ export declare const bulkOperationSchema: z.ZodObject<{
975
1070
  validation_failed: "validation_failed";
976
1071
  permission_denied: "permission_denied";
977
1072
  concurrent_modification: "concurrent_modification";
1073
+ scope_invalid: "scope_invalid";
1074
+ completeness_gate: "completeness_gate";
978
1075
  }>>;
979
1076
  details: z.ZodOptional<z.ZodObject<{
980
1077
  code: z.ZodOptional<z.ZodString>;
@@ -991,6 +1088,10 @@ export declare const bulkOperationSchema: z.ZodObject<{
991
1088
  warn: "warn";
992
1089
  }>;
993
1090
  message: z.ZodString;
1091
+ messageKey: z.ZodOptional<z.ZodObject<{
1092
+ key: z.ZodString;
1093
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
1094
+ }, z.core.$strip>>;
994
1095
  }, z.core.$strip>>>;
995
1096
  error: z.ZodNullable<z.ZodString>;
996
1097
  createdAt: z.ZodString;
@@ -1042,8 +1143,8 @@ export declare const bulkOperationsListResponseSchema: z.ZodObject<{
1042
1143
  productId: z.ZodString;
1043
1144
  status: z.ZodEnum<{
1044
1145
  failed: "failed";
1045
- succeeded: "succeeded";
1046
1146
  skipped: "skipped";
1147
+ succeeded: "succeeded";
1047
1148
  }>;
1048
1149
  reason: z.ZodOptional<z.ZodEnum<{
1049
1150
  product_not_found: "product_not_found";
@@ -1051,6 +1152,8 @@ export declare const bulkOperationsListResponseSchema: z.ZodObject<{
1051
1152
  validation_failed: "validation_failed";
1052
1153
  permission_denied: "permission_denied";
1053
1154
  concurrent_modification: "concurrent_modification";
1155
+ scope_invalid: "scope_invalid";
1156
+ completeness_gate: "completeness_gate";
1054
1157
  }>>;
1055
1158
  details: z.ZodOptional<z.ZodObject<{
1056
1159
  code: z.ZodOptional<z.ZodString>;
@@ -1067,6 +1170,10 @@ export declare const bulkOperationsListResponseSchema: z.ZodObject<{
1067
1170
  warn: "warn";
1068
1171
  }>;
1069
1172
  message: z.ZodString;
1173
+ messageKey: z.ZodOptional<z.ZodObject<{
1174
+ key: z.ZodString;
1175
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
1176
+ }, z.core.$strip>>;
1070
1177
  }, z.core.$strip>>>;
1071
1178
  error: z.ZodNullable<z.ZodString>;
1072
1179
  createdAt: z.ZodString;
@@ -1108,8 +1215,8 @@ export declare const bulkOperationResponseSchema: z.ZodObject<{
1108
1215
  productId: z.ZodString;
1109
1216
  status: z.ZodEnum<{
1110
1217
  failed: "failed";
1111
- succeeded: "succeeded";
1112
1218
  skipped: "skipped";
1219
+ succeeded: "succeeded";
1113
1220
  }>;
1114
1221
  reason: z.ZodOptional<z.ZodEnum<{
1115
1222
  product_not_found: "product_not_found";
@@ -1117,6 +1224,8 @@ export declare const bulkOperationResponseSchema: z.ZodObject<{
1117
1224
  validation_failed: "validation_failed";
1118
1225
  permission_denied: "permission_denied";
1119
1226
  concurrent_modification: "concurrent_modification";
1227
+ scope_invalid: "scope_invalid";
1228
+ completeness_gate: "completeness_gate";
1120
1229
  }>>;
1121
1230
  details: z.ZodOptional<z.ZodObject<{
1122
1231
  code: z.ZodOptional<z.ZodString>;
@@ -1133,6 +1242,10 @@ export declare const bulkOperationResponseSchema: z.ZodObject<{
1133
1242
  warn: "warn";
1134
1243
  }>;
1135
1244
  message: z.ZodString;
1245
+ messageKey: z.ZodOptional<z.ZodObject<{
1246
+ key: z.ZodString;
1247
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
1248
+ }, z.core.$strip>>;
1136
1249
  }, z.core.$strip>>>;
1137
1250
  error: z.ZodNullable<z.ZodString>;
1138
1251
  createdAt: z.ZodString;
@@ -1210,15 +1323,25 @@ export declare const numericKindSchema: z.ZodEnum<{
1210
1323
  price: "price";
1211
1324
  }>;
1212
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;
1213
1335
  export declare const createAttributeRequestSchema: z.ZodObject<{
1214
1336
  key: z.ZodString;
1215
1337
  label: z.ZodRecord<z.ZodString, z.ZodString>;
1216
1338
  type: z.ZodOptional<z.ZodEnum<{
1217
1339
  number: "number";
1218
1340
  input: "input";
1219
- select: "select";
1220
- price: "price";
1221
1341
  multiselect: "multiselect";
1342
+ price: "price";
1343
+ select: "select";
1344
+ page_builder: "page_builder";
1222
1345
  slider: "slider";
1223
1346
  }>>;
1224
1347
  numericKind: z.ZodOptional<z.ZodEnum<{
@@ -1231,9 +1354,10 @@ export declare const createAttributeRequestSchema: z.ZodObject<{
1231
1354
  boolean: "boolean";
1232
1355
  date: "date";
1233
1356
  enum: "enum";
1234
- select: "select";
1235
- price: "price";
1236
1357
  multiselect: "multiselect";
1358
+ price: "price";
1359
+ select: "select";
1360
+ page_builder: "page_builder";
1237
1361
  }>>;
1238
1362
  enumValues: z.ZodOptional<z.ZodArray<z.ZodString>>;
1239
1363
  isSearchable: z.ZodBoolean;
@@ -1247,8 +1371,7 @@ export declare const createAttributeRequestSchema: z.ZodObject<{
1247
1371
  isPriceRule: z.ZodOptional<z.ZodBoolean>;
1248
1372
  filterPosition: z.ZodOptional<z.ZodNumber>;
1249
1373
  isVisibleOnProductPage: z.ZodOptional<z.ZodBoolean>;
1250
- channelScoped: z.ZodOptional<z.ZodBoolean>;
1251
- languageScoped: z.ZodOptional<z.ZodBoolean>;
1374
+ scopable: z.ZodOptional<z.ZodBoolean>;
1252
1375
  massEditable: z.ZodOptional<z.ZodBoolean>;
1253
1376
  quickSearchable: z.ZodOptional<z.ZodBoolean>;
1254
1377
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1265,9 +1388,10 @@ export declare const updateAttributeRequestSchema: z.ZodObject<{
1265
1388
  type: z.ZodOptional<z.ZodEnum<{
1266
1389
  number: "number";
1267
1390
  input: "input";
1268
- select: "select";
1269
- price: "price";
1270
1391
  multiselect: "multiselect";
1392
+ price: "price";
1393
+ select: "select";
1394
+ page_builder: "page_builder";
1271
1395
  slider: "slider";
1272
1396
  }>>;
1273
1397
  numericKind: z.ZodOptional<z.ZodEnum<{
@@ -1286,8 +1410,7 @@ export declare const updateAttributeRequestSchema: z.ZodObject<{
1286
1410
  isPriceRule: z.ZodOptional<z.ZodBoolean>;
1287
1411
  filterPosition: z.ZodOptional<z.ZodNumber>;
1288
1412
  isVisibleOnProductPage: z.ZodOptional<z.ZodBoolean>;
1289
- channelScoped: z.ZodOptional<z.ZodBoolean>;
1290
- languageScoped: z.ZodOptional<z.ZodBoolean>;
1413
+ scopable: z.ZodOptional<z.ZodBoolean>;
1291
1414
  massEditable: z.ZodOptional<z.ZodBoolean>;
1292
1415
  quickSearchable: z.ZodOptional<z.ZodBoolean>;
1293
1416
  }, z.core.$strict>;
@@ -1308,24 +1431,26 @@ export declare const adminAttributeResponseSchema: z.ZodObject<{
1308
1431
  type: z.ZodEnum<{
1309
1432
  number: "number";
1310
1433
  input: "input";
1311
- select: "select";
1312
- price: "price";
1313
1434
  multiselect: "multiselect";
1435
+ price: "price";
1436
+ select: "select";
1437
+ page_builder: "page_builder";
1314
1438
  slider: "slider";
1315
1439
  }>;
1316
- numericKind: z.ZodOptional<z.ZodEnum<{
1440
+ numericKind: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1317
1441
  number: "number";
1318
1442
  price: "price";
1319
- }>>;
1443
+ }>>>;
1320
1444
  valueType: z.ZodEnum<{
1321
1445
  string: "string";
1322
1446
  number: "number";
1323
1447
  boolean: "boolean";
1324
1448
  date: "date";
1325
1449
  enum: "enum";
1326
- select: "select";
1327
- price: "price";
1328
1450
  multiselect: "multiselect";
1451
+ price: "price";
1452
+ select: "select";
1453
+ page_builder: "page_builder";
1329
1454
  }>;
1330
1455
  enumValues: z.ZodNullable<z.ZodArray<z.ZodString>>;
1331
1456
  isSearchable: z.ZodBoolean;
@@ -1341,6 +1466,12 @@ export declare const adminAttributeResponseSchema: z.ZodObject<{
1341
1466
  massEditable: z.ZodBoolean;
1342
1467
  quickSearchable: z.ZodBoolean;
1343
1468
  customFieldDefinitionId: z.ZodString;
1469
+ scopable: z.ZodOptional<z.ZodBoolean>;
1470
+ scopeLevels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1471
+ G: "G";
1472
+ C: "C";
1473
+ CL: "CL";
1474
+ }>>>;
1344
1475
  createdAt: z.ZodString;
1345
1476
  updatedAt: z.ZodString;
1346
1477
  }, z.core.$strip>;
@@ -1364,14 +1495,21 @@ export declare const updateCategoryRequestSchema: z.ZodObject<{
1364
1495
  }, z.core.$strict>;
1365
1496
  export type UpdateCategoryRequest = z.infer<typeof updateCategoryRequestSchema>;
1366
1497
  /**
1367
- * The ceiling on one category's stored content envelope, in UTF-8 bytes of its
1368
- * JSON serialisation — every language together.
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.
1369
1501
  *
1370
1502
  * One mebibyte, because that is what a CMS page is held to today: the CMS
1371
1503
  * declares no limit of its own and is bounded by the HTTP layer's default body
1372
1504
  * limit, which is this number. Stated here so the bound also holds for a
1373
1505
  * caller that does not arrive over HTTP.
1374
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
+ */
1375
1513
  export declare const CATEGORY_CONTENT_MAX_BYTES = 1048576;
1376
1514
  /**
1377
1515
  * The content an operator authors for a category's storefront page: one Page
@@ -1419,6 +1557,85 @@ export declare const categoryPageContentSchema: z.ZodObject<{
1419
1557
  content: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1420
1558
  }, z.core.$strip>;
1421
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>;
1422
1639
  /**
1423
1640
  * The orderings the storefront listing accepts.
1424
1641
  *
@@ -1439,8 +1656,33 @@ export declare const productListSortSchema: z.ZodEnum<{
1439
1656
  export type ProductListSort = z.infer<typeof productListSortSchema>;
1440
1657
  /** The two orderings feature 086 added, as a narrowing a consumer can reuse. */
1441
1658
  export declare function isPriceSort(sort: ProductListSort | undefined): sort is 'price' | '-price';
1659
+ /**
1660
+ * Issue #590 — the most products one `GET /api/v1/catalog/products?ids=` names.
1661
+ * A hand-picked set (a blog post's related products) is a strip, not a
1662
+ * catalogue: two dozen is twice the widest strip any surface renders, and it
1663
+ * keeps the one batched price resolution behind the read small.
1664
+ */
1665
+ export declare const PRODUCT_LIST_MAX_IDS = 24;
1666
+ /**
1667
+ * Issue #590 — `?ids=` on the public listing: a comma-separated list of product
1668
+ * ids, trimmed and de-duplicated (first occurrence wins), at least one and at
1669
+ * most {@link PRODUCT_LIST_MAX_IDS}. A value that is not a uuid is refused
1670
+ * (`400 VALIDATION_FAILED`) rather than dropped, because a caller naming
1671
+ * products by id is a program, and silently answering fewer products than it
1672
+ * asked for would hide its bug.
1673
+ *
1674
+ * The listing answers **the subset of those products this viewer may see** —
1675
+ * channel membership, status, window and audience are the listing's own
1676
+ * availability condition — each priced exactly as any listing card is: one
1677
+ * batched resolution for the viewer (`resolveListingPriceDetails`). An id that
1678
+ * is unknown, deleted, out of channel or hidden from the viewer is simply not
1679
+ * in the answer. The order is the listing's, not the list's; a caller that
1680
+ * cares about its own order re-orders by id.
1681
+ */
1682
+ export declare const productListIdsSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodString>>;
1442
1683
  export declare const productListQuerySchema: z.ZodObject<{
1443
1684
  q: z.ZodOptional<z.ZodString>;
1685
+ ids: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodString>>>;
1444
1686
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1445
1687
  cursor: z.ZodOptional<z.ZodString>;
1446
1688
  sort: z.ZodOptional<z.ZodEnum<{
@@ -1462,8 +1704,8 @@ export type ProductListQuery = z.infer<typeof productListQuerySchema>;
1462
1704
  *
1463
1705
  * It rides on the listing response because the storefront has to decide whether
1464
1706
  * to *render* the price controls, and the answer depends on the viewer and the
1465
- * channel: a non-public channel publishes no prices, and
1466
- * `pricing.unauthenticated_display_mode = none` hides them until login. A
1707
+ * channel: `pricing.unauthenticated_display_mode = none` hides prices until
1708
+ * login, on one channel or on all of them. A
1467
1709
  * storefront that guessed would guess wrong on exactly the deployments that
1468
1710
  * care, and a control that offers an ordering the API refuses is a worse defect
1469
1711
  * than no control.
@@ -1507,12 +1749,18 @@ export declare const attributeSetAssignedAttributeSchema: z.ZodObject<{
1507
1749
  boolean: "boolean";
1508
1750
  date: "date";
1509
1751
  enum: "enum";
1510
- select: "select";
1511
- price: "price";
1512
1752
  multiselect: "multiselect";
1753
+ price: "price";
1754
+ select: "select";
1755
+ page_builder: "page_builder";
1513
1756
  }>;
1514
1757
  position: z.ZodNumber;
1515
- languageScoped: z.ZodBoolean;
1758
+ scopable: z.ZodBoolean;
1759
+ scopeLevels: z.ZodArray<z.ZodEnum<{
1760
+ G: "G";
1761
+ C: "C";
1762
+ CL: "CL";
1763
+ }>>;
1516
1764
  }, z.core.$strip>;
1517
1765
  export type AttributeSetAssignedAttribute = z.infer<typeof attributeSetAssignedAttributeSchema>;
1518
1766
  export declare const attributeSetDetailSchema: z.ZodObject<{
@@ -1535,12 +1783,18 @@ export declare const attributeSetDetailSchema: z.ZodObject<{
1535
1783
  boolean: "boolean";
1536
1784
  date: "date";
1537
1785
  enum: "enum";
1538
- select: "select";
1539
- price: "price";
1540
1786
  multiselect: "multiselect";
1787
+ price: "price";
1788
+ select: "select";
1789
+ page_builder: "page_builder";
1541
1790
  }>;
1542
1791
  position: z.ZodNumber;
1543
- languageScoped: z.ZodBoolean;
1792
+ scopable: z.ZodBoolean;
1793
+ scopeLevels: z.ZodArray<z.ZodEnum<{
1794
+ G: "G";
1795
+ C: "C";
1796
+ CL: "CL";
1797
+ }>>;
1544
1798
  }, z.core.$strip>>;
1545
1799
  }, z.core.$strip>;
1546
1800
  export type AttributeSetDetail = z.infer<typeof attributeSetDetailSchema>;
@@ -1570,6 +1824,8 @@ export declare const galleryLabelSchema: z.ZodEnum<{
1570
1824
  thumbnail: "thumbnail";
1571
1825
  }>;
1572
1826
  export type GalleryLabel = z.infer<typeof galleryLabelSchema>;
1827
+ /** Feature 163 / 174 — the longest alt text of one image at one scope. */
1828
+ export declare const GALLERY_ALT_TEXT_MAX = 255;
1573
1829
  export declare const galleryItemSchema: z.ZodObject<{
1574
1830
  id: z.ZodString;
1575
1831
  productId: z.ZodString;
@@ -1580,6 +1836,8 @@ export declare const galleryItemSchema: z.ZodObject<{
1580
1836
  small_image: "small_image";
1581
1837
  thumbnail: "thumbnail";
1582
1838
  }>>;
1839
+ altText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1840
+ hidden: z.ZodOptional<z.ZodBoolean>;
1583
1841
  createdAt: z.ZodString;
1584
1842
  updatedAt: z.ZodString;
1585
1843
  }, z.core.$strip>;
@@ -1594,13 +1852,13 @@ export declare const createGalleryItemRequestSchema: z.ZodObject<{
1594
1852
  }>>>;
1595
1853
  }, z.core.$strict>;
1596
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
+ */
1597
1860
  export declare const updateGalleryItemRequestSchema: z.ZodObject<{
1598
1861
  position: z.ZodOptional<z.ZodNumber>;
1599
- labels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1600
- base_image: "base_image";
1601
- small_image: "small_image";
1602
- thumbnail: "thumbnail";
1603
- }>>>;
1604
1862
  }, z.core.$strict>;
1605
1863
  export type UpdateGalleryItemRequest = z.infer<typeof updateGalleryItemRequestSchema>;
1606
1864
  export declare const reorderGalleryRequestSchema: z.ZodObject<{
@@ -1629,6 +1887,10 @@ export declare const updateAttachmentTypeRequestSchema: z.ZodObject<{
1629
1887
  position: z.ZodOptional<z.ZodNumber>;
1630
1888
  }, z.core.$strict>;
1631
1889
  export type UpdateAttachmentTypeRequest = z.infer<typeof updateAttachmentTypeRequestSchema>;
1890
+ /** Feature 163 / 174 — the longest attachment description at a Channel or Channel × language scope. */
1891
+ export declare const ATTACHMENT_DESCRIPTION_TRANSLATION_MAX = 4000;
1892
+ /** Feature 163 / 174 — an attachment name at any scope, as long as the Global one. */
1893
+ export declare const ATTACHMENT_NAME_MAX = 160;
1632
1894
  export declare const productAttachmentSchema: z.ZodObject<{
1633
1895
  id: z.ZodString;
1634
1896
  productId: z.ZodString;
@@ -1637,6 +1899,7 @@ export declare const productAttachmentSchema: z.ZodObject<{
1637
1899
  name: z.ZodString;
1638
1900
  description: z.ZodNullable<z.ZodString>;
1639
1901
  position: z.ZodNumber;
1902
+ hidden: z.ZodOptional<z.ZodBoolean>;
1640
1903
  createdAt: z.ZodString;
1641
1904
  updatedAt: z.ZodString;
1642
1905
  }, z.core.$strip>;
@@ -1649,13 +1912,18 @@ export declare const createAttachmentRequestSchema: z.ZodObject<{
1649
1912
  position: z.ZodOptional<z.ZodNumber>;
1650
1913
  }, z.core.$strict>;
1651
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
+ */
1652
1920
  export declare const updateAttachmentRequestSchema: z.ZodObject<{
1653
1921
  attachmentTypeId: z.ZodOptional<z.ZodString>;
1654
- name: z.ZodOptional<z.ZodString>;
1655
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1656
1922
  position: z.ZodOptional<z.ZodNumber>;
1657
1923
  }, z.core.$strict>;
1658
1924
  export type UpdateAttachmentRequest = z.infer<typeof updateAttachmentRequestSchema>;
1925
+ /** The longest packaging-unit name at any scope. */
1926
+ export declare const PACKAGING_UNIT_NAME_MAX = 160;
1659
1927
  /**
1660
1928
  * A named ordering unit attached to a product (e.g. "Paleta" = 480 pieces).
1661
1929
  * Managed in the Inventory section of the admin product card; surfaced on the
@@ -1681,8 +1949,12 @@ export declare const createPackagingUnitRequestSchema: z.ZodObject<{
1681
1949
  minOrderUnits: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1682
1950
  }, z.core.$strict>;
1683
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
+ */
1684
1957
  export declare const updatePackagingUnitRequestSchema: z.ZodObject<{
1685
- name: z.ZodOptional<z.ZodString>;
1686
1958
  baseQuantity: z.ZodOptional<z.ZodNumber>;
1687
1959
  isDefault: z.ZodOptional<z.ZodBoolean>;
1688
1960
  position: z.ZodOptional<z.ZodNumber>;
@@ -1884,9 +2156,13 @@ export interface CatalogProductRecord {
1884
2156
  slug: string;
1885
2157
  type: ProductType;
1886
2158
  status: ProductStatus;
1887
- /** Per-locale JSONB. Resolve with the caller's language chain. */
1888
- name: Record<string, string>;
1889
- description: Record<string, string>;
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;
1890
2166
  /** Per-product override of the global stock mode; `null` ⇒ inherit. */
1891
2167
  stockMode: StockMode | null;
1892
2168
  visibility: ProductVisibility;
@@ -1910,6 +2186,13 @@ export interface CatalogProductRecord {
1910
2186
  minOrderQuantity: number | null;
1911
2187
  /** Feature 155 — the product's current flag; order lines record their own copy at placement. */
1912
2188
  returnable: boolean;
2189
+ /**
2190
+ * Feature 163 — the global publication window, inclusive at both ends; `null` =
2191
+ * open on that side. Optional for good, so a record literal built without it keeps
2192
+ * compiling; the channel-effective window comes from `catalogProductAvailabilityPort`.
2193
+ */
2194
+ publishFrom?: Date | null;
2195
+ publishUntil?: Date | null;
1913
2196
  }
1914
2197
  /**
1915
2198
  * Who is asking for a product — the single input every enforcing read path
@@ -2205,7 +2488,13 @@ export interface CatalogProductLookupOptions {
2205
2488
  export interface CatalogProductReadPort {
2206
2489
  findById(id: string, options?: CatalogProductLookupOptions): Promise<CatalogProductRecord | null>;
2207
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
+ */
2208
2496
  findBySku(sku: string, options?: CatalogProductLookupOptions): Promise<CatalogProductRecord | null>;
2497
+ /** At most one product per SKU, chosen as {@link findBySku} chooses it. */
2209
2498
  findBySkus(skus: readonly string[], options?: CatalogProductLookupOptions): Promise<CatalogProductRecord[]>;
2210
2499
  /** `count === ids.length` existence check, without loading the rows. */
2211
2500
  countByIds(ids: readonly string[]): Promise<number>;
@@ -2223,6 +2512,10 @@ export interface CatalogProductReadPort {
2223
2512
  findPricingRefsByIds(ids: readonly string[]): Promise<CatalogProductPricingRef[]>;
2224
2513
  /** Variants of the given parent products, ordered by sku. */
2225
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
+ */
2226
2519
  findVariantsBySkus(skus: readonly string[]): Promise<CatalogProductVariantRecord[]>;
2227
2520
  /** A variant, but only if it belongs to that parent. */
2228
2521
  findVariantInProduct(parentProductId: string, variantId: string): Promise<CatalogProductVariantRecord | null>;
@@ -2266,7 +2559,7 @@ export interface CatalogProductReadPort {
2266
2559
  /**
2267
2560
  * Feature 161 (G15, `specs/161-price-book-editor/research.md` R14) — one page
2268
2561
  * of the products a caller's **membership seam** names, ordered by the stored
2269
- * admin name key of the admin language (`en`, `pl`; any other reads `en`),
2562
+ * admin name key (feature 174: one key over the Global name, for every admin language),
2270
2563
  * then SKU, then id, and how many there are. `search` narrows to the products
2271
2564
  * whose stored search key (folded shown name and SKU) or one of whose
2272
2565
  * variants' SKU contains it — case- and accent-folded, taken literally. How
@@ -2300,8 +2593,6 @@ export interface CatalogProductMembership {
2300
2593
  export interface CatalogAdminNamePageQuery {
2301
2594
  readonly membership: CatalogProductMembership;
2302
2595
  readonly search?: string | null;
2303
- /** A language tag (`pl`, `pl-PL`); its primary subtag picks the key, `en` when it has none. */
2304
- readonly language: string | null;
2305
2596
  readonly offset: number;
2306
2597
  readonly limit: number;
2307
2598
  /** Default `true`. Without a search, `false` skips the count. */
@@ -2464,10 +2755,52 @@ export interface ProductImportRow {
2464
2755
  sku: string;
2465
2756
  status?: ProductStatus;
2466
2757
  visibility?: ProductVisibility;
2467
- /** Per-locale, merged into the stored JSONB rather than replacing it. */
2468
- name?: Record<string, string>;
2469
- description?: Record<string, string>;
2758
+ /**
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`.
2764
+ */
2765
+ cells?: ProductImportCell[];
2766
+ }
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;
2470
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;
2778
+ }
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. */
2793
+ columns: Array<{
2794
+ field: FieldPath;
2795
+ channelId: string;
2796
+ channelCode: string;
2797
+ languageCode: string | null;
2798
+ }>;
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>>;
2801
+ }
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;
2471
2804
  /**
2472
2805
  * Container name: `catalogBulkImportPort`. Owner: `catalog`.
2473
2806
  *
@@ -2483,7 +2816,30 @@ export interface ProductImportRow {
2483
2816
  */
2484
2817
  export interface CatalogBulkImportPort {
2485
2818
  importCategories(rows: readonly CategoryImportRow[]): Promise<BulkImportReport>;
2486
- importProducts(rows: readonly ProductImportRow[]): Promise<BulkImportReport>;
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[]>;
2487
2843
  }
2488
2844
  export interface CatalogAttributeOptionView {
2489
2845
  /** `custom_field_options` id. */
@@ -2525,8 +2881,9 @@ export interface CatalogAttributeView {
2525
2881
  isPriceRule: boolean;
2526
2882
  filterPosition: number;
2527
2883
  isVisibleOnProductPage: boolean;
2528
- channelScoped: boolean;
2529
- languageScoped: boolean;
2884
+ /** Feature 174 (R15) — the scope flag; {@link scopeLevels} is what it derives with the value type. */
2885
+ scopable: boolean;
2886
+ scopeLevels: readonly ScopeLevel[];
2530
2887
  massEditable: boolean;
2531
2888
  createdAt: Date;
2532
2889
  updatedAt: Date;
@@ -2585,13 +2942,23 @@ export interface CatalogQuickSearchParams {
2585
2942
  * See {@link CatalogQuickSearchPort} for what it restricts.
2586
2943
  */
2587
2944
  organizationId: string;
2945
+ /**
2946
+ * Feature 163 — the request's language tag (its first `Accept-Language`
2947
+ * pick). Resolved against the channel's own languages by
2948
+ * `resolveScopeLanguage`; absent means the channel's default language. A
2949
+ * product switched off at (channel, that language) is not a hit.
2950
+ */
2951
+ languageCode?: string | undefined;
2588
2952
  }
2589
2953
  export interface CatalogQuickSearchHit {
2590
2954
  productId: string;
2591
2955
  sku: string;
2592
2956
  slug: string;
2593
- /** Per-locale JSONB as stored — the caller picks its own language. */
2594
- name: Record<string, string>;
2957
+ /**
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.
2960
+ */
2961
+ name: string;
2595
2962
  status: ProductStatus;
2596
2963
  matchedOn: CatalogQuickSearchField[];
2597
2964
  }
@@ -2678,8 +3045,7 @@ export declare function isSystemAttributeKey(key: string): key is SystemAttribut
2678
3045
  * global-only).
2679
3046
  */
2680
3047
  export declare function getAttributeScope(attributeKey: string, productAttributeRow?: {
2681
- channelScoped: boolean;
2682
- languageScoped: boolean;
3048
+ scopable: boolean;
2683
3049
  } | null): AttributeScope;
2684
3050
  /** Optional metadata attaching an audit entry to an admin mutation. */
2685
3051
  export interface CatalogAdminAuditContext {
@@ -2750,33 +3116,6 @@ export interface CatalogProductWritePort {
2750
3116
  updateVariant(parentProductId: string, variantId: string, req: UpdateVariantRequest): Promise<CatalogProductVariantRecord>;
2751
3117
  deleteVariant(parentProductId: string, variantId: string): Promise<void>;
2752
3118
  }
2753
- /**
2754
- * One channel/language override upsert — feature 022 / product-scope-overrides.
2755
- * Used by PIM importers (feature 089) to land channel-locale-scoped names and
2756
- * descriptions without reaching `product_value_overrides` directly (Principle XII).
2757
- */
2758
- export interface CatalogProductValueOverrideUpsert {
2759
- attributeKey: string;
2760
- channelId: string;
2761
- languageCode: string | null;
2762
- value: {
2763
- v: unknown;
2764
- };
2765
- }
2766
- /**
2767
- * Container name: `catalogProductValueOverrideWritePort`. Owner: `catalog`.
2768
- *
2769
- * Bulk upsert of per-channel / per-language product attribute overrides. The
2770
- * only consumer today is `pim_unopim` (feature 089 / FR-023); the admin SPA
2771
- * still goes through `ProductOverridesService` inside catalog's own routes.
2772
- *
2773
- * **Owner off:** resolving this port throws `ModuleDisabledError` (503).
2774
- */
2775
- export interface CatalogProductValueOverrideWritePort {
2776
- applyBulk(productId: string, input: {
2777
- upserts: readonly CatalogProductValueOverrideUpsert[];
2778
- }): Promise<void>;
2779
- }
2780
3119
  /** The patch `updateCategory` accepts. Absent keys are left alone. */
2781
3120
  export interface UpdateCategoryInput {
2782
3121
  parentCategoryId?: string | null;
@@ -2918,8 +3257,16 @@ export interface CatalogGalleryPort {
2918
3257
  * because both consumers render them identically (no image) and telling them
2919
3258
  * apart would need exactly the product-existence probe that makes `list`
2920
3259
  * unusable for a batch.
3260
+ *
3261
+ * Feature 163 (FR-076, owner decision MED-1 = A) — `channelId` is the channel the
3262
+ * caller serves (a feed's channel): an item hidden there is left out. `null` names no
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.
2921
3268
  */
2922
- listForProducts(productIds: readonly string[]): Promise<CatalogGalleryBatchItem[]>;
3269
+ listForProducts(productIds: readonly string[], channelId: string | null, languageCode?: string | null): Promise<CatalogGalleryBatchItem[]>;
2923
3270
  /**
2924
3271
  * The `base_image` url of each of a batch of products — `base_image` only,
2925
3272
  * with no fallback to `thumbnail` or to the first item by position.
@@ -2935,8 +3282,17 @@ export interface CatalogGalleryPort {
2935
3282
  * `gallery_items` plus the asset read port it already holds, so a consumer
2936
3283
  * gets the url without joining `assets_library`'s table itself — which is the
2937
3284
  * third of the three reaches this method retires (feature 075 / D-87).
3285
+ *
3286
+ * Feature 163 (FR-076, owner decision MED-1 = A) — the base image **in `channelId`**
3287
+ * (the request's resolved channel): the channel's own holder of the role when it has
3288
+ * one, else the global holder; `null` when that holder is hidden there. `null` names
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}.
2938
3294
  */
2939
- baseImageUrls(productIds: readonly string[]): Promise<Map<string, string | null>>;
3295
+ baseImageUrls(productIds: readonly string[], channelId: string | null, languageCode?: string | null): Promise<Map<string, string | null>>;
2940
3296
  create(productId: string, req: CreateGalleryItemRequest, options: CatalogGalleryWriteOptions): Promise<GalleryItem>;
2941
3297
  delete(productId: string, itemId: string): Promise<void>;
2942
3298
  reorder(productId: string, orderedIds: string[]): Promise<void>;
@@ -3163,6 +3519,19 @@ export interface CatalogSellableProductQuery {
3163
3519
  afterId?: string | null;
3164
3520
  /** Page size. Defaults to 500, the size the feed pipeline already walks in. */
3165
3521
  limit?: number;
3522
+ /**
3523
+ * Feature 163 — where the products are sold: the feed's sales channel and
3524
+ * its language tag (resolved by `catalog` against the channel's own
3525
+ * languages; absent or unknown = the channel's default). When given, the
3526
+ * floor is **effective availability** there for the anonymous audience, now
3527
+ * (`isProductEffectivelyAvailable`: the scoped status at (channel, language),
3528
+ * the publication window and the channel's audience rule) instead of the
3529
+ * global `status` and audience columns — still not overridable by `filter`.
3530
+ */
3531
+ scope?: {
3532
+ channelId: string;
3533
+ languageTag?: string | null | undefined;
3534
+ } | undefined;
3166
3535
  }
3167
3536
  /**
3168
3537
  * Container name: `catalogProductFilterPort`. Owner: `catalog`.
@@ -3225,8 +3594,10 @@ export declare const ProductUpdatedEventV1Schema: z.ZodObject<{
3225
3594
  }, z.core.$strict>;
3226
3595
  export type ProductUpdatedEventV1 = z.infer<typeof ProductUpdatedEventV1Schema>;
3227
3596
  /**
3228
- * Payload of `product.archived.v1` — a product's status moved to `inactive`.
3229
- * Emitted beside the `product.updated.v1` of the same write, after it.
3597
+ * Payload of `product.archived.v1` — the product was archived by the Archive action
3598
+ * (feature 163, FR-019; `POST …/products/:id/archive` or bulk `fields.archived`).
3599
+ * Emitted after the `product.updated.v1` `['archivedAt']` of the same action. A
3600
+ * status write never emits it: `inactive` is plain off.
3230
3601
  */
3231
3602
  export declare const ProductArchivedEventV1Schema: z.ZodObject<{
3232
3603
  productId: z.ZodString;