mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-19 19:21:04 +10:00
switch to nx monorepo
This commit is contained in:
15
apps/server/src/core/page/dto/create-page.dto.ts
Normal file
15
apps/server/src/core/page/dto/create-page.dto.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { IsOptional, IsString, IsUUID } from 'class-validator';
|
||||
|
||||
export class CreatePageDto {
|
||||
@IsOptional()
|
||||
@IsUUID()
|
||||
id?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
title?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
parentPageId?: string;
|
||||
}
|
||||
6
apps/server/src/core/page/dto/delete-page.dto.ts
Normal file
6
apps/server/src/core/page/dto/delete-page.dto.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { IsUUID } from 'class-validator';
|
||||
|
||||
export class DeletePageDto {
|
||||
@IsUUID()
|
||||
id: string;
|
||||
}
|
||||
6
apps/server/src/core/page/dto/history-details.dto.ts
Normal file
6
apps/server/src/core/page/dto/history-details.dto.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { IsUUID } from 'class-validator';
|
||||
|
||||
export class HistoryDetailsDto {
|
||||
@IsUUID()
|
||||
id: string;
|
||||
}
|
||||
18
apps/server/src/core/page/dto/move-page.dto.ts
Normal file
18
apps/server/src/core/page/dto/move-page.dto.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { IsString, IsOptional, IsUUID } from 'class-validator';
|
||||
|
||||
export class MovePageDto {
|
||||
@IsUUID()
|
||||
id: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
after?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
before?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
parentId?: string | null;
|
||||
}
|
||||
6
apps/server/src/core/page/dto/page-details.dto.ts
Normal file
6
apps/server/src/core/page/dto/page-details.dto.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { IsUUID } from 'class-validator';
|
||||
|
||||
export class PageDetailsDto {
|
||||
@IsUUID()
|
||||
id: string;
|
||||
}
|
||||
6
apps/server/src/core/page/dto/page-history.dto.ts
Normal file
6
apps/server/src/core/page/dto/page-history.dto.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { IsUUID } from 'class-validator';
|
||||
|
||||
export class PageHistoryDto {
|
||||
@IsUUID()
|
||||
pageId: string;
|
||||
}
|
||||
5
apps/server/src/core/page/dto/page-with-ordering.dto.ts
Normal file
5
apps/server/src/core/page/dto/page-with-ordering.dto.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { Page } from '../entities/page.entity';
|
||||
|
||||
export class PageWithOrderingDto extends Page {
|
||||
childrenIds?: string[];
|
||||
}
|
||||
8
apps/server/src/core/page/dto/update-page.dto.ts
Normal file
8
apps/server/src/core/page/dto/update-page.dto.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { PartialType } from '@nestjs/mapped-types';
|
||||
import { CreatePageDto } from './create-page.dto';
|
||||
import { IsUUID } from 'class-validator';
|
||||
|
||||
export class UpdatePageDto extends PartialType(CreatePageDto) {
|
||||
@IsUUID()
|
||||
id: string;
|
||||
}
|
||||
Reference in New Issue
Block a user