@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,74 @@
|
|
|
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
|
+
* BundleSlot — named slot inside a bundle product (feature 002 US5,
|
|
15
|
+
* data-model.md §2.9). Each slot has a min/max quantity range and one
|
|
16
|
+
* or more `BundleSlotOption` rows that the buyer chooses between.
|
|
17
|
+
*
|
|
18
|
+
* `name` is multilingual jsonb so storefront localization works without
|
|
19
|
+
* a separate translation table (foundation pattern, same as Product).
|
|
20
|
+
*
|
|
21
|
+
* DB-level guarantees (migration 023):
|
|
22
|
+
* - CHECK min_quantity <= max_quantity
|
|
23
|
+
* - CHECK min_quantity >= 0, max_quantity > 0
|
|
24
|
+
*/
|
|
25
|
+
let BundleSlot = class BundleSlot {
|
|
26
|
+
[OptionalProps];
|
|
27
|
+
id = randomUUID();
|
|
28
|
+
parentProductId;
|
|
29
|
+
name;
|
|
30
|
+
minQuantity = 0;
|
|
31
|
+
maxQuantity;
|
|
32
|
+
position = 0;
|
|
33
|
+
createdAt = new Date();
|
|
34
|
+
updatedAt = new Date();
|
|
35
|
+
};
|
|
36
|
+
__decorate([
|
|
37
|
+
PrimaryKey({ type: 'uuid' }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], BundleSlot.prototype, "id", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
Property({ type: 'uuid' }),
|
|
42
|
+
Index(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], BundleSlot.prototype, "parentProductId", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
Property({ type: 'json' }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], BundleSlot.prototype, "name", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
Property({ type: 'integer' }),
|
|
51
|
+
__metadata("design:type", Number)
|
|
52
|
+
], BundleSlot.prototype, "minQuantity", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
Property({ type: 'integer' }),
|
|
55
|
+
__metadata("design:type", Number)
|
|
56
|
+
], BundleSlot.prototype, "maxQuantity", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
Property({ type: 'integer' }),
|
|
59
|
+
__metadata("design:type", Number)
|
|
60
|
+
], BundleSlot.prototype, "position", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
Property({ type: 'datetime', onCreate: () => new Date() }),
|
|
63
|
+
__metadata("design:type", Date)
|
|
64
|
+
], BundleSlot.prototype, "createdAt", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
Property({ type: 'datetime', onUpdate: () => new Date() }),
|
|
67
|
+
__metadata("design:type", Date)
|
|
68
|
+
], BundleSlot.prototype, "updatedAt", void 0);
|
|
69
|
+
BundleSlot = __decorate([
|
|
70
|
+
GlobalEntity(),
|
|
71
|
+
Entity({ tableName: 'bundle_slots' })
|
|
72
|
+
], BundleSlot);
|
|
73
|
+
export { BundleSlot };
|
|
74
|
+
//# sourceMappingURL=bundle-slot.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-slot.entity.js","sourceRoot":"","sources":["../../../src/backend/entities/bundle-slot.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;AAEpC;;;;;;;;;;;GAWG;AAGI,IAAM,UAAU,GAAhB,MAAM,UAAU;IACrB,CAAC,aAAa,CAAC,CAAiE;IAGhF,EAAE,GAAW,UAAU,EAAE,CAAC;IAI1B,eAAe,CAAU;IAGzB,IAAI,CAA0B;IAG9B,WAAW,GAAW,CAAC,CAAC;IAGxB,WAAW,CAAU;IAGrB,QAAQ,GAAW,CAAC,CAAC;IAGrB,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;IAG7B,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;CAC9B,CAAA;AAvBC;IADC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sCACH;AAI1B;IAFC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC1B,KAAK,EAAE;;mDACiB;AAGzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wCACG;AAG9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;+CACN;AAGxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;+CACT;AAGrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;4CACT;AAGrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAChD,IAAI;6CAAc;AAG7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAChD,IAAI;6CAAc;AA1BlB,UAAU;IAFtB,YAAY,EAAE;IACd,MAAM,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;GACzB,UAAU,CA2BtB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OptionalProps } from '@mikro-orm/core';
|
|
2
|
+
/**
|
|
3
|
+
* Category — hierarchical node in the catalog tree.
|
|
4
|
+
* `parentCategoryId` is null for roots. `slug` is kebab-case; uniqueness is
|
|
5
|
+
* enforced per-parent at the migration level.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Category {
|
|
8
|
+
[OptionalProps]?: 'customFieldValues' | 'id' | 'createdAt' | 'updatedAt' | 'parentCategoryId' | 'sortOrder' | 'metaTitleOverride' | 'metaDescriptionOverride' | 'deletedAt' | 'isActive' | 'inventoryThresholdHigh' | 'inventoryThresholdMedium' | 'inventoryThresholdLow' | 'mainImageAssetId';
|
|
9
|
+
id: string;
|
|
10
|
+
parentCategoryId?: string | null;
|
|
11
|
+
name: Record<string, string>;
|
|
12
|
+
slug: string;
|
|
13
|
+
sortOrder: number;
|
|
14
|
+
metaTitleOverride?: Record<string, string> | null;
|
|
15
|
+
metaDescriptionOverride?: Record<string, string> | null;
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
updatedAt: Date;
|
|
18
|
+
customFieldValues: Record<string, unknown>;
|
|
19
|
+
deletedAt?: Date | null;
|
|
20
|
+
isActive: boolean;
|
|
21
|
+
inventoryThresholdHigh?: number | null;
|
|
22
|
+
inventoryThresholdMedium?: number | null;
|
|
23
|
+
inventoryThresholdLow?: number | null;
|
|
24
|
+
mainImageAssetId?: string | null;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=category.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.entity.d.ts","sourceRoot":"","sources":["../../../src/backend/entities/category.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,aAAa,EAAwB,MAAM,iBAAiB,CAAC;AAIrF;;;;GAIG;AACH,qBAEa,QAAQ;IACnB,CAAC,aAAa,CAAC,CAAC,EACZ,mBAAmB,GACnB,IAAI,GACJ,WAAW,GACX,WAAW,GACX,kBAAkB,GAClB,WAAW,GACX,mBAAmB,GACnB,yBAAyB,GACzB,WAAW,GACX,UAAU,GACV,wBAAwB,GACxB,0BAA0B,GAC1B,uBAAuB,GACvB,kBAAkB,CAAC;IAGvB,EAAE,EAAE,MAAM,CAAgB;IAI1B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGjC,IAAI,EAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAI9B,IAAI,EAAG,MAAM,CAAC;IAGd,SAAS,EAAE,MAAM,CAAK;IAGtB,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAGlD,uBAAuB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAGxD,SAAS,EAAE,IAAI,CAAc;IAG7B,SAAS,EAAE,IAAI,CAAc;IAI7B,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;IAGhD,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAOxB,QAAQ,EAAE,OAAO,CAAQ;IAMzB,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGvC,wBAAwB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGzC,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAMtC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
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
|
+
* Category — hierarchical node in the catalog tree.
|
|
15
|
+
* `parentCategoryId` is null for roots. `slug` is kebab-case; uniqueness is
|
|
16
|
+
* enforced per-parent at the migration level.
|
|
17
|
+
*/
|
|
18
|
+
let Category = class Category {
|
|
19
|
+
[OptionalProps];
|
|
20
|
+
id = randomUUID();
|
|
21
|
+
parentCategoryId;
|
|
22
|
+
name;
|
|
23
|
+
slug;
|
|
24
|
+
sortOrder = 0;
|
|
25
|
+
metaTitleOverride;
|
|
26
|
+
metaDescriptionOverride;
|
|
27
|
+
createdAt = new Date();
|
|
28
|
+
updatedAt = new Date();
|
|
29
|
+
// Feature 055 — Custom Fields Layer value bag (inherits host tenant scope).
|
|
30
|
+
customFieldValues = {};
|
|
31
|
+
deletedAt;
|
|
32
|
+
// Feature 068 — activation switch. `false` hides the category from every
|
|
33
|
+
// customer-facing read (tree, PLP narrowing, PDP projection, megamenu,
|
|
34
|
+
// search index, sitemap, meta tags) while leaving it in the admin tree.
|
|
35
|
+
// Orthogonal to `deletedAt` (removed) and to sales-channel membership.
|
|
36
|
+
isActive = true;
|
|
37
|
+
// Inventory module (feature 010) — display-band thresholds at the
|
|
38
|
+
// category level. The threshold-resolver consults these BEFORE
|
|
39
|
+
// falling back to the global `inventory_thresholds` row (FR-017).
|
|
40
|
+
inventoryThresholdHigh;
|
|
41
|
+
inventoryThresholdMedium;
|
|
42
|
+
inventoryThresholdLow;
|
|
43
|
+
// Assets Library (feature 013 / US5) — Main Image asset reference
|
|
44
|
+
// rendered on the storefront category landing page.
|
|
45
|
+
mainImageAssetId;
|
|
46
|
+
};
|
|
47
|
+
__decorate([
|
|
48
|
+
PrimaryKey({ type: 'uuid' }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], Category.prototype, "id", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
Property({ type: 'uuid', nullable: true }),
|
|
53
|
+
Index(),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], Category.prototype, "parentCategoryId", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
Property({ type: 'json' }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], Category.prototype, "name", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
Property({ type: 'string', length: 160 }),
|
|
62
|
+
Index(),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], Category.prototype, "slug", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
Property({ type: 'integer' }),
|
|
67
|
+
__metadata("design:type", Number)
|
|
68
|
+
], Category.prototype, "sortOrder", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
Property({ type: 'json', nullable: true }),
|
|
71
|
+
__metadata("design:type", Object)
|
|
72
|
+
], Category.prototype, "metaTitleOverride", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
Property({ type: 'json', nullable: true }),
|
|
75
|
+
__metadata("design:type", Object)
|
|
76
|
+
], Category.prototype, "metaDescriptionOverride", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
Property({ type: 'datetime', onCreate: () => new Date() }),
|
|
79
|
+
__metadata("design:type", Date)
|
|
80
|
+
], Category.prototype, "createdAt", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
Property({ type: 'datetime', onUpdate: () => new Date() }),
|
|
83
|
+
__metadata("design:type", Date)
|
|
84
|
+
], Category.prototype, "updatedAt", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
Property({ type: 'json' }),
|
|
87
|
+
__metadata("design:type", Object)
|
|
88
|
+
], Category.prototype, "customFieldValues", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
Property({ type: 'datetime', nullable: true }),
|
|
91
|
+
__metadata("design:type", Object)
|
|
92
|
+
], Category.prototype, "deletedAt", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
Property({ type: 'boolean' }),
|
|
95
|
+
__metadata("design:type", Boolean)
|
|
96
|
+
], Category.prototype, "isActive", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
Property({ type: 'integer', nullable: true }),
|
|
99
|
+
__metadata("design:type", Object)
|
|
100
|
+
], Category.prototype, "inventoryThresholdHigh", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
Property({ type: 'integer', nullable: true }),
|
|
103
|
+
__metadata("design:type", Object)
|
|
104
|
+
], Category.prototype, "inventoryThresholdMedium", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
Property({ type: 'integer', nullable: true }),
|
|
107
|
+
__metadata("design:type", Object)
|
|
108
|
+
], Category.prototype, "inventoryThresholdLow", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
Property({ type: 'uuid', nullable: true }),
|
|
111
|
+
Index(),
|
|
112
|
+
__metadata("design:type", Object)
|
|
113
|
+
], Category.prototype, "mainImageAssetId", void 0);
|
|
114
|
+
Category = __decorate([
|
|
115
|
+
GlobalEntity(),
|
|
116
|
+
Entity({ tableName: 'categories' })
|
|
117
|
+
], Category);
|
|
118
|
+
export { Category };
|
|
119
|
+
//# sourceMappingURL=category.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.entity.js","sourceRoot":"","sources":["../../../src/backend/entities/category.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;AAEpC;;;;GAIG;AAGI,IAAM,QAAQ,GAAd,MAAM,QAAQ;IACnB,CAAC,aAAa,CAAC,CAcQ;IAGvB,EAAE,GAAW,UAAU,EAAE,CAAC;IAI1B,gBAAgB,CAAiB;IAGjC,IAAI,CAA0B;IAI9B,IAAI,CAAU;IAGd,SAAS,GAAW,CAAC,CAAC;IAGtB,iBAAiB,CAAiC;IAGlD,uBAAuB,CAAiC;IAGxD,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;IAG7B,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;IAE7B,4EAA4E;IAE5E,iBAAiB,GAA4B,EAAE,CAAC;IAGhD,SAAS,CAAe;IAExB,yEAAyE;IACzE,uEAAuE;IACvE,wEAAwE;IACxE,uEAAuE;IAEvE,QAAQ,GAAY,IAAI,CAAC;IAEzB,kEAAkE;IAClE,+DAA+D;IAC/D,kEAAkE;IAElE,sBAAsB,CAAiB;IAGvC,wBAAwB,CAAiB;IAGzC,qBAAqB,CAAiB;IAEtC,kEAAkE;IAClE,oDAAoD;IAGpD,gBAAgB,CAAiB;CAClC,CAAA;AA3DC;IADC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oCACH;AAI1B;IAFC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1C,KAAK,EAAE;;kDACyB;AAGjC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sCACG;AAI9B;IAFC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IACzC,KAAK,EAAE;;sCACM;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;2CACR;AAGtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACO;AAGlD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACa;AAGxD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAChD,IAAI;2CAAc;AAG7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAChD,IAAI;2CAAc;AAI7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDACqB;AAGhD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACvB;AAOxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;0CACL;AAMzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACP;AAGvC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACL;AAGzC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACR;AAMtC;IAFC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1C,KAAK,EAAE;;kDACyB;AA5EtB,QAAQ;IAFpB,YAAY,EAAE;IACd,MAAM,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;GACvB,QAAQ,CA6EpB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type GalleryLabel = 'base_image' | 'small_image' | 'thumbnail';
|
|
2
|
+
/**
|
|
3
|
+
* GalleryItemLabel — composite-PK bridge that holds the label assignments
|
|
4
|
+
* for a Gallery Item (feature 002 US3, data-model.md §2.4).
|
|
5
|
+
*
|
|
6
|
+
* The DB enforces:
|
|
7
|
+
* - composite PK (gallery_item_id, label): one row per (item, label) pair.
|
|
8
|
+
* - UNIQUE (product_id, label): only ONE Element of each label kind
|
|
9
|
+
* per Product. This is the load-bearing constraint that makes the
|
|
10
|
+
* atomic-swap operation in `gallery.service.ts` safe (research.md R-2).
|
|
11
|
+
* - CHECK label IN ('base_image', 'small_image', 'thumbnail').
|
|
12
|
+
*
|
|
13
|
+
* `productId` is duplicated on this bridge purely so PG can enforce the
|
|
14
|
+
* UNIQUE constraint without a sub-query — the canonical owner of the
|
|
15
|
+
* (item, product) link is `gallery_items.product_id`.
|
|
16
|
+
*/
|
|
17
|
+
export declare class GalleryItemLabel {
|
|
18
|
+
galleryItemId: string;
|
|
19
|
+
label: GalleryLabel;
|
|
20
|
+
productId: string;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=gallery-item-label.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery-item-label.entity.d.ts","sourceRoot":"","sources":["../../../src/backend/entities/gallery-item-label.entity.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,aAAa,GAAG,WAAW,CAAC;AAEtE;;;;;;;;;;;;;;GAcG;AACH,qBAEa,gBAAgB;IAE3B,aAAa,EAAG,MAAM,CAAC;IAGvB,KAAK,EAAG,YAAY,CAAC;IAIrB,SAAS,EAAG,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
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, PrimaryKey, Property } from '@mikro-orm/core';
|
|
11
|
+
import { GlobalEntity } from '@endora-commerce/platform/tenancy';
|
|
12
|
+
/**
|
|
13
|
+
* GalleryItemLabel — composite-PK bridge that holds the label assignments
|
|
14
|
+
* for a Gallery Item (feature 002 US3, data-model.md §2.4).
|
|
15
|
+
*
|
|
16
|
+
* The DB enforces:
|
|
17
|
+
* - composite PK (gallery_item_id, label): one row per (item, label) pair.
|
|
18
|
+
* - UNIQUE (product_id, label): only ONE Element of each label kind
|
|
19
|
+
* per Product. This is the load-bearing constraint that makes the
|
|
20
|
+
* atomic-swap operation in `gallery.service.ts` safe (research.md R-2).
|
|
21
|
+
* - CHECK label IN ('base_image', 'small_image', 'thumbnail').
|
|
22
|
+
*
|
|
23
|
+
* `productId` is duplicated on this bridge purely so PG can enforce the
|
|
24
|
+
* UNIQUE constraint without a sub-query — the canonical owner of the
|
|
25
|
+
* (item, product) link is `gallery_items.product_id`.
|
|
26
|
+
*/
|
|
27
|
+
let GalleryItemLabel = class GalleryItemLabel {
|
|
28
|
+
galleryItemId;
|
|
29
|
+
label;
|
|
30
|
+
productId;
|
|
31
|
+
};
|
|
32
|
+
__decorate([
|
|
33
|
+
PrimaryKey({ type: 'uuid' }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], GalleryItemLabel.prototype, "galleryItemId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
PrimaryKey({ type: 'string', length: 16 }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], GalleryItemLabel.prototype, "label", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
Property({ type: 'uuid' }),
|
|
42
|
+
Index(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], GalleryItemLabel.prototype, "productId", void 0);
|
|
45
|
+
GalleryItemLabel = __decorate([
|
|
46
|
+
GlobalEntity(),
|
|
47
|
+
Entity({ tableName: 'gallery_item_labels' })
|
|
48
|
+
], GalleryItemLabel);
|
|
49
|
+
export { GalleryItemLabel };
|
|
50
|
+
//# sourceMappingURL=gallery-item-label.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery-item-label.entity.js","sourceRoot":"","sources":["../../../src/backend/entities/gallery-item-label.entity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAIjE;;;;;;;;;;;;;;GAcG;AAGI,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAE3B,aAAa,CAAU;IAGvB,KAAK,CAAgB;IAIrB,SAAS,CAAU;CACpB,CAAA;AARC;IADC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDACN;AAGvB;IADC,UAAU,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;+CACtB;AAIrB;IAFC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC1B,KAAK,EAAE;;mDACW;AATR,gBAAgB;IAF5B,YAAY,EAAE;IACd,MAAM,CAAC,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;GAChC,gBAAgB,CAU5B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OptionalProps } from '@mikro-orm/core';
|
|
2
|
+
/**
|
|
3
|
+
* GalleryItem — Asset reference attached to a Product (feature 002 US3,
|
|
4
|
+
* data-model.md §2.3). Labels (Base / Small / Thumbnail) live in the
|
|
5
|
+
* sibling `GalleryItemLabel` bridge so the per-product UNIQUE constraint
|
|
6
|
+
* can be enforced at the DB level (research.md R-2).
|
|
7
|
+
*/
|
|
8
|
+
export declare class GalleryItem {
|
|
9
|
+
[OptionalProps]?: 'id' | 'position' | 'createdAt' | 'updatedAt';
|
|
10
|
+
id: string;
|
|
11
|
+
productId: string;
|
|
12
|
+
assetId: string;
|
|
13
|
+
position: number;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=gallery-item.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery-item.entity.d.ts","sourceRoot":"","sources":["../../../src/backend/entities/gallery-item.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,aAAa,EAAwB,MAAM,iBAAiB,CAAC;AAIrF;;;;;GAKG;AACH,qBAEa,WAAW;IACtB,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;IAGhE,EAAE,EAAE,MAAM,CAAgB;IAI1B,SAAS,EAAG,MAAM,CAAC;IAGnB,OAAO,EAAG,MAAM,CAAC;IAGjB,QAAQ,EAAE,MAAM,CAAK;IAGrB,SAAS,EAAE,IAAI,CAAc;IAG7B,SAAS,EAAE,IAAI,CAAc;CAC9B"}
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
* GalleryItem — Asset reference attached to a Product (feature 002 US3,
|
|
15
|
+
* data-model.md §2.3). Labels (Base / Small / Thumbnail) live in the
|
|
16
|
+
* sibling `GalleryItemLabel` bridge so the per-product UNIQUE constraint
|
|
17
|
+
* can be enforced at the DB level (research.md R-2).
|
|
18
|
+
*/
|
|
19
|
+
let GalleryItem = class GalleryItem {
|
|
20
|
+
[OptionalProps];
|
|
21
|
+
id = randomUUID();
|
|
22
|
+
productId;
|
|
23
|
+
assetId;
|
|
24
|
+
position = 0;
|
|
25
|
+
createdAt = new Date();
|
|
26
|
+
updatedAt = new Date();
|
|
27
|
+
};
|
|
28
|
+
__decorate([
|
|
29
|
+
PrimaryKey({ type: 'uuid' }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], GalleryItem.prototype, "id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
Property({ type: 'uuid' }),
|
|
34
|
+
Index(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], GalleryItem.prototype, "productId", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
Property({ type: 'uuid' }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], GalleryItem.prototype, "assetId", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
Property({ type: 'integer' }),
|
|
43
|
+
__metadata("design:type", Number)
|
|
44
|
+
], GalleryItem.prototype, "position", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
Property({ type: 'datetime', onCreate: () => new Date() }),
|
|
47
|
+
__metadata("design:type", Date)
|
|
48
|
+
], GalleryItem.prototype, "createdAt", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
Property({ type: 'datetime', onUpdate: () => new Date() }),
|
|
51
|
+
__metadata("design:type", Date)
|
|
52
|
+
], GalleryItem.prototype, "updatedAt", void 0);
|
|
53
|
+
GalleryItem = __decorate([
|
|
54
|
+
GlobalEntity(),
|
|
55
|
+
Entity({ tableName: 'gallery_items' })
|
|
56
|
+
], GalleryItem);
|
|
57
|
+
export { GalleryItem };
|
|
58
|
+
//# sourceMappingURL=gallery-item.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery-item.entity.js","sourceRoot":"","sources":["../../../src/backend/entities/gallery-item.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;AAEpC;;;;;GAKG;AAGI,IAAM,WAAW,GAAjB,MAAM,WAAW;IACtB,CAAC,aAAa,CAAC,CAAiD;IAGhE,EAAE,GAAW,UAAU,EAAE,CAAC;IAI1B,SAAS,CAAU;IAGnB,OAAO,CAAU;IAGjB,QAAQ,GAAW,CAAC,CAAC;IAGrB,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;IAG7B,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;CAC9B,CAAA;AAjBC;IADC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uCACH;AAI1B;IAFC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC1B,KAAK,EAAE;;8CACW;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4CACV;AAGjB;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;AApBlB,WAAW;IAFvB,YAAY,EAAE;IACd,MAAM,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;GAC1B,WAAW,CAqBvB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OptionalProps } from '@mikro-orm/core';
|
|
2
|
+
/**
|
|
3
|
+
* GroupedItem — child entry of a parent product whose `type='grouped'`
|
|
4
|
+
* (feature 002 US5, data-model.md §2.8).
|
|
5
|
+
*
|
|
6
|
+
* DB-level guarantees (migration 023):
|
|
7
|
+
* - UNIQUE (parent, child) — same child can't be listed twice
|
|
8
|
+
* - CHECK quantity > 0
|
|
9
|
+
* - CHECK parent <> child (no self-grouping; deeper nesting is blocked
|
|
10
|
+
* at the service layer — the child's `type` must be in {simple,
|
|
11
|
+
* configurable, virtual}).
|
|
12
|
+
*/
|
|
13
|
+
export declare class GroupedItem {
|
|
14
|
+
[OptionalProps]?: 'id' | 'position' | 'createdAt' | 'updatedAt';
|
|
15
|
+
id: string;
|
|
16
|
+
parentProductId: string;
|
|
17
|
+
childProductId: string;
|
|
18
|
+
quantity: number;
|
|
19
|
+
position: number;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
updatedAt: Date;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=grouped-item.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grouped-item.entity.d.ts","sourceRoot":"","sources":["../../../src/backend/entities/grouped-item.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,aAAa,EAAwB,MAAM,iBAAiB,CAAC;AAIrF;;;;;;;;;;GAUG;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;IAGzB,cAAc,EAAG,MAAM,CAAC;IAGxB,QAAQ,EAAG,MAAM,CAAC;IAGlB,QAAQ,EAAE,MAAM,CAAK;IAGrB,SAAS,EAAE,IAAI,CAAc;IAG7B,SAAS,EAAE,IAAI,CAAc;CAC9B"}
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
* GroupedItem — child entry of a parent product whose `type='grouped'`
|
|
15
|
+
* (feature 002 US5, data-model.md §2.8).
|
|
16
|
+
*
|
|
17
|
+
* DB-level guarantees (migration 023):
|
|
18
|
+
* - UNIQUE (parent, child) — same child can't be listed twice
|
|
19
|
+
* - CHECK quantity > 0
|
|
20
|
+
* - CHECK parent <> child (no self-grouping; deeper nesting is blocked
|
|
21
|
+
* at the service layer — the child's `type` must be in {simple,
|
|
22
|
+
* configurable, virtual}).
|
|
23
|
+
*/
|
|
24
|
+
let GroupedItem = class GroupedItem {
|
|
25
|
+
[OptionalProps];
|
|
26
|
+
id = randomUUID();
|
|
27
|
+
parentProductId;
|
|
28
|
+
childProductId;
|
|
29
|
+
quantity;
|
|
30
|
+
position = 0;
|
|
31
|
+
createdAt = new Date();
|
|
32
|
+
updatedAt = new Date();
|
|
33
|
+
};
|
|
34
|
+
__decorate([
|
|
35
|
+
PrimaryKey({ type: 'uuid' }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], GroupedItem.prototype, "id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
Property({ type: 'uuid' }),
|
|
40
|
+
Index(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], GroupedItem.prototype, "parentProductId", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
Property({ type: 'uuid' }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], GroupedItem.prototype, "childProductId", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
Property({ type: 'integer' }),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], GroupedItem.prototype, "quantity", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
Property({ type: 'integer' }),
|
|
53
|
+
__metadata("design:type", Number)
|
|
54
|
+
], GroupedItem.prototype, "position", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
Property({ type: 'datetime', onCreate: () => new Date() }),
|
|
57
|
+
__metadata("design:type", Date)
|
|
58
|
+
], GroupedItem.prototype, "createdAt", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
Property({ type: 'datetime', onUpdate: () => new Date() }),
|
|
61
|
+
__metadata("design:type", Date)
|
|
62
|
+
], GroupedItem.prototype, "updatedAt", void 0);
|
|
63
|
+
GroupedItem = __decorate([
|
|
64
|
+
GlobalEntity(),
|
|
65
|
+
Entity({ tableName: 'grouped_items' })
|
|
66
|
+
], GroupedItem);
|
|
67
|
+
export { GroupedItem };
|
|
68
|
+
//# sourceMappingURL=grouped-item.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grouped-item.entity.js","sourceRoot":"","sources":["../../../src/backend/entities/grouped-item.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;AAEpC;;;;;;;;;;GAUG;AAGI,IAAM,WAAW,GAAjB,MAAM,WAAW;IACtB,CAAC,aAAa,CAAC,CAAiD;IAGhE,EAAE,GAAW,UAAU,EAAE,CAAC;IAI1B,eAAe,CAAU;IAGzB,cAAc,CAAU;IAGxB,QAAQ,CAAU;IAGlB,QAAQ,GAAW,CAAC,CAAC;IAGrB,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;IAG7B,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;CAC9B,CAAA;AApBC;IADC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uCACH;AAI1B;IAFC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC1B,KAAK,EAAE;;oDACiB;AAGzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDACH;AAGxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;6CACZ;AAGlB;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;AAvBlB,WAAW;IAFvB,YAAY,EAAE;IACd,MAAM,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;GAC1B,WAAW,CAwBvB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OptionalProps } from '@mikro-orm/core';
|
|
2
|
+
/**
|
|
3
|
+
* ProductAttachment — per-product wrapper around an Asset (feature 002
|
|
4
|
+
* US3, research.md R-9). The Asset itself is the file (storage, MIME,
|
|
5
|
+
* size); this row carries the catalog-side metadata (display name,
|
|
6
|
+
* type, optional description, position).
|
|
7
|
+
*
|
|
8
|
+
* Sharing the same Asset across multiple Products is supported — just
|
|
9
|
+
* insert multiple ProductAttachment rows pointing at the same asset_id.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ProductAttachment {
|
|
12
|
+
[OptionalProps]?: 'id' | 'description' | 'position' | 'createdAt' | 'updatedAt';
|
|
13
|
+
id: string;
|
|
14
|
+
productId: string;
|
|
15
|
+
assetId: string;
|
|
16
|
+
attachmentTypeId: string;
|
|
17
|
+
name: string;
|
|
18
|
+
description?: string | null;
|
|
19
|
+
position: number;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
updatedAt: Date;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=product-attachment.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-attachment.entity.d.ts","sourceRoot":"","sources":["../../../src/backend/entities/product-attachment.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,aAAa,EAAwB,MAAM,iBAAiB,CAAC;AAIrF;;;;;;;;GAQG;AACH,qBAEa,iBAAiB;IAC5B,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,GAAG,aAAa,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;IAGhF,EAAE,EAAE,MAAM,CAAgB;IAI1B,SAAS,EAAG,MAAM,CAAC;IAGnB,OAAO,EAAG,MAAM,CAAC;IAIjB,gBAAgB,EAAG,MAAM,CAAC;IAG1B,IAAI,EAAG,MAAM,CAAC;IAGd,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAG5B,QAAQ,EAAE,MAAM,CAAK;IAGrB,SAAS,EAAE,IAAI,CAAc;IAG7B,SAAS,EAAE,IAAI,CAAc;CAC9B"}
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
* ProductAttachment — per-product wrapper around an Asset (feature 002
|
|
15
|
+
* US3, research.md R-9). The Asset itself is the file (storage, MIME,
|
|
16
|
+
* size); this row carries the catalog-side metadata (display name,
|
|
17
|
+
* type, optional description, position).
|
|
18
|
+
*
|
|
19
|
+
* Sharing the same Asset across multiple Products is supported — just
|
|
20
|
+
* insert multiple ProductAttachment rows pointing at the same asset_id.
|
|
21
|
+
*/
|
|
22
|
+
let ProductAttachment = class ProductAttachment {
|
|
23
|
+
[OptionalProps];
|
|
24
|
+
id = randomUUID();
|
|
25
|
+
productId;
|
|
26
|
+
assetId;
|
|
27
|
+
attachmentTypeId;
|
|
28
|
+
name;
|
|
29
|
+
description;
|
|
30
|
+
position = 0;
|
|
31
|
+
createdAt = new Date();
|
|
32
|
+
updatedAt = new Date();
|
|
33
|
+
};
|
|
34
|
+
__decorate([
|
|
35
|
+
PrimaryKey({ type: 'uuid' }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], ProductAttachment.prototype, "id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
Property({ type: 'uuid' }),
|
|
40
|
+
Index(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], ProductAttachment.prototype, "productId", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
Property({ type: 'uuid' }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], ProductAttachment.prototype, "assetId", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
Property({ type: 'uuid' }),
|
|
49
|
+
Index(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], ProductAttachment.prototype, "attachmentTypeId", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
Property({ type: 'string', length: 160 }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], ProductAttachment.prototype, "name", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
Property({ type: 'text', nullable: true }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], ProductAttachment.prototype, "description", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
Property({ type: 'integer' }),
|
|
62
|
+
__metadata("design:type", Number)
|
|
63
|
+
], ProductAttachment.prototype, "position", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
Property({ type: 'datetime', onCreate: () => new Date() }),
|
|
66
|
+
__metadata("design:type", Date)
|
|
67
|
+
], ProductAttachment.prototype, "createdAt", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
Property({ type: 'datetime', onUpdate: () => new Date() }),
|
|
70
|
+
__metadata("design:type", Date)
|
|
71
|
+
], ProductAttachment.prototype, "updatedAt", void 0);
|
|
72
|
+
ProductAttachment = __decorate([
|
|
73
|
+
GlobalEntity(),
|
|
74
|
+
Entity({ tableName: 'product_attachments' })
|
|
75
|
+
], ProductAttachment);
|
|
76
|
+
export { ProductAttachment };
|
|
77
|
+
//# sourceMappingURL=product-attachment.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-attachment.entity.js","sourceRoot":"","sources":["../../../src/backend/entities/product-attachment.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;AAEpC;;;;;;;;GAQG;AAGI,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC5B,CAAC,aAAa,CAAC,CAAiE;IAGhF,EAAE,GAAW,UAAU,EAAE,CAAC;IAI1B,SAAS,CAAU;IAGnB,OAAO,CAAU;IAIjB,gBAAgB,CAAU;IAG1B,IAAI,CAAU;IAGd,WAAW,CAAiB;IAG5B,QAAQ,GAAW,CAAC,CAAC;IAGrB,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;IAG7B,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;CAC9B,CAAA;AA3BC;IADC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CACH;AAI1B;IAFC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC1B,KAAK,EAAE;;oDACW;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDACV;AAIjB;IAFC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC1B,KAAK,EAAE;;2DACkB;AAG1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;+CAC5B;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACf;AAG5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;mDACT;AAGrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAChD,IAAI;oDAAc;AAG7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAChD,IAAI;oDAAc;AA9BlB,iBAAiB;IAF7B,YAAY,EAAE;IACd,MAAM,CAAC,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;GAChC,iBAAiB,CA+B7B"}
|