Skip to content

Commit d7ab506

Browse files
tylerpinaclaude
andauthored
feat: split ExoMetadataProps into base and ExperienceMetadataProps [DX-987] (#3008)
ExoMetadataProps no longer includes name — aligns with upstream MetadataSchema used by ComponentType and Template. New ExperienceMetadataProps extends the base with name? for variant labeling, mirroring upstream ExperienceMetadata. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d61c73b commit d7ab506

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

lib/common-types.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,14 +377,21 @@ export interface MetadataProps {
377377
}
378378

379379
/**
380-
* Metadata shape for ExO entities (ComponentType, Experience/View, Template).
380+
* Base metadata shape for ExO entities (ComponentType, Template).
381+
* Mirrors upstream MetadataSchema: tags and concepts only.
381382
* - tags: optional (upstream MetadataSchema.tags is z.optional as of SPA-3821)
382383
* - concepts: optional taxonomy concept links
383-
* - name: optional display name for variant labeling (SPA-3939)
384384
*/
385385
export interface ExoMetadataProps {
386386
tags?: Link<'Tag'>[]
387387
concepts?: Link<'TaxonomyConcept'>[]
388+
}
389+
390+
/**
391+
* Extended metadata shape for Experience entities only.
392+
* Adds name? for variant labeling (SPA-3939), mirroring upstream ExperienceMetadata.
393+
*/
394+
export interface ExperienceMetadataProps extends ExoMetadataProps {
388395
name?: string
389396
}
390397

lib/entities/experience.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type {
22
CursorPaginatedCollectionProp,
33
CursorPaginationParams,
4-
ExoMetadataProps,
4+
ExperienceMetadataProps,
55
Link,
66
} from '../common-types'
77
import type {
@@ -57,7 +57,7 @@ type ExperienceCommonProps = {
5757
designProperties: Record<string, DimensionedDesignPropertyValue>
5858
dimensionKeyMap: ExperienceDimensionKeyMap
5959
contentBindings?: ExperienceContentBindings
60-
metadata?: ExoMetadataProps
60+
metadata?: ExperienceMetadataProps
6161
slots?: Record<string, Array<FragmentNode | InlineFragmentNode>>
6262
}
6363

0 commit comments

Comments
 (0)