Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ab29621
refactor: 타입 맞추기 (#111)
AndyH0ng Feb 2, 2026
e0566ff
fix: API 경로 수정 (#111)
AndyH0ng Feb 2, 2026
e7fd61a
fix: Presentation API 연결 (#111)
AndyH0ng Feb 2, 2026
b5ec59b
fix: /presentations API 연결 (#111)
AndyH0ng Feb 2, 2026
4a8a219
Merge branch 'develop' into refactor/setting-type-111
AndyH0ng Feb 2, 2026
ff9abe7
feat: /comments API 연결 (#111)
AndyH0ng Feb 2, 2026
d8bbbe1
Merge branch 'refactor/setting-type-111' of https://github.com/TTORAN…
AndyH0ng Feb 2, 2026
295b1ae
feat: 구글 로그인 연동 (#111)
AndyH0ng Feb 2, 2026
6523ec7
feat: 네이버 카카오 로그인 연동 (#111)
AndyH0ng Feb 2, 2026
a026d8f
feat: 로그인 콜백 및 라우팅 (#111)
AndyH0ng Feb 2, 2026
778b328
design: 제목 수정 팝오버 사용성 개선 (#111)
AndyH0ng Feb 2, 2026
59b5a03
fix: 빌드 오류 해결 (#111)
AndyH0ng Feb 2, 2026
06f29fb
refactor: api 연동 구조 변경 (#111)
kimyw1018 Feb 3, 2026
44f486e
refactor: 빌드에러 수정(#111)
kimyw1018 Feb 4, 2026
5e75db5
fix: 무한루프 해결(#111)
kimyw1018 Feb 4, 2026
eed8303
fix: SocialLoginSuccessResponseDto로 업데이트 (#111)
AndyH0ng Feb 4, 2026
05bda5c
refactor: Script 타입을 DTO로 통합 (#111)
AndyH0ng Feb 4, 2026
3ecaf2e
refactor: Slide 타입을 DTO로 통합 (#111)
AndyH0ng Feb 4, 2026
0d632a5
refactor: Comment 타입을 DTO로 통합 (#111)
AndyH0ng Feb 4, 2026
435a0d5
fix: DTO export 누락 및 import 오류 수정 (#111)
AndyH0ng Feb 4, 2026
7e65f9c
Merge branch 'refactor/setting-type-111' of https://github.com/TTORAN…
kimyw1018 Feb 4, 2026
e27ed4a
refactor: Video DTO 구조 통일 (#111)
AndyH0ng Feb 4, 2026
d1a545b
Merge branch 'refactor/setting-type-111' of https://github.com/TTORAN…
AndyH0ng Feb 4, 2026
e633cfb
Merge branch 'develop' into refactor/setting-type-111
AndyH0ng Feb 4, 2026
73dd156
fix: 빌드 오류 2/3 해결 (#111)
AndyH0ng Feb 4, 2026
411b6ee
fix: Recording props 수정(#111)
kimyw1018 Feb 4, 2026
02119e3
fix: 클로드 리뷰 반영 (#111)
kimyw1018 Feb 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions src/api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,21 @@ import { useAuthStore } from '@/stores/authStore';
export const API_TIMEOUT_MS = 10000;

/**
* API 에러 응답 타입
* API 에러 응답 타입 (FAILURE 응답의 error 필드)
*/
export interface ApiError {
message: string;
code?: string;
status?: number;
export interface ApiErrorResponse {
errorCode: string;
reason: string;
data?: unknown;
}

/**
* API FAILURE 응답 구조
*/
export interface ApiFailureResponse {
resultType: 'FAILURE';
error: ApiErrorResponse;
success: null;
}

/**
Expand Down Expand Up @@ -69,14 +78,15 @@ apiClient.interceptors.request.use(
*/
apiClient.interceptors.response.use(
(response) => response,
(error: AxiosError<ApiError>) => {
(error: AxiosError<ApiFailureResponse>) => {
const status = error.response?.status;
const message = error.response?.data?.message || '알 수 없는 오류가 발생했습니다';
const errorData = error.response?.data?.error;
const reason = errorData?.reason || '알 수 없는 오류가 발생했습니다';

// [하이브리드 전략]
// 시스템 에러 (401 인증, 500 서버 장애)는 Axios가 즉시 처리
if (status === 401 || (status && status >= 500)) {
handleApiError(status, message);
handleApiError(status, reason);
// 다운스트림(React Query 등)에서 중복 처리하지 않도록 플래그 설정
error.isHandled = true;
}
Expand Down
8 changes: 8 additions & 0 deletions src/api/dto/analytics.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* 대본 복원 요청 DTO
*/
export interface RestoreScriptRequestDto {
version: number;
}

//위 형식대로 response, request dto 작성 부탁드립니다.
32 changes: 32 additions & 0 deletions src/api/dto/auth.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* 인증 관련 DTO
*/

/**
* 소셜 로그인 성공 응답의 사용자 정보
*/
export interface SocialLoginUserResponseDto {
id: string;
email: string;
name: string;
sessionId: string;
}

/**
* 소셜 로그인 성공 응답의 토큰 정보
*/
export interface SocialLoginTokensResponseDto {
accessToken: string;
refreshToken: string;
}

/**
* 소셜 로그인 성공 응답
*/
export interface SocialLoginSuccessResponseDto {
message: string;
user: SocialLoginUserResponseDto;
tokens: SocialLoginTokensResponseDto;
}

//위 형식대로 response, request dto 작성 부탁드립니다.
114 changes: 114 additions & 0 deletions src/api/dto/comments.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
/**
* 답글작성
*/
export interface CreateReplyCommentRequestDto {
commentId: string;
}

/**
* 답글작성 response DTO
*/
export interface CreateReplyCommentResponseDto {
id: string;
content: string;
parentId: string;
userId: string;
createdAt: string;
}

/**
* 답글 목록 조회 DTO
*/
export interface GetRepliesResponseDto {
comments: Array<{
id: string;
content: string;
parentId: string | null;
userId: string;
createdAt: string;
}>;
}
/**
* 슬라이드 댓글 작성
*/
export interface CreateCommentRequestDto {
slideId: string;
}
/**
* 슬라이드 댓글 작성 response DTO
*/
export interface CreateCommentResponseDto {
id: string;
content: string;
userId: string;
createdAt: string;
}
/**
* 댓글 작성자 정보
*/
export interface CommentUserDto {
id: string;
nickName: string;
}

/**
* 사용자 정보 포함 댓글
*/
export interface CommentWithUserDto {
id: string;
content: string;
user: CommentUserDto;
createdAt: string;
updatedAt: string;
}

/**
* 슬라이드 댓글 목록 조회 응답
*/
export interface GetSlideCommentsResponseDto {
comments: CommentWithUserDto[];
pagination: {
page: number;
limit: number;
total: number;
totalPages: number;
};
}

/**
* 댓글 생성/수정 응답
*/
export interface CommentResponseDto {
id: string;
content: string;
parentId?: string;
userId: string;
createdAt: string;
}

/**
* 답글 목록 조회 응답
*/
export type GetReplyListResponseDto = CommentResponseDto[];
/**
* 댓글 수정
*/
export interface UpdateCommentResponseDto {
id: string;
content: string;
userId: string;
createdAt: string;
}
/**
* 댓글 및, 답글 삭제
*/
export interface DeleteCommentRequestDto {
commentId: string;
}
/**
* 영상 타임스탬프 댓글 생성
*/
export interface CreateVideoCommentRequestDto {
content: string;
timestampMs: number;
}
Empty file added src/api/dto/files.dto.ts
Empty file.
49 changes: 49 additions & 0 deletions src/api/dto/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/**
* @file index.ts
* @description DTO 배럴 export
*/

export type {
SocialLoginSuccessResponseDto,
SocialLoginTokensResponseDto,
SocialLoginUserResponseDto,
} from './auth.dto';
export type {
CreateSlideResponseDto,
GetSlideResponseDto,
UpdateSlideResponseDto,
UpdateSlideTitleRequestDto,
} from './slides.dto';
export type {
UpdateScriptRequestDto,
GetScriptResponseDto,
GetScriptVersionHistoryResponseDto,
RestoreScriptResponseDto,
} from './scripts.dto';
export type { ToggleSlideReactionDto } from './reactions.dto';
export type { RestoreScriptRequestDto } from './analytics.dto';
export type { UpdateProjectDto } from './presentations.dto';
// export type { UploadFileResponseDto } from './files.dto';
export type {
ChunkUploadResponseDto,
CreateOpinionDto,
FinishVideoRequestDto,
FinishVideoResponseDto,
StartVideoRequestDto,
StartVideoResponseDto,
} from './video.dto';
export type {
CommentResponseDto,
CommentUserDto,
CommentWithUserDto,
CreateCommentRequestDto,
CreateCommentResponseDto,
CreateReplyCommentRequestDto,
CreateReplyCommentResponseDto,
CreateVideoCommentRequestDto,
DeleteCommentRequestDto,
GetRepliesResponseDto,
GetReplyListResponseDto,
GetSlideCommentsResponseDto,
UpdateCommentResponseDto,
} from './comments.dto';
6 changes: 6 additions & 0 deletions src/api/dto/presentations.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* 프로젝트 제목 수정 요청 DTO
*/
export interface UpdateProjectDto {
title?: string;
}
8 changes: 8 additions & 0 deletions src/api/dto/reactions.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { ReactionType } from '@/types/script';

/**
* 슬라이드 리액션 토글 요청 DTO
*/
export interface ToggleSlideReactionDto {
type: ReactionType;
}
39 changes: 39 additions & 0 deletions src/api/dto/scripts.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* 대본 저장 및 수정 DTO
*/
export interface UpdateScriptRequestDto {
script: string;
}
/**
* 대본 조회 DTO
*/
export interface GetScriptResponseDto {
message: string;
slideId: string;
charCount: number;
scriptText: string;
estimatedDurationSeconds: number;
createdAt: string;
updatedAt: string;
}
/**
* 대본 버전 히스토리 목록 조회 DTO
*/
export interface GetScriptVersionHistoryResponseDto {
versionNumber: number;
scriptText: string;
charCount: number;
createdAt: string;
}
/**
* 특정 버전으로 대본 복원 DTO
*/
export interface RestoreScriptResponseDto {
message: string;
slideId: string;
charCount: number;
scriptText: string;
estimatedDurationSeconds: number;
createdAt: string;
updatedAt: string;
}
Empty file added src/api/dto/session.dto.ts
Empty file.
Empty file added src/api/dto/sharelink.dto.ts
Empty file.
44 changes: 44 additions & 0 deletions src/api/dto/slides.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* 슬라이드 목록 조회 DTO
*/
export interface CreateSlideResponseDto {
slideId: string;
projectId: string;
title: string;
slideNum: number;
imageUrl: string;
createdAt: string;
updatedAt: string;
}

/**
* 슬라이드 제목 수정 요청 DTO
*/
export interface UpdateSlideTitleRequestDto {
title?: string;
}

/**
* 슬라이드 상세 조회 DTO
*/
export interface GetSlideResponseDto {
slideId: string;
projectId: string;
title: string;
slideNum: number;
imageUrl: string;
prevSlideId: string | null;
nextSlideId: string | null;
updatedAt: string;
}

/**
* 슬라이드 수정 응답 DTO
*/
export interface UpdateSlideResponseDto {
slideId: string;
title: string;
slideNum: number;
imageUrl: string;
updatedAt: string;
}
Loading
Loading