Skip to content

Comments

fix: update ComponentType types to match API changes [DX-692]#2883

Merged
whitelisab merged 2 commits intomasterfrom
fix/dx-692
Feb 23, 2026
Merged

fix: update ComponentType types to match API changes [DX-692]#2883
whitelisab merged 2 commits intomasterfrom
fix/dx-692

Conversation

@whitelisab
Copy link
Contributor

Summary

This PR updates some types for the ComponentType entity to reflect recent API changes.

NOTE: The componentType.getMany method is listed as experimental.

Description

Update the TypeScript types in lib/entities/component-type.ts to align with recent changes to the ComponentType schema.

  • ComponentTypeContentProperty: added optional defaultValue?: unknown field
  • ContentPropertyValueContentPropertyPointerValue: renamed to clarify this type represents pointer strings only ($contentProperties/… | $contentBindings/…); the corresponding contentProperties field on ComponentNode is now typed as ContentPropertyPointerValue | unknown to reflect that non-pointer values are also valid
  • DesignPropertyPointerValue (new): adds $designProperties/${string} pointer type for design properties
  • DesignPropertyValue: tightened from a loose string | Record<…> to an explicit union of ManualDesignValue | DesignTokenValue | DesignPropertyPointerValue | Record<string, ManualDesignValue | DesignTokenValue | DesignPropertyPointerValue>, removing the bare string case
  • DataAssemblyLink (new): named type alias for Link<'DataAssembly'>
  • ComponentTypeContentBindings: replaced explicit id / type / linkType fields with DataAssemblyLink['sys'], deriving the link shape from the shared Link type rather than duplicating it
  • ComponentTypeProps: added optional dataAssemblies?: DataAssemblyLink[] field

Motivation and Context

PR Checklist

  • I have read the CONTRIBUTING.md file
  • All commits follow conventional commits
  • Documentation is updated (if necessary)
  • PR doesn't contain any sensitive information
  • There are no breaking changes (renamed and edited types, but this method is experimental)

@whitelisab whitelisab requested a review from a team as a code owner February 18, 2026 20:58
Copy link
Contributor

@michaelphamcf michaelphamcf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! Just a few props I saw missing

@whitelisab whitelisab merged commit 4cc3763 into master Feb 23, 2026
14 checks passed
@whitelisab whitelisab deleted the fix/dx-692 branch February 23, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants