rategame-shared 1.0.31 → 1.0.32
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.
package/dist/models/rating.d.ts
CHANGED
|
@@ -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>;
|
package/dist/schemas/rating.d.ts
CHANGED
|
@@ -235,6 +235,26 @@ export declare const ratingLikeSchema: import("zod").ZodObject<{
|
|
|
235
235
|
};
|
|
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>;
|
package/dist/schemas/rating.js
CHANGED
|
@@ -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)({
|
|
@@ -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,
|