Skip to content

Commit a74e18f

Browse files
committed
Merge dev into feat/shared-component-header
2 parents 3501f4f + 09c0585 commit a74e18f

File tree

8 files changed

+221
-138
lines changed

8 files changed

+221
-138
lines changed
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
/**
2+
- isSuccess: 요청 성공 여부
3+
- code: 응답 코드 (예: TEAM004)
4+
- message: 응답 메시지 (예: "This is a deleted post.")
5+
- result?: 응답 데이터 (제네릭 타입)
6+
*/
17
interface ApiResponse<T = unknown> {
2-
isSuccess: boolean // 요청 성공 여부
3-
code: string // 응답 코드 (예: TEAM004)
4-
message: string // 응답 메시지 (예: "This is a deleted post.")
5-
result?: T // 응답 데이터 (제네릭 타입)
8+
isSuccess: boolean
9+
code: string
10+
message: string
11+
result?: T
612
}

src/types/api/Auth.types.d.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
/*
2-
path: '/v1/auth'
3-
GET: 로그인한 유저 조회
1+
/**
2+
- path: '/v1/auth'
3+
- GET: 로그인한 유저 조회
44
*/
55
export type GetLoggedInUserResponse = User
66

7-
/*
8-
path: '/v1/auth/sign-up'
9-
POST: 회원가입
7+
/**
8+
- path: '/v1/auth/sign-up'
9+
- POST: 회원가입
1010
*/
1111
export interface SignUpRequest {
1212
email: Email // 이메일
@@ -18,9 +18,9 @@ export interface SignUpResponse extends User {
1818
gitHub: GitHub // GitHub 계정 URL
1919
}
2020

21-
/*
22-
path: '/v1/auth/sign-in'
23-
POST: 로그인
21+
/**
22+
- path: '/v1/auth/sign-in'
23+
- POST: 로그인
2424
*/
2525
export interface SignInRequest {
2626
email: Email // 이메일
@@ -32,9 +32,9 @@ export interface SignInResponse extends User {
3232
refreshToken: Token // 리프레시 토큰
3333
}
3434

35-
/*
36-
path: '/v1/auth/new-token'
37-
POST: 액세스 토큰 재발급
35+
/**
36+
- path: '/v1/auth/new-token'
37+
- POST: 액세스 토큰 재발급
3838
*/
3939
export interface RefreshTokenRequest {
4040
oldAccessToken: Token // 기존의 access token
@@ -44,9 +44,9 @@ export interface AccessTokenResponse {
4444
accessToken: Token // 신규 access token
4545
}
4646

47-
/*
48-
path: '/v1/auth/check-email'
49-
POST: 이메일 중복 체크
47+
/**
48+
- path: '/v1/auth/check-email'
49+
- POST: 이메일 중복 체크
5050
*/
5151
export interface CheckEmailRequest {
5252
email: Email // 검사하고자 하는 이메일

src/types/api/Community.types.d.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,47 +22,47 @@ interface CommunityDetail extends CommunityListItem {
2222
isComment: boolean // 댓글 허용 여부
2323
}
2424

25-
/*
26-
path: '/v1/community'
27-
GET: 커뮤니티 글 전체 조회
25+
/**
26+
- path: '/v1/community'
27+
- GET: 커뮤니티 글 전체 조회
2828
*/
2929
export type GetCommunityListResponse = CommunityListItem[]
30-
/*
31-
POST: 커뮤니티 글 등록
30+
/**
31+
- POST: 커뮤니티 글 등록
3232
*/
33-
export interface CommunityCreateRequest extends CommunityBase {
33+
export interface CreateCommunityRequest extends CommunityBase {
3434
isComment?: boolean // 댓글 허용 여부
3535
}
36-
export interface CommunityCreateResponse extends CommunityBase, TimeStamps {
36+
export interface CreateCommunityResponse extends CommunityBase, TimeStamps {
3737
id: Id // 생성된 커뮤니티 글 ID
3838
member: Id // 작성자 Id
3939
isComment: boolean // 댓글 허용 여부
4040
}
4141

42-
/*
43-
path: '/v1/community/{id}'
44-
GET: 커뮤니티 글 상세 조회
42+
/**
43+
- path: '/v1/community/{id}'
44+
- GET: 커뮤니티 글 상세 조회
4545
*/
4646
export type GetCommunityDetailResponse = CommunityDetail
4747

48-
/*
49-
PATCH: 커뮤니티 글 수정
48+
/**
49+
- PATCH: 커뮤니티 글 수정
5050
*/
51-
export type CommunityUpdateRequest = CommunityBase
52-
export type CommunityUpdateResponse = CommunityCreateResponse
51+
export type UpdateCommunityRequest = CommunityBase
52+
export type UpdateCommunityResponse = CreateCommunityResponse
5353

54-
/*
55-
DELETE: 커뮤니티 글 삭제
56-
반환 값: 기본 ApiResponse 구조 사용
54+
/**
55+
- DELETE: 커뮤니티 글 삭제
56+
- 반환 값: 기본 ApiResponse 구조 사용
5757
{
5858
"isSuccess": true,
5959
"code": "COMMON200",
6060
"message": "팀 모집글이 성공적으로 삭제되었습니다."
6161
}
6262
*/
6363

64-
/*
65-
path: '/v1/community/top5'
66-
GET: 좋아요 순으로 인기 커뮤니티 Top 5 유저 조회
64+
/**
65+
- path: '/v1/community/top5'
66+
- GET: 좋아요 순으로 인기 커뮤니티 Top 5 유저 조회
6767
*/
6868
export type GetCommunityTop5Response = CommunityTopMember[]

src/types/api/Global.types.d.ts

Lines changed: 66 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,89 @@
11
// 기본 타입 정의
2-
type Id = number // 고유 ID
3-
type Token = string // JWT 또는 인증 토큰
2+
3+
/**
4+
고유 ID
5+
*/
6+
type Id = number
7+
/**
8+
URL
9+
*/
10+
type URL = string
11+
/**
12+
JWT 또는 인증 토큰
13+
*/
14+
type Token = string
415

516
// 사용자 관련 타입
6-
type Email = string // 이메일
7-
type Password = string // 비밀번호
8-
type Name = string // 사용자 이름
9-
type Nickname = string // 닉네임
10-
type GitHub = string // GitHub 프로필 URL
1117

12-
// 공통 속성 타입
13-
type TechStack = string // 기술 스택 (예: "React", "Node.js")
18+
/**
19+
사용자 이메일
20+
*/
21+
type Email = string
22+
/**
23+
사용자 비밀번호
24+
*/
25+
type Password = string
26+
/**
27+
사용자 이름
28+
*/
29+
type Name = string
30+
/**
31+
사용자 닉네임
32+
*/
33+
type Nickname = string
34+
/**
35+
사용자 GitHub 프로필 URL
36+
*/
37+
type GitHub = string
38+
39+
/**
40+
기술 스택 (예: "React", "Node.js")
41+
*/
42+
type TechStack = string
1443

15-
// 타임스탬프 정의
44+
/**
45+
타임스탬프 정의 (Format: date-time)
46+
- createdAt: 생성 시간 (ISO 8601)
47+
- updatedAt?: 수정 시간 (선택적, ISO 8601)
48+
*/
1649
type TimeStamps = {
17-
// Format: date-time
18-
createdAt: string // 생성 시간 (ISO 8601)
19-
updatedAt?: string // 수정 시간 (선택적, ISO 8601)
50+
createdAt: string
51+
updatedAt?: string
2052
}
2153

54+
<<<<<<< HEAD
2255
// 사용자 관련 인터페이스
2356
interface User {
2457
id: Id // 사용자 고유 ID
2558
email: Email // 이메일
2659
name: Name // 이름
2760
nickname: Nickname // 닉네임
2861
imageUrl: string // 프로필 이미지 URL
62+
=======
63+
/**
64+
사용자 관련 인터페이스
65+
- id: 사용자 고유 ID
66+
- email: 이메일
67+
- name: 이름
68+
- nickname: 닉네임
69+
- imageUrl: 프로필 이미지 URL
70+
*/
71+
type User = {
72+
id: Id
73+
email: Email
74+
name: Name
75+
nickname: Nickname
76+
imageUrl: URL
77+
>>>>>>> 09c05858097bed55b3b4f6c49d5228b9687e45d3
2978
}
3079

3180
// MemberInfo: 일부 사용자 정보를 제외한 타입
3281
type MemberInfo = Omit<User, 'email' | 'name'>
3382

83+
/**
84+
- request: T
85+
- file?: Format: binary
86+
*/
3487
interface MultipartFormData<T> {
3588
request: T
3689
/** Format: binary */

src/types/api/MyPage.types.d.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,52 +12,52 @@ export interface ProfileBase {
1212
affiliation?: AffiliationType // 소속
1313
}
1414

15-
/*
16-
path: '/v1/my-page/profile'
17-
GET: 마이페이지 프로필 조회
15+
/**
16+
- path: '/v1/my-page/profile'
17+
- GET: 마이페이지 프로필 조회
1818
*/
1919
export interface GetProfileResponse extends ProfileBase, User {
2020
completionRate: number // 포트폴리오 완성률 (%)
2121
}
2222

23-
/*
24-
PATCH: 마이페이지 프로필 저장
23+
/**
24+
- PATCH: 마이페이지 프로필 저장
2525
*/
26-
export type ProfileUpdateRequest = MultipartFormData<ProfileBase>
26+
export type UpdateProfileRequest = MultipartFormData<ProfileBase>
2727

28-
export interface ProfileUpdateResponse extends ProfileBase {
28+
export interface UpdateProfileResponse extends ProfileBase {
2929
completionRate?: number // 포트폴리오 완성률 (%)
3030
}
3131

32-
/*
33-
path: '/v1/my-page/check-nickname'
34-
POST: 닉네임 중복 체크
32+
/**
33+
- path: '/v1/my-page/check-nickname'
34+
- POST: 닉네임 중복 체크
3535
*/
3636
export interface CheckNicknameRequest {
3737
nickname: Nickname // 닉네임 중복 검사 대상
3838
}
3939

4040
export type CheckNicknameResponse = boolean
4141

42-
/*
43-
PasswordUpdateResponse
42+
/**
43+
- UpdatePasswordResponse
4444
{
4545
"isSuccess": true,
4646
"code": "COMMON200",
4747
"message": "비밀번호 수정이 완료되었습니다."
4848
}
4949
*/
5050

51-
/*
52-
path: '/v1/my-page/password'
53-
PATCH: 마이 페이지 비밀번호 수정
51+
/**
52+
- path: '/v1/my-page/password'
53+
- PATCH: 마이 페이지 비밀번호 수정
5454
*/
55-
export interface PasswordUpdateRequest {
55+
export interface UpdatePasswordRequest {
5656
password: Password // 새 비밀번호
5757
}
5858

59-
/*
60-
PasswordUpdateResponse
59+
/**
60+
- UpdatePasswordResponse
6161
{
6262
"isSuccess": true,
6363
"code": "COMMON200",

0 commit comments

Comments
 (0)