UNPKG

@uipath/robot

Version:

UiPath Robot javascript SDK enabling web pages to interact with UiPath Robots

46 lines (45 loc) 1.99 kB
import { IRobotSDK } from '../iRobotSDK'; import { Job, JobResult, RobotProcess, Settings, InstallProcessResult } from '../models'; /** * Class to restrict exposing other private methods in RobotSDK object. */ export declare class SDK implements IRobotSDK { /** * SDK settings */ get settings(): Settings; /** * Init method set custom consent code handling. * @returns {IRobotSDK} instance */ init: () => IRobotSDK; /** * 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<RobotProcess[]>; /** * 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, eventHanlder: (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/running robot process. * @param process RobotProcess object containing all information about the robot process to stop. * @returns Deferred promise which is resolved with job result when robot process is cancelled. */ stopProcess: (process: RobotProcess) => Promise<void>; /** * Method to install a process. * @param processId Process Id of the robot process to install. */ installProcess: (processId: string) => Promise<InstallProcessResult>; sendClientMessage: (job: Job, channelName: string, payload: string) => Promise<void>; }