Files
marketplaces/src/app/shared/models/config/bootstrap-config.model.ts
sdarbinyan c2a56571af
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Deploy Frontend / deploy (push) Has been cancelled
feat(bootstrap): fall back to built-in placeholder when marketplace unpublished
Adds published: boolean to the bootstrap wire contract. ConfigService
swaps to a new DEFAULT_BOOTSTRAP constant (all feature flags on, generic
branding/theme/pages) whenever the backend reports published: false, so
an unpublished marketplace renders a working demo instead of a blank or
broken page. Missing published field stays backward compatible (treated
as true). Documents the brand bootstrap wire shape for backend/ops use.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-22 22:02:42 +04:00

63 lines
2.5 KiB
TypeScript

import { ApiEndpointsConfig } from './api-endpoints.model';
import { BrandingConfig } from './branding.model';
import { CatalogConfig } from './catalog-config.model';
import { CompanyConfig } from './company.model';
import { FeatureFlagsConfig } from './feature-flags.model';
import { MarketplaceFeaturesConfig } from './features-config.model';
import { FooterConfig } from './footer-config.model';
import { HeaderConfig } from './header-config.model';
import { PlatformLayoutConfig } from './layout.model';
import { LocalizationConfig } from './localization.model';
import { NavigationConfig } from './navigation.model';
import { PageConfig } from './page.model';
import { PermissionsConfig } from './permissions.model';
import { PlatformModulesConfig } from './platform-modules.model';
import { ProductPageConfig } from './product-page-config.model';
import { SellerConfig } from './seller.model';
import { SeoConfig } from './seo.model';
import { StaticPagesConfig } from './static-page.model';
import { TenantConfig } from './tenant.model';
import { ThemeConfig } from './theme.model';
import { UserExperienceConfig } from './user-experience-config.model';
import { WidgetRegistryConfig } from './widget-registry.model';
export interface BootstrapConfig {
schemaVersion: string;
generatedAt: string;
published: boolean;
tenant: TenantConfig;
branding: BrandingConfig;
theme: ThemeConfig;
company: CompanyConfig;
featureFlags: FeatureFlagsConfig;
features?: MarketplaceFeaturesConfig;
apiEndpoints: ApiEndpointsConfig;
localization: LocalizationConfig;
seo: SeoConfig;
permissions: PermissionsConfig;
header?: HeaderConfig;
catalog?: CatalogConfig;
layout?: PlatformLayoutConfig;
navigation: NavigationConfig;
footer?: FooterConfig;
productPage?: ProductPageConfig;
userExperience?: UserExperienceConfig;
pages: PageConfig[];
staticPages?: StaticPagesConfig;
widgetRegistry?: WidgetRegistryConfig;
/**
* Optional platform capability modules (e.g. Seller Management). Absent or
* `undefined` means every module is disabled - existing marketplaces that
* never send this field continue to behave exactly as today. See ADR-011.
*/
modules?: PlatformModulesConfig;
/**
* Present only when `modules.sellerManagement.enabled` is true and the
* resolved request scope is beneath a specific seller. Absent for every
* marketplace-level request, including all existing marketplaces. The
* frontend never resolves this itself (ADR-001, ADR-011) - it only reads
* whatever the backend already decided.
*/
seller?: SellerConfig;
}