Skip to content

feat(firestore): Exposed more types from the admin.firestore namespace #1080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 3, 2020

Conversation

hiranya911
Copy link
Contributor

@hiranya911 hiranya911 commented Nov 2, 2020

RELEASE NOTE: Exposed a series of new Firestore SDK types from the admin.firestore namespace. Newly exposed types include GrpcStatus, FirestoreDataConverter, UpdateData and more.
RELEASE NOTE: Upgraded the Firestore SDK version to v4.5.0 and higher.

Resolves #1064
Resolves #1074

})
.then((snapshot: admin.firestore.DocumentSnapshot<City>) => {
const city: City = snapshot.data()!;
expect(city).to.deep.equal(expected);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, since you are using converters, you should be able to do an instanceof check here. You would also have to change City to a class.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

expect(city).to.deep.equal(expected);
return refWithConverter.delete();
})
.should.eventually.be.fulfilled;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This last line is a no-op, isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@hiranya911 hiranya911 merged commit 19a7abf into master Nov 3, 2020
@hiranya911 hiranya911 deleted the hkj-firestore-types branch November 3, 2020 19:53
@goleary
Copy link

goleary commented Nov 25, 2020

Thanks for adding these!

I was lamenting the fact that we have to import types from @google-cloud/firestore that should be available from this package and came here just to see you've already taken care of it!

BorntraegerMarc pushed a commit to BorntraegerMarc/firebase-admin-node that referenced this pull request Jan 28, 2021
firebase#1080)

* feat(firestore): Exposed more types from the admin.firestore namespace

* fix: Updated integration test
@ShanahJr
Copy link

For some reason I still cannot find SnapshotOptions. I didnt see it in the commit either but I did see the others. I think it was missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:stage Stage a release candidate release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Firestore] Typescript interface missing in the admin SDK for FirestoreDataConverter Missing GrpcStatus in firestore
4 participants