From 8610670b7cf9ecf79666fae50651509a71176a84 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Mon, 1 Jul 2024 16:39:15 -0700 Subject: [PATCH 1/3] chore: Release 0.4.2 (#211) --- src/firebase_functions/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/firebase_functions/__init__.py b/src/firebase_functions/__init__.py index 82cc49a..4d7df91 100644 --- a/src/firebase_functions/__init__.py +++ b/src/firebase_functions/__init__.py @@ -15,4 +15,4 @@ Firebase Functions for Python. """ -__version__ = "0.4.1" +__version__ = "0.4.2" From 9481fe873c82db0e3a43ee25915872cf7a1e5ce6 Mon Sep 17 00:00:00 2001 From: Nabeel Parkar Date: Fri, 12 Jul 2024 19:25:37 +0530 Subject: [PATCH 2/3] fix: incorrect type for document snapshop in Firestore auth triggers (#212) --- src/firebase_functions/firestore_fn.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/firebase_functions/firestore_fn.py b/src/firebase_functions/firestore_fn.py index 8e5632d..3e6faa4 100644 --- a/src/firebase_functions/firestore_fn.py +++ b/src/firebase_functions/firestore_fn.py @@ -169,13 +169,18 @@ def _firestore_endpoint_handler( firestore_event_data.old_value.create_time, firestore_event_data.old_value.update_time, ) - if event_type == _event_type_deleted: + + if event_type in (_event_type_deleted, + _event_type_deleted_with_auth_context): firestore_event_data = _typing.cast(_firestore.DocumentEventData, old_value_snapshot) - if event_type == _event_type_created: + if event_type in (_event_type_created, + _event_type_created_with_auth_context): firestore_event_data = _typing.cast(_firestore.DocumentEventData, value_snapshot) - if event_type in (_event_type_written, _event_type_updated): + if event_type in (_event_type_written, _event_type_updated, + _event_type_written_with_auth_context, + _event_type_updated_with_auth_context): firestore_event_data = _typing.cast( _firestore.DocumentEventData, Change( From db1eb6cfc21ac3c403d9804b638a374c6590ff1b Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Fri, 12 Jul 2024 07:49:23 -0700 Subject: [PATCH 3/3] fix: incorrect event type for on_document_written_with_auth_context (#214) --- src/firebase_functions/firestore_fn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/firebase_functions/firestore_fn.py b/src/firebase_functions/firestore_fn.py index 3e6faa4..a9d4f2a 100644 --- a/src/firebase_functions/firestore_fn.py +++ b/src/firebase_functions/firestore_fn.py @@ -311,7 +311,7 @@ def on_document_written_with_auth_context_wrapped(raw: _ce.CloudEvent): _util.set_func_endpoint_attr( on_document_written_with_auth_context_wrapped, options._endpoint( - event_type=_event_type_written, + event_type=_event_type_written_with_auth_context, func_name=func.__name__, document_pattern=document_pattern, ),