1 import { ContextType } from '../activitypub/context'
2 import { VideoResolution } from '../videos/file/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'
17 | 'videos-views-stats'
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 resolution: VideoResolution
110 isPortraitMode?: boolean
112 autoDeleteWebTorrentIfNeeded: boolean
113 isMaxQuality: boolean
116 export interface NewResolutionTranscodingPayload extends BaseTranscodingPayload {
117 type: 'new-resolution-to-webtorrent'
118 resolution: VideoResolution
122 isPortraitMode?: boolean
125 export interface MergeAudioTranscodingPayload extends BaseTranscodingPayload {
126 type: 'merge-audio-to-webtorrent'
127 resolution: VideoResolution
130 export interface OptimizeTranscodingPayload extends BaseTranscodingPayload {
131 type: 'optimize-to-webtorrent'
134 export type VideoTranscodingPayload =
135 HLSTranscodingPayload
136 | NewResolutionTranscodingPayload
137 | OptimizeTranscodingPayload
138 | MergeAudioTranscodingPayload
140 export interface VideoLiveEndingPayload {
144 export interface ActorKeysPayload {
148 export interface DeleteResumableUploadMetaFilePayload {
152 export interface MoveObjectStoragePayload {