Deployed the page to Github Pages.
This commit is contained in:
parent
1d79754e93
commit
2c89899458
62797 changed files with 6551425 additions and 15279 deletions
5
node_modules/@firebase/messaging/README.md
generated
vendored
Normal file
5
node_modules/@firebase/messaging/README.md
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
# @firebase/messaging
|
||||
|
||||
This is the Firebase Cloud Messaging component of the Firebase JS SDK.
|
||||
|
||||
**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**
|
1233
node_modules/@firebase/messaging/dist/esm/index.esm2017.js
generated
vendored
Normal file
1233
node_modules/@firebase/messaging/dist/esm/index.esm2017.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
1
node_modules/@firebase/messaging/dist/esm/index.esm2017.js.map
generated
vendored
Normal file
1
node_modules/@firebase/messaging/dist/esm/index.esm2017.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1278
node_modules/@firebase/messaging/dist/esm/index.sw.esm2017.js
generated
vendored
Normal file
1278
node_modules/@firebase/messaging/dist/esm/index.sw.esm2017.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
1
node_modules/@firebase/messaging/dist/esm/index.sw.esm2017.js.map
generated
vendored
Normal file
1
node_modules/@firebase/messaging/dist/esm/index.sw.esm2017.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/@firebase/messaging/dist/esm/package.json
generated
vendored
Normal file
1
node_modules/@firebase/messaging/dist/esm/package.json
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"type":"module"}
|
101
node_modules/@firebase/messaging/dist/esm/src/api.d.ts
generated
vendored
Normal file
101
node_modules/@firebase/messaging/dist/esm/src/api.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,101 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { FirebaseApp } from '@firebase/app';
|
||||
import { GetTokenOptions, MessagePayload, Messaging } from './interfaces/public-types';
|
||||
import { NextFn, Observer, Unsubscribe } from '@firebase/util';
|
||||
/**
|
||||
* Retrieves a Firebase Cloud Messaging instance.
|
||||
*
|
||||
* @returns The Firebase Cloud Messaging instance associated with the provided firebase app.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function getMessagingInWindow(app?: FirebaseApp): Messaging;
|
||||
/**
|
||||
* Retrieves a Firebase Cloud Messaging instance.
|
||||
*
|
||||
* @returns The Firebase Cloud Messaging instance associated with the provided firebase app.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function getMessagingInSw(app?: FirebaseApp): Messaging;
|
||||
/**
|
||||
* Subscribes the {@link Messaging} instance to push notifications. Returns a Firebase Cloud
|
||||
* Messaging registration token that can be used to send push messages to that {@link Messaging}
|
||||
* instance.
|
||||
*
|
||||
* If notification permission isn't already granted, this method asks the user for permission. The
|
||||
* returned promise rejects if the user does not allow the app to show notifications.
|
||||
*
|
||||
* @param messaging - The {@link Messaging} instance.
|
||||
* @param options - Provides an optional vapid key and an optional service worker registration.
|
||||
*
|
||||
* @returns The promise resolves with an FCM registration token.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function getToken(messaging: Messaging, options?: GetTokenOptions): Promise<string>;
|
||||
/**
|
||||
* Deletes the registration token associated with this {@link Messaging} instance and unsubscribes
|
||||
* the {@link Messaging} instance from the push subscription.
|
||||
*
|
||||
* @param messaging - The {@link Messaging} instance.
|
||||
*
|
||||
* @returns The promise resolves when the token has been successfully deleted.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function deleteToken(messaging: Messaging): Promise<boolean>;
|
||||
/**
|
||||
* When a push message is received and the user is currently on a page for your origin, the
|
||||
* message is passed to the page and an `onMessage()` event is dispatched with the payload of
|
||||
* the push message.
|
||||
*
|
||||
*
|
||||
* @param messaging - The {@link Messaging} instance.
|
||||
* @param nextOrObserver - This function, or observer object with `next` defined,
|
||||
* is called when a message is received and the user is currently viewing your page.
|
||||
* @returns To stop listening for messages execute this returned function.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function onMessage(messaging: Messaging, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
|
||||
/**
|
||||
* Called when a message is received while the app is in the background. An app is considered to be
|
||||
* in the background if no active window is displayed.
|
||||
*
|
||||
* @param messaging - The {@link Messaging} instance.
|
||||
* @param nextOrObserver - This function, or observer object with `next` defined, is called when a
|
||||
* message is received and the app is currently in the background.
|
||||
*
|
||||
* @returns To stop listening for messages execute this returned function
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function onBackgroundMessage(messaging: Messaging, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
|
||||
/**
|
||||
* Enables or disables Firebase Cloud Messaging message delivery metrics export to BigQuery. By
|
||||
* default, message delivery metrics are not exported to BigQuery. Use this method to enable or
|
||||
* disable the export at runtime.
|
||||
*
|
||||
* @param messaging - The `FirebaseMessaging` instance.
|
||||
* @param enable - Whether Firebase Cloud Messaging should export message delivery metrics to
|
||||
* BigQuery.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function experimentalSetDeliveryMetricsExportedToBigQueryEnabled(messaging: Messaging, enable: boolean): void;
|
18
node_modules/@firebase/messaging/dist/esm/src/api/deleteToken.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/esm/src/api/deleteToken.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function deleteToken(messaging: MessagingService): Promise<boolean>;
|
19
node_modules/@firebase/messaging/dist/esm/src/api/getToken.d.ts
generated
vendored
Normal file
19
node_modules/@firebase/messaging/dist/esm/src/api/getToken.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagingService } from '../messaging-service';
|
||||
import { GetTokenOptions } from '../interfaces/public-types';
|
||||
export declare function getToken(messaging: MessagingService, options?: GetTokenOptions): Promise<string>;
|
30
node_modules/@firebase/messaging/dist/esm/src/api/isSupported.d.ts
generated
vendored
Normal file
30
node_modules/@firebase/messaging/dist/esm/src/api/isSupported.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Checks if all required APIs exist in the browser.
|
||||
* @returns a Promise that resolves to a boolean.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function isWindowSupported(): Promise<boolean>;
|
||||
/**
|
||||
* Checks whether all required APIs exist within SW Context
|
||||
* @returns a Promise that resolves to a boolean.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function isSwSupported(): Promise<boolean>;
|
19
node_modules/@firebase/messaging/dist/esm/src/api/onBackgroundMessage.d.ts
generated
vendored
Normal file
19
node_modules/@firebase/messaging/dist/esm/src/api/onBackgroundMessage.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagePayload, NextFn, Observer, Unsubscribe } from '../interfaces/public-types';
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function onBackgroundMessage(messaging: MessagingService, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
|
19
node_modules/@firebase/messaging/dist/esm/src/api/onMessage.d.ts
generated
vendored
Normal file
19
node_modules/@firebase/messaging/dist/esm/src/api/onMessage.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagePayload, NextFn, Observer, Unsubscribe } from '../interfaces/public-types';
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function onMessage(messaging: MessagingService, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
|
18
node_modules/@firebase/messaging/dist/esm/src/api/setDeliveryMetricsExportedToBigQueryEnabled.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/esm/src/api/setDeliveryMetricsExportedToBigQueryEnabled.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { Messaging } from '../interfaces/public-types';
|
||||
export declare function _setDeliveryMetricsExportedToBigQueryEnabled(messaging: Messaging, enable: boolean): void;
|
18
node_modules/@firebase/messaging/dist/esm/src/helpers/array-base64-translator.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/esm/src/helpers/array-base64-translator.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export declare function arrayToBase64(array: Uint8Array | ArrayBuffer): string;
|
||||
export declare function base64ToArray(base64String: string): Uint8Array;
|
17
node_modules/@firebase/messaging/dist/esm/src/helpers/array-base64-translator.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/esm/src/helpers/array-base64-translator.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
19
node_modules/@firebase/messaging/dist/esm/src/helpers/externalizePayload.d.ts
generated
vendored
Normal file
19
node_modules/@firebase/messaging/dist/esm/src/helpers/externalizePayload.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagePayload } from '../interfaces/public-types';
|
||||
import { MessagePayloadInternal } from '../interfaces/internal-message-payload';
|
||||
export declare function externalizePayload(internalPayload: MessagePayloadInternal): MessagePayload;
|
17
node_modules/@firebase/messaging/dist/esm/src/helpers/externalizePayload.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/esm/src/helpers/externalizePayload.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export {};
|
19
node_modules/@firebase/messaging/dist/esm/src/helpers/extract-app-config.d.ts
generated
vendored
Normal file
19
node_modules/@firebase/messaging/dist/esm/src/helpers/extract-app-config.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { FirebaseApp } from '@firebase/app';
|
||||
import { AppConfig } from '../interfaces/app-config';
|
||||
export declare function extractAppConfig(app: FirebaseApp): AppConfig;
|
17
node_modules/@firebase/messaging/dist/esm/src/helpers/extract-app-config.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/esm/src/helpers/extract-app-config.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
18
node_modules/@firebase/messaging/dist/esm/src/helpers/is-console-message.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/esm/src/helpers/is-console-message.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ConsoleMessageData } from '../interfaces/internal-message-payload';
|
||||
export declare function isConsoleMessage(data: unknown): data is ConsoleMessageData;
|
30
node_modules/@firebase/messaging/dist/esm/src/helpers/logToFirelog.d.ts
generated
vendored
Normal file
30
node_modules/@firebase/messaging/dist/esm/src/helpers/logToFirelog.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { LogEvent, LogRequest } from '../interfaces/logging-types';
|
||||
import { MessagePayloadInternal } from '../interfaces/internal-message-payload';
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function startLoggingService(messaging: MessagingService): void;
|
||||
/**
|
||||
*
|
||||
* @param messaging the messaging instance.
|
||||
* @param offsetInMs this method execute after `offsetInMs` elapsed .
|
||||
*/
|
||||
export declare function _processQueue(messaging: MessagingService, offsetInMs: number): void;
|
||||
export declare function _dispatchLogEvents(messaging: MessagingService): Promise<void>;
|
||||
export declare function stageLog(messaging: MessagingService, internalPayload: MessagePayloadInternal): Promise<void>;
|
||||
export declare function _createLogRequest(logEventQueue: LogEvent[]): LogRequest;
|
||||
export declare function _mergeStrings(s1: string, s2: string): string;
|
17
node_modules/@firebase/messaging/dist/esm/src/helpers/logToFirelog.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/esm/src/helpers/logToFirelog.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export {};
|
19
node_modules/@firebase/messaging/dist/esm/src/helpers/logToScion.d.ts
generated
vendored
Normal file
19
node_modules/@firebase/messaging/dist/esm/src/helpers/logToScion.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ConsoleMessageData, MessageType } from '../interfaces/internal-message-payload';
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function logToScion(messaging: MessagingService, messageType: MessageType, data: ConsoleMessageData): Promise<void>;
|
51
node_modules/@firebase/messaging/dist/esm/src/helpers/migrate-old-database.d.ts
generated
vendored
Normal file
51
node_modules/@firebase/messaging/dist/esm/src/helpers/migrate-old-database.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { TokenDetails } from '../interfaces/token-details';
|
||||
export interface V2TokenDetails {
|
||||
fcmToken: string;
|
||||
swScope: string;
|
||||
vapidKey: string | Uint8Array;
|
||||
subscription: PushSubscription;
|
||||
fcmSenderId: string;
|
||||
fcmPushSet: string;
|
||||
createTime?: number;
|
||||
endpoint?: string;
|
||||
auth?: string;
|
||||
p256dh?: string;
|
||||
}
|
||||
export interface V3TokenDetails {
|
||||
fcmToken: string;
|
||||
swScope: string;
|
||||
vapidKey: Uint8Array;
|
||||
fcmSenderId: string;
|
||||
fcmPushSet: string;
|
||||
endpoint: string;
|
||||
auth: ArrayBuffer;
|
||||
p256dh: ArrayBuffer;
|
||||
createTime: number;
|
||||
}
|
||||
export interface V4TokenDetails {
|
||||
fcmToken: string;
|
||||
swScope: string;
|
||||
vapidKey: Uint8Array;
|
||||
fcmSenderId: string;
|
||||
endpoint: string;
|
||||
auth: ArrayBufferLike;
|
||||
p256dh: ArrayBufferLike;
|
||||
createTime: number;
|
||||
}
|
||||
export declare function migrateOldDatabase(senderId: string): Promise<TokenDetails | null>;
|
17
node_modules/@firebase/messaging/dist/esm/src/helpers/migrate-old-database.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/esm/src/helpers/migrate-old-database.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
23
node_modules/@firebase/messaging/dist/esm/src/helpers/register.d.ts
generated
vendored
Normal file
23
node_modules/@firebase/messaging/dist/esm/src/helpers/register.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export declare function registerMessagingInWindow(): void;
|
||||
/**
|
||||
* The messaging instance registered in sw is named differently than that of in client. This is
|
||||
* because both `registerMessagingInWindow` and `registerMessagingInSw` would be called in
|
||||
* `messaging-compat` and component with the same name can only be registered once.
|
||||
*/
|
||||
export declare function registerMessagingInSw(): void;
|
18
node_modules/@firebase/messaging/dist/esm/src/helpers/registerDefaultSw.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/esm/src/helpers/registerDefaultSw.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function registerDefaultSw(messaging: MessagingService): Promise<void>;
|
18
node_modules/@firebase/messaging/dist/esm/src/helpers/sleep.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/esm/src/helpers/sleep.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/** Returns a promise that resolves after given time passes. */
|
||||
export declare function sleep(ms: number): Promise<void>;
|
17
node_modules/@firebase/messaging/dist/esm/src/helpers/sleep.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/esm/src/helpers/sleep.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
18
node_modules/@firebase/messaging/dist/esm/src/helpers/updateSwReg.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/esm/src/helpers/updateSwReg.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function updateSwReg(messaging: MessagingService, swRegistration?: ServiceWorkerRegistration | undefined): Promise<void>;
|
18
node_modules/@firebase/messaging/dist/esm/src/helpers/updateVapidKey.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/esm/src/helpers/updateVapidKey.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function updateVapidKey(messaging: MessagingService, vapidKey?: string | undefined): Promise<void>;
|
32
node_modules/@firebase/messaging/dist/esm/src/index.d.ts
generated
vendored
Normal file
32
node_modules/@firebase/messaging/dist/esm/src/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* The Firebase Cloud Messaging Web SDK.
|
||||
* This SDK does not work in a Node.js environment.
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '@firebase/installations';
|
||||
import { Messaging } from './interfaces/public-types';
|
||||
export { getToken, deleteToken, onMessage, getMessagingInWindow as getMessaging } from './api';
|
||||
export { isWindowSupported as isSupported } from './api/isSupported';
|
||||
export * from './interfaces/public-types';
|
||||
declare module '@firebase/component' {
|
||||
interface NameServiceMapping {
|
||||
'messaging': Messaging;
|
||||
}
|
||||
}
|
26
node_modules/@firebase/messaging/dist/esm/src/index.sw.d.ts
generated
vendored
Normal file
26
node_modules/@firebase/messaging/dist/esm/src/index.sw.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '@firebase/installations';
|
||||
import { Messaging } from './interfaces/public-types';
|
||||
export * from './interfaces/public-types';
|
||||
export { onBackgroundMessage, getMessagingInSw as getMessaging, experimentalSetDeliveryMetricsExportedToBigQueryEnabled } from './api';
|
||||
export { isSwSupported as isSupported } from './api/isSupported';
|
||||
declare module '@firebase/component' {
|
||||
interface NameServiceMapping {
|
||||
'messaging-sw': Messaging;
|
||||
}
|
||||
}
|
24
node_modules/@firebase/messaging/dist/esm/src/interfaces/app-config.d.ts
generated
vendored
Normal file
24
node_modules/@firebase/messaging/dist/esm/src/interfaces/app-config.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export interface AppConfig {
|
||||
readonly appName: string;
|
||||
readonly projectId: string;
|
||||
readonly apiKey: string;
|
||||
readonly appId: string;
|
||||
/** Only used for old DB migration. */
|
||||
readonly senderId: string;
|
||||
}
|
27
node_modules/@firebase/messaging/dist/esm/src/interfaces/internal-dependencies.d.ts
generated
vendored
Normal file
27
node_modules/@firebase/messaging/dist/esm/src/interfaces/internal-dependencies.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { AppConfig } from './app-config';
|
||||
import { FirebaseAnalyticsInternalName } from '@firebase/analytics-interop-types';
|
||||
import { FirebaseApp } from '@firebase/app';
|
||||
import { Provider } from '@firebase/component';
|
||||
import { _FirebaseInstallationsInternal } from '@firebase/installations';
|
||||
export interface FirebaseInternalDependencies {
|
||||
app: FirebaseApp;
|
||||
appConfig: AppConfig;
|
||||
installations: _FirebaseInstallationsInternal;
|
||||
analyticsProvider: Provider<FirebaseAnalyticsInternalName>;
|
||||
}
|
46
node_modules/@firebase/messaging/dist/esm/src/interfaces/internal-message-payload.d.ts
generated
vendored
Normal file
46
node_modules/@firebase/messaging/dist/esm/src/interfaces/internal-message-payload.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2018 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
||||
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
* or implied. See the License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
import { CONSOLE_CAMPAIGN_ANALYTICS_ENABLED, CONSOLE_CAMPAIGN_ID, CONSOLE_CAMPAIGN_NAME, CONSOLE_CAMPAIGN_TIME } from '../util/constants';
|
||||
export interface MessagePayloadInternal {
|
||||
notification?: NotificationPayloadInternal;
|
||||
data?: unknown;
|
||||
fcmOptions?: FcmOptionsInternal;
|
||||
messageType?: MessageType;
|
||||
isFirebaseMessaging?: boolean;
|
||||
from: string;
|
||||
fcmMessageId: string;
|
||||
productId: number;
|
||||
collapse_key: string;
|
||||
}
|
||||
export interface NotificationPayloadInternal extends NotificationOptions {
|
||||
title: string;
|
||||
click_action?: string;
|
||||
icon?: string;
|
||||
}
|
||||
export interface FcmOptionsInternal {
|
||||
link?: string;
|
||||
analytics_label?: string;
|
||||
}
|
||||
export declare enum MessageType {
|
||||
PUSH_RECEIVED = "push-received",
|
||||
NOTIFICATION_CLICKED = "notification-clicked"
|
||||
}
|
||||
/** Additional data of a message sent from the FN Console. */
|
||||
export interface ConsoleMessageData {
|
||||
[CONSOLE_CAMPAIGN_ID]: string;
|
||||
[CONSOLE_CAMPAIGN_TIME]: string;
|
||||
[CONSOLE_CAMPAIGN_NAME]?: string;
|
||||
[CONSOLE_CAMPAIGN_ANALYTICS_ENABLED]?: '1';
|
||||
}
|
60
node_modules/@firebase/messaging/dist/esm/src/interfaces/logging-types.d.ts
generated
vendored
Normal file
60
node_modules/@firebase/messaging/dist/esm/src/interfaces/logging-types.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2021 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
||||
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
* or implied. See the License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
export interface FcmEvent {
|
||||
project_number: string;
|
||||
message_id: string;
|
||||
instance_id: string;
|
||||
message_type: string;
|
||||
sdk_platform: string;
|
||||
package_name: string;
|
||||
collapse_key: string;
|
||||
event: string;
|
||||
analytics_label?: string;
|
||||
}
|
||||
/**
|
||||
* A LogRequest represents a batched collection of loggable events sent to firelog, each event to be
|
||||
* processed and sent to Sawmill. Defined as in proto/clientanalytics.proto#LogRequest
|
||||
*/
|
||||
export interface LogRequest {
|
||||
log_source: string;
|
||||
log_event: LogEvent[];
|
||||
}
|
||||
export interface LogEvent {
|
||||
event_time_ms: string;
|
||||
source_extension_json_proto3: string;
|
||||
compliance_data: ComplianceData;
|
||||
}
|
||||
export interface ComplianceData {
|
||||
privacy_context: ExternalPrivacyContext;
|
||||
}
|
||||
export interface ExternalPrivacyContext {
|
||||
prequest: ExternalPRequestContext;
|
||||
}
|
||||
export interface ExternalPRequestContext {
|
||||
origin_associated_product_id: number;
|
||||
}
|
||||
export interface LogResponse {
|
||||
nextRequestWaitMillis: number;
|
||||
logResponseDetails: LogResponseDetails[];
|
||||
}
|
||||
interface LogResponseDetails {
|
||||
responseAction: UserResponse;
|
||||
}
|
||||
export declare const enum UserResponse {
|
||||
RESPONSE_ACTION_UNKNOWN = "RESPONSE_ACTION_UNKNOWN",
|
||||
RETRY_REQUEST_LATER = "RETRY_REQUEST_LATER",
|
||||
DELETE_REQUEST = "DELETE_REQUEST"
|
||||
}
|
||||
export {};
|
144
node_modules/@firebase/messaging/dist/esm/src/interfaces/public-types.d.ts
generated
vendored
Normal file
144
node_modules/@firebase/messaging/dist/esm/src/interfaces/public-types.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,144 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { FirebaseApp } from '@firebase/app';
|
||||
/**
|
||||
* Display notification details. Details are sent through the
|
||||
* {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface NotificationPayload {
|
||||
/**
|
||||
* The notification's title.
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* The notification's body text.
|
||||
*/
|
||||
body?: string;
|
||||
/**
|
||||
* The URL of an image that is downloaded on the device and displayed in the notification.
|
||||
*/
|
||||
image?: string;
|
||||
/**
|
||||
* The URL to use for the notification's icon. If you don't send this key in the request,
|
||||
* FCM displays the launcher icon specified in your app manifest.
|
||||
*/
|
||||
icon?: string;
|
||||
}
|
||||
/**
|
||||
* Options for features provided by the FCM SDK for Web. See {@link
|
||||
* https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions |
|
||||
* WebpushFcmOptions}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface FcmOptions {
|
||||
/**
|
||||
* The link to open when the user clicks on the notification.
|
||||
*/
|
||||
link?: string;
|
||||
/**
|
||||
* The label associated with the message's analytics data.
|
||||
*/
|
||||
analyticsLabel?: string;
|
||||
}
|
||||
/**
|
||||
* Message payload that contains the notification payload that is represented with
|
||||
* {@link NotificationPayload} and the data payload that contains an arbitrary
|
||||
* number of key-value pairs sent by developers through the
|
||||
* {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface MessagePayload {
|
||||
/**
|
||||
* {@inheritdoc NotificationPayload}
|
||||
*/
|
||||
notification?: NotificationPayload;
|
||||
/**
|
||||
* Arbitrary key/value payload.
|
||||
*/
|
||||
data?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* {@inheritdoc FcmOptions}
|
||||
*/
|
||||
fcmOptions?: FcmOptions;
|
||||
/**
|
||||
* The sender of this message.
|
||||
*/
|
||||
from: string;
|
||||
/**
|
||||
* The collapse key of the message. See
|
||||
* {@link https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages | Non-collapsible and collapsible messages}
|
||||
*/
|
||||
collapseKey: string;
|
||||
/**
|
||||
* The message ID of a message.
|
||||
*/
|
||||
messageId: string;
|
||||
}
|
||||
/**
|
||||
* Options for {@link getToken}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface GetTokenOptions {
|
||||
/**
|
||||
* The public server key provided to push services. The key is used to
|
||||
* authenticate push subscribers to receive push messages only from sending servers that hold
|
||||
* the corresponding private key. If it is not provided, a default VAPID key is used. Note that some
|
||||
* push services (Chrome Push Service) require a non-default VAPID key. Therefore, it is recommended
|
||||
* to generate and import a VAPID key for your project with
|
||||
* {@link https://firebase.google.com/docs/cloud-messaging/js/client#configure_web_credentials_in_your_app | Configure Web Credentials with FCM}.
|
||||
* See
|
||||
* {@link https://developers.google.com/web/fundamentals/push-notifications/web-push-protocol | The Web Push Protocol}
|
||||
* for details on web push services.
|
||||
*/
|
||||
vapidKey?: string;
|
||||
/**
|
||||
* The service worker registration for receiving push
|
||||
* messaging. If the registration is not provided explicitly, you need to have a
|
||||
* `firebase-messaging-sw.js` at your root location. See
|
||||
* {@link https://firebase.google.com/docs/cloud-messaging/js/client#access_the_registration_token | Access the registration token}
|
||||
* for more details.
|
||||
*/
|
||||
serviceWorkerRegistration?: ServiceWorkerRegistration;
|
||||
}
|
||||
/**
|
||||
* Public interface of the Firebase Cloud Messaging SDK.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface Messaging {
|
||||
/**
|
||||
* The {@link @firebase/app#FirebaseApp} this `Messaging` instance is associated with.
|
||||
*/
|
||||
app: FirebaseApp;
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare type _FirebaseMessagingName = 'messaging';
|
||||
export { NextFn, Observer, Unsubscribe } from '@firebase/util';
|
||||
declare module '@firebase/component' {
|
||||
interface NameServiceMapping {
|
||||
'messaging': Messaging;
|
||||
}
|
||||
}
|
32
node_modules/@firebase/messaging/dist/esm/src/interfaces/token-details.d.ts
generated
vendored
Normal file
32
node_modules/@firebase/messaging/dist/esm/src/interfaces/token-details.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2018 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export interface TokenDetails {
|
||||
token: string;
|
||||
createTime: number;
|
||||
/** Does not exist in Safari since it's not using Push API. */
|
||||
subscriptionOptions?: SubscriptionOptions;
|
||||
}
|
||||
/**
|
||||
* Additional options and values required by a Push API subscription.
|
||||
*/
|
||||
export interface SubscriptionOptions {
|
||||
vapidKey: string;
|
||||
swScope: string;
|
||||
endpoint: string;
|
||||
auth: string;
|
||||
p256dh: string;
|
||||
}
|
27
node_modules/@firebase/messaging/dist/esm/src/internals/idb-manager.d.ts
generated
vendored
Normal file
27
node_modules/@firebase/messaging/dist/esm/src/internals/idb-manager.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { FirebaseInternalDependencies } from '../interfaces/internal-dependencies';
|
||||
import { TokenDetails } from '../interfaces/token-details';
|
||||
export declare const DATABASE_NAME = "firebase-messaging-database";
|
||||
/** Gets record(s) from the objectStore that match the given key. */
|
||||
export declare function dbGet(firebaseDependencies: FirebaseInternalDependencies): Promise<TokenDetails | undefined>;
|
||||
/** Assigns or overwrites the record for the given key with the given value. */
|
||||
export declare function dbSet(firebaseDependencies: FirebaseInternalDependencies, tokenDetails: TokenDetails): Promise<TokenDetails>;
|
||||
/** Removes record(s) from the objectStore that match the given key. */
|
||||
export declare function dbRemove(firebaseDependencies: FirebaseInternalDependencies): Promise<void>;
|
||||
/** Deletes the DB. Useful for tests. */
|
||||
export declare function dbDelete(): Promise<void>;
|
17
node_modules/@firebase/messaging/dist/esm/src/internals/idb-manager.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/esm/src/internals/idb-manager.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
35
node_modules/@firebase/messaging/dist/esm/src/internals/requests.d.ts
generated
vendored
Normal file
35
node_modules/@firebase/messaging/dist/esm/src/internals/requests.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { SubscriptionOptions, TokenDetails } from '../interfaces/token-details';
|
||||
import { FirebaseInternalDependencies } from '../interfaces/internal-dependencies';
|
||||
export interface ApiResponse {
|
||||
token?: string;
|
||||
error?: {
|
||||
message: string;
|
||||
};
|
||||
}
|
||||
export interface ApiRequestBody {
|
||||
web: {
|
||||
endpoint: string;
|
||||
p256dh: string;
|
||||
auth: string;
|
||||
applicationPubKey?: string;
|
||||
};
|
||||
}
|
||||
export declare function requestGetToken(firebaseDependencies: FirebaseInternalDependencies, subscriptionOptions: SubscriptionOptions): Promise<string>;
|
||||
export declare function requestUpdateToken(firebaseDependencies: FirebaseInternalDependencies, tokenDetails: TokenDetails): Promise<string>;
|
||||
export declare function requestDeleteToken(firebaseDependencies: FirebaseInternalDependencies, token: string): Promise<void>;
|
17
node_modules/@firebase/messaging/dist/esm/src/internals/requests.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/esm/src/internals/requests.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
23
node_modules/@firebase/messaging/dist/esm/src/internals/token-manager.d.ts
generated
vendored
Normal file
23
node_modules/@firebase/messaging/dist/esm/src/internals/token-manager.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function getTokenInternal(messaging: MessagingService): Promise<string>;
|
||||
/**
|
||||
* This method deletes the token from the database, unsubscribes the token from FCM, and unregisters
|
||||
* the push subscription if it exists.
|
||||
*/
|
||||
export declare function deleteTokenInternal(messaging: MessagingService): Promise<boolean>;
|
17
node_modules/@firebase/messaging/dist/esm/src/internals/token-manager.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/esm/src/internals/token-manager.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
21
node_modules/@firebase/messaging/dist/esm/src/listeners/sw-listeners.d.ts
generated
vendored
Normal file
21
node_modules/@firebase/messaging/dist/esm/src/listeners/sw-listeners.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { NotificationEvent, PushEvent, PushSubscriptionChangeEvent } from '../util/sw-types';
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function onSubChange(event: PushSubscriptionChangeEvent, messaging: MessagingService): Promise<void>;
|
||||
export declare function onPush(event: PushEvent, messaging: MessagingService): Promise<void>;
|
||||
export declare function onNotificationClick(event: NotificationEvent): Promise<void>;
|
17
node_modules/@firebase/messaging/dist/esm/src/listeners/sw-listeners.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/esm/src/listeners/sw-listeners.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
18
node_modules/@firebase/messaging/dist/esm/src/listeners/window-listener.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/esm/src/listeners/window-listener.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function messageEventListener(messaging: MessagingService, event: MessageEvent): Promise<void>;
|
36
node_modules/@firebase/messaging/dist/esm/src/messaging-service.d.ts
generated
vendored
Normal file
36
node_modules/@firebase/messaging/dist/esm/src/messaging-service.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { FirebaseApp, _FirebaseService } from '@firebase/app';
|
||||
import { MessagePayload, NextFn, Observer } from './interfaces/public-types';
|
||||
import { FirebaseAnalyticsInternalName } from '@firebase/analytics-interop-types';
|
||||
import { FirebaseInternalDependencies } from './interfaces/internal-dependencies';
|
||||
import { LogEvent } from './interfaces/logging-types';
|
||||
import { Provider } from '@firebase/component';
|
||||
import { _FirebaseInstallationsInternal } from '@firebase/installations';
|
||||
export declare class MessagingService implements _FirebaseService {
|
||||
readonly app: FirebaseApp;
|
||||
readonly firebaseDependencies: FirebaseInternalDependencies;
|
||||
swRegistration?: ServiceWorkerRegistration;
|
||||
vapidKey?: string;
|
||||
deliveryMetricsExportedToBigQueryEnabled: boolean;
|
||||
onBackgroundMessageHandler: NextFn<MessagePayload> | Observer<MessagePayload> | null;
|
||||
onMessageHandler: NextFn<MessagePayload> | Observer<MessagePayload> | null;
|
||||
logEvents: LogEvent[];
|
||||
isLogServiceStarted: boolean;
|
||||
constructor(app: FirebaseApp, installations: _FirebaseInstallationsInternal, analyticsProvider: Provider<FirebaseAnalyticsInternalName>);
|
||||
_delete(): Promise<void>;
|
||||
}
|
22
node_modules/@firebase/messaging/dist/esm/src/testing/compare-headers.d.ts
generated
vendored
Normal file
22
node_modules/@firebase/messaging/dist/esm/src/testing/compare-headers.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import './setup';
|
||||
declare class HeadersWithEntries extends Headers {
|
||||
entries?(): Iterable<[string, string]>;
|
||||
}
|
||||
export declare function compareHeaders(expectedHeaders: HeadersWithEntries, actualHeaders: HeadersWithEntries): void;
|
||||
export {};
|
17
node_modules/@firebase/messaging/dist/esm/src/testing/compare-headers.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/esm/src/testing/compare-headers.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import './setup';
|
25
node_modules/@firebase/messaging/dist/esm/src/testing/fakes/firebase-dependencies.d.ts
generated
vendored
Normal file
25
node_modules/@firebase/messaging/dist/esm/src/testing/fakes/firebase-dependencies.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { FirebaseAnalyticsInternalName } from '@firebase/analytics-interop-types';
|
||||
import { FirebaseInternalDependencies } from '../../interfaces/internal-dependencies';
|
||||
import { FirebaseOptions } from '@firebase/app';
|
||||
import { Provider } from '@firebase/component';
|
||||
import { _FirebaseInstallationsInternal } from '@firebase/installations';
|
||||
export declare function getFakeFirebaseDependencies(options?: FirebaseOptions): FirebaseInternalDependencies;
|
||||
export declare function getFakeApp(options?: FirebaseOptions): any;
|
||||
export declare function getFakeInstallations(): _FirebaseInstallationsInternal;
|
||||
export declare function getFakeAnalyticsProvider(): Provider<FirebaseAnalyticsInternalName>;
|
18
node_modules/@firebase/messaging/dist/esm/src/testing/fakes/logging-object.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/esm/src/testing/fakes/logging-object.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2021 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
||||
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
* or implied. See the License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
import { LogEvent, LogResponse } from '../../interfaces/logging-types';
|
||||
export declare function getFakeLogEvent(): LogEvent;
|
||||
export declare function getSuccessResponse(): LogResponse;
|
||||
export declare function getFailedResponse(): LogResponse;
|
18
node_modules/@firebase/messaging/dist/esm/src/testing/fakes/messaging-service.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/esm/src/testing/fakes/messaging-service.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2021 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagingService } from '../../messaging-service';
|
||||
export declare function getFakeMessagingService(): MessagingService;
|
83
node_modules/@firebase/messaging/dist/esm/src/testing/fakes/service-worker.d.ts
generated
vendored
Normal file
83
node_modules/@firebase/messaging/dist/esm/src/testing/fakes/service-worker.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,83 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ExtendableEvent } from '../../util/sw-types';
|
||||
export declare function mockServiceWorker(): void;
|
||||
export declare function restoreServiceWorker(): void;
|
||||
export declare class FakeServiceWorkerRegistration implements ServiceWorkerRegistration {
|
||||
active: null;
|
||||
installing: null;
|
||||
waiting: null;
|
||||
onupdatefound: null;
|
||||
pushManager: FakePushManager;
|
||||
scope: string;
|
||||
navigationPreload: NavigationPreloadManager;
|
||||
updateViaCache: ServiceWorkerUpdateViaCache;
|
||||
getNotifications(): Promise<never[]>;
|
||||
showNotification(): Promise<void>;
|
||||
update(): Promise<void>;
|
||||
unregister(): Promise<boolean>;
|
||||
addEventListener(): void;
|
||||
removeEventListener(): void;
|
||||
dispatchEvent(): boolean;
|
||||
}
|
||||
declare class FakePushManager implements PushManager {
|
||||
private subscription;
|
||||
permissionState(): Promise<"granted">;
|
||||
getSubscription(): Promise<FakePushSubscription | null>;
|
||||
subscribe(): Promise<FakePushSubscription>;
|
||||
}
|
||||
export declare class FakePushSubscription implements PushSubscription {
|
||||
endpoint: string;
|
||||
expirationTime: number;
|
||||
auth: string;
|
||||
p256: string;
|
||||
getKey(name: PushEncryptionKeyName): Uint8Array;
|
||||
unsubscribe(): Promise<boolean>;
|
||||
toJSON: () => PushSubscriptionJSON;
|
||||
options: PushSubscriptionOptions;
|
||||
}
|
||||
/**
|
||||
* Most of the fields in here are unused / deprecated. They are only added here to match the TS
|
||||
* Event interface.
|
||||
*/
|
||||
export declare class FakeEvent implements ExtendableEvent {
|
||||
type: string;
|
||||
NONE: number;
|
||||
AT_TARGET: number;
|
||||
BUBBLING_PHASE: number;
|
||||
CAPTURING_PHASE: number;
|
||||
bubbles: boolean;
|
||||
cancelable: boolean;
|
||||
composed: boolean;
|
||||
timeStamp: number;
|
||||
isTrusted: boolean;
|
||||
eventPhase: number;
|
||||
target: null;
|
||||
currentTarget: null;
|
||||
srcElement: null;
|
||||
cancelBubble: boolean;
|
||||
defaultPrevented: boolean;
|
||||
returnValue: boolean;
|
||||
preventDefault(): void;
|
||||
stopPropagation(): void;
|
||||
stopImmediatePropagation(): void;
|
||||
initEvent(): void;
|
||||
waitUntil(): void;
|
||||
composedPath(): never[];
|
||||
constructor(type: string, options?: EventInit);
|
||||
}
|
||||
export {};
|
18
node_modules/@firebase/messaging/dist/esm/src/testing/fakes/token-details.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/esm/src/testing/fakes/token-details.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { TokenDetails } from '../../interfaces/token-details';
|
||||
export declare function getFakeTokenDetails(): TokenDetails;
|
17
node_modules/@firebase/messaging/dist/esm/src/testing/setup.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/esm/src/testing/setup.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export {};
|
19
node_modules/@firebase/messaging/dist/esm/src/testing/sinon-types.d.ts
generated
vendored
Normal file
19
node_modules/@firebase/messaging/dist/esm/src/testing/sinon-types.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { SinonSpy, SinonStub } from 'sinon';
|
||||
export declare type Stub<T extends (...args: any) => any> = SinonStub<Parameters<T>, ReturnType<T>>;
|
||||
export declare type Spy<T extends (...args: any) => any> = SinonSpy<Parameters<T>, ReturnType<T>>;
|
39
node_modules/@firebase/messaging/dist/esm/src/util/constants.d.ts
generated
vendored
Normal file
39
node_modules/@firebase/messaging/dist/esm/src/util/constants.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export declare const DEFAULT_SW_PATH = "/firebase-messaging-sw.js";
|
||||
export declare const DEFAULT_SW_SCOPE = "/firebase-cloud-messaging-push-scope";
|
||||
export declare const DEFAULT_VAPID_KEY = "BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4";
|
||||
export declare const ENDPOINT = "https://fcmregistrations.googleapis.com/v1";
|
||||
/** Key of FCM Payload in Notification's data field. */
|
||||
export declare const FCM_MSG = "FCM_MSG";
|
||||
export declare const CONSOLE_CAMPAIGN_ID = "google.c.a.c_id";
|
||||
export declare const CONSOLE_CAMPAIGN_NAME = "google.c.a.c_l";
|
||||
export declare const CONSOLE_CAMPAIGN_TIME = "google.c.a.ts";
|
||||
/** Set to '1' if Analytics is enabled for the campaign */
|
||||
export declare const CONSOLE_CAMPAIGN_ANALYTICS_ENABLED = "google.c.a.e";
|
||||
export declare const TAG = "FirebaseMessaging: ";
|
||||
export declare const MAX_NUMBER_OF_EVENTS_PER_LOG_REQUEST = 1000;
|
||||
export declare const MAX_RETRIES = 3;
|
||||
export declare const LOG_INTERVAL_IN_MS = 86400000;
|
||||
export declare const DEFAULT_BACKOFF_TIME_MS = 5000;
|
||||
export declare const FCM_LOG_SOURCE = 1249;
|
||||
export declare const SDK_PLATFORM_WEB = 3;
|
||||
export declare const EVENT_MESSAGE_DELIVERED = 1;
|
||||
export declare enum MessageType {
|
||||
DATA_MESSAGE = 1,
|
||||
DISPLAY_NOTIFICATION = 3
|
||||
}
|
57
node_modules/@firebase/messaging/dist/esm/src/util/errors.d.ts
generated
vendored
Normal file
57
node_modules/@firebase/messaging/dist/esm/src/util/errors.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ErrorFactory, ErrorMap } from '@firebase/util';
|
||||
export declare const enum ErrorCode {
|
||||
MISSING_APP_CONFIG_VALUES = "missing-app-config-values",
|
||||
AVAILABLE_IN_WINDOW = "only-available-in-window",
|
||||
AVAILABLE_IN_SW = "only-available-in-sw",
|
||||
PERMISSION_DEFAULT = "permission-default",
|
||||
PERMISSION_BLOCKED = "permission-blocked",
|
||||
UNSUPPORTED_BROWSER = "unsupported-browser",
|
||||
INDEXED_DB_UNSUPPORTED = "indexed-db-unsupported",
|
||||
FAILED_DEFAULT_REGISTRATION = "failed-service-worker-registration",
|
||||
TOKEN_SUBSCRIBE_FAILED = "token-subscribe-failed",
|
||||
TOKEN_SUBSCRIBE_NO_TOKEN = "token-subscribe-no-token",
|
||||
TOKEN_UNSUBSCRIBE_FAILED = "token-unsubscribe-failed",
|
||||
TOKEN_UPDATE_FAILED = "token-update-failed",
|
||||
TOKEN_UPDATE_NO_TOKEN = "token-update-no-token",
|
||||
INVALID_BG_HANDLER = "invalid-bg-handler",
|
||||
USE_SW_AFTER_GET_TOKEN = "use-sw-after-get-token",
|
||||
INVALID_SW_REGISTRATION = "invalid-sw-registration",
|
||||
USE_VAPID_KEY_AFTER_GET_TOKEN = "use-vapid-key-after-get-token",
|
||||
INVALID_VAPID_KEY = "invalid-vapid-key"
|
||||
}
|
||||
export declare const ERROR_MAP: ErrorMap<ErrorCode>;
|
||||
interface ErrorParams {
|
||||
[ErrorCode.MISSING_APP_CONFIG_VALUES]: {
|
||||
valueName: string;
|
||||
};
|
||||
[ErrorCode.FAILED_DEFAULT_REGISTRATION]: {
|
||||
browserErrorMessage: string;
|
||||
};
|
||||
[ErrorCode.TOKEN_SUBSCRIBE_FAILED]: {
|
||||
errorInfo: string;
|
||||
};
|
||||
[ErrorCode.TOKEN_UNSUBSCRIBE_FAILED]: {
|
||||
errorInfo: string;
|
||||
};
|
||||
[ErrorCode.TOKEN_UPDATE_FAILED]: {
|
||||
errorInfo: string;
|
||||
};
|
||||
}
|
||||
export declare const ERROR_FACTORY: ErrorFactory<ErrorCode, ErrorParams>;
|
||||
export {};
|
90
node_modules/@firebase/messaging/dist/esm/src/util/sw-types.d.ts
generated
vendored
Normal file
90
node_modules/@firebase/messaging/dist/esm/src/util/sw-types.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,90 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2018 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Subset of Web Worker types from lib.webworker.d.ts
|
||||
* https://github.com/Microsoft/TypeScript/blob/master/lib/lib.webworker.d.ts
|
||||
*
|
||||
* Since it's not possible to have both "dom" and "webworker" libs in a single project, we have to
|
||||
* manually declare the web worker types we need.
|
||||
*/
|
||||
export interface ServiceWorkerGlobalScope {
|
||||
readonly location: WorkerLocation;
|
||||
readonly clients: Clients;
|
||||
readonly registration: ServiceWorkerRegistration;
|
||||
addEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
||||
}
|
||||
export interface ServiceWorkerGlobalScopeEventMap {
|
||||
notificationclick: NotificationEvent;
|
||||
push: PushEvent;
|
||||
pushsubscriptionchange: PushSubscriptionChangeEvent;
|
||||
}
|
||||
export interface Client {
|
||||
readonly id: string;
|
||||
readonly type: ClientTypes;
|
||||
readonly url: string;
|
||||
postMessage(message: any, transfer?: Transferable[]): void;
|
||||
}
|
||||
export interface ClientQueryOptions {
|
||||
includeReserved?: boolean;
|
||||
includeUncontrolled?: boolean;
|
||||
type?: ClientTypes;
|
||||
}
|
||||
export interface WindowClient extends Client {
|
||||
readonly focused: boolean;
|
||||
readonly visibilityState: DocumentVisibilityState;
|
||||
focus(): Promise<WindowClient>;
|
||||
navigate(url: string): Promise<WindowClient>;
|
||||
}
|
||||
export interface Clients {
|
||||
claim(): Promise<void>;
|
||||
get(id: string): Promise<any>;
|
||||
matchAll(options?: ClientQueryOptions): Promise<Client[]>;
|
||||
openWindow(url: string): Promise<WindowClient | null>;
|
||||
}
|
||||
export interface ExtendableEvent extends Event {
|
||||
waitUntil(f: Promise<any>): void;
|
||||
}
|
||||
export interface NotificationEvent extends ExtendableEvent {
|
||||
readonly action: string;
|
||||
readonly notification: Notification;
|
||||
}
|
||||
interface PushMessageData {
|
||||
arrayBuffer(): ArrayBuffer;
|
||||
blob(): Blob;
|
||||
json(): any;
|
||||
text(): string;
|
||||
}
|
||||
export interface PushEvent extends ExtendableEvent {
|
||||
readonly data: PushMessageData | null;
|
||||
}
|
||||
export interface PushSubscriptionChangeEvent extends ExtendableEvent {
|
||||
readonly newSubscription: PushSubscription | null;
|
||||
readonly oldSubscription: PushSubscription | null;
|
||||
}
|
||||
interface WorkerLocation {
|
||||
readonly hash: string;
|
||||
readonly host: string;
|
||||
readonly hostname: string;
|
||||
readonly href: string;
|
||||
readonly origin: string;
|
||||
readonly pathname: string;
|
||||
readonly port: string;
|
||||
readonly protocol: string;
|
||||
readonly search: string;
|
||||
toString(): string;
|
||||
}
|
||||
export {};
|
204
node_modules/@firebase/messaging/dist/index-public.d.ts
generated
vendored
Normal file
204
node_modules/@firebase/messaging/dist/index-public.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,204 @@
|
|||
/**
|
||||
* The Firebase Cloud Messaging Web SDK.
|
||||
* This SDK does not work in a Node.js environment.
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
import { FirebaseApp } from '@firebase/app';
|
||||
|
||||
import { NextFn , Observer , Unsubscribe } from '@firebase/util';
|
||||
|
||||
/**
|
||||
* Deletes the registration token associated with this {@link Messaging} instance and unsubscribes
|
||||
* the {@link Messaging} instance from the push subscription.
|
||||
*
|
||||
* @param messaging - The {@link Messaging} instance.
|
||||
*
|
||||
* @returns The promise resolves when the token has been successfully deleted.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function deleteToken(messaging: Messaging): Promise<boolean>;
|
||||
/**
|
||||
* Options for features provided by the FCM SDK for Web. See {@link
|
||||
* https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions |
|
||||
* WebpushFcmOptions}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare interface FcmOptions {
|
||||
/**
|
||||
* The link to open when the user clicks on the notification.
|
||||
*/
|
||||
link?: string;
|
||||
/**
|
||||
* The label associated with the message's analytics data.
|
||||
*/
|
||||
analyticsLabel?: string;
|
||||
}
|
||||
/* Excluded from this release type: _FirebaseMessagingName */
|
||||
/**
|
||||
* Retrieves a Firebase Cloud Messaging instance.
|
||||
*
|
||||
* @returns The Firebase Cloud Messaging instance associated with the provided firebase app.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function getMessaging(app?: FirebaseApp): Messaging;
|
||||
/**
|
||||
* Subscribes the {@link Messaging} instance to push notifications. Returns a Firebase Cloud
|
||||
* Messaging registration token that can be used to send push messages to that {@link Messaging}
|
||||
* instance.
|
||||
*
|
||||
* If notification permission isn't already granted, this method asks the user for permission. The
|
||||
* returned promise rejects if the user does not allow the app to show notifications.
|
||||
*
|
||||
* @param messaging - The {@link Messaging} instance.
|
||||
* @param options - Provides an optional vapid key and an optional service worker registration.
|
||||
*
|
||||
* @returns The promise resolves with an FCM registration token.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function getToken(messaging: Messaging, options?: GetTokenOptions): Promise<string>;
|
||||
/**
|
||||
* Options for {@link getToken}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare interface GetTokenOptions {
|
||||
/**
|
||||
* The public server key provided to push services. The key is used to
|
||||
* authenticate push subscribers to receive push messages only from sending servers that hold
|
||||
* the corresponding private key. If it is not provided, a default VAPID key is used. Note that some
|
||||
* push services (Chrome Push Service) require a non-default VAPID key. Therefore, it is recommended
|
||||
* to generate and import a VAPID key for your project with
|
||||
* {@link https://firebase.google.com/docs/cloud-messaging/js/client#configure_web_credentials_in_your_app | Configure Web Credentials with FCM}.
|
||||
* See
|
||||
* {@link https://developers.google.com/web/fundamentals/push-notifications/web-push-protocol | The Web Push Protocol}
|
||||
* for details on web push services.
|
||||
*/
|
||||
vapidKey?: string;
|
||||
/**
|
||||
* The service worker registration for receiving push
|
||||
* messaging. If the registration is not provided explicitly, you need to have a
|
||||
* `firebase-messaging-sw.js` at your root location. See
|
||||
* {@link https://firebase.google.com/docs/cloud-messaging/js/client#access_the_registration_token | Access the registration token}
|
||||
* for more details.
|
||||
*/
|
||||
serviceWorkerRegistration?: ServiceWorkerRegistration;
|
||||
}
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Checks if all required APIs exist in the browser.
|
||||
* @returns a Promise that resolves to a boolean.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function isSupported(): Promise<boolean>;
|
||||
/**
|
||||
* Message payload that contains the notification payload that is represented with
|
||||
* {@link NotificationPayload} and the data payload that contains an arbitrary
|
||||
* number of key-value pairs sent by developers through the
|
||||
* {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare interface MessagePayload {
|
||||
/**
|
||||
* {@inheritdoc NotificationPayload}
|
||||
*/
|
||||
notification?: NotificationPayload;
|
||||
/**
|
||||
* Arbitrary key/value payload.
|
||||
*/
|
||||
data?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* {@inheritdoc FcmOptions}
|
||||
*/
|
||||
fcmOptions?: FcmOptions;
|
||||
/**
|
||||
* The sender of this message.
|
||||
*/
|
||||
from: string;
|
||||
/**
|
||||
* The collapse key of the message. See
|
||||
* {@link https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages | Non-collapsible and collapsible messages}
|
||||
*/
|
||||
collapseKey: string;
|
||||
/**
|
||||
* The message ID of a message.
|
||||
*/
|
||||
messageId: string;
|
||||
}
|
||||
/**
|
||||
* Public interface of the Firebase Cloud Messaging SDK.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare interface Messaging {
|
||||
/**
|
||||
* The {@link @firebase/app#FirebaseApp} this `Messaging` instance is associated with.
|
||||
*/
|
||||
app: FirebaseApp;
|
||||
}
|
||||
export { NextFn };
|
||||
/**
|
||||
* Display notification details. Details are sent through the
|
||||
* {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare interface NotificationPayload {
|
||||
/**
|
||||
* The notification's title.
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* The notification's body text.
|
||||
*/
|
||||
body?: string;
|
||||
/**
|
||||
* The URL of an image that is downloaded on the device and displayed in the notification.
|
||||
*/
|
||||
image?: string;
|
||||
/**
|
||||
* The URL to use for the notification's icon. If you don't send this key in the request,
|
||||
* FCM displays the launcher icon specified in your app manifest.
|
||||
*/
|
||||
icon?: string;
|
||||
}
|
||||
export { Observer };
|
||||
/**
|
||||
* When a push message is received and the user is currently on a page for your origin, the
|
||||
* message is passed to the page and an `onMessage()` event is dispatched with the payload of
|
||||
* the push message.
|
||||
*
|
||||
*
|
||||
* @param messaging - The {@link Messaging} instance.
|
||||
* @param nextOrObserver - This function, or observer object with `next` defined,
|
||||
* is called when a message is received and the user is currently viewing your page.
|
||||
* @returns To stop listening for messages execute this returned function.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function onMessage(messaging: Messaging, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
|
||||
export { Unsubscribe };
|
||||
export {};
|
1241
node_modules/@firebase/messaging/dist/index.cjs.js
generated
vendored
Normal file
1241
node_modules/@firebase/messaging/dist/index.cjs.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
1
node_modules/@firebase/messaging/dist/index.cjs.js.map
generated
vendored
Normal file
1
node_modules/@firebase/messaging/dist/index.cjs.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1285
node_modules/@firebase/messaging/dist/index.sw.cjs
generated
vendored
Normal file
1285
node_modules/@firebase/messaging/dist/index.sw.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
1
node_modules/@firebase/messaging/dist/index.sw.cjs.map
generated
vendored
Normal file
1
node_modules/@firebase/messaging/dist/index.sw.cjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
220
node_modules/@firebase/messaging/dist/internal.d.ts
generated
vendored
Normal file
220
node_modules/@firebase/messaging/dist/internal.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,220 @@
|
|||
/**
|
||||
* The Firebase Cloud Messaging Web SDK.
|
||||
* This SDK does not work in a Node.js environment.
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
|
||||
import { FirebaseApp } from '@firebase/app';
|
||||
import { NextFn } from '@firebase/util';
|
||||
import { Observer } from '@firebase/util';
|
||||
import { Unsubscribe } from '@firebase/util';
|
||||
|
||||
/**
|
||||
* Deletes the registration token associated with this {@link Messaging} instance and unsubscribes
|
||||
* the {@link Messaging} instance from the push subscription.
|
||||
*
|
||||
* @param messaging - The {@link Messaging} instance.
|
||||
*
|
||||
* @returns The promise resolves when the token has been successfully deleted.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function deleteToken(messaging: Messaging): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Options for features provided by the FCM SDK for Web. See {@link
|
||||
* https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions |
|
||||
* WebpushFcmOptions}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare interface FcmOptions {
|
||||
/**
|
||||
* The link to open when the user clicks on the notification.
|
||||
*/
|
||||
link?: string;
|
||||
/**
|
||||
* The label associated with the message's analytics data.
|
||||
*/
|
||||
analyticsLabel?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare type _FirebaseMessagingName = 'messaging';
|
||||
|
||||
/**
|
||||
* Retrieves a Firebase Cloud Messaging instance.
|
||||
*
|
||||
* @returns The Firebase Cloud Messaging instance associated with the provided firebase app.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function getMessaging(app?: FirebaseApp): Messaging;
|
||||
|
||||
/**
|
||||
* Subscribes the {@link Messaging} instance to push notifications. Returns a Firebase Cloud
|
||||
* Messaging registration token that can be used to send push messages to that {@link Messaging}
|
||||
* instance.
|
||||
*
|
||||
* If notification permission isn't already granted, this method asks the user for permission. The
|
||||
* returned promise rejects if the user does not allow the app to show notifications.
|
||||
*
|
||||
* @param messaging - The {@link Messaging} instance.
|
||||
* @param options - Provides an optional vapid key and an optional service worker registration.
|
||||
*
|
||||
* @returns The promise resolves with an FCM registration token.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function getToken(messaging: Messaging, options?: GetTokenOptions): Promise<string>;
|
||||
|
||||
/**
|
||||
* Options for {@link getToken}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare interface GetTokenOptions {
|
||||
/**
|
||||
* The public server key provided to push services. The key is used to
|
||||
* authenticate push subscribers to receive push messages only from sending servers that hold
|
||||
* the corresponding private key. If it is not provided, a default VAPID key is used. Note that some
|
||||
* push services (Chrome Push Service) require a non-default VAPID key. Therefore, it is recommended
|
||||
* to generate and import a VAPID key for your project with
|
||||
* {@link https://firebase.google.com/docs/cloud-messaging/js/client#configure_web_credentials_in_your_app | Configure Web Credentials with FCM}.
|
||||
* See
|
||||
* {@link https://developers.google.com/web/fundamentals/push-notifications/web-push-protocol | The Web Push Protocol}
|
||||
* for details on web push services.
|
||||
*/
|
||||
vapidKey?: string;
|
||||
/**
|
||||
* The service worker registration for receiving push
|
||||
* messaging. If the registration is not provided explicitly, you need to have a
|
||||
* `firebase-messaging-sw.js` at your root location. See
|
||||
* {@link https://firebase.google.com/docs/cloud-messaging/js/client#access_the_registration_token | Access the registration token}
|
||||
* for more details.
|
||||
*/
|
||||
serviceWorkerRegistration?: ServiceWorkerRegistration;
|
||||
}
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Checks if all required APIs exist in the browser.
|
||||
* @returns a Promise that resolves to a boolean.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function isSupported(): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Message payload that contains the notification payload that is represented with
|
||||
* {@link NotificationPayload} and the data payload that contains an arbitrary
|
||||
* number of key-value pairs sent by developers through the
|
||||
* {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare interface MessagePayload {
|
||||
/**
|
||||
* {@inheritdoc NotificationPayload}
|
||||
*/
|
||||
notification?: NotificationPayload;
|
||||
/**
|
||||
* Arbitrary key/value payload.
|
||||
*/
|
||||
data?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* {@inheritdoc FcmOptions}
|
||||
*/
|
||||
fcmOptions?: FcmOptions;
|
||||
/**
|
||||
* The sender of this message.
|
||||
*/
|
||||
from: string;
|
||||
/**
|
||||
* The collapse key of the message. See
|
||||
* {@link https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages | Non-collapsible and collapsible messages}
|
||||
*/
|
||||
collapseKey: string;
|
||||
/**
|
||||
* The message ID of a message.
|
||||
*/
|
||||
messageId: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Public interface of the Firebase Cloud Messaging SDK.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare interface Messaging {
|
||||
/**
|
||||
* The {@link @firebase/app#FirebaseApp} this `Messaging` instance is associated with.
|
||||
*/
|
||||
app: FirebaseApp;
|
||||
}
|
||||
export { NextFn }
|
||||
|
||||
/**
|
||||
* Display notification details. Details are sent through the
|
||||
* {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare interface NotificationPayload {
|
||||
/**
|
||||
* The notification's title.
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* The notification's body text.
|
||||
*/
|
||||
body?: string;
|
||||
/**
|
||||
* The URL of an image that is downloaded on the device and displayed in the notification.
|
||||
*/
|
||||
image?: string;
|
||||
/**
|
||||
* The URL to use for the notification's icon. If you don't send this key in the request,
|
||||
* FCM displays the launcher icon specified in your app manifest.
|
||||
*/
|
||||
icon?: string;
|
||||
}
|
||||
export { Observer }
|
||||
|
||||
/**
|
||||
* When a push message is received and the user is currently on a page for your origin, the
|
||||
* message is passed to the page and an `onMessage()` event is dispatched with the payload of
|
||||
* the push message.
|
||||
*
|
||||
*
|
||||
* @param messaging - The {@link Messaging} instance.
|
||||
* @param nextOrObserver - This function, or observer object with `next` defined,
|
||||
* is called when a message is received and the user is currently viewing your page.
|
||||
* @returns To stop listening for messages execute this returned function.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function onMessage(messaging: Messaging, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
|
||||
export { Unsubscribe }
|
||||
|
||||
export { }
|
217
node_modules/@firebase/messaging/dist/private.d.ts
generated
vendored
Normal file
217
node_modules/@firebase/messaging/dist/private.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,217 @@
|
|||
/**
|
||||
* The Firebase Cloud Messaging Web SDK.
|
||||
* This SDK does not work in a Node.js environment.
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
|
||||
import { FirebaseApp } from '@firebase/app';
|
||||
import { NextFn } from '@firebase/util';
|
||||
import { Observer } from '@firebase/util';
|
||||
import { Unsubscribe } from '@firebase/util';
|
||||
|
||||
/**
|
||||
* Deletes the registration token associated with this {@link Messaging} instance and unsubscribes
|
||||
* the {@link Messaging} instance from the push subscription.
|
||||
*
|
||||
* @param messaging - The {@link Messaging} instance.
|
||||
*
|
||||
* @returns The promise resolves when the token has been successfully deleted.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function deleteToken(messaging: Messaging): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Options for features provided by the FCM SDK for Web. See {@link
|
||||
* https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions |
|
||||
* WebpushFcmOptions}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare interface FcmOptions {
|
||||
/**
|
||||
* The link to open when the user clicks on the notification.
|
||||
*/
|
||||
link?: string;
|
||||
/**
|
||||
* The label associated with the message's analytics data.
|
||||
*/
|
||||
analyticsLabel?: string;
|
||||
}
|
||||
|
||||
/* Excluded from this release type: _FirebaseMessagingName */
|
||||
|
||||
/**
|
||||
* Retrieves a Firebase Cloud Messaging instance.
|
||||
*
|
||||
* @returns The Firebase Cloud Messaging instance associated with the provided firebase app.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function getMessaging(app?: FirebaseApp): Messaging;
|
||||
|
||||
/**
|
||||
* Subscribes the {@link Messaging} instance to push notifications. Returns a Firebase Cloud
|
||||
* Messaging registration token that can be used to send push messages to that {@link Messaging}
|
||||
* instance.
|
||||
*
|
||||
* If notification permission isn't already granted, this method asks the user for permission. The
|
||||
* returned promise rejects if the user does not allow the app to show notifications.
|
||||
*
|
||||
* @param messaging - The {@link Messaging} instance.
|
||||
* @param options - Provides an optional vapid key and an optional service worker registration.
|
||||
*
|
||||
* @returns The promise resolves with an FCM registration token.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function getToken(messaging: Messaging, options?: GetTokenOptions): Promise<string>;
|
||||
|
||||
/**
|
||||
* Options for {@link getToken}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare interface GetTokenOptions {
|
||||
/**
|
||||
* The public server key provided to push services. The key is used to
|
||||
* authenticate push subscribers to receive push messages only from sending servers that hold
|
||||
* the corresponding private key. If it is not provided, a default VAPID key is used. Note that some
|
||||
* push services (Chrome Push Service) require a non-default VAPID key. Therefore, it is recommended
|
||||
* to generate and import a VAPID key for your project with
|
||||
* {@link https://firebase.google.com/docs/cloud-messaging/js/client#configure_web_credentials_in_your_app | Configure Web Credentials with FCM}.
|
||||
* See
|
||||
* {@link https://developers.google.com/web/fundamentals/push-notifications/web-push-protocol | The Web Push Protocol}
|
||||
* for details on web push services.
|
||||
*/
|
||||
vapidKey?: string;
|
||||
/**
|
||||
* The service worker registration for receiving push
|
||||
* messaging. If the registration is not provided explicitly, you need to have a
|
||||
* `firebase-messaging-sw.js` at your root location. See
|
||||
* {@link https://firebase.google.com/docs/cloud-messaging/js/client#access_the_registration_token | Access the registration token}
|
||||
* for more details.
|
||||
*/
|
||||
serviceWorkerRegistration?: ServiceWorkerRegistration;
|
||||
}
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Checks if all required APIs exist in the browser.
|
||||
* @returns a Promise that resolves to a boolean.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function isSupported(): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Message payload that contains the notification payload that is represented with
|
||||
* {@link NotificationPayload} and the data payload that contains an arbitrary
|
||||
* number of key-value pairs sent by developers through the
|
||||
* {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare interface MessagePayload {
|
||||
/**
|
||||
* {@inheritdoc NotificationPayload}
|
||||
*/
|
||||
notification?: NotificationPayload;
|
||||
/**
|
||||
* Arbitrary key/value payload.
|
||||
*/
|
||||
data?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* {@inheritdoc FcmOptions}
|
||||
*/
|
||||
fcmOptions?: FcmOptions;
|
||||
/**
|
||||
* The sender of this message.
|
||||
*/
|
||||
from: string;
|
||||
/**
|
||||
* The collapse key of the message. See
|
||||
* {@link https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages | Non-collapsible and collapsible messages}
|
||||
*/
|
||||
collapseKey: string;
|
||||
/**
|
||||
* The message ID of a message.
|
||||
*/
|
||||
messageId: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Public interface of the Firebase Cloud Messaging SDK.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare interface Messaging {
|
||||
/**
|
||||
* The {@link @firebase/app#FirebaseApp} this `Messaging` instance is associated with.
|
||||
*/
|
||||
app: FirebaseApp;
|
||||
}
|
||||
export { NextFn }
|
||||
|
||||
/**
|
||||
* Display notification details. Details are sent through the
|
||||
* {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare interface NotificationPayload {
|
||||
/**
|
||||
* The notification's title.
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* The notification's body text.
|
||||
*/
|
||||
body?: string;
|
||||
/**
|
||||
* The URL of an image that is downloaded on the device and displayed in the notification.
|
||||
*/
|
||||
image?: string;
|
||||
/**
|
||||
* The URL to use for the notification's icon. If you don't send this key in the request,
|
||||
* FCM displays the launcher icon specified in your app manifest.
|
||||
*/
|
||||
icon?: string;
|
||||
}
|
||||
export { Observer }
|
||||
|
||||
/**
|
||||
* When a push message is received and the user is currently on a page for your origin, the
|
||||
* message is passed to the page and an `onMessage()` event is dispatched with the payload of
|
||||
* the push message.
|
||||
*
|
||||
*
|
||||
* @param messaging - The {@link Messaging} instance.
|
||||
* @param nextOrObserver - This function, or observer object with `next` defined,
|
||||
* is called when a message is received and the user is currently viewing your page.
|
||||
* @returns To stop listening for messages execute this returned function.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function onMessage(messaging: Messaging, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
|
||||
export { Unsubscribe }
|
||||
|
||||
export { }
|
101
node_modules/@firebase/messaging/dist/src/api.d.ts
generated
vendored
Normal file
101
node_modules/@firebase/messaging/dist/src/api.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,101 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { FirebaseApp } from '@firebase/app';
|
||||
import { GetTokenOptions, MessagePayload, Messaging } from './interfaces/public-types';
|
||||
import { NextFn, Observer, Unsubscribe } from '@firebase/util';
|
||||
/**
|
||||
* Retrieves a Firebase Cloud Messaging instance.
|
||||
*
|
||||
* @returns The Firebase Cloud Messaging instance associated with the provided firebase app.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function getMessagingInWindow(app?: FirebaseApp): Messaging;
|
||||
/**
|
||||
* Retrieves a Firebase Cloud Messaging instance.
|
||||
*
|
||||
* @returns The Firebase Cloud Messaging instance associated with the provided firebase app.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function getMessagingInSw(app?: FirebaseApp): Messaging;
|
||||
/**
|
||||
* Subscribes the {@link Messaging} instance to push notifications. Returns a Firebase Cloud
|
||||
* Messaging registration token that can be used to send push messages to that {@link Messaging}
|
||||
* instance.
|
||||
*
|
||||
* If notification permission isn't already granted, this method asks the user for permission. The
|
||||
* returned promise rejects if the user does not allow the app to show notifications.
|
||||
*
|
||||
* @param messaging - The {@link Messaging} instance.
|
||||
* @param options - Provides an optional vapid key and an optional service worker registration.
|
||||
*
|
||||
* @returns The promise resolves with an FCM registration token.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function getToken(messaging: Messaging, options?: GetTokenOptions): Promise<string>;
|
||||
/**
|
||||
* Deletes the registration token associated with this {@link Messaging} instance and unsubscribes
|
||||
* the {@link Messaging} instance from the push subscription.
|
||||
*
|
||||
* @param messaging - The {@link Messaging} instance.
|
||||
*
|
||||
* @returns The promise resolves when the token has been successfully deleted.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function deleteToken(messaging: Messaging): Promise<boolean>;
|
||||
/**
|
||||
* When a push message is received and the user is currently on a page for your origin, the
|
||||
* message is passed to the page and an `onMessage()` event is dispatched with the payload of
|
||||
* the push message.
|
||||
*
|
||||
*
|
||||
* @param messaging - The {@link Messaging} instance.
|
||||
* @param nextOrObserver - This function, or observer object with `next` defined,
|
||||
* is called when a message is received and the user is currently viewing your page.
|
||||
* @returns To stop listening for messages execute this returned function.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function onMessage(messaging: Messaging, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
|
||||
/**
|
||||
* Called when a message is received while the app is in the background. An app is considered to be
|
||||
* in the background if no active window is displayed.
|
||||
*
|
||||
* @param messaging - The {@link Messaging} instance.
|
||||
* @param nextOrObserver - This function, or observer object with `next` defined, is called when a
|
||||
* message is received and the app is currently in the background.
|
||||
*
|
||||
* @returns To stop listening for messages execute this returned function
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function onBackgroundMessage(messaging: Messaging, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
|
||||
/**
|
||||
* Enables or disables Firebase Cloud Messaging message delivery metrics export to BigQuery. By
|
||||
* default, message delivery metrics are not exported to BigQuery. Use this method to enable or
|
||||
* disable the export at runtime.
|
||||
*
|
||||
* @param messaging - The `FirebaseMessaging` instance.
|
||||
* @param enable - Whether Firebase Cloud Messaging should export message delivery metrics to
|
||||
* BigQuery.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function experimentalSetDeliveryMetricsExportedToBigQueryEnabled(messaging: Messaging, enable: boolean): void;
|
18
node_modules/@firebase/messaging/dist/src/api/deleteToken.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/src/api/deleteToken.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function deleteToken(messaging: MessagingService): Promise<boolean>;
|
19
node_modules/@firebase/messaging/dist/src/api/getToken.d.ts
generated
vendored
Normal file
19
node_modules/@firebase/messaging/dist/src/api/getToken.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagingService } from '../messaging-service';
|
||||
import { GetTokenOptions } from '../interfaces/public-types';
|
||||
export declare function getToken(messaging: MessagingService, options?: GetTokenOptions): Promise<string>;
|
30
node_modules/@firebase/messaging/dist/src/api/isSupported.d.ts
generated
vendored
Normal file
30
node_modules/@firebase/messaging/dist/src/api/isSupported.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Checks if all required APIs exist in the browser.
|
||||
* @returns a Promise that resolves to a boolean.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function isWindowSupported(): Promise<boolean>;
|
||||
/**
|
||||
* Checks whether all required APIs exist within SW Context
|
||||
* @returns a Promise that resolves to a boolean.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare function isSwSupported(): Promise<boolean>;
|
19
node_modules/@firebase/messaging/dist/src/api/onBackgroundMessage.d.ts
generated
vendored
Normal file
19
node_modules/@firebase/messaging/dist/src/api/onBackgroundMessage.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagePayload, NextFn, Observer, Unsubscribe } from '../interfaces/public-types';
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function onBackgroundMessage(messaging: MessagingService, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
|
19
node_modules/@firebase/messaging/dist/src/api/onMessage.d.ts
generated
vendored
Normal file
19
node_modules/@firebase/messaging/dist/src/api/onMessage.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagePayload, NextFn, Observer, Unsubscribe } from '../interfaces/public-types';
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function onMessage(messaging: MessagingService, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
|
18
node_modules/@firebase/messaging/dist/src/api/setDeliveryMetricsExportedToBigQueryEnabled.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/src/api/setDeliveryMetricsExportedToBigQueryEnabled.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { Messaging } from '../interfaces/public-types';
|
||||
export declare function _setDeliveryMetricsExportedToBigQueryEnabled(messaging: Messaging, enable: boolean): void;
|
18
node_modules/@firebase/messaging/dist/src/helpers/array-base64-translator.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/src/helpers/array-base64-translator.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export declare function arrayToBase64(array: Uint8Array | ArrayBuffer): string;
|
||||
export declare function base64ToArray(base64String: string): Uint8Array;
|
17
node_modules/@firebase/messaging/dist/src/helpers/array-base64-translator.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/src/helpers/array-base64-translator.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
19
node_modules/@firebase/messaging/dist/src/helpers/externalizePayload.d.ts
generated
vendored
Normal file
19
node_modules/@firebase/messaging/dist/src/helpers/externalizePayload.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagePayload } from '../interfaces/public-types';
|
||||
import { MessagePayloadInternal } from '../interfaces/internal-message-payload';
|
||||
export declare function externalizePayload(internalPayload: MessagePayloadInternal): MessagePayload;
|
17
node_modules/@firebase/messaging/dist/src/helpers/externalizePayload.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/src/helpers/externalizePayload.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export {};
|
19
node_modules/@firebase/messaging/dist/src/helpers/extract-app-config.d.ts
generated
vendored
Normal file
19
node_modules/@firebase/messaging/dist/src/helpers/extract-app-config.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { FirebaseApp } from '@firebase/app';
|
||||
import { AppConfig } from '../interfaces/app-config';
|
||||
export declare function extractAppConfig(app: FirebaseApp): AppConfig;
|
17
node_modules/@firebase/messaging/dist/src/helpers/extract-app-config.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/src/helpers/extract-app-config.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
18
node_modules/@firebase/messaging/dist/src/helpers/is-console-message.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/src/helpers/is-console-message.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ConsoleMessageData } from '../interfaces/internal-message-payload';
|
||||
export declare function isConsoleMessage(data: unknown): data is ConsoleMessageData;
|
30
node_modules/@firebase/messaging/dist/src/helpers/logToFirelog.d.ts
generated
vendored
Normal file
30
node_modules/@firebase/messaging/dist/src/helpers/logToFirelog.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { LogEvent, LogRequest } from '../interfaces/logging-types';
|
||||
import { MessagePayloadInternal } from '../interfaces/internal-message-payload';
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function startLoggingService(messaging: MessagingService): void;
|
||||
/**
|
||||
*
|
||||
* @param messaging the messaging instance.
|
||||
* @param offsetInMs this method execute after `offsetInMs` elapsed .
|
||||
*/
|
||||
export declare function _processQueue(messaging: MessagingService, offsetInMs: number): void;
|
||||
export declare function _dispatchLogEvents(messaging: MessagingService): Promise<void>;
|
||||
export declare function stageLog(messaging: MessagingService, internalPayload: MessagePayloadInternal): Promise<void>;
|
||||
export declare function _createLogRequest(logEventQueue: LogEvent[]): LogRequest;
|
||||
export declare function _mergeStrings(s1: string, s2: string): string;
|
17
node_modules/@firebase/messaging/dist/src/helpers/logToFirelog.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/src/helpers/logToFirelog.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export {};
|
19
node_modules/@firebase/messaging/dist/src/helpers/logToScion.d.ts
generated
vendored
Normal file
19
node_modules/@firebase/messaging/dist/src/helpers/logToScion.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ConsoleMessageData, MessageType } from '../interfaces/internal-message-payload';
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function logToScion(messaging: MessagingService, messageType: MessageType, data: ConsoleMessageData): Promise<void>;
|
51
node_modules/@firebase/messaging/dist/src/helpers/migrate-old-database.d.ts
generated
vendored
Normal file
51
node_modules/@firebase/messaging/dist/src/helpers/migrate-old-database.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { TokenDetails } from '../interfaces/token-details';
|
||||
export interface V2TokenDetails {
|
||||
fcmToken: string;
|
||||
swScope: string;
|
||||
vapidKey: string | Uint8Array;
|
||||
subscription: PushSubscription;
|
||||
fcmSenderId: string;
|
||||
fcmPushSet: string;
|
||||
createTime?: number;
|
||||
endpoint?: string;
|
||||
auth?: string;
|
||||
p256dh?: string;
|
||||
}
|
||||
export interface V3TokenDetails {
|
||||
fcmToken: string;
|
||||
swScope: string;
|
||||
vapidKey: Uint8Array;
|
||||
fcmSenderId: string;
|
||||
fcmPushSet: string;
|
||||
endpoint: string;
|
||||
auth: ArrayBuffer;
|
||||
p256dh: ArrayBuffer;
|
||||
createTime: number;
|
||||
}
|
||||
export interface V4TokenDetails {
|
||||
fcmToken: string;
|
||||
swScope: string;
|
||||
vapidKey: Uint8Array;
|
||||
fcmSenderId: string;
|
||||
endpoint: string;
|
||||
auth: ArrayBufferLike;
|
||||
p256dh: ArrayBufferLike;
|
||||
createTime: number;
|
||||
}
|
||||
export declare function migrateOldDatabase(senderId: string): Promise<TokenDetails | null>;
|
17
node_modules/@firebase/messaging/dist/src/helpers/migrate-old-database.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/src/helpers/migrate-old-database.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
23
node_modules/@firebase/messaging/dist/src/helpers/register.d.ts
generated
vendored
Normal file
23
node_modules/@firebase/messaging/dist/src/helpers/register.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export declare function registerMessagingInWindow(): void;
|
||||
/**
|
||||
* The messaging instance registered in sw is named differently than that of in client. This is
|
||||
* because both `registerMessagingInWindow` and `registerMessagingInSw` would be called in
|
||||
* `messaging-compat` and component with the same name can only be registered once.
|
||||
*/
|
||||
export declare function registerMessagingInSw(): void;
|
18
node_modules/@firebase/messaging/dist/src/helpers/registerDefaultSw.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/src/helpers/registerDefaultSw.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function registerDefaultSw(messaging: MessagingService): Promise<void>;
|
18
node_modules/@firebase/messaging/dist/src/helpers/sleep.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/src/helpers/sleep.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/** Returns a promise that resolves after given time passes. */
|
||||
export declare function sleep(ms: number): Promise<void>;
|
17
node_modules/@firebase/messaging/dist/src/helpers/sleep.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/src/helpers/sleep.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
18
node_modules/@firebase/messaging/dist/src/helpers/updateSwReg.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/src/helpers/updateSwReg.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function updateSwReg(messaging: MessagingService, swRegistration?: ServiceWorkerRegistration | undefined): Promise<void>;
|
18
node_modules/@firebase/messaging/dist/src/helpers/updateVapidKey.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/src/helpers/updateVapidKey.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagingService } from '../messaging-service';
|
||||
export declare function updateVapidKey(messaging: MessagingService, vapidKey?: string | undefined): Promise<void>;
|
32
node_modules/@firebase/messaging/dist/src/index.d.ts
generated
vendored
Normal file
32
node_modules/@firebase/messaging/dist/src/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* The Firebase Cloud Messaging Web SDK.
|
||||
* This SDK does not work in a Node.js environment.
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '@firebase/installations';
|
||||
import { Messaging } from './interfaces/public-types';
|
||||
export { getToken, deleteToken, onMessage, getMessagingInWindow as getMessaging } from './api';
|
||||
export { isWindowSupported as isSupported } from './api/isSupported';
|
||||
export * from './interfaces/public-types';
|
||||
declare module '@firebase/component' {
|
||||
interface NameServiceMapping {
|
||||
'messaging': Messaging;
|
||||
}
|
||||
}
|
26
node_modules/@firebase/messaging/dist/src/index.sw.d.ts
generated
vendored
Normal file
26
node_modules/@firebase/messaging/dist/src/index.sw.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '@firebase/installations';
|
||||
import { Messaging } from './interfaces/public-types';
|
||||
export * from './interfaces/public-types';
|
||||
export { onBackgroundMessage, getMessagingInSw as getMessaging, experimentalSetDeliveryMetricsExportedToBigQueryEnabled } from './api';
|
||||
export { isSwSupported as isSupported } from './api/isSupported';
|
||||
declare module '@firebase/component' {
|
||||
interface NameServiceMapping {
|
||||
'messaging-sw': Messaging;
|
||||
}
|
||||
}
|
24
node_modules/@firebase/messaging/dist/src/interfaces/app-config.d.ts
generated
vendored
Normal file
24
node_modules/@firebase/messaging/dist/src/interfaces/app-config.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export interface AppConfig {
|
||||
readonly appName: string;
|
||||
readonly projectId: string;
|
||||
readonly apiKey: string;
|
||||
readonly appId: string;
|
||||
/** Only used for old DB migration. */
|
||||
readonly senderId: string;
|
||||
}
|
27
node_modules/@firebase/messaging/dist/src/interfaces/internal-dependencies.d.ts
generated
vendored
Normal file
27
node_modules/@firebase/messaging/dist/src/interfaces/internal-dependencies.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { AppConfig } from './app-config';
|
||||
import { FirebaseAnalyticsInternalName } from '@firebase/analytics-interop-types';
|
||||
import { FirebaseApp } from '@firebase/app';
|
||||
import { Provider } from '@firebase/component';
|
||||
import { _FirebaseInstallationsInternal } from '@firebase/installations';
|
||||
export interface FirebaseInternalDependencies {
|
||||
app: FirebaseApp;
|
||||
appConfig: AppConfig;
|
||||
installations: _FirebaseInstallationsInternal;
|
||||
analyticsProvider: Provider<FirebaseAnalyticsInternalName>;
|
||||
}
|
46
node_modules/@firebase/messaging/dist/src/interfaces/internal-message-payload.d.ts
generated
vendored
Normal file
46
node_modules/@firebase/messaging/dist/src/interfaces/internal-message-payload.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2018 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
||||
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
* or implied. See the License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
import { CONSOLE_CAMPAIGN_ANALYTICS_ENABLED, CONSOLE_CAMPAIGN_ID, CONSOLE_CAMPAIGN_NAME, CONSOLE_CAMPAIGN_TIME } from '../util/constants';
|
||||
export interface MessagePayloadInternal {
|
||||
notification?: NotificationPayloadInternal;
|
||||
data?: unknown;
|
||||
fcmOptions?: FcmOptionsInternal;
|
||||
messageType?: MessageType;
|
||||
isFirebaseMessaging?: boolean;
|
||||
from: string;
|
||||
fcmMessageId: string;
|
||||
productId: number;
|
||||
collapse_key: string;
|
||||
}
|
||||
export interface NotificationPayloadInternal extends NotificationOptions {
|
||||
title: string;
|
||||
click_action?: string;
|
||||
icon?: string;
|
||||
}
|
||||
export interface FcmOptionsInternal {
|
||||
link?: string;
|
||||
analytics_label?: string;
|
||||
}
|
||||
export declare enum MessageType {
|
||||
PUSH_RECEIVED = "push-received",
|
||||
NOTIFICATION_CLICKED = "notification-clicked"
|
||||
}
|
||||
/** Additional data of a message sent from the FN Console. */
|
||||
export interface ConsoleMessageData {
|
||||
[CONSOLE_CAMPAIGN_ID]: string;
|
||||
[CONSOLE_CAMPAIGN_TIME]: string;
|
||||
[CONSOLE_CAMPAIGN_NAME]?: string;
|
||||
[CONSOLE_CAMPAIGN_ANALYTICS_ENABLED]?: '1';
|
||||
}
|
60
node_modules/@firebase/messaging/dist/src/interfaces/logging-types.d.ts
generated
vendored
Normal file
60
node_modules/@firebase/messaging/dist/src/interfaces/logging-types.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2021 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
||||
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
* or implied. See the License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
export interface FcmEvent {
|
||||
project_number: string;
|
||||
message_id: string;
|
||||
instance_id: string;
|
||||
message_type: string;
|
||||
sdk_platform: string;
|
||||
package_name: string;
|
||||
collapse_key: string;
|
||||
event: string;
|
||||
analytics_label?: string;
|
||||
}
|
||||
/**
|
||||
* A LogRequest represents a batched collection of loggable events sent to firelog, each event to be
|
||||
* processed and sent to Sawmill. Defined as in proto/clientanalytics.proto#LogRequest
|
||||
*/
|
||||
export interface LogRequest {
|
||||
log_source: string;
|
||||
log_event: LogEvent[];
|
||||
}
|
||||
export interface LogEvent {
|
||||
event_time_ms: string;
|
||||
source_extension_json_proto3: string;
|
||||
compliance_data: ComplianceData;
|
||||
}
|
||||
export interface ComplianceData {
|
||||
privacy_context: ExternalPrivacyContext;
|
||||
}
|
||||
export interface ExternalPrivacyContext {
|
||||
prequest: ExternalPRequestContext;
|
||||
}
|
||||
export interface ExternalPRequestContext {
|
||||
origin_associated_product_id: number;
|
||||
}
|
||||
export interface LogResponse {
|
||||
nextRequestWaitMillis: number;
|
||||
logResponseDetails: LogResponseDetails[];
|
||||
}
|
||||
interface LogResponseDetails {
|
||||
responseAction: UserResponse;
|
||||
}
|
||||
export declare const enum UserResponse {
|
||||
RESPONSE_ACTION_UNKNOWN = "RESPONSE_ACTION_UNKNOWN",
|
||||
RETRY_REQUEST_LATER = "RETRY_REQUEST_LATER",
|
||||
DELETE_REQUEST = "DELETE_REQUEST"
|
||||
}
|
||||
export {};
|
144
node_modules/@firebase/messaging/dist/src/interfaces/public-types.d.ts
generated
vendored
Normal file
144
node_modules/@firebase/messaging/dist/src/interfaces/public-types.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,144 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { FirebaseApp } from '@firebase/app';
|
||||
/**
|
||||
* Display notification details. Details are sent through the
|
||||
* {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface NotificationPayload {
|
||||
/**
|
||||
* The notification's title.
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* The notification's body text.
|
||||
*/
|
||||
body?: string;
|
||||
/**
|
||||
* The URL of an image that is downloaded on the device and displayed in the notification.
|
||||
*/
|
||||
image?: string;
|
||||
/**
|
||||
* The URL to use for the notification's icon. If you don't send this key in the request,
|
||||
* FCM displays the launcher icon specified in your app manifest.
|
||||
*/
|
||||
icon?: string;
|
||||
}
|
||||
/**
|
||||
* Options for features provided by the FCM SDK for Web. See {@link
|
||||
* https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions |
|
||||
* WebpushFcmOptions}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface FcmOptions {
|
||||
/**
|
||||
* The link to open when the user clicks on the notification.
|
||||
*/
|
||||
link?: string;
|
||||
/**
|
||||
* The label associated with the message's analytics data.
|
||||
*/
|
||||
analyticsLabel?: string;
|
||||
}
|
||||
/**
|
||||
* Message payload that contains the notification payload that is represented with
|
||||
* {@link NotificationPayload} and the data payload that contains an arbitrary
|
||||
* number of key-value pairs sent by developers through the
|
||||
* {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface MessagePayload {
|
||||
/**
|
||||
* {@inheritdoc NotificationPayload}
|
||||
*/
|
||||
notification?: NotificationPayload;
|
||||
/**
|
||||
* Arbitrary key/value payload.
|
||||
*/
|
||||
data?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* {@inheritdoc FcmOptions}
|
||||
*/
|
||||
fcmOptions?: FcmOptions;
|
||||
/**
|
||||
* The sender of this message.
|
||||
*/
|
||||
from: string;
|
||||
/**
|
||||
* The collapse key of the message. See
|
||||
* {@link https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages | Non-collapsible and collapsible messages}
|
||||
*/
|
||||
collapseKey: string;
|
||||
/**
|
||||
* The message ID of a message.
|
||||
*/
|
||||
messageId: string;
|
||||
}
|
||||
/**
|
||||
* Options for {@link getToken}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface GetTokenOptions {
|
||||
/**
|
||||
* The public server key provided to push services. The key is used to
|
||||
* authenticate push subscribers to receive push messages only from sending servers that hold
|
||||
* the corresponding private key. If it is not provided, a default VAPID key is used. Note that some
|
||||
* push services (Chrome Push Service) require a non-default VAPID key. Therefore, it is recommended
|
||||
* to generate and import a VAPID key for your project with
|
||||
* {@link https://firebase.google.com/docs/cloud-messaging/js/client#configure_web_credentials_in_your_app | Configure Web Credentials with FCM}.
|
||||
* See
|
||||
* {@link https://developers.google.com/web/fundamentals/push-notifications/web-push-protocol | The Web Push Protocol}
|
||||
* for details on web push services.
|
||||
*/
|
||||
vapidKey?: string;
|
||||
/**
|
||||
* The service worker registration for receiving push
|
||||
* messaging. If the registration is not provided explicitly, you need to have a
|
||||
* `firebase-messaging-sw.js` at your root location. See
|
||||
* {@link https://firebase.google.com/docs/cloud-messaging/js/client#access_the_registration_token | Access the registration token}
|
||||
* for more details.
|
||||
*/
|
||||
serviceWorkerRegistration?: ServiceWorkerRegistration;
|
||||
}
|
||||
/**
|
||||
* Public interface of the Firebase Cloud Messaging SDK.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface Messaging {
|
||||
/**
|
||||
* The {@link @firebase/app#FirebaseApp} this `Messaging` instance is associated with.
|
||||
*/
|
||||
app: FirebaseApp;
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare type _FirebaseMessagingName = 'messaging';
|
||||
export { NextFn, Observer, Unsubscribe } from '@firebase/util';
|
||||
declare module '@firebase/component' {
|
||||
interface NameServiceMapping {
|
||||
'messaging': Messaging;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue