rategame-shared 1.1.264 → 1.1.265

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.
@@ -1,4 +1,29 @@
1
1
  import { z } from "zod";
2
+ export declare const stadiumRatingAggregateSchema: z.ZodObject<{
3
+ avg: z.ZodNumber;
4
+ votes: z.ZodObject<{
5
+ options: z.ZodRecord<z.ZodNumber, z.ZodNumber>;
6
+ total: z.ZodNumber;
7
+ }, "strip", z.ZodTypeAny, {
8
+ total: number;
9
+ options: Record<number, number>;
10
+ }, {
11
+ total: number;
12
+ options: Record<number, number>;
13
+ }>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ avg: number;
16
+ votes: {
17
+ total: number;
18
+ options: Record<number, number>;
19
+ };
20
+ }, {
21
+ avg: number;
22
+ votes: {
23
+ total: number;
24
+ options: Record<number, number>;
25
+ };
26
+ }>;
2
27
  export declare const stadiumSchema: z.ZodObject<{
3
28
  id: z.ZodOptional<z.ZodString>;
4
29
  venueName: z.ZodString;
@@ -33,6 +58,31 @@ export declare const stadiumSchema: z.ZodObject<{
33
58
  }>, "many">;
34
59
  teamIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
35
60
  teamLeagues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
61
+ rating: z.ZodOptional<z.ZodObject<{
62
+ avg: z.ZodNumber;
63
+ votes: z.ZodObject<{
64
+ options: z.ZodRecord<z.ZodNumber, z.ZodNumber>;
65
+ total: z.ZodNumber;
66
+ }, "strip", z.ZodTypeAny, {
67
+ total: number;
68
+ options: Record<number, number>;
69
+ }, {
70
+ total: number;
71
+ options: Record<number, number>;
72
+ }>;
73
+ }, "strip", z.ZodTypeAny, {
74
+ avg: number;
75
+ votes: {
76
+ total: number;
77
+ options: Record<number, number>;
78
+ };
79
+ }, {
80
+ avg: number;
81
+ votes: {
82
+ total: number;
83
+ options: Record<number, number>;
84
+ };
85
+ }>>;
36
86
  }, "strip", z.ZodTypeAny, {
37
87
  city: string;
38
88
  venueName: string;
@@ -47,6 +97,13 @@ export declare const stadiumSchema: z.ZodObject<{
47
97
  city?: string | undefined;
48
98
  }[];
49
99
  id?: string | undefined;
100
+ rating?: {
101
+ avg: number;
102
+ votes: {
103
+ total: number;
104
+ options: Record<number, number>;
105
+ };
106
+ } | undefined;
50
107
  teamIds?: string[] | undefined;
51
108
  teamLeagues?: string[] | undefined;
52
109
  }, {
@@ -63,6 +120,13 @@ export declare const stadiumSchema: z.ZodObject<{
63
120
  city?: string | undefined;
64
121
  }[];
65
122
  id?: string | undefined;
123
+ rating?: {
124
+ avg: number;
125
+ votes: {
126
+ total: number;
127
+ options: Record<number, number>;
128
+ };
129
+ } | undefined;
66
130
  teamIds?: string[] | undefined;
67
131
  teamLeagues?: string[] | undefined;
68
132
  }>;
@@ -1039,6 +1103,31 @@ export declare const stadiumRatingSchema: z.ZodObject<{
1039
1103
  }>, "many">;
1040
1104
  teamIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1041
1105
  teamLeagues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1106
+ rating: z.ZodOptional<z.ZodObject<{
1107
+ avg: z.ZodNumber;
1108
+ votes: z.ZodObject<{
1109
+ options: z.ZodRecord<z.ZodNumber, z.ZodNumber>;
1110
+ total: z.ZodNumber;
1111
+ }, "strip", z.ZodTypeAny, {
1112
+ total: number;
1113
+ options: Record<number, number>;
1114
+ }, {
1115
+ total: number;
1116
+ options: Record<number, number>;
1117
+ }>;
1118
+ }, "strip", z.ZodTypeAny, {
1119
+ avg: number;
1120
+ votes: {
1121
+ total: number;
1122
+ options: Record<number, number>;
1123
+ };
1124
+ }, {
1125
+ avg: number;
1126
+ votes: {
1127
+ total: number;
1128
+ options: Record<number, number>;
1129
+ };
1130
+ }>>;
1042
1131
  }, "strip", z.ZodTypeAny, {
1043
1132
  city: string;
1044
1133
  venueName: string;
@@ -1053,6 +1142,13 @@ export declare const stadiumRatingSchema: z.ZodObject<{
1053
1142
  city?: string | undefined;
1054
1143
  }[];
1055
1144
  id?: string | undefined;
1145
+ rating?: {
1146
+ avg: number;
1147
+ votes: {
1148
+ total: number;
1149
+ options: Record<number, number>;
1150
+ };
1151
+ } | undefined;
1056
1152
  teamIds?: string[] | undefined;
1057
1153
  teamLeagues?: string[] | undefined;
1058
1154
  }, {
@@ -1069,6 +1165,13 @@ export declare const stadiumRatingSchema: z.ZodObject<{
1069
1165
  city?: string | undefined;
1070
1166
  }[];
1071
1167
  id?: string | undefined;
1168
+ rating?: {
1169
+ avg: number;
1170
+ votes: {
1171
+ total: number;
1172
+ options: Record<number, number>;
1173
+ };
1174
+ } | undefined;
1072
1175
  teamIds?: string[] | undefined;
1073
1176
  teamLeagues?: string[] | undefined;
1074
1177
  }>;
@@ -1303,6 +1406,13 @@ export declare const stadiumRatingSchema: z.ZodObject<{
1303
1406
  city?: string | undefined;
1304
1407
  }[];
1305
1408
  id?: string | undefined;
1409
+ rating?: {
1410
+ avg: number;
1411
+ votes: {
1412
+ total: number;
1413
+ options: Record<number, number>;
1414
+ };
1415
+ } | undefined;
1306
1416
  teamIds?: string[] | undefined;
1307
1417
  teamLeagues?: string[] | undefined;
1308
1418
  };
@@ -1383,6 +1493,13 @@ export declare const stadiumRatingSchema: z.ZodObject<{
1383
1493
  city?: string | undefined;
1384
1494
  }[];
1385
1495
  id?: string | undefined;
1496
+ rating?: {
1497
+ avg: number;
1498
+ votes: {
1499
+ total: number;
1500
+ options: Record<number, number>;
1501
+ };
1502
+ } | undefined;
1386
1503
  teamIds?: string[] | undefined;
1387
1504
  teamLeagues?: string[] | undefined;
1388
1505
  };
@@ -2433,6 +2550,31 @@ export declare const createStadiumRatingSchema: z.ZodObject<Omit<{
2433
2550
  }>, "many">;
2434
2551
  teamIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2435
2552
  teamLeagues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2553
+ rating: z.ZodOptional<z.ZodObject<{
2554
+ avg: z.ZodNumber;
2555
+ votes: z.ZodObject<{
2556
+ options: z.ZodRecord<z.ZodNumber, z.ZodNumber>;
2557
+ total: z.ZodNumber;
2558
+ }, "strip", z.ZodTypeAny, {
2559
+ total: number;
2560
+ options: Record<number, number>;
2561
+ }, {
2562
+ total: number;
2563
+ options: Record<number, number>;
2564
+ }>;
2565
+ }, "strip", z.ZodTypeAny, {
2566
+ avg: number;
2567
+ votes: {
2568
+ total: number;
2569
+ options: Record<number, number>;
2570
+ };
2571
+ }, {
2572
+ avg: number;
2573
+ votes: {
2574
+ total: number;
2575
+ options: Record<number, number>;
2576
+ };
2577
+ }>>;
2436
2578
  }, "strip", z.ZodTypeAny, {
2437
2579
  city: string;
2438
2580
  venueName: string;
@@ -2447,6 +2589,13 @@ export declare const createStadiumRatingSchema: z.ZodObject<Omit<{
2447
2589
  city?: string | undefined;
2448
2590
  }[];
2449
2591
  id?: string | undefined;
2592
+ rating?: {
2593
+ avg: number;
2594
+ votes: {
2595
+ total: number;
2596
+ options: Record<number, number>;
2597
+ };
2598
+ } | undefined;
2450
2599
  teamIds?: string[] | undefined;
2451
2600
  teamLeagues?: string[] | undefined;
2452
2601
  }, {
@@ -2463,6 +2612,13 @@ export declare const createStadiumRatingSchema: z.ZodObject<Omit<{
2463
2612
  city?: string | undefined;
2464
2613
  }[];
2465
2614
  id?: string | undefined;
2615
+ rating?: {
2616
+ avg: number;
2617
+ votes: {
2618
+ total: number;
2619
+ options: Record<number, number>;
2620
+ };
2621
+ } | undefined;
2466
2622
  teamIds?: string[] | undefined;
2467
2623
  teamLeagues?: string[] | undefined;
2468
2624
  }>;
@@ -2671,8 +2827,9 @@ export declare const createStadiumRatingSchema: z.ZodObject<Omit<{
2671
2827
  updatedAt: z.ZodOptional<z.ZodNumber>;
2672
2828
  edited: z.ZodOptional<z.ZodBoolean>;
2673
2829
  userLocation: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2674
- }, "id" | "createdAt">, "strip", z.ZodTypeAny, {
2830
+ }, "createdAt">, "strip", z.ZodTypeAny, {
2675
2831
  type: "stadium" | "game";
2832
+ id: string;
2676
2833
  user: {
2677
2834
  id: string;
2678
2835
  email: string;
@@ -2695,6 +2852,13 @@ export declare const createStadiumRatingSchema: z.ZodObject<Omit<{
2695
2852
  city?: string | undefined;
2696
2853
  }[];
2697
2854
  id?: string | undefined;
2855
+ rating?: {
2856
+ avg: number;
2857
+ votes: {
2858
+ total: number;
2859
+ options: Record<number, number>;
2860
+ };
2861
+ } | undefined;
2698
2862
  teamIds?: string[] | undefined;
2699
2863
  teamLeagues?: string[] | undefined;
2700
2864
  };
@@ -2751,6 +2915,7 @@ export declare const createStadiumRatingSchema: z.ZodObject<Omit<{
2751
2915
  gamesAttended?: number | undefined;
2752
2916
  }, {
2753
2917
  type: "stadium" | "game";
2918
+ id: string;
2754
2919
  user: {
2755
2920
  id: string;
2756
2921
  email: string;
@@ -2773,6 +2938,13 @@ export declare const createStadiumRatingSchema: z.ZodObject<Omit<{
2773
2938
  city?: string | undefined;
2774
2939
  }[];
2775
2940
  id?: string | undefined;
2941
+ rating?: {
2942
+ avg: number;
2943
+ votes: {
2944
+ total: number;
2945
+ options: Record<number, number>;
2946
+ };
2947
+ } | undefined;
2776
2948
  teamIds?: string[] | undefined;
2777
2949
  teamLeagues?: string[] | undefined;
2778
2950
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createStadiumRatingSchema = exports.searchStadiumRatingSchema = exports.stadiumRatingSchema = exports.stadiumSchema = void 0;
3
+ exports.createStadiumRatingSchema = exports.searchStadiumRatingSchema = exports.stadiumRatingSchema = exports.stadiumSchema = exports.stadiumRatingAggregateSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const sharedTypes_1 = require("./sharedTypes");
6
6
  const user_1 = require("./user");
@@ -16,6 +16,13 @@ const reducedTeamSchema = zod_1.z.object({
16
16
  city: zod_1.z.string().optional(),
17
17
  stadiumUrl: zod_1.z.string().optional(),
18
18
  });
19
+ exports.stadiumRatingAggregateSchema = zod_1.z.object({
20
+ avg: zod_1.z.number(),
21
+ votes: zod_1.z.object({
22
+ options: zod_1.z.record(zod_1.z.number(), zod_1.z.number()),
23
+ total: zod_1.z.number(),
24
+ }),
25
+ });
19
26
  const reducedGameSchema = zod_1.z.object({
20
27
  id: zod_1.z.string().optional(),
21
28
  round: zod_1.z.number().optional(),
@@ -35,6 +42,7 @@ exports.stadiumSchema = zod_1.z.object({
35
42
  teams: zod_1.z.array(reducedTeamSchema),
36
43
  teamIds: zod_1.z.array(zod_1.z.string()).optional(),
37
44
  teamLeagues: zod_1.z.array(zod_1.z.string()).optional(),
45
+ rating: exports.stadiumRatingAggregateSchema.optional(),
38
46
  });
39
47
  exports.stadiumRatingSchema = zod_1.z.object({
40
48
  id: zod_1.z.string(),
@@ -60,6 +68,5 @@ exports.searchStadiumRatingSchema = zod_1.z.object({
60
68
  username: zod_1.z.string().optional(),
61
69
  });
62
70
  exports.createStadiumRatingSchema = exports.stadiumRatingSchema.omit({
63
- id: true,
64
71
  createdAt: true,
65
72
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rategame-shared",
3
- "version": "1.1.264",
3
+ "version": "1.1.265",
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",