rategame-shared 1.1.93 → 1.1.95

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,6 +1,7 @@
1
1
  import { z } from "zod";
2
- import { createAgreeRatingSchema, createRatingSchema, ratingLikeSchema, ratingSchema, searchRatingSchema, threadCommentLikeSchema, threadCommentSchema } from "../schemas/rating";
2
+ import { createAgreeRatingSchema, createRatingSchema, profileRatingStatsSchema, ratingLikeSchema, ratingSchema, searchRatingSchema, threadCommentLikeSchema, threadCommentSchema } from "../schemas/rating";
3
3
  export type Rating = z.infer<typeof ratingSchema>;
4
+ export type ProfileRatingStats = z.infer<typeof profileRatingStatsSchema>;
4
5
  export type RatingLike = z.infer<typeof ratingLikeSchema>;
5
6
  export type CreateRating = z.infer<typeof createRatingSchema>;
6
7
  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
+ });
@@ -2626,3 +2626,13 @@ export declare const threadCommentLikeSchema: import("zod").ZodObject<{
2626
2626
  commentId: string;
2627
2627
  commentParentId?: string | null | undefined;
2628
2628
  }>;
2629
+ export declare const profileRatingStatsSchema: import("zod").ZodObject<{
2630
+ avgRating: import("zod").ZodString;
2631
+ ratedGames: import("zod").ZodString;
2632
+ }, "strip", import("zod").ZodTypeAny, {
2633
+ avgRating: string;
2634
+ ratedGames: string;
2635
+ }, {
2636
+ avgRating: string;
2637
+ ratedGames: string;
2638
+ }>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.threadCommentLikeSchema = exports.threadCommentSchema = exports.createRatingSchema = exports.createAgreeRatingSchema = exports.ratingLikeSchema = exports.searchRatingSchema = exports.ratingSchema = void 0;
3
+ 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");
@@ -108,3 +108,7 @@ exports.threadCommentLikeSchema = (0, zod_1.object)({
108
108
  commentId: (0, zod_1.string)(),
109
109
  commentParentId: (0, zod_1.string)().nullable().optional(),
110
110
  });
111
+ exports.profileRatingStatsSchema = (0, zod_1.object)({
112
+ avgRating: (0, zod_1.string)(),
113
+ ratedGames: (0, zod_1.string)(),
114
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rategame-shared",
3
- "version": "1.1.93",
3
+ "version": "1.1.95",
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",