From 3a1257054801e3f3f109628b457af76ea76ffe70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=ED=98=84=EC=A1=B0?= Date: Thu, 12 Sep 2024 10:57:52 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20type=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/types/index.ts | 110 ++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts index eda3258..f83563b 100644 --- a/frontend/src/types/index.ts +++ b/frontend/src/types/index.ts @@ -33,3 +33,113 @@ export type Label = { type: 'polygon' | 'rect'; coordinates: Array<[number, number]>; }; + +export interface FolderRequestDTO { + title: string; + parentId: number; +} + +export interface ChildFolderDTO { + id: number; + title: string; +} + +export interface FolderResponseDTO { + id: number; + title: string; + images: ImageResponseDTO[]; + children: ChildFolderDTO[]; +} + +export interface ImageResponseDTO { + id: number; + imageTitle: string; + imageUrl: string; + status: 'PENDING' | 'IN_PROGRESS' | 'NEED_REVIEW' | 'COMPLETED'; +} + +export interface ImageMoveRequestDTO { + moveFolderId: number; +} + +export interface ImageStatusChangeRequestDTO { + labelStatus: 'PENDING' | 'IN_PROGRESS' | 'NEED_REVIEW' | 'COMPLETED'; +} + +export interface MemberResponseDTO { + id: number; + nickname: string; + profileImage: string; +} + +export interface WorkspaceRequestDTO { + title: string; + content: string; +} + +export interface WorkspaceResponseDTO { + id: number; + memberId: string; + title: string; + content: string; + createdAt: string; + updatedAt: string; +} + +export interface WorkspaceListResponseDTO { + workspaceResponses: WorkspaceResponseDTO[]; +} + +export interface SuccessResponse { + status: number; + code: number; + message: string; + data: T; + errors: CustomError[]; + isSuccess: boolean; +} +export interface ProjectRequestDTO { + title: string; + projectType: 'classification' | 'detection' | 'segmentation'; +} +export interface ProjectResponseDTO { + id: number; + title: string; + workspaceId: number; + projectType: 'classification' | 'detection' | 'segmentation'; + createdAt: string; + updatedAt: string; +} + +export interface ProjectListResponseDTO { + workspaceResponses: ProjectResponseDTO[]; +} + +export interface CustomError { + field: string; + code: string; + message: string; + objectName: string; +} + +export interface ErrorResponse { + status: number; + code: number; + message: string; + data: CustomError; + errors: CustomError[]; + isSuccess: boolean; +} + +export interface BaseResponse { + status: number; + code: number; + message: string; + data: T; + errors: CustomError[]; + isSuccess: boolean; +} + +export interface RefreshTokenResponseDTO { + accessToken: string; +}