]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/videos/video.model.ts
Update videos response api
[github/Chocobozzz/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 VideoConstant <T> {
7 id: number
8 label: string
9 }
10
11 export interface VideoFile {
12 magnetUri: string
13 resolution: VideoConstant<number>
14 size: number // Bytes
15 torrentUrl: string
16 fileUrl: string
17 }
18
19 export interface Video {
20 id: number
21 uuid: string
22 createdAt: Date | string
23 updatedAt: Date | string
24 category: VideoConstant<number>
25 licence: VideoConstant<number>
26 language: VideoConstant<number>
27 description: string
28 duration: number
29 isLocal: boolean
30 name: string
31 thumbnailPath: string
32 previewPath: string
33 embedPath: string
34 views: number
35 likes: number
36 dislikes: number
37 nsfw: boolean
38
39 account: {
40 name: string
41 displayName: string
42 url: string
43 host: string
44 avatar: Avatar
45 }
46 }
47
48 export interface VideoDetails extends Video {
49 privacy: VideoConstant<VideoPrivacy>
50 descriptionPath: string
51 support: string
52 channel: VideoChannel
53 tags: string[]
54 files: VideoFile[]
55 account: Account
56 commentsEnabled: boolean
57 }