@@ -29,12 +29,36 @@ class Source(BaseModel):
29
29
30
30
31
31
class Message (BaseModel ):
32
- id : Optional [ str ] = None
32
+ id : str
33
33
"""The unique identifier for the message."""
34
34
35
- api_typename : Optional [ str ] = FieldInfo (alias = "__typename" , default = None )
35
+ api_typename : str = FieldInfo (alias = "__typename" )
36
36
"""The typename of the schema."""
37
37
38
+ channel_id : str
39
+ """The ID for the channel the message was sent through."""
40
+
41
+ engagement_statuses : List [Literal ["seen" , "read" , "interacted" , "link_clicked" , "archived" ]]
42
+ """A list of engagement statuses."""
43
+
44
+ inserted_at : datetime
45
+ """Timestamp when the resource was created."""
46
+
47
+ recipient : RecipientReference
48
+ """
49
+ A reference to a recipient, either a user identifier (string) or an object
50
+ reference (ID, collection).
51
+ """
52
+
53
+ source : Source
54
+ """The workflow that triggered the message."""
55
+
56
+ status : Literal ["queued" , "sent" , "delivered" , "delivery_attempted" , "undelivered" , "not_sent" , "bounced" ]
57
+ """The message delivery status."""
58
+
59
+ updated_at : datetime
60
+ """The timestamp when the resource was last updated."""
61
+
38
62
actors : Optional [List [RecipientReference ]] = None
39
63
"""One or more actors that are associated with this message.
40
64
@@ -45,9 +69,6 @@ class Message(BaseModel):
45
69
archived_at : Optional [datetime ] = None
46
70
"""Timestamp when the message was archived."""
47
71
48
- channel_id : Optional [str ] = None
49
- """The ID for the channel the message was sent through."""
50
-
51
72
clicked_at : Optional [datetime ] = None
52
73
"""Timestamp when the message was clicked."""
53
74
@@ -61,12 +82,6 @@ class Message(BaseModel):
61
82
`data` from the most-recent trigger request (the final `activity` in the batch).
62
83
"""
63
84
64
- engagement_statuses : Optional [List [Literal ["seen" , "read" , "interacted" , "link_clicked" , "archived" ]]] = None
65
- """A list of engagement statuses."""
66
-
67
- inserted_at : Optional [datetime ] = None
68
- """Timestamp when the resource was created."""
69
-
70
85
interacted_at : Optional [datetime ] = None
71
86
"""Timestamp when the message was interacted with."""
72
87
@@ -79,34 +94,17 @@ class Message(BaseModel):
79
94
read_at : Optional [datetime ] = None
80
95
"""Timestamp when the message was read."""
81
96
82
- recipient : Optional [RecipientReference ] = None
83
- """
84
- A reference to a recipient, either a user identifier (string) or an object
85
- reference (ID, collection).
86
- """
87
-
88
97
scheduled_at : Optional [datetime ] = None
89
98
"""Timestamp when the message was scheduled to be sent."""
90
99
91
100
seen_at : Optional [datetime ] = None
92
101
"""Timestamp when the message was seen."""
93
102
94
- source : Optional [Source ] = None
95
- """The workflow that triggered the message."""
96
-
97
- status : Optional [
98
- Literal ["queued" , "sent" , "delivered" , "delivery_attempted" , "undelivered" , "not_sent" , "bounced" ]
99
- ] = None
100
- """The message delivery status."""
101
-
102
103
tenant : Optional [str ] = None
103
104
"""The ID of the `tenant` associated with the message.
104
105
105
106
Only present when a `tenant` is provided on a workflow trigger request.
106
107
"""
107
108
108
- updated_at : Optional [datetime ] = None
109
- """The timestamp when the resource was last updated."""
110
-
111
109
workflow : Optional [str ] = None
112
110
"""The key of the workflow that generated the message."""
0 commit comments