import type { RxDocument, RxPlugin, OldRxCollection, RxAttachmentData, RxDocumentData, RxAttachmentCreator } from '../../types'; /** * 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; } export declare function fromStorageInstanceResult(id: string, attachmentData: RxAttachmentData, rxDocument: RxDocument): RxAttachment; export declare function putAttachment(this: RxDocument, attachmentData: 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: OldRxCollection; }): Promise; export declare function postMigrateDocument(_action: any): Promise; export declare const NxDBAttachmentsPlugin: RxPlugin;