UNPKG

@react-native-firebase/messaging

Version:

React Native Firebase - React Native Firebase provides native integration of Firebase Cloud Messaging (FCM) for both Android & iOS. FCM is a cost free service, allowing for server-device and device-device communication. The React Native Firebase Messaging

124 lines (100 loc) 3.65 kB
"use strict"; /* * Copyright (c) 2016-present Invertase Limited & Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this library 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. * */ // ============ Types ============ /** * The `RemoteMessage` interface describes an outgoing & incoming message from the remote FCM server. */ /** * Represents the priority of a RemoteMessage * * Note: this is an android-specific property of RemoteMessages */ export let MessagePriority = /*#__PURE__*/function (MessagePriority) { /** * Unknown priority, this will be returned as the default on non-android platforms */ MessagePriority[MessagePriority["PRIORITY_UNKNOWN"] = 0] = "PRIORITY_UNKNOWN"; /** * High priority - Activities may start foreground services if they receive high priority messages */ MessagePriority[MessagePriority["PRIORITY_HIGH"] = 1] = "PRIORITY_HIGH"; /** * Normal priority - Activities have restrictions and may only perform unobtrusive actions on receipt */ MessagePriority[MessagePriority["PRIORITY_NORMAL"] = 2] = "PRIORITY_NORMAL"; return MessagePriority; }({}); /** * Options for features provided by the FCM SDK for Web. */ /** * Options for `getToken()` and `deleteToken()` */ /** * Options for `getToken()` */ /** * NotificationPayload is an alias for Notification. This is to keep it the same as * Firebase Web JS SDK v9 and to make it backwards compatible. */ /** * Represents a critical sound configuration that can be included in the * `aps` dictionary of an APNs payload. */ /** * The type representing a notification priority. * * Note; on devices which have channel support (Android 8.0 (API level 26) +), * this value will be ignored. Instead, the channel "importance" level is used. */ // PRIORITY_MAX - The priority highest level a notification can be set at. /** * The type representing the visibility of a notification. */ // VISIBILITY_PUBLIC - Show this notification in its entirety on all lock-screens. /** * An interface representing all the available permissions that can be requested by your app via * the `requestPermission` API. */ /** * A type representing the notification authorization status for this app on the device. * * Value is truthy if authorized, compare against an exact status (e.g. iOS PROVISIONAL) for a more * granular status. */ // EPHEMERAL - The app is authorized to create notifications for a limited amount of time. Used in App Clips. @platform ios iOS >= 14 /** * An event that is received when a message fails to send. */ // ============ Module Interface ============ /** * The Firebase Messaging service interface. * * > This module is available for the default app only. */ // ============ Statics Interface ============ /** * Static properties available on firebase.messaging */ // ============ Module Augmentation ============ /* eslint-disable @typescript-eslint/no-namespace */ // ============ Backwards Compatibility Namespace ============ /* eslint-disable @typescript-eslint/no-namespace */ export let FirebaseMessagingTypes; /* eslint-enable @typescript-eslint/no-namespace */ //# sourceMappingURL=messaging.js.map