rategame-shared 1.0.91 → 1.0.93

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.
@@ -538,10 +538,9 @@ export declare const mlbGameSchema: z.ZodObject<{
538
538
  inningNumber: number;
539
539
  }[];
540
540
  id?: string | undefined;
541
+ round?: number | undefined;
541
542
  isClosed?: boolean | undefined;
542
543
  ratingWindowClosedAt?: number | undefined;
543
- round?: number | undefined;
544
- inningHalf?: "T" | "B" | undefined;
545
544
  seriesInfo?: {
546
545
  maxLength: number;
547
546
  homeTeamWins: number;
@@ -555,6 +554,7 @@ export declare const mlbGameSchema: z.ZodObject<{
555
554
  options: Record<number, number>;
556
555
  };
557
556
  } | undefined;
557
+ inningHalf?: "T" | "B" | undefined;
558
558
  losingPitcherId?: string | undefined;
559
559
  winningPitcherId?: string | undefined;
560
560
  savingPitcherId?: string | undefined;
@@ -621,10 +621,9 @@ export declare const mlbGameSchema: z.ZodObject<{
621
621
  inningNumber: number;
622
622
  }[];
623
623
  id?: string | undefined;
624
+ round?: number | undefined;
624
625
  isClosed?: boolean | undefined;
625
626
  ratingWindowClosedAt?: number | undefined;
626
- round?: number | undefined;
627
- inningHalf?: "T" | "B" | undefined;
628
627
  seriesInfo?: {
629
628
  maxLength: number;
630
629
  homeTeamWins: number;
@@ -638,6 +637,7 @@ export declare const mlbGameSchema: z.ZodObject<{
638
637
  options: Record<number, number>;
639
638
  };
640
639
  } | undefined;
640
+ inningHalf?: "T" | "B" | undefined;
641
641
  losingPitcherId?: string | undefined;
642
642
  winningPitcherId?: string | undefined;
643
643
  savingPitcherId?: string | undefined;
@@ -679,27 +679,27 @@ export declare const searchGameSchema: z.ZodObject<{
679
679
  q: z.ZodOptional<z.ZodString>;
680
680
  teamId: z.ZodOptional<z.ZodString>;
681
681
  round: z.ZodOptional<z.ZodString>;
682
- league: z.ZodUnion<[z.ZodLiteral<"ncaa">, z.ZodLiteral<"nba">]>;
682
+ league: z.ZodUnion<[z.ZodLiteral<"ncaa">, z.ZodLiteral<"nba">, z.ZodLiteral<"mlb">]>;
683
683
  createdAt: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"12h">, z.ZodLiteral<"daily">, z.ZodLiteral<"weekly">]>>;
684
684
  sortBy: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"rating.avg:asc">, z.ZodLiteral<"rating.avg:desc">, z.ZodLiteral<"startedAt:asc">, z.ZodLiteral<"startedAt:desc">]>>;
685
685
  limit: z.ZodOptional<z.ZodString>;
686
686
  offset: z.ZodOptional<z.ZodString>;
687
687
  }, "strip", z.ZodTypeAny, {
688
- league: "nba" | "ncaa";
689
- q?: string | undefined;
690
- teamId?: string | undefined;
688
+ league: "nba" | "ncaa" | "mlb";
689
+ offset?: string | undefined;
691
690
  round?: string | undefined;
691
+ q?: string | undefined;
692
692
  createdAt?: "12h" | "daily" | "weekly" | undefined;
693
+ teamId?: string | undefined;
693
694
  sortBy?: "rating.avg:asc" | "rating.avg:desc" | "startedAt:asc" | "startedAt:desc" | undefined;
694
695
  limit?: string | undefined;
695
- offset?: string | undefined;
696
696
  }, {
697
- league: "nba" | "ncaa";
698
- q?: string | undefined;
699
- teamId?: string | undefined;
697
+ league: "nba" | "ncaa" | "mlb";
698
+ offset?: string | undefined;
700
699
  round?: string | undefined;
700
+ q?: string | undefined;
701
701
  createdAt?: "12h" | "daily" | "weekly" | undefined;
702
+ teamId?: string | undefined;
702
703
  sortBy?: "rating.avg:asc" | "rating.avg:desc" | "startedAt:asc" | "startedAt:desc" | undefined;
703
704
  limit?: string | undefined;
704
- offset?: string | undefined;
705
705
  }>;
@@ -89,7 +89,7 @@ exports.searchGameSchema = zod_1.z.object({
89
89
  q: zod_1.z.string().optional(),
90
90
  teamId: zod_1.z.string().optional(),
91
91
  round: zod_1.z.string().optional(),
92
- league: zod_1.z.union([zod_1.z.literal("ncaa"), zod_1.z.literal("nba")]),
92
+ league: zod_1.z.union([zod_1.z.literal("ncaa"), zod_1.z.literal("nba"), zod_1.z.literal("mlb")]),
93
93
  createdAt: zod_1.z
94
94
  .union([zod_1.z.literal("12h"), zod_1.z.literal("daily"), zod_1.z.literal("weekly")])
95
95
  .optional(),
@@ -252,32 +252,32 @@ export declare const searchRatingSchema: import("zod").ZodObject<{
252
252
  userId: import("zod").ZodOptional<import("zod").ZodString>;
253
253
  }, "strip", import("zod").ZodTypeAny, {
254
254
  league: "nba" | "ncaa";
255
- q?: string | undefined;
256
- teamId?: string | undefined;
255
+ offset?: string | undefined;
257
256
  round?: string | undefined;
257
+ q?: string | undefined;
258
+ username?: string | undefined;
258
259
  createdAt?: "12h" | "daily" | "weekly" | undefined;
260
+ teamId?: string | undefined;
259
261
  sortBy?: "rating:asc" | "rating:desc" | "createdAt:asc" | "createdAt:desc" | "userLikes:asc" | "userLikes:desc" | undefined;
260
262
  limit?: string | undefined;
261
- offset?: string | undefined;
263
+ comment?: string | undefined;
262
264
  gameId?: string | undefined;
263
265
  showEmptyRatings?: string | undefined;
264
- comment?: string | undefined;
265
- username?: string | undefined;
266
266
  following?: string | undefined;
267
267
  userId?: string | undefined;
268
268
  }, {
269
269
  league: "nba" | "ncaa";
270
- q?: string | undefined;
271
- teamId?: string | undefined;
270
+ offset?: string | undefined;
272
271
  round?: string | undefined;
272
+ q?: string | undefined;
273
+ username?: string | undefined;
273
274
  createdAt?: "12h" | "daily" | "weekly" | undefined;
275
+ teamId?: string | undefined;
274
276
  sortBy?: "rating:asc" | "rating:desc" | "createdAt:asc" | "createdAt:desc" | "userLikes:asc" | "userLikes:desc" | undefined;
275
277
  limit?: string | undefined;
276
- offset?: string | undefined;
278
+ comment?: string | undefined;
277
279
  gameId?: string | undefined;
278
280
  showEmptyRatings?: string | undefined;
279
- comment?: string | undefined;
280
- username?: string | undefined;
281
281
  following?: string | undefined;
282
282
  userId?: string | undefined;
283
283
  }>;
@@ -347,10 +347,159 @@ export declare const createAgreeRatingSchema: import("zod").ZodObject<{
347
347
  };
348
348
  agree: boolean;
349
349
  }>;
350
- export declare const createRatingSchema: import("zod").ZodObject<{
350
+ export declare const createRatingSchema: import("zod").ZodObject<import("zod").objectUtil.extendShape<Omit<{
351
+ id: import("zod").ZodString;
352
+ createdAt: import("zod").ZodNumber;
351
353
  rating: import("zod").ZodNumber;
352
354
  comment: import("zod").ZodOptional<import("zod").ZodString>;
355
+ user: import("zod").ZodObject<{
356
+ id: import("zod").ZodString;
357
+ username: import("zod").ZodString;
358
+ avatarUrl: import("zod").ZodString;
359
+ email: import("zod").ZodString;
360
+ badge: import("zod").ZodOptional<import("zod").ZodString>;
361
+ }, "strip", import("zod").ZodTypeAny, {
362
+ id: string;
363
+ email: string;
364
+ username: string;
365
+ avatarUrl: string;
366
+ badge?: string | undefined;
367
+ }, {
368
+ id: string;
369
+ email: string;
370
+ username: string;
371
+ avatarUrl: string;
372
+ badge?: string | undefined;
373
+ }>;
374
+ game: import("zod").ZodObject<{
375
+ id: import("zod").ZodString;
376
+ round: import("zod").ZodNumber;
377
+ league: import("zod").ZodUnion<[import("zod").ZodLiteral<"ncaa">, import("zod").ZodLiteral<"nba">]>;
378
+ homeTeam: import("zod").ZodObject<{
379
+ id: import("zod").ZodOptional<import("zod").ZodString>;
380
+ apiTeamId: import("zod").ZodNumber;
381
+ name: import("zod").ZodString;
382
+ score: import("zod").ZodNumber;
383
+ isWinner: import("zod").ZodOptional<import("zod").ZodBoolean>;
384
+ image: import("zod").ZodString;
385
+ seed: import("zod").ZodNumber;
386
+ }, "strip", import("zod").ZodTypeAny, {
387
+ name: string;
388
+ image: string;
389
+ apiTeamId: number;
390
+ seed: number;
391
+ score: number;
392
+ id?: string | undefined;
393
+ isWinner?: boolean | undefined;
394
+ }, {
395
+ name: string;
396
+ image: string;
397
+ apiTeamId: number;
398
+ seed: number;
399
+ score: number;
400
+ id?: string | undefined;
401
+ isWinner?: boolean | undefined;
402
+ }>;
403
+ awayTeam: import("zod").ZodObject<{
404
+ id: import("zod").ZodOptional<import("zod").ZodString>;
405
+ apiTeamId: import("zod").ZodNumber;
406
+ name: import("zod").ZodString;
407
+ score: import("zod").ZodNumber;
408
+ isWinner: import("zod").ZodOptional<import("zod").ZodBoolean>;
409
+ image: import("zod").ZodString;
410
+ seed: import("zod").ZodNumber;
411
+ }, "strip", import("zod").ZodTypeAny, {
412
+ name: string;
413
+ image: string;
414
+ apiTeamId: number;
415
+ seed: number;
416
+ score: number;
417
+ id?: string | undefined;
418
+ isWinner?: boolean | undefined;
419
+ }, {
420
+ name: string;
421
+ image: string;
422
+ apiTeamId: number;
423
+ seed: number;
424
+ score: number;
425
+ id?: string | undefined;
426
+ isWinner?: boolean | undefined;
427
+ }>;
428
+ seriesInfo: import("zod").ZodOptional<import("zod").ZodObject<{
429
+ homeTeamWins: import("zod").ZodNumber;
430
+ awayTeamWins: import("zod").ZodNumber;
431
+ gameNumber: import("zod").ZodNumber;
432
+ maxLength: import("zod").ZodNumber;
433
+ }, "strip", import("zod").ZodTypeAny, {
434
+ maxLength: number;
435
+ homeTeamWins: number;
436
+ awayTeamWins: number;
437
+ gameNumber: number;
438
+ }, {
439
+ maxLength: number;
440
+ homeTeamWins: number;
441
+ awayTeamWins: number;
442
+ gameNumber: number;
443
+ }>>;
444
+ }, "strip", import("zod").ZodTypeAny, {
445
+ id: string;
446
+ round: number;
447
+ league: "nba" | "ncaa";
448
+ homeTeam: {
449
+ name: string;
450
+ image: string;
451
+ apiTeamId: number;
452
+ seed: number;
453
+ score: number;
454
+ id?: string | undefined;
455
+ isWinner?: boolean | undefined;
456
+ };
457
+ awayTeam: {
458
+ name: string;
459
+ image: string;
460
+ apiTeamId: number;
461
+ seed: number;
462
+ score: number;
463
+ id?: string | undefined;
464
+ isWinner?: boolean | undefined;
465
+ };
466
+ seriesInfo?: {
467
+ maxLength: number;
468
+ homeTeamWins: number;
469
+ awayTeamWins: number;
470
+ gameNumber: number;
471
+ } | undefined;
472
+ }, {
473
+ id: string;
474
+ round: number;
475
+ league: "nba" | "ncaa";
476
+ homeTeam: {
477
+ name: string;
478
+ image: string;
479
+ apiTeamId: number;
480
+ seed: number;
481
+ score: number;
482
+ id?: string | undefined;
483
+ isWinner?: boolean | undefined;
484
+ };
485
+ awayTeam: {
486
+ name: string;
487
+ image: string;
488
+ apiTeamId: number;
489
+ seed: number;
490
+ score: number;
491
+ id?: string | undefined;
492
+ isWinner?: boolean | undefined;
493
+ };
494
+ seriesInfo?: {
495
+ maxLength: number;
496
+ homeTeamWins: number;
497
+ awayTeamWins: number;
498
+ gameNumber: number;
499
+ } | undefined;
500
+ }>;
353
501
  userLikes: import("zod").ZodOptional<import("zod").ZodNumber>;
502
+ }, "id" | "user" | "createdAt">, {
354
503
  game: import("zod").ZodObject<Omit<{
355
504
  id: import("zod").ZodString;
356
505
  round: import("zod").ZodNumber;
@@ -441,7 +590,7 @@ export declare const createRatingSchema: import("zod").ZodObject<{
441
590
  } | undefined;
442
591
  }>;
443
592
  id: import("zod").ZodOptional<import("zod").ZodString>;
444
- }, "strip", import("zod").ZodTypeAny, {
593
+ }>, "strip", import("zod").ZodTypeAny, {
445
594
  rating: number;
446
595
  game: {
447
596
  id: string;
@@ -453,9 +602,9 @@ export declare const createRatingSchema: import("zod").ZodObject<{
453
602
  gameNumber: number;
454
603
  } | undefined;
455
604
  };
605
+ id?: string | undefined;
456
606
  comment?: string | undefined;
457
607
  userLikes?: number | undefined;
458
- id?: string | undefined;
459
608
  }, {
460
609
  rating: number;
461
610
  game: {
@@ -468,7 +617,7 @@ export declare const createRatingSchema: import("zod").ZodObject<{
468
617
  gameNumber: number;
469
618
  } | undefined;
470
619
  };
620
+ id?: string | undefined;
471
621
  comment?: string | undefined;
472
622
  userLikes?: number | undefined;
473
- id?: string | undefined;
474
623
  }>;
@@ -108,6 +108,19 @@ export declare const userSchema: import("zod").ZodObject<{
108
108
  }>>;
109
109
  platform: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"ios">, import("zod").ZodLiteral<"android">, import("zod").ZodLiteral<"macos">, import("zod").ZodLiteral<"windows">, import("zod").ZodLiteral<"web">]>>;
110
110
  selectedTeamsPerLeague: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">>>;
111
+ notificationSettings: import("zod").ZodOptional<import("zod").ZodObject<{
112
+ allGames: import("zod").ZodOptional<import("zod").ZodBoolean>;
113
+ favoriteLeagues: import("zod").ZodOptional<import("zod").ZodBoolean>;
114
+ favoriteTeams: import("zod").ZodOptional<import("zod").ZodBoolean>;
115
+ }, "strip", import("zod").ZodTypeAny, {
116
+ allGames?: boolean | undefined;
117
+ favoriteLeagues?: boolean | undefined;
118
+ favoriteTeams?: boolean | undefined;
119
+ }, {
120
+ allGames?: boolean | undefined;
121
+ favoriteLeagues?: boolean | undefined;
122
+ favoriteTeams?: boolean | undefined;
123
+ }>>;
111
124
  }, "strip", import("zod").ZodTypeAny, {
112
125
  id: string;
113
126
  email: string;
@@ -121,6 +134,10 @@ export declare const userSchema: import("zod").ZodObject<{
121
134
  }>;
122
135
  askedForPushNotifications: boolean;
123
136
  acceptedPushNotifications: boolean;
137
+ platform?: "ios" | "android" | "macos" | "windows" | "web" | undefined;
138
+ totalRatedGames?: number | undefined;
139
+ commentsLeft?: number | undefined;
140
+ avgRating?: number | undefined;
124
141
  leagues?: {
125
142
  nba: {
126
143
  totalRatedGames: number;
@@ -133,9 +150,6 @@ export declare const userSchema: import("zod").ZodObject<{
133
150
  avgRating: number;
134
151
  };
135
152
  } | undefined;
136
- totalRatedGames?: number | undefined;
137
- commentsLeft?: number | undefined;
138
- avgRating?: number | undefined;
139
153
  isRegistrationComplete?: boolean | undefined;
140
154
  badge?: string | undefined;
141
155
  registrationStep?: number | undefined;
@@ -149,8 +163,12 @@ export declare const userSchema: import("zod").ZodObject<{
149
163
  youtube?: string | undefined;
150
164
  tiktok?: string | undefined;
151
165
  } | undefined;
152
- platform?: "ios" | "android" | "macos" | "windows" | "web" | undefined;
153
166
  selectedTeamsPerLeague?: Record<string, string[]> | undefined;
167
+ notificationSettings?: {
168
+ allGames?: boolean | undefined;
169
+ favoriteLeagues?: boolean | undefined;
170
+ favoriteTeams?: boolean | undefined;
171
+ } | undefined;
154
172
  }, {
155
173
  id: string;
156
174
  email: string;
@@ -164,6 +182,10 @@ export declare const userSchema: import("zod").ZodObject<{
164
182
  }>;
165
183
  askedForPushNotifications: boolean;
166
184
  acceptedPushNotifications: boolean;
185
+ platform?: "ios" | "android" | "macos" | "windows" | "web" | undefined;
186
+ totalRatedGames?: number | undefined;
187
+ commentsLeft?: number | undefined;
188
+ avgRating?: number | undefined;
167
189
  leagues?: {
168
190
  nba: {
169
191
  totalRatedGames: number;
@@ -176,9 +198,6 @@ export declare const userSchema: import("zod").ZodObject<{
176
198
  avgRating: number;
177
199
  };
178
200
  } | undefined;
179
- totalRatedGames?: number | undefined;
180
- commentsLeft?: number | undefined;
181
- avgRating?: number | undefined;
182
201
  isRegistrationComplete?: boolean | undefined;
183
202
  badge?: string | undefined;
184
203
  registrationStep?: number | undefined;
@@ -192,8 +211,12 @@ export declare const userSchema: import("zod").ZodObject<{
192
211
  youtube?: string | undefined;
193
212
  tiktok?: string | undefined;
194
213
  } | undefined;
195
- platform?: "ios" | "android" | "macos" | "windows" | "web" | undefined;
196
214
  selectedTeamsPerLeague?: Record<string, string[]> | undefined;
215
+ notificationSettings?: {
216
+ allGames?: boolean | undefined;
217
+ favoriteLeagues?: boolean | undefined;
218
+ favoriteTeams?: boolean | undefined;
219
+ } | undefined;
197
220
  }>;
198
221
  export declare const createUserSchema: import("zod").ZodObject<Omit<{
199
222
  id: import("zod").ZodString;
@@ -292,6 +315,19 @@ export declare const createUserSchema: import("zod").ZodObject<Omit<{
292
315
  }>>;
293
316
  platform: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"ios">, import("zod").ZodLiteral<"android">, import("zod").ZodLiteral<"macos">, import("zod").ZodLiteral<"windows">, import("zod").ZodLiteral<"web">]>>;
294
317
  selectedTeamsPerLeague: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">>>;
318
+ notificationSettings: import("zod").ZodOptional<import("zod").ZodObject<{
319
+ allGames: import("zod").ZodOptional<import("zod").ZodBoolean>;
320
+ favoriteLeagues: import("zod").ZodOptional<import("zod").ZodBoolean>;
321
+ favoriteTeams: import("zod").ZodOptional<import("zod").ZodBoolean>;
322
+ }, "strip", import("zod").ZodTypeAny, {
323
+ allGames?: boolean | undefined;
324
+ favoriteLeagues?: boolean | undefined;
325
+ favoriteTeams?: boolean | undefined;
326
+ }, {
327
+ allGames?: boolean | undefined;
328
+ favoriteLeagues?: boolean | undefined;
329
+ favoriteTeams?: boolean | undefined;
330
+ }>>;
295
331
  }, "id" | "totalRatedGames" | "avgRating" | "createdAt" | "updatedAt" | "deviceTokens" | "askedForPushNotifications" | "acceptedPushNotifications">, "strip", import("zod").ZodTypeAny, {
296
332
  email: string;
297
333
  username: string;
@@ -324,6 +360,11 @@ export declare const createUserSchema: import("zod").ZodObject<Omit<{
324
360
  tiktok?: string | undefined;
325
361
  } | undefined;
326
362
  selectedTeamsPerLeague?: Record<string, string[]> | undefined;
363
+ notificationSettings?: {
364
+ allGames?: boolean | undefined;
365
+ favoriteLeagues?: boolean | undefined;
366
+ favoriteTeams?: boolean | undefined;
367
+ } | undefined;
327
368
  }, {
328
369
  email: string;
329
370
  username: string;
@@ -356,4 +397,9 @@ export declare const createUserSchema: import("zod").ZodObject<Omit<{
356
397
  tiktok?: string | undefined;
357
398
  } | undefined;
358
399
  selectedTeamsPerLeague?: Record<string, string[]> | undefined;
400
+ notificationSettings?: {
401
+ allGames?: boolean | undefined;
402
+ favoriteLeagues?: boolean | undefined;
403
+ favoriteTeams?: boolean | undefined;
404
+ } | undefined;
359
405
  }>;
@@ -48,6 +48,11 @@ exports.userSchema = (0, zod_1.object)({
48
48
  (0, zod_1.literal)("web"),
49
49
  ]).optional(),
50
50
  selectedTeamsPerLeague: (0, zod_1.record)((0, zod_1.array)((0, zod_1.string)())).optional(),
51
+ notificationSettings: (0, zod_1.object)({
52
+ allGames: (0, zod_1.boolean)().optional(),
53
+ favoriteLeagues: (0, zod_1.boolean)().optional(),
54
+ favoriteTeams: (0, zod_1.boolean)().optional(),
55
+ }).optional(),
51
56
  });
52
57
  exports.createUserSchema = exports.userSchema.omit({
53
58
  id: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rategame-shared",
3
- "version": "1.0.91",
3
+ "version": "1.0.93",
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",