-
Notifications
You must be signed in to change notification settings - Fork 44
/
models.py
96 lines (75 loc) · 2.02 KB
/
models.py
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
from datetime import datetime
from typing import Any, List, Optional
from xbox.webapi.common.models import CamelCaseModel
class Part(CamelCaseModel):
content_type: str
version: int
text: Optional[str] = None
unsuitable_for: Optional[List] = None
locator: Optional[str] = None
class Content(CamelCaseModel):
parts: List[Part]
class ContentPayload(CamelCaseModel):
content: Content
class Message(CamelCaseModel):
content_payload: Optional[ContentPayload] = None
timestamp: datetime
last_update_timestamp: datetime
type: str
network_id: str
conversation_type: str
conversation_id: str
owner: Optional[int] = None
sender: str
message_id: str
is_deleted: bool
is_server_updated: bool
class Conversation(CamelCaseModel):
timestamp: datetime
network_id: str
type: str
conversation_id: str
voice_id: str
participants: List[str]
read_horizon: str
delete_horizon: str
is_read: bool
muted: bool
folder: str
last_message: Message
class Primary(CamelCaseModel):
folder: str
total_count: int
unread_count: int
conversations: List[Conversation]
class SafetySettings(CamelCaseModel):
version: int
primary_inbox_media: str
primary_inbox_text: str
primary_inbox_url: str
secondary_inbox_media: str
secondary_inbox_text: str
secondary_inbox_url: str
can_unobscure: bool
class InboxResponse(CamelCaseModel):
primary: Primary
folders: List[Any]
safety_settings: SafetySettings
class ConversationResponse(CamelCaseModel):
timestamp: datetime
network_id: str
type: str
conversation_id: str
participants: Optional[List[str]] = None
read_horizon: str
delete_horizon: str
is_read: bool
muted: bool
folder: str
messages: Optional[List[Message]] = None
continuation_token: Optional[str] = None
voice_id: str
voice_roster: Optional[List[Any]] = None
class SendMessageResponse(CamelCaseModel):
message_id: str
conversation_id: str