contentful / contentful-management.js

JavaScript library for Contentful's Management API (node & browser)
https://contentful.github.io/contentful-management.js
MIT License
266 stars 98 forks source link

Editor Interface "Controls" type missing field object #2367

Open heyitstowler opened 1 month ago

heyitstowler commented 1 month ago

Summary

Typescript types on the sdk.editorInterface.controls are missing the field key. They are defined here in the CMA types: https://github.com/contentful/contentful-management.js/blob/c6197e559169f5a0121fb219079674983525d498/lib/entities/editor-interface.ts#L96C1-L97C1

Here, Control is defined as WidgetConfig with an additional fieldId, whereas in practice, logging the sdk.editor.editorInterface.controls shows a field key that contains various field settings, including localization and disabled settings

I would expect those fields to included in the typescript so I do not receive errors when accessing them