@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.
- package/LICENSE +21 -0
- package/README.md +63 -0
- package/dist/admin/components/PackagingUnitsEditor.d.ts +12 -0
- package/dist/admin/components/PackagingUnitsEditor.d.ts.map +1 -0
- package/dist/admin/components/PackagingUnitsEditor.js +99 -0
- package/dist/admin/components/PackagingUnitsEditor.js.map +1 -0
- package/dist/admin/components/ProductAttributesTab.d.ts +13 -0
- package/dist/admin/components/ProductAttributesTab.d.ts.map +1 -0
- package/dist/admin/components/ProductAttributesTab.js +140 -0
- package/dist/admin/components/ProductAttributesTab.js.map +1 -0
- package/dist/admin/components/ProductInventoryTab.d.ts +14 -0
- package/dist/admin/components/ProductInventoryTab.d.ts.map +1 -0
- package/dist/admin/components/ProductInventoryTab.js +284 -0
- package/dist/admin/components/ProductInventoryTab.js.map +1 -0
- package/dist/admin/components/ProductScopeEditor.d.ts +94 -0
- package/dist/admin/components/ProductScopeEditor.d.ts.map +1 -0
- package/dist/admin/components/ProductScopeEditor.js +395 -0
- package/dist/admin/components/ProductScopeEditor.js.map +1 -0
- package/dist/admin/components/ProductsBulkEditDialog.d.ts +11 -0
- package/dist/admin/components/ProductsBulkEditDialog.d.ts.map +1 -0
- package/dist/admin/components/ProductsBulkEditDialog.js +304 -0
- package/dist/admin/components/ProductsBulkEditDialog.js.map +1 -0
- package/dist/admin/index.d.ts +45 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +184 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/admin/lib/resolve-product-selection.d.ts +21 -0
- package/dist/admin/lib/resolve-product-selection.d.ts.map +1 -0
- package/dist/admin/lib/resolve-product-selection.js +25 -0
- package/dist/admin/lib/resolve-product-selection.js.map +1 -0
- package/dist/admin/pages/AttachmentTypesPage.d.ts +18 -0
- package/dist/admin/pages/AttachmentTypesPage.d.ts.map +1 -0
- package/dist/admin/pages/AttachmentTypesPage.js +92 -0
- package/dist/admin/pages/AttachmentTypesPage.js.map +1 -0
- package/dist/admin/pages/AttributeSetsPage.d.ts +21 -0
- package/dist/admin/pages/AttributeSetsPage.d.ts.map +1 -0
- package/dist/admin/pages/AttributeSetsPage.js +158 -0
- package/dist/admin/pages/AttributeSetsPage.js.map +1 -0
- package/dist/admin/pages/AttributesManager.d.ts +9 -0
- package/dist/admin/pages/AttributesManager.d.ts.map +1 -0
- package/dist/admin/pages/AttributesManager.js +305 -0
- package/dist/admin/pages/AttributesManager.js.map +1 -0
- package/dist/admin/pages/BulkOperationDetailPage.d.ts +9 -0
- package/dist/admin/pages/BulkOperationDetailPage.d.ts.map +1 -0
- package/dist/admin/pages/BulkOperationDetailPage.js +187 -0
- package/dist/admin/pages/BulkOperationDetailPage.js.map +1 -0
- package/dist/admin/pages/BulkOperationsPage.d.ts +9 -0
- package/dist/admin/pages/BulkOperationsPage.d.ts.map +1 -0
- package/dist/admin/pages/BulkOperationsPage.js +98 -0
- package/dist/admin/pages/BulkOperationsPage.js.map +1 -0
- package/dist/admin/pages/CategoriesTree.d.ts +9 -0
- package/dist/admin/pages/CategoriesTree.d.ts.map +1 -0
- package/dist/admin/pages/CategoriesTree.js +176 -0
- package/dist/admin/pages/CategoriesTree.js.map +1 -0
- package/dist/admin/pages/ProductEditor.d.ts +13 -0
- package/dist/admin/pages/ProductEditor.d.ts.map +1 -0
- package/dist/admin/pages/ProductEditor.js +1050 -0
- package/dist/admin/pages/ProductEditor.js.map +1 -0
- package/dist/admin/pages/ProductsList.d.ts +9 -0
- package/dist/admin/pages/ProductsList.d.ts.map +1 -0
- package/dist/admin/pages/ProductsList.js +399 -0
- package/dist/admin/pages/ProductsList.js.map +1 -0
- package/dist/backend/commands/attribute-commands.d.ts +111 -0
- package/dist/backend/commands/attribute-commands.d.ts.map +1 -0
- package/dist/backend/commands/attribute-commands.js +482 -0
- package/dist/backend/commands/attribute-commands.js.map +1 -0
- package/dist/backend/demo/reset.d.ts +23 -0
- package/dist/backend/demo/reset.d.ts.map +1 -0
- package/dist/backend/demo/reset.js +41 -0
- package/dist/backend/demo/reset.js.map +1 -0
- package/dist/backend/demo/rows.d.ts +103 -0
- package/dist/backend/demo/rows.d.ts.map +1 -0
- package/dist/backend/demo/rows.js +162 -0
- package/dist/backend/demo/rows.js.map +1 -0
- package/dist/backend/demo/seed.d.ts +35 -0
- package/dist/backend/demo/seed.d.ts.map +1 -0
- package/dist/backend/demo/seed.js +177 -0
- package/dist/backend/demo/seed.js.map +1 -0
- package/dist/backend/entities/attachment-type.entity.d.ts +16 -0
- package/dist/backend/entities/attachment-type.entity.d.ts.map +1 -0
- package/dist/backend/entities/attachment-type.entity.js +57 -0
- package/dist/backend/entities/attachment-type.entity.js.map +1 -0
- package/dist/backend/entities/attribute-set-attribute.entity.d.ts +26 -0
- package/dist/backend/entities/attribute-set-attribute.entity.d.ts.map +1 -0
- package/dist/backend/entities/attribute-set-attribute.entity.js +55 -0
- package/dist/backend/entities/attribute-set-attribute.entity.js.map +1 -0
- package/dist/backend/entities/attribute-set.entity.d.ts +22 -0
- package/dist/backend/entities/attribute-set.entity.d.ts.map +1 -0
- package/dist/backend/entities/attribute-set.entity.js +67 -0
- package/dist/backend/entities/attribute-set.entity.js.map +1 -0
- package/dist/backend/entities/bulk-operation.entity.d.ts +78 -0
- package/dist/backend/entities/bulk-operation.entity.d.ts.map +1 -0
- package/dist/backend/entities/bulk-operation.entity.js +138 -0
- package/dist/backend/entities/bulk-operation.entity.js.map +1 -0
- package/dist/backend/entities/bundle-slot-option.entity.d.ts +23 -0
- package/dist/backend/entities/bundle-slot-option.entity.d.ts.map +1 -0
- package/dist/backend/entities/bundle-slot-option.entity.js +68 -0
- package/dist/backend/entities/bundle-slot-option.entity.js.map +1 -0
- package/dist/backend/entities/bundle-slot.entity.d.ts +25 -0
- package/dist/backend/entities/bundle-slot.entity.d.ts.map +1 -0
- package/dist/backend/entities/bundle-slot.entity.js +74 -0
- package/dist/backend/entities/bundle-slot.entity.js.map +1 -0
- package/dist/backend/entities/category.entity.d.ts +26 -0
- package/dist/backend/entities/category.entity.d.ts.map +1 -0
- package/dist/backend/entities/category.entity.js +119 -0
- package/dist/backend/entities/category.entity.js.map +1 -0
- package/dist/backend/entities/gallery-item-label.entity.d.ts +22 -0
- package/dist/backend/entities/gallery-item-label.entity.d.ts.map +1 -0
- package/dist/backend/entities/gallery-item-label.entity.js +50 -0
- package/dist/backend/entities/gallery-item-label.entity.js.map +1 -0
- package/dist/backend/entities/gallery-item.entity.d.ts +17 -0
- package/dist/backend/entities/gallery-item.entity.d.ts.map +1 -0
- package/dist/backend/entities/gallery-item.entity.js +58 -0
- package/dist/backend/entities/gallery-item.entity.js.map +1 -0
- package/dist/backend/entities/grouped-item.entity.d.ts +23 -0
- package/dist/backend/entities/grouped-item.entity.d.ts.map +1 -0
- package/dist/backend/entities/grouped-item.entity.js +68 -0
- package/dist/backend/entities/grouped-item.entity.js.map +1 -0
- package/dist/backend/entities/product-attachment.entity.d.ts +23 -0
- package/dist/backend/entities/product-attachment.entity.d.ts.map +1 -0
- package/dist/backend/entities/product-attachment.entity.js +77 -0
- package/dist/backend/entities/product-attachment.entity.js.map +1 -0
- package/dist/backend/entities/product-attribute.entity.d.ts +72 -0
- package/dist/backend/entities/product-attribute.entity.d.ts.map +1 -0
- package/dist/backend/entities/product-attribute.entity.js +161 -0
- package/dist/backend/entities/product-attribute.entity.js.map +1 -0
- package/dist/backend/entities/product-editor-preference.entity.d.ts +28 -0
- package/dist/backend/entities/product-editor-preference.entity.d.ts.map +1 -0
- package/dist/backend/entities/product-editor-preference.entity.js +63 -0
- package/dist/backend/entities/product-editor-preference.entity.js.map +1 -0
- package/dist/backend/entities/product-link.entity.d.ts +25 -0
- package/dist/backend/entities/product-link.entity.d.ts.map +1 -0
- package/dist/backend/entities/product-link.entity.js +70 -0
- package/dist/backend/entities/product-link.entity.js.map +1 -0
- package/dist/backend/entities/product-packaging-unit.entity.d.ts +26 -0
- package/dist/backend/entities/product-packaging-unit.entity.d.ts.map +1 -0
- package/dist/backend/entities/product-packaging-unit.entity.js +76 -0
- package/dist/backend/entities/product-packaging-unit.entity.js.map +1 -0
- package/dist/backend/entities/product-value-override.entity.d.ts +43 -0
- package/dist/backend/entities/product-value-override.entity.d.ts.map +1 -0
- package/dist/backend/entities/product-value-override.entity.js +90 -0
- package/dist/backend/entities/product-value-override.entity.js.map +1 -0
- package/dist/backend/entities/product-variant.entity.d.ts +18 -0
- package/dist/backend/entities/product-variant.entity.d.ts.map +1 -0
- package/dist/backend/entities/product-variant.entity.js +68 -0
- package/dist/backend/entities/product-variant.entity.js.map +1 -0
- package/dist/backend/entities/product.entity.d.ts +108 -0
- package/dist/backend/entities/product.entity.d.ts.map +1 -0
- package/dist/backend/entities/product.entity.js +230 -0
- package/dist/backend/entities/product.entity.js.map +1 -0
- package/dist/backend/index.d.ts +262 -0
- package/dist/backend/index.d.ts.map +1 -0
- package/dist/backend/index.js +642 -0
- package/dist/backend/index.js.map +1 -0
- package/dist/backend/plugin.d.ts +216 -0
- package/dist/backend/plugin.d.ts.map +1 -0
- package/dist/backend/plugin.js +223 -0
- package/dist/backend/plugin.js.map +1 -0
- package/dist/backend/prompt-tools.d.ts +47 -0
- package/dist/backend/prompt-tools.d.ts.map +1 -0
- package/dist/backend/prompt-tools.js +284 -0
- package/dist/backend/prompt-tools.js.map +1 -0
- package/dist/backend/routes.admin.d.ts +105 -0
- package/dist/backend/routes.admin.d.ts.map +1 -0
- package/dist/backend/routes.admin.js +1162 -0
- package/dist/backend/routes.admin.js.map +1 -0
- package/dist/backend/routes.api-key.d.ts +33 -0
- package/dist/backend/routes.api-key.d.ts.map +1 -0
- package/dist/backend/routes.api-key.js +43 -0
- package/dist/backend/routes.api-key.js.map +1 -0
- package/dist/backend/routes.external.d.ts +32 -0
- package/dist/backend/routes.external.d.ts.map +1 -0
- package/dist/backend/routes.external.js +115 -0
- package/dist/backend/routes.external.js.map +1 -0
- package/dist/backend/routes.public.d.ts +46 -0
- package/dist/backend/routes.public.d.ts.map +1 -0
- package/dist/backend/routes.public.js +318 -0
- package/dist/backend/routes.public.js.map +1 -0
- package/dist/backend/services/asset-references.d.ts +4 -0
- package/dist/backend/services/asset-references.d.ts.map +1 -0
- package/dist/backend/services/asset-references.js +104 -0
- package/dist/backend/services/asset-references.js.map +1 -0
- package/dist/backend/services/attachment.service.d.ts +45 -0
- package/dist/backend/services/attachment.service.d.ts.map +1 -0
- package/dist/backend/services/attachment.service.js +268 -0
- package/dist/backend/services/attachment.service.js.map +1 -0
- package/dist/backend/services/attribute-option-validator.d.ts +47 -0
- package/dist/backend/services/attribute-option-validator.d.ts.map +1 -0
- package/dist/backend/services/attribute-option-validator.js +69 -0
- package/dist/backend/services/attribute-option-validator.js.map +1 -0
- package/dist/backend/services/attribute-set-validations.d.ts +65 -0
- package/dist/backend/services/attribute-set-validations.d.ts.map +1 -0
- package/dist/backend/services/attribute-set-validations.js +89 -0
- package/dist/backend/services/attribute-set-validations.js.map +1 -0
- package/dist/backend/services/attribute-set.service.d.ts +50 -0
- package/dist/backend/services/attribute-set.service.d.ts.map +1 -0
- package/dist/backend/services/attribute-set.service.js +401 -0
- package/dist/backend/services/attribute-set.service.js.map +1 -0
- package/dist/backend/services/attribute-type-mapping.d.ts +66 -0
- package/dist/backend/services/attribute-type-mapping.d.ts.map +1 -0
- package/dist/backend/services/attribute-type-mapping.js +121 -0
- package/dist/backend/services/attribute-type-mapping.js.map +1 -0
- package/dist/backend/services/attribute-value-key.service.d.ts +48 -0
- package/dist/backend/services/attribute-value-key.service.d.ts.map +1 -0
- package/dist/backend/services/attribute-value-key.service.js +118 -0
- package/dist/backend/services/attribute-value-key.service.js.map +1 -0
- package/dist/backend/services/audit-references.d.ts +13 -0
- package/dist/backend/services/audit-references.d.ts.map +1 -0
- package/dist/backend/services/audit-references.js +51 -0
- package/dist/backend/services/audit-references.js.map +1 -0
- package/dist/backend/services/bulk-operation-queue.d.ts +26 -0
- package/dist/backend/services/bulk-operation-queue.d.ts.map +1 -0
- package/dist/backend/services/bulk-operation-queue.js +34 -0
- package/dist/backend/services/bulk-operation-queue.js.map +1 -0
- package/dist/backend/services/bulk-operation.service.d.ts +195 -0
- package/dist/backend/services/bulk-operation.service.d.ts.map +1 -0
- package/dist/backend/services/bulk-operation.service.js +510 -0
- package/dist/backend/services/bulk-operation.service.js.map +1 -0
- package/dist/backend/services/bundle.service.d.ts +87 -0
- package/dist/backend/services/bundle.service.d.ts.map +1 -0
- package/dist/backend/services/bundle.service.js +286 -0
- package/dist/backend/services/bundle.service.js.map +1 -0
- package/dist/backend/services/catalog-admin.service.d.ts +398 -0
- package/dist/backend/services/catalog-admin.service.d.ts.map +1 -0
- package/dist/backend/services/catalog-admin.service.js +1516 -0
- package/dist/backend/services/catalog-admin.service.js.map +1 -0
- package/dist/backend/services/catalog-attribute-read.service.d.ts +78 -0
- package/dist/backend/services/catalog-attribute-read.service.d.ts.map +1 -0
- package/dist/backend/services/catalog-attribute-read.service.js +216 -0
- package/dist/backend/services/catalog-attribute-read.service.js.map +1 -0
- package/dist/backend/services/catalog-bulk-import.service.d.ts +30 -0
- package/dist/backend/services/catalog-bulk-import.service.d.ts.map +1 -0
- package/dist/backend/services/catalog-bulk-import.service.js +136 -0
- package/dist/backend/services/catalog-bulk-import.service.js.map +1 -0
- package/dist/backend/services/catalog-bulk-update.service.d.ts +91 -0
- package/dist/backend/services/catalog-bulk-update.service.d.ts.map +1 -0
- package/dist/backend/services/catalog-bulk-update.service.js +330 -0
- package/dist/backend/services/catalog-bulk-update.service.js.map +1 -0
- package/dist/backend/services/catalog-category-read.service.d.ts +66 -0
- package/dist/backend/services/catalog-category-read.service.d.ts.map +1 -0
- package/dist/backend/services/catalog-category-read.service.js +248 -0
- package/dist/backend/services/catalog-category-read.service.js.map +1 -0
- package/dist/backend/services/catalog-org-price-decorator.d.ts +90 -0
- package/dist/backend/services/catalog-org-price-decorator.d.ts.map +1 -0
- package/dist/backend/services/catalog-org-price-decorator.js +184 -0
- package/dist/backend/services/catalog-org-price-decorator.js.map +1 -0
- package/dist/backend/services/catalog-product-filter.service.d.ts +82 -0
- package/dist/backend/services/catalog-product-filter.service.d.ts.map +1 -0
- package/dist/backend/services/catalog-product-filter.service.js +275 -0
- package/dist/backend/services/catalog-product-filter.service.js.map +1 -0
- package/dist/backend/services/catalog-product-read.service.d.ts +46 -0
- package/dist/backend/services/catalog-product-read.service.d.ts.map +1 -0
- package/dist/backend/services/catalog-product-read.service.js +197 -0
- package/dist/backend/services/catalog-product-read.service.js.map +1 -0
- package/dist/backend/services/catalog-query.service.d.ts +444 -0
- package/dist/backend/services/catalog-query.service.d.ts.map +1 -0
- package/dist/backend/services/catalog-query.service.js +1633 -0
- package/dist/backend/services/catalog-query.service.js.map +1 -0
- package/dist/backend/services/catalog-quick-search.service.d.ts +78 -0
- package/dist/backend/services/catalog-quick-search.service.d.ts.map +1 -0
- package/dist/backend/services/catalog-quick-search.service.js +159 -0
- package/dist/backend/services/catalog-quick-search.service.js.map +1 -0
- package/dist/backend/services/catalog-write-ports.d.ts +25 -0
- package/dist/backend/services/catalog-write-ports.d.ts.map +1 -0
- package/dist/backend/services/catalog-write-ports.js +63 -0
- package/dist/backend/services/catalog-write-ports.js.map +1 -0
- package/dist/backend/services/category-admin.service.d.ts +102 -0
- package/dist/backend/services/category-admin.service.d.ts.map +1 -0
- package/dist/backend/services/category-admin.service.js +271 -0
- package/dist/backend/services/category-admin.service.js.map +1 -0
- package/dist/backend/services/gallery.service.d.ts +85 -0
- package/dist/backend/services/gallery.service.d.ts.map +1 -0
- package/dist/backend/services/gallery.service.js +326 -0
- package/dist/backend/services/gallery.service.js.map +1 -0
- package/dist/backend/services/grouped.service.d.ts +39 -0
- package/dist/backend/services/grouped.service.d.ts.map +1 -0
- package/dist/backend/services/grouped.service.js +136 -0
- package/dist/backend/services/grouped.service.js.map +1 -0
- package/dist/backend/services/label-resolver.d.ts +16 -0
- package/dist/backend/services/label-resolver.d.ts.map +1 -0
- package/dist/backend/services/label-resolver.js +43 -0
- package/dist/backend/services/label-resolver.js.map +1 -0
- package/dist/backend/services/packaging-unit.service.d.ts +28 -0
- package/dist/backend/services/packaging-unit.service.d.ts.map +1 -0
- package/dist/backend/services/packaging-unit.service.js +197 -0
- package/dist/backend/services/packaging-unit.service.js.map +1 -0
- package/dist/backend/services/primary-asset-url.d.ts +4 -0
- package/dist/backend/services/primary-asset-url.d.ts.map +1 -0
- package/dist/backend/services/primary-asset-url.js +55 -0
- package/dist/backend/services/primary-asset-url.js.map +1 -0
- package/dist/backend/services/product-editor-preferences.service.d.ts +20 -0
- package/dist/backend/services/product-editor-preferences.service.d.ts.map +1 -0
- package/dist/backend/services/product-editor-preferences.service.js +44 -0
- package/dist/backend/services/product-editor-preferences.service.js.map +1 -0
- package/dist/backend/services/product-link.service.d.ts +169 -0
- package/dist/backend/services/product-link.service.d.ts.map +1 -0
- package/dist/backend/services/product-link.service.js +297 -0
- package/dist/backend/services/product-link.service.js.map +1 -0
- package/dist/backend/services/product-overrides.service.d.ts +77 -0
- package/dist/backend/services/product-overrides.service.d.ts.map +1 -0
- package/dist/backend/services/product-overrides.service.js +204 -0
- package/dist/backend/services/product-overrides.service.js.map +1 -0
- package/dist/backend/services/product-scope-context.service.d.ts +36 -0
- package/dist/backend/services/product-scope-context.service.d.ts.map +1 -0
- package/dist/backend/services/product-scope-context.service.js +106 -0
- package/dist/backend/services/product-scope-context.service.js.map +1 -0
- package/dist/backend/services/product-type-validations.d.ts +42 -0
- package/dist/backend/services/product-type-validations.d.ts.map +1 -0
- package/dist/backend/services/product-type-validations.js +55 -0
- package/dist/backend/services/product-type-validations.js.map +1 -0
- package/dist/backend/services/product-value-resolver.service.d.ts +59 -0
- package/dist/backend/services/product-value-resolver.service.d.ts.map +1 -0
- package/dist/backend/services/product-value-resolver.service.js +111 -0
- package/dist/backend/services/product-value-resolver.service.js.map +1 -0
- package/dist/backend/services/system-attribute-scopes.d.ts +18 -0
- package/dist/backend/services/system-attribute-scopes.d.ts.map +1 -0
- package/dist/backend/services/system-attribute-scopes.js +18 -0
- package/dist/backend/services/system-attribute-scopes.js.map +1 -0
- package/dist/backend/services/viewer-organization.d.ts +25 -0
- package/dist/backend/services/viewer-organization.d.ts.map +1 -0
- package/dist/backend/services/viewer-organization.js +31 -0
- package/dist/backend/services/viewer-organization.js.map +1 -0
- package/dist/manifest.d.ts +204 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +686 -0
- package/dist/manifest.js.map +1 -0
- package/dist/migrations/20260429T064146_catalog_attribute_sets_init.d.ts +33 -0
- package/dist/migrations/20260429T064146_catalog_attribute_sets_init.d.ts.map +1 -0
- package/dist/migrations/20260429T064146_catalog_attribute_sets_init.js +118 -0
- package/dist/migrations/20260429T064146_catalog_attribute_sets_init.js.map +1 -0
- package/dist/migrations/20260429T070004_catalog_product_attribute_extensions.d.ts +24 -0
- package/dist/migrations/20260429T070004_catalog_product_attribute_extensions.d.ts.map +1 -0
- package/dist/migrations/20260429T070004_catalog_product_attribute_extensions.js +31 -0
- package/dist/migrations/20260429T070004_catalog_product_attribute_extensions.js.map +1 -0
- package/dist/migrations/20260429T102322_catalog_product_type_and_virtual_fields.d.ts +32 -0
- package/dist/migrations/20260429T102322_catalog_product_type_and_virtual_fields.d.ts.map +1 -0
- package/dist/migrations/20260429T102322_catalog_product_type_and_virtual_fields.js +58 -0
- package/dist/migrations/20260429T102322_catalog_product_type_and_virtual_fields.js.map +1 -0
- package/dist/migrations/20260429T111839_catalog_gallery_items_and_labels.d.ts +22 -0
- package/dist/migrations/20260429T111839_catalog_gallery_items_and_labels.d.ts.map +1 -0
- package/dist/migrations/20260429T111839_catalog_gallery_items_and_labels.js +66 -0
- package/dist/migrations/20260429T111839_catalog_gallery_items_and_labels.js.map +1 -0
- package/dist/migrations/20260429T112543_catalog_product_attachments.d.ts +18 -0
- package/dist/migrations/20260429T112543_catalog_product_attachments.d.ts.map +1 -0
- package/dist/migrations/20260429T112543_catalog_product_attachments.js +73 -0
- package/dist/migrations/20260429T112543_catalog_product_attachments.js.map +1 -0
- package/dist/migrations/20260429T123726_catalog_product_links.d.ts +21 -0
- package/dist/migrations/20260429T123726_catalog_product_links.d.ts.map +1 -0
- package/dist/migrations/20260429T123726_catalog_product_links.js +48 -0
- package/dist/migrations/20260429T123726_catalog_product_links.js.map +1 -0
- package/dist/migrations/20260429T130803_catalog_grouped_and_bundle.d.ts +23 -0
- package/dist/migrations/20260429T130803_catalog_grouped_and_bundle.d.ts.map +1 -0
- package/dist/migrations/20260429T130803_catalog_grouped_and_bundle.js +94 -0
- package/dist/migrations/20260429T130803_catalog_grouped_and_bundle.js.map +1 -0
- package/dist/migrations/20260501T185835_catalog_product_attribute_is_comparable.d.ts +24 -0
- package/dist/migrations/20260501T185835_catalog_product_attribute_is_comparable.d.ts.map +1 -0
- package/dist/migrations/20260501T185835_catalog_product_attribute_is_comparable.js +31 -0
- package/dist/migrations/20260501T185835_catalog_product_attribute_is_comparable.js.map +1 -0
- package/dist/migrations/20260505T060113_catalog_attribute_options_and_flags.d.ts +31 -0
- package/dist/migrations/20260505T060113_catalog_attribute_options_and_flags.d.ts.map +1 -0
- package/dist/migrations/20260505T060113_catalog_attribute_options_and_flags.js +133 -0
- package/dist/migrations/20260505T060113_catalog_attribute_options_and_flags.js.map +1 -0
- package/dist/migrations/20260515T082629_catalog_attribute_mass_editable.d.ts +16 -0
- package/dist/migrations/20260515T082629_catalog_attribute_mass_editable.d.ts.map +1 -0
- package/dist/migrations/20260515T082629_catalog_attribute_mass_editable.js +23 -0
- package/dist/migrations/20260515T082629_catalog_attribute_mass_editable.js.map +1 -0
- package/dist/migrations/20260526T124736_catalog_product_status_inactive.d.ts +10 -0
- package/dist/migrations/20260526T124736_catalog_product_status_inactive.d.ts.map +1 -0
- package/dist/migrations/20260526T124736_catalog_product_status_inactive.js +22 -0
- package/dist/migrations/20260526T124736_catalog_product_status_inactive.js.map +1 -0
- package/dist/migrations/20260611T140346_catalog_product_value_overrides_init.d.ts +38 -0
- package/dist/migrations/20260611T140346_catalog_product_value_overrides_init.d.ts.map +1 -0
- package/dist/migrations/20260611T140346_catalog_product_value_overrides_init.js +98 -0
- package/dist/migrations/20260611T140346_catalog_product_value_overrides_init.js.map +1 -0
- package/dist/migrations/20260611T140400_catalog_attribute_quick_searchable.d.ts +13 -0
- package/dist/migrations/20260611T140400_catalog_attribute_quick_searchable.d.ts.map +1 -0
- package/dist/migrations/20260611T140400_catalog_attribute_quick_searchable.js +17 -0
- package/dist/migrations/20260611T140400_catalog_attribute_quick_searchable.js.map +1 -0
- package/dist/migrations/20260611T140407_catalog_bulk_operations.d.ts +16 -0
- package/dist/migrations/20260611T140407_catalog_bulk_operations.d.ts.map +1 -0
- package/dist/migrations/20260611T140407_catalog_bulk_operations.js +42 -0
- package/dist/migrations/20260611T140407_catalog_bulk_operations.js.map +1 -0
- package/dist/migrations/20260611T140408_catalog_bulk_operation_logs.d.ts +14 -0
- package/dist/migrations/20260611T140408_catalog_bulk_operation_logs.d.ts.map +1 -0
- package/dist/migrations/20260611T140408_catalog_bulk_operation_logs.js +18 -0
- package/dist/migrations/20260611T140408_catalog_bulk_operation_logs.js.map +1 -0
- package/dist/migrations/20260611T140412_catalog_product_packaging_units.d.ts +11 -0
- package/dist/migrations/20260611T140412_catalog_product_packaging_units.d.ts.map +1 -0
- package/dist/migrations/20260611T140412_catalog_product_packaging_units.js +29 -0
- package/dist/migrations/20260611T140412_catalog_product_packaging_units.js.map +1 -0
- package/dist/migrations/20260718T060659_catalog_bulk_operation_revert_state.d.ts +23 -0
- package/dist/migrations/20260718T060659_catalog_bulk_operation_revert_state.d.ts.map +1 -0
- package/dist/migrations/20260718T060659_catalog_bulk_operation_revert_state.js +35 -0
- package/dist/migrations/20260718T060659_catalog_bulk_operation_revert_state.js.map +1 -0
- package/dist/migrations/20260718T200343_catalog_category_custom_field_values.d.ts +12 -0
- package/dist/migrations/20260718T200343_catalog_category_custom_field_values.d.ts.map +1 -0
- package/dist/migrations/20260718T200343_catalog_category_custom_field_values.js +16 -0
- package/dist/migrations/20260718T200343_catalog_category_custom_field_values.js.map +1 -0
- package/dist/migrations/20260723T230401_catalog_attributes_on_custom_fields.d.ts +32 -0
- package/dist/migrations/20260723T230401_catalog_attributes_on_custom_fields.d.ts.map +1 -0
- package/dist/migrations/20260723T230401_catalog_attributes_on_custom_fields.js +286 -0
- package/dist/migrations/20260723T230401_catalog_attributes_on_custom_fields.js.map +1 -0
- package/dist/migrations/20260804T152604_catalog_widen_product_sku.d.ts +36 -0
- package/dist/migrations/20260804T152604_catalog_widen_product_sku.d.ts.map +1 -0
- package/dist/migrations/20260804T152604_catalog_widen_product_sku.js +63 -0
- package/dist/migrations/20260804T152604_catalog_widen_product_sku.js.map +1 -0
- package/dist/migrations/20260804T160244_catalog_category_activation.d.ts +18 -0
- package/dist/migrations/20260804T160244_catalog_category_activation.d.ts.map +1 -0
- package/dist/migrations/20260804T160244_catalog_category_activation.js +22 -0
- package/dist/migrations/20260804T160244_catalog_category_activation.js.map +1 -0
- package/dist/migrations/20260912T094557_catalog_sales_channel_products.d.ts +27 -0
- package/dist/migrations/20260912T094557_catalog_sales_channel_products.d.ts.map +1 -0
- package/dist/migrations/20260912T094557_catalog_sales_channel_products.js +44 -0
- package/dist/migrations/20260912T094557_catalog_sales_channel_products.js.map +1 -0
- package/dist/migrations/20260912T094623_catalog_sales_channel_categories.d.ts +27 -0
- package/dist/migrations/20260912T094623_catalog_sales_channel_categories.d.ts.map +1 -0
- package/dist/migrations/20260912T094623_catalog_sales_channel_categories.js +44 -0
- package/dist/migrations/20260912T094623_catalog_sales_channel_categories.js.map +1 -0
- package/dist/migrations/20260925T125527_catalog_inventory_columns.d.ts +36 -0
- package/dist/migrations/20260925T125527_catalog_inventory_columns.d.ts.map +1 -0
- package/dist/migrations/20260925T125527_catalog_inventory_columns.js +87 -0
- package/dist/migrations/20260925T125527_catalog_inventory_columns.js.map +1 -0
- package/dist/migrations/index.d.ts +55 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +80 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/ports/index.d.ts +96 -0
- package/dist/ports/index.d.ts.map +1 -0
- package/dist/ports/index.js +2 -0
- package/dist/ports/index.js.map +1 -0
- package/docs/catalog/attachments.md +69 -0
- package/docs/catalog/attribute-sets.md +63 -0
- package/docs/catalog/attributes.md +244 -0
- package/docs/catalog/composite-products.md +115 -0
- package/docs/catalog/gallery-and-labels.md +73 -0
- package/docs/catalog/packaging-units.md +67 -0
- package/docs/catalog/per-channel-per-language-overrides.md +234 -0
- package/docs/catalog/product-links.md +79 -0
- package/docs/catalog.md +207 -0
- package/i18n/en.json +649 -0
- package/i18n/pl.json +649 -0
- package/package.json +109 -0
- 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"}
|