-
Notifications
You must be signed in to change notification settings - Fork 391
fix(fcm): Exposed admin.messaging namespace #1039
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lahirumaramba
approved these changes
Sep 25, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
hiranya911
added a commit
that referenced
this pull request
Nov 2, 2020
* chore: Removing ambient typing files (#1032) * chore: Removing ambient typing files * chore: Added some TODOs to keep track of WIP * chore: Added the credentials API signatures and exposed admin.credential (#1035) * chore: Added the credentials API signatures and exposed admin.credential * fix: Updated ServiceAccountCredential constructor signature * chore: Declared admin and admin.app namespaces (#1037) * chore: Added some TODOs to keep track of WIP * chore: Declared admin and admin.app namespaces * fix: Fixing an indentation issue * fix(rc): Exposed admin.remoteConfig namespace (#1038) * fix(fcm): Exposed admin.messaging namespace (#1039) * chore(iid): Exposed admin.instanceId namespace (#1046) * chore(iid): Exposed admin.instanceId namespace * fix: Fixing some bad indentation in comments * chore(rtdb): Exposed admin.database namespace (#1043) * chore(rules): Exposed admin.securiryRules namespace (#1050) * chore: Exposed admin.projectManagement namespace (#1054) * chore(auth): Exposed admin.auth namespace (#1053) * chore(auth): Exposed admin.auth namespace * fix(auth): Fixing unit tests for SAMLConfig * fix(auth): Removing more auth. prefixed direct references * fix(auth): Using CreateTenantRequest explicitly where appropriate * chore(ml): Exposed admin.machineLearning namespace (#1055) * chore(ml): Exposed admin.machineLearning namespace * fix(ml): Fixing some code formatting issues * chore: Exposed admin.storage and admin.firestore namespaces (#1056) * chore(ml): Exposed admin.machineLearning namespace * chore: Exposed admin.firestore and admin.storage namespaces * chore: Merged with upstream; Re-enabled build:tests CI task * chore: Using public API types in FirebaseNamespace impl (#1057) * chore: Updated TypeDoc workflow to generate API docs (#1060) * chore: Experimental typedoc pipeline for doc generation * chore: Adding RTDB type aliases to the API docs * Updated comments * Cleaned up the docgen script; Fixed a file name check warning * fix: Fixed cross links; Fixed a faulty regex replacement in links * fix: Fixing the remaining cross linkage errors * chore: Enabled quotes rule in eslint config (#1067) * chore: Enabled quotes rule in esline config * fix: Enabled avoidEscape option * fix: Fixed a typo in an error message
BorntraegerMarc
pushed a commit
to BorntraegerMarc/firebase-admin-node
that referenced
this pull request
Jan 28, 2021
* chore: Removing ambient typing files (firebase#1032) * chore: Removing ambient typing files * chore: Added some TODOs to keep track of WIP * chore: Added the credentials API signatures and exposed admin.credential (firebase#1035) * chore: Added the credentials API signatures and exposed admin.credential * fix: Updated ServiceAccountCredential constructor signature * chore: Declared admin and admin.app namespaces (firebase#1037) * chore: Added some TODOs to keep track of WIP * chore: Declared admin and admin.app namespaces * fix: Fixing an indentation issue * fix(rc): Exposed admin.remoteConfig namespace (firebase#1038) * fix(fcm): Exposed admin.messaging namespace (firebase#1039) * chore(iid): Exposed admin.instanceId namespace (firebase#1046) * chore(iid): Exposed admin.instanceId namespace * fix: Fixing some bad indentation in comments * chore(rtdb): Exposed admin.database namespace (firebase#1043) * chore(rules): Exposed admin.securiryRules namespace (firebase#1050) * chore: Exposed admin.projectManagement namespace (firebase#1054) * chore(auth): Exposed admin.auth namespace (firebase#1053) * chore(auth): Exposed admin.auth namespace * fix(auth): Fixing unit tests for SAMLConfig * fix(auth): Removing more auth. prefixed direct references * fix(auth): Using CreateTenantRequest explicitly where appropriate * chore(ml): Exposed admin.machineLearning namespace (firebase#1055) * chore(ml): Exposed admin.machineLearning namespace * fix(ml): Fixing some code formatting issues * chore: Exposed admin.storage and admin.firestore namespaces (firebase#1056) * chore(ml): Exposed admin.machineLearning namespace * chore: Exposed admin.firestore and admin.storage namespaces * chore: Merged with upstream; Re-enabled build:tests CI task * chore: Using public API types in FirebaseNamespace impl (firebase#1057) * chore: Updated TypeDoc workflow to generate API docs (firebase#1060) * chore: Experimental typedoc pipeline for doc generation * chore: Adding RTDB type aliases to the API docs * Updated comments * Cleaned up the docgen script; Fixed a file name check warning * fix: Fixed cross links; Fixed a faulty regex replacement in links * fix: Fixing the remaining cross linkage errors * chore: Enabled quotes rule in eslint config (firebase#1067) * chore: Enabled quotes rule in esline config * fix: Enabled avoidEscape option * fix: Fixed a typo in an error message
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
messaging/index.ts
.admin.messaging
namespace.App.messaging()
method.Notable changes/fixes
Following incompatibilities/errors were discovered and fixed.
FirebaseError.stack
propertyThe above property had been defined as required. However, core typings for Node.js defines
stack
to be an optional property.This caused a compilation error when I implemented our
FirebaseError
interface in theFirebaseError
class. I treated this as a bug in the existing typings, and fixed it by making thestack
property optional.Legacy FCM APIs
We have following 2 methods in the typings:
But the implementation had them declared as follows with union return types.
It seems the implementation does actually return a union type too. I thought about considering this as another bug in the existing typings (it really is), but ultimately didn't want to expose union return types from a public API. A method that has multiple return types is really awkward to use in practice. So instead, I kept the public API signature as is, and changed the implementation to adhere to the existing typings. I did so in a backward compatible way so that developers who are relying on the current implementation behavior won't break.