add reaction to messageoutputDto schema

This commit is contained in:
Peter Maquiran
2024-08-08 10:07:25 +01:00
parent 861ab8edf4
commit 6d8ef9b1e3
@@ -1,5 +1,17 @@
import { z } from "zod"
export enum MessageAttachmentSource {
Webtrix = 1,
Device,
}
export enum MessageAttachmentFileType {
Doc = 1,
Image ,
Audio ,
Video
}
const DataSchema = z.object({
id: z.string(),
roomId: z.string(),
@@ -18,12 +30,23 @@ const DataSchema = z.object({
oneShot: z.boolean(),
requireUnlock: z.boolean(),
requestId: z.string(),
reactions: z.array(z.object({})),
reactions: z.object({
id: z.string(),
reactedAt: z.string(),
reaction: z.string(),
sender: z.object({}),
}).array(),
info: z.array(z.object({})),
attachments: z.array(z.object({}))
attachments: z.array(z.object({
fileType: z.nativeEnum(MessageAttachmentFileType),
source: z.nativeEnum(MessageAttachmentSource),
file: z.string(),
fileName: z.string(),
applicationId: z.string(),
docId: z.string()
}))
});
export const MessageOutPutDTOSchema = z.object({
success: z.boolean(),
message: z.string(),