-
Notifications
You must be signed in to change notification settings - Fork 18
/
boxrec.ratings.constants.ts
53 lines (45 loc) · 1.94 KB
/
boxrec.ratings.constants.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
51
52
53
import {BoxrecLocation, Record, Stance, WinLossDraw} from "../boxrec.constants";
import {WeightDivision} from "../champions/boxrec.champions.constants";
import {Country} from "../location/people/boxrec.location.people.constants";
import {WeightDivisionCapitalized} from "../titles/boxrec.page.title.constants";
export interface BoxrecRatingsParams {
country?: Country | "";
division?: WeightDivisionCapitalized;
sex: "M" | "F"; // whatever reason this is necessary, figured it would default to Male but it does not
stance?: "O" | "S"; // orthodox // southpaw // undefined is both
status?: "a" | ""; // defaults to active/inactive
}
// abstract
interface BoxrecRatingsBasic {
hasBoutScheduled: boolean;
id: number | null;
last6: WinLossDraw[];
name: string | null;
points: number | null;
record: Record;
residence: BoxrecLocation;
stance: Stance | null;
}
// used for figuring out table column order
export type RatingsColumns =
"name" | "points" | "rating" | "age" | "career" |
"w-l-d" | "stance" | "residence" | "division" | "last 6" | "ranking";
export interface BoxrecPageRatingsActiveDivisionRowOutput extends BoxrecRatingsBasic {
age: number | null;
rating: number | null;
}
export interface BoxrecPageRatingsActiveInactiveDivisionRowOutput extends BoxrecRatingsBasic {
career: number[];
}
export interface BoxrecPageRatingsActiveInactiveAllDivisionsRowOutput
extends BoxrecPageRatingsActiveInactiveDivisionRowOutput {
division: WeightDivision | null;
}
export interface BoxrecPageRatingsActiveAllDivisionsRowOutput extends BoxrecPageRatingsActiveDivisionRowOutput {
division: WeightDivision | null;
}
export interface BoxrecRatingsOutput {
boxers: Array<BoxrecPageRatingsActiveAllDivisionsRowOutput | BoxrecPageRatingsActiveInactiveAllDivisionsRowOutput
| BoxrecPageRatingsActiveInactiveDivisionRowOutput | BoxrecPageRatingsActiveDivisionRowOutput>;
numberOfPages: number;
}