mirror of
https://github.com/docmost/docmost.git
synced 2026-05-14 12:44:16 +08:00
fe83557767
* wip * Space export * option to export pages with children * include attachments in exports * unified export UI * cleanup * fix: change export icon * add export button to space settings * cleanups * export name
40 lines
592 B
TypeScript
40 lines
592 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;
|
|
}
|
|
|
|
export class ExportSpaceDto {
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
spaceId: string;
|
|
|
|
@IsString()
|
|
@IsIn(['html', 'markdown'])
|
|
format: ExportFormat;
|
|
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
includeAttachments?: boolean;
|
|
} |