-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e04da20
commit a9b0c0e
Showing
58 changed files
with
2,184 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,12 @@ | ||
// Enums | ||
export enum FuelType { | ||
Diesel = "Diesel", | ||
Electric = "Electric", | ||
Hybrid = "Hybrid", | ||
Petrol = "Petrol", | ||
Others = "Others", | ||
} | ||
|
||
export enum Collection { | ||
Cars = "cars", | ||
COE = "coe", | ||
} | ||
|
||
export enum OrderBy { | ||
ASC = "asc", | ||
DESC = "desc", | ||
} | ||
|
||
export enum VehicleClass { | ||
CategoryA = "Category A", | ||
CategoryB = "Category B", | ||
CategoryC = "Category C", | ||
CategoryD = "Category D", | ||
CategoryE = "Category E", | ||
} | ||
|
||
// Base types | ||
export type Stage = "dev" | "staging" | "prod"; | ||
export type Make = Car["make"]; | ||
|
||
// Interfaces | ||
export interface Car { | ||
month: string; | ||
make: string; | ||
fuel_type: FuelType; | ||
number: number; | ||
selected?: boolean; | ||
} | ||
|
||
export interface COE { | ||
month: string; | ||
bidding_no: number; | ||
vehicle_class: string; | ||
quota: number; | ||
bids_success: number; | ||
bids_received: number; | ||
premium: number; | ||
} | ||
|
||
export interface UpdateParams { | ||
collectionName: string; | ||
zipFileName: string; | ||
zipUrl: string; | ||
keyFields: string[]; | ||
} | ||
|
||
export interface LatestMonth { | ||
latestMonth: string; | ||
} | ||
// Reexport all types from @sgcarstrends/types | ||
export type { | ||
FuelType, | ||
Collection, | ||
OrderBy, | ||
VehicleClass, | ||
Stage, | ||
LatestMonth, | ||
} from "@sgcarstrends/types"; | ||
|
||
// Local types that aren't shared | ||
export type Make = string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,6 @@ | ||
export interface Car { | ||
month: string; | ||
make: string; | ||
importer_type: string; | ||
fuel_type: string; | ||
vehicle_type: string; | ||
number: number; | ||
} | ||
|
||
export interface COE { | ||
month: string; | ||
bidding_no: number; | ||
vehicle_class: string; | ||
quota: number; | ||
bids_success: number; | ||
bids_received: number; | ||
premium: number; | ||
} | ||
|
||
export interface PQP { | ||
month: string; | ||
vehicle_class: string; | ||
pqp: number; | ||
} | ||
// Re-export types from shared package | ||
export type { | ||
RawCar as Car, | ||
RawCOE as COE, | ||
RawPQP as PQP | ||
} from "@sgcarstrends/types"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./redis"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./redis"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import { Redis } from "@upstash/redis"; | ||
export declare const redis: Redis; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Redis } from "@upstash/redis"; | ||
export const redis = new Redis({ | ||
url: process.env.UPSTASH_REDIS_REST_URL, | ||
token: process.env.UPSTASH_REDIS_REST_TOKEN, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "@sgcarstrends/config", | ||
"version": "0.0.0", | ||
"license": "MIT", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"scripts": { | ||
"build": "tsc", | ||
"dev": "pnpm build --watch", | ||
"lint": "biome check ." | ||
}, | ||
"dependencies": { | ||
"@upstash/redis": "^1.34.4", | ||
"dotenv": "^16.4.7" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^5.8.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./redis"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Redis } from "@upstash/redis"; | ||
import "dotenv/config"; | ||
|
||
export const redis = new Redis({ | ||
url: process.env.UPSTASH_REDIS_REST_URL, | ||
token: process.env.UPSTASH_REDIS_REST_TOKEN, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"declaration": true | ||
}, | ||
"include": ["src"] | ||
} |
Oops, something went wrong.