Files
streetmerchant/src/store/model/store.ts
T
Scott Cooper c78d9a98ba chore: add types for brand and series (#148)
Co-authored-by: Jef LeCompte <jeffreylec@gmail.com>
2020-09-23 14:33:38 -04:00

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;
};