You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tdarr_Plugins/FlowPluginsTs/FlowHelpers/1.0.0/interfaces/interfaces.ts

97 lines
2.2 KiB

import { IFileObject, Istreams } from './synced/IFileObject';
import Ijob from './synced/jobInterface';
export interface IpluginInputUi {
type: 'dropdown' | 'text',
options: string[],
}
export interface IpluginInputs {
name: string,
type: 'string' | 'boolean' | 'number',
defaultValue: string,
inputUI: IpluginInputUi,
tooltip: string,
}
export interface IpluginDetails {
name: string,
description: string,
style: {
borderColor: string,
opacity?: number,
},
tags: string,
isStartPlugin: boolean,
sidebarPosition: number,
icon: string,
inputs: IpluginInputs[],
outputs: {
number: number,
tooltip: string,
}[],
}
export interface Ilog {
(text: string): void
}
export interface IupdateWorker {
(obj: Record<string, unknown>): void,
}
export interface IffmpegCommandStream extends Istreams {
removed: boolean,
targetCodec: string,
args: string[],
}
export interface IffmpegCommand {
inputFiles: string[],
streams: IffmpegCommandStream[]
container: string,
}
export interface Ivariables {
ffmpegCommand?: IffmpegCommand
}
export interface IpluginOutputArgs {
outputNumber: number,
outputFileObj: {
_id: string,
},
variables: Ivariables
}
export interface IpluginInputArgs {
inputFileObj: IFileObject,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
librarySettings: any,
inputs: Record<string, unknown>,
jobLog: Ilog,
workDir: string,
platform: string,
arch: string,
handbrakePath: string,
ffmpegPath: string,
mkvpropeditPath: string,
originalLibraryFile: IFileObject,
nodeHardwareType: string,
workerType: string,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
config: any,
job: Ijob,
platform_arch_isdocker: string,
variables: Ivariables,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
lastSuccesfulPlugin: any,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
lastSuccessfulRun: any,
updateWorker: IupdateWorker,
logFullCliOutput: boolean,
logOutcome:(outcome:string) => void,
}