datocms-plugin-sdk
Version:
26 lines (25 loc) • 936 B
TypeScript
import type { SchemaTypes } from '@datocms/cma-client';
import { ImposedSizePluginFrameCtx } from '../ctx/pluginFrame';
type Upload = SchemaTypes.Upload;
export type RenderUploadSidebarHook = {
/**
* This function will be called when the plugin needs to render a sidebar (see
* the `uploadSidebars` hook)
*
* @tag sidebarPanels
*/
renderUploadSidebar: (sidebarId: string, ctx: RenderUploadSidebarCtx) => void;
};
export type RenderUploadSidebarCtx = ImposedSizePluginFrameCtx<'renderUploadSidebar', {
/** The ID of the sidebar that needs to be rendered */
sidebarId: string;
/**
* The arbitrary `parameters` of the declared in the `uploadSidebars`
* function
*/
parameters: Record<string, unknown>;
/** The active asset */
upload: Upload;
}>;
export declare const renderUploadSidebarBootstrapper: import("../utils").Bootstrapper<"renderUploadSidebar">;
export {};