reorganizde file path

This commit is contained in:
Peter Maquiran
2024-08-27 09:14:59 +01:00
parent 98975856c1
commit e80082f9e8
54 changed files with 236 additions and 454 deletions
+15 -27
View File
@@ -14,6 +14,7 @@ export const MessageEntitySchema = z.object({
oneShot: z.boolean(),
sentAt: z.string().optional(),
requireUnlock: z.boolean(),
isDeleted: z.boolean().optional(),
editedAt: z.string().nullable().optional(),
sender: z.object({
wxUserId: z.number(),
@@ -21,6 +22,12 @@ export const MessageEntitySchema = z.object({
wxeMail: z.string(),
userPhoto: z.string(),
}),
reactions: z.object({
id: z.string(),
reactedAt: z.string(),
reaction: z.string(),
sender: z.object({}),
}).array().optional(),
info: z.array(z.object({
memberId: z.number(),
readAt: z.string().nullable(),
@@ -35,7 +42,9 @@ export const MessageEntitySchema = z.object({
applicationId: z.number().optional(),
docId: z.string().optional(),
id: z.string().optional(),
mimeType: z.string().optional()
mimeType: z.string().optional(),
safeFile: z.any().optional(),
description: z.string().optional()
})).optional()
})
@@ -53,36 +62,15 @@ export class MessageEntity {
oneShot: boolean = false
sentAt?: string
requireUnlock: boolean = false
info: {
memberId?: number
readAt?: string,
deliverAt?: string
}[] = []
sender!: {
wxUserId: number,
wxFullName: string,
wxeMail: string,
userPhoto: string,
}
info: typeof MessageEntitySchema._type.info = []
sender!: typeof MessageEntitySchema._type.sender
sending: boolean = false
sendAttemp = 0
attachments: {
safeFile?: SafeResourceUrl;
fileType: MessageAttachmentFileType,
source: MessageAttachmentSource,
file?: string,
fileName: string,
applicationId?: number,
docId?: string,
mimeType?: string,
description?: string
id?: string
}[] = []
reactions = []
attachments: typeof MessageEntitySchema._type.attachments = []
reactions: typeof MessageEntitySchema._type.reactions = []
requestId!: string
isDeleted: typeof MessageEntitySchema._type.isDeleted = false
constructor() {}