export type FileAudioMetadata = { duration?: number bitRate?: number sampleRate?: number channels?: number /** Waveform peak amplitudes for rendering audio visualizations. */ peaks?: number[] } export type FileData = { audioMetadata?: FileAudioMetadata } export type FileStorage = | 's3' | 'oracle' | 'fs' | 'oracleFallback' | 'wpLvS3' | 'wpBrowserDataS3' | 'exportsS3' | string export type File = { id: string url: string name: string | null checksum: string | null mimetype: string extension: string isEncrypted: boolean iv: string | null attachedId: string | null attachedType: string | null storage: FileStorage data: FileData accountId: string serviceId: string | null createdAt: string updatedAt: string deletedAt: string | null } export type CreateFilePayload = { name?: string mimetype: string extension: string attachedId?: string attachedType?: string serviceId?: string data?: FileData } export type UpdateFilePayload = { name?: string attachedId?: string | null attachedType?: string | null }