diff --git a/huntflow_api_client/models/request/applicants.py b/huntflow_api_client/models/request/applicants.py index 67416be..4ed6e67 100644 --- a/huntflow_api_client/models/request/applicants.py +++ b/huntflow_api_client/models/request/applicants.py @@ -31,6 +31,11 @@ class ApplicantSocial(BaseModel): value: str = Field(..., description="Value") +class ApplicantSite(BaseModel): + site_type: Literal["MAX"] = Field(..., description="Type") + value: str = Field(..., description="Value") + + class ApplicantCreateRequest(Applicant, JsonRequestModel): birthday: Optional[date] = Field(None, description="Date of birth") externals: Optional[List[ApplicantResumeCreate]] = Field( @@ -43,6 +48,11 @@ class ApplicantCreateRequest(Applicant, JsonRequestModel): max_length=1, description="List of applicant's social accounts", ) + site: List[ApplicantSite] = Field( + [], + max_length=1, + description="List of applicant's sites", + ) class ApplicantUpdateRequest(Applicant, JsonRequestModel): @@ -52,6 +62,11 @@ class ApplicantUpdateRequest(Applicant, JsonRequestModel): max_length=1, description="List of applicant's social accounts", ) + site: Optional[List[ApplicantSite]] = Field( + None, + max_length=1, + description="List of applicant's sites", + ) class ApplicantEvent(BaseModel): diff --git a/huntflow_api_client/models/response/applicants.py b/huntflow_api_client/models/response/applicants.py index 5ae7b5e..13724dd 100644 --- a/huntflow_api_client/models/response/applicants.py +++ b/huntflow_api_client/models/response/applicants.py @@ -62,6 +62,12 @@ class ApplicantSocial(BaseModel): verification_date: Optional[datetime] = Field(None, description="Verification date") +class ApplicantSite(BaseModel): + id: PositiveInt = Field(..., description="Site ID") + site_type: str = Field(..., description="Type") + value: str = Field(..., description="Value") + + class ApplicantItem(Applicant): id: int = Field(..., description="Applicant ID") account: int = Field(..., description="Organization ID") @@ -87,6 +93,7 @@ class ApplicantItem(Applicant): ) doubles: List[ApplicantDouble] = Field(..., description="List of duplicates") social: List[ApplicantSocial] = Field(..., description="List of applicant's social accounts") + site: List[ApplicantSite] = Field(..., description="List of applicant's sites") class ApplicantListResponse(PaginatedResponse): @@ -112,6 +119,7 @@ class ApplicantCreateResponse(Applicant): ) external: List[ApplicantResume] = Field(..., description="Applicant's resume") social: List[ApplicantSocial] = Field(..., description="List of applicant's social accounts") + site: List[ApplicantSite] = Field(..., description="List of applicant's sites") class ApplicantSearchItem(BaseModel): diff --git a/pyproject.toml b/pyproject.toml index f5c2ff8..de73ace 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "huntflow-api-client" -version = "2.13.3" +version = "2.13.4" description = "Huntflow API Client for Python" authors = [ {name = "Developers huntflow", email = "developer@huntflow.ru"}, diff --git a/tests/test_entities/test_applicants.py b/tests/test_entities/test_applicants.py index 1c46992..d5507c5 100644 --- a/tests/test_entities/test_applicants.py +++ b/tests/test_entities/test_applicants.py @@ -58,6 +58,7 @@ "agreement": None, "doubles": [], "social": [], + "site": [], }, { "first_name": "Test", @@ -96,6 +97,7 @@ "agreement": {"state": None, "decision_date": None}, "doubles": [], "social": [], + "site": [], }, ], } @@ -144,6 +146,13 @@ "verification_date": "2020-01-01T00:00:00+03:00", }, ], + "site": [ + { + "id": 1, + "site_type": "MAX", + "value": "https://max.ru/u/1xBeccJnjIvmlJflCNJjZOVtCJXNzrciOTWpebTSQLPspjUoBgj", + }, + ], } APPLICANT_CREATE_REQUEST: Dict[str, Any] = { "first_name": "John", @@ -166,6 +175,12 @@ }, ], "social": [{"social_type": "TELEGRAM", "value": "TelegramUsername"}], + "site": [ + { + "site_type": "MAX", + "value": "https://max.ru/u/1xBeccJnjIvmlJflCNJjZOVtCJXNzrciOTWpebTSQLPspjUoBgj", + }, + ], } APPLICANT_CREATE_RESPONSE: Dict[str, Any] = { "first_name": "John", @@ -201,6 +216,13 @@ "verification_date": "2020-01-01T00:00:00+03:00", }, ], + "site": [ + { + "id": 1, + "site_type": "MAX", + "value": "https://max.ru/u/1xBeccJnjIvmlJflCNJjZOVtCJXNzrciOTWpebTSQLPspjUoBgj", + }, + ], } APPLICANT_PATCH_REQUEST: Dict[str, Any] = {"first_name": "Newname", "social": []} APPLICANT_PATCH_RESPONSE: Dict[str, Any] = { @@ -248,6 +270,7 @@ "verification_date": "2020-01-01T00:00:00+03:00", }, ], + "site": [], } APPLICANT_SEARCH_BY_CURSOR_RESPONSE = {