Files
marketplaces/src/app/shared/models/config/seller.model.ts
sdarbinyan 4464fed88a 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.
2026-07-26 20:13:56 +04:00

21 lines
714 B
TypeScript

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[];
}