rategame-shared 1.1.145 → 1.1.147

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.
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
- import { createAgreeRatingSchema, createRatingSchema, profileRatingStatsSchema, ratingLikeSchema, ratingSchema, searchRatingSchema, seasonGroupingSchema, seasonGroupStatsSchema, seasonStatsSchema, threadCommentLikeSchema, threadCommentSchema } from "../schemas/rating";
2
+ import { createAgreeRatingSchema, createRatingSchema, profileRatingStatsSchema, ratingLikeSchema, ratingSchema, searchRatingSchema, seasonGroupStatsSchema, seasonStatsSchema, threadCommentLikeSchema, threadCommentSchema } from "../schemas/rating";
3
+ import { seasonGroupingSchema } from "../schemas/sharedTypes";
3
4
  export type Rating = z.infer<typeof ratingSchema>;
4
5
  export type ProfileRatingStats = z.infer<typeof profileRatingStatsSchema>;
5
6
  export type SeasonStats = z.infer<typeof seasonStatsSchema>;
@@ -29507,6 +29507,7 @@ export declare const searchGameSchema: z.ZodObject<{
29507
29507
  offset: z.ZodOptional<z.ZodString>;
29508
29508
  filterNoRatingAvg: z.ZodOptional<z.ZodString>;
29509
29509
  topRatedGames: z.ZodOptional<z.ZodString>;
29510
+ seasonGroup: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"combined">, z.ZodLiteral<"regularSeason">, z.ZodLiteral<"playoffs">]>>;
29510
29511
  }, "strip", z.ZodTypeAny, {
29511
29512
  league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls";
29512
29513
  offset?: string | undefined;
@@ -29518,6 +29519,7 @@ export declare const searchGameSchema: z.ZodObject<{
29518
29519
  sortBy?: "rating.avg:asc" | "rating.avg:desc" | "startedAt:asc" | "startedAt:desc" | "ratings.weightedRating.avg:asc" | "ratings.weightedRating.avg:desc" | "rating.votes.total:desc" | undefined;
29519
29520
  filterNoRatingAvg?: string | undefined;
29520
29521
  topRatedGames?: string | undefined;
29522
+ seasonGroup?: "combined" | "regularSeason" | "playoffs" | undefined;
29521
29523
  }, {
29522
29524
  league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls";
29523
29525
  offset?: string | undefined;
@@ -29529,6 +29531,7 @@ export declare const searchGameSchema: z.ZodObject<{
29529
29531
  sortBy?: "rating.avg:asc" | "rating.avg:desc" | "startedAt:asc" | "startedAt:desc" | "ratings.weightedRating.avg:asc" | "ratings.weightedRating.avg:desc" | "rating.votes.total:desc" | undefined;
29530
29532
  filterNoRatingAvg?: string | undefined;
29531
29533
  topRatedGames?: string | undefined;
29534
+ seasonGroup?: "combined" | "regularSeason" | "playoffs" | undefined;
29532
29535
  }>;
29533
29536
  export declare const creatorPickSchema: z.ZodObject<{
29534
29537
  game: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
@@ -326,6 +326,7 @@ exports.searchGameSchema = zod_1.z.object({
326
326
  offset: zod_1.z.string().optional(),
327
327
  filterNoRatingAvg: zod_1.z.string().optional(),
328
328
  topRatedGames: zod_1.z.string().optional(),
329
+ seasonGroup: sharedTypes_1.seasonGroupingSchema.optional(),
329
330
  });
330
331
  exports.creatorPickSchema = zod_1.z.object({
331
332
  game: exports.unionGameSchema,
@@ -2886,7 +2886,6 @@ export declare const seasonStatsSchema: import("zod").ZodObject<{
2886
2886
  season: string;
2887
2887
  average: string;
2888
2888
  }>;
2889
- export declare const seasonGroupingSchema: import("zod").ZodUnion<[import("zod").ZodLiteral<"combined">, import("zod").ZodLiteral<"regularSeason">, import("zod").ZodLiteral<"playoffs">]>;
2890
2889
  export declare const seasonGroupStatsSchema: import("zod").ZodObject<{
2891
2890
  season: import("zod").ZodString;
2892
2891
  ratings: import("zod").ZodNumber;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.seasonGroupStatsSchema = exports.seasonGroupingSchema = exports.seasonStatsSchema = exports.profileRatingStatsSchema = exports.threadCommentLikeSchema = exports.threadCommentSchema = exports.createRatingSchema = exports.createAgreeRatingSchema = exports.ratingLikeSchema = exports.searchRatingSchema = exports.ratingSchema = void 0;
3
+ 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");
@@ -135,14 +135,9 @@ exports.seasonStatsSchema = (0, zod_1.object)({
135
135
  ratings: (0, zod_1.number)(),
136
136
  average: (0, zod_1.string)(),
137
137
  });
138
- exports.seasonGroupingSchema = (0, zod_1.union)([
139
- (0, zod_1.literal)("combined"),
140
- (0, zod_1.literal)("regularSeason"),
141
- (0, zod_1.literal)("playoffs"),
142
- ]);
143
138
  exports.seasonGroupStatsSchema = (0, zod_1.object)({
144
139
  season: (0, zod_1.string)(),
145
140
  ratings: (0, zod_1.number)(),
146
141
  average: (0, zod_1.string)(),
147
- type: exports.seasonGroupingSchema,
142
+ type: sharedTypes_1.seasonGroupingSchema,
148
143
  });
@@ -1,3 +1,4 @@
1
1
  export declare const timeFilterSchema: import("zod").ZodUnion<[import("zod").ZodLiteral<"Today">, import("zod").ZodLiteral<"This Week">, import("zod").ZodLiteral<"This Season">, import("zod").ZodLiteral<"This Month">, import("zod").ZodLiteral<"This Year">, import("zod").ZodLiteral<"All">, import("zod").ZodLiteral<"12h">, import("zod").ZodLiteral<"daily">, import("zod").ZodLiteral<"weekly">]>;
2
2
  export declare const ratingSortSchema: 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">]>;
3
3
  export declare const leagueSlug: import("zod").ZodUnion<[import("zod").ZodLiteral<"nba">, import("zod").ZodLiteral<"ncaa">, import("zod").ZodLiteral<"nfl">, import("zod").ZodLiteral<"nhl">, import("zod").ZodLiteral<"mlb">, import("zod").ZodLiteral<"cbb">, import("zod").ZodLiteral<"cfb">, import("zod").ZodLiteral<"epl">, import("zod").ZodLiteral<"mls">, import("zod").ZodLiteral<"global">]>;
4
+ export declare const seasonGroupingSchema: import("zod").ZodUnion<[import("zod").ZodLiteral<"combined">, import("zod").ZodLiteral<"regularSeason">, import("zod").ZodLiteral<"playoffs">]>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.leagueSlug = exports.ratingSortSchema = exports.timeFilterSchema = void 0;
3
+ exports.seasonGroupingSchema = exports.leagueSlug = exports.ratingSortSchema = exports.timeFilterSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.timeFilterSchema = (0, zod_1.union)([
6
6
  (0, zod_1.literal)("Today"),
@@ -33,3 +33,8 @@ exports.leagueSlug = (0, zod_1.union)([
33
33
  (0, zod_1.literal)("mls"),
34
34
  (0, zod_1.literal)("global"),
35
35
  ]);
36
+ exports.seasonGroupingSchema = (0, zod_1.union)([
37
+ (0, zod_1.literal)("combined"),
38
+ (0, zod_1.literal)("regularSeason"),
39
+ (0, zod_1.literal)("playoffs"),
40
+ ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rategame-shared",
3
- "version": "1.1.145",
3
+ "version": "1.1.147",
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",
@@ -1,3 +0,0 @@
1
- import { z } from "zod";
2
- import { mlbPlayerSchema } from "../schemas/player";
3
- export type MLBPlayer = z.infer<typeof mlbPlayerSchema>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,32 +0,0 @@
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
- }>;
@@ -1,15 +0,0 @@
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
- });