rategame-shared 1.0.6 → 1.0.7
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/schemas/game.d.ts +13 -13
- package/dist/schemas/rating.d.ts +139 -5
- package/dist/schemas/rating.js +10 -1
- package/package.json +1 -1
package/dist/schemas/game.d.ts
CHANGED
|
@@ -127,18 +127,11 @@ export declare const gameSchema: z.ZodObject<{
|
|
|
127
127
|
}, "strip", z.ZodTypeAny, {
|
|
128
128
|
round: number;
|
|
129
129
|
status: "live" | "final";
|
|
130
|
-
gameId: number;
|
|
131
|
-
rating: {
|
|
132
|
-
avg: number;
|
|
133
|
-
votes: {
|
|
134
|
-
total: number;
|
|
135
|
-
options: Record<number, number>;
|
|
136
|
-
};
|
|
137
|
-
};
|
|
138
130
|
isClosed: boolean;
|
|
139
131
|
startedAt: number;
|
|
140
132
|
finishedAt: number;
|
|
141
133
|
ratingWindowClosedAt: number;
|
|
134
|
+
gameId: number;
|
|
142
135
|
homeTeam: {
|
|
143
136
|
image: string;
|
|
144
137
|
teamId: number;
|
|
@@ -155,11 +148,6 @@ export declare const gameSchema: z.ZodObject<{
|
|
|
155
148
|
id?: string | undefined;
|
|
156
149
|
isWinner?: boolean | undefined;
|
|
157
150
|
};
|
|
158
|
-
id?: string | undefined;
|
|
159
|
-
}, {
|
|
160
|
-
round: number;
|
|
161
|
-
status: "live" | "final";
|
|
162
|
-
gameId: number;
|
|
163
151
|
rating: {
|
|
164
152
|
avg: number;
|
|
165
153
|
votes: {
|
|
@@ -167,10 +155,15 @@ export declare const gameSchema: z.ZodObject<{
|
|
|
167
155
|
options: Record<number, number>;
|
|
168
156
|
};
|
|
169
157
|
};
|
|
158
|
+
id?: string | undefined;
|
|
159
|
+
}, {
|
|
160
|
+
round: number;
|
|
161
|
+
status: "live" | "final";
|
|
170
162
|
isClosed: boolean;
|
|
171
163
|
startedAt: number;
|
|
172
164
|
finishedAt: number;
|
|
173
165
|
ratingWindowClosedAt: number;
|
|
166
|
+
gameId: number;
|
|
174
167
|
homeTeam: {
|
|
175
168
|
image: string;
|
|
176
169
|
teamId: number;
|
|
@@ -187,5 +180,12 @@ export declare const gameSchema: z.ZodObject<{
|
|
|
187
180
|
id?: string | undefined;
|
|
188
181
|
isWinner?: boolean | undefined;
|
|
189
182
|
};
|
|
183
|
+
rating: {
|
|
184
|
+
avg: number;
|
|
185
|
+
votes: {
|
|
186
|
+
total: number;
|
|
187
|
+
options: Record<number, number>;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
190
|
id?: string | undefined;
|
|
191
191
|
}>;
|
package/dist/schemas/rating.d.ts
CHANGED
|
@@ -4,19 +4,153 @@ export declare const ratingSchema: import("zod").ZodObject<{
|
|
|
4
4
|
gameId: import("zod").ZodString;
|
|
5
5
|
createdAt: import("zod").ZodNumber;
|
|
6
6
|
rating: import("zod").ZodNumber;
|
|
7
|
-
|
|
7
|
+
user: import("zod").ZodObject<{
|
|
8
|
+
id: import("zod").ZodRecord<import("zod").ZodNumber, import("zod").ZodNumber>;
|
|
9
|
+
username: import("zod").ZodNumber;
|
|
10
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
11
|
+
id: Record<number, number>;
|
|
12
|
+
username: number;
|
|
13
|
+
}, {
|
|
14
|
+
id: Record<number, number>;
|
|
15
|
+
username: number;
|
|
16
|
+
}>;
|
|
17
|
+
round: import("zod").ZodNumber;
|
|
18
|
+
game: import("zod").ZodObject<{
|
|
19
|
+
homeTeam: import("zod").ZodObject<{
|
|
20
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
21
|
+
teamId: import("zod").ZodNumber;
|
|
22
|
+
score: import("zod").ZodNumber;
|
|
23
|
+
isWinner: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
24
|
+
image: import("zod").ZodString;
|
|
25
|
+
seed: import("zod").ZodNumber;
|
|
26
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
27
|
+
image: string;
|
|
28
|
+
teamId: number;
|
|
29
|
+
score: number;
|
|
30
|
+
seed: number;
|
|
31
|
+
id?: string | undefined;
|
|
32
|
+
isWinner?: boolean | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
image: string;
|
|
35
|
+
teamId: number;
|
|
36
|
+
score: number;
|
|
37
|
+
seed: number;
|
|
38
|
+
id?: string | undefined;
|
|
39
|
+
isWinner?: boolean | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
awayTeam: import("zod").ZodObject<{
|
|
42
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
43
|
+
teamId: import("zod").ZodNumber;
|
|
44
|
+
score: import("zod").ZodNumber;
|
|
45
|
+
isWinner: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
46
|
+
image: import("zod").ZodString;
|
|
47
|
+
seed: import("zod").ZodNumber;
|
|
48
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
49
|
+
image: string;
|
|
50
|
+
teamId: number;
|
|
51
|
+
score: number;
|
|
52
|
+
seed: number;
|
|
53
|
+
id?: string | undefined;
|
|
54
|
+
isWinner?: boolean | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
image: string;
|
|
57
|
+
teamId: number;
|
|
58
|
+
score: number;
|
|
59
|
+
seed: number;
|
|
60
|
+
id?: string | undefined;
|
|
61
|
+
isWinner?: boolean | undefined;
|
|
62
|
+
}>;
|
|
63
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
64
|
+
homeTeam: {
|
|
65
|
+
image: string;
|
|
66
|
+
teamId: number;
|
|
67
|
+
score: number;
|
|
68
|
+
seed: number;
|
|
69
|
+
id?: string | undefined;
|
|
70
|
+
isWinner?: boolean | undefined;
|
|
71
|
+
};
|
|
72
|
+
awayTeam: {
|
|
73
|
+
image: string;
|
|
74
|
+
teamId: number;
|
|
75
|
+
score: number;
|
|
76
|
+
seed: number;
|
|
77
|
+
id?: string | undefined;
|
|
78
|
+
isWinner?: boolean | undefined;
|
|
79
|
+
};
|
|
80
|
+
}, {
|
|
81
|
+
homeTeam: {
|
|
82
|
+
image: string;
|
|
83
|
+
teamId: number;
|
|
84
|
+
score: number;
|
|
85
|
+
seed: number;
|
|
86
|
+
id?: string | undefined;
|
|
87
|
+
isWinner?: boolean | undefined;
|
|
88
|
+
};
|
|
89
|
+
awayTeam: {
|
|
90
|
+
image: string;
|
|
91
|
+
teamId: number;
|
|
92
|
+
score: number;
|
|
93
|
+
seed: number;
|
|
94
|
+
id?: string | undefined;
|
|
95
|
+
isWinner?: boolean | undefined;
|
|
96
|
+
};
|
|
97
|
+
}>;
|
|
8
98
|
}, "strip", import("zod").ZodTypeAny, {
|
|
9
99
|
id: string;
|
|
100
|
+
round: number;
|
|
101
|
+
user: {
|
|
102
|
+
id: Record<number, number>;
|
|
103
|
+
username: number;
|
|
104
|
+
};
|
|
10
105
|
createdAt: number;
|
|
11
|
-
comment: string;
|
|
12
106
|
gameId: string;
|
|
13
107
|
rating: number;
|
|
14
|
-
|
|
108
|
+
comment: string;
|
|
109
|
+
game: {
|
|
110
|
+
homeTeam: {
|
|
111
|
+
image: string;
|
|
112
|
+
teamId: number;
|
|
113
|
+
score: number;
|
|
114
|
+
seed: number;
|
|
115
|
+
id?: string | undefined;
|
|
116
|
+
isWinner?: boolean | undefined;
|
|
117
|
+
};
|
|
118
|
+
awayTeam: {
|
|
119
|
+
image: string;
|
|
120
|
+
teamId: number;
|
|
121
|
+
score: number;
|
|
122
|
+
seed: number;
|
|
123
|
+
id?: string | undefined;
|
|
124
|
+
isWinner?: boolean | undefined;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
15
127
|
}, {
|
|
16
128
|
id: string;
|
|
129
|
+
round: number;
|
|
130
|
+
user: {
|
|
131
|
+
id: Record<number, number>;
|
|
132
|
+
username: number;
|
|
133
|
+
};
|
|
17
134
|
createdAt: number;
|
|
18
|
-
comment: string;
|
|
19
135
|
gameId: string;
|
|
20
136
|
rating: number;
|
|
21
|
-
|
|
137
|
+
comment: string;
|
|
138
|
+
game: {
|
|
139
|
+
homeTeam: {
|
|
140
|
+
image: string;
|
|
141
|
+
teamId: number;
|
|
142
|
+
score: number;
|
|
143
|
+
seed: number;
|
|
144
|
+
id?: string | undefined;
|
|
145
|
+
isWinner?: boolean | undefined;
|
|
146
|
+
};
|
|
147
|
+
awayTeam: {
|
|
148
|
+
image: string;
|
|
149
|
+
teamId: number;
|
|
150
|
+
score: number;
|
|
151
|
+
seed: number;
|
|
152
|
+
id?: string | undefined;
|
|
153
|
+
isWinner?: boolean | undefined;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
22
156
|
}>;
|
package/dist/schemas/rating.js
CHANGED
|
@@ -2,11 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ratingSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const game_1 = require("./game");
|
|
5
6
|
exports.ratingSchema = (0, zod_1.object)({
|
|
6
7
|
id: (0, zod_1.string)(),
|
|
7
8
|
comment: (0, zod_1.string)(),
|
|
8
9
|
gameId: (0, zod_1.string)(),
|
|
9
10
|
createdAt: (0, zod_1.number)(),
|
|
10
11
|
rating: (0, zod_1.number)(),
|
|
11
|
-
|
|
12
|
+
user: (0, zod_1.object)({
|
|
13
|
+
id: (0, zod_1.record)((0, zod_1.number)(), (0, zod_1.number)()),
|
|
14
|
+
username: (0, zod_1.number)(),
|
|
15
|
+
}),
|
|
16
|
+
round: (0, zod_1.number)(),
|
|
17
|
+
game: (0, zod_1.object)({
|
|
18
|
+
homeTeam: game_1.gameTeamSchema,
|
|
19
|
+
awayTeam: game_1.gameTeamSchema,
|
|
20
|
+
}),
|
|
12
21
|
});
|