UNPKG

@jrmc/adonis-attachment

Version:

Turn any field on your Lucid model to an attachment data type

32 lines 1.27 kB
import type { RowWithAttachment } from '../types/mixin.js'; import type { Attachment as AttachmentType } from '../types/attachment.js'; import type { RecordWithAttachment as RecordWithAttachmentImplementation } from '../types/service.js'; import type { RegenerateOptions } from '../types/regenerate.js'; export default class RecordWithAttachment implements RecordWithAttachmentImplementation { #private; constructor(row: RowWithAttachment); /** * During commit, we should cleanup the old detached files */ commit(): Promise<void>; /** * During rollback we should remove the attached files. */ rollback(): Promise<void>; persist(): Promise<void>; transaction(options?: { enabledRollback: boolean; }): Promise<void>; preComputeUrl(): Promise<void>; generateVariants(): Promise<void>; regenerateVariants(options?: RegenerateOptions): Promise<void>; detach(): Promise<PromiseSettledResult<void>[]>; detachAll(): Promise<PromiseSettledResult<void>[]>; get row(): RowWithAttachment; getAttachments(options: { attributeName: string; requiredOriginal?: boolean; requiredDirty?: boolean; }): AttachmentType[]; } //# sourceMappingURL=record_with_attachment.d.ts.map