Skip to content

Commit 205bb22

Browse files
committed
[#60] ✨ update team types
1 parent b2aa829 commit 205bb22

File tree

1 file changed

+84
-7
lines changed

1 file changed

+84
-7
lines changed

src/types/team.types.d.ts

Lines changed: 84 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,93 @@ export type TeamLabelType = '스터디' | '프로젝트' | '멘토링'
33
export type TeamRecruitmentLabelType = '모집 중' | '모집 완료'
44
export type TeamPosition = string
55

6-
export interface TeamCreateRequest {
7-
teamTitle?: Title
8-
teamContent?: Content
9-
teamType?: TeamType
10-
teamPosition?: TeamPosition
11-
teamRecruitmentNum?: number
6+
type TeamBaseBody = {
7+
teamTitle: string
8+
teamContent: string
9+
teamType: TeamType
10+
teamPosition: TeamPosition
11+
teamRecruitmentNum: number
1212
teamTechStack?: TechStack[]
1313
teamTags?: Tag[]
1414
}
1515

16+
export interface TeamListType extends PostBaseBody {
17+
teamTitle: string
18+
teamContent: string
19+
teamType: TeamType
20+
teamPosition: string
21+
teamRecruitmentNum: number
22+
teamTechStack: string[]
23+
teamTags: string[]
24+
teamIsActive: boolean
25+
}
26+
27+
/*
28+
path: '/v1/team'
29+
30+
GET: 팀 모집급 전체 조회
31+
*/
32+
export type GetTeamListResponse = TeamListType[]
33+
34+
/* POST: 팀 모집글 등록 */
35+
export type TeamCreateRequest = TeamBaseBody
36+
export interface TeamCreateResponse extends TimeStamps, TeamBaseBody {
37+
id: Id
38+
}
39+
40+
/*
41+
path: '/v1/team/{teamId}'
42+
GET: 팀 모집글 상세 조회
43+
*/
44+
export type GetTeamDetailResponse = TeamListType
45+
46+
/* DELETE: 팀 모집글 삭제
47+
48+
반환 값:
49+
{
50+
"isSuccess": true,
51+
"code": "COMMON200",
52+
"message": "팀 모집글이 성공적으로 삭제되었습니다."
53+
}
54+
*/
55+
56+
/*
57+
path: '/v1/team/{teamId}/add'
58+
59+
POST: 팀 멤버 추가
60+
*/
1661
export interface TeamAddMemberRequest {
17-
memberId?: Id
62+
memberId: Id
63+
}
64+
export interface TeamAddMemberResponse {
65+
id: Id
66+
teamId: Id
67+
memberId: Id
68+
}
69+
70+
/*
71+
path: '/v1/team/{teamId}/close'
72+
PATCH: 팀 모집 마감
73+
74+
반환 값:
75+
{
76+
"isSuccess": true,
77+
"code": "COMMON200",
78+
"message": "모집 상태가 마감되었습니다."
79+
}
80+
*/
81+
82+
/*
83+
path: '/v1/team/{teamId}/search-members'
84+
GET: 멤버 리스트 검색
85+
*/
86+
export type SearchMembersResponse = MemberInfo[]
87+
88+
/*
89+
path: '/v1/team/{teamId}/members'
90+
GET: 팀 멤버 전체 조회
91+
*/
92+
export type GetTeamMembersResponse = {
93+
teamId: Id
94+
members: MemberInfo[]
1895
}

0 commit comments

Comments
 (0)