rategame-shared 1.0.15 → 1.0.18
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/models/rating.d.ts +2 -1
- package/dist/schemas/game.d.ts +23 -0
- package/dist/schemas/game.js +5 -0
- package/dist/schemas/rating.d.ts +10 -0
- package/dist/schemas/rating.js +5 -1
- package/dist/schemas/user.d.ts +24 -0
- package/dist/schemas/user.js +6 -0
- package/package.json +1 -1
package/dist/models/rating.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { createRatingSchema, ratingSchema } from "../schemas/rating";
|
|
2
|
+
import { createRatingSchema, ratingLikeSchema, ratingSchema } from "../schemas/rating";
|
|
3
3
|
export type Rating = z.infer<typeof ratingSchema>;
|
|
4
|
+
export type RatingLike = z.infer<typeof ratingLikeSchema>;
|
|
4
5
|
export type CreateRating = z.infer<typeof createRatingSchema>;
|
package/dist/schemas/game.d.ts
CHANGED
|
@@ -108,6 +108,19 @@ export declare const gameSchema: z.ZodObject<{
|
|
|
108
108
|
id?: string | undefined;
|
|
109
109
|
isWinner?: boolean | undefined;
|
|
110
110
|
}>;
|
|
111
|
+
periods: z.ZodArray<z.ZodObject<{
|
|
112
|
+
awayScore: z.ZodNumber;
|
|
113
|
+
homeScore: z.ZodNumber;
|
|
114
|
+
periodNumber: z.ZodNumber;
|
|
115
|
+
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
awayScore: number;
|
|
117
|
+
homeScore: number;
|
|
118
|
+
periodNumber: number;
|
|
119
|
+
}, {
|
|
120
|
+
awayScore: number;
|
|
121
|
+
homeScore: number;
|
|
122
|
+
periodNumber: number;
|
|
123
|
+
}>, "many">;
|
|
111
124
|
rating: z.ZodObject<{
|
|
112
125
|
avg: z.ZodNumber;
|
|
113
126
|
votes: z.ZodObject<{
|
|
@@ -159,6 +172,11 @@ export declare const gameSchema: z.ZodObject<{
|
|
|
159
172
|
id?: string | undefined;
|
|
160
173
|
isWinner?: boolean | undefined;
|
|
161
174
|
};
|
|
175
|
+
periods: {
|
|
176
|
+
awayScore: number;
|
|
177
|
+
homeScore: number;
|
|
178
|
+
periodNumber: number;
|
|
179
|
+
}[];
|
|
162
180
|
rating: {
|
|
163
181
|
avg: number;
|
|
164
182
|
votes: {
|
|
@@ -193,6 +211,11 @@ export declare const gameSchema: z.ZodObject<{
|
|
|
193
211
|
id?: string | undefined;
|
|
194
212
|
isWinner?: boolean | undefined;
|
|
195
213
|
};
|
|
214
|
+
periods: {
|
|
215
|
+
awayScore: number;
|
|
216
|
+
homeScore: number;
|
|
217
|
+
periodNumber: number;
|
|
218
|
+
}[];
|
|
196
219
|
rating: {
|
|
197
220
|
avg: number;
|
|
198
221
|
votes: {
|
package/dist/schemas/game.js
CHANGED
|
@@ -29,5 +29,10 @@ exports.gameSchema = zod_1.z.object({
|
|
|
29
29
|
apiGameId: zod_1.z.number(),
|
|
30
30
|
homeTeam: exports.gameTeamSchema,
|
|
31
31
|
awayTeam: exports.gameTeamSchema,
|
|
32
|
+
periods: zod_1.z.array(zod_1.z.object({
|
|
33
|
+
awayScore: zod_1.z.number(),
|
|
34
|
+
homeScore: zod_1.z.number(),
|
|
35
|
+
periodNumber: zod_1.z.number(),
|
|
36
|
+
})),
|
|
32
37
|
rating: exports.gameRatingAggregateSchema,
|
|
33
38
|
});
|
package/dist/schemas/rating.d.ts
CHANGED
|
@@ -172,6 +172,16 @@ export declare const ratingSchema: import("zod").ZodObject<{
|
|
|
172
172
|
};
|
|
173
173
|
comment?: string | undefined;
|
|
174
174
|
}>;
|
|
175
|
+
export declare const ratingLikeSchema: import("zod").ZodObject<{
|
|
176
|
+
id: import("zod").ZodString;
|
|
177
|
+
likedAt: import("zod").ZodNumber;
|
|
178
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
179
|
+
id: string;
|
|
180
|
+
likedAt: number;
|
|
181
|
+
}, {
|
|
182
|
+
id: string;
|
|
183
|
+
likedAt: number;
|
|
184
|
+
}>;
|
|
175
185
|
export declare const createRatingSchema: import("zod").ZodObject<{
|
|
176
186
|
rating: import("zod").ZodNumber;
|
|
177
187
|
comment: import("zod").ZodOptional<import("zod").ZodString>;
|
package/dist/schemas/rating.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createRatingSchema = exports.ratingSchema = void 0;
|
|
3
|
+
exports.createRatingSchema = exports.ratingLikeSchema = exports.ratingSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const game_1 = require("./game");
|
|
6
6
|
exports.ratingSchema = (0, zod_1.object)({
|
|
@@ -19,6 +19,10 @@ exports.ratingSchema = (0, zod_1.object)({
|
|
|
19
19
|
awayTeam: game_1.gameTeamSchema,
|
|
20
20
|
}),
|
|
21
21
|
});
|
|
22
|
+
exports.ratingLikeSchema = (0, zod_1.object)({
|
|
23
|
+
id: (0, zod_1.string)(),
|
|
24
|
+
likedAt: (0, zod_1.number)(),
|
|
25
|
+
});
|
|
22
26
|
exports.createRatingSchema = exports.ratingSchema
|
|
23
27
|
.omit({
|
|
24
28
|
id: true,
|
package/dist/schemas/user.d.ts
CHANGED
|
@@ -6,6 +6,18 @@ export declare const userSchema: import("zod").ZodObject<{
|
|
|
6
6
|
createdAt: import("zod").ZodNumber;
|
|
7
7
|
updatedAt: import("zod").ZodNumber;
|
|
8
8
|
isRegistrationComplete: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
9
|
+
deviceTokens: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
|
10
|
+
token: import("zod").ZodString;
|
|
11
|
+
createdAt: import("zod").ZodNumber;
|
|
12
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
13
|
+
createdAt: number;
|
|
14
|
+
token: string;
|
|
15
|
+
}, {
|
|
16
|
+
createdAt: number;
|
|
17
|
+
token: string;
|
|
18
|
+
}>>;
|
|
19
|
+
askedForPushNotifications: import("zod").ZodBoolean;
|
|
20
|
+
acceptedPushNotifications: import("zod").ZodBoolean;
|
|
9
21
|
}, "strip", import("zod").ZodTypeAny, {
|
|
10
22
|
id: string;
|
|
11
23
|
email: string;
|
|
@@ -13,6 +25,12 @@ export declare const userSchema: import("zod").ZodObject<{
|
|
|
13
25
|
avatarUrl: string;
|
|
14
26
|
createdAt: number;
|
|
15
27
|
updatedAt: number;
|
|
28
|
+
deviceTokens: Record<string, {
|
|
29
|
+
createdAt: number;
|
|
30
|
+
token: string;
|
|
31
|
+
}>;
|
|
32
|
+
askedForPushNotifications: boolean;
|
|
33
|
+
acceptedPushNotifications: boolean;
|
|
16
34
|
isRegistrationComplete?: boolean | undefined;
|
|
17
35
|
}, {
|
|
18
36
|
id: string;
|
|
@@ -21,5 +39,11 @@ export declare const userSchema: import("zod").ZodObject<{
|
|
|
21
39
|
avatarUrl: string;
|
|
22
40
|
createdAt: number;
|
|
23
41
|
updatedAt: number;
|
|
42
|
+
deviceTokens: Record<string, {
|
|
43
|
+
createdAt: number;
|
|
44
|
+
token: string;
|
|
45
|
+
}>;
|
|
46
|
+
askedForPushNotifications: boolean;
|
|
47
|
+
acceptedPushNotifications: boolean;
|
|
24
48
|
isRegistrationComplete?: boolean | undefined;
|
|
25
49
|
}>;
|
package/dist/schemas/user.js
CHANGED
|
@@ -10,4 +10,10 @@ exports.userSchema = (0, zod_1.object)({
|
|
|
10
10
|
createdAt: (0, zod_1.number)(),
|
|
11
11
|
updatedAt: (0, zod_1.number)(),
|
|
12
12
|
isRegistrationComplete: (0, zod_1.boolean)().optional(),
|
|
13
|
+
deviceTokens: (0, zod_1.record)((0, zod_1.object)({
|
|
14
|
+
token: (0, zod_1.string)(),
|
|
15
|
+
createdAt: (0, zod_1.number)(),
|
|
16
|
+
})),
|
|
17
|
+
askedForPushNotifications: (0, zod_1.boolean)(),
|
|
18
|
+
acceptedPushNotifications: (0, zod_1.boolean)(),
|
|
13
19
|
});
|