@zyacreatives/shared 2.2.32 → 2.2.33

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 MessageEntitySchema: z.ZodObject<{
3
3
  id: z.ZodCUID2;
4
4
  chatId: z.ZodCUID2;
5
5
  senderId: z.ZodCUID2;
6
+ receiverId: z.ZodCUID2;
6
7
  content: z.ZodDefault<z.ZodOptional<z.ZodString>>;
7
8
  messageType: z.ZodDefault<z.ZodEnum<{
8
9
  readonly MARKETPLACE: "MARKETPLACE";
@@ -52,6 +53,7 @@ export declare const MessageWithFilesEntitySchema: z.ZodObject<{
52
53
  id: z.ZodCUID2;
53
54
  chatId: z.ZodCUID2;
54
55
  senderId: z.ZodCUID2;
56
+ receiverId: z.ZodCUID2;
55
57
  content: z.ZodDefault<z.ZodOptional<z.ZodString>>;
56
58
  messageType: z.ZodDefault<z.ZodEnum<{
57
59
  readonly MARKETPLACE: "MARKETPLACE";
@@ -131,6 +133,7 @@ export declare const GetMessagesOutputSchema: z.ZodObject<{
131
133
  id: z.ZodCUID2;
132
134
  chatId: z.ZodCUID2;
133
135
  senderId: z.ZodCUID2;
136
+ receiverId: z.ZodCUID2;
134
137
  content: z.ZodDefault<z.ZodOptional<z.ZodString>>;
135
138
  messageType: z.ZodDefault<z.ZodEnum<{
136
139
  readonly MARKETPLACE: "MARKETPLACE";
@@ -182,6 +185,7 @@ export declare const CreateMessageOutputSchema: z.ZodObject<{
182
185
  id: z.ZodCUID2;
183
186
  chatId: z.ZodCUID2;
184
187
  senderId: z.ZodCUID2;
188
+ receiverId: z.ZodCUID2;
185
189
  content: z.ZodDefault<z.ZodOptional<z.ZodString>>;
186
190
  messageType: z.ZodDefault<z.ZodEnum<{
187
191
  readonly MARKETPLACE: "MARKETPLACE";
@@ -16,6 +16,7 @@ exports.MessageEntitySchema = zod_openapi_1.z.object({
16
16
  id: zod_openapi_1.z.cuid2(),
17
17
  chatId: zod_openapi_1.z.cuid2(),
18
18
  senderId: zod_openapi_1.z.cuid2(),
19
+ receiverId: zod_openapi_1.z.cuid2(),
19
20
  // Content & Type
20
21
  content: zod_openapi_1.z.string().optional().default(""),
21
22
  messageType: zod_openapi_1.z.enum(constants_1.MESSAGE_TYPES).default("DEFAULT_MESSAGE"),
@@ -54,7 +55,9 @@ exports.CreateMessageInputSchema = zod_openapi_1.z.object({
54
55
  parentId: zod_openapi_1.z.cuid2().optional(),
55
56
  replyToMessageId: zod_openapi_1.z.cuid2().optional(),
56
57
  linkMeta: LinkMetaSchema.optional(),
57
- files: zod_openapi_1.z.array(file_1.CreateFileInputSchema.extend({ order: zod_openapi_1.z.number().int() })).optional(),
58
+ files: zod_openapi_1.z
59
+ .array(file_1.CreateFileInputSchema.extend({ order: zod_openapi_1.z.number().int() }))
60
+ .optional(),
58
61
  });
59
62
  exports.GetMessagesOutputSchema = zod_openapi_1.z.object({
60
63
  messages: zod_openapi_1.z.array(exports.MessageWithFilesEntitySchema),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.2.32",
3
+ "version": "2.2.33",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -15,15 +15,16 @@ export const MessageEntitySchema = z.object({
15
15
  id: z.cuid2(),
16
16
  chatId: z.cuid2(),
17
17
  senderId: z.cuid2(),
18
+ receiverId: z.cuid2(),
18
19
 
19
20
  // Content & Type
20
21
  content: z.string().optional().default(""),
21
22
  messageType: z.enum(MESSAGE_TYPES).default("DEFAULT_MESSAGE"),
22
-
23
+
23
24
  // Parent/Threading
24
25
  parentId: z.cuid2().optional(), // For threads/comments
25
26
  parentType: z.enum(ACTIVITY_PARENT_TYPES).optional(),
26
-
27
+
27
28
  // Reply Context (Flattened for UI convenience)
28
29
  replyToMessageId: z.cuid2().optional(),
29
30
  replyToContent: z.string().optional(),
@@ -55,15 +56,17 @@ export const CreateMessageInputSchema = z.object({
55
56
  chatId: z.cuid2(),
56
57
  senderId: z.cuid2(),
57
58
  receiverId: z.cuid2(),
58
-
59
+
59
60
  content: z.string().optional(),
60
61
  messageType: z.enum(MESSAGE_TYPES).default("DEFAULT_MESSAGE"),
61
-
62
+
62
63
  parentId: z.cuid2().optional(),
63
64
  replyToMessageId: z.cuid2().optional(),
64
-
65
+
65
66
  linkMeta: LinkMetaSchema.optional(),
66
- files: z.array(CreateFileInputSchema.extend({ order: z.number().int() })).optional(),
67
+ files: z
68
+ .array(CreateFileInputSchema.extend({ order: z.number().int() }))
69
+ .optional(),
67
70
  });
68
71
 
69
72
  export const GetMessagesOutputSchema = z.object({
@@ -72,4 +75,3 @@ export const GetMessagesOutputSchema = z.object({
72
75
  });
73
76
 
74
77
  export const CreateMessageOutputSchema = MessageEntitySchema;
75
-