From 0fbe352ef880ff5ec2a38870b76b000482019cd5 Mon Sep 17 00:00:00 2001 From: koval Date: Tue, 9 Jan 2024 10:04:22 +0300 Subject: [PATCH] Fix DelayedTaskResponse model. --- huntflow_api_client/models/response/delayed_tasks.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/huntflow_api_client/models/response/delayed_tasks.py b/huntflow_api_client/models/response/delayed_tasks.py index a99b269..b38101d 100644 --- a/huntflow_api_client/models/response/delayed_tasks.py +++ b/huntflow_api_client/models/response/delayed_tasks.py @@ -18,6 +18,15 @@ class TaskLog(BaseModel): comment: t.Optional[str] = Field(None, description="Comment text") +class MultivacancyAddChildTaskResult(BaseModel): + child_vacancy_id: int + + +class MultivacancyUpsertTaskResult(BaseModel): + parent_vacancy_id: int + children_vacancies_ids: t.List[int] + + class DelayedTaskResponse(BaseModel): task_id: UUID = Field(..., description="Task ID") state: TaskState = Field(..., description="Current task status") @@ -38,3 +47,6 @@ class DelayedTaskResponse(BaseModel): description="Date and time of the last task update (ISO 8601)", ) states_log: t.List[TaskLog] = Field(..., description="Task change log") + result: t.Union[MultivacancyAddChildTaskResult, MultivacancyUpsertTaskResult, t.Any] = Field( + ..., description="Task execution result", + )