Add id to update event

This commit is contained in:
mrjvs
2023-09-08 00:01:02 +02:00
parent 823d941962
commit ae653c8d27
3 changed files with 11 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
export type UpdateEventStatus = 'success' | 'failure' | 'notfound' | 'pending';
export type UpdateEvent = {
id: string; // id presented in start event
percentage: number;
status: UpdateEventStatus;
error?: unknown; // set when status is failure
@@ -21,13 +22,6 @@ export type DiscoverEmbedsEvent = {
}>;
};
export type StartScrapingEvent = {
sourceId: string;
// embed Id (not embedScraperId)
embedId?: string;
};
export type SingleScraperEvents = {
update?: (evt: UpdateEvent) => void;
};