googleapis / googleapis/google-cloud-node

Expose the internal snapshot_ method for public use

Open
#7,446 7 comments 9 reactions 0 assignees View on GitHub
api: firestore library: nodejs-firestore type: feature request
Dominant language
TypeScript
Stars
3.2k
Forks
712
Avg merge
2d 3h
Merged PRs (30d)
99

Description

### What would you like to see in the library?

Currently Firestore document triggers in EventArc are extremely clunky to use. Decoding and then parsing protobuf-encoded payloads provides a poor DX compared to the ease of accessing document data in Firebase Functions. Firebase Functions is able to provide this smooth experience by making use of an internal Firestore method, `snapshot_` found here: [snapshot_](https://github.com/googleapis/nodejs-firestore/blob/07a88420062c428b04d61638c6ba432422e01652/dev/src/index.ts#L1026)

How it's used in FF: https://github.com/firebase/firebase-functions/blob/master/src/common/providers/firestore.ts

If you expose `snapshot_` as a public method, it will make the experience of using EventArc Firestore Document triggers with something like Cloud Run way better. And since the method already exists, I can't imagine this would be such a big lift. Absolutely huge ROI on this effort for your users. Thanks!

### Describe alternatives you've considered

Painfully decoding and parsing Protobuf-encoded data

### Additional context/notes

I'm posting this here because this is where the internal snapshot_ method lives, but it would make sense to expose this through firebase-admin as well.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.