@zyacreatives/shared 1.6.7 → 1.6.9

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.
@@ -8,6 +8,9 @@ export declare const CommentEntitySchema: z.ZodObject<{
8
8
  readonly POST: "POST";
9
9
  }>;
10
10
  content: z.ZodString;
11
+ commenterUsername: z.ZodString;
12
+ commenterName: z.ZodString;
13
+ commenterImageUrl: z.ZodOptional<z.ZodString>;
11
14
  replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
12
15
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
13
16
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -27,6 +27,9 @@ exports.CommentEntitySchema = zod_1.default.object({
27
27
  description: "The text content of the comment. May contain Markdown.",
28
28
  example: "This is a great point! I hadn't considered that perspective.",
29
29
  }),
30
+ commenterUsername: zod_1.default.string(),
31
+ commenterName: zod_1.default.string(),
32
+ commenterImageUrl: zod_1.default.string().optional(),
30
33
  replyToId: zod_1.default.cuid2().optional().nullable().openapi({
31
34
  description: "The ID of the parent comment if this is a reply. Null for top-level comments.",
32
35
  example: "tr4q2k7k0000c7625z2k8ggy", // Example of a parent comment's ID
@@ -40,5 +43,5 @@ exports.CommentEntitySchema = zod_1.default.object({
40
43
  description: "The date and time the comment was last updated.",
41
44
  example: "2023-10-27T10:05:00.000Z",
42
45
  format: "date-time",
43
- })
46
+ }),
44
47
  });
@@ -1,5 +1,6 @@
1
1
  import { z } from "@hono/zod-openapi";
2
2
  export declare const LikeEntitySchema: z.ZodObject<{
3
+ id: z.ZodCUID2;
3
4
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
4
5
  userId: z.ZodCUID2;
5
6
  parentId: z.ZodCUID2;
@@ -4,6 +4,10 @@ exports.LikeEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  exports.LikeEntitySchema = zod_openapi_1.z
6
6
  .object({
7
+ id: zod_openapi_1.z.cuid2().openapi({
8
+ description: "The unique CUID2 identifier for the comment.",
9
+ example: "tr4q2k7k0000c7625z2k8ggy",
10
+ }),
7
11
  createdAt: zod_openapi_1.z.coerce.date().optional().openapi({
8
12
  description: "Timestamp when the like was created.",
9
13
  title: "Created At",
@@ -229,6 +229,9 @@ export declare const CommentOnProjectOutputSchema: z.ZodObject<{
229
229
  readonly POST: "POST";
230
230
  }>;
231
231
  content: z.ZodString;
232
+ commenterUsername: z.ZodString;
233
+ commenterName: z.ZodString;
234
+ commenterImageUrl: z.ZodOptional<z.ZodString>;
232
235
  replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
233
236
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
234
237
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -242,6 +245,9 @@ export declare const DeleteProjectCommentOutputSchema: z.ZodObject<{
242
245
  readonly POST: "POST";
243
246
  }>;
244
247
  content: z.ZodString;
248
+ commenterUsername: z.ZodString;
249
+ commenterName: z.ZodString;
250
+ commenterImageUrl: z.ZodOptional<z.ZodString>;
245
251
  replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
246
252
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
247
253
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -390,6 +396,9 @@ export declare const ProjectWithProjectCommentsEntitySchema: z.ZodObject<{
390
396
  readonly POST: "POST";
391
397
  }>;
392
398
  content: z.ZodString;
399
+ commenterUsername: z.ZodString;
400
+ commenterName: z.ZodString;
401
+ commenterImageUrl: z.ZodOptional<z.ZodString>;
393
402
  replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
394
403
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
395
404
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -404,6 +413,7 @@ export declare const ProjectWithProjectLikesEntitySchema: z.ZodObject<{
404
413
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
405
414
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
406
415
  likes: z.ZodArray<z.ZodObject<{
416
+ id: z.ZodCUID2;
407
417
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
408
418
  userId: z.ZodCUID2;
409
419
  parentId: z.ZodCUID2;
@@ -180,6 +180,7 @@ export declare const UserWithProjectsEntitySchema: z.ZodObject<{
180
180
  export declare const UserWithProjectLikesEntitySchema: z.ZodObject<{
181
181
  userId: z.ZodCUID2;
182
182
  projectLikes: z.ZodArray<z.ZodObject<{
183
+ id: z.ZodCUID2;
183
184
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
184
185
  userId: z.ZodCUID2;
185
186
  parentId: z.ZodCUID2;
@@ -528,6 +529,7 @@ export declare const GetAuthenticatedUserWithUserFollowersOutputSchema: z.ZodObj
528
529
  export declare const GetAuthenticatedUserWithProjectLikesOutputSchema: z.ZodObject<{
529
530
  userId: z.ZodCUID2;
530
531
  projectLikes: z.ZodArray<z.ZodObject<{
532
+ id: z.ZodCUID2;
531
533
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
532
534
  userId: z.ZodCUID2;
533
535
  parentId: z.ZodCUID2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "1.6.7",
3
+ "version": "1.6.9",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,7 +11,8 @@ export const CommentEntitySchema = z.object({
11
11
  example: "clq9p8f2z0000c762s7k4g1b",
12
12
  }),
13
13
  parentId: z.cuid2().openapi({
14
- description: "The CUID2 of the parent entity (e.g., a post or project) this comment belongs to.",
14
+ description:
15
+ "The CUID2 of the parent entity (e.g., a post or project) this comment belongs to.",
15
16
  example: "clq9p8f2z0000c762s7k4g1b",
16
17
  }),
17
18
  parentType: z.enum(ACTIVITY_PARENT_TYPES).openapi({
@@ -22,9 +23,12 @@ export const CommentEntitySchema = z.object({
22
23
  description: "The text content of the comment. May contain Markdown.",
23
24
  example: "This is a great point! I hadn't considered that perspective.",
24
25
  }),
25
-
26
+ commenterUsername: z.string(),
27
+ commenterName: z.string(),
28
+ commenterImageUrl: z.string().optional(),
26
29
  replyToId: z.cuid2().optional().nullable().openapi({
27
- description: "The ID of the parent comment if this is a reply. Null for top-level comments.",
30
+ description:
31
+ "The ID of the parent comment if this is a reply. Null for top-level comments.",
28
32
  example: "tr4q2k7k0000c7625z2k8ggy", // Example of a parent comment's ID
29
33
  }),
30
34
  createdAt: z.coerce.date().optional().openapi({
@@ -36,5 +40,5 @@ export const CommentEntitySchema = z.object({
36
40
  description: "The date and time the comment was last updated.",
37
41
  example: "2023-10-27T10:05:00.000Z",
38
42
  format: "date-time",
39
- })
40
- });
43
+ }),
44
+ });
@@ -2,6 +2,10 @@ import { z } from "@hono/zod-openapi";
2
2
 
3
3
  export const LikeEntitySchema = z
4
4
  .object({
5
+ id: z.cuid2().openapi({
6
+ description: "The unique CUID2 identifier for the comment.",
7
+ example: "tr4q2k7k0000c7625z2k8ggy",
8
+ }),
5
9
  createdAt: z.coerce.date().optional().openapi({
6
10
  description: "Timestamp when the like was created.",
7
11
  title: "Created At",