@zyacreatives/shared 2.1.33 → 2.1.34

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.
@@ -60,6 +60,7 @@ export declare const NotificationDetailsEntitySchema: z.ZodObject<{
60
60
  itemTitle: z.ZodOptional<z.ZodString>;
61
61
  itemContent: z.ZodOptional<z.ZodString>;
62
62
  itemImgUrl: z.ZodOptional<z.ZodString>;
63
+ itemStatus: z.ZodOptional<z.ZodString>;
63
64
  }, z.core.$strip>;
64
65
  export declare const ListNotificationsInputSchema: z.ZodObject<{
65
66
  type: z.ZodOptional<z.ZodEnum<{
@@ -106,6 +107,7 @@ export declare const ListNotificationsOutputSchema: z.ZodObject<{
106
107
  itemTitle: z.ZodOptional<z.ZodString>;
107
108
  itemContent: z.ZodOptional<z.ZodString>;
108
109
  itemImgUrl: z.ZodOptional<z.ZodString>;
110
+ itemStatus: z.ZodOptional<z.ZodString>;
109
111
  }, z.core.$strip>>;
110
112
  nextCursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
111
113
  unreadCount: z.ZodNumber;
@@ -12,7 +12,9 @@ exports.NotificationEntitySchema = zod_openapi_1.z
12
12
  parentId: zod_openapi_1.z.cuid2().optional(),
13
13
  parentType: zod_openapi_1.z.enum(constants_1.ACTIVITY_PARENT_TYPES),
14
14
  isRead: zod_openapi_1.z.boolean().default(false).openapi({ example: false }),
15
- createdAt: zod_openapi_1.z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
15
+ createdAt: zod_openapi_1.z.coerce
16
+ .date()
17
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
16
18
  deletedAt: zod_openapi_1.z.coerce.date().optional().nullable(),
17
19
  })
18
20
  .openapi("NotificationEntity");
@@ -25,10 +27,14 @@ exports.NotificationDetailsEntitySchema = exports.NotificationEntitySchema.exten
25
27
  itemTitle: zod_openapi_1.z.string().optional(),
26
28
  itemContent: zod_openapi_1.z.string().optional(),
27
29
  itemImgUrl: zod_openapi_1.z.string().optional(),
30
+ itemStatus: zod_openapi_1.z.string().optional(),
28
31
  });
29
32
  exports.ListNotificationsInputSchema = zod_openapi_1.z
30
33
  .object({
31
- type: zod_openapi_1.z.enum(constants_1.NOTIFICATION_TYPES).openapi({ example: "LIKE" }).optional(),
34
+ type: zod_openapi_1.z
35
+ .enum(constants_1.NOTIFICATION_TYPES)
36
+ .openapi({ example: "LIKE" })
37
+ .optional(),
32
38
  cursor: zod_openapi_1.z.string().optional(),
33
39
  unreadOnly: zod_openapi_1.z
34
40
  .preprocess((val) => val === "true" || val === true, zod_openapi_1.z.boolean())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.1.33",
3
+ "version": "2.1.34",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -2,53 +2,58 @@ import { z } from "@hono/zod-openapi";
2
2
  import { ACTIVITY_PARENT_TYPES, NOTIFICATION_TYPES } from "../constants";
3
3
 
4
4
  export const NotificationEntitySchema = z
5
- .object({
6
- id: z.cuid2().openapi({ example: "not_cksd0v6q0000s9a5y8z7p3x9" }),
7
- recipientId: z.cuid2().openapi({ example: "user_recipient_123" }),
8
- actorId: z.cuid2().openapi({ example: "user_actor_456" }),
9
- type: z.enum(NOTIFICATION_TYPES).openapi({ example: "LIKE" }),
10
- parentId: z.cuid2().optional(),
11
- parentType: z.enum(ACTIVITY_PARENT_TYPES),
12
- isRead: z.boolean().default(false).openapi({ example: false }),
13
- createdAt: z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
14
- deletedAt: z.coerce.date().optional().nullable(),
15
- })
16
- .openapi("NotificationEntity");
5
+ .object({
6
+ id: z.cuid2().openapi({ example: "not_cksd0v6q0000s9a5y8z7p3x9" }),
7
+ recipientId: z.cuid2().openapi({ example: "user_recipient_123" }),
8
+ actorId: z.cuid2().openapi({ example: "user_actor_456" }),
9
+ type: z.enum(NOTIFICATION_TYPES).openapi({ example: "LIKE" }),
10
+ parentId: z.cuid2().optional(),
11
+ parentType: z.enum(ACTIVITY_PARENT_TYPES),
12
+ isRead: z.boolean().default(false).openapi({ example: false }),
13
+ createdAt: z.coerce
14
+ .date()
15
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
16
+ deletedAt: z.coerce.date().optional().nullable(),
17
+ })
18
+ .openapi("NotificationEntity");
17
19
 
18
20
  export const MinimalNotificationEntitySchema = z.object({
19
- id: z.cuid2(),
20
- recipientId: z.cuid2(),
21
- actorId: z.cuid2(),
21
+ id: z.cuid2(),
22
+ recipientId: z.cuid2(),
23
+ actorId: z.cuid2(),
22
24
  });
23
25
 
24
26
  export const NotificationDetailsEntitySchema = NotificationEntitySchema.extend({
25
-
26
- itemTitle: z.string().optional(),
27
- itemContent: z.string().optional(),
28
- itemImgUrl: z.string().optional(),
27
+ itemTitle: z.string().optional(),
28
+ itemContent: z.string().optional(),
29
+ itemImgUrl: z.string().optional(),
30
+ itemStatus: z.string().optional(),
29
31
  });
30
32
 
31
33
  export const ListNotificationsInputSchema = z
32
- .object({
33
- type: z.enum(NOTIFICATION_TYPES).openapi({ example: "LIKE" }).optional(),
34
- cursor: z.string().optional(),
35
- unreadOnly: z
36
- .preprocess((val) => val === "true" || val === true, z.boolean())
37
- .optional()
38
- .default(false),
39
- })
40
- .openapi("ListNotificationsInput");
34
+ .object({
35
+ type: z
36
+ .enum(NOTIFICATION_TYPES)
37
+ .openapi({ example: "LIKE" })
38
+ .optional(),
39
+ cursor: z.string().optional(),
40
+ unreadOnly: z
41
+ .preprocess((val) => val === "true" || val === true, z.boolean())
42
+ .optional()
43
+ .default(false),
44
+ })
45
+ .openapi("ListNotificationsInput");
41
46
 
42
47
  export const ListNotificationsOutputSchema = z.object({
43
- notifications: z.array(NotificationDetailsEntitySchema),
44
- nextCursor: z.string().optional().nullable(),
45
- unreadCount: z.number().int().openapi({ example: 5 }),
48
+ notifications: z.array(NotificationDetailsEntitySchema),
49
+ nextCursor: z.string().optional().nullable(),
50
+ unreadCount: z.number().int().openapi({ example: 5 }),
46
51
  });
47
52
 
48
53
  export const MarkReadInputSchema = z.object({
49
- notificationIds: z.array(z.cuid2()).min(1),
54
+ notificationIds: z.array(z.cuid2()).min(1),
50
55
  });
51
56
 
52
57
  export const NotificationCountOutputSchema = z.object({
53
- unreadCount: z.number().int().openapi({ example: 12 }),
58
+ unreadCount: z.number().int().openapi({ example: 12 }),
54
59
  });