Skip to content

Commit 3c53123

Browse files
tylerpinaclaude
andcommitted
feat: split ExoMetadataProps into base and ExperienceMetadataProps [DX-987]
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 b087f7f commit 3c53123

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,4 +1,4 @@
1-
import type { CursorPaginationParams, ExoMetadataProps, Link } from '../common-types'
1+
import type { CursorPaginationParams, ExperienceMetadataProps, Link } from '../common-types'
22
import type {
33
ComponentTypeViewport,
44
DimensionedDesignPropertyValue,
@@ -49,7 +49,7 @@ type ExperienceCommonProps = {
4949
designProperties: Record<string, DimensionedDesignPropertyValue>
5050
dimensionKeyMap: ExperienceDimensionKeyMap
5151
contentBindings?: ExperienceContentBindings
52-
metadata?: ExoMetadataProps
52+
metadata?: ExperienceMetadataProps
5353
slots?: Record<string, Array<FragmentNode | InlineFragmentNode>>
5454
}
5555

0 commit comments

Comments
 (0)