rategame-shared 1.1.167 → 1.1.169

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.
@@ -0,0 +1,3 @@
1
+ import { z } from "zod";
2
+ import { mlbPlayerSchema } from "../schemas/player";
3
+ export type MLBPlayer = z.infer<typeof mlbPlayerSchema>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { createAgreeRatingSchema, createRatingSchema, profileRatingStatsSchema, ratingLikeSchema, ratingSchema, roundStatsSchema, searchRatingSchema, seasonGroupStatsSchema, seasonStatsSchema, threadCommentLikeSchema, threadCommentSchema } from "../schemas/rating";
2
+ import { createAgreeRatingSchema, createRatingSchema, profileRatingStatsSchema, ratingLikeSchema, ratingSchema, roundStatsSchema, searchRatingSchema, seasonGroupStatsSchema, seasonStatsSchema, seriesStatsSchema, threadCommentLikeSchema, threadCommentSchema } from "../schemas/rating";
3
3
  import { seasonGroupingSchema } from "../schemas/sharedTypes";
4
4
  export type Rating = z.infer<typeof ratingSchema>;
5
5
  export type ProfileRatingStats = z.infer<typeof profileRatingStatsSchema>;
@@ -7,6 +7,7 @@ export type SeasonStats = z.infer<typeof seasonStatsSchema>;
7
7
  export type SeasonGrouping = z.infer<typeof seasonGroupingSchema>;
8
8
  export type SeasonGroupStats = z.infer<typeof seasonGroupStatsSchema>;
9
9
  export type RoundStats = z.infer<typeof roundStatsSchema>;
10
+ export type SeriesStats = z.infer<typeof seriesStatsSchema>;
10
11
  export type RatingLike = z.infer<typeof ratingLikeSchema>;
11
12
  export type CreateRating = z.infer<typeof createRatingSchema>;
12
13
  export type SearchRating = z.infer<typeof searchRatingSchema>;
@@ -0,0 +1,32 @@
1
+ import { z } from "zod";
2
+ export declare const mlbPlayerSchema: z.ZodObject<{
3
+ id: z.ZodOptional<z.ZodString>;
4
+ name: z.ZodString;
5
+ wins: z.ZodNumber;
6
+ losses: z.ZodNumber;
7
+ saves: z.ZodNumber;
8
+ games: z.ZodNumber;
9
+ isWinningPitcher: z.ZodOptional<z.ZodBoolean>;
10
+ isLosingPitcher: z.ZodOptional<z.ZodBoolean>;
11
+ isSavingPitcher: z.ZodOptional<z.ZodBoolean>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ name: string;
14
+ wins: number;
15
+ losses: number;
16
+ saves: number;
17
+ games: number;
18
+ id?: string | undefined;
19
+ isWinningPitcher?: boolean | undefined;
20
+ isLosingPitcher?: boolean | undefined;
21
+ isSavingPitcher?: boolean | undefined;
22
+ }, {
23
+ name: string;
24
+ wins: number;
25
+ losses: number;
26
+ saves: number;
27
+ games: number;
28
+ id?: string | undefined;
29
+ isWinningPitcher?: boolean | undefined;
30
+ isLosingPitcher?: boolean | undefined;
31
+ isSavingPitcher?: boolean | undefined;
32
+ }>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mlbPlayerSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.mlbPlayerSchema = zod_1.z.object({
6
+ id: zod_1.z.string().optional(),
7
+ name: zod_1.z.string(),
8
+ wins: zod_1.z.number(),
9
+ losses: zod_1.z.number(),
10
+ saves: zod_1.z.number(),
11
+ games: zod_1.z.number(),
12
+ isWinningPitcher: zod_1.z.boolean().optional(),
13
+ isLosingPitcher: zod_1.z.boolean().optional(),
14
+ isSavingPitcher: zod_1.z.boolean().optional(),
15
+ });
@@ -3261,7 +3261,7 @@ export declare const seasonGroupStatsSchema: import("zod").ZodObject<{
3261
3261
  }>;
3262
3262
  export declare const roundStatsSchema: import("zod").ZodObject<{
3263
3263
  round: import("zod").ZodString;
3264
- originalRoundName: import("zod").ZodOptional<import("zod").ZodString>;
3264
+ originalRoundNames: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
3265
3265
  ratings: import("zod").ZodNumber;
3266
3266
  average: import("zod").ZodString;
3267
3267
  totalGames: import("zod").ZodNumber;
@@ -3276,7 +3276,7 @@ export declare const roundStatsSchema: import("zod").ZodObject<{
3276
3276
  season?: string | undefined;
3277
3277
  earliestDate?: number | undefined;
3278
3278
  latestDate?: number | undefined;
3279
- originalRoundName?: string | undefined;
3279
+ originalRoundNames?: string[] | undefined;
3280
3280
  }, {
3281
3281
  round: string;
3282
3282
  ratings: number;
@@ -3285,5 +3285,39 @@ export declare const roundStatsSchema: import("zod").ZodObject<{
3285
3285
  season?: string | undefined;
3286
3286
  earliestDate?: number | undefined;
3287
3287
  latestDate?: number | undefined;
3288
- originalRoundName?: string | undefined;
3288
+ originalRoundNames?: string[] | undefined;
3289
+ }>;
3290
+ export declare const seriesStatsSchema: import("zod").ZodObject<{
3291
+ teams: import("zod").ZodArray<import("zod").ZodString, "many">;
3292
+ ratings: import("zod").ZodNumber;
3293
+ average: import("zod").ZodString;
3294
+ totalGames: import("zod").ZodNumber;
3295
+ season: import("zod").ZodOptional<import("zod").ZodString>;
3296
+ earliestDate: import("zod").ZodOptional<import("zod").ZodNumber>;
3297
+ latestDate: import("zod").ZodOptional<import("zod").ZodNumber>;
3298
+ round: import("zod").ZodOptional<import("zod").ZodString>;
3299
+ originalRoundNames: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
3300
+ gameIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
3301
+ }, "strip", import("zod").ZodTypeAny, {
3302
+ ratings: number;
3303
+ average: string;
3304
+ totalGames: number;
3305
+ teams: string[];
3306
+ round?: string | undefined;
3307
+ season?: string | undefined;
3308
+ earliestDate?: number | undefined;
3309
+ latestDate?: number | undefined;
3310
+ originalRoundNames?: string[] | undefined;
3311
+ gameIds?: string[] | undefined;
3312
+ }, {
3313
+ ratings: number;
3314
+ average: string;
3315
+ totalGames: number;
3316
+ teams: string[];
3317
+ round?: string | undefined;
3318
+ season?: string | undefined;
3319
+ earliestDate?: number | undefined;
3320
+ latestDate?: number | undefined;
3321
+ originalRoundNames?: string[] | undefined;
3322
+ gameIds?: string[] | undefined;
3289
3323
  }>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.roundStatsSchema = exports.seasonGroupStatsSchema = exports.seasonStatsSchema = exports.profileRatingStatsSchema = exports.threadCommentLikeSchema = exports.threadCommentSchema = exports.createRatingSchema = exports.createAgreeRatingSchema = exports.ratingLikeSchema = exports.searchRatingSchema = exports.ratingSchema = void 0;
3
+ exports.seriesStatsSchema = exports.roundStatsSchema = exports.seasonGroupStatsSchema = exports.seasonStatsSchema = exports.profileRatingStatsSchema = exports.threadCommentLikeSchema = exports.threadCommentSchema = exports.createRatingSchema = exports.createAgreeRatingSchema = exports.ratingLikeSchema = exports.searchRatingSchema = exports.ratingSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const game_1 = require("./game");
6
6
  const user_1 = require("./user");
@@ -147,7 +147,7 @@ exports.seasonGroupStatsSchema = (0, zod_1.object)({
147
147
  });
148
148
  exports.roundStatsSchema = (0, zod_1.object)({
149
149
  round: (0, zod_1.string)(),
150
- originalRoundName: (0, zod_1.string)().optional(),
150
+ originalRoundNames: (0, zod_1.array)((0, zod_1.string)()).optional(),
151
151
  ratings: (0, zod_1.number)(),
152
152
  average: (0, zod_1.string)(),
153
153
  totalGames: (0, zod_1.number)(),
@@ -155,3 +155,15 @@ exports.roundStatsSchema = (0, zod_1.object)({
155
155
  earliestDate: (0, zod_1.number)().optional(),
156
156
  latestDate: (0, zod_1.number)().optional(),
157
157
  });
158
+ exports.seriesStatsSchema = (0, zod_1.object)({
159
+ teams: (0, zod_1.array)((0, zod_1.string)()),
160
+ ratings: (0, zod_1.number)(),
161
+ average: (0, zod_1.string)(),
162
+ totalGames: (0, zod_1.number)(),
163
+ season: (0, zod_1.string)().optional(),
164
+ earliestDate: (0, zod_1.number)().optional(),
165
+ latestDate: (0, zod_1.number)().optional(),
166
+ round: (0, zod_1.string)().optional(),
167
+ originalRoundNames: (0, zod_1.array)((0, zod_1.string)()).optional(),
168
+ gameIds: (0, zod_1.array)((0, zod_1.string)()).optional(),
169
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rategame-shared",
3
- "version": "1.1.167",
3
+ "version": "1.1.169",
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",