Skip to content

Commit b2e16c0

Browse files
authored
fix(fcm): Exposed admin.messaging namespace (#1039)
1 parent 6ddbd78 commit b2e16c0

12 files changed

+1403
-1196
lines changed

gulpfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ gulp.task('compile', function() {
8585
'lib/**/*.js',
8686
'lib/credential/index.d.ts',
8787
'lib/firebase-namespace-api.d.ts',
88+
'lib/messaging/index.d.ts',
8889
'lib/remote-config/index.d.ts',
8990
];
9091

src/auth/auth.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ import { FirebaseTokenGenerator, cryptoSignerFromApp } from './token-generator';
2323
import {
2424
AbstractAuthRequestHandler, AuthRequestHandler, TenantAwareAuthRequestHandler,
2525
} from './auth-api-request';
26-
import { AuthClientErrorCode, FirebaseAuthError, ErrorInfo, FirebaseArrayIndexError } from '../utils/error';
26+
import { AuthClientErrorCode, FirebaseAuthError, ErrorInfo } from '../utils/error';
27+
import { FirebaseArrayIndexError } from '../firebase-namespace-api';
2728
import { FirebaseServiceInterface, FirebaseServiceInternalsInterface } from '../firebase-service';
2829
import {
2930
UserImportOptions, UserImportRecord, UserImportResult,

src/auth/user-import-builder.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
import { deepCopy, deepExtend } from '../utils/deep-copy';
1818
import * as utils from '../utils';
1919
import * as validator from '../utils/validator';
20-
import { AuthClientErrorCode, FirebaseAuthError, FirebaseArrayIndexError } from '../utils/error';
20+
import { AuthClientErrorCode, FirebaseAuthError } from '../utils/error';
21+
import { FirebaseArrayIndexError } from '../firebase-namespace-api';
2122

2223
/** Firebase Auth supported hashing algorithms for import operations. */
2324
export type HashAlgorithmType = 'SCRYPT' | 'STANDARD_SCRYPT' | 'HMAC_SHA512' |

src/firebase-namespace-api.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import { Agent } from 'http';
1818
import { credential } from './credential/index';
19+
import { messaging } from './messaging/index';
1920
import { remoteConfig } from './remote-config/index';
2021

2122
/**
@@ -51,7 +52,7 @@ export interface FirebaseError {
5152
* {@link https://firebase.google.com/support/ Firebase Support} to help
5253
* explain the cause of an error.
5354
*/
54-
stack: string;
55+
stack?: string;
5556

5657
/**
5758
* @return A JSON-serializable representation of this object.
@@ -213,6 +214,7 @@ export namespace app {
213214
*/
214215
options: AppOptions;
215216

217+
messaging(): messaging.Messaging;
216218
remoteConfig(): remoteConfig.RemoteConfig;
217219

218220
/**

src/firebase-namespace.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@
1616

1717
export * from './credential/index';
1818
export * from './firebase-namespace-api';
19+
export * from './messaging/index';
1920
export * from './remote-config/index';

0 commit comments

Comments
 (0)