@@ -169,13 +169,18 @@ def _firestore_endpoint_handler(
169169 firestore_event_data .old_value .create_time ,
170170 firestore_event_data .old_value .update_time ,
171171 )
172- if event_type == _event_type_deleted :
172+
173+ if event_type in (_event_type_deleted ,
174+ _event_type_deleted_with_auth_context ):
173175 firestore_event_data = _typing .cast (_firestore .DocumentEventData ,
174176 old_value_snapshot )
175- if event_type == _event_type_created :
177+ if event_type in (_event_type_created ,
178+ _event_type_created_with_auth_context ):
176179 firestore_event_data = _typing .cast (_firestore .DocumentEventData ,
177180 value_snapshot )
178- if event_type in (_event_type_written , _event_type_updated ):
181+ if event_type in (_event_type_written , _event_type_updated ,
182+ _event_type_written_with_auth_context ,
183+ _event_type_updated_with_auth_context ):
179184 firestore_event_data = _typing .cast (
180185 _firestore .DocumentEventData ,
181186 Change (
@@ -306,7 +311,7 @@ def on_document_written_with_auth_context_wrapped(raw: _ce.CloudEvent):
306311 _util .set_func_endpoint_attr (
307312 on_document_written_with_auth_context_wrapped ,
308313 options ._endpoint (
309- event_type = _event_type_written ,
314+ event_type = _event_type_written_with_auth_context ,
310315 func_name = func .__name__ ,
311316 document_pattern = document_pattern ,
312317 ),
0 commit comments