Skip to content

Commit 8bf70eb

Browse files
authored
Merge pull request #25 from huntflow/INT-683_fix_models
[INT-683] - Fix models.
2 parents 61b4e7e + 9084d29 commit 8bf70eb

File tree

6 files changed

+255
-303
lines changed

6 files changed

+255
-303
lines changed

Diff for: .github/workflows/python-linters.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python-version: ['3.7.15']
13+
python-version: ['3.8.16']
1414

1515
steps:
1616
- uses: actions/checkout@v3
@@ -33,4 +33,4 @@ jobs:
3333
run: pdm run mypy .
3434

3535
- name: Run isort
36-
run: pdm run isort . --check
36+
run: pdm run isort . --check

Diff for: huntflow_webhook_models/common_models/calendar_event.py

+22
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from huntflow_webhook_models.consts import (
77
CalendarEventReminderMethod,
8+
CalendarEventState,
89
CalendarEventStatus,
910
CalendarEventType,
1011
Transparency,
@@ -100,6 +101,21 @@ class CalendarEventReminder(BaseModel):
100101
description="How many minutes in advance to remind about the event",
101102
examples=[1],
102103
)
104+
multiplier: str = Field(
105+
...,
106+
description="Reminder unit of measure.",
107+
examples=["minutes"],
108+
)
109+
value: int = Field(
110+
...,
111+
description="How many units in advance to remind about the event in multiplier",
112+
examples=[1],
113+
)
114+
115+
116+
class InterviewType(BaseModel):
117+
id: int = Field(..., description="Interview type ID", examples=[1])
118+
name: str = Field(..., description="Interview type name", examples=["Phone Interview"])
103119

104120

105121
class ApplicantLogCalendarEvent(BaseModel):
@@ -120,6 +136,7 @@ class ApplicantLogCalendarEvent(BaseModel):
120136
description="Event type",
121137
examples=[CalendarEventType.interview],
122138
)
139+
interview_type: Optional[InterviewType] = Field(None, description="Interview type")
123140
start: datetime = Field(
124141
...,
125142
description="Event start date and time",
@@ -160,3 +177,8 @@ class ApplicantLogCalendarEvent(BaseModel):
160177
examples=[Transparency.busy],
161178
)
162179
conference: Optional[Conference] = Field(None, description="Event conference data")
180+
state: Optional[CalendarEventState] = Field(
181+
None,
182+
description="Event state",
183+
examples=[CalendarEventState.QUEUED],
184+
)

Diff for: huntflow_webhook_models/common_models/hf_base.py

+4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ class VacancyQuotaBase(BaseModel):
5656
None,
5757
description="How many working days the vacancy is in work after deadline",
5858
)
59+
work_days_before_deadline: Optional[int] = Field(
60+
None,
61+
description="How many working days the vacancy is in work before deadline",
62+
)
5963

6064

6165
class VacancyQuotaItem(VacancyQuotaBase):

Diff for: huntflow_webhook_models/consts.py

+7
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class VacancyState(str, Enum):
6161
EDIT = "EDIT"
6262
LEAVE = "LEAVE"
6363
JOIN = "JOIN"
64+
REMOVED = "REMOVED"
6465

6566

6667
class VacancyRequestLogAction(str, Enum):
@@ -117,3 +118,9 @@ class SurveyAnswerRequestState(str, Enum):
117118
class ApplicantOfferLogTypes(str, Enum):
118119
ADD = "ADD"
119120
EDIT = "EDIT"
121+
122+
123+
class CalendarEventState(str, Enum):
124+
SENT = "SENT"
125+
QUEUED = "QUEUED"
126+
FAILED = "FAILED"

0 commit comments

Comments
 (0)