Skip to content

Commit db87505

Browse files
zwu52Feiyang1
authored andcommitted
Create registerMessagingCompat.ts
1 parent fa86feb commit db87505

File tree

15 files changed

+441
-330
lines changed

15 files changed

+441
-330
lines changed

common/api-review/auth.api.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export function applyActionCode(auth: Auth, oobCode: string): Promise<void>;
8080

8181
// @public
8282
export interface Auth {
83+
readonly app: FirebaseApp;
8384
readonly config: Config;
8485
readonly currentUser: User | null;
8586
readonly emulatorConfig: EmulatorConfig | null;
@@ -101,14 +102,14 @@ export class AuthCredential {
101102
protected constructor(
102103
providerId: string,
103104
signInMethod: string);
104-
// Warning: (ae-forgotten-export) The symbol "AuthInternal" needs to be exported by the entry point index.doc.d.ts
105-
// Warning: (ae-forgotten-export) The symbol "PhoneOrOauthTokenResponse" needs to be exported by the entry point index.doc.d.ts
105+
// Warning: (ae-forgotten-export) The symbol "AuthInternal" needs to be exported by the entry point index.d.ts
106+
// Warning: (ae-forgotten-export) The symbol "PhoneOrOauthTokenResponse" needs to be exported by the entry point index.d.ts
106107
//
107108
// @internal (undocumented)
108109
_getIdTokenResponse(_auth: AuthInternal): Promise<PhoneOrOauthTokenResponse>;
109110
// @internal (undocumented)
110111
_getReauthenticationResolver(_auth: AuthInternal): Promise<IdTokenResponse>;
111-
// Warning: (ae-forgotten-export) The symbol "IdTokenResponse" needs to be exported by the entry point index.doc.d.ts
112+
// Warning: (ae-forgotten-export) The symbol "IdTokenResponse" needs to be exported by the entry point index.d.ts
112113
//
113114
// @internal (undocumented)
114115
_linkToIdToken(_auth: AuthInternal, _idToken: string): Promise<IdTokenResponse>;
@@ -276,9 +277,6 @@ export function connectAuthEmulator(auth: Auth, url: string, options?: {
276277
disableWarnings: boolean;
277278
}): void;
278279

279-
// @public
280-
export const cordovaPopupRedirectResolver: PopupRedirectResolver;
281-
282280
// @public
283281
export function createUserWithEmailAndPassword(auth: Auth, email: string, password: string): Promise<UserCredential>;
284282

@@ -342,7 +340,7 @@ export interface EmulatorConfig {
342340

343341
export { ErrorFn }
344342

345-
// Warning: (ae-forgotten-export) The symbol "BaseOAuthProvider" needs to be exported by the entry point index.doc.d.ts
343+
// Warning: (ae-forgotten-export) The symbol "BaseOAuthProvider" needs to be exported by the entry point index.d.ts
346344
//
347345
// @public
348346
export class FacebookAuthProvider extends BaseOAuthProvider {
@@ -484,7 +482,7 @@ export type NextOrObserver<T> = NextFn<T | null> | Observer<T | null>;
484482
export class OAuthCredential extends AuthCredential {
485483
accessToken?: string;
486484
static fromJSON(json: string | object): OAuthCredential | null;
487-
// Warning: (ae-forgotten-export) The symbol "OAuthCredentialParams" needs to be exported by the entry point index.doc.d.ts
485+
// Warning: (ae-forgotten-export) The symbol "OAuthCredentialParams" needs to be exported by the entry point index.d.ts
488486
//
489487
// @internal (undocumented)
490488
static _fromParams(params: OAuthCredentialParams): OAuthCredential;
@@ -563,7 +561,7 @@ export class PhoneAuthCredential extends AuthCredential {
563561
_getReauthenticationResolver(auth: AuthInternal): Promise<IdTokenResponse>;
564562
// @internal (undocumented)
565563
_linkToIdToken(auth: AuthInternal, idToken: string): Promise<IdTokenResponse>;
566-
// Warning: (ae-forgotten-export) The symbol "SignInWithPhoneNumberRequest" needs to be exported by the entry point index.doc.d.ts
564+
// Warning: (ae-forgotten-export) The symbol "SignInWithPhoneNumberRequest" needs to be exported by the entry point index.d.ts
567565
//
568566
// @internal (undocumented)
569567
_makeVerificationRequest(): SignInWithPhoneNumberRequest;
@@ -636,9 +634,6 @@ export interface ReactNativeAsyncStorage {
636634
setItem(key: string, value: string): Promise<void>;
637635
}
638636

639-
// @public
640-
export const reactNativeLocalPersistence: Persistence;
641-
642637
// @public
643638
export function reauthenticateWithCredential(user: User, credential: AuthCredential): Promise<UserCredential>;
644639

@@ -657,13 +652,13 @@ export interface RecaptchaParameters {
657652
[key: string]: any;
658653
}
659654

660-
// Warning: (ae-forgotten-export) The symbol "ApplicationVerifierInternal" needs to be exported by the entry point index.doc.d.ts
655+
// Warning: (ae-forgotten-export) The symbol "ApplicationVerifierInternal" needs to be exported by the entry point index.d.ts
661656
//
662657
// @public
663658
export class RecaptchaVerifier implements ApplicationVerifierInternal {
664659
constructor(containerOrId: HTMLElement | string, parameters: RecaptchaParameters, authExtern: Auth);
665660
clear(): void;
666-
// Warning: (ae-forgotten-export) The symbol "ReCaptchaLoader" needs to be exported by the entry point index.doc.d.ts
661+
// Warning: (ae-forgotten-export) The symbol "ReCaptchaLoader" needs to be exported by the entry point index.d.ts
667662
//
668663
// @internal (undocumented)
669664
readonly _recaptchaLoader: ReCaptchaLoader;
@@ -677,7 +672,7 @@ export class RecaptchaVerifier implements ApplicationVerifierInternal {
677672
// @public
678673
export function reload(user: User): Promise<void>;
679674

680-
// Warning: (ae-forgotten-export) The symbol "FederatedAuthProvider" needs to be exported by the entry point index.doc.d.ts
675+
// Warning: (ae-forgotten-export) The symbol "FederatedAuthProvider" needs to be exported by the entry point index.d.ts
681676
//
682677
// @public
683678
export class SAMLAuthProvider extends FederatedAuthProvider {
Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,42 @@
1-
## API Report File for "@firebase/installations"
2-
3-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4-
5-
```ts
6-
7-
import { FirebaseApp } from '@firebase/app';
8-
9-
// @public
10-
export function deleteInstallations(installations: Installations): Promise<void>;
11-
12-
// @internal
13-
export interface _FirebaseInstallationsInternal {
14-
getId(): Promise<string>;
15-
getToken(forceRefresh?: boolean): Promise<string>;
16-
}
17-
18-
// @public
19-
export function getId(installations: Installations): Promise<string>;
20-
21-
// @public
22-
export function getInstallations(app?: FirebaseApp): Installations;
23-
24-
// @public
25-
export function getToken(installations: Installations, forceRefresh?: boolean): Promise<string>;
26-
27-
// @public
28-
export type IdChangeCallbackFn = (installationId: string) => void;
29-
30-
// @public
31-
export type IdChangeUnsubscribeFn = () => void;
32-
33-
// @public
34-
export interface Installations {
35-
}
36-
37-
// @public
38-
export function onIdChange(installations: Installations, callback: IdChangeCallbackFn): IdChangeUnsubscribeFn;
39-
40-
41-
```
1+
## API Report File for "@firebase/installations"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
7+
import { FirebaseApp } from '@firebase/app';
8+
9+
// @public
10+
export function deleteInstallations(installations: Installations): Promise<void>;
11+
12+
// @internal
13+
export interface _FirebaseInstallationsInternal {
14+
getId(): Promise<string>;
15+
getToken(forceRefresh?: boolean): Promise<string>;
16+
}
17+
18+
// @public
19+
export function getId(installations: Installations): Promise<string>;
20+
21+
// @public
22+
export function getInstallations(app?: FirebaseApp): Installations;
23+
24+
// @public
25+
export function getToken(installations: Installations, forceRefresh?: boolean): Promise<string>;
26+
27+
// @public
28+
export type IdChangeCallbackFn = (installationId: string) => void;
29+
30+
// @public
31+
export type IdChangeUnsubscribeFn = () => void;
32+
33+
// @public
34+
export interface Installations {
35+
app: FirebaseApp;
36+
}
37+
38+
// @public
39+
export function onIdChange(installations: Installations, callback: IdChangeCallbackFn): IdChangeUnsubscribeFn;
40+
41+
42+
```

common/api-review/messaging-sw.api.md

Lines changed: 69 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,69 @@
1-
## API Report File for "@firebase/messaging-sw"
2-
3-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4-
5-
```ts
6-
7-
import { FirebaseApp } from '@firebase/app';
8-
import { NextFn } from '@firebase/util';
9-
import { Observer } from '@firebase/util';
10-
import { Unsubscribe } from '@firebase/util';
11-
12-
// @public
13-
export function experimentalSetDeliveryMetricsExportedToBigQueryEnabled(messaging: Messaging, enable: boolean): void;
14-
15-
// @public
16-
export interface FcmOptions {
17-
analyticsLabel?: string;
18-
link?: string;
19-
}
20-
21-
// @public
22-
export function getMessaging(app?: FirebaseApp): Messaging;
23-
24-
// @public
25-
export interface GetTokenOptions {
26-
serviceWorkerRegistration?: ServiceWorkerRegistration;
27-
vapidKey?: string;
28-
}
29-
30-
// @public
31-
export function isSupported(): Promise<boolean>;
32-
33-
// @public
34-
export interface MessagePayload {
35-
collapseKey: string;
36-
data?: {
37-
[key: string]: string;
38-
};
39-
fcmOptions?: FcmOptions;
40-
from: string;
41-
messageId: string;
42-
notification?: NotificationPayload;
43-
}
44-
45-
// @public
46-
export interface Messaging {
47-
}
48-
49-
export { NextFn }
50-
51-
// @public
52-
export interface NotificationPayload {
53-
body?: string;
54-
image?: string;
55-
title?: string;
56-
}
57-
58-
export { Observer }
59-
60-
// @public
61-
export function onBackgroundMessage(messaging: Messaging, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
62-
63-
export { Unsubscribe }
64-
65-
66-
// (No @packageDocumentation comment for this package)
67-
68-
```
1+
## API Report File for "@firebase/messaging-sw"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
7+
import { FirebaseApp } from '@firebase/app';
8+
import { NextFn } from '@firebase/util';
9+
import { Observer } from '@firebase/util';
10+
import { Unsubscribe } from '@firebase/util';
11+
12+
// @public
13+
export function experimentalSetDeliveryMetricsExportedToBigQueryEnabled(messaging: Messaging, enable: boolean): void;
14+
15+
// @public
16+
export interface FcmOptions {
17+
analyticsLabel?: string;
18+
link?: string;
19+
}
20+
21+
// @public
22+
export function getMessaging(app?: FirebaseApp): Messaging;
23+
24+
// @public
25+
export interface GetTokenOptions {
26+
serviceWorkerRegistration?: ServiceWorkerRegistration;
27+
vapidKey?: string;
28+
}
29+
30+
// @public
31+
export function isSupported(): Promise<boolean>;
32+
33+
// @public
34+
export interface MessagePayload {
35+
collapseKey: string;
36+
data?: {
37+
[key: string]: string;
38+
};
39+
fcmOptions?: FcmOptions;
40+
from: string;
41+
messageId: string;
42+
notification?: NotificationPayload;
43+
}
44+
45+
// @public
46+
export interface Messaging {
47+
app: FirebaseApp;
48+
}
49+
50+
export { NextFn }
51+
52+
// @public
53+
export interface NotificationPayload {
54+
body?: string;
55+
image?: string;
56+
title?: string;
57+
}
58+
59+
export { Observer }
60+
61+
// @public
62+
export function onBackgroundMessage(messaging: Messaging, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
63+
64+
export { Unsubscribe }
65+
66+
67+
// (No @packageDocumentation comment for this package)
68+
69+
```

0 commit comments

Comments
 (0)