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

47 lines
1.3 KiB
TypeScript
Raw Normal View History

2022-06-19 13:33:25 +02:00
/// <reference types="node" />
import { ChildProcessWithoutNullStreams } from "child_process";
export declare type Image = {
url: string;
domain: string;
found_headers: Record<string, string>;
2022-07-08 16:51:33 +02:00
filename: string;
};
2022-06-19 13:33:25 +02:00
export default class ScreenshotRequest {
url: string;
domains: string[];
id: string;
status: string;
output: string;
images: Image[];
2022-06-19 13:33:25 +02:00
request_time: number;
started_time: number | null;
finished_time: number | null;
processing_took: number | null;
waiting_took: number | null;
process: ChildProcessWithoutNullStreams;
current_action: string;
2022-06-19 13:33:25 +02:00
constructor(url: string, domains: string[]);
getJobsAhead(): number;
getJSON(): Promise<{
url: string;
domains: string[];
jobs_ahead: number;
id: string;
status: string;
output: string;
2022-07-08 16:51:33 +02:00
images: Image[];
2022-06-19 13:33:25 +02:00
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;
2022-06-19 13:33:25 +02:00
}>;
2022-07-08 16:51:33 +02:00
getGoodImages(): Image[];
2022-06-19 13:33:25 +02:00
setFinished(): void;
exec(): Promise<void>;
}