import memoizee from 'memoizee';
import { Transaction } from 'sequelize';
import { Model } from 'sequelize-typescript';
import { MStreamingPlaylistVideo, MVideo, MVideoWithHost } from '../../types/models';
import { VideoStorage } from '../../../shared/models';
import { AttributesOnly } from '../../../shared/typescript-utils';
import { MVideoFile, MVideoFileStreamingPlaylistVideo, MVideoFileVideo } from '../../types/models/video/video-file';
import { VideoRedundancyModel } from '../redundancy/video-redundancy';
import { VideoModel } from './video';
import { VideoStreamingPlaylistModel } from './video-streaming-playlist';
export declare enum ScopeNames {
    WITH_VIDEO = "WITH_VIDEO",
    WITH_METADATA = "WITH_METADATA",
    WITH_VIDEO_OR_PLAYLIST = "WITH_VIDEO_OR_PLAYLIST"
}
export declare class VideoFileModel extends Model<Partial<AttributesOnly<VideoFileModel>>> {
    createdAt: Date;
    updatedAt: Date;
    resolution: number;
    size: number;
    extname: string;
    infoHash: string;
    fps: number;
    metadata: any;
    metadataUrl: string;
    fileUrl: string;
    filename: string;
    torrentUrl: string;
    torrentFilename: string;
    videoId: number;
    storage: VideoStorage;
    Video: VideoModel;
    videoStreamingPlaylistId: number;
    VideoStreamingPlaylist: VideoStreamingPlaylistModel;
    RedundancyVideos: VideoRedundancyModel[];
    static doesInfohashExistCached: typeof VideoFileModel.doesInfohashExist & memoizee.Memoized<typeof VideoFileModel.doesInfohashExist>;
    static doesInfohashExist(infoHash: string): Promise<boolean>;
    static doesVideoExistForVideoFile(id: number, videoIdOrUUID: number | string): Promise<boolean>;
    static doesOwnedTorrentFileExist(filename: string): Promise<boolean>;
    static doesOwnedWebTorrentVideoFileExist(filename: string): Promise<boolean>;
    static loadByFilename(filename: string): Promise<VideoFileModel>;
    static loadWithVideoOrPlaylistByTorrentFilename(filename: string): Promise<VideoFileModel>;
    static loadWithMetadata(id: number): Promise<VideoFileModel>;
    static loadWithVideo(id: number): Promise<VideoFileModel>;
    static loadWithVideoOrPlaylist(id: number, videoIdOrUUID: number | string): Promise<VideoFileModel>;
    static listByStreamingPlaylist(streamingPlaylistId: number, transaction: Transaction): Promise<VideoFileModel[]>;
    static getStats(): Promise<{
        totalLocalVideoFilesSize: number;
    }>;
    static customUpsert(videoFile: MVideoFile, mode: 'streaming-playlist' | 'video', transaction: Transaction): Promise<VideoFileModel>;
    static removeHLSFilesOfVideoId(videoStreamingPlaylistId: number): Promise<number>;
    hasTorrent(): string;
    getVideoOrStreamingPlaylist(this: MVideoFileVideo | MVideoFileStreamingPlaylistVideo): MVideo | MStreamingPlaylistVideo;
    getVideo(this: MVideoFileVideo | MVideoFileStreamingPlaylistVideo): MVideo;
    isAudio(): boolean;
    isLive(): boolean;
    isHLS(): boolean;
    getObjectStorageUrl(): string;
    getFileUrl(video: MVideo): string;
    getFileStaticPath(video: MVideo): string;
    getFileDownloadUrl(video: MVideoWithHost): string;
    getRemoteTorrentUrl(video: MVideo): string;
    getTorrentUrl(): string;
    getTorrentStaticPath(): string;
    getTorrentDownloadUrl(): string;
    removeTorrent(): Promise<void | import("winston").Logger>;
    hasSameUniqueKeysThan(other: MVideoFile): boolean;
    withVideoOrPlaylist(videoOrPlaylist: MVideo | MStreamingPlaylistVideo): this & {
        VideoStreamingPlaylist: MStreamingPlaylistVideo;
    };
}
//# sourceMappingURL=video-file.d.ts.map