@endora-commerce/contracts 0.109.0 → 0.111.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 (385) hide show
  1. package/dist/accept-language.d.ts +31 -0
  2. package/dist/accept-language.js +64 -0
  3. package/dist/actor.d.ts +16 -0
  4. package/dist/addresses.d.ts +35 -0
  5. package/dist/addresses.js +8 -1
  6. package/dist/admin-actions.d.ts +2 -0
  7. package/dist/admin-actions.js +18 -0
  8. package/dist/admin-contributions.d.ts +99 -12
  9. package/dist/admin-contributions.js +36 -10
  10. package/dist/admin-roles.d.ts +17 -2
  11. package/dist/admin-users.d.ts +9 -0
  12. package/dist/admin.d.ts +114 -4
  13. package/dist/admin.js +98 -3
  14. package/dist/api-keys.d.ts +22 -0
  15. package/dist/api-keys.js +4 -0
  16. package/dist/assets-library.d.ts +45 -0
  17. package/dist/assets-library.js +20 -3
  18. package/dist/audit-logs.d.ts +12 -0
  19. package/dist/audit-logs.js +12 -0
  20. package/dist/auth.d.ts +9 -0
  21. package/dist/auth.js +9 -0
  22. package/dist/blog.d.ts +382 -22
  23. package/dist/blog.js +199 -17
  24. package/dist/carts.d.ts +423 -36
  25. package/dist/carts.js +150 -12
  26. package/dist/catalog.d.ts +379 -208
  27. package/dist/catalog.js +241 -163
  28. package/dist/cms-brand.d.ts +14 -14
  29. package/dist/cms.d.ts +71 -16
  30. package/dist/cms.js +15 -0
  31. package/dist/command-hooks.d.ts +301 -0
  32. package/dist/command-hooks.js +248 -0
  33. package/dist/common.d.ts +23 -6
  34. package/dist/common.js +25 -2
  35. package/dist/comparisons.d.ts +21 -14
  36. package/dist/comparisons.js +2 -1
  37. package/dist/credit-limits.d.ts +22 -0
  38. package/dist/credit-limits.js +35 -0
  39. package/dist/crm.d.ts +134 -78
  40. package/dist/crm.js +21 -5
  41. package/dist/custom-fields.d.ts +417 -49
  42. package/dist/custom-fields.js +142 -1
  43. package/dist/customer-accounts.d.ts +324 -22
  44. package/dist/customer-accounts.js +43 -0
  45. package/dist/customer-notifications.d.ts +143 -0
  46. package/dist/customer-notifications.js +41 -0
  47. package/dist/customers.d.ts +92 -73
  48. package/dist/customers.js +98 -10
  49. package/dist/dictionary.d.ts +53 -0
  50. package/dist/dictionary.js +25 -0
  51. package/dist/document-templates.d.ts +12 -12
  52. package/dist/email.d.ts +34 -0
  53. package/dist/email.js +6 -0
  54. package/dist/errors.d.ts +431 -3
  55. package/dist/errors.js +523 -3
  56. package/dist/forms-logic.d.ts +79 -0
  57. package/dist/forms-logic.fixtures.d.ts +52 -0
  58. package/dist/forms-logic.fixtures.js +610 -0
  59. package/dist/forms-logic.js +699 -0
  60. package/dist/forms.d.ts +9833 -0
  61. package/dist/forms.js +827 -0
  62. package/dist/i18n.d.ts +34 -0
  63. package/dist/i18n.js +15 -0
  64. package/dist/import-export.d.ts +180 -0
  65. package/dist/import-export.js +60 -0
  66. package/dist/index.d.ts +16 -1
  67. package/dist/index.js +30 -1
  68. package/dist/inventory.d.ts +9 -9
  69. package/dist/invoice-ledger.d.ts +13 -13
  70. package/dist/invoices.d.ts +126 -0
  71. package/dist/invoices.js +53 -0
  72. package/dist/line-bounds.d.ts +53 -0
  73. package/dist/line-bounds.js +65 -0
  74. package/dist/megamenu.d.ts +27 -27
  75. package/dist/mfa.d.ts +210 -4
  76. package/dist/mfa.js +136 -0
  77. package/dist/modules.d.ts +56 -8
  78. package/dist/modules.js +128 -3
  79. package/dist/money-decimal.d.ts +54 -0
  80. package/dist/money-decimal.js +95 -0
  81. package/dist/newsletter.d.ts +4 -4
  82. package/dist/orders.d.ts +246 -12
  83. package/dist/orders.js +140 -7
  84. package/dist/organization-hooks.d.ts +99 -0
  85. package/dist/organization-hooks.js +22 -0
  86. package/dist/organization-registry-lookup.d.ts +362 -0
  87. package/dist/organization-registry-lookup.js +196 -0
  88. package/dist/organization-roles.d.ts +341 -0
  89. package/dist/organization-roles.js +218 -0
  90. package/dist/organizations.d.ts +1074 -103
  91. package/dist/organizations.js +293 -28
  92. package/dist/page-builder-props.d.ts +56 -56
  93. package/dist/pim-connector.d.ts +7 -3
  94. package/dist/pim-connector.js +6 -2
  95. package/dist/pim-field-path.d.ts +5 -1
  96. package/dist/pim-field-path.js +37 -81
  97. package/dist/pim-locale-mapping.d.ts +131 -0
  98. package/dist/pim-locale-mapping.js +193 -0
  99. package/dist/price-books.d.ts +215 -63
  100. package/dist/price-books.js +47 -2
  101. package/dist/price-lists.d.ts +13 -10
  102. package/dist/product-feeds.d.ts +249 -100
  103. package/dist/product-feeds.js +46 -2
  104. package/dist/product-scope-model.d.ts +161 -0
  105. package/dist/product-scope-model.js +161 -0
  106. package/dist/product-scope-overrides.d.ts +0 -103
  107. package/dist/product-scope-overrides.js +0 -54
  108. package/dist/product-scoped-values.d.ts +2610 -0
  109. package/dist/product-scoped-values.js +425 -0
  110. package/dist/product-scopes.d.ts +199 -64
  111. package/dist/product-scopes.js +120 -23
  112. package/dist/product-tax-rates.d.ts +38 -0
  113. package/dist/product-tax-rates.js +45 -0
  114. package/dist/product-url-keys.d.ts +51 -45
  115. package/dist/product-url-keys.js +73 -39
  116. package/dist/product-value-resolver.d.ts +37 -60
  117. package/dist/product-value-resolver.js +36 -96
  118. package/dist/projects.d.ts +76 -28
  119. package/dist/projects.js +53 -9
  120. package/dist/promotions.d.ts +163 -11
  121. package/dist/promotions.js +23 -1
  122. package/dist/pwa.d.ts +41 -2
  123. package/dist/quick-order.d.ts +159 -9
  124. package/dist/quick-order.js +79 -4
  125. package/dist/quote-requests.d.ts +231 -17
  126. package/dist/quote-requests.js +111 -9
  127. package/dist/record-references.d.ts +15 -15
  128. package/dist/record-references.js +2 -3
  129. package/dist/record-rich-text.js +2 -1
  130. package/dist/returns.d.ts +214 -52
  131. package/dist/returns.js +143 -28
  132. package/dist/sales-channels.d.ts +34 -3
  133. package/dist/sales-channels.js +16 -1
  134. package/dist/saved-list-views.d.ts +28 -0
  135. package/dist/saved-list-views.js +14 -1
  136. package/dist/schema-extensions.d.ts +36 -0
  137. package/dist/schema-extensions.js +29 -0
  138. package/dist/scoped-write-encoding.d.ts +100 -0
  139. package/dist/scoped-write-encoding.js +135 -0
  140. package/dist/search.d.ts +18 -16
  141. package/dist/seo.d.ts +83 -30
  142. package/dist/seo.js +8 -1
  143. package/dist/settings.d.ts +173 -2
  144. package/dist/settings.js +53 -2
  145. package/dist/shopping-lists.d.ts +63 -4
  146. package/dist/shopping-lists.js +57 -3
  147. package/dist/storefront-cache-tags.d.ts +22 -0
  148. package/dist/storefront-cache-tags.js +12 -0
  149. package/dist/storefront-value-overrides.d.ts +18 -56
  150. package/dist/storefront-value-overrides.js +11 -86
  151. package/dist/tasks.d.ts +27 -27
  152. package/dist/taxes.d.ts +27 -0
  153. package/dist/taxes.js +4 -0
  154. package/dist/transactional-emails.d.ts +48 -22
  155. package/dist/webhooks.d.ts +75 -0
  156. package/dist/webhooks.js +24 -0
  157. package/package.json +5 -3
  158. package/dist/actor.d.ts.map +0 -1
  159. package/dist/actor.js.map +0 -1
  160. package/dist/addresses.d.ts.map +0 -1
  161. package/dist/addresses.js.map +0 -1
  162. package/dist/admin-actions.d.ts.map +0 -1
  163. package/dist/admin-actions.js.map +0 -1
  164. package/dist/admin-contributions.d.ts.map +0 -1
  165. package/dist/admin-contributions.js.map +0 -1
  166. package/dist/admin-feedback.d.ts.map +0 -1
  167. package/dist/admin-feedback.js.map +0 -1
  168. package/dist/admin-i18n.d.ts.map +0 -1
  169. package/dist/admin-i18n.js.map +0 -1
  170. package/dist/admin-name.d.ts.map +0 -1
  171. package/dist/admin-name.js.map +0 -1
  172. package/dist/admin-notifications.d.ts.map +0 -1
  173. package/dist/admin-notifications.js.map +0 -1
  174. package/dist/admin-preferences.d.ts.map +0 -1
  175. package/dist/admin-preferences.js.map +0 -1
  176. package/dist/admin-roles.d.ts.map +0 -1
  177. package/dist/admin-roles.js.map +0 -1
  178. package/dist/admin-search.d.ts.map +0 -1
  179. package/dist/admin-search.js.map +0 -1
  180. package/dist/admin-users.d.ts.map +0 -1
  181. package/dist/admin-users.js.map +0 -1
  182. package/dist/admin.d.ts.map +0 -1
  183. package/dist/admin.js.map +0 -1
  184. package/dist/analytics.d.ts.map +0 -1
  185. package/dist/analytics.js.map +0 -1
  186. package/dist/api-keys.d.ts.map +0 -1
  187. package/dist/api-keys.js.map +0 -1
  188. package/dist/assets-library.d.ts.map +0 -1
  189. package/dist/assets-library.js.map +0 -1
  190. package/dist/audit-logs.d.ts.map +0 -1
  191. package/dist/audit-logs.js.map +0 -1
  192. package/dist/auth.d.ts.map +0 -1
  193. package/dist/auth.js.map +0 -1
  194. package/dist/blog.d.ts.map +0 -1
  195. package/dist/blog.js.map +0 -1
  196. package/dist/capabilities.d.ts.map +0 -1
  197. package/dist/capabilities.js.map +0 -1
  198. package/dist/carts.d.ts.map +0 -1
  199. package/dist/carts.js.map +0 -1
  200. package/dist/catalog.d.ts.map +0 -1
  201. package/dist/catalog.js.map +0 -1
  202. package/dist/cms-brand.d.ts.map +0 -1
  203. package/dist/cms-brand.js.map +0 -1
  204. package/dist/cms-contact-form.d.ts.map +0 -1
  205. package/dist/cms-contact-form.js.map +0 -1
  206. package/dist/cms.d.ts.map +0 -1
  207. package/dist/cms.js.map +0 -1
  208. package/dist/common.d.ts.map +0 -1
  209. package/dist/common.js.map +0 -1
  210. package/dist/comparisons.d.ts.map +0 -1
  211. package/dist/comparisons.js.map +0 -1
  212. package/dist/credentials.d.ts.map +0 -1
  213. package/dist/credentials.js.map +0 -1
  214. package/dist/credit-limits.d.ts.map +0 -1
  215. package/dist/credit-limits.js.map +0 -1
  216. package/dist/crm-rich-text.d.ts.map +0 -1
  217. package/dist/crm-rich-text.js.map +0 -1
  218. package/dist/crm.d.ts.map +0 -1
  219. package/dist/crm.js.map +0 -1
  220. package/dist/currencies.d.ts.map +0 -1
  221. package/dist/currencies.js.map +0 -1
  222. package/dist/custom-fields.d.ts.map +0 -1
  223. package/dist/custom-fields.js.map +0 -1
  224. package/dist/customer-accounts.d.ts.map +0 -1
  225. package/dist/customer-accounts.js.map +0 -1
  226. package/dist/customers.d.ts.map +0 -1
  227. package/dist/customers.js.map +0 -1
  228. package/dist/dictionary.d.ts.map +0 -1
  229. package/dist/dictionary.js.map +0 -1
  230. package/dist/document-templates.d.ts.map +0 -1
  231. package/dist/document-templates.js.map +0 -1
  232. package/dist/document-values.d.ts.map +0 -1
  233. package/dist/document-values.js.map +0 -1
  234. package/dist/email-address.d.ts.map +0 -1
  235. package/dist/email-address.js.map +0 -1
  236. package/dist/email.d.ts.map +0 -1
  237. package/dist/email.js.map +0 -1
  238. package/dist/envelopes.d.ts.map +0 -1
  239. package/dist/envelopes.js.map +0 -1
  240. package/dist/environment-inputs.d.ts.map +0 -1
  241. package/dist/environment-inputs.js.map +0 -1
  242. package/dist/erp-connector.d.ts.map +0 -1
  243. package/dist/erp-connector.js.map +0 -1
  244. package/dist/errors.d.ts.map +0 -1
  245. package/dist/errors.js.map +0 -1
  246. package/dist/google-analytics.d.ts.map +0 -1
  247. package/dist/google-analytics.js.map +0 -1
  248. package/dist/google-tag-manager.d.ts.map +0 -1
  249. package/dist/google-tag-manager.js.map +0 -1
  250. package/dist/i18n.d.ts.map +0 -1
  251. package/dist/i18n.js.map +0 -1
  252. package/dist/import-export.d.ts.map +0 -1
  253. package/dist/import-export.js.map +0 -1
  254. package/dist/index.d.ts.map +0 -1
  255. package/dist/index.js.map +0 -1
  256. package/dist/inventory.d.ts.map +0 -1
  257. package/dist/inventory.js.map +0 -1
  258. package/dist/invoice-ledger.d.ts.map +0 -1
  259. package/dist/invoice-ledger.js.map +0 -1
  260. package/dist/invoices.d.ts.map +0 -1
  261. package/dist/invoices.js.map +0 -1
  262. package/dist/kernel.d.ts.map +0 -1
  263. package/dist/kernel.js.map +0 -1
  264. package/dist/languages.d.ts.map +0 -1
  265. package/dist/languages.js.map +0 -1
  266. package/dist/line-groups.d.ts.map +0 -1
  267. package/dist/line-groups.js.map +0 -1
  268. package/dist/linkedin-ads.d.ts.map +0 -1
  269. package/dist/linkedin-ads.js.map +0 -1
  270. package/dist/localized-name.d.ts.map +0 -1
  271. package/dist/localized-name.js.map +0 -1
  272. package/dist/megamenu.d.ts.map +0 -1
  273. package/dist/megamenu.js.map +0 -1
  274. package/dist/meta-ads.d.ts.map +0 -1
  275. package/dist/meta-ads.js.map +0 -1
  276. package/dist/mfa.d.ts.map +0 -1
  277. package/dist/mfa.js.map +0 -1
  278. package/dist/modules.d.ts.map +0 -1
  279. package/dist/modules.js.map +0 -1
  280. package/dist/money-decimal.d.ts.map +0 -1
  281. package/dist/money-decimal.js.map +0 -1
  282. package/dist/money-input.d.ts.map +0 -1
  283. package/dist/money-input.js.map +0 -1
  284. package/dist/newsletter.d.ts.map +0 -1
  285. package/dist/newsletter.js.map +0 -1
  286. package/dist/order-minimums.d.ts.map +0 -1
  287. package/dist/order-minimums.js.map +0 -1
  288. package/dist/orders.d.ts.map +0 -1
  289. package/dist/orders.js.map +0 -1
  290. package/dist/organizations.d.ts.map +0 -1
  291. package/dist/organizations.js.map +0 -1
  292. package/dist/page-builder-props.d.ts.map +0 -1
  293. package/dist/page-builder-props.js.map +0 -1
  294. package/dist/page-builder-values.d.ts.map +0 -1
  295. package/dist/page-builder-values.js.map +0 -1
  296. package/dist/pagination.d.ts.map +0 -1
  297. package/dist/pagination.js.map +0 -1
  298. package/dist/payment-methods.d.ts.map +0 -1
  299. package/dist/payment-methods.js.map +0 -1
  300. package/dist/payment-return-url.d.ts.map +0 -1
  301. package/dist/payment-return-url.js.map +0 -1
  302. package/dist/payments.d.ts.map +0 -1
  303. package/dist/payments.js.map +0 -1
  304. package/dist/pim-connector.d.ts.map +0 -1
  305. package/dist/pim-connector.js.map +0 -1
  306. package/dist/pim-field-path.d.ts.map +0 -1
  307. package/dist/pim-field-path.js.map +0 -1
  308. package/dist/platform-info.d.ts.map +0 -1
  309. package/dist/platform-info.js.map +0 -1
  310. package/dist/platform-language.d.ts.map +0 -1
  311. package/dist/platform-language.js.map +0 -1
  312. package/dist/price-book-decimal.d.ts.map +0 -1
  313. package/dist/price-book-decimal.js.map +0 -1
  314. package/dist/price-books.d.ts.map +0 -1
  315. package/dist/price-books.js.map +0 -1
  316. package/dist/price-lists.d.ts.map +0 -1
  317. package/dist/price-lists.js.map +0 -1
  318. package/dist/product-feeds.d.ts.map +0 -1
  319. package/dist/product-feeds.js.map +0 -1
  320. package/dist/product-scope-overrides.d.ts.map +0 -1
  321. package/dist/product-scope-overrides.js.map +0 -1
  322. package/dist/product-scopes.d.ts.map +0 -1
  323. package/dist/product-scopes.js.map +0 -1
  324. package/dist/product-summary-text.d.ts.map +0 -1
  325. package/dist/product-summary-text.js.map +0 -1
  326. package/dist/product-url-keys.d.ts.map +0 -1
  327. package/dist/product-url-keys.js.map +0 -1
  328. package/dist/product-value-resolver.d.ts.map +0 -1
  329. package/dist/product-value-resolver.js.map +0 -1
  330. package/dist/projects.d.ts.map +0 -1
  331. package/dist/projects.js.map +0 -1
  332. package/dist/promotions.d.ts.map +0 -1
  333. package/dist/promotions.js.map +0 -1
  334. package/dist/prompt-actions.d.ts.map +0 -1
  335. package/dist/prompt-actions.js.map +0 -1
  336. package/dist/pwa.d.ts.map +0 -1
  337. package/dist/pwa.js.map +0 -1
  338. package/dist/quick-order.d.ts.map +0 -1
  339. package/dist/quick-order.js.map +0 -1
  340. package/dist/quote-requests.d.ts.map +0 -1
  341. package/dist/quote-requests.js.map +0 -1
  342. package/dist/record-references.d.ts.map +0 -1
  343. package/dist/record-references.js.map +0 -1
  344. package/dist/record-rich-text.d.ts.map +0 -1
  345. package/dist/record-rich-text.js.map +0 -1
  346. package/dist/returns.d.ts.map +0 -1
  347. package/dist/returns.js.map +0 -1
  348. package/dist/sales-channels.d.ts.map +0 -1
  349. package/dist/sales-channels.js.map +0 -1
  350. package/dist/saved-list-views.d.ts.map +0 -1
  351. package/dist/saved-list-views.js.map +0 -1
  352. package/dist/scope-notice.d.ts.map +0 -1
  353. package/dist/scope-notice.js.map +0 -1
  354. package/dist/scoped-translations.d.ts +0 -48
  355. package/dist/scoped-translations.d.ts.map +0 -1
  356. package/dist/scoped-translations.js +0 -78
  357. package/dist/scoped-translations.js.map +0 -1
  358. package/dist/search.d.ts.map +0 -1
  359. package/dist/search.js.map +0 -1
  360. package/dist/seo.d.ts.map +0 -1
  361. package/dist/seo.js.map +0 -1
  362. package/dist/settings.d.ts.map +0 -1
  363. package/dist/settings.js.map +0 -1
  364. package/dist/shipments.d.ts.map +0 -1
  365. package/dist/shipments.js.map +0 -1
  366. package/dist/shipping-methods.d.ts.map +0 -1
  367. package/dist/shipping-methods.js.map +0 -1
  368. package/dist/shopping-lists.d.ts.map +0 -1
  369. package/dist/shopping-lists.js.map +0 -1
  370. package/dist/storefront-cache-tags.d.ts.map +0 -1
  371. package/dist/storefront-cache-tags.js.map +0 -1
  372. package/dist/storefront-language-path.d.ts.map +0 -1
  373. package/dist/storefront-language-path.js.map +0 -1
  374. package/dist/storefront-value-overrides.d.ts.map +0 -1
  375. package/dist/storefront-value-overrides.js.map +0 -1
  376. package/dist/tasks.d.ts.map +0 -1
  377. package/dist/tasks.js.map +0 -1
  378. package/dist/taxes.d.ts.map +0 -1
  379. package/dist/taxes.js.map +0 -1
  380. package/dist/text-normalization.d.ts.map +0 -1
  381. package/dist/text-normalization.js.map +0 -1
  382. package/dist/transactional-emails.d.ts.map +0 -1
  383. package/dist/transactional-emails.js.map +0 -1
  384. package/dist/webhooks.d.ts.map +0 -1
  385. package/dist/webhooks.js.map +0 -1
@@ -99,6 +99,33 @@ export declare const SettingValueByChannelSchema: z.ZodObject<{
99
99
  isSet: z.ZodOptional<z.ZodBoolean>;
100
100
  updatedAt: z.ZodISODateTime;
101
101
  }, z.core.$strip>;
102
+ /**
103
+ * Issue #930 — the module that declared a setting says that what is stored is
104
+ * not what is in force, so the Settings screen does not show a setting as "on"
105
+ * while it does nothing. `code` is a token the screen looks up in the owner's
106
+ * bundle (`settingLabels.<setting code>.notice.<code>`); `message` is the
107
+ * English sentence it falls back to.
108
+ */
109
+ export declare const SettingNoticeSchema: z.ZodObject<{
110
+ code: z.ZodString;
111
+ message: z.ZodString;
112
+ }, z.core.$strip>;
113
+ export type SettingNotice = z.infer<typeof SettingNoticeSchema>;
114
+ /**
115
+ * Issue #349, E-349-1 — the module that declared a setting says what writing
116
+ * `whenValue` would do, so the Settings screen asks before it saves that value:
117
+ * switching `mfa.admin.totp_enforced` on signs out every administrator without
118
+ * a second factor. `code` is a token the screen looks up in the owner's bundle
119
+ * (`settingLabels.<setting code>.confirmation.<code>`), interpolated with
120
+ * `params`; `message` is the English sentence it falls back to.
121
+ */
122
+ export declare const SettingWriteConfirmationSchema: z.ZodObject<{
123
+ whenValue: z.ZodUnknown;
124
+ code: z.ZodString;
125
+ message: z.ZodString;
126
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
127
+ }, z.core.$strip>;
128
+ export type SettingWriteConfirmation = z.infer<typeof SettingWriteConfirmationSchema>;
102
129
  export declare const SettingDtoSchema: z.ZodObject<{
103
130
  id: z.ZodUUID;
104
131
  code: z.ZodString;
@@ -131,6 +158,16 @@ export declare const SettingDtoSchema: z.ZodObject<{
131
158
  version: z.ZodISODateTime;
132
159
  editable: z.ZodOptional<z.ZodBoolean>;
133
160
  activationControl: z.ZodOptional<z.ZodBoolean>;
161
+ notice: z.ZodOptional<z.ZodObject<{
162
+ code: z.ZodString;
163
+ message: z.ZodString;
164
+ }, z.core.$strip>>;
165
+ confirmation: z.ZodOptional<z.ZodObject<{
166
+ whenValue: z.ZodUnknown;
167
+ code: z.ZodString;
168
+ message: z.ZodString;
169
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
170
+ }, z.core.$strip>>;
134
171
  }, z.core.$strip>;
135
172
  export type SettingDto = z.infer<typeof SettingDtoSchema>;
136
173
  export declare const SettingGroupDtoSchema: z.ZodObject<{
@@ -172,6 +209,16 @@ export declare const SettingGroupDtoSchema: z.ZodObject<{
172
209
  version: z.ZodISODateTime;
173
210
  editable: z.ZodOptional<z.ZodBoolean>;
174
211
  activationControl: z.ZodOptional<z.ZodBoolean>;
212
+ notice: z.ZodOptional<z.ZodObject<{
213
+ code: z.ZodString;
214
+ message: z.ZodString;
215
+ }, z.core.$strip>>;
216
+ confirmation: z.ZodOptional<z.ZodObject<{
217
+ whenValue: z.ZodUnknown;
218
+ code: z.ZodString;
219
+ message: z.ZodString;
220
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
221
+ }, z.core.$strip>>;
175
222
  }, z.core.$strip>>;
176
223
  }, z.core.$strip>;
177
224
  export type SettingGroupDto = z.infer<typeof SettingGroupDtoSchema>;
@@ -215,9 +262,60 @@ export declare const SettingsListResponseSchema: z.ZodObject<{
215
262
  version: z.ZodISODateTime;
216
263
  editable: z.ZodOptional<z.ZodBoolean>;
217
264
  activationControl: z.ZodOptional<z.ZodBoolean>;
265
+ notice: z.ZodOptional<z.ZodObject<{
266
+ code: z.ZodString;
267
+ message: z.ZodString;
268
+ }, z.core.$strip>>;
269
+ confirmation: z.ZodOptional<z.ZodObject<{
270
+ whenValue: z.ZodUnknown;
271
+ code: z.ZodString;
272
+ message: z.ZodString;
273
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
274
+ }, z.core.$strip>>;
218
275
  }, z.core.$strip>>;
219
276
  }, z.core.$strip>>;
220
277
  }, z.core.$strip>;
278
+ export type SettingsListResponse = z.infer<typeof SettingsListResponseSchema>;
279
+ /**
280
+ * A setting group without its settings — the reply to `POST
281
+ * /api/v1/admin/settings/groups` and `PATCH /api/v1/admin/settings/groups/:code`
282
+ * (issue #599).
283
+ */
284
+ export declare const SettingGroupSummaryDtoSchema: z.ZodObject<{
285
+ id: z.ZodUUID;
286
+ code: z.ZodString;
287
+ name: z.ZodString;
288
+ ownerModule: z.ZodString;
289
+ salesChannelCodes: z.ZodArray<z.ZodString>;
290
+ isSystemProtected: z.ZodBoolean;
291
+ }, z.core.$strip>;
292
+ export type SettingGroupSummaryDto = z.infer<typeof SettingGroupSummaryDtoSchema>;
293
+ /** One row of `GET /api/v1/admin/settings/groups`: the group, how many settings it holds, and when it last changed. */
294
+ export declare const SettingGroupRowDtoSchema: z.ZodObject<{
295
+ id: z.ZodUUID;
296
+ code: z.ZodString;
297
+ name: z.ZodString;
298
+ ownerModule: z.ZodString;
299
+ salesChannelCodes: z.ZodArray<z.ZodString>;
300
+ isSystemProtected: z.ZodBoolean;
301
+ settingCount: z.ZodNumber;
302
+ updatedAt: z.ZodISODateTime;
303
+ }, z.core.$strip>;
304
+ export type SettingGroupRowDto = z.infer<typeof SettingGroupRowDtoSchema>;
305
+ /** `GET /api/v1/admin/settings/groups` — every group, without its settings (issue #599). */
306
+ export declare const SettingGroupRowsResponseSchema: z.ZodObject<{
307
+ groups: z.ZodArray<z.ZodObject<{
308
+ id: z.ZodUUID;
309
+ code: z.ZodString;
310
+ name: z.ZodString;
311
+ ownerModule: z.ZodString;
312
+ salesChannelCodes: z.ZodArray<z.ZodString>;
313
+ isSystemProtected: z.ZodBoolean;
314
+ settingCount: z.ZodNumber;
315
+ updatedAt: z.ZodISODateTime;
316
+ }, z.core.$strip>>;
317
+ }, z.core.$strip>;
318
+ export type SettingGroupRowsResponse = z.infer<typeof SettingGroupRowsResponseSchema>;
221
319
  export declare const SettingsListQuerySchema: z.ZodObject<{
222
320
  groupCode: z.ZodOptional<z.ZodString>;
223
321
  }, z.core.$strip>;
@@ -283,7 +381,18 @@ export declare const SettingDetailResponseSchema: z.ZodObject<{
283
381
  version: z.ZodISODateTime;
284
382
  editable: z.ZodOptional<z.ZodBoolean>;
285
383
  activationControl: z.ZodOptional<z.ZodBoolean>;
384
+ notice: z.ZodOptional<z.ZodObject<{
385
+ code: z.ZodString;
386
+ message: z.ZodString;
387
+ }, z.core.$strip>>;
388
+ confirmation: z.ZodOptional<z.ZodObject<{
389
+ whenValue: z.ZodUnknown;
390
+ code: z.ZodString;
391
+ message: z.ZodString;
392
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
393
+ }, z.core.$strip>>;
286
394
  }, z.core.$strip>;
395
+ export type SettingDetailResponse = z.infer<typeof SettingDetailResponseSchema>;
287
396
  /**
288
397
  * Public shop / company contact information resolved for the active sales
289
398
  * channel. Backs the storefront footer, the 404 "need help?" block and the
@@ -372,8 +481,8 @@ export type HomepageConfigResponse = z.infer<typeof HomepageConfigResponseSchema
372
481
  /**
373
482
  * The reporting time zone: the calendar in which a report counts a day, a
374
483
  * month or any other range of days. A setting of the `analytics` module, so
375
- * that no single reporting module owns it — Projects analytics reads it, CRM
376
- * may follow (#474). An IANA name; default `UTC`. Read it through
484
+ * that no single reporting module owns it — Projects and CRM analytics read
485
+ * it (#474). An IANA name; default `UTC`. Read it through
377
486
  * {@link ReportingTimeZonePort}, never by code: `analytics` can be switched
378
487
  * off, and a reader then counts in `UTC`.
379
488
  */
@@ -486,6 +595,68 @@ export interface SettingWriteValidator {
486
595
  /** Throws an `HttpError` to refuse. Resolving is acceptance. */
487
596
  validate(input: SettingWriteValidationInput): Promise<void>;
488
597
  }
598
+ export interface SettingNoticeInput {
599
+ readonly code: string;
600
+ /** The module that declared the setting. */
601
+ readonly ownerModuleId: string;
602
+ /**
603
+ * The platform-wide value in force before any per-channel row: the stored
604
+ * global value, else the manifest default. `null` for a `secret` setting,
605
+ * whose value never leaves `settings`.
606
+ */
607
+ readonly value: unknown;
608
+ }
609
+ export interface SettingNoticeProvider {
610
+ /** The module contributing the provider — used for the presence filter. */
611
+ readonly contributorModuleId: string;
612
+ /** Exact setting codes, for the reason {@link SettingWriteValidator.codes} gives. */
613
+ readonly codes: readonly string[];
614
+ /** A notice to show beside the setting, or `null` when there is nothing to say. */
615
+ notice(input: SettingNoticeInput): Promise<SettingNotice | null>;
616
+ /**
617
+ * Issue #349, E-349-1 — what to ask before a write, given the value in force
618
+ * now, or `null` when there is nothing to ask. Optional: most providers only
619
+ * comment on what is stored.
620
+ */
621
+ confirmation?(input: SettingNoticeInput): Promise<SettingWriteConfirmation | null>;
622
+ }
623
+ /**
624
+ * Container name: `settingNoticeRegistry`. Owner: `settings`. A contribution
625
+ * seam like {@link SettingWriteValidatorRegistryPort}: pushed into once from a
626
+ * boot hook, and filtered by contributor presence.
627
+ */
628
+ export interface SettingNoticeRegistryPort {
629
+ register(provider: SettingNoticeProvider): void;
630
+ /** Providers for `code`, filtered by contributor presence. */
631
+ forCode(code: string): readonly SettingNoticeProvider[];
632
+ /** The first notice a present provider gives for the setting, or `null`. */
633
+ noticeFor(input: SettingNoticeInput): Promise<SettingNotice | null>;
634
+ /** The first write confirmation a present provider gives for the setting, or `null`. */
635
+ confirmationFor(input: SettingNoticeInput): Promise<SettingWriteConfirmation | null>;
636
+ }
637
+ /**
638
+ * The payload `settings` emits as `settings.value_changed`, after a value
639
+ * write or reset has committed. In-process and best-effort, like every
640
+ * EventBus event.
641
+ */
642
+ export interface SettingsValueChangedPayload {
643
+ readonly eventId: string;
644
+ readonly occurredAt: string;
645
+ readonly settingCode: string;
646
+ /** Channels whose own row the write set or reset; empty for a platform-wide write. */
647
+ readonly salesChannelIds: readonly string[];
648
+ /** Whether the platform-wide value was set or reset. */
649
+ readonly globalValueUpdated: boolean;
650
+ readonly valueType: string;
651
+ /**
652
+ * Issue #349, E-349-1 — the administrator who made the write, and the id of
653
+ * the session they made it from, so a consequence that ends other sessions
654
+ * can spare that one. `null` / absent for a write with no administrator
655
+ * behind it (a boot reconciler, a seed).
656
+ */
657
+ readonly actorAdminUserId?: string | null;
658
+ readonly actorSessionId?: string | null;
659
+ }
489
660
  /**
490
661
  * Container name: `settingWriteValidatorRegistry`. Owner: `settings`.
491
662
  *
package/dist/settings.js CHANGED
@@ -177,6 +177,31 @@ export const SettingValueByChannelSchema = z.object({
177
177
  isSet: z.boolean().optional(),
178
178
  updatedAt: z.iso.datetime(),
179
179
  });
180
+ /**
181
+ * Issue #930 — the module that declared a setting says that what is stored is
182
+ * not what is in force, so the Settings screen does not show a setting as "on"
183
+ * while it does nothing. `code` is a token the screen looks up in the owner's
184
+ * bundle (`settingLabels.<setting code>.notice.<code>`); `message` is the
185
+ * English sentence it falls back to.
186
+ */
187
+ export const SettingNoticeSchema = z.object({
188
+ code: z.string().min(1),
189
+ message: z.string().min(1),
190
+ });
191
+ /**
192
+ * Issue #349, E-349-1 — the module that declared a setting says what writing
193
+ * `whenValue` would do, so the Settings screen asks before it saves that value:
194
+ * switching `mfa.admin.totp_enforced` on signs out every administrator without
195
+ * a second factor. `code` is a token the screen looks up in the owner's bundle
196
+ * (`settingLabels.<setting code>.confirmation.<code>`), interpolated with
197
+ * `params`; `message` is the English sentence it falls back to.
198
+ */
199
+ export const SettingWriteConfirmationSchema = z.object({
200
+ whenValue: z.unknown(),
201
+ code: z.string().min(1),
202
+ message: z.string().min(1),
203
+ params: z.record(z.string(), z.union([z.string(), z.number()])).optional(),
204
+ });
180
205
  export const SettingDtoSchema = z.object({
181
206
  id: z.uuid(),
182
207
  code: z.string(),
@@ -244,6 +269,17 @@ export const SettingDtoSchema = z.object({
244
269
  * setting the ordinary write path refuses (the audited Command owns it).
245
270
  */
246
271
  activationControl: z.boolean().optional(),
272
+ /**
273
+ * Issue #930 — present only while the owning module says the stored value is
274
+ * not in force (see {@link SettingNoticeSchema}). Absent otherwise.
275
+ */
276
+ notice: SettingNoticeSchema.optional(),
277
+ /**
278
+ * Issue #349, E-349-1 — present only while the owning module asks for a
279
+ * confirmation before a write of `whenValue` (see
280
+ * {@link SettingWriteConfirmationSchema}). Absent otherwise.
281
+ */
282
+ confirmation: SettingWriteConfirmationSchema.optional(),
247
283
  });
248
284
  export const SettingGroupDtoSchema = z.object({
249
285
  id: z.uuid(),
@@ -257,6 +293,21 @@ export const SettingGroupDtoSchema = z.object({
257
293
  export const SettingsListResponseSchema = z.object({
258
294
  groups: z.array(SettingGroupDtoSchema),
259
295
  });
296
+ /**
297
+ * A setting group without its settings — the reply to `POST
298
+ * /api/v1/admin/settings/groups` and `PATCH /api/v1/admin/settings/groups/:code`
299
+ * (issue #599).
300
+ */
301
+ export const SettingGroupSummaryDtoSchema = SettingGroupDtoSchema.omit({ settings: true });
302
+ /** One row of `GET /api/v1/admin/settings/groups`: the group, how many settings it holds, and when it last changed. */
303
+ export const SettingGroupRowDtoSchema = SettingGroupSummaryDtoSchema.extend({
304
+ settingCount: z.number().int().nonnegative(),
305
+ updatedAt: z.iso.datetime(),
306
+ });
307
+ /** `GET /api/v1/admin/settings/groups` — every group, without its settings (issue #599). */
308
+ export const SettingGroupRowsResponseSchema = z.object({
309
+ groups: z.array(SettingGroupRowDtoSchema),
310
+ });
260
311
  export const SettingsListQuerySchema = z.object({
261
312
  groupCode: z.string().optional(),
262
313
  });
@@ -365,8 +416,8 @@ export const HomepageConfigResponseSchema = z.object({ data: HomepageConfigSchem
365
416
  /**
366
417
  * The reporting time zone: the calendar in which a report counts a day, a
367
418
  * month or any other range of days. A setting of the `analytics` module, so
368
- * that no single reporting module owns it — Projects analytics reads it, CRM
369
- * may follow (#474). An IANA name; default `UTC`. Read it through
419
+ * that no single reporting module owns it — Projects and CRM analytics read
420
+ * it (#474). An IANA name; default `UTC`. Read it through
370
421
  * {@link ReportingTimeZonePort}, never by code: `analytics` can be switched
371
422
  * off, and a reader then counts in `UTC`.
372
423
  */
@@ -44,6 +44,50 @@ export declare const shoppingListSchema: z.ZodObject<{
44
44
  updatedAt: z.ZodString;
45
45
  }, z.core.$strip>;
46
46
  export type ShoppingList = z.infer<typeof shoppingListSchema>;
47
+ /** `GET /api/v1/shopping-lists` — the signed-in customer's lists, each with its items (issue #599). */
48
+ export declare const shoppingListListResponseSchema: z.ZodObject<{
49
+ data: z.ZodArray<z.ZodObject<{
50
+ id: z.ZodString;
51
+ organizationId: z.ZodString;
52
+ customerAccountId: z.ZodString;
53
+ name: z.ZodString;
54
+ isDefault: z.ZodBoolean;
55
+ items: z.ZodArray<z.ZodObject<{
56
+ id: z.ZodString;
57
+ shoppingListId: z.ZodString;
58
+ productId: z.ZodString;
59
+ variantId: z.ZodNullable<z.ZodString>;
60
+ quantity: z.ZodNumber;
61
+ note: z.ZodNullable<z.ZodString>;
62
+ createdAt: z.ZodString;
63
+ updatedAt: z.ZodString;
64
+ }, z.core.$strip>>;
65
+ createdAt: z.ZodString;
66
+ updatedAt: z.ZodString;
67
+ }, z.core.$strip>>;
68
+ }, z.core.$strip>;
69
+ export type ShoppingListListResponse = z.infer<typeof shoppingListListResponseSchema>;
70
+ /**
71
+ * The name `shopping_lists` stores on the default list it creates for every
72
+ * customer (at registration, or on the first default-list read). It is data,
73
+ * written in no language in particular (issue #751).
74
+ */
75
+ export declare const SHOPPING_LIST_AUTO_DEFAULT_NAME = "Default";
76
+ /**
77
+ * Whether `list` is the default list the platform created and nobody renamed —
78
+ * the list a storefront names in the shop language rather than by its stored
79
+ * name (owner ruling on PR #760, issue #751).
80
+ *
81
+ * No column records "never renamed", so the marker is the default flag and the
82
+ * stored name together, matched exactly. A list the customer renamed is theirs;
83
+ * a list named `Default` that is not the default one is a name like any other.
84
+ * The cost of not adding a column: a customer who types exactly `Default` as the
85
+ * default list's name sees it in the shop language — the same word.
86
+ */
87
+ export declare function isAutoDefaultShoppingList(list: {
88
+ readonly name: string;
89
+ readonly isDefault: boolean;
90
+ }): boolean;
47
91
  /** Lightweight default-list view for the storefront header heart badge. */
48
92
  export declare const defaultShoppingListSummarySchema: z.ZodObject<{
49
93
  id: z.ZodString;
@@ -59,6 +103,21 @@ export declare const renameShoppingListRequestSchema: z.ZodObject<{
59
103
  name: z.ZodString;
60
104
  }, z.core.$strict>;
61
105
  export type RenameShoppingListRequest = z.infer<typeof renameShoppingListRequestSchema>;
106
+ /**
107
+ * Issue #1251 — `PATCH /api/v1/shopping-lists/:id`: the list's name, the quantities of any of
108
+ * its lines, or both, written together or not at all — the one *Save changes* of the
109
+ * storefront list page. Every body {@link renameShoppingListRequestSchema} accepts is accepted
110
+ * here. A line appears once, at most {@link REQUEST_LINE_ITEMS_MAX} of them; a line that is
111
+ * not on the list refuses the whole write.
112
+ */
113
+ export declare const updateShoppingListRequestSchema: z.ZodObject<{
114
+ name: z.ZodOptional<z.ZodString>;
115
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
116
+ id: z.ZodString;
117
+ quantity: z.ZodNumber;
118
+ }, z.core.$strict>>>;
119
+ }, z.core.$strict>;
120
+ export type UpdateShoppingListRequest = z.infer<typeof updateShoppingListRequestSchema>;
62
121
  export declare const addShoppingListItemRequestSchema: z.ZodObject<{
63
122
  productId: z.ZodString;
64
123
  variantId: z.ZodOptional<z.ZodString>;
@@ -84,8 +143,8 @@ export declare const conversionSkipSchema: z.ZodObject<{
84
143
  itemId: z.ZodString;
85
144
  productId: z.ZodString;
86
145
  reason: z.ZodEnum<{
87
- below_minimum: "below_minimum";
88
146
  product_not_found: "product_not_found";
147
+ below_minimum: "below_minimum";
89
148
  product_archived: "product_archived";
90
149
  variant_unavailable: "variant_unavailable";
91
150
  }>;
@@ -117,8 +176,8 @@ export declare const convertToCartResponseSchema: z.ZodObject<{
117
176
  itemId: z.ZodString;
118
177
  productId: z.ZodString;
119
178
  reason: z.ZodEnum<{
120
- below_minimum: "below_minimum";
121
179
  product_not_found: "product_not_found";
180
+ below_minimum: "below_minimum";
122
181
  product_archived: "product_archived";
123
182
  variant_unavailable: "variant_unavailable";
124
183
  }>;
@@ -128,14 +187,14 @@ export declare const convertToCartResponseSchema: z.ZodObject<{
128
187
  export type ConvertToCartResponse = z.infer<typeof convertToCartResponseSchema>;
129
188
  export declare const convertToRfqResponseSchema: z.ZodObject<{
130
189
  shoppingListId: z.ZodString;
131
- rfqId: z.ZodString;
190
+ rfqId: z.ZodNullable<z.ZodString>;
132
191
  added: z.ZodNumber;
133
192
  skipped: z.ZodArray<z.ZodObject<{
134
193
  itemId: z.ZodString;
135
194
  productId: z.ZodString;
136
195
  reason: z.ZodEnum<{
137
- below_minimum: "below_minimum";
138
196
  product_not_found: "product_not_found";
197
+ below_minimum: "below_minimum";
139
198
  product_archived: "product_archived";
140
199
  variant_unavailable: "variant_unavailable";
141
200
  }>;
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { isoDateTimeSchema, uuidSchema } from './common.js';
3
+ import { REQUEST_LINE_ITEMS_MAX, lineQuantitySchema } from './line-bounds.js';
3
4
  /**
4
5
  * Shopping list contracts (T202 / FR-031..FR-033).
5
6
  *
@@ -35,6 +36,30 @@ export const shoppingListSchema = z.object({
35
36
  createdAt: isoDateTimeSchema,
36
37
  updatedAt: isoDateTimeSchema,
37
38
  });
39
+ /** `GET /api/v1/shopping-lists` — the signed-in customer's lists, each with its items (issue #599). */
40
+ export const shoppingListListResponseSchema = z.object({
41
+ data: z.array(shoppingListSchema),
42
+ });
43
+ /**
44
+ * The name `shopping_lists` stores on the default list it creates for every
45
+ * customer (at registration, or on the first default-list read). It is data,
46
+ * written in no language in particular (issue #751).
47
+ */
48
+ export const SHOPPING_LIST_AUTO_DEFAULT_NAME = 'Default';
49
+ /**
50
+ * Whether `list` is the default list the platform created and nobody renamed —
51
+ * the list a storefront names in the shop language rather than by its stored
52
+ * name (owner ruling on PR #760, issue #751).
53
+ *
54
+ * No column records "never renamed", so the marker is the default flag and the
55
+ * stored name together, matched exactly. A list the customer renamed is theirs;
56
+ * a list named `Default` that is not the default one is a name like any other.
57
+ * The cost of not adding a column: a customer who types exactly `Default` as the
58
+ * default list's name sees it in the shop language — the same word.
59
+ */
60
+ export function isAutoDefaultShoppingList(list) {
61
+ return list.isDefault && list.name === SHOPPING_LIST_AUTO_DEFAULT_NAME;
62
+ }
38
63
  /** Lightweight default-list view for the storefront header heart badge. */
39
64
  export const defaultShoppingListSummarySchema = z.object({
40
65
  id: uuidSchema,
@@ -50,15 +75,43 @@ export const renameShoppingListRequestSchema = z
50
75
  name: z.string().min(1).max(160),
51
76
  })
52
77
  .strict();
78
+ /**
79
+ * Issue #1251 — `PATCH /api/v1/shopping-lists/:id`: the list's name, the quantities of any of
80
+ * its lines, or both, written together or not at all — the one *Save changes* of the
81
+ * storefront list page. Every body {@link renameShoppingListRequestSchema} accepts is accepted
82
+ * here. A line appears once, at most {@link REQUEST_LINE_ITEMS_MAX} of them; a line that is
83
+ * not on the list refuses the whole write.
84
+ */
85
+ export const updateShoppingListRequestSchema = z
86
+ .object({
87
+ name: z.string().min(1).max(160).optional(),
88
+ items: z
89
+ .array(z
90
+ .object({
91
+ id: uuidSchema,
92
+ quantity: lineQuantitySchema,
93
+ })
94
+ .strict())
95
+ .min(1)
96
+ .max(REQUEST_LINE_ITEMS_MAX)
97
+ .refine((items) => new Set(items.map((item) => item.id)).size === items.length, {
98
+ message: 'A line may be listed once.',
99
+ })
100
+ .optional(),
101
+ })
102
+ .strict()
103
+ .refine((body) => body.name !== undefined || body.items !== undefined, {
104
+ message: 'Send a name, lines, or both.',
105
+ });
53
106
  export const addShoppingListItemRequestSchema = z.object({
54
107
  productId: uuidSchema,
55
108
  variantId: uuidSchema.optional(),
56
- quantity: z.number().int().positive(),
109
+ quantity: lineQuantitySchema,
57
110
  note: z.string().max(2000).optional(),
58
111
  });
59
112
  export const updateShoppingListItemRequestSchema = z
60
113
  .object({
61
- quantity: z.number().int().positive().optional(),
114
+ quantity: lineQuantitySchema.optional(),
62
115
  note: z.string().max(2000).nullable().optional(),
63
116
  })
64
117
  .strict();
@@ -104,7 +157,8 @@ export const convertToCartResponseSchema = z.object({
104
157
  });
105
158
  export const convertToRfqResponseSchema = z.object({
106
159
  shoppingListId: uuidSchema,
107
- rfqId: uuidSchema,
160
+ /** `null` when no item converted — every selected item was skipped, or none was selected; no quote request was created or changed. */
161
+ rfqId: uuidSchema.nullable(),
108
162
  added: z.number().int().nonnegative(),
109
163
  skipped: z.array(conversionSkipSchema),
110
164
  });
@@ -57,6 +57,18 @@ export declare const CATALOG_PRODUCT_STOREFRONT_CACHE_TAGS: {
57
57
  /** Next drops a tag longer than this. */
58
58
  readonly maxLength: 256;
59
59
  };
60
+ /**
61
+ * Feature 170 (research R-21, FR-063) — the storefront's read of one public form definition.
62
+ * `forms` drops it after a committed publish, close, reopen or delete. Every state of that read is
63
+ * a `200` (`unavailable` included), so the 60 s revalidation bounds staleness even when the drop
64
+ * by tag is lost.
65
+ */
66
+ export declare const FORMS_STOREFRONT_CACHE_TAGS: {
67
+ /** One form's reads, on every channel and language. */
68
+ readonly form: (formId: string) => string;
69
+ /** Next drops a tag longer than this. */
70
+ readonly maxLength: 256;
71
+ };
60
72
  /** The resolved megamenu of a channel and language — it inlines CMS blocks. */
61
73
  export declare const MEGAMENU_STOREFRONT_CACHE_TAG = "megamenu";
62
74
  /**
@@ -90,5 +102,15 @@ export type CmsContentChange = {
90
102
  } | {
91
103
  readonly kind: 'hook';
92
104
  readonly codes: readonly string[];
105
+ }
106
+ /**
107
+ * Issue #363 — an asset a page, a block or a hook may embed was written
108
+ * (`assets_library`'s `ASSET_CHANGED_EVENT`). Every CMS answer carries the
109
+ * URLs of the assets it embeds, and nothing records which answer embeds
110
+ * which asset, so every page, block and hook read is stale.
111
+ */
112
+ | {
113
+ readonly kind: 'assets';
114
+ readonly assetIds: readonly string[];
93
115
  };
94
116
  //# sourceMappingURL=storefront-cache-tags.d.ts.map
@@ -57,6 +57,18 @@ export const CATALOG_PRODUCT_STOREFRONT_CACHE_TAGS = {
57
57
  /** Next drops a tag longer than this. */
58
58
  maxLength: 256,
59
59
  };
60
+ /**
61
+ * Feature 170 (research R-21, FR-063) — the storefront's read of one public form definition.
62
+ * `forms` drops it after a committed publish, close, reopen or delete. Every state of that read is
63
+ * a `200` (`unavailable` included), so the 60 s revalidation bounds staleness even when the drop
64
+ * by tag is lost.
65
+ */
66
+ export const FORMS_STOREFRONT_CACHE_TAGS = {
67
+ /** One form's reads, on every channel and language. */
68
+ form: (formId) => `forms:form:${formId}`,
69
+ /** Next drops a tag longer than this. */
70
+ maxLength: 256,
71
+ };
60
72
  /** The resolved megamenu of a channel and language — it inlines CMS blocks. */
61
73
  export const MEGAMENU_STOREFRONT_CACHE_TAG = 'megamenu';
62
74
  /**
@@ -1,67 +1,29 @@
1
- import { type AttributeScope, type OverrideRow } from './product-value-resolver.js';
1
+ import type { ScopeLevel } from './product-scope-model.js';
2
+ import { type OverrideRow } from './product-value-resolver.js';
2
3
  /**
3
- * Issue #384 — which per-(sales channel, language) override (features 022/023)
4
- * a storefront read shows, given the override rows it already holds.
4
+ * Issue #384, rewritten by feature 174 (research R1) — the effective Name, Description or
5
+ * attribute a storefront read shows at the request's (channel, language), given the override
6
+ * rows it already holds.
5
7
  *
6
- * Shared by every storefront read that shows a product's name — `catalog`'s
7
- * product page and listing cards, and `search`'s result cards — so one product
8
- * cannot show two names depending on which module answered the page.
9
- *
10
- * **Only the override slots are taken from the resolver.** The fallback chain
11
- * is {@link resolveAttribute}, and this file adds no second implementation of
12
- * it. What it deliberately does *not* take from the resolver is the baseline
13
- * leg: the storefront reads have always walked their own language fallback
14
- * over the baseline JSONB (`preferred` → the channel's default language →
15
- * `en-US` → `en` → first key), which differs from the resolver's
16
- * (`languageCode` → primary language → first sorted key) in its edges.
17
- * Replacing it would change what every product *without* an override shows,
18
- * so an override answers here only when the resolver says a channel slot
19
- * produced the value, and the caller's existing baseline pick answers
20
- * otherwise. The baseline is still read for one thing — where that pick
21
- * stops — so an override never answers for a later language than the one
22
- * whose baseline text the page would show.
8
+ * Shared by every storefront read that shows a product's text — `catalog`'s product page and
9
+ * listing cards, and `search`'s result cards — so one product cannot show two names depending on
10
+ * which module answered. The chain is {@link resolveAttribute}'s (C×L → C → G); there is no
11
+ * per-language baseline walk any more: the Global value is one string (FR-014).
23
12
  */
24
- /** The request's resolution context, as the storefront reads hold it. */
13
+ /** The request's resolution context: the resolved channel and its content language. */
25
14
  export interface StorefrontOverrideContext {
26
15
  channelId: string;
27
- /**
28
- * The language chain the caller's baseline pick walks, in order — see
29
- * {@link overrideLanguages}. A (channel, language) override is looked up at
30
- * each leg until the baseline has a value for one; the pick's first-key tail
31
- * is derived from the baseline itself. Empty when nothing is known: only the
32
- * baseline's first key and the channel-only slot can answer.
33
- */
34
- languages: readonly string[];
16
+ /** Already resolved against the channel; `null` = the channel scope only. */
17
+ languageCode: string | null;
35
18
  }
36
19
  /**
37
- * The ordered, de-duplicated language chain the storefront's baseline pick
38
- * walks: the `Accept-Language` pick, the channel's default language, `en-US`,
39
- * `en`. A caller whose pick has no channel-default leg passes `undefined` for
40
- * it, so the override walk mirrors exactly the pick it sits on.
41
- */
42
- export declare function overrideLanguages(preferredLanguage: string | undefined, channelDefaultLanguage: string | undefined): string[];
43
- /**
44
- * The override value for one attribute in this context, or `undefined` when no
45
- * channel slot applies and the caller's baseline should stand.
46
- *
47
- * The walk is the baseline pick's own, with the override slot looked at first
48
- * at every leg: for each language L of `ctx.languages`, a (channel, L)
49
- * override answers; else, if the baseline has a value for L, the walk stops
50
- * there. When no leg stopped it and the baseline is a per-language record, its
51
- * first key — the pick's tail — is the last leg. So an override for a later
52
- * language never beats a baseline value for an earlier one. Whatever the walk
53
- * stopped on, the channel-only slot is asked last, exactly as it always was.
54
- *
55
- * `baseline` is the raw value the caller's pick reads: `products.name` /
56
- * `products.description` for the system text, `attributeValues[key]` for a
57
- * user attribute.
20
+ * The effective value of one field at `ctx`: the C×L row, else the C row, else `global`; an
21
+ * empty override answers `null`.
58
22
  */
59
- export declare function channelOverrideFor(overrides: readonly OverrideRow[] | undefined, attributeKey: string, scope: AttributeScope, ctx: StorefrontOverrideContext, baseline: unknown): unknown;
23
+ export declare function effectiveScopedValue(overrides: readonly OverrideRow[] | undefined, attributeKey: string, levels: readonly ScopeLevel[], ctx: StorefrontOverrideContext, global: unknown): unknown;
60
24
  /**
61
- * The effective Name or Description: the channel override when one applies
62
- * and is a non-empty string, else `baselineText` — the caller's existing
63
- * language pick over `baseline`, the JSONB it picked from. The pick is kept
64
- * the caller's so a product without overrides shows byte-identical text.
25
+ * The effective Name or Description at `ctx`: `null` when the answer is an empty override (a
26
+ * description deliberately left empty) or there is no value at all.
65
27
  */
66
- export declare function effectiveSystemText(overrides: readonly OverrideRow[] | undefined, attributeKey: 'name' | 'description', ctx: StorefrontOverrideContext, baseline: Readonly<Record<string, string>>, baselineText: string): string;
28
+ export declare function effectiveSystemText(overrides: readonly OverrideRow[] | undefined, attributeKey: 'name' | 'description', ctx: StorefrontOverrideContext, global: string | null): string | null;
67
29
  //# sourceMappingURL=storefront-value-overrides.d.ts.map