28 lines
514 B
TypeScript
28 lines
514 B
TypeScript
export enum Actions {
|
|
// from background to content script
|
|
EXTRACT = 1,
|
|
GOTO_URL,
|
|
PING,
|
|
QUERY_URL,
|
|
SCROLL_BOTTOM,
|
|
SLEEP,
|
|
WAKEUP,
|
|
// from popup to background script
|
|
UPLOAD_STATE,
|
|
// from content to background script
|
|
REPORT_NEW_PAGE,
|
|
}
|
|
|
|
export interface Request {
|
|
action: Actions
|
|
itemsSelector?: string
|
|
fieldSelectors?: string[]
|
|
url?: string
|
|
fileName?: string
|
|
state?: string
|
|
}
|
|
|
|
export interface Response<T> {
|
|
result: T;
|
|
error: string;
|
|
} |