]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/models/server/job.model.ts
Add ability for instances to follow any actor
[github/Chocobozzz/PeerTube.git] / shared / models / server / job.model.ts
index f9a6250c98065c5c2895608f7859ac7bd3114d34..4ab249e0b86eaeb16d88cbba129f2d062869fffb 100644 (file)
@@ -8,6 +8,7 @@ export type JobType =
   | 'activitypub-http-unicast'
   | 'activitypub-http-broadcast'
   | 'activitypub-http-fetcher'
+  | 'activitypub-cleaner'
   | 'activitypub-follow'
   | 'video-file-import'
   | 'video-transcoding'
@@ -17,12 +18,15 @@ export type JobType =
   | 'activitypub-refresher'
   | 'video-redundancy'
   | 'video-live-ending'
+  | 'actor-keys'
 
 export interface Job {
   id: number
   state: JobState
   type: JobType
   data: any
+  priority: number
+  progress: number
   error: any
   createdAt: Date | string
   finishedOn: Date | string
@@ -49,13 +53,12 @@ export type ActivitypubHttpFetcherPayload = {
   uri: string
   type: FetchType
   videoId?: number
-  accountId?: number
 }
 
 export type ActivitypubHttpUnicastPayload = {
   uri: string
   signatureActorId?: number
-  body: any
+  body: object
   contextType?: ContextType
 }
 
@@ -78,8 +81,6 @@ export type VideoImportYoutubeDLPayload = {
   type: VideoImportYoutubeDLPayloadType
   videoImportId: number
 
-  generateThumbnail: boolean
-  generatePreview: boolean
   fileExt?: string
 }
 export type VideoImportTorrentPayload = {
@@ -99,26 +100,27 @@ interface BaseTranscodingPayload {
   isNewVideo?: boolean
 }
 
-interface HLSTranscodingPayload extends BaseTranscodingPayload {
-  type: 'hls'
+export interface HLSTranscodingPayload extends BaseTranscodingPayload {
+  type: 'new-resolution-to-hls'
   isPortraitMode?: boolean
   resolution: VideoResolution
   copyCodecs: boolean
+  isMaxQuality: boolean
 }
 
 export interface NewResolutionTranscodingPayload extends BaseTranscodingPayload {
-  type: 'new-resolution'
+  type: 'new-resolution-to-webtorrent'
   isPortraitMode?: boolean
   resolution: VideoResolution
 }
 
 export interface MergeAudioTranscodingPayload extends BaseTranscodingPayload {
-  type: 'merge-audio'
+  type: 'merge-audio-to-webtorrent'
   resolution: VideoResolution
 }
 
 export interface OptimizeTranscodingPayload extends BaseTranscodingPayload {
-  type: 'optimize'
+  type: 'optimize-to-webtorrent'
 }
 
 export type VideoTranscodingPayload =
@@ -130,3 +132,7 @@ export type VideoTranscodingPayload =
 export interface VideoLiveEndingPayload {
   videoId: number
 }
+
+export interface ActorKeysPayload {
+  actorId: number
+}