import { FileData } from './FileData.js'; import { FileMetadata } from './FileMetadata.js'; import { ClientConfig } from './ClientConfig.js'; import { JobInfo } from './JobInfo.js'; import { JobProgressEvent } from './JobProgressEvent.js'; import { WorkflowInfo } from './WorkflowInfo.js'; import { WorkflowSetting } from './WorkflowSetting.js'; import { IHttpRequest } from './Http/IHttpRequest.js'; /** * REST API wrapper * https://www.easypdfcloud.com/developer/reference */ export declare class RestApi { private impl; /** * Fires when upload progress changes * @param {ProgressEvent} ev Progress event */ onUploadProgress: ((this: RestApi, ev: ProgressEvent) => any) | null; /** * Fires when download progress changes * @param {ProgressEvent} ev Progress event */ onDownloadProgress: ((this: RestApi, ev: ProgressEvent) => any) | null; /** * Fires when download progress changes * @param {JobProgressEvent} ev Job progress event */ onJobExecutionProgress: ((this: RestApi, ev: JobProgressEvent) => any) | null; /** * Creates an instance * @param {ClientConfig} clientConfig Cient configuration */ constructor(httpRequest: IHttpRequest, clientConfig: ClientConfig); /** * Creates an instance * @param {ClientConfig} clientConfig Cient configuration * @param {boolean} enableTestMode Whether test mode is enabled or not */ constructor(httpRequest: IHttpRequest, clientConfig: ClientConfig, enableTestMode: boolean); /** * Get list of workflow information * @returns {Promise} Promise which resolves to list of workflow information */ getWorkflowInfoList(): Promise; /** * Get workflow information * @param {string} workflowId Workflow ID * @returns {Promise} Promise which resolves to workflow information */ getWorkflowInfo(workflowId: string): Promise; /** * Get workflow setting * @param {string} workflowId Workflow ID * @returns {Promise} Promise which resolves to workflow setting in JSON string */ getWorkflowSetting(workflowId: string): Promise; /** * Create new job * @param {string | WorkflowSetting} workflow Workflow ID or workflow setting * @param {File | FileData} files Input file * @param {boolean} start Whether to start job execution or not * @returns {Promise} Promise which resolves to job ID */ createNewJob(workflow: string | WorkflowSetting, file: File | FileData, start: boolean): Promise; /** * Upload additional input file * @param {string} jobId Job ID * @param {File | FileData} files Input file * @returns {Promise} Promise */ uploadInput(jobId: string, file: File | FileData): Promise; /** * Retrieve file properties * @param {string} jobId Job ID * @returns {Promise} Promise which resolves to output file(s) metadata */ getOutputInfo(jobId: string): Promise; /** * Retrieve file properties * @param {string} jobId Job ID * @param {string} fileName Name of the file to download * @returns {Promise} Promise which resolves to specified output file metadata */ getOutputInfo(jobId: string, fileName: string): Promise; /** * Download output file * @param {string} jobId Job ID * @returns {Promise} Promise which resolves to output file(s) */ downloadOutput(jobId: string): Promise; /** * Download output file * @param {string} jobId Job ID * @param {string} fileName File name * @returns {Promise} Promise which resolves to specified output file */ downloadOutput(jobId: string, fileName: string): Promise; /** * Get job information * @param {string} jobId Job ID * @returns {Promise} Promise which resolves to job information */ getJobInfo(jobId: string): Promise; /** * Start job execution * @param {string} jobId Job ID * @returns {Promise} Promise */ startJob(jobId: string): Promise; /** * Stop job execution * @param {string} jobId Job ID * @returns {Promise} Promise */ stopJob(jobId: string): Promise; /** * Delete job * @param {string} jobId Job ID * @returns {Promise} Promise */ deleteJob(jobId: string): Promise; /** * Wait for job completion event * @param {string} jobId Job ID * @returns {Promise} Promise which resolves to job information */ waitForJobEvent(jobId: string): Promise; }