@zyacreatives/shared 1.6.6 → 1.6.8
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/schemas/bookmark.d.ts +1 -1
- package/dist/schemas/bookmark.js +1 -1
- package/dist/schemas/comment.d.ts +3 -0
- package/dist/schemas/comment.js +4 -1
- package/dist/schemas/project.d.ts +13 -4
- package/dist/schemas/user.d.ts +2 -2
- package/dist/schemas/view.d.ts +2 -2
- package/dist/schemas/view.js +2 -2
- package/package.json +1 -1
- package/src/schemas/bookmark.ts +1 -1
- package/src/schemas/comment.ts +9 -5
- package/src/schemas/view.ts +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
2
|
export declare const BookmarkEntitySchema: z.ZodObject<{
|
|
3
3
|
id: z.ZodCUID2;
|
|
4
|
-
createdAt: z.
|
|
4
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
5
5
|
userId: z.ZodCUID2;
|
|
6
6
|
parentId: z.ZodCUID2;
|
|
7
7
|
parentType: z.ZodString;
|
package/dist/schemas/bookmark.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.BookmarkEntitySchema = zod_openapi_1.z
|
|
|
8
8
|
description: "Unique identifier for the bookmark.",
|
|
9
9
|
title: "Bookmark ID",
|
|
10
10
|
}),
|
|
11
|
-
createdAt: zod_openapi_1.z.
|
|
11
|
+
createdAt: zod_openapi_1.z.coerce.date().optional().openapi({
|
|
12
12
|
description: "Timestamp when the bookmark was created.",
|
|
13
13
|
title: "Created At",
|
|
14
14
|
}),
|
|
@@ -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>>;
|
package/dist/schemas/comment.js
CHANGED
|
@@ -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
|
});
|
|
@@ -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>>;
|
|
@@ -322,7 +328,7 @@ export declare const GetProjectOutputSchema: z.ZodObject<{
|
|
|
322
328
|
}, z.core.$strip>;
|
|
323
329
|
export declare const BookmarkProjectOutputSchema: z.ZodObject<{
|
|
324
330
|
id: z.ZodCUID2;
|
|
325
|
-
createdAt: z.
|
|
331
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
326
332
|
userId: z.ZodCUID2;
|
|
327
333
|
parentId: z.ZodCUID2;
|
|
328
334
|
parentType: z.ZodString;
|
|
@@ -369,8 +375,8 @@ export declare const ProjectWithProjectViewsEntitySchema: z.ZodObject<{
|
|
|
369
375
|
readonly POST: "POST";
|
|
370
376
|
}>;
|
|
371
377
|
sessionId: z.ZodNullable<z.ZodString>;
|
|
372
|
-
viewedAt: z.
|
|
373
|
-
viewDate: z.
|
|
378
|
+
viewedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
379
|
+
viewDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
374
380
|
}, z.core.$strip>>;
|
|
375
381
|
}, z.core.$strip>;
|
|
376
382
|
export declare const ProjectWithProjectCommentsEntitySchema: z.ZodObject<{
|
|
@@ -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>>;
|
|
@@ -420,7 +429,7 @@ export declare const ProjectWithProjectBookmarksEntitySchema: z.ZodObject<{
|
|
|
420
429
|
endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
421
430
|
bookmarks: z.ZodArray<z.ZodObject<{
|
|
422
431
|
id: z.ZodCUID2;
|
|
423
|
-
createdAt: z.
|
|
432
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
424
433
|
userId: z.ZodCUID2;
|
|
425
434
|
parentId: z.ZodCUID2;
|
|
426
435
|
parentType: z.ZodString;
|
package/dist/schemas/user.d.ts
CHANGED
|
@@ -199,7 +199,7 @@ export declare const UserWithProjectBookmarksEntitySchema: z.ZodObject<{
|
|
|
199
199
|
userId: z.ZodCUID2;
|
|
200
200
|
projectBookmarks: z.ZodArray<z.ZodObject<{
|
|
201
201
|
id: z.ZodCUID2;
|
|
202
|
-
createdAt: z.
|
|
202
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
203
203
|
userId: z.ZodCUID2;
|
|
204
204
|
parentId: z.ZodCUID2;
|
|
205
205
|
parentType: z.ZodString;
|
|
@@ -458,7 +458,7 @@ export declare const GetAuthenticatedUserWithProjectBookmarksOutputSchema: z.Zod
|
|
|
458
458
|
userId: z.ZodCUID2;
|
|
459
459
|
projectBookmarks: z.ZodArray<z.ZodObject<{
|
|
460
460
|
id: z.ZodCUID2;
|
|
461
|
-
createdAt: z.
|
|
461
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
462
462
|
userId: z.ZodCUID2;
|
|
463
463
|
parentId: z.ZodCUID2;
|
|
464
464
|
parentType: z.ZodString;
|
package/dist/schemas/view.d.ts
CHANGED
|
@@ -10,6 +10,6 @@ export declare const ViewEntitySchema: z.ZodObject<{
|
|
|
10
10
|
readonly POST: "POST";
|
|
11
11
|
}>;
|
|
12
12
|
sessionId: z.ZodNullable<z.ZodString>;
|
|
13
|
-
viewedAt: z.
|
|
14
|
-
viewDate: z.
|
|
13
|
+
viewedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
14
|
+
viewDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
15
15
|
}, z.core.$strip>;
|
package/dist/schemas/view.js
CHANGED
|
@@ -33,11 +33,11 @@ exports.ViewEntitySchema = zod_openapi_1.z
|
|
|
33
33
|
description: "Session identifier associated with the view event, if available.",
|
|
34
34
|
title: "Session ID",
|
|
35
35
|
}),
|
|
36
|
-
viewedAt: zod_openapi_1.z.
|
|
36
|
+
viewedAt: zod_openapi_1.z.coerce.date().optional().openapi({
|
|
37
37
|
description: "Exact timestamp when the view occurred.",
|
|
38
38
|
title: "Viewed At",
|
|
39
39
|
}),
|
|
40
|
-
viewDate: zod_openapi_1.z.
|
|
40
|
+
viewDate: zod_openapi_1.z.coerce.date().optional().openapi({
|
|
41
41
|
description: "Calendar date corresponding to the view event, used for aggregation.",
|
|
42
42
|
title: "View Date",
|
|
43
43
|
}),
|
package/package.json
CHANGED
package/src/schemas/bookmark.ts
CHANGED
|
@@ -6,7 +6,7 @@ export const BookmarkEntitySchema = z
|
|
|
6
6
|
description: "Unique identifier for the bookmark.",
|
|
7
7
|
title: "Bookmark ID",
|
|
8
8
|
}),
|
|
9
|
-
createdAt: z.
|
|
9
|
+
createdAt: z.coerce.date().optional().openapi({
|
|
10
10
|
description: "Timestamp when the bookmark was created.",
|
|
11
11
|
title: "Created At",
|
|
12
12
|
}),
|
package/src/schemas/comment.ts
CHANGED
|
@@ -11,7 +11,8 @@ export const CommentEntitySchema = z.object({
|
|
|
11
11
|
example: "clq9p8f2z0000c762s7k4g1b",
|
|
12
12
|
}),
|
|
13
13
|
parentId: z.cuid2().openapi({
|
|
14
|
-
description:
|
|
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:
|
|
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
|
+
});
|
package/src/schemas/view.ts
CHANGED
|
@@ -34,11 +34,11 @@ export const ViewEntitySchema = z
|
|
|
34
34
|
"Session identifier associated with the view event, if available.",
|
|
35
35
|
title: "Session ID",
|
|
36
36
|
}),
|
|
37
|
-
viewedAt: z.
|
|
37
|
+
viewedAt: z.coerce.date().optional().openapi({
|
|
38
38
|
description: "Exact timestamp when the view occurred.",
|
|
39
39
|
title: "Viewed At",
|
|
40
40
|
}),
|
|
41
|
-
viewDate: z.
|
|
41
|
+
viewDate: z.coerce.date().optional().openapi({
|
|
42
42
|
description:
|
|
43
43
|
"Calendar date corresponding to the view event, used for aggregation.",
|
|
44
44
|
title: "View Date",
|