mirror of
https://github.com/docmost/docmost.git
synced 2026-05-08 23:33:09 +08:00
45 lines
657 B
TypeScript
45 lines
657 B
TypeScript
import {
|
|
IsBoolean,
|
|
IsIn,
|
|
IsNotEmpty,
|
|
IsOptional,
|
|
IsString,
|
|
} from 'class-validator';
|
|
|
|
export enum ExportFormat {
|
|
HTML = 'html',
|
|
Markdown = 'markdown',
|
|
}
|
|
|
|
export class ExportPageDto {
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
pageId: string;
|
|
|
|
@IsString()
|
|
@IsIn(['html', 'markdown'])
|
|
format: ExportFormat;
|
|
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
includeChildren?: boolean;
|
|
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
includeAttachments?: boolean;
|
|
}
|
|
|
|
export class ExportSpaceDto {
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
spaceId: string;
|
|
|
|
@IsString()
|
|
@IsIn(['html', 'markdown'])
|
|
format: ExportFormat;
|
|
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
includeAttachments?: boolean;
|
|
}
|