export type FileCellType = "image" | "video" | "audio" | "file"; export type FileStorageType = "internal" | "external"; export interface AttachmentMetadata { [key: string]: string | number | boolean; } export interface AttachmentOptions { filePath?: string; data?: Buffer | Uint8Array; filename?: string; contentType?: string; fileType?: FileCellType; metadata?: AttachmentMetadata; } export declare class Attachment { readonly type: "attachment"; private _filePath?; private _data?; private _filename?; private _contentType?; private _fileType?; private _metadata?; constructor(options: AttachmentOptions); getData(): Promise; getFileName(): string; getContentType(): string; get fileType(): FileCellType; get metadata(): AttachmentMetadata | undefined; } export interface ExternalAttachmentOptions { url: string; filename?: string; contentType?: string; fileType?: FileCellType; metadata?: AttachmentMetadata; } export declare class ExternalAttachment { readonly type: "external"; private _url; private _filename?; private _contentType?; private _fileType; private _metadata?; constructor(options: ExternalAttachmentOptions); get url(): string; get filename(): string | undefined; get contentType(): string | undefined; get fileType(): FileCellType; get metadata(): AttachmentMetadata | undefined; } export declare class AttachmentReference { readonly storageType: FileStorageType; readonly storageKey: string; readonly url: string | undefined; readonly fileType: FileCellType; readonly metadata?: AttachmentMetadata | undefined; constructor(storageType: FileStorageType, storageKey: string, url: string | undefined, fileType: FileCellType, metadata?: AttachmentMetadata | undefined); download(filePath?: string): Promise; getUrl(): string | undefined; toJSON(): Record; } export declare function isAttachment(value: unknown): value is Attachment; export declare function isExternalAttachment(value: unknown): value is ExternalAttachment; export declare function isAttachmentReference(value: unknown): value is AttachmentReference; export declare function isAnyAttachment(value: unknown): value is Attachment | ExternalAttachment; export declare const attachment: { file: (filePath: string, options?: { filename?: string; contentType?: string; fileType?: FileCellType; metadata?: AttachmentMetadata; }) => Attachment; buffer: (data: Buffer | Uint8Array, filename: string, options?: { contentType?: string; fileType?: FileCellType; metadata?: AttachmentMetadata; }) => Attachment; url: (url: string, options?: { filename?: string; contentType?: string; fileType?: FileCellType; metadata?: AttachmentMetadata; }) => ExternalAttachment; }; //# sourceMappingURL=attachment.d.ts.map