rategame-shared 1.0.29 → 1.0.31

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.
@@ -6,15 +6,15 @@ export declare const ratingSchema: import("zod").ZodObject<{
6
6
  user: import("zod").ZodObject<{
7
7
  id: import("zod").ZodString;
8
8
  username: import("zod").ZodString;
9
- avatarUrl: import("zod").ZodString;
9
+ email: import("zod").ZodString;
10
10
  }, "strip", import("zod").ZodTypeAny, {
11
11
  id: string;
12
+ email: string;
12
13
  username: string;
13
- avatarUrl: string;
14
14
  }, {
15
15
  id: string;
16
+ email: string;
16
17
  username: string;
17
- avatarUrl: string;
18
18
  }>;
19
19
  game: import("zod").ZodObject<{
20
20
  id: import("zod").ZodString;
@@ -116,8 +116,8 @@ export declare const ratingSchema: import("zod").ZodObject<{
116
116
  id: string;
117
117
  user: {
118
118
  id: string;
119
+ email: string;
119
120
  username: string;
120
- avatarUrl: string;
121
121
  };
122
122
  createdAt: number;
123
123
  rating: number;
@@ -148,8 +148,8 @@ export declare const ratingSchema: import("zod").ZodObject<{
148
148
  id: string;
149
149
  user: {
150
150
  id: string;
151
+ email: string;
151
152
  username: string;
152
- avatarUrl: string;
153
153
  };
154
154
  createdAt: number;
155
155
  rating: number;
@@ -180,36 +180,59 @@ export declare const ratingSchema: import("zod").ZodObject<{
180
180
  export declare const searchRatingSchema: import("zod").ZodObject<{
181
181
  q: import("zod").ZodOptional<import("zod").ZodString>;
182
182
  teamId: import("zod").ZodOptional<import("zod").ZodString>;
183
- round: import("zod").ZodOptional<import("zod").ZodString>;
183
+ round: import("zod").ZodOptional<import("zod").ZodNumber>;
184
184
  createdAt: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"12h">, import("zod").ZodLiteral<"daily">, import("zod").ZodLiteral<"weekly">]>>;
185
185
  sortBy: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"rating:asc">, import("zod").ZodLiteral<"rating:desc">, import("zod").ZodLiteral<"createdAt:asc">, import("zod").ZodLiteral<"createdAt:desc">]>>;
186
- limit: import("zod").ZodOptional<import("zod").ZodString>;
187
- offset: import("zod").ZodOptional<import("zod").ZodString>;
186
+ limit: import("zod").ZodOptional<import("zod").ZodNumber>;
187
+ offset: import("zod").ZodOptional<import("zod").ZodNumber>;
188
188
  }, "strip", import("zod").ZodTypeAny, {
189
189
  q?: string | undefined;
190
190
  teamId?: string | undefined;
191
- round?: string | undefined;
191
+ round?: number | undefined;
192
192
  createdAt?: "12h" | "daily" | "weekly" | undefined;
193
193
  sortBy?: "rating:asc" | "rating:desc" | "createdAt:asc" | "createdAt:desc" | undefined;
194
- limit?: string | undefined;
195
- offset?: string | undefined;
194
+ limit?: number | undefined;
195
+ offset?: number | undefined;
196
196
  }, {
197
197
  q?: string | undefined;
198
198
  teamId?: string | undefined;
199
- round?: string | undefined;
199
+ round?: number | undefined;
200
200
  createdAt?: "12h" | "daily" | "weekly" | undefined;
201
201
  sortBy?: "rating:asc" | "rating:desc" | "createdAt:asc" | "createdAt:desc" | undefined;
202
- limit?: string | undefined;
203
- offset?: string | undefined;
202
+ limit?: number | undefined;
203
+ offset?: number | undefined;
204
204
  }>;
205
205
  export declare const ratingLikeSchema: import("zod").ZodObject<{
206
206
  id: import("zod").ZodString;
207
+ user: import("zod").ZodObject<{
208
+ id: import("zod").ZodString;
209
+ username: import("zod").ZodString;
210
+ email: import("zod").ZodString;
211
+ }, "strip", import("zod").ZodTypeAny, {
212
+ id: string;
213
+ email: string;
214
+ username: string;
215
+ }, {
216
+ id: string;
217
+ email: string;
218
+ username: string;
219
+ }>;
207
220
  likedAt: import("zod").ZodNumber;
208
221
  }, "strip", import("zod").ZodTypeAny, {
209
222
  id: string;
223
+ user: {
224
+ id: string;
225
+ email: string;
226
+ username: string;
227
+ };
210
228
  likedAt: number;
211
229
  }, {
212
230
  id: string;
231
+ user: {
232
+ id: string;
233
+ email: string;
234
+ username: string;
235
+ };
213
236
  likedAt: number;
214
237
  }>;
215
238
  export declare const createRatingSchema: import("zod").ZodObject<{
@@ -11,7 +11,7 @@ exports.ratingSchema = (0, zod_1.object)({
11
11
  user: (0, zod_1.object)({
12
12
  id: (0, zod_1.string)(),
13
13
  username: (0, zod_1.string)(),
14
- avatarUrl: (0, zod_1.string)(),
14
+ email: (0, zod_1.string)(),
15
15
  }),
16
16
  game: (0, zod_1.object)({
17
17
  id: (0, zod_1.string)(),
@@ -23,7 +23,7 @@ exports.ratingSchema = (0, zod_1.object)({
23
23
  exports.searchRatingSchema = (0, zod_1.object)({
24
24
  q: (0, zod_1.string)().optional(),
25
25
  teamId: (0, zod_1.string)().optional(),
26
- round: (0, zod_1.string)().optional(),
26
+ round: (0, zod_1.number)().optional(),
27
27
  createdAt: (0, zod_1.union)([
28
28
  (0, zod_1.literal)("12h"),
29
29
  (0, zod_1.literal)("daily"),
@@ -35,11 +35,16 @@ exports.searchRatingSchema = (0, zod_1.object)({
35
35
  (0, zod_1.literal)("createdAt:asc"),
36
36
  (0, zod_1.literal)("createdAt:desc"),
37
37
  ]).optional(),
38
- limit: (0, zod_1.string)().optional(),
39
- offset: (0, zod_1.string)().optional(),
38
+ limit: (0, zod_1.number)().optional(),
39
+ offset: (0, zod_1.number)().optional(),
40
40
  });
41
41
  exports.ratingLikeSchema = (0, zod_1.object)({
42
42
  id: (0, zod_1.string)(),
43
+ user: (0, zod_1.object)({
44
+ id: (0, zod_1.string)(),
45
+ username: (0, zod_1.string)(),
46
+ email: (0, zod_1.string)(),
47
+ }),
43
48
  likedAt: (0, zod_1.number)(),
44
49
  });
45
50
  exports.createRatingSchema = exports.ratingSchema
@@ -75,24 +75,14 @@ export declare const createUserSchema: import("zod").ZodObject<Omit<{
75
75
  }>>;
76
76
  askedForPushNotifications: import("zod").ZodBoolean;
77
77
  acceptedPushNotifications: import("zod").ZodBoolean;
78
- }, "deviceTokens" | "askedForPushNotifications" | "acceptedPushNotifications">, "strip", import("zod").ZodTypeAny, {
79
- id: string;
78
+ }, "id" | "createdAt" | "updatedAt" | "totalRatedGames" | "avgRating" | "deviceTokens" | "askedForPushNotifications" | "acceptedPushNotifications">, "strip", import("zod").ZodTypeAny, {
80
79
  email: string;
81
80
  username: string;
82
81
  avatarUrl: string;
83
- createdAt: number;
84
- updatedAt: number;
85
- totalRatedGames?: number | undefined;
86
- avgRating?: number | undefined;
87
82
  isRegistrationComplete?: boolean | undefined;
88
83
  }, {
89
- id: string;
90
84
  email: string;
91
85
  username: string;
92
86
  avatarUrl: string;
93
- createdAt: number;
94
- updatedAt: number;
95
- totalRatedGames?: number | undefined;
96
- avgRating?: number | undefined;
97
87
  isRegistrationComplete?: boolean | undefined;
98
88
  }>;
@@ -20,7 +20,12 @@ exports.userSchema = (0, zod_1.object)({
20
20
  acceptedPushNotifications: (0, zod_1.boolean)(),
21
21
  });
22
22
  exports.createUserSchema = exports.userSchema.omit({
23
+ id: true,
23
24
  deviceTokens: true,
24
25
  askedForPushNotifications: true,
25
26
  acceptedPushNotifications: true,
27
+ avgRating: true,
28
+ totalRatedGames: true,
29
+ createdAt: true,
30
+ updatedAt: true,
26
31
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rategame-shared",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "description": "This package contains shared resources for the Rate Game project.",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",