Update videos api list for account
[oweals/peertube.git] / shared / models / videos / video.model.ts
1 import { Account } from '../actors'
2 import { Avatar } from '../avatars/avatar.model'
3 import { VideoChannel } from './video-channel.model'
4 import { VideoPrivacy } from './video-privacy.enum'
5
6 export interface VideoFile {
7   magnetUri: string
8   resolution: number
9   resolutionLabel: string
10   size: number // Bytes
11   torrentUrl: string
12   fileUrl: string
13 }
14
15 export interface Video {
16   id: number
17   uuid: string
18   createdAt: Date | string
19   updatedAt: Date | string
20   categoryLabel: string
21   category: number
22   licenceLabel: string
23   licence: number
24   languageLabel: string
25   language: number
26   description: string
27   duration: number
28   isLocal: boolean
29   name: string
30   thumbnailPath: string
31   previewPath: string
32   embedPath: string
33   views: number
34   likes: number
35   dislikes: number
36   nsfw: boolean
37
38   account: {
39     name: string
40     displayName: string
41     url: string
42     host: string
43     avatar: Avatar
44   }
45 }
46
47 export interface VideoDetails extends Video {
48   privacy: VideoPrivacy
49   privacyLabel: string
50   descriptionPath: string
51   support: string
52   channel: VideoChannel
53   tags: string[]
54   files: VideoFile[]
55   account: Account
56   commentsEnabled: boolean
57 }