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