rategame-shared 1.1.28 → 1.1.30

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,8 +1,9 @@
1
1
  import { z } from "zod";
2
- import { createAgreeRatingSchema, createRatingSchema, ratingLikeSchema, ratingSchema, searchRatingSchema, threadCommentSchema } from "../schemas/rating";
2
+ import { createAgreeRatingSchema, createRatingSchema, ratingLikeSchema, ratingSchema, searchRatingSchema, threadCommentLikeSchema, threadCommentSchema } from "../schemas/rating";
3
3
  export type Rating = z.infer<typeof ratingSchema>;
4
4
  export type RatingLike = z.infer<typeof ratingLikeSchema>;
5
5
  export type CreateRating = z.infer<typeof createRatingSchema>;
6
6
  export type SearchRating = z.infer<typeof searchRatingSchema>;
7
7
  export type CreateAgreeRating = z.infer<typeof createAgreeRatingSchema>;
8
8
  export type ThreadComment = z.infer<typeof threadCommentSchema>;
9
+ export type ThreadCommentLike = z.infer<typeof threadCommentLikeSchema>;
@@ -762,9 +762,9 @@ export declare const threadCommentSchema: import("zod").ZodObject<{
762
762
  avatarUrl?: string | null | undefined;
763
763
  }>;
764
764
  ratingId: import("zod").ZodString;
765
- parentId: import("zod").ZodString;
765
+ parentId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
766
766
  isReply: import("zod").ZodOptional<import("zod").ZodBoolean>;
767
- replyTo: import("zod").ZodOptional<import("zod").ZodObject<Pick<{
767
+ replyTo: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<Pick<{
768
768
  id: import("zod").ZodString;
769
769
  email: import("zod").ZodString;
770
770
  username: import("zod").ZodString;
@@ -1022,7 +1022,7 @@ export declare const threadCommentSchema: import("zod").ZodObject<{
1022
1022
  email: string;
1023
1023
  username: string;
1024
1024
  avatarUrl?: string | null | undefined;
1025
- }>>;
1025
+ }>>>;
1026
1026
  level: import("zod").ZodNumber;
1027
1027
  }, "strip", import("zod").ZodTypeAny, {
1028
1028
  id: string;
@@ -1035,15 +1035,15 @@ export declare const threadCommentSchema: import("zod").ZodObject<{
1035
1035
  };
1036
1036
  createdAt: number;
1037
1037
  ratingId: string;
1038
- parentId: string;
1039
1038
  level: number;
1039
+ parentId?: string | null | undefined;
1040
1040
  isReply?: boolean | undefined;
1041
1041
  replyTo?: {
1042
1042
  id: string;
1043
1043
  email: string;
1044
1044
  username: string;
1045
1045
  avatarUrl?: string | null | undefined;
1046
- } | undefined;
1046
+ } | null | undefined;
1047
1047
  }, {
1048
1048
  id: string;
1049
1049
  content: string;
@@ -1055,13 +1055,303 @@ export declare const threadCommentSchema: import("zod").ZodObject<{
1055
1055
  };
1056
1056
  createdAt: number;
1057
1057
  ratingId: string;
1058
- parentId: string;
1059
1058
  level: number;
1059
+ parentId?: string | null | undefined;
1060
1060
  isReply?: boolean | undefined;
1061
1061
  replyTo?: {
1062
1062
  id: string;
1063
1063
  email: string;
1064
1064
  username: string;
1065
1065
  avatarUrl?: string | null | undefined;
1066
- } | undefined;
1066
+ } | null | undefined;
1067
+ }>;
1068
+ export declare const threadCommentLikeSchema: import("zod").ZodObject<{
1069
+ id: import("zod").ZodString;
1070
+ user: import("zod").ZodObject<Pick<{
1071
+ id: import("zod").ZodString;
1072
+ email: import("zod").ZodString;
1073
+ username: import("zod").ZodString;
1074
+ avatarUrl: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
1075
+ createdAt: import("zod").ZodNumber;
1076
+ updatedAt: import("zod").ZodNumber;
1077
+ leagues: import("zod").ZodOptional<import("zod").ZodObject<{
1078
+ nba: import("zod").ZodObject<{
1079
+ totalRatedGames: import("zod").ZodNumber;
1080
+ commentsLeft: import("zod").ZodNumber;
1081
+ avgRating: import("zod").ZodNumber;
1082
+ }, "strip", import("zod").ZodTypeAny, {
1083
+ totalRatedGames: number;
1084
+ commentsLeft: number;
1085
+ avgRating: number;
1086
+ }, {
1087
+ totalRatedGames: number;
1088
+ commentsLeft: number;
1089
+ avgRating: number;
1090
+ }>;
1091
+ ncaa: import("zod").ZodObject<{
1092
+ totalRatedGames: import("zod").ZodNumber;
1093
+ commentsLeft: import("zod").ZodNumber;
1094
+ avgRating: import("zod").ZodNumber;
1095
+ }, "strip", import("zod").ZodTypeAny, {
1096
+ totalRatedGames: number;
1097
+ commentsLeft: number;
1098
+ avgRating: number;
1099
+ }, {
1100
+ totalRatedGames: number;
1101
+ commentsLeft: number;
1102
+ avgRating: number;
1103
+ }>;
1104
+ mlb: import("zod").ZodObject<{
1105
+ totalRatedGames: import("zod").ZodNumber;
1106
+ commentsLeft: import("zod").ZodNumber;
1107
+ avgRating: import("zod").ZodNumber;
1108
+ }, "strip", import("zod").ZodTypeAny, {
1109
+ totalRatedGames: number;
1110
+ commentsLeft: number;
1111
+ avgRating: number;
1112
+ }, {
1113
+ totalRatedGames: number;
1114
+ commentsLeft: number;
1115
+ avgRating: number;
1116
+ }>;
1117
+ nfl: import("zod").ZodObject<{
1118
+ totalRatedGames: import("zod").ZodNumber;
1119
+ commentsLeft: import("zod").ZodNumber;
1120
+ avgRating: import("zod").ZodNumber;
1121
+ }, "strip", import("zod").ZodTypeAny, {
1122
+ totalRatedGames: number;
1123
+ commentsLeft: number;
1124
+ avgRating: number;
1125
+ }, {
1126
+ totalRatedGames: number;
1127
+ commentsLeft: number;
1128
+ avgRating: number;
1129
+ }>;
1130
+ nhl: import("zod").ZodObject<{
1131
+ totalRatedGames: import("zod").ZodNumber;
1132
+ commentsLeft: import("zod").ZodNumber;
1133
+ avgRating: import("zod").ZodNumber;
1134
+ }, "strip", import("zod").ZodTypeAny, {
1135
+ totalRatedGames: number;
1136
+ commentsLeft: number;
1137
+ avgRating: number;
1138
+ }, {
1139
+ totalRatedGames: number;
1140
+ commentsLeft: number;
1141
+ avgRating: number;
1142
+ }>;
1143
+ mls: import("zod").ZodObject<{
1144
+ totalRatedGames: import("zod").ZodNumber;
1145
+ commentsLeft: import("zod").ZodNumber;
1146
+ avgRating: import("zod").ZodNumber;
1147
+ }, "strip", import("zod").ZodTypeAny, {
1148
+ totalRatedGames: number;
1149
+ commentsLeft: number;
1150
+ avgRating: number;
1151
+ }, {
1152
+ totalRatedGames: number;
1153
+ commentsLeft: number;
1154
+ avgRating: number;
1155
+ }>;
1156
+ cfb: import("zod").ZodObject<{
1157
+ totalRatedGames: import("zod").ZodNumber;
1158
+ commentsLeft: import("zod").ZodNumber;
1159
+ avgRating: import("zod").ZodNumber;
1160
+ }, "strip", import("zod").ZodTypeAny, {
1161
+ totalRatedGames: number;
1162
+ commentsLeft: number;
1163
+ avgRating: number;
1164
+ }, {
1165
+ totalRatedGames: number;
1166
+ commentsLeft: number;
1167
+ avgRating: number;
1168
+ }>;
1169
+ cbb: import("zod").ZodObject<{
1170
+ totalRatedGames: import("zod").ZodNumber;
1171
+ commentsLeft: import("zod").ZodNumber;
1172
+ avgRating: import("zod").ZodNumber;
1173
+ }, "strip", import("zod").ZodTypeAny, {
1174
+ totalRatedGames: number;
1175
+ commentsLeft: number;
1176
+ avgRating: number;
1177
+ }, {
1178
+ totalRatedGames: number;
1179
+ commentsLeft: number;
1180
+ avgRating: number;
1181
+ }>;
1182
+ }, "strip", import("zod").ZodTypeAny, {
1183
+ nba: {
1184
+ totalRatedGames: number;
1185
+ commentsLeft: number;
1186
+ avgRating: number;
1187
+ };
1188
+ ncaa: {
1189
+ totalRatedGames: number;
1190
+ commentsLeft: number;
1191
+ avgRating: number;
1192
+ };
1193
+ mlb: {
1194
+ totalRatedGames: number;
1195
+ commentsLeft: number;
1196
+ avgRating: number;
1197
+ };
1198
+ nfl: {
1199
+ totalRatedGames: number;
1200
+ commentsLeft: number;
1201
+ avgRating: number;
1202
+ };
1203
+ nhl: {
1204
+ totalRatedGames: number;
1205
+ commentsLeft: number;
1206
+ avgRating: number;
1207
+ };
1208
+ mls: {
1209
+ totalRatedGames: number;
1210
+ commentsLeft: number;
1211
+ avgRating: number;
1212
+ };
1213
+ cfb: {
1214
+ totalRatedGames: number;
1215
+ commentsLeft: number;
1216
+ avgRating: number;
1217
+ };
1218
+ cbb: {
1219
+ totalRatedGames: number;
1220
+ commentsLeft: number;
1221
+ avgRating: number;
1222
+ };
1223
+ }, {
1224
+ nba: {
1225
+ totalRatedGames: number;
1226
+ commentsLeft: number;
1227
+ avgRating: number;
1228
+ };
1229
+ ncaa: {
1230
+ totalRatedGames: number;
1231
+ commentsLeft: number;
1232
+ avgRating: number;
1233
+ };
1234
+ mlb: {
1235
+ totalRatedGames: number;
1236
+ commentsLeft: number;
1237
+ avgRating: number;
1238
+ };
1239
+ nfl: {
1240
+ totalRatedGames: number;
1241
+ commentsLeft: number;
1242
+ avgRating: number;
1243
+ };
1244
+ nhl: {
1245
+ totalRatedGames: number;
1246
+ commentsLeft: number;
1247
+ avgRating: number;
1248
+ };
1249
+ mls: {
1250
+ totalRatedGames: number;
1251
+ commentsLeft: number;
1252
+ avgRating: number;
1253
+ };
1254
+ cfb: {
1255
+ totalRatedGames: number;
1256
+ commentsLeft: number;
1257
+ avgRating: number;
1258
+ };
1259
+ cbb: {
1260
+ totalRatedGames: number;
1261
+ commentsLeft: number;
1262
+ avgRating: number;
1263
+ };
1264
+ }>>;
1265
+ totalRatedGames: import("zod").ZodOptional<import("zod").ZodNumber>;
1266
+ commentsLeft: import("zod").ZodOptional<import("zod").ZodNumber>;
1267
+ avgRating: import("zod").ZodOptional<import("zod").ZodNumber>;
1268
+ isRegistrationComplete: import("zod").ZodOptional<import("zod").ZodBoolean>;
1269
+ deviceTokens: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
1270
+ token: import("zod").ZodString;
1271
+ usedAt: import("zod").ZodNumber;
1272
+ }, "strip", import("zod").ZodTypeAny, {
1273
+ token: string;
1274
+ usedAt: number;
1275
+ }, {
1276
+ token: string;
1277
+ usedAt: number;
1278
+ }>>;
1279
+ askedForPushNotifications: import("zod").ZodBoolean;
1280
+ acceptedPushNotifications: import("zod").ZodBoolean;
1281
+ badge: import("zod").ZodOptional<import("zod").ZodString>;
1282
+ registrationStep: import("zod").ZodOptional<import("zod").ZodNumber>;
1283
+ selectedLeagues: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1284
+ selectedTeams: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
1285
+ lockedGameMessageSeen: import("zod").ZodOptional<import("zod").ZodBoolean>;
1286
+ bio: import("zod").ZodOptional<import("zod").ZodString>;
1287
+ socialLinks: import("zod").ZodOptional<import("zod").ZodObject<{
1288
+ instagram: import("zod").ZodOptional<import("zod").ZodString>;
1289
+ x: import("zod").ZodOptional<import("zod").ZodString>;
1290
+ youtube: import("zod").ZodOptional<import("zod").ZodString>;
1291
+ tiktok: import("zod").ZodOptional<import("zod").ZodString>;
1292
+ }, "strip", import("zod").ZodTypeAny, {
1293
+ instagram?: string | undefined;
1294
+ x?: string | undefined;
1295
+ youtube?: string | undefined;
1296
+ tiktok?: string | undefined;
1297
+ }, {
1298
+ instagram?: string | undefined;
1299
+ x?: string | undefined;
1300
+ youtube?: string | undefined;
1301
+ tiktok?: string | undefined;
1302
+ }>>;
1303
+ 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">]>>;
1304
+ selectedTeamsPerLeague: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">>>;
1305
+ notificationSettings: import("zod").ZodOptional<import("zod").ZodObject<{
1306
+ allGames: import("zod").ZodOptional<import("zod").ZodBoolean>;
1307
+ favoriteLeagues: import("zod").ZodOptional<import("zod").ZodBoolean>;
1308
+ favoriteTeams: import("zod").ZodOptional<import("zod").ZodBoolean>;
1309
+ }, "strip", import("zod").ZodTypeAny, {
1310
+ allGames?: boolean | undefined;
1311
+ favoriteLeagues?: boolean | undefined;
1312
+ favoriteTeams?: boolean | undefined;
1313
+ }, {
1314
+ allGames?: boolean | undefined;
1315
+ favoriteLeagues?: boolean | undefined;
1316
+ favoriteTeams?: boolean | undefined;
1317
+ }>>;
1318
+ }, "id" | "email" | "username" | "avatarUrl">, "strip", import("zod").ZodTypeAny, {
1319
+ id: string;
1320
+ email: string;
1321
+ username: string;
1322
+ avatarUrl?: string | null | undefined;
1323
+ }, {
1324
+ id: string;
1325
+ email: string;
1326
+ username: string;
1327
+ avatarUrl?: string | null | undefined;
1328
+ }>;
1329
+ ratingId: import("zod").ZodString;
1330
+ likedAt: import("zod").ZodNumber;
1331
+ commentId: import("zod").ZodString;
1332
+ commentParentId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
1333
+ }, "strip", import("zod").ZodTypeAny, {
1334
+ id: string;
1335
+ user: {
1336
+ id: string;
1337
+ email: string;
1338
+ username: string;
1339
+ avatarUrl?: string | null | undefined;
1340
+ };
1341
+ ratingId: string;
1342
+ likedAt: number;
1343
+ commentId: string;
1344
+ commentParentId?: string | null | undefined;
1345
+ }, {
1346
+ id: string;
1347
+ user: {
1348
+ id: string;
1349
+ email: string;
1350
+ username: string;
1351
+ avatarUrl?: string | null | undefined;
1352
+ };
1353
+ ratingId: string;
1354
+ likedAt: number;
1355
+ commentId: string;
1356
+ commentParentId?: string | null | undefined;
1067
1357
  }>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.threadCommentSchema = exports.createRatingSchema = exports.createAgreeRatingSchema = exports.ratingLikeSchema = exports.searchRatingSchema = exports.ratingSchema = void 0;
3
+ exports.threadCommentLikeSchema = exports.threadCommentSchema = exports.createRatingSchema = exports.createAgreeRatingSchema = exports.ratingLikeSchema = exports.searchRatingSchema = exports.ratingSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const game_1 = require("./game");
6
6
  const user_1 = require("./user");
@@ -111,8 +111,16 @@ exports.threadCommentSchema = (0, zod_1.object)({
111
111
  content: (0, zod_1.string)(),
112
112
  user: user_1.reducedUserSchema,
113
113
  ratingId: (0, zod_1.string)(),
114
- parentId: (0, zod_1.string)(),
114
+ parentId: (0, zod_1.string)().nullable().optional(),
115
115
  isReply: (0, zod_1.boolean)().optional(),
116
- replyTo: user_1.reducedUserSchema.optional(),
116
+ replyTo: user_1.reducedUserSchema.nullable().optional(),
117
117
  level: (0, zod_1.number)(),
118
118
  });
119
+ exports.threadCommentLikeSchema = (0, zod_1.object)({
120
+ id: (0, zod_1.string)(),
121
+ user: user_1.reducedUserSchema,
122
+ ratingId: (0, zod_1.string)(),
123
+ likedAt: (0, zod_1.number)(),
124
+ commentId: (0, zod_1.string)(),
125
+ commentParentId: (0, zod_1.string)().nullable().optional(),
126
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rategame-shared",
3
- "version": "1.1.28",
3
+ "version": "1.1.30",
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",