@@ -25,40 +25,16 @@ class Source(BaseModel):
25
25
"""The ID of the version of the workflow that triggered the message."""
26
26
27
27
step_ref : Optional [str ] = None
28
- """The step reference for the step in the workflow that generated the message. """
28
+ """The step reference for the step in the workflow that generated the message"""
29
29
30
30
31
31
class Message (BaseModel ):
32
- id : str
32
+ id : Optional [ str ] = None
33
33
"""The unique identifier for the message."""
34
34
35
- api_typename : str = FieldInfo (alias = "__typename" )
35
+ api_typename : Optional [ str ] = FieldInfo (alias = "__typename" , default = None )
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
-
62
38
actors : Optional [List [RecipientReference ]] = None
63
39
"""One or more actors that are associated with this message.
64
40
@@ -69,6 +45,9 @@ class Message(BaseModel):
69
45
archived_at : Optional [datetime ] = None
70
46
"""Timestamp when the message was archived."""
71
47
48
+ channel_id : Optional [str ] = None
49
+ """The ID for the channel the message was sent through."""
50
+
72
51
clicked_at : Optional [datetime ] = None
73
52
"""Timestamp when the message was clicked."""
74
53
@@ -82,6 +61,12 @@ class Message(BaseModel):
82
61
`data` from the most-recent trigger request (the final `activity` in the batch).
83
62
"""
84
63
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
+
85
70
interacted_at : Optional [datetime ] = None
86
71
"""Timestamp when the message was interacted with."""
87
72
@@ -94,17 +79,34 @@ class Message(BaseModel):
94
79
read_at : Optional [datetime ] = None
95
80
"""Timestamp when the message was read."""
96
81
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
+
97
88
scheduled_at : Optional [datetime ] = None
98
89
"""Timestamp when the message was scheduled to be sent."""
99
90
100
91
seen_at : Optional [datetime ] = None
101
92
"""Timestamp when the message was seen."""
102
93
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
+
103
102
tenant : Optional [str ] = None
104
103
"""The ID of the `tenant` associated with the message.
105
104
106
105
Only present when a `tenant` is provided on a workflow trigger request.
107
106
"""
108
107
108
+ updated_at : Optional [datetime ] = None
109
+ """The timestamp when the resource was last updated."""
110
+
109
111
workflow : Optional [str ] = None
110
112
"""The key of the workflow that generated the message."""
0 commit comments