-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
types.ts
50 lines (45 loc) · 1.03 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { InferSelectModel } from "drizzle-orm";
import { items } from "./lib/db/schema";
export type ItemType = {
/** Extra properties from custom case API */
extra?: {
// Description to display in unboxing modal
description?: string;
};
id: string;
name: string;
rarity: {
id: string;
name: string;
color: string;
};
phase?: string | null;
image: string;
};
export type GradeType =
| "Consumer Grade"
| "Industrial Grade"
| "Mil-Spec Grade"
| "Restricted"
| "Classified"
| "Covert"
| "Rare Special Item";
export type CaseDataType = {
/** Extra properties from custom case API */
extra?: {
// Case gold chance (0-1)
gold_chance?: number;
// Whether or not the case should not give StatTraks
disable_stattraks?: boolean;
};
id: string;
type: string;
name: string;
image: string;
contains: ItemType[];
contains_rare: ItemType[];
};
export type ItemTypeLocalStorage = ItemType & {
casePrice?: number | null;
};
export type ItemTypeDB = InferSelectModel<typeof items>;