rategame-shared 1.1.323 → 1.1.325
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/experience.d.ts +7 -0
- package/dist/models/experience.js +2 -0
- package/dist/models/pick.d.ts +2 -1
- package/dist/schemas/experience.d.ts +4918 -0
- package/dist/schemas/experience.js +85 -0
- package/dist/schemas/pick.d.ts +22026 -0
- package/dist/schemas/pick.js +5 -1
- package/package.json +1 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.experienceThreadCommentSchema = exports.createExperienceRatingSchema = exports.searchExperienceRatingSchema = exports.experienceRatingSchema = exports.experienceForRatingSchema = exports.experienceSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const sharedTypes_1 = require("./sharedTypes");
|
|
6
|
+
const user_1 = require("./user");
|
|
7
|
+
const stadium_1 = require("./stadium");
|
|
8
|
+
/**
|
|
9
|
+
* Experience document schema
|
|
10
|
+
* Represents a limited-time event that users can rate (e.g., Super Bowl Halftime)
|
|
11
|
+
*/
|
|
12
|
+
exports.experienceSchema = zod_1.z.object({
|
|
13
|
+
id: zod_1.z.string(),
|
|
14
|
+
name: zod_1.z.string(),
|
|
15
|
+
description: zod_1.z.string(),
|
|
16
|
+
thumbnailUrl: zod_1.z.string(),
|
|
17
|
+
gameId: zod_1.z.string().optional().nullable(),
|
|
18
|
+
rating: stadium_1.stadiumRatingAggregateSchema.optional(),
|
|
19
|
+
createdAt: zod_1.z.number(),
|
|
20
|
+
});
|
|
21
|
+
// Simplified experience schema for rating creation (excludes rating aggregate data)
|
|
22
|
+
exports.experienceForRatingSchema = exports.experienceSchema.omit({
|
|
23
|
+
rating: true,
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* Experience Rating schema
|
|
27
|
+
* Follows the stadium rating pattern - users can rate once with a comment
|
|
28
|
+
*/
|
|
29
|
+
exports.experienceRatingSchema = zod_1.z.object({
|
|
30
|
+
id: zod_1.z.string(),
|
|
31
|
+
createdAt: zod_1.z.number(),
|
|
32
|
+
rating: zod_1.z.number(),
|
|
33
|
+
comment: zod_1.z.string().optional(),
|
|
34
|
+
user: user_1.reducedUserSchema,
|
|
35
|
+
experience: exports.experienceSchema,
|
|
36
|
+
userLikes: zod_1.z.number().optional(),
|
|
37
|
+
updatedAt: zod_1.z.number().optional(),
|
|
38
|
+
edited: zod_1.z.boolean().optional(),
|
|
39
|
+
userLocation: zod_1.z.string().optional().nullable(),
|
|
40
|
+
});
|
|
41
|
+
/**
|
|
42
|
+
* Search/filter parameters for experience ratings
|
|
43
|
+
*/
|
|
44
|
+
exports.searchExperienceRatingSchema = zod_1.z.object({
|
|
45
|
+
sortBy: sharedTypes_1.ratingSortSchema.optional(),
|
|
46
|
+
limit: zod_1.z.string().optional(),
|
|
47
|
+
offset: zod_1.z.string().optional(),
|
|
48
|
+
showEmptyRatings: zod_1.z.string().optional(),
|
|
49
|
+
userId: zod_1.z.string().optional(),
|
|
50
|
+
username: zod_1.z.string().optional(),
|
|
51
|
+
q: zod_1.z.string().optional(),
|
|
52
|
+
onlyUserRatings: zod_1.z.string().optional(),
|
|
53
|
+
});
|
|
54
|
+
/**
|
|
55
|
+
* Schema for creating a new experience rating
|
|
56
|
+
*/
|
|
57
|
+
exports.createExperienceRatingSchema = exports.experienceRatingSchema
|
|
58
|
+
.omit({
|
|
59
|
+
createdAt: true,
|
|
60
|
+
})
|
|
61
|
+
.extend({
|
|
62
|
+
experience: exports.experienceForRatingSchema,
|
|
63
|
+
});
|
|
64
|
+
/**
|
|
65
|
+
* Thread comment schema for experience ratings
|
|
66
|
+
*/
|
|
67
|
+
exports.experienceThreadCommentSchema = zod_1.z.object({
|
|
68
|
+
id: zod_1.z.string(),
|
|
69
|
+
createdAt: zod_1.z.number(),
|
|
70
|
+
content: zod_1.z.string(),
|
|
71
|
+
user: user_1.reducedUserSchema,
|
|
72
|
+
ratingId: zod_1.z.string(),
|
|
73
|
+
parentId: zod_1.z.string().nullable().optional(),
|
|
74
|
+
isReply: zod_1.z.boolean().optional(),
|
|
75
|
+
replyTo: user_1.reducedUserSchema.nullable().optional(),
|
|
76
|
+
level: zod_1.z.number(),
|
|
77
|
+
authorExperienceRating: zod_1.z
|
|
78
|
+
.object({
|
|
79
|
+
id: zod_1.z.string(),
|
|
80
|
+
value: zod_1.z.number(),
|
|
81
|
+
})
|
|
82
|
+
.nullable()
|
|
83
|
+
.optional(),
|
|
84
|
+
experienceId: zod_1.z.string(),
|
|
85
|
+
});
|