@endora-commerce/mod-catalog 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 (615) hide show
  1. package/dist/admin/components/CopyToChannelsDialog.d.ts +37 -0
  2. package/dist/admin/components/CopyToChannelsDialog.js +83 -0
  3. package/dist/admin/components/PackagingUnitsEditor.d.ts +13 -4
  4. package/dist/admin/components/PackagingUnitsEditor.js +21 -85
  5. package/dist/admin/components/ProductAttachmentsSection.d.ts +1 -3
  6. package/dist/admin/components/ProductAttachmentsSection.js +59 -98
  7. package/dist/admin/components/ProductAttributesTab.d.ts +1 -11
  8. package/dist/admin/components/ProductAttributesTab.js +128 -119
  9. package/dist/admin/components/ProductContentCard.d.ts +41 -0
  10. package/dist/admin/components/ProductContentCard.js +28 -0
  11. package/dist/admin/components/ProductEditorSaveAction.d.ts +22 -0
  12. package/dist/admin/components/ProductEditorSaveAction.js +23 -0
  13. package/dist/admin/components/ProductGallerySection.d.ts +2 -13
  14. package/dist/admin/components/ProductGallerySection.js +98 -354
  15. package/dist/admin/components/ProductInventoryTab.d.ts +12 -1
  16. package/dist/admin/components/ProductInventoryTab.js +52 -115
  17. package/dist/admin/components/ProductOrderRulesCard.d.ts +11 -15
  18. package/dist/admin/components/ProductOrderRulesCard.js +15 -268
  19. package/dist/admin/components/ProductScopeBar.d.ts +34 -0
  20. package/dist/admin/components/ProductScopeBar.js +70 -0
  21. package/dist/admin/components/ProductScopeOverview.d.ts +13 -1
  22. package/dist/admin/components/ProductScopeOverview.js +56 -37
  23. package/dist/admin/components/ProductUrlRedirects.d.ts +15 -0
  24. package/dist/admin/components/ProductUrlRedirects.js +70 -0
  25. package/dist/admin/components/ProductsBulkEditDialog.js +4 -3
  26. package/dist/admin/components/editor/DetailsTab.d.ts +30 -0
  27. package/dist/admin/components/editor/DetailsTab.js +60 -0
  28. package/dist/admin/components/editor/SectionHeading.d.ts +22 -0
  29. package/dist/admin/components/editor/SectionHeading.js +19 -0
  30. package/dist/admin/components/editor/confirm-removal.d.ts +13 -0
  31. package/dist/admin/components/editor/confirm-removal.js +33 -0
  32. package/dist/admin/components/editor/editor-context.d.ts +55 -0
  33. package/dist/admin/components/editor/editor-context.js +88 -0
  34. package/dist/admin/components/editor/scoped-controls.d.ts +46 -0
  35. package/dist/admin/components/editor/scoped-controls.js +64 -0
  36. package/dist/admin/index.d.ts +1 -1
  37. package/dist/admin/index.js +11 -0
  38. package/dist/admin/lib/attribute-scope.d.ts +17 -14
  39. package/dist/admin/lib/attribute-scope.js +12 -9
  40. package/dist/admin/lib/bulk-result-outcome.d.ts +14 -0
  41. package/dist/admin/lib/bulk-result-outcome.js +13 -0
  42. package/dist/admin/lib/editor-scope.d.ts +35 -0
  43. package/dist/admin/lib/editor-scope.js +114 -0
  44. package/dist/admin/lib/order-minimum-input.d.ts +13 -0
  45. package/dist/admin/lib/order-minimum-input.js +16 -0
  46. package/dist/admin/lib/product-labels.d.ts +0 -2
  47. package/dist/admin/lib/product-labels.js +1 -5
  48. package/dist/admin/lib/product-scopes-api.d.ts +5 -22
  49. package/dist/admin/lib/product-scopes-api.js +4 -48
  50. package/dist/admin/lib/product-url-keys-api.d.ts +4 -27
  51. package/dist/admin/lib/product-url-keys-api.js +1 -50
  52. package/dist/admin/lib/scope-overview.d.ts +13 -14
  53. package/dist/admin/lib/scope-overview.js +36 -31
  54. package/dist/admin/lib/scoped-editor-store.d.ts +81 -0
  55. package/dist/admin/lib/scoped-editor-store.js +198 -0
  56. package/dist/admin/lib/scoped-values-api.d.ts +14 -0
  57. package/dist/admin/lib/scoped-values-api.js +55 -0
  58. package/dist/admin/pages/AttachmentTypesPage.js +14 -4
  59. package/dist/admin/pages/AttributeSetsPage.js +11 -4
  60. package/dist/admin/pages/AttributesManager.js +130 -40
  61. package/dist/admin/pages/BulkOperationDetailPage.js +11 -4
  62. package/dist/admin/pages/CategoriesTree.d.ts +5 -0
  63. package/dist/admin/pages/CategoriesTree.js +226 -40
  64. package/dist/admin/pages/ProductContentPage.d.ts +27 -0
  65. package/dist/admin/pages/ProductContentPage.js +161 -0
  66. package/dist/admin/pages/ProductCreateForm.d.ts +3 -0
  67. package/dist/admin/pages/ProductCreateForm.js +87 -0
  68. package/dist/admin/pages/ProductEditor.js +938 -458
  69. package/dist/admin/pages/ProductsList.js +33 -38
  70. package/dist/backend/admin-search-provider.d.ts +2 -1
  71. package/dist/backend/admin-search-provider.js +1 -1
  72. package/dist/backend/commands/attribute-commands.d.ts +4 -3
  73. package/dist/backend/commands/attribute-commands.js +137 -30
  74. package/dist/backend/commands/product-content-commands.d.ts +31 -0
  75. package/dist/backend/commands/product-content-commands.js +70 -0
  76. package/dist/backend/commands/scoped-values.commands.d.ts +95 -0
  77. package/dist/backend/commands/scoped-values.commands.js +235 -0
  78. package/dist/backend/demo/reset.js +2 -1
  79. package/dist/backend/demo/rows.d.ts +18 -0
  80. package/dist/backend/demo/rows.js +18 -0
  81. package/dist/backend/demo/seed.d.ts +2 -1
  82. package/dist/backend/demo/seed.js +20 -6
  83. package/dist/backend/entities/gallery-item-scope-override.entity.d.ts +30 -0
  84. package/dist/backend/entities/gallery-item-scope-override.entity.js +80 -0
  85. package/dist/backend/entities/gallery-item.entity.d.ts +7 -6
  86. package/dist/backend/entities/gallery-item.entity.js +11 -6
  87. package/dist/backend/entities/gallery-role-scope-override.entity.d.ts +28 -0
  88. package/dist/backend/entities/gallery-role-scope-override.entity.js +75 -0
  89. package/dist/backend/entities/product-attachment-scope-override.entity.d.ts +30 -0
  90. package/dist/backend/entities/product-attachment-scope-override.entity.js +80 -0
  91. package/dist/backend/entities/product-attachment.entity.d.ts +4 -6
  92. package/dist/backend/entities/product-attachment.entity.js +6 -12
  93. package/dist/backend/entities/product-attribute.entity.d.ts +5 -9
  94. package/dist/backend/entities/product-attribute.entity.js +5 -13
  95. package/dist/backend/entities/product-channel-scope.entity.d.ts +7 -2
  96. package/dist/backend/entities/product-channel-scope.entity.js +10 -1
  97. package/dist/backend/entities/product-content-value.entity.d.ts +39 -0
  98. package/dist/backend/entities/product-content-value.entity.js +81 -0
  99. package/dist/backend/entities/product-packaging-unit-scope-override.entity.d.ts +30 -0
  100. package/dist/backend/entities/product-packaging-unit-scope-override.entity.js +80 -0
  101. package/dist/backend/entities/product-packaging-unit.entity.d.ts +1 -7
  102. package/dist/backend/entities/product-packaging-unit.entity.js +0 -10
  103. package/dist/backend/entities/product-url-key.entity.d.ts +14 -19
  104. package/dist/backend/entities/product-url-key.entity.js +17 -22
  105. package/dist/backend/entities/product-url-redirect.entity.d.ts +8 -13
  106. package/dist/backend/entities/product-url-redirect.entity.js +13 -14
  107. package/dist/backend/entities/product-variant.entity.d.ts +8 -1
  108. package/dist/backend/entities/product-variant.entity.js +13 -2
  109. package/dist/backend/entities/product.entity.d.ts +31 -14
  110. package/dist/backend/entities/product.entity.js +41 -34
  111. package/dist/backend/index.d.ts +11 -3
  112. package/dist/backend/index.js +155 -49
  113. package/dist/backend/plugin.d.ts +36 -6
  114. package/dist/backend/plugin.js +36 -13
  115. package/dist/backend/prompt-tools.d.ts +3 -2
  116. package/dist/backend/prompt-tools.js +18 -7
  117. package/dist/backend/routes.admin.d.ts +15 -16
  118. package/dist/backend/routes.admin.js +122 -103
  119. package/dist/backend/routes.api-key.js +4 -2
  120. package/dist/backend/routes.external.js +3 -2
  121. package/dist/backend/routes.public.d.ts +8 -1
  122. package/dist/backend/routes.public.js +68 -11
  123. package/dist/backend/services/asset-references.d.ts +12 -1
  124. package/dist/backend/services/asset-references.js +42 -2
  125. package/dist/backend/services/attachment-packaging-scopes.d.ts +38 -20
  126. package/dist/backend/services/attachment-packaging-scopes.js +58 -75
  127. package/dist/backend/services/attachment.service.d.ts +4 -8
  128. package/dist/backend/services/attachment.service.js +35 -49
  129. package/dist/backend/services/attribute-filter-match.d.ts +14 -0
  130. package/dist/backend/services/attribute-filter-match.js +19 -0
  131. package/dist/backend/services/attribute-scope-preview.d.ts +17 -7
  132. package/dist/backend/services/attribute-scope-preview.js +30 -20
  133. package/dist/backend/services/attribute-set.service.d.ts +10 -1
  134. package/dist/backend/services/attribute-set.service.js +30 -4
  135. package/dist/backend/services/attribute-type-mapping.d.ts +2 -2
  136. package/dist/backend/services/attribute-type-mapping.js +6 -0
  137. package/dist/backend/services/attribute-usage.d.ts +31 -0
  138. package/dist/backend/services/attribute-usage.js +29 -0
  139. package/dist/backend/services/bulk-operation.service.d.ts +1 -1
  140. package/dist/backend/services/bulk-operation.service.js +16 -6
  141. package/dist/backend/services/bundle.service.js +19 -1
  142. package/dist/backend/services/catalog-admin-search.service.d.ts +3 -2
  143. package/dist/backend/services/catalog-admin-search.service.js +6 -6
  144. package/dist/backend/services/catalog-admin.service.d.ts +63 -12
  145. package/dist/backend/services/catalog-admin.service.js +368 -195
  146. package/dist/backend/services/catalog-attribute-read.service.d.ts +14 -0
  147. package/dist/backend/services/catalog-attribute-read.service.js +9 -19
  148. package/dist/backend/services/catalog-bulk-import.service.d.ts +58 -5
  149. package/dist/backend/services/catalog-bulk-import.service.js +192 -142
  150. package/dist/backend/services/catalog-bulk-update.service.d.ts +5 -3
  151. package/dist/backend/services/catalog-bulk-update.service.js +21 -8
  152. package/dist/backend/services/catalog-product-read.service.d.ts +11 -1
  153. package/dist/backend/services/catalog-product-read.service.js +37 -17
  154. package/dist/backend/services/catalog-query.service.d.ts +48 -8
  155. package/dist/backend/services/catalog-query.service.js +180 -116
  156. package/dist/backend/services/catalog-quick-search.service.js +5 -5
  157. package/dist/backend/services/catalog-write-ports.d.ts +14 -16
  158. package/dist/backend/services/catalog-write-ports.js +11 -70
  159. package/dist/backend/services/category-admin.service.js +29 -5
  160. package/dist/backend/services/content-attribute-rules.d.ts +61 -0
  161. package/dist/backend/services/content-attribute-rules.js +102 -0
  162. package/dist/backend/services/effective-value.sql.d.ts +24 -38
  163. package/dist/backend/services/effective-value.sql.js +37 -87
  164. package/dist/backend/services/gallery-scopes.d.ts +45 -22
  165. package/dist/backend/services/gallery-scopes.js +116 -109
  166. package/dist/backend/services/gallery.service.d.ts +13 -27
  167. package/dist/backend/services/gallery.service.js +75 -199
  168. package/dist/backend/services/grouped.service.js +20 -3
  169. package/dist/backend/services/packaging-unit.service.js +7 -12
  170. package/dist/backend/services/page-builder-content.d.ts +64 -0
  171. package/dist/backend/services/page-builder-content.js +113 -0
  172. package/dist/backend/services/primary-asset-url.d.ts +6 -1
  173. package/dist/backend/services/primary-asset-url.js +9 -4
  174. package/dist/backend/services/product-availability.service.d.ts +16 -3
  175. package/dist/backend/services/product-availability.service.js +58 -21
  176. package/dist/backend/services/product-content.service.d.ts +62 -0
  177. package/dist/backend/services/product-content.service.js +122 -0
  178. package/dist/backend/services/product-editor-preferences.service.d.ts +6 -0
  179. package/dist/backend/services/product-editor-preferences.service.js +12 -0
  180. package/dist/backend/services/product-global-field-rules.d.ts +39 -0
  181. package/dist/backend/services/product-global-field-rules.js +84 -0
  182. package/dist/backend/services/product-link.service.js +14 -16
  183. package/dist/backend/services/product-list-view-service.js +5 -8
  184. package/dist/backend/services/product-page-revalidation.d.ts +9 -0
  185. package/dist/backend/services/product-page-revalidation.js +19 -0
  186. package/dist/backend/services/product-scopes.service.d.ts +18 -8
  187. package/dist/backend/services/product-scopes.service.js +91 -36
  188. package/dist/backend/services/product-value-resolver.service.d.ts +2 -2
  189. package/dist/backend/services/product-value-resolver.service.js +4 -7
  190. package/dist/backend/services/publication-window-sweep.d.ts +61 -7
  191. package/dist/backend/services/publication-window-sweep.js +106 -19
  192. package/dist/backend/services/scheduled-work-probe.d.ts +34 -0
  193. package/dist/backend/services/scheduled-work-probe.js +30 -0
  194. package/dist/backend/services/scope-completeness.d.ts +11 -11
  195. package/dist/backend/services/scope-completeness.js +26 -33
  196. package/dist/backend/services/scope-overview.service.d.ts +24 -24
  197. package/dist/backend/services/scope-overview.service.js +33 -76
  198. package/dist/backend/services/scoped-store-adapters.d.ts +58 -0
  199. package/dist/backend/services/scoped-store-adapters.js +92 -0
  200. package/dist/backend/services/scoped-values-global-only.d.ts +36 -0
  201. package/dist/backend/services/scoped-values-global-only.js +92 -0
  202. package/dist/backend/services/scoped-values-import.d.ts +86 -0
  203. package/dist/backend/services/scoped-values-import.js +320 -0
  204. package/dist/backend/services/scoped-values-read.service.d.ts +56 -0
  205. package/dist/backend/services/scoped-values-read.service.js +289 -0
  206. package/dist/backend/services/scoped-values-save.service.d.ts +79 -0
  207. package/dist/backend/services/scoped-values-save.service.js +675 -0
  208. package/dist/backend/services/scoped-values-state.d.ts +94 -0
  209. package/dist/backend/services/scoped-values-state.js +159 -0
  210. package/dist/backend/services/scoped-values.service.d.ts +36 -0
  211. package/dist/backend/services/scoped-values.service.js +92 -0
  212. package/dist/backend/services/storefront-value-overrides.d.ts +7 -8
  213. package/dist/backend/services/storefront-value-overrides.js +11 -14
  214. package/dist/backend/services/table-maintenance-queue.d.ts +78 -0
  215. package/dist/backend/services/table-maintenance-queue.js +97 -0
  216. package/dist/backend/services/url-key-resolution.service.d.ts +12 -18
  217. package/dist/backend/services/url-key-resolution.service.js +43 -43
  218. package/dist/backend/services/url-key.service.d.ts +87 -135
  219. package/dist/backend/services/url-key.service.js +447 -619
  220. package/dist/manifest.d.ts +51 -1
  221. package/dist/manifest.js +111 -7
  222. package/dist/migrations/20261030T113855_catalog_scope_model_texts.d.ts +36 -0
  223. package/dist/migrations/20261030T113855_catalog_scope_model_texts.js +225 -0
  224. package/dist/migrations/20261030T113859_catalog_scope_model_order_rules.d.ts +18 -0
  225. package/dist/migrations/20261030T113859_catalog_scope_model_order_rules.js +39 -0
  226. package/dist/migrations/20261030T113904_catalog_scope_model_url_keys.d.ts +6 -0
  227. package/dist/migrations/20261030T113904_catalog_scope_model_url_keys.js +119 -0
  228. package/dist/migrations/20261030T113908_catalog_scope_model_media.d.ts +6 -0
  229. package/dist/migrations/20261030T113908_catalog_scope_model_media.js +185 -0
  230. package/dist/migrations/20261104T121504_catalog_product_content_values.d.ts +36 -0
  231. package/dist/migrations/20261104T121504_catalog_product_content_values.js +53 -0
  232. package/dist/migrations/20261107T093126_catalog_sku_unique_among_live.d.ts +33 -0
  233. package/dist/migrations/20261107T093126_catalog_sku_unique_among_live.js +58 -0
  234. package/dist/migrations/20261107T120008_catalog_product_created_at_milliseconds.d.ts +36 -0
  235. package/dist/migrations/20261107T120008_catalog_product_created_at_milliseconds.js +40 -0
  236. package/dist/migrations/20261114T000706_catalog_category_main_image.d.ts +37 -0
  237. package/dist/migrations/20261114T000706_catalog_category_main_image.js +56 -0
  238. package/dist/migrations/index.d.ts +9 -1
  239. package/dist/migrations/index.js +17 -1
  240. package/docs/catalog/attachments.md +53 -43
  241. package/docs/catalog/attribute-sets.md +3 -2
  242. package/docs/catalog/attributes.md +99 -25
  243. package/docs/catalog/category-content.md +9 -3
  244. package/docs/catalog/composite-products.md +5 -3
  245. package/docs/catalog/editing-a-product-at-a-scope.md +151 -0
  246. package/docs/catalog/gallery-and-labels.md +61 -60
  247. package/docs/catalog/packaging-units.md +43 -34
  248. package/docs/catalog/per-channel-per-language-overrides.md +83 -410
  249. package/docs/catalog/product-content.md +184 -0
  250. package/docs/catalog/product-links.md +2 -2
  251. package/docs/catalog/url-keys-and-redirects.md +79 -79
  252. package/docs/catalog.md +113 -31
  253. package/i18n/en.json +317 -274
  254. package/i18n/pl.json +319 -276
  255. package/package.json +13 -12
  256. package/dist/admin/components/AttachmentScopesDialog.d.ts +0 -22
  257. package/dist/admin/components/AttachmentScopesDialog.d.ts.map +0 -1
  258. package/dist/admin/components/AttachmentScopesDialog.js +0 -70
  259. package/dist/admin/components/AttachmentScopesDialog.js.map +0 -1
  260. package/dist/admin/components/PackagingUnitsEditor.d.ts.map +0 -1
  261. package/dist/admin/components/PackagingUnitsEditor.js.map +0 -1
  262. package/dist/admin/components/ProductAttachmentsSection.d.ts.map +0 -1
  263. package/dist/admin/components/ProductAttachmentsSection.js.map +0 -1
  264. package/dist/admin/components/ProductAttributesTab.d.ts.map +0 -1
  265. package/dist/admin/components/ProductAttributesTab.js.map +0 -1
  266. package/dist/admin/components/ProductGallerySection.d.ts.map +0 -1
  267. package/dist/admin/components/ProductGallerySection.js.map +0 -1
  268. package/dist/admin/components/ProductInventoryTab.d.ts.map +0 -1
  269. package/dist/admin/components/ProductInventoryTab.js.map +0 -1
  270. package/dist/admin/components/ProductOrderRulesCard.d.ts.map +0 -1
  271. package/dist/admin/components/ProductOrderRulesCard.js.map +0 -1
  272. package/dist/admin/components/ProductScopeControls.d.ts +0 -31
  273. package/dist/admin/components/ProductScopeControls.d.ts.map +0 -1
  274. package/dist/admin/components/ProductScopeControls.js +0 -243
  275. package/dist/admin/components/ProductScopeControls.js.map +0 -1
  276. package/dist/admin/components/ProductScopeEditor.d.ts +0 -88
  277. package/dist/admin/components/ProductScopeEditor.d.ts.map +0 -1
  278. package/dist/admin/components/ProductScopeEditor.js +0 -396
  279. package/dist/admin/components/ProductScopeEditor.js.map +0 -1
  280. package/dist/admin/components/ProductScopeOverview.d.ts.map +0 -1
  281. package/dist/admin/components/ProductScopeOverview.js.map +0 -1
  282. package/dist/admin/components/ProductStatusPills.d.ts.map +0 -1
  283. package/dist/admin/components/ProductStatusPills.js.map +0 -1
  284. package/dist/admin/components/ProductUrlKeysPanel.d.ts +0 -17
  285. package/dist/admin/components/ProductUrlKeysPanel.d.ts.map +0 -1
  286. package/dist/admin/components/ProductUrlKeysPanel.js +0 -215
  287. package/dist/admin/components/ProductUrlKeysPanel.js.map +0 -1
  288. package/dist/admin/components/ProductsBulkEditDialog.d.ts.map +0 -1
  289. package/dist/admin/components/ProductsBulkEditDialog.js.map +0 -1
  290. package/dist/admin/components/ScopedDialogParts.d.ts +0 -23
  291. package/dist/admin/components/ScopedDialogParts.d.ts.map +0 -1
  292. package/dist/admin/components/ScopedDialogParts.js +0 -16
  293. package/dist/admin/components/ScopedDialogParts.js.map +0 -1
  294. package/dist/admin/index.d.ts.map +0 -1
  295. package/dist/admin/index.js.map +0 -1
  296. package/dist/admin/lib/attribute-scope.d.ts.map +0 -1
  297. package/dist/admin/lib/attribute-scope.js.map +0 -1
  298. package/dist/admin/lib/bulk-operation-log-text.d.ts.map +0 -1
  299. package/dist/admin/lib/bulk-operation-log-text.js.map +0 -1
  300. package/dist/admin/lib/media-scopes.d.ts +0 -41
  301. package/dist/admin/lib/media-scopes.d.ts.map +0 -1
  302. package/dist/admin/lib/media-scopes.js +0 -66
  303. package/dist/admin/lib/media-scopes.js.map +0 -1
  304. package/dist/admin/lib/product-labels.d.ts.map +0 -1
  305. package/dist/admin/lib/product-labels.js.map +0 -1
  306. package/dist/admin/lib/product-scope-drafts.d.ts +0 -77
  307. package/dist/admin/lib/product-scope-drafts.d.ts.map +0 -1
  308. package/dist/admin/lib/product-scope-drafts.js +0 -133
  309. package/dist/admin/lib/product-scope-drafts.js.map +0 -1
  310. package/dist/admin/lib/product-scopes-api.d.ts.map +0 -1
  311. package/dist/admin/lib/product-scopes-api.js.map +0 -1
  312. package/dist/admin/lib/product-url-keys-api.d.ts.map +0 -1
  313. package/dist/admin/lib/product-url-keys-api.js.map +0 -1
  314. package/dist/admin/lib/resolve-product-selection.d.ts.map +0 -1
  315. package/dist/admin/lib/resolve-product-selection.js.map +0 -1
  316. package/dist/admin/lib/scope-overview.d.ts.map +0 -1
  317. package/dist/admin/lib/scope-overview.js.map +0 -1
  318. package/dist/admin/pages/AttachmentTypesPage.d.ts.map +0 -1
  319. package/dist/admin/pages/AttachmentTypesPage.js.map +0 -1
  320. package/dist/admin/pages/AttributeSetsPage.d.ts.map +0 -1
  321. package/dist/admin/pages/AttributeSetsPage.js.map +0 -1
  322. package/dist/admin/pages/AttributesManager.d.ts.map +0 -1
  323. package/dist/admin/pages/AttributesManager.js.map +0 -1
  324. package/dist/admin/pages/BulkOperationDetailPage.d.ts.map +0 -1
  325. package/dist/admin/pages/BulkOperationDetailPage.js.map +0 -1
  326. package/dist/admin/pages/BulkOperationsPage.d.ts.map +0 -1
  327. package/dist/admin/pages/BulkOperationsPage.js.map +0 -1
  328. package/dist/admin/pages/CategoriesTree.d.ts.map +0 -1
  329. package/dist/admin/pages/CategoriesTree.js.map +0 -1
  330. package/dist/admin/pages/CategoryContentPage.d.ts.map +0 -1
  331. package/dist/admin/pages/CategoryContentPage.js.map +0 -1
  332. package/dist/admin/pages/ProductEditor.d.ts.map +0 -1
  333. package/dist/admin/pages/ProductEditor.js.map +0 -1
  334. package/dist/admin/pages/ProductsList.d.ts.map +0 -1
  335. package/dist/admin/pages/ProductsList.js.map +0 -1
  336. package/dist/backend/admin-search-provider.d.ts.map +0 -1
  337. package/dist/backend/admin-search-provider.js.map +0 -1
  338. package/dist/backend/commands/attribute-commands.d.ts.map +0 -1
  339. package/dist/backend/commands/attribute-commands.js.map +0 -1
  340. package/dist/backend/demo/reset.d.ts.map +0 -1
  341. package/dist/backend/demo/reset.js.map +0 -1
  342. package/dist/backend/demo/rows.d.ts.map +0 -1
  343. package/dist/backend/demo/rows.js.map +0 -1
  344. package/dist/backend/demo/seed.d.ts.map +0 -1
  345. package/dist/backend/demo/seed.js.map +0 -1
  346. package/dist/backend/entities/attachment-type.entity.d.ts.map +0 -1
  347. package/dist/backend/entities/attachment-type.entity.js.map +0 -1
  348. package/dist/backend/entities/attribute-set-attribute.entity.d.ts.map +0 -1
  349. package/dist/backend/entities/attribute-set-attribute.entity.js.map +0 -1
  350. package/dist/backend/entities/attribute-set.entity.d.ts.map +0 -1
  351. package/dist/backend/entities/attribute-set.entity.js.map +0 -1
  352. package/dist/backend/entities/bulk-operation.entity.d.ts.map +0 -1
  353. package/dist/backend/entities/bulk-operation.entity.js.map +0 -1
  354. package/dist/backend/entities/bundle-slot-option.entity.d.ts.map +0 -1
  355. package/dist/backend/entities/bundle-slot-option.entity.js.map +0 -1
  356. package/dist/backend/entities/bundle-slot.entity.d.ts.map +0 -1
  357. package/dist/backend/entities/bundle-slot.entity.js.map +0 -1
  358. package/dist/backend/entities/category.entity.d.ts.map +0 -1
  359. package/dist/backend/entities/category.entity.js.map +0 -1
  360. package/dist/backend/entities/gallery-item-channel-hidden.entity.d.ts +0 -14
  361. package/dist/backend/entities/gallery-item-channel-hidden.entity.d.ts.map +0 -1
  362. package/dist/backend/entities/gallery-item-channel-hidden.entity.js +0 -42
  363. package/dist/backend/entities/gallery-item-channel-hidden.entity.js.map +0 -1
  364. package/dist/backend/entities/gallery-item-channel-label.entity.d.ts +0 -18
  365. package/dist/backend/entities/gallery-item-channel-label.entity.d.ts.map +0 -1
  366. package/dist/backend/entities/gallery-item-channel-label.entity.js +0 -49
  367. package/dist/backend/entities/gallery-item-channel-label.entity.js.map +0 -1
  368. package/dist/backend/entities/gallery-item-label.entity.d.ts.map +0 -1
  369. package/dist/backend/entities/gallery-item-label.entity.js.map +0 -1
  370. package/dist/backend/entities/gallery-item.entity.d.ts.map +0 -1
  371. package/dist/backend/entities/gallery-item.entity.js.map +0 -1
  372. package/dist/backend/entities/grouped-item.entity.d.ts.map +0 -1
  373. package/dist/backend/entities/grouped-item.entity.js.map +0 -1
  374. package/dist/backend/entities/product-attachment-channel-hidden.entity.d.ts +0 -13
  375. package/dist/backend/entities/product-attachment-channel-hidden.entity.d.ts.map +0 -1
  376. package/dist/backend/entities/product-attachment-channel-hidden.entity.js +0 -41
  377. package/dist/backend/entities/product-attachment-channel-hidden.entity.js.map +0 -1
  378. package/dist/backend/entities/product-attachment.entity.d.ts.map +0 -1
  379. package/dist/backend/entities/product-attachment.entity.js.map +0 -1
  380. package/dist/backend/entities/product-attribute.entity.d.ts.map +0 -1
  381. package/dist/backend/entities/product-attribute.entity.js.map +0 -1
  382. package/dist/backend/entities/product-channel-language-scope.entity.d.ts.map +0 -1
  383. package/dist/backend/entities/product-channel-language-scope.entity.js.map +0 -1
  384. package/dist/backend/entities/product-channel-scope.entity.d.ts.map +0 -1
  385. package/dist/backend/entities/product-channel-scope.entity.js.map +0 -1
  386. package/dist/backend/entities/product-editor-preference.entity.d.ts.map +0 -1
  387. package/dist/backend/entities/product-editor-preference.entity.js.map +0 -1
  388. package/dist/backend/entities/product-link.entity.d.ts.map +0 -1
  389. package/dist/backend/entities/product-link.entity.js.map +0 -1
  390. package/dist/backend/entities/product-list-saved-view.entity.d.ts.map +0 -1
  391. package/dist/backend/entities/product-list-saved-view.entity.js.map +0 -1
  392. package/dist/backend/entities/product-packaging-unit.entity.d.ts.map +0 -1
  393. package/dist/backend/entities/product-packaging-unit.entity.js.map +0 -1
  394. package/dist/backend/entities/product-url-key.entity.d.ts.map +0 -1
  395. package/dist/backend/entities/product-url-key.entity.js.map +0 -1
  396. package/dist/backend/entities/product-url-redirect.entity.d.ts.map +0 -1
  397. package/dist/backend/entities/product-url-redirect.entity.js.map +0 -1
  398. package/dist/backend/entities/product-value-override.entity.d.ts.map +0 -1
  399. package/dist/backend/entities/product-value-override.entity.js.map +0 -1
  400. package/dist/backend/entities/product-variant.entity.d.ts.map +0 -1
  401. package/dist/backend/entities/product-variant.entity.js.map +0 -1
  402. package/dist/backend/entities/product.entity.d.ts.map +0 -1
  403. package/dist/backend/entities/product.entity.js.map +0 -1
  404. package/dist/backend/index.d.ts.map +0 -1
  405. package/dist/backend/index.js.map +0 -1
  406. package/dist/backend/plugin.d.ts.map +0 -1
  407. package/dist/backend/plugin.js.map +0 -1
  408. package/dist/backend/prompt-tools.d.ts.map +0 -1
  409. package/dist/backend/prompt-tools.js.map +0 -1
  410. package/dist/backend/routes.admin.d.ts.map +0 -1
  411. package/dist/backend/routes.admin.js.map +0 -1
  412. package/dist/backend/routes.admin.url-keys.d.ts.map +0 -1
  413. package/dist/backend/routes.admin.url-keys.js.map +0 -1
  414. package/dist/backend/routes.api-key.d.ts.map +0 -1
  415. package/dist/backend/routes.api-key.js.map +0 -1
  416. package/dist/backend/routes.external.d.ts.map +0 -1
  417. package/dist/backend/routes.external.js.map +0 -1
  418. package/dist/backend/routes.public.d.ts.map +0 -1
  419. package/dist/backend/routes.public.js.map +0 -1
  420. package/dist/backend/routes.public.url-keys.d.ts.map +0 -1
  421. package/dist/backend/routes.public.url-keys.js.map +0 -1
  422. package/dist/backend/saved-view-actor.d.ts.map +0 -1
  423. package/dist/backend/saved-view-actor.js.map +0 -1
  424. package/dist/backend/services/asset-references.d.ts.map +0 -1
  425. package/dist/backend/services/asset-references.js.map +0 -1
  426. package/dist/backend/services/attachment-packaging-scopes.d.ts.map +0 -1
  427. package/dist/backend/services/attachment-packaging-scopes.js.map +0 -1
  428. package/dist/backend/services/attachment.service.d.ts.map +0 -1
  429. package/dist/backend/services/attachment.service.js.map +0 -1
  430. package/dist/backend/services/attribute-option-validator.d.ts.map +0 -1
  431. package/dist/backend/services/attribute-option-validator.js.map +0 -1
  432. package/dist/backend/services/attribute-scope-preview.d.ts.map +0 -1
  433. package/dist/backend/services/attribute-scope-preview.js.map +0 -1
  434. package/dist/backend/services/attribute-set-validations.d.ts.map +0 -1
  435. package/dist/backend/services/attribute-set-validations.js.map +0 -1
  436. package/dist/backend/services/attribute-set.service.d.ts.map +0 -1
  437. package/dist/backend/services/attribute-set.service.js.map +0 -1
  438. package/dist/backend/services/attribute-type-mapping.d.ts.map +0 -1
  439. package/dist/backend/services/attribute-type-mapping.js.map +0 -1
  440. package/dist/backend/services/attribute-value-key.service.d.ts.map +0 -1
  441. package/dist/backend/services/attribute-value-key.service.js.map +0 -1
  442. package/dist/backend/services/audit-references.d.ts.map +0 -1
  443. package/dist/backend/services/audit-references.js.map +0 -1
  444. package/dist/backend/services/bulk-operation-queue.d.ts.map +0 -1
  445. package/dist/backend/services/bulk-operation-queue.js.map +0 -1
  446. package/dist/backend/services/bulk-operation.service.d.ts.map +0 -1
  447. package/dist/backend/services/bulk-operation.service.js.map +0 -1
  448. package/dist/backend/services/bundle.service.d.ts.map +0 -1
  449. package/dist/backend/services/bundle.service.js.map +0 -1
  450. package/dist/backend/services/catalog-admin-search.service.d.ts.map +0 -1
  451. package/dist/backend/services/catalog-admin-search.service.js.map +0 -1
  452. package/dist/backend/services/catalog-admin.service.d.ts.map +0 -1
  453. package/dist/backend/services/catalog-admin.service.js.map +0 -1
  454. package/dist/backend/services/catalog-attribute-read.service.d.ts.map +0 -1
  455. package/dist/backend/services/catalog-attribute-read.service.js.map +0 -1
  456. package/dist/backend/services/catalog-bulk-import.service.d.ts.map +0 -1
  457. package/dist/backend/services/catalog-bulk-import.service.js.map +0 -1
  458. package/dist/backend/services/catalog-bulk-update.service.d.ts.map +0 -1
  459. package/dist/backend/services/catalog-bulk-update.service.js.map +0 -1
  460. package/dist/backend/services/catalog-category-read.service.d.ts.map +0 -1
  461. package/dist/backend/services/catalog-category-read.service.js.map +0 -1
  462. package/dist/backend/services/catalog-org-price-decorator.d.ts.map +0 -1
  463. package/dist/backend/services/catalog-org-price-decorator.js.map +0 -1
  464. package/dist/backend/services/catalog-product-filter.service.d.ts.map +0 -1
  465. package/dist/backend/services/catalog-product-filter.service.js.map +0 -1
  466. package/dist/backend/services/catalog-product-read.service.d.ts.map +0 -1
  467. package/dist/backend/services/catalog-product-read.service.js.map +0 -1
  468. package/dist/backend/services/catalog-query.service.d.ts.map +0 -1
  469. package/dist/backend/services/catalog-query.service.js.map +0 -1
  470. package/dist/backend/services/catalog-quick-search.service.d.ts.map +0 -1
  471. package/dist/backend/services/catalog-quick-search.service.js.map +0 -1
  472. package/dist/backend/services/catalog-write-ports.d.ts.map +0 -1
  473. package/dist/backend/services/catalog-write-ports.js.map +0 -1
  474. package/dist/backend/services/category-admin.service.d.ts.map +0 -1
  475. package/dist/backend/services/category-admin.service.js.map +0 -1
  476. package/dist/backend/services/channel-url-facts.d.ts.map +0 -1
  477. package/dist/backend/services/channel-url-facts.js.map +0 -1
  478. package/dist/backend/services/effective-value.sql.d.ts.map +0 -1
  479. package/dist/backend/services/effective-value.sql.js.map +0 -1
  480. package/dist/backend/services/gallery-scopes.d.ts.map +0 -1
  481. package/dist/backend/services/gallery-scopes.js.map +0 -1
  482. package/dist/backend/services/gallery.service.d.ts.map +0 -1
  483. package/dist/backend/services/gallery.service.js.map +0 -1
  484. package/dist/backend/services/grouped.service.d.ts.map +0 -1
  485. package/dist/backend/services/grouped.service.js.map +0 -1
  486. package/dist/backend/services/label-resolver.d.ts.map +0 -1
  487. package/dist/backend/services/label-resolver.js.map +0 -1
  488. package/dist/backend/services/linkable-asset.d.ts.map +0 -1
  489. package/dist/backend/services/linkable-asset.js.map +0 -1
  490. package/dist/backend/services/packaging-unit.service.d.ts.map +0 -1
  491. package/dist/backend/services/packaging-unit.service.js.map +0 -1
  492. package/dist/backend/services/primary-asset-url.d.ts.map +0 -1
  493. package/dist/backend/services/primary-asset-url.js.map +0 -1
  494. package/dist/backend/services/product-availability.service.d.ts.map +0 -1
  495. package/dist/backend/services/product-availability.service.js.map +0 -1
  496. package/dist/backend/services/product-availability.sql.d.ts.map +0 -1
  497. package/dist/backend/services/product-availability.sql.js.map +0 -1
  498. package/dist/backend/services/product-editor-preferences.service.d.ts.map +0 -1
  499. package/dist/backend/services/product-editor-preferences.service.js.map +0 -1
  500. package/dist/backend/services/product-link.service.d.ts.map +0 -1
  501. package/dist/backend/services/product-link.service.js.map +0 -1
  502. package/dist/backend/services/product-list-view-service.d.ts.map +0 -1
  503. package/dist/backend/services/product-list-view-service.js.map +0 -1
  504. package/dist/backend/services/product-overrides.service.d.ts +0 -84
  505. package/dist/backend/services/product-overrides.service.d.ts.map +0 -1
  506. package/dist/backend/services/product-overrides.service.js +0 -211
  507. package/dist/backend/services/product-overrides.service.js.map +0 -1
  508. package/dist/backend/services/product-page-revalidation.d.ts.map +0 -1
  509. package/dist/backend/services/product-page-revalidation.js.map +0 -1
  510. package/dist/backend/services/product-scope-context.service.d.ts +0 -36
  511. package/dist/backend/services/product-scope-context.service.d.ts.map +0 -1
  512. package/dist/backend/services/product-scope-context.service.js +0 -107
  513. package/dist/backend/services/product-scope-context.service.js.map +0 -1
  514. package/dist/backend/services/product-scopes.service.d.ts.map +0 -1
  515. package/dist/backend/services/product-scopes.service.js.map +0 -1
  516. package/dist/backend/services/product-summary-text.d.ts.map +0 -1
  517. package/dist/backend/services/product-summary-text.js.map +0 -1
  518. package/dist/backend/services/product-type-validations.d.ts.map +0 -1
  519. package/dist/backend/services/product-type-validations.js.map +0 -1
  520. package/dist/backend/services/product-value-resolver.service.d.ts.map +0 -1
  521. package/dist/backend/services/product-value-resolver.service.js.map +0 -1
  522. package/dist/backend/services/publication-window-sweep.d.ts.map +0 -1
  523. package/dist/backend/services/publication-window-sweep.js.map +0 -1
  524. package/dist/backend/services/scope-completeness.d.ts.map +0 -1
  525. package/dist/backend/services/scope-completeness.js.map +0 -1
  526. package/dist/backend/services/scope-overview.service.d.ts.map +0 -1
  527. package/dist/backend/services/scope-overview.service.js.map +0 -1
  528. package/dist/backend/services/sql-id-arrays.d.ts.map +0 -1
  529. package/dist/backend/services/sql-id-arrays.js.map +0 -1
  530. package/dist/backend/services/storefront-value-overrides.d.ts.map +0 -1
  531. package/dist/backend/services/storefront-value-overrides.js.map +0 -1
  532. package/dist/backend/services/system-attribute-scopes.d.ts.map +0 -1
  533. package/dist/backend/services/system-attribute-scopes.js.map +0 -1
  534. package/dist/backend/services/url-key-resolution.service.d.ts.map +0 -1
  535. package/dist/backend/services/url-key-resolution.service.js.map +0 -1
  536. package/dist/backend/services/url-key.service.d.ts.map +0 -1
  537. package/dist/backend/services/url-key.service.js.map +0 -1
  538. package/dist/backend/services/viewer-organization.d.ts.map +0 -1
  539. package/dist/backend/services/viewer-organization.js.map +0 -1
  540. package/dist/manifest.d.ts.map +0 -1
  541. package/dist/manifest.js.map +0 -1
  542. package/dist/migrations/20260429T064146_catalog_attribute_sets_init.d.ts.map +0 -1
  543. package/dist/migrations/20260429T064146_catalog_attribute_sets_init.js.map +0 -1
  544. package/dist/migrations/20260429T070004_catalog_product_attribute_extensions.d.ts.map +0 -1
  545. package/dist/migrations/20260429T070004_catalog_product_attribute_extensions.js.map +0 -1
  546. package/dist/migrations/20260429T102322_catalog_product_type_and_virtual_fields.d.ts.map +0 -1
  547. package/dist/migrations/20260429T102322_catalog_product_type_and_virtual_fields.js.map +0 -1
  548. package/dist/migrations/20260429T111839_catalog_gallery_items_and_labels.d.ts.map +0 -1
  549. package/dist/migrations/20260429T111839_catalog_gallery_items_and_labels.js.map +0 -1
  550. package/dist/migrations/20260429T112543_catalog_product_attachments.d.ts.map +0 -1
  551. package/dist/migrations/20260429T112543_catalog_product_attachments.js.map +0 -1
  552. package/dist/migrations/20260429T123726_catalog_product_links.d.ts.map +0 -1
  553. package/dist/migrations/20260429T123726_catalog_product_links.js.map +0 -1
  554. package/dist/migrations/20260429T130803_catalog_grouped_and_bundle.d.ts.map +0 -1
  555. package/dist/migrations/20260429T130803_catalog_grouped_and_bundle.js.map +0 -1
  556. package/dist/migrations/20260501T185835_catalog_product_attribute_is_comparable.d.ts.map +0 -1
  557. package/dist/migrations/20260501T185835_catalog_product_attribute_is_comparable.js.map +0 -1
  558. package/dist/migrations/20260505T060113_catalog_attribute_options_and_flags.d.ts.map +0 -1
  559. package/dist/migrations/20260505T060113_catalog_attribute_options_and_flags.js.map +0 -1
  560. package/dist/migrations/20260515T082629_catalog_attribute_mass_editable.d.ts.map +0 -1
  561. package/dist/migrations/20260515T082629_catalog_attribute_mass_editable.js.map +0 -1
  562. package/dist/migrations/20260526T124736_catalog_product_status_inactive.d.ts.map +0 -1
  563. package/dist/migrations/20260526T124736_catalog_product_status_inactive.js.map +0 -1
  564. package/dist/migrations/20260611T140346_catalog_product_value_overrides_init.d.ts.map +0 -1
  565. package/dist/migrations/20260611T140346_catalog_product_value_overrides_init.js.map +0 -1
  566. package/dist/migrations/20260611T140400_catalog_attribute_quick_searchable.d.ts.map +0 -1
  567. package/dist/migrations/20260611T140400_catalog_attribute_quick_searchable.js.map +0 -1
  568. package/dist/migrations/20260611T140407_catalog_bulk_operations.d.ts.map +0 -1
  569. package/dist/migrations/20260611T140407_catalog_bulk_operations.js.map +0 -1
  570. package/dist/migrations/20260611T140408_catalog_bulk_operation_logs.d.ts.map +0 -1
  571. package/dist/migrations/20260611T140408_catalog_bulk_operation_logs.js.map +0 -1
  572. package/dist/migrations/20260611T140412_catalog_product_packaging_units.d.ts.map +0 -1
  573. package/dist/migrations/20260611T140412_catalog_product_packaging_units.js.map +0 -1
  574. package/dist/migrations/20260718T060659_catalog_bulk_operation_revert_state.d.ts.map +0 -1
  575. package/dist/migrations/20260718T060659_catalog_bulk_operation_revert_state.js.map +0 -1
  576. package/dist/migrations/20260718T200343_catalog_category_custom_field_values.d.ts.map +0 -1
  577. package/dist/migrations/20260718T200343_catalog_category_custom_field_values.js.map +0 -1
  578. package/dist/migrations/20260723T230401_catalog_attributes_on_custom_fields.d.ts.map +0 -1
  579. package/dist/migrations/20260723T230401_catalog_attributes_on_custom_fields.js.map +0 -1
  580. package/dist/migrations/20260804T152604_catalog_widen_product_sku.d.ts.map +0 -1
  581. package/dist/migrations/20260804T152604_catalog_widen_product_sku.js.map +0 -1
  582. package/dist/migrations/20260804T160244_catalog_category_activation.d.ts.map +0 -1
  583. package/dist/migrations/20260804T160244_catalog_category_activation.js.map +0 -1
  584. package/dist/migrations/20260912T094557_catalog_sales_channel_products.d.ts.map +0 -1
  585. package/dist/migrations/20260912T094557_catalog_sales_channel_products.js.map +0 -1
  586. package/dist/migrations/20260912T094623_catalog_sales_channel_categories.d.ts.map +0 -1
  587. package/dist/migrations/20260912T094623_catalog_sales_channel_categories.js.map +0 -1
  588. package/dist/migrations/20260925T125527_catalog_inventory_columns.d.ts.map +0 -1
  589. package/dist/migrations/20260925T125527_catalog_inventory_columns.js.map +0 -1
  590. package/dist/migrations/20261008T080839_catalog_product_attribute_is_price_rule.d.ts.map +0 -1
  591. package/dist/migrations/20261008T080839_catalog_product_attribute_is_price_rule.js.map +0 -1
  592. package/dist/migrations/20261008T092714_catalog_category_content.d.ts.map +0 -1
  593. package/dist/migrations/20261008T092714_catalog_category_content.js.map +0 -1
  594. package/dist/migrations/20261014T170531_catalog_product_list_saved_views.d.ts.map +0 -1
  595. package/dist/migrations/20261014T170531_catalog_product_list_saved_views.js.map +0 -1
  596. package/dist/migrations/20261016T082008_catalog_order_rules.d.ts.map +0 -1
  597. package/dist/migrations/20261016T082008_catalog_order_rules.js.map +0 -1
  598. package/dist/migrations/20261022T035133_catalog_product_scopes.d.ts.map +0 -1
  599. package/dist/migrations/20261022T035133_catalog_product_scopes.js.map +0 -1
  600. package/dist/migrations/20261022T054223_catalog_product_url_keys.d.ts.map +0 -1
  601. package/dist/migrations/20261022T054223_catalog_product_url_keys.js.map +0 -1
  602. package/dist/migrations/20261022T111811_catalog_price_fields_removed.d.ts.map +0 -1
  603. package/dist/migrations/20261022T111811_catalog_price_fields_removed.js.map +0 -1
  604. package/dist/migrations/20261022T182523_catalog_admin_name_keys.d.ts.map +0 -1
  605. package/dist/migrations/20261022T182523_catalog_admin_name_keys.js.map +0 -1
  606. package/dist/migrations/20261025T222634_catalog_product_status_drop_draft.d.ts.map +0 -1
  607. package/dist/migrations/20261025T222634_catalog_product_status_drop_draft.js.map +0 -1
  608. package/dist/migrations/20261026T033453_catalog_product_media_scopes.d.ts.map +0 -1
  609. package/dist/migrations/20261026T033453_catalog_product_media_scopes.js.map +0 -1
  610. package/dist/migrations/20261026T084533_catalog_attachment_packaging_translations.d.ts.map +0 -1
  611. package/dist/migrations/20261026T084533_catalog_attachment_packaging_translations.js.map +0 -1
  612. package/dist/migrations/index.d.ts.map +0 -1
  613. package/dist/migrations/index.js.map +0 -1
  614. package/dist/ports/index.d.ts.map +0 -1
  615. package/dist/ports/index.js.map +0 -1
@@ -12,40 +12,31 @@ import { ProductPackagingUnit } from '../entities/product-packaging-unit.entity.
12
12
  import { BundleSlot } from '../entities/bundle-slot.entity.js';
13
13
  import { BundleSlotOption } from '../entities/bundle-slot-option.entity.js';
14
14
  import { resolvePrimaryAssetUrls } from './primary-asset-url.js';
15
- import { effectiveGallery, loadGalleryChannelOverrides } from './gallery-scopes.js';
16
- import { loadAttachmentsHiddenInChannel } from './attachment-packaging-scopes.js';
15
+ import { effectiveGallery, loadGalleryScopes } from './gallery-scopes.js';
16
+ import { loadAttachmentsAtScope, loadPackagingUnitNamesAtScope } from './attachment-packaging-scopes.js';
17
17
  import { viewerOrganizationFor } from './viewer-organization.js';
18
18
  import { channelUrlFactsOf } from './channel-url-facts.js';
19
- import { effectiveAttributeValues, effectiveSystemText, loadChannelOverridesByProduct, overrideLanguages, } from './storefront-value-overrides.js';
19
+ import { effectiveAttributeValues, effectiveSystemText, loadChannelOverridesByProduct, } from './storefront-value-overrides.js';
20
20
  import { availabilityCondition, } from './product-availability.sql.js';
21
21
  import { effectiveAttributeSql, effectiveTextSql, } from './effective-value.sql.js';
22
22
  import { availableAmong, globalScopeFields, isAvailableWith, loadChannelScopeRows, toScopeChannel, } from './product-availability.service.js';
23
23
  import { uuidArrayLiteral } from './sql-id-arrays.js';
24
24
  import { findCurrentKeyHolder, loadEffectiveKeys } from './url-key-resolution.service.js';
25
- import { ANONYMOUS_PRODUCT_AUDIENCE, ERROR_CODES, compareDecimal, productDefaultPath, productPath, decimalText, formatUnits, isOrderMinimumEligibleType, effectiveOrderRules, normaliseAmount, effectiveAudience, isPriceSort, isProductVisibleTo, listingPriceChannelContext, resolveScopeLanguage, listingPriceMoney, translationAt, effectivePackagingUnitName, } from '@endora-commerce/contracts';
25
+ import { ANONYMOUS_PRODUCT_AUDIENCE, ERROR_CODES, compareDecimal, productDefaultPath, productPath, decimalText, formatUnits, isOrderMinimumEligibleType, effectiveOrderRules, normaliseAmount, effectiveAudience, isPriceSort, isProductVisibleTo, listingPriceChannelContext, resolveScopeLanguage, listingPriceMoney, scopeLanguageOf, isUuidShape, } from '@endora-commerce/contracts';
26
26
  import { HttpError } from '@endora-commerce/platform/http';
27
27
  import { encodeCursor, decodeCursor } from '@endora-commerce/platform/http';
28
+ import { attributeFilterMatches } from './attribute-filter-match.js';
28
29
  import { productSummaryText } from './product-summary-text.js';
29
- /** A uuid as the database spells one — anything else is a 404 or a discarded cursor, not a query. */
30
- const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
31
- /** A category id as the database spells one — anything else is a 404, not a query. */
32
- const CATEGORY_ID_RE = UUID_RE;
30
+ import { resolvePageBuilderLanguage } from './page-builder-content.js';
31
+ import { contentAttributeMembers } from './product-content.service.js';
33
32
  /** The deepest ancestor chain {@link CatalogQueryService.getCategoryPageContent} walks. */
34
33
  const MAX_CATEGORY_DEPTH = 64;
35
34
  /**
36
- * Whether a Page Builder document would render anything: a block at the top
37
- * level, or in a legacy `zones` bucket. An editor that was opened and saved
38
- * untouched stores a document with neither.
35
+ * Moved to `page-builder-content.ts` by feature 172, with the rest of the Page
36
+ * Builder helpers category and product content share; re-exported here for
37
+ * its existing importers.
39
38
  */
40
- export function hasPageBuilderBlocks(tree) {
41
- if (Array.isArray(tree['content']) && tree['content'].length > 0)
42
- return true;
43
- const zones = tree['zones'];
44
- if (zones && typeof zones === 'object') {
45
- return Object.values(zones).some((zone) => Array.isArray(zone) && zone.length > 0);
46
- }
47
- return false;
48
- }
39
+ export { hasPageBuilderBlocks } from './page-builder-content.js';
49
40
  function encodeObjectCursor(value) {
50
41
  return encodeCursor(JSON.stringify(value));
51
42
  }
@@ -64,7 +55,7 @@ function isRecord(value) {
64
55
  return typeof value === 'object' && value !== null;
65
56
  }
66
57
  function isUuidText(value) {
67
- return typeof value === 'string' && UUID_RE.test(value);
58
+ return typeof value === 'string' && isUuidShape(value);
68
59
  }
69
60
  /**
70
61
  * A price a cursor carries, normalised to four places, or `null` when it is not
@@ -183,31 +174,25 @@ function jsStringOfNumeric(n) {
183
174
  `else (${n})::float8::text end)`);
184
175
  }
185
176
  /**
186
- * JavaScript's `String(value)` for a `jsonb` SQL expression, as the attribute
187
- * filter needs it.
177
+ * JavaScript's `String(value)` for a **non-array** `jsonb` SQL expression, as
178
+ * the attribute filter needs it — the text one option is compared as.
188
179
  *
189
180
  * A string or a boolean is its own text, a number is
190
181
  * {@link jsStringOfNumeric}, a JSON `null` reads `'null'` and an object reads
191
- * `[object Object]`. An **array** — a multiselect — joins its elements with a
192
- * comma, each rendered the same way except that a `null` element is empty,
193
- * which is `Array.prototype.join`'s rule.
182
+ * `[object Object]`. An array is not this function's: `#attributeCondition`
183
+ * walks a multiselect's elements and renders each one here (issue #684).
194
184
  *
195
- * One kind is not reproduced: an array **nested inside** an array. JavaScript
196
- * flattens it into the join (`[[1, 2], 3]` reads `1,2,3`); here the inner array
197
- * contributes its JSON text. No attribute type stores one.
185
+ * One kind is not reproduced: an array **nested inside** a multiselect.
186
+ * JavaScript renders it as its comma-joined elements (`[1, 2]` reads `1,2`);
187
+ * here it contributes its JSON text. No attribute type stores one.
198
188
  */
199
189
  function jsStringOfJsonb(value) {
200
- const scalar = (v, nullText) => `(case jsonb_typeof(${v}) ` +
201
- `when 'null' then '${nullText}' ` +
190
+ return (`(case jsonb_typeof(${value}) ` +
191
+ `when 'null' then 'null' ` +
202
192
  `when 'object' then '[object Object]' ` +
203
193
  `when 'number' then (select ${jsStringOfNumeric('num.n')} ` +
204
- `from (select (${v} #>> '{}')::numeric as n) num) ` +
205
- `else ${v} #>> '{}' end)`;
206
- return (`(case jsonb_typeof(${value}) ` +
207
- `when 'array' then (` +
208
- `select coalesce(string_agg(${scalar('el.value', '')}, ',' order by el.position), '') ` +
209
- `from jsonb_array_elements(${value}) with ordinality as el(value, position)) ` +
210
- `else ${scalar(value, 'null')} end)`);
194
+ `from (select (${value} #>> '{}')::numeric as n) num) ` +
195
+ `else ${value} #>> '{}' end)`);
211
196
  }
212
197
  export class CatalogQueryService {
213
198
  emFactory;
@@ -222,6 +207,7 @@ export class CatalogQueryService {
222
207
  log;
223
208
  cursorSeal;
224
209
  seoProductMeta;
210
+ isPageBuilderPresent;
225
211
  constructor(emFactory,
226
212
  /**
227
213
  * Feature 002 US4 — optional link provider so the PDP `productDetail`
@@ -332,7 +318,15 @@ export class CatalogQueryService {
332
318
  * Feature 163 — the product page's metadata through `seo` (R13). Optional: a
333
319
  * composition without it, like `seo` off, serves the derived metadata.
334
320
  */
335
- seoProductMeta) {
321
+ seoProductMeta,
322
+ /**
323
+ * Feature 172 (FR-051, research R-13, owner ruling OR-8) — whether the Page
324
+ * Builder's owner is effectively present. It gates one projection only: the
325
+ * product page's `contentAttributes`. Optional only in the signature, and an
326
+ * unwired probe answers "absent", so a composition that forgets it serves no
327
+ * content rather than content the operator may have switched off.
328
+ */
329
+ isPageBuilderPresent) {
336
330
  this.emFactory = emFactory;
337
331
  this.productLinkService = productLinkService;
338
332
  this.customFieldDefinitions = customFieldDefinitions;
@@ -345,6 +339,7 @@ export class CatalogQueryService {
345
339
  this.log = log;
346
340
  this.cursorSeal = cursorSeal;
347
341
  this.seoProductMeta = seoProductMeta;
342
+ this.isPageBuilderPresent = isPageBuilderPresent;
348
343
  }
349
344
  #requireCursorSeal() {
350
345
  if (!this.cursorSeal) {
@@ -449,6 +444,26 @@ export class CatalogQueryService {
449
444
  }
450
445
  return this.listingPriceOrder;
451
446
  }
447
+ /**
448
+ * Issue #420 — a price sort or a price range on a page whose display mode is
449
+ * `none` for this viewer is a `400 PRICE_ORDERING_UNAVAILABLE`, here and not
450
+ * only at the public route (feature 086, FR-016). The route asks the same
451
+ * question to decide whether to offer the controls at all; this is the
452
+ * defence in depth that keeps a caller which skips the route — an internal
453
+ * one, a future one — from narrowing a range step by step until it has
454
+ * inferred the prices the page withholds. Resolved for the viewer the page's
455
+ * prices and order are resolved for ({@link #viewerPricingContext}).
456
+ */
457
+ async #refusePriceControlsWherePricesHidden(ctx) {
458
+ const mode = ctx.pageDisplayMode ??
459
+ (await this.#requireListingPriceOrder().pageDisplayMode({
460
+ context: await this.#viewerPricingContext(ctx),
461
+ }));
462
+ if (mode === 'none') {
463
+ throw new HttpError(400, ERROR_CODES.PRICE_ORDERING_UNAVAILABLE, 'Prices are not displayed on this page, so the catalogue cannot be ordered or filtered by price.');
464
+ }
465
+ return ctx.pageDisplayMode === mode ? ctx : { ...ctx, pageDisplayMode: mode };
466
+ }
452
467
  #requireOrganizationDetails() {
453
468
  if (!this.organizationDetails) {
454
469
  throw new Error('CatalogQueryService: the organization read port is not wired — a signed-in buyer cannot be priced.');
@@ -577,8 +592,8 @@ export class CatalogQueryService {
577
592
  // Primary asset — for listings prefer the gallery's Thumbnail (US3),
578
593
  // then Base Image, then any first gallery item, finally the legacy
579
594
  // product_assets row. Resolution chain pinned by T096; run over the gallery as
580
- // the request's channel shows it (feature 163, FR-076).
581
- const assetUrlByProduct = await resolvePrimaryAssetUrls(em, this.#requireAssets(), productIds, channelId);
595
+ // the request's (channel, language) shows it (feature 163 FR-076, feature 174).
596
+ const assetUrlByProduct = await resolvePrimaryAssetUrls(em, this.#requireAssets(), productIds, channelId, this.#availabilityScope(ctx).languageCode);
582
597
  const ids = [...productIds];
583
598
  const catRows = await em.execute(`select pc.product_id::text as product_id, c.slug
584
599
  from product_categories pc
@@ -629,6 +644,12 @@ export class CatalogQueryService {
629
644
  // Products
630
645
  // ------------------------------------------------------------------
631
646
  async listProducts(params, ctx) {
647
+ // Issue #420 — refused before anything is read, the cursor included. The
648
+ // answer travels on with the context, so a walk that re-enters this method
649
+ // (`#listUnordered`) does not resolve it again.
650
+ if (isPriceSort(params.sort) || params.minPrice !== undefined || params.maxPrice !== undefined) {
651
+ ctx = await this.#refusePriceControlsWherePricesHidden(ctx);
652
+ }
632
653
  // A price walk that began in the default order, for want of a price order,
633
654
  // continues in it to its end — the default listing's page, so nothing the
634
655
  // price path would read first is read (review 2, finding 7).
@@ -768,8 +789,9 @@ export class CatalogQueryService {
768
789
  * - **the category** is an `exists` over this module's own
769
790
  * `product_categories`, against the tree's ids rather than against every
770
791
  * product id the tree holds, which is what the page-side test loaded;
771
- * - **each attribute filter** is `#passesPageFilters`' string comparison
772
- * restated — see `#attributeCondition`.
792
+ * - **each attribute filter** is not built here but in `#listingFilters`,
793
+ * as `#attributeCondition` — {@link attributeFilterMatches}, the page-side
794
+ * predicate, restated in SQL.
773
795
  *
774
796
  * **No `raw()` fragment is created here** — these are descriptions, and the
775
797
  * caller turns them into keys in the expression that executes them. A
@@ -799,27 +821,28 @@ export class CatalogQueryService {
799
821
  return conditions;
800
822
  }
801
823
  /**
802
- * One `filter[attr.<key>]`, as SQL: the product's value for `key`, rendered
803
- * the way `#passesPageFilters` renders it, is one of the requested values.
804
- *
805
- * That method compares `String(value)`, so this is `String` restated for the
806
- * JSON kinds a stored value can take — see {@link jsStringOfJsonb}. A key the
807
- * product does not carry is SQL `NULL` throughout and matches nothing, which
808
- * is the method's `undefined` arm.
824
+ * One `filter[attr.<key>]`, as SQL: {@link attributeFilterMatches} restated —
825
+ * the product's value for `key`, rendered as `String` renders it, is one of
826
+ * the requested values, and a multiselect matches when **any** of its options
827
+ * is (issue #684). `#listingFilters`' `passes` calls that function, so the
828
+ * statement and the page agree.
809
829
  *
810
- * The comparison is deliberately not improved here. A multiselect holding two
811
- * options matches neither of them alone, on either side of this change; that
812
- * is a question about what the filter means, and answering it in the
813
- * statement only would make the page-side predicate disagree with it.
830
+ * A scalar is walked as a one-element array, each element rendered by
831
+ * {@link jsStringOfJsonb}. A key the product does not carry is SQL `NULL`,
832
+ * walked as no element, and matches nothing — the function's `undefined`
833
+ * arm; an empty multiselect matches nothing for the same reason.
814
834
  */
815
835
  #attributeCondition(value, values) {
816
836
  const wanted = values.map((v) => String(v));
817
837
  if (wanted.length === 0)
818
838
  return { sql: () => 'false', params: [] };
819
839
  return {
820
- sql: (alias) => `(select ${jsStringOfJsonb('val.v')} ` +
821
- `from (select ${value.sql(alias)} as v) val) ` +
822
- `in (${wanted.map(() => '?').join(',')})`,
840
+ sql: (alias) => `exists (select 1 from (select ${value.sql(alias)} as v) val ` +
841
+ `cross join lateral jsonb_array_elements(case ` +
842
+ `when val.v is null then '[]'::jsonb ` +
843
+ `when jsonb_typeof(val.v) = 'array' then val.v ` +
844
+ `else jsonb_build_array(val.v) end) as el(value) ` +
845
+ `where ${jsStringOfJsonb('el.value')} in (${wanted.map(() => '?').join(',')}))`,
823
846
  params: [...value.params, ...wanted],
824
847
  };
825
848
  }
@@ -848,8 +871,8 @@ export class CatalogQueryService {
848
871
  }
849
872
  if (params.q)
850
873
  conditions.push(await this.#textSearchCondition(params.q, ctx, effective));
851
- const scopeOf = new Map(attributeViews.map((a) => [a.key, { channelScoped: a.channelScoped, languageScoped: a.languageScoped }]));
852
- const notScoped = { channelScoped: false, languageScoped: false };
874
+ const scopeOf = new Map(attributeViews.map((a) => [a.key, a.scopeLevels]));
875
+ const notScoped = ['G'];
853
876
  const attributeFilters = Object.entries(params.attributeFilters ?? {});
854
877
  for (const [key, values] of attributeFilters) {
855
878
  conditions.push(this.#attributeCondition(effectiveAttributeSql(key, scopeOf.get(key) ?? notScoped, effective), values));
@@ -870,10 +893,7 @@ export class CatalogQueryService {
870
893
  const overrides = await loadChannelOverridesByProduct(em, products.map((p) => p.id), channel.id);
871
894
  for (const product of products) {
872
895
  const values = await effectiveAttributeValues(product.attributeValues ?? {}, overrides.get(product.id), effective, async () => scopeOf);
873
- const ok = attributeFilters.every(([key, wanted]) => {
874
- const v = values[key];
875
- return v !== undefined && wanted.map((w) => String(w)).includes(String(v));
876
- });
896
+ const ok = attributeFilters.every(([key, wanted]) => attributeFilterMatches(values[key], wanted.map((w) => String(w))));
877
897
  if (ok)
878
898
  out.add(product.id);
879
899
  }
@@ -889,7 +909,7 @@ export class CatalogQueryService {
889
909
  const searchable = await this.#requireAttributeRead().listByFlag('isSearchable');
890
910
  const like = `%${q}%`;
891
911
  const name = this.#effectiveNameExpr(ctx);
892
- const attributes = searchable.map((a) => effectiveAttributeSql(a.key, { channelScoped: a.channelScoped, languageScoped: a.languageScoped }, effective));
912
+ const attributes = searchable.map((a) => effectiveAttributeSql(a.key, a.scopeLevels, effective));
893
913
  return {
894
914
  sql: (alias) => `(${alias}.sku ilike ? or ${name.sql(alias)} ilike ?` +
895
915
  attributes.map((e) => ` or (${e.sql(alias)} #>> '{}') ilike ?`).join('') +
@@ -1514,18 +1534,18 @@ export class CatalogQueryService {
1514
1534
  return { canonical: pathAt(scope.languageCode), alternates, xDefault };
1515
1535
  }
1516
1536
  /**
1517
- * The product page's read (R28): an id; else a **current** key of the request's
1518
- * language L (any channel's key of L counts — `findCurrentKeyHolder`); else a
1537
+ * The product page's read (R28): an id; else the product whose effective key at the
1538
+ * request's (C, L) it is (`findCurrentKeyHolder`, feature 174); else a
1519
1539
  * product's global key, the stable handle CMS product blocks store. Never a
1520
1540
  * redirect: the storefront resolves a URL through `resolve` and reads by id.
1521
1541
  */
1522
1542
  async getProductByIdOrSlug(idOrSlug, ctx) {
1523
1543
  const em = this.emFactory();
1524
1544
  const channel = ctx.resolvedChannel;
1525
- const isUuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(idOrSlug);
1545
+ const isUuid = isUuidShape(idOrSlug);
1526
1546
  const product = isUuid
1527
1547
  ? await em.findOne(Product, { id: idOrSlug })
1528
- : ((await findCurrentKeyHolder(em, idOrSlug, this.#availabilityScope(ctx).languageCode)) ??
1548
+ : ((await findCurrentKeyHolder(em, idOrSlug, channel.id, this.#availabilityScope(ctx).languageCode)) ??
1529
1549
  (await em.findOne(Product, { slug: idOrSlug })));
1530
1550
  if (!product || product.deletedAt) {
1531
1551
  throw new HttpError(404, ERROR_CODES.PRODUCT_NOT_FOUND, 'Product not found.');
@@ -1565,8 +1585,11 @@ export class CatalogQueryService {
1565
1585
  // Feature 002 US3 — eager-load gallery + attachments for the PDP.
1566
1586
  // Gallery: items + label bridge zipped per item; Asset urls
1567
1587
  // resolved into a flat shape the storefront can render directly.
1568
- // Feature 163 (FR-076, R14) — the gallery as the request's channel shows it:
1569
- // hidden items dropped, each role at its channel holder (`effectiveGallery`).
1588
+ // Feature 163 (FR-076, R14), feature 174 (data-model §6) — the gallery as the request's
1589
+ // (channel, language) shows it: hidden items dropped, each role at its scope holder
1590
+ // (`effectiveGallery`), each alt text at the scope.
1591
+ const scopeLanguage = this.#availabilityScope(ctx).languageCode;
1592
+ const readScope = { channelId: channel.id, languageCode: scopeLanguage };
1570
1593
  const storedGalleryItems = await em.find(GalleryItem, { productId: product.id }, { orderBy: { position: 'asc', id: 'asc' } });
1571
1594
  const galleryLabels = storedGalleryItems.length > 0
1572
1595
  ? await em.find(GalleryItemLabel, { productId: product.id })
@@ -1578,7 +1601,7 @@ export class CatalogQueryService {
1578
1601
  globalLabelsByItem.set(l.galleryItemId, existing);
1579
1602
  }
1580
1603
  const galleryOverrides = storedGalleryItems.length > 0
1581
- ? (await loadGalleryChannelOverrides(em, [product.id], channel.id)).get(product.id)
1604
+ ? (await loadGalleryScopes(em, [product.id], readScope)).get(product.id)
1582
1605
  : undefined;
1583
1606
  const galleryItems = effectiveGallery(storedGalleryItems.map((item) => ({ id: item.id, item, labels: globalLabelsByItem.get(item.id) ?? [] })), galleryOverrides);
1584
1607
  const labelsByItem = new Map(galleryItems.map((g) => [g.id, g.labels]));
@@ -1593,19 +1616,24 @@ export class CatalogQueryService {
1593
1616
  // names the same asset.
1594
1617
  const hiddenAssetIds = new Set(storedGalleryItems.filter((item) => galleryOverrides?.hidden.has(item.id)).map((item) => item.assetId));
1595
1618
  const assets = allAssets.filter((asset) => !hiddenAssetIds.has(asset.id));
1596
- // FR-077 (R15) — the product's own alt text at the scope language, else the
1597
- // asset's alt text through the existing pick.
1598
- const scopeLanguage = this.#availabilityScope(ctx).languageCode;
1599
- const altTextOf = (item, asset) => translationAt(item.altText, scopeLanguage) ??
1619
+ // FR-077 (R15), feature 174 (T035) — the image's alt text at (C, L): its override there
1620
+ // (`''` for an empty one: a decorative image, rendered `alt=""`), else its Global alt
1621
+ // text, else the asset's alt text through the existing pick; `null` = none.
1622
+ const altTextOf = (item, asset) => galleryOverrides?.altText.get(item.id) ??
1623
+ item.altText ??
1600
1624
  (asset.altText ? this.pickLang(asset.altText, ctx.preferredLanguage, channel) : null);
1601
1625
  // Attachments + their types, eager-loaded in two queries.
1602
- // Feature 163 (FR-078, R16) — an attachment hidden in the request's channel is
1603
- // neither listed nor named here (its asset is not even read).
1626
+ // Feature 163 (FR-078, R16), feature 174 (data-model §7) — each attachment's name,
1627
+ // description and hidden flag at (C, L); a hidden one is neither listed nor named
1628
+ // here (its asset is not even read).
1604
1629
  const storedAttachmentRows = await em.find(ProductAttachment, { productId: product.id }, { orderBy: { position: 'asc', id: 'asc' } });
1605
- const hiddenAttachments = storedAttachmentRows.length > 0
1606
- ? await loadAttachmentsHiddenInChannel(em, product.id, channel.id)
1607
- : new Set();
1608
- const attachmentRows = storedAttachmentRows.filter((row) => !hiddenAttachments.has(row.id));
1630
+ const attachmentsAtScope = await loadAttachmentsAtScope(em, product.id, storedAttachmentRows.map((row) => ({
1631
+ id: row.id,
1632
+ name: row.name,
1633
+ description: row.description ?? null,
1634
+ hidden: row.hidden === true,
1635
+ })), readScope);
1636
+ const attachmentRows = storedAttachmentRows.filter((row) => attachmentsAtScope.get(row.id)?.hidden !== true);
1609
1637
  const attachmentTypeIds = [...new Set(attachmentRows.map((a) => a.attachmentTypeId))];
1610
1638
  const attachmentTypesById = new Map();
1611
1639
  if (attachmentTypeIds.length > 0) {
@@ -1620,7 +1648,7 @@ export class CatalogQueryService {
1620
1648
  for (const a of aAssets)
1621
1649
  attachmentAssetsById.set(a.id, a);
1622
1650
  }
1623
- const descriptionText = effectiveSystemText(overrides, 'description', overrideCtx, product.description, this.pickLang(product.description, ctx.preferredLanguage, channel));
1651
+ const descriptionText = effectiveSystemText(overrides, 'description', overrideCtx, product.description) ?? '';
1624
1652
  // The summary's name went through the same resolution.
1625
1653
  const nameText = summary.name;
1626
1654
  // Issue #384 — channel-scoped user attributes carry their override for
@@ -1629,10 +1657,7 @@ export class CatalogQueryService {
1629
1657
  // at most once for this page, and only by whichever step needs them first.
1630
1658
  let attributeViews;
1631
1659
  const listAttributeViews = () => (attributeViews ??= this.#requireAttributeRead().listAll());
1632
- const attributeValues = await effectiveAttributeValues(product.attributeValues ?? {}, overrides, overrideCtx, async () => new Map((await listAttributeViews()).map((a) => [
1633
- a.key,
1634
- { channelScoped: a.channelScoped, languageScoped: a.languageScoped },
1635
- ])));
1660
+ const attributeValues = await effectiveAttributeValues(product.attributeValues ?? {}, overrides, overrideCtx, async () => new Map((await listAttributeViews()).map((a) => [a.key, a.scopeLevels])));
1636
1661
  // Feature 012 / FR-030 — "Parametry produktu" tab projection.
1637
1662
  // Resolve every attribute that is flagged isVisibleOnProductPage
1638
1663
  // AND has a non-empty value on this product. Render the value per
@@ -1743,9 +1768,10 @@ export class CatalogQueryService {
1743
1768
  {
1744
1769
  id: row.id,
1745
1770
  position: row.position,
1746
- // Feature 163 (FR-078) — the text at the scope language, else the global one.
1747
- name: translationAt(row.nameTranslations, scopeLanguage) ?? row.name,
1748
- description: translationAt(row.descriptionTranslations, scopeLanguage) ?? row.description ?? null,
1771
+ name: attachmentsAtScope.get(row.id)?.name ?? row.name,
1772
+ description: attachmentsAtScope.has(row.id)
1773
+ ? attachmentsAtScope.get(row.id).description
1774
+ : (row.description ?? null),
1749
1775
  type: { id: t.id, code: t.code, name: t.name },
1750
1776
  asset: {
1751
1777
  id: a.id,
@@ -1838,10 +1864,11 @@ export class CatalogQueryService {
1838
1864
  if (product.type === 'simple' || product.type === 'configurable') {
1839
1865
  const packagingUnits = await em.find(ProductPackagingUnit, { productId: product.id }, { orderBy: { position: 'asc', name: 'asc' } });
1840
1866
  if (packagingUnits.length > 0) {
1867
+ // Feature 174 (data-model §7) — each unit's name at (C, L); `''` for an empty override.
1868
+ const unitNames = await loadPackagingUnitNamesAtScope(em, product.id, packagingUnits, readScope);
1841
1869
  detail.packagingUnits = packagingUnits.map((u) => ({
1842
1870
  id: u.id,
1843
- // Feature 163 (FR-079) — the name at the scope language, else the global name.
1844
- name: effectivePackagingUnitName(u, scopeLanguage),
1871
+ name: unitNames.get(u.id) ?? u.name,
1845
1872
  baseQuantity: u.baseQuantity,
1846
1873
  position: u.position,
1847
1874
  isDefault: u.isDefault,
@@ -1872,7 +1899,7 @@ export class CatalogQueryService {
1872
1899
  // Primary asset url via gallery thumb chain -> base_image -> first item
1873
1900
  // -> legacy product_assets first row. One helper, shared with `toSummary`
1874
1901
  // and `ProductLinkService`, so the chain and the port call have one home.
1875
- const assetUrlByProduct = await resolvePrimaryAssetUrls(em, this.#requireAssets(), ids, channel.id);
1902
+ const assetUrlByProduct = await resolvePrimaryAssetUrls(em, this.#requireAssets(), ids, channel.id, this.#availabilityScope(ctx).languageCode);
1876
1903
  const resolvedPrices = await this.#listingPricesFor(products, ctx);
1877
1904
  // Issue #384 — one statement for every child's override rows on this channel.
1878
1905
  const overridesByProduct = await loadChannelOverridesByProduct(em, ids, channel.id);
@@ -1885,7 +1912,7 @@ export class CatalogQueryService {
1885
1912
  id: p.id,
1886
1913
  sku: p.sku,
1887
1914
  slug: effectiveKeys.get(p.id) ?? p.slug,
1888
- name: effectiveSystemText(overridesByProduct.get(p.id), 'name', overrideCtx, p.name, this.pickLang(p.name, ctx.preferredLanguage, channel)),
1915
+ name: effectiveSystemText(overridesByProduct.get(p.id), 'name', overrideCtx, p.name) ?? '',
1889
1916
  primaryAssetUrl: assetUrlByProduct.get(p.id) ?? null,
1890
1917
  price,
1891
1918
  });
@@ -1960,7 +1987,8 @@ export class CatalogQueryService {
1960
1987
  */
1961
1988
  async getCategoryPageContent(categoryId, ctx) {
1962
1989
  const notFound = () => new HttpError(404, ERROR_CODES.NOT_FOUND, 'Category not found.');
1963
- if (!CATEGORY_ID_RE.test(categoryId))
1990
+ // A category id as the database spells one — anything else is a 404, not a query.
1991
+ if (!isUuidShape(categoryId))
1964
1992
  throw notFound();
1965
1993
  const em = this.emFactory();
1966
1994
  const category = await em.findOne(Category, { id: categoryId, deletedAt: null, isActive: true }, { populate: ['content'] });
@@ -1983,21 +2011,59 @@ export class CatalogQueryService {
1983
2011
  throw notFound();
1984
2012
  parentId = parent.parentCategoryId ?? null;
1985
2013
  }
1986
- const languages = category.content?.languages ?? {};
1987
- const candidates = [
1988
- ctx.preferredLanguage,
1989
- ctx.resolvedChannel.defaultLanguage,
1990
- 'en-US',
1991
- 'en',
1992
- ...Object.keys(languages),
1993
- ].filter((v) => typeof v === 'string');
1994
- for (const language of candidates) {
1995
- const tree = languages[language];
1996
- if (tree !== undefined && hasPageBuilderBlocks(tree)) {
1997
- return { categoryId: category.id, language, content: tree };
1998
- }
2014
+ // Feature 172 (research R-12) — the one language walk product content shares.
2015
+ const resolved = resolvePageBuilderLanguage(category.content?.languages ?? {}, ctx);
2016
+ return resolved
2017
+ ? { categoryId: category.id, language: resolved.language, content: resolved.document }
2018
+ : { categoryId: category.id, language: null, content: null };
2019
+ }
2020
+ /**
2021
+ * Feature 172 (`specs/172-product-content-attributes/`, FR-030, FR-033,
2022
+ * FR-061, research R-11) — the product page's Page Builder content
2023
+ * attributes, each resolved to one language.
2024
+ *
2025
+ * Called by the public product route **after** `getProductByIdOrSlug` has
2026
+ * decided the product is visible to this request (channel, audience,
2027
+ * organisation): it adds no read path of its own around those rules
2028
+ * (Principles XI, XII), and the external API and every port never call it
2029
+ * (FR-042). Candidates are the `page_builder` members of the product's
2030
+ * **current** set, by position then key; a document is resolved by the
2031
+ * language walk category content uses, and an attribute with no language
2032
+ * holding a block is left out. No label is carried (FR-037).
2033
+ */
2034
+ async getProductPageContent(productId, attributeSetId, ctx) {
2035
+ // FR-051 — with the CMS off the page carries no content; the rows stay
2036
+ // untouched (FR-050, SC-004) and come back with it (FR-052).
2037
+ if (!this.isPageBuilderPresent?.())
2038
+ return [];
2039
+ if (!attributeSetId)
2040
+ return [];
2041
+ const em = this.emFactory();
2042
+ const rows = (await em.execute(`select custom_field_definition_id, position from attribute_set_attributes where attribute_set_id = ?`, [attributeSetId]));
2043
+ if (rows.length === 0)
2044
+ return [];
2045
+ const members = contentAttributeMembers(rows, await this.#requireAttributeRead().listAll());
2046
+ if (members.length === 0)
2047
+ return [];
2048
+ const values = (await em.execute(`select pcv.product_attribute_id, pcv.content
2049
+ from product_content_values pcv
2050
+ join products p on p.id = pcv.product_id
2051
+ where pcv.product_id = ? and p.deleted_at is null
2052
+ and pcv.product_attribute_id in (${members.map(() => '?').join(', ')})`, [productId, ...members.map((member) => member.attributeId)]));
2053
+ const contentByAttribute = new Map(values.map((row) => [
2054
+ row.product_attribute_id,
2055
+ (typeof row.content === 'string' ? JSON.parse(row.content) : row.content),
2056
+ ]));
2057
+ const resolved = [];
2058
+ for (const member of members) {
2059
+ const envelope = contentByAttribute.get(member.attributeId);
2060
+ if (!envelope)
2061
+ continue;
2062
+ const chosen = resolvePageBuilderLanguage(envelope.languages ?? {}, ctx);
2063
+ if (chosen)
2064
+ resolved.push({ key: member.key, language: chosen.language, content: chosen.document });
1999
2065
  }
2000
- return { categoryId: category.id, language: null, content: null };
2066
+ return resolved;
2001
2067
  }
2002
2068
  // ------------------------------------------------------------------
2003
2069
  // Filters
@@ -2023,7 +2089,7 @@ export class CatalogQueryService {
2023
2089
  // Feature 163 (FR-017 b) — counts over the effective values a card shows at
2024
2090
  // (channel, language): #384's walk over this channel's override rows.
2025
2091
  const effective = this.#overrideContext(channel, ctx.preferredLanguage);
2026
- const scopeOf = new Map(attrs.map((a) => [a.key, { channelScoped: a.channelScoped, languageScoped: a.languageScoped }]));
2092
+ const scopeOf = new Map(attrs.map((a) => [a.key, a.scopeLevels]));
2027
2093
  const overrides = await loadChannelOverridesByProduct(em, visible.map((p) => p.id), channel.id);
2028
2094
  const valuesOf = new Map();
2029
2095
  for (const p of visible) {
@@ -2358,7 +2424,7 @@ export class CatalogQueryService {
2358
2424
  */
2359
2425
  #effectiveNameExpr(ctx) {
2360
2426
  const channel = ctx.resolvedChannel;
2361
- return effectiveTextSql('name', this.#overrideContext(channel, ctx.preferredLanguage), [ctx.preferredLanguage, channel.defaultLanguage, 'en-US', 'en'].filter((v) => typeof v === 'string'));
2427
+ return effectiveTextSql('name', this.#overrideContext(channel, ctx.preferredLanguage));
2362
2428
  }
2363
2429
  /**
2364
2430
  * The names a name cursor carries — **the statement's own sort key**, read by
@@ -2480,10 +2546,10 @@ export class CatalogQueryService {
2480
2546
  const price = this.#summaryPrice(resolvedPrices, product.id);
2481
2547
  // Issue #384 — the channel's override when one applies, else the baseline
2482
2548
  // language pick, out of the page's pre-read override rows.
2483
- const nameText = effectiveSystemText(cardReads.overridesByProduct.get(product.id), 'name', this.#overrideContext(channel, preferredLanguage), product.name, this.pickLang(product.name, preferredLanguage, channel));
2549
+ const nameText = effectiveSystemText(cardReads.overridesByProduct.get(product.id), 'name', this.#overrideContext(channel, preferredLanguage), product.name) ?? '';
2484
2550
  // Feature 163 (R-16) — the card's summary, from the description this row
2485
2551
  // already holds, through the same override and language pick as the PDP's.
2486
- const descriptionText = effectiveSystemText(cardReads.overridesByProduct.get(product.id), 'description', this.#overrideContext(channel, preferredLanguage), product.description, this.pickLang(product.description, preferredLanguage, channel));
2552
+ const descriptionText = effectiveSystemText(cardReads.overridesByProduct.get(product.id), 'description', this.#overrideContext(channel, preferredLanguage), product.description) ?? '';
2487
2553
  return {
2488
2554
  id: product.id,
2489
2555
  sku: product.sku,
@@ -2533,10 +2599,8 @@ export class CatalogQueryService {
2533
2599
  * a later one.
2534
2600
  */
2535
2601
  #overrideContext(channel, preferredLanguage) {
2536
- return {
2537
- channelId: channel.id,
2538
- languages: overrideLanguages(preferredLanguage, channel.defaultLanguage),
2539
- };
2602
+ // Feature 174 — the chain runs at the request's resolved (C, L): C×L → C → Global.
2603
+ return { channelId: channel.id, languageCode: scopeLanguageOf(channel, preferredLanguage) };
2540
2604
  }
2541
2605
  pickLang(blob, preferred, channel) {
2542
2606
  const preferredLangs = [preferred, channel?.defaultLanguage, 'en-US', 'en'].filter((v) => typeof v === 'string');
@@ -1,4 +1,4 @@
1
- import { overrideLanguages, resolveScopeLanguage, } from '@endora-commerce/contracts';
1
+ import { resolveScopeLanguage, } from '@endora-commerce/contracts';
2
2
  import { availabilityCondition } from './product-availability.sql.js';
3
3
  import { effectiveTextSql } from './effective-value.sql.js';
4
4
  import { toScopeChannel } from './product-availability.service.js';
@@ -117,7 +117,7 @@ export class CatalogQuickSearchService {
117
117
  // `{ organizationId, authenticated: true }`.
118
118
  const languageCode = resolveScopeLanguage(channel, params.languageCode);
119
119
  // FR-017 a — the Name the storefront shows at (C, L), matched and returned.
120
- const effectiveName = effectiveTextSql('name', { channelId: channel.id, languages: overrideLanguages(languageCode, channel.defaultLanguage) }, [languageCode, channel.defaultLanguage, 'en-US', 'en']);
120
+ const effectiveName = effectiveTextSql('name', { channelId: channel.id, languageCode });
121
121
  const available = availabilityCondition({
122
122
  channelId: channel.id,
123
123
  languageCode,
@@ -156,8 +156,8 @@ export class CatalogQuickSearchService {
156
156
  productId: row.id,
157
157
  sku: row.sku,
158
158
  slug: keys.get(row.id)?.get(languageCode) ?? row.slug,
159
- name: row.name,
160
- effectiveName: row.effective_name,
159
+ // Feature 174 — the name effective at (C, L) (`contracts/readers.md` §2).
160
+ name: row.effective_name,
161
161
  status: row.status,
162
162
  matchedOn: matchedOnFor(row, lowered, quickKeys),
163
163
  }));
@@ -178,7 +178,7 @@ function matchedOnFor(row, lowered, quickKeys) {
178
178
  if (row.sku.toLowerCase().includes(lowered))
179
179
  matched.push('sku');
180
180
  if (row.effective_name.toLowerCase().includes(lowered) ||
181
- Object.values(row.name).some((n) => String(n).toLowerCase().includes(lowered))) {
181
+ row.name.toLowerCase().includes(lowered)) {
182
182
  matched.push('name');
183
183
  }
184
184
  if (quickKeys.some((k) => String(row.attribute_values[k] ?? '')
@@ -1,6 +1,6 @@
1
- import { type CatalogCategoryWritePort, type CatalogProductScopeWritePort, type CatalogProductWritePort, type CatalogPromoAttributePort, type PatchProductScopesRequest, type ProductScopeWriteInput } from '@endora-commerce/contracts';
2
- import type { ProductScopesService } from './product-scopes.service.js';
3
- import type { UrlKeyService } from './url-key.service.js';
1
+ import { type CatalogCategoryWritePort, type CatalogProductScopeWritePort, type CatalogProductWritePort, type CatalogPromoAttributePort } from '@endora-commerce/contracts';
2
+ import type { CommandBus } from '@endora-commerce/platform/commands';
3
+ import { type ScopedImportDeps } from './scoped-values-import.js';
4
4
  import type { CatalogAdminService } from './catalog-admin.service.js';
5
5
  import type { CatalogQueryService } from './catalog-query.service.js';
6
6
  import type { CategoryAdminService } from './category-admin.service.js';
@@ -25,18 +25,16 @@ export declare function createCatalogCategoryWritePort(getService: () => Categor
25
25
  */
26
26
  export declare function createCatalogPromoAttributePort(getService: () => CatalogQueryService): CatalogPromoAttributePort;
27
27
  /**
28
- * Feature 163 (R17, `contracts/url-keys-and-redirects.md` §5) — the scoped write
29
- * of a connector or an importer.
30
- *
31
- * It writes only the scopes the input names, so a connector writing global values
32
- * removes no operator override (FR-091). Status, window, audience and order rules
33
- * go through `ProductScopesService` — the operator's Command, its validation
34
- * (FR-014: a value for a channel the product is not in is refused) and its event;
35
- * URL keys through `UrlKeyService` in import mode, where a key another product
36
- * holds is not written and is reported, and a redirect is never taken over
37
- * (FR-093). No completeness gate runs on this path (A-6).
28
+ * Feature 174 (T083; `contracts/pim-locale-mapping.md` §4, R13a, R21) — the scoped write of a
29
+ * connector, v2: the call-level checks (a registered `source`, the cell cap, no duplicate cell),
30
+ * then one Command `product.scoped_values.import` on the save's planner and writers
31
+ * (`scoped-values-import.ts`): per-cell refusals, the integration allowlist, every subject bound to
32
+ * the product, no completeness gate (A-6), URL keys in `integration` mode (FR-093).
38
33
  */
39
- export declare function createCatalogProductScopeWritePort(getScopes: () => ProductScopesService, getUrlKeys: () => UrlKeyService): CatalogProductScopeWritePort;
40
- /** The input as the scopes PATCH body: one entry per channel named, only the keys named. */
41
- export declare function toScopesPatch(input: ProductScopeWriteInput): PatchProductScopesRequest;
34
+ export declare function createCatalogProductScopeWritePort(deps: {
35
+ commandBus: () => CommandBus;
36
+ importDeps: () => ScopedImportDeps;
37
+ /** Whether `moduleId` names a module of the registry (R21: `options.source`). */
38
+ isRegisteredModule: (moduleId: string) => boolean;
39
+ }): CatalogProductScopeWritePort;
42
40
  //# sourceMappingURL=catalog-write-ports.d.ts.map