rategame-shared 1.1.233 → 1.1.235
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/userEvent.d.ts +3 -0
- package/dist/models/userEvent.js +2 -0
- package/dist/schemas/notification.d.ts +5 -5
- package/dist/schemas/rating.d.ts +10 -10
- package/dist/schemas/rating.js +3 -3
- package/dist/schemas/userEvent.d.ts +83 -0
- package/dist/schemas/userEvent.js +24 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./schemas/chat";
|
|
|
7
7
|
export * from "./schemas/feedback";
|
|
8
8
|
export * from "./schemas/list";
|
|
9
9
|
export * from "./schemas/moderation";
|
|
10
|
+
export * from "./schemas/userEvent";
|
|
10
11
|
export * from "./models/user";
|
|
11
12
|
export * from "./models/rating";
|
|
12
13
|
export * from "./models/game";
|
|
@@ -16,4 +17,5 @@ export * from "./models/chat";
|
|
|
16
17
|
export * from "./models/feedback";
|
|
17
18
|
export * from "./models/list";
|
|
18
19
|
export * from "./models/moderation";
|
|
20
|
+
export * from "./models/userEvent";
|
|
19
21
|
export * from "./helpers/index";
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __exportStar(require("./schemas/chat"), exports);
|
|
|
23
23
|
__exportStar(require("./schemas/feedback"), exports);
|
|
24
24
|
__exportStar(require("./schemas/list"), exports);
|
|
25
25
|
__exportStar(require("./schemas/moderation"), exports);
|
|
26
|
+
__exportStar(require("./schemas/userEvent"), exports);
|
|
26
27
|
__exportStar(require("./models/user"), exports);
|
|
27
28
|
__exportStar(require("./models/rating"), exports);
|
|
28
29
|
__exportStar(require("./models/game"), exports);
|
|
@@ -32,4 +33,5 @@ __exportStar(require("./models/chat"), exports);
|
|
|
32
33
|
__exportStar(require("./models/feedback"), exports);
|
|
33
34
|
__exportStar(require("./models/list"), exports);
|
|
34
35
|
__exportStar(require("./models/moderation"), exports);
|
|
36
|
+
__exportStar(require("./models/userEvent"), exports);
|
|
35
37
|
__exportStar(require("./helpers/index"), exports);
|
|
@@ -260,7 +260,7 @@ export declare const internalNotification: z.ZodObject<{
|
|
|
260
260
|
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
261
261
|
edited: z.ZodOptional<z.ZodBoolean>;
|
|
262
262
|
category: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"watched">, z.ZodLiteral<"attended">, z.ZodLiteral<"highlights">, z.ZodLiteral<"listened">, z.ZodLiteral<"partiallyWatched">]>>;
|
|
263
|
-
userLocation: z.ZodOptional<z.ZodString
|
|
263
|
+
userLocation: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
264
264
|
}, "strip", z.ZodTypeAny, {
|
|
265
265
|
id: string;
|
|
266
266
|
user: {
|
|
@@ -327,7 +327,7 @@ export declare const internalNotification: z.ZodObject<{
|
|
|
327
327
|
fanCategory?: "homeTeam" | "awayTeam" | "winningTeam" | "losingTeam" | "neutral" | undefined;
|
|
328
328
|
edited?: boolean | undefined;
|
|
329
329
|
category?: "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | undefined;
|
|
330
|
-
userLocation?: string | undefined;
|
|
330
|
+
userLocation?: string | null | undefined;
|
|
331
331
|
}, {
|
|
332
332
|
id: string;
|
|
333
333
|
user: {
|
|
@@ -394,7 +394,7 @@ export declare const internalNotification: z.ZodObject<{
|
|
|
394
394
|
fanCategory?: "homeTeam" | "awayTeam" | "winningTeam" | "losingTeam" | "neutral" | undefined;
|
|
395
395
|
edited?: boolean | undefined;
|
|
396
396
|
category?: "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | undefined;
|
|
397
|
-
userLocation?: string | undefined;
|
|
397
|
+
userLocation?: string | null | undefined;
|
|
398
398
|
}>>;
|
|
399
399
|
}, "strip", z.ZodTypeAny, {
|
|
400
400
|
id: string;
|
|
@@ -478,7 +478,7 @@ export declare const internalNotification: z.ZodObject<{
|
|
|
478
478
|
fanCategory?: "homeTeam" | "awayTeam" | "winningTeam" | "losingTeam" | "neutral" | undefined;
|
|
479
479
|
edited?: boolean | undefined;
|
|
480
480
|
category?: "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | undefined;
|
|
481
|
-
userLocation?: string | undefined;
|
|
481
|
+
userLocation?: string | null | undefined;
|
|
482
482
|
} | undefined;
|
|
483
483
|
linkText?: string | undefined;
|
|
484
484
|
}, {
|
|
@@ -563,7 +563,7 @@ export declare const internalNotification: z.ZodObject<{
|
|
|
563
563
|
fanCategory?: "homeTeam" | "awayTeam" | "winningTeam" | "losingTeam" | "neutral" | undefined;
|
|
564
564
|
edited?: boolean | undefined;
|
|
565
565
|
category?: "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | undefined;
|
|
566
|
-
userLocation?: string | undefined;
|
|
566
|
+
userLocation?: string | null | undefined;
|
|
567
567
|
} | undefined;
|
|
568
568
|
linkText?: string | undefined;
|
|
569
569
|
}>;
|
package/dist/schemas/rating.d.ts
CHANGED
|
@@ -231,7 +231,7 @@ export declare const ratingSchema: import("zod").ZodObject<{
|
|
|
231
231
|
updatedAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
232
232
|
edited: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
233
233
|
category: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"watched">, import("zod").ZodLiteral<"attended">, import("zod").ZodLiteral<"highlights">, import("zod").ZodLiteral<"listened">, import("zod").ZodLiteral<"partiallyWatched">]>>;
|
|
234
|
-
userLocation: import("zod").ZodOptional<import("zod").ZodString
|
|
234
|
+
userLocation: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
235
235
|
}, "strip", import("zod").ZodTypeAny, {
|
|
236
236
|
id: string;
|
|
237
237
|
user: {
|
|
@@ -298,7 +298,7 @@ export declare const ratingSchema: import("zod").ZodObject<{
|
|
|
298
298
|
fanCategory?: "homeTeam" | "awayTeam" | "winningTeam" | "losingTeam" | "neutral" | undefined;
|
|
299
299
|
edited?: boolean | undefined;
|
|
300
300
|
category?: "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | undefined;
|
|
301
|
-
userLocation?: string | undefined;
|
|
301
|
+
userLocation?: string | null | undefined;
|
|
302
302
|
}, {
|
|
303
303
|
id: string;
|
|
304
304
|
user: {
|
|
@@ -365,7 +365,7 @@ export declare const ratingSchema: import("zod").ZodObject<{
|
|
|
365
365
|
fanCategory?: "homeTeam" | "awayTeam" | "winningTeam" | "losingTeam" | "neutral" | undefined;
|
|
366
366
|
edited?: boolean | undefined;
|
|
367
367
|
category?: "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | undefined;
|
|
368
|
-
userLocation?: string | undefined;
|
|
368
|
+
userLocation?: string | null | undefined;
|
|
369
369
|
}>;
|
|
370
370
|
export declare const searchRatingSchema: import("zod").ZodObject<{
|
|
371
371
|
q: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -386,7 +386,7 @@ export declare const searchRatingSchema: import("zod").ZodObject<{
|
|
|
386
386
|
division: import("zod").ZodOptional<import("zod").ZodString>;
|
|
387
387
|
fanCategory: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"winningTeam">, import("zod").ZodLiteral<"losingTeam">, import("zod").ZodLiteral<"neutral">, import("zod").ZodLiteral<"homeTeam">, import("zod").ZodLiteral<"awayTeam">]>>;
|
|
388
388
|
category: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"watched">, import("zod").ZodLiteral<"attended">, import("zod").ZodLiteral<"highlights">, import("zod").ZodLiteral<"listened">, import("zod").ZodLiteral<"partiallyWatched">]>>;
|
|
389
|
-
userLocation: import("zod").ZodOptional<import("zod").ZodString
|
|
389
|
+
userLocation: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
390
390
|
}, "strip", import("zod").ZodTypeAny, {
|
|
391
391
|
league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
|
|
392
392
|
offset?: string | undefined;
|
|
@@ -400,7 +400,7 @@ export declare const searchRatingSchema: import("zod").ZodObject<{
|
|
|
400
400
|
sortBy?: "rating:asc" | "rating:desc" | "createdAt:asc" | "createdAt:desc" | "userLikes:asc" | "userLikes:desc" | undefined;
|
|
401
401
|
fanCategory?: "homeTeam" | "awayTeam" | "winningTeam" | "losingTeam" | "neutral" | undefined;
|
|
402
402
|
category?: "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | undefined;
|
|
403
|
-
userLocation?: string | undefined;
|
|
403
|
+
userLocation?: string | null | undefined;
|
|
404
404
|
gameId?: string | undefined;
|
|
405
405
|
showEmptyRatings?: string | undefined;
|
|
406
406
|
following?: string | undefined;
|
|
@@ -420,7 +420,7 @@ export declare const searchRatingSchema: import("zod").ZodObject<{
|
|
|
420
420
|
sortBy?: "rating:asc" | "rating:desc" | "createdAt:asc" | "createdAt:desc" | "userLikes:asc" | "userLikes:desc" | undefined;
|
|
421
421
|
fanCategory?: "homeTeam" | "awayTeam" | "winningTeam" | "losingTeam" | "neutral" | undefined;
|
|
422
422
|
category?: "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | undefined;
|
|
423
|
-
userLocation?: string | undefined;
|
|
423
|
+
userLocation?: string | null | undefined;
|
|
424
424
|
gameId?: string | undefined;
|
|
425
425
|
showEmptyRatings?: string | undefined;
|
|
426
426
|
following?: string | undefined;
|
|
@@ -726,7 +726,7 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
|
|
|
726
726
|
updatedAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
727
727
|
edited: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
728
728
|
category: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"watched">, import("zod").ZodLiteral<"attended">, import("zod").ZodLiteral<"highlights">, import("zod").ZodLiteral<"listened">, import("zod").ZodLiteral<"partiallyWatched">]>>;
|
|
729
|
-
userLocation: import("zod").ZodOptional<import("zod").ZodString
|
|
729
|
+
userLocation: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
730
730
|
}, "id" | "user" | "createdAt">, {
|
|
731
731
|
game: import("zod").ZodObject<Omit<{
|
|
732
732
|
id: import("zod").ZodString;
|
|
@@ -863,7 +863,7 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
|
|
|
863
863
|
}>;
|
|
864
864
|
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
865
865
|
category: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodLiteral<"watched">, import("zod").ZodLiteral<"attended">, import("zod").ZodLiteral<"highlights">, import("zod").ZodLiteral<"listened">, import("zod").ZodLiteral<"partiallyWatched">]>, import("zod").ZodLiteral<"">]>>>;
|
|
866
|
-
userLocation: import("zod").ZodOptional<import("zod").ZodString
|
|
866
|
+
userLocation: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
867
867
|
}>, "strip", import("zod").ZodTypeAny, {
|
|
868
868
|
rating: number;
|
|
869
869
|
game: {
|
|
@@ -889,7 +889,7 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
|
|
|
889
889
|
fanCategory?: "homeTeam" | "awayTeam" | "winningTeam" | "losingTeam" | "neutral" | undefined;
|
|
890
890
|
edited?: boolean | undefined;
|
|
891
891
|
category?: "" | "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | null | undefined;
|
|
892
|
-
userLocation?: string | undefined;
|
|
892
|
+
userLocation?: string | null | undefined;
|
|
893
893
|
}, {
|
|
894
894
|
rating: number;
|
|
895
895
|
game: {
|
|
@@ -915,7 +915,7 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
|
|
|
915
915
|
fanCategory?: "homeTeam" | "awayTeam" | "winningTeam" | "losingTeam" | "neutral" | undefined;
|
|
916
916
|
edited?: boolean | undefined;
|
|
917
917
|
category?: "" | "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | null | undefined;
|
|
918
|
-
userLocation?: string | undefined;
|
|
918
|
+
userLocation?: string | null | undefined;
|
|
919
919
|
}>;
|
|
920
920
|
export declare const threadCommentSchema: import("zod").ZodObject<{
|
|
921
921
|
id: import("zod").ZodString;
|
package/dist/schemas/rating.js
CHANGED
|
@@ -51,7 +51,7 @@ exports.ratingSchema = (0, zod_1.object)({
|
|
|
51
51
|
updatedAt: (0, zod_1.number)().optional(),
|
|
52
52
|
edited: (0, zod_1.boolean)().optional(),
|
|
53
53
|
category: exports.ratingCategorySchema.optional(),
|
|
54
|
-
userLocation: (0, zod_1.string)().optional(),
|
|
54
|
+
userLocation: (0, zod_1.string)().optional().nullable(),
|
|
55
55
|
});
|
|
56
56
|
exports.searchRatingSchema = (0, zod_1.object)({
|
|
57
57
|
q: (0, zod_1.string)().optional(),
|
|
@@ -78,7 +78,7 @@ exports.searchRatingSchema = (0, zod_1.object)({
|
|
|
78
78
|
(0, zod_1.literal)("awayTeam"),
|
|
79
79
|
]).optional(),
|
|
80
80
|
category: exports.ratingCategorySchema.optional(),
|
|
81
|
-
userLocation: (0, zod_1.string)().optional(),
|
|
81
|
+
userLocation: (0, zod_1.string)().optional().nullable(),
|
|
82
82
|
});
|
|
83
83
|
exports.ratingLikeSchema = (0, zod_1.object)({
|
|
84
84
|
ratingId: (0, zod_1.string)(),
|
|
@@ -116,7 +116,7 @@ exports.createRatingSchema = exports.ratingSchema
|
|
|
116
116
|
category: (0, zod_1.union)([exports.ratingCategorySchema, (0, zod_1.literal)("")])
|
|
117
117
|
.nullable()
|
|
118
118
|
.optional(),
|
|
119
|
-
userLocation: (0, zod_1.string)().optional(),
|
|
119
|
+
userLocation: (0, zod_1.string)().optional().nullable(),
|
|
120
120
|
});
|
|
121
121
|
exports.threadCommentSchema = (0, zod_1.object)({
|
|
122
122
|
id: (0, zod_1.string)(),
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const userEventSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
userId: z.ZodString;
|
|
5
|
+
eventType: z.ZodLiteral<"achievement">;
|
|
6
|
+
eventData: z.ZodObject<{
|
|
7
|
+
achievementId: z.ZodString;
|
|
8
|
+
achievementName: z.ZodString;
|
|
9
|
+
achievementDescription: z.ZodString;
|
|
10
|
+
tier: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
progress: z.ZodNumber;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
progress: number;
|
|
14
|
+
achievementId: string;
|
|
15
|
+
achievementName: string;
|
|
16
|
+
achievementDescription: string;
|
|
17
|
+
tier?: number | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
progress: number;
|
|
20
|
+
achievementId: string;
|
|
21
|
+
achievementName: string;
|
|
22
|
+
achievementDescription: string;
|
|
23
|
+
tier?: number | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
user: z.ZodObject<{
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
username: z.ZodString;
|
|
28
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
29
|
+
badge: z.ZodOptional<z.ZodString>;
|
|
30
|
+
email: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
id: string;
|
|
33
|
+
username: string;
|
|
34
|
+
email?: string | undefined;
|
|
35
|
+
avatarUrl?: string | undefined;
|
|
36
|
+
badge?: string | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
id: string;
|
|
39
|
+
username: string;
|
|
40
|
+
email?: string | undefined;
|
|
41
|
+
avatarUrl?: string | undefined;
|
|
42
|
+
badge?: string | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
createdAt: z.ZodNumber;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
id: string;
|
|
47
|
+
user: {
|
|
48
|
+
id: string;
|
|
49
|
+
username: string;
|
|
50
|
+
email?: string | undefined;
|
|
51
|
+
avatarUrl?: string | undefined;
|
|
52
|
+
badge?: string | undefined;
|
|
53
|
+
};
|
|
54
|
+
createdAt: number;
|
|
55
|
+
userId: string;
|
|
56
|
+
eventType: "achievement";
|
|
57
|
+
eventData: {
|
|
58
|
+
progress: number;
|
|
59
|
+
achievementId: string;
|
|
60
|
+
achievementName: string;
|
|
61
|
+
achievementDescription: string;
|
|
62
|
+
tier?: number | undefined;
|
|
63
|
+
};
|
|
64
|
+
}, {
|
|
65
|
+
id: string;
|
|
66
|
+
user: {
|
|
67
|
+
id: string;
|
|
68
|
+
username: string;
|
|
69
|
+
email?: string | undefined;
|
|
70
|
+
avatarUrl?: string | undefined;
|
|
71
|
+
badge?: string | undefined;
|
|
72
|
+
};
|
|
73
|
+
createdAt: number;
|
|
74
|
+
userId: string;
|
|
75
|
+
eventType: "achievement";
|
|
76
|
+
eventData: {
|
|
77
|
+
progress: number;
|
|
78
|
+
achievementId: string;
|
|
79
|
+
achievementName: string;
|
|
80
|
+
achievementDescription: string;
|
|
81
|
+
tier?: number | undefined;
|
|
82
|
+
};
|
|
83
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.userEventSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.userEventSchema = zod_1.z.object({
|
|
6
|
+
id: zod_1.z.string(),
|
|
7
|
+
userId: zod_1.z.string(),
|
|
8
|
+
eventType: (0, zod_1.literal)("achievement"),
|
|
9
|
+
eventData: zod_1.z.object({
|
|
10
|
+
achievementId: zod_1.z.string(),
|
|
11
|
+
achievementName: zod_1.z.string(),
|
|
12
|
+
achievementDescription: zod_1.z.string(),
|
|
13
|
+
tier: zod_1.z.number().optional(),
|
|
14
|
+
progress: zod_1.z.number(),
|
|
15
|
+
}),
|
|
16
|
+
user: zod_1.z.object({
|
|
17
|
+
id: zod_1.z.string(),
|
|
18
|
+
username: zod_1.z.string(),
|
|
19
|
+
avatarUrl: zod_1.z.string().optional(),
|
|
20
|
+
badge: zod_1.z.string().optional(),
|
|
21
|
+
email: zod_1.z.string().optional(),
|
|
22
|
+
}),
|
|
23
|
+
createdAt: zod_1.z.number(),
|
|
24
|
+
});
|