mirror of
https://github.com/docmost/docmost.git
synced 2026-06-10 01:52:43 +08:00
dddfd48934
* feat: add attachments support for single page exports - Add includeAttachments option to page export modal and API - Fix internal page url in single page exports in cloud * remove redundant line * preserve export state
44 lines
656 B
TypeScript
44 lines
656 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;
|
|
} |