|
1 | 1 | """ |
2 | | -types schem of resume score service |
| 2 | +types schema of Resume Matcher(Score) service |
3 | 3 | https://magicalapi.com/services/resume-score |
4 | 4 | """ |
5 | 5 |
|
6 | 6 | from __future__ import annotations |
7 | 7 |
|
| 8 | +from typing import Literal |
| 9 | + |
8 | 10 | from .base import BaseModelValidated, BaseResponse |
9 | 11 |
|
| 12 | +Category = Literal[ |
| 13 | + "job", |
| 14 | + "education", |
| 15 | + "skills", |
| 16 | + "other", |
| 17 | +] |
| 18 | + |
| 19 | + |
| 20 | +class StrengthItem(BaseModelValidated): |
| 21 | + text: str | None |
| 22 | + category: Category |
| 23 | + |
| 24 | + |
| 25 | +class ImprovementItem(BaseModelValidated): |
| 26 | + text: str | None |
| 27 | + category: Category |
| 28 | + |
| 29 | + |
| 30 | +class ProsSchema(BaseModelValidated): |
| 31 | + type: str | None |
| 32 | + message: str | None |
| 33 | + |
| 34 | + |
| 35 | +class ConsSchema(BaseModelValidated): |
| 36 | + type: str | None |
| 37 | + message: str | None |
| 38 | + |
| 39 | + |
| 40 | +class WarnSchema(BaseModelValidated): |
| 41 | + type: str | None |
| 42 | + message: str | None |
| 43 | + |
| 44 | + |
| 45 | +class JobMatchResponse(BaseModelValidated): |
| 46 | + score: int |
| 47 | + summary: str | None |
| 48 | + pros: list[ProsSchema] |
| 49 | + cons: list[ConsSchema] |
| 50 | + warns: list[WarnSchema] |
| 51 | + |
| 52 | + |
| 53 | +class SkillGroups(BaseModelValidated): |
| 54 | + all_skills: list[str] |
| 55 | + |
| 56 | + |
| 57 | +class SkillMatch(BaseModelValidated): |
| 58 | + miss_match: list[str] |
| 59 | + partial_match: list[str] |
| 60 | + strong_match: list[str] |
| 61 | + |
| 62 | + |
| 63 | +class SkillMatchResponse(BaseModelValidated): |
| 64 | + score: int |
| 65 | + summary: str | None |
| 66 | + skills: SkillGroups |
| 67 | + match_result: SkillMatch |
| 68 | + |
| 69 | + |
| 70 | +class EducationMatchResponse(BaseModelValidated): |
| 71 | + score: int |
| 72 | + summary: str | None |
| 73 | + pros: list[ProsSchema] |
| 74 | + cons: list[ConsSchema] |
| 75 | + warns: list[WarnSchema] |
| 76 | + |
| 77 | + |
| 78 | +class MoreInformationResponse(BaseModelValidated): |
| 79 | + region: str | None |
| 80 | + overqualification_status: bool |
| 81 | + qualification_reason: str | None |
| 82 | + |
10 | 83 |
|
11 | | -class ResumeScore(BaseModelValidated): |
| 84 | +class ScoreResponse(BaseModelValidated): |
12 | 85 | score: int |
13 | | - reason: str |
| 86 | + summary: str |
| 87 | + strengths: list[StrengthItem] |
| 88 | + improvements: list[ImprovementItem] |
| 89 | + job_match: JobMatchResponse |
| 90 | + skill_match: SkillMatchResponse |
| 91 | + education_match: EducationMatchResponse |
| 92 | + more_information: MoreInformationResponse |
| 93 | + jd_text: str | None |
14 | 94 |
|
15 | 95 |
|
16 | 96 | class ResumeScoreResponse(BaseResponse): |
17 | 97 | """ |
18 | | - the main resposne schema for resume score service |
| 98 | + the main response schema for Resume Matcher(Score) service |
19 | 99 | https://magicalapi.com/services/resume-score |
20 | 100 | """ |
21 | 101 |
|
22 | | - data: ResumeScore |
| 102 | + data: ScoreResponse |
0 commit comments