mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
send all file
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import { z } from "zod";
|
||||
import { MessageAttachmentFileType, MessageAttachmentSource } from "../../data/dto/message/messageOutputDTO";
|
||||
import { SafeResourceUrl } from "@angular/platform-browser";
|
||||
import { base64Schema } from "src/app/utils/zod";
|
||||
|
||||
const MessageEntitySchema = z.object({
|
||||
export const MessageEntitySchema = z.object({
|
||||
$id: z.any().optional(),
|
||||
id: z.string().optional(),
|
||||
roomId: z.string().uuid(),
|
||||
message: z.string(),
|
||||
roomId: z.string(),
|
||||
message: z.string().optional(),
|
||||
messageType: z.number(),
|
||||
canEdit: z.boolean(),
|
||||
oneShot: z.boolean(),
|
||||
@@ -22,15 +23,11 @@ const MessageEntitySchema = z.object({
|
||||
attachments: z.array(z.object({
|
||||
fileType: z.nativeEnum(MessageAttachmentFileType),
|
||||
source: z.nativeEnum(MessageAttachmentSource),
|
||||
file: z.string().optional(),
|
||||
file: base64Schema.optional(),
|
||||
fileName: z.string().optional(),
|
||||
applicationId: z.string().optional(),
|
||||
docId: z.string().optional()
|
||||
})),
|
||||
attachmentsSource: z.array(z.object({
|
||||
file: z.string(),
|
||||
id: z.string(),
|
||||
})),
|
||||
})
|
||||
|
||||
type Message = z.infer<typeof MessageEntitySchema>;
|
||||
|
||||
Reference in New Issue
Block a user