rategame-shared 1.1.528 → 1.1.529

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,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { listCreateSchema, listSchema, listCommentSchema, listCommentLikeSchema, searchListSchema } from "../schemas/list";
3
3
  export type List = z.infer<typeof listSchema>;
4
+ export type ListItemType = List["type"];
4
5
  export type ListCreate = z.infer<typeof listCreateSchema>;
5
6
  export type ListComment = z.infer<typeof listCommentSchema>;
6
7
  export type ListCommentLike = z.infer<typeof listCommentLikeSchema>;
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ export declare const listItemTypeSchema: z.ZodEnum<["game", "rating", "stadium", "stadium-rating", "player", "team"]>;
2
3
  export declare const listSchema: z.ZodObject<{
3
4
  id: z.ZodString;
4
5
  name: z.ZodString;
@@ -1662,13 +1663,13 @@ export declare const listSchema: z.ZodObject<{
1662
1663
  badge?: string | undefined;
1663
1664
  }>;
1664
1665
  itemIds: z.ZodArray<z.ZodString, "many">;
1665
- type: z.ZodEnum<["game", "rating", "stadium", "stadium-rating", "player"]>;
1666
+ type: z.ZodEnum<["game", "rating", "stadium", "stadium-rating", "player", "team"]>;
1666
1667
  league: z.ZodOptional<z.ZodString>;
1667
1668
  season: z.ZodOptional<z.ZodString>;
1668
1669
  public: z.ZodBoolean;
1669
1670
  likesCount: z.ZodOptional<z.ZodNumber>;
1670
1671
  }, "strip", z.ZodTypeAny, {
1671
- type: "rating" | "stadium" | "game" | "stadium-rating" | "player";
1672
+ type: "rating" | "stadium" | "game" | "team" | "stadium-rating" | "player";
1672
1673
  id: string;
1673
1674
  name: string;
1674
1675
  public: boolean;
@@ -1688,7 +1689,7 @@ export declare const listSchema: z.ZodObject<{
1688
1689
  descriptionLanguage?: string | undefined;
1689
1690
  likesCount?: number | undefined;
1690
1691
  }, {
1691
- type: "rating" | "stadium" | "game" | "stadium-rating" | "player";
1692
+ type: "rating" | "stadium" | "game" | "team" | "stadium-rating" | "player";
1692
1693
  id: string;
1693
1694
  name: string;
1694
1695
  public: boolean;
@@ -3371,13 +3372,13 @@ export declare const listCreateSchema: z.ZodObject<Omit<{
3371
3372
  badge?: string | undefined;
3372
3373
  }>;
3373
3374
  itemIds: z.ZodArray<z.ZodString, "many">;
3374
- type: z.ZodEnum<["game", "rating", "stadium", "stadium-rating", "player"]>;
3375
+ type: z.ZodEnum<["game", "rating", "stadium", "stadium-rating", "player", "team"]>;
3375
3376
  league: z.ZodOptional<z.ZodString>;
3376
3377
  season: z.ZodOptional<z.ZodString>;
3377
3378
  public: z.ZodBoolean;
3378
3379
  likesCount: z.ZodOptional<z.ZodNumber>;
3379
3380
  }, "id" | "createdAt" | "updatedAt">, "strip", z.ZodTypeAny, {
3380
- type: "rating" | "stadium" | "game" | "stadium-rating" | "player";
3381
+ type: "rating" | "stadium" | "game" | "team" | "stadium-rating" | "player";
3381
3382
  name: string;
3382
3383
  public: boolean;
3383
3384
  user: {
@@ -3394,7 +3395,7 @@ export declare const listCreateSchema: z.ZodObject<Omit<{
3394
3395
  descriptionLanguage?: string | undefined;
3395
3396
  likesCount?: number | undefined;
3396
3397
  }, {
3397
- type: "rating" | "stadium" | "game" | "stadium-rating" | "player";
3398
+ type: "rating" | "stadium" | "game" | "team" | "stadium-rating" | "player";
3398
3399
  name: string;
3399
3400
  public: boolean;
3400
3401
  user: {
@@ -8469,13 +8470,13 @@ export declare const searchListSchema: z.ZodObject<{
8469
8470
  limit: z.ZodOptional<z.ZodString>;
8470
8471
  userId: z.ZodOptional<z.ZodString>;
8471
8472
  showPrivate: z.ZodOptional<z.ZodBoolean>;
8472
- type: z.ZodOptional<z.ZodEnum<["game", "rating", "stadium", "stadium-rating", "player"]>>;
8473
+ type: z.ZodOptional<z.ZodEnum<["game", "rating", "stadium", "stadium-rating", "player", "team"]>>;
8473
8474
  profileId: z.ZodOptional<z.ZodString>;
8474
8475
  customDateFrom: z.ZodOptional<z.ZodString>;
8475
8476
  customDateTo: z.ZodOptional<z.ZodString>;
8476
8477
  createdAt: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"16hr">, z.ZodLiteral<"Today">, z.ZodLiteral<"Last 3 Days">, z.ZodLiteral<"This Week">, z.ZodLiteral<"This Season">, z.ZodLiteral<"This Month">, z.ZodLiteral<"This Year">, z.ZodLiteral<"2025">, z.ZodLiteral<"2024">, z.ZodLiteral<"All">, z.ZodLiteral<"All Time">, z.ZodLiteral<"12h">, z.ZodLiteral<"daily">, z.ZodLiteral<"weekly">]>>;
8477
8478
  }, "strip", z.ZodTypeAny, {
8478
- type?: "rating" | "stadium" | "game" | "stadium-rating" | "player" | undefined;
8479
+ type?: "rating" | "stadium" | "game" | "team" | "stadium-rating" | "player" | undefined;
8479
8480
  offset?: string | undefined;
8480
8481
  q?: string | undefined;
8481
8482
  createdAt?: "16hr" | "Today" | "Last 3 Days" | "This Week" | "This Season" | "This Month" | "This Year" | "2025" | "2024" | "All" | "All Time" | "12h" | "daily" | "weekly" | undefined;
@@ -8487,7 +8488,7 @@ export declare const searchListSchema: z.ZodObject<{
8487
8488
  showPrivate?: boolean | undefined;
8488
8489
  profileId?: string | undefined;
8489
8490
  }, {
8490
- type?: "rating" | "stadium" | "game" | "stadium-rating" | "player" | undefined;
8491
+ type?: "rating" | "stadium" | "game" | "team" | "stadium-rating" | "player" | undefined;
8491
8492
  offset?: string | undefined;
8492
8493
  q?: string | undefined;
8493
8494
  createdAt?: "16hr" | "Today" | "Last 3 Days" | "This Week" | "This Season" | "This Month" | "This Year" | "2025" | "2024" | "All" | "All Time" | "12h" | "daily" | "weekly" | undefined;
@@ -1,9 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.searchListSchema = exports.listCommentLikeSchema = exports.listCommentSchema = exports.listCreateSchema = exports.listSchema = void 0;
3
+ exports.searchListSchema = exports.listCommentLikeSchema = exports.listCommentSchema = exports.listCreateSchema = exports.listSchema = exports.listItemTypeSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const sharedTypes_1 = require("./sharedTypes");
6
6
  const user_1 = require("./user");
7
+ exports.listItemTypeSchema = zod_1.z.enum([
8
+ "game",
9
+ "rating",
10
+ "stadium",
11
+ "stadium-rating",
12
+ "player",
13
+ "team",
14
+ ]);
7
15
  exports.listSchema = zod_1.z.object({
8
16
  id: zod_1.z.string(),
9
17
  name: zod_1.z.string(),
@@ -13,7 +21,7 @@ exports.listSchema = zod_1.z.object({
13
21
  updatedAt: zod_1.z.number().optional(),
14
22
  user: user_1.reducedUserSchema,
15
23
  itemIds: zod_1.z.array(zod_1.z.string()),
16
- type: zod_1.z.enum(["game", "rating", "stadium", "stadium-rating", "player"]),
24
+ type: exports.listItemTypeSchema,
17
25
  league: zod_1.z.string().optional(),
18
26
  season: zod_1.z.string().optional(),
19
27
  public: zod_1.z.boolean(),
@@ -50,9 +58,7 @@ exports.searchListSchema = zod_1.z.object({
50
58
  limit: zod_1.z.string().optional(),
51
59
  userId: zod_1.z.string().optional(),
52
60
  showPrivate: zod_1.z.boolean().optional(),
53
- type: zod_1.z
54
- .enum(["game", "rating", "stadium", "stadium-rating", "player"])
55
- .optional(),
61
+ type: exports.listItemTypeSchema.optional(),
56
62
  profileId: zod_1.z.string().optional(),
57
63
  customDateFrom: zod_1.z.string().optional(),
58
64
  customDateTo: zod_1.z.string().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rategame-shared",
3
- "version": "1.1.528",
3
+ "version": "1.1.529",
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",