/**
 * GitDocumentDB
 * Copyright (c) Hidekazu Kubota
 *
 * This source code is licensed under the Mozilla Public License Version 2.0
 * found in the LICENSE file in the root directory of gitDDB source tree.
 */
import { GitDDBInterface } from '../types_gitddb';
import { SyncResult, TaskMetadata } from '../types';
import { SyncInterface } from '../types_sync';
/**
 * sync_worker
 *
 * @throws {@link Err.NoMergeBaseFoundError}
 * @throws {@link Err.ThreeWayMergeError}
 * @throws {@link Err.CannotDeleteDataError}
 *
 * @throws # Errors from fetch, pushWorker
 * @throws - {@link RemoteErr.InvalidGitRemoteError}
 * @throws - {@link RemoteErr.InvalidURLFormatError}
 * @throws - {@link RemoteErr.NetworkError}
 * @throws - {@link RemoteErr.HTTPError401AuthorizationRequired}
 * @throws - {@link RemoteErr.HTTPError404NotFound}
 * @throws - {@link RemoteErr.CannotConnectError}
 * @throws - {@link RemoteErr.HttpProtocolRequiredError}
 * @throws - {@link RemoteErr.InvalidRepositoryURLError}
 * @throws - {@link RemoteErr.InvalidSSHKeyPathError}
 * @throws - {@link RemoteErr.InvalidAuthenticationTypeError}
 *
 * @throws # Errors from pushWorker
 * @throws - {@link RemoteErr.HTTPError403Forbidden}
 * @throws - {@link RemoteErr.UnfetchedCommitExistsError}
 *
 * @throws # Errors from merge
 * @throws - {@link Err.InvalidConflictStateError}
 * @throws - {@link Err.CannotDeleteDataError}
 * @throws ## Errors from getMergedDocument
 * @throws - {@link Err.InvalidDocTypeError}
 * @throws - {@link Err.InvalidConflictResolutionStrategyError}
 * @throws ## Errors from writeBlobToFile
 * @throws - {@link Err.CannotCreateDirectoryError}
 * @throws ## Errors from getFatDocFromData, getFatDocFromReadBlobResult
 * @throws - {@link Err.InvalidJsonObjectError}
 *
 * @throws # Errors from getChanges
 * @throws - {@link Err.InvalidJsonObjectError}
 *
 * @internal
 */
export declare function syncWorker(gitDDB: GitDDBInterface, sync: SyncInterface, taskMetadata: TaskMetadata): Promise<SyncResult>;
//# sourceMappingURL=sync_worker.d.ts.map