import { AdminToastRequest, ADMIN_MESSAGE_TYPES, AdminMessagePayloads } from './types.admin'; /** * Subscribe to a given event type by its key. * * @param type The event type/key to subscribe to. * @param handler The handler function to call when the event is emitted. * @returns A Promise resolving to a cleanup function to unsubscribe from the event. */ declare function on(type: (typeof ADMIN_MESSAGE_TYPES)[keyof typeof ADMIN_MESSAGE_TYPES], handler: (data: AdminMessagePayloads[typeof type]) => Promise): Promise<() => void>; /** * Show a toast message to the user. Compatible with the UI API version of this method. * * @example * useAdmin().toast({ type: 'info', message: 'Hello, world!' }) */ declare function toast(payload: AdminToastRequest): Promise; declare const _default: { getUsers(payload?: import('../../../../main.lib').GetUsersParams): Promise>; getAppConfig(payload: { app_name: string; }): Promise>; getFile(payload: { id: import('../../../../main.lib').File["id"]; }): Promise; getFiles(payload: Record): Promise; open(payload: { id: import('../../../../main.lib').File["id"]; }): Promise; close(): Promise; getInstanceMetadataTemplates(payload?: import('../../../payload.types').GetInstanceMetadataTemplatesPayload): Promise; createCanvas(payload: import('../../../../main.lib').CanvasCreateRequest): Promise; getCanvases(payload: import('../../../../main.lib').GetCanvasesParams & { filters?: Record; fields?: string; }): Promise>; getCanvas(payload: { id: import('../../../../main.lib').CanvasRetrieve["id"]; fields?: string; }): Promise; updateCanvas(payload: import('../../../../main.lib').PatchedCanvasUpdateRequest & { id: import('../../../../main.lib').CanvasRetrieve["id"]; instance_id?: import('../../../../main.lib').Instance["id"]; fields?: string; }): Promise; openCanvasOverlay(payload: { id: import('../../../../main.lib').CanvasRetrieve["id"]; edit_mode?: boolean; fullscreen?: boolean; component_id?: string; section_id?: string; position?: { left?: number | string; right?: number | string; top?: number | string; bottom?: number | string; }; }): Promise; openCollectionPlayerOverlay(payload: import('./types.admin').AdminOpenCollectionPlayerOverlayRequest): Promise; selectCanvases(payload?: import('./types.admin').AdminSelectCanvasesRequest): Promise; getEnv(): Promise; selectCollectionContent(payload?: import('./types.admin').AdminSelectCollectionPlayerRequest): Promise; selectAgendaContent(payload?: import('./types.admin').AdminSelectAgendaRequest): Promise; selectContent(payload: import('./types.admin').AdminSelectContentRequest): Promise; captureAppError(payload: import('./types.admin').AdminCaptureAppErrorRequest): Promise; on: typeof on; toast: typeof toast; }; export default _default;