screenshot-service/@types/src/request.d.ts

47 lines
1.3 KiB
TypeScript

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