rategame-shared 1.0.94 → 1.0.96

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.
@@ -24,6 +24,28 @@ export declare const gameTeamSchema: z.ZodObject<{
24
24
  id?: string | undefined;
25
25
  isWinner?: boolean | undefined;
26
26
  }>;
27
+ export declare const mlbGameTeamSchema: z.ZodObject<{
28
+ id: z.ZodOptional<z.ZodString>;
29
+ apiTeamId: z.ZodNumber;
30
+ name: z.ZodString;
31
+ score: z.ZodNumber;
32
+ isWinner: z.ZodOptional<z.ZodBoolean>;
33
+ image: z.ZodString;
34
+ }, "strip", z.ZodTypeAny, {
35
+ name: string;
36
+ image: string;
37
+ apiTeamId: number;
38
+ score: number;
39
+ id?: string | undefined;
40
+ isWinner?: boolean | undefined;
41
+ }, {
42
+ name: string;
43
+ image: string;
44
+ apiTeamId: number;
45
+ score: number;
46
+ id?: string | undefined;
47
+ isWinner?: boolean | undefined;
48
+ }>;
27
49
  export declare const gameRatingAggregateSchema: z.ZodObject<{
28
50
  avg: z.ZodNumber;
29
51
  votes: z.ZodObject<{
@@ -82,12 +104,10 @@ export declare const gameSchema: z.ZodObject<{
82
104
  score: z.ZodNumber;
83
105
  isWinner: z.ZodOptional<z.ZodBoolean>;
84
106
  image: z.ZodString;
85
- seed: z.ZodNumber;
86
107
  }, "strip", z.ZodTypeAny, {
87
108
  name: string;
88
109
  image: string;
89
110
  apiTeamId: number;
90
- seed: number;
91
111
  score: number;
92
112
  id?: string | undefined;
93
113
  isWinner?: boolean | undefined;
@@ -95,7 +115,6 @@ export declare const gameSchema: z.ZodObject<{
95
115
  name: string;
96
116
  image: string;
97
117
  apiTeamId: number;
98
- seed: number;
99
118
  score: number;
100
119
  id?: string | undefined;
101
120
  isWinner?: boolean | undefined;
@@ -107,12 +126,10 @@ export declare const gameSchema: z.ZodObject<{
107
126
  score: z.ZodNumber;
108
127
  isWinner: z.ZodOptional<z.ZodBoolean>;
109
128
  image: z.ZodString;
110
- seed: z.ZodNumber;
111
129
  }, "strip", z.ZodTypeAny, {
112
130
  name: string;
113
131
  image: string;
114
132
  apiTeamId: number;
115
- seed: number;
116
133
  score: number;
117
134
  id?: string | undefined;
118
135
  isWinner?: boolean | undefined;
@@ -120,7 +137,6 @@ export declare const gameSchema: z.ZodObject<{
120
137
  name: string;
121
138
  image: string;
122
139
  apiTeamId: number;
123
- seed: number;
124
140
  score: number;
125
141
  id?: string | undefined;
126
142
  isWinner?: boolean | undefined;
@@ -194,7 +210,6 @@ export declare const gameSchema: z.ZodObject<{
194
210
  name: string;
195
211
  image: string;
196
212
  apiTeamId: number;
197
- seed: number;
198
213
  score: number;
199
214
  id?: string | undefined;
200
215
  isWinner?: boolean | undefined;
@@ -203,7 +218,6 @@ export declare const gameSchema: z.ZodObject<{
203
218
  name: string;
204
219
  image: string;
205
220
  apiTeamId: number;
206
- seed: number;
207
221
  score: number;
208
222
  id?: string | undefined;
209
223
  isWinner?: boolean | undefined;
@@ -244,7 +258,6 @@ export declare const gameSchema: z.ZodObject<{
244
258
  name: string;
245
259
  image: string;
246
260
  apiTeamId: number;
247
- seed: number;
248
261
  score: number;
249
262
  id?: string | undefined;
250
263
  isWinner?: boolean | undefined;
@@ -253,7 +266,6 @@ export declare const gameSchema: z.ZodObject<{
253
266
  name: string;
254
267
  image: string;
255
268
  apiTeamId: number;
256
- seed: number;
257
269
  score: number;
258
270
  id?: string | undefined;
259
271
  isWinner?: boolean | undefined;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.searchGameSchema = exports.mlbGameSchema = exports.inningSchema = exports.gameSchema = exports.seriesInfoSchema = exports.gameRatingAggregateSchema = exports.gameTeamSchema = void 0;
3
+ exports.searchGameSchema = exports.mlbGameSchema = exports.inningSchema = exports.gameSchema = exports.seriesInfoSchema = exports.gameRatingAggregateSchema = exports.mlbGameTeamSchema = exports.gameTeamSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const player_1 = require("./player");
6
6
  exports.gameTeamSchema = zod_1.z.object({
@@ -12,6 +12,14 @@ exports.gameTeamSchema = zod_1.z.object({
12
12
  image: zod_1.z.string(),
13
13
  seed: zod_1.z.number(),
14
14
  });
15
+ exports.mlbGameTeamSchema = zod_1.z.object({
16
+ id: zod_1.z.string().optional(),
17
+ apiTeamId: zod_1.z.number(),
18
+ name: zod_1.z.string(),
19
+ score: zod_1.z.number(),
20
+ isWinner: zod_1.z.boolean().optional(),
21
+ image: zod_1.z.string(),
22
+ });
15
23
  exports.gameRatingAggregateSchema = zod_1.z.object({
16
24
  avg: zod_1.z.number(),
17
25
  votes: zod_1.z.object({
@@ -39,8 +47,8 @@ exports.gameSchema = zod_1.z.object({
39
47
  round: zod_1.z.number(),
40
48
  apiGameId: zod_1.z.number(),
41
49
  league: zod_1.z.union([zod_1.z.literal("ncaa"), zod_1.z.literal("nba"), zod_1.z.literal("mlb")]),
42
- homeTeam: exports.gameTeamSchema,
43
- awayTeam: exports.gameTeamSchema,
50
+ homeTeam: exports.mlbGameTeamSchema,
51
+ awayTeam: exports.mlbGameTeamSchema,
44
52
  timeRemainingMinutes: zod_1.z.number(),
45
53
  timeRemainingSeconds: zod_1.z.number(),
46
54
  periods: zod_1.z.array(zod_1.z.object({
@@ -25,7 +25,7 @@ export declare const ratingSchema: import("zod").ZodObject<{
25
25
  game: import("zod").ZodObject<{
26
26
  id: import("zod").ZodString;
27
27
  round: import("zod").ZodNumber;
28
- league: import("zod").ZodUnion<[import("zod").ZodLiteral<"ncaa">, import("zod").ZodLiteral<"nba">]>;
28
+ league: import("zod").ZodUnion<[import("zod").ZodLiteral<"ncaa">, import("zod").ZodLiteral<"nba">, import("zod").ZodLiteral<"mlb">]>;
29
29
  homeTeam: import("zod").ZodObject<{
30
30
  id: import("zod").ZodOptional<import("zod").ZodString>;
31
31
  apiTeamId: import("zod").ZodNumber;
@@ -95,7 +95,7 @@ export declare const ratingSchema: import("zod").ZodObject<{
95
95
  }, "strip", import("zod").ZodTypeAny, {
96
96
  id: string;
97
97
  round: number;
98
- league: "nba" | "ncaa";
98
+ league: "nba" | "ncaa" | "mlb";
99
99
  homeTeam: {
100
100
  name: string;
101
101
  image: string;
@@ -123,7 +123,7 @@ export declare const ratingSchema: import("zod").ZodObject<{
123
123
  }, {
124
124
  id: string;
125
125
  round: number;
126
- league: "nba" | "ncaa";
126
+ league: "nba" | "ncaa" | "mlb";
127
127
  homeTeam: {
128
128
  name: string;
129
129
  image: string;
@@ -164,7 +164,7 @@ export declare const ratingSchema: import("zod").ZodObject<{
164
164
  game: {
165
165
  id: string;
166
166
  round: number;
167
- league: "nba" | "ncaa";
167
+ league: "nba" | "ncaa" | "mlb";
168
168
  homeTeam: {
169
169
  name: string;
170
170
  image: string;
@@ -206,7 +206,7 @@ export declare const ratingSchema: import("zod").ZodObject<{
206
206
  game: {
207
207
  id: string;
208
208
  round: number;
209
- league: "nba" | "ncaa";
209
+ league: "nba" | "ncaa" | "mlb";
210
210
  homeTeam: {
211
211
  name: string;
212
212
  image: string;
@@ -239,7 +239,7 @@ export declare const searchRatingSchema: import("zod").ZodObject<{
239
239
  q: import("zod").ZodOptional<import("zod").ZodString>;
240
240
  teamId: import("zod").ZodOptional<import("zod").ZodString>;
241
241
  round: import("zod").ZodOptional<import("zod").ZodString>;
242
- league: import("zod").ZodUnion<[import("zod").ZodLiteral<"ncaa">, import("zod").ZodLiteral<"nba">]>;
242
+ league: import("zod").ZodUnion<[import("zod").ZodLiteral<"ncaa">, import("zod").ZodLiteral<"nba">, import("zod").ZodLiteral<"mlb">]>;
243
243
  createdAt: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"12h">, import("zod").ZodLiteral<"daily">, import("zod").ZodLiteral<"weekly">]>>;
244
244
  sortBy: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"rating:asc">, import("zod").ZodLiteral<"rating:desc">, import("zod").ZodLiteral<"createdAt:asc">, import("zod").ZodLiteral<"createdAt:desc">, import("zod").ZodLiteral<"userLikes:asc">, import("zod").ZodLiteral<"userLikes:desc">]>>;
245
245
  limit: import("zod").ZodOptional<import("zod").ZodString>;
@@ -251,7 +251,7 @@ export declare const searchRatingSchema: import("zod").ZodObject<{
251
251
  following: import("zod").ZodOptional<import("zod").ZodString>;
252
252
  userId: import("zod").ZodOptional<import("zod").ZodString>;
253
253
  }, "strip", import("zod").ZodTypeAny, {
254
- league: "nba" | "ncaa";
254
+ league: "nba" | "ncaa" | "mlb";
255
255
  offset?: string | undefined;
256
256
  round?: string | undefined;
257
257
  q?: string | undefined;
@@ -266,7 +266,7 @@ export declare const searchRatingSchema: import("zod").ZodObject<{
266
266
  following?: string | undefined;
267
267
  userId?: string | undefined;
268
268
  }, {
269
- league: "nba" | "ncaa";
269
+ league: "nba" | "ncaa" | "mlb";
270
270
  offset?: string | undefined;
271
271
  round?: string | undefined;
272
272
  q?: string | undefined;
@@ -374,7 +374,7 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
374
374
  game: import("zod").ZodObject<{
375
375
  id: import("zod").ZodString;
376
376
  round: import("zod").ZodNumber;
377
- league: import("zod").ZodUnion<[import("zod").ZodLiteral<"ncaa">, import("zod").ZodLiteral<"nba">]>;
377
+ league: import("zod").ZodUnion<[import("zod").ZodLiteral<"ncaa">, import("zod").ZodLiteral<"nba">, import("zod").ZodLiteral<"mlb">]>;
378
378
  homeTeam: import("zod").ZodObject<{
379
379
  id: import("zod").ZodOptional<import("zod").ZodString>;
380
380
  apiTeamId: import("zod").ZodNumber;
@@ -444,7 +444,7 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
444
444
  }, "strip", import("zod").ZodTypeAny, {
445
445
  id: string;
446
446
  round: number;
447
- league: "nba" | "ncaa";
447
+ league: "nba" | "ncaa" | "mlb";
448
448
  homeTeam: {
449
449
  name: string;
450
450
  image: string;
@@ -472,7 +472,7 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
472
472
  }, {
473
473
  id: string;
474
474
  round: number;
475
- league: "nba" | "ncaa";
475
+ league: "nba" | "ncaa" | "mlb";
476
476
  homeTeam: {
477
477
  name: string;
478
478
  image: string;
@@ -503,7 +503,7 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
503
503
  game: import("zod").ZodObject<Omit<{
504
504
  id: import("zod").ZodString;
505
505
  round: import("zod").ZodNumber;
506
- league: import("zod").ZodUnion<[import("zod").ZodLiteral<"ncaa">, import("zod").ZodLiteral<"nba">]>;
506
+ league: import("zod").ZodUnion<[import("zod").ZodLiteral<"ncaa">, import("zod").ZodLiteral<"nba">, import("zod").ZodLiteral<"mlb">]>;
507
507
  homeTeam: import("zod").ZodObject<{
508
508
  id: import("zod").ZodOptional<import("zod").ZodString>;
509
509
  apiTeamId: import("zod").ZodNumber;
@@ -572,7 +572,7 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
572
572
  }>>;
573
573
  }, "round" | "homeTeam" | "awayTeam">, "strip", import("zod").ZodTypeAny, {
574
574
  id: string;
575
- league: "nba" | "ncaa";
575
+ league: "nba" | "ncaa" | "mlb";
576
576
  seriesInfo?: {
577
577
  maxLength: number;
578
578
  homeTeamWins: number;
@@ -581,7 +581,7 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
581
581
  } | undefined;
582
582
  }, {
583
583
  id: string;
584
- league: "nba" | "ncaa";
584
+ league: "nba" | "ncaa" | "mlb";
585
585
  seriesInfo?: {
586
586
  maxLength: number;
587
587
  homeTeamWins: number;
@@ -594,7 +594,7 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
594
594
  rating: number;
595
595
  game: {
596
596
  id: string;
597
- league: "nba" | "ncaa";
597
+ league: "nba" | "ncaa" | "mlb";
598
598
  seriesInfo?: {
599
599
  maxLength: number;
600
600
  homeTeamWins: number;
@@ -609,7 +609,7 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
609
609
  rating: number;
610
610
  game: {
611
611
  id: string;
612
- league: "nba" | "ncaa";
612
+ league: "nba" | "ncaa" | "mlb";
613
613
  seriesInfo?: {
614
614
  maxLength: number;
615
615
  homeTeamWins: number;
@@ -18,7 +18,7 @@ exports.ratingSchema = (0, zod_1.object)({
18
18
  game: (0, zod_1.object)({
19
19
  id: (0, zod_1.string)(),
20
20
  round: (0, zod_1.number)(),
21
- league: (0, zod_1.union)([(0, zod_1.literal)("ncaa"), (0, zod_1.literal)("nba")]),
21
+ league: (0, zod_1.union)([(0, zod_1.literal)("ncaa"), (0, zod_1.literal)("nba"), (0, zod_1.literal)("mlb")]),
22
22
  homeTeam: game_1.gameTeamSchema,
23
23
  awayTeam: game_1.gameTeamSchema,
24
24
  seriesInfo: game_1.seriesInfoSchema.optional(),
@@ -29,7 +29,7 @@ exports.searchRatingSchema = (0, zod_1.object)({
29
29
  q: (0, zod_1.string)().optional(),
30
30
  teamId: (0, zod_1.string)().optional(),
31
31
  round: (0, zod_1.string)().optional(),
32
- league: (0, zod_1.union)([(0, zod_1.literal)("ncaa"), (0, zod_1.literal)("nba")]),
32
+ league: (0, zod_1.union)([(0, zod_1.literal)("ncaa"), (0, zod_1.literal)("nba"), (0, zod_1.literal)("mlb")]),
33
33
  createdAt: (0, zod_1.union)([
34
34
  (0, zod_1.literal)("12h"),
35
35
  (0, zod_1.literal)("daily"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rategame-shared",
3
- "version": "1.0.94",
3
+ "version": "1.0.96",
4
4
  "description": "This package contains shared resources for the Rate Game project.",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",