@zyacreatives/shared 2.1.95 → 2.1.97
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.
|
@@ -3,6 +3,7 @@ export declare const CommentEntitySchema: z.ZodObject<{
|
|
|
3
3
|
id: z.ZodCUID2;
|
|
4
4
|
userId: z.ZodCUID2;
|
|
5
5
|
parentId: z.ZodCUID2;
|
|
6
|
+
parentCommentId: z.ZodOptional<z.ZodCUID2>;
|
|
6
7
|
parentType: z.ZodEnum<{
|
|
7
8
|
readonly PROJECT: "PROJECT";
|
|
8
9
|
readonly USER: "USER";
|
|
@@ -19,6 +20,7 @@ export declare const CommentEntitySchema: z.ZodObject<{
|
|
|
19
20
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
20
21
|
isLiked: z.ZodDefault<z.ZodBoolean>;
|
|
21
22
|
likesCount: z.ZodDefault<z.ZodInt>;
|
|
23
|
+
hasReplies: z.ZodOptional<z.ZodBoolean>;
|
|
22
24
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
23
25
|
}, z.core.$strip>;
|
|
24
26
|
export declare const CommentInputSchema: z.ZodObject<{
|
|
@@ -33,6 +35,7 @@ export declare const CommentOutputSchema: z.ZodObject<{
|
|
|
33
35
|
id: z.ZodCUID2;
|
|
34
36
|
userId: z.ZodCUID2;
|
|
35
37
|
parentId: z.ZodCUID2;
|
|
38
|
+
parentCommentId: z.ZodOptional<z.ZodCUID2>;
|
|
36
39
|
parentType: z.ZodEnum<{
|
|
37
40
|
readonly PROJECT: "PROJECT";
|
|
38
41
|
readonly USER: "USER";
|
|
@@ -49,5 +52,6 @@ export declare const CommentOutputSchema: z.ZodObject<{
|
|
|
49
52
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
50
53
|
isLiked: z.ZodDefault<z.ZodBoolean>;
|
|
51
54
|
likesCount: z.ZodDefault<z.ZodInt>;
|
|
55
|
+
hasReplies: z.ZodOptional<z.ZodBoolean>;
|
|
52
56
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
53
57
|
}, z.core.$strip>;
|
package/dist/schemas/comment.js
CHANGED
|
@@ -19,6 +19,7 @@ exports.CommentEntitySchema = zod_1.default.object({
|
|
|
19
19
|
description: "The CUID2 of the parent entity (e.g., a post or project) this comment belongs to.",
|
|
20
20
|
example: "clq9p8f2z0000c762s7k4g1b",
|
|
21
21
|
}),
|
|
22
|
+
parentCommentId: zod_1.default.cuid2().optional(),
|
|
22
23
|
parentType: zod_1.default.enum(constants_1.ACTIVITY_PARENT_TYPES).openapi({
|
|
23
24
|
description: "The type of the parent entity this comment is attached to.",
|
|
24
25
|
example: "POST", // Assuming 'POST' is a value in ACTIVITY_PARENT_TYPES
|
|
@@ -41,6 +42,7 @@ exports.CommentEntitySchema = zod_1.default.object({
|
|
|
41
42
|
}),
|
|
42
43
|
isLiked: zod_1.default.boolean().default(false),
|
|
43
44
|
likesCount: zod_1.default.int().default(0),
|
|
45
|
+
hasReplies: zod_1.default.boolean().optional(),
|
|
44
46
|
updatedAt: zod_1.default.coerce.date().optional().openapi({
|
|
45
47
|
description: "The date and time the comment was last updated.",
|
|
46
48
|
example: "2023-10-27T10:05:00.000Z",
|
package/dist/schemas/post.d.ts
CHANGED
|
@@ -310,6 +310,7 @@ export declare const PostWithCommentsEntitySchema: z.ZodObject<{
|
|
|
310
310
|
id: z.ZodCUID2;
|
|
311
311
|
userId: z.ZodCUID2;
|
|
312
312
|
parentId: z.ZodCUID2;
|
|
313
|
+
parentCommentId: z.ZodOptional<z.ZodCUID2>;
|
|
313
314
|
parentType: z.ZodEnum<{
|
|
314
315
|
readonly PROJECT: "PROJECT";
|
|
315
316
|
readonly USER: "USER";
|
|
@@ -326,6 +327,7 @@ export declare const PostWithCommentsEntitySchema: z.ZodObject<{
|
|
|
326
327
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
327
328
|
isLiked: z.ZodDefault<z.ZodBoolean>;
|
|
328
329
|
likesCount: z.ZodDefault<z.ZodInt>;
|
|
330
|
+
hasReplies: z.ZodOptional<z.ZodBoolean>;
|
|
329
331
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
330
332
|
}, z.core.$strip>>;
|
|
331
333
|
}, z.core.$strip>;
|
|
@@ -337,6 +339,7 @@ export declare const GetPostWithCommentsOutputSchema: z.ZodObject<{
|
|
|
337
339
|
id: z.ZodCUID2;
|
|
338
340
|
userId: z.ZodCUID2;
|
|
339
341
|
parentId: z.ZodCUID2;
|
|
342
|
+
parentCommentId: z.ZodOptional<z.ZodCUID2>;
|
|
340
343
|
parentType: z.ZodEnum<{
|
|
341
344
|
readonly PROJECT: "PROJECT";
|
|
342
345
|
readonly USER: "USER";
|
|
@@ -353,6 +356,7 @@ export declare const GetPostWithCommentsOutputSchema: z.ZodObject<{
|
|
|
353
356
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
354
357
|
isLiked: z.ZodDefault<z.ZodBoolean>;
|
|
355
358
|
likesCount: z.ZodDefault<z.ZodInt>;
|
|
359
|
+
hasReplies: z.ZodOptional<z.ZodBoolean>;
|
|
356
360
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
357
361
|
}, z.core.$strip>>;
|
|
358
362
|
nextCursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -375,6 +375,7 @@ export declare const ProjectWithProjectCommentsEntitySchema: z.ZodObject<{
|
|
|
375
375
|
id: z.ZodCUID2;
|
|
376
376
|
userId: z.ZodCUID2;
|
|
377
377
|
parentId: z.ZodCUID2;
|
|
378
|
+
parentCommentId: z.ZodOptional<z.ZodCUID2>;
|
|
378
379
|
parentType: z.ZodEnum<{
|
|
379
380
|
readonly PROJECT: "PROJECT";
|
|
380
381
|
readonly USER: "USER";
|
|
@@ -391,6 +392,7 @@ export declare const ProjectWithProjectCommentsEntitySchema: z.ZodObject<{
|
|
|
391
392
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
392
393
|
isLiked: z.ZodDefault<z.ZodBoolean>;
|
|
393
394
|
likesCount: z.ZodDefault<z.ZodInt>;
|
|
395
|
+
hasReplies: z.ZodOptional<z.ZodBoolean>;
|
|
394
396
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
395
397
|
}, z.core.$strip>>;
|
|
396
398
|
}, z.core.$strip>;
|
|
@@ -454,6 +456,7 @@ export declare const GetProjectWithCommentsOutputSchema: z.ZodObject<{
|
|
|
454
456
|
id: z.ZodCUID2;
|
|
455
457
|
userId: z.ZodCUID2;
|
|
456
458
|
parentId: z.ZodCUID2;
|
|
459
|
+
parentCommentId: z.ZodOptional<z.ZodCUID2>;
|
|
457
460
|
parentType: z.ZodEnum<{
|
|
458
461
|
readonly PROJECT: "PROJECT";
|
|
459
462
|
readonly USER: "USER";
|
|
@@ -470,6 +473,7 @@ export declare const GetProjectWithCommentsOutputSchema: z.ZodObject<{
|
|
|
470
473
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
471
474
|
isLiked: z.ZodDefault<z.ZodBoolean>;
|
|
472
475
|
likesCount: z.ZodDefault<z.ZodInt>;
|
|
476
|
+
hasReplies: z.ZodOptional<z.ZodBoolean>;
|
|
473
477
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
474
478
|
}, z.core.$strip>>;
|
|
475
479
|
nextCursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
package/package.json
CHANGED
package/src/schemas/comment.ts
CHANGED
|
@@ -15,6 +15,7 @@ export const CommentEntitySchema = z.object({
|
|
|
15
15
|
"The CUID2 of the parent entity (e.g., a post or project) this comment belongs to.",
|
|
16
16
|
example: "clq9p8f2z0000c762s7k4g1b",
|
|
17
17
|
}),
|
|
18
|
+
parentCommentId: z.cuid2().optional(),
|
|
18
19
|
parentType: z.enum(ACTIVITY_PARENT_TYPES).openapi({
|
|
19
20
|
description: "The type of the parent entity this comment is attached to.",
|
|
20
21
|
example: "POST", // Assuming 'POST' is a value in ACTIVITY_PARENT_TYPES
|
|
@@ -38,6 +39,7 @@ export const CommentEntitySchema = z.object({
|
|
|
38
39
|
}),
|
|
39
40
|
isLiked: z.boolean().default(false),
|
|
40
41
|
likesCount: z.int().default(0),
|
|
42
|
+
hasReplies: z.boolean().optional(),
|
|
41
43
|
updatedAt: z.coerce.date().optional().openapi({
|
|
42
44
|
description: "The date and time the comment was last updated.",
|
|
43
45
|
example: "2023-10-27T10:05:00.000Z",
|