rategame-shared 1.0.31 → 1.0.33

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
- import { createRatingSchema, ratingLikeSchema, ratingSchema, searchRatingSchema } from "../schemas/rating";
2
+ import { createAgreeRatingSchema, createRatingSchema, ratingLikeSchema, ratingSchema, searchRatingSchema } 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
+ export type CreateAgreeRating = z.infer<typeof createAgreeRatingSchema>;
@@ -203,7 +203,7 @@ export declare const searchRatingSchema: import("zod").ZodObject<{
203
203
  offset?: number | undefined;
204
204
  }>;
205
205
  export declare const ratingLikeSchema: import("zod").ZodObject<{
206
- id: import("zod").ZodString;
206
+ ratingId: import("zod").ZodString;
207
207
  user: import("zod").ZodObject<{
208
208
  id: import("zod").ZodString;
209
209
  username: import("zod").ZodString;
@@ -219,22 +219,42 @@ export declare const ratingLikeSchema: import("zod").ZodObject<{
219
219
  }>;
220
220
  likedAt: import("zod").ZodNumber;
221
221
  }, "strip", import("zod").ZodTypeAny, {
222
- id: string;
223
222
  user: {
224
223
  id: string;
225
224
  email: string;
226
225
  username: string;
227
226
  };
227
+ ratingId: string;
228
228
  likedAt: number;
229
229
  }, {
230
- id: string;
231
230
  user: {
232
231
  id: string;
233
232
  email: string;
234
233
  username: string;
235
234
  };
235
+ ratingId: string;
236
236
  likedAt: number;
237
237
  }>;
238
+ export declare const createAgreeRatingSchema: import("zod").ZodObject<{
239
+ agree: import("zod").ZodBoolean;
240
+ user: import("zod").ZodObject<{
241
+ id: import("zod").ZodString;
242
+ }, "strip", import("zod").ZodTypeAny, {
243
+ id: string;
244
+ }, {
245
+ id: string;
246
+ }>;
247
+ }, "strip", import("zod").ZodTypeAny, {
248
+ user: {
249
+ id: string;
250
+ };
251
+ agree: boolean;
252
+ }, {
253
+ user: {
254
+ id: string;
255
+ };
256
+ agree: boolean;
257
+ }>;
238
258
  export declare const createRatingSchema: import("zod").ZodObject<{
239
259
  rating: import("zod").ZodNumber;
240
260
  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.ratingLikeSchema = exports.searchRatingSchema = exports.ratingSchema = void 0;
3
+ 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
  exports.ratingSchema = (0, zod_1.object)({
@@ -39,7 +39,7 @@ exports.searchRatingSchema = (0, zod_1.object)({
39
39
  offset: (0, zod_1.number)().optional(),
40
40
  });
41
41
  exports.ratingLikeSchema = (0, zod_1.object)({
42
- id: (0, zod_1.string)(),
42
+ ratingId: (0, zod_1.string)(),
43
43
  user: (0, zod_1.object)({
44
44
  id: (0, zod_1.string)(),
45
45
  username: (0, zod_1.string)(),
@@ -47,6 +47,12 @@ exports.ratingLikeSchema = (0, zod_1.object)({
47
47
  }),
48
48
  likedAt: (0, zod_1.number)(),
49
49
  });
50
+ exports.createAgreeRatingSchema = (0, zod_1.object)({
51
+ agree: (0, zod_1.boolean)(),
52
+ user: (0, zod_1.object)({
53
+ id: (0, zod_1.string)(),
54
+ }),
55
+ });
50
56
  exports.createRatingSchema = exports.ratingSchema
51
57
  .omit({
52
58
  id: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rategame-shared",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
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",