-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtodo.pyi
43 lines (38 loc) · 1.43 KB
/
todo.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from dataclasses import dataclass, field
from enum import IntEnum
from typing import *
from . import _typedefs
from . import dates
from . import shared
class TodoType(IntEnum):
PLAIN = 1
NOTE = 2
CHECKBOXES = 3
@dataclass
class TodoItem:
id: _typedefs.I32
text: _typedefs.String
type: TodoType
created: dates.DateTime
is_deleted: _typedefs.Bool
picture: Optional[_typedefs.Binary] = None
is_favorite: _typedefs.Bool = False
@dataclass
class TodoCounter:
todos: Dict[_typedefs.I32, TodoItem] = field(default_factory=dict)
plain_ids: Set[_typedefs.I32] = field(default_factory=lambda: {1, 2, 3})
note_ids: List[_typedefs.I32] = field(default_factory=list)
checkboxes_ids: Set[_typedefs.I32] = field(default_factory=set)
default_created_date: dates.DateTime = dates.DateTime(
year=2024, month=12, day=25, hour=0, minute=0, second=0, microsecond=0
)
class Todo:
def create(self, text: _typedefs.String, type: TodoType) -> _typedefs.I32: ...
def update(self, item: TodoItem) -> None: ...
def get(self, id: _typedefs.I32) -> TodoItem: ...
def all(self, pager: shared.LimitOffset) -> List[TodoItem]: ...
def filter(self, ids: List[_typedefs.I32]) -> List[TodoItem]: ...
def stats(self) -> Dict[_typedefs.I32, _typedefs.Double]: ...
def types(self) -> Set[_typedefs.I16]: ...
def groupby(self) -> Dict[TodoType, List[TodoItem]]: ...
def ping(self) -> _typedefs.String: ...