mirror of
https://github.com/opelly27/streetmerchant.git
synced 2026-05-20 16:57:34 +00:00
refactor: lookup, rm defaults (#69)
prep work for #38 Signed-off-by: Jef LeCompte <jeffreylec@gmail.com>
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
import {Store} from './store';
|
||||
|
||||
export const Amazon: Store = {
|
||||
cartUrl: '',
|
||||
links: [
|
||||
{
|
||||
brand: 'pny',
|
||||
model: 'xlr8',
|
||||
url: 'https://www.amazon.com/PNY-GeForce-Gaming-Epic-X-Graphics/dp/B08HBR7QBM?ref_=ast_sto_dp',
|
||||
oosLabels: ['currently unavailable', 'enter the characters you see below']
|
||||
},
|
||||
{
|
||||
brand: 'msi',
|
||||
model: 'gaming trio',
|
||||
url: 'https://www.amazon.com/MSI-GeForce-RTX-3080-10G/dp/B08HR7SV3M?ref_=ast_sto_dp',
|
||||
oosLabels: ['currently unavailable', 'enter the characters you see below']
|
||||
},
|
||||
{
|
||||
brand: 'evga',
|
||||
model: 'ftw3',
|
||||
url: 'https://www.amazon.com/EVGA-10G-P5-3897-KR-GeForce-Technology-Backplate/dp/B08HR3Y5GQ?ref_=ast_sto_dp',
|
||||
oosLabels: ['currently unavailable', 'enter the characters you see below']
|
||||
},
|
||||
{
|
||||
brand: 'evga',
|
||||
model: 'xc3',
|
||||
url: 'https://www.amazon.com/EVGA-10G-P5-3885-KR-GeForce-Cooling-Backplate/dp/B08HR55YB5?ref_=ast_sto_dp',
|
||||
oosLabels: ['currently unavailable', 'enter the characters you see below']
|
||||
},
|
||||
{
|
||||
brand: 'gigabyte',
|
||||
model: 'windforce',
|
||||
url: 'https://www.amazon.com/GIGABYTE-GeForce-Graphics-WINDFORCE-GV-N3080GAMING/dp/B08HJTH61J?ref_=ast_sto_dp',
|
||||
oosLabels: ['currently unavailable', 'enter the characters you see below']
|
||||
},
|
||||
{
|
||||
brand: 'gigabyte',
|
||||
model: 'windforce eagle',
|
||||
url: 'https://www.amazon.com/GIGABYTE-GeForce-Graphics-WINDFORCE-GV-N3080EAGLE/dp/B08HJS2JLJ?ref_=ast_sto_dp',
|
||||
oosLabels: ['currently unavailable', 'enter the characters you see below']
|
||||
},
|
||||
{
|
||||
brand: 'asus',
|
||||
model: 'tuf',
|
||||
url: 'https://www.amazon.com/ASUS-Graphics-DisplayPort-Military-Grade-Certification/dp/B08HH5WF97?ref_=ast_sto_dp',
|
||||
oosLabels: ['currently unavailable', 'enter the characters you see below']
|
||||
},
|
||||
{
|
||||
brand: 'msi',
|
||||
model: 'ventus',
|
||||
url: 'https://www.amazon.com/MSI-GeForce-RTX-3080-10G/dp/B08HR5SXPS?ref_=ast_sto_dp',
|
||||
oosLabels: ['currently unavailable', 'enter the characters you see below']
|
||||
}
|
||||
],
|
||||
name: 'amazon'
|
||||
};
|
||||
@@ -0,0 +1,63 @@
|
||||
import {Store} from './store';
|
||||
|
||||
export const BAndH: Store = {
|
||||
cartUrl: '',
|
||||
links: [
|
||||
{
|
||||
brand: 'gigabyte',
|
||||
model: 'black',
|
||||
url: 'https://www.bhphotovideo.com/c/product/1593333-REG/gigabyte_gv_n3080gaming_oc_10gd_geforce_rtx_3080_gaming.html?SID=s1600391647213ytuua52439',
|
||||
oosLabels: ['notify when available']
|
||||
},
|
||||
{
|
||||
brand: 'asus',
|
||||
model: 'tuf',
|
||||
url: 'https://www.bhphotovideo.com/c/product/1593649-REG/asus_tuf_rtx3080_10g_gaming_tuf_gaming_geforce_rtx.html',
|
||||
oosLabels: ['notify when available']
|
||||
},
|
||||
{
|
||||
brand: 'gigabyte',
|
||||
model: 'gaming-oc',
|
||||
url: 'https://www.bhphotovideo.com/c/product/1593333-REG/gigabyte_gv_n3080gaming_oc_10gd_geforce_rtx_3080_gaming.html',
|
||||
oosLabels: ['notify when available']
|
||||
},
|
||||
{
|
||||
brand: 'zotac',
|
||||
model: 'trinity',
|
||||
url: 'https://www.bhphotovideo.com/c/product/1592969-REG/zotac_zt_a30800d_10p_gaming_geforce_rtx_3080.html',
|
||||
oosLabels: ['notify when available']
|
||||
},
|
||||
{
|
||||
brand: 'asus',
|
||||
model: 'tuf-oc',
|
||||
url: 'https://www.bhphotovideo.com/c/product/1593650-REG/asus_tuf_rtx3080_o10g_gaming_tuf_gaming_geforce_rtx.html',
|
||||
oosLabels: ['notify when available']
|
||||
},
|
||||
{
|
||||
brand: 'msi',
|
||||
model: 'xtrio',
|
||||
url: 'https://www.bhphotovideo.com/c/product/1593996-REG/msi_g3080gxt10_geforce_rtx_3080_gaming.html',
|
||||
oosLabels: ['notify when available']
|
||||
},
|
||||
{
|
||||
brand: 'msi',
|
||||
model: 'ventus',
|
||||
url: 'https://www.bhphotovideo.com/c/product/1593997-REG/msi_g3080v3x10c_geforce_rtx_3080_ventus.html',
|
||||
oosLabels: ['notify when available']
|
||||
},
|
||||
{
|
||||
brand: 'msi',
|
||||
model: 'TRIO2',
|
||||
url: 'https://www.bhphotovideo.com/c/product/1593645-REG/msi_geforce_rtx_3080_gaming.html',
|
||||
oosLabels: ['notify when available']
|
||||
},
|
||||
{
|
||||
brand: 'msi',
|
||||
model: 'ventus-oc',
|
||||
url: 'https://www.bhphotovideo.com/c/product/1593646-REG/msi_geforce_rtx_3080_ventus.html',
|
||||
oosLabels: ['notify when available']
|
||||
}
|
||||
|
||||
],
|
||||
name: 'bandh'
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
import {Store} from './store';
|
||||
|
||||
export const BestBuy: Store = {
|
||||
cartUrl: '',
|
||||
links: [
|
||||
{
|
||||
brand: 'asus',
|
||||
model: 'rog strix',
|
||||
url: 'https://www.bestbuy.com/site/asus-geforce-rtx-3080-10gb-gddr6x-pci-express-4-0-strix-graphics-card-black/6432445.p?skuId=6432445',
|
||||
oosLabels: ['sold out', 'coming soon']
|
||||
},
|
||||
{
|
||||
brand: 'evga',
|
||||
model: 'xc3 black',
|
||||
url: 'https://www.bestbuy.com/site/evga-geforce-rtx-3080-10gb-gddr6x-pci-express-4-0-graphics-card/6432399.p?skuId=6432399',
|
||||
oosLabels: ['sold out', 'coming soon']
|
||||
},
|
||||
{
|
||||
brand: 'evga',
|
||||
model: 'xc3 ultra',
|
||||
url: 'https://www.bestbuy.com/site/evga-geforce-rtx-3080-10gb-gddr6x-pci-express-4-0-graphics-card/6432400.p?skuId=6432400',
|
||||
oosLabels: ['sold out', 'coming soon']
|
||||
},
|
||||
{
|
||||
brand: 'gigabyte',
|
||||
model: 'black',
|
||||
url: 'https://www.bestbuy.com/site/gigabyte-geforce-rtx-3080-10g-gddr6x-pci-express-4-0-graphics-card-black/6430620.p?acampID=0&cmp=RMX&loc=Hatch&ref=198&skuId=6430620',
|
||||
oosLabels: ['sold out', 'coming soon']
|
||||
},
|
||||
{
|
||||
brand: 'gigabyte',
|
||||
model: 'eagle',
|
||||
url: 'https://www.bestbuy.com/site/gigabyte-geforce-rtx-3080-10g-gddr6x-pci-express-4-0-graphics-card-black/6430621.p?skuId=6430621',
|
||||
oosLabels: ['sold out', 'coming soon']
|
||||
},
|
||||
|
||||
{
|
||||
brand: 'msi',
|
||||
model: 'ventus 3x',
|
||||
url: 'https://www.bestbuy.com/site/msi-geforce-rtx-3080-ventus-3x-10g-oc-bv-gddr6x-pci-express-4-0-graphic-card-black-silver/6430175.p?skuId=6430175',
|
||||
oosLabels: ['sold out', 'coming soon']
|
||||
},
|
||||
{
|
||||
brand: 'nvidia',
|
||||
model: 'founder edition',
|
||||
url: 'https://www.bestbuy.com/site/nvidia-geforce-rtx-3080-10gb-gddr6x-pci-express-4-0-graphics-card-titanium-and-black/6429440.p?skuId=6429440',
|
||||
oosLabels: ['sold out', 'coming soon']
|
||||
}
|
||||
],
|
||||
name: 'bestbuy'
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
import {Store} from './store';
|
||||
|
||||
export const Evga: Store = {
|
||||
cartUrl: '',
|
||||
links: [
|
||||
{
|
||||
brand: 'evga',
|
||||
model: 'xc3 black',
|
||||
url: 'https://www.evga.com/products/product.aspx?pn=10G-P5-3881-KR',
|
||||
oosLabels: ['out of stock']
|
||||
},
|
||||
{
|
||||
brand: 'evga',
|
||||
model: 'ftw3',
|
||||
url: 'https://www.evga.com/products/product.aspx?pn=10G-P5-3897-KR',
|
||||
oosLabels: ['out of stock']
|
||||
},
|
||||
{
|
||||
brand: 'evga',
|
||||
model: 'xc3 gaming',
|
||||
url: 'https://www.evga.com/products/product.aspx?pn=10G-P5-3883-KR',
|
||||
oosLabels: ['out of stock']
|
||||
},
|
||||
{
|
||||
brand: 'evga',
|
||||
model: 'xc3 ultra gaming',
|
||||
url: 'https://www.evga.com/products/product.aspx?pn=10G-P5-3885-KR',
|
||||
oosLabels: ['out of stock']
|
||||
}
|
||||
],
|
||||
name: 'evga'
|
||||
};
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import {BestBuy} from './bestbuy';
|
||||
import {BAndH} from './bandh';
|
||||
import {Evga} from './evga';
|
||||
import {NewEgg} from './newegg';
|
||||
import {Amazon} from './amazon';
|
||||
import {MicroCenter} from './microcenter';
|
||||
import {Config} from '../../config';
|
||||
import {Nvidia} from "./nvidia";
|
||||
|
||||
const masterList = new Map([
|
||||
['amazon', Amazon],
|
||||
['bestbuy', BestBuy],
|
||||
['bandh', BAndH],
|
||||
['evga', Evga],
|
||||
['microcenter', MicroCenter],
|
||||
['newegg', NewEgg],
|
||||
['nvidia', Nvidia]
|
||||
]);
|
||||
|
||||
const list = new Map();
|
||||
|
||||
const storeArray = Config.stores.split(',');
|
||||
|
||||
for (const name of storeArray) {
|
||||
list.set(name, masterList.get(name));
|
||||
}
|
||||
|
||||
export const Stores = Array.from(list.values());
|
||||
|
||||
export * from './store';
|
||||
@@ -0,0 +1,44 @@
|
||||
import {Store} from './store';
|
||||
|
||||
export const MicroCenter: Store = {
|
||||
cartUrl: '',
|
||||
links: [
|
||||
{
|
||||
brand: 'evga',
|
||||
model: 'xc3 ultra gaming',
|
||||
url: 'https://www.microcenter.com/product/628344/evga-geforce-rtx-3080-xc3-ultra-gaming-triple-fan-10gb-gddr6x-pcie-40-graphics-card',
|
||||
oosLabels: ['sold out']
|
||||
},
|
||||
{
|
||||
brand: 'msi',
|
||||
model: 'ventus 3x overclocked',
|
||||
url: 'https://www.microcenter.com/product/628331/msi-geforce-rtx-3080-ventus-3x-overclocked-triple-fan-10gb-gddr6x-pcie-40-graphics-card',
|
||||
oosLabels: ['sold out']
|
||||
},
|
||||
{
|
||||
brand: 'asus',
|
||||
model: 'tuf gaming',
|
||||
url: 'https://www.microcenter.com/product/628303/asus-geforce-rtx-3080-tuf-gaming-triple-fan-10gb-gddr6x-pcie-40-graphics-card',
|
||||
oosLabels: ['sold out']
|
||||
},
|
||||
{
|
||||
brand: 'msi',
|
||||
model: 'gaming x trio',
|
||||
url: 'https://www.microcenter.com/product/628330/msi-geforce-rtx-3080-gaming-x-trio-triple-fan-10gb-gddr6x-pcie-40-graphics-card',
|
||||
oosLabels: ['sold out']
|
||||
},
|
||||
{
|
||||
brand: 'evga',
|
||||
model: 'xc3 black',
|
||||
url: 'https://www.microcenter.com/product/628340/evga-geforce-rtx-3080-xc3-black-triple-fan-10gb-gddr6x-pcie-40-graphics-card',
|
||||
oosLabels: ['sold out']
|
||||
},
|
||||
{
|
||||
brand: 'zotac',
|
||||
model: 'trinity overclocked',
|
||||
url: 'https://www.microcenter.com/product/628607/zotac-geforce-rtx-3080-trinity-overclocked-triple-fan-10gb-gddr6x-pcie-40-graphics-card',
|
||||
oosLabels: ['sold out']
|
||||
}
|
||||
],
|
||||
name: 'microcenter'
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
import {Store} from './store';
|
||||
|
||||
export const NewEgg: Store = {
|
||||
cartUrl: '',
|
||||
links: [
|
||||
{
|
||||
brand: 'asus',
|
||||
model: 'tuf',
|
||||
url: 'https://www.newegg.com/asus-geforce-rtx-3080-tuf-rtx3080-10g-gaming/p/N82E16814126453',
|
||||
oosLabels: ['auto notify', 'out of stock']
|
||||
},
|
||||
{
|
||||
brand: 'evga',
|
||||
model: 'black gaming',
|
||||
url: 'https://www.newegg.com/evga-geforce-rtx-3080-10g-p5-3881-kr/p/N82E16814487522',
|
||||
oosLabels: ['auto notify', 'out of stock']
|
||||
},
|
||||
{
|
||||
brand: 'evga',
|
||||
model: 'argb led icx3',
|
||||
url: 'https://www.newegg.com/evga-geforce-rtx-3080-10g-p5-3883-kr/p/N82E16814487521',
|
||||
oosLabels: ['auto notify', 'out of stock']
|
||||
},
|
||||
{
|
||||
brand: 'evga',
|
||||
model: 'xc3 ultra gaming',
|
||||
url: 'https://www.newegg.com/evga-geforce-rtx-3080-10g-p5-3885-kr/p/N82E16814487520',
|
||||
oosLabels: ['auto notify', 'out of stock']
|
||||
},
|
||||
{
|
||||
brand: 'msi',
|
||||
model: 'ventus',
|
||||
url: 'https://www.newegg.com/msi-geforce-rtx-3080-rtx-3080-ventus-3x-10g/p/N82E16814137600',
|
||||
oosLabels: ['auto notify', 'out of stock']
|
||||
}
|
||||
],
|
||||
name: 'newegg'
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
import {Store} from './store';
|
||||
|
||||
export const Nvidia: Store = {
|
||||
cartUrl: '',
|
||||
links: [
|
||||
{
|
||||
brand: 'nvidia',
|
||||
model: 'founders edition',
|
||||
url: 'https://api.digitalriver.com/v1/shoppers/me/products/5438481700/inventory-status?apiKey=9485fa7b159e42edb08a83bde0d83dia',
|
||||
oosLabels: ['product_inventory_out_of_stock']
|
||||
}
|
||||
],
|
||||
name: 'nvidia'
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
interface Link {
|
||||
brand: string;
|
||||
model: string;
|
||||
url: string;
|
||||
oosLabels: string[];
|
||||
}
|
||||
|
||||
export interface Store {
|
||||
cartUrl: string;
|
||||
links: Link[];
|
||||
name: string;
|
||||
}
|
||||
Reference in New Issue
Block a user