mirror of
https://github.com/opelly27/streetmerchant.git
synced 2026-05-20 05:17:35 +00:00
c78d9a98ba
Co-authored-by: Jef LeCompte <jeffreylec@gmail.com>
30 lines
612 B
TypeScript
30 lines
612 B
TypeScript
import {Browser, LoadEvent} from 'puppeteer';
|
|
|
|
export type Element = {
|
|
container: string;
|
|
text: string[];
|
|
};
|
|
|
|
export type Link = {
|
|
brand: 'test:brand' | 'asus' | 'evga' | 'gigabyte' | 'pny' | 'msi' | 'nvidia' | 'zotac';
|
|
series: 'test:series' | '3070' | '3080' | '3090';
|
|
model: string;
|
|
url: string;
|
|
cartUrl?: string;
|
|
openCartAction?: (browser: Browser) => Promise<string>;
|
|
screenshot?: string;
|
|
};
|
|
|
|
export type Labels = {
|
|
captcha?: Element;
|
|
inStock: Element;
|
|
};
|
|
|
|
export type Store = {
|
|
links: Link[];
|
|
labels: Labels;
|
|
name: string;
|
|
setupAction?: (browser: Browser) => void;
|
|
waitUntil?: LoadEvent;
|
|
};
|