rategame-shared 1.0.72 → 1.0.74
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/dist/models/nba/game.d.ts +5 -0
- package/dist/models/nba/game.js +2 -0
- package/dist/models/nba/team.d.ts +3 -0
- package/dist/models/nba/team.js +2 -0
- package/dist/models/team.d.ts +2 -1
- package/dist/schemas/nba/game.d.ts +233 -0
- package/dist/schemas/nba/game.js +44 -0
- package/dist/schemas/nba/team.d.ts +23 -0
- package/dist/schemas/nba/team.js +12 -0
- package/dist/schemas/team.d.ts +25 -0
- package/dist/schemas/team.js +14 -1
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { nbaGameSchema, quartersSchema, seriesInfoSchema } from "../../schemas/nba/game";
|
|
3
|
+
export type NBAGame = z.infer<typeof nbaGameSchema>;
|
|
4
|
+
export type SeriesInfo = z.infer<typeof seriesInfoSchema>;
|
|
5
|
+
export type Quarters = z.infer<typeof quartersSchema>;
|
package/dist/models/team.d.ts
CHANGED
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const seriesInfoSchema: z.ZodObject<{
|
|
3
|
+
homeTeamWins: z.ZodNumber;
|
|
4
|
+
awayTeamWins: z.ZodNumber;
|
|
5
|
+
gameNumber: z.ZodNumber;
|
|
6
|
+
maxLength: z.ZodNumber;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
maxLength: number;
|
|
9
|
+
homeTeamWins: number;
|
|
10
|
+
awayTeamWins: number;
|
|
11
|
+
gameNumber: number;
|
|
12
|
+
}, {
|
|
13
|
+
maxLength: number;
|
|
14
|
+
homeTeamWins: number;
|
|
15
|
+
awayTeamWins: number;
|
|
16
|
+
gameNumber: number;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const quartersSchema: z.ZodArray<z.ZodObject<{
|
|
19
|
+
awayScore: z.ZodNumber;
|
|
20
|
+
homeScore: z.ZodNumber;
|
|
21
|
+
number: z.ZodNumber;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
number: number;
|
|
24
|
+
awayScore: number;
|
|
25
|
+
homeScore: number;
|
|
26
|
+
}, {
|
|
27
|
+
number: number;
|
|
28
|
+
awayScore: number;
|
|
29
|
+
homeScore: number;
|
|
30
|
+
}>, "many">;
|
|
31
|
+
export declare const nbaGameSchema: z.ZodObject<{
|
|
32
|
+
id: z.ZodOptional<z.ZodString>;
|
|
33
|
+
status: z.ZodUnion<[z.ZodLiteral<"scheduled">, z.ZodLiteral<"live">, z.ZodLiteral<"final">]>;
|
|
34
|
+
isClosed: z.ZodBoolean;
|
|
35
|
+
startedAt: z.ZodNumber;
|
|
36
|
+
finishedAt: z.ZodNumber;
|
|
37
|
+
ratingWindowClosedAt: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
apiGameId: z.ZodNumber;
|
|
39
|
+
homeTeam: z.ZodObject<{
|
|
40
|
+
id: z.ZodOptional<z.ZodString>;
|
|
41
|
+
apiTeamId: z.ZodNumber;
|
|
42
|
+
name: z.ZodString;
|
|
43
|
+
city: z.ZodString;
|
|
44
|
+
conference: z.ZodString;
|
|
45
|
+
image: z.ZodString;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
name: string;
|
|
48
|
+
image: string;
|
|
49
|
+
apiTeamId: number;
|
|
50
|
+
city: string;
|
|
51
|
+
conference: string;
|
|
52
|
+
id?: string | undefined;
|
|
53
|
+
}, {
|
|
54
|
+
name: string;
|
|
55
|
+
image: string;
|
|
56
|
+
apiTeamId: number;
|
|
57
|
+
city: string;
|
|
58
|
+
conference: string;
|
|
59
|
+
id?: string | undefined;
|
|
60
|
+
}>;
|
|
61
|
+
awayTeam: z.ZodObject<{
|
|
62
|
+
id: z.ZodOptional<z.ZodString>;
|
|
63
|
+
apiTeamId: z.ZodNumber;
|
|
64
|
+
name: z.ZodString;
|
|
65
|
+
city: z.ZodString;
|
|
66
|
+
conference: z.ZodString;
|
|
67
|
+
image: z.ZodString;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
name: string;
|
|
70
|
+
image: string;
|
|
71
|
+
apiTeamId: number;
|
|
72
|
+
city: string;
|
|
73
|
+
conference: string;
|
|
74
|
+
id?: string | undefined;
|
|
75
|
+
}, {
|
|
76
|
+
name: string;
|
|
77
|
+
image: string;
|
|
78
|
+
apiTeamId: number;
|
|
79
|
+
city: string;
|
|
80
|
+
conference: string;
|
|
81
|
+
id?: string | undefined;
|
|
82
|
+
}>;
|
|
83
|
+
timeRemainingMinutes: z.ZodNumber;
|
|
84
|
+
timeRemainingSeconds: z.ZodNumber;
|
|
85
|
+
round: z.ZodUnion<[z.ZodLiteral<"quarters">, z.ZodLiteral<"semis">, z.ZodLiteral<"conference">, z.ZodLiteral<"finals">]>;
|
|
86
|
+
quarters: z.ZodArray<z.ZodObject<{
|
|
87
|
+
awayScore: z.ZodNumber;
|
|
88
|
+
homeScore: z.ZodNumber;
|
|
89
|
+
number: z.ZodNumber;
|
|
90
|
+
}, "strip", z.ZodTypeAny, {
|
|
91
|
+
number: number;
|
|
92
|
+
awayScore: number;
|
|
93
|
+
homeScore: number;
|
|
94
|
+
}, {
|
|
95
|
+
number: number;
|
|
96
|
+
awayScore: number;
|
|
97
|
+
homeScore: number;
|
|
98
|
+
}>, "many">;
|
|
99
|
+
seriesInfo: z.ZodObject<{
|
|
100
|
+
homeTeamWins: z.ZodNumber;
|
|
101
|
+
awayTeamWins: z.ZodNumber;
|
|
102
|
+
gameNumber: z.ZodNumber;
|
|
103
|
+
maxLength: z.ZodNumber;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
maxLength: number;
|
|
106
|
+
homeTeamWins: number;
|
|
107
|
+
awayTeamWins: number;
|
|
108
|
+
gameNumber: number;
|
|
109
|
+
}, {
|
|
110
|
+
maxLength: number;
|
|
111
|
+
homeTeamWins: number;
|
|
112
|
+
awayTeamWins: number;
|
|
113
|
+
gameNumber: number;
|
|
114
|
+
}>;
|
|
115
|
+
rating: z.ZodOptional<z.ZodObject<{
|
|
116
|
+
avg: z.ZodNumber;
|
|
117
|
+
votes: z.ZodObject<{
|
|
118
|
+
options: z.ZodRecord<z.ZodNumber, z.ZodNumber>;
|
|
119
|
+
total: z.ZodNumber;
|
|
120
|
+
}, "strip", z.ZodTypeAny, {
|
|
121
|
+
total: number;
|
|
122
|
+
options: Record<number, number>;
|
|
123
|
+
}, {
|
|
124
|
+
total: number;
|
|
125
|
+
options: Record<number, number>;
|
|
126
|
+
}>;
|
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
|
128
|
+
avg: number;
|
|
129
|
+
votes: {
|
|
130
|
+
total: number;
|
|
131
|
+
options: Record<number, number>;
|
|
132
|
+
};
|
|
133
|
+
}, {
|
|
134
|
+
avg: number;
|
|
135
|
+
votes: {
|
|
136
|
+
total: number;
|
|
137
|
+
options: Record<number, number>;
|
|
138
|
+
};
|
|
139
|
+
}>>;
|
|
140
|
+
userIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
round: "quarters" | "conference" | "semis" | "finals";
|
|
143
|
+
status: "live" | "scheduled" | "final";
|
|
144
|
+
quarters: {
|
|
145
|
+
number: number;
|
|
146
|
+
awayScore: number;
|
|
147
|
+
homeScore: number;
|
|
148
|
+
}[];
|
|
149
|
+
isClosed: boolean;
|
|
150
|
+
startedAt: number;
|
|
151
|
+
finishedAt: number;
|
|
152
|
+
apiGameId: number;
|
|
153
|
+
homeTeam: {
|
|
154
|
+
name: string;
|
|
155
|
+
image: string;
|
|
156
|
+
apiTeamId: number;
|
|
157
|
+
city: string;
|
|
158
|
+
conference: string;
|
|
159
|
+
id?: string | undefined;
|
|
160
|
+
};
|
|
161
|
+
awayTeam: {
|
|
162
|
+
name: string;
|
|
163
|
+
image: string;
|
|
164
|
+
apiTeamId: number;
|
|
165
|
+
city: string;
|
|
166
|
+
conference: string;
|
|
167
|
+
id?: string | undefined;
|
|
168
|
+
};
|
|
169
|
+
timeRemainingMinutes: number;
|
|
170
|
+
timeRemainingSeconds: number;
|
|
171
|
+
seriesInfo: {
|
|
172
|
+
maxLength: number;
|
|
173
|
+
homeTeamWins: number;
|
|
174
|
+
awayTeamWins: number;
|
|
175
|
+
gameNumber: number;
|
|
176
|
+
};
|
|
177
|
+
id?: string | undefined;
|
|
178
|
+
ratingWindowClosedAt?: number | undefined;
|
|
179
|
+
rating?: {
|
|
180
|
+
avg: number;
|
|
181
|
+
votes: {
|
|
182
|
+
total: number;
|
|
183
|
+
options: Record<number, number>;
|
|
184
|
+
};
|
|
185
|
+
} | undefined;
|
|
186
|
+
userIds?: string[] | undefined;
|
|
187
|
+
}, {
|
|
188
|
+
round: "quarters" | "conference" | "semis" | "finals";
|
|
189
|
+
status: "live" | "scheduled" | "final";
|
|
190
|
+
quarters: {
|
|
191
|
+
number: number;
|
|
192
|
+
awayScore: number;
|
|
193
|
+
homeScore: number;
|
|
194
|
+
}[];
|
|
195
|
+
isClosed: boolean;
|
|
196
|
+
startedAt: number;
|
|
197
|
+
finishedAt: number;
|
|
198
|
+
apiGameId: number;
|
|
199
|
+
homeTeam: {
|
|
200
|
+
name: string;
|
|
201
|
+
image: string;
|
|
202
|
+
apiTeamId: number;
|
|
203
|
+
city: string;
|
|
204
|
+
conference: string;
|
|
205
|
+
id?: string | undefined;
|
|
206
|
+
};
|
|
207
|
+
awayTeam: {
|
|
208
|
+
name: string;
|
|
209
|
+
image: string;
|
|
210
|
+
apiTeamId: number;
|
|
211
|
+
city: string;
|
|
212
|
+
conference: string;
|
|
213
|
+
id?: string | undefined;
|
|
214
|
+
};
|
|
215
|
+
timeRemainingMinutes: number;
|
|
216
|
+
timeRemainingSeconds: number;
|
|
217
|
+
seriesInfo: {
|
|
218
|
+
maxLength: number;
|
|
219
|
+
homeTeamWins: number;
|
|
220
|
+
awayTeamWins: number;
|
|
221
|
+
gameNumber: number;
|
|
222
|
+
};
|
|
223
|
+
id?: string | undefined;
|
|
224
|
+
ratingWindowClosedAt?: number | undefined;
|
|
225
|
+
rating?: {
|
|
226
|
+
avg: number;
|
|
227
|
+
votes: {
|
|
228
|
+
total: number;
|
|
229
|
+
options: Record<number, number>;
|
|
230
|
+
};
|
|
231
|
+
} | undefined;
|
|
232
|
+
userIds?: string[] | undefined;
|
|
233
|
+
}>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nbaGameSchema = exports.quartersSchema = exports.seriesInfoSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const team_1 = require("./team");
|
|
6
|
+
const game_1 = require("../game");
|
|
7
|
+
exports.seriesInfoSchema = zod_1.z.object({
|
|
8
|
+
homeTeamWins: zod_1.z.number(),
|
|
9
|
+
awayTeamWins: zod_1.z.number(),
|
|
10
|
+
gameNumber: zod_1.z.number(),
|
|
11
|
+
maxLength: zod_1.z.number(),
|
|
12
|
+
});
|
|
13
|
+
exports.quartersSchema = zod_1.z.array(zod_1.z.object({
|
|
14
|
+
awayScore: zod_1.z.number(),
|
|
15
|
+
homeScore: zod_1.z.number(),
|
|
16
|
+
number: zod_1.z.number(),
|
|
17
|
+
}));
|
|
18
|
+
exports.nbaGameSchema = zod_1.z.object({
|
|
19
|
+
id: zod_1.z.string().optional(),
|
|
20
|
+
status: zod_1.z.union([
|
|
21
|
+
zod_1.z.literal("scheduled"),
|
|
22
|
+
zod_1.z.literal("live"),
|
|
23
|
+
zod_1.z.literal("final"),
|
|
24
|
+
]),
|
|
25
|
+
isClosed: zod_1.z.boolean(),
|
|
26
|
+
startedAt: zod_1.z.number(),
|
|
27
|
+
finishedAt: zod_1.z.number(),
|
|
28
|
+
ratingWindowClosedAt: zod_1.z.number().optional(),
|
|
29
|
+
apiGameId: zod_1.z.number(),
|
|
30
|
+
homeTeam: team_1.nbaTeamSchema,
|
|
31
|
+
awayTeam: team_1.nbaTeamSchema,
|
|
32
|
+
timeRemainingMinutes: zod_1.z.number(),
|
|
33
|
+
timeRemainingSeconds: zod_1.z.number(),
|
|
34
|
+
round: zod_1.z.union([
|
|
35
|
+
zod_1.z.literal("quarters"),
|
|
36
|
+
zod_1.z.literal("semis"),
|
|
37
|
+
zod_1.z.literal("conference"),
|
|
38
|
+
zod_1.z.literal("finals"),
|
|
39
|
+
]),
|
|
40
|
+
quarters: exports.quartersSchema,
|
|
41
|
+
seriesInfo: exports.seriesInfoSchema,
|
|
42
|
+
rating: game_1.gameRatingAggregateSchema.optional(),
|
|
43
|
+
userIds: zod_1.z.array(zod_1.z.string()).optional(),
|
|
44
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const nbaTeamSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodOptional<z.ZodString>;
|
|
4
|
+
apiTeamId: z.ZodNumber;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
city: z.ZodString;
|
|
7
|
+
conference: z.ZodString;
|
|
8
|
+
image: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
name: string;
|
|
11
|
+
image: string;
|
|
12
|
+
apiTeamId: number;
|
|
13
|
+
city: string;
|
|
14
|
+
conference: string;
|
|
15
|
+
id?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
name: string;
|
|
18
|
+
image: string;
|
|
19
|
+
apiTeamId: number;
|
|
20
|
+
city: string;
|
|
21
|
+
conference: string;
|
|
22
|
+
id?: string | undefined;
|
|
23
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nbaTeamSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.nbaTeamSchema = zod_1.z.object({
|
|
6
|
+
id: zod_1.z.string().optional(),
|
|
7
|
+
apiTeamId: zod_1.z.number(),
|
|
8
|
+
name: zod_1.z.string(),
|
|
9
|
+
city: zod_1.z.string(),
|
|
10
|
+
conference: zod_1.z.string(),
|
|
11
|
+
image: zod_1.z.string(),
|
|
12
|
+
});
|
package/dist/schemas/team.d.ts
CHANGED
|
@@ -24,3 +24,28 @@ export declare const teamSchema: z.ZodObject<{
|
|
|
24
24
|
city?: string | undefined;
|
|
25
25
|
conference?: string | undefined;
|
|
26
26
|
}>;
|
|
27
|
+
export declare const mlbTeamSchema: z.ZodObject<{
|
|
28
|
+
id: z.ZodOptional<z.ZodString>;
|
|
29
|
+
apiTeamId: z.ZodNumber;
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
image: z.ZodString;
|
|
32
|
+
city: z.ZodOptional<z.ZodString>;
|
|
33
|
+
division: z.ZodUnion<[z.ZodLiteral<"east">, z.ZodLiteral<"central">, z.ZodLiteral<"west">]>;
|
|
34
|
+
conference: z.ZodUnion<[z.ZodLiteral<"national">, z.ZodLiteral<"american">]>;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
name: string;
|
|
37
|
+
image: string;
|
|
38
|
+
apiTeamId: number;
|
|
39
|
+
conference: "national" | "american";
|
|
40
|
+
division: "east" | "central" | "west";
|
|
41
|
+
id?: string | undefined;
|
|
42
|
+
city?: string | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
name: string;
|
|
45
|
+
image: string;
|
|
46
|
+
apiTeamId: number;
|
|
47
|
+
conference: "national" | "american";
|
|
48
|
+
division: "east" | "central" | "west";
|
|
49
|
+
id?: string | undefined;
|
|
50
|
+
city?: string | undefined;
|
|
51
|
+
}>;
|
package/dist/schemas/team.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.teamSchema = void 0;
|
|
3
|
+
exports.mlbTeamSchema = exports.teamSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.teamSchema = zod_1.z.object({
|
|
6
6
|
id: zod_1.z.string().optional(),
|
|
@@ -11,3 +11,16 @@ exports.teamSchema = zod_1.z.object({
|
|
|
11
11
|
city: zod_1.z.string().optional(),
|
|
12
12
|
conference: zod_1.z.string().optional(),
|
|
13
13
|
});
|
|
14
|
+
exports.mlbTeamSchema = zod_1.z.object({
|
|
15
|
+
id: zod_1.z.string().optional(),
|
|
16
|
+
apiTeamId: zod_1.z.number(),
|
|
17
|
+
name: zod_1.z.string(),
|
|
18
|
+
image: zod_1.z.string(),
|
|
19
|
+
city: zod_1.z.string().optional(),
|
|
20
|
+
division: zod_1.z.union([
|
|
21
|
+
zod_1.z.literal("east"),
|
|
22
|
+
zod_1.z.literal("central"),
|
|
23
|
+
zod_1.z.literal("west"),
|
|
24
|
+
]),
|
|
25
|
+
conference: zod_1.z.union([zod_1.z.literal("national"), zod_1.z.literal("american")]),
|
|
26
|
+
});
|