1 import { ContextType } from '@server/helpers/activitypub'
2 import { SendEmailOptions } from './emailer.model'
3 import { VideoResolution } from '@shared/models'
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'
20 export interface Job {
26 createdAt: Date | string
27 finishedOn: Date | string
28 processedOn: Date | string
31 export type ActivitypubHttpBroadcastPayload = {
33 signatureActorId?: number
35 contextType?: ContextType
38 export type ActivitypubFollowPayload = {
39 followerActorId: number
42 isAutoFollow?: boolean
43 assertIsChannel?: boolean
46 export type FetchType = 'activity' | 'video-likes' | 'video-dislikes' | 'video-shares' | 'video-comments' | 'account-playlists'
47 export type ActivitypubHttpFetcherPayload = {
54 export type ActivitypubHttpUnicastPayload = {
56 signatureActorId?: number
58 contextType?: ContextType
61 export type RefreshPayload = {
62 type: 'video' | 'video-playlist' | 'actor'
66 export type EmailPayload = SendEmailOptions
68 export type VideoFileImportPayload = {
73 export type VideoImportYoutubeDLPayload = {
77 generateThumbnail: boolean
78 generatePreview: boolean
82 export type VideoImportTorrentPayload = {
83 type: 'magnet-uri' | 'torrent-file'
86 export type VideoImportPayload = VideoImportYoutubeDLPayload | VideoImportTorrentPayload
88 export type VideoRedundancyPayload = {
92 // Video transcoding payloads
94 interface BaseTranscodingPayload {
99 interface HLSTranscodingPayload extends BaseTranscodingPayload {
101 isPortraitMode?: boolean
102 resolution: VideoResolution
106 export interface NewResolutionTranscodingPayload extends BaseTranscodingPayload {
107 type: 'new-resolution'
108 isPortraitMode?: boolean
109 resolution: VideoResolution
112 export interface MergeAudioTranscodingPayload extends BaseTranscodingPayload {
114 resolution: VideoResolution
117 export interface OptimizeTranscodingPayload extends BaseTranscodingPayload {
121 export type VideoTranscodingPayload =
122 HLSTranscodingPayload
123 | NewResolutionTranscodingPayload
124 | OptimizeTranscodingPayload
125 | MergeAudioTranscodingPayload