Feat: 필요한 타입 추가

This commit is contained in:
정현조 2024-09-18 14:52:57 +09:00
parent 3806595466
commit 95b06deecc

View File

@ -33,7 +33,6 @@ export type Label = {
type: 'polygon' | 'rect'; type: 'polygon' | 'rect';
coordinates: Array<[number, number]>; coordinates: Array<[number, number]>;
}; };
export interface FolderRequest { export interface FolderRequest {
title: string; title: string;
parentId: number; parentId: number;
@ -55,7 +54,7 @@ export interface ImageResponse {
id: number; id: number;
imageTitle: string; imageTitle: string;
imageUrl: string; imageUrl: string;
status: 'PENDING' | 'IN_PROGRESS' | 'NEED_REVIEW' | 'COMPLETED'; status: 'PENDING' | 'IN_PROGRESS' | 'SAVE' | 'REVIEW_REQUEST' | 'COMPLETED';
} }
export interface ImageMoveRequest { export interface ImageMoveRequest {
@ -63,7 +62,7 @@ export interface ImageMoveRequest {
} }
export interface ImageStatusChangeRequest { export interface ImageStatusChangeRequest {
labelStatus: 'PENDING' | 'IN_PROGRESS' | 'NEED_REVIEW' | 'COMPLETED'; labelStatus: 'PENDING' | 'IN_PROGRESS' | 'SAVE' | 'REVIEW_REQUEST' | 'COMPLETED';
} }
export interface MemberResponse { export interface MemberResponse {
@ -79,7 +78,7 @@ export interface WorkspaceRequest {
export interface WorkspaceResponse { export interface WorkspaceResponse {
id: number; id: number;
memberId: string; memberId: number;
title: string; title: string;
content: string; content: string;
createdAt: string; createdAt: string;
@ -90,15 +89,6 @@ export interface WorkspaceListResponse {
workspaceResponses: WorkspaceResponse[]; workspaceResponses: WorkspaceResponse[];
} }
export interface SuccessResponse<T> {
status: number;
code: number;
message: string;
data: T;
errors: CustomError[];
isSuccess: boolean;
}
export interface ProjectRequest { export interface ProjectRequest {
title: string; title: string;
projectType: 'classification' | 'detection' | 'segmentation'; projectType: 'classification' | 'detection' | 'segmentation';
@ -117,31 +107,6 @@ export interface ProjectListResponse {
workspaceResponses: ProjectResponse[]; workspaceResponses: ProjectResponse[];
} }
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<T> {
status: number;
code: number;
message: string;
data: T;
errors: CustomError[];
isSuccess: boolean;
}
export interface RefreshTokenResponse { export interface RefreshTokenResponse {
accessToken: string; accessToken: string;
} }
@ -163,6 +128,10 @@ export interface CommentResponse {
createTime: string; // 작성 일자 (ISO 8601 형식) createTime: string; // 작성 일자 (ISO 8601 형식)
} }
export interface CommentListResponse {
commentResponses: CommentResponse[];
}
export interface ProjectMemberRequest { export interface ProjectMemberRequest {
memberId: number; memberId: number;
privilegeType: 'ADMIN' | 'MANAGER' | 'EDITOR' | 'VIEWER'; privilegeType: 'ADMIN' | 'MANAGER' | 'EDITOR' | 'VIEWER';
@ -179,3 +148,61 @@ export interface AutoLabelingResponse {
imageUrl: string; imageUrl: string;
data: string; data: string;
} }
export interface ReviewRequest {
title: string;
content: string;
imageIds: number[];
}
export interface ReviewResponse {
reviewId: number;
title: string;
content: string;
status: 'REQUESTED' | 'APPROVED' | 'REJECTED';
}
export interface ReviewStatusRequest {
reviewStatus: 'REQUESTED' | 'APPROVED' | 'REJECTED';
}
export interface FolderIdResponse {
id: number;
title: string;
}
export interface ImageDetailResponse {
id: number;
imageTitle: string;
imageUrl: string;
data: string | null; // PENDING 상태라면 null
status: 'PENDING' | 'IN_PROGRESS' | 'SAVE' | 'REVIEW_REQUEST' | 'COMPLETED';
}
export interface CategoryRequest {
categoryName: string;
}
export interface CategoryResponse {
id: number;
name: string;
}
export interface LabelSaveRequest {
data: string;
}
export interface ReviewDetailResponse {
reviewId: number;
title: string;
content: string;
reviewStatus: 'REQUESTED' | 'APPROVED' | 'REJECTED';
images: ImageResponse[];
}
export interface ErrorResponse {
status: number;
code: number;
message: string;
isSuccess: boolean;
}