rategame-shared 1.1.240 → 1.1.242
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/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/models/player.d.ts +2 -2
- package/dist/schemas/player.d.ts +25 -25
- package/dist/schemas/player.js +11 -10
- package/dist/schemas/userEvent.d.ts +23 -5
- package/dist/schemas/userEvent.js +17 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from "./schemas/feedback";
|
|
|
8
8
|
export * from "./schemas/list";
|
|
9
9
|
export * from "./schemas/moderation";
|
|
10
10
|
export * from "./schemas/userEvent";
|
|
11
|
+
export * from "./schemas/player";
|
|
11
12
|
export * from "./models/user";
|
|
12
13
|
export * from "./models/rating";
|
|
13
14
|
export * from "./models/game";
|
|
@@ -19,3 +20,4 @@ export * from "./models/list";
|
|
|
19
20
|
export * from "./models/moderation";
|
|
20
21
|
export * from "./models/userEvent";
|
|
21
22
|
export * from "./helpers/index";
|
|
23
|
+
export * from "./models/player";
|
package/dist/index.js
CHANGED
|
@@ -24,6 +24,7 @@ __exportStar(require("./schemas/feedback"), exports);
|
|
|
24
24
|
__exportStar(require("./schemas/list"), exports);
|
|
25
25
|
__exportStar(require("./schemas/moderation"), exports);
|
|
26
26
|
__exportStar(require("./schemas/userEvent"), exports);
|
|
27
|
+
__exportStar(require("./schemas/player"), exports);
|
|
27
28
|
__exportStar(require("./models/user"), exports);
|
|
28
29
|
__exportStar(require("./models/rating"), exports);
|
|
29
30
|
__exportStar(require("./models/game"), exports);
|
|
@@ -35,3 +36,4 @@ __exportStar(require("./models/list"), exports);
|
|
|
35
36
|
__exportStar(require("./models/moderation"), exports);
|
|
36
37
|
__exportStar(require("./models/userEvent"), exports);
|
|
37
38
|
__exportStar(require("./helpers/index"), exports);
|
|
39
|
+
__exportStar(require("./models/player"), exports);
|
package/dist/models/player.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
export type
|
|
2
|
+
import { playerSchema } from "../schemas/player";
|
|
3
|
+
export type Player = z.infer<typeof playerSchema>;
|
package/dist/schemas/player.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const playerSchema: z.ZodObject<{
|
|
3
3
|
id: z.ZodOptional<z.ZodString>;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
firstName: z.ZodString;
|
|
5
|
+
lastName: z.ZodString;
|
|
6
|
+
shortName: z.ZodString;
|
|
7
|
+
position: z.ZodString;
|
|
8
|
+
positionCategory: z.ZodString;
|
|
9
|
+
jerseyNumber: z.ZodNumber;
|
|
10
|
+
teamId: z.ZodNumber;
|
|
11
|
+
leagueId: z.ZodUnion<[z.ZodLiteral<"nba">, z.ZodLiteral<"ncaa">, z.ZodLiteral<"nfl">, z.ZodLiteral<"nhl">, z.ZodLiteral<"mlb">, z.ZodLiteral<"cbb">, z.ZodLiteral<"cfb">, z.ZodLiteral<"epl">, z.ZodLiteral<"mls">, z.ZodLiteral<"wnba">, z.ZodLiteral<"cwc">, z.ZodLiteral<"global">]>;
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
position: string;
|
|
14
|
+
teamId: number;
|
|
15
|
+
firstName: string;
|
|
16
|
+
lastName: string;
|
|
17
|
+
shortName: string;
|
|
18
|
+
positionCategory: string;
|
|
19
|
+
jerseyNumber: number;
|
|
20
|
+
leagueId: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
|
|
18
21
|
id?: string | undefined;
|
|
19
|
-
isWinningPitcher?: boolean | undefined;
|
|
20
|
-
isLosingPitcher?: boolean | undefined;
|
|
21
|
-
isSavingPitcher?: boolean | undefined;
|
|
22
22
|
}, {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
position: string;
|
|
24
|
+
teamId: number;
|
|
25
|
+
firstName: string;
|
|
26
|
+
lastName: string;
|
|
27
|
+
shortName: string;
|
|
28
|
+
positionCategory: string;
|
|
29
|
+
jerseyNumber: number;
|
|
30
|
+
leagueId: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
|
|
28
31
|
id?: string | undefined;
|
|
29
|
-
isWinningPitcher?: boolean | undefined;
|
|
30
|
-
isLosingPitcher?: boolean | undefined;
|
|
31
|
-
isSavingPitcher?: boolean | undefined;
|
|
32
32
|
}>;
|
package/dist/schemas/player.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.playerSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
|
|
5
|
+
const sharedTypes_1 = require("./sharedTypes");
|
|
6
|
+
exports.playerSchema = zod_1.z.object({
|
|
6
7
|
id: zod_1.z.string().optional(),
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
firstName: zod_1.z.string(),
|
|
9
|
+
lastName: zod_1.z.string(),
|
|
10
|
+
shortName: zod_1.z.string(),
|
|
11
|
+
position: zod_1.z.string(),
|
|
12
|
+
positionCategory: zod_1.z.string(),
|
|
13
|
+
jerseyNumber: zod_1.z.number(),
|
|
14
|
+
teamId: zod_1.z.number(),
|
|
15
|
+
leagueId: sharedTypes_1.leagueSlug,
|
|
15
16
|
});
|
|
@@ -2,8 +2,8 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const userEventSchema: z.ZodObject<{
|
|
3
3
|
id: z.ZodString;
|
|
4
4
|
userId: z.ZodString;
|
|
5
|
-
eventType: z.ZodLiteral<"achievement">;
|
|
6
|
-
eventData: z.ZodObject<{
|
|
5
|
+
eventType: z.ZodUnion<[z.ZodLiteral<"achievement">, z.ZodLiteral<"streak">]>;
|
|
6
|
+
eventData: z.ZodUnion<[z.ZodObject<{
|
|
7
7
|
achievementId: z.ZodString;
|
|
8
8
|
achievementName: z.ZodString;
|
|
9
9
|
achievementDescription: z.ZodString;
|
|
@@ -21,7 +21,16 @@ export declare const userEventSchema: z.ZodObject<{
|
|
|
21
21
|
achievementName: string;
|
|
22
22
|
achievementDescription: string;
|
|
23
23
|
tier?: number | undefined;
|
|
24
|
-
}
|
|
24
|
+
}>, z.ZodObject<{
|
|
25
|
+
streakNumber: z.ZodNumber;
|
|
26
|
+
milestone: z.ZodNumber;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
streakNumber: number;
|
|
29
|
+
milestone: number;
|
|
30
|
+
}, {
|
|
31
|
+
streakNumber: number;
|
|
32
|
+
milestone: number;
|
|
33
|
+
}>]>;
|
|
25
34
|
user: z.ZodObject<{
|
|
26
35
|
id: z.ZodString;
|
|
27
36
|
username: z.ZodString;
|
|
@@ -42,6 +51,7 @@ export declare const userEventSchema: z.ZodObject<{
|
|
|
42
51
|
badge?: string | undefined;
|
|
43
52
|
}>;
|
|
44
53
|
createdAt: z.ZodNumber;
|
|
54
|
+
likesCount: z.ZodOptional<z.ZodNumber>;
|
|
45
55
|
}, "strip", z.ZodTypeAny, {
|
|
46
56
|
id: string;
|
|
47
57
|
user: {
|
|
@@ -53,14 +63,18 @@ export declare const userEventSchema: z.ZodObject<{
|
|
|
53
63
|
};
|
|
54
64
|
createdAt: number;
|
|
55
65
|
userId: string;
|
|
56
|
-
eventType: "achievement";
|
|
66
|
+
eventType: "streak" | "achievement";
|
|
57
67
|
eventData: {
|
|
58
68
|
progress: number;
|
|
59
69
|
achievementId: string;
|
|
60
70
|
achievementName: string;
|
|
61
71
|
achievementDescription: string;
|
|
62
72
|
tier?: number | undefined;
|
|
73
|
+
} | {
|
|
74
|
+
streakNumber: number;
|
|
75
|
+
milestone: number;
|
|
63
76
|
};
|
|
77
|
+
likesCount?: number | undefined;
|
|
64
78
|
}, {
|
|
65
79
|
id: string;
|
|
66
80
|
user: {
|
|
@@ -72,14 +86,18 @@ export declare const userEventSchema: z.ZodObject<{
|
|
|
72
86
|
};
|
|
73
87
|
createdAt: number;
|
|
74
88
|
userId: string;
|
|
75
|
-
eventType: "achievement";
|
|
89
|
+
eventType: "streak" | "achievement";
|
|
76
90
|
eventData: {
|
|
77
91
|
progress: number;
|
|
78
92
|
achievementId: string;
|
|
79
93
|
achievementName: string;
|
|
80
94
|
achievementDescription: string;
|
|
81
95
|
tier?: number | undefined;
|
|
96
|
+
} | {
|
|
97
|
+
streakNumber: number;
|
|
98
|
+
milestone: number;
|
|
82
99
|
};
|
|
100
|
+
likesCount?: number | undefined;
|
|
83
101
|
}>;
|
|
84
102
|
export declare const userEventCommentSchema: z.ZodObject<{
|
|
85
103
|
id: z.ZodString;
|
|
@@ -6,14 +6,22 @@ const user_1 = require("./user");
|
|
|
6
6
|
exports.userEventSchema = zod_1.z.object({
|
|
7
7
|
id: zod_1.z.string(),
|
|
8
8
|
userId: zod_1.z.string(),
|
|
9
|
-
eventType: (
|
|
10
|
-
eventData: zod_1.z.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
eventType: zod_1.z.union([zod_1.z.literal("achievement"), zod_1.z.literal("streak")]),
|
|
10
|
+
eventData: zod_1.z.union([
|
|
11
|
+
// Achievement event data
|
|
12
|
+
zod_1.z.object({
|
|
13
|
+
achievementId: zod_1.z.string(),
|
|
14
|
+
achievementName: zod_1.z.string(),
|
|
15
|
+
achievementDescription: zod_1.z.string(),
|
|
16
|
+
tier: zod_1.z.number().optional(),
|
|
17
|
+
progress: zod_1.z.number(),
|
|
18
|
+
}),
|
|
19
|
+
// Streak event data
|
|
20
|
+
zod_1.z.object({
|
|
21
|
+
streakNumber: zod_1.z.number(),
|
|
22
|
+
milestone: zod_1.z.number(),
|
|
23
|
+
}),
|
|
24
|
+
]),
|
|
17
25
|
user: zod_1.z.object({
|
|
18
26
|
id: zod_1.z.string(),
|
|
19
27
|
username: zod_1.z.string(),
|
|
@@ -22,6 +30,7 @@ exports.userEventSchema = zod_1.z.object({
|
|
|
22
30
|
email: zod_1.z.string().optional(),
|
|
23
31
|
}),
|
|
24
32
|
createdAt: zod_1.z.number(),
|
|
33
|
+
likesCount: zod_1.z.number().optional(),
|
|
25
34
|
});
|
|
26
35
|
exports.userEventCommentSchema = zod_1.z.object({
|
|
27
36
|
id: zod_1.z.string(),
|