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'
23 export interface Job {
31 createdAt: Date | string
32 finishedOn: Date | string
33 processedOn: Date | string
36 export type ActivitypubHttpBroadcastPayload = {
38 signatureActorId?: number
40 contextType?: ContextType
43 export type ActivitypubFollowPayload = {
44 followerActorId: number
47 isAutoFollow?: boolean
48 assertIsChannel?: boolean
51 export type FetchType = 'activity' | 'video-likes' | 'video-dislikes' | 'video-shares' | 'video-comments' | 'account-playlists'
52 export type ActivitypubHttpFetcherPayload = {
58 export type ActivitypubHttpUnicastPayload = {
60 signatureActorId?: number
62 contextType?: ContextType
65 export type RefreshPayload = {
66 type: 'video' | 'video-playlist' | 'actor'
70 export type EmailPayload = SendEmailOptions
72 export type VideoFileImportPayload = {
77 export type VideoImportTorrentPayloadType = 'magnet-uri' | 'torrent-file'
78 export type VideoImportYoutubeDLPayloadType = 'youtube-dl'
80 export type VideoImportYoutubeDLPayload = {
81 type: VideoImportYoutubeDLPayloadType
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 export interface HLSTranscodingPayload extends BaseTranscodingPayload {
104 type: 'new-resolution-to-hls'
105 isPortraitMode?: boolean
106 resolution: VideoResolution
108 isMaxQuality: boolean
111 export interface NewResolutionTranscodingPayload extends BaseTranscodingPayload {
112 type: 'new-resolution-to-webtorrent'
113 isPortraitMode?: boolean
114 resolution: VideoResolution
117 export interface MergeAudioTranscodingPayload extends BaseTranscodingPayload {
118 type: 'merge-audio-to-webtorrent'
119 resolution: VideoResolution
122 export interface OptimizeTranscodingPayload extends BaseTranscodingPayload {
123 type: 'optimize-to-webtorrent'
126 export type VideoTranscodingPayload =
127 HLSTranscodingPayload
128 | NewResolutionTranscodingPayload
129 | OptimizeTranscodingPayload
130 | MergeAudioTranscodingPayload
132 export interface VideoLiveEndingPayload {
136 export interface ActorKeysPayload {