]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/videos/video.model.ts
Update videos response api
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video.model.ts
CommitLineData
50d6de9c 1import { Account } from '../actors'
b64c950a 2import { Avatar } from '../avatars/avatar.model'
72c7248b 3import { VideoChannel } from './video-channel.model'
fd45e8f4 4import { VideoPrivacy } from './video-privacy.enum'
72c7248b 5
ae5a3dd6
C
6export interface VideoConstant <T> {
7 id: number
8 label: string
9}
10
93e1258c
C
11export interface VideoFile {
12 magnetUri: string
ae5a3dd6 13 resolution: VideoConstant<number>
93e1258c 14 size: number // Bytes
a96aed15
C
15 torrentUrl: string
16 fileUrl: string
93e1258c
C
17}
18
69818c93 19export interface Video {
0a6658fd
C
20 id: number
21 uuid: string
d592e0a9
C
22 createdAt: Date | string
23 updatedAt: Date | string
ae5a3dd6
C
24 category: VideoConstant<number>
25 licence: VideoConstant<number>
26 language: VideoConstant<number>
69f616ab
C
27 description: string
28 duration: number
29 isLocal: boolean
69f616ab 30 name: string
69f616ab 31 thumbnailPath: string
f981dae8 32 previewPath: string
d8755eed 33 embedPath: string
69f616ab
C
34 views: number
35 likes: number
36 dislikes: number
37 nsfw: boolean
b64c950a
C
38
39 account: {
40 name: string
41 displayName: string
42 url: string
43 host: string
44 avatar: Avatar
45 }
72c7248b
C
46}
47
48export interface VideoDetails extends Video {
ae5a3dd6 49 privacy: VideoConstant<VideoPrivacy>
fd45e8f4 50 descriptionPath: string
2422c46b 51 support: string
72c7248b 52 channel: VideoChannel
d48ff09d 53 tags: string[]
93e1258c 54 files: VideoFile[]
b1fa3eba 55 account: Account
47564bbe 56 commentsEnabled: boolean
69818c93 57}