import { C8oCore, FullSyncPolicy } from "./c8oCore";
import { C8oFullSyncChangeListener } from "./c8oFullSyncChangeListener";
import { C8oLocalCacheResponse } from "./c8oLocalCacheResponse";
import { C8oResponseListener } from "./c8oResponse";
import { C8oFullSyncDatabase } from "./fullSyncDatabase";
import { FullSyncDefaultResponse } from "./fullSyncResponse";
export declare class C8oFullSync {
    private static FULL_SYNC_URL_PATH;
    static FULL_SYNC_PROJECT: string;
    static FULL_SYNC__ID: string;
    static FULL_SYNC__REV: string;
    static FULL_SYNC__ATTACHMENTS: string;
    c8o: C8oCore;
    protected fullSyncDatabaseUrlBase: string;
    protected localSuffix: string;
    constructor(c8o: C8oCore);
    handleFullSyncRequest(_parameters: Object, listener: C8oResponseListener): Promise<any>;
    handleFullSyncResponse(response: any, listener: C8oResponseListener): any;
    static isFullSyncRequest(requestParameter: Object): boolean;
}
import { ReplicationState } from "./fullSyncDatabase";
export declare class C8oFullSyncCbl extends C8oFullSync {
    private static ATTACHMENT_PROPERTY_KEY_CONTENT_URL;
    private fullSyncDatabases;
    private fullSyncChangeListeners;
    private cblChangeListeners;
    replicationsToRestart: Array<ReplicationState>;
    canceled: boolean;
    constructor(c8o: C8oCore);
    getOrCreateFullSyncDatabase(databaseName: string, isLocalCache?: boolean): Promise<C8oFullSyncDatabase>;
    handleFullSyncResponse(response: any, listener: C8oResponseListener): any;
    handleGetAttachmentUrlRequest(fullSyncDatabaseName: string, docid: string, parameters: Object): Promise<any>;
    handleGetDocumentRequest(fullSyncDatabaseName: string, docid: string, parameters: Object): Promise<any>;
    handleDeleteDocumentRequest(DatabaseName: string, docid: string, parameters: Object): Promise<any>;
    handlePostDocumentRequest(databaseName: string, fullSyncPolicy: FullSyncPolicy, parameters: Object, fullsyncPolicySubMerge?: any): Promise<any>;
    handlePutAttachmentRequest(databaseName: string, docid: string, attachmentName: string, attachmentType: string, attachmentContent: any): Promise<any>;
    handleGetAttachmentRequest(databaseName: string, docid: string, attachmentName: string, parameters: any): Promise<any>;
    handleDeleteAttachmentRequest(databaseName: string, docid: string, attachmentName: string): Promise<any>;
    handleAllDocumentsRequest(databaseName: string, parameters: Object): Promise<any>;
    handleAllLocalDocumentsRequest(databaseName: string, parameters: Object): Promise<any>;
    handleGetViewRequest(databaseName: string, ddocName: string, viewName: string, parameters: Object): Promise<any>;
    handleCreateIndexRequest(databaseName: string, fields: any, parameters: Object): Promise<any>;
    handleGetFindRequest(databaseName: string, selector: any, parameters: Object): Promise<any>;
    handleExplainRequest(databaseName: string, selector: any, parameters: Object): Promise<any>;
    handleGetIndexesRequest(databaseName: string, parameters: Object): Promise<any>;
    handleDeleteIndexRequest(databaseName: string, parameters: Object): Promise<any>;
    handleSearchRequest(databaseName: string, query: any, fields: any, parameters: Object): Promise<any>;
    private checkState;
    handleSyncRequest(databaseName: string, parameters: Object, c8oResponseListener: C8oResponseListener): Promise<any>;
    handleReplicatePullRequest(databaseName: string, parameters: Object, c8oResponseListener: C8oResponseListener): Promise<any>;
    handleReplicatePushRequest(databaseName: string, parameters: Object, c8oResponseListener: C8oResponseListener): Promise<any>;
    handleResetDatabaseRequest(databaseName: string): Promise<FullSyncDefaultResponse>;
    handleCreateDatabaseRequest(databaseName: string): Promise<FullSyncDefaultResponse>;
    handleBulkRequest(databaseName: string, parameters: Object): Promise<any>;
    handleInfoRequest(databaseName: string): Promise<any>;
    handleDestroyDatabaseRequest(databaseName: string): Promise<any>;
    static deepCloneObject(obj: any): any;
    static applySubPolicyDelete(objToChange: any, path: any, index: any, subPolicy: any): void;
    static applySubPolicyOverride(objToChange: any, path: any, index: any, source: any, subPolicy: any): void;
    static applySubPolicyForMerge(override: any, source: any, objToChange: any, subPolicy: any): void;
    static mergeProperties(newProperties: Object, oldProperties: Object, useMergePolicy?: string): void;
    static mergeArrayProperties(newArray: any, oldArray: any): void;
    getDocucmentFromDatabase(c8o: C8oCore, databaseName: string, documentId: string): Promise<any>;
    overrideDocument(document: any, properties: Object, databaseName: any): Promise<void>;
    getResponseFromLocalCache(c8oCallRequestIdentifier: string): Promise<any>;
    saveResponseToLocalCache(c8oCallRequestIdentifier: string, localCacheResponse: C8oLocalCacheResponse): Promise<any>;
    addFullSyncChangeListener(db: string, listener: C8oFullSyncChangeListener, parameters?: Object): Promise<void>;
    removeFullSyncChangeListener(db: string, listener: C8oFullSyncChangeListener): Promise<void>;
}
