import type { FileProgress } from './FileProgress.js'; export type Meta = Record; export type Body = Record; export interface InternalMetadata { name: string; type?: string; relativePath?: string; } export type UppyFileId = string; interface UppyFileBase { error?: string | null; extension: string; id: UppyFileId; isPaused?: boolean; isRestored?: boolean; isGhost: boolean; meta: InternalMetadata & M; name: string; preview?: string; progress: FileProgress; missingRequiredMetaFields?: string[]; serverToken?: string | null; size: number | null; source?: string; type: string; uploadURL?: string; response?: { body?: B; status: number; bytesUploaded?: number; uploadURL?: string; }; } export interface LocalUppyFile extends UppyFileBase { isRemote: false; data: Blob | File | undefined; } export interface LocalUppyFileNonGhost extends UppyFileBase { isRemote: false; isGhost: false; data: Blob | File; } export interface RemoteUppyFile extends UppyFileBase { data: { size: number | null; }; isRemote: true; remote: { body?: Record; companionUrl: string; host?: string; provider?: string; providerName?: string; requestClientId: string; url: string; }; } export type UppyFile = LocalUppyFile | RemoteUppyFile; /** * For when you know the file is not a ghost, and data is definitely present. */ export type UppyFileNonGhost = LocalUppyFileNonGhost | RemoteUppyFile; export type MinimalRequiredUppyFile = Required, 'name'>> & { data: NonNullable['data']>; } & Partial, 'name' | 'meta' | 'data'>> & { meta?: M; }; export {}; //# sourceMappingURL=UppyFile.d.ts.map