summaryrefslogtreecommitdiff
path: root/frontend-old/node_modules/@firebase/messaging/dist/esm/src/api.d.ts
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2025-11-09 11:15:19 +0800
committeraltaf-creator <dev@altafcreator.com>2025-11-09 11:15:19 +0800
commit8eff962cab608341a6f2fedc640a0e32d96f26e2 (patch)
tree05534d1a720ddc3691d346c69b4972555820a061 /frontend-old/node_modules/@firebase/messaging/dist/esm/src/api.d.ts
pain
Diffstat (limited to 'frontend-old/node_modules/@firebase/messaging/dist/esm/src/api.d.ts')
-rw-r--r--frontend-old/node_modules/@firebase/messaging/dist/esm/src/api.d.ts101
1 files changed, 101 insertions, 0 deletions
diff --git a/frontend-old/node_modules/@firebase/messaging/dist/esm/src/api.d.ts b/frontend-old/node_modules/@firebase/messaging/dist/esm/src/api.d.ts
new file mode 100644
index 0000000..b2f938b
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/messaging/dist/esm/src/api.d.ts
@@ -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;