{"version":3,"file":"onNotificationReceivedInBackground.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';\n/**\n * Registers a listener that will be triggered when a notification is received while app is in a background state.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,\n * only React Native is supported by this API.\n * @param {OnNotificationReceivedInBackgroundInput} input - A callback handler to be invoked with the received\n * {@link PushNotificationMessage}.\n * @returns {OnNotificationReceivedInBackgroundOutput} - An object with a remove function to remove the listener.\n * @remarks Notifications received while app is in a quit state will start the app (as a headless JS instance running\n * on a background service on Android) in the background. Handlers registered via this function should return promises\n * if it needs to be asynchronous (e.g. to perform some network requests). The app should run in the background as long\n * as there are handlers still running (however, if they run for more than 30 seconds on iOS, subsequent tasks could\n * get deprioritized!). If it is necessary for a handler to execute while the app is in quit state, it should be\n * registered in the application entry point (e.g. index.js) since the application will not fully mount in that case.\n * @example\n * ```ts\n * // Register a listener\n * onNotificationReceivedInBackground(message => {\n *   doSomething(message);\n * });\n * ```\n * @example\n * ```ts\n * // Register multiple listeners\n * onNotificationReceivedInBackground(message => {\n *   doSomething(message);\n * });\n *\n * onNotificationReceivedInBackground(message => {\n *   doSomethingElse(message);\n * });\n * ```\n * @example\n * ```ts\n * // Register async listener\n * onNotificationReceivedInBackground(async message => {\n *   await doSomething(message);\n *   console.log(`did something with ${message}`);\n * });\n * ```\n */\nexport const onNotificationReceivedInBackground = () => {\n    throw new PlatformNotSupportedError();\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,kCAAkC,GAAG,MAAM;AACxD,IAAI,MAAM,IAAI,yBAAyB,EAAE;AACzC;;;;"}