1 import { ContextType } from '../activitypub/context'
2 import { VideoResolution } from '../videos/video-resolution.enum'
3 import { SendEmailOptions } from './emailer.model'
5 export type JobState = 'active' | 'completed' | 'failed' | 'waiting' | 'delayed' | 'paused'
8 | 'activitypub-http-unicast'
9 | 'activitypub-http-broadcast'
10 | 'activitypub-http-fetcher'
11 | 'activitypub-follow'
17 | 'activitypub-refresher'
21 export interface Job {
28 createdAt: Date | string
29 finishedOn: Date | string
30 processedOn: Date | string
33 export type ActivitypubHttpBroadcastPayload = {
35 signatureActorId?: number
37 contextType?: ContextType
40 export type ActivitypubFollowPayload = {
41 followerActorId: number
44 isAutoFollow?: boolean
45 assertIsChannel?: boolean
48 export type FetchType = 'activity' | 'video-likes' | 'video-dislikes' | 'video-shares' | 'video-comments' | 'account-playlists'
49 export type ActivitypubHttpFetcherPayload = {
56 export type ActivitypubHttpUnicastPayload = {
58 signatureActorId?: number
60 contextType?: ContextType
63 export type RefreshPayload = {
64 type: 'video' | 'video-playlist' | 'actor'
68 export type EmailPayload = SendEmailOptions
70 export type VideoFileImportPayload = {
75 export type VideoImportTorrentPayloadType = 'magnet-uri' | 'torrent-file'
76 export type VideoImportYoutubeDLPayloadType = 'youtube-dl'
78 export type VideoImportYoutubeDLPayload = {
79 type: VideoImportYoutubeDLPayloadType
82 generateThumbnail: boolean
83 generatePreview: boolean
86 export type VideoImportTorrentPayload = {
87 type: VideoImportTorrentPayloadType
90 export type VideoImportPayload = VideoImportYoutubeDLPayload | VideoImportTorrentPayload
92 export type VideoRedundancyPayload = {
96 // Video transcoding payloads
98 interface BaseTranscodingPayload {
103 interface HLSTranscodingPayload extends BaseTranscodingPayload {
105 isPortraitMode?: boolean
106 resolution: VideoResolution
110 export interface NewResolutionTranscodingPayload extends BaseTranscodingPayload {
111 type: 'new-resolution'
112 isPortraitMode?: boolean
113 resolution: VideoResolution
116 export interface MergeAudioTranscodingPayload extends BaseTranscodingPayload {
118 resolution: VideoResolution
121 export interface OptimizeTranscodingPayload extends BaseTranscodingPayload {
125 export type VideoTranscodingPayload =
126 HLSTranscodingPayload
127 | NewResolutionTranscodingPayload
128 | OptimizeTranscodingPayload
129 | MergeAudioTranscodingPayload
131 export interface VideoLiveEndingPayload {