import type { _NSError } from "../Foundation/NSError.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _CKDatabase } from "./CKDatabase.js";
import type { _CKSyncEngineConfiguration } from "./CKSyncEngineConfiguration.js";
import type { _CKSyncEngineFetchChangesOptions } from "./CKSyncEngineFetchChangesOptions.js";
import type { _CKSyncEngineSendChangesOptions } from "./CKSyncEngineSendChangesOptions.js";
import type { _CKSyncEngineState } from "./CKSyncEngineState.js";
export declare class _CKSyncEngine extends _NSObject {
    static alloc(): _CKSyncEngine;
    static new(): _CKSyncEngine;
    init(): _CKSyncEngine;
    /**
     * Initializes a `CKSyncEngine` with the given configuration. See properties on ``CKSyncEngineConfiguration`` for more details on all the options.
     */
    initWithConfiguration$(configuration: _CKSyncEngineConfiguration): _CKSyncEngine;
    /**
     * Fetches changes from the server immediately, bypassing the system scheduler. By default, the sync engine will automatically fetch changes from the server for you, and you should not have to call this function. However, you can call this if for some reason you need to ensure all changes have been fetched from the server before proceeding. For example, you might use this in your tests to simulate specific sync scenarios. Fetching changes from the server might result in some events being posted to your delegate via `handleEvent`. For example, you might receive a `CKSyncEngineWillFetchChangesEvent` or `CKSyncEngineDidFetchChangesEvent`. This will not complete until all the relevant events have been handled by your delegate.
     */
    fetchChangesWithCompletionHandler$(completionHandler: ((error: _NSError) => void) | null): void;
    /**
     * Fetches changes from the server with the specified options. See ``fetchChangesWithCompletionHandler:`` for more information.
     */
    fetchChangesWithOptions$completionHandler$(options: _CKSyncEngineFetchChangesOptions, completionHandler: ((error: _NSError) => void) | null): void;
    /**
     * Sends any pending changes to the server immediately, bypassing the system scheduler. By default, the sync engine will automatically send changes to the server for you, and you should not have to call this function. However, you can call this if for some reason you need to ensure all changes have been sent to the server before proceeding. For example, you might consider using this in your tests to simulate specific sync scenarios. Sending changes to the server might result in some events being posted to your delegate via `handleEvent`. For example, you might receive a `CKSyncEngineWillSendChangesEvent` or `CKSyncEngineDidSendChangesEvent`. This function will not return until all the relevant events have been handled by your delegate.
     */
    sendChangesWithCompletionHandler$(completionHandler: ((error: _NSError) => void) | null): void;
    /**
     * Sends pending changes to the server with the specified options. See discussion in ``sendChangesWithCompletionHandler:`` for more information.
     */
    sendChangesWithOptions$completionHandler$(options: _CKSyncEngineSendChangesOptions, completionHandler: ((error: _NSError) => void) | null): void;
    /**
     * Cancels any currently executing or pending sync operations. Note that cancellation does not happen synchronously, and it's possible some in-flight operations will succeed.
     */
    cancelOperationsWithCompletionHandler$(completionHandler: (() => void) | null): void;
    /** The database this sync engine will sync with. */
    database(): _CKDatabase;
    /**
     * A collection of state properties used to efficiently manage sync engine operation. See ``CKSyncEngineState`` for more details.
     */
    state(): _CKSyncEngineState;
}
