import { Job, JobStatus, Response } from '../../models/index'; import { IRequest } from '../iRequest'; /** * Request class to get status of any running/completed job. */ export declare class JobStatusRequest implements IRequest { job: Job; url: string; /** * Default constructor. * @param job Job object whose status we want to request */ constructor(job: Job); /** * Method that sends the request to get status of running/completed job. * @returns Promise of Response model type. */ send: () => Promise>; /** * Set the port to which the request should be sent along with the consent code. * @param robotInvocationPort Port on which local listener is running. * @param consentCode User consented code. */ set(robotInvocationPort: number, consentCode: number): this; /** * Mapper method used to convert string response to desired Job status model. * @param data HttpResponse sent from listener. * @returns Job result of the completed/errored job. */ private convertToJobStatus; /** * Method that returns the request endpoint to which request will be sent. * @param robotInvocationPort Port of local listener to which request should be sent. * @param consentCode User approved consent code if any. * @param job Job for which the result is to be found. */ private getURL; }