import type { _CKRecord } from "./CKRecord.js";
import type { _CKRecordID } from "./CKRecordID.js";
import type { _CKRecordZoneID } from "./CKRecordZoneID.js";
import type { _CKShareParticipant } from "./CKShareParticipant.js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSCoder } from "../Foundation/NSCoder.js";
import type { _NSCopying } from "../Foundation/NSCopying.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { _NSURL } from "../Foundation/NSURL.js";
import type { CKShareParticipantPermission } from "./CKShareParticipantPermission.js";
export declare class _CKShare extends _CKRecord {
    static alloc(): _CKShare;
    static new(): _CKShare;
    init(): _CKShare;
    /**
     * When saving a newly created CKShare, you must save the share and its rootRecord in the same CKModifyRecordsOperation batch.
     */
    initWithRootRecord$(rootRecord: _CKRecord): _CKShare;
    initWithRootRecord$shareID$(rootRecord: _CKRecord, shareID: _CKRecordID): _CKShare;
    /**
     * Creates a zone-wide @c CKShare. A zone-wide @c CKShare can only exist in a zone with sharing capability @c CKRecordZoneCapabilityZoneWideSharing. Only one such share can exist in a zone at a time. All records in this zone will appear in a participant's @c CKFetchRecordZoneChangesOperation results in the shared database after the share has been accepted by the participant. Since these shares do not have an associated root record, @c shouldFetchRootRecord and @c rootRecordDesiredKeys are always ignored when running a @c CKFetchShareMetadataOperation on a zone-wide share URL. Additionally, @c rootRecordID on the resulting @c CKShareMetadata is always absent.
     */
    initWithRecordZoneID$(recordZoneID: _CKRecordZoneID): _CKShare;
    initWithCoder$(aDecoder: _NSCoder): _CKShare;
    /**
     * @discussion If a participant with a matching userIdentity already exists, then that existing participant's properties will be updated; no new participant will be added. A ``CKShareParticipant`` instance that has already been added to one ``CKShare`` cannot be added to another, unless it is removed from the first ``CKShare`` through `removeParticipant`. In order to modify the list of participants, a share must have publicPermission set to @c CKShareParticipantPermissionNone. That is, you cannot mix-and-match private users and public users in the same share. @see CKShareParticipantRole
     */
    addParticipant$(participant: _CKShareParticipant): void;
    /**
     * @discussion It's not allowed to call `removeParticipant` on a ``CKShare`` with a ``CKShareParticipant`` that has never been added to that share through `addParticipant`.
     */
    removeParticipant$(participant: _CKShareParticipant): void;
    /**
     * Invitation URLs that can be used by any receiver to claim the associated participantID and join the share. Only available after a share record has been saved to the server for participants created via ``CKShareParticipant/oneTimeURLParticipant``. One-time URLs are stable, and tied to the associated participantIDs as long as the participant is part of the share. Typically, a recipient user invited via their handle is provided a ``URL`` directly by the share's owner. However, any user can also use a one-time URL in the same manner to fetch share metadata and accept the share. After share acceptance, the one-time URL becomes functionally equivalent to the regular ``URL``. - Parameters: - participantID: The ``CKShareParticipant/participantID`` corresponding to the ``CKShareParticipant/oneTimeURLParticipant`` added to the share.
     */
    oneTimeURLForParticipantID$(participantID: _NSString): _NSURL | null;
    /**
     * Denies access requests from specified users. Use this method to deny pending access requests from uninvited users. Denied requesters are removed from the ``CloudKit/CKShare/requesters`` array. To persist the changes, save the share to the server after calling this method. After denial, requesters can still submit new access requests unless explicitly blocked using ``CloudKit/CKShare/blockRequesters:``. Only the share owner or an administrator can invoke this method. Attempts by other participants result in an exception. - Parameter requesters: An array of ``CKShareAccessRequester`` objects to deny.
     */
    denyRequesters$(requesters: _NSArray): void;
    /**
     * Blocks specified users from requesting access to this share. Blocking prevents users from submitting future access requests and removes existing participants from the share. Blocked requesters appear in the ``CloudKit/CKShare/blockedIdentities`` array. To persist this change, save the share to the server after calling this method. Only the share owner or an administrator can invoke this method. Attempts by other participants result in an exception. - Parameter requesters: An array of ``CKShareAccessRequester`` objects to block.
     */
    blockRequesters$(requesters: _NSArray): void;
    /**
     * Unblocks previously blocked users, allowing them to request access again. Use this method to remove specified identities from the ``CloudKit/CKShare/blockedIdentities`` array. Unblocked identities can request access again if access requests are enabled. To persist this change, save the share to the server after calling this method. Only the share owner or an administrator can invoke this method. Attempts by other participants result in an exception. - Parameter blockedIdentities: An array of ``CKShareBlockedIdentity`` objects to unblock.
     */
    unblockIdentities$(blockedIdentities: _NSArray): void;
    /**
     * @abstract Defines what permission a user has when not explicitly added to the share. @discussion Shares with @c publicPermission more permissive than @c CKShareParticipantPermissionNone can be joined by any user with access to the share's shareURL. By default, public permission is @c CKShareParticipantPermissionNone. Changing the public permission to @c CKShareParticipantPermissionReadOnly or @c CKShareParticipantPermissionReadWrite will result in all pending participants being removed. Already-accepted participants will remain on the share. Changing the public permission to @c CKShareParticipantPermissionNone will result in all participants being removed from the share. You may subsequently choose to call @c addParticipant: before saving the share, those participants will be added to the share.
     */
    publicPermission(): CKShareParticipantPermission;
    setPublicPermission$(value: CKShareParticipantPermission): void;
    /**
     * @abstract A URL that can be used to invite participants to this share. @discussion Only available after share record has been saved to the server. This url is stable, and is tied to the rootRecord. That is, if you share a rootRecord, delete the share, and re-share the same rootRecord via a newly created share, that newly created share's url will be identical to the prior share's url
     */
    URL(): _NSURL | null;
    /**
     * @abstract All participants on the share that the current user has permissions to see. @discussion At the minimum that will include the owner and the current user.
     */
    participants(): _NSArray;
    /** Convenience methods for fetching special users from the participant array */
    owner(): _CKShareParticipant;
    currentUserParticipant(): _CKShareParticipant | null;
    /**
     * A list of all uninvited users who have requested access to this share. When share access requests are allowed, uninvited users can request to join the share. All pending access requests appear in this array. Each requester is returned with name components and either an email or phone number. Either share owners or administrators can respond to these access requests. ### Responding to Access Requests: - **Approve Requesters:** - Fetch the participant information by running ``CKFetchShareParticipantsOperation`` with the requester's ``CKShareAccessRequester/participantLookupInfo``. - Add the resulting participant to the share. - **Deny Requesters:** - Use ``CloudKit/CKShare/denyRequesters:`` to remove the requester from the requesters list. - **Block Requesters:** - Use ``CloudKit/CKShare/blockRequesters:`` to block requesters. - Blocking a requester prevents them from sending future access requests to the share.
     */
    requesters(): _NSArray;
    /**
     * A list of users blocked from requesting access to this share. Identities remain in this list until an owner or administrator calls ``CloudKit/CKShare/unblockIdentities:``.
     */
    blockedIdentities(): _NSArray;
    /**
     * Indicates whether uninvited users can request access to this share. By default, this property is set to `NO`. When set to `YES`, uninvited users can request access to the share if they discover the share URL. When set to `NO`, the server prevents uninvited users from requesting access and does not indicate whether the share exists. Only the share owner or an administrator can modify this property. Attempts by other participants to modify this property result in an exception.
     */
    allowsAccessRequests(): boolean;
    setAllowsAccessRequests$(value: boolean): void;
}
export interface _CKShare extends _NSCopying {
}
