aboutsummaryrefslogtreecommitdiffhomepage
path: root/packages/models/src/search/videos-common-query.model.ts
blob: 45181a73997c0f15dc92a12ec2f27cdf8143e247 (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
import { VideoIncludeType } from '../videos/video-include.enum.js'
import { VideoPrivacyType } from '../videos/video-privacy.enum.js'
import { BooleanBothQuery } from './boolean-both-query.model.js'

// 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

  isLocal?: boolean
  include?: VideoIncludeType

  categoryOneOf?: number[]

  licenceOneOf?: number[]

  languageOneOf?: string[]

  privacyOneOf?: VideoPrivacyType[]

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

  hasHLSFiles?: boolean

  hasWebtorrentFiles?: boolean // TODO: remove in v7
  hasWebVideoFiles?: boolean

  skipCount?: boolean

  search?: string

  excludeAlreadyWatched?: boolean
}

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