@@ -121,6 +121,32 @@ class MessageDevice(_MessageDeviceRequired, total=False):
121121 enabled : bool
122122
123123
124+ MessageIssueSource = Literal ["push" , "device" , "server" ]
125+ """Where a failure was reported from."""
126+
127+
128+ class _MessageIssueEntryRequired (TypedDict ):
129+ code : str
130+ at : str
131+ """When the failure happened. ISO date."""
132+
133+ source : MessageIssueSource
134+
135+
136+ class MessageIssueEntry (_MessageIssueEntryRequired , total = False ):
137+ """One failure a message had. Kept after the message later succeeds."""
138+
139+ message : str
140+ backfilled : bool
141+ """Set on entries rebuilt from old message fields."""
142+
143+ deliveryReport : bool
144+ """True for a delivery report that did not confirm delivery.
145+
146+ The message was sent; this is not a send failure.
147+ """
148+
149+
124150class _MessageRequired (TypedDict ):
125151 _id : str
126152 message : str
@@ -142,9 +168,28 @@ class _MessageFields(_MessageRequired, total=False):
142168 sentAt : str
143169 deliveredAt : str
144170 failedAt : str
171+ """When the message failed. Present only while status is ``failed``."""
172+
145173 receivedAt : str
146174 errorCode : str
175+ """Current failure code. Present only while status is ``failed``.
176+
177+ Test accounts can keep ``FCM_SEND_SKIPPED``.
178+ """
179+
147180 errorMessage : str
181+ """Current failure text.
182+
183+ Present only while status is ``failed``, or as a timeout note on ``unknown``.
184+ """
185+
186+ issueHistory : List [MessageIssueEntry ]
187+ """Every failure the message had, plus unconfirmed delivery reports.
188+
189+ Delivery reports carry ``deliveryReport: true`` and are not failures.
190+ Oldest first. At most 15: the first 5 and the newest 10.
191+ """
192+
148193 simSubscriptionId : int
149194 smsBatch : str
150195 createdAt : str
0 commit comments