-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmodels.py
More file actions
46 lines (36 loc) · 980 Bytes
/
models.py
File metadata and controls
46 lines (36 loc) · 980 Bytes
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
44
45
46
"""
Pydantic models for the Notion Omi plugin.
"""
from typing import List, Optional
from pydantic import BaseModel
class ChatToolResponse(BaseModel):
"""Response model for Omi chat tools."""
result: Optional[str] = None
error: Optional[str] = None
class NotionPage(BaseModel):
"""Notion page."""
id: str
title: str
url: Optional[str] = None
created_time: Optional[str] = None
last_edited_time: Optional[str] = None
archived: bool = False
parent_type: Optional[str] = None
parent_id: Optional[str] = None
class NotionDatabase(BaseModel):
"""Notion database."""
id: str
title: str
url: Optional[str] = None
properties: List[str] = []
class NotionBlock(BaseModel):
"""Notion block."""
id: str
type: str
content: Optional[str] = None
has_children: bool = False
class NotionWorkspace(BaseModel):
"""Notion workspace info."""
id: str
name: str
icon: Optional[str] = None