-
Notifications
You must be signed in to change notification settings - Fork 161
Closed
Labels
api: firestoreIssues related to the googleapis/nodejs-firestore API.Issues related to the googleapis/nodejs-firestore API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Given the introducing of multiple databases it becomes more and more often that you want to know from where a Reference or snapshot was created for.
Right now there is no way to go from a DocumentReference or a DocumentSnapshot to the database or the project.
It should simply be possible to do the following:
reference.firestore.databaseId
reference.firestore.projectIdThose getters already exist but they are marked a private/internal making accessing them in Typescript unavailable.
Right now you need to do some fishy stuff accessing internal variables, silencing Typescript errors (using as any) or other unofficial, undocumented things.
Given those things are not officially supported and APIs may change without proper breaking changes this makes depending on those workarounds, not a solution.
Metadata
Metadata
Assignees
Labels
api: firestoreIssues related to the googleapis/nodejs-firestore API.Issues related to the googleapis/nodejs-firestore API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.