rategame-shared 1.1.160 → 1.1.162
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/helpers/index.d.ts +2 -0
- package/dist/helpers/index.js +8 -1
- package/dist/models/player.d.ts +3 -0
- package/dist/models/player.js +2 -0
- package/dist/schemas/player.d.ts +32 -0
- package/dist/schemas/player.js +15 -0
- package/dist/schemas/rating.d.ts +3 -0
- package/dist/schemas/rating.js +1 -0
- package/package.json +1 -1
package/dist/helpers/index.d.ts
CHANGED
|
@@ -7,5 +7,7 @@ export declare const firestoreTimestampSchema: z.ZodType<Timestamp, z.ZodTypeDef
|
|
|
7
7
|
type LeagueSlug = "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "mls" | "cbb" | "cfb" | "epl";
|
|
8
8
|
export declare const urlPrefixMap: Record<LeagueSlug, string>;
|
|
9
9
|
export type TimeFilter = z.infer<typeof timeFilterSchema>;
|
|
10
|
+
export type MilestoneType = "streak" | "ratings";
|
|
11
|
+
export declare const milestonesMap: Record<MilestoneType, number[]>;
|
|
10
12
|
export declare const achievementsMap: Record<typeof achievementId._type, Achievement>;
|
|
11
13
|
export {};
|
package/dist/helpers/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.achievementsMap = exports.urlPrefixMap = exports.firestoreTimestampSchema = void 0;
|
|
3
|
+
exports.achievementsMap = exports.milestonesMap = exports.urlPrefixMap = exports.firestoreTimestampSchema = void 0;
|
|
4
4
|
const firestore_1 = require("@firebase/firestore");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
exports.firestoreTimestampSchema = zod_1.z.instanceof(firestore_1.Timestamp);
|
|
@@ -15,6 +15,13 @@ exports.urlPrefixMap = {
|
|
|
15
15
|
cbb: "leagues/cbb/",
|
|
16
16
|
cfb: "leagues/cfb/",
|
|
17
17
|
};
|
|
18
|
+
exports.milestonesMap = {
|
|
19
|
+
streak: [
|
|
20
|
+
3, 7, 10, 14, 21, 30, 40, 50, 75, 100, 150, 200, 250, 300, 400, 500, 750,
|
|
21
|
+
1000,
|
|
22
|
+
],
|
|
23
|
+
ratings: [10, 25, 50, 100, 250, 500, 1000, 2000, 3000, 4000, 5000],
|
|
24
|
+
};
|
|
18
25
|
exports.achievementsMap = {
|
|
19
26
|
speed_rater: {
|
|
20
27
|
id: "speed_rater",
|
|
@@ -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
|
+
});
|
package/dist/schemas/rating.d.ts
CHANGED
|
@@ -3195,14 +3195,17 @@ export declare const seasonStatsSchema: import("zod").ZodObject<{
|
|
|
3195
3195
|
season: import("zod").ZodString;
|
|
3196
3196
|
ratings: import("zod").ZodNumber;
|
|
3197
3197
|
average: import("zod").ZodString;
|
|
3198
|
+
totalGames: import("zod").ZodNumber;
|
|
3198
3199
|
}, "strip", import("zod").ZodTypeAny, {
|
|
3199
3200
|
ratings: number;
|
|
3200
3201
|
season: string;
|
|
3201
3202
|
average: string;
|
|
3203
|
+
totalGames: number;
|
|
3202
3204
|
}, {
|
|
3203
3205
|
ratings: number;
|
|
3204
3206
|
season: string;
|
|
3205
3207
|
average: string;
|
|
3208
|
+
totalGames: number;
|
|
3206
3209
|
}>;
|
|
3207
3210
|
export declare const seasonGroupStatsSchema: import("zod").ZodObject<{
|
|
3208
3211
|
season: import("zod").ZodString;
|
package/dist/schemas/rating.js
CHANGED
|
@@ -134,6 +134,7 @@ exports.seasonStatsSchema = (0, zod_1.object)({
|
|
|
134
134
|
season: (0, zod_1.string)(),
|
|
135
135
|
ratings: (0, zod_1.number)(),
|
|
136
136
|
average: (0, zod_1.string)(),
|
|
137
|
+
totalGames: (0, zod_1.number)(),
|
|
137
138
|
});
|
|
138
139
|
exports.seasonGroupStatsSchema = (0, zod_1.object)({
|
|
139
140
|
season: (0, zod_1.string)(),
|