@open-mercato/core 0.9.1-develop.7473.1.de5b22888f → 0.9.1-develop.7475.1.28ca93ed97
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/.turbo/turbo-build.log +2 -2
- package/dist/generated/entities/catalog_price_history_entry/index.js +53 -0
- package/dist/generated/entities/catalog_price_history_entry/index.js.map +7 -0
- package/dist/generated/entities/customer_group_terms/index.js +2 -0
- package/dist/generated/entities/customer_group_terms/index.js.map +2 -2
- package/dist/generated/entities/ecommerce_store/index.js +33 -0
- package/dist/generated/entities/ecommerce_store/index.js.map +7 -0
- package/dist/generated/entities/ecommerce_store_channel_binding/index.js +29 -0
- package/dist/generated/entities/ecommerce_store_channel_binding/index.js.map +7 -0
- package/dist/generated/entities/ecommerce_store_domain_binding/index.js +23 -0
- package/dist/generated/entities/ecommerce_store_domain_binding/index.js.map +7 -0
- package/dist/generated/entities.ids.generated.js +8 -1
- package/dist/generated/entities.ids.generated.js.map +2 -2
- package/dist/generated/entity-fields-registry.js +72 -0
- package/dist/generated/entity-fields-registry.js.map +2 -2
- package/dist/helpers/integration/customerGroupsFixtures.js.map +2 -2
- package/dist/modules/catalog/acl.js +8 -1
- package/dist/modules/catalog/acl.js.map +2 -2
- package/dist/modules/catalog/api/config/omnibus/route.js +184 -0
- package/dist/modules/catalog/api/config/omnibus/route.js.map +7 -0
- package/dist/modules/catalog/api/prices/history/route.js +131 -0
- package/dist/modules/catalog/api/prices/history/route.js.map +7 -0
- package/dist/modules/catalog/api/prices/omnibus-preview/route.js +184 -0
- package/dist/modules/catalog/api/prices/omnibus-preview/route.js.map +7 -0
- package/dist/modules/catalog/api/products/route.js +54 -245
- package/dist/modules/catalog/api/products/route.js.map +3 -3
- package/dist/modules/catalog/api/tags/route.js +6 -0
- package/dist/modules/catalog/api/tags/route.js.map +2 -2
- package/dist/modules/catalog/backend/config/catalog/page.js +3 -1
- package/dist/modules/catalog/backend/config/catalog/page.js.map +2 -2
- package/dist/modules/catalog/cli.js +80 -2
- package/dist/modules/catalog/cli.js.map +2 -2
- package/dist/modules/catalog/commands/categories.js +51 -2
- package/dist/modules/catalog/commands/categories.js.map +2 -2
- package/dist/modules/catalog/commands/prices.js +43 -1
- package/dist/modules/catalog/commands/prices.js.map +2 -2
- package/dist/modules/catalog/commands/products.js +71 -0
- package/dist/modules/catalog/commands/products.js.map +2 -2
- package/dist/modules/catalog/commands/variants.js +7 -0
- package/dist/modules/catalog/commands/variants.js.map +2 -2
- package/dist/modules/catalog/components/OmnibusSettings.js +703 -0
- package/dist/modules/catalog/components/OmnibusSettings.js.map +7 -0
- package/dist/modules/catalog/components/PriceEditorOmnibusRow.js +152 -0
- package/dist/modules/catalog/components/PriceEditorOmnibusRow.js.map +7 -0
- package/dist/modules/catalog/components/lookupSources.js +31 -0
- package/dist/modules/catalog/components/lookupSources.js.map +7 -0
- package/dist/modules/catalog/components/prices/PriceScopeSelectors.js +8 -2
- package/dist/modules/catalog/components/prices/PriceScopeSelectors.js.map +2 -2
- package/dist/modules/catalog/components/products/VariantBuilder.js +11 -1
- package/dist/modules/catalog/components/products/VariantBuilder.js.map +2 -2
- package/dist/modules/catalog/data/entities.js +122 -1
- package/dist/modules/catalog/data/entities.js.map +2 -2
- package/dist/modules/catalog/data/validators.js +78 -0
- package/dist/modules/catalog/data/validators.js.map +2 -2
- package/dist/modules/catalog/di.js +18 -0
- package/dist/modules/catalog/di.js.map +2 -2
- package/dist/modules/catalog/lib/omnibus.js +285 -0
- package/dist/modules/catalog/lib/omnibus.js.map +7 -0
- package/dist/modules/catalog/lib/omnibusBackfill.js +146 -0
- package/dist/modules/catalog/lib/omnibusBackfill.js.map +7 -0
- package/dist/modules/catalog/lib/omnibusCache.js +89 -0
- package/dist/modules/catalog/lib/omnibusCache.js.map +7 -0
- package/dist/modules/catalog/lib/omnibusConfig.js +64 -0
- package/dist/modules/catalog/lib/omnibusConfig.js.map +7 -0
- package/dist/modules/catalog/lib/omnibusHistoryQueries.js +191 -0
- package/dist/modules/catalog/lib/omnibusHistoryQueries.js.map +7 -0
- package/dist/modules/catalog/lib/omnibusPresentedEntry.js +73 -0
- package/dist/modules/catalog/lib/omnibusPresentedEntry.js.map +7 -0
- package/dist/modules/catalog/lib/omnibusProductListEnrichment.js +94 -0
- package/dist/modules/catalog/lib/omnibusProductListEnrichment.js.map +7 -0
- package/dist/modules/catalog/lib/omnibusTypes.js +115 -0
- package/dist/modules/catalog/lib/omnibusTypes.js.map +7 -0
- package/dist/modules/catalog/lib/optionSchemaTranslations.js +55 -0
- package/dist/modules/catalog/lib/optionSchemaTranslations.js.map +7 -0
- package/dist/modules/catalog/lib/priceHistoryQuery.js +103 -0
- package/dist/modules/catalog/lib/priceHistoryQuery.js.map +7 -0
- package/dist/modules/catalog/lib/pricing.js +26 -2
- package/dist/modules/catalog/lib/pricing.js.map +2 -2
- package/dist/modules/catalog/lib/productFilters.js +273 -0
- package/dist/modules/catalog/lib/productFilters.js.map +7 -0
- package/dist/modules/catalog/lib/productScopeKeys.js +105 -0
- package/dist/modules/catalog/lib/productScopeKeys.js.map +7 -0
- package/dist/modules/catalog/lib/productScopeReindex.js +73 -0
- package/dist/modules/catalog/lib/productScopeReindex.js.map +7 -0
- package/dist/modules/catalog/migrations/Migration20261005105352_catalog.js +39 -0
- package/dist/modules/catalog/migrations/Migration20261005105352_catalog.js.map +7 -0
- package/dist/modules/catalog/migrations/Migration20261005150824_catalog.js +39 -0
- package/dist/modules/catalog/migrations/Migration20261005150824_catalog.js.map +7 -0
- package/dist/modules/catalog/services/catalogOmnibusService.js +480 -0
- package/dist/modules/catalog/services/catalogOmnibusService.js.map +7 -0
- package/dist/modules/catalog/setup.js +3 -1
- package/dist/modules/catalog/setup.js.map +2 -2
- package/dist/modules/catalog/subscribers/product-scope-keys-category-deleted.js +16 -0
- package/dist/modules/catalog/subscribers/product-scope-keys-category-deleted.js.map +7 -0
- package/dist/modules/catalog/subscribers/product-scope-keys-category-updated.js +17 -0
- package/dist/modules/catalog/subscribers/product-scope-keys-category-updated.js.map +7 -0
- package/dist/modules/catalog/translations.js +10 -0
- package/dist/modules/catalog/translations.js.map +2 -2
- package/dist/modules/configs/lib/upgrade-actions.js +28 -0
- package/dist/modules/configs/lib/upgrade-actions.js.map +2 -2
- package/dist/modules/customer_groups/api/customer-groups/[id]/terms/route.js +5 -0
- package/dist/modules/customer_groups/api/customer-groups/[id]/terms/route.js.map +2 -2
- package/dist/modules/customer_groups/components/CustomerGroupTermsSection.js +111 -3
- package/dist/modules/customer_groups/components/CustomerGroupTermsSection.js.map +2 -2
- package/dist/modules/customer_groups/components/customerGroupAssortmentScope.js +43 -0
- package/dist/modules/customer_groups/components/customerGroupAssortmentScope.js.map +7 -0
- package/dist/modules/customer_groups/data/entities.js +3 -0
- package/dist/modules/customer_groups/data/entities.js.map +2 -2
- package/dist/modules/customer_groups/data/validators.js +9 -0
- package/dist/modules/customer_groups/data/validators.js.map +2 -2
- package/dist/modules/customer_groups/migrations/Migration20261005110250_customer_groups.js +17 -0
- package/dist/modules/customer_groups/migrations/Migration20261005110250_customer_groups.js.map +7 -0
- package/dist/modules/customer_groups/services/customerGroupsService.js +62 -15
- package/dist/modules/customer_groups/services/customerGroupsService.js.map +2 -2
- package/dist/modules/ecommerce/acl.js +13 -0
- package/dist/modules/ecommerce/acl.js.map +7 -0
- package/dist/modules/ecommerce/api/domain-mappings/route.js +72 -0
- package/dist/modules/ecommerce/api/domain-mappings/route.js.map +7 -0
- package/dist/modules/ecommerce/api/openapi.js +27 -0
- package/dist/modules/ecommerce/api/openapi.js.map +7 -0
- package/dist/modules/ecommerce/api/store-channel-bindings/[id]/assortment-count/route.js +109 -0
- package/dist/modules/ecommerce/api/store-channel-bindings/[id]/assortment-count/route.js.map +7 -0
- package/dist/modules/ecommerce/api/store-channel-bindings/crud.js +265 -0
- package/dist/modules/ecommerce/api/store-channel-bindings/crud.js.map +7 -0
- package/dist/modules/ecommerce/api/store-channel-bindings/route.js +67 -0
- package/dist/modules/ecommerce/api/store-channel-bindings/route.js.map +7 -0
- package/dist/modules/ecommerce/api/store-domain-bindings/crud.js +296 -0
- package/dist/modules/ecommerce/api/store-domain-bindings/crud.js.map +7 -0
- package/dist/modules/ecommerce/api/store-domain-bindings/route.js +73 -0
- package/dist/modules/ecommerce/api/store-domain-bindings/route.js.map +7 -0
- package/dist/modules/ecommerce/api/storefront/categories/[slug]/route.js +87 -0
- package/dist/modules/ecommerce/api/storefront/categories/[slug]/route.js.map +7 -0
- package/dist/modules/ecommerce/api/storefront/categories/openapiSchemas.js +50 -0
- package/dist/modules/ecommerce/api/storefront/categories/openapiSchemas.js.map +7 -0
- package/dist/modules/ecommerce/api/storefront/categories/route.js +75 -0
- package/dist/modules/ecommerce/api/storefront/categories/route.js.map +7 -0
- package/dist/modules/ecommerce/api/storefront/context/route.js +163 -0
- package/dist/modules/ecommerce/api/storefront/context/route.js.map +7 -0
- package/dist/modules/ecommerce/api/storefront/products/[idOrHandle]/route.js +87 -0
- package/dist/modules/ecommerce/api/storefront/products/[idOrHandle]/route.js.map +7 -0
- package/dist/modules/ecommerce/api/storefront/products/openapiSchemas.js +177 -0
- package/dist/modules/ecommerce/api/storefront/products/openapiSchemas.js.map +7 -0
- package/dist/modules/ecommerce/api/storefront/products/route.js +78 -0
- package/dist/modules/ecommerce/api/storefront/products/route.js.map +7 -0
- package/dist/modules/ecommerce/api/storefront/search/suggest/openapiSchemas.js +25 -0
- package/dist/modules/ecommerce/api/storefront/search/suggest/openapiSchemas.js.map +7 -0
- package/dist/modules/ecommerce/api/storefront/search/suggest/route.js +75 -0
- package/dist/modules/ecommerce/api/storefront/search/suggest/route.js.map +7 -0
- package/dist/modules/ecommerce/api/storefront/storefrontRouteSupport.js +58 -0
- package/dist/modules/ecommerce/api/storefront/storefrontRouteSupport.js.map +7 -0
- package/dist/modules/ecommerce/api/stores/[id]/branding/route.js +183 -0
- package/dist/modules/ecommerce/api/stores/[id]/branding/route.js.map +7 -0
- package/dist/modules/ecommerce/api/stores/[id]/preview-branding/route.js +92 -0
- package/dist/modules/ecommerce/api/stores/[id]/preview-branding/route.js.map +7 -0
- package/dist/modules/ecommerce/api/stores/crud.js +401 -0
- package/dist/modules/ecommerce/api/stores/crud.js.map +7 -0
- package/dist/modules/ecommerce/api/stores/route.js +64 -0
- package/dist/modules/ecommerce/api/stores/route.js.map +7 -0
- package/dist/modules/ecommerce/backend/config/ecommerce/[id]/page.js +9 -0
- package/dist/modules/ecommerce/backend/config/ecommerce/[id]/page.js.map +7 -0
- package/dist/modules/ecommerce/backend/config/ecommerce/[id]/page.meta.js +16 -0
- package/dist/modules/ecommerce/backend/config/ecommerce/[id]/page.meta.js.map +7 -0
- package/dist/modules/ecommerce/backend/config/ecommerce/page.js +9 -0
- package/dist/modules/ecommerce/backend/config/ecommerce/page.js.map +7 -0
- package/dist/modules/ecommerce/backend/config/ecommerce/page.meta.js +16 -0
- package/dist/modules/ecommerce/backend/config/ecommerce/page.meta.js.map +7 -0
- package/dist/modules/ecommerce/commands/stores.js +110 -0
- package/dist/modules/ecommerce/commands/stores.js.map +7 -0
- package/dist/modules/ecommerce/components/ChannelAssortmentCount.js +90 -0
- package/dist/modules/ecommerce/components/ChannelAssortmentCount.js.map +7 -0
- package/dist/modules/ecommerce/components/ChannelBindingFormSections.js +33 -0
- package/dist/modules/ecommerce/components/ChannelBindingFormSections.js.map +7 -0
- package/dist/modules/ecommerce/components/ChannelLookupPicker.js +11 -0
- package/dist/modules/ecommerce/components/ChannelLookupPicker.js.map +7 -0
- package/dist/modules/ecommerce/components/DomainStatusWarning.js +24 -0
- package/dist/modules/ecommerce/components/DomainStatusWarning.js.map +7 -0
- package/dist/modules/ecommerce/components/StoreAvailabilityDefaultsSection.js +190 -0
- package/dist/modules/ecommerce/components/StoreAvailabilityDefaultsSection.js.map +7 -0
- package/dist/modules/ecommerce/components/StoreBrandingControls.js +67 -0
- package/dist/modules/ecommerce/components/StoreBrandingControls.js.map +7 -0
- package/dist/modules/ecommerce/components/StoreBrandingPreview.js +69 -0
- package/dist/modules/ecommerce/components/StoreBrandingPreview.js.map +7 -0
- package/dist/modules/ecommerce/components/StoreBrandingTab.js +218 -0
- package/dist/modules/ecommerce/components/StoreBrandingTab.js.map +7 -0
- package/dist/modules/ecommerce/components/StoreChannelBindingDialog.js +270 -0
- package/dist/modules/ecommerce/components/StoreChannelBindingDialog.js.map +7 -0
- package/dist/modules/ecommerce/components/StoreChannelsTab.js +313 -0
- package/dist/modules/ecommerce/components/StoreChannelsTab.js.map +7 -0
- package/dist/modules/ecommerce/components/StoreCreateDialog.js +164 -0
- package/dist/modules/ecommerce/components/StoreCreateDialog.js.map +7 -0
- package/dist/modules/ecommerce/components/StoreDomainBindingDialog.js +162 -0
- package/dist/modules/ecommerce/components/StoreDomainBindingDialog.js.map +7 -0
- package/dist/modules/ecommerce/components/StoreDomainsTab.js +357 -0
- package/dist/modules/ecommerce/components/StoreDomainsTab.js.map +7 -0
- package/dist/modules/ecommerce/components/StoreEditPage.js +155 -0
- package/dist/modules/ecommerce/components/StoreEditPage.js.map +7 -0
- package/dist/modules/ecommerce/components/StoreGeneralTab.js +167 -0
- package/dist/modules/ecommerce/components/StoreGeneralTab.js.map +7 -0
- package/dist/modules/ecommerce/components/StoreListPage.js +290 -0
- package/dist/modules/ecommerce/components/StoreListPage.js.map +7 -0
- package/dist/modules/ecommerce/components/StoreSeoTab.js +132 -0
- package/dist/modules/ecommerce/components/StoreSeoTab.js.map +7 -0
- package/dist/modules/ecommerce/components/StoreStatusBadge.js +20 -0
- package/dist/modules/ecommerce/components/StoreStatusBadge.js.map +7 -0
- package/dist/modules/ecommerce/components/channelLookups.js +28 -0
- package/dist/modules/ecommerce/components/channelLookups.js.map +7 -0
- package/dist/modules/ecommerce/components/storeAdmin.js +41 -0
- package/dist/modules/ecommerce/components/storeAdmin.js.map +7 -0
- package/dist/modules/ecommerce/components/storeBrandingForm.js +197 -0
- package/dist/modules/ecommerce/components/storeBrandingForm.js.map +7 -0
- package/dist/modules/ecommerce/components/storeChannels.js +140 -0
- package/dist/modules/ecommerce/components/storeChannels.js.map +7 -0
- package/dist/modules/ecommerce/components/storeDomains.js +167 -0
- package/dist/modules/ecommerce/components/storeDomains.js.map +7 -0
- package/dist/modules/ecommerce/components/storeEditTabs.js +62 -0
- package/dist/modules/ecommerce/components/storeEditTabs.js.map +7 -0
- package/dist/modules/ecommerce/components/storeGeneral.js +95 -0
- package/dist/modules/ecommerce/components/storeGeneral.js.map +7 -0
- package/dist/modules/ecommerce/components/storeSeo.js +69 -0
- package/dist/modules/ecommerce/components/storeSeo.js.map +7 -0
- package/dist/modules/ecommerce/components/useChannelAssortmentCount.js +45 -0
- package/dist/modules/ecommerce/components/useChannelAssortmentCount.js.map +7 -0
- package/dist/modules/ecommerce/components/useStoreAccess.js +28 -0
- package/dist/modules/ecommerce/components/useStoreAccess.js.map +7 -0
- package/dist/modules/ecommerce/data/enrichers.js +157 -0
- package/dist/modules/ecommerce/data/enrichers.js.map +7 -0
- package/dist/modules/ecommerce/data/entities.js +197 -0
- package/dist/modules/ecommerce/data/entities.js.map +7 -0
- package/dist/modules/ecommerce/data/validators.js +406 -0
- package/dist/modules/ecommerce/data/validators.js.map +7 -0
- package/dist/modules/ecommerce/di.js +11 -0
- package/dist/modules/ecommerce/di.js.map +7 -0
- package/dist/modules/ecommerce/events.js +27 -0
- package/dist/modules/ecommerce/events.js.map +7 -0
- package/dist/modules/ecommerce/index.js +16 -0
- package/dist/modules/ecommerce/index.js.map +7 -0
- package/dist/modules/ecommerce/lib/assortmentCount.js +112 -0
- package/dist/modules/ecommerce/lib/assortmentCount.js.map +7 -0
- package/dist/modules/ecommerce/lib/brandingStyles.js +184 -0
- package/dist/modules/ecommerce/lib/brandingStyles.js.map +7 -0
- package/dist/modules/ecommerce/lib/buyerContext.js +284 -0
- package/dist/modules/ecommerce/lib/buyerContext.js.map +7 -0
- package/dist/modules/ecommerce/lib/cacheInvalidation.js +186 -0
- package/dist/modules/ecommerce/lib/cacheInvalidation.js.map +7 -0
- package/dist/modules/ecommerce/lib/cacheKeys.js +236 -0
- package/dist/modules/ecommerce/lib/cacheKeys.js.map +7 -0
- package/dist/modules/ecommerce/lib/createConflictRecheck.js +29 -0
- package/dist/modules/ecommerce/lib/createConflictRecheck.js.map +7 -0
- package/dist/modules/ecommerce/lib/crudEvents.js +94 -0
- package/dist/modules/ecommerce/lib/crudEvents.js.map +7 -0
- package/dist/modules/ecommerce/lib/crudSupport.js +64 -0
- package/dist/modules/ecommerce/lib/crudSupport.js.map +7 -0
- package/dist/modules/ecommerce/lib/domainBindingRebind.js +99 -0
- package/dist/modules/ecommerce/lib/domainBindingRebind.js.map +7 -0
- package/dist/modules/ecommerce/lib/domainMappingSummaries.js +39 -0
- package/dist/modules/ecommerce/lib/domainMappingSummaries.js.map +7 -0
- package/dist/modules/ecommerce/lib/exclusiveFlag.js +57 -0
- package/dist/modules/ecommerce/lib/exclusiveFlag.js.map +7 -0
- package/dist/modules/ecommerce/lib/references.js +70 -0
- package/dist/modules/ecommerce/lib/references.js.map +7 -0
- package/dist/modules/ecommerce/lib/seedDraftStore.js +99 -0
- package/dist/modules/ecommerce/lib/seedDraftStore.js.map +7 -0
- package/dist/modules/ecommerce/lib/storeBindingCascade.js +109 -0
- package/dist/modules/ecommerce/lib/storeBindingCascade.js.map +7 -0
- package/dist/modules/ecommerce/lib/storeBranding.js +40 -0
- package/dist/modules/ecommerce/lib/storeBranding.js.map +7 -0
- package/dist/modules/ecommerce/lib/storeBrandingRoute.js +76 -0
- package/dist/modules/ecommerce/lib/storeBrandingRoute.js.map +7 -0
- package/dist/modules/ecommerce/lib/storeContext.js +393 -0
- package/dist/modules/ecommerce/lib/storeContext.js.map +7 -0
- package/dist/modules/ecommerce/lib/storeContextService.js +43 -0
- package/dist/modules/ecommerce/lib/storeContextService.js.map +7 -0
- package/dist/modules/ecommerce/lib/storeLocale.js +60 -0
- package/dist/modules/ecommerce/lib/storeLocale.js.map +7 -0
- package/dist/modules/ecommerce/lib/storeNotifications.js +41 -0
- package/dist/modules/ecommerce/lib/storeNotifications.js.map +7 -0
- package/dist/modules/ecommerce/lib/storefrontCatalogSupport.js +248 -0
- package/dist/modules/ecommerce/lib/storefrontCatalogSupport.js.map +7 -0
- package/dist/modules/ecommerce/lib/storefrontCategories.js +241 -0
- package/dist/modules/ecommerce/lib/storefrontCategories.js.map +7 -0
- package/dist/modules/ecommerce/lib/storefrontCategoryCache.js +71 -0
- package/dist/modules/ecommerce/lib/storefrontCategoryCache.js.map +7 -0
- package/dist/modules/ecommerce/lib/storefrontDetail.js +447 -0
- package/dist/modules/ecommerce/lib/storefrontDetail.js.map +7 -0
- package/dist/modules/ecommerce/lib/storefrontFacets.js +441 -0
- package/dist/modules/ecommerce/lib/storefrontFacets.js.map +7 -0
- package/dist/modules/ecommerce/lib/storefrontOptionFilter.js +15 -0
- package/dist/modules/ecommerce/lib/storefrontOptionFilter.js.map +7 -0
- package/dist/modules/ecommerce/lib/storefrontPricing.js +393 -0
- package/dist/modules/ecommerce/lib/storefrontPricing.js.map +7 -0
- package/dist/modules/ecommerce/lib/storefrontProductCache.js +90 -0
- package/dist/modules/ecommerce/lib/storefrontProductCache.js.map +7 -0
- package/dist/modules/ecommerce/lib/storefrontProductScope.js +107 -0
- package/dist/modules/ecommerce/lib/storefrontProductScope.js.map +7 -0
- package/dist/modules/ecommerce/lib/storefrontProducts.js +670 -0
- package/dist/modules/ecommerce/lib/storefrontProducts.js.map +7 -0
- package/dist/modules/ecommerce/lib/storefrontQuery.js +156 -0
- package/dist/modules/ecommerce/lib/storefrontQuery.js.map +7 -0
- package/dist/modules/ecommerce/lib/storefrontRateLimit.js +99 -0
- package/dist/modules/ecommerce/lib/storefrontRateLimit.js.map +7 -0
- package/dist/modules/ecommerce/lib/storefrontSearch.js +303 -0
- package/dist/modules/ecommerce/lib/storefrontSearch.js.map +7 -0
- package/dist/modules/ecommerce/lib/storefrontSearchCache.js +35 -0
- package/dist/modules/ecommerce/lib/storefrontSearchCache.js.map +7 -0
- package/dist/modules/ecommerce/lib/subscriberSupport.js +33 -0
- package/dist/modules/ecommerce/lib/subscriberSupport.js.map +7 -0
- package/dist/modules/ecommerce/lib/types.js +1 -0
- package/dist/modules/ecommerce/lib/types.js.map +7 -0
- package/dist/modules/ecommerce/migrations/Migration20261005113233_ecommerce.js +32 -0
- package/dist/modules/ecommerce/migrations/Migration20261005113233_ecommerce.js.map +7 -0
- package/dist/modules/ecommerce/migrations/Migration20261006112733_ecommerce.js +17 -0
- package/dist/modules/ecommerce/migrations/Migration20261006112733_ecommerce.js.map +7 -0
- package/dist/modules/ecommerce/notifications.client.js +47 -0
- package/dist/modules/ecommerce/notifications.client.js.map +7 -0
- package/dist/modules/ecommerce/notifications.js +48 -0
- package/dist/modules/ecommerce/notifications.js.map +7 -0
- package/dist/modules/ecommerce/search.js +83 -0
- package/dist/modules/ecommerce/search.js.map +7 -0
- package/dist/modules/ecommerce/setup.js +17 -0
- package/dist/modules/ecommerce/setup.js.map +7 -0
- package/dist/modules/ecommerce/subscribers/assortment-empty-notifications.js +14 -0
- package/dist/modules/ecommerce/subscribers/assortment-empty-notifications.js.map +7 -0
- package/dist/modules/ecommerce/subscribers/availability-policy-cache-invalidation.js +14 -0
- package/dist/modules/ecommerce/subscribers/availability-policy-cache-invalidation.js.map +7 -0
- package/dist/modules/ecommerce/subscribers/catalog-category-cache-invalidation.js +14 -0
- package/dist/modules/ecommerce/subscribers/catalog-category-cache-invalidation.js.map +7 -0
- package/dist/modules/ecommerce/subscribers/catalog-price-cache-invalidation.js +14 -0
- package/dist/modules/ecommerce/subscribers/catalog-price-cache-invalidation.js.map +7 -0
- package/dist/modules/ecommerce/subscribers/catalog-product-cache-invalidation.js +14 -0
- package/dist/modules/ecommerce/subscribers/catalog-product-cache-invalidation.js.map +7 -0
- package/dist/modules/ecommerce/subscribers/catalog-variant-cache-invalidation.js +14 -0
- package/dist/modules/ecommerce/subscribers/catalog-variant-cache-invalidation.js.map +7 -0
- package/dist/modules/ecommerce/subscribers/customer-group-cache-invalidation.js +14 -0
- package/dist/modules/ecommerce/subscribers/customer-group-cache-invalidation.js.map +7 -0
- package/dist/modules/ecommerce/subscribers/customer-group-membership-cache-invalidation.js +14 -0
- package/dist/modules/ecommerce/subscribers/customer-group-membership-cache-invalidation.js.map +7 -0
- package/dist/modules/ecommerce/subscribers/customer-group-terms-cache-invalidation.js +14 -0
- package/dist/modules/ecommerce/subscribers/customer-group-terms-cache-invalidation.js.map +7 -0
- package/dist/modules/ecommerce/subscribers/customer-user-deleted-cache-invalidation.js +14 -0
- package/dist/modules/ecommerce/subscribers/customer-user-deleted-cache-invalidation.js.map +7 -0
- package/dist/modules/ecommerce/subscribers/customer-user-updated-cache-invalidation.js +14 -0
- package/dist/modules/ecommerce/subscribers/customer-user-updated-cache-invalidation.js.map +7 -0
- package/dist/modules/ecommerce/subscribers/domain-binding-rebind.js +16 -0
- package/dist/modules/ecommerce/subscribers/domain-binding-rebind.js.map +7 -0
- package/dist/modules/ecommerce/subscribers/domain-mapping-cache-invalidation.js +14 -0
- package/dist/modules/ecommerce/subscribers/domain-mapping-cache-invalidation.js.map +7 -0
- package/dist/modules/ecommerce/subscribers/store-cache-invalidation.js +14 -0
- package/dist/modules/ecommerce/subscribers/store-cache-invalidation.js.map +7 -0
- package/dist/modules/ecommerce/subscribers/store-channel-binding-cache-invalidation.js +14 -0
- package/dist/modules/ecommerce/subscribers/store-channel-binding-cache-invalidation.js.map +7 -0
- package/dist/modules/ecommerce/subscribers/store-domain-binding-cache-invalidation.js +14 -0
- package/dist/modules/ecommerce/subscribers/store-domain-binding-cache-invalidation.js.map +7 -0
- package/dist/modules/ecommerce/subscribers/store-notifications.js +14 -0
- package/dist/modules/ecommerce/subscribers/store-notifications.js.map +7 -0
- package/dist/modules/query_index/lib/batch.js +23 -9
- package/dist/modules/query_index/lib/batch.js.map +2 -2
- package/dist/modules/query_index/lib/doc-enrichers.js +212 -0
- package/dist/modules/query_index/lib/doc-enrichers.js.map +7 -0
- package/dist/modules/query_index/lib/document.js +2 -0
- package/dist/modules/query_index/lib/document.js.map +2 -2
- package/dist/modules/query_index/lib/engine.js +68 -1
- package/dist/modules/query_index/lib/engine.js.map +2 -2
- package/dist/modules/query_index/lib/indexer.js +7 -0
- package/dist/modules/query_index/lib/indexer.js.map +2 -2
- package/dist/modules/query_index/lib/search-tokens.js +2 -0
- package/dist/modules/query_index/lib/search-tokens.js.map +2 -2
- package/dist/modules/query_index/migrations/Migration20261005201500_query_index.js +17 -0
- package/dist/modules/query_index/migrations/Migration20261005201500_query_index.js.map +7 -0
- package/dist/modules/translations/components/TranslationManager.js +3 -3
- package/dist/modules/translations/components/TranslationManager.js.map +2 -2
- package/dist/modules/translations/data/validators.js +1 -1
- package/dist/modules/translations/data/validators.js.map +1 -1
- package/dist/modules/translations/lib/batch.js +21 -1
- package/dist/modules/translations/lib/batch.js.map +2 -2
- package/dist/modules/translations/lib/helpers.js +3 -0
- package/dist/modules/translations/lib/helpers.js.map +2 -2
- package/dist/modules/translations/lib/resolve-field-list.js +14 -2
- package/dist/modules/translations/lib/resolve-field-list.js.map +2 -2
- package/generated/entities/catalog_price_history_entry/index.ts +25 -0
- package/generated/entities/customer_group_terms/index.ts +1 -0
- package/generated/entities/ecommerce_store/index.ts +15 -0
- package/generated/entities/ecommerce_store_channel_binding/index.ts +13 -0
- package/generated/entities/ecommerce_store_domain_binding/index.ts +10 -0
- package/generated/entities.ids.generated.ts +8 -1
- package/generated/entity-fields-registry.ts +72 -0
- package/package.json +7 -7
- package/src/helpers/integration/customerGroupsFixtures.ts +2 -0
- package/src/modules/auth/i18n/de.json +8 -0
- package/src/modules/auth/i18n/en.json +8 -0
- package/src/modules/auth/i18n/es.json +8 -0
- package/src/modules/auth/i18n/ko.json +8 -0
- package/src/modules/auth/i18n/pl.json +8 -0
- package/src/modules/catalog/AGENTS.md +5 -2
- package/src/modules/catalog/acl.ts +7 -0
- package/src/modules/catalog/api/config/omnibus/route.ts +204 -0
- package/src/modules/catalog/api/prices/history/route.ts +139 -0
- package/src/modules/catalog/api/prices/omnibus-preview/route.ts +202 -0
- package/src/modules/catalog/api/products/route.ts +53 -308
- package/src/modules/catalog/api/tags/route.ts +6 -0
- package/src/modules/catalog/backend/config/catalog/page.tsx +2 -0
- package/src/modules/catalog/cli.ts +84 -1
- package/src/modules/catalog/commands/categories.ts +54 -2
- package/src/modules/catalog/commands/prices.ts +43 -1
- package/src/modules/catalog/commands/products.ts +84 -1
- package/src/modules/catalog/commands/variants.ts +7 -0
- package/src/modules/catalog/components/OmnibusSettings.tsx +832 -0
- package/src/modules/catalog/components/PriceEditorOmnibusRow.tsx +219 -0
- package/src/modules/catalog/components/lookupSources.ts +29 -0
- package/src/modules/catalog/components/prices/PriceScopeSelectors.tsx +9 -0
- package/src/modules/catalog/components/products/VariantBuilder.tsx +9 -0
- package/src/modules/catalog/data/entities.ts +123 -1
- package/src/modules/catalog/data/validators.ts +118 -0
- package/src/modules/catalog/di.ts +23 -0
- package/src/modules/catalog/i18n/de.json +77 -0
- package/src/modules/catalog/i18n/en.json +77 -0
- package/src/modules/catalog/i18n/es.json +77 -0
- package/src/modules/catalog/i18n/ko.json +77 -0
- package/src/modules/catalog/i18n/pl.json +77 -0
- package/src/modules/catalog/lib/omnibus.ts +406 -0
- package/src/modules/catalog/lib/omnibusBackfill.ts +198 -0
- package/src/modules/catalog/lib/omnibusCache.ts +111 -0
- package/src/modules/catalog/lib/omnibusConfig.ts +73 -0
- package/src/modules/catalog/lib/omnibusHistoryQueries.ts +248 -0
- package/src/modules/catalog/lib/omnibusPresentedEntry.ts +76 -0
- package/src/modules/catalog/lib/omnibusProductListEnrichment.ts +125 -0
- package/src/modules/catalog/lib/omnibusTypes.ts +202 -0
- package/src/modules/catalog/lib/optionSchemaTranslations.ts +55 -0
- package/src/modules/catalog/lib/priceHistoryQuery.ts +155 -0
- package/src/modules/catalog/lib/pricing.ts +42 -4
- package/src/modules/catalog/lib/productFilters.ts +349 -0
- package/src/modules/catalog/lib/productScopeKeys.ts +162 -0
- package/src/modules/catalog/lib/productScopeReindex.ts +139 -0
- package/src/modules/catalog/migrations/.snapshot-open-mercato.json +572 -0
- package/src/modules/catalog/migrations/Migration20261005105352_catalog.ts +39 -0
- package/src/modules/catalog/migrations/Migration20261005150824_catalog.ts +39 -0
- package/src/modules/catalog/services/catalogOmnibusService.ts +642 -0
- package/src/modules/catalog/setup.ts +2 -0
- package/src/modules/catalog/subscribers/product-scope-keys-category-deleted.ts +18 -0
- package/src/modules/catalog/subscribers/product-scope-keys-category-updated.ts +19 -0
- package/src/modules/catalog/translations.ts +12 -0
- package/src/modules/configs/i18n/de.json +5 -1
- package/src/modules/configs/i18n/en.json +5 -1
- package/src/modules/configs/i18n/es.json +5 -1
- package/src/modules/configs/i18n/ko.json +5 -1
- package/src/modules/configs/i18n/pl.json +5 -1
- package/src/modules/configs/lib/upgrade-actions.ts +35 -0
- package/src/modules/customer_groups/api/customer-groups/[id]/terms/route.ts +7 -0
- package/src/modules/customer_groups/components/CustomerGroupTermsSection.tsx +124 -2
- package/src/modules/customer_groups/components/customerGroupAssortmentScope.ts +46 -0
- package/src/modules/customer_groups/data/entities.ts +4 -0
- package/src/modules/customer_groups/data/validators.ts +14 -0
- package/src/modules/customer_groups/i18n/de.json +12 -0
- package/src/modules/customer_groups/i18n/en.json +12 -0
- package/src/modules/customer_groups/i18n/es.json +12 -0
- package/src/modules/customer_groups/i18n/ko.json +12 -0
- package/src/modules/customer_groups/i18n/pl.json +12 -0
- package/src/modules/customer_groups/migrations/.snapshot-open-mercato.json +17 -0
- package/src/modules/customer_groups/migrations/Migration20261005110250_customer_groups.ts +15 -0
- package/src/modules/customer_groups/services/customerGroupsService.ts +74 -23
- package/src/modules/ecommerce/acl.ts +9 -0
- package/src/modules/ecommerce/api/domain-mappings/route.ts +76 -0
- package/src/modules/ecommerce/api/openapi.ts +28 -0
- package/src/modules/ecommerce/api/store-channel-bindings/[id]/assortment-count/route.ts +141 -0
- package/src/modules/ecommerce/api/store-channel-bindings/crud.ts +283 -0
- package/src/modules/ecommerce/api/store-channel-bindings/route.ts +67 -0
- package/src/modules/ecommerce/api/store-domain-bindings/crud.ts +324 -0
- package/src/modules/ecommerce/api/store-domain-bindings/route.ts +73 -0
- package/src/modules/ecommerce/api/storefront/categories/[slug]/route.ts +94 -0
- package/src/modules/ecommerce/api/storefront/categories/openapiSchemas.ts +63 -0
- package/src/modules/ecommerce/api/storefront/categories/route.ts +78 -0
- package/src/modules/ecommerce/api/storefront/context/route.ts +203 -0
- package/src/modules/ecommerce/api/storefront/products/[idOrHandle]/route.ts +94 -0
- package/src/modules/ecommerce/api/storefront/products/openapiSchemas.ts +193 -0
- package/src/modules/ecommerce/api/storefront/products/route.ts +81 -0
- package/src/modules/ecommerce/api/storefront/search/suggest/openapiSchemas.ts +25 -0
- package/src/modules/ecommerce/api/storefront/search/suggest/route.ts +78 -0
- package/src/modules/ecommerce/api/storefront/storefrontRouteSupport.ts +68 -0
- package/src/modules/ecommerce/api/stores/[id]/branding/route.ts +205 -0
- package/src/modules/ecommerce/api/stores/[id]/preview-branding/route.ts +99 -0
- package/src/modules/ecommerce/api/stores/crud.ts +457 -0
- package/src/modules/ecommerce/api/stores/route.ts +66 -0
- package/src/modules/ecommerce/backend/config/ecommerce/[id]/page.meta.ts +12 -0
- package/src/modules/ecommerce/backend/config/ecommerce/[id]/page.tsx +5 -0
- package/src/modules/ecommerce/backend/config/ecommerce/page.meta.ts +12 -0
- package/src/modules/ecommerce/backend/config/ecommerce/page.tsx +5 -0
- package/src/modules/ecommerce/commands/stores.ts +154 -0
- package/src/modules/ecommerce/components/ChannelAssortmentCount.tsx +138 -0
- package/src/modules/ecommerce/components/ChannelBindingFormSections.tsx +40 -0
- package/src/modules/ecommerce/components/ChannelLookupPicker.tsx +5 -0
- package/src/modules/ecommerce/components/DomainStatusWarning.tsx +32 -0
- package/src/modules/ecommerce/components/StoreAvailabilityDefaultsSection.tsx +219 -0
- package/src/modules/ecommerce/components/StoreBrandingControls.tsx +73 -0
- package/src/modules/ecommerce/components/StoreBrandingPreview.tsx +77 -0
- package/src/modules/ecommerce/components/StoreBrandingTab.tsx +242 -0
- package/src/modules/ecommerce/components/StoreChannelBindingDialog.tsx +306 -0
- package/src/modules/ecommerce/components/StoreChannelsTab.tsx +375 -0
- package/src/modules/ecommerce/components/StoreCreateDialog.tsx +204 -0
- package/src/modules/ecommerce/components/StoreDomainBindingDialog.tsx +198 -0
- package/src/modules/ecommerce/components/StoreDomainsTab.tsx +426 -0
- package/src/modules/ecommerce/components/StoreEditPage.tsx +193 -0
- package/src/modules/ecommerce/components/StoreGeneralTab.tsx +189 -0
- package/src/modules/ecommerce/components/StoreListPage.tsx +326 -0
- package/src/modules/ecommerce/components/StoreSeoTab.tsx +152 -0
- package/src/modules/ecommerce/components/StoreStatusBadge.tsx +22 -0
- package/src/modules/ecommerce/components/channelLookups.ts +24 -0
- package/src/modules/ecommerce/components/storeAdmin.ts +56 -0
- package/src/modules/ecommerce/components/storeBrandingForm.ts +230 -0
- package/src/modules/ecommerce/components/storeChannels.ts +210 -0
- package/src/modules/ecommerce/components/storeDomains.ts +221 -0
- package/src/modules/ecommerce/components/storeEditTabs.tsx +76 -0
- package/src/modules/ecommerce/components/storeGeneral.ts +155 -0
- package/src/modules/ecommerce/components/storeSeo.ts +78 -0
- package/src/modules/ecommerce/components/useChannelAssortmentCount.ts +67 -0
- package/src/modules/ecommerce/components/useStoreAccess.ts +36 -0
- package/src/modules/ecommerce/data/enrichers.ts +213 -0
- package/src/modules/ecommerce/data/entities.ts +168 -0
- package/src/modules/ecommerce/data/validators.ts +587 -0
- package/src/modules/ecommerce/di.ts +9 -0
- package/src/modules/ecommerce/events.ts +27 -0
- package/src/modules/ecommerce/i18n/de.json +341 -0
- package/src/modules/ecommerce/i18n/en.json +341 -0
- package/src/modules/ecommerce/i18n/es.json +341 -0
- package/src/modules/ecommerce/i18n/ko.json +341 -0
- package/src/modules/ecommerce/i18n/pl.json +341 -0
- package/src/modules/ecommerce/index.ts +14 -0
- package/src/modules/ecommerce/lib/assortmentCount.ts +175 -0
- package/src/modules/ecommerce/lib/brandingStyles.ts +215 -0
- package/src/modules/ecommerce/lib/buyerContext.ts +401 -0
- package/src/modules/ecommerce/lib/cacheInvalidation.ts +302 -0
- package/src/modules/ecommerce/lib/cacheKeys.ts +340 -0
- package/src/modules/ecommerce/lib/createConflictRecheck.ts +31 -0
- package/src/modules/ecommerce/lib/crudEvents.ts +128 -0
- package/src/modules/ecommerce/lib/crudSupport.ts +85 -0
- package/src/modules/ecommerce/lib/domainBindingRebind.ts +138 -0
- package/src/modules/ecommerce/lib/domainMappingSummaries.ts +71 -0
- package/src/modules/ecommerce/lib/exclusiveFlag.ts +90 -0
- package/src/modules/ecommerce/lib/references.ts +93 -0
- package/src/modules/ecommerce/lib/seedDraftStore.ts +125 -0
- package/src/modules/ecommerce/lib/storeBindingCascade.ts +138 -0
- package/src/modules/ecommerce/lib/storeBranding.ts +48 -0
- package/src/modules/ecommerce/lib/storeBrandingRoute.ts +91 -0
- package/src/modules/ecommerce/lib/storeContext.ts +669 -0
- package/src/modules/ecommerce/lib/storeContextService.ts +71 -0
- package/src/modules/ecommerce/lib/storeLocale.ts +88 -0
- package/src/modules/ecommerce/lib/storeNotifications.ts +55 -0
- package/src/modules/ecommerce/lib/storefrontCatalogSupport.ts +427 -0
- package/src/modules/ecommerce/lib/storefrontCategories.ts +419 -0
- package/src/modules/ecommerce/lib/storefrontCategoryCache.ts +113 -0
- package/src/modules/ecommerce/lib/storefrontDetail.ts +654 -0
- package/src/modules/ecommerce/lib/storefrontFacets.ts +697 -0
- package/src/modules/ecommerce/lib/storefrontOptionFilter.ts +44 -0
- package/src/modules/ecommerce/lib/storefrontPricing.ts +583 -0
- package/src/modules/ecommerce/lib/storefrontProductCache.ts +126 -0
- package/src/modules/ecommerce/lib/storefrontProductScope.ts +181 -0
- package/src/modules/ecommerce/lib/storefrontProducts.ts +963 -0
- package/src/modules/ecommerce/lib/storefrontQuery.ts +215 -0
- package/src/modules/ecommerce/lib/storefrontRateLimit.ts +126 -0
- package/src/modules/ecommerce/lib/storefrontSearch.ts +454 -0
- package/src/modules/ecommerce/lib/storefrontSearchCache.ts +49 -0
- package/src/modules/ecommerce/lib/subscriberSupport.ts +41 -0
- package/src/modules/ecommerce/lib/types.ts +69 -0
- package/src/modules/ecommerce/migrations/.snapshot-open-mercato.json +829 -0
- package/src/modules/ecommerce/migrations/Migration20261005113233_ecommerce.ts +32 -0
- package/src/modules/ecommerce/migrations/Migration20261006112733_ecommerce.ts +15 -0
- package/src/modules/ecommerce/notifications.client.ts +46 -0
- package/src/modules/ecommerce/notifications.ts +46 -0
- package/src/modules/ecommerce/search.ts +93 -0
- package/src/modules/ecommerce/setup.ts +15 -0
- package/src/modules/ecommerce/subscribers/assortment-empty-notifications.ts +12 -0
- package/src/modules/ecommerce/subscribers/availability-policy-cache-invalidation.ts +12 -0
- package/src/modules/ecommerce/subscribers/catalog-category-cache-invalidation.ts +12 -0
- package/src/modules/ecommerce/subscribers/catalog-price-cache-invalidation.ts +12 -0
- package/src/modules/ecommerce/subscribers/catalog-product-cache-invalidation.ts +12 -0
- package/src/modules/ecommerce/subscribers/catalog-variant-cache-invalidation.ts +12 -0
- package/src/modules/ecommerce/subscribers/customer-group-cache-invalidation.ts +12 -0
- package/src/modules/ecommerce/subscribers/customer-group-membership-cache-invalidation.ts +12 -0
- package/src/modules/ecommerce/subscribers/customer-group-terms-cache-invalidation.ts +12 -0
- package/src/modules/ecommerce/subscribers/customer-user-deleted-cache-invalidation.ts +12 -0
- package/src/modules/ecommerce/subscribers/customer-user-updated-cache-invalidation.ts +12 -0
- package/src/modules/ecommerce/subscribers/domain-binding-rebind.ts +14 -0
- package/src/modules/ecommerce/subscribers/domain-mapping-cache-invalidation.ts +12 -0
- package/src/modules/ecommerce/subscribers/store-cache-invalidation.ts +12 -0
- package/src/modules/ecommerce/subscribers/store-channel-binding-cache-invalidation.ts +12 -0
- package/src/modules/ecommerce/subscribers/store-domain-binding-cache-invalidation.ts +12 -0
- package/src/modules/ecommerce/subscribers/store-notifications.ts +12 -0
- package/src/modules/query_index/lib/batch.ts +25 -9
- package/src/modules/query_index/lib/doc-enrichers.ts +306 -0
- package/src/modules/query_index/lib/document.ts +2 -0
- package/src/modules/query_index/lib/engine.ts +58 -1
- package/src/modules/query_index/lib/indexer.ts +8 -0
- package/src/modules/query_index/lib/search-tokens.ts +2 -0
- package/src/modules/query_index/migrations/Migration20261005201500_query_index.ts +42 -0
- package/src/modules/translations/components/TranslationManager.tsx +3 -3
- package/src/modules/translations/data/validators.ts +1 -1
- package/src/modules/translations/lib/batch.ts +47 -0
- package/src/modules/translations/lib/helpers.ts +4 -0
- package/src/modules/translations/lib/resolve-field-list.ts +16 -2
|
@@ -4,6 +4,546 @@
|
|
|
4
4
|
"public"
|
|
5
5
|
],
|
|
6
6
|
"tables": [
|
|
7
|
+
{
|
|
8
|
+
"name": "catalog_price_history_entries",
|
|
9
|
+
"schema": "public",
|
|
10
|
+
"columns": {
|
|
11
|
+
"change_type": {
|
|
12
|
+
"name": "change_type",
|
|
13
|
+
"type": "text",
|
|
14
|
+
"unsigned": false,
|
|
15
|
+
"autoincrement": false,
|
|
16
|
+
"primary": false,
|
|
17
|
+
"nullable": false,
|
|
18
|
+
"unique": false,
|
|
19
|
+
"length": null,
|
|
20
|
+
"precision": null,
|
|
21
|
+
"scale": null,
|
|
22
|
+
"default": null,
|
|
23
|
+
"comment": null,
|
|
24
|
+
"enumItems": [
|
|
25
|
+
"create",
|
|
26
|
+
"update",
|
|
27
|
+
"delete",
|
|
28
|
+
"undo"
|
|
29
|
+
],
|
|
30
|
+
"mappedType": "enum"
|
|
31
|
+
},
|
|
32
|
+
"channel_id": {
|
|
33
|
+
"name": "channel_id",
|
|
34
|
+
"type": "uuid",
|
|
35
|
+
"unsigned": false,
|
|
36
|
+
"autoincrement": false,
|
|
37
|
+
"primary": false,
|
|
38
|
+
"nullable": true,
|
|
39
|
+
"unique": false,
|
|
40
|
+
"length": null,
|
|
41
|
+
"precision": null,
|
|
42
|
+
"scale": null,
|
|
43
|
+
"default": null,
|
|
44
|
+
"comment": null,
|
|
45
|
+
"enumItems": [],
|
|
46
|
+
"mappedType": "uuid"
|
|
47
|
+
},
|
|
48
|
+
"currency_code": {
|
|
49
|
+
"name": "currency_code",
|
|
50
|
+
"type": "varchar(3)",
|
|
51
|
+
"unsigned": false,
|
|
52
|
+
"autoincrement": false,
|
|
53
|
+
"primary": false,
|
|
54
|
+
"nullable": false,
|
|
55
|
+
"unique": false,
|
|
56
|
+
"length": 3,
|
|
57
|
+
"precision": null,
|
|
58
|
+
"scale": null,
|
|
59
|
+
"default": null,
|
|
60
|
+
"comment": null,
|
|
61
|
+
"enumItems": [],
|
|
62
|
+
"mappedType": "string"
|
|
63
|
+
},
|
|
64
|
+
"ends_at": {
|
|
65
|
+
"name": "ends_at",
|
|
66
|
+
"type": "timestamptz(6)",
|
|
67
|
+
"unsigned": false,
|
|
68
|
+
"autoincrement": false,
|
|
69
|
+
"primary": false,
|
|
70
|
+
"nullable": true,
|
|
71
|
+
"unique": false,
|
|
72
|
+
"length": 6,
|
|
73
|
+
"precision": null,
|
|
74
|
+
"scale": null,
|
|
75
|
+
"default": null,
|
|
76
|
+
"comment": null,
|
|
77
|
+
"enumItems": [],
|
|
78
|
+
"mappedType": "datetime"
|
|
79
|
+
},
|
|
80
|
+
"id": {
|
|
81
|
+
"name": "id",
|
|
82
|
+
"type": "uuid",
|
|
83
|
+
"unsigned": false,
|
|
84
|
+
"autoincrement": false,
|
|
85
|
+
"primary": true,
|
|
86
|
+
"nullable": false,
|
|
87
|
+
"unique": false,
|
|
88
|
+
"length": null,
|
|
89
|
+
"precision": null,
|
|
90
|
+
"scale": null,
|
|
91
|
+
"default": "gen_random_uuid()",
|
|
92
|
+
"comment": null,
|
|
93
|
+
"enumItems": [],
|
|
94
|
+
"mappedType": "uuid"
|
|
95
|
+
},
|
|
96
|
+
"idempotency_key": {
|
|
97
|
+
"name": "idempotency_key",
|
|
98
|
+
"type": "text",
|
|
99
|
+
"unsigned": false,
|
|
100
|
+
"autoincrement": false,
|
|
101
|
+
"primary": false,
|
|
102
|
+
"nullable": true,
|
|
103
|
+
"unique": false,
|
|
104
|
+
"length": null,
|
|
105
|
+
"precision": null,
|
|
106
|
+
"scale": null,
|
|
107
|
+
"default": null,
|
|
108
|
+
"comment": null,
|
|
109
|
+
"enumItems": [],
|
|
110
|
+
"mappedType": "text"
|
|
111
|
+
},
|
|
112
|
+
"is_announced": {
|
|
113
|
+
"name": "is_announced",
|
|
114
|
+
"type": "boolean",
|
|
115
|
+
"unsigned": false,
|
|
116
|
+
"autoincrement": false,
|
|
117
|
+
"primary": false,
|
|
118
|
+
"nullable": true,
|
|
119
|
+
"unique": false,
|
|
120
|
+
"length": null,
|
|
121
|
+
"precision": null,
|
|
122
|
+
"scale": null,
|
|
123
|
+
"default": null,
|
|
124
|
+
"comment": null,
|
|
125
|
+
"enumItems": [],
|
|
126
|
+
"mappedType": "boolean"
|
|
127
|
+
},
|
|
128
|
+
"max_quantity": {
|
|
129
|
+
"name": "max_quantity",
|
|
130
|
+
"type": "int",
|
|
131
|
+
"unsigned": false,
|
|
132
|
+
"autoincrement": false,
|
|
133
|
+
"primary": false,
|
|
134
|
+
"nullable": true,
|
|
135
|
+
"unique": false,
|
|
136
|
+
"length": null,
|
|
137
|
+
"precision": null,
|
|
138
|
+
"scale": null,
|
|
139
|
+
"default": null,
|
|
140
|
+
"comment": null,
|
|
141
|
+
"enumItems": [],
|
|
142
|
+
"mappedType": "integer"
|
|
143
|
+
},
|
|
144
|
+
"metadata": {
|
|
145
|
+
"name": "metadata",
|
|
146
|
+
"type": "jsonb",
|
|
147
|
+
"unsigned": false,
|
|
148
|
+
"autoincrement": false,
|
|
149
|
+
"primary": false,
|
|
150
|
+
"nullable": true,
|
|
151
|
+
"unique": false,
|
|
152
|
+
"length": null,
|
|
153
|
+
"precision": null,
|
|
154
|
+
"scale": null,
|
|
155
|
+
"default": null,
|
|
156
|
+
"comment": null,
|
|
157
|
+
"enumItems": [],
|
|
158
|
+
"mappedType": "json"
|
|
159
|
+
},
|
|
160
|
+
"min_quantity": {
|
|
161
|
+
"name": "min_quantity",
|
|
162
|
+
"type": "int",
|
|
163
|
+
"unsigned": false,
|
|
164
|
+
"autoincrement": false,
|
|
165
|
+
"primary": false,
|
|
166
|
+
"nullable": true,
|
|
167
|
+
"unique": false,
|
|
168
|
+
"length": null,
|
|
169
|
+
"precision": null,
|
|
170
|
+
"scale": null,
|
|
171
|
+
"default": null,
|
|
172
|
+
"comment": null,
|
|
173
|
+
"enumItems": [],
|
|
174
|
+
"mappedType": "integer"
|
|
175
|
+
},
|
|
176
|
+
"offer_id": {
|
|
177
|
+
"name": "offer_id",
|
|
178
|
+
"type": "uuid",
|
|
179
|
+
"unsigned": false,
|
|
180
|
+
"autoincrement": false,
|
|
181
|
+
"primary": false,
|
|
182
|
+
"nullable": true,
|
|
183
|
+
"unique": false,
|
|
184
|
+
"length": null,
|
|
185
|
+
"precision": null,
|
|
186
|
+
"scale": null,
|
|
187
|
+
"default": null,
|
|
188
|
+
"comment": null,
|
|
189
|
+
"enumItems": [],
|
|
190
|
+
"mappedType": "uuid"
|
|
191
|
+
},
|
|
192
|
+
"organization_id": {
|
|
193
|
+
"name": "organization_id",
|
|
194
|
+
"type": "uuid",
|
|
195
|
+
"unsigned": false,
|
|
196
|
+
"autoincrement": false,
|
|
197
|
+
"primary": false,
|
|
198
|
+
"nullable": false,
|
|
199
|
+
"unique": false,
|
|
200
|
+
"length": null,
|
|
201
|
+
"precision": null,
|
|
202
|
+
"scale": null,
|
|
203
|
+
"default": null,
|
|
204
|
+
"comment": null,
|
|
205
|
+
"enumItems": [],
|
|
206
|
+
"mappedType": "uuid"
|
|
207
|
+
},
|
|
208
|
+
"price_id": {
|
|
209
|
+
"name": "price_id",
|
|
210
|
+
"type": "uuid",
|
|
211
|
+
"unsigned": false,
|
|
212
|
+
"autoincrement": false,
|
|
213
|
+
"primary": false,
|
|
214
|
+
"nullable": false,
|
|
215
|
+
"unique": false,
|
|
216
|
+
"length": null,
|
|
217
|
+
"precision": null,
|
|
218
|
+
"scale": null,
|
|
219
|
+
"default": null,
|
|
220
|
+
"comment": null,
|
|
221
|
+
"enumItems": [],
|
|
222
|
+
"mappedType": "uuid"
|
|
223
|
+
},
|
|
224
|
+
"price_kind_code": {
|
|
225
|
+
"name": "price_kind_code",
|
|
226
|
+
"type": "text",
|
|
227
|
+
"unsigned": false,
|
|
228
|
+
"autoincrement": false,
|
|
229
|
+
"primary": false,
|
|
230
|
+
"nullable": false,
|
|
231
|
+
"unique": false,
|
|
232
|
+
"length": null,
|
|
233
|
+
"precision": null,
|
|
234
|
+
"scale": null,
|
|
235
|
+
"default": null,
|
|
236
|
+
"comment": null,
|
|
237
|
+
"enumItems": [],
|
|
238
|
+
"mappedType": "text"
|
|
239
|
+
},
|
|
240
|
+
"price_kind_id": {
|
|
241
|
+
"name": "price_kind_id",
|
|
242
|
+
"type": "uuid",
|
|
243
|
+
"unsigned": false,
|
|
244
|
+
"autoincrement": false,
|
|
245
|
+
"primary": false,
|
|
246
|
+
"nullable": false,
|
|
247
|
+
"unique": false,
|
|
248
|
+
"length": null,
|
|
249
|
+
"precision": null,
|
|
250
|
+
"scale": null,
|
|
251
|
+
"default": null,
|
|
252
|
+
"comment": null,
|
|
253
|
+
"enumItems": [],
|
|
254
|
+
"mappedType": "uuid"
|
|
255
|
+
},
|
|
256
|
+
"product_id": {
|
|
257
|
+
"name": "product_id",
|
|
258
|
+
"type": "uuid",
|
|
259
|
+
"unsigned": false,
|
|
260
|
+
"autoincrement": false,
|
|
261
|
+
"primary": false,
|
|
262
|
+
"nullable": false,
|
|
263
|
+
"unique": false,
|
|
264
|
+
"length": null,
|
|
265
|
+
"precision": null,
|
|
266
|
+
"scale": null,
|
|
267
|
+
"default": null,
|
|
268
|
+
"comment": null,
|
|
269
|
+
"enumItems": [],
|
|
270
|
+
"mappedType": "uuid"
|
|
271
|
+
},
|
|
272
|
+
"recorded_at": {
|
|
273
|
+
"name": "recorded_at",
|
|
274
|
+
"type": "timestamptz(6)",
|
|
275
|
+
"unsigned": false,
|
|
276
|
+
"autoincrement": false,
|
|
277
|
+
"primary": false,
|
|
278
|
+
"nullable": false,
|
|
279
|
+
"unique": false,
|
|
280
|
+
"length": 6,
|
|
281
|
+
"precision": null,
|
|
282
|
+
"scale": null,
|
|
283
|
+
"default": null,
|
|
284
|
+
"comment": null,
|
|
285
|
+
"enumItems": [],
|
|
286
|
+
"mappedType": "datetime"
|
|
287
|
+
},
|
|
288
|
+
"source": {
|
|
289
|
+
"name": "source",
|
|
290
|
+
"type": "text",
|
|
291
|
+
"unsigned": false,
|
|
292
|
+
"autoincrement": false,
|
|
293
|
+
"primary": false,
|
|
294
|
+
"nullable": false,
|
|
295
|
+
"unique": false,
|
|
296
|
+
"length": null,
|
|
297
|
+
"precision": null,
|
|
298
|
+
"scale": null,
|
|
299
|
+
"default": null,
|
|
300
|
+
"comment": null,
|
|
301
|
+
"enumItems": [
|
|
302
|
+
"api",
|
|
303
|
+
"system"
|
|
304
|
+
],
|
|
305
|
+
"mappedType": "enum"
|
|
306
|
+
},
|
|
307
|
+
"starts_at": {
|
|
308
|
+
"name": "starts_at",
|
|
309
|
+
"type": "timestamptz(6)",
|
|
310
|
+
"unsigned": false,
|
|
311
|
+
"autoincrement": false,
|
|
312
|
+
"primary": false,
|
|
313
|
+
"nullable": true,
|
|
314
|
+
"unique": false,
|
|
315
|
+
"length": 6,
|
|
316
|
+
"precision": null,
|
|
317
|
+
"scale": null,
|
|
318
|
+
"default": null,
|
|
319
|
+
"comment": null,
|
|
320
|
+
"enumItems": [],
|
|
321
|
+
"mappedType": "datetime"
|
|
322
|
+
},
|
|
323
|
+
"tax_amount": {
|
|
324
|
+
"name": "tax_amount",
|
|
325
|
+
"type": "numeric(16,4)",
|
|
326
|
+
"unsigned": false,
|
|
327
|
+
"autoincrement": false,
|
|
328
|
+
"primary": false,
|
|
329
|
+
"nullable": true,
|
|
330
|
+
"unique": false,
|
|
331
|
+
"length": null,
|
|
332
|
+
"precision": 16,
|
|
333
|
+
"scale": 4,
|
|
334
|
+
"default": null,
|
|
335
|
+
"comment": null,
|
|
336
|
+
"enumItems": [],
|
|
337
|
+
"mappedType": "decimal"
|
|
338
|
+
},
|
|
339
|
+
"tax_rate": {
|
|
340
|
+
"name": "tax_rate",
|
|
341
|
+
"type": "numeric(7,4)",
|
|
342
|
+
"unsigned": false,
|
|
343
|
+
"autoincrement": false,
|
|
344
|
+
"primary": false,
|
|
345
|
+
"nullable": true,
|
|
346
|
+
"unique": false,
|
|
347
|
+
"length": null,
|
|
348
|
+
"precision": 7,
|
|
349
|
+
"scale": 4,
|
|
350
|
+
"default": null,
|
|
351
|
+
"comment": null,
|
|
352
|
+
"enumItems": [],
|
|
353
|
+
"mappedType": "decimal"
|
|
354
|
+
},
|
|
355
|
+
"tenant_id": {
|
|
356
|
+
"name": "tenant_id",
|
|
357
|
+
"type": "uuid",
|
|
358
|
+
"unsigned": false,
|
|
359
|
+
"autoincrement": false,
|
|
360
|
+
"primary": false,
|
|
361
|
+
"nullable": false,
|
|
362
|
+
"unique": false,
|
|
363
|
+
"length": null,
|
|
364
|
+
"precision": null,
|
|
365
|
+
"scale": null,
|
|
366
|
+
"default": null,
|
|
367
|
+
"comment": null,
|
|
368
|
+
"enumItems": [],
|
|
369
|
+
"mappedType": "uuid"
|
|
370
|
+
},
|
|
371
|
+
"unit_price_gross": {
|
|
372
|
+
"name": "unit_price_gross",
|
|
373
|
+
"type": "numeric(16,4)",
|
|
374
|
+
"unsigned": false,
|
|
375
|
+
"autoincrement": false,
|
|
376
|
+
"primary": false,
|
|
377
|
+
"nullable": true,
|
|
378
|
+
"unique": false,
|
|
379
|
+
"length": null,
|
|
380
|
+
"precision": 16,
|
|
381
|
+
"scale": 4,
|
|
382
|
+
"default": null,
|
|
383
|
+
"comment": null,
|
|
384
|
+
"enumItems": [],
|
|
385
|
+
"mappedType": "decimal"
|
|
386
|
+
},
|
|
387
|
+
"unit_price_net": {
|
|
388
|
+
"name": "unit_price_net",
|
|
389
|
+
"type": "numeric(16,4)",
|
|
390
|
+
"unsigned": false,
|
|
391
|
+
"autoincrement": false,
|
|
392
|
+
"primary": false,
|
|
393
|
+
"nullable": true,
|
|
394
|
+
"unique": false,
|
|
395
|
+
"length": null,
|
|
396
|
+
"precision": 16,
|
|
397
|
+
"scale": 4,
|
|
398
|
+
"default": null,
|
|
399
|
+
"comment": null,
|
|
400
|
+
"enumItems": [],
|
|
401
|
+
"mappedType": "decimal"
|
|
402
|
+
},
|
|
403
|
+
"variant_id": {
|
|
404
|
+
"name": "variant_id",
|
|
405
|
+
"type": "uuid",
|
|
406
|
+
"unsigned": false,
|
|
407
|
+
"autoincrement": false,
|
|
408
|
+
"primary": false,
|
|
409
|
+
"nullable": true,
|
|
410
|
+
"unique": false,
|
|
411
|
+
"length": null,
|
|
412
|
+
"precision": null,
|
|
413
|
+
"scale": null,
|
|
414
|
+
"default": null,
|
|
415
|
+
"comment": null,
|
|
416
|
+
"enumItems": [],
|
|
417
|
+
"mappedType": "uuid"
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"indexes": [
|
|
421
|
+
{
|
|
422
|
+
"columnNames": [
|
|
423
|
+
"id"
|
|
424
|
+
],
|
|
425
|
+
"composite": false,
|
|
426
|
+
"constraint": true,
|
|
427
|
+
"keyName": "catalog_price_history_entries_pkey",
|
|
428
|
+
"primary": true,
|
|
429
|
+
"unique": true
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"columnNames": [],
|
|
433
|
+
"composite": false,
|
|
434
|
+
"constraint": false,
|
|
435
|
+
"keyName": "catalog_price_history_idempotency_uq",
|
|
436
|
+
"primary": false,
|
|
437
|
+
"unique": false,
|
|
438
|
+
"expression": "create unique index \"catalog_price_history_idempotency_uq\" on \"catalog_price_history_entries\" (\"tenant_id\", \"organization_id\", \"idempotency_key\") where \"idempotency_key\" is not null"
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"columnNames": [
|
|
442
|
+
"tenant_id",
|
|
443
|
+
"organization_id",
|
|
444
|
+
"offer_id",
|
|
445
|
+
"price_kind_id",
|
|
446
|
+
"currency_code",
|
|
447
|
+
"recorded_at"
|
|
448
|
+
],
|
|
449
|
+
"composite": true,
|
|
450
|
+
"constraint": false,
|
|
451
|
+
"keyName": "catalog_price_history_offer_idx",
|
|
452
|
+
"primary": false,
|
|
453
|
+
"unique": false
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"columnNames": [
|
|
457
|
+
"tenant_id",
|
|
458
|
+
"organization_id",
|
|
459
|
+
"price_id"
|
|
460
|
+
],
|
|
461
|
+
"composite": true,
|
|
462
|
+
"constraint": false,
|
|
463
|
+
"keyName": "catalog_price_history_price_idx",
|
|
464
|
+
"primary": false,
|
|
465
|
+
"unique": false
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"columnNames": [
|
|
469
|
+
"tenant_id",
|
|
470
|
+
"organization_id",
|
|
471
|
+
"product_id",
|
|
472
|
+
"channel_id",
|
|
473
|
+
"price_kind_id",
|
|
474
|
+
"currency_code",
|
|
475
|
+
"recorded_at"
|
|
476
|
+
],
|
|
477
|
+
"composite": true,
|
|
478
|
+
"constraint": false,
|
|
479
|
+
"keyName": "catalog_price_history_product_channel_idx",
|
|
480
|
+
"primary": false,
|
|
481
|
+
"unique": false
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"columnNames": [
|
|
485
|
+
"tenant_id",
|
|
486
|
+
"organization_id",
|
|
487
|
+
"product_id",
|
|
488
|
+
"price_kind_id",
|
|
489
|
+
"currency_code",
|
|
490
|
+
"recorded_at"
|
|
491
|
+
],
|
|
492
|
+
"composite": true,
|
|
493
|
+
"constraint": false,
|
|
494
|
+
"keyName": "catalog_price_history_product_idx",
|
|
495
|
+
"primary": false,
|
|
496
|
+
"unique": false
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"columnNames": [
|
|
500
|
+
"tenant_id",
|
|
501
|
+
"organization_id",
|
|
502
|
+
"variant_id",
|
|
503
|
+
"channel_id",
|
|
504
|
+
"price_kind_id",
|
|
505
|
+
"currency_code",
|
|
506
|
+
"recorded_at"
|
|
507
|
+
],
|
|
508
|
+
"composite": true,
|
|
509
|
+
"constraint": false,
|
|
510
|
+
"keyName": "catalog_price_history_variant_channel_idx",
|
|
511
|
+
"primary": false,
|
|
512
|
+
"unique": false
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
"columnNames": [
|
|
516
|
+
"tenant_id",
|
|
517
|
+
"organization_id",
|
|
518
|
+
"variant_id",
|
|
519
|
+
"price_kind_id",
|
|
520
|
+
"currency_code",
|
|
521
|
+
"recorded_at"
|
|
522
|
+
],
|
|
523
|
+
"composite": true,
|
|
524
|
+
"constraint": false,
|
|
525
|
+
"keyName": "catalog_price_history_variant_idx",
|
|
526
|
+
"primary": false,
|
|
527
|
+
"unique": false
|
|
528
|
+
}
|
|
529
|
+
],
|
|
530
|
+
"checks": [
|
|
531
|
+
{
|
|
532
|
+
"name": "catalog_price_history_entries_change_type_check",
|
|
533
|
+
"expression": "\"change_type\" in ('create', 'update', 'delete', 'undo')",
|
|
534
|
+
"definition": "check (\"change_type\" in ('create', 'update', 'delete', 'undo'))",
|
|
535
|
+
"columnName": "change_type"
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"name": "catalog_price_history_entries_source_check",
|
|
539
|
+
"expression": "\"source\" in ('api', 'system')",
|
|
540
|
+
"definition": "check (\"source\" in ('api', 'system'))",
|
|
541
|
+
"columnName": "source"
|
|
542
|
+
}
|
|
543
|
+
],
|
|
544
|
+
"foreignKeys": {},
|
|
545
|
+
"comment": null
|
|
546
|
+
},
|
|
7
547
|
{
|
|
8
548
|
"name": "catalog_price_kinds",
|
|
9
549
|
"schema": "public",
|
|
@@ -2308,6 +2848,38 @@
|
|
|
2308
2848
|
"keyName": "catalog_product_variant_prices_variant_scope_idx",
|
|
2309
2849
|
"primary": false,
|
|
2310
2850
|
"unique": false
|
|
2851
|
+
},
|
|
2852
|
+
{
|
|
2853
|
+
"columnNames": [],
|
|
2854
|
+
"composite": false,
|
|
2855
|
+
"constraint": false,
|
|
2856
|
+
"keyName": "catalog_product_variant_prices_customer_group_idx",
|
|
2857
|
+
"primary": false,
|
|
2858
|
+
"unique": false,
|
|
2859
|
+
"expression": "create index \"catalog_product_variant_prices_customer_group_idx\" on \"catalog_product_variant_prices\" (\"customer_group_id\", \"organization_id\", \"tenant_id\") where \"customer_group_id\" is not null"
|
|
2860
|
+
},
|
|
2861
|
+
{
|
|
2862
|
+
"columnNames": [],
|
|
2863
|
+
"composite": false,
|
|
2864
|
+
"constraint": false,
|
|
2865
|
+
"keyName": "catalog_product_variant_prices_customer_idx",
|
|
2866
|
+
"primary": false,
|
|
2867
|
+
"unique": false,
|
|
2868
|
+
"expression": "create index \"catalog_product_variant_prices_customer_idx\" on \"catalog_product_variant_prices\" (\"customer_id\", \"organization_id\", \"tenant_id\") where \"customer_id\" is not null"
|
|
2869
|
+
},
|
|
2870
|
+
{
|
|
2871
|
+
"columnNames": [
|
|
2872
|
+
"product_id",
|
|
2873
|
+
"currency_code",
|
|
2874
|
+
"channel_id",
|
|
2875
|
+
"organization_id",
|
|
2876
|
+
"tenant_id"
|
|
2877
|
+
],
|
|
2878
|
+
"composite": true,
|
|
2879
|
+
"constraint": false,
|
|
2880
|
+
"keyName": "catalog_product_variant_prices_product_lookup_idx",
|
|
2881
|
+
"primary": false,
|
|
2882
|
+
"unique": false
|
|
2311
2883
|
}
|
|
2312
2884
|
],
|
|
2313
2885
|
"checks": [],
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Migration } from '@mikro-orm/migrations';
|
|
2
|
+
|
|
3
|
+
const PRICE_ROW_INDEXES = [
|
|
4
|
+
{
|
|
5
|
+
name: 'catalog_product_variant_prices_customer_idx',
|
|
6
|
+
definition: '("customer_id", "organization_id", "tenant_id") where "customer_id" is not null',
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
name: 'catalog_product_variant_prices_customer_group_idx',
|
|
10
|
+
definition: '("customer_group_id", "organization_id", "tenant_id") where "customer_group_id" is not null',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'catalog_product_variant_prices_product_lookup_idx',
|
|
14
|
+
definition: '("product_id", "currency_code", "channel_id", "organization_id", "tenant_id")',
|
|
15
|
+
},
|
|
16
|
+
] as const;
|
|
17
|
+
|
|
18
|
+
export class Migration20261005105352_catalog extends Migration {
|
|
19
|
+
|
|
20
|
+
override name = 'Migration20261005105352';
|
|
21
|
+
|
|
22
|
+
override isTransactional(): boolean {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
override up(): void | Promise<void> {
|
|
27
|
+
for (const index of PRICE_ROW_INDEXES) {
|
|
28
|
+
this.addSql(`drop index concurrently if exists "${index.name}";`);
|
|
29
|
+
this.addSql(`create index concurrently "${index.name}" on "catalog_product_variant_prices" ${index.definition};`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
override down(): void | Promise<void> {
|
|
34
|
+
for (const index of PRICE_ROW_INDEXES) {
|
|
35
|
+
this.addSql(`drop index concurrently if exists "${index.name}";`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Migration } from '@mikro-orm/migrations';
|
|
2
|
+
|
|
3
|
+
export class Migration20261005150824_catalog extends Migration {
|
|
4
|
+
|
|
5
|
+
override name = 'Migration20261005150824';
|
|
6
|
+
|
|
7
|
+
override up(): void | Promise<void> {
|
|
8
|
+
this.addSql(`create table "catalog_price_history_entries" ("id" uuid not null default gen_random_uuid(), "tenant_id" uuid not null, "organization_id" uuid not null, "price_id" uuid not null, "product_id" uuid not null, "variant_id" uuid null, "offer_id" uuid null, "channel_id" uuid null, "price_kind_id" uuid not null, "price_kind_code" text not null, "currency_code" varchar(3) not null, "unit_price_net" numeric(16,4) null, "unit_price_gross" numeric(16,4) null, "tax_rate" numeric(7,4) null, "tax_amount" numeric(16,4) null, "min_quantity" int null, "max_quantity" int null, "starts_at" timestamptz null, "ends_at" timestamptz null, "recorded_at" timestamptz not null, "change_type" text not null, "source" text not null, "is_announced" boolean null, "idempotency_key" text null, "metadata" jsonb null, primary key ("id"));`);
|
|
9
|
+
this.addSql(`create index "catalog_price_history_price_idx" on "catalog_price_history_entries" ("tenant_id", "organization_id", "price_id");`);
|
|
10
|
+
this.addSql(`create index "catalog_price_history_offer_idx" on "catalog_price_history_entries" ("tenant_id", "organization_id", "offer_id", "price_kind_id", "currency_code", "recorded_at" desc);`);
|
|
11
|
+
this.addSql(`create index "catalog_price_history_variant_channel_idx" on "catalog_price_history_entries" ("tenant_id", "organization_id", "variant_id", "channel_id", "price_kind_id", "currency_code", "recorded_at" desc);`);
|
|
12
|
+
this.addSql(`create index "catalog_price_history_variant_idx" on "catalog_price_history_entries" ("tenant_id", "organization_id", "variant_id", "price_kind_id", "currency_code", "recorded_at" desc);`);
|
|
13
|
+
this.addSql(`create index "catalog_price_history_product_channel_idx" on "catalog_price_history_entries" ("tenant_id", "organization_id", "product_id", "channel_id", "price_kind_id", "currency_code", "recorded_at" desc);`);
|
|
14
|
+
this.addSql(`create index "catalog_price_history_product_idx" on "catalog_price_history_entries" ("tenant_id", "organization_id", "product_id", "price_kind_id", "currency_code", "recorded_at" desc);`);
|
|
15
|
+
|
|
16
|
+
this.addSql(`alter table "catalog_price_history_entries" add constraint "catalog_price_history_entries_change_type_check" check ("change_type" in ('create', 'update', 'delete', 'undo'));`);
|
|
17
|
+
this.addSql(`alter table "catalog_price_history_entries" add constraint "catalog_price_history_entries_source_check" check ("source" in ('api', 'system'));`);
|
|
18
|
+
this.addSql(`create unique index "catalog_price_history_idempotency_uq" on "catalog_price_history_entries" ("tenant_id", "organization_id", "idempotency_key") where "idempotency_key" is not null;`);
|
|
19
|
+
|
|
20
|
+
this.addSql(`-- MANUAL DDL: immutability trigger and role restriction
|
|
21
|
+
CREATE OR REPLACE FUNCTION catalog_price_history_prevent_modification() RETURNS trigger AS $$
|
|
22
|
+
BEGIN
|
|
23
|
+
RAISE EXCEPTION 'catalog_price_history_entries is immutable';
|
|
24
|
+
END;
|
|
25
|
+
$$ LANGUAGE plpgsql;`);
|
|
26
|
+
this.addSql(`-- DEPLOY RUNBOOK (production): grant the app role INSERT/SELECT only.
|
|
27
|
+
-- REVOKE UPDATE, DELETE ON catalog_price_history_entries FROM <app_db_role>;
|
|
28
|
+
CREATE OR REPLACE TRIGGER history_immutable
|
|
29
|
+
BEFORE UPDATE OR DELETE ON catalog_price_history_entries
|
|
30
|
+
FOR EACH ROW EXECUTE FUNCTION catalog_price_history_prevent_modification();`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
override down(): void | Promise<void> {
|
|
34
|
+
this.addSql(`DROP TRIGGER IF EXISTS history_immutable ON catalog_price_history_entries;`);
|
|
35
|
+
this.addSql(`DROP FUNCTION IF EXISTS catalog_price_history_prevent_modification();`);
|
|
36
|
+
this.addSql(`drop table if exists "catalog_price_history_entries" cascade;`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
}
|