Skip to content

Commit

Permalink
Fix DelayedTaskResponse model.
Browse files Browse the repository at this point in the history
  • Loading branch information
koval committed Jan 9, 2024
1 parent 2690666 commit 0fbe352
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions huntflow_api_client/models/response/delayed_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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",
)

0 comments on commit 0fbe352

Please sign in to comment.