import { Video, VideoDetails } from '@peertube/peertube-types' import { IndexableDoc } from './indexable-doc.model' import { DBChannel, DBChannelSummary } from './channel.model' import { DBAccount, DBAccountSummary } from './account.model' export interface IndexableVideo extends Video, IndexableDoc { } export interface IndexableVideoDetails extends VideoDetails, IndexableDoc { } type IgnoredVideoFields = 'isLocal' | 'createdAt' | 'updatedAt' | 'publishedAt' | 'originallyPublishedAt' | 'channel' | 'account' interface DBVideoShared { indexedAt: number createdAt: number updatedAt: number publishedAt: number originallyPublishedAt: number host: string url: string } export interface DBVideo extends Omit, DBVideoShared { account: DBAccountSummary channel: DBChannelSummary } export interface DBVideoDetails extends Omit, DBVideoShared { account: DBAccount channel: DBChannel _rankingScore?: number } // Results from the search API export interface APIVideo extends Video { tags: VideoDetails['tags'] score: number }