import { ResourcePickerProps } from './editors/ResourcesPicker';
import React from 'react';
import { Resource } from './interfaces/resource';
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 interface CommercePluginConfig {
    id: string;
    name: string;
    settings: any[];
    ctaText: string;
    onSave?: (actions: OnSaveActions) => Promise<void>;
    noPreviewTypes?: boolean;
}
export interface CommerceAPIOperations {
    [resourceName: string]: {
        resourcePicker?: React.FC<ResourcePickerProps>;
        findById(id: string): Promise<Resource>;
        findByHandle?(handle: string): Promise<Resource>;
        search(search: string, offset?: number, limit?: number): Promise<Resource[]>;
        getRequestObject(id: string, resource?: Resource): BuilderRequest;
    };
}
export declare const registerCommercePlugin: (config: CommercePluginConfig, apiOperationsFromSettings: (settings: any) => CommerceAPIOperations | Promise<CommerceAPIOperations>) => Promise<void>;
export { Resource } from './interfaces/resource';
export { BuilderRequest } from './interfaces/builder-request';
export { ResourcePreviewCell, ResourcePickerProps, ResourcePreviewCellProps, } from './editors/ResourcesPicker';
