aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/search/videos-common-query.model.ts
blob: da479c928b2407b50e9ad5d06c86954d6360ea31 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { VideoPrivacy } from '@shared/models'
import { VideoInclude } from '../videos/video-include.enum'
import { BooleanBothQuery } from './boolean-both-query.model'

// These query parameters can be used with any endpoint that list videos
export interface VideosCommonQuery {
  start?: number
  count?: number
  sort?: string

  nsfw?: BooleanBothQuery

  isLive?: boolean

  // FIXME: deprecated in 4.0 in favour of isLocal and include, to remove
  filter?: never

  isLocal?: boolean
  include?: VideoInclude

  categoryOneOf?: number[]

  licenceOneOf?: number[]

  languageOneOf?: string[]

  privacyOneOf?: VideoPrivacy[]

  tagsOneOf?: string[]
  tagsAllOf?: string[]

  hasHLSFiles?: boolean
  hasWebtorrentFiles?: boolean

  skipCount?: boolean

  search?: string

  excludeAlreadyWatched?: boolean
}

export interface VideosCommonQueryAfterSanitize extends VideosCommonQuery {
  start: number
  count: number
  sort: string

  // FIXME: deprecated in 4.0, to remove
  filter?: never
}