import type { NobjcObject } from "objc-js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSCoding } from "../Foundation/NSCoding.js";
import type { _NSDate } from "../Foundation/NSDate.js";
import type { _NSDictionary } from "../Foundation/NSDictionary.js";
import type { _NSEnumerator } from "../Foundation/NSEnumerator.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { _ISyncChange } from "./ISyncChange.js";
import type { _ISyncClient } from "./ISyncClient.js";
import type { _ISyncRecordSnapshot } from "./ISyncRecordSnapshot.js";
export declare class _ISyncSession extends _NSObject {
    static alloc(): _ISyncSession;
    static new(): _ISyncSession;
    init(): _ISyncSession;
    /**
     * Phase I: negotiating the sync mode.
     * @deprecated
     */
    static beginSessionWithClient$entityNames$beforeDate$(client: _ISyncClient, entityNames: _NSArray, date: _NSDate): _ISyncSession;
    /**
     * Returns immediately and invokes a target callback when the session can start or if the session. cannot be started. The target is invoked with the selector and two arguments, the ISyncClient and the ISyncSession. The selector should be of this form: -(void)client:(ISyncClient *)can beginSession:(ISyncSession *)session; If the session cannot be started, the session parameter is nil.
     * @deprecated
     */
    static beginSessionInBackgroundWithClient$entityNames$target$selector$(client: _ISyncClient, entityNames: _NSArray, target: NobjcObject, selector: string): void;
    /** @deprecated */
    static cancelPreviousBeginSessionWithClient$(client: _ISyncClient): void;
    /**
     * If a client is using sync anchors, when starting a sync session, the client passes in the previous sync anchors, one per entity. The anchors dictionary is a map from the entity name to the sync anchor value, and the values are the anchors as last set in the previous sync's calls to the methods clientFinishedPushingChangesWithNextAnchors or clientCommittedAcceptedChanges. As a convenience, the user may specify a mapping for a single entity name for some representative entity of a dataclass. However, if more than one mapping per dataclass is provided, then mappings are required for every entity name being synchronized. The lack of a mapping in this case will force the entity without a mapping to be refreshed. The values that are passed in are compared to the previous values. If an anchor does not match for an entity, then the method shouldPushAllRecordsForEntityName will return YES for this entity. If there is no value for a entity's anchor, then the entity can either be left out of the dictionary, or even better, the value [NSNull null] can be can be put in the dictionary for that entity name. If there is no value the client will be refreshed and the sync will be treated as if it is the first sync done by the client. The null value (or lack of value) for an anchor should be used on the client's first sync (when there would be no value in the client's data store), or when the data store is cleared or lost. nil is an acceptable value for the dictionary, and will always result in a full refresh sync for all the entities specified in the sync. If a client is using sync anchors, it should also call the method clientFinishedPushingChangesWithNextAnchors after pushing changes, and call the sync anchor variant of clientCommittedAcceptedChanges as outlined below. Failure to make these calls will likely result in the next sync of these entities being a refresh sync. Finally, an exception will be raised if these methods are called on a session that was created using the earlier API that did not include a lastAnchors argument.
     * @deprecated
     */
    static beginSessionWithClient$entityNames$beforeDate$lastAnchors$(client: _ISyncClient, entityNames: _NSArray, date: _NSDate, anchors: _NSDictionary): _ISyncSession;
    /** @deprecated */
    static beginSessionInBackgroundWithClient$entityNames$target$selector$lastAnchors$(client: _ISyncClient, entityNames: _NSArray, target: NobjcObject, selector: string, anchors: _NSDictionary): void;
    /**
     * The default is to assume that a client will be fast syncing all the entities specified when the session was created. Telling the engine that a client was reset is tantamount to saying "forget everything you ever knew about me and let's start over again". In sync parlance, this is what we call a refresh sync. Telling the engine that you want to push all records (ie. slow syncing) just means that you, the client, can't figure out which records have changed since the last sync and so you're going to give all of your records to the engine. The engine will figure out what has changed since the last sync and only provide to you the appropriate sets of changes.
     * @deprecated
     */
    clientDidResetEntityNames$(entityNames: _NSArray): void;
    /** @deprecated */
    clientWantsToPushAllRecordsForEntityNames$(entityNames: _NSArray): void;
    /**
     * These methods query how the engine is going to sync you, the client. -shouldPushChangesForEntityName: returns NO if you should not push any changes for an entity. -shouldPushAllRecordsForEntityName: returns YES if you should give to the engine all of your records. (What we call "slow syncing" in our parlance.) Converseley, -shouldPullChangesForEntityName: returns NO if the engine will not be giving you any changes for an entity and -shouldReplaceAllRecordsOnClientForEntityName: returns YES if you should delete all of your records and replace them with the records the engine will hand you. To a certain extent, these values may be modified by the methods -clientDidResetEntityNames: and -clientWantsToPushAllRecordsForEntityNames: as described above.
     * @deprecated
     */
    shouldPushChangesForEntityName$(entityName: _NSString): boolean;
    /** @deprecated */
    shouldPushAllRecordsForEntityName$(entityName: _NSString): boolean;
    /** @deprecated */
    shouldPullChangesForEntityName$(entityName: _NSString): boolean;
    /** @deprecated */
    shouldReplaceAllRecordsOnClientForEntityName$(entityName: _NSString): boolean;
    /**
     * Phase II: pushing changes from the client. You can create an ISyncChange object yourself and push that directly, or you can give the engine the entire record and let it figure out what the changes are. If you are pushing the record, it should represent the entire state of the record from your backing store. At the very least, every record dictionary MUST have an attribute identifying the entity this record is an instance of, keyed to ISyncRecordEntityNameKey. Consider, for example, some (purely fictional) contact with two email address. The path of the first name is "first name". There are two relationships involving this contact, one for the home address and one for the email addresses. There is one home address, identified by the record 1492.address1, and two email addresses, 1492.email1 and 1492.email2. The record dictionaries for these four records might look something like the following: 1492 { ISyncRecordEntityNameKey = Contact; first name = Edgar; last name = Qwerty; Contact to Address = ( 1492.address1 ); Contact to EmailAddress = ( 1492.email1, 1492.email2 ); } 1492.address1 { ISyncRecordEntityNameKey = Address; label = home; street = 123 Main St.; city = Everywhere; country = USA; postal code = 90210; } 1492.email1 { ISyncRecordEntityNameKey = EmailAddress; type = home; email = asdf@asdf.com; } 1492.email2 { ISyncRecordEntityNameKey = EmailAddress; type = work; label = summer cottage; email = qwerty@keyboard.com; }
     * @deprecated
     */
    pushChange$(change: _ISyncChange): void;
    /** @deprecated */
    pushChangesFromRecord$withIdentifier$(record: _NSDictionary, recordId: _NSString): void;
    /**
     * A convenience to delete a record so you don't have to manually construct an ISyncChange.
     * @deprecated
     */
    deleteRecordWithIdentifier$(recordId: _NSString): void;
    /**
     * The proverbial "soft delete". This indicates that a record no longer exists on the client but this should not be considered a delete. This method is special in that it can be used during either the push phase and the pull phase. You may specify whether or not you want the record back (as an add) during the next pull phase. If you call this method during the push phase and say YES, the record will be re-applied in the pull phase of this same session. If you call this method during the pull phase, it will be replaced in the pull phase of the next session. When invoked with flag set to NO during the pulling phase, this is equivalent to refusing a record using the method clientRefusedChangesForRecordWithIdentifier: This method will not touch the client info, if any, associated with this record.
     * @deprecated
     */
    clientLostRecordWithIdentifier$shouldReplaceOnNextSync$(recordId: _NSString, flag: boolean): void;
    /**
     * If a client is using Sync Anchors, after pushing all changes, a client must create a new sync anchor string for each entity name that was synced, save the anchors in the client datastore, and pass the anchors to clientFinishedPushingChangesWithNextAnchors. As a convenience a single representative entity name to anchor mapping may be used for all of the entities in a dataclass. If the client is pulling the truth, the anchor is specified when calling clientCommittedAcceptedChanges.
     * @deprecated
     */
    clientFinishedPushingChangesWithNextAnchors$(anchors: _NSDictionary): void;
    /**
     * Phase III: pulling changes for the client. The entities that you specify here must be a subset of the entities specified when the session was created.
     * @deprecated
     */
    prepareToPullChangesForEntityNames$beforeDate$(entityNames: _NSArray, date: _NSDate): boolean;
    /** @deprecated */
    prepareToPullChangesInBackgroundForEntityNames$target$selector$(entityNames: _NSArray, target: NobjcObject, selector: string): void;
    /** @deprecated */
    changeEnumeratorForEntityNames$(entityNames: _NSArray): _NSEnumerator;
    /** @deprecated */
    clientAcceptedChangesForRecordWithIdentifier$formattedRecord$newRecordIdentifier$(recordId: _NSString, formattedRecord: _NSDictionary, recordId2: _NSString): void;
    /**
     * This method informs the sync engine that the client has refused to apply the changes for the record specified by recordIdentifier. After invoking this method, the sync engine will not send the same change during any subsequent syncs unless the record is modified. Use filtering if you want to permanently ignore some records. Refusing a record does not change the local id mapping for the client. Invoking this method will not effect other clients participating in the same sync session. This method will not touch the client info, if any, associated with this record.
     * @deprecated
     */
    clientRefusedChangesForRecordWithIdentifier$(recordId: _NSString): void;
    /** @deprecated */
    clientCommittedAcceptedChanges(): void;
    /**
     * If a client is using sync anchors, after accepting pulled changes, a client must create a new sync anchor string for each entity that was synced, save the anchors in the client datastore, and pass the anchors to the call to clientCommittedAcceptedChangesWithNextAnchors. As a convenience a single representative entity name to anchor mapping may be used for all of the entities in a dataclass. If a client is pushing the truth, this method won't be called, but that is fine, as the sync anchors passed into the method clientFinishedPushingChangesWithNextAnchors will be used.
     * @deprecated
     */
    clientCommittedAcceptedChangesWithNextAnchors$(anchors: _NSDictionary): void;
    /** @deprecated */
    clientChangedRecordIdentifiers$(oldToNew: _NSDictionary): void;
    /** @deprecated */
    isCancelled(): boolean;
    /** @deprecated */
    cancelSyncing(): void;
    /** @deprecated */
    finishSyncing(): void;
    /**
     * Conduit-specific, unsynchronized information stored with a record. The data is removed when the client removes the associated record. You can specify any object here, but it must conform to the NSCoding protocol.
     * @deprecated
     */
    clientInfoForRecordWithIdentifier$(recordId: _NSString): NobjcObject;
    /** @deprecated */
    setClientInfo$forRecordWithIdentifier$(clientInfo: _NSCoding, recordId: _NSString): void;
    /**
     * Return a snapshot of the records in the Truth. ISyncSession creates two snap shots during the sync. The first is made when the session is created. The second is made at the same time as the changes for the client are prepared (when -prepareToPullChangesForEntityNames:beforeDate: is called). Compare to the method on ISyncManager.
     * @deprecated
     */
    snapshotOfRecordsInTruth(): _ISyncRecordSnapshot;
    /**
     * Clients can call this method to inform the server that they are still alive but doing something that keeps them busy and prevents them from talking to the server process. This will prevent the server from timing them out on the watchdog.
     * @deprecated
     */
    ping(): void;
}
