screenshot-service/@types/src/request.d.ts
2022-06-19 13:33:25 +02:00

36 lines
1.0 KiB
TypeScript

/// <reference types="node" />
import { ChildProcessWithoutNullStreams } from "child_process";
export default class ScreenshotRequest {
url: string;
domains: string[];
id: string;
status: string;
output: string;
images: Record<string, unknown>[];
request_time: number;
started_time: number | null;
finished_time: number | null;
processing_took: number | null;
waiting_took: number | null;
process: ChildProcessWithoutNullStreams;
constructor(url: string, domains: string[]);
getJobsAhead(): number;
getJSON(): Promise<{
url: string;
domains: string[];
jobs_ahead: number;
id: string;
status: string;
output: string;
images: Record<string, unknown>[];
request_time: number;
started_time: number | null;
finished_time: number | null;
processing_took: number | null;
waiting_took: number | null;
elapsed_time_s: number;
}>;
setFinished(): void;
exec(): Promise<void>;
}