diff --git a/index.d.ts b/index.d.ts index 061121acd..e190d9280 100644 --- a/index.d.ts +++ b/index.d.ts @@ -242,6 +242,53 @@ export interface ContentType { settings?: IEditorInterfaceOptions ): void + /** + * Changes the control of given field's ID. + * + * @param fieldId The ID of the field. + * @param widgetNamespace The namespace of the widget. Use 'builtin' for standard widgets, 'extension' for UI extensions or 'app' for installed apps. + * @param widgetId The new widget ID for the field. + * @param settings Widget settings + */ + changeFieldControl(fieldId: string, + widgetNamespace: 'builtin', + widgetId: + | 'assetLinkEditor' + | 'assetLinksEditor' + | 'assetGalleryEditor' + | 'boolean' + | 'datePicker' + | 'entryLinkEditor' + | 'entryLinksEditor' + | 'entryCardEditor' + | 'entryCardsEditor' + | 'numberEditor' + | 'rating' + | 'locationEditor' + | 'objectEditor' + | 'urlEditor' + | 'slugEditor' + | 'listInput' + | 'checkbox' + | 'tagEditor' + | 'multipleLine' + | 'markdown' + | 'singleLine' + | 'dropdown' + | 'radio' + | 'richTextEditor', + settings?: IEditorInterfaceOptions): void; + + /** + * Changes the control of given field's ID. + * + * @param fieldId The ID of the field. + * @param widgetNamespace The namespace of the widget. Use 'builtin' for standard widgets, 'extension' for UI extensions or 'app' for installed apps. + * @param widgetId The new widget ID for the field. + * @param settings Widget settings + */ + changeFieldControl(fieldId: string, widgetNamespace: 'extension' | 'app', widgetId: string, settings?: IEditorInterfaceOptions): void; + /** * Changes the control of given field's ID. *