rategame-shared 1.0.16 → 1.0.18

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,5 @@
1
1
  import { z } from "zod";
2
- import { createRatingSchema, ratingSchema } from "../schemas/rating";
2
+ import { createRatingSchema, ratingLikeSchema, ratingSchema } from "../schemas/rating";
3
3
  export type Rating = z.infer<typeof ratingSchema>;
4
+ export type RatingLike = z.infer<typeof ratingLikeSchema>;
4
5
  export type CreateRating = z.infer<typeof createRatingSchema>;
@@ -172,6 +172,16 @@ export declare const ratingSchema: import("zod").ZodObject<{
172
172
  };
173
173
  comment?: string | undefined;
174
174
  }>;
175
+ export declare const ratingLikeSchema: import("zod").ZodObject<{
176
+ id: import("zod").ZodString;
177
+ likedAt: import("zod").ZodNumber;
178
+ }, "strip", import("zod").ZodTypeAny, {
179
+ id: string;
180
+ likedAt: number;
181
+ }, {
182
+ id: string;
183
+ likedAt: number;
184
+ }>;
175
185
  export declare const createRatingSchema: import("zod").ZodObject<{
176
186
  rating: import("zod").ZodNumber;
177
187
  comment: import("zod").ZodOptional<import("zod").ZodString>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createRatingSchema = exports.ratingSchema = void 0;
3
+ exports.createRatingSchema = exports.ratingLikeSchema = exports.ratingSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const game_1 = require("./game");
6
6
  exports.ratingSchema = (0, zod_1.object)({
@@ -19,6 +19,10 @@ exports.ratingSchema = (0, zod_1.object)({
19
19
  awayTeam: game_1.gameTeamSchema,
20
20
  }),
21
21
  });
22
+ exports.ratingLikeSchema = (0, zod_1.object)({
23
+ id: (0, zod_1.string)(),
24
+ likedAt: (0, zod_1.number)(),
25
+ });
22
26
  exports.createRatingSchema = exports.ratingSchema
23
27
  .omit({
24
28
  id: true,
@@ -6,6 +6,18 @@ export declare const userSchema: import("zod").ZodObject<{
6
6
  createdAt: import("zod").ZodNumber;
7
7
  updatedAt: import("zod").ZodNumber;
8
8
  isRegistrationComplete: import("zod").ZodOptional<import("zod").ZodBoolean>;
9
+ deviceTokens: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
10
+ token: import("zod").ZodString;
11
+ createdAt: import("zod").ZodNumber;
12
+ }, "strip", import("zod").ZodTypeAny, {
13
+ createdAt: number;
14
+ token: string;
15
+ }, {
16
+ createdAt: number;
17
+ token: string;
18
+ }>>;
19
+ askedForPushNotifications: import("zod").ZodBoolean;
20
+ acceptedPushNotifications: import("zod").ZodBoolean;
9
21
  }, "strip", import("zod").ZodTypeAny, {
10
22
  id: string;
11
23
  email: string;
@@ -13,6 +25,12 @@ export declare const userSchema: import("zod").ZodObject<{
13
25
  avatarUrl: string;
14
26
  createdAt: number;
15
27
  updatedAt: number;
28
+ deviceTokens: Record<string, {
29
+ createdAt: number;
30
+ token: string;
31
+ }>;
32
+ askedForPushNotifications: boolean;
33
+ acceptedPushNotifications: boolean;
16
34
  isRegistrationComplete?: boolean | undefined;
17
35
  }, {
18
36
  id: string;
@@ -21,5 +39,11 @@ export declare const userSchema: import("zod").ZodObject<{
21
39
  avatarUrl: string;
22
40
  createdAt: number;
23
41
  updatedAt: number;
42
+ deviceTokens: Record<string, {
43
+ createdAt: number;
44
+ token: string;
45
+ }>;
46
+ askedForPushNotifications: boolean;
47
+ acceptedPushNotifications: boolean;
24
48
  isRegistrationComplete?: boolean | undefined;
25
49
  }>;
@@ -10,4 +10,10 @@ exports.userSchema = (0, zod_1.object)({
10
10
  createdAt: (0, zod_1.number)(),
11
11
  updatedAt: (0, zod_1.number)(),
12
12
  isRegistrationComplete: (0, zod_1.boolean)().optional(),
13
+ deviceTokens: (0, zod_1.record)((0, zod_1.object)({
14
+ token: (0, zod_1.string)(),
15
+ createdAt: (0, zod_1.number)(),
16
+ })),
17
+ askedForPushNotifications: (0, zod_1.boolean)(),
18
+ acceptedPushNotifications: (0, zod_1.boolean)(),
13
19
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rategame-shared",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
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",