3030
3131_event_type_mutation_executed = "google.firebase.dataconnect.connector.v1.mutationExecuted"
3232
33+ AuthType = _typing .Literal ["app_user" , "admin" , "unknown" ]
3334
3435@_dataclass .dataclass (frozen = True )
3536class Event (_core .CloudEvent [_core .T ]):
@@ -53,6 +54,15 @@ class Event(_core.CloudEvent[_core.T]):
5354 Only named capture groups are populated - {key}, {key=*}, {key=**}
5455 """
5556
57+ auth_type : AuthType
58+ """
59+ The type of principal that triggered the event.
60+ """
61+
62+ auth_id : str
63+ """
64+ The unique identifier for the principal.
65+ """
5666
5767@_dataclass .dataclass (frozen = True )
5868class GraphqlErrorExtensions :
@@ -210,6 +220,9 @@ def _dataconnect_endpoint_handler(
210220 ** operation_pattern .extract_matches (event_operation ),
211221 }
212222
223+ event_auth_type = event_attributes ["authtype" ]
224+ event_auth_id = event_attributes ["authid" ]
225+
213226 dataconnect_event = Event (
214227 specversion = event_attributes ["specversion" ],
215228 id = event_attributes ["id" ],
@@ -224,6 +237,8 @@ def _dataconnect_endpoint_handler(
224237 project = event_attributes ["project" ],
225238 params = params ,
226239 data = dataconnect_event_data ,
240+ auth_type = event_auth_type ,
241+ auth_id = event_auth_id ,
227242 )
228243 _core ._with_init (func )(dataconnect_event )
229244
0 commit comments