import { VideoStudioTaskCut } from '../videos/studio'
import { SendEmailOptions } from './emailer.model'
-export type JobState = 'active' | 'completed' | 'failed' | 'waiting' | 'delayed' | 'paused'
+export type JobState = 'active' | 'completed' | 'failed' | 'waiting' | 'delayed' | 'paused' | 'waiting-children'
export type JobType =
| 'activitypub-http-unicast'
| 'manage-video-torrent'
| 'move-to-object-storage'
| 'video-studio-edition'
+ | 'notify'
+ | 'federate-video'
export interface Job {
- id: number
- state: JobState
+ id: number | string
+ state: JobState | 'unknown'
type: JobType
data: any
priority: number
videoUUID: string
tasks: VideoStudioTaskPayload[]
}
+
+// ---------------------------------------------------------------------------
+
+export type NotifyPayload =
+ {
+ action: 'new-video'
+ videoUUID: string
+ }
+
+// ---------------------------------------------------------------------------
+
+export interface FederateVideoPayload {
+ videoUUID: string
+ isNewVideo: boolean
+}