import { Input } from '@builder.io/sdk'; import { ReactNode } from 'react'; import { BuilderRequest } from './interfaces/builder-request'; interface OnSaveActions { updateSettings(partal: Record): Promise; addModel(model: Model): Promise; } interface Model { name: string; hideFromUI?: boolean; kind: 'data' | 'page' | 'component' | 'function'; } export type ResourceType = { name: string; id: string; icon?: string; description?: string; inputs?: () => Partial[]; toUrl: (options: Record) => string | BuilderRequest | Promise | Promise; canPickEntries?: boolean; }; export type GetResourceTypes = () => Promise; export interface DataPluginOptions { id: string; name: string; settings: any[]; ctaText: string; onSave?: (actions: OnSaveActions) => Promise; icon?: string; noResourceTypesFoundMessage?: string | ReactNode; } export type ResourceEntryType = { id: string; name: string; icon?: string; description?: string; }; export type GetEntriesByResourceType = (resourceTypeId: string, options?: { searchText?: string; resourceEntryId?: string; }) => Promise; export type APIOperations = { getResourceTypes: GetResourceTypes; getEntriesByResourceType?: GetEntriesByResourceType; }; export declare const registerDataPlugin: (config: DataPluginOptions, apiOperationsFromSettings: (settings: any) => APIOperations | Promise) => Promise; export {};