@zyacreatives/shared 2.1.91 → 2.1.93
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/message.d.ts +25 -0
- package/dist/schemas/message.js +12 -10
- package/package.json +1 -1
- package/src/schemas/message.ts +14 -12
|
@@ -29,6 +29,14 @@ export declare const MessageEntitySchema: z.ZodObject<{
|
|
|
29
29
|
readonly MESSAGE_WITH_MEDIA: "MESSAGE_WITH_MEDIA";
|
|
30
30
|
readonly MESSAGE_WITH_MEDIA_AND_LINKS: "MESSAGE_WITH_MEDIA_AND_LINKS";
|
|
31
31
|
}>>;
|
|
32
|
+
replyToContent: z.ZodOptional<z.ZodString>;
|
|
33
|
+
replyToImages: z.ZodOptional<z.ZodArray<z.ZodURL>>;
|
|
34
|
+
replyToLinkMeta: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
url: z.ZodURL;
|
|
36
|
+
title: z.ZodOptional<z.ZodString>;
|
|
37
|
+
description: z.ZodOptional<z.ZodString>;
|
|
38
|
+
image: z.ZodOptional<z.ZodURL>;
|
|
39
|
+
}, z.core.$strip>>;
|
|
32
40
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
33
41
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
34
42
|
deletedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
@@ -69,6 +77,14 @@ export declare const MessageWithFilesEntitySchema: z.ZodObject<{
|
|
|
69
77
|
readonly MESSAGE_WITH_MEDIA: "MESSAGE_WITH_MEDIA";
|
|
70
78
|
readonly MESSAGE_WITH_MEDIA_AND_LINKS: "MESSAGE_WITH_MEDIA_AND_LINKS";
|
|
71
79
|
}>>;
|
|
80
|
+
replyToContent: z.ZodOptional<z.ZodString>;
|
|
81
|
+
replyToImages: z.ZodOptional<z.ZodArray<z.ZodURL>>;
|
|
82
|
+
replyToLinkMeta: z.ZodOptional<z.ZodObject<{
|
|
83
|
+
url: z.ZodURL;
|
|
84
|
+
title: z.ZodOptional<z.ZodString>;
|
|
85
|
+
description: z.ZodOptional<z.ZodString>;
|
|
86
|
+
image: z.ZodOptional<z.ZodURL>;
|
|
87
|
+
}, z.core.$strip>>;
|
|
72
88
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
73
89
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
74
90
|
deletedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
@@ -99,6 +115,7 @@ export declare const CreateMessageInputSchema: z.ZodObject<{
|
|
|
99
115
|
}, z.core.$strip>>>;
|
|
100
116
|
chatId: z.ZodString;
|
|
101
117
|
senderId: z.ZodString;
|
|
118
|
+
replyToMessageId: z.ZodOptional<z.ZodCUID2>;
|
|
102
119
|
linkMeta: z.ZodOptional<z.ZodObject<{
|
|
103
120
|
url: z.ZodURL;
|
|
104
121
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -136,6 +153,14 @@ export declare const CreateMessageOutputSchema: z.ZodObject<{
|
|
|
136
153
|
readonly MESSAGE_WITH_MEDIA: "MESSAGE_WITH_MEDIA";
|
|
137
154
|
readonly MESSAGE_WITH_MEDIA_AND_LINKS: "MESSAGE_WITH_MEDIA_AND_LINKS";
|
|
138
155
|
}>>;
|
|
156
|
+
replyToContent: z.ZodOptional<z.ZodString>;
|
|
157
|
+
replyToImages: z.ZodOptional<z.ZodArray<z.ZodURL>>;
|
|
158
|
+
replyToLinkMeta: z.ZodOptional<z.ZodObject<{
|
|
159
|
+
url: z.ZodURL;
|
|
160
|
+
title: z.ZodOptional<z.ZodString>;
|
|
161
|
+
description: z.ZodOptional<z.ZodString>;
|
|
162
|
+
image: z.ZodOptional<z.ZodURL>;
|
|
163
|
+
}, z.core.$strip>>;
|
|
139
164
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
140
165
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
141
166
|
deletedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
package/dist/schemas/message.js
CHANGED
|
@@ -18,18 +18,19 @@ exports.MessageEntitySchema = zod_openapi_1.z.object({
|
|
|
18
18
|
description: zod_openapi_1.z.string().optional(),
|
|
19
19
|
image: zod_openapi_1.z.url().optional(),
|
|
20
20
|
})
|
|
21
|
-
.optional()
|
|
22
|
-
.openapi({
|
|
23
|
-
description: "Optional metadata for a single link in the message",
|
|
24
|
-
example: {
|
|
25
|
-
url: "https://example.com",
|
|
26
|
-
title: "Example Website",
|
|
27
|
-
description: "This is an example link",
|
|
28
|
-
image: "https://example.com/preview.jpg",
|
|
29
|
-
},
|
|
30
|
-
}),
|
|
21
|
+
.optional(),
|
|
31
22
|
content: zod_openapi_1.z.string().optional(),
|
|
32
23
|
messageType: zod_openapi_1.z.enum(constants_1.MESSAGE_TYPES).default(constants_1.MESSAGE_TYPES.DEFAULT_MESSAGE),
|
|
24
|
+
replyToContent: zod_openapi_1.z.string().optional(),
|
|
25
|
+
replyToImages: zod_openapi_1.z.array(zod_openapi_1.z.url()).optional(),
|
|
26
|
+
replyToLinkMeta: zod_openapi_1.z
|
|
27
|
+
.object({
|
|
28
|
+
url: zod_openapi_1.z.url(),
|
|
29
|
+
title: zod_openapi_1.z.string().optional(),
|
|
30
|
+
description: zod_openapi_1.z.string().optional(),
|
|
31
|
+
image: zod_openapi_1.z.url().optional(),
|
|
32
|
+
})
|
|
33
|
+
.optional(),
|
|
33
34
|
createdAt: zod_openapi_1.z.coerce.date().optional(),
|
|
34
35
|
updatedAt: zod_openapi_1.z.coerce.date().optional(),
|
|
35
36
|
deletedAt: zod_openapi_1.z.coerce.date().optional(),
|
|
@@ -83,6 +84,7 @@ exports.CreateMessageInputSchema = zod_openapi_1.z.object({
|
|
|
83
84
|
.optional(),
|
|
84
85
|
chatId: zod_openapi_1.z.string(),
|
|
85
86
|
senderId: zod_openapi_1.z.string(),
|
|
87
|
+
replyToMessageId: zod_openapi_1.z.cuid2().optional(),
|
|
86
88
|
linkMeta: zod_openapi_1.z
|
|
87
89
|
.object({
|
|
88
90
|
url: zod_openapi_1.z.url(),
|
package/package.json
CHANGED
package/src/schemas/message.ts
CHANGED
|
@@ -16,18 +16,19 @@ export const MessageEntitySchema = z.object({
|
|
|
16
16
|
description: z.string().optional(),
|
|
17
17
|
image: z.url().optional(),
|
|
18
18
|
})
|
|
19
|
-
.optional()
|
|
20
|
-
.openapi({
|
|
21
|
-
description: "Optional metadata for a single link in the message",
|
|
22
|
-
example: {
|
|
23
|
-
url: "https://example.com",
|
|
24
|
-
title: "Example Website",
|
|
25
|
-
description: "This is an example link",
|
|
26
|
-
image: "https://example.com/preview.jpg",
|
|
27
|
-
},
|
|
28
|
-
}),
|
|
19
|
+
.optional(),
|
|
29
20
|
content: z.string().optional(),
|
|
30
21
|
messageType: z.enum(MESSAGE_TYPES).default(MESSAGE_TYPES.DEFAULT_MESSAGE),
|
|
22
|
+
replyToContent: z.string().optional(),
|
|
23
|
+
replyToImages: z.array(z.url()).optional(),
|
|
24
|
+
replyToLinkMeta: z
|
|
25
|
+
.object({
|
|
26
|
+
url: z.url(),
|
|
27
|
+
title: z.string().optional(),
|
|
28
|
+
description: z.string().optional(),
|
|
29
|
+
image: z.url().optional(),
|
|
30
|
+
})
|
|
31
|
+
.optional(),
|
|
31
32
|
createdAt: z.coerce.date().optional(),
|
|
32
33
|
updatedAt: z.coerce.date().optional(),
|
|
33
34
|
deletedAt: z.coerce.date().optional(),
|
|
@@ -57,7 +58,7 @@ export const MessageWithFilesEntitySchema = MessageEntitySchema.extend({
|
|
|
57
58
|
.array(
|
|
58
59
|
MessageFileEntitySchema.extend({
|
|
59
60
|
url: z.url(),
|
|
60
|
-
})
|
|
61
|
+
}),
|
|
61
62
|
)
|
|
62
63
|
.optional()
|
|
63
64
|
.openapi({ description: "Files associated with the project." }),
|
|
@@ -83,11 +84,12 @@ export const CreateMessageInputSchema = z.object({
|
|
|
83
84
|
.array(
|
|
84
85
|
CreateFileInputSchema.extend({
|
|
85
86
|
order: z.int().default(1),
|
|
86
|
-
})
|
|
87
|
+
}),
|
|
87
88
|
)
|
|
88
89
|
.optional(),
|
|
89
90
|
chatId: z.string(),
|
|
90
91
|
senderId: z.string(),
|
|
92
|
+
replyToMessageId: z.cuid2().optional(),
|
|
91
93
|
linkMeta: z
|
|
92
94
|
.object({
|
|
93
95
|
url: z.url(),
|