tbarequest 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +36 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +46 -0
- package/dist/types/endpoints/districts.d.ts +173 -0
- package/dist/types/endpoints/districts.js +50 -0
- package/dist/types/endpoints/events.d.ts +13351 -0
- package/dist/types/endpoints/events.js +138 -0
- package/dist/types/endpoints/index.d.ts +26 -0
- package/dist/types/endpoints/index.js +25 -0
- package/dist/types/endpoints/insights.d.ts +34 -0
- package/dist/types/endpoints/insights.js +12 -0
- package/dist/types/endpoints/matches.d.ts +12944 -0
- package/dist/types/endpoints/matches.js +12 -0
- package/dist/types/endpoints/regionalAdvancements.d.ts +37 -0
- package/dist/types/endpoints/regionalAdvancements.js +12 -0
- package/dist/types/endpoints/status.d.ts +34 -0
- package/dist/types/endpoints/status.js +16 -0
- package/dist/types/endpoints/teams.d.ts +26447 -0
- package/dist/types/endpoints/teams.js +139 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.js +1 -0
- package/dist/types/schemas/districts.d.ts +26 -0
- package/dist/types/schemas/districts.js +26 -0
- package/dist/types/schemas/events.d.ts +233 -0
- package/dist/types/schemas/events.js +107 -0
- package/dist/types/schemas/insights.d.ts +26 -0
- package/dist/types/schemas/insights.js +22 -0
- package/dist/types/schemas/matches.d.ts +14877 -0
- package/dist/types/schemas/matches.js +573 -0
- package/dist/types/schemas/regionalAdvancements.d.ts +29 -0
- package/dist/types/schemas/regionalAdvancements.js +23 -0
- package/dist/types/schemas/status.d.ts +5 -0
- package/dist/types/schemas/status.js +5 -0
- package/dist/types/schemas/teams.d.ts +51 -0
- package/dist/types/schemas/teams.js +41 -0
- package/dist/utils.d.ts +11 -0
- package/dist/utils.js +9 -0
- package/package.json +26 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { Award, Media, Team, Team_Robot, Team_Simple } from "../schemas/teams.js";
|
|
3
|
+
import { Event, Event_Simple, Team_Event_Status } from "../schemas/events.js";
|
|
4
|
+
import { District_List } from "../schemas/districts.js";
|
|
5
|
+
import { Match, Match_Simple } from "../schemas/matches.js";
|
|
6
|
+
export const teamEndpoints = {
|
|
7
|
+
"/teams/{page_num}": {
|
|
8
|
+
schema: z.array(Team),
|
|
9
|
+
arguments: z.tuple([z.number()]),
|
|
10
|
+
},
|
|
11
|
+
"/teams/{page_num}/simple": {
|
|
12
|
+
schema: z.array(Team_Simple),
|
|
13
|
+
arguments: z.tuple([z.number()]),
|
|
14
|
+
},
|
|
15
|
+
"/teams/{page_num}/keys": {
|
|
16
|
+
schema: z.array(z.string()),
|
|
17
|
+
arguments: z.tuple([z.number()]),
|
|
18
|
+
},
|
|
19
|
+
"/teams/{year}/{page_num}": {
|
|
20
|
+
schema: z.array(Team),
|
|
21
|
+
arguments: z.tuple([z.number(), z.number()]),
|
|
22
|
+
},
|
|
23
|
+
"/teams/{year}/{page_num}/simple": {
|
|
24
|
+
schema: z.array(Team_Simple),
|
|
25
|
+
arguments: z.tuple([z.number(), z.number()]),
|
|
26
|
+
},
|
|
27
|
+
"/teams/{year}/{page_num}/keys": {
|
|
28
|
+
schema: z.array(z.string()),
|
|
29
|
+
arguments: z.tuple([z.number(), z.number()]),
|
|
30
|
+
},
|
|
31
|
+
"/team/{team_key}": {
|
|
32
|
+
schema: Team,
|
|
33
|
+
arguments: z.tuple([z.string()]),
|
|
34
|
+
},
|
|
35
|
+
"/team/{team_key}/simple": {
|
|
36
|
+
schema: Team_Simple,
|
|
37
|
+
arguments: z.tuple([z.string()]),
|
|
38
|
+
},
|
|
39
|
+
"/team/{team_key}/history": {
|
|
40
|
+
schema: z.object({ events: z.array(Event), awards: z.array(Award) }),
|
|
41
|
+
arguments: z.tuple([z.string()]),
|
|
42
|
+
},
|
|
43
|
+
"/team/{team_key}/years_participated": {
|
|
44
|
+
schema: z.array(z.number()),
|
|
45
|
+
arguments: z.tuple([z.string()]),
|
|
46
|
+
},
|
|
47
|
+
"/team/{team_key}/districts": {
|
|
48
|
+
schema: z.array(District_List),
|
|
49
|
+
arguments: z.tuple([z.string()]),
|
|
50
|
+
},
|
|
51
|
+
"/team/{team_key}/robots": {
|
|
52
|
+
schema: z.array(Team_Robot),
|
|
53
|
+
arguments: z.tuple([z.string()]),
|
|
54
|
+
},
|
|
55
|
+
"/team/{team_key}/events": {
|
|
56
|
+
schema: z.array(Event),
|
|
57
|
+
arguments: z.tuple([z.string()]),
|
|
58
|
+
},
|
|
59
|
+
"/team/{team_key}/events/simple": {
|
|
60
|
+
schema: z.array(Event_Simple),
|
|
61
|
+
arguments: z.tuple([z.string()]),
|
|
62
|
+
},
|
|
63
|
+
"/team/{team_key}/events/keys": {
|
|
64
|
+
schema: z.array(z.string()),
|
|
65
|
+
arguments: z.tuple([z.string()]),
|
|
66
|
+
},
|
|
67
|
+
"/team/{team_key}/events/{year}": {
|
|
68
|
+
schema: z.array(Event),
|
|
69
|
+
arguments: z.tuple([z.string(), z.int()]),
|
|
70
|
+
},
|
|
71
|
+
"/team/{team_key}/events/{year}/simple": {
|
|
72
|
+
schema: z.array(Event_Simple),
|
|
73
|
+
arguments: z.tuple([z.string(), z.int()]),
|
|
74
|
+
},
|
|
75
|
+
"/team/{team_key}/events/{year}/keys": {
|
|
76
|
+
schema: z.array(z.string()),
|
|
77
|
+
arguments: z.tuple([z.string(), z.int()]),
|
|
78
|
+
},
|
|
79
|
+
"/team/{team_key}/events/{year}/statuses": {
|
|
80
|
+
schema: z.record(z.string(), Team_Event_Status.nullable()),
|
|
81
|
+
arguments: z.tuple([z.string(), z.int()]),
|
|
82
|
+
},
|
|
83
|
+
"/team/{team_key}/event/{event_key}/matches": {
|
|
84
|
+
schema: z.array(Match),
|
|
85
|
+
arguments: z.tuple([z.string(), z.string()]),
|
|
86
|
+
},
|
|
87
|
+
"/team/{team_key}/event/{event_key}/matches/simple": {
|
|
88
|
+
schema: z.array(Match_Simple),
|
|
89
|
+
arguments: z.tuple([z.string(), z.string()]),
|
|
90
|
+
},
|
|
91
|
+
"/team/{team_key}/event/{event_key}/matches/keys": {
|
|
92
|
+
schema: z.array(z.string()),
|
|
93
|
+
arguments: z.tuple([z.string(), z.string()]),
|
|
94
|
+
},
|
|
95
|
+
"/team/{team_key}/event/{event_key}/awards": {
|
|
96
|
+
schema: z.array(Award),
|
|
97
|
+
arguments: z.tuple([z.string(), z.string()]),
|
|
98
|
+
},
|
|
99
|
+
"/team/{team_key}/event/{event_key}/status": {
|
|
100
|
+
schema: Team_Event_Status.nullable(),
|
|
101
|
+
arguments: z.tuple([z.string(), z.string()]),
|
|
102
|
+
},
|
|
103
|
+
"/team/{team_key}/awards": {
|
|
104
|
+
schema: z.array(Award),
|
|
105
|
+
arguments: z.tuple([z.string()]),
|
|
106
|
+
},
|
|
107
|
+
"/team/{team_key}/awards/{year}": {
|
|
108
|
+
schema: z.array(Award),
|
|
109
|
+
arguments: z.tuple([z.string(), z.number()]),
|
|
110
|
+
},
|
|
111
|
+
"/team/{team_key}/matches/{year}": {
|
|
112
|
+
schema: z.array(Match),
|
|
113
|
+
arguments: z.tuple([z.string(), z.number()]),
|
|
114
|
+
},
|
|
115
|
+
"/team/{team_key}/matches/{year}/simple": {
|
|
116
|
+
schema: z.array(Match_Simple),
|
|
117
|
+
arguments: z.tuple([z.string(), z.number()]),
|
|
118
|
+
},
|
|
119
|
+
"/team/{team_key}/matches/{year}/keys": {
|
|
120
|
+
schema: z.array(z.string()),
|
|
121
|
+
arguments: z.tuple([z.string(), z.number()]),
|
|
122
|
+
},
|
|
123
|
+
"/team/{team_key}/media/{year}": {
|
|
124
|
+
schema: z.array(Media),
|
|
125
|
+
arguments: z.tuple([z.string(), z.number()]),
|
|
126
|
+
},
|
|
127
|
+
"/team/{team_key}/media/tag/{media_tag}": {
|
|
128
|
+
schema: z.array(Media),
|
|
129
|
+
arguments: z.tuple([z.string(), z.string()]),
|
|
130
|
+
},
|
|
131
|
+
"/team/{team_key}/media/tag/{media_tag}/{year}": {
|
|
132
|
+
schema: z.array(Media),
|
|
133
|
+
arguments: z.tuple([z.string(), z.string(), z.int()]),
|
|
134
|
+
},
|
|
135
|
+
"/team/{team_key}/social_media": {
|
|
136
|
+
schema: z.array(Media),
|
|
137
|
+
arguments: z.tuple([z.string()]),
|
|
138
|
+
},
|
|
139
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const District_List: z.ZodObject<{
|
|
3
|
+
abbreviation: z.ZodString;
|
|
4
|
+
display_name: z.ZodString;
|
|
5
|
+
key: z.ZodString;
|
|
6
|
+
year: z.ZodInt;
|
|
7
|
+
}, {}>;
|
|
8
|
+
export declare const District_Ranking: z.ZodObject<{
|
|
9
|
+
team_key: z.ZodString;
|
|
10
|
+
rank: z.ZodInt;
|
|
11
|
+
rookie_bonus: z.ZodOptional<z.ZodInt>;
|
|
12
|
+
point_total: z.ZodNumber;
|
|
13
|
+
event_points: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
14
|
+
district_cmp: z.ZodBoolean;
|
|
15
|
+
total: z.ZodNumber;
|
|
16
|
+
alliance_points: z.ZodNumber;
|
|
17
|
+
elim_points: z.ZodNumber;
|
|
18
|
+
award_points: z.ZodNumber;
|
|
19
|
+
event_key: z.ZodString;
|
|
20
|
+
qual_points: z.ZodNumber;
|
|
21
|
+
}, {}>>>;
|
|
22
|
+
}, {}>;
|
|
23
|
+
export declare const District_Advancement: z.ZodObject<{
|
|
24
|
+
dcmp: z.ZodBoolean;
|
|
25
|
+
cmp: z.ZodBoolean;
|
|
26
|
+
}, {}>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const District_List = z.object({
|
|
3
|
+
abbreviation: z.string(),
|
|
4
|
+
display_name: z.string(),
|
|
5
|
+
key: z.string(),
|
|
6
|
+
year: z.int(),
|
|
7
|
+
});
|
|
8
|
+
export const District_Ranking = z.object({
|
|
9
|
+
team_key: z.string(),
|
|
10
|
+
rank: z.int(),
|
|
11
|
+
rookie_bonus: z.int().optional(),
|
|
12
|
+
point_total: z.number(),
|
|
13
|
+
event_points: z.array(z.object({
|
|
14
|
+
district_cmp: z.boolean(),
|
|
15
|
+
total: z.number(),
|
|
16
|
+
alliance_points: z.number(),
|
|
17
|
+
elim_points: z.number(),
|
|
18
|
+
award_points: z.number(),
|
|
19
|
+
event_key: z.string(),
|
|
20
|
+
qual_points: z.number(),
|
|
21
|
+
})).optional(),
|
|
22
|
+
});
|
|
23
|
+
export const District_Advancement = z.object({
|
|
24
|
+
dcmp: z.boolean(),
|
|
25
|
+
cmp: z.boolean(),
|
|
26
|
+
});
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const Webcast: z.ZodObject<{
|
|
3
|
+
type: z.ZodEnum<{
|
|
4
|
+
youtube: "youtube";
|
|
5
|
+
twitch: "twitch";
|
|
6
|
+
ustream: "ustream";
|
|
7
|
+
iframe: "iframe";
|
|
8
|
+
html5: "html5";
|
|
9
|
+
rtmp: "rtmp";
|
|
10
|
+
livestream: "livestream";
|
|
11
|
+
direct_link: "direct_link";
|
|
12
|
+
mms: "mms";
|
|
13
|
+
justin: "justin";
|
|
14
|
+
stemtv: "stemtv";
|
|
15
|
+
dacast: "dacast";
|
|
16
|
+
}>;
|
|
17
|
+
channel: z.ZodString;
|
|
18
|
+
date: z.ZodOptional<z.ZodNullable<z.coerce.ZodCoercedDate>>;
|
|
19
|
+
file: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
|
+
}, {}>;
|
|
21
|
+
export declare const Event_Simple: z.ZodObject<{
|
|
22
|
+
key: z.ZodString;
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
event_code: z.ZodString;
|
|
25
|
+
event_type: z.ZodInt;
|
|
26
|
+
district: z.ZodNullable<z.ZodObject<{
|
|
27
|
+
abbreviation: z.ZodString;
|
|
28
|
+
display_name: z.ZodString;
|
|
29
|
+
key: z.ZodString;
|
|
30
|
+
year: z.ZodInt;
|
|
31
|
+
}, {}>>;
|
|
32
|
+
city: z.ZodNullable<z.ZodString>;
|
|
33
|
+
state_prov: z.ZodNullable<z.ZodString>;
|
|
34
|
+
country: z.ZodNullable<z.ZodString>;
|
|
35
|
+
start_date: z.coerce.ZodCoercedDate;
|
|
36
|
+
end_date: z.coerce.ZodCoercedDate;
|
|
37
|
+
year: z.ZodInt;
|
|
38
|
+
}, {}>;
|
|
39
|
+
export declare const Event: z.ZodObject<{
|
|
40
|
+
key: z.ZodString;
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
city: z.ZodNullable<z.ZodString>;
|
|
43
|
+
state_prov: z.ZodNullable<z.ZodString>;
|
|
44
|
+
country: z.ZodNullable<z.ZodString>;
|
|
45
|
+
postal_code: z.ZodNullable<z.ZodString>;
|
|
46
|
+
website: z.ZodNullable<z.ZodString>;
|
|
47
|
+
year: z.ZodInt;
|
|
48
|
+
event_code: z.ZodString;
|
|
49
|
+
event_type: z.ZodInt;
|
|
50
|
+
district: z.ZodNullable<z.ZodObject<{
|
|
51
|
+
abbreviation: z.ZodString;
|
|
52
|
+
display_name: z.ZodString;
|
|
53
|
+
key: z.ZodString;
|
|
54
|
+
year: z.ZodInt;
|
|
55
|
+
}, {}>>;
|
|
56
|
+
start_date: z.coerce.ZodCoercedDate;
|
|
57
|
+
end_date: z.coerce.ZodCoercedDate;
|
|
58
|
+
webcasts: z.ZodArray<z.ZodObject<{
|
|
59
|
+
type: z.ZodEnum<{
|
|
60
|
+
youtube: "youtube";
|
|
61
|
+
twitch: "twitch";
|
|
62
|
+
ustream: "ustream";
|
|
63
|
+
iframe: "iframe";
|
|
64
|
+
html5: "html5";
|
|
65
|
+
rtmp: "rtmp";
|
|
66
|
+
livestream: "livestream";
|
|
67
|
+
direct_link: "direct_link";
|
|
68
|
+
mms: "mms";
|
|
69
|
+
justin: "justin";
|
|
70
|
+
stemtv: "stemtv";
|
|
71
|
+
dacast: "dacast";
|
|
72
|
+
}>;
|
|
73
|
+
channel: z.ZodString;
|
|
74
|
+
date: z.ZodOptional<z.ZodNullable<z.coerce.ZodCoercedDate>>;
|
|
75
|
+
file: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
76
|
+
}, {}>>;
|
|
77
|
+
division_keys: z.ZodArray<z.ZodString>;
|
|
78
|
+
short_name: z.ZodNullable<z.ZodString>;
|
|
79
|
+
event_type_string: z.ZodString;
|
|
80
|
+
week: z.ZodNullable<z.ZodNumber>;
|
|
81
|
+
address: z.ZodNullable<z.ZodString>;
|
|
82
|
+
gmaps_place_id: z.ZodNullable<z.ZodString>;
|
|
83
|
+
gmaps_url: z.ZodNullable<z.ZodString>;
|
|
84
|
+
lat: z.ZodNullable<z.ZodNumber>;
|
|
85
|
+
lng: z.ZodNullable<z.ZodNumber>;
|
|
86
|
+
location_name: z.ZodNullable<z.ZodString>;
|
|
87
|
+
timezone: z.ZodNullable<z.ZodString>;
|
|
88
|
+
first_event_id: z.ZodNullable<z.ZodString>;
|
|
89
|
+
first_event_code: z.ZodNullable<z.ZodString>;
|
|
90
|
+
parent_event_key: z.ZodNullable<z.ZodString>;
|
|
91
|
+
playoff_type: z.ZodNullable<z.ZodInt>;
|
|
92
|
+
playoff_type_string: z.ZodNullable<z.ZodString>;
|
|
93
|
+
}, {}>;
|
|
94
|
+
export declare const WLT_Record: z.ZodObject<{
|
|
95
|
+
wins: z.ZodInt;
|
|
96
|
+
losses: z.ZodInt;
|
|
97
|
+
ties: z.ZodInt;
|
|
98
|
+
}, {}>;
|
|
99
|
+
export declare const Team_Event_Status_rank: z.ZodObject<{
|
|
100
|
+
num_teams: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
101
|
+
ranking: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
102
|
+
matches_played: z.ZodNullable<z.ZodInt>;
|
|
103
|
+
qual_average: z.ZodNullable<z.ZodNullable<z.ZodNumber>>;
|
|
104
|
+
sort_orders: z.ZodNullable<z.ZodArray<z.ZodNumber>>;
|
|
105
|
+
rank: z.ZodNullable<z.ZodInt>;
|
|
106
|
+
dq: z.ZodNullable<z.ZodInt>;
|
|
107
|
+
team_key: z.ZodNullable<z.ZodString>;
|
|
108
|
+
}, {}>>>;
|
|
109
|
+
sort_order_info: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
110
|
+
precision: z.ZodNullable<z.ZodInt>;
|
|
111
|
+
name: z.ZodNullable<z.ZodString>;
|
|
112
|
+
}, {}>>>>;
|
|
113
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
114
|
+
}, {}>;
|
|
115
|
+
export declare const Team_Event_Status_alliance_backup: z.ZodObject<{
|
|
116
|
+
in: z.ZodOptional<z.ZodString>;
|
|
117
|
+
out: z.ZodOptional<z.ZodString>;
|
|
118
|
+
}, {}>;
|
|
119
|
+
export declare const Team_Event_Status_alliance: z.ZodObject<{
|
|
120
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
121
|
+
number: z.ZodInt;
|
|
122
|
+
backup: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
123
|
+
in: z.ZodOptional<z.ZodString>;
|
|
124
|
+
out: z.ZodOptional<z.ZodString>;
|
|
125
|
+
}, {}>>>;
|
|
126
|
+
pick: z.ZodInt;
|
|
127
|
+
}, {}>;
|
|
128
|
+
export declare const Team_Event_Status_playoff: z.ZodObject<{
|
|
129
|
+
level: z.ZodOptional<z.ZodEnum<{
|
|
130
|
+
qm: "qm";
|
|
131
|
+
ef: "ef";
|
|
132
|
+
qf: "qf";
|
|
133
|
+
sf: "sf";
|
|
134
|
+
f: "f";
|
|
135
|
+
}>>;
|
|
136
|
+
current_level_record: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
137
|
+
wins: z.ZodInt;
|
|
138
|
+
losses: z.ZodInt;
|
|
139
|
+
ties: z.ZodInt;
|
|
140
|
+
}, {}>>>;
|
|
141
|
+
record: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
142
|
+
wins: z.ZodInt;
|
|
143
|
+
losses: z.ZodInt;
|
|
144
|
+
ties: z.ZodInt;
|
|
145
|
+
}, {}>>>;
|
|
146
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
147
|
+
won: "won";
|
|
148
|
+
eliminated: "eliminated";
|
|
149
|
+
playing: "playing";
|
|
150
|
+
}>>;
|
|
151
|
+
playoff_average: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
152
|
+
}, {}>;
|
|
153
|
+
export declare const Team_Event_Status: z.ZodObject<{
|
|
154
|
+
alliance_status_str: z.ZodOptional<z.ZodString>;
|
|
155
|
+
playoff_status_str: z.ZodOptional<z.ZodString>;
|
|
156
|
+
overall_status_str: z.ZodOptional<z.ZodString>;
|
|
157
|
+
next_match_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
158
|
+
last_match_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
159
|
+
qual: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
160
|
+
num_teams: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
161
|
+
ranking: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
162
|
+
matches_played: z.ZodNullable<z.ZodInt>;
|
|
163
|
+
qual_average: z.ZodNullable<z.ZodNullable<z.ZodNumber>>;
|
|
164
|
+
sort_orders: z.ZodNullable<z.ZodArray<z.ZodNumber>>;
|
|
165
|
+
rank: z.ZodNullable<z.ZodInt>;
|
|
166
|
+
dq: z.ZodNullable<z.ZodInt>;
|
|
167
|
+
team_key: z.ZodNullable<z.ZodString>;
|
|
168
|
+
}, {}>>>;
|
|
169
|
+
sort_order_info: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
170
|
+
precision: z.ZodNullable<z.ZodInt>;
|
|
171
|
+
name: z.ZodNullable<z.ZodString>;
|
|
172
|
+
}, {}>>>>;
|
|
173
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
174
|
+
}, {}>>>;
|
|
175
|
+
alliance: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
176
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
177
|
+
number: z.ZodInt;
|
|
178
|
+
backup: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
179
|
+
in: z.ZodOptional<z.ZodString>;
|
|
180
|
+
out: z.ZodOptional<z.ZodString>;
|
|
181
|
+
}, {}>>>;
|
|
182
|
+
pick: z.ZodInt;
|
|
183
|
+
}, {}>>>;
|
|
184
|
+
playoff: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
185
|
+
level: z.ZodOptional<z.ZodEnum<{
|
|
186
|
+
qm: "qm";
|
|
187
|
+
ef: "ef";
|
|
188
|
+
qf: "qf";
|
|
189
|
+
sf: "sf";
|
|
190
|
+
f: "f";
|
|
191
|
+
}>>;
|
|
192
|
+
current_level_record: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
193
|
+
wins: z.ZodInt;
|
|
194
|
+
losses: z.ZodInt;
|
|
195
|
+
ties: z.ZodInt;
|
|
196
|
+
}, {}>>>;
|
|
197
|
+
record: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
198
|
+
wins: z.ZodInt;
|
|
199
|
+
losses: z.ZodInt;
|
|
200
|
+
ties: z.ZodInt;
|
|
201
|
+
}, {}>>>;
|
|
202
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
203
|
+
won: "won";
|
|
204
|
+
eliminated: "eliminated";
|
|
205
|
+
playing: "playing";
|
|
206
|
+
}>>;
|
|
207
|
+
playoff_average: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
208
|
+
}, {}>>>;
|
|
209
|
+
}, {}>;
|
|
210
|
+
export declare const Elimination_Alliance: z.ZodObject<{
|
|
211
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
212
|
+
backup: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
213
|
+
in: z.ZodString;
|
|
214
|
+
out: z.ZodString;
|
|
215
|
+
}, {}>>>;
|
|
216
|
+
declines: z.ZodArray<z.ZodString>;
|
|
217
|
+
picks: z.ZodArray<z.ZodString>;
|
|
218
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
219
|
+
playoff_average: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
220
|
+
level: z.ZodOptional<z.ZodString>;
|
|
221
|
+
record: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
222
|
+
wins: z.ZodInt;
|
|
223
|
+
losses: z.ZodInt;
|
|
224
|
+
ties: z.ZodInt;
|
|
225
|
+
}, {}>>>;
|
|
226
|
+
current_level_record: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
227
|
+
wins: z.ZodInt;
|
|
228
|
+
losses: z.ZodInt;
|
|
229
|
+
ties: z.ZodInt;
|
|
230
|
+
}, {}>>>;
|
|
231
|
+
status: z.ZodOptional<z.ZodString>;
|
|
232
|
+
}, {}>>;
|
|
233
|
+
}, {}>;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { District_List } from "./districts.js";
|
|
3
|
+
export const Webcast = z.object({
|
|
4
|
+
type: z.enum(["youtube", "twitch", "ustream", "iframe", "html5", "rtmp", "livestream", "direct_link", "mms", "justin", "stemtv", "dacast"]),
|
|
5
|
+
channel: z.string(),
|
|
6
|
+
date: z.coerce.date().nullable().optional(),
|
|
7
|
+
file: z.string().nullable().optional(),
|
|
8
|
+
});
|
|
9
|
+
export const Event_Simple = z.object({
|
|
10
|
+
key: z.string(),
|
|
11
|
+
name: z.string(),
|
|
12
|
+
event_code: z.string(),
|
|
13
|
+
event_type: z.int(),
|
|
14
|
+
district: District_List.nullable(),
|
|
15
|
+
city: z.string().nullable(),
|
|
16
|
+
state_prov: z.string().nullable(),
|
|
17
|
+
country: z.string().nullable(),
|
|
18
|
+
start_date: z.coerce.date(),
|
|
19
|
+
end_date: z.coerce.date(),
|
|
20
|
+
year: z.int(),
|
|
21
|
+
});
|
|
22
|
+
export const Event = Event_Simple.extend({
|
|
23
|
+
short_name: z.string().nullable(),
|
|
24
|
+
event_type_string: z.string(),
|
|
25
|
+
week: z.number().nullable(),
|
|
26
|
+
address: z.string().nullable(),
|
|
27
|
+
postal_code: z.string().nullable(),
|
|
28
|
+
gmaps_place_id: z.string().nullable(),
|
|
29
|
+
gmaps_url: z.string().nullable(),
|
|
30
|
+
lat: z.number().nullable(),
|
|
31
|
+
lng: z.number().nullable(),
|
|
32
|
+
location_name: z.string().nullable(),
|
|
33
|
+
timezone: z.string().nullable(),
|
|
34
|
+
website: z.string().nullable(),
|
|
35
|
+
first_event_id: z.string().nullable(),
|
|
36
|
+
first_event_code: z.string().nullable(),
|
|
37
|
+
webcasts: z.array(Webcast),
|
|
38
|
+
division_keys: z.array(z.string()),
|
|
39
|
+
parent_event_key: z.string().nullable(),
|
|
40
|
+
playoff_type: z.int().nullable(),
|
|
41
|
+
playoff_type_string: z.string().nullable(),
|
|
42
|
+
});
|
|
43
|
+
export const WLT_Record = z.object({
|
|
44
|
+
wins: z.int(),
|
|
45
|
+
losses: z.int(),
|
|
46
|
+
ties: z.int(),
|
|
47
|
+
});
|
|
48
|
+
// Docs don't say it is nullable, but it has been null during testing
|
|
49
|
+
export const Team_Event_Status_rank = z.object({
|
|
50
|
+
num_teams: z.int().nullable(),
|
|
51
|
+
ranking: z.object({
|
|
52
|
+
matches_played: z.int().nullable(),
|
|
53
|
+
qual_average: z.number().nullable().nullable(),
|
|
54
|
+
sort_orders: z.array(z.number()).nullable(),
|
|
55
|
+
rank: z.int().nullable(),
|
|
56
|
+
dq: z.int().nullable(),
|
|
57
|
+
team_key: z.string().nullable(),
|
|
58
|
+
}).optional(),
|
|
59
|
+
sort_order_info: z.array(z.object({
|
|
60
|
+
precision: z.int().nullable(),
|
|
61
|
+
name: z.string().nullable(),
|
|
62
|
+
})).nullable(),
|
|
63
|
+
status: z.string().nullable(),
|
|
64
|
+
}).partial();
|
|
65
|
+
export const Team_Event_Status_alliance_backup = z.object({
|
|
66
|
+
in: z.string().optional(),
|
|
67
|
+
out: z.string().optional(),
|
|
68
|
+
});
|
|
69
|
+
export const Team_Event_Status_alliance = z.object({
|
|
70
|
+
name: z.string().nullable().optional(),
|
|
71
|
+
number: z.int(),
|
|
72
|
+
backup: Team_Event_Status_alliance_backup.nullable().optional(),
|
|
73
|
+
pick: z.int().min(-1).max(3),
|
|
74
|
+
});
|
|
75
|
+
export const Team_Event_Status_playoff = z.object({
|
|
76
|
+
level: z.enum(["qm", "ef", "qf", "sf", "f"]).optional(),
|
|
77
|
+
current_level_record: WLT_Record.nullable().optional(),
|
|
78
|
+
record: WLT_Record.nullable().optional(),
|
|
79
|
+
status: z.enum(["won", "eliminated", "playing"]).optional(),
|
|
80
|
+
playoff_average: z.number().nullable().optional(),
|
|
81
|
+
});
|
|
82
|
+
export const Team_Event_Status = z.object({
|
|
83
|
+
alliance_status_str: z.string().optional(),
|
|
84
|
+
playoff_status_str: z.string().optional(),
|
|
85
|
+
overall_status_str: z.string().optional(),
|
|
86
|
+
next_match_key: z.string().nullable().optional(),
|
|
87
|
+
last_match_key: z.string().nullable().optional(),
|
|
88
|
+
qual: Team_Event_Status_rank.nullable().optional(),
|
|
89
|
+
alliance: Team_Event_Status_alliance.nullable().optional(),
|
|
90
|
+
playoff: Team_Event_Status_playoff.nullable().optional(),
|
|
91
|
+
});
|
|
92
|
+
export const Elimination_Alliance = z.object({
|
|
93
|
+
name: z.string().nullable().optional(),
|
|
94
|
+
backup: z.object({
|
|
95
|
+
in: z.string(),
|
|
96
|
+
out: z.string(),
|
|
97
|
+
}).nullable().optional(),
|
|
98
|
+
declines: z.array(z.string()),
|
|
99
|
+
picks: z.array(z.string()),
|
|
100
|
+
status: z.object({
|
|
101
|
+
playoff_average: z.number().nullable(),
|
|
102
|
+
level: z.string(),
|
|
103
|
+
record: WLT_Record.nullable(),
|
|
104
|
+
current_level_record: WLT_Record.nullable(),
|
|
105
|
+
status: z.string(),
|
|
106
|
+
}).partial().optional(),
|
|
107
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const LeaderboardInsights: z.ZodObject<{
|
|
3
|
+
data: z.ZodObject<{
|
|
4
|
+
rankings: z.ZodArray<z.ZodObject<{
|
|
5
|
+
value: z.ZodNumber;
|
|
6
|
+
keys: z.ZodArray<z.ZodString>;
|
|
7
|
+
}, {}>>;
|
|
8
|
+
key_type: z.ZodEnum<{
|
|
9
|
+
match: "match";
|
|
10
|
+
team: "team";
|
|
11
|
+
event: "event";
|
|
12
|
+
}>;
|
|
13
|
+
}, {}>;
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
year: z.ZodInt;
|
|
16
|
+
}, {}>;
|
|
17
|
+
export declare const NotablesInsight: z.ZodObject<{
|
|
18
|
+
data: z.ZodObject<{
|
|
19
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
20
|
+
context: z.ZodArray<z.ZodString>;
|
|
21
|
+
team_key: z.ZodString;
|
|
22
|
+
}, {}>>;
|
|
23
|
+
}, {}>;
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
year: z.ZodInt;
|
|
26
|
+
}, {}>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const LeaderboardInsights = z.object({
|
|
3
|
+
data: z.object({
|
|
4
|
+
rankings: z.array(z.object({
|
|
5
|
+
value: z.number(),
|
|
6
|
+
keys: z.array(z.string()),
|
|
7
|
+
})),
|
|
8
|
+
key_type: z.enum(["team", "event", "match"]),
|
|
9
|
+
}),
|
|
10
|
+
name: z.string(),
|
|
11
|
+
year: z.int(),
|
|
12
|
+
});
|
|
13
|
+
export const NotablesInsight = z.object({
|
|
14
|
+
data: z.object({
|
|
15
|
+
entries: z.array(z.object({
|
|
16
|
+
context: z.array(z.string()),
|
|
17
|
+
team_key: z.string(),
|
|
18
|
+
})),
|
|
19
|
+
}),
|
|
20
|
+
name: z.string(),
|
|
21
|
+
year: z.int(),
|
|
22
|
+
});
|