import { ProjectSchema, PageFile, BlockFile, BlockSchema, MaterialDescription, HistorySchema, HistoryItem, Service, StaticFileInfo, NodeFromPlugin, VTJConfig } from '@vtj/core';
import { IStaticRequest } from '@vtj/utils';
export declare function createServiceRequest(notify?: (msg: string) => void): IStaticRequest<any, any>;
export declare class BaseService implements Service {
    req: IStaticRequest;
    protected api: (type: string, data: any, query?: any) => Promise<any>;
    private pluginCaches;
    protected uploader: (file: File, projectId: string) => Promise<StaticFileInfo>;
    constructor(req?: IStaticRequest);
    getExtension(): Promise<VTJConfig | undefined>;
    init(project: ProjectSchema): Promise<ProjectSchema>;
    saveProject(project: ProjectSchema, type?: string): Promise<boolean>;
    saveMaterials(project: ProjectSchema, materials: Map<string, MaterialDescription>): Promise<boolean>;
    saveFile(file: BlockSchema): Promise<boolean>;
    getFile(id: string): Promise<BlockSchema>;
    removeFile(id: string): Promise<boolean>;
    saveHistory(history: HistorySchema): Promise<boolean>;
    removeHistory(id: string): Promise<boolean>;
    getHistory(id: string): Promise<HistorySchema>;
    getHistoryItem(fId: string, id: string): Promise<HistoryItem>;
    saveHistoryItem(fId: string, item: HistoryItem): Promise<boolean>;
    removeHistoryItem(fId: string, ids: string[]): Promise<boolean>;
    publish(project: ProjectSchema): Promise<boolean>;
    publishFile(project: ProjectSchema, file: PageFile | BlockFile): Promise<boolean>;
    genVueContent(project: ProjectSchema, dsl: BlockSchema): Promise<string>;
    createRawPage(file: PageFile): Promise<boolean>;
    removeRawPage(id: string): Promise<boolean>;
    uploadStaticFile(file: File, projectId: string): Promise<StaticFileInfo | null>;
    getStaticFiles(projectId: string): Promise<StaticFileInfo[]>;
    removeStaticFile(name: string, projectId: string): Promise<boolean>;
    clearStaticFiles(projectId: string): Promise<boolean>;
    getPluginMaterial(from: NodeFromPlugin): Promise<MaterialDescription | null>;
    genSource(project: ProjectSchema): Promise<string>;
}
