rategame-shared 1.1.147 → 1.1.149
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 +103 -1
- package/dist/models/user.d.ts +2 -1
- package/dist/schemas/game.d.ts +2260 -160
- package/dist/schemas/rating.d.ts +339 -24
- package/dist/schemas/team.d.ts +791 -56
- package/dist/schemas/user.d.ts +536 -32
- package/dist/schemas/user.js +23 -1
- package/package.json +1 -1
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Timestamp } from "@firebase/firestore";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { timeFilterSchema } from "../schemas/sharedTypes";
|
|
4
|
+
import { Achievement } from "../models/user";
|
|
4
5
|
export declare const firestoreTimestampSchema: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
|
|
5
6
|
type LeagueSlug = "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "mls" | "cbb" | "cfb" | "epl";
|
|
6
7
|
export declare const urlPrefixMap: Record<LeagueSlug, string>;
|
|
7
8
|
export type TimeFilter = z.infer<typeof timeFilterSchema>;
|
|
9
|
+
export declare const ACHIEVEMENTS: Achievement[];
|
|
8
10
|
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.urlPrefixMap = exports.firestoreTimestampSchema = void 0;
|
|
3
|
+
exports.ACHIEVEMENTS = 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,3 +15,105 @@ exports.urlPrefixMap = {
|
|
|
15
15
|
cbb: "leagues/cbb/",
|
|
16
16
|
cfb: "leagues/cfb/",
|
|
17
17
|
};
|
|
18
|
+
exports.ACHIEVEMENTS = [
|
|
19
|
+
{
|
|
20
|
+
id: "speed_rater",
|
|
21
|
+
name: "Speed Rater",
|
|
22
|
+
description: "Rate a game within 5 minutes of it ending.",
|
|
23
|
+
tiers: {
|
|
24
|
+
bronze: { threshold: 1 },
|
|
25
|
+
silver: { threshold: 10 },
|
|
26
|
+
gold: { threshold: 50 },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "popular_opinion",
|
|
31
|
+
name: "Popular Opinion",
|
|
32
|
+
description: "Get likes on a single rating.",
|
|
33
|
+
tiers: {
|
|
34
|
+
bronze: { threshold: 10 },
|
|
35
|
+
silver: { threshold: 25 },
|
|
36
|
+
gold: { threshold: 50 },
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: "home_team_hero",
|
|
41
|
+
name: "Home Team Hero",
|
|
42
|
+
description: "Rate games where your favorite team wins.",
|
|
43
|
+
tiers: {
|
|
44
|
+
bronze: { threshold: 10 },
|
|
45
|
+
silver: { threshold: 25 },
|
|
46
|
+
gold: { threshold: 50 },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: "loyal_but_hurt",
|
|
51
|
+
name: "Loyal but Hurt",
|
|
52
|
+
description: "Rate games where your favorite team loses.",
|
|
53
|
+
tiers: {
|
|
54
|
+
bronze: { threshold: 10 },
|
|
55
|
+
silver: { threshold: 25 },
|
|
56
|
+
gold: { threshold: 50 },
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "multi_sport_fan",
|
|
61
|
+
name: "Multi-Sport Fan",
|
|
62
|
+
description: "Rate at least one game from all leagues.",
|
|
63
|
+
tiers: {
|
|
64
|
+
bronze: { threshold: 3 },
|
|
65
|
+
silver: { threshold: 5 },
|
|
66
|
+
gold: { threshold: 8 },
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: "superfan",
|
|
71
|
+
name: "Superfan",
|
|
72
|
+
description: "Rate every game played by your favorite team in a season.",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "personalized_picks",
|
|
76
|
+
name: "Personalized Picks",
|
|
77
|
+
description: "Select your favorite teams in the app.",
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: "marathon_viewer",
|
|
81
|
+
name: "Marathon Viewer",
|
|
82
|
+
description: "Rate games in a single day.",
|
|
83
|
+
tiers: {
|
|
84
|
+
bronze: { threshold: 5 },
|
|
85
|
+
silver: { threshold: 10 },
|
|
86
|
+
gold: { threshold: 20 },
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: "new_years_resolution",
|
|
91
|
+
name: "New Year’s Resolution",
|
|
92
|
+
description: "Rate games on January 1st.",
|
|
93
|
+
tiers: {
|
|
94
|
+
bronze: { threshold: 1 },
|
|
95
|
+
silver: { threshold: 5 },
|
|
96
|
+
gold: { threshold: 10 },
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: "finals_fever",
|
|
101
|
+
name: "Finals Fever",
|
|
102
|
+
description: "Rate every game of a championship series.",
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: "summer_sports_fan",
|
|
106
|
+
name: "Summer Sports Fan",
|
|
107
|
+
description: "Rate games during the off-season of most leagues.",
|
|
108
|
+
tiers: {
|
|
109
|
+
bronze: { threshold: 20 },
|
|
110
|
+
silver: { threshold: 50 },
|
|
111
|
+
gold: { threshold: 100 },
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: "live_every_moment",
|
|
116
|
+
name: "Live Every Moment",
|
|
117
|
+
description: "Rate at least 50% of all games in a single season for one league.",
|
|
118
|
+
},
|
|
119
|
+
];
|
package/dist/models/user.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { leagueStatsSchema, createUserSchema, userSchema, reducedUserSchema, searchUserSchema } from "../schemas/user";
|
|
2
|
+
import { leagueStatsSchema, createUserSchema, userSchema, reducedUserSchema, searchUserSchema, achievementSchema } from "../schemas/user";
|
|
3
3
|
export type User = z.infer<typeof userSchema>;
|
|
4
4
|
export type SearchUser = z.infer<typeof searchUserSchema>;
|
|
5
5
|
export type CreateUser = z.infer<typeof createUserSchema>;
|
|
6
6
|
export type LeagueStats = z.infer<typeof leagueStatsSchema>;
|
|
7
7
|
export type ReducedUser = z.infer<typeof reducedUserSchema>;
|
|
8
|
+
export type Achievement = z.infer<typeof achievementSchema>;
|