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'
8 | 'activitypub-http-unicast'
9 | 'activitypub-http-broadcast'
10 | 'activitypub-http-fetcher'
11 | 'activitypub-follow'
17 | 'activitypub-refresher'
21 export interface Job {
27 createdAt: Date | string
28 finishedOn: Date | string
29 processedOn: Date | string
32 export type ActivitypubHttpBroadcastPayload = {
34 signatureActorId?: number
36 contextType?: ContextType
39 export type ActivitypubFollowPayload = {
40 followerActorId: number
43 isAutoFollow?: boolean
44 assertIsChannel?: boolean
47 export type FetchType = 'activity' | 'video-likes' | 'video-dislikes' | 'video-shares' | 'video-comments' | 'account-playlists'
48 export type ActivitypubHttpFetcherPayload = {
55 export type ActivitypubHttpUnicastPayload = {
57 signatureActorId?: number
59 contextType?: ContextType
62 export type RefreshPayload = {
63 type: 'video' | 'video-playlist' | 'actor'
67 export type EmailPayload = SendEmailOptions
69 export type VideoFileImportPayload = {
74 export type VideoImportTorrentPayloadType = 'magnet-uri' | 'torrent-file'
75 export type VideoImportYoutubeDLPayloadType = 'youtube-dl'
77 export type VideoImportYoutubeDLPayload = {
78 type: VideoImportYoutubeDLPayloadType
81 generateThumbnail: boolean
82 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 {