export interface AdobeApp { init ( ) : void ; on ( event , callback ) : AdobeApp ; runScript ( command , options ? ) : Promise < any > ; selectDocument ( document ) : Promise < any > ; saveDocument ( ... documents ) : Promise < any > ; saveAsDocument ( document , saveAs , options ? ) : Promise < any > ; openDocument ( ... documents ) : Promise < any > ; closeDocument ( ... documents ) : Promise < any > ; saveAndCloseDocument ( ... documents ) : Promise < any > ; newDocument ( options ? ) : Promise < any > ; open ( ) : Promise < any > ; close ( ) : Promise < void > ; dispose ( ) : void ; } export enum AdobeAppName { Animate = 'animate' , Photoshop = 'photoshop' , Illustrator = 'illustrator' , InDesign = 'indesign' , Acrobat = 'acrobat' , AfterEffects = 'after_effects' } export enum AdobeAppScriptFileType { Jsfl = 'jsfl' , Jsx = 'jsx' } export type AdobeProcessOptions = { timeout ? : number ; timeoutCallback ? : Function ; } ; export type Options = { [ prop ] : any ; } ; export type NewDocumentOptions = Options & { title ? : string ; width ? : number ; height ? : number ; } ; export type AdobeAppConfig = { name : AdobeAppName ; path : string ; adobeScriptsPath : string ; } ; export type Config = { app : AdobeAppConfig ; host : string ; port : number ; appTimeout ? : number ; jsPath ? : string ; } ; export interface AdobeEventListener { addEventListener ( event , callback ) : void ; start ( ) : void ; close ( ) : void ; } export interface AdobeAppProcess { create ( script ) : void ; kill ( ) : void ; run ( commandPath ) : void ; } export interface CommandStack { push ( data ) : void ; resolve ( commandName ) : Promise < void > ; } export interface AdobeScriptBuilder { setName ( value ) : AdobeScriptBuilder ; setVariables ( value ) : AdobeScriptBuilder ; setBody ( value ) : AdobeScriptBuilder ; setBroadcast ( value ) : AdobeScriptBuilder ; build ( ) : string ; } export interface CommandFileCreator { create ( command , useBuiltInScript ? , options ? ) : Promise < string > ; } export interface BroadcastBuilder { build ( command ) : string ; } export interface BroadcastMessage { command : string ; stdout ? : string ; stderr ? : string ; } export interface AdobeScriptCommand { command : string ; resolve : Function ; reject : Function ; } export enum AdobeAppEvent { OpenApp = "open_app" , CloseApp = "close_app" , NewDocument = "new_document" , OpenDocument = "open_document" , CloseDocument = "close_document" , SaveAndCloseDocument = "save_and_close_document" , SaveDocument = "save_document" , SelectDocument = "select_document" , SaveAsDocument = "save_as_document" , RunScript = "run_script" }