import { BimChangeLayer } from '../loader/bim-api-client';
import { TypedResponse } from '../http';
import { Permission } from '../loader/Permission';
import { BimChangeUploadable, UploadApiClientFailure, UploadApiTask, UploadClientOperationAppendFileVersion, UploadClientOperationCreate } from '../loader/client/UploadApiClient';
import { TwinfinityApiClient } from '../loader/client/TwinfinityApiClient';
/**
 * Represents the Layer Attachments API.
 * Contains methods to work with layer attachments for a specific layer.
 * @alpha This class is not fully tested yet. Use with caution.
 */
export declare class LayerAttachmentsApi {
    private readonly _clientApi;
    private readonly _parent;
    /**
     * Creates a new instance of the LayerAttachmentsApiImpl class.
     * @param _clientApi The TwinfinityApiClient instance.
     * @param _parent The parent object containing the layer and permission-related methods.
     */
    constructor(_clientApi: TwinfinityApiClient, _parent: {
        layer: BimChangeLayer;
        throwIfNoPermissionsAreSatisfied(...requiredPermissions: Permission[]): void;
    });
    /**
     * Adds a new attachment to the layer.
     * @param options The options for creating the attachment.
     * @returns A promise that resolves to the created attachment or an error.
     */
    add<Change extends BimChangeUploadable = BimChangeUploadable>(options: Pick<UploadClientOperationCreate, 'metadata' | 'content' | 'filename'>): Promise<UploadApiClientFailure | UploadApiTask<Change>>;
    /**
     * Checks if the given change is an attachment of the layer.
     * @param change The change to check.
     * @returns True if the change is an attachment of the layer, false otherwise.
     */
    isAttachment(change: BimChangeUploadable): boolean;
    /**
     * Determines whether the caller has sufficient permissions to add attachments to the layer.
     * @returns True if attachments can be added to the layer, false otherwise.
     */
    canAdd(): boolean;
    /**
     * Determines whether the caller has sufficient permissions to update a attachment (create a new version of it) on the layer.
     * @param attachment The attachment to check.
     * @returns True if the attachment can be updated (new version created), false otherwise.
     */
    canUpdate(attachment: BimChangeUploadable): boolean;
    /**
     * Retrieves all attachments of the layer (may be none).
     * @returns List of attachments.
     */
    get<Change extends BimChangeUploadable = BimChangeUploadable>(): Promise<TypedResponse<Change[]>>;
    /**
     * Updates an existing attachment with a new version.
     * @param attachment The attachment to update.
     * @param options The options for updating the attachment.
     * @returns A promise that resolves to the updated attachment or an error.
     */
    update<Change extends BimChangeUploadable = BimChangeUploadable>(attachment: Change, options: Pick<UploadClientOperationAppendFileVersion<Change>, 'metadata' | 'content'>): Promise<UploadApiClientFailure | UploadApiTask<Change>>;
    /**
     * Deletes the specified attachments from the layer.
     * @param changes The attachments to delete.
     * @returns A promise that resolves to the number of deleted attachments or an error.
     */
    delete(changes: BimChangeUploadable[]): Promise<TypedResponse<number>[]>;
    /**
     * Throws an error if the attachment does not belong to the layer.
     * @param attachment The attachment to check.
     */
    private throwIfAttachmentDoesNotBelongToLayer;
}
//# sourceMappingURL=LayerAttachmentsApi.d.ts.map