import { Field, ModelBlock } from './SiteApiSchema';
import { ContentAreaSidebarItem, FieldExtensionOverride, InitPropertiesAndMethods, ItemFormSidebarPanel, MainNavigationTab, ManualFieldExtension, OnBootPropertiesAndMethods, RenderConfigScreenPropertiesAndMethods, RenderFieldExtensionPropertiesAndMethods, RenderManualFieldExtensionConfigScreenPropertiesAndMethods, RenderModalPropertiesAndMethods, RenderPagePropertiesAndMethods, RenderSidebarPanePropertiesAndMethods, SettingsAreaSidebarItemGroup } from './types';
export declare type SizingUtilities = {
/**
* Listens for DOM changes and automatically calls `setHeight` when it detects a change.
* If you're using `datocms-react-ui` package, the `` component already takes
* care of calling this method for you.
*/
startAutoResizer: () => void;
/** Stops resizing the iframe automatically */
stopAutoResizer: () => void;
/**
* Triggers a change in the size of the iframe. If you don't explicitely pass a
* `newHeight` it will be automatically calculated using the iframe content at the moment
*/
updateHeight: (newHeight?: number) => void;
};
export type { Field, ModelBlock };
export declare type IntentCtx = InitPropertiesAndMethods;
export declare type OnBootCtx = OnBootPropertiesAndMethods;
export declare type FieldIntentCtx = InitPropertiesAndMethods & {
itemType: ModelBlock;
};
export declare type RenderPageCtx = RenderPagePropertiesAndMethods;
export declare type RenderModalCtx = RenderModalPropertiesAndMethods & SizingUtilities;
export declare type RenderItemFormSidebarPanelCtx = RenderSidebarPanePropertiesAndMethods & SizingUtilities;
export declare type RenderFieldExtensionCtx = RenderFieldExtensionPropertiesAndMethods & SizingUtilities;
export declare type RenderManualFieldExtensionConfigScreenCtx = RenderManualFieldExtensionConfigScreenPropertiesAndMethods & SizingUtilities;
export declare type RenderConfigScreenCtx = RenderConfigScreenPropertiesAndMethods & SizingUtilities;
/** The full options you can pass to the `connect` function */
export declare type FullConnectParameters = {
/**
* This function will be called once at boot time and can be used to perform ie. some
* initial integrity checks on the configuration.
*
* @group boot
*/
onBoot: (ctx: OnBootCtx) => void;
/**
* Use this function to declare new tabs you want to add in the top-bar of the UI
*
* @group pages
*/
mainNavigationTabs: (ctx: IntentCtx) => MainNavigationTab[];
/**
* Use this function to declare new navigation sections in the Settings Area sidebar
*
* @group pages
*/
settingsAreaSidebarItemGroups: (ctx: IntentCtx) => SettingsAreaSidebarItemGroup[];
/**
* Use this function to declare new navigation items in the Content Area sidebar
*
* @group pages
*/
contentAreaSidebarItems: (ctx: IntentCtx) => ContentAreaSidebarItem[];
/**
* Use this function to declare new field extensions that users will be able to install
* manually in some field
*
* @group manualFieldExtensions
*/
manualFieldExtensions: (ctx: IntentCtx) => ManualFieldExtension[];
/**
* Use this function to declare new sidebar panels to be shown when the user edits
* records of a particular model
*
* @group sidebarPanels
*/
itemFormSidebarPanels: (itemType: ModelBlock, ctx: IntentCtx) => ItemFormSidebarPanel[];
/**
* Use this function to automatically force one or more field extensions to a particular field
*
* @group forcedFieldExtensions
*/
overrideFieldExtensions: (field: Field, ctx: FieldIntentCtx) => FieldExtensionOverride | void;
/**
* This function will be called when the plugin needs to render the plugin's configuration form
*
* @group configScreen
*/
renderConfigScreen: (ctx: RenderConfigScreenCtx) => void;
/**
* This function will be called when the plugin needs to render a specific page (see the
* `mainNavigationTabs`, `settingsAreaSidebarItemGroups` and `contentAreaSidebarItems` functions)
*
* @group pages
*/
renderPage: (pageId: string, ctx: RenderPageCtx) => void;
/**
* This function will be called when the plugin requested to open a modal (see the
* `openModal` function)
*
* @group modals
*/
renderModal: (modalId: string, ctx: RenderModalCtx) => void;
/**
* This function will be called when the plugin needs to render a sidebar panel (see the
* `itemFormSidebarPanels` function)
*
* @group sidebarPanels
*/
renderItemFormSidebarPanel: (sidebarPaneId: string, ctx: RenderItemFormSidebarPanelCtx) => void;
/**
* This function will be called when the plugin needs to render a field extension (see
* the `manualFieldExtensions` and `overrideFieldExtensions` functions)
*
* @group forcedFieldExtensions
*/
renderFieldExtension: (fieldExtensionId: string, ctx: RenderFieldExtensionCtx) => void;
/**
* This function will be called when the plugin needs to render the configuration form
* for installing a field extension inside a particular field
*
* @group manualFieldExtensions
*/
renderManualFieldExtensionConfigScreen: (fieldExtensionId: string, ctx: RenderManualFieldExtensionConfigScreenCtx) => void;
/**
* This function will be called each time the configuration object changes. It must
* return an object containing possible validation errors
*
* @group manualFieldExtensions
*/
validateManualFieldExtensionParameters: (fieldExtensionId: string, parameters: Record) => Record | Promise>;
};
export declare function connect(configuration?: Partial): Promise;