Skip to content

Commit e552c91

Browse files
authoredNov 22, 2020
feat(store): add corsair sfx PSUs (jef#881)
1 parent 292e360 commit e552c91

File tree

7 files changed

+91
-0
lines changed

7 files changed

+91
-0
lines changed
 

‎src/config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ const store = {
316316
ryzen5800: envOrNumber(process.env.MAX_PRICE_SERIES_RYZEN5800),
317317
ryzen5900: envOrNumber(process.env.MAX_PRICE_SERIES_RYZEN5900),
318318
ryzen5950: envOrNumber(process.env.MAX_PRICE_SERIES_RYZEN5950),
319+
sf: envOrNumber(process.env.MAX_PRICE_SERIES_CORSAIR_SF),
319320
sonyps5c: -1,
320321
sonyps5de: -1,
321322
'test:series': -1,

‎src/store/model/amazon.ts

+16
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,22 @@ export const Amazon: Store = {
491491
model: 'xbox series s',
492492
series: 'xboxss',
493493
url: 'https://www.amazon.com/dp/B08G9J44ZN'
494+
},
495+
{
496+
brand: 'corsair',
497+
cartUrl:
498+
'https://www.amazon.com/gp/aws/cart/add.html?ASIN.1=B07M63H81H&Quantity.1=1',
499+
model: '750 platinum',
500+
series: 'sf',
501+
url: 'https://www.amazon.com/dp/B07M63H81H'
502+
},
503+
{
504+
brand: 'corsair',
505+
cartUrl:
506+
'https://www.amazon.com/gp/aws/cart/add.html?ASIN.1=B07F84FJ1G&Quantity.1=1',
507+
model: '600 platinum',
508+
series: 'sf',
509+
url: 'https://www.amazon.com/dp/B07F84FJ1G'
494510
}
495511
],
496512
name: 'amazon'

‎src/store/model/bandh.ts

+14
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,20 @@ export const BAndH: Store = {
187187
series: 'ryzen5600',
188188
url:
189189
'https://www.bhphotovideo.com/c/product/1598377-REG/amd_100_100000065box_ryzen_5_5600x_3_7.html'
190+
},
191+
{
192+
brand: 'amd',
193+
model: '5600x',
194+
series: 'ryzen5600',
195+
url:
196+
'https://www.bhphotovideo.com/c/product/1598377-REG/amd_100_100000065box_ryzen_5_5600x_3_7.html'
197+
},
198+
{
199+
brand: 'corsair',
200+
model: '750 platinum',
201+
series: 'sf',
202+
url:
203+
'https://www.bhphotovideo.com/c/product/1560680-REG/corsair_cp_9020186_na_corsair_sf750_power_supply.html'
190204
}
191205
],
192206
name: 'bandh'

‎src/store/model/bestbuy.ts

+16
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,22 @@ export const BestBuy: Store = {
405405
series: 'rx6800xt',
406406
url:
407407
'https://www.bestbuy.com/site/xfx-amd-radeon-rx-6800xt-16gb-gddr6-pci-express-4-0-gaming-graphics-card-black/6441226.p?skuId=6441226'
408+
},
409+
{
410+
brand: 'corsair',
411+
cartUrl: 'https://api.bestbuy.com/click/-/6351845/cart',
412+
model: '750 platinum',
413+
series: 'sf',
414+
url:
415+
'https://www.bestbuy.com/site/corsair-sf-series-750w-atx12v-2-4-eps12v-2-92-sfx12v-80-plus-platinum-modular-power-supply-black/6351845.p?skuId=6351845'
416+
},
417+
{
418+
brand: 'corsair',
419+
cartUrl: 'https://api.bestbuy.com/click/-/6351844/cart',
420+
model: '600 platinum',
421+
series: 'sf',
422+
url:
423+
'https://www.bestbuy.com/site/corsair-sf-series-600w-atx12v-2-4-eps12v-2-92-sfx12v-80-plus-platinum-modular-power-supply-black/6351844.p?skuId=6351844'
408424
}
409425
],
410426
name: 'bestbuy'

‎src/store/model/corsair.ts

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import {Store} from './store';
2+
3+
export const Corsair: Store = {
4+
labels: {
5+
inStock: {
6+
container: '.add_to_cart_form',
7+
text: ['add to cart']
8+
},
9+
maxPrice: {
10+
container: '.product-price',
11+
euroFormat: false
12+
}
13+
},
14+
links: [
15+
{
16+
brand: 'test:brand',
17+
model: 'test:model',
18+
series: 'test:series',
19+
url:
20+
'https://www.corsair.com/us/en/Categories/Products/Power-Supply-Units/Power-Supply-Units-Advanced/SF-Series/p/CP-9020181-NA'
21+
},
22+
{
23+
brand: 'corsair',
24+
model: '750 platinum',
25+
series: 'sf',
26+
url:
27+
'https://www.corsair.com/us/en/Categories/Products/Power-Supply-Units/Power-Supply-Units-Advanced/SF-Series/p/CP-9020186-NA'
28+
},
29+
{
30+
brand: 'corsair',
31+
model: '600 platinum',
32+
series: 'sf',
33+
url:
34+
'https://www.corsair.com/us/en/Categories/Products/Power-Supply-Units/Power-Supply-Units-Advanced/SF-Series/p/CP-9020182-NA'
35+
}
36+
],
37+
name: 'corsair'
38+
};

‎src/store/model/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import {Ccl} from './ccl';
2626
import {Computeruniverse} from './computeruniverse';
2727
import {Coolblue} from './coolblue';
2828
import {Coolmod} from './coolmod';
29+
import {Corsair} from './corsair';
2930
import {Currys} from './currys';
3031
import {Cyberport} from './cyberport';
3132
import {Ebuyer} from './ebuyer';
@@ -92,6 +93,7 @@ export const storeList = new Map([
9293
[Computeruniverse.name, Computeruniverse],
9394
[Coolblue.name, Coolblue],
9495
[Coolmod.name, Coolmod],
96+
[Corsair.name, Corsair],
9597
[Currys.name, Currys],
9698
[Cyberport.name, Cyberport],
9799
[Ebuyer.name, Ebuyer],

‎src/store/model/store.ts

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export type Brand =
1515
| 'amd'
1616
| 'asrock'
1717
| 'asus'
18+
| 'corsair'
1819
| 'evga'
1920
| 'gainward'
2021
| 'gigabyte'
@@ -45,6 +46,7 @@ export type Series =
4546
| 'ryzen5950'
4647
| 'sonyps5c'
4748
| 'sonyps5de'
49+
| 'sf'
4850
| 'xboxsx'
4951
| 'xboxss';
5052

@@ -54,6 +56,8 @@ export type Model =
5456
| '5800x'
5557
| '5900x'
5658
| '5950x'
59+
| '600 platinum'
60+
| '750 platinum'
5761
| 'amd reference'
5862
| 'amp extreme holo'
5963
| 'amp holo'

0 commit comments

Comments
 (0)