import { Item, Execution, Token } from "."; import { IScriptHandler } from "../interfaces"; declare class ScriptHandler implements IScriptHandler { /** ** these expression are strings with $ * scenarios: * String =>as is * $javaScript =>evaulated * a , b , c =>array * dateString =>convert to date * Examples: * ['T', `user1`], ['T', `$(appServices.test1(100))`], ['T', `$(appServices.getSupervisorUser('user1'))`], ['T', `abc,xyz,user group`], ['TD', `2022-10-11`], ** * * appDelegate.scopeEval -->evaluateExpression * appDelegate.scopeJS -->executeScript * */ evaluateInputExpression(item: any, exp: any, dateFormat?: boolean): Promise; /** * execute JavaScript expression , no need for $ * * @param scope * @param expression * @returns */ evaluateExpression(scope: Item | Token, expression: any): Promise; executeScript(scope: Item | Execution, script: any): Promise; static getJSvars(scope: any): "\n var data=this.data;\n var instance=this.execution.instance;\n var input=this.input;\n var output=this.output;\n var appDelegate=this.execution.appDelegate;\n var appServices=this.execution.servicesProvider;\n var appUtils=appDelegate.appUtils;\n var item=this; // for backward support only\n " | "\n var appDelegate=this.appDelegate;\n var instance=this.instance;\n var appServices=this.servicesProvider;\n var appUtils=appDelegate.appUtils;\n " | "\n var item=this;\n var data=this.data;\n var instance=this.token.execution.instance;\n var input=this.input;\n var output=this.output;\n var appDelegate=this.token.execution.appDelegate;\n var appServices=this.token.execution.servicesProvider;\n var appUtils=appDelegate.appUtils;\n "; runPython(item: any, code: string, input?: any): Promise; } export { ScriptHandler };