rategame-shared 1.0.73 → 1.0.75
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/team.d.ts +4 -1
- package/dist/schemas/team.d.ts +2 -0
- package/dist/schemas/team.js +12 -7
- package/package.json +1 -1
package/dist/models/team.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { teamSchema } from "../schemas/team";
|
|
2
|
+
import { teamSchema, mlbTeamSchema, divisionSchema, conferenceSchema } from "../schemas/team";
|
|
3
3
|
export type Team = z.infer<typeof teamSchema>;
|
|
4
|
+
export type MLBTeam = z.infer<typeof mlbTeamSchema>;
|
|
5
|
+
export type Division = z.infer<typeof divisionSchema>;
|
|
6
|
+
export type Conference = z.infer<typeof conferenceSchema>;
|
package/dist/schemas/team.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ export declare const teamSchema: z.ZodObject<{
|
|
|
24
24
|
city?: string | undefined;
|
|
25
25
|
conference?: string | undefined;
|
|
26
26
|
}>;
|
|
27
|
+
export declare const divisionSchema: z.ZodUnion<[z.ZodLiteral<"east">, z.ZodLiteral<"central">, z.ZodLiteral<"west">]>;
|
|
28
|
+
export declare const conferenceSchema: z.ZodUnion<[z.ZodLiteral<"national">, z.ZodLiteral<"american">]>;
|
|
27
29
|
export declare const mlbTeamSchema: z.ZodObject<{
|
|
28
30
|
id: z.ZodOptional<z.ZodString>;
|
|
29
31
|
apiTeamId: z.ZodNumber;
|
package/dist/schemas/team.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mlbTeamSchema = exports.teamSchema = void 0;
|
|
3
|
+
exports.mlbTeamSchema = exports.conferenceSchema = exports.divisionSchema = 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,16 +11,21 @@ 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.divisionSchema = zod_1.z.union([
|
|
15
|
+
zod_1.z.literal("east"),
|
|
16
|
+
zod_1.z.literal("central"),
|
|
17
|
+
zod_1.z.literal("west"),
|
|
18
|
+
]);
|
|
19
|
+
exports.conferenceSchema = zod_1.z.union([
|
|
20
|
+
zod_1.z.literal("national"),
|
|
21
|
+
zod_1.z.literal("american"),
|
|
22
|
+
]);
|
|
14
23
|
exports.mlbTeamSchema = zod_1.z.object({
|
|
15
24
|
id: zod_1.z.string().optional(),
|
|
16
25
|
apiTeamId: zod_1.z.number(),
|
|
17
26
|
name: zod_1.z.string(),
|
|
18
27
|
image: zod_1.z.string(),
|
|
19
28
|
city: zod_1.z.string().optional(),
|
|
20
|
-
division:
|
|
21
|
-
|
|
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")]),
|
|
29
|
+
division: exports.divisionSchema,
|
|
30
|
+
conference: exports.conferenceSchema,
|
|
26
31
|
});
|