@endora-commerce/mod-catalog 0.100.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 (443) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +63 -0
  3. package/dist/admin/components/PackagingUnitsEditor.d.ts +12 -0
  4. package/dist/admin/components/PackagingUnitsEditor.d.ts.map +1 -0
  5. package/dist/admin/components/PackagingUnitsEditor.js +99 -0
  6. package/dist/admin/components/PackagingUnitsEditor.js.map +1 -0
  7. package/dist/admin/components/ProductAttributesTab.d.ts +13 -0
  8. package/dist/admin/components/ProductAttributesTab.d.ts.map +1 -0
  9. package/dist/admin/components/ProductAttributesTab.js +140 -0
  10. package/dist/admin/components/ProductAttributesTab.js.map +1 -0
  11. package/dist/admin/components/ProductInventoryTab.d.ts +14 -0
  12. package/dist/admin/components/ProductInventoryTab.d.ts.map +1 -0
  13. package/dist/admin/components/ProductInventoryTab.js +284 -0
  14. package/dist/admin/components/ProductInventoryTab.js.map +1 -0
  15. package/dist/admin/components/ProductScopeEditor.d.ts +94 -0
  16. package/dist/admin/components/ProductScopeEditor.d.ts.map +1 -0
  17. package/dist/admin/components/ProductScopeEditor.js +395 -0
  18. package/dist/admin/components/ProductScopeEditor.js.map +1 -0
  19. package/dist/admin/components/ProductsBulkEditDialog.d.ts +11 -0
  20. package/dist/admin/components/ProductsBulkEditDialog.d.ts.map +1 -0
  21. package/dist/admin/components/ProductsBulkEditDialog.js +304 -0
  22. package/dist/admin/components/ProductsBulkEditDialog.js.map +1 -0
  23. package/dist/admin/index.d.ts +45 -0
  24. package/dist/admin/index.d.ts.map +1 -0
  25. package/dist/admin/index.js +184 -0
  26. package/dist/admin/index.js.map +1 -0
  27. package/dist/admin/lib/resolve-product-selection.d.ts +21 -0
  28. package/dist/admin/lib/resolve-product-selection.d.ts.map +1 -0
  29. package/dist/admin/lib/resolve-product-selection.js +25 -0
  30. package/dist/admin/lib/resolve-product-selection.js.map +1 -0
  31. package/dist/admin/pages/AttachmentTypesPage.d.ts +18 -0
  32. package/dist/admin/pages/AttachmentTypesPage.d.ts.map +1 -0
  33. package/dist/admin/pages/AttachmentTypesPage.js +92 -0
  34. package/dist/admin/pages/AttachmentTypesPage.js.map +1 -0
  35. package/dist/admin/pages/AttributeSetsPage.d.ts +21 -0
  36. package/dist/admin/pages/AttributeSetsPage.d.ts.map +1 -0
  37. package/dist/admin/pages/AttributeSetsPage.js +158 -0
  38. package/dist/admin/pages/AttributeSetsPage.js.map +1 -0
  39. package/dist/admin/pages/AttributesManager.d.ts +9 -0
  40. package/dist/admin/pages/AttributesManager.d.ts.map +1 -0
  41. package/dist/admin/pages/AttributesManager.js +305 -0
  42. package/dist/admin/pages/AttributesManager.js.map +1 -0
  43. package/dist/admin/pages/BulkOperationDetailPage.d.ts +9 -0
  44. package/dist/admin/pages/BulkOperationDetailPage.d.ts.map +1 -0
  45. package/dist/admin/pages/BulkOperationDetailPage.js +187 -0
  46. package/dist/admin/pages/BulkOperationDetailPage.js.map +1 -0
  47. package/dist/admin/pages/BulkOperationsPage.d.ts +9 -0
  48. package/dist/admin/pages/BulkOperationsPage.d.ts.map +1 -0
  49. package/dist/admin/pages/BulkOperationsPage.js +98 -0
  50. package/dist/admin/pages/BulkOperationsPage.js.map +1 -0
  51. package/dist/admin/pages/CategoriesTree.d.ts +9 -0
  52. package/dist/admin/pages/CategoriesTree.d.ts.map +1 -0
  53. package/dist/admin/pages/CategoriesTree.js +176 -0
  54. package/dist/admin/pages/CategoriesTree.js.map +1 -0
  55. package/dist/admin/pages/ProductEditor.d.ts +13 -0
  56. package/dist/admin/pages/ProductEditor.d.ts.map +1 -0
  57. package/dist/admin/pages/ProductEditor.js +1050 -0
  58. package/dist/admin/pages/ProductEditor.js.map +1 -0
  59. package/dist/admin/pages/ProductsList.d.ts +9 -0
  60. package/dist/admin/pages/ProductsList.d.ts.map +1 -0
  61. package/dist/admin/pages/ProductsList.js +399 -0
  62. package/dist/admin/pages/ProductsList.js.map +1 -0
  63. package/dist/backend/commands/attribute-commands.d.ts +111 -0
  64. package/dist/backend/commands/attribute-commands.d.ts.map +1 -0
  65. package/dist/backend/commands/attribute-commands.js +482 -0
  66. package/dist/backend/commands/attribute-commands.js.map +1 -0
  67. package/dist/backend/demo/reset.d.ts +23 -0
  68. package/dist/backend/demo/reset.d.ts.map +1 -0
  69. package/dist/backend/demo/reset.js +41 -0
  70. package/dist/backend/demo/reset.js.map +1 -0
  71. package/dist/backend/demo/rows.d.ts +103 -0
  72. package/dist/backend/demo/rows.d.ts.map +1 -0
  73. package/dist/backend/demo/rows.js +162 -0
  74. package/dist/backend/demo/rows.js.map +1 -0
  75. package/dist/backend/demo/seed.d.ts +35 -0
  76. package/dist/backend/demo/seed.d.ts.map +1 -0
  77. package/dist/backend/demo/seed.js +177 -0
  78. package/dist/backend/demo/seed.js.map +1 -0
  79. package/dist/backend/entities/attachment-type.entity.d.ts +16 -0
  80. package/dist/backend/entities/attachment-type.entity.d.ts.map +1 -0
  81. package/dist/backend/entities/attachment-type.entity.js +57 -0
  82. package/dist/backend/entities/attachment-type.entity.js.map +1 -0
  83. package/dist/backend/entities/attribute-set-attribute.entity.d.ts +26 -0
  84. package/dist/backend/entities/attribute-set-attribute.entity.d.ts.map +1 -0
  85. package/dist/backend/entities/attribute-set-attribute.entity.js +55 -0
  86. package/dist/backend/entities/attribute-set-attribute.entity.js.map +1 -0
  87. package/dist/backend/entities/attribute-set.entity.d.ts +22 -0
  88. package/dist/backend/entities/attribute-set.entity.d.ts.map +1 -0
  89. package/dist/backend/entities/attribute-set.entity.js +67 -0
  90. package/dist/backend/entities/attribute-set.entity.js.map +1 -0
  91. package/dist/backend/entities/bulk-operation.entity.d.ts +78 -0
  92. package/dist/backend/entities/bulk-operation.entity.d.ts.map +1 -0
  93. package/dist/backend/entities/bulk-operation.entity.js +138 -0
  94. package/dist/backend/entities/bulk-operation.entity.js.map +1 -0
  95. package/dist/backend/entities/bundle-slot-option.entity.d.ts +23 -0
  96. package/dist/backend/entities/bundle-slot-option.entity.d.ts.map +1 -0
  97. package/dist/backend/entities/bundle-slot-option.entity.js +68 -0
  98. package/dist/backend/entities/bundle-slot-option.entity.js.map +1 -0
  99. package/dist/backend/entities/bundle-slot.entity.d.ts +25 -0
  100. package/dist/backend/entities/bundle-slot.entity.d.ts.map +1 -0
  101. package/dist/backend/entities/bundle-slot.entity.js +74 -0
  102. package/dist/backend/entities/bundle-slot.entity.js.map +1 -0
  103. package/dist/backend/entities/category.entity.d.ts +26 -0
  104. package/dist/backend/entities/category.entity.d.ts.map +1 -0
  105. package/dist/backend/entities/category.entity.js +119 -0
  106. package/dist/backend/entities/category.entity.js.map +1 -0
  107. package/dist/backend/entities/gallery-item-label.entity.d.ts +22 -0
  108. package/dist/backend/entities/gallery-item-label.entity.d.ts.map +1 -0
  109. package/dist/backend/entities/gallery-item-label.entity.js +50 -0
  110. package/dist/backend/entities/gallery-item-label.entity.js.map +1 -0
  111. package/dist/backend/entities/gallery-item.entity.d.ts +17 -0
  112. package/dist/backend/entities/gallery-item.entity.d.ts.map +1 -0
  113. package/dist/backend/entities/gallery-item.entity.js +58 -0
  114. package/dist/backend/entities/gallery-item.entity.js.map +1 -0
  115. package/dist/backend/entities/grouped-item.entity.d.ts +23 -0
  116. package/dist/backend/entities/grouped-item.entity.d.ts.map +1 -0
  117. package/dist/backend/entities/grouped-item.entity.js +68 -0
  118. package/dist/backend/entities/grouped-item.entity.js.map +1 -0
  119. package/dist/backend/entities/product-attachment.entity.d.ts +23 -0
  120. package/dist/backend/entities/product-attachment.entity.d.ts.map +1 -0
  121. package/dist/backend/entities/product-attachment.entity.js +77 -0
  122. package/dist/backend/entities/product-attachment.entity.js.map +1 -0
  123. package/dist/backend/entities/product-attribute.entity.d.ts +72 -0
  124. package/dist/backend/entities/product-attribute.entity.d.ts.map +1 -0
  125. package/dist/backend/entities/product-attribute.entity.js +161 -0
  126. package/dist/backend/entities/product-attribute.entity.js.map +1 -0
  127. package/dist/backend/entities/product-editor-preference.entity.d.ts +28 -0
  128. package/dist/backend/entities/product-editor-preference.entity.d.ts.map +1 -0
  129. package/dist/backend/entities/product-editor-preference.entity.js +63 -0
  130. package/dist/backend/entities/product-editor-preference.entity.js.map +1 -0
  131. package/dist/backend/entities/product-link.entity.d.ts +25 -0
  132. package/dist/backend/entities/product-link.entity.d.ts.map +1 -0
  133. package/dist/backend/entities/product-link.entity.js +70 -0
  134. package/dist/backend/entities/product-link.entity.js.map +1 -0
  135. package/dist/backend/entities/product-packaging-unit.entity.d.ts +26 -0
  136. package/dist/backend/entities/product-packaging-unit.entity.d.ts.map +1 -0
  137. package/dist/backend/entities/product-packaging-unit.entity.js +76 -0
  138. package/dist/backend/entities/product-packaging-unit.entity.js.map +1 -0
  139. package/dist/backend/entities/product-value-override.entity.d.ts +43 -0
  140. package/dist/backend/entities/product-value-override.entity.d.ts.map +1 -0
  141. package/dist/backend/entities/product-value-override.entity.js +90 -0
  142. package/dist/backend/entities/product-value-override.entity.js.map +1 -0
  143. package/dist/backend/entities/product-variant.entity.d.ts +18 -0
  144. package/dist/backend/entities/product-variant.entity.d.ts.map +1 -0
  145. package/dist/backend/entities/product-variant.entity.js +68 -0
  146. package/dist/backend/entities/product-variant.entity.js.map +1 -0
  147. package/dist/backend/entities/product.entity.d.ts +108 -0
  148. package/dist/backend/entities/product.entity.d.ts.map +1 -0
  149. package/dist/backend/entities/product.entity.js +230 -0
  150. package/dist/backend/entities/product.entity.js.map +1 -0
  151. package/dist/backend/index.d.ts +262 -0
  152. package/dist/backend/index.d.ts.map +1 -0
  153. package/dist/backend/index.js +642 -0
  154. package/dist/backend/index.js.map +1 -0
  155. package/dist/backend/plugin.d.ts +216 -0
  156. package/dist/backend/plugin.d.ts.map +1 -0
  157. package/dist/backend/plugin.js +223 -0
  158. package/dist/backend/plugin.js.map +1 -0
  159. package/dist/backend/prompt-tools.d.ts +47 -0
  160. package/dist/backend/prompt-tools.d.ts.map +1 -0
  161. package/dist/backend/prompt-tools.js +284 -0
  162. package/dist/backend/prompt-tools.js.map +1 -0
  163. package/dist/backend/routes.admin.d.ts +105 -0
  164. package/dist/backend/routes.admin.d.ts.map +1 -0
  165. package/dist/backend/routes.admin.js +1162 -0
  166. package/dist/backend/routes.admin.js.map +1 -0
  167. package/dist/backend/routes.api-key.d.ts +33 -0
  168. package/dist/backend/routes.api-key.d.ts.map +1 -0
  169. package/dist/backend/routes.api-key.js +43 -0
  170. package/dist/backend/routes.api-key.js.map +1 -0
  171. package/dist/backend/routes.external.d.ts +32 -0
  172. package/dist/backend/routes.external.d.ts.map +1 -0
  173. package/dist/backend/routes.external.js +115 -0
  174. package/dist/backend/routes.external.js.map +1 -0
  175. package/dist/backend/routes.public.d.ts +46 -0
  176. package/dist/backend/routes.public.d.ts.map +1 -0
  177. package/dist/backend/routes.public.js +318 -0
  178. package/dist/backend/routes.public.js.map +1 -0
  179. package/dist/backend/services/asset-references.d.ts +4 -0
  180. package/dist/backend/services/asset-references.d.ts.map +1 -0
  181. package/dist/backend/services/asset-references.js +104 -0
  182. package/dist/backend/services/asset-references.js.map +1 -0
  183. package/dist/backend/services/attachment.service.d.ts +45 -0
  184. package/dist/backend/services/attachment.service.d.ts.map +1 -0
  185. package/dist/backend/services/attachment.service.js +268 -0
  186. package/dist/backend/services/attachment.service.js.map +1 -0
  187. package/dist/backend/services/attribute-option-validator.d.ts +47 -0
  188. package/dist/backend/services/attribute-option-validator.d.ts.map +1 -0
  189. package/dist/backend/services/attribute-option-validator.js +69 -0
  190. package/dist/backend/services/attribute-option-validator.js.map +1 -0
  191. package/dist/backend/services/attribute-set-validations.d.ts +65 -0
  192. package/dist/backend/services/attribute-set-validations.d.ts.map +1 -0
  193. package/dist/backend/services/attribute-set-validations.js +89 -0
  194. package/dist/backend/services/attribute-set-validations.js.map +1 -0
  195. package/dist/backend/services/attribute-set.service.d.ts +50 -0
  196. package/dist/backend/services/attribute-set.service.d.ts.map +1 -0
  197. package/dist/backend/services/attribute-set.service.js +401 -0
  198. package/dist/backend/services/attribute-set.service.js.map +1 -0
  199. package/dist/backend/services/attribute-type-mapping.d.ts +66 -0
  200. package/dist/backend/services/attribute-type-mapping.d.ts.map +1 -0
  201. package/dist/backend/services/attribute-type-mapping.js +121 -0
  202. package/dist/backend/services/attribute-type-mapping.js.map +1 -0
  203. package/dist/backend/services/attribute-value-key.service.d.ts +48 -0
  204. package/dist/backend/services/attribute-value-key.service.d.ts.map +1 -0
  205. package/dist/backend/services/attribute-value-key.service.js +118 -0
  206. package/dist/backend/services/attribute-value-key.service.js.map +1 -0
  207. package/dist/backend/services/audit-references.d.ts +13 -0
  208. package/dist/backend/services/audit-references.d.ts.map +1 -0
  209. package/dist/backend/services/audit-references.js +51 -0
  210. package/dist/backend/services/audit-references.js.map +1 -0
  211. package/dist/backend/services/bulk-operation-queue.d.ts +26 -0
  212. package/dist/backend/services/bulk-operation-queue.d.ts.map +1 -0
  213. package/dist/backend/services/bulk-operation-queue.js +34 -0
  214. package/dist/backend/services/bulk-operation-queue.js.map +1 -0
  215. package/dist/backend/services/bulk-operation.service.d.ts +195 -0
  216. package/dist/backend/services/bulk-operation.service.d.ts.map +1 -0
  217. package/dist/backend/services/bulk-operation.service.js +510 -0
  218. package/dist/backend/services/bulk-operation.service.js.map +1 -0
  219. package/dist/backend/services/bundle.service.d.ts +87 -0
  220. package/dist/backend/services/bundle.service.d.ts.map +1 -0
  221. package/dist/backend/services/bundle.service.js +286 -0
  222. package/dist/backend/services/bundle.service.js.map +1 -0
  223. package/dist/backend/services/catalog-admin.service.d.ts +398 -0
  224. package/dist/backend/services/catalog-admin.service.d.ts.map +1 -0
  225. package/dist/backend/services/catalog-admin.service.js +1516 -0
  226. package/dist/backend/services/catalog-admin.service.js.map +1 -0
  227. package/dist/backend/services/catalog-attribute-read.service.d.ts +78 -0
  228. package/dist/backend/services/catalog-attribute-read.service.d.ts.map +1 -0
  229. package/dist/backend/services/catalog-attribute-read.service.js +216 -0
  230. package/dist/backend/services/catalog-attribute-read.service.js.map +1 -0
  231. package/dist/backend/services/catalog-bulk-import.service.d.ts +30 -0
  232. package/dist/backend/services/catalog-bulk-import.service.d.ts.map +1 -0
  233. package/dist/backend/services/catalog-bulk-import.service.js +136 -0
  234. package/dist/backend/services/catalog-bulk-import.service.js.map +1 -0
  235. package/dist/backend/services/catalog-bulk-update.service.d.ts +91 -0
  236. package/dist/backend/services/catalog-bulk-update.service.d.ts.map +1 -0
  237. package/dist/backend/services/catalog-bulk-update.service.js +330 -0
  238. package/dist/backend/services/catalog-bulk-update.service.js.map +1 -0
  239. package/dist/backend/services/catalog-category-read.service.d.ts +66 -0
  240. package/dist/backend/services/catalog-category-read.service.d.ts.map +1 -0
  241. package/dist/backend/services/catalog-category-read.service.js +248 -0
  242. package/dist/backend/services/catalog-category-read.service.js.map +1 -0
  243. package/dist/backend/services/catalog-org-price-decorator.d.ts +90 -0
  244. package/dist/backend/services/catalog-org-price-decorator.d.ts.map +1 -0
  245. package/dist/backend/services/catalog-org-price-decorator.js +184 -0
  246. package/dist/backend/services/catalog-org-price-decorator.js.map +1 -0
  247. package/dist/backend/services/catalog-product-filter.service.d.ts +82 -0
  248. package/dist/backend/services/catalog-product-filter.service.d.ts.map +1 -0
  249. package/dist/backend/services/catalog-product-filter.service.js +275 -0
  250. package/dist/backend/services/catalog-product-filter.service.js.map +1 -0
  251. package/dist/backend/services/catalog-product-read.service.d.ts +46 -0
  252. package/dist/backend/services/catalog-product-read.service.d.ts.map +1 -0
  253. package/dist/backend/services/catalog-product-read.service.js +197 -0
  254. package/dist/backend/services/catalog-product-read.service.js.map +1 -0
  255. package/dist/backend/services/catalog-query.service.d.ts +444 -0
  256. package/dist/backend/services/catalog-query.service.d.ts.map +1 -0
  257. package/dist/backend/services/catalog-query.service.js +1633 -0
  258. package/dist/backend/services/catalog-query.service.js.map +1 -0
  259. package/dist/backend/services/catalog-quick-search.service.d.ts +78 -0
  260. package/dist/backend/services/catalog-quick-search.service.d.ts.map +1 -0
  261. package/dist/backend/services/catalog-quick-search.service.js +159 -0
  262. package/dist/backend/services/catalog-quick-search.service.js.map +1 -0
  263. package/dist/backend/services/catalog-write-ports.d.ts +25 -0
  264. package/dist/backend/services/catalog-write-ports.d.ts.map +1 -0
  265. package/dist/backend/services/catalog-write-ports.js +63 -0
  266. package/dist/backend/services/catalog-write-ports.js.map +1 -0
  267. package/dist/backend/services/category-admin.service.d.ts +102 -0
  268. package/dist/backend/services/category-admin.service.d.ts.map +1 -0
  269. package/dist/backend/services/category-admin.service.js +271 -0
  270. package/dist/backend/services/category-admin.service.js.map +1 -0
  271. package/dist/backend/services/gallery.service.d.ts +85 -0
  272. package/dist/backend/services/gallery.service.d.ts.map +1 -0
  273. package/dist/backend/services/gallery.service.js +326 -0
  274. package/dist/backend/services/gallery.service.js.map +1 -0
  275. package/dist/backend/services/grouped.service.d.ts +39 -0
  276. package/dist/backend/services/grouped.service.d.ts.map +1 -0
  277. package/dist/backend/services/grouped.service.js +136 -0
  278. package/dist/backend/services/grouped.service.js.map +1 -0
  279. package/dist/backend/services/label-resolver.d.ts +16 -0
  280. package/dist/backend/services/label-resolver.d.ts.map +1 -0
  281. package/dist/backend/services/label-resolver.js +43 -0
  282. package/dist/backend/services/label-resolver.js.map +1 -0
  283. package/dist/backend/services/packaging-unit.service.d.ts +28 -0
  284. package/dist/backend/services/packaging-unit.service.d.ts.map +1 -0
  285. package/dist/backend/services/packaging-unit.service.js +197 -0
  286. package/dist/backend/services/packaging-unit.service.js.map +1 -0
  287. package/dist/backend/services/primary-asset-url.d.ts +4 -0
  288. package/dist/backend/services/primary-asset-url.d.ts.map +1 -0
  289. package/dist/backend/services/primary-asset-url.js +55 -0
  290. package/dist/backend/services/primary-asset-url.js.map +1 -0
  291. package/dist/backend/services/product-editor-preferences.service.d.ts +20 -0
  292. package/dist/backend/services/product-editor-preferences.service.d.ts.map +1 -0
  293. package/dist/backend/services/product-editor-preferences.service.js +44 -0
  294. package/dist/backend/services/product-editor-preferences.service.js.map +1 -0
  295. package/dist/backend/services/product-link.service.d.ts +169 -0
  296. package/dist/backend/services/product-link.service.d.ts.map +1 -0
  297. package/dist/backend/services/product-link.service.js +297 -0
  298. package/dist/backend/services/product-link.service.js.map +1 -0
  299. package/dist/backend/services/product-overrides.service.d.ts +77 -0
  300. package/dist/backend/services/product-overrides.service.d.ts.map +1 -0
  301. package/dist/backend/services/product-overrides.service.js +204 -0
  302. package/dist/backend/services/product-overrides.service.js.map +1 -0
  303. package/dist/backend/services/product-scope-context.service.d.ts +36 -0
  304. package/dist/backend/services/product-scope-context.service.d.ts.map +1 -0
  305. package/dist/backend/services/product-scope-context.service.js +106 -0
  306. package/dist/backend/services/product-scope-context.service.js.map +1 -0
  307. package/dist/backend/services/product-type-validations.d.ts +42 -0
  308. package/dist/backend/services/product-type-validations.d.ts.map +1 -0
  309. package/dist/backend/services/product-type-validations.js +55 -0
  310. package/dist/backend/services/product-type-validations.js.map +1 -0
  311. package/dist/backend/services/product-value-resolver.service.d.ts +59 -0
  312. package/dist/backend/services/product-value-resolver.service.d.ts.map +1 -0
  313. package/dist/backend/services/product-value-resolver.service.js +111 -0
  314. package/dist/backend/services/product-value-resolver.service.js.map +1 -0
  315. package/dist/backend/services/system-attribute-scopes.d.ts +18 -0
  316. package/dist/backend/services/system-attribute-scopes.d.ts.map +1 -0
  317. package/dist/backend/services/system-attribute-scopes.js +18 -0
  318. package/dist/backend/services/system-attribute-scopes.js.map +1 -0
  319. package/dist/backend/services/viewer-organization.d.ts +25 -0
  320. package/dist/backend/services/viewer-organization.d.ts.map +1 -0
  321. package/dist/backend/services/viewer-organization.js +31 -0
  322. package/dist/backend/services/viewer-organization.js.map +1 -0
  323. package/dist/manifest.d.ts +204 -0
  324. package/dist/manifest.d.ts.map +1 -0
  325. package/dist/manifest.js +686 -0
  326. package/dist/manifest.js.map +1 -0
  327. package/dist/migrations/20260429T064146_catalog_attribute_sets_init.d.ts +33 -0
  328. package/dist/migrations/20260429T064146_catalog_attribute_sets_init.d.ts.map +1 -0
  329. package/dist/migrations/20260429T064146_catalog_attribute_sets_init.js +118 -0
  330. package/dist/migrations/20260429T064146_catalog_attribute_sets_init.js.map +1 -0
  331. package/dist/migrations/20260429T070004_catalog_product_attribute_extensions.d.ts +24 -0
  332. package/dist/migrations/20260429T070004_catalog_product_attribute_extensions.d.ts.map +1 -0
  333. package/dist/migrations/20260429T070004_catalog_product_attribute_extensions.js +31 -0
  334. package/dist/migrations/20260429T070004_catalog_product_attribute_extensions.js.map +1 -0
  335. package/dist/migrations/20260429T102322_catalog_product_type_and_virtual_fields.d.ts +32 -0
  336. package/dist/migrations/20260429T102322_catalog_product_type_and_virtual_fields.d.ts.map +1 -0
  337. package/dist/migrations/20260429T102322_catalog_product_type_and_virtual_fields.js +58 -0
  338. package/dist/migrations/20260429T102322_catalog_product_type_and_virtual_fields.js.map +1 -0
  339. package/dist/migrations/20260429T111839_catalog_gallery_items_and_labels.d.ts +22 -0
  340. package/dist/migrations/20260429T111839_catalog_gallery_items_and_labels.d.ts.map +1 -0
  341. package/dist/migrations/20260429T111839_catalog_gallery_items_and_labels.js +66 -0
  342. package/dist/migrations/20260429T111839_catalog_gallery_items_and_labels.js.map +1 -0
  343. package/dist/migrations/20260429T112543_catalog_product_attachments.d.ts +18 -0
  344. package/dist/migrations/20260429T112543_catalog_product_attachments.d.ts.map +1 -0
  345. package/dist/migrations/20260429T112543_catalog_product_attachments.js +73 -0
  346. package/dist/migrations/20260429T112543_catalog_product_attachments.js.map +1 -0
  347. package/dist/migrations/20260429T123726_catalog_product_links.d.ts +21 -0
  348. package/dist/migrations/20260429T123726_catalog_product_links.d.ts.map +1 -0
  349. package/dist/migrations/20260429T123726_catalog_product_links.js +48 -0
  350. package/dist/migrations/20260429T123726_catalog_product_links.js.map +1 -0
  351. package/dist/migrations/20260429T130803_catalog_grouped_and_bundle.d.ts +23 -0
  352. package/dist/migrations/20260429T130803_catalog_grouped_and_bundle.d.ts.map +1 -0
  353. package/dist/migrations/20260429T130803_catalog_grouped_and_bundle.js +94 -0
  354. package/dist/migrations/20260429T130803_catalog_grouped_and_bundle.js.map +1 -0
  355. package/dist/migrations/20260501T185835_catalog_product_attribute_is_comparable.d.ts +24 -0
  356. package/dist/migrations/20260501T185835_catalog_product_attribute_is_comparable.d.ts.map +1 -0
  357. package/dist/migrations/20260501T185835_catalog_product_attribute_is_comparable.js +31 -0
  358. package/dist/migrations/20260501T185835_catalog_product_attribute_is_comparable.js.map +1 -0
  359. package/dist/migrations/20260505T060113_catalog_attribute_options_and_flags.d.ts +31 -0
  360. package/dist/migrations/20260505T060113_catalog_attribute_options_and_flags.d.ts.map +1 -0
  361. package/dist/migrations/20260505T060113_catalog_attribute_options_and_flags.js +133 -0
  362. package/dist/migrations/20260505T060113_catalog_attribute_options_and_flags.js.map +1 -0
  363. package/dist/migrations/20260515T082629_catalog_attribute_mass_editable.d.ts +16 -0
  364. package/dist/migrations/20260515T082629_catalog_attribute_mass_editable.d.ts.map +1 -0
  365. package/dist/migrations/20260515T082629_catalog_attribute_mass_editable.js +23 -0
  366. package/dist/migrations/20260515T082629_catalog_attribute_mass_editable.js.map +1 -0
  367. package/dist/migrations/20260526T124736_catalog_product_status_inactive.d.ts +10 -0
  368. package/dist/migrations/20260526T124736_catalog_product_status_inactive.d.ts.map +1 -0
  369. package/dist/migrations/20260526T124736_catalog_product_status_inactive.js +22 -0
  370. package/dist/migrations/20260526T124736_catalog_product_status_inactive.js.map +1 -0
  371. package/dist/migrations/20260611T140346_catalog_product_value_overrides_init.d.ts +38 -0
  372. package/dist/migrations/20260611T140346_catalog_product_value_overrides_init.d.ts.map +1 -0
  373. package/dist/migrations/20260611T140346_catalog_product_value_overrides_init.js +98 -0
  374. package/dist/migrations/20260611T140346_catalog_product_value_overrides_init.js.map +1 -0
  375. package/dist/migrations/20260611T140400_catalog_attribute_quick_searchable.d.ts +13 -0
  376. package/dist/migrations/20260611T140400_catalog_attribute_quick_searchable.d.ts.map +1 -0
  377. package/dist/migrations/20260611T140400_catalog_attribute_quick_searchable.js +17 -0
  378. package/dist/migrations/20260611T140400_catalog_attribute_quick_searchable.js.map +1 -0
  379. package/dist/migrations/20260611T140407_catalog_bulk_operations.d.ts +16 -0
  380. package/dist/migrations/20260611T140407_catalog_bulk_operations.d.ts.map +1 -0
  381. package/dist/migrations/20260611T140407_catalog_bulk_operations.js +42 -0
  382. package/dist/migrations/20260611T140407_catalog_bulk_operations.js.map +1 -0
  383. package/dist/migrations/20260611T140408_catalog_bulk_operation_logs.d.ts +14 -0
  384. package/dist/migrations/20260611T140408_catalog_bulk_operation_logs.d.ts.map +1 -0
  385. package/dist/migrations/20260611T140408_catalog_bulk_operation_logs.js +18 -0
  386. package/dist/migrations/20260611T140408_catalog_bulk_operation_logs.js.map +1 -0
  387. package/dist/migrations/20260611T140412_catalog_product_packaging_units.d.ts +11 -0
  388. package/dist/migrations/20260611T140412_catalog_product_packaging_units.d.ts.map +1 -0
  389. package/dist/migrations/20260611T140412_catalog_product_packaging_units.js +29 -0
  390. package/dist/migrations/20260611T140412_catalog_product_packaging_units.js.map +1 -0
  391. package/dist/migrations/20260718T060659_catalog_bulk_operation_revert_state.d.ts +23 -0
  392. package/dist/migrations/20260718T060659_catalog_bulk_operation_revert_state.d.ts.map +1 -0
  393. package/dist/migrations/20260718T060659_catalog_bulk_operation_revert_state.js +35 -0
  394. package/dist/migrations/20260718T060659_catalog_bulk_operation_revert_state.js.map +1 -0
  395. package/dist/migrations/20260718T200343_catalog_category_custom_field_values.d.ts +12 -0
  396. package/dist/migrations/20260718T200343_catalog_category_custom_field_values.d.ts.map +1 -0
  397. package/dist/migrations/20260718T200343_catalog_category_custom_field_values.js +16 -0
  398. package/dist/migrations/20260718T200343_catalog_category_custom_field_values.js.map +1 -0
  399. package/dist/migrations/20260723T230401_catalog_attributes_on_custom_fields.d.ts +32 -0
  400. package/dist/migrations/20260723T230401_catalog_attributes_on_custom_fields.d.ts.map +1 -0
  401. package/dist/migrations/20260723T230401_catalog_attributes_on_custom_fields.js +286 -0
  402. package/dist/migrations/20260723T230401_catalog_attributes_on_custom_fields.js.map +1 -0
  403. package/dist/migrations/20260804T152604_catalog_widen_product_sku.d.ts +36 -0
  404. package/dist/migrations/20260804T152604_catalog_widen_product_sku.d.ts.map +1 -0
  405. package/dist/migrations/20260804T152604_catalog_widen_product_sku.js +63 -0
  406. package/dist/migrations/20260804T152604_catalog_widen_product_sku.js.map +1 -0
  407. package/dist/migrations/20260804T160244_catalog_category_activation.d.ts +18 -0
  408. package/dist/migrations/20260804T160244_catalog_category_activation.d.ts.map +1 -0
  409. package/dist/migrations/20260804T160244_catalog_category_activation.js +22 -0
  410. package/dist/migrations/20260804T160244_catalog_category_activation.js.map +1 -0
  411. package/dist/migrations/20260912T094557_catalog_sales_channel_products.d.ts +27 -0
  412. package/dist/migrations/20260912T094557_catalog_sales_channel_products.d.ts.map +1 -0
  413. package/dist/migrations/20260912T094557_catalog_sales_channel_products.js +44 -0
  414. package/dist/migrations/20260912T094557_catalog_sales_channel_products.js.map +1 -0
  415. package/dist/migrations/20260912T094623_catalog_sales_channel_categories.d.ts +27 -0
  416. package/dist/migrations/20260912T094623_catalog_sales_channel_categories.d.ts.map +1 -0
  417. package/dist/migrations/20260912T094623_catalog_sales_channel_categories.js +44 -0
  418. package/dist/migrations/20260912T094623_catalog_sales_channel_categories.js.map +1 -0
  419. package/dist/migrations/20260925T125527_catalog_inventory_columns.d.ts +36 -0
  420. package/dist/migrations/20260925T125527_catalog_inventory_columns.d.ts.map +1 -0
  421. package/dist/migrations/20260925T125527_catalog_inventory_columns.js +87 -0
  422. package/dist/migrations/20260925T125527_catalog_inventory_columns.js.map +1 -0
  423. package/dist/migrations/index.d.ts +55 -0
  424. package/dist/migrations/index.d.ts.map +1 -0
  425. package/dist/migrations/index.js +80 -0
  426. package/dist/migrations/index.js.map +1 -0
  427. package/dist/ports/index.d.ts +96 -0
  428. package/dist/ports/index.d.ts.map +1 -0
  429. package/dist/ports/index.js +2 -0
  430. package/dist/ports/index.js.map +1 -0
  431. package/docs/catalog/attachments.md +69 -0
  432. package/docs/catalog/attribute-sets.md +63 -0
  433. package/docs/catalog/attributes.md +244 -0
  434. package/docs/catalog/composite-products.md +115 -0
  435. package/docs/catalog/gallery-and-labels.md +73 -0
  436. package/docs/catalog/packaging-units.md +67 -0
  437. package/docs/catalog/per-channel-per-language-overrides.md +234 -0
  438. package/docs/catalog/product-links.md +79 -0
  439. package/docs/catalog.md +207 -0
  440. package/i18n/en.json +649 -0
  441. package/i18n/pl.json +649 -0
  442. package/package.json +109 -0
  443. package/tailwind.css +14 -0
@@ -0,0 +1,72 @@
1
+ import { OptionalProps } from '@mikro-orm/core';
2
+ /**
3
+ * ProductAttribute — the catalog EXTENSION of a product-host Custom Field
4
+ * definition (feature 061, data-model.md §1.3).
5
+ *
6
+ * The generic identity (key, per-locale label, labelDefault, value type,
7
+ * required flag) lives on `custom_field_definitions` (`entity_type='product'`,
8
+ * owned by the custom_fields module). This row carries ONLY the
9
+ * catalog-interpreted behavior surface:
10
+ *
11
+ * - the 12 catalog capability flags (search / filter / variant axis /
12
+ * compare / quick order / promo rule / PDP visibility / scoping / bulk
13
+ * edit) — typed, indexed, SQL-filterable;
14
+ * - two presentation refinements that specialize the generic value type
15
+ * bijectively (research §R7): `selectDisplay` ('pill' = legacy `enum`,
16
+ * 'dropdown' = legacy `select`) and `numericKind` ('number' | 'price').
17
+ *
18
+ * Invariant (total 1:1): every `entity_type='product'` definition has exactly
19
+ * one extension row — created/deleted together inside one catalog Command
20
+ * (research §R4). Enforced by the UNIQUE FK (ON DELETE RESTRICT at the DB
21
+ * level) + the single write surface.
22
+ *
23
+ * The row `id` is stable across the 061 migration, so the admin API keeps
24
+ * exposing the same attribute ids. All reads compose through
25
+ * `CatalogAttributeReadService` (contracts/catalog-attribute-view.md).
26
+ */
27
+ export declare class ProductAttribute {
28
+ [OptionalProps]?: 'id' | 'createdAt' | 'updatedAt' | 'selectDisplay' | 'numericKind' | 'isSearchable' | 'isFilterable' | 'isVariantAxis' | 'displayAsSlider' | 'isComparable' | 'isPromoRule' | 'filterPosition' | 'isVisibleOnProductPage' | 'channelScoped' | 'languageScoped' | 'massEditable' | 'quickSearchable';
29
+ id: string;
30
+ /** Backing product-host definition (custom_field_definitions.id, FK RESTRICT). */
31
+ customFieldDefinitionId: string;
32
+ /**
33
+ * Presentation refinement for cf `select` definitions:
34
+ * `'pill'` renders the legacy `enum` compact pill, `'dropdown'` the legacy
35
+ * `select` full dropdown. NULL for non-select value types.
36
+ */
37
+ selectDisplay: 'pill' | 'dropdown' | null;
38
+ /**
39
+ * Refinement for cf `number` definitions: `'price'` restores the legacy
40
+ * `price` semantics, `'number'` the plain numeric. NULL for non-numeric types.
41
+ */
42
+ numericKind: 'number' | 'price' | null;
43
+ isSearchable: boolean;
44
+ isFilterable: boolean;
45
+ isVariantAxis: boolean;
46
+ /** Honored only when the derived legacy value type is `number`/`price`. */
47
+ displayAsSlider: boolean;
48
+ isComparable: boolean;
49
+ /** Feature 039 — values participate in Quick Order search (independent of isSearchable). */
50
+ quickSearchable: boolean;
51
+ /** FR-038 — surfaces the attribute in the Promotion Rule criterion picker. */
52
+ isPromoRule: boolean;
53
+ /** FR-027 — ascending sort order on the storefront filter sidebar. */
54
+ filterPosition: number;
55
+ /** FR-030 — gates inclusion in the storefront PDP "Parametry produktu" tab. */
56
+ isVisibleOnProductPage: boolean;
57
+ /**
58
+ * Feature 023 — when `true`, the attribute MAY carry per-Sales-Channel
59
+ * overrides (stored in `product_value_overrides`).
60
+ */
61
+ channelScoped: boolean;
62
+ /**
63
+ * Feature 023 — when `true`, the attribute's value is keyed by language at
64
+ * every slot (`Record<lang, value>` in `products.attribute_values`).
65
+ */
66
+ languageScoped: boolean;
67
+ /** Feature 022 — surfaces the attribute in the Products Bulk Edit dialog. */
68
+ massEditable: boolean;
69
+ createdAt: Date;
70
+ updatedAt: Date;
71
+ }
72
+ //# sourceMappingURL=product-attribute.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-attribute.entity.d.ts","sourceRoot":"","sources":["../../../src/backend/entities/product-attribute.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,aAAa,EAAgC,MAAM,iBAAiB,CAAC;AAItF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAEa,gBAAgB;IAC3B,CAAC,aAAa,CAAC,CAAC,EACZ,IAAI,GACJ,WAAW,GACX,WAAW,GACX,eAAe,GACf,aAAa,GACb,cAAc,GACd,cAAc,GACd,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,wBAAwB,GACxB,eAAe,GACf,gBAAgB,GAChB,cAAc,GACd,iBAAiB,CAAC;IAGtB,EAAE,EAAE,MAAM,CAAgB;IAE1B,kFAAkF;IAGlF,uBAAuB,EAAG,MAAM,CAAC;IAEjC;;;;OAIG;IAEH,aAAa,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAAQ;IAEjD;;;OAGG;IAEH,WAAW,EAAE,QAAQ,GAAG,OAAO,GAAG,IAAI,CAAQ;IAG9C,YAAY,EAAE,OAAO,CAAS;IAG9B,YAAY,EAAE,OAAO,CAAS;IAG9B,aAAa,EAAE,OAAO,CAAS;IAE/B,2EAA2E;IAE3E,eAAe,EAAE,OAAO,CAAS;IAGjC,YAAY,EAAE,OAAO,CAAS;IAE9B,4FAA4F;IAE5F,eAAe,EAAE,OAAO,CAAS;IAEjC,8EAA8E;IAE9E,WAAW,EAAE,OAAO,CAAS;IAE7B,sEAAsE;IAEtE,cAAc,EAAE,MAAM,CAAK;IAE3B,+EAA+E;IAE/E,sBAAsB,EAAE,OAAO,CAAS;IAExC;;;OAGG;IAEH,aAAa,EAAE,OAAO,CAAS;IAE/B;;;OAGG;IAEH,cAAc,EAAE,OAAO,CAAS;IAEhC,6EAA6E;IAE7E,YAAY,EAAE,OAAO,CAAS;IAG9B,SAAS,EAAE,IAAI,CAAc;IAG7B,SAAS,EAAE,IAAI,CAAc;CAC9B"}
@@ -0,0 +1,161 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { Entity, OptionalProps, PrimaryKey, Property, Unique } from '@mikro-orm/core';
11
+ import { GlobalEntity } from '@endora-commerce/platform/tenancy';
12
+ import { randomUUID } from 'crypto';
13
+ /**
14
+ * ProductAttribute — the catalog EXTENSION of a product-host Custom Field
15
+ * definition (feature 061, data-model.md §1.3).
16
+ *
17
+ * The generic identity (key, per-locale label, labelDefault, value type,
18
+ * required flag) lives on `custom_field_definitions` (`entity_type='product'`,
19
+ * owned by the custom_fields module). This row carries ONLY the
20
+ * catalog-interpreted behavior surface:
21
+ *
22
+ * - the 12 catalog capability flags (search / filter / variant axis /
23
+ * compare / quick order / promo rule / PDP visibility / scoping / bulk
24
+ * edit) — typed, indexed, SQL-filterable;
25
+ * - two presentation refinements that specialize the generic value type
26
+ * bijectively (research §R7): `selectDisplay` ('pill' = legacy `enum`,
27
+ * 'dropdown' = legacy `select`) and `numericKind` ('number' | 'price').
28
+ *
29
+ * Invariant (total 1:1): every `entity_type='product'` definition has exactly
30
+ * one extension row — created/deleted together inside one catalog Command
31
+ * (research §R4). Enforced by the UNIQUE FK (ON DELETE RESTRICT at the DB
32
+ * level) + the single write surface.
33
+ *
34
+ * The row `id` is stable across the 061 migration, so the admin API keeps
35
+ * exposing the same attribute ids. All reads compose through
36
+ * `CatalogAttributeReadService` (contracts/catalog-attribute-view.md).
37
+ */
38
+ let ProductAttribute = class ProductAttribute {
39
+ [OptionalProps];
40
+ id = randomUUID();
41
+ /** Backing product-host definition (custom_field_definitions.id, FK RESTRICT). */
42
+ customFieldDefinitionId;
43
+ /**
44
+ * Presentation refinement for cf `select` definitions:
45
+ * `'pill'` renders the legacy `enum` compact pill, `'dropdown'` the legacy
46
+ * `select` full dropdown. NULL for non-select value types.
47
+ */
48
+ selectDisplay = null;
49
+ /**
50
+ * Refinement for cf `number` definitions: `'price'` restores the legacy
51
+ * `price` semantics, `'number'` the plain numeric. NULL for non-numeric types.
52
+ */
53
+ numericKind = null;
54
+ isSearchable = false;
55
+ isFilterable = false;
56
+ isVariantAxis = false;
57
+ /** Honored only when the derived legacy value type is `number`/`price`. */
58
+ displayAsSlider = false;
59
+ isComparable = false;
60
+ /** Feature 039 — values participate in Quick Order search (independent of isSearchable). */
61
+ quickSearchable = false;
62
+ /** FR-038 — surfaces the attribute in the Promotion Rule criterion picker. */
63
+ isPromoRule = false;
64
+ /** FR-027 — ascending sort order on the storefront filter sidebar. */
65
+ filterPosition = 0;
66
+ /** FR-030 — gates inclusion in the storefront PDP "Parametry produktu" tab. */
67
+ isVisibleOnProductPage = false;
68
+ /**
69
+ * Feature 023 — when `true`, the attribute MAY carry per-Sales-Channel
70
+ * overrides (stored in `product_value_overrides`).
71
+ */
72
+ channelScoped = false;
73
+ /**
74
+ * Feature 023 — when `true`, the attribute's value is keyed by language at
75
+ * every slot (`Record<lang, value>` in `products.attribute_values`).
76
+ */
77
+ languageScoped = false;
78
+ /** Feature 022 — surfaces the attribute in the Products Bulk Edit dialog. */
79
+ massEditable = false;
80
+ createdAt = new Date();
81
+ updatedAt = new Date();
82
+ };
83
+ __decorate([
84
+ PrimaryKey({ type: 'uuid' }),
85
+ __metadata("design:type", String)
86
+ ], ProductAttribute.prototype, "id", void 0);
87
+ __decorate([
88
+ Property({ type: 'uuid' }),
89
+ Unique(),
90
+ __metadata("design:type", String)
91
+ ], ProductAttribute.prototype, "customFieldDefinitionId", void 0);
92
+ __decorate([
93
+ Property({ type: 'string', length: 16, nullable: true }),
94
+ __metadata("design:type", Object)
95
+ ], ProductAttribute.prototype, "selectDisplay", void 0);
96
+ __decorate([
97
+ Property({ type: 'string', length: 8, nullable: true }),
98
+ __metadata("design:type", Object)
99
+ ], ProductAttribute.prototype, "numericKind", void 0);
100
+ __decorate([
101
+ Property({ type: 'boolean' }),
102
+ __metadata("design:type", Boolean)
103
+ ], ProductAttribute.prototype, "isSearchable", void 0);
104
+ __decorate([
105
+ Property({ type: 'boolean' }),
106
+ __metadata("design:type", Boolean)
107
+ ], ProductAttribute.prototype, "isFilterable", void 0);
108
+ __decorate([
109
+ Property({ type: 'boolean' }),
110
+ __metadata("design:type", Boolean)
111
+ ], ProductAttribute.prototype, "isVariantAxis", void 0);
112
+ __decorate([
113
+ Property({ type: 'boolean' }),
114
+ __metadata("design:type", Boolean)
115
+ ], ProductAttribute.prototype, "displayAsSlider", void 0);
116
+ __decorate([
117
+ Property({ type: 'boolean' }),
118
+ __metadata("design:type", Boolean)
119
+ ], ProductAttribute.prototype, "isComparable", void 0);
120
+ __decorate([
121
+ Property({ type: 'boolean' }),
122
+ __metadata("design:type", Boolean)
123
+ ], ProductAttribute.prototype, "quickSearchable", void 0);
124
+ __decorate([
125
+ Property({ type: 'boolean' }),
126
+ __metadata("design:type", Boolean)
127
+ ], ProductAttribute.prototype, "isPromoRule", void 0);
128
+ __decorate([
129
+ Property({ type: 'integer' }),
130
+ __metadata("design:type", Number)
131
+ ], ProductAttribute.prototype, "filterPosition", void 0);
132
+ __decorate([
133
+ Property({ type: 'boolean' }),
134
+ __metadata("design:type", Boolean)
135
+ ], ProductAttribute.prototype, "isVisibleOnProductPage", void 0);
136
+ __decorate([
137
+ Property({ type: 'boolean' }),
138
+ __metadata("design:type", Boolean)
139
+ ], ProductAttribute.prototype, "channelScoped", void 0);
140
+ __decorate([
141
+ Property({ type: 'boolean' }),
142
+ __metadata("design:type", Boolean)
143
+ ], ProductAttribute.prototype, "languageScoped", void 0);
144
+ __decorate([
145
+ Property({ type: 'boolean' }),
146
+ __metadata("design:type", Boolean)
147
+ ], ProductAttribute.prototype, "massEditable", void 0);
148
+ __decorate([
149
+ Property({ type: 'datetime', onCreate: () => new Date() }),
150
+ __metadata("design:type", Date)
151
+ ], ProductAttribute.prototype, "createdAt", void 0);
152
+ __decorate([
153
+ Property({ type: 'datetime', onUpdate: () => new Date() }),
154
+ __metadata("design:type", Date)
155
+ ], ProductAttribute.prototype, "updatedAt", void 0);
156
+ ProductAttribute = __decorate([
157
+ GlobalEntity(),
158
+ Entity({ tableName: 'product_attributes' })
159
+ ], ProductAttribute);
160
+ export { ProductAttribute };
161
+ //# sourceMappingURL=product-attribute.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-attribute.entity.js","sourceRoot":"","sources":["../../../src/backend/entities/product-attribute.entity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGI,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,CAAC,aAAa,CAAC,CAiBO;IAGtB,EAAE,GAAW,UAAU,EAAE,CAAC;IAE1B,kFAAkF;IAGlF,uBAAuB,CAAU;IAEjC;;;;OAIG;IAEH,aAAa,GAA+B,IAAI,CAAC;IAEjD;;;OAGG;IAEH,WAAW,GAA8B,IAAI,CAAC;IAG9C,YAAY,GAAY,KAAK,CAAC;IAG9B,YAAY,GAAY,KAAK,CAAC;IAG9B,aAAa,GAAY,KAAK,CAAC;IAE/B,2EAA2E;IAE3E,eAAe,GAAY,KAAK,CAAC;IAGjC,YAAY,GAAY,KAAK,CAAC;IAE9B,4FAA4F;IAE5F,eAAe,GAAY,KAAK,CAAC;IAEjC,8EAA8E;IAE9E,WAAW,GAAY,KAAK,CAAC;IAE7B,sEAAsE;IAEtE,cAAc,GAAW,CAAC,CAAC;IAE3B,+EAA+E;IAE/E,sBAAsB,GAAY,KAAK,CAAC;IAExC;;;OAGG;IAEH,aAAa,GAAY,KAAK,CAAC;IAE/B;;;OAGG;IAEH,cAAc,GAAY,KAAK,CAAC;IAEhC,6EAA6E;IAE7E,YAAY,GAAY,KAAK,CAAC;IAG9B,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;IAG7B,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;CAC9B,CAAA;AA7EC;IADC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4CACH;AAK1B;IAFC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE;;iEACwB;AAQjC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACR;AAOjD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACV;AAG9C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;sDACA;AAG9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;sDACA;AAG9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;uDACC;AAI/B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;yDACG;AAGjC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;sDACA;AAI9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;yDACG;AAIjC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;qDACD;AAI7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;wDACH;AAI3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;gEACU;AAOxC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;uDACC;AAO/B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;wDACE;AAIhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;sDACA;AAG9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAChD,IAAI;mDAAc;AAG7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAChD,IAAI;mDAAc;AAjGlB,gBAAgB;IAF5B,YAAY,EAAE;IACd,MAAM,CAAC,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC;GAC/B,gBAAgB,CAkG5B"}
@@ -0,0 +1,28 @@
1
+ import { OptionalProps } from '@mikro-orm/core';
2
+ /**
3
+ * ProductEditorPreference — feature 022.
4
+ *
5
+ * Per-(admin user, product) memory of the last Sales Channel + Language
6
+ * the editor selected on the product edit page. Read on page load to
7
+ * seed the switchers, upserted (debounced) on every successful render
8
+ * and on every switcher change.
9
+ *
10
+ * `lastChannelId` NULL means "Global / no channel".
11
+ * `lastLanguageCode` NULL means "use platform's primary admin
12
+ * language" — the page resolves the actual default at render time
13
+ * rather than baking a stale code into the row.
14
+ *
15
+ * No FK on `lastChannelId` to `sales_channels` — the preference is
16
+ * best-effort. If a remembered channel has been un-assigned from the
17
+ * product (or deleted) by the time the editor returns, the page falls
18
+ * back to Global on its own and the next save overwrites the row.
19
+ */
20
+ export declare class ProductEditorPreference {
21
+ [OptionalProps]?: 'updatedAt' | 'lastChannelId' | 'lastLanguageCode';
22
+ adminUserId: string;
23
+ productId: string;
24
+ lastChannelId?: string | null;
25
+ lastLanguageCode?: string | null;
26
+ updatedAt: Date;
27
+ }
28
+ //# sourceMappingURL=product-editor-preference.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-editor-preference.entity.d.ts","sourceRoot":"","sources":["../../../src/backend/entities/product-editor-preference.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,aAAa,EAAwB,MAAM,iBAAiB,CAAC;AAG9E;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAEa,uBAAuB;IAClC,CAAC,aAAa,CAAC,CAAC,EAAE,WAAW,GAAG,eAAe,GAAG,kBAAkB,CAAC;IAGrE,WAAW,EAAG,MAAM,CAAC;IAGrB,SAAS,EAAG,MAAM,CAAC;IAGnB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAG9B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGjC,SAAS,EAAE,IAAI,CAAc;CAC9B"}
@@ -0,0 +1,63 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { Entity, OptionalProps, PrimaryKey, Property } from '@mikro-orm/core';
11
+ import { GlobalEntity } from '@endora-commerce/platform/tenancy';
12
+ /**
13
+ * ProductEditorPreference — feature 022.
14
+ *
15
+ * Per-(admin user, product) memory of the last Sales Channel + Language
16
+ * the editor selected on the product edit page. Read on page load to
17
+ * seed the switchers, upserted (debounced) on every successful render
18
+ * and on every switcher change.
19
+ *
20
+ * `lastChannelId` NULL means "Global / no channel".
21
+ * `lastLanguageCode` NULL means "use platform's primary admin
22
+ * language" — the page resolves the actual default at render time
23
+ * rather than baking a stale code into the row.
24
+ *
25
+ * No FK on `lastChannelId` to `sales_channels` — the preference is
26
+ * best-effort. If a remembered channel has been un-assigned from the
27
+ * product (or deleted) by the time the editor returns, the page falls
28
+ * back to Global on its own and the next save overwrites the row.
29
+ */
30
+ let ProductEditorPreference = class ProductEditorPreference {
31
+ [OptionalProps];
32
+ adminUserId;
33
+ productId;
34
+ lastChannelId;
35
+ lastLanguageCode;
36
+ updatedAt = new Date();
37
+ };
38
+ __decorate([
39
+ PrimaryKey({ type: 'uuid' }),
40
+ __metadata("design:type", String)
41
+ ], ProductEditorPreference.prototype, "adminUserId", void 0);
42
+ __decorate([
43
+ PrimaryKey({ type: 'uuid' }),
44
+ __metadata("design:type", String)
45
+ ], ProductEditorPreference.prototype, "productId", void 0);
46
+ __decorate([
47
+ Property({ type: 'uuid', nullable: true }),
48
+ __metadata("design:type", Object)
49
+ ], ProductEditorPreference.prototype, "lastChannelId", void 0);
50
+ __decorate([
51
+ Property({ type: 'string', length: 16, nullable: true }),
52
+ __metadata("design:type", Object)
53
+ ], ProductEditorPreference.prototype, "lastLanguageCode", void 0);
54
+ __decorate([
55
+ Property({ type: 'datetime', onUpdate: () => new Date() }),
56
+ __metadata("design:type", Date)
57
+ ], ProductEditorPreference.prototype, "updatedAt", void 0);
58
+ ProductEditorPreference = __decorate([
59
+ GlobalEntity(),
60
+ Entity({ tableName: 'product_editor_preferences' })
61
+ ], ProductEditorPreference);
62
+ export { ProductEditorPreference };
63
+ //# sourceMappingURL=product-editor-preference.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-editor-preference.entity.js","sourceRoot":"","sources":["../../../src/backend/entities/product-editor-preference.entity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEjE;;;;;;;;;;;;;;;;;GAiBG;AAGI,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,CAAC,aAAa,CAAC,CAAsD;IAGrE,WAAW,CAAU;IAGrB,SAAS,CAAU;IAGnB,aAAa,CAAiB;IAG9B,gBAAgB,CAAiB;IAGjC,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;CAC9B,CAAA;AAbC;IADC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4DACR;AAGrB;IADC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0DACV;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8DACb;AAG9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iEACxB;AAGjC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAChD,IAAI;0DAAc;AAhBlB,uBAAuB;IAFnC,YAAY,EAAE;IACd,MAAM,CAAC,EAAE,SAAS,EAAE,4BAA4B,EAAE,CAAC;GACvC,uBAAuB,CAiBnC"}
@@ -0,0 +1,25 @@
1
+ import { OptionalProps } from '@mikro-orm/core';
2
+ export type ProductLinkKind = 'related' | 'up_sell' | 'cross_sell';
3
+ /**
4
+ * ProductLink — directed link between two Products (feature 002 US4,
5
+ * data-model.md §2.7). The link `kind` determines where it surfaces:
6
+ * - `related` : "Related products" section on PDP
7
+ * - `up_sell` : "You might also like" on PDP
8
+ * - `cross_sell`: "You may also need" on cart
9
+ *
10
+ * DB-level guarantees (migration 022): self-link rejected by CHECK
11
+ * constraint; duplicate (source, target, kind) rejected by UNIQUE; both
12
+ * sides cascade on product delete. Position is admin-curated per
13
+ * (source_product_id, kind).
14
+ */
15
+ export declare class ProductLink {
16
+ [OptionalProps]?: 'id' | 'position' | 'createdAt' | 'updatedAt';
17
+ id: string;
18
+ sourceProductId: string;
19
+ targetProductId: string;
20
+ kind: ProductLinkKind;
21
+ position: number;
22
+ createdAt: Date;
23
+ updatedAt: Date;
24
+ }
25
+ //# sourceMappingURL=product-link.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-link.entity.d.ts","sourceRoot":"","sources":["../../../src/backend/entities/product-link.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,aAAa,EAAwB,MAAM,iBAAiB,CAAC;AAIrF,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,YAAY,CAAC;AAEnE;;;;;;;;;;;GAWG;AACH,qBAEa,WAAW;IACtB,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;IAGhE,EAAE,EAAE,MAAM,CAAgB;IAI1B,eAAe,EAAG,MAAM,CAAC;IAIzB,eAAe,EAAG,MAAM,CAAC;IAGzB,IAAI,EAAG,eAAe,CAAC;IAGvB,QAAQ,EAAE,MAAM,CAAK;IAGrB,SAAS,EAAE,IAAI,CAAc;IAG7B,SAAS,EAAE,IAAI,CAAc;CAC9B"}
@@ -0,0 +1,70 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { Entity, Index, OptionalProps, PrimaryKey, Property } from '@mikro-orm/core';
11
+ import { GlobalEntity } from '@endora-commerce/platform/tenancy';
12
+ import { randomUUID } from 'crypto';
13
+ /**
14
+ * ProductLink — directed link between two Products (feature 002 US4,
15
+ * data-model.md §2.7). The link `kind` determines where it surfaces:
16
+ * - `related` : "Related products" section on PDP
17
+ * - `up_sell` : "You might also like" on PDP
18
+ * - `cross_sell`: "You may also need" on cart
19
+ *
20
+ * DB-level guarantees (migration 022): self-link rejected by CHECK
21
+ * constraint; duplicate (source, target, kind) rejected by UNIQUE; both
22
+ * sides cascade on product delete. Position is admin-curated per
23
+ * (source_product_id, kind).
24
+ */
25
+ let ProductLink = class ProductLink {
26
+ [OptionalProps];
27
+ id = randomUUID();
28
+ sourceProductId;
29
+ targetProductId;
30
+ kind;
31
+ position = 0;
32
+ createdAt = new Date();
33
+ updatedAt = new Date();
34
+ };
35
+ __decorate([
36
+ PrimaryKey({ type: 'uuid' }),
37
+ __metadata("design:type", String)
38
+ ], ProductLink.prototype, "id", void 0);
39
+ __decorate([
40
+ Property({ type: 'uuid' }),
41
+ Index(),
42
+ __metadata("design:type", String)
43
+ ], ProductLink.prototype, "sourceProductId", void 0);
44
+ __decorate([
45
+ Property({ type: 'uuid' }),
46
+ Index(),
47
+ __metadata("design:type", String)
48
+ ], ProductLink.prototype, "targetProductId", void 0);
49
+ __decorate([
50
+ Property({ type: 'string', length: 16 }),
51
+ __metadata("design:type", String)
52
+ ], ProductLink.prototype, "kind", void 0);
53
+ __decorate([
54
+ Property({ type: 'integer' }),
55
+ __metadata("design:type", Number)
56
+ ], ProductLink.prototype, "position", void 0);
57
+ __decorate([
58
+ Property({ type: 'datetime', onCreate: () => new Date() }),
59
+ __metadata("design:type", Date)
60
+ ], ProductLink.prototype, "createdAt", void 0);
61
+ __decorate([
62
+ Property({ type: 'datetime', onUpdate: () => new Date() }),
63
+ __metadata("design:type", Date)
64
+ ], ProductLink.prototype, "updatedAt", void 0);
65
+ ProductLink = __decorate([
66
+ GlobalEntity(),
67
+ Entity({ tableName: 'product_links' })
68
+ ], ProductLink);
69
+ export { ProductLink };
70
+ //# sourceMappingURL=product-link.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-link.entity.js","sourceRoot":"","sources":["../../../src/backend/entities/product-link.entity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAIpC;;;;;;;;;;;GAWG;AAGI,IAAM,WAAW,GAAjB,MAAM,WAAW;IACtB,CAAC,aAAa,CAAC,CAAiD;IAGhE,EAAE,GAAW,UAAU,EAAE,CAAC;IAI1B,eAAe,CAAU;IAIzB,eAAe,CAAU;IAGzB,IAAI,CAAmB;IAGvB,QAAQ,GAAW,CAAC,CAAC;IAGrB,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;IAG7B,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;CAC9B,CAAA;AArBC;IADC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uCACH;AAI1B;IAFC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC1B,KAAK,EAAE;;oDACiB;AAIzB;IAFC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC1B,KAAK,EAAE;;oDACiB;AAGzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;yCAClB;AAGvB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;6CACT;AAGrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAChD,IAAI;8CAAc;AAG7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAChD,IAAI;8CAAc;AAxBlB,WAAW;IAFvB,YAAY,EAAE;IACd,MAAM,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;GAC1B,WAAW,CAyBvB"}
@@ -0,0 +1,26 @@
1
+ import { OptionalProps } from '@mikro-orm/core';
2
+ /**
3
+ * ProductPackagingUnit — feature 043. A named ordering unit attached to a
4
+ * product, e.g. "Paleta" = 480 pieces. Operators manage these in the
5
+ * Inventory section of the admin product card; the storefront surfaces them
6
+ * so a buyer can order by the unit (which adds `baseQuantity × units` pieces
7
+ * to the cart, labelled with the unit name).
8
+ *
9
+ * Lines (cart/order/RFQ) snapshot their own copy of the name + base quantity
10
+ * at creation, so deleting or editing a unit never alters historical
11
+ * documents — a plain hard delete is therefore safe (no soft-delete column).
12
+ */
13
+ export declare class ProductPackagingUnit {
14
+ [OptionalProps]?: 'id' | 'position' | 'isDefault' | 'createdAt' | 'updatedAt';
15
+ id: string;
16
+ productId: string;
17
+ name: string;
18
+ /** Number of base pieces this unit contains. Always >= 1. */
19
+ baseQuantity: number;
20
+ position: number;
21
+ /** Whether this unit is the one presented by default on the storefront. */
22
+ isDefault: boolean;
23
+ createdAt: Date;
24
+ updatedAt: Date;
25
+ }
26
+ //# sourceMappingURL=product-packaging-unit.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-packaging-unit.entity.d.ts","sourceRoot":"","sources":["../../../src/backend/entities/product-packaging-unit.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,aAAa,EAAgC,MAAM,iBAAiB,CAAC;AAI7F;;;;;;;;;;GAUG;AACH,qBAGa,oBAAoB;IAC/B,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;IAG9E,EAAE,EAAE,MAAM,CAAgB;IAI1B,SAAS,EAAG,MAAM,CAAC;IAGnB,IAAI,EAAG,MAAM,CAAC;IAEd,6DAA6D;IAE7D,YAAY,EAAG,MAAM,CAAC;IAGtB,QAAQ,EAAE,MAAM,CAAK;IAErB,2EAA2E;IAE3E,SAAS,EAAE,OAAO,CAAS;IAG3B,SAAS,EAAE,IAAI,CAAc;IAG7B,SAAS,EAAE,IAAI,CAAc;CAC9B"}
@@ -0,0 +1,76 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { Entity, Index, OptionalProps, PrimaryKey, Property, Unique } from '@mikro-orm/core';
11
+ import { GlobalEntity } from '@endora-commerce/platform/tenancy';
12
+ import { randomUUID } from 'crypto';
13
+ /**
14
+ * ProductPackagingUnit — feature 043. A named ordering unit attached to a
15
+ * product, e.g. "Paleta" = 480 pieces. Operators manage these in the
16
+ * Inventory section of the admin product card; the storefront surfaces them
17
+ * so a buyer can order by the unit (which adds `baseQuantity × units` pieces
18
+ * to the cart, labelled with the unit name).
19
+ *
20
+ * Lines (cart/order/RFQ) snapshot their own copy of the name + base quantity
21
+ * at creation, so deleting or editing a unit never alters historical
22
+ * documents — a plain hard delete is therefore safe (no soft-delete column).
23
+ */
24
+ let ProductPackagingUnit = class ProductPackagingUnit {
25
+ [OptionalProps];
26
+ id = randomUUID();
27
+ productId;
28
+ name;
29
+ /** Number of base pieces this unit contains. Always >= 1. */
30
+ baseQuantity;
31
+ position = 0;
32
+ /** Whether this unit is the one presented by default on the storefront. */
33
+ isDefault = false;
34
+ createdAt = new Date();
35
+ updatedAt = new Date();
36
+ };
37
+ __decorate([
38
+ PrimaryKey({ type: 'uuid' }),
39
+ __metadata("design:type", String)
40
+ ], ProductPackagingUnit.prototype, "id", void 0);
41
+ __decorate([
42
+ Property({ type: 'uuid' }),
43
+ Index(),
44
+ __metadata("design:type", String)
45
+ ], ProductPackagingUnit.prototype, "productId", void 0);
46
+ __decorate([
47
+ Property({ type: 'string', length: 160 }),
48
+ __metadata("design:type", String)
49
+ ], ProductPackagingUnit.prototype, "name", void 0);
50
+ __decorate([
51
+ Property({ type: 'integer' }),
52
+ __metadata("design:type", Number)
53
+ ], ProductPackagingUnit.prototype, "baseQuantity", void 0);
54
+ __decorate([
55
+ Property({ type: 'integer' }),
56
+ __metadata("design:type", Number)
57
+ ], ProductPackagingUnit.prototype, "position", void 0);
58
+ __decorate([
59
+ Property({ type: 'boolean' }),
60
+ __metadata("design:type", Boolean)
61
+ ], ProductPackagingUnit.prototype, "isDefault", void 0);
62
+ __decorate([
63
+ Property({ type: 'datetime', onCreate: () => new Date() }),
64
+ __metadata("design:type", Date)
65
+ ], ProductPackagingUnit.prototype, "createdAt", void 0);
66
+ __decorate([
67
+ Property({ type: 'datetime', onUpdate: () => new Date() }),
68
+ __metadata("design:type", Date)
69
+ ], ProductPackagingUnit.prototype, "updatedAt", void 0);
70
+ ProductPackagingUnit = __decorate([
71
+ GlobalEntity(),
72
+ Entity({ tableName: 'product_packaging_units' }),
73
+ Unique({ properties: ['productId', 'name'] })
74
+ ], ProductPackagingUnit);
75
+ export { ProductPackagingUnit };
76
+ //# sourceMappingURL=product-packaging-unit.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-packaging-unit.entity.js","sourceRoot":"","sources":["../../../src/backend/entities/product-packaging-unit.entity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC;;;;;;;;;;GAUG;AAII,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,CAAC,aAAa,CAAC,CAA+D;IAG9E,EAAE,GAAW,UAAU,EAAE,CAAC;IAI1B,SAAS,CAAU;IAGnB,IAAI,CAAU;IAEd,6DAA6D;IAE7D,YAAY,CAAU;IAGtB,QAAQ,GAAW,CAAC,CAAC;IAErB,2EAA2E;IAE3E,SAAS,GAAY,KAAK,CAAC;IAG3B,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;IAG7B,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;CAC9B,CAAA;AAzBC;IADC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDACH;AAI1B;IAFC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC1B,KAAK,EAAE;;uDACW;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;kDAC5B;AAId;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;0DACR;AAGtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;sDACT;AAIrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;uDACH;AAG3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAChD,IAAI;uDAAc;AAG7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAChD,IAAI;uDAAc;AA5BlB,oBAAoB;IAHhC,YAAY,EAAE;IACd,MAAM,CAAC,EAAE,SAAS,EAAE,yBAAyB,EAAE,CAAC;IAChD,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,CAAC;GACjC,oBAAoB,CA6BhC"}
@@ -0,0 +1,43 @@
1
+ import { OptionalProps } from '@mikro-orm/core';
2
+ /**
3
+ * ProductValueOverride — feature 022.
4
+ *
5
+ * Stores channel-aware overrides for product attribute values. The
6
+ * global baseline lives on `products.name` / `products.description`
7
+ * (per-language JSONB) and `products.attribute_values` (per-attribute
8
+ * JSONB) — this entity only holds the (channel, [language]) slots.
9
+ *
10
+ * The resolver in `services/product-value-resolver.ts` (and its
11
+ * pure-function twin in `@endora-commerce/contracts`) fuses baseline + overrides
12
+ * into an effective value per (channel, language) context using the
13
+ * fallback chain documented in
14
+ * specs/023-product-scope-editor/data-model.md §3.2.
15
+ *
16
+ * `attributeKey` is a string — for user-defined attributes it matches
17
+ * `product_attributes.key`; for system attributes it is one of the
18
+ * reserved values `'name'` or `'description'` (see
19
+ * services/system-attribute-scopes.ts). There is no FK from
20
+ * `attribute_key` to `product_attributes` because system attributes
21
+ * are not rows there.
22
+ *
23
+ * `languageCode` is NULLABLE — a NULL row models a channel-only
24
+ * override (attribute is channel-scoped but not language-scoped);
25
+ * a non-null row models a channel+language override. Two partial
26
+ * UNIQUE indexes (see migration 043) enforce uniqueness across both
27
+ * shapes.
28
+ */
29
+ export declare class ProductValueOverride {
30
+ [OptionalProps]?: 'id' | 'createdAt' | 'updatedAt' | 'languageCode';
31
+ id: string;
32
+ productId: string;
33
+ attributeKey: string;
34
+ channelId: string;
35
+ languageCode?: string | null;
36
+ /** Wrapped as `{ v: ... }` so the column is always a JSONB object. */
37
+ value: {
38
+ v: unknown;
39
+ };
40
+ createdAt: Date;
41
+ updatedAt: Date;
42
+ }
43
+ //# sourceMappingURL=product-value-override.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-value-override.entity.d.ts","sourceRoot":"","sources":["../../../src/backend/entities/product-value-override.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,aAAa,EAAwB,MAAM,iBAAiB,CAAC;AAIrF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAEa,oBAAoB;IAC/B,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,GAAG,WAAW,GAAG,WAAW,GAAG,cAAc,CAAC;IAGpE,EAAE,EAAE,MAAM,CAAgB;IAI1B,SAAS,EAAG,MAAM,CAAC;IAGnB,YAAY,EAAG,MAAM,CAAC;IAGtB,SAAS,EAAG,MAAM,CAAC;IAGnB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,sEAAsE;IAEtE,KAAK,EAAG;QAAE,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAGvB,SAAS,EAAE,IAAI,CAAc;IAG7B,SAAS,EAAE,IAAI,CAAc;CAC9B"}