@zyacreatives/shared 2.1.58 → 2.1.60

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.
@@ -17,7 +17,8 @@ export declare const CommentEntitySchema: z.ZodObject<{
17
17
  commenterImageUrl: z.ZodOptional<z.ZodString>;
18
18
  replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
19
19
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
20
- isLiked: z.ZodBoolean;
20
+ isLiked: z.ZodDefault<z.ZodBoolean>;
21
+ likesCount: z.ZodDefault<z.ZodInt>;
21
22
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
22
23
  }, z.core.$strip>;
23
24
  export declare const CommentInputSchema: z.ZodObject<{
@@ -46,6 +47,7 @@ export declare const CommentOutputSchema: z.ZodObject<{
46
47
  commenterImageUrl: z.ZodOptional<z.ZodString>;
47
48
  replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
48
49
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
49
- isLiked: z.ZodBoolean;
50
+ isLiked: z.ZodDefault<z.ZodBoolean>;
51
+ likesCount: z.ZodDefault<z.ZodInt>;
50
52
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
51
53
  }, z.core.$strip>;
@@ -39,7 +39,8 @@ exports.CommentEntitySchema = zod_1.default.object({
39
39
  example: "2023-10-27T10:00:00.000Z",
40
40
  format: "date-time",
41
41
  }),
42
- isLiked: zod_1.default.boolean(),
42
+ isLiked: zod_1.default.boolean().default(false),
43
+ likesCount: zod_1.default.int().default(0),
43
44
  updatedAt: zod_1.default.coerce.date().optional().openapi({
44
45
  description: "The date and time the comment was last updated.",
45
46
  example: "2023-10-27T10:05:00.000Z",
@@ -320,8 +320,9 @@ export declare const PostWithCommentsEntitySchema: z.ZodObject<{
320
320
  commenterImageUrl: z.ZodOptional<z.ZodString>;
321
321
  replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
322
322
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
323
- updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
324
323
  isLiked: z.ZodDefault<z.ZodBoolean>;
324
+ likesCount: z.ZodDefault<z.ZodInt>;
325
+ updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
325
326
  }, z.core.$strip>>;
326
327
  }, z.core.$strip>;
327
328
  export declare const PostWithBookmarksEntitySchema: z.ZodObject<{
@@ -158,9 +158,7 @@ exports.GetPostWithLikesOutputSchema = exports.PostWithLikesEntitySchema.extend(
158
158
  totalNo: zod_openapi_1.z.number().int(),
159
159
  });
160
160
  exports.PostWithCommentsEntitySchema = exports.MinimalPostSchema.extend({
161
- comments: zod_openapi_1.z.array(comment_1.CommentEntitySchema.extend({
162
- isLiked: zod_openapi_1.z.boolean().default(false),
163
- })),
161
+ comments: zod_openapi_1.z.array(comment_1.CommentEntitySchema),
164
162
  }).openapi({
165
163
  title: "PostWithPostCommentsEntity",
166
164
  });
@@ -382,7 +382,8 @@ export declare const ProjectWithProjectCommentsEntitySchema: z.ZodObject<{
382
382
  commenterImageUrl: z.ZodOptional<z.ZodString>;
383
383
  replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
384
384
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
385
- isLiked: z.ZodBoolean;
385
+ isLiked: z.ZodDefault<z.ZodBoolean>;
386
+ likesCount: z.ZodDefault<z.ZodInt>;
386
387
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
387
388
  }, z.core.$strip>>;
388
389
  }, z.core.$strip>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.1.58",
3
+ "version": "2.1.60",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -36,7 +36,8 @@ export const CommentEntitySchema = z.object({
36
36
  example: "2023-10-27T10:00:00.000Z",
37
37
  format: "date-time",
38
38
  }),
39
- isLiked: z.boolean(),
39
+ isLiked: z.boolean().default(false),
40
+ likesCount: z.int().default(0),
40
41
  updatedAt: z.coerce.date().optional().openapi({
41
42
  description: "The date and time the comment was last updated.",
42
43
  example: "2023-10-27T10:05:00.000Z",
@@ -182,9 +182,7 @@ export const GetPostWithLikesOutputSchema = PostWithLikesEntitySchema.extend({
182
182
 
183
183
  export const PostWithCommentsEntitySchema = MinimalPostSchema.extend({
184
184
  comments: z.array(
185
- CommentEntitySchema.extend({
186
- isLiked: z.boolean().default(false),
187
- })
185
+ CommentEntitySchema
188
186
  ),
189
187
  }).openapi({
190
188
  title: "PostWithPostCommentsEntity",