@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,444 @@
|
|
|
1
|
+
import type { EntityManager } from '@mikro-orm/postgresql';
|
|
2
|
+
import type { CatalogAttributeReadService, CatalogAttributeView } from './catalog-attribute-read.service.js';
|
|
3
|
+
import type { ProductLinkService } from './product-link.service.js';
|
|
4
|
+
import { type AssetReadPort, type CategoryNode, type CustomFieldDefinitionReadPort, type FilterDefinition, type ListingPriceOrderPort, type ListingPricePort, type OrganizationDetailsPort, type ProductAudience, type ProductDetail, type ProductListSort, type ProductSummary } from '@endora-commerce/contracts';
|
|
5
|
+
import type { SalesChannelMembershipPort } from '@endora-commerce/platform/kernel';
|
|
6
|
+
/**
|
|
7
|
+
* Catalog read-path service (US1). Consumed by the storefront and by external
|
|
8
|
+
* integrations pulling `/catalog/products?changedSince=...`.
|
|
9
|
+
*
|
|
10
|
+
* Sales-channel awareness: each public endpoint resolves the requested channel
|
|
11
|
+
* (default: the one marked `isPublic=true` when no channel was specified) and
|
|
12
|
+
* applies the visibility rules from R-18 — non-public channels omit the `price`
|
|
13
|
+
* field from anonymous responses.
|
|
14
|
+
*
|
|
15
|
+
* For MVP, text search is Postgres ILIKE on the multilingual `name`/`description`
|
|
16
|
+
* blobs. The Meilisearch-backed query path lives in the `search` module
|
|
17
|
+
* (tasks T067/T068); this service falls back to it transparently when available.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* The request's sales channel, resolved once by the canonical resolver
|
|
21
|
+
* middleware (feature 053 / FR-002). The catalog reads it from the request
|
|
22
|
+
* context instead of re-resolving from the raw header. `isPublic` is the
|
|
23
|
+
* price-visibility flag (display concern, distinct from resolution).
|
|
24
|
+
*/
|
|
25
|
+
export interface CatalogResolvedChannel {
|
|
26
|
+
id: string;
|
|
27
|
+
code: string;
|
|
28
|
+
isPublic: boolean;
|
|
29
|
+
defaultCurrency: string;
|
|
30
|
+
defaultLanguage: string;
|
|
31
|
+
}
|
|
32
|
+
export interface CatalogQueryContext {
|
|
33
|
+
/** The request's resolved sales channel (from `getResolvedChannel()`). */
|
|
34
|
+
resolvedChannel: CatalogResolvedChannel;
|
|
35
|
+
/**
|
|
36
|
+
* Who is asking (issue #227). Every read in this service applies
|
|
37
|
+
* {@link isProductVisibleTo} with it, next to the channel filter that was
|
|
38
|
+
* already here — `visibility` and `allowed_organization_ids` were read by no
|
|
39
|
+
* query on this surface, so an anonymous `GET` of a product an operator
|
|
40
|
+
* marked `organization_restricted` returned it in full.
|
|
41
|
+
*
|
|
42
|
+
* **Required, not defaulted.** A default would have to be the anonymous
|
|
43
|
+
* audience to fail closed, and a route that forgot to resolve its caller
|
|
44
|
+
* would then quietly stop serving the buyer their own restricted catalogue —
|
|
45
|
+
* a bug that reads as "the operator's allow-list does not work" and is found
|
|
46
|
+
* by nobody. Two route files pass it; `tsc` names the third.
|
|
47
|
+
*/
|
|
48
|
+
audience: ProductAudience;
|
|
49
|
+
/**
|
|
50
|
+
* Language preference — BCP-47. Used to pick the right string out of the
|
|
51
|
+
* multilingual JSONB blobs. Falls back to the Sales Channel's default language,
|
|
52
|
+
* then to any available key.
|
|
53
|
+
*/
|
|
54
|
+
preferredLanguage?: string | undefined;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The two reads a listing card needs beyond the product row and its price:
|
|
58
|
+
* which image represents the product, and which category slugs it carries.
|
|
59
|
+
*
|
|
60
|
+
* Both are resolved for the whole page and keyed by product id, because both
|
|
61
|
+
* used to run once per card — and neither varies by viewer or by sales channel,
|
|
62
|
+
* so there is no dimension the page-wide key drops. (The channel decides
|
|
63
|
+
* whether the product is on the page at all, and the audience decides whether
|
|
64
|
+
* the caller may see it; both are settled before either read.)
|
|
65
|
+
*/
|
|
66
|
+
export interface ListingCardReads {
|
|
67
|
+
/** Product id -> the T096 chain's answer, `null` when nothing represents it. */
|
|
68
|
+
assetUrlByProduct: Map<string, string | null>;
|
|
69
|
+
/** Product id -> its category slugs, in `product_categories` primary-key order. */
|
|
70
|
+
categorySlugsByProduct: Map<string, string[]>;
|
|
71
|
+
}
|
|
72
|
+
export interface ListProductsParams {
|
|
73
|
+
q?: string | undefined;
|
|
74
|
+
limit: number;
|
|
75
|
+
cursor?: string | undefined;
|
|
76
|
+
sort?: ProductListSort | undefined;
|
|
77
|
+
categorySlug?: string | undefined;
|
|
78
|
+
attributeFilters?: Record<string, string[]> | undefined;
|
|
79
|
+
changedSince?: string | undefined;
|
|
80
|
+
/** Feature 086 — inclusive bounds on the viewer's own resolved unit price. */
|
|
81
|
+
minPrice?: number | undefined;
|
|
82
|
+
maxPrice?: number | undefined;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* How many source rows a price-ordered or price-filtered page may read before it
|
|
86
|
+
* returns short — FR-019, stated as the specification requires and **not** as a
|
|
87
|
+
* setting (research §R13).
|
|
88
|
+
*
|
|
89
|
+
* Eight times the page size. On the reference corpus it never bound: the first
|
|
90
|
+
* page of 50 cost 213 source rows against a budget of 400. It binds only where
|
|
91
|
+
* an operator restricts most of a catalogue from most viewers, and the answer
|
|
92
|
+
* there is a short page — which is this listing's existing behaviour, since the
|
|
93
|
+
* channel and audience filters already narrow a fetched page — rather than an
|
|
94
|
+
* unbounded scan.
|
|
95
|
+
*
|
|
96
|
+
* A setting was rejected because nobody has the number yet: the value it should
|
|
97
|
+
* take is a function of how much of a catalogue a deployment hides, and shipping
|
|
98
|
+
* an operator knob for a guess is the shape Constitution IV refuses. The `warn`
|
|
99
|
+
* below is what turns the question into evidence; adding the setting afterwards
|
|
100
|
+
* is additive.
|
|
101
|
+
*/
|
|
102
|
+
export declare const PRICE_PAGE_SCAN_BUDGET_MULTIPLE = 8;
|
|
103
|
+
export interface ListResult<T> {
|
|
104
|
+
data: T[];
|
|
105
|
+
pagination: {
|
|
106
|
+
cursor: string | null;
|
|
107
|
+
hasMore: boolean;
|
|
108
|
+
limit: number;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
export declare class CatalogQueryService {
|
|
112
|
+
#private;
|
|
113
|
+
private readonly emFactory;
|
|
114
|
+
/**
|
|
115
|
+
* Feature 002 US4 — optional link provider so the PDP `productDetail`
|
|
116
|
+
* carries the pre-grouped Related/Up-sell/Cross-sell links. Optional
|
|
117
|
+
* so tests/composition that don't wire it stay green; when undefined,
|
|
118
|
+
* `productDetail.links` is omitted from the response.
|
|
119
|
+
*/
|
|
120
|
+
private readonly productLinkService?;
|
|
121
|
+
/**
|
|
122
|
+
* Feature 055 (US4) — optional custom-field definition source. When wired,
|
|
123
|
+
* Category custom fields flagged `config.filterable === true` are merged into
|
|
124
|
+
* the storefront filter set. The catalog interprets the opaque `config` here;
|
|
125
|
+
* the custom-fields core stays unaware of catalog (Principle XIV / FR-006).
|
|
126
|
+
*/
|
|
127
|
+
private readonly customFieldDefinitions?;
|
|
128
|
+
/**
|
|
129
|
+
* Feature 061 — composed attribute read model. Required for every
|
|
130
|
+
* attribute-metadata read (filters, PDP visible attributes, promo-rule and
|
|
131
|
+
* comparable key ports); optional in the signature so product-only
|
|
132
|
+
* fixtures keep constructing the service without attribute wiring.
|
|
133
|
+
*/
|
|
134
|
+
private readonly attributeRead?;
|
|
135
|
+
/**
|
|
136
|
+
* Issue #132 — the pricing engine, resolved through the `pricingService`
|
|
137
|
+
* port. Every storefront-facing price this service emits comes from here;
|
|
138
|
+
* the catalogue no longer projects its own legacy default-price attribute,
|
|
139
|
+
* because that figure is not a price any price list stands behind.
|
|
140
|
+
*
|
|
141
|
+
* Optional only in the signature, and unwiring it is not a fallback: a
|
|
142
|
+
* listing asked to render a price without it fails loudly, the same way an
|
|
143
|
+
* unwired attribute read model does. `null` from the port is the engine's
|
|
144
|
+
* own "nothing applies" answer and is rendered as an absence.
|
|
145
|
+
*/
|
|
146
|
+
private readonly listingPrices?;
|
|
147
|
+
/**
|
|
148
|
+
* Feature 075 — `assets_library`'s read port, where six raw
|
|
149
|
+
* `join assets a on a.id = …` clauses and an `em.find(Asset, …)` used to
|
|
150
|
+
* be. The bridge rows are still this module's; only the asset row is asked
|
|
151
|
+
* of its owner.
|
|
152
|
+
*
|
|
153
|
+
* Optional only in the signature, for the same reason the two above are:
|
|
154
|
+
* a fixture that renders no image never reaches it. A PDP that does and
|
|
155
|
+
* finds it unwired fails loudly rather than silently dropping every image.
|
|
156
|
+
*/
|
|
157
|
+
private readonly assets?;
|
|
158
|
+
/**
|
|
159
|
+
* Issue #185 — the kernel's channel-membership accessor, where the
|
|
160
|
+
* hand-written `select product_id from sales_channel_products …` in
|
|
161
|
+
* {@link filterByChannel} used to be. Constitution XII says the
|
|
162
|
+
* `sales_channel_*` bridges are read and written only through this service;
|
|
163
|
+
* the query here named the table itself, which crosses the boundary while
|
|
164
|
+
* naming no import specifier.
|
|
165
|
+
*
|
|
166
|
+
* Optional only in the signature, and unwiring it is not a fallback: the
|
|
167
|
+
* channel filter fails loudly rather than quietly answering the full
|
|
168
|
+
* cross-channel set, which is the one degrade Principle XII rules out.
|
|
169
|
+
*/
|
|
170
|
+
private readonly channelMembership?;
|
|
171
|
+
/**
|
|
172
|
+
* `organizations`' read model, for the one field the pricing engine needs
|
|
173
|
+
* beyond the viewer's organisation id: the customer group a group-targeted
|
|
174
|
+
* price list is selected by. Without it a buyer's catalogue card and their
|
|
175
|
+
* own cart line would resolve against different lists and quote different
|
|
176
|
+
* figures for one product.
|
|
177
|
+
*
|
|
178
|
+
* Optional only in the signature, and unwiring it is not a fallback: a
|
|
179
|
+
* listing asked to price a signed-in buyer without it fails loudly, the
|
|
180
|
+
* same way the two ports above do. An **anonymous** listing never reaches
|
|
181
|
+
* it, which is what keeps the fixtures that construct this service with no
|
|
182
|
+
* organisation wiring working unchanged.
|
|
183
|
+
*/
|
|
184
|
+
private readonly organizationDetails?;
|
|
185
|
+
/**
|
|
186
|
+
* Feature 086 — the `ListingPriceOrderPort` slice of the same
|
|
187
|
+
* `pricingService` container {@link listingPrices} resolves.
|
|
188
|
+
*
|
|
189
|
+
* A separate constructor argument rather than a widened type on that one,
|
|
190
|
+
* because every fixture that builds this service with a listing-price stub
|
|
191
|
+
* would otherwise stop compiling for a capability it does not exercise. It
|
|
192
|
+
* is the same container, the same gate and the same declared edge — the port
|
|
193
|
+
* doc block says so, and `check:port-shape` compares it against the
|
|
194
|
+
* registration.
|
|
195
|
+
*
|
|
196
|
+
* Optional only in the signature, and unwiring it is not a fallback: a
|
|
197
|
+
* price-ordered listing asked for without it fails loudly rather than
|
|
198
|
+
* silently serving the default ordering under a `sort=price` the buyer
|
|
199
|
+
* chose.
|
|
200
|
+
*/
|
|
201
|
+
private readonly listingPriceOrder?;
|
|
202
|
+
/**
|
|
203
|
+
* Feature 086 — where the scan budget says it bound.
|
|
204
|
+
*
|
|
205
|
+
* The budget is a constant rather than a setting because nobody has the
|
|
206
|
+
* number yet (research §R13), and this line is what turns the question into
|
|
207
|
+
* evidence instead of leaving it a guess: a deployment whose pages come back
|
|
208
|
+
* short says so in its own log, and the setting can be added afterwards
|
|
209
|
+
* without changing anything else. Optional, because a fixture that never
|
|
210
|
+
* binds never reaches it.
|
|
211
|
+
*/
|
|
212
|
+
private readonly log?;
|
|
213
|
+
constructor(emFactory: () => EntityManager,
|
|
214
|
+
/**
|
|
215
|
+
* Feature 002 US4 — optional link provider so the PDP `productDetail`
|
|
216
|
+
* carries the pre-grouped Related/Up-sell/Cross-sell links. Optional
|
|
217
|
+
* so tests/composition that don't wire it stay green; when undefined,
|
|
218
|
+
* `productDetail.links` is omitted from the response.
|
|
219
|
+
*/
|
|
220
|
+
productLinkService?: ProductLinkService | undefined,
|
|
221
|
+
/**
|
|
222
|
+
* Feature 055 (US4) — optional custom-field definition source. When wired,
|
|
223
|
+
* Category custom fields flagged `config.filterable === true` are merged into
|
|
224
|
+
* the storefront filter set. The catalog interprets the opaque `config` here;
|
|
225
|
+
* the custom-fields core stays unaware of catalog (Principle XIV / FR-006).
|
|
226
|
+
*/
|
|
227
|
+
customFieldDefinitions?: CustomFieldDefinitionReadPort | undefined,
|
|
228
|
+
/**
|
|
229
|
+
* Feature 061 — composed attribute read model. Required for every
|
|
230
|
+
* attribute-metadata read (filters, PDP visible attributes, promo-rule and
|
|
231
|
+
* comparable key ports); optional in the signature so product-only
|
|
232
|
+
* fixtures keep constructing the service without attribute wiring.
|
|
233
|
+
*/
|
|
234
|
+
attributeRead?: CatalogAttributeReadService | undefined,
|
|
235
|
+
/**
|
|
236
|
+
* Issue #132 — the pricing engine, resolved through the `pricingService`
|
|
237
|
+
* port. Every storefront-facing price this service emits comes from here;
|
|
238
|
+
* the catalogue no longer projects its own legacy default-price attribute,
|
|
239
|
+
* because that figure is not a price any price list stands behind.
|
|
240
|
+
*
|
|
241
|
+
* Optional only in the signature, and unwiring it is not a fallback: a
|
|
242
|
+
* listing asked to render a price without it fails loudly, the same way an
|
|
243
|
+
* unwired attribute read model does. `null` from the port is the engine's
|
|
244
|
+
* own "nothing applies" answer and is rendered as an absence.
|
|
245
|
+
*/
|
|
246
|
+
listingPrices?: ListingPricePort | undefined,
|
|
247
|
+
/**
|
|
248
|
+
* Feature 075 — `assets_library`'s read port, where six raw
|
|
249
|
+
* `join assets a on a.id = …` clauses and an `em.find(Asset, …)` used to
|
|
250
|
+
* be. The bridge rows are still this module's; only the asset row is asked
|
|
251
|
+
* of its owner.
|
|
252
|
+
*
|
|
253
|
+
* Optional only in the signature, for the same reason the two above are:
|
|
254
|
+
* a fixture that renders no image never reaches it. A PDP that does and
|
|
255
|
+
* finds it unwired fails loudly rather than silently dropping every image.
|
|
256
|
+
*/
|
|
257
|
+
assets?: AssetReadPort | undefined,
|
|
258
|
+
/**
|
|
259
|
+
* Issue #185 — the kernel's channel-membership accessor, where the
|
|
260
|
+
* hand-written `select product_id from sales_channel_products …` in
|
|
261
|
+
* {@link filterByChannel} used to be. Constitution XII says the
|
|
262
|
+
* `sales_channel_*` bridges are read and written only through this service;
|
|
263
|
+
* the query here named the table itself, which crosses the boundary while
|
|
264
|
+
* naming no import specifier.
|
|
265
|
+
*
|
|
266
|
+
* Optional only in the signature, and unwiring it is not a fallback: the
|
|
267
|
+
* channel filter fails loudly rather than quietly answering the full
|
|
268
|
+
* cross-channel set, which is the one degrade Principle XII rules out.
|
|
269
|
+
*/
|
|
270
|
+
channelMembership?: SalesChannelMembershipPort | undefined,
|
|
271
|
+
/**
|
|
272
|
+
* `organizations`' read model, for the one field the pricing engine needs
|
|
273
|
+
* beyond the viewer's organisation id: the customer group a group-targeted
|
|
274
|
+
* price list is selected by. Without it a buyer's catalogue card and their
|
|
275
|
+
* own cart line would resolve against different lists and quote different
|
|
276
|
+
* figures for one product.
|
|
277
|
+
*
|
|
278
|
+
* Optional only in the signature, and unwiring it is not a fallback: a
|
|
279
|
+
* listing asked to price a signed-in buyer without it fails loudly, the
|
|
280
|
+
* same way the two ports above do. An **anonymous** listing never reaches
|
|
281
|
+
* it, which is what keeps the fixtures that construct this service with no
|
|
282
|
+
* organisation wiring working unchanged.
|
|
283
|
+
*/
|
|
284
|
+
organizationDetails?: OrganizationDetailsPort | undefined,
|
|
285
|
+
/**
|
|
286
|
+
* Feature 086 — the `ListingPriceOrderPort` slice of the same
|
|
287
|
+
* `pricingService` container {@link listingPrices} resolves.
|
|
288
|
+
*
|
|
289
|
+
* A separate constructor argument rather than a widened type on that one,
|
|
290
|
+
* because every fixture that builds this service with a listing-price stub
|
|
291
|
+
* would otherwise stop compiling for a capability it does not exercise. It
|
|
292
|
+
* is the same container, the same gate and the same declared edge — the port
|
|
293
|
+
* doc block says so, and `check:port-shape` compares it against the
|
|
294
|
+
* registration.
|
|
295
|
+
*
|
|
296
|
+
* Optional only in the signature, and unwiring it is not a fallback: a
|
|
297
|
+
* price-ordered listing asked for without it fails loudly rather than
|
|
298
|
+
* silently serving the default ordering under a `sort=price` the buyer
|
|
299
|
+
* chose.
|
|
300
|
+
*/
|
|
301
|
+
listingPriceOrder?: ListingPriceOrderPort | undefined,
|
|
302
|
+
/**
|
|
303
|
+
* Feature 086 — where the scan budget says it bound.
|
|
304
|
+
*
|
|
305
|
+
* The budget is a constant rather than a setting because nobody has the
|
|
306
|
+
* number yet (research §R13), and this line is what turns the question into
|
|
307
|
+
* evidence instead of leaving it a guess: a deployment whose pages come back
|
|
308
|
+
* short says so in its own log, and the setting can be added afterwards
|
|
309
|
+
* without changing anything else. Optional, because a fixture that never
|
|
310
|
+
* binds never reaches it.
|
|
311
|
+
*/
|
|
312
|
+
log?: {
|
|
313
|
+
warn(obj: object, msg: string): void;
|
|
314
|
+
} | undefined);
|
|
315
|
+
listProducts(params: ListProductsParams, ctx: CatalogQueryContext): Promise<ListResult<ProductSummary>>;
|
|
316
|
+
getProductByIdOrSlug(idOrSlug: string, ctx: CatalogQueryContext): Promise<ProductDetail>;
|
|
317
|
+
/**
|
|
318
|
+
* Resolve a batch of products into storefront-shape summaries (id, sku,
|
|
319
|
+
* slug, localized name, primary asset url via gallery thumb chain,
|
|
320
|
+
* price honoring sales-channel public flag). Used by US5 composite
|
|
321
|
+
* eager-load — keeps the per-product fanout to a constant 3-4 queries
|
|
322
|
+
* regardless of how many children/options a parent has.
|
|
323
|
+
*/
|
|
324
|
+
private summariesForIds;
|
|
325
|
+
getCategoryTree(ctx: CatalogQueryContext): Promise<CategoryNode[]>;
|
|
326
|
+
getFilterDefinitions(ctx: CatalogQueryContext): Promise<FilterDefinition[]>;
|
|
327
|
+
/**
|
|
328
|
+
* Feature 055 (US4) — resolve the filterable Category custom fields into
|
|
329
|
+
* {@link FilterDefinition}s. Returns `[]` when no definition source is wired.
|
|
330
|
+
* Select/multiselect fields carry their defined options; scalar fields carry
|
|
331
|
+
* neither options nor range (they render as a keyword/value filter client-side).
|
|
332
|
+
*/
|
|
333
|
+
private buildCustomFieldFilters;
|
|
334
|
+
/**
|
|
335
|
+
* Feature 012 / FR-030 — build the "Parametry produktu" tab payload
|
|
336
|
+
* for one product. Returns every attribute that meets BOTH:
|
|
337
|
+
* 1. attribute.isVisibleOnProductPage === true
|
|
338
|
+
* 2. product.attributeValues[attribute.key] is non-null + non-empty
|
|
339
|
+
*
|
|
340
|
+
* For select / enum / multiselect types `valueRendered` is the
|
|
341
|
+
* resolved per-locale option label (with fallback to labelDefault);
|
|
342
|
+
* for boolean types it's 'Yes' / 'No'; for number / price / string
|
|
343
|
+
* types it's the value coerced to string.
|
|
344
|
+
*
|
|
345
|
+
* Sorted by AttributeSetAttribute.position when the product has an
|
|
346
|
+
* Attribute Set, else by attribute key ASC for determinism.
|
|
347
|
+
*/
|
|
348
|
+
private buildVisibleAttributesProjection;
|
|
349
|
+
/** Cached per-call list of attribute keys that should match free-text search. */
|
|
350
|
+
private searchableAttributeKeys;
|
|
351
|
+
/**
|
|
352
|
+
* Feature 007 — list of attribute keys flagged `is_comparable=true`,
|
|
353
|
+
* sorted alphabetically. Consumed by the comparisons module's
|
|
354
|
+
* comparison-page projection (`ComparableAttributeProjection`). Public
|
|
355
|
+
* because it crosses a module boundary (Constitution I — comparisons
|
|
356
|
+
* MUST consume catalog through a documented service port, not by
|
|
357
|
+
* importing internals).
|
|
358
|
+
*/
|
|
359
|
+
comparableAttributeKeys(): Promise<string[]>;
|
|
360
|
+
/**
|
|
361
|
+
* Feature 012 / US8 — list of attribute keys flagged `is_promo_rule=true`,
|
|
362
|
+
* sorted alphabetically. Consumed by the promotions module's rule-target
|
|
363
|
+
* picker endpoint and by the promotion-rule resolver's skip-on-toggle
|
|
364
|
+
* check (FR-039). Public because it crosses a module boundary
|
|
365
|
+
* (Constitution I — promotions MUST consume catalog through a documented
|
|
366
|
+
* service port, not by importing internals).
|
|
367
|
+
*/
|
|
368
|
+
promoRuleAttributeKeys(): Promise<string[]>;
|
|
369
|
+
/**
|
|
370
|
+
* Feature 012 / US8 — load one attribute by key with its option list
|
|
371
|
+
* inline. Returns `null` when the attribute does not exist. The option
|
|
372
|
+
* list is empty for non-select-style types. Used by:
|
|
373
|
+
* - Promotion-rule editor (criterion picker payload)
|
|
374
|
+
* - PromotionRuleService.matches() to validate option values
|
|
375
|
+
* against the attribute's authoritative option set.
|
|
376
|
+
*/
|
|
377
|
+
getAttributeWithOptions(key: string): Promise<{
|
|
378
|
+
id: string;
|
|
379
|
+
key: string;
|
|
380
|
+
label: Record<string, string>;
|
|
381
|
+
labelDefault: string;
|
|
382
|
+
valueType: CatalogAttributeView['valueType'];
|
|
383
|
+
isPromoRule: boolean;
|
|
384
|
+
options: Array<{
|
|
385
|
+
value: string;
|
|
386
|
+
label: Record<string, string>;
|
|
387
|
+
labelDefault: string;
|
|
388
|
+
}>;
|
|
389
|
+
} | null>;
|
|
390
|
+
/**
|
|
391
|
+
* Build a MikroORM where-clause for "attributeValues[key] contains query
|
|
392
|
+
* (case-insensitive)". MikroORM doesn't have a first-class JSONB query
|
|
393
|
+
* helper for the `->>` operator, so we use `$jsonb` style by selecting the
|
|
394
|
+
* value via the operators object.
|
|
395
|
+
*/
|
|
396
|
+
private searchableJsonbClause;
|
|
397
|
+
private orderForSort;
|
|
398
|
+
/**
|
|
399
|
+
* The keyset a listing pages by — **derived from the ordering it serves**,
|
|
400
|
+
* never assumed.
|
|
401
|
+
*
|
|
402
|
+
* A chunk is fetched with `orderForSort(sort)` and the walk then asks for
|
|
403
|
+
* "everything after the last row of it". Those are one decision, and they had
|
|
404
|
+
* come apart: the `after` predicate was written over `created_at` whatever the
|
|
405
|
+
* ordering, so under `sort=name` — which orders by `slug` — it excluded the
|
|
406
|
+
* rows *newer* than the last one served instead of the rows already served.
|
|
407
|
+
* That set has no relation to the page, so the walk both repeats products and
|
|
408
|
+
* never reaches the ones between the repeats:
|
|
409
|
+
* `?q=…&sort=name&minPrice=0&maxPrice=100000&limit=3` served
|
|
410
|
+
* `[A, B, A]` on one page and then re-issued a cursor pointing at `B`.
|
|
411
|
+
*
|
|
412
|
+
* Deriving it here is what keeps the two in step for the next ordering
|
|
413
|
+
* somebody adds: `orderForSort` is the only place that says what a sort orders
|
|
414
|
+
* by, and this is the only place that says how to page it.
|
|
415
|
+
*/
|
|
416
|
+
private keysetFor;
|
|
417
|
+
private filterByChannel;
|
|
418
|
+
private productIdsInCategoryTree;
|
|
419
|
+
/**
|
|
420
|
+
* Set of channel-visible product ids directly assigned to each category
|
|
421
|
+
* (i.e. via a `product_categories` row). Subtree roll-up to ancestors is
|
|
422
|
+
* done by the caller, which has the parent map to walk.
|
|
423
|
+
*/
|
|
424
|
+
private directProductSetsByCategory;
|
|
425
|
+
/**
|
|
426
|
+
* One product's listing summary.
|
|
427
|
+
*
|
|
428
|
+
* Every input is the **page's**, resolved by the caller, and all of them are
|
|
429
|
+
* required rather than optional. This method used to resolve its own price,
|
|
430
|
+
* its own primary asset and its own category slugs, which meant every listing
|
|
431
|
+
* path that mapped over a page paid all three once per card — 150 of the ~158
|
|
432
|
+
* statements a 50-item page cost after the price was hoisted (issue #263).
|
|
433
|
+
* Making the parameters mandatory is what stops the next caller from quietly
|
|
434
|
+
* re-opening that.
|
|
435
|
+
*
|
|
436
|
+
* It takes no `EntityManager` and is synchronous for the same reason: with
|
|
437
|
+
* nothing to query through and nothing to await, a per-card read cannot be
|
|
438
|
+
* added back here without the change being the point of the diff.
|
|
439
|
+
*/
|
|
440
|
+
private toSummary;
|
|
441
|
+
private pickLang;
|
|
442
|
+
private coerceAttributeValues;
|
|
443
|
+
}
|
|
444
|
+
//# sourceMappingURL=catalog-query.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-query.service.d.ts","sourceRoot":"","sources":["../../../src/backend/services/catalog-query.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,qCAAqC,CAAC;AAK7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAQpE,OAAO,EAKL,KAAK,aAAa,EAElB,KAAK,YAAY,EACjB,KAAK,6BAA6B,EAClC,KAAK,gBAAgB,EAGrB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EAErB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,EAEpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAsBnF;;;;;;;;;;;;GAYG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,0EAA0E;IAC1E,eAAe,EAAE,sBAAsB,CAAC;IACxC;;;;;;;;;;;;OAYG;IACH,QAAQ,EAAE,eAAe,CAAC;IAC1B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACxC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gFAAgF;IAChF,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;IAC9C,mFAAmF;IACnF,s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