-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat: 실시간 소켓 서버 요청 데이터 인터페이스 코드 작성 * feat: 실시간 소켓 서버 응답 데이터 인터페이스 코드 작성 * feat: 실시간 소켓 서버 quiz, choice 데이터 인터페이스 코드 작성 * refactor: 타입 관리를 type -> interface로 변경함에 따라 폴더 삭제 * feat: 실시간 소켓 서버 요청 데이터 인터페이스 barrel 파일 작성 * feat: 실시간 소켓 서버 응답 데이터 인터페이스 barrel 파일 작성 * refactor: 인터페이스명 오타 수정 * refactor: 퀴즈 타입 as const로 상수 처리 * refactor: timeEnd -> isEnd로 오타 수정
- Loading branch information
Showing
21 changed files
with
103 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export * from './master-entry.request.interface'; | ||
export * from './nickname.request.interface'; | ||
export * from './participant-entry.request.interface'; | ||
export * from './show-quiz.request.interface'; | ||
export * from './start-quiz.request.interface'; |
3 changes: 3 additions & 0 deletions
3
packages/shared/interfaces/request/master-entry.request.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface MasterEntryRequest { | ||
classId: number; | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/shared/interfaces/request/nickname.request.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface NicknameRequest { | ||
pinCode: string; | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/shared/interfaces/request/participant-entry.request.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export interface ParticipantEntryRequest { | ||
pinCode: string; | ||
nickname: string; | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/shared/interfaces/request/show-quiz.request.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface ShowQuizRequest { | ||
pinCode: string; | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/shared/interfaces/request/start-quiz.request.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export interface StartQuizRequest { | ||
sid: string; | ||
pinCode: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export * from './master-statistics.response.interface'; | ||
export * from './participant-statistics.response.interface'; | ||
export * from './time-end.response.interface'; | ||
export * from './timer-tick.response.interface'; | ||
export * from './pincode.response.interface'; | ||
export * from './nickname.response.interface'; | ||
export * from './session.response.interface'; | ||
export * from './show-quiz.response.interface'; | ||
export * from './start-quiz.response.interface'; | ||
export * from './submit-answer.request.interface'; |
8 changes: 8 additions & 0 deletions
8
packages/shared/interfaces/response/master-statistics.response.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export interface MasterStatisticsResponse { | ||
totalSubmit: number; | ||
solveRate: number; | ||
averageTime: number; | ||
participantRate: number; | ||
choiceStatus: { [key: number]: number }; | ||
submitHistory: [string, number][]; | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/shared/interfaces/response/nickname.response.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface NicknameResponse { | ||
participantList: string[]; | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/shared/interfaces/response/participant-statistics.response.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export interface ParticipantStatisticsResponse { | ||
totalSubmit: number; | ||
solveRate: number; | ||
averageTime: number; | ||
participantRate: number; | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/shared/interfaces/response/pincode.response.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface PincodeResponse { | ||
pinCode: string; | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/shared/interfaces/response/session.response.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface SessionResponse { | ||
sid: string; | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/shared/interfaces/response/show-quiz.response.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { QuizData } from '../utils/quizdata.interface'; | ||
|
||
export interface ShowQuizResponse { | ||
currentQuizData: QuizData; | ||
isLast: boolean; | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/shared/interfaces/response/start-quiz.response.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface StartQuizResponse { | ||
isStarted: boolean; | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/shared/interfaces/response/submit-answer.request.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export interface SubmitAnswerRequest { | ||
pinCode: string; | ||
sid: string; | ||
selectedAnswer: number[]; | ||
submitTime: number; | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/shared/interfaces/response/time-end.response.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface TimeEndResponse { | ||
isEnd: boolean; | ||
} |
5 changes: 5 additions & 0 deletions
5
packages/shared/interfaces/response/timer-tick.response.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export interface TimerTickResponse { | ||
curretTime: number; | ||
elaspedTime: number; | ||
remainingTime: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export interface Choice { | ||
id: number; | ||
quizId: number; | ||
content: string; | ||
isCorrect: boolean; | ||
position: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Choice } from './choice.interface'; | ||
import { QuizType } from '../../types/quiz.types'; | ||
|
||
export interface QuizData { | ||
id: number; | ||
content: string; | ||
quizType: QuizType; | ||
timeLimit: number; | ||
point: number; | ||
position: number; | ||
choices: Choice[]; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export const QUIZ_TYPES = { | ||
MULTIPLE_CHOICE: 'MC', | ||
TRUE_FALSE: 'TF', | ||
} as const; | ||
|
||
export type QuizType = (typeof QUIZ_TYPES)[keyof typeof QUIZ_TYPES]; |