@aws-amplify/notifications 2.0.1-console-preview.d745d43.0 → 2.0.1-ssr-api.df60e41.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/lib/eventListeners/eventListeners.js +7 -4
- package/lib/eventListeners/index.js +4 -4
- package/lib/eventListeners/types.d.ts +2 -2
- package/lib/eventListeners/types.js +0 -1
- package/lib/inAppMessaging/errors/InAppMessagingError.js +1 -1
- package/lib/inAppMessaging/errors/assertServiceError.js +1 -1
- package/lib/inAppMessaging/errors/assertValidationError.js +1 -1
- package/lib/inAppMessaging/errors/index.js +6 -6
- package/lib/inAppMessaging/errors/validation.js +1 -1
- package/lib/inAppMessaging/index.d.ts +1 -1
- package/lib/inAppMessaging/index.js +12 -11
- 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 +10 -8
- package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +2 -1
- package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.js +8 -7
- package/lib/inAppMessaging/providers/pinpoint/apis/index.d.ts +1 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/index.js +13 -11
- package/lib/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +11 -11
- package/lib/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +3 -3
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js +3 -3
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js +3 -3
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js +3 -3
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js +3 -3
- package/lib/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +2 -2
- package/lib/inAppMessaging/providers/pinpoint/apis/syncMessages.js +9 -9
- package/lib/inAppMessaging/providers/pinpoint/index.d.ts +1 -1
- package/lib/inAppMessaging/providers/pinpoint/index.js +12 -11
- package/lib/inAppMessaging/providers/pinpoint/types/index.js +2 -2
- package/lib/inAppMessaging/providers/pinpoint/types/inputs.d.ts +8 -8
- package/lib/inAppMessaging/providers/pinpoint/types/inputs.js +0 -1
- package/lib/inAppMessaging/providers/pinpoint/types/options.d.ts +1 -1
- package/lib/inAppMessaging/providers/pinpoint/types/options.js +0 -1
- package/lib/inAppMessaging/providers/pinpoint/types/outputs.d.ts +4 -4
- package/lib/inAppMessaging/providers/pinpoint/types/outputs.js +0 -1
- package/lib/inAppMessaging/providers/pinpoint/types/types.d.ts +6 -6
- package/lib/inAppMessaging/providers/pinpoint/types/types.js +1 -1
- package/lib/inAppMessaging/providers/pinpoint/utils/constants.js +1 -1
- package/lib/inAppMessaging/providers/pinpoint/utils/helpers.d.ts +2 -2
- package/lib/inAppMessaging/providers/pinpoint/utils/helpers.js +38 -24
- package/lib/inAppMessaging/providers/pinpoint/utils/index.js +11 -11
- package/lib/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js +8 -8
- package/lib/inAppMessaging/providers/pinpoint/utils/resolveConfig.js +5 -4
- package/lib/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js +5 -4
- package/lib/inAppMessaging/providers/pinpoint/utils/userAgent.js +3 -3
- package/lib/inAppMessaging/types/event.d.ts +2 -2
- package/lib/inAppMessaging/types/event.js +0 -1
- package/lib/inAppMessaging/types/index.js +0 -1
- package/lib/inAppMessaging/types/inputs.d.ts +1 -1
- package/lib/inAppMessaging/types/inputs.js +0 -1
- package/lib/inAppMessaging/types/message.d.ts +3 -3
- package/lib/inAppMessaging/types/message.js +0 -1
- package/lib/inAppMessaging/types/options.d.ts +1 -1
- package/lib/inAppMessaging/types/options.js +0 -1
- package/lib/inAppMessaging/utils/index.js +4 -4
- package/lib/inAppMessaging/utils/statusHelpers.js +6 -4
- package/lib/index.js +0 -1
- package/lib/pushNotifications/errors/PushNotificationError.js +1 -1
- package/lib/pushNotifications/errors/errorHelpers.js +5 -4
- package/lib/pushNotifications/errors/index.js +4 -4
- package/lib/pushNotifications/index.js +13 -13
- package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.js +3 -2
- package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js +5 -4
- package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js +3 -2
- package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js +5 -4
- package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js +3 -2
- package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js +5 -4
- package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.js +3 -2
- package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.native.js +9 -8
- package/lib/pushNotifications/providers/pinpoint/apis/index.js +12 -12
- package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js +3 -2
- package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js +45 -36
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js +3 -2
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js +5 -4
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js +3 -2
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js +5 -4
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js +3 -2
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js +5 -4
- package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.js +3 -2
- package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js +5 -4
- package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.js +3 -2
- package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js +5 -4
- package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.js +3 -2
- package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js +5 -4
- package/lib/pushNotifications/providers/pinpoint/index.js +12 -12
- package/lib/pushNotifications/providers/pinpoint/types/analytics.d.ts +3 -3
- package/lib/pushNotifications/providers/pinpoint/types/analytics.js +0 -1
- package/lib/pushNotifications/providers/pinpoint/types/apis.d.ts +11 -11
- package/lib/pushNotifications/providers/pinpoint/types/apis.js +0 -1
- package/lib/pushNotifications/providers/pinpoint/types/index.js +0 -1
- package/lib/pushNotifications/providers/pinpoint/types/inputs.d.ts +7 -7
- package/lib/pushNotifications/providers/pinpoint/types/inputs.js +0 -1
- package/lib/pushNotifications/providers/pinpoint/types/options.d.ts +1 -1
- package/lib/pushNotifications/providers/pinpoint/types/options.js +0 -1
- package/lib/pushNotifications/providers/pinpoint/types/outputs.d.ts +8 -8
- package/lib/pushNotifications/providers/pinpoint/types/outputs.js +0 -1
- package/lib/pushNotifications/providers/pinpoint/types/pushNotifications.d.ts +1 -1
- package/lib/pushNotifications/providers/pinpoint/types/pushNotifications.js +0 -1
- package/lib/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.d.ts +3 -2
- package/lib/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js +10 -8
- package/lib/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.d.ts +3 -2
- package/lib/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js +3 -2
- package/lib/pushNotifications/providers/pinpoint/utils/getChannelType.d.ts +2 -1
- package/lib/pushNotifications/providers/pinpoint/utils/getChannelType.js +4 -3
- package/lib/pushNotifications/providers/pinpoint/utils/index.d.ts +2 -1
- package/lib/pushNotifications/providers/pinpoint/utils/index.js +7 -5
- package/lib/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.js +6 -5
- package/lib/pushNotifications/types/errors.js +1 -1
- package/lib/pushNotifications/types/index.js +19 -3
- package/lib/pushNotifications/types/inputs.d.ts +7 -7
- package/lib/pushNotifications/types/inputs.js +0 -1
- package/lib/pushNotifications/types/options.d.ts +1 -1
- package/lib/pushNotifications/types/options.js +0 -1
- package/lib/pushNotifications/types/outputs.d.ts +8 -8
- package/lib/pushNotifications/types/outputs.js +0 -1
- package/lib/pushNotifications/types/pushNotifications.d.ts +3 -3
- package/lib/pushNotifications/types/pushNotifications.js +0 -1
- package/lib/pushNotifications/{providers/pinpoint/utils → utils}/getPushNotificationUserAgentString.js +3 -2
- package/lib/pushNotifications/utils/index.d.ts +1 -1
- package/lib/pushNotifications/utils/index.js +8 -8
- package/lib/pushNotifications/utils/initializationManager.js +5 -3
- package/lib/pushNotifications/utils/resolveCredentials.js +5 -4
- package/lib/pushNotifications/utils/tokenManager.js +5 -3
- package/lib/tsconfig.tsbuildinfo +1 -7201
- package/lib-esm/eventListeners/eventListeners.js +0 -1
- package/lib-esm/eventListeners/index.js +0 -1
- package/lib-esm/eventListeners/types.d.ts +2 -2
- package/lib-esm/eventListeners/types.js +1 -1
- package/lib-esm/inAppMessaging/errors/InAppMessagingError.js +0 -1
- package/lib-esm/inAppMessaging/errors/assertServiceError.js +0 -1
- package/lib-esm/inAppMessaging/errors/assertValidationError.js +0 -1
- package/lib-esm/inAppMessaging/errors/index.js +0 -1
- package/lib-esm/inAppMessaging/errors/validation.js +0 -1
- package/lib-esm/inAppMessaging/index.d.ts +1 -1
- package/lib-esm/inAppMessaging/index.js +1 -2
- 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 +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +2 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.d.ts +1 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.js +1 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/syncMessages.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/index.d.ts +1 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/index.js +1 -2
- package/lib-esm/inAppMessaging/providers/pinpoint/types/index.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/inputs.d.ts +8 -8
- package/lib-esm/inAppMessaging/providers/pinpoint/types/inputs.js +1 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/options.d.ts +1 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/options.js +1 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.d.ts +4 -4
- package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.js +1 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/types.d.ts +6 -6
- package/lib-esm/inAppMessaging/providers/pinpoint/types/types.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/constants.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.d.ts +2 -2
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/index.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveConfig.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/userAgent.js +0 -1
- package/lib-esm/inAppMessaging/types/event.d.ts +2 -2
- package/lib-esm/inAppMessaging/types/event.js +1 -1
- package/lib-esm/inAppMessaging/types/index.js +1 -1
- package/lib-esm/inAppMessaging/types/inputs.d.ts +1 -1
- package/lib-esm/inAppMessaging/types/inputs.js +1 -1
- package/lib-esm/inAppMessaging/types/message.d.ts +3 -3
- package/lib-esm/inAppMessaging/types/message.js +1 -1
- package/lib-esm/inAppMessaging/types/options.d.ts +1 -1
- package/lib-esm/inAppMessaging/types/options.js +1 -1
- package/lib-esm/inAppMessaging/utils/index.js +0 -1
- package/lib-esm/inAppMessaging/utils/statusHelpers.js +0 -1
- package/lib-esm/index.js +0 -1
- package/lib-esm/pushNotifications/errors/PushNotificationError.js +0 -1
- package/lib-esm/pushNotifications/errors/errorHelpers.js +0 -1
- package/lib-esm/pushNotifications/errors/index.js +0 -1
- package/lib-esm/pushNotifications/index.js +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.js +1 -2
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js +1 -2
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js +1 -2
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js +1 -2
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js +1 -2
- package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.js +1 -2
- package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.js +2 -3
- package/lib-esm/pushNotifications/providers/pinpoint/apis/index.js +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js +30 -23
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.js +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.js +1 -2
- package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js +1 -2
- package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.js +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/index.js +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/analytics.d.ts +3 -3
- package/lib-esm/pushNotifications/providers/pinpoint/types/analytics.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/apis.d.ts +11 -11
- package/lib-esm/pushNotifications/providers/pinpoint/types/apis.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/index.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/inputs.d.ts +7 -7
- package/lib-esm/pushNotifications/providers/pinpoint/types/inputs.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/options.d.ts +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/options.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/outputs.d.ts +8 -8
- package/lib-esm/pushNotifications/providers/pinpoint/types/outputs.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/pushNotifications.d.ts +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/pushNotifications.js +1 -1
- package/lib-esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.d.ts +3 -2
- package/lib-esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js +2 -2
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.d.ts +3 -2
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getChannelType.d.ts +2 -1
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getChannelType.js +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/utils/index.d.ts +2 -1
- package/lib-esm/pushNotifications/providers/pinpoint/utils/index.js +2 -2
- package/lib-esm/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.js +1 -2
- package/lib-esm/pushNotifications/types/errors.js +0 -1
- package/lib-esm/pushNotifications/types/index.js +4 -1
- package/lib-esm/pushNotifications/types/inputs.d.ts +7 -7
- package/lib-esm/pushNotifications/types/inputs.js +1 -1
- package/lib-esm/pushNotifications/types/options.d.ts +1 -1
- package/lib-esm/pushNotifications/types/options.js +1 -1
- package/lib-esm/pushNotifications/types/outputs.d.ts +8 -8
- package/lib-esm/pushNotifications/types/outputs.js +1 -1
- package/lib-esm/pushNotifications/types/pushNotifications.d.ts +3 -3
- package/lib-esm/pushNotifications/types/pushNotifications.js +1 -1
- package/lib-esm/pushNotifications/{providers/pinpoint/utils → utils}/getPushNotificationUserAgentString.js +0 -1
- package/lib-esm/pushNotifications/utils/index.d.ts +1 -1
- package/lib-esm/pushNotifications/utils/index.js +1 -2
- package/lib-esm/pushNotifications/utils/initializationManager.js +0 -1
- package/lib-esm/pushNotifications/utils/resolveCredentials.js +0 -1
- package/lib-esm/pushNotifications/utils/tokenManager.js +0 -1
- package/lib-esm/tsconfig.tsbuildinfo +1 -7201
- package/package.json +51 -14
- package/src/inAppMessaging/index.ts +1 -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/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 +50 -40
- 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/utils/createMessageEventRecorder.ts +5 -4
- package/src/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.ts +3 -3
- package/src/pushNotifications/providers/pinpoint/utils/index.ts +2 -1
- package/src/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.ts +1 -1
- package/src/pushNotifications/types/pushNotifications.ts +1 -1
- package/src/pushNotifications/utils/index.ts +1 -1
- package/lib/eventListeners/eventListeners.js.map +0 -1
- package/lib/eventListeners/index.js.map +0 -1
- package/lib/eventListeners/types.js.map +0 -1
- package/lib/inAppMessaging/errors/InAppMessagingError.js.map +0 -1
- package/lib/inAppMessaging/errors/assertServiceError.js.map +0 -1
- package/lib/inAppMessaging/errors/assertValidationError.js.map +0 -1
- package/lib/inAppMessaging/errors/index.js.map +0 -1
- package/lib/inAppMessaging/errors/validation.js.map +0 -1
- package/lib/inAppMessaging/index.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/apis/index.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/apis/syncMessages.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/index.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/types/index.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/types/inputs.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/types/options.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/types/outputs.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/types/types.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/utils/constants.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/utils/helpers.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/utils/index.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/utils/resolveConfig.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js.map +0 -1
- package/lib/inAppMessaging/providers/pinpoint/utils/userAgent.js.map +0 -1
- package/lib/inAppMessaging/types/event.js.map +0 -1
- package/lib/inAppMessaging/types/index.js.map +0 -1
- package/lib/inAppMessaging/types/inputs.js.map +0 -1
- package/lib/inAppMessaging/types/message.js.map +0 -1
- package/lib/inAppMessaging/types/options.js.map +0 -1
- package/lib/inAppMessaging/utils/index.js.map +0 -1
- package/lib/inAppMessaging/utils/statusHelpers.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/pushNotifications/errors/PushNotificationError.js.map +0 -1
- package/lib/pushNotifications/errors/errorHelpers.js.map +0 -1
- package/lib/pushNotifications/errors/index.js.map +0 -1
- package/lib/pushNotifications/index.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.native.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/index.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/index.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/types/analytics.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/types/apis.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/types/index.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/types/inputs.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/types/options.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/types/outputs.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/types/pushNotifications.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/utils/getChannelType.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/utils/getPushNotificationUserAgentString.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/utils/index.js.map +0 -1
- package/lib/pushNotifications/types/errors.js.map +0 -1
- package/lib/pushNotifications/types/index.js.map +0 -1
- package/lib/pushNotifications/types/inputs.js.map +0 -1
- package/lib/pushNotifications/types/options.js.map +0 -1
- package/lib/pushNotifications/types/outputs.js.map +0 -1
- package/lib/pushNotifications/types/pushNotifications.js.map +0 -1
- package/lib/pushNotifications/utils/index.js.map +0 -1
- package/lib/pushNotifications/utils/initializationManager.js.map +0 -1
- package/lib/pushNotifications/utils/resolveConfig.js.map +0 -1
- package/lib/pushNotifications/utils/resolveCredentials.js.map +0 -1
- package/lib/pushNotifications/utils/tokenManager.js.map +0 -1
- package/lib-esm/eventListeners/eventListeners.js.map +0 -1
- package/lib-esm/eventListeners/index.js.map +0 -1
- package/lib-esm/eventListeners/types.js.map +0 -1
- package/lib-esm/inAppMessaging/errors/InAppMessagingError.js.map +0 -1
- package/lib-esm/inAppMessaging/errors/assertServiceError.js.map +0 -1
- package/lib-esm/inAppMessaging/errors/assertValidationError.js.map +0 -1
- package/lib-esm/inAppMessaging/errors/index.js.map +0 -1
- package/lib-esm/inAppMessaging/errors/validation.js.map +0 -1
- package/lib-esm/inAppMessaging/index.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/syncMessages.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/index.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/index.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/inputs.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/options.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/types.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/constants.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/index.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveConfig.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js.map +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/userAgent.js.map +0 -1
- package/lib-esm/inAppMessaging/types/event.js.map +0 -1
- package/lib-esm/inAppMessaging/types/index.js.map +0 -1
- package/lib-esm/inAppMessaging/types/inputs.js.map +0 -1
- package/lib-esm/inAppMessaging/types/message.js.map +0 -1
- package/lib-esm/inAppMessaging/types/options.js.map +0 -1
- package/lib-esm/inAppMessaging/utils/index.js.map +0 -1
- package/lib-esm/inAppMessaging/utils/statusHelpers.js.map +0 -1
- package/lib-esm/index.js.map +0 -1
- package/lib-esm/pushNotifications/errors/PushNotificationError.js.map +0 -1
- package/lib-esm/pushNotifications/errors/errorHelpers.js.map +0 -1
- package/lib-esm/pushNotifications/errors/index.js.map +0 -1
- package/lib-esm/pushNotifications/index.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/index.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/index.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/analytics.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/apis.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/index.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/inputs.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/options.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/outputs.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/pushNotifications.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getChannelType.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getPushNotificationUserAgentString.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/utils/index.js.map +0 -1
- package/lib-esm/pushNotifications/types/errors.js.map +0 -1
- package/lib-esm/pushNotifications/types/index.js.map +0 -1
- package/lib-esm/pushNotifications/types/inputs.js.map +0 -1
- package/lib-esm/pushNotifications/types/options.js.map +0 -1
- package/lib-esm/pushNotifications/types/outputs.js.map +0 -1
- package/lib-esm/pushNotifications/types/pushNotifications.js.map +0 -1
- package/lib-esm/pushNotifications/utils/index.js.map +0 -1
- package/lib-esm/pushNotifications/utils/initializationManager.js.map +0 -1
- package/lib-esm/pushNotifications/utils/resolveConfig.js.map +0 -1
- package/lib-esm/pushNotifications/utils/resolveCredentials.js.map +0 -1
- package/lib-esm/pushNotifications/utils/tokenManager.js.map +0 -1
- /package/lib/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.d.ts +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,15 +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
|
|
16
|
-
|
|
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,6 +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
|
-
//# sourceMappingURL=index.js.map
|
|
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,10 +2,10 @@
|
|
|
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";
|
|
8
9
|
PinpointMessageEvent["MESSAGE_DISMISSED"] = "_inapp.message_dismissed";
|
|
9
10
|
PinpointMessageEvent["MESSAGE_ACTION_TAKEN"] = "_inapp.message_clicked";
|
|
10
11
|
})(PinpointMessageEvent = exports.PinpointMessageEvent || (exports.PinpointMessageEvent = {}));
|
|
11
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
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';
|
|
6
7
|
exports.STORAGE_KEY_SUFFIX = '_inAppMessages';
|
|
7
8
|
exports.CATEGORY = 'InAppMessaging';
|
|
8
9
|
exports.CHANNEL_TYPE = 'IN_APP';
|
|
9
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -8,10 +8,10 @@ export declare const getStartOfDay: () => string;
|
|
|
8
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?: string
|
|
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;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
6
|
+
};
|
|
4
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
|
|
8
|
+
exports.extractMetadata = exports.extractContent = exports.interpretLayout = exports.clearMemo = exports.isQuietTime = exports.isBeforeEndDate = exports.getComparator = exports.matchesMetrics = exports.matchesAttributes = exports.matchesEventType = exports.getStartOfDay = exports.recordAnalyticsEvent = exports.logger = void 0;
|
|
6
9
|
const core_1 = require("@aws-amplify/core");
|
|
7
10
|
const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
8
|
-
const isEmpty_1 =
|
|
11
|
+
const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
|
|
9
12
|
const pinpoint_1 = require("@aws-amplify/core/internals/providers/pinpoint");
|
|
10
13
|
const resolveConfig_1 = require("./resolveConfig");
|
|
11
14
|
const resolveCredentials_1 = require("./resolveCredentials");
|
|
@@ -16,12 +19,12 @@ let eventNameMemo = {};
|
|
|
16
19
|
let eventAttributesMemo = {};
|
|
17
20
|
let eventMetricsMemo = {};
|
|
18
21
|
exports.logger = new core_1.ConsoleLogger('InAppMessaging.Pinpoint.Utils');
|
|
19
|
-
|
|
20
|
-
const { appId, region } = resolveConfig_1.resolveConfig();
|
|
22
|
+
const recordAnalyticsEvent = (event, message) => {
|
|
23
|
+
const { appId, region } = (0, resolveConfig_1.resolveConfig)();
|
|
21
24
|
const { id, metadata } = message;
|
|
22
|
-
resolveCredentials_1.resolveCredentials()
|
|
25
|
+
(0, resolveCredentials_1.resolveCredentials)()
|
|
23
26
|
.then(({ credentials, identityId }) => {
|
|
24
|
-
pinpoint_1.record({
|
|
27
|
+
(0, pinpoint_1.record)({
|
|
25
28
|
appId,
|
|
26
29
|
category: constants_1.CATEGORY,
|
|
27
30
|
credentials,
|
|
@@ -36,7 +39,7 @@ exports.recordAnalyticsEvent = (event, message) => {
|
|
|
36
39
|
},
|
|
37
40
|
identityId,
|
|
38
41
|
region,
|
|
39
|
-
userAgentValue: userAgent_1.getInAppMessagingUserAgentString(utils_1.InAppMessagingAction.NotifyMessageInteraction),
|
|
42
|
+
userAgentValue: (0, userAgent_1.getInAppMessagingUserAgentString)(utils_1.InAppMessagingAction.NotifyMessageInteraction),
|
|
40
43
|
});
|
|
41
44
|
})
|
|
42
45
|
.catch(e => {
|
|
@@ -44,12 +47,14 @@ exports.recordAnalyticsEvent = (event, message) => {
|
|
|
44
47
|
exports.logger.warn('Failed to record event.', e);
|
|
45
48
|
});
|
|
46
49
|
};
|
|
47
|
-
exports.
|
|
50
|
+
exports.recordAnalyticsEvent = recordAnalyticsEvent;
|
|
51
|
+
const getStartOfDay = () => {
|
|
48
52
|
const now = new Date();
|
|
49
53
|
now.setHours(0, 0, 0, 0);
|
|
50
54
|
return now.toISOString();
|
|
51
55
|
};
|
|
52
|
-
exports.
|
|
56
|
+
exports.getStartOfDay = getStartOfDay;
|
|
57
|
+
const matchesEventType = ({ CampaignId, Schedule }, { name: eventType }) => {
|
|
53
58
|
const { EventType } = Schedule?.EventFilter?.Dimensions ?? {};
|
|
54
59
|
const memoKey = `${CampaignId}:${eventType}`;
|
|
55
60
|
if (!eventNameMemo.hasOwnProperty(memoKey)) {
|
|
@@ -57,13 +62,14 @@ exports.matchesEventType = ({ CampaignId, Schedule }, { name: eventType }) => {
|
|
|
57
62
|
}
|
|
58
63
|
return eventNameMemo[memoKey];
|
|
59
64
|
};
|
|
60
|
-
exports.
|
|
65
|
+
exports.matchesEventType = matchesEventType;
|
|
66
|
+
const matchesAttributes = ({ CampaignId, Schedule }, { attributes = {} }) => {
|
|
61
67
|
const { Attributes } = Schedule?.EventFilter?.Dimensions ?? {};
|
|
62
|
-
if (isEmpty_1.default(Attributes)) {
|
|
68
|
+
if ((0, isEmpty_1.default)(Attributes)) {
|
|
63
69
|
// if message does not have attributes defined it does not matter what attributes are on the event
|
|
64
70
|
return true;
|
|
65
71
|
}
|
|
66
|
-
if (isEmpty_1.default(attributes)) {
|
|
72
|
+
if ((0, isEmpty_1.default)(attributes)) {
|
|
67
73
|
// if message does have attributes but the event does not then it always fails the check
|
|
68
74
|
return false;
|
|
69
75
|
}
|
|
@@ -75,13 +81,14 @@ exports.matchesAttributes = ({ CampaignId, Schedule }, { attributes = {} }) => {
|
|
|
75
81
|
}
|
|
76
82
|
return eventAttributesMemo[memoKey];
|
|
77
83
|
};
|
|
78
|
-
exports.
|
|
84
|
+
exports.matchesAttributes = matchesAttributes;
|
|
85
|
+
const matchesMetrics = ({ CampaignId, Schedule }, { metrics = {} }) => {
|
|
79
86
|
const { Metrics } = Schedule?.EventFilter?.Dimensions ?? {};
|
|
80
|
-
if (isEmpty_1.default(Metrics)) {
|
|
87
|
+
if ((0, isEmpty_1.default)(Metrics)) {
|
|
81
88
|
// if message does not have metrics defined it does not matter what metrics are on the event
|
|
82
89
|
return true;
|
|
83
90
|
}
|
|
84
|
-
if (isEmpty_1.default(metrics)) {
|
|
91
|
+
if ((0, isEmpty_1.default)(metrics)) {
|
|
85
92
|
// if message does have metrics but the event does not then it always fails the check
|
|
86
93
|
return false;
|
|
87
94
|
}
|
|
@@ -90,14 +97,15 @@ exports.matchesMetrics = ({ CampaignId, Schedule }, { metrics = {} }) => {
|
|
|
90
97
|
eventMetricsMemo[memoKey] =
|
|
91
98
|
!Metrics ||
|
|
92
99
|
Object.entries(Metrics).every(([key, { ComparisonOperator, Value }]) => {
|
|
93
|
-
const compare = exports.getComparator(ComparisonOperator);
|
|
100
|
+
const compare = (0, exports.getComparator)(ComparisonOperator);
|
|
94
101
|
// if there is some unknown comparison operator, treat as a comparison failure
|
|
95
102
|
return compare && !!Value ? compare(Value, metrics[key]) : false;
|
|
96
103
|
});
|
|
97
104
|
}
|
|
98
105
|
return eventMetricsMemo[memoKey];
|
|
99
106
|
};
|
|
100
|
-
exports.
|
|
107
|
+
exports.matchesMetrics = matchesMetrics;
|
|
108
|
+
const getComparator = (operator) => {
|
|
101
109
|
switch (operator) {
|
|
102
110
|
case 'EQUAL':
|
|
103
111
|
return (metricsVal, eventVal) => metricsVal === eventVal;
|
|
@@ -113,13 +121,15 @@ exports.getComparator = (operator) => {
|
|
|
113
121
|
return undefined;
|
|
114
122
|
}
|
|
115
123
|
};
|
|
116
|
-
exports.
|
|
124
|
+
exports.getComparator = getComparator;
|
|
125
|
+
const isBeforeEndDate = ({ Schedule, }) => {
|
|
117
126
|
if (!Schedule?.EndDate) {
|
|
118
127
|
return true;
|
|
119
128
|
}
|
|
120
129
|
return new Date() < new Date(Schedule.EndDate);
|
|
121
130
|
};
|
|
122
|
-
exports.
|
|
131
|
+
exports.isBeforeEndDate = isBeforeEndDate;
|
|
132
|
+
const isQuietTime = (message) => {
|
|
123
133
|
const { Schedule } = message;
|
|
124
134
|
if (!Schedule?.QuietTime) {
|
|
125
135
|
return false;
|
|
@@ -150,11 +160,13 @@ exports.isQuietTime = (message) => {
|
|
|
150
160
|
}
|
|
151
161
|
return isQuietTime;
|
|
152
162
|
};
|
|
153
|
-
exports.
|
|
163
|
+
exports.isQuietTime = isQuietTime;
|
|
164
|
+
const clearMemo = () => {
|
|
154
165
|
eventNameMemo = {};
|
|
155
166
|
eventAttributesMemo = {};
|
|
156
167
|
eventMetricsMemo = {};
|
|
157
168
|
};
|
|
169
|
+
exports.clearMemo = clearMemo;
|
|
158
170
|
// in the pinpoint console when a message is created with a Modal or Full Screen layout,
|
|
159
171
|
// it is assigned a layout value of MOBILE_FEED or OVERLAYS respectively in the message payload.
|
|
160
172
|
// In the future, Pinpoint will be updating the layout values in the aforementioned scenario
|
|
@@ -164,7 +176,7 @@ exports.clearMemo = () => {
|
|
|
164
176
|
// - 1. the usage of MOBILE_FEED and OVERLAYS as values for message layouts are not leaked
|
|
165
177
|
// outside the Pinpoint provider
|
|
166
178
|
// - 2. Amplify correctly handles the legacy layout values from Pinpoint after they are updated
|
|
167
|
-
|
|
179
|
+
const interpretLayout = (layout) => {
|
|
168
180
|
if (layout === 'MOBILE_FEED') {
|
|
169
181
|
return 'MODAL';
|
|
170
182
|
}
|
|
@@ -174,7 +186,8 @@ exports.interpretLayout = (layout) => {
|
|
|
174
186
|
// cast as PinpointInAppMessage['InAppMessage']['Layout'] allows `string` as a value
|
|
175
187
|
return layout;
|
|
176
188
|
};
|
|
177
|
-
exports.
|
|
189
|
+
exports.interpretLayout = interpretLayout;
|
|
190
|
+
const extractContent = ({ InAppMessage: message, }) => {
|
|
178
191
|
return (message?.Content?.map(content => {
|
|
179
192
|
const { BackgroundColor, BodyConfig, HeaderConfig, ImageUrl, PrimaryBtn, SecondaryBtn, } = content;
|
|
180
193
|
const defaultPrimaryButton = PrimaryBtn?.DefaultConfig;
|
|
@@ -241,10 +254,11 @@ exports.extractContent = ({ InAppMessage: message, }) => {
|
|
|
241
254
|
return extractedContent;
|
|
242
255
|
}) ?? []);
|
|
243
256
|
};
|
|
244
|
-
exports.
|
|
257
|
+
exports.extractContent = extractContent;
|
|
258
|
+
const extractMetadata = ({ InAppMessage, Priority, Schedule, TreatmentId, }) => ({
|
|
245
259
|
customData: InAppMessage?.CustomConfig,
|
|
246
260
|
endDate: Schedule?.EndDate,
|
|
247
261
|
priority: Priority,
|
|
248
262
|
treatmentId: TreatmentId,
|
|
249
263
|
});
|
|
250
|
-
|
|
264
|
+
exports.extractMetadata = extractMetadata;
|
|
@@ -2,19 +2,19 @@
|
|
|
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.incrementMessageCounts = exports.sessionStateChangeHandler = exports.processInAppMessages = exports.STORAGE_KEY_SUFFIX = exports.CHANNEL_TYPE = exports.CATEGORY = exports.PINPOINT_KEY_PREFIX = exports.getInAppMessagingUserAgentString = exports.resolveCredentials = exports.resolveConfig = void 0;
|
|
5
6
|
var resolveConfig_1 = require("./resolveConfig");
|
|
6
|
-
exports
|
|
7
|
+
Object.defineProperty(exports, "resolveConfig", { enumerable: true, get: function () { return resolveConfig_1.resolveConfig; } });
|
|
7
8
|
var resolveCredentials_1 = require("./resolveCredentials");
|
|
8
|
-
exports
|
|
9
|
+
Object.defineProperty(exports, "resolveCredentials", { enumerable: true, get: function () { return resolveCredentials_1.resolveCredentials; } });
|
|
9
10
|
var userAgent_1 = require("./userAgent");
|
|
10
|
-
exports
|
|
11
|
+
Object.defineProperty(exports, "getInAppMessagingUserAgentString", { enumerable: true, get: function () { return userAgent_1.getInAppMessagingUserAgentString; } });
|
|
11
12
|
var constants_1 = require("./constants");
|
|
12
|
-
exports
|
|
13
|
-
exports
|
|
14
|
-
exports
|
|
15
|
-
exports
|
|
13
|
+
Object.defineProperty(exports, "PINPOINT_KEY_PREFIX", { enumerable: true, get: function () { return constants_1.PINPOINT_KEY_PREFIX; } });
|
|
14
|
+
Object.defineProperty(exports, "CATEGORY", { enumerable: true, get: function () { return constants_1.CATEGORY; } });
|
|
15
|
+
Object.defineProperty(exports, "CHANNEL_TYPE", { enumerable: true, get: function () { return constants_1.CHANNEL_TYPE; } });
|
|
16
|
+
Object.defineProperty(exports, "STORAGE_KEY_SUFFIX", { enumerable: true, get: function () { return constants_1.STORAGE_KEY_SUFFIX; } });
|
|
16
17
|
var messageProcessingHelpers_1 = require("./messageProcessingHelpers");
|
|
17
|
-
exports
|
|
18
|
-
exports
|
|
19
|
-
exports
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
18
|
+
Object.defineProperty(exports, "processInAppMessages", { enumerable: true, get: function () { return messageProcessingHelpers_1.processInAppMessages; } });
|
|
19
|
+
Object.defineProperty(exports, "sessionStateChangeHandler", { enumerable: true, get: function () { return messageProcessingHelpers_1.sessionStateChangeHandler; } });
|
|
20
|
+
Object.defineProperty(exports, "incrementMessageCounts", { enumerable: true, get: function () { return messageProcessingHelpers_1.incrementMessageCounts; } });
|
|
@@ -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.incrementMessageCounts = exports.sessionStateChangeHandler = exports.processInAppMessages = void 0;
|
|
5
6
|
const helpers_1 = require("./helpers");
|
|
6
7
|
const core_1 = require("@aws-amplify/core");
|
|
7
8
|
const MESSAGE_DAILY_COUNT_KEY = 'pinpointProvider_inAppMessages_dailyCount';
|
|
@@ -13,10 +14,10 @@ async function processInAppMessages(messages, event) {
|
|
|
13
14
|
let acc = [];
|
|
14
15
|
for (let index = 0; index < messages.length; index++) {
|
|
15
16
|
const message = messages[index];
|
|
16
|
-
const messageQualifies = helpers_1.matchesEventType(message, event) &&
|
|
17
|
-
helpers_1.matchesAttributes(message, event) &&
|
|
18
|
-
helpers_1.matchesMetrics(message, event) &&
|
|
19
|
-
helpers_1.isBeforeEndDate(message) &&
|
|
17
|
+
const messageQualifies = (0, helpers_1.matchesEventType)(message, event) &&
|
|
18
|
+
(0, helpers_1.matchesAttributes)(message, event) &&
|
|
19
|
+
(0, helpers_1.matchesMetrics)(message, event) &&
|
|
20
|
+
(0, helpers_1.isBeforeEndDate)(message) &&
|
|
20
21
|
(await isBelowCap(message));
|
|
21
22
|
// filter all qualifying messages returning only those that are of (relative) highest priority
|
|
22
23
|
if (messageQualifies) {
|
|
@@ -69,12 +70,12 @@ function normalizeMessages(messages) {
|
|
|
69
70
|
return {
|
|
70
71
|
// Default to empty string in rare cases we don't have a campaignId
|
|
71
72
|
id: CampaignId ?? '',
|
|
72
|
-
content: helpers_1.extractContent(message),
|
|
73
|
+
content: (0, helpers_1.extractContent)(message),
|
|
73
74
|
// Default to TOP_BANNER layout in rare cases we don't have a Layout
|
|
74
75
|
layout: InAppMessage?.Layout
|
|
75
|
-
? helpers_1.interpretLayout(InAppMessage.Layout)
|
|
76
|
+
? (0, helpers_1.interpretLayout)(InAppMessage.Layout)
|
|
76
77
|
: 'TOP_BANNER',
|
|
77
|
-
metadata: helpers_1.extractMetadata(message),
|
|
78
|
+
metadata: (0, helpers_1.extractMetadata)(message),
|
|
78
79
|
};
|
|
79
80
|
});
|
|
80
81
|
}
|
|
@@ -166,4 +167,3 @@ const getStartOfDay = () => {
|
|
|
166
167
|
now.setHours(0, 0, 0, 0);
|
|
167
168
|
return now.toISOString();
|
|
168
169
|
};
|
|
169
|
-
//# sourceMappingURL=messageProcessingHelpers.js.map
|
|
@@ -2,15 +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.resolveConfig = void 0;
|
|
5
6
|
const core_1 = require("@aws-amplify/core");
|
|
6
7
|
const errors_1 = require("../../../errors");
|
|
7
8
|
/**
|
|
8
9
|
* @internal
|
|
9
10
|
*/
|
|
10
|
-
|
|
11
|
+
const resolveConfig = () => {
|
|
11
12
|
const { appId, region } = core_1.Amplify.getConfig().Notifications?.InAppMessaging?.Pinpoint ?? {};
|
|
12
|
-
errors_1.assertValidationError(!!appId, errors_1.InAppMessagingValidationErrorCode.NoAppId);
|
|
13
|
-
errors_1.assertValidationError(!!region, errors_1.InAppMessagingValidationErrorCode.NoRegion);
|
|
13
|
+
(0, errors_1.assertValidationError)(!!appId, errors_1.InAppMessagingValidationErrorCode.NoAppId);
|
|
14
|
+
(0, errors_1.assertValidationError)(!!region, errors_1.InAppMessagingValidationErrorCode.NoRegion);
|
|
14
15
|
return { appId, region };
|
|
15
16
|
};
|
|
16
|
-
|
|
17
|
+
exports.resolveConfig = resolveConfig;
|
|
@@ -2,14 +2,15 @@
|
|
|
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.resolveCredentials = void 0;
|
|
5
6
|
const core_1 = require("@aws-amplify/core");
|
|
6
7
|
const errors_1 = require("../../../errors");
|
|
7
8
|
/**
|
|
8
9
|
* @internal
|
|
9
10
|
*/
|
|
10
|
-
|
|
11
|
-
const { credentials, identityId } = await core_1.fetchAuthSession();
|
|
12
|
-
errors_1.assertValidationError(!!credentials, errors_1.InAppMessagingValidationErrorCode.NoCredentials);
|
|
11
|
+
const resolveCredentials = async () => {
|
|
12
|
+
const { credentials, identityId } = await (0, core_1.fetchAuthSession)();
|
|
13
|
+
(0, errors_1.assertValidationError)(!!credentials, errors_1.InAppMessagingValidationErrorCode.NoCredentials);
|
|
13
14
|
return { credentials, identityId };
|
|
14
15
|
};
|
|
15
|
-
|
|
16
|
+
exports.resolveCredentials = resolveCredentials;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getInAppMessagingUserAgentString = exports.getInAppMessagingUserAgent = void 0;
|
|
3
4
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
5
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
6
|
const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
6
7
|
function getInAppMessagingUserAgent(action) {
|
|
7
|
-
return utils_1.getAmplifyUserAgentObject({
|
|
8
|
+
return (0, utils_1.getAmplifyUserAgentObject)({
|
|
8
9
|
category: utils_1.Category.InAppMessaging,
|
|
9
10
|
action,
|
|
10
11
|
});
|
|
11
12
|
}
|
|
12
13
|
exports.getInAppMessagingUserAgent = getInAppMessagingUserAgent;
|
|
13
14
|
function getInAppMessagingUserAgentString(action) {
|
|
14
|
-
return utils_1.getAmplifyUserAgent({
|
|
15
|
+
return (0, utils_1.getAmplifyUserAgent)({
|
|
15
16
|
category: utils_1.Category.InAppMessaging,
|
|
16
17
|
action,
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
20
|
exports.getInAppMessagingUserAgentString = getInAppMessagingUserAgentString;
|
|
20
|
-
//# sourceMappingURL=userAgent.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type InAppMessageInteractionEvent = 'messageReceived' | 'messageDisplayed' | 'messageDismissed' | 'messageActionTaken';
|
|
2
|
+
export type InAppMessagingEvent = {
|
|
3
3
|
name: string;
|
|
4
4
|
attributes?: Record<string, string>;
|
|
5
5
|
metrics?: Record<string, number>;
|
|
@@ -3,7 +3,7 @@ import { InAppMessagingServiceOptions } from '.';
|
|
|
3
3
|
/**
|
|
4
4
|
* Input type for `identifyUser`.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type InAppMessagingIdentifyUserInput<ServiceOptions extends InAppMessagingServiceOptions = InAppMessagingServiceOptions> = {
|
|
7
7
|
/**
|
|
8
8
|
* A User ID associated to the current device.
|
|
9
9
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export type InAppMessageLayout = 'BOTTOM_BANNER' | 'CAROUSEL' | 'FULL_SCREEN' | 'MIDDLE_BANNER' | 'MODAL' | 'TOP_BANNER';
|
|
2
|
+
export type InAppMessageAction = 'CLOSE' | 'DEEP_LINK' | 'LINK';
|
|
3
|
+
export type InAppMessageTextAlign = 'center' | 'left' | 'right';
|
|
4
4
|
interface InAppMessageContainer {
|
|
5
5
|
style?: InAppMessageStyle;
|
|
6
6
|
}
|
|
@@ -2,8 +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
|
+
exports.initialize = exports.assertIsInitialized = exports.isInitialized = void 0;
|
|
5
6
|
var statusHelpers_1 = require("./statusHelpers");
|
|
6
|
-
exports
|
|
7
|
-
exports
|
|
8
|
-
exports
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
7
|
+
Object.defineProperty(exports, "isInitialized", { enumerable: true, get: function () { return statusHelpers_1.isInitialized; } });
|
|
8
|
+
Object.defineProperty(exports, "assertIsInitialized", { enumerable: true, get: function () { return statusHelpers_1.assertIsInitialized; } });
|
|
9
|
+
Object.defineProperty(exports, "initialize", { enumerable: true, get: function () { return statusHelpers_1.initialize; } });
|