feat: bootstrap from Fabric monorepo

This commit is contained in:
nav
2026-05-13 07:06:03 +00:00
commit d9c5175233
46 changed files with 7808 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
import {
ArrayMaxSize,
IsArray,
IsOptional,
IsString,
MaxLength,
ValidateNested,
} from 'class-validator';
import { Type } from 'class-transformer';
class AttachmentDto {
@IsString()
@MaxLength(2048)
url!: string;
@IsOptional()
@IsString()
@MaxLength(255)
name?: string;
@IsOptional()
@IsString()
@MaxLength(100)
mimeType?: string;
}
export class CreateMessageDto {
@IsString()
@MaxLength(4000)
content!: string;
@IsOptional()
@IsString()
@MaxLength(80)
clientMessageId?: string;
@IsOptional()
@IsString()
@MaxLength(80)
replyToMessageId?: string;
@IsOptional()
@IsArray()
@ArrayMaxSize(50)
@IsString({ each: true })
mentions?: string[];
@IsOptional()
@IsArray()
@ArrayMaxSize(10)
@ValidateNested({ each: true })
@Type(() => AttachmentDto)
attachments?: AttachmentDto[];
@IsOptional()
@IsString()
@MaxLength(64)
authorUserId?: string;
}