feat(): update resume contracts

This commit is contained in:
gitgernit
2025-11-22 17:30:46 +03:00
parent 995141a200
commit 2963460b1c
16 changed files with 847 additions and 64 deletions
+40 -16
View File
@@ -58,18 +58,30 @@ class TestApiGateway:
self,
access_token: str,
position: str,
location: str,
about_me: str,
key_skills: list[str],
experience_type: str,
experience: list[dict[str, Any]] | None = None,
education: list[dict[str, Any]] | None = None,
projects: list[dict[str, Any]] | None = None,
) -> Response:
json_data: dict[str, Any] = {
"position": position,
"location": location,
"about_me": about_me,
"key_skills": key_skills,
"experience_type": experience_type,
}
if experience is not None:
json_data["experience"] = experience
if education is not None:
json_data["education"] = education
if projects is not None:
json_data["projects"] = projects
return await self._client.post(
"/resume",
json={
"position": position,
"about_me": about_me,
"key_skills": key_skills,
"experience_type": experience_type,
},
json=json_data,
headers=make_auth_headers(access_token),
)
@@ -84,22 +96,34 @@ class TestApiGateway:
access_token: str,
resume_id: str,
position: str | None = None,
location: str | None = None,
about_me: str | None = None,
key_skills: list[str] | None = None,
experience_type: str | None = None,
experience: list[dict[str, Any]] | None = None,
education: list[dict[str, Any]] | None = None,
projects: list[dict[str, Any]] | None = None,
) -> Response:
json_data: dict[str, Any] = {}
if position is not None:
json_data["position"] = position
if location is not None:
json_data["location"] = location
if about_me is not None:
json_data["about_me"] = about_me
if key_skills is not None:
json_data["key_skills"] = key_skills
if experience_type is not None:
json_data["experience_type"] = experience_type
if experience is not None:
json_data["experience"] = experience
if education is not None:
json_data["education"] = education
if projects is not None:
json_data["projects"] = projects
return await self._client.patch(
f"/resume/{resume_id}",
json={
key: value
for key, value in {
"position": position,
"about_me": about_me,
"key_skills": key_skills,
"experience_type": experience_type,
}.items()
if value is not None
},
json=json_data,
headers=make_auth_headers(access_token),
)