mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add reaction to messageoutputDto schema
This commit is contained in:
@@ -1,5 +1,17 @@
|
|||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
|
|
||||||
|
export enum MessageAttachmentSource {
|
||||||
|
Webtrix = 1,
|
||||||
|
Device,
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum MessageAttachmentFileType {
|
||||||
|
Doc = 1,
|
||||||
|
Image ,
|
||||||
|
Audio ,
|
||||||
|
Video
|
||||||
|
}
|
||||||
|
|
||||||
const DataSchema = z.object({
|
const DataSchema = z.object({
|
||||||
id: z.string(),
|
id: z.string(),
|
||||||
roomId: z.string(),
|
roomId: z.string(),
|
||||||
@@ -18,12 +30,23 @@ const DataSchema = z.object({
|
|||||||
oneShot: z.boolean(),
|
oneShot: z.boolean(),
|
||||||
requireUnlock: z.boolean(),
|
requireUnlock: z.boolean(),
|
||||||
requestId: z.string(),
|
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({})),
|
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({
|
export const MessageOutPutDTOSchema = z.object({
|
||||||
success: z.boolean(),
|
success: z.boolean(),
|
||||||
message: z.string(),
|
message: z.string(),
|
||||||
|
|||||||
Reference in New Issue
Block a user