Skip to content
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

feat(fcm): Exposed FCM APIs from firebase-admin/messaging entry point #1153

Merged
merged 2 commits into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
397 changes: 126 additions & 271 deletions etc/firebase-admin.api.md

Large diffs are not rendered by default.

430 changes: 430 additions & 0 deletions etc/firebase-admin.messaging.api.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions generate-reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const entryPoints = {
'firebase-admin/database': './lib/database/index.d.ts',
'firebase-admin/firestore': './lib/firestore/index.d.ts',
'firebase-admin/instance-id': './lib/instance-id/index.d.ts',
'firebase-admin/messaging': './lib/messaging/index.d.ts',
'firebase-admin/remote-config': './lib/remote-config/index.d.ts',
};

Expand Down
1 change: 1 addition & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ gulp.task('compile', function() {
'lib/database/*.d.ts',
'lib/firestore/*.d.ts',
'lib/instance-id/*.d.ts',
'lib/messaging/*.d.ts',
'lib/remote-config/*.d.ts',
'!lib/utils/index.d.ts',
];
Expand Down
12 changes: 5 additions & 7 deletions src/app/firebase-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import { deepCopy } from '../utils/deep-copy';
import { FirebaseNamespaceInternals } from './firebase-namespace';
import { AppErrorCodes, FirebaseAppError } from '../utils/error';

import { Auth } from '../auth/auth';
import { Auth } from '../auth/index';
import { MachineLearning } from '../machine-learning/machine-learning';
import { Messaging } from '../messaging/messaging';
import { Messaging } from '../messaging/index';
import { Storage } from '../storage/storage';
import { Database } from '../database/index';
import { Firestore } from '@google-cloud/firestore';
import { Firestore } from '../firestore/index';
import { InstanceId } from '../instance-id/index';
import { ProjectManagement } from '../project-management/project-management';
import { SecurityRules } from '../security-rules/security-rules';
Expand Down Expand Up @@ -293,10 +293,8 @@ export class FirebaseApp implements app.App {
* @return The Messaging service instance of this app.
*/
public messaging(): Messaging {
return this.ensureService_('messaging', () => {
const messagingService: typeof Messaging = require('../messaging/messaging').Messaging;
return new messagingService(this);
});
const fn = require('../messaging/index').getMessaging;
return fn(this);
}

/**
Expand Down
Loading