import type { _CKDatabaseOperation } from "./CKDatabaseOperation.js";
import type { _CKQuery } from "./CKQuery.js";
import type { _CKQueryCursor } from "./CKQueryCursor.js";
import type { _CKRecord } from "./CKRecord.js";
import type { _CKRecordID } from "./CKRecordID.js";
import type { _CKRecordZoneID } from "./CKRecordZoneID.js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSError } from "../Foundation/NSError.js";
export declare class _CKQueryOperation extends _CKDatabaseOperation {
    static alloc(): _CKQueryOperation;
    static new(): _CKQueryOperation;
    /**
     * Queries invoked within a sharedCloudDatabase must specify a zoneID. Cross-zone queries are not supported in a sharedCloudDatabase
     */
    init(): _CKQueryOperation;
    initWithQuery$(query: _CKQuery): _CKQueryOperation;
    initWithCursor$(cursor: _CKQueryCursor): _CKQueryOperation;
    query(): _CKQuery | null;
    setQuery$(value: _CKQuery | null): void;
    cursor(): _CKQueryCursor | null;
    setCursor$(value: _CKQueryCursor | null): void;
    /**
     * @abstract Indicates which record zone to query. @discussion For query operations constructed using a cursor, this property is ignored and instead will be evaluated in the record zone in which the cursor was originally created. Queries that do not specify a @c zoneID will perform a query across all zones in the database.
     */
    zoneID(): _CKRecordZoneID | null;
    setZoneID$(value: _CKRecordZoneID | null): void;
    /**
     * @discussion Defaults to @c CKQueryOperationMaximumResults. Queries may return fewer than @c resultsLimit in some scenarios: - There are legitimately fewer than @c resultsLimit number of records matching the query (and visible to the current user). - During the process of querying and fetching the results, some records were deleted, or became un-readable by the current user. When determining if there are more records to fetch, always check for the presence of a cursor in @c queryCompletionBlock.
     */
    resultsLimit(): number;
    setResultsLimit$(value: number): void;
    /**
     * @abstract Declares which user-defined keys should be fetched and added to the resulting CKRecords. @discussion If nil, declares the entire record should be downloaded. If set to an empty array, declares that no user fields should be downloaded. Defaults to @c nil.
     */
    desiredKeys(): _NSArray | null;
    setDesiredKeys$(value: _NSArray | null): void;
    /**
     * @abstract This block will be called once for every record that is returned as a result of the query. @discussion The callbacks will happen in the order that the results were sorted in. If the replacement callback @c recordMatchedBlock is set, this callback block is ignored. Each @c CKOperation instance has a private serial queue. This queue is used for all callback block invocations. This block may share mutable state with other blocks assigned to this operation, but any such mutable state should not be concurrently used outside of blocks assigned to this operation.
     * @deprecated Use recordMatchedBlock instead, which surfaces per-record errors
     */
    recordFetchedBlock(): ((arg0: _CKRecord) => void) | null;
    setRecordFetchedBlock$(value: ((arg0: _CKRecord) => void) | null): void;
    /**
     * @abstract This block will be called once for every record that is returned as a result of the query. @discussion The callbacks will happen in the order that the results were sorted in. If a record fails in post-processing (say, a network failure materializing a @c CKAsset record field), the per-record error will be passed here. Each @c CKOperation instance has a private serial queue. This queue is used for all callback block invocations. This block may share mutable state with other blocks assigned to this operation, but any such mutable state should not be concurrently used outside of blocks assigned to this operation.
     */
    recordMatchedBlock(): ((arg0: _CKRecordID, arg1: _CKRecord, arg2: _NSError) => void) | null;
    setRecordMatchedBlock$(value: ((arg0: _CKRecordID, arg1: _CKRecord, arg2: _NSError) => void) | null): void;
    /**
     * @abstract This block is called when the operation completes. @discussion The @code -[NSOperation completionBlock] @endcode will also be called if both are set. If the error is @c CKErrorPartialFailure, the error's userInfo dictionary contains a dictionary of recordIDs to errors keyed off of @c CKPartialErrorsByItemIDKey. These errors are repeats of those sent back in previous @c recordMatchedBlock invocations Each @c CKOperation instance has a private serial queue. This queue is used for all callback block invocations. This block may share mutable state with other blocks assigned to this operation, but any such mutable state should not be concurrently used outside of blocks assigned to this operation.
     */
    queryCompletionBlock(): ((arg0: _CKQueryCursor, arg1: _NSError) => void) | null;
    setQueryCompletionBlock$(value: ((arg0: _CKQueryCursor, arg1: _NSError) => void) | null): void;
}
