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 {
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
87 export type VideoImportTorrentPayload = {
88 type: VideoImportTorrentPayloadType
91 export type VideoImportPayload = VideoImportYoutubeDLPayload | VideoImportTorrentPayload
93 export type VideoRedundancyPayload = {
97 // Video transcoding payloads
99 interface BaseTranscodingPayload {
104 interface HLSTranscodingPayload extends BaseTranscodingPayload {
106 isPortraitMode?: boolean
107 resolution: VideoResolution
111 export interface NewResolutionTranscodingPayload extends BaseTranscodingPayload {
112 type: 'new-resolution'
113 isPortraitMode?: boolean
114 resolution: VideoResolution
117 export interface MergeAudioTranscodingPayload extends BaseTranscodingPayload {
119 resolution: VideoResolution
122 export interface OptimizeTranscodingPayload extends BaseTranscodingPayload {
126 export type VideoTranscodingPayload =
127 HLSTranscodingPayload
128 | NewResolutionTranscodingPayload
129 | OptimizeTranscodingPayload
130 | MergeAudioTranscodingPayload
132 export interface VideoLiveEndingPayload {