Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ubiquiti store and dream machine model. #3034

Merged
merged 6 commits into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,9 @@ const store = {
sonyps5c: envOrNumber(process.env.MAX_PRICE_SERIES_SONYPS5C),
sonyps5de: envOrNumber(process.env.MAX_PRICE_SERIES_SONYPS5DE),
'test:series': envOrNumber(process.env.MAX_PRICE_SERIES_TEST),
'udm-pro': -1,
'udm-us': -1,
'udr-us': -1,
jef marked this conversation as resolved.
Show resolved Hide resolved
xboxss: envOrNumber(process.env.MAX_PRICE_SERIES_XBOXSS),
xboxsx: envOrNumber(process.env.MAX_PRICE_SERIES_XBOXSX),
},
Expand Down Expand Up @@ -460,6 +463,9 @@ const store = {
'sf',
'sonyps5c',
'sonyps5de',
'udm-pro',
'udm-us',
'udr-us',
'xboxss',
'xboxsx',
]),
Expand Down
2 changes: 2 additions & 0 deletions src/store/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ import {TescoIE} from './tesco-ie';
import {TheWarehouse} from './thewarehouse';
import {TopAchat} from './topachat';
import {ToysRUs} from './toysrus';
import {Ubiquiti} from './ubiquiti';
import {Umart} from './umart';
import {Unieuro} from './unieuro';
import {Very} from './very';
Expand Down Expand Up @@ -328,6 +329,7 @@ export const storeList = new Map([
[TopAchat.name, TopAchat],
[ToysRUs.name, ToysRUs],
[Umart.name, Umart],
[Ubiquiti.name, Ubiquiti],
[Unieuro.name, Unieuro],
[UltimaInformatica.name, UltimaInformatica],
[Very.name, Very],
Expand Down
9 changes: 8 additions & 1 deletion src/store/model/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ export type Brand =
| 'nvidia'
| 'palit'
| 'pny'
| 'powercolor'
| 'sapphire'
| 'sony'
| 'ubiquiti'
| 'xfx'
| 'powercolor'
| 'zotac';

export type Series =
Expand All @@ -59,6 +60,9 @@ export type Series =
| 'sonyps5c'
| 'sonyps5de'
| 'sf'
| 'udm-pro'
| 'udm-us'
| 'udr-us'
| 'xboxsx'
| 'xboxss';

Expand Down Expand Up @@ -91,6 +95,9 @@ export type Model =
| 'challenger pro'
| 'challenger pro oc'
| 'crosshair viii'
| 'dream machine'
| 'dream machine pro'
| 'dream router'
| 'dual fan'
| 'dual oc'
| 'dual'
Expand Down
44 changes: 44 additions & 0 deletions src/store/model/ubiquiti.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import {Store} from './store';

export const Ubiquiti: Store = {
currency: '$',
labels: {
inStock: [
{
container: '#titleInStockBadge',
text: ['In Stock'],
}
],
outOfStock: [
{
container: '.titleSoldOutBadge',
text: ['Sold Out'],
},
{
container: '#titleSoldOutBadge',
text: ['Sold Out'],
},
],
},
links: [
{
brand: 'ubiquiti',
model: 'dream machine',
series: 'udm-us',
url: 'https://store.ui.com/collections/unifi-network-unifi-os-consoles/products/udm-us',
},
{
brand: 'ubiquiti',
model: 'dream machine pro',
series: 'udm-pro',
url: 'https://store.ui.com/collections/unifi-network-unifi-os-consoles/products/udm-pro',
},
{
brand: 'ubiquiti',
model: 'dream router',
series: 'udr-us',
url: 'https://store.ui.com/collections/unifi-network-unifi-os-consoles/products/dream-router',
},
],
name: 'ubiquiti',
};