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/CommunityFlowPlugins/tools/goToFlow/2.0.0/index.ts

60 lines
1.3 KiB

import {
IpluginDetails,
IpluginInputArgs,
IpluginOutputArgs,
} from '../../../../FlowHelpers/1.0.0/interfaces/interfaces';
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
const details = ():IpluginDetails => ({
name: 'Go To Flow',
description: 'Go to a different flow',
style: {
borderColor: 'green',
},
tags: '',
isStartPlugin: false,
pType: '',
requiresVersion: '2.14.01',
sidebarPosition: -1,
icon: 'faArrowRight',
inputs: [
{
name: 'flowId',
type: 'string',
defaultValue: '',
inputUI: {
type: 'dropdown',
options: [],
},
tooltip: 'Specify flow ID to go to',
},
{
name: 'pluginId',
type: 'string',
defaultValue: 'start',
inputUI: {
type: 'text',
},
tooltip: 'Specify plugin ID to go to',
},
],
outputs: [],
});
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const plugin = (args:IpluginInputArgs):IpluginOutputArgs => {
const lib = require('../../../../../methods/lib')();
// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-param-reassign
args.inputs = lib.loadDefaultValues(args.inputs, details);
return {
outputFileObj: args.inputFileObj,
outputNumber: 1,
variables: args.variables,
};
};
export {
details,
plugin,
};