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:
20
src/app/shared/models/config/seller.model.ts
Normal file
20
src/app/shared/models/config/seller.model.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { UUID } from '../../types/primitive.types';
|
||||
|
||||
/**
|
||||
* Optional child scope beneath a marketplace (tenant). Mirrors `TenantConfig`'s
|
||||
* shape at the fields a seller scope genuinely needs, not a copy of every
|
||||
* tenant field - a seller is not a tenant (see ADR-011).
|
||||
*
|
||||
* The frontend never resolves which seller is active; the backend resolves it
|
||||
* (same as tenant resolution, ADR-001) and includes it in the bootstrap
|
||||
* response only when `modules.sellerManagement.enabled` is true and a seller
|
||||
* scope actually applies to the current request.
|
||||
*/
|
||||
export interface SellerConfig {
|
||||
id: UUID;
|
||||
marketplaceId: UUID;
|
||||
slug: string;
|
||||
name: string;
|
||||
defaultLocale: string;
|
||||
supportedLocales: string[];
|
||||
}
|
||||
Reference in New Issue
Block a user