@uipath/robot
Version:
UiPath Robot javascript SDK enabling web pages to interact with UiPath Robots
44 lines (43 loc) • 1.71 kB
TypeScript
import { InstallProcessResult, Job, JobResult, RobotProcess, Settings } from './models';
/**
* UiPath Robot SDK
*/
export interface IRobotSDK {
/**
* SDK settings
*/
settings: Settings;
/**
* Method to retrieve all published robot processes on users local machine.
* @returns Deferred promise of type RobotProcess[] which will be resolved/rejected based on http response.
*/
getProcesses(): Promise<Array<RobotProcess>>;
/**
* Init method set custom consent code handling.
* @returns {IRobotSDK} instance
*/
init(): IRobotSDK;
/**
* Method to attach event handlers on the SDK.
* @param eventName Available SDK events are 'consent-prompt', 'missing-components'.
* @param eventHanlder Event handler callback function called when event occurs.
*/
on(eventName: string, callback: (argument?: any) => void): void;
/**
* Method to invoke a robot process.
* @param job Job object containing all information about the robot process to run.
* @returns Deferred promise which is resolved with job result when robot process completes.
*/
startJob(job: Job): Promise<JobResult>;
/**
* Method to stop an executing robot process.
* @param process Executing/Running RobotProcess object that needs to be stopped.
* @returns Deferred promise which is resolved when robot process is cancelled.
*/
stopProcess(process: RobotProcess): Promise<void>;
/**
* Method to install a process.
* @param processId Process key which identifies the process.
*/
installProcess(processId: string): Promise<InstallProcessResult>;
}