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-cleaner'
12 | 'activitypub-follow'
18 | 'activitypub-refresher'
22 | 'move-to-object-storage'
24 export interface Job {
32 createdAt: Date | string
33 finishedOn: Date | string
34 processedOn: Date | string
37 export type ActivitypubHttpBroadcastPayload = {
39 signatureActorId?: number
41 contextType?: ContextType
44 export type ActivitypubFollowPayload = {
45 followerActorId: number
48 isAutoFollow?: boolean
49 assertIsChannel?: boolean
52 export type FetchType = 'activity' | 'video-likes' | 'video-dislikes' | 'video-shares' | 'video-comments' | 'account-playlists'
53 export type ActivitypubHttpFetcherPayload = {
59 export type ActivitypubHttpUnicastPayload = {
61 signatureActorId?: number
63 contextType?: ContextType
66 export type RefreshPayload = {
67 type: 'video' | 'video-playlist' | 'actor'
71 export type EmailPayload = SendEmailOptions
73 export type VideoFileImportPayload = {
78 export type VideoImportTorrentPayloadType = 'magnet-uri' | 'torrent-file'
79 export type VideoImportYoutubeDLPayloadType = 'youtube-dl'
81 export type VideoImportYoutubeDLPayload = {
82 type: VideoImportYoutubeDLPayloadType
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 export interface HLSTranscodingPayload extends BaseTranscodingPayload {
105 type: 'new-resolution-to-hls'
106 isPortraitMode?: boolean
107 resolution: VideoResolution
109 isMaxQuality: boolean
112 export interface NewResolutionTranscodingPayload extends BaseTranscodingPayload {
113 type: 'new-resolution-to-webtorrent'
114 isPortraitMode?: boolean
115 resolution: VideoResolution
118 export interface MergeAudioTranscodingPayload extends BaseTranscodingPayload {
119 type: 'merge-audio-to-webtorrent'
120 resolution: VideoResolution
123 export interface OptimizeTranscodingPayload extends BaseTranscodingPayload {
124 type: 'optimize-to-webtorrent'
127 export type VideoTranscodingPayload =
128 HLSTranscodingPayload
129 | NewResolutionTranscodingPayload
130 | OptimizeTranscodingPayload
131 | MergeAudioTranscodingPayload
133 export interface VideoLiveEndingPayload {
137 export interface ActorKeysPayload {
141 export interface MoveObjectStoragePayload {