/**
 * Attachment helper bound to one model + attachment name.
 */
export default class RecordAttachmentHandle {
    /**
     * Runs constructor.
     * @param {object} args - Options.
     * @param {import("../index.js").default} args.model - Model instance.
     * @param {string} args.name - Attachment name.
     * @param {"hasOne" | "hasMany"} args.type - Attachment type.
     */
    constructor({ model, name, type }: {
        model: import("../index.js").default;
        name: string;
        type: "hasOne" | "hasMany";
    });
    /**
     * Pending inputs.
      @type {Array<?>} */
    pendingInputs: Array<unknown>;
    model: import("../index.js").default;
    name: string;
    type: "hasMany" | "hasOne";
    /**
     * Runs has pending attachments.
     * @returns {boolean} - Whether there are pending attachment writes.
     */
    hasPendingAttachments(): boolean;
    /**
     * Runs queue attach.
     * @param {?} input - Attachment input.
     * @returns {void} - Queues attachment write for next save.
     */
    queueAttach(input: unknown): void;
    /**
     * Runs attach.
     * @param {?} input - Attachment input.
     * @returns {Promise<void>} - Resolves when attached.
     */
    attach(input: unknown): Promise<void>;
    /**
     * Runs flush pending attachments.
     * @returns {Promise<void>} - Resolves when pending attachments are flushed.
     */
    flushPendingAttachments(): Promise<void>;
    /**
     * Runs download.
     * @param {string} [id] - Optional attachment id for has-many attachments.
     * @returns {Promise<RecordAttachmentDownload | null>} - Downloaded attachment.
     */
    download(id?: string): Promise<RecordAttachmentDownload | null>;
    /**
     * Runs download all.
     * @returns {Promise<Array<RecordAttachmentDownload>>} - Downloaded attachments.
     */
    downloadAll(): Promise<Array<RecordAttachmentDownload>>;
    /**
     * Runs url.
     * @param {string} [id] - Optional attachment id for has-many attachments.
     * @returns {Promise<string | null>} - Resolvable attachment URL.
     */
    url(id?: string): Promise<string | null>;
}
import RecordAttachmentDownload from "./download.js";
//# sourceMappingURL=handle.d.ts.map