import type { CDFComponentEntry } from '../../cdf/index.js'; import type { DTCGTokenEntry } from '../../dtcg/index.js'; interface PropertyBreakingChange { propertyId: string; reason: 'removed' | 'added_required_no_default' | 'type_changed' | 'validation_narrowed'; } interface SlotBreakingChange { slotId: string; reason: 'slot_removed' | 'slot_allowed_components_narrowed'; } export type BreakingChange = PropertyBreakingChange | SlotBreakingChange; export interface ChangeClassification { classification: 'breaking' | 'compatible'; breakingChanges: BreakingChange[]; } export interface DownstreamImpact { affectedFragments: number; affectedExperiences: number; referencedByFragment?: boolean; } export interface PropertySummary { type: string; category: string; required: boolean; default?: unknown; } export interface ComponentTypeSummary { id: string; name: string; contentProperties: string[]; designProperties: string[]; slots: string[]; fullProperties?: Record; /** * Per-slot `$allowedComponents` on the currently-published version, keyed by * slot name. Optional so consumers that don't populate it get the previous * no-slot-allow-diff behavior. Empty arrays mean "no restrictions" (any). */ currentSlotAllowed?: Record; deleteBlocked?: { reason: 'fragment-referenced'; }; } export interface DesignTokenSummary { id: string; name: string; type: string; } export interface TaxonomySummary { id: string; name: string; tokenIds: string[]; } export interface ChangedEntity { current: TCurrent; proposed: TProposed; hasPendingDraftChanges: boolean; changeClassification?: ChangeClassification; impact?: DownstreamImpact; } export interface EntityDiffGroup { new: TProposed[]; changed: ChangedEntity[]; unchanged: string[]; removed: TCurrent[]; } export interface ServerPreviewResponse { components: EntityDiffGroup; tokens: EntityDiffGroup; taxonomies: EntityDiffGroup; } export {};