chore: add email and mailbox module
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
||||
import { IsBoolean, IsNumber, IsOptional, IsString } from "class-validator";
|
||||
|
||||
export class CreateMailboxDto {
|
||||
@ApiProperty({
|
||||
description: "Mailbox path with slashes as folder separators",
|
||||
example: "Important/Work",
|
||||
})
|
||||
@IsString()
|
||||
path: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: "Retention time in milliseconds for messages in this mailbox",
|
||||
example: 2592000000,
|
||||
})
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
retention?: number;
|
||||
}
|
||||
|
||||
export class UpdateMailboxDto {
|
||||
@ApiPropertyOptional({
|
||||
description: "New mailbox path if renaming",
|
||||
example: "Renamed Folder",
|
||||
})
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
path?: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: "New retention time in milliseconds",
|
||||
example: 5184000000,
|
||||
})
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
retention?: number;
|
||||
}
|
||||
|
||||
export class MailboxQueryDto {
|
||||
@ApiPropertyOptional({
|
||||
description: "Include message counters in results",
|
||||
default: false,
|
||||
})
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
counters?: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user