fix(server): add mode property on mention doc input (#10853)

This commit is contained in:
fengmk2
2025-03-14 08:23:27 +00:00
parent c31d01b2c2
commit 114e89961f
9 changed files with 180 additions and 13 deletions
@@ -9,6 +9,7 @@ import { z } from 'zod';
import { PaginationInput } from '../base';
import { BaseModel } from './base';
import { DocMode } from './common';
export { NotificationLevel, NotificationType };
export type { Notification };
@@ -30,11 +31,15 @@ export const MentionDocSchema = z.object({
id: IdSchema,
// Allow empty string, will display as `Untitled` at frontend
title: z.string().trim().max(255),
mode: z.nativeEnum(DocMode),
// blockId or elementId is required at least one
blockId: IdSchema.optional(),
elementId: IdSchema.optional(),
});
export type MentionDoc = z.infer<typeof MentionDocSchema>;
export type MentionDocCreate = z.input<typeof MentionDocSchema>;
const MentionNotificationBodySchema = z.object({
workspaceId: IdSchema,
createdByUserId: IdSchema,