feat(platform): add typed contracts for optional Seller Management module
Architectural foundation only - no UI, no backend, no business logic. Per ADR-001 (Platform -> Marketplace -> Seller hierarchy) and ADR-009 (feature flags / capability guards): Seller is an optional child scope beneath a marketplace, not another tenant. New: - PlatformModulesConfig / SellerManagementModuleConfig (shared/models/config/platform-modules.model.ts) - the modules.sellerManagement.enabled contract, defaults to disabled (DEFAULT_PLATFORM_MODULES_CONFIG). - SellerConfig (shared/models/config/seller.model.ts) - typed shape for the resolved seller scope, mirroring TenantConfig's fields at the subset a seller needs. Frontend never resolves this itself; it only reads what the backend already decided (same convention as tenant resolution, ADR-001). Changed: - BootstrapConfig gained two optional fields: modules?, seller?. Both absent by default - every existing marketplace's bootstrap response is untouched, TypeScript-checked backward compatible (all new fields optional, no existing field types changed). tsc --noEmit clean. No component, facade, service, or route touched - this commit is pure type contracts.
This commit is contained in:
@@ -11,7 +11,9 @@ 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';
|
||||
@@ -42,4 +44,18 @@ export interface BootstrapConfig {
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user