forked from a1baseai/a1base-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
81 lines (72 loc) · 1.57 KB
/
Copy pathmodels.py
File metadata and controls
81 lines (72 loc) · 1.57 KB
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
from dataclasses import dataclass
from typing import Optional, List, Dict, Literal
@dataclass
class MessageResponse:
to: str
from_: str
body: str
status: str
@dataclass
class GroupMessageResponse:
thread_id: str
body: str
status: str
@dataclass
class MessageRequest:
content: str
from_: str
to: str
service: str
attachment_uri: Optional[str] = None
@dataclass
class GroupMessageRequest:
content: str
from_: str
thread_id: str
service: str
attachment_uri: Optional[str] = None
@dataclass
class WhatsAppIncomingData:
thread_id: str
message_id: str
thread_type: Literal['individual', 'group', 'broadcast']
content: str
sender_number: str
sender_name: str
a1_account_id: str
timestamp: str
service: Literal['email', 'sms', 'whatsapp']
a1_account_number: Optional[str] = None
""" Deprecated: Use a1_account_id instead """
@dataclass
class Thread:
id: str
created_at: str
type: str
thread_name: Optional[str]
service_name: str
participants: List[str]
account_id: str
is_live: Optional[bool]
@dataclass
class MessageDetails:
id: str
thread_id: str
content: str
sender_number: str
sender_name: str
timestamp: str
updated_at: Optional[str] = None
@dataclass
class RecentMessages:
messages: List[MessageDetails]
@dataclass
class ThreadDetails:
thread_id: str
created_at: str
type: str
thread_name: Optional[str]
updated_at: Optional[str]
service_name: str
participants: List[str]
messages: List[str]