@aws-amplify/notifications 2.0.92-unstable.a361dd1.0 → 2.0.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/clearMessages.js +2 -0
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/clearMessages.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js +2 -0
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/identifyUser.js +2 -0
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/identifyUser.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +2 -0
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +2 -0
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js +2 -0
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js +2 -0
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js +2 -0
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js +2 -0
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +2 -0
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js.map +1 -1
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/syncMessages.js +2 -0
- package/dist/cjs/inAppMessaging/providers/pinpoint/apis/syncMessages.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/getBadgeCount.js +2 -0
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/getBadgeCount.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js +2 -0
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js +2 -0
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/identifyUser.js +2 -0
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/identifyUser.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js +2 -0
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js +2 -0
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js +2 -0
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js +2 -0
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/onTokenReceived.js +2 -0
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/onTokenReceived.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/requestPermissions.js +2 -0
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/requestPermissions.js.map +1 -1
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/setBadgeCount.js +2 -0
- package/dist/cjs/pushNotifications/providers/pinpoint/apis/setBadgeCount.js.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/clearMessages.d.ts +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/clearMessages.mjs +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/clearMessages.mjs.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.d.ts +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.mjs +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.mjs.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/identifyUser.mjs +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/identifyUser.mjs.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.d.ts +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.mjs +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.mjs.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.d.ts +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.mjs +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.mjs.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.d.ts +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.mjs +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.mjs.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.d.ts +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.mjs +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.mjs.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.d.ts +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.mjs +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.mjs.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.d.ts +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.mjs +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.mjs.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.d.ts +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.mjs +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.mjs.map +1 -1
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/syncMessages.d.ts +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/syncMessages.mjs +2 -0
- package/dist/esm/inAppMessaging/providers/pinpoint/apis/syncMessages.mjs.map +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.d.ts +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.mjs +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.mjs.map +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.d.ts +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.mjs +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.mjs.map +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.d.ts +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.mjs +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.mjs.map +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/apis/identifyUser.d.ts +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/identifyUser.mjs +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/identifyUser.mjs.map +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.d.ts +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.mjs +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.mjs.map +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.d.ts +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.mjs +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.mjs.map +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.d.ts +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.mjs +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.mjs.map +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.d.ts +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.mjs +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.mjs.map +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.d.ts +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.mjs +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.mjs.map +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/apis/requestPermissions.d.ts +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/requestPermissions.mjs +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/requestPermissions.mjs.map +1 -1
- package/dist/esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.d.ts +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.mjs +2 -0
- package/dist/esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.mjs.map +1 -1
- package/package.json +104 -104
- package/src/inAppMessaging/providers/pinpoint/apis/clearMessages.ts +2 -0
- package/src/inAppMessaging/providers/pinpoint/apis/dispatchEvent.ts +2 -0
- package/src/inAppMessaging/providers/pinpoint/apis/identifyUser.ts +2 -0
- package/src/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.ts +2 -0
- package/src/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.ts +2 -0
- package/src/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.ts +2 -0
- package/src/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.ts +2 -0
- package/src/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.ts +2 -0
- package/src/inAppMessaging/providers/pinpoint/apis/onMessageReceived.ts +2 -0
- package/src/inAppMessaging/providers/pinpoint/apis/setConflictHandler.ts +2 -0
- package/src/inAppMessaging/providers/pinpoint/apis/syncMessages.ts +2 -0
- package/src/pushNotifications/providers/pinpoint/apis/getBadgeCount.ts +2 -0
- package/src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.ts +2 -0
- package/src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.ts +2 -0
- package/src/pushNotifications/providers/pinpoint/apis/identifyUser.ts +2 -0
- package/src/pushNotifications/providers/pinpoint/apis/initializePushNotifications.ts +2 -0
- package/src/pushNotifications/providers/pinpoint/apis/onNotificationOpened.ts +2 -0
- package/src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.ts +2 -0
- package/src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.ts +2 -0
- package/src/pushNotifications/providers/pinpoint/apis/onTokenReceived.ts +2 -0
- package/src/pushNotifications/providers/pinpoint/apis/requestPermissions.ts +2 -0
- package/src/pushNotifications/providers/pinpoint/apis/setBadgeCount.ts +2 -0
|
@@ -10,6 +10,8 @@ const utils_2 = require("../../../utils");
|
|
|
10
10
|
/**
|
|
11
11
|
* Clear locally cached messages.
|
|
12
12
|
*
|
|
13
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
14
|
+
*
|
|
13
15
|
* @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown if In App messaging hasn't been initialized.
|
|
14
16
|
* @returns A promise that will resolve when the operation is complete.
|
|
15
17
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clearMessages.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/clearMessages.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clearMessages = clearMessages;\nconst core_1 = require(\"@aws-amplify/core\");\nconst utils_1 = require(\"../utils\");\nconst utils_2 = require(\"../../../utils\");\n/**\n * Clear locally cached messages.\n *\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown if In App messaging hasn't been initialized.\n * @returns A promise that will resolve when the operation is complete.\n * @example\n * ```ts\n * // Clear locally cached messages.\n * await clearMessages();\n *\n * ```\n */\nasync function clearMessages() {\n (0, utils_2.assertIsInitialized)();\n const key = `${utils_1.PINPOINT_KEY_PREFIX}${utils_1.STORAGE_KEY_SUFFIX}`;\n await core_1.defaultStorage.removeItem(key);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa,GAAG;AAC/B,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,MAAM,GAAG,GAAG,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAC7E,IAAI,MAAM,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC;AAC/C;;"}
|
|
1
|
+
{"version":3,"file":"clearMessages.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/clearMessages.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clearMessages = clearMessages;\nconst core_1 = require(\"@aws-amplify/core\");\nconst utils_1 = require(\"../utils\");\nconst utils_2 = require(\"../../../utils\");\n/**\n * Clear locally cached messages.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown if In App messaging hasn't been initialized.\n * @returns A promise that will resolve when the operation is complete.\n * @example\n * ```ts\n * // Clear locally cached messages.\n * await clearMessages();\n *\n * ```\n */\nasync function clearMessages() {\n (0, utils_2.assertIsInitialized)();\n const key = `${utils_1.PINPOINT_KEY_PREFIX}${utils_1.STORAGE_KEY_SUFFIX}`;\n await core_1.defaultStorage.removeItem(key);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa,GAAG;AAC/B,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,MAAM,GAAG,GAAG,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAC7E,IAAI,MAAM,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC;AAC/C;;"}
|
|
@@ -16,6 +16,8 @@ const utils_2 = require("../utils");
|
|
|
16
16
|
* {@link syncMessages}. Based on the messages synced and the event passed to this API, it triggers the display
|
|
17
17
|
* of the In-App message that meets the criteria.
|
|
18
18
|
*
|
|
19
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
20
|
+
*
|
|
19
21
|
* @remark
|
|
20
22
|
* If an event would trigger multiple messages, the message closest to expiry will be chosen by default.
|
|
21
23
|
* To change this behavior, you can use the {@link setConflictHandler} API to provide
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatchEvent.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/dispatchEvent.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dispatchEvent = dispatchEvent;\nconst tslib_1 = require(\"tslib\");\nconst flatten_js_1 = tslib_1.__importDefault(require(\"lodash/flatten.js\"));\nconst core_1 = require(\"@aws-amplify/core\");\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst errors_1 = require(\"../../../errors\");\nconst utils_1 = require(\"../../../utils\");\nconst utils_2 = require(\"../utils\");\n/**\n * Triggers an In-App message to be displayed. Use this after your campaigns have been synced to the device using\n * {@link syncMessages}. Based on the messages synced and the event passed to this API, it triggers the display\n * of the In-App message that meets the criteria.\n *\n * @remark\n * If an event would trigger multiple messages, the message closest to expiry will be chosen by default.\n * To change this behavior, you can use the {@link setConflictHandler} API to provide\n * your own logic for resolving message conflicts.\n *\n * @param input The input object that holds the event to be dispatched.\n *\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @throws service exceptions - Thrown when the underlying Pinpoint service returns an error.\n *\n * @returns A promise that will resolve when the operation is complete.\n *\n * @example\n * ```ts\n * // Sync message before disptaching an event\n * await syncMessages();\n *\n * // Dispatch an event\n * await dispatchEvent({ name: 'test_event' });\n * ```\n */\nasync function dispatchEvent(input) {\n (0, utils_1.assertIsInitialized)();\n try {\n const key = `${utils_2.PINPOINT_KEY_PREFIX}${utils_2.STORAGE_KEY_SUFFIX}`;\n const cachedMessages = await core_1.defaultStorage.getItem(key);\n const messages = await (0, utils_2.processInAppMessages)(cachedMessages ? JSON.parse(cachedMessages) : [], input);\n const flattenedMessages = (0, flatten_js_1.default)(messages);\n if (flattenedMessages.length > 0) {\n const conflictHandler = (0, utils_2.getConflictHandler)();\n (0, eventListeners_1.notifyEventListeners)('messageReceived', conflictHandler(flattenedMessages));\n }\n }\n catch (error) {\n (0, errors_1.assertServiceError)(error);\n throw error;\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AAChC,MAAM,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC1E,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC;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,eAAe,aAAa,CAAC,KAAK,EAAE;AACpC,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,IAAI;AACR,QAAQ,MAAM,GAAG,GAAG,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AACjF,QAAQ,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC;AACvE,QAAQ,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,oBAAoB,EAAE,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC;AACzH,QAAQ,MAAM,iBAAiB,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC;AACrE,QAAQ,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;AAC1C,YAAY,MAAM,eAAe,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,kBAAkB,GAAG;AACrE,YAAY,CAAC,CAAC,EAAE,gBAAgB,CAAC,oBAAoB,EAAE,iBAAiB,EAAE,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAC7G,QAAQ;AACR,IAAI;AACJ,IAAI,OAAO,KAAK,EAAE;AAClB,QAAQ,IAAI,QAAQ,CAAC,kBAAkB,EAAE,KAAK,CAAC;AAC/C,QAAQ,MAAM,KAAK;AACnB,IAAI;AACJ;;"}
|
|
1
|
+
{"version":3,"file":"dispatchEvent.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/dispatchEvent.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dispatchEvent = dispatchEvent;\nconst tslib_1 = require(\"tslib\");\nconst flatten_js_1 = tslib_1.__importDefault(require(\"lodash/flatten.js\"));\nconst core_1 = require(\"@aws-amplify/core\");\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst errors_1 = require(\"../../../errors\");\nconst utils_1 = require(\"../../../utils\");\nconst utils_2 = require(\"../utils\");\n/**\n * Triggers an In-App message to be displayed. Use this after your campaigns have been synced to the device using\n * {@link syncMessages}. Based on the messages synced and the event passed to this API, it triggers the display\n * of the In-App message that meets the criteria.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @remark\n * If an event would trigger multiple messages, the message closest to expiry will be chosen by default.\n * To change this behavior, you can use the {@link setConflictHandler} API to provide\n * your own logic for resolving message conflicts.\n *\n * @param input The input object that holds the event to be dispatched.\n *\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @throws service exceptions - Thrown when the underlying Pinpoint service returns an error.\n *\n * @returns A promise that will resolve when the operation is complete.\n *\n * @example\n * ```ts\n * // Sync message before disptaching an event\n * await syncMessages();\n *\n * // Dispatch an event\n * await dispatchEvent({ name: 'test_event' });\n * ```\n */\nasync function dispatchEvent(input) {\n (0, utils_1.assertIsInitialized)();\n try {\n const key = `${utils_2.PINPOINT_KEY_PREFIX}${utils_2.STORAGE_KEY_SUFFIX}`;\n const cachedMessages = await core_1.defaultStorage.getItem(key);\n const messages = await (0, utils_2.processInAppMessages)(cachedMessages ? JSON.parse(cachedMessages) : [], input);\n const flattenedMessages = (0, flatten_js_1.default)(messages);\n if (flattenedMessages.length > 0) {\n const conflictHandler = (0, utils_2.getConflictHandler)();\n (0, eventListeners_1.notifyEventListeners)('messageReceived', conflictHandler(flattenedMessages));\n }\n }\n catch (error) {\n (0, errors_1.assertServiceError)(error);\n throw error;\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AAChC,MAAM,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC1E,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC;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,eAAe,aAAa,CAAC,KAAK,EAAE;AACpC,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,IAAI;AACR,QAAQ,MAAM,GAAG,GAAG,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AACjF,QAAQ,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC;AACvE,QAAQ,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,oBAAoB,EAAE,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC;AACzH,QAAQ,MAAM,iBAAiB,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC;AACrE,QAAQ,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;AAC1C,YAAY,MAAM,eAAe,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,kBAAkB,GAAG;AACrE,YAAY,CAAC,CAAC,EAAE,gBAAgB,CAAC,oBAAoB,EAAE,iBAAiB,EAAE,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAC7G,QAAQ;AACR,IAAI;AACJ,IAAI,OAAO,KAAK,EAAE;AAClB,QAAQ,IAAI,QAAQ,CAAC,kBAAkB,EAAE,KAAK,CAAC;AAC/C,QAAQ,MAAM,KAAK;AACnB,IAAI;AACJ;;"}
|
|
@@ -13,6 +13,8 @@ const utils_3 = require("../../../utils");
|
|
|
13
13
|
* profile and activities or actions in your application. Activity can be tracked across devices & platforms by using
|
|
14
14
|
* the same `userId`.
|
|
15
15
|
*
|
|
16
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
17
|
+
*
|
|
16
18
|
* @param input The input object that conforms to {@link IdentifyUserInput} used to construct requests sent to Pinpoint's UpdateEndpoint
|
|
17
19
|
* API.
|
|
18
20
|
* @throws service: {@link UpdateEndpointException} - Thrown when the underlying Pinpoint service returns an error.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifyUser.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/identifyUser.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.identifyUser = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst pinpoint_1 = require(\"@aws-amplify/core/internals/providers/pinpoint\");\nconst utils_2 = require(\"../utils\");\nconst utils_3 = require(\"../../../utils\");\n/**\n * Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user\n * profile and activities or actions in your application. Activity can be tracked across devices & platforms by using\n * the same `userId`.\n *\n * @param input The input object that conforms to {@link IdentifyUserInput} used to construct requests sent to Pinpoint's UpdateEndpoint\n * API.\n * @throws service: {@link UpdateEndpointException} - Thrown when the underlying Pinpoint service returns an error.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns A promise that will resolve when the operation is complete.\n * @example\n * ```ts\n * // Identify a user with Pinpoint\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * }\n * });\n * ```\n *\n * @example\n * ```ts\n * // Identify a user with Pinpoint specific options\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * demographic: {\n * platform: 'ios',\n * timezone: 'America/Los_Angeles'\n * }\n * },\n * options: {\n * address: 'device-address',\n * optOut: 'NONE',\n * userAttributes: {\n * interests: ['food']\n * },\n * },\n * });\n */\nconst identifyUser = async (input) => {\n const { userId, userProfile, options } = input;\n (0, utils_3.assertIsInitialized)();\n const { credentials, identityId } = await (0, utils_2.resolveCredentials)();\n const { appId, region } = (0, utils_2.resolveConfig)();\n const { address, optOut, userAttributes } = options ?? {};\n await (0, pinpoint_1.updateEndpoint)({\n address,\n channelType: utils_2.CHANNEL_TYPE,\n optOut,\n appId,\n category: utils_2.CATEGORY,\n credentials,\n identityId,\n region,\n userAttributes,\n userId,\n userProfile,\n userAgentValue: (0, utils_2.getInAppMessagingUserAgentString)(utils_1.InAppMessagingAction.IdentifyUser),\n });\n};\nexports.identifyUser = identifyUser;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,YAAY,GAAG,MAAM;AAC7B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,UAAU,GAAG,OAAO,CAAC,gDAAgD,CAAC;AAC5E,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,YAAY,GAAG,OAAO,KAAK,KAAK;AACtC,IAAI,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,KAAK;AAClD,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,OAAO,CAAC,kBAAkB,GAAG;AAC/E,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,OAAO,CAAC,aAAa,GAAG;AAC1D,IAAI,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE;AAC7D,IAAI,MAAM,IAAI,UAAU,CAAC,cAAc,EAAE;AACzC,QAAQ,OAAO;AACf,QAAQ,WAAW,EAAE,OAAO,CAAC,YAAY;AACzC,QAAQ,MAAM;AACd,QAAQ,KAAK;AACb,QAAQ,QAAQ,EAAE,OAAO,CAAC,QAAQ;AAClC,QAAQ,WAAW;AACnB,QAAQ,UAAU;AAClB,QAAQ,MAAM;AACd,QAAQ,cAAc;AACtB,QAAQ,MAAM;AACd,QAAQ,WAAW;AACnB,QAAQ,cAAc,EAAE,IAAI,OAAO,CAAC,gCAAgC,EAAE,OAAO,CAAC,oBAAoB,CAAC,YAAY,CAAC;AAChH,KAAK,CAAC;AACN,CAAC;AACD,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
|
|
1
|
+
{"version":3,"file":"identifyUser.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/identifyUser.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.identifyUser = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst pinpoint_1 = require(\"@aws-amplify/core/internals/providers/pinpoint\");\nconst utils_2 = require(\"../utils\");\nconst utils_3 = require(\"../../../utils\");\n/**\n * Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user\n * profile and activities or actions in your application. Activity can be tracked across devices & platforms by using\n * the same `userId`.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @param input The input object that conforms to {@link IdentifyUserInput} used to construct requests sent to Pinpoint's UpdateEndpoint\n * API.\n * @throws service: {@link UpdateEndpointException} - Thrown when the underlying Pinpoint service returns an error.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns A promise that will resolve when the operation is complete.\n * @example\n * ```ts\n * // Identify a user with Pinpoint\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * }\n * });\n * ```\n *\n * @example\n * ```ts\n * // Identify a user with Pinpoint specific options\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * demographic: {\n * platform: 'ios',\n * timezone: 'America/Los_Angeles'\n * }\n * },\n * options: {\n * address: 'device-address',\n * optOut: 'NONE',\n * userAttributes: {\n * interests: ['food']\n * },\n * },\n * });\n */\nconst identifyUser = async (input) => {\n const { userId, userProfile, options } = input;\n (0, utils_3.assertIsInitialized)();\n const { credentials, identityId } = await (0, utils_2.resolveCredentials)();\n const { appId, region } = (0, utils_2.resolveConfig)();\n const { address, optOut, userAttributes } = options ?? {};\n await (0, pinpoint_1.updateEndpoint)({\n address,\n channelType: utils_2.CHANNEL_TYPE,\n optOut,\n appId,\n category: utils_2.CATEGORY,\n credentials,\n identityId,\n region,\n userAttributes,\n userId,\n userProfile,\n userAgentValue: (0, utils_2.getInAppMessagingUserAgentString)(utils_1.InAppMessagingAction.IdentifyUser),\n });\n};\nexports.identifyUser = identifyUser;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,YAAY,GAAG,MAAM;AAC7B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,UAAU,GAAG,OAAO,CAAC,gDAAgD,CAAC;AAC5E,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,YAAY,GAAG,OAAO,KAAK,KAAK;AACtC,IAAI,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,KAAK;AAClD,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,OAAO,CAAC,kBAAkB,GAAG;AAC/E,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,OAAO,CAAC,aAAa,GAAG;AAC1D,IAAI,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE;AAC7D,IAAI,MAAM,IAAI,UAAU,CAAC,cAAc,EAAE;AACzC,QAAQ,OAAO;AACf,QAAQ,WAAW,EAAE,OAAO,CAAC,YAAY;AACzC,QAAQ,MAAM;AACd,QAAQ,KAAK;AACb,QAAQ,QAAQ,EAAE,OAAO,CAAC,QAAQ;AAClC,QAAQ,WAAW;AACnB,QAAQ,UAAU;AAClB,QAAQ,MAAM;AACd,QAAQ,cAAc;AACtB,QAAQ,MAAM;AACd,QAAQ,WAAW;AACnB,QAAQ,cAAc,EAAE,IAAI,OAAO,CAAC,gCAAgC,EAAE,OAAO,CAAC,oBAAoB,CAAC,YAAY,CAAC;AAChH,KAAK,CAAC;AACN,CAAC;AACD,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
|
|
@@ -15,6 +15,8 @@ const dispatchEvent_1 = require("./dispatchEvent");
|
|
|
15
15
|
/**
|
|
16
16
|
* Initialize and set up in-app messaging category. This API needs to be called to enable other InAppMessaging APIs.
|
|
17
17
|
*
|
|
18
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
19
|
+
*
|
|
18
20
|
* @remarks
|
|
19
21
|
* Make sure to call this early in your app at the root entry point after configuring Amplify.
|
|
20
22
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initializeInAppMessaging.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.initializeInAppMessaging = initializeInAppMessaging;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst core_1 = require(\"@aws-amplify/core\");\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst helpers_1 = require(\"../utils/helpers\");\nconst types_1 = require(\"../types\");\nconst utils_2 = require(\"../utils\");\nconst utils_3 = require(\"../../../utils\");\nconst dispatchEvent_1 = require(\"./dispatchEvent\");\n/**\n * Initialize and set up in-app messaging category. This API needs to be called to enable other InAppMessaging APIs.\n *\n * @remarks\n * Make sure to call this early in your app at the root entry point after configuring Amplify.\n * @example\n * ```ts\n * Amplify.configure(config);\n * initializeInAppMessaging();\n * ```\n */\nfunction initializeInAppMessaging() {\n if ((0, utils_3.isInitialized)()) {\n return;\n }\n // register with the session listener\n utils_1.sessionListener.addStateChangeListener(utils_2.sessionStateChangeHandler, true);\n // wire up default Pinpoint message event handling\n (0, eventListeners_1.addEventListener)('messageDisplayed', (message) => {\n (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_DISPLAYED, message);\n (0, utils_2.incrementMessageCounts)(message.id);\n });\n (0, eventListeners_1.addEventListener)('messageDismissed', (message) => {\n (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_DISMISSED, message);\n });\n (0, eventListeners_1.addEventListener)('messageActionTaken', (message) => {\n (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_ACTION_TAKEN, message);\n });\n // listen to analytics hub events\n core_1.Hub.listen('analytics', analyticsListener);\n (0, utils_3.initialize)();\n}\nfunction analyticsListener({ payload, }) {\n const { event, data } = payload;\n switch (event) {\n case 'record': {\n (0, dispatchEvent_1.dispatchEvent)(data);\n break;\n }\n default:\n break;\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,wBAAwB,GAAG,wBAAwB;AAC3D,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAC7C,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wBAAwB,GAAG;AACpC,IAAI,IAAI,IAAI,OAAO,CAAC,aAAa,GAAG,EAAE;AACtC,QAAQ;AACR,IAAI;AACJ;AACA,IAAI,OAAO,CAAC,eAAe,CAAC,sBAAsB,CAAC,OAAO,CAAC,yBAAyB,EAAE,IAAI,CAAC;AAC3F;AACA,IAAI,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,CAAC,OAAO,KAAK;AAC5E,QAAQ,IAAI,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,OAAO,CAAC;AACpG,QAAQ,IAAI,OAAO,CAAC,sBAAsB,EAAE,OAAO,CAAC,EAAE,CAAC;AACvD,IAAI,CAAC,CAAC;AACN,IAAI,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,CAAC,OAAO,KAAK;AAC5E,QAAQ,IAAI,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,OAAO,CAAC;AACpG,IAAI,CAAC,CAAC;AACN,IAAI,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,oBAAoB,EAAE,CAAC,OAAO,KAAK;AAC9E,QAAQ,IAAI,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,CAAC,oBAAoB,EAAE,OAAO,CAAC;AACvG,IAAI,CAAC,CAAC;AACN;AACA,IAAI,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,iBAAiB,CAAC;AACrD,IAAI,IAAI,OAAO,CAAC,UAAU,GAAG;AAC7B;AACA,SAAS,iBAAiB,CAAC,EAAE,OAAO,GAAG,EAAE;AACzC,IAAI,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,OAAO;AACnC,IAAI,QAAQ,KAAK;AACjB,QAAQ,KAAK,QAAQ,EAAE;AACvB,YAAY,IAAI,eAAe,CAAC,aAAa,EAAE,IAAI,CAAC;AACpD,YAAY;AACZ,QAAQ;AAGR;AACA;;"}
|
|
1
|
+
{"version":3,"file":"initializeInAppMessaging.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.initializeInAppMessaging = initializeInAppMessaging;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst core_1 = require(\"@aws-amplify/core\");\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst helpers_1 = require(\"../utils/helpers\");\nconst types_1 = require(\"../types\");\nconst utils_2 = require(\"../utils\");\nconst utils_3 = require(\"../../../utils\");\nconst dispatchEvent_1 = require(\"./dispatchEvent\");\n/**\n * Initialize and set up in-app messaging category. This API needs to be called to enable other InAppMessaging APIs.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @remarks\n * Make sure to call this early in your app at the root entry point after configuring Amplify.\n * @example\n * ```ts\n * Amplify.configure(config);\n * initializeInAppMessaging();\n * ```\n */\nfunction initializeInAppMessaging() {\n if ((0, utils_3.isInitialized)()) {\n return;\n }\n // register with the session listener\n utils_1.sessionListener.addStateChangeListener(utils_2.sessionStateChangeHandler, true);\n // wire up default Pinpoint message event handling\n (0, eventListeners_1.addEventListener)('messageDisplayed', (message) => {\n (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_DISPLAYED, message);\n (0, utils_2.incrementMessageCounts)(message.id);\n });\n (0, eventListeners_1.addEventListener)('messageDismissed', (message) => {\n (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_DISMISSED, message);\n });\n (0, eventListeners_1.addEventListener)('messageActionTaken', (message) => {\n (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_ACTION_TAKEN, message);\n });\n // listen to analytics hub events\n core_1.Hub.listen('analytics', analyticsListener);\n (0, utils_3.initialize)();\n}\nfunction analyticsListener({ payload, }) {\n const { event, data } = payload;\n switch (event) {\n case 'record': {\n (0, dispatchEvent_1.dispatchEvent)(data);\n break;\n }\n default:\n break;\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,wBAAwB,GAAG,wBAAwB;AAC3D,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAC7C,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wBAAwB,GAAG;AACpC,IAAI,IAAI,IAAI,OAAO,CAAC,aAAa,GAAG,EAAE;AACtC,QAAQ;AACR,IAAI;AACJ;AACA,IAAI,OAAO,CAAC,eAAe,CAAC,sBAAsB,CAAC,OAAO,CAAC,yBAAyB,EAAE,IAAI,CAAC;AAC3F;AACA,IAAI,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,CAAC,OAAO,KAAK;AAC5E,QAAQ,IAAI,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,OAAO,CAAC;AACpG,QAAQ,IAAI,OAAO,CAAC,sBAAsB,EAAE,OAAO,CAAC,EAAE,CAAC;AACvD,IAAI,CAAC,CAAC;AACN,IAAI,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,CAAC,OAAO,KAAK;AAC5E,QAAQ,IAAI,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,OAAO,CAAC;AACpG,IAAI,CAAC,CAAC;AACN,IAAI,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,oBAAoB,EAAE,CAAC,OAAO,KAAK;AAC9E,QAAQ,IAAI,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,CAAC,oBAAoB,EAAE,OAAO,CAAC;AACvG,IAAI,CAAC,CAAC;AACN;AACA,IAAI,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,iBAAiB,CAAC;AACrD,IAAI,IAAI,OAAO,CAAC,UAAU,GAAG;AAC7B;AACA,SAAS,iBAAiB,CAAC,EAAE,OAAO,GAAG,EAAE;AACzC,IAAI,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,OAAO;AACnC,IAAI,QAAQ,KAAK;AACjB,QAAQ,KAAK,QAAQ,EAAE;AACvB,YAAY,IAAI,eAAe,CAAC,aAAa,EAAE,IAAI,CAAC;AACpD,YAAY;AACZ,QAAQ;AAGR;AACA;;"}
|
|
@@ -9,6 +9,8 @@ const utils_1 = require("../../../utils");
|
|
|
9
9
|
/**
|
|
10
10
|
* Notifies the respective listener of the specified type with the message given.
|
|
11
11
|
*
|
|
12
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
13
|
+
*
|
|
12
14
|
* @param {NotifyMessageInteractionInput} input - The input object that holds the type and message.
|
|
13
15
|
* @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library
|
|
14
16
|
* configuration is incorrect, or if In App messaging hasn't been initialized.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifyMessageInteraction.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.notifyMessageInteraction = notifyMessageInteraction;\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst utils_1 = require(\"../../../utils\");\n/**\n * Notifies the respective listener of the specified type with the message given.\n *\n * @param {NotifyMessageInteractionInput} input - The input object that holds the type and message.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @example\n * ```ts\n * onMessageRecieved((message) => {\n * // Show end users the In-App message and notify event listeners\n * notifyMessageInteraction({ type: 'messageDisplayed', message });\n * });\n * ```\n */\nfunction notifyMessageInteraction({ type, message, }) {\n (0, utils_1.assertIsInitialized)();\n (0, eventListeners_1.notifyEventListeners)(type, message);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,wBAAwB,GAAG,wBAAwB;AAC3D,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wBAAwB,CAAC,EAAE,IAAI,EAAE,OAAO,GAAG,EAAE;AACtD,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,IAAI,gBAAgB,CAAC,oBAAoB,EAAE,IAAI,EAAE,OAAO,CAAC;AAC7D;;"}
|
|
1
|
+
{"version":3,"file":"notifyMessageInteraction.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.notifyMessageInteraction = notifyMessageInteraction;\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst utils_1 = require(\"../../../utils\");\n/**\n * Notifies the respective listener of the specified type with the message given.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @param {NotifyMessageInteractionInput} input - The input object that holds the type and message.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @example\n * ```ts\n * onMessageRecieved((message) => {\n * // Show end users the In-App message and notify event listeners\n * notifyMessageInteraction({ type: 'messageDisplayed', message });\n * });\n * ```\n */\nfunction notifyMessageInteraction({ type, message, }) {\n (0, utils_1.assertIsInitialized)();\n (0, eventListeners_1.notifyEventListeners)(type, message);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,wBAAwB,GAAG,wBAAwB;AAC3D,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wBAAwB,CAAC,EAAE,IAAI,EAAE,OAAO,GAAG,EAAE;AACtD,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,IAAI,gBAAgB,CAAC,oBAAoB,EAAE,IAAI,EAAE,OAAO,CAAC;AAC7D;;"}
|
|
@@ -9,6 +9,8 @@ const utils_1 = require("../../../utils");
|
|
|
9
9
|
/**
|
|
10
10
|
* Registers a callback that will be invoked on `messageActionTaken` events.
|
|
11
11
|
*
|
|
12
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
13
|
+
*
|
|
12
14
|
* @param {OnMessageActionTakenInput} input - The input object that holds the callback handler.
|
|
13
15
|
* @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library
|
|
14
16
|
* configuration is incorrect, or if In App messaging hasn't been initialized.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onMessageActionTaken.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onMessageActionTaken = onMessageActionTaken;\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst utils_1 = require(\"../../../utils\");\n/**\n * Registers a callback that will be invoked on `messageActionTaken` events.\n *\n * @param {OnMessageActionTakenInput} input - The input object that holds the callback handler.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns {OnMessageActionTakenOutput} - An object that holds a remove method to stop listening to events.\n * @example\n * ```ts\n * onMessageActionTaken((message) => {\n * // use the message\n * console.log(message.id);\n * });\n * ```\n */\nfunction onMessageActionTaken(input) {\n (0, utils_1.assertIsInitialized)();\n return (0, eventListeners_1.addEventListener)('messageActionTaken', input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oBAAoB,GAAG,oBAAoB;AACnD,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,oBAAoB,CAAC,KAAK,EAAE;AACrC,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,OAAO,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,oBAAoB,EAAE,KAAK,CAAC;AAC9E;;"}
|
|
1
|
+
{"version":3,"file":"onMessageActionTaken.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onMessageActionTaken = onMessageActionTaken;\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst utils_1 = require(\"../../../utils\");\n/**\n * Registers a callback that will be invoked on `messageActionTaken` events.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @param {OnMessageActionTakenInput} input - The input object that holds the callback handler.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns {OnMessageActionTakenOutput} - An object that holds a remove method to stop listening to events.\n * @example\n * ```ts\n * onMessageActionTaken((message) => {\n * // use the message\n * console.log(message.id);\n * });\n * ```\n */\nfunction onMessageActionTaken(input) {\n (0, utils_1.assertIsInitialized)();\n return (0, eventListeners_1.addEventListener)('messageActionTaken', input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oBAAoB,GAAG,oBAAoB;AACnD,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,oBAAoB,CAAC,KAAK,EAAE;AACrC,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,OAAO,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,oBAAoB,EAAE,KAAK,CAAC;AAC9E;;"}
|
|
@@ -9,6 +9,8 @@ const utils_1 = require("../../../utils");
|
|
|
9
9
|
/**
|
|
10
10
|
* Registers a callback that will be invoked on `messageDismissed` events.
|
|
11
11
|
*
|
|
12
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
13
|
+
*
|
|
12
14
|
* @param {OnMessageDismissedInput} input - The input object that holds the callback handler.
|
|
13
15
|
* @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library
|
|
14
16
|
* configuration is incorrect, or if In App messaging hasn't been initialized.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onMessageDismissed.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onMessageDismissed = onMessageDismissed;\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst utils_1 = require(\"../../../utils\");\n/**\n * Registers a callback that will be invoked on `messageDismissed` events.\n *\n * @param {OnMessageDismissedInput} input - The input object that holds the callback handler.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns {OnMessageDismissedOutput} - An object that holds a remove method to stop listening to events.\n * @example\n * ```ts\n * onMessageDismissed((message) => {\n * // use the message\n * console.log(message.id);\n * });\n * ```\n */\nfunction onMessageDismissed(input) {\n (0, utils_1.assertIsInitialized)();\n return (0, eventListeners_1.addEventListener)('messageDismissed', input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;AAC/C,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,kBAAkB,CAAC,KAAK,EAAE;AACnC,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,OAAO,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,KAAK,CAAC;AAC5E;;"}
|
|
1
|
+
{"version":3,"file":"onMessageDismissed.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onMessageDismissed = onMessageDismissed;\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst utils_1 = require(\"../../../utils\");\n/**\n * Registers a callback that will be invoked on `messageDismissed` events.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @param {OnMessageDismissedInput} input - The input object that holds the callback handler.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns {OnMessageDismissedOutput} - An object that holds a remove method to stop listening to events.\n * @example\n * ```ts\n * onMessageDismissed((message) => {\n * // use the message\n * console.log(message.id);\n * });\n * ```\n */\nfunction onMessageDismissed(input) {\n (0, utils_1.assertIsInitialized)();\n return (0, eventListeners_1.addEventListener)('messageDismissed', input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;AAC/C,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,kBAAkB,CAAC,KAAK,EAAE;AACnC,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,OAAO,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,KAAK,CAAC;AAC5E;;"}
|
|
@@ -9,6 +9,8 @@ const utils_1 = require("../../../utils");
|
|
|
9
9
|
/**
|
|
10
10
|
* Registers a callback that will be invoked on `messageDisplayed` events.
|
|
11
11
|
*
|
|
12
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
13
|
+
*
|
|
12
14
|
* @param {OnMessageDisplayedInput} input - The input object that holds the callback handler.
|
|
13
15
|
* @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library
|
|
14
16
|
* configuration is incorrect, or if In App messaging hasn't been initialized.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onMessageDisplayed.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onMessageDisplayed = onMessageDisplayed;\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst utils_1 = require(\"../../../utils\");\n/**\n * Registers a callback that will be invoked on `messageDisplayed` events.\n *\n * @param {OnMessageDisplayedInput} input - The input object that holds the callback handler.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns {OnMessageDisplayedOutput} - An object that holds a remove method to stop listening to events.\n * @example\n * ```ts\n * onMessageDisplayed((message) => {\n * // use the message\n * \t console.log(message.id);\n * });\n * ```\n */\nfunction onMessageDisplayed(input) {\n (0, utils_1.assertIsInitialized)();\n return (0, eventListeners_1.addEventListener)('messageDisplayed', input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;AAC/C,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,kBAAkB,CAAC,KAAK,EAAE;AACnC,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,OAAO,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,KAAK,CAAC;AAC5E;;"}
|
|
1
|
+
{"version":3,"file":"onMessageDisplayed.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onMessageDisplayed = onMessageDisplayed;\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst utils_1 = require(\"../../../utils\");\n/**\n * Registers a callback that will be invoked on `messageDisplayed` events.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @param {OnMessageDisplayedInput} input - The input object that holds the callback handler.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns {OnMessageDisplayedOutput} - An object that holds a remove method to stop listening to events.\n * @example\n * ```ts\n * onMessageDisplayed((message) => {\n * // use the message\n * \t console.log(message.id);\n * });\n * ```\n */\nfunction onMessageDisplayed(input) {\n (0, utils_1.assertIsInitialized)();\n return (0, eventListeners_1.addEventListener)('messageDisplayed', input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;AAC/C,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,kBAAkB,CAAC,KAAK,EAAE;AACnC,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,OAAO,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,KAAK,CAAC;AAC5E;;"}
|
|
@@ -9,6 +9,8 @@ const utils_1 = require("../../../utils");
|
|
|
9
9
|
/**
|
|
10
10
|
* Registers a callback that will be invoked on `messageReceived` events.
|
|
11
11
|
*
|
|
12
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
13
|
+
*
|
|
12
14
|
* @param {OnMessageReceivedInput} input - The input object that holds the callback handler.
|
|
13
15
|
* @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library
|
|
14
16
|
* configuration is incorrect, or if In App messaging hasn't been initialized.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onMessageReceived.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/onMessageReceived.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onMessageReceived = onMessageReceived;\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst utils_1 = require(\"../../../utils\");\n/**\n * Registers a callback that will be invoked on `messageReceived` events.\n *\n * @param {OnMessageReceivedInput} input - The input object that holds the callback handler.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns {OnMessageReceivedOutput} - An object that holds a remove method to stop listening to events.\n * @example\n * ```ts\n * onMessageReceived((message) => {\n * // use the message\n * console.log(message.id);\n * });\n * ```\n */\nfunction onMessageReceived(input) {\n (0, utils_1.assertIsInitialized)();\n return (0, eventListeners_1.addEventListener)('messageReceived', input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,iBAAiB,GAAG,iBAAiB;AAC7C,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,iBAAiB,CAAC,KAAK,EAAE;AAClC,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,OAAO,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,KAAK,CAAC;AAC3E;;"}
|
|
1
|
+
{"version":3,"file":"onMessageReceived.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/onMessageReceived.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onMessageReceived = onMessageReceived;\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst utils_1 = require(\"../../../utils\");\n/**\n * Registers a callback that will be invoked on `messageReceived` events.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @param {OnMessageReceivedInput} input - The input object that holds the callback handler.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns {OnMessageReceivedOutput} - An object that holds a remove method to stop listening to events.\n * @example\n * ```ts\n * onMessageReceived((message) => {\n * // use the message\n * console.log(message.id);\n * });\n * ```\n */\nfunction onMessageReceived(input) {\n (0, utils_1.assertIsInitialized)();\n return (0, eventListeners_1.addEventListener)('messageReceived', input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,iBAAiB,GAAG,iBAAiB;AAC7C,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,iBAAiB,CAAC,KAAK,EAAE;AAClC,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,OAAO,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,KAAK,CAAC;AAC3E;;"}
|
|
@@ -10,6 +10,8 @@ const utils_2 = require("../utils");
|
|
|
10
10
|
* Set a conflict handler that will be used to resolve conflicts that may emerge
|
|
11
11
|
* when matching events with synced messages.
|
|
12
12
|
*
|
|
13
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
14
|
+
*
|
|
13
15
|
* @remark
|
|
14
16
|
* The conflict handler is not persisted across app restarts and so must be set again before dispatching an event for
|
|
15
17
|
* any custom handling to take effect.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setConflictHandler.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/setConflictHandler.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setConflictHandler = setConflictHandler;\nconst utils_1 = require(\"../../../utils\");\nconst utils_2 = require(\"../utils\");\n/**\n * Set a conflict handler that will be used to resolve conflicts that may emerge\n * when matching events with synced messages.\n *\n * @remark\n * The conflict handler is not persisted across app restarts and so must be set again before dispatching an event for\n * any custom handling to take effect.\n *\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n *\n * @param input The input object that holds the conflict handler to be used.\n *\n * @example\n * ```ts\n * // Sync messages before dispatching an event\n * await syncMessages();\n *\n * // Example custom conflict handler\n * const myConflictHandler = (messages) => {\n * \t\t// Return a random message\n * \t\tconst randomIndex = Math.floor(Math.random() * messages.length);\n * \t\treturn messages[randomIndex];\n * };\n *\n * // Set the conflict handler\n * setConflictHandler(myConflictHandler);\n *\n * // Dispatch an event\n * await dispatchEvent({ name: 'test_event' });\n * ```\n */\nfunction setConflictHandler(input) {\n (0, utils_1.assertIsInitialized)();\n (0, utils_2.setConflictHandler)(input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;AAC/C,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC;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,SAAS,kBAAkB,CAAC,KAAK,EAAE;AACnC,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,IAAI,OAAO,CAAC,kBAAkB,EAAE,KAAK,CAAC;AAC1C;;"}
|
|
1
|
+
{"version":3,"file":"setConflictHandler.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/setConflictHandler.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setConflictHandler = setConflictHandler;\nconst utils_1 = require(\"../../../utils\");\nconst utils_2 = require(\"../utils\");\n/**\n * Set a conflict handler that will be used to resolve conflicts that may emerge\n * when matching events with synced messages.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @remark\n * The conflict handler is not persisted across app restarts and so must be set again before dispatching an event for\n * any custom handling to take effect.\n *\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n *\n * @param input The input object that holds the conflict handler to be used.\n *\n * @example\n * ```ts\n * // Sync messages before dispatching an event\n * await syncMessages();\n *\n * // Example custom conflict handler\n * const myConflictHandler = (messages) => {\n * \t\t// Return a random message\n * \t\tconst randomIndex = Math.floor(Math.random() * messages.length);\n * \t\treturn messages[randomIndex];\n * };\n *\n * // Set the conflict handler\n * setConflictHandler(myConflictHandler);\n *\n * // Dispatch an event\n * await dispatchEvent({ name: 'test_event' });\n * ```\n */\nfunction setConflictHandler(input) {\n (0, utils_1.assertIsInitialized)();\n (0, utils_2.setConflictHandler)(input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;AAC/C,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC;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,SAAS,kBAAkB,CAAC,KAAK,EAAE;AACnC,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,IAAI,OAAO,CAAC,kBAAkB,EAAE,KAAK,CAAC;AAC1C;;"}
|
|
@@ -15,6 +15,8 @@ const utils_3 = require("../../../utils");
|
|
|
15
15
|
* Fetch and persist messages from Pinpoint campaigns.
|
|
16
16
|
* Calling this API is necessary to trigger InApp messages on the device.
|
|
17
17
|
*
|
|
18
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
19
|
+
*
|
|
18
20
|
* @throws service exceptions - Thrown when the underlying Pinpoint service returns an error.
|
|
19
21
|
* @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library
|
|
20
22
|
* configuration is incorrect, or if In App messaging hasn't been initialized.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"syncMessages.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/syncMessages.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.syncMessages = syncMessages;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst pinpoint_1 = require(\"@aws-amplify/core/internals/providers/pinpoint\");\nconst core_1 = require(\"@aws-amplify/core\");\nconst pinpoint_2 = require(\"@aws-amplify/core/internals/aws-clients/pinpoint\");\nconst utils_2 = require(\"../utils\");\nconst errors_1 = require(\"../../../errors\");\nconst utils_3 = require(\"../../../utils\");\n/**\n * Fetch and persist messages from Pinpoint campaigns.\n * Calling this API is necessary to trigger InApp messages on the device.\n *\n * @throws service exceptions - Thrown when the underlying Pinpoint service returns an error.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns A promise that will resolve when the operation is complete.\n * @example\n * ```ts\n * // Sync InApp messages with Pinpoint and device.\n * await syncMessages();\n *\n * ```\n */\nasync function syncMessages() {\n (0, utils_3.assertIsInitialized)();\n const messages = await fetchInAppMessages();\n if (!messages || messages.length === 0) {\n return;\n }\n try {\n const key = `${utils_2.PINPOINT_KEY_PREFIX}${utils_2.STORAGE_KEY_SUFFIX}`;\n await core_1.defaultStorage.setItem(key, JSON.stringify(messages));\n }\n catch (error) {\n (0, errors_1.assertServiceError)(error);\n throw error;\n }\n}\nasync function fetchInAppMessages() {\n try {\n const { credentials, identityId } = await (0, utils_2.resolveCredentials)();\n const { appId, region } = (0, utils_2.resolveConfig)();\n const endpointId = await (0, pinpoint_1.resolveEndpointId)({\n appId,\n category: utils_2.CATEGORY,\n channelType: utils_2.CHANNEL_TYPE,\n credentials,\n identityId,\n region,\n userAgentValue: (0, utils_2.getInAppMessagingUserAgentString)(utils_1.InAppMessagingAction.SyncMessages),\n });\n const input = {\n ApplicationId: appId,\n EndpointId: endpointId,\n };\n const response = await (0, pinpoint_2.getInAppMessages)({ credentials, region }, input);\n const { InAppMessageCampaigns: messages } = response.InAppMessagesResponse ?? {};\n return messages;\n }\n catch (error) {\n (0, errors_1.assertServiceError)(error);\n throw error;\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,YAAY,GAAG,YAAY;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,UAAU,GAAG,OAAO,CAAC,gDAAgD,CAAC;AAC5E,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,UAAU,GAAG,OAAO,CAAC,kDAAkD,CAAC;AAC9E,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY,GAAG;AAC9B,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,MAAM,QAAQ,GAAG,MAAM,kBAAkB,EAAE;AAC/C,IAAI,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAC5C,QAAQ;AACR,IAAI;AACJ,IAAI,IAAI;AACR,QAAQ,MAAM,GAAG,GAAG,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AACjF,QAAQ,MAAM,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC1E,IAAI;AACJ,IAAI,OAAO,KAAK,EAAE;AAClB,QAAQ,IAAI,QAAQ,CAAC,kBAAkB,EAAE,KAAK,CAAC;AAC/C,QAAQ,MAAM,KAAK;AACnB,IAAI;AACJ;AACA,eAAe,kBAAkB,GAAG;AACpC,IAAI,IAAI;AACR,QAAQ,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,kBAAkB,GAAG;AACnF,QAAQ,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,aAAa,GAAG;AAC9D,QAAQ,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,EAAE;AACnE,YAAY,KAAK;AACjB,YAAY,QAAQ,EAAE,OAAO,CAAC,QAAQ;AACtC,YAAY,WAAW,EAAE,OAAO,CAAC,YAAY;AAC7C,YAAY,WAAW;AACvB,YAAY,UAAU;AACtB,YAAY,MAAM;AAClB,YAAY,cAAc,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,gCAAgC,EAAE,OAAO,CAAC,oBAAoB,CAAC,YAAY,CAAC;AACpH,SAAS,CAAC;AACV,QAAQ,MAAM,KAAK,GAAG;AACtB,YAAY,aAAa,EAAE,KAAK;AAChC,YAAY,UAAU,EAAE,UAAU;AAClC,SAAS;AACT,QAAQ,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC,gBAAgB,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC;AAC/F,QAAQ,MAAM,EAAE,qBAAqB,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAC,qBAAqB,IAAI,EAAE;AACxF,QAAQ,OAAO,QAAQ;AACvB,IAAI;AACJ,IAAI,OAAO,KAAK,EAAE;AAClB,QAAQ,IAAI,QAAQ,CAAC,kBAAkB,EAAE,KAAK,CAAC;AAC/C,QAAQ,MAAM,KAAK;AACnB,IAAI;AACJ;;"}
|
|
1
|
+
{"version":3,"file":"syncMessages.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/syncMessages.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.syncMessages = syncMessages;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst pinpoint_1 = require(\"@aws-amplify/core/internals/providers/pinpoint\");\nconst core_1 = require(\"@aws-amplify/core\");\nconst pinpoint_2 = require(\"@aws-amplify/core/internals/aws-clients/pinpoint\");\nconst utils_2 = require(\"../utils\");\nconst errors_1 = require(\"../../../errors\");\nconst utils_3 = require(\"../../../utils\");\n/**\n * Fetch and persist messages from Pinpoint campaigns.\n * Calling this API is necessary to trigger InApp messages on the device.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @throws service exceptions - Thrown when the underlying Pinpoint service returns an error.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns A promise that will resolve when the operation is complete.\n * @example\n * ```ts\n * // Sync InApp messages with Pinpoint and device.\n * await syncMessages();\n *\n * ```\n */\nasync function syncMessages() {\n (0, utils_3.assertIsInitialized)();\n const messages = await fetchInAppMessages();\n if (!messages || messages.length === 0) {\n return;\n }\n try {\n const key = `${utils_2.PINPOINT_KEY_PREFIX}${utils_2.STORAGE_KEY_SUFFIX}`;\n await core_1.defaultStorage.setItem(key, JSON.stringify(messages));\n }\n catch (error) {\n (0, errors_1.assertServiceError)(error);\n throw error;\n }\n}\nasync function fetchInAppMessages() {\n try {\n const { credentials, identityId } = await (0, utils_2.resolveCredentials)();\n const { appId, region } = (0, utils_2.resolveConfig)();\n const endpointId = await (0, pinpoint_1.resolveEndpointId)({\n appId,\n category: utils_2.CATEGORY,\n channelType: utils_2.CHANNEL_TYPE,\n credentials,\n identityId,\n region,\n userAgentValue: (0, utils_2.getInAppMessagingUserAgentString)(utils_1.InAppMessagingAction.SyncMessages),\n });\n const input = {\n ApplicationId: appId,\n EndpointId: endpointId,\n };\n const response = await (0, pinpoint_2.getInAppMessages)({ credentials, region }, input);\n const { InAppMessageCampaigns: messages } = response.InAppMessagesResponse ?? {};\n return messages;\n }\n catch (error) {\n (0, errors_1.assertServiceError)(error);\n throw error;\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,YAAY,GAAG,YAAY;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,UAAU,GAAG,OAAO,CAAC,gDAAgD,CAAC;AAC5E,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,UAAU,GAAG,OAAO,CAAC,kDAAkD,CAAC;AAC9E,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY,GAAG;AAC9B,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,MAAM,QAAQ,GAAG,MAAM,kBAAkB,EAAE;AAC/C,IAAI,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAC5C,QAAQ;AACR,IAAI;AACJ,IAAI,IAAI;AACR,QAAQ,MAAM,GAAG,GAAG,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AACjF,QAAQ,MAAM,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC1E,IAAI;AACJ,IAAI,OAAO,KAAK,EAAE;AAClB,QAAQ,IAAI,QAAQ,CAAC,kBAAkB,EAAE,KAAK,CAAC;AAC/C,QAAQ,MAAM,KAAK;AACnB,IAAI;AACJ;AACA,eAAe,kBAAkB,GAAG;AACpC,IAAI,IAAI;AACR,QAAQ,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,kBAAkB,GAAG;AACnF,QAAQ,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,aAAa,GAAG;AAC9D,QAAQ,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,EAAE;AACnE,YAAY,KAAK;AACjB,YAAY,QAAQ,EAAE,OAAO,CAAC,QAAQ;AACtC,YAAY,WAAW,EAAE,OAAO,CAAC,YAAY;AAC7C,YAAY,WAAW;AACvB,YAAY,UAAU;AACtB,YAAY,MAAM;AAClB,YAAY,cAAc,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,gCAAgC,EAAE,OAAO,CAAC,oBAAoB,CAAC,YAAY,CAAC;AACpH,SAAS,CAAC;AACV,QAAQ,MAAM,KAAK,GAAG;AACtB,YAAY,aAAa,EAAE,KAAK;AAChC,YAAY,UAAU,EAAE,UAAU;AAClC,SAAS;AACT,QAAQ,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC,gBAAgB,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC;AAC/F,QAAQ,MAAM,EAAE,qBAAqB,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAC,qBAAqB,IAAI,EAAE;AACxF,QAAQ,OAAO,QAAQ;AACvB,IAAI;AACJ,IAAI,OAAO,KAAK,EAAE;AAClB,QAAQ,IAAI,QAAQ,CAAC,kBAAkB,EAAE,KAAK,CAAC;AAC/C,QAAQ,MAAM,KAAK;AACnB,IAAI;AACJ;;"}
|
|
@@ -9,6 +9,8 @@ const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
|
9
9
|
* Returns the current badge count (the number next to your app's icon). This function is safe to call (but will be
|
|
10
10
|
* ignored) even when your React Native app is running on platforms where badges are not supported.
|
|
11
11
|
*
|
|
12
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
13
|
+
*
|
|
12
14
|
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
13
15
|
* only React Native is supported by this API.
|
|
14
16
|
* @returns A promise that resolves to a number representing the current count displayed on the app badge.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBadgeCount.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/getBadgeCount.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getBadgeCount = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Returns the current badge count (the number next to your app's icon). This function is safe to call (but will be\n * ignored) even when your React Native app is running on platforms where badges are not supported.\n *\n * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,\n * only React Native is supported by this API.\n * @returns A promise that resolves to a number representing the current count displayed on the app badge.\n * @example\n * ```ts\n * const badgeCount = await getBadgeCount();\n * ```\n */\nconst getBadgeCount = async () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.getBadgeCount = getBadgeCount;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,MAAM;AAC9B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa,GAAG,YAAY;AAClC,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
|
|
1
|
+
{"version":3,"file":"getBadgeCount.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/getBadgeCount.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getBadgeCount = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Returns the current badge count (the number next to your app's icon). This function is safe to call (but will be\n * ignored) even when your React Native app is running on platforms where badges are not supported.\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 * @returns A promise that resolves to a number representing the current count displayed on the app badge.\n * @example\n * ```ts\n * const badgeCount = await getBadgeCount();\n * ```\n */\nconst getBadgeCount = async () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.getBadgeCount = getBadgeCount;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,MAAM;AAC9B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa,GAAG,YAAY;AAClC,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
|
|
@@ -12,6 +12,8 @@ const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
|
12
12
|
* 2. Another notification was opened while your app was running (either in foreground or background)
|
|
13
13
|
* 3. Your app was brought back to the foreground by some other means (e.g. user tapped the app icon)
|
|
14
14
|
*
|
|
15
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
16
|
+
*
|
|
15
17
|
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
16
18
|
* only React Native is supported by this API.
|
|
17
19
|
* @returns {Promise<GetLaunchNotificationOutput>} - a promise resolving to {@link PushNotificationMessage} if there is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLaunchNotification.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getLaunchNotification = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Returns the notification which launched your app from a terminated state. The launch notification is consumed by\n * calls to this function and will yield a null result if:\n * 1. It is more than once (i.e. subsequent calls will be null)\n * 2. Another notification was opened while your app was running (either in foreground or background)\n * 3. Your app was brought back to the foreground by some other means (e.g. user tapped the app icon)\n *\n * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,\n * only React Native is supported by this API.\n * @returns {Promise<GetLaunchNotificationOutput>} - a promise resolving to {@link PushNotificationMessage} if there is\n * a launch notification and `null` otherwise.\n * @example\n * ```ts\n * const launchNotification = await getLaunchNotification();\n * ```\n */\nconst getLaunchNotification = async () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.getLaunchNotification = getLaunchNotification;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,qBAAqB,GAAG,MAAM;AACtC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,qBAAqB,GAAG,YAAY;AAC1C,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,qBAAqB,GAAG,qBAAqB;;"}
|
|
1
|
+
{"version":3,"file":"getLaunchNotification.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getLaunchNotification = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Returns the notification which launched your app from a terminated state. The launch notification is consumed by\n * calls to this function and will yield a null result if:\n * 1. It is more than once (i.e. subsequent calls will be null)\n * 2. Another notification was opened while your app was running (either in foreground or background)\n * 3. Your app was brought back to the foreground by some other means (e.g. user tapped the app icon)\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 * @returns {Promise<GetLaunchNotificationOutput>} - a promise resolving to {@link PushNotificationMessage} if there is\n * a launch notification and `null` otherwise.\n * @example\n * ```ts\n * const launchNotification = await getLaunchNotification();\n * ```\n */\nconst getLaunchNotification = async () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.getLaunchNotification = getLaunchNotification;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,qBAAqB,GAAG,MAAM;AACtC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,qBAAqB,GAAG,YAAY;AAC1C,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,qBAAqB,GAAG,qBAAqB;;"}
|
|
@@ -22,6 +22,8 @@ const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
|
22
22
|
* trigger a permission dialog. Your app should now either degrade gracefully or prompt your user to grant the
|
|
23
23
|
* permissions needed in their device settings.
|
|
24
24
|
*
|
|
25
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
26
|
+
*
|
|
25
27
|
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
26
28
|
* only React Native is supported by this API.
|
|
27
29
|
* @return {Promise<GetPermissionStatusOutput>} a promise resolving to a string representing the current status of user
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPermissionStatus.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getPermissionStatus = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Returns a string representing the current status of user permissions to display push notifications. The possible\n * statuses are as follows:\n *\n * * `'shouldRequest'` - No permissions have been requested yet. It is idiomatic at this time to simply request for\n * permissions from the user.\n *\n * * `'shouldExplainThenRequest'` - It is recommended at this time to provide some context or rationale to the user\n * explaining why you want to send them push notifications before requesting for permissions.\n *\n * * `'granted'` - Permissions have been granted by the user. No further actions are needed and their app is ready to\n * display notifications.\n *\n * * `'denied'` - Permissions have been denied by the user. Further attempts to request permissions will no longer\n * trigger a permission dialog. Your app should now either degrade gracefully or prompt your user to grant the\n * permissions needed in their device settings.\n *\n * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,\n * only React Native is supported by this API.\n * @return {Promise<GetPermissionStatusOutput>} a promise resolving to a string representing the current status of user\n * selected notification permissions.\n * @example\n * ```ts\n * const permissionStatus = await getPermissionStatus();\n */\nconst getPermissionStatus = async () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.getPermissionStatus = getPermissionStatus;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,mBAAmB,GAAG,MAAM;AACpC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;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,MAAM,mBAAmB,GAAG,YAAY;AACxC,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,mBAAmB,GAAG,mBAAmB;;"}
|
|
1
|
+
{"version":3,"file":"getPermissionStatus.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getPermissionStatus = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Returns a string representing the current status of user permissions to display push notifications. The possible\n * statuses are as follows:\n *\n * * `'shouldRequest'` - No permissions have been requested yet. It is idiomatic at this time to simply request for\n * permissions from the user.\n *\n * * `'shouldExplainThenRequest'` - It is recommended at this time to provide some context or rationale to the user\n * explaining why you want to send them push notifications before requesting for permissions.\n *\n * * `'granted'` - Permissions have been granted by the user. No further actions are needed and their app is ready to\n * display notifications.\n *\n * * `'denied'` - Permissions have been denied by the user. Further attempts to request permissions will no longer\n * trigger a permission dialog. Your app should now either degrade gracefully or prompt your user to grant the\n * permissions needed in their device settings.\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 * @return {Promise<GetPermissionStatusOutput>} a promise resolving to a string representing the current status of user\n * selected notification permissions.\n * @example\n * ```ts\n * const permissionStatus = await getPermissionStatus();\n */\nconst getPermissionStatus = async () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.getPermissionStatus = getPermissionStatus;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,mBAAmB,GAAG,MAAM;AACpC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;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,MAAM,mBAAmB,GAAG,YAAY;AACxC,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,mBAAmB,GAAG,mBAAmB;;"}
|
|
@@ -10,6 +10,8 @@ const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
|
10
10
|
* profile and activities or actions in your application. Activity can be tracked across devices & platforms by using
|
|
11
11
|
* the same `userId`.
|
|
12
12
|
*
|
|
13
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
14
|
+
*
|
|
13
15
|
* @param {IdentifyUserInput} input The input object used to construct requests sent to Pinpoint's UpdateEndpoint
|
|
14
16
|
* API.
|
|
15
17
|
* @throws service: {@link UpdateEndpointException} - Thrown when the underlying Pinpoint service returns an error.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifyUser.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/identifyUser.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.identifyUser = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user\n * profile and activities or actions in your application. Activity can be tracked across devices & platforms by using\n * the same `userId`.\n *\n * @param {IdentifyUserInput} input The input object used to construct requests sent to Pinpoint's UpdateEndpoint\n * API.\n * @throws service: {@link UpdateEndpointException} - Thrown when the underlying Pinpoint service returns an error.\n * @throws validation: {@link PushNotificationValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect.\n * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,\n * only React Native is supported by this API.\n * @returns A promise that will resolve when the operation is complete.\n * @example\n * ```ts\n * // Identify a user with Pinpoint\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * }\n * });\n * ```\n *\n * @example\n * ```ts\n * // Identify a user with Pinpoint specific options\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * demographic: {\n * platform: 'ios',\n * timezone: 'America/Los_Angeles'\n * }\n * },\n * options: {\n * address: 'device-address',\n * optOut: 'NONE',\n * userAttributes: {\n * interests: ['food']\n * },\n * },\n * });\n */\nconst identifyUser = async () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.identifyUser = identifyUser;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,YAAY,GAAG,MAAM;AAC7B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,YAAY,GAAG,YAAY;AACjC,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
|
|
1
|
+
{"version":3,"file":"identifyUser.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/identifyUser.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.identifyUser = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user\n * profile and activities or actions in your application. Activity can be tracked across devices & platforms by using\n * the same `userId`.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @param {IdentifyUserInput} input The input object used to construct requests sent to Pinpoint's UpdateEndpoint\n * API.\n * @throws service: {@link UpdateEndpointException} - Thrown when the underlying Pinpoint service returns an error.\n * @throws validation: {@link PushNotificationValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect.\n * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,\n * only React Native is supported by this API.\n * @returns A promise that will resolve when the operation is complete.\n * @example\n * ```ts\n * // Identify a user with Pinpoint\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * }\n * });\n * ```\n *\n * @example\n * ```ts\n * // Identify a user with Pinpoint specific options\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * demographic: {\n * platform: 'ios',\n * timezone: 'America/Los_Angeles'\n * }\n * },\n * options: {\n * address: 'device-address',\n * optOut: 'NONE',\n * userAttributes: {\n * interests: ['food']\n * },\n * },\n * });\n */\nconst identifyUser = async () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.identifyUser = identifyUser;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,YAAY,GAAG,MAAM;AAC7B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,YAAY,GAAG,YAAY;AACjC,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
|
|
@@ -9,6 +9,8 @@ const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
|
9
9
|
* Initialize and set up the push notification category. The category must be first initialized before all other
|
|
10
10
|
* functionalities become available.
|
|
11
11
|
*
|
|
12
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
13
|
+
*
|
|
12
14
|
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
13
15
|
* only React Native is supported by this API.
|
|
14
16
|
* @remarks
|
package/dist/cjs/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initializePushNotifications.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/initializePushNotifications.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.initializePushNotifications = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Initialize and set up the push notification category. The category must be first initialized before all other\n * functionalities become available.\n *\n * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,\n * only React Native is supported by this API.\n * @remarks\n * It is recommended that this be called as early in your app as possible at the root of your application to allow\n * background processing of notifications.\n * @example\n * ```ts\n * Amplify.configure(config);\n * initializePushNotifications();\n * ```\n */\nconst initializePushNotifications = () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.initializePushNotifications = initializePushNotifications;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,2BAA2B,GAAG,MAAM;AAC5C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,2BAA2B,GAAG,MAAM;AAC1C,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,2BAA2B,GAAG,2BAA2B;;"}
|
|
1
|
+
{"version":3,"file":"initializePushNotifications.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/initializePushNotifications.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.initializePushNotifications = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Initialize and set up the push notification category. The category must be first initialized before all other\n * functionalities become available.\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 * @remarks\n * It is recommended that this be called as early in your app as possible at the root of your application to allow\n * background processing of notifications.\n * @example\n * ```ts\n * Amplify.configure(config);\n * initializePushNotifications();\n * ```\n */\nconst initializePushNotifications = () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.initializePushNotifications = initializePushNotifications;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,2BAA2B,GAAG,MAAM;AAC5C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,2BAA2B,GAAG,MAAM;AAC1C,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,2BAA2B,GAAG,2BAA2B;;"}
|
|
@@ -8,6 +8,8 @@ const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
|
8
8
|
/**
|
|
9
9
|
* Registers a listener that will be triggered when a notification is opened by user.
|
|
10
10
|
*
|
|
11
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
12
|
+
*
|
|
11
13
|
* @param {OnNotificationOpenedInput} input - A callback handler to be invoked with the opened
|
|
12
14
|
* {@link PushNotificationMessage}.
|
|
13
15
|
* @returns {OnNotificationOpenedOutput} - An object with a remove function to remove the listener.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onNotificationOpened.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationOpened.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onNotificationOpened = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Registers a listener that will be triggered when a notification is opened by user.\n *\n * @param {OnNotificationOpenedInput} input - A callback handler to be invoked with the opened\n * {@link PushNotificationMessage}.\n * @returns {OnNotificationOpenedOutput} - An object with a remove function to remove the listener.\n * @example\n * ```ts\n * // Register a listener\n * onNotificationOpened(message => {\n * doSomething(message);\n * });\n * ```\n * @example\n * ```ts\n * // Register multiple listeners\n * onNotificationOpened(message => {\n * doSomething(message);\n * });\n *\n * onNotificationOpened(message => {\n * doSomethingElse(message);\n * });\n * ```\n */\nconst onNotificationOpened = () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.onNotificationOpened = onNotificationOpened;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oBAAoB,GAAG,MAAM;AACrC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;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,MAAM,oBAAoB,GAAG,MAAM;AACnC,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,oBAAoB,GAAG,oBAAoB;;"}
|
|
1
|
+
{"version":3,"file":"onNotificationOpened.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationOpened.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onNotificationOpened = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Registers a listener that will be triggered when a notification is opened by user.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @param {OnNotificationOpenedInput} input - A callback handler to be invoked with the opened\n * {@link PushNotificationMessage}.\n * @returns {OnNotificationOpenedOutput} - An object with a remove function to remove the listener.\n * @example\n * ```ts\n * // Register a listener\n * onNotificationOpened(message => {\n * doSomething(message);\n * });\n * ```\n * @example\n * ```ts\n * // Register multiple listeners\n * onNotificationOpened(message => {\n * doSomething(message);\n * });\n *\n * onNotificationOpened(message => {\n * doSomethingElse(message);\n * });\n * ```\n */\nconst onNotificationOpened = () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.onNotificationOpened = onNotificationOpened;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oBAAoB,GAAG,MAAM;AACrC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;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,MAAM,oBAAoB,GAAG,MAAM;AACnC,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,oBAAoB,GAAG,oBAAoB;;"}
|
package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js
CHANGED
|
@@ -8,6 +8,8 @@ const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
|
8
8
|
/**
|
|
9
9
|
* Registers a listener that will be triggered when a notification is received while app is in a background state.
|
|
10
10
|
*
|
|
11
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
12
|
+
*
|
|
11
13
|
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
12
14
|
* only React Native is supported by this API.
|
|
13
15
|
* @param {OnNotificationReceivedInBackgroundInput} input - A callback handler to be invoked with the received
|
package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onNotificationReceivedInBackground.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onNotificationReceivedInBackground = void 0;\nconst utils_1 = require(\"@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 * @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 */\nconst onNotificationReceivedInBackground = () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.onNotificationReceivedInBackground = onNotificationReceivedInBackground;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kCAAkC,GAAG,MAAM;AACnD,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;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,MAAM,kCAAkC,GAAG,MAAM;AACjD,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,kCAAkC,GAAG,kCAAkC;;"}
|
|
1
|
+
{"version":3,"file":"onNotificationReceivedInBackground.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onNotificationReceivedInBackground = void 0;\nconst utils_1 = require(\"@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 */\nconst onNotificationReceivedInBackground = () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.onNotificationReceivedInBackground = onNotificationReceivedInBackground;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kCAAkC,GAAG,MAAM;AACnD,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;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;AACA,MAAM,kCAAkC,GAAG,MAAM;AACjD,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,kCAAkC,GAAG,kCAAkC;;"}
|
package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js
CHANGED
|
@@ -8,6 +8,8 @@ const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
|
8
8
|
/**
|
|
9
9
|
* Registers a listener that will be triggered when a notification is received while app is in a foreground state.
|
|
10
10
|
*
|
|
11
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
12
|
+
*
|
|
11
13
|
* @param {OnNotificationReceivedInForegroundInput} input - A callback handler to be invoked with the received
|
|
12
14
|
* {@link PushNotificationMessage}.
|
|
13
15
|
* @returns {OnNotificationReceivedInForegroundOutput} - An object with a remove function to remove the listener.
|
package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onNotificationReceivedInForeground.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onNotificationReceivedInForeground = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Registers a listener that will be triggered when a notification is received while app is in a foreground state.\n *\n * @param {OnNotificationReceivedInForegroundInput} input - A callback handler to be invoked with the received\n * {@link PushNotificationMessage}.\n * @returns {OnNotificationReceivedInForegroundOutput} - An object with a remove function to remove the listener.\n * @example\n * ```ts\n * // Register a listener\n * onNotificationReceivedInForeground(message => {\n * doSomething(message);\n * });\n * ```\n * @example\n * ```ts\n * // Register multiple listeners\n * onNotificationReceivedInForeground(message => {\n * doSomething(message);\n * });\n *\n * onNotificationReceivedInForeground(message => {\n * doSomethingElse(message);\n * });\n * ```\n */\nconst onNotificationReceivedInForeground = () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.onNotificationReceivedInForeground = onNotificationReceivedInForeground;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kCAAkC,GAAG,MAAM;AACnD,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;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,MAAM,kCAAkC,GAAG,MAAM;AACjD,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,kCAAkC,GAAG,kCAAkC;;"}
|
|
1
|
+
{"version":3,"file":"onNotificationReceivedInForeground.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onNotificationReceivedInForeground = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Registers a listener that will be triggered when a notification is received while app is in a foreground state.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @param {OnNotificationReceivedInForegroundInput} input - A callback handler to be invoked with the received\n * {@link PushNotificationMessage}.\n * @returns {OnNotificationReceivedInForegroundOutput} - An object with a remove function to remove the listener.\n * @example\n * ```ts\n * // Register a listener\n * onNotificationReceivedInForeground(message => {\n * doSomething(message);\n * });\n * ```\n * @example\n * ```ts\n * // Register multiple listeners\n * onNotificationReceivedInForeground(message => {\n * doSomething(message);\n * });\n *\n * onNotificationReceivedInForeground(message => {\n * doSomethingElse(message);\n * });\n * ```\n */\nconst onNotificationReceivedInForeground = () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.onNotificationReceivedInForeground = onNotificationReceivedInForeground;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kCAAkC,GAAG,MAAM;AACnD,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;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,MAAM,kCAAkC,GAAG,MAAM;AACjD,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,kCAAkC,GAAG,kCAAkC;;"}
|
|
@@ -10,6 +10,8 @@ const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
|
10
10
|
* 1. On every app launch, including the first install
|
|
11
11
|
* 2. When a token changes (this may happen if the service invalidates the token for any reason)
|
|
12
12
|
*
|
|
13
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
14
|
+
*
|
|
13
15
|
* @param {OnTokenReceivedInput} input - A callback handler to be invoked with the token.
|
|
14
16
|
* @returns {OnTokenReceivedOutput} - An object with a remove function to remove the listener.
|
|
15
17
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onTokenReceived.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/onTokenReceived.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onTokenReceived = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Registers a listener that will be triggered when a token is received. A token will be received:\n * 1. On every app launch, including the first install\n * 2. When a token changes (this may happen if the service invalidates the token for any reason)\n *\n * @param {OnTokenReceivedInput} input - A callback handler to be invoked with the token.\n * @returns {OnTokenReceivedOutput} - An object with a remove function to remove the listener.\n * @example\n * ```ts\n * // Register a listener\n * onTokenReceived(message => {\n * doSomething(message);\n * });\n * ```\n * @example\n * ```ts\n * // Register multiple listeners\n * onTokenReceived(message => {\n * doSomething(message);\n * });\n *\n * onTokenReceived(message => {\n * doSomethingElse(message);\n * });\n * ```\n */\nconst onTokenReceived = () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.onTokenReceived = onTokenReceived;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,eAAe,GAAG,MAAM;AAChC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;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,MAAM,eAAe,GAAG,MAAM;AAC9B,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,eAAe,GAAG,eAAe;;"}
|
|
1
|
+
{"version":3,"file":"onTokenReceived.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/onTokenReceived.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onTokenReceived = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Registers a listener that will be triggered when a token is received. A token will be received:\n * 1. On every app launch, including the first install\n * 2. When a token changes (this may happen if the service invalidates the token for any reason)\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @param {OnTokenReceivedInput} input - A callback handler to be invoked with the token.\n * @returns {OnTokenReceivedOutput} - An object with a remove function to remove the listener.\n * @example\n * ```ts\n * // Register a listener\n * onTokenReceived(message => {\n * doSomething(message);\n * });\n * ```\n * @example\n * ```ts\n * // Register multiple listeners\n * onTokenReceived(message => {\n * doSomething(message);\n * });\n *\n * onTokenReceived(message => {\n * doSomethingElse(message);\n * });\n * ```\n */\nconst onTokenReceived = () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.onTokenReceived = onTokenReceived;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,eAAe,GAAG,MAAM;AAChC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;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,MAAM,eAAe,GAAG,MAAM;AAC9B,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,eAAe,GAAG,eAAe;;"}
|
|
@@ -17,6 +17,8 @@ const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
|
17
17
|
*
|
|
18
18
|
* * `badge`: When set to true, requests the ability to update the app's badge.
|
|
19
19
|
*
|
|
20
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
21
|
+
*
|
|
20
22
|
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
21
23
|
* only React Native is supported by this API.
|
|
22
24
|
* @returns A promise that resolves to true if requested permissions are granted or have already previously been
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestPermissions.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/requestPermissions.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.requestPermissions = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Requests notification permissions from your user. By default, Amplify requests all supported permissions but you can\n * choose not to request specific permissions. The resulting promise will resolve to true if requested permissions are\n * granted (or have previously been granted) or false otherwise. Not all specific permissions are supported by platforms\n * your React Native app can run on but will be safely ignored even on those platforms. Currently supported permissions:\n *\n * * `alert`: When set to true, requests the ability to display notifications to the user.\n *\n * * `sound`: When set to true, requests the ability to play a sound in response to notifications.\n *\n * * `badge`: When set to true, requests the ability to update the app's badge.\n *\n * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,\n * only React Native is supported by this API.\n * @returns A promise that resolves to true if requested permissions are granted or have already previously been\n * granted or false otherwise.\n * @example\n * ```ts\n * // Request all permissions by default\n * const arePermissionsGranted = await requestPermissions();\n *\n * @example\n * ```ts\n * // Prevent requesting specific permissions\n * const arePermissionsGranted = await requestPermissions({\n * sound: false,\n * badge: false\n * });\n * ```\n */\nconst requestPermissions = async () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.requestPermissions = requestPermissions;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,MAAM;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;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,MAAM,kBAAkB,GAAG,YAAY;AACvC,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;;"}
|
|
1
|
+
{"version":3,"file":"requestPermissions.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/requestPermissions.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.requestPermissions = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Requests notification permissions from your user. By default, Amplify requests all supported permissions but you can\n * choose not to request specific permissions. The resulting promise will resolve to true if requested permissions are\n * granted (or have previously been granted) or false otherwise. Not all specific permissions are supported by platforms\n * your React Native app can run on but will be safely ignored even on those platforms. Currently supported permissions:\n *\n * * `alert`: When set to true, requests the ability to display notifications to the user.\n *\n * * `sound`: When set to true, requests the ability to play a sound in response to notifications.\n *\n * * `badge`: When set to true, requests the ability to update the app's badge.\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 * @returns A promise that resolves to true if requested permissions are granted or have already previously been\n * granted or false otherwise.\n * @example\n * ```ts\n * // Request all permissions by default\n * const arePermissionsGranted = await requestPermissions();\n *\n * @example\n * ```ts\n * // Prevent requesting specific permissions\n * const arePermissionsGranted = await requestPermissions({\n * sound: false,\n * badge: false\n * });\n * ```\n */\nconst requestPermissions = async () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.requestPermissions = requestPermissions;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,MAAM;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;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,MAAM,kBAAkB,GAAG,YAAY;AACvC,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;;"}
|
|
@@ -10,6 +10,8 @@ const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
|
10
10
|
* to 0 (zero) will remove the badge from your app's icon. This function is safe to call (but will be ignored) even
|
|
11
11
|
* when your React Native app is running on platforms where badges are not supported.
|
|
12
12
|
*
|
|
13
|
+
* @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
|
|
14
|
+
*
|
|
13
15
|
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
14
16
|
* only React Native is supported by this API.
|
|
15
17
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setBadgeCount.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/setBadgeCount.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setBadgeCount = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Sets the current badge count (the number on the top right corner of your app's icon). Setting the badge count\n * to 0 (zero) will remove the badge from your app's icon. This function is safe to call (but will be ignored) even\n * when your React Native app is running on platforms where badges are not supported.\n *\n * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,\n * only React Native is supported by this API.\n * @example\n * ```ts\n * setBadgeCount(42);\n * ```\n */\nconst setBadgeCount = () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.setBadgeCount = setBadgeCount;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,MAAM;AAC9B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa,GAAG,MAAM;AAC5B,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
|
|
1
|
+
{"version":3,"file":"setBadgeCount.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/setBadgeCount.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setBadgeCount = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * Sets the current badge count (the number on the top right corner of your app's icon). Setting the badge count\n * to 0 (zero) will remove the badge from your app's icon. This function is safe to call (but will be ignored) even\n * when your React Native app is running on platforms where badges are not supported.\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 * @example\n * ```ts\n * setBadgeCount(42);\n * ```\n */\nconst setBadgeCount = () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.setBadgeCount = setBadgeCount;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,MAAM;AAC9B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa,GAAG,MAAM;AAC5B,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE;AACjD,CAAC;AACD,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
|