import type { RxDocument, RxPlugin, RxAttachmentData, RxDocumentData, RxAttachmentCreator, RxCollection, RxAttachmentCreatorBase64 } from '../../types/index.d.ts'; /** * an RxAttachment is basically just the attachment-stub * wrapped so that you can access the attachment-data */ export declare class RxAttachment { doc: RxDocument; id: string; type: string; length: number; digest: string; constructor({ doc, id, type, length, digest }: any); remove(): Promise; /** * returns the data for the attachment */ getData(): Promise; getStringData(): Promise; getDataBase64(): Promise; } export declare function fromStorageInstanceResult(id: string, attachmentData: RxAttachmentData, rxDocument: RxDocument): RxAttachment; export declare function putAttachment(this: RxDocument, attachmentData: RxAttachmentCreator): Promise; export declare function putAttachmentBase64(this: RxDocument, attachmentData: RxAttachmentCreatorBase64): Promise>; /** * Write multiple attachments in a single atomic operation. */ export declare function putAttachments(this: RxDocument, attachments: RxAttachmentCreator[]): Promise; /** * get an attachment of the document by its id */ export declare function getAttachment(this: RxDocument, id: string): RxAttachment | null; /** * returns all attachments of the document */ export declare function allAttachments(this: RxDocument): RxAttachment[]; export declare function preMigrateDocument(data: { docData: RxDocumentData; oldCollection: RxCollection; }): Promise; export declare function postMigrateDocument(_action: any): Promise; export declare const RxDBAttachmentsPlugin: RxPlugin; export * from './attachments-utils.ts';