From 9c4cc64dcb68e774ea6cd52855842f6fe7c2f808 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Fri, 30 Apr 2021 18:03:04 +0200 Subject: [PATCH] More precise MVideo type. --- server/@types/peertube.d.ts | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/server/@types/peertube.d.ts b/server/@types/peertube.d.ts index c00078ec..1fd5d6ae 100644 --- a/server/@types/peertube.d.ts +++ b/server/@types/peertube.d.ts @@ -40,7 +40,42 @@ interface PluginVideoLanguageManager { deleteLanguage: (languageKey: string) => boolean } -type MVideoThumbnail = any // FIXME +enum VideoPrivacy { + PUBLIC = 1, + UNLISTED = 2, + PRIVATE = 3, + INTERNAL = 4 +} + +enum VideoState { + PUBLISHED = 1, + TO_TRANSCODE = 2, + TO_IMPORT = 3, + WAITING_FOR_LIVE = 4, + LIVE_ENDED = 5 +} + +interface MVideoThumbnail { // FIXME: this interface is not complete. + uuid: string + name: string + category: number + licence: number + language: string + privacy: VideoPrivacy + nsfw: boolean + description: string + support: string + duration: number + videos: number + likes: number + dislikes: number + remote: boolean + isLive: boolean + url: string + commentsEnabled: boolean + downloadEnabled: boolean + state: VideoState +} interface VideoBlacklistCreate { reason?: string