2026-09-29 10:34:01 +03:30
|
|
|
import {
|
|
|
|
|
IsArray,
|
|
|
|
|
IsOptional,
|
|
|
|
|
IsString,
|
|
|
|
|
MaxLength,
|
|
|
|
|
MinLength,
|
|
|
|
|
ArrayMinSize,
|
|
|
|
|
ArrayMaxSize,
|
|
|
|
|
} from 'class-validator';
|
|
|
|
|
|
|
|
|
|
export class UpdateConversationSettingsDto {
|
|
|
|
|
@IsString()
|
|
|
|
|
@MinLength(3)
|
|
|
|
|
@MaxLength(200)
|
|
|
|
|
chatHost!: string;
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsString()
|
|
|
|
|
@MinLength(8)
|
|
|
|
|
@MaxLength(500)
|
|
|
|
|
apiKey?: string;
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsString()
|
|
|
|
|
@MaxLength(500)
|
|
|
|
|
uploadUrl?: string;
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsString()
|
|
|
|
|
@MaxLength(500)
|
|
|
|
|
downloadUrl?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class CreateConversationDmDto {
|
|
|
|
|
@IsString()
|
|
|
|
|
@MinLength(1)
|
|
|
|
|
peerUserId!: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class CreateConversationGroupDto {
|
|
|
|
|
@IsString()
|
|
|
|
|
@MinLength(2)
|
|
|
|
|
@MaxLength(120)
|
|
|
|
|
name!: string;
|
|
|
|
|
|
|
|
|
|
@IsArray()
|
|
|
|
|
@ArrayMinSize(1)
|
|
|
|
|
@ArrayMaxSize(50)
|
|
|
|
|
@IsString({ each: true })
|
|
|
|
|
memberUserIds!: string[];
|
|
|
|
|
}
|
2026-09-29 21:46:41 +03:30
|
|
|
|
|
|
|
|
export class HideConversationMessagesDto {
|
|
|
|
|
@IsString()
|
|
|
|
|
@MinLength(1)
|
|
|
|
|
@MaxLength(200)
|
|
|
|
|
externalRoomId!: string;
|
|
|
|
|
|
|
|
|
|
@IsArray()
|
|
|
|
|
@ArrayMinSize(1)
|
|
|
|
|
@ArrayMaxSize(100)
|
|
|
|
|
@IsString({ each: true })
|
|
|
|
|
messageIds!: string[];
|
|
|
|
|
}
|