rategame-shared 1.0.30 → 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 +2 -1
- package/dist/schemas/rating.d.ts +48 -0
- package/dist/schemas/rating.js +13 -1
- package/package.json +1 -1
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
|
@@ -6,11 +6,14 @@ export declare const ratingSchema: import("zod").ZodObject<{
|
|
|
6
6
|
user: import("zod").ZodObject<{
|
|
7
7
|
id: import("zod").ZodString;
|
|
8
8
|
username: import("zod").ZodString;
|
|
9
|
+
email: import("zod").ZodString;
|
|
9
10
|
}, "strip", import("zod").ZodTypeAny, {
|
|
10
11
|
id: string;
|
|
12
|
+
email: string;
|
|
11
13
|
username: string;
|
|
12
14
|
}, {
|
|
13
15
|
id: string;
|
|
16
|
+
email: string;
|
|
14
17
|
username: string;
|
|
15
18
|
}>;
|
|
16
19
|
game: import("zod").ZodObject<{
|
|
@@ -113,6 +116,7 @@ export declare const ratingSchema: import("zod").ZodObject<{
|
|
|
113
116
|
id: string;
|
|
114
117
|
user: {
|
|
115
118
|
id: string;
|
|
119
|
+
email: string;
|
|
116
120
|
username: string;
|
|
117
121
|
};
|
|
118
122
|
createdAt: number;
|
|
@@ -144,6 +148,7 @@ export declare const ratingSchema: import("zod").ZodObject<{
|
|
|
144
148
|
id: string;
|
|
145
149
|
user: {
|
|
146
150
|
id: string;
|
|
151
|
+
email: string;
|
|
147
152
|
username: string;
|
|
148
153
|
};
|
|
149
154
|
createdAt: number;
|
|
@@ -199,14 +204,57 @@ export declare const searchRatingSchema: import("zod").ZodObject<{
|
|
|
199
204
|
}>;
|
|
200
205
|
export declare const ratingLikeSchema: import("zod").ZodObject<{
|
|
201
206
|
id: import("zod").ZodString;
|
|
207
|
+
user: import("zod").ZodObject<{
|
|
208
|
+
id: import("zod").ZodString;
|
|
209
|
+
username: import("zod").ZodString;
|
|
210
|
+
email: import("zod").ZodString;
|
|
211
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
212
|
+
id: string;
|
|
213
|
+
email: string;
|
|
214
|
+
username: string;
|
|
215
|
+
}, {
|
|
216
|
+
id: string;
|
|
217
|
+
email: string;
|
|
218
|
+
username: string;
|
|
219
|
+
}>;
|
|
202
220
|
likedAt: import("zod").ZodNumber;
|
|
203
221
|
}, "strip", import("zod").ZodTypeAny, {
|
|
204
222
|
id: string;
|
|
223
|
+
user: {
|
|
224
|
+
id: string;
|
|
225
|
+
email: string;
|
|
226
|
+
username: string;
|
|
227
|
+
};
|
|
205
228
|
likedAt: number;
|
|
206
229
|
}, {
|
|
207
230
|
id: string;
|
|
231
|
+
user: {
|
|
232
|
+
id: string;
|
|
233
|
+
email: string;
|
|
234
|
+
username: string;
|
|
235
|
+
};
|
|
208
236
|
likedAt: number;
|
|
209
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
|
+
}>;
|
|
210
258
|
export declare const createRatingSchema: import("zod").ZodObject<{
|
|
211
259
|
rating: import("zod").ZodNumber;
|
|
212
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)({
|
|
@@ -11,6 +11,7 @@ exports.ratingSchema = (0, zod_1.object)({
|
|
|
11
11
|
user: (0, zod_1.object)({
|
|
12
12
|
id: (0, zod_1.string)(),
|
|
13
13
|
username: (0, zod_1.string)(),
|
|
14
|
+
email: (0, zod_1.string)(),
|
|
14
15
|
}),
|
|
15
16
|
game: (0, zod_1.object)({
|
|
16
17
|
id: (0, zod_1.string)(),
|
|
@@ -39,8 +40,19 @@ exports.searchRatingSchema = (0, zod_1.object)({
|
|
|
39
40
|
});
|
|
40
41
|
exports.ratingLikeSchema = (0, zod_1.object)({
|
|
41
42
|
id: (0, zod_1.string)(),
|
|
43
|
+
user: (0, zod_1.object)({
|
|
44
|
+
id: (0, zod_1.string)(),
|
|
45
|
+
username: (0, zod_1.string)(),
|
|
46
|
+
email: (0, zod_1.string)(),
|
|
47
|
+
}),
|
|
42
48
|
likedAt: (0, zod_1.number)(),
|
|
43
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
|
+
});
|
|
44
56
|
exports.createRatingSchema = exports.ratingSchema
|
|
45
57
|
.omit({
|
|
46
58
|
id: true,
|