Home Assistant Unofficial Reference 2024.12.1
types.py
Go to the documentation of this file.
1 """Types for the Todoist component."""
2 
3 from __future__ import annotations
4 
5 from datetime import datetime
6 from typing import TypedDict
7 
8 
9 class DueDate(TypedDict):
10  """Dict representing a due date in a todoist api response."""
11 
12  date: str
13  is_recurring: bool
14  lang: str
15  string: str
16  timezone: str | None
17 
18 
19 class ProjectData(TypedDict):
20  """Dict representing project data."""
21 
22  name: str
23  id: str | None
24 
25 
26 class CustomProject(TypedDict):
27  """Dict representing a custom project."""
28 
29  name: str
30  due_date_days: int | None
31  include_projects: list[str] | None
32  labels: list[str] | None
33 
34 
35 class CalData(TypedDict, total=False):
36  """Dict representing calendar data in todoist."""
37 
38  all_tasks: list[str]
39 
40 
41 class TodoistEvent(TypedDict):
42  """Dict representing a todoist event."""
43 
44  all_day: bool
45  completed: bool
46  description: str
47  due_today: bool
48  end: datetime | None
49  labels: list[str]
50  overdue: bool
51  priority: int
52  start: datetime
53  summary: str