chore: initialize wygj monorepo
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
type ApiResult<T> = {
|
||||
code: number;
|
||||
msg: string;
|
||||
data: T;
|
||||
};
|
||||
|
||||
export type InterviewStartRequest = {
|
||||
candidateId: string;
|
||||
positionCode: string;
|
||||
mode: string;
|
||||
};
|
||||
|
||||
export type InterviewQuestionResponse = {
|
||||
questionId: string;
|
||||
seq: number;
|
||||
questionText: string;
|
||||
point: string;
|
||||
scenario: string;
|
||||
sampleAnswer: string;
|
||||
};
|
||||
|
||||
export type InterviewStartResponse = {
|
||||
sessionId: string;
|
||||
candidateId: string;
|
||||
candidateName: string;
|
||||
positionCode: string;
|
||||
questions: InterviewQuestionResponse[];
|
||||
};
|
||||
|
||||
export type InterviewAnswerRequest = {
|
||||
sessionId: string;
|
||||
questionId: string;
|
||||
answerText?: string;
|
||||
answerAudioUrl?: string;
|
||||
};
|
||||
|
||||
export type InterviewAnswerResponse = {
|
||||
score: number;
|
||||
dimensions: Record<string, number>;
|
||||
aiComment: string;
|
||||
};
|
||||
|
||||
export type InterviewFinishRequest = {
|
||||
sessionId: string;
|
||||
};
|
||||
|
||||
export type InterviewFinishResponse = {
|
||||
totalScore: number;
|
||||
suggestion: string;
|
||||
result: string;
|
||||
aiSummary: string;
|
||||
evidence: string;
|
||||
dimensions: Array<{
|
||||
label: string;
|
||||
value: number | string;
|
||||
note: string;
|
||||
}>;
|
||||
records: Array<{
|
||||
time: string;
|
||||
candidate: string;
|
||||
position: string;
|
||||
score: number;
|
||||
result: string;
|
||||
summary: string;
|
||||
}>;
|
||||
};
|
||||
|
||||
export function startInterview(data: InterviewStartRequest): Promise<ApiResult<InterviewStartResponse>> {
|
||||
return request({
|
||||
url: '/api/recruit/interview/start',
|
||||
method: 'post',
|
||||
data,
|
||||
headers: { repeatSubmit: false }
|
||||
});
|
||||
}
|
||||
|
||||
export function submitInterviewAnswer(data: InterviewAnswerRequest): Promise<ApiResult<InterviewAnswerResponse>> {
|
||||
return request({
|
||||
url: '/api/recruit/interview/answer',
|
||||
method: 'post',
|
||||
data,
|
||||
headers: { repeatSubmit: false }
|
||||
});
|
||||
}
|
||||
|
||||
export function finishInterview(data: InterviewFinishRequest): Promise<ApiResult<InterviewFinishResponse>> {
|
||||
return request({
|
||||
url: '/api/recruit/interview/finish',
|
||||
method: 'post',
|
||||
data,
|
||||
headers: { repeatSubmit: false }
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user