@aws-amplify/notifications 2.0.1-api-v6-models.c1977f8.0 → 2.0.1-api-v6-models.891fe0d.0
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/in-app-messaging/package.json +4 -4
- package/lib/eventListeners/eventListeners.js +19 -37
- package/lib/eventListeners/index.js +4 -3
- package/lib/eventListeners/types.d.ts +2 -2
- package/lib/inAppMessaging/errors/InAppMessagingError.js +8 -11
- package/lib/inAppMessaging/errors/assertServiceError.js +3 -2
- package/lib/inAppMessaging/errors/assertValidationError.js +5 -4
- package/lib/inAppMessaging/errors/index.js +6 -5
- package/lib/inAppMessaging/errors/validation.js +7 -7
- package/lib/inAppMessaging/index.d.ts +2 -1
- package/lib/inAppMessaging/index.js +12 -10
- package/lib/inAppMessaging/providers/pinpoint/apis/clearMessages.d.ts +13 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/clearMessages.js +26 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js +26 -38
- package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +2 -1
- package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.js +24 -35
- package/lib/inAppMessaging/providers/pinpoint/apis/index.d.ts +1 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/index.js +13 -10
- package/lib/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +21 -21
- package/lib/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +6 -6
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js +5 -4
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js +5 -4
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js +5 -4
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js +5 -4
- package/lib/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +6 -6
- package/lib/inAppMessaging/providers/pinpoint/apis/syncMessages.js +46 -76
- package/lib/inAppMessaging/providers/pinpoint/index.d.ts +1 -1
- package/lib/inAppMessaging/providers/pinpoint/index.js +12 -10
- package/lib/inAppMessaging/providers/pinpoint/types/index.js +2 -1
- package/lib/inAppMessaging/providers/pinpoint/types/inputs.d.ts +8 -8
- package/lib/inAppMessaging/providers/pinpoint/types/options.d.ts +1 -1
- package/lib/inAppMessaging/providers/pinpoint/types/outputs.d.ts +4 -4
- package/lib/inAppMessaging/providers/pinpoint/types/types.d.ts +6 -6
- package/lib/inAppMessaging/providers/pinpoint/types/types.js +1 -0
- package/lib/inAppMessaging/providers/pinpoint/utils/constants.js +1 -0
- package/lib/inAppMessaging/providers/pinpoint/utils/helpers.d.ts +3 -3
- package/lib/inAppMessaging/providers/pinpoint/utils/helpers.js +114 -110
- package/lib/inAppMessaging/providers/pinpoint/utils/index.js +11 -10
- package/lib/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js +116 -191
- package/lib/inAppMessaging/providers/pinpoint/utils/resolveConfig.js +9 -8
- package/lib/inAppMessaging/providers/pinpoint/utils/resolveCredentials.d.ts +1 -1
- package/lib/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js +9 -15
- package/lib/inAppMessaging/providers/pinpoint/utils/userAgent.js +6 -5
- package/lib/inAppMessaging/types/event.d.ts +2 -2
- package/lib/inAppMessaging/types/inputs.d.ts +1 -1
- package/lib/inAppMessaging/types/message.d.ts +3 -3
- package/lib/inAppMessaging/types/options.d.ts +1 -1
- package/lib/inAppMessaging/utils/index.js +4 -3
- package/lib/inAppMessaging/utils/statusHelpers.js +8 -5
- package/lib/index.js +1 -0
- package/lib/pushNotifications/errors/PushNotificationError.js +8 -11
- package/lib/pushNotifications/errors/errorHelpers.js +14 -13
- package/lib/pushNotifications/errors/index.js +4 -3
- package/lib/pushNotifications/index.d.ts +1 -1
- package/lib/pushNotifications/index.js +13 -12
- package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.js +4 -2
- package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js +9 -10
- package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js +4 -2
- package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js +7 -5
- package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js +4 -2
- package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js +7 -5
- package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.js +4 -2
- package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.native.js +25 -36
- package/lib/pushNotifications/providers/pinpoint/apis/index.js +12 -11
- package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js +4 -2
- package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.d.ts +1 -1
- package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js +90 -115
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js +4 -2
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js +7 -5
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js +4 -2
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js +7 -5
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js +4 -2
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js +7 -5
- package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.js +4 -2
- package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js +7 -5
- package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.js +4 -2
- package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js +7 -5
- package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.js +4 -2
- package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js +7 -5
- package/lib/pushNotifications/providers/pinpoint/index.d.ts +1 -1
- package/lib/pushNotifications/providers/pinpoint/index.js +12 -11
- package/lib/pushNotifications/providers/pinpoint/types/analytics.d.ts +3 -3
- package/lib/pushNotifications/providers/pinpoint/types/apis.d.ts +11 -11
- package/lib/pushNotifications/providers/pinpoint/types/inputs.d.ts +7 -7
- package/lib/pushNotifications/providers/pinpoint/types/options.d.ts +1 -1
- package/lib/pushNotifications/providers/pinpoint/types/outputs.d.ts +8 -8
- package/lib/pushNotifications/providers/pinpoint/types/pushNotifications.d.ts +1 -1
- package/lib/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.d.ts +3 -2
- package/lib/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js +33 -49
- package/lib/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.d.ts +3 -2
- package/lib/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js +17 -13
- package/lib/pushNotifications/providers/pinpoint/utils/getChannelType.d.ts +2 -1
- package/lib/pushNotifications/providers/pinpoint/utils/getChannelType.js +9 -7
- package/lib/pushNotifications/providers/pinpoint/utils/index.d.ts +2 -1
- package/lib/pushNotifications/providers/pinpoint/utils/index.js +7 -4
- package/lib/pushNotifications/providers/pinpoint/utils/resolveConfig.js +17 -0
- package/lib/pushNotifications/types/errors.js +1 -0
- package/lib/pushNotifications/types/index.d.ts +1 -0
- package/lib/pushNotifications/types/index.js +20 -2
- package/lib/pushNotifications/types/inputs.d.ts +9 -8
- package/lib/pushNotifications/types/module.d.ts +31 -0
- package/lib/pushNotifications/types/options.d.ts +1 -1
- package/lib/pushNotifications/types/outputs.d.ts +8 -8
- package/lib/pushNotifications/types/pushNotifications.d.ts +4 -5
- package/lib/pushNotifications/utils/getPushNotificationUserAgentString.js +11 -0
- package/lib/pushNotifications/utils/index.d.ts +1 -1
- package/lib/pushNotifications/utils/index.js +8 -7
- package/lib/pushNotifications/utils/initializationManager.js +8 -9
- package/lib/pushNotifications/utils/resolveCredentials.d.ts +1 -1
- package/lib/pushNotifications/utils/resolveCredentials.js +9 -15
- package/lib/pushNotifications/utils/tokenManager.js +6 -3
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib-esm/eventListeners/eventListeners.js +15 -37
- package/lib-esm/eventListeners/types.d.ts +2 -2
- package/lib-esm/eventListeners/types.js +1 -0
- package/lib-esm/inAppMessaging/errors/InAppMessagingError.js +6 -11
- package/lib-esm/inAppMessaging/errors/assertValidationError.js +2 -2
- package/lib-esm/inAppMessaging/errors/validation.js +6 -7
- package/lib-esm/inAppMessaging/index.d.ts +2 -1
- package/lib-esm/inAppMessaging/index.js +1 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/clearMessages.d.ts +13 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/clearMessages.js +22 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js +15 -31
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +2 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.js +18 -31
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.d.ts +1 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.js +1 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +5 -6
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +1 -2
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +4 -5
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/syncMessages.js +38 -69
- package/lib-esm/inAppMessaging/providers/pinpoint/index.d.ts +1 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/index.js +1 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/inputs.d.ts +8 -8
- package/lib-esm/inAppMessaging/providers/pinpoint/types/inputs.js +1 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/types/options.d.ts +1 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/options.js +1 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.d.ts +4 -4
- package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.js +1 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/types/types.d.ts +6 -6
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/constants.js +4 -4
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.d.ts +3 -3
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.js +85 -97
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js +111 -187
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveConfig.js +3 -4
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.d.ts +1 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js +5 -13
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/userAgent.js +2 -2
- package/lib-esm/inAppMessaging/types/event.d.ts +2 -2
- package/lib-esm/inAppMessaging/types/event.js +1 -0
- package/lib-esm/inAppMessaging/types/index.js +1 -0
- package/lib-esm/inAppMessaging/types/inputs.d.ts +1 -1
- package/lib-esm/inAppMessaging/types/inputs.js +1 -0
- package/lib-esm/inAppMessaging/types/message.d.ts +3 -3
- package/lib-esm/inAppMessaging/types/message.js +1 -0
- package/lib-esm/inAppMessaging/types/options.d.ts +1 -1
- package/lib-esm/inAppMessaging/types/options.js +1 -0
- package/lib-esm/inAppMessaging/utils/statusHelpers.js +3 -3
- package/lib-esm/index.js +1 -0
- package/lib-esm/pushNotifications/errors/PushNotificationError.js +6 -11
- package/lib-esm/pushNotifications/errors/errorHelpers.js +8 -9
- package/lib-esm/pushNotifications/index.d.ts +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js +5 -8
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js +2 -2
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js +2 -2
- package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.js +20 -33
- package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.d.ts +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js +76 -103
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js +2 -2
- package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js +2 -2
- package/lib-esm/pushNotifications/providers/pinpoint/index.d.ts +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/analytics.d.ts +3 -3
- package/lib-esm/pushNotifications/providers/pinpoint/types/analytics.js +1 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/apis.d.ts +11 -11
- package/lib-esm/pushNotifications/providers/pinpoint/types/apis.js +1 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/index.js +1 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/inputs.d.ts +7 -7
- package/lib-esm/pushNotifications/providers/pinpoint/types/inputs.js +1 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/options.d.ts +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/options.js +1 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/outputs.d.ts +8 -8
- package/lib-esm/pushNotifications/providers/pinpoint/types/outputs.js +1 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/pushNotifications.d.ts +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/pushNotifications.js +1 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.d.ts +3 -2
- package/lib-esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js +27 -45
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.d.ts +3 -2
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js +15 -13
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getChannelType.d.ts +2 -1
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getChannelType.js +5 -5
- package/lib-esm/pushNotifications/providers/pinpoint/utils/index.d.ts +2 -1
- package/lib-esm/pushNotifications/providers/pinpoint/utils/index.js +2 -1
- package/lib-esm/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.js +4 -5
- package/lib-esm/pushNotifications/types/index.d.ts +1 -0
- package/lib-esm/pushNotifications/types/index.js +5 -0
- package/lib-esm/pushNotifications/types/inputs.d.ts +9 -8
- package/lib-esm/pushNotifications/types/inputs.js +1 -0
- package/lib-esm/pushNotifications/types/module.d.ts +31 -0
- package/lib-esm/pushNotifications/{Platform/types.js → types/module.js} +1 -0
- package/lib-esm/pushNotifications/types/options.d.ts +1 -1
- package/lib-esm/pushNotifications/types/options.js +1 -0
- package/lib-esm/pushNotifications/types/outputs.d.ts +8 -8
- package/lib-esm/pushNotifications/types/outputs.js +1 -0
- package/lib-esm/pushNotifications/types/pushNotifications.d.ts +4 -5
- package/lib-esm/pushNotifications/types/pushNotifications.js +1 -0
- package/lib-esm/pushNotifications/{providers/pinpoint/utils → utils}/getPushNotificationUserAgentString.js +4 -6
- package/lib-esm/pushNotifications/utils/index.d.ts +1 -1
- package/lib-esm/pushNotifications/utils/index.js +1 -1
- package/lib-esm/pushNotifications/utils/initializationManager.js +5 -9
- package/lib-esm/pushNotifications/utils/resolveCredentials.d.ts +1 -1
- package/lib-esm/pushNotifications/utils/resolveCredentials.js +5 -13
- package/lib-esm/pushNotifications/utils/tokenManager.js +3 -3
- package/lib-esm/tsconfig.tsbuildinfo +1 -0
- package/package.json +63 -30
- package/src/inAppMessaging/index.ts +12 -0
- package/src/inAppMessaging/providers/pinpoint/apis/clearMessages.ts +26 -0
- package/src/inAppMessaging/providers/pinpoint/apis/index.ts +1 -0
- package/src/inAppMessaging/providers/pinpoint/index.ts +1 -0
- package/src/inAppMessaging/providers/pinpoint/utils/helpers.ts +38 -28
- package/src/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.ts +25 -9
- package/src/inAppMessaging/providers/pinpoint/utils/resolveConfig.ts +1 -1
- package/src/pushNotifications/index.ts +1 -0
- package/src/pushNotifications/providers/pinpoint/apis/getBadgeCount.ts +1 -1
- package/src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.ts +1 -1
- package/src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.ts +1 -1
- package/src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.ts +1 -1
- package/src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.ts +1 -1
- package/src/pushNotifications/providers/pinpoint/apis/identifyUser.native.ts +5 -2
- package/src/pushNotifications/providers/pinpoint/apis/identifyUser.ts +1 -1
- package/src/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.ts +51 -41
- package/src/pushNotifications/providers/pinpoint/apis/requestPermissions.native.ts +1 -1
- package/src/pushNotifications/providers/pinpoint/apis/requestPermissions.ts +1 -1
- package/src/pushNotifications/providers/pinpoint/index.ts +1 -0
- package/src/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.ts +5 -4
- package/src/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.ts +7 -4
- package/src/pushNotifications/providers/pinpoint/utils/getChannelType.ts +1 -1
- package/src/pushNotifications/providers/pinpoint/utils/index.ts +2 -1
- package/src/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.ts +2 -2
- package/src/pushNotifications/types/index.ts +1 -0
- package/src/pushNotifications/types/inputs.ts +1 -1
- package/src/pushNotifications/types/module.ts +42 -0
- package/src/pushNotifications/types/outputs.ts +1 -1
- package/src/pushNotifications/types/pushNotifications.ts +2 -7
- package/src/pushNotifications/utils/index.ts +1 -1
- package/lib/inAppMessaging/providers/index.d.ts +0 -2
- package/lib/inAppMessaging/providers/index.js +0 -15
- package/lib/pushNotifications/Platform/index.d.ts +0 -2
- package/lib/pushNotifications/Platform/index.js +0 -25
- package/lib/pushNotifications/Platform/index.native.d.ts +0 -2
- package/lib/pushNotifications/Platform/index.native.js +0 -7
- package/lib/pushNotifications/Platform/types.d.ts +0 -5
- package/lib/pushNotifications/providers/pinpoint/utils/getPushNotificationUserAgentString.js +0 -11
- package/lib/pushNotifications/utils/resolveConfig.js +0 -16
- package/lib/tsconfig.build.tsbuildinfo +0 -8667
- package/lib-esm/inAppMessaging/providers/index.d.ts +0 -2
- package/lib-esm/inAppMessaging/providers/index.js +0 -3
- package/lib-esm/pushNotifications/Platform/index.d.ts +0 -2
- package/lib-esm/pushNotifications/Platform/index.js +0 -23
- package/lib-esm/pushNotifications/Platform/index.native.d.ts +0 -2
- package/lib-esm/pushNotifications/Platform/index.native.js +0 -5
- package/lib-esm/pushNotifications/Platform/types.d.ts +0 -5
- package/lib-esm/tsconfig.build.tsbuildinfo +0 -7115
- package/src/inAppMessaging/providers/index.ts +0 -38
- package/src/pushNotifications/Platform/index.native.ts +0 -9
- package/src/pushNotifications/Platform/index.ts +0 -22
- package/src/pushNotifications/Platform/types.ts +0 -15
- /package/lib/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.d.ts +0 -0
- /package/lib/pushNotifications/{Platform/types.js → types/module.js} +0 -0
- /package/lib/pushNotifications/{providers/pinpoint/utils → utils}/getPushNotificationUserAgentString.d.ts +0 -0
- /package/lib-esm/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.d.ts +0 -0
- /package/lib-esm/pushNotifications/{providers/pinpoint/utils → utils}/getPushNotificationUserAgentString.d.ts +0 -0
- /package/src/pushNotifications/{providers/pinpoint/utils → utils}/getPushNotificationUserAgentString.ts +0 -0
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
exports.onMessageActionTaken = void 0;
|
|
6
|
+
const eventListeners_1 = require("../../../../eventListeners");
|
|
7
|
+
const utils_1 = require("../../../utils");
|
|
7
8
|
/**
|
|
8
9
|
* Registers a callback that will be invoked on `messageActionTaken` events.
|
|
9
10
|
*
|
|
@@ -20,7 +21,7 @@ var utils_1 = require("../../../utils");
|
|
|
20
21
|
* ```
|
|
21
22
|
*/
|
|
22
23
|
function onMessageActionTaken(input) {
|
|
23
|
-
utils_1.assertIsInitialized();
|
|
24
|
-
return eventListeners_1.addEventListener('messageActionTaken', input);
|
|
24
|
+
(0, utils_1.assertIsInitialized)();
|
|
25
|
+
return (0, eventListeners_1.addEventListener)('messageActionTaken', input);
|
|
25
26
|
}
|
|
26
27
|
exports.onMessageActionTaken = onMessageActionTaken;
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
exports.onMessageDismissed = void 0;
|
|
6
|
+
const eventListeners_1 = require("../../../../eventListeners");
|
|
7
|
+
const utils_1 = require("../../../utils");
|
|
7
8
|
/**
|
|
8
9
|
* Registers a callback that will be invoked on `messageDismissed` events.
|
|
9
10
|
*
|
|
@@ -20,7 +21,7 @@ var utils_1 = require("../../../utils");
|
|
|
20
21
|
* ```
|
|
21
22
|
*/
|
|
22
23
|
function onMessageDismissed(input) {
|
|
23
|
-
utils_1.assertIsInitialized();
|
|
24
|
-
return eventListeners_1.addEventListener('messageDismissed', input);
|
|
24
|
+
(0, utils_1.assertIsInitialized)();
|
|
25
|
+
return (0, eventListeners_1.addEventListener)('messageDismissed', input);
|
|
25
26
|
}
|
|
26
27
|
exports.onMessageDismissed = onMessageDismissed;
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
exports.onMessageDisplayed = void 0;
|
|
6
|
+
const eventListeners_1 = require("../../../../eventListeners");
|
|
7
|
+
const utils_1 = require("../../../utils");
|
|
7
8
|
/**
|
|
8
9
|
* Registers a callback that will be invoked on `messageDisplayed` events.
|
|
9
10
|
*
|
|
@@ -20,7 +21,7 @@ var utils_1 = require("../../../utils");
|
|
|
20
21
|
* ```
|
|
21
22
|
*/
|
|
22
23
|
function onMessageDisplayed(input) {
|
|
23
|
-
utils_1.assertIsInitialized();
|
|
24
|
-
return eventListeners_1.addEventListener('messageDisplayed', input);
|
|
24
|
+
(0, utils_1.assertIsInitialized)();
|
|
25
|
+
return (0, eventListeners_1.addEventListener)('messageDisplayed', input);
|
|
25
26
|
}
|
|
26
27
|
exports.onMessageDisplayed = onMessageDisplayed;
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
exports.onMessageReceived = void 0;
|
|
6
|
+
const eventListeners_1 = require("../../../../eventListeners");
|
|
7
|
+
const utils_1 = require("../../../utils");
|
|
7
8
|
/**
|
|
8
9
|
* Registers a callback that will be invoked on `messageReceived` events.
|
|
9
10
|
*
|
|
@@ -20,7 +21,7 @@ var utils_1 = require("../../../utils");
|
|
|
20
21
|
* ```
|
|
21
22
|
*/
|
|
22
23
|
function onMessageReceived(input) {
|
|
23
|
-
utils_1.assertIsInitialized();
|
|
24
|
-
return eventListeners_1.addEventListener('messageReceived', input);
|
|
24
|
+
(0, utils_1.assertIsInitialized)();
|
|
25
|
+
return (0, eventListeners_1.addEventListener)('messageReceived', input);
|
|
25
26
|
}
|
|
26
27
|
exports.onMessageReceived = onMessageReceived;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
|
|
5
|
+
exports.setConflictHandler = exports.conflictHandler = void 0;
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
6
7
|
exports.conflictHandler = defaultConflictHandler;
|
|
7
8
|
/**
|
|
8
9
|
* Set a conflict handler that will be used to resolve conflicts that may emerge
|
|
@@ -34,17 +35,16 @@ exports.conflictHandler = defaultConflictHandler;
|
|
|
34
35
|
* ```
|
|
35
36
|
*/
|
|
36
37
|
function setConflictHandler(input) {
|
|
37
|
-
utils_1.assertIsInitialized();
|
|
38
|
+
(0, utils_1.assertIsInitialized)();
|
|
38
39
|
exports.conflictHandler = input;
|
|
39
40
|
}
|
|
40
41
|
exports.setConflictHandler = setConflictHandler;
|
|
41
42
|
function defaultConflictHandler(messages) {
|
|
42
43
|
// default behavior is to return the message closest to expiry
|
|
43
44
|
// this function assumes that messages processed by providers already filters out expired messages
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
var endDateB = (_b = b.metadata) === null || _b === void 0 ? void 0 : _b.endDate;
|
|
45
|
+
const sorted = messages.sort((a, b) => {
|
|
46
|
+
const endDateA = a.metadata?.endDate;
|
|
47
|
+
const endDateB = b.metadata?.endDate;
|
|
48
48
|
// if both message end dates are falsy or have the same date string, treat them as equal
|
|
49
49
|
if (endDateA === endDateB) {
|
|
50
50
|
return 0;
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
exports.syncMessages = void 0;
|
|
6
|
+
const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
7
|
+
const pinpoint_1 = require("@aws-amplify/core/internals/providers/pinpoint");
|
|
8
|
+
const core_1 = require("@aws-amplify/core");
|
|
9
|
+
const utils_2 = require("../utils");
|
|
10
|
+
const pinpoint_2 = require("@aws-amplify/core/internals/aws-clients/pinpoint");
|
|
11
|
+
const errors_1 = require("../../../errors");
|
|
12
|
+
const utils_3 = require("../../../utils");
|
|
13
13
|
/**
|
|
14
14
|
* Fetch and persist messages from Pinpoint campaigns.
|
|
15
15
|
* Calling this API is necessary to trigger InApp messages on the device.
|
|
@@ -25,75 +25,45 @@ var utils_3 = require("../../../utils");
|
|
|
25
25
|
*
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
|
-
function syncMessages() {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
case 2:
|
|
43
|
-
_a.trys.push([2, 4, , 5]);
|
|
44
|
-
key = "" + utils_2.PINPOINT_KEY_PREFIX + utils_2.STORAGE_KEY_SUFFIX;
|
|
45
|
-
return [4 /*yield*/, core_1.defaultStorage.setItem(key, JSON.stringify(messages))];
|
|
46
|
-
case 3:
|
|
47
|
-
_a.sent();
|
|
48
|
-
return [3 /*break*/, 5];
|
|
49
|
-
case 4:
|
|
50
|
-
error_1 = _a.sent();
|
|
51
|
-
errors_1.assertServiceError(error_1);
|
|
52
|
-
throw error_1;
|
|
53
|
-
case 5: return [2 /*return*/];
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
});
|
|
28
|
+
async function syncMessages() {
|
|
29
|
+
(0, utils_3.assertIsInitialized)();
|
|
30
|
+
const messages = await fetchInAppMessages();
|
|
31
|
+
if (!messages || messages.length === 0) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
try {
|
|
35
|
+
const key = `${utils_2.PINPOINT_KEY_PREFIX}${utils_2.STORAGE_KEY_SUFFIX}`;
|
|
36
|
+
await core_1.defaultStorage.setItem(key, JSON.stringify(messages));
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
(0, errors_1.assertServiceError)(error);
|
|
40
|
+
throw error;
|
|
41
|
+
}
|
|
57
42
|
}
|
|
58
43
|
exports.syncMessages = syncMessages;
|
|
59
|
-
function fetchInAppMessages() {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return [4 /*yield*/, pinpoint_1.resolveEndpointId({
|
|
72
|
-
appId: appId,
|
|
73
|
-
category: utils_2.CATEGORY,
|
|
74
|
-
channelType: utils_2.CHANNEL_TYPE,
|
|
75
|
-
credentials: credentials,
|
|
76
|
-
identityId: identityId,
|
|
77
|
-
region: region,
|
|
78
|
-
userAgentValue: utils_2.getInAppMessagingUserAgentString(utils_1.InAppMessagingAction.SyncMessages),
|
|
79
|
-
})];
|
|
80
|
-
case 2:
|
|
81
|
-
endpointId = _d.sent();
|
|
82
|
-
input = {
|
|
83
|
-
ApplicationId: appId,
|
|
84
|
-
EndpointId: endpointId,
|
|
85
|
-
};
|
|
86
|
-
return [4 /*yield*/, pinpoint_2.getInAppMessages({ credentials: credentials, region: region }, input)];
|
|
87
|
-
case 3:
|
|
88
|
-
response = _d.sent();
|
|
89
|
-
messages = ((_a = response.InAppMessagesResponse) !== null && _a !== void 0 ? _a : {}).InAppMessageCampaigns;
|
|
90
|
-
return [2 /*return*/, messages];
|
|
91
|
-
case 4:
|
|
92
|
-
error_2 = _d.sent();
|
|
93
|
-
errors_1.assertServiceError(error_2);
|
|
94
|
-
throw error_2;
|
|
95
|
-
case 5: return [2 /*return*/];
|
|
96
|
-
}
|
|
44
|
+
async function fetchInAppMessages() {
|
|
45
|
+
try {
|
|
46
|
+
const { credentials, identityId } = await (0, utils_2.resolveCredentials)();
|
|
47
|
+
const { appId, region } = (0, utils_2.resolveConfig)();
|
|
48
|
+
const endpointId = await (0, pinpoint_1.resolveEndpointId)({
|
|
49
|
+
appId,
|
|
50
|
+
category: utils_2.CATEGORY,
|
|
51
|
+
channelType: utils_2.CHANNEL_TYPE,
|
|
52
|
+
credentials,
|
|
53
|
+
identityId,
|
|
54
|
+
region,
|
|
55
|
+
userAgentValue: (0, utils_2.getInAppMessagingUserAgentString)(utils_1.InAppMessagingAction.SyncMessages),
|
|
97
56
|
});
|
|
98
|
-
|
|
57
|
+
const input = {
|
|
58
|
+
ApplicationId: appId,
|
|
59
|
+
EndpointId: endpointId,
|
|
60
|
+
};
|
|
61
|
+
const response = await (0, pinpoint_2.getInAppMessages)({ credentials, region }, input);
|
|
62
|
+
const { InAppMessageCampaigns: messages } = response.InAppMessagesResponse ?? {};
|
|
63
|
+
return messages;
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
(0, errors_1.assertServiceError)(error);
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
99
69
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { identifyUser, syncMessages, dispatchEvent, setConflictHandler, initializeInAppMessaging, onMessageReceived, onMessageDisplayed, onMessageDismissed, onMessageActionTaken, notifyMessageInteraction, } from './apis';
|
|
1
|
+
export { identifyUser, syncMessages, dispatchEvent, setConflictHandler, initializeInAppMessaging, onMessageReceived, onMessageDisplayed, onMessageDismissed, onMessageActionTaken, notifyMessageInteraction, clearMessages, } from './apis';
|
|
2
2
|
export { IdentifyUserInput, DispatchEventInput, SetConflictHandlerInput, OnMessageActionTakenInput, OnMessageDismissedInput, OnMessageDisplayedInput, OnMessageReceivedInput, NotifyMessageInteractionInput, OnMessageReceivedOutput, OnMessageActionTakenOutput, OnMessageDismissedOutput, OnMessageDisplayedOutput, } from './types';
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.clearMessages = exports.notifyMessageInteraction = exports.onMessageActionTaken = exports.onMessageDismissed = exports.onMessageDisplayed = exports.onMessageReceived = exports.initializeInAppMessaging = exports.setConflictHandler = exports.dispatchEvent = exports.syncMessages = exports.identifyUser = void 0;
|
|
5
6
|
var apis_1 = require("./apis");
|
|
6
|
-
exports
|
|
7
|
-
exports
|
|
8
|
-
exports
|
|
9
|
-
exports
|
|
10
|
-
exports
|
|
11
|
-
exports
|
|
12
|
-
exports
|
|
13
|
-
exports
|
|
14
|
-
exports
|
|
15
|
-
exports
|
|
7
|
+
Object.defineProperty(exports, "identifyUser", { enumerable: true, get: function () { return apis_1.identifyUser; } });
|
|
8
|
+
Object.defineProperty(exports, "syncMessages", { enumerable: true, get: function () { return apis_1.syncMessages; } });
|
|
9
|
+
Object.defineProperty(exports, "dispatchEvent", { enumerable: true, get: function () { return apis_1.dispatchEvent; } });
|
|
10
|
+
Object.defineProperty(exports, "setConflictHandler", { enumerable: true, get: function () { return apis_1.setConflictHandler; } });
|
|
11
|
+
Object.defineProperty(exports, "initializeInAppMessaging", { enumerable: true, get: function () { return apis_1.initializeInAppMessaging; } });
|
|
12
|
+
Object.defineProperty(exports, "onMessageReceived", { enumerable: true, get: function () { return apis_1.onMessageReceived; } });
|
|
13
|
+
Object.defineProperty(exports, "onMessageDisplayed", { enumerable: true, get: function () { return apis_1.onMessageDisplayed; } });
|
|
14
|
+
Object.defineProperty(exports, "onMessageDismissed", { enumerable: true, get: function () { return apis_1.onMessageDismissed; } });
|
|
15
|
+
Object.defineProperty(exports, "onMessageActionTaken", { enumerable: true, get: function () { return apis_1.onMessageActionTaken; } });
|
|
16
|
+
Object.defineProperty(exports, "notifyMessageInteraction", { enumerable: true, get: function () { return apis_1.notifyMessageInteraction; } });
|
|
17
|
+
Object.defineProperty(exports, "clearMessages", { enumerable: true, get: function () { return apis_1.clearMessages; } });
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.PinpointMessageEvent = void 0;
|
|
5
6
|
var types_1 = require("./types");
|
|
6
|
-
exports
|
|
7
|
+
Object.defineProperty(exports, "PinpointMessageEvent", { enumerable: true, get: function () { return types_1.PinpointMessageEvent; } });
|
|
@@ -3,35 +3,35 @@ import { InAppMessage, InAppMessageInteractionEvent, InAppMessagingEvent, InAppM
|
|
|
3
3
|
/**
|
|
4
4
|
* Input type for Pinpoint identifyUser API.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type IdentifyUserInput = InAppMessagingIdentifyUserInput<IdentifyUserOptions>;
|
|
7
7
|
/**
|
|
8
8
|
* Input type for Pinpoint dispatchEvent API.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export type DispatchEventInput = InAppMessagingEvent;
|
|
11
11
|
/**
|
|
12
12
|
* Input type for Pinpoint SetConflictHandler API.
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export type SetConflictHandlerInput = InAppMessageConflictHandler;
|
|
15
15
|
/**
|
|
16
16
|
* Input type for OnMessageReceived API.
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
18
|
+
export type OnMessageReceivedInput = OnMessageInteractionEventHandler;
|
|
19
19
|
/**
|
|
20
20
|
* Input type for OnMessageDisplayed API.
|
|
21
21
|
*/
|
|
22
|
-
export
|
|
22
|
+
export type OnMessageDisplayedInput = OnMessageInteractionEventHandler;
|
|
23
23
|
/**
|
|
24
24
|
* Input type for OnMessageDismissed API.
|
|
25
25
|
*/
|
|
26
|
-
export
|
|
26
|
+
export type OnMessageDismissedInput = OnMessageInteractionEventHandler;
|
|
27
27
|
/**
|
|
28
28
|
* Input type for OnMessageActionTaken API.
|
|
29
29
|
*/
|
|
30
|
-
export
|
|
30
|
+
export type OnMessageActionTakenInput = OnMessageInteractionEventHandler;
|
|
31
31
|
/**
|
|
32
32
|
* Input type for NotifyMessageInteraction API.
|
|
33
33
|
*/
|
|
34
|
-
export
|
|
34
|
+
export type NotifyMessageInteractionInput = {
|
|
35
35
|
message: InAppMessage;
|
|
36
36
|
type: InAppMessageInteractionEvent;
|
|
37
37
|
};
|
|
@@ -2,16 +2,16 @@ import { EventListenerRemover } from '../../../../eventListeners';
|
|
|
2
2
|
/**
|
|
3
3
|
* Output type for OnMessageReceived API.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type OnMessageReceivedOutput = EventListenerRemover;
|
|
6
6
|
/**
|
|
7
7
|
* Output type for OnMessageDisplayed API.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type OnMessageDisplayedOutput = EventListenerRemover;
|
|
10
10
|
/**
|
|
11
11
|
* Output type for OnMessageDismissed API.
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export type OnMessageDismissedOutput = EventListenerRemover;
|
|
14
14
|
/**
|
|
15
15
|
* Output type for OnMessageActionTaken API.
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
17
|
+
export type OnMessageActionTakenOutput = EventListenerRemover;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { InAppMessage } from '../../../types';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type InAppMessageCountMap = Record<string, number>;
|
|
3
|
+
export type DailyInAppMessageCounter = {
|
|
4
4
|
count: number;
|
|
5
5
|
lastCountTimestamp: string;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type InAppMessageCounts = {
|
|
8
8
|
sessionCount: number;
|
|
9
9
|
dailyCount: number;
|
|
10
10
|
totalCount: number;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type MetricsComparator = (metricsVal: number, eventVal: number) => boolean;
|
|
13
13
|
export declare enum PinpointMessageEvent {
|
|
14
14
|
MESSAGE_DISPLAYED = "_inapp.message_displayed",
|
|
15
15
|
MESSAGE_DISMISSED = "_inapp.message_dismissed",
|
|
16
16
|
MESSAGE_ACTION_TAKEN = "_inapp.message_clicked"
|
|
17
17
|
}
|
|
18
|
-
export
|
|
19
|
-
export
|
|
18
|
+
export type InAppMessageConflictHandler = (messages: InAppMessage[]) => InAppMessage;
|
|
19
|
+
export type OnMessageInteractionEventHandler = (message: InAppMessage) => void;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.PinpointMessageEvent = void 0;
|
|
5
6
|
var PinpointMessageEvent;
|
|
6
7
|
(function (PinpointMessageEvent) {
|
|
7
8
|
PinpointMessageEvent["MESSAGE_DISPLAYED"] = "_inapp.message_displayed";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CHANNEL_TYPE = exports.CATEGORY = exports.STORAGE_KEY_SUFFIX = exports.PINPOINT_KEY_PREFIX = void 0;
|
|
3
4
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
5
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
6
|
exports.PINPOINT_KEY_PREFIX = 'Pinpoint';
|
|
@@ -5,13 +5,13 @@ import { MetricsComparator, PinpointMessageEvent } from '../types';
|
|
|
5
5
|
export declare const logger: ConsoleLogger;
|
|
6
6
|
export declare const recordAnalyticsEvent: (event: PinpointMessageEvent, message: InAppMessage) => void;
|
|
7
7
|
export declare const getStartOfDay: () => string;
|
|
8
|
-
export declare const matchesEventType: ({ CampaignId, Schedule }: PinpointInAppMessage, { name: eventType }: InAppMessagingEvent) =>
|
|
8
|
+
export declare const matchesEventType: ({ CampaignId, Schedule }: PinpointInAppMessage, { name: eventType }: InAppMessagingEvent) => boolean;
|
|
9
9
|
export declare const matchesAttributes: ({ CampaignId, Schedule }: PinpointInAppMessage, { attributes }: InAppMessagingEvent) => boolean;
|
|
10
10
|
export declare const matchesMetrics: ({ CampaignId, Schedule }: PinpointInAppMessage, { metrics }: InAppMessagingEvent) => boolean;
|
|
11
|
-
export declare const getComparator: (operator
|
|
11
|
+
export declare const getComparator: (operator?: string) => MetricsComparator | undefined;
|
|
12
12
|
export declare const isBeforeEndDate: ({ Schedule, }: PinpointInAppMessage) => boolean;
|
|
13
13
|
export declare const isQuietTime: (message: PinpointInAppMessage) => boolean;
|
|
14
14
|
export declare const clearMemo: () => void;
|
|
15
|
-
export declare const interpretLayout: (layout:
|
|
15
|
+
export declare const interpretLayout: (layout: NonNullable<PinpointInAppMessage['InAppMessage']>['Layout']) => InAppMessageLayout;
|
|
16
16
|
export declare const extractContent: ({ InAppMessage: message, }: PinpointInAppMessage) => InAppMessageContent[];
|
|
17
17
|
export declare const extractMetadata: ({ InAppMessage, Priority, Schedule, TreatmentId, }: PinpointInAppMessage) => any;
|