@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,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.onTokenReceived = void 0;
|
|
5
6
|
const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
6
7
|
/**
|
|
7
8
|
* Registers a listener that will be triggered when a token is received. A token will be received:
|
|
@@ -29,7 +30,7 @@ const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
|
29
30
|
* });
|
|
30
31
|
* ```
|
|
31
32
|
*/
|
|
32
|
-
|
|
33
|
+
const onTokenReceived = () => {
|
|
33
34
|
throw new utils_1.PlatformNotSupportedError();
|
|
34
35
|
};
|
|
35
|
-
|
|
36
|
+
exports.onTokenReceived = onTokenReceived;
|
|
@@ -2,10 +2,11 @@
|
|
|
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.onTokenReceived = void 0;
|
|
5
6
|
const eventListeners_1 = require("../../../../eventListeners");
|
|
6
7
|
const errorHelpers_1 = require("../../../errors/errorHelpers");
|
|
7
|
-
|
|
8
|
-
errorHelpers_1.assertIsInitialized();
|
|
9
|
-
return eventListeners_1.addEventListener('tokenReceived', input);
|
|
8
|
+
const onTokenReceived = input => {
|
|
9
|
+
(0, errorHelpers_1.assertIsInitialized)();
|
|
10
|
+
return (0, eventListeners_1.addEventListener)('tokenReceived', input);
|
|
10
11
|
};
|
|
11
|
-
|
|
12
|
+
exports.onTokenReceived = onTokenReceived;
|
|
@@ -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.requestPermissions = void 0;
|
|
5
6
|
const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
6
7
|
/**
|
|
7
8
|
* Requests notification permissions from your user. By default, Amplify requests all supported permissions but you can
|
|
@@ -33,7 +34,7 @@ const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
|
33
34
|
* });
|
|
34
35
|
* ```
|
|
35
36
|
*/
|
|
36
|
-
|
|
37
|
+
const requestPermissions = async () => {
|
|
37
38
|
throw new utils_1.PlatformNotSupportedError();
|
|
38
39
|
};
|
|
39
|
-
|
|
40
|
+
exports.requestPermissions = requestPermissions;
|
|
@@ -2,11 +2,12 @@
|
|
|
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.requestPermissions = void 0;
|
|
5
6
|
const react_native_1 = require("@aws-amplify/react-native");
|
|
6
7
|
const errorHelpers_1 = require("../../../errors/errorHelpers");
|
|
7
|
-
const { requestPermissions: requestPermissionsNative } = react_native_1.loadAmplifyPushNotification();
|
|
8
|
-
|
|
9
|
-
errorHelpers_1.assertIsInitialized();
|
|
8
|
+
const { requestPermissions: requestPermissionsNative } = (0, react_native_1.loadAmplifyPushNotification)();
|
|
9
|
+
const requestPermissions = async (input) => {
|
|
10
|
+
(0, errorHelpers_1.assertIsInitialized)();
|
|
10
11
|
return requestPermissionsNative(input);
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
+
exports.requestPermissions = requestPermissions;
|
|
@@ -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.setBadgeCount = void 0;
|
|
5
6
|
const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
6
7
|
/**
|
|
7
8
|
* Sets the current badge count (the number on the top right corner of your app's icon). Setting the badge count
|
|
@@ -15,7 +16,7 @@ const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
|
15
16
|
* setBadgeCount(42);
|
|
16
17
|
* ```
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
|
+
const setBadgeCount = () => {
|
|
19
20
|
throw new utils_1.PlatformNotSupportedError();
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
+
exports.setBadgeCount = setBadgeCount;
|
|
@@ -2,11 +2,12 @@
|
|
|
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.setBadgeCount = void 0;
|
|
5
6
|
const react_native_1 = require("@aws-amplify/react-native");
|
|
6
7
|
const errorHelpers_1 = require("../../../errors/errorHelpers");
|
|
7
|
-
const { setBadgeCount: setBadgeCountNative } = react_native_1.loadAmplifyPushNotification();
|
|
8
|
-
|
|
9
|
-
errorHelpers_1.assertIsInitialized();
|
|
8
|
+
const { setBadgeCount: setBadgeCountNative } = (0, react_native_1.loadAmplifyPushNotification)();
|
|
9
|
+
const setBadgeCount = input => {
|
|
10
|
+
(0, errorHelpers_1.assertIsInitialized)();
|
|
10
11
|
setBadgeCountNative(input);
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
+
exports.setBadgeCount = setBadgeCount;
|
|
@@ -2,16 +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.setBadgeCount = exports.requestPermissions = exports.onTokenReceived = exports.onNotificationReceivedInForeground = exports.onNotificationReceivedInBackground = exports.onNotificationOpened = exports.initializePushNotifications = exports.identifyUser = exports.getPermissionStatus = exports.getLaunchNotification = exports.getBadgeCount = 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
|
-
exports
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
|
7
|
+
Object.defineProperty(exports, "getBadgeCount", { enumerable: true, get: function () { return apis_1.getBadgeCount; } });
|
|
8
|
+
Object.defineProperty(exports, "getLaunchNotification", { enumerable: true, get: function () { return apis_1.getLaunchNotification; } });
|
|
9
|
+
Object.defineProperty(exports, "getPermissionStatus", { enumerable: true, get: function () { return apis_1.getPermissionStatus; } });
|
|
10
|
+
Object.defineProperty(exports, "identifyUser", { enumerable: true, get: function () { return apis_1.identifyUser; } });
|
|
11
|
+
Object.defineProperty(exports, "initializePushNotifications", { enumerable: true, get: function () { return apis_1.initializePushNotifications; } });
|
|
12
|
+
Object.defineProperty(exports, "onNotificationOpened", { enumerable: true, get: function () { return apis_1.onNotificationOpened; } });
|
|
13
|
+
Object.defineProperty(exports, "onNotificationReceivedInBackground", { enumerable: true, get: function () { return apis_1.onNotificationReceivedInBackground; } });
|
|
14
|
+
Object.defineProperty(exports, "onNotificationReceivedInForeground", { enumerable: true, get: function () { return apis_1.onNotificationReceivedInForeground; } });
|
|
15
|
+
Object.defineProperty(exports, "onTokenReceived", { enumerable: true, get: function () { return apis_1.onTokenReceived; } });
|
|
16
|
+
Object.defineProperty(exports, "requestPermissions", { enumerable: true, get: function () { return apis_1.requestPermissions; } });
|
|
17
|
+
Object.defineProperty(exports, "setBadgeCount", { enumerable: true, get: function () { return apis_1.setBadgeCount; } });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export type PinpointMessageEvent = 'opened_notification' | 'received_background' | 'received_foreground';
|
|
2
|
+
export type PinpointMessageEventSource = '_campaign' | '_journey';
|
|
3
|
+
export type AnalyticsEventAttributes = {
|
|
4
4
|
source: PinpointMessageEventSource;
|
|
5
5
|
attributes: Record<string, string>;
|
|
6
6
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { IdentifyUserInput, OnNotificationOpenedInput, OnNotificationReceivedInBackgroundInput, OnNotificationReceivedInForegroundInput, OnTokenReceivedInput, RequestPermissionsInput, SetBadgeCountInput } from './inputs';
|
|
2
2
|
import { GetBadgeCountOutput, GetLaunchNotificationOutput, GetPermissionStatusOutput, OnNotificationOpenedOutput, OnNotificationReceivedInBackgroundOutput, OnNotificationReceivedInForegroundOutput, OnTokenReceivedOutput, RequestPermissionsOutput } from './outputs';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
3
|
+
export type GetBadgeCount = () => Promise<void | GetBadgeCountOutput>;
|
|
4
|
+
export type GetLaunchNotification = () => Promise<GetLaunchNotificationOutput>;
|
|
5
|
+
export type GetPermissionStatus = () => Promise<GetPermissionStatusOutput>;
|
|
6
|
+
export type IdentifyUser = (input: IdentifyUserInput) => Promise<void>;
|
|
7
|
+
export type InitializePushNotifications = () => void;
|
|
8
|
+
export type RequestPermissions = (input?: RequestPermissionsInput) => Promise<RequestPermissionsOutput>;
|
|
9
|
+
export type SetBadgeCount = (input: SetBadgeCountInput) => void;
|
|
10
|
+
export type OnNotificationOpened = (input: OnNotificationOpenedInput) => OnNotificationOpenedOutput;
|
|
11
|
+
export type OnNotificationReceivedInBackground = (input: OnNotificationReceivedInBackgroundInput) => OnNotificationReceivedInBackgroundOutput;
|
|
12
|
+
export type OnNotificationReceivedInForeground = (input: OnNotificationReceivedInForegroundInput) => OnNotificationReceivedInForegroundOutput;
|
|
13
|
+
export type OnTokenReceived = (input: OnTokenReceivedInput) => OnTokenReceivedOutput;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IdentifyUserOptions } from './options';
|
|
2
2
|
import { PushNotificationIdentifyUserInput, PushNotificationRequestPermissionsInput, PushNotificationSetBadgeCountInput, PushNotificationOnNotificationOpenedInput, PushNotificationOnNotificationReceivedInBackgroundInput, PushNotificationOnNotificationReceivedInForegroundInput, PushNotificationOnTokenReceivedInput } from '../../../types';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
3
|
+
export type IdentifyUserInput = PushNotificationIdentifyUserInput<IdentifyUserOptions>;
|
|
4
|
+
export type RequestPermissionsInput = PushNotificationRequestPermissionsInput;
|
|
5
|
+
export type SetBadgeCountInput = PushNotificationSetBadgeCountInput;
|
|
6
|
+
export type OnNotificationOpenedInput = PushNotificationOnNotificationOpenedInput;
|
|
7
|
+
export type OnNotificationReceivedInBackgroundInput = PushNotificationOnNotificationReceivedInBackgroundInput;
|
|
8
|
+
export type OnNotificationReceivedInForegroundInput = PushNotificationOnNotificationReceivedInForegroundInput;
|
|
9
|
+
export type OnTokenReceivedInput = PushNotificationOnTokenReceivedInput;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PushNotificationGetBadgeCountOutput, PushNotificationGetLaunchNotificationOutput, PushNotificationGetPermissionStatusOutput, PushNotificationOnNotificationOpenedOutput, PushNotificationOnNotificationReceivedInBackgroundOutput, PushNotificationOnNotificationReceivedInForegroundOutput, PushNotificationOnTokenReceivedOutput, PushNotificationRequestPermissionsOutput } from '../../../types';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
2
|
+
export type GetBadgeCountOutput = PushNotificationGetBadgeCountOutput;
|
|
3
|
+
export type GetLaunchNotificationOutput = PushNotificationGetLaunchNotificationOutput;
|
|
4
|
+
export type GetPermissionStatusOutput = PushNotificationGetPermissionStatusOutput;
|
|
5
|
+
export type RequestPermissionsOutput = PushNotificationRequestPermissionsOutput;
|
|
6
|
+
export type OnNotificationOpenedOutput = PushNotificationOnNotificationOpenedOutput;
|
|
7
|
+
export type OnNotificationReceivedInBackgroundOutput = PushNotificationOnNotificationReceivedInBackgroundOutput;
|
|
8
|
+
export type OnNotificationReceivedInForegroundOutput = PushNotificationOnNotificationReceivedInForegroundOutput;
|
|
9
|
+
export type OnTokenReceivedOutput = PushNotificationOnTokenReceivedOutput;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { updateEndpoint } from '@aws-amplify/core/internals/providers/pinpoint';
|
|
2
|
-
export
|
|
2
|
+
export type ChannelType = Parameters<typeof updateEndpoint>[0]['channelType'];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PinpointMessageEvent } from '../types';
|
|
2
|
+
import { OnPushNotificationMessageHandler } from '../../../types';
|
|
2
3
|
/**
|
|
3
4
|
* @internal
|
|
4
5
|
*/
|
|
5
|
-
export declare const createMessageEventRecorder: (event:
|
|
6
|
+
export declare const createMessageEventRecorder: (event: PinpointMessageEvent, callback?: Function) => OnPushNotificationMessageHandler;
|
|
@@ -2,18 +2,20 @@
|
|
|
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.createMessageEventRecorder = void 0;
|
|
5
6
|
const pinpoint_1 = require("@aws-amplify/core/internals/providers/pinpoint");
|
|
6
7
|
const core_1 = require("@aws-amplify/core");
|
|
8
|
+
const utils_1 = require("../../../utils");
|
|
7
9
|
const getAnalyticsEvent_1 = require("./getAnalyticsEvent");
|
|
8
10
|
const getChannelType_1 = require("./getChannelType");
|
|
9
|
-
const
|
|
11
|
+
const resolveConfig_1 = require("./resolveConfig");
|
|
10
12
|
const logger = new core_1.ConsoleLogger('PushNotification.recordMessageEvent');
|
|
11
13
|
/**
|
|
12
14
|
* @internal
|
|
13
15
|
*/
|
|
14
|
-
|
|
15
|
-
const { credentials } = await utils_1.resolveCredentials();
|
|
16
|
-
const { appId, region } =
|
|
16
|
+
const createMessageEventRecorder = (event, callback) => async (message) => {
|
|
17
|
+
const { credentials } = await (0, utils_1.resolveCredentials)();
|
|
18
|
+
const { appId, region } = (0, resolveConfig_1.resolveConfig)();
|
|
17
19
|
await recordMessageEvent({
|
|
18
20
|
appId,
|
|
19
21
|
credentials,
|
|
@@ -23,19 +25,19 @@ exports.createMessageEventRecorder = (event, callback) => async (message) => {
|
|
|
23
25
|
});
|
|
24
26
|
callback?.();
|
|
25
27
|
};
|
|
28
|
+
exports.createMessageEventRecorder = createMessageEventRecorder;
|
|
26
29
|
const recordMessageEvent = async ({ appId, credentials, event, message, region, }) => {
|
|
27
|
-
const analyticsEvent = getAnalyticsEvent_1.getAnalyticsEvent(message, event);
|
|
30
|
+
const analyticsEvent = (0, getAnalyticsEvent_1.getAnalyticsEvent)(message, event);
|
|
28
31
|
if (!analyticsEvent) {
|
|
29
32
|
logger.debug('A notification missing event information was not recorded');
|
|
30
33
|
return;
|
|
31
34
|
}
|
|
32
|
-
return pinpoint_1.record({
|
|
35
|
+
return (0, pinpoint_1.record)({
|
|
33
36
|
appId,
|
|
34
37
|
category: 'PushNotification',
|
|
35
|
-
channelType: getChannelType_1.getChannelType(),
|
|
38
|
+
channelType: (0, getChannelType_1.getChannelType)(),
|
|
36
39
|
credentials,
|
|
37
40
|
event: analyticsEvent,
|
|
38
41
|
region,
|
|
39
42
|
});
|
|
40
43
|
};
|
|
41
|
-
//# sourceMappingURL=createMessageEventRecorder.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PinpointAnalyticsEvent } from '@aws-amplify/core/internals/providers/pinpoint';
|
|
2
|
-
import {
|
|
2
|
+
import { PinpointMessageEvent } from '../types';
|
|
3
|
+
import { PushNotificationMessage } from '../../../types';
|
|
3
4
|
/**
|
|
4
5
|
* @internal
|
|
5
6
|
*/
|
|
6
|
-
export declare const getAnalyticsEvent: ({ data }: PushNotificationMessage, event:
|
|
7
|
+
export declare const getAnalyticsEvent: ({ data }: PushNotificationMessage, event: PinpointMessageEvent) => PinpointAnalyticsEvent | null;
|
|
@@ -2,13 +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
|
+
exports.getAnalyticsEvent = void 0;
|
|
5
6
|
const ANDROID_CAMPAIGN_ACTIVITY_ID_KEY = 'pinpoint.campaign.campaign_activity_id';
|
|
6
7
|
const ANDROID_CAMPAIGN_ID_KEY = 'pinpoint.campaign.campaign_id';
|
|
7
8
|
const ANDROID_CAMPAIGN_TREATMENT_ID_KEY = 'pinpoint.campaign.treatment_id';
|
|
8
9
|
/**
|
|
9
10
|
* @internal
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
|
+
const getAnalyticsEvent = ({ data }, event) => {
|
|
12
13
|
if (!data) {
|
|
13
14
|
return null;
|
|
14
15
|
}
|
|
@@ -22,6 +23,7 @@ exports.getAnalyticsEvent = ({ data }, event) => {
|
|
|
22
23
|
name: `${source}.${event}`,
|
|
23
24
|
};
|
|
24
25
|
};
|
|
26
|
+
exports.getAnalyticsEvent = getAnalyticsEvent;
|
|
25
27
|
const getAnalyticsEventAttributes = (data) => {
|
|
26
28
|
if (!data) {
|
|
27
29
|
return;
|
|
@@ -52,4 +54,3 @@ const getAnalyticsEventAttributes = (data) => {
|
|
|
52
54
|
};
|
|
53
55
|
}
|
|
54
56
|
};
|
|
55
|
-
//# sourceMappingURL=getAnalyticsEvent.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.getChannelType = void 0;
|
|
5
6
|
const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
6
7
|
const react_native_1 = require("@aws-amplify/react-native");
|
|
7
|
-
const operatingSystem = react_native_1.getOperatingSystem();
|
|
8
|
+
const operatingSystem = (0, react_native_1.getOperatingSystem)();
|
|
8
9
|
const isAndroid = operatingSystem === 'android';
|
|
9
10
|
const isIos = operatingSystem === 'ios';
|
|
10
11
|
/**
|
|
11
12
|
* @internal
|
|
12
13
|
*/
|
|
13
|
-
|
|
14
|
+
const getChannelType = () => {
|
|
14
15
|
if (isAndroid) {
|
|
15
16
|
// FCM was previously known as GCM and continues to be the channel type in Pinpoint
|
|
16
17
|
return 'GCM';
|
|
@@ -21,4 +22,4 @@ exports.getChannelType = () => {
|
|
|
21
22
|
}
|
|
22
23
|
throw new utils_1.PlatformNotSupportedError();
|
|
23
24
|
};
|
|
24
|
-
|
|
25
|
+
exports.getChannelType = getChannelType;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { createMessageEventRecorder } from './createMessageEventRecorder';
|
|
2
|
+
export { getAnalyticsEvent } from './getAnalyticsEvent';
|
|
2
3
|
export { getChannelType } from './getChannelType';
|
|
3
|
-
export {
|
|
4
|
+
export { resolveConfig } from './resolveConfig';
|
|
@@ -2,10 +2,12 @@
|
|
|
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 = exports.getChannelType = exports.getAnalyticsEvent = exports.createMessageEventRecorder = void 0;
|
|
5
6
|
var createMessageEventRecorder_1 = require("./createMessageEventRecorder");
|
|
6
|
-
exports
|
|
7
|
+
Object.defineProperty(exports, "createMessageEventRecorder", { enumerable: true, get: function () { return createMessageEventRecorder_1.createMessageEventRecorder; } });
|
|
8
|
+
var getAnalyticsEvent_1 = require("./getAnalyticsEvent");
|
|
9
|
+
Object.defineProperty(exports, "getAnalyticsEvent", { enumerable: true, get: function () { return getAnalyticsEvent_1.getAnalyticsEvent; } });
|
|
7
10
|
var getChannelType_1 = require("./getChannelType");
|
|
8
|
-
exports
|
|
9
|
-
var
|
|
10
|
-
exports
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
11
|
+
Object.defineProperty(exports, "getChannelType", { enumerable: true, get: function () { return getChannelType_1.getChannelType; } });
|
|
12
|
+
var resolveConfig_1 = require("./resolveConfig");
|
|
13
|
+
Object.defineProperty(exports, "resolveConfig", { enumerable: true, get: function () { return resolveConfig_1.resolveConfig; } });
|
|
@@ -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
|
-
const errors_1 = require("
|
|
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?.PushNotification?.Pinpoint ?? {};
|
|
12
|
-
errors_1.assert(!!appId, errors_1.PushNotificationValidationErrorCode.NoAppId);
|
|
13
|
-
errors_1.assert(!!region, errors_1.PushNotificationValidationErrorCode.NoRegion);
|
|
13
|
+
(0, errors_1.assert)(!!appId, errors_1.PushNotificationValidationErrorCode.NoAppId);
|
|
14
|
+
(0, errors_1.assert)(!!region, errors_1.PushNotificationValidationErrorCode.NoRegion);
|
|
14
15
|
return { appId, region };
|
|
15
16
|
};
|
|
16
|
-
|
|
17
|
+
exports.resolveConfig = resolveConfig;
|
|
@@ -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.PushNotificationErrorCode = void 0;
|
|
5
6
|
var PushNotificationErrorCode;
|
|
6
7
|
(function (PushNotificationErrorCode) {
|
|
7
8
|
PushNotificationErrorCode["NotInitialized"] = "NotInitialized";
|
|
8
9
|
})(PushNotificationErrorCode = exports.PushNotificationErrorCode || (exports.PushNotificationErrorCode = {}));
|
|
9
|
-
//# sourceMappingURL=errors.js.map
|
|
@@ -1,7 +1,23 @@
|
|
|
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
+
};
|
|
4
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
19
|
+
__exportStar(require("./errors"), exports);
|
|
20
|
+
__exportStar(require("./inputs"), exports);
|
|
21
|
+
__exportStar(require("./options"), exports);
|
|
22
|
+
__exportStar(require("./outputs"), exports);
|
|
23
|
+
__exportStar(require("./pushNotifications"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UserProfile } from '@aws-amplify/core';
|
|
2
2
|
import { PushNotificationServiceOptions } from './options';
|
|
3
3
|
import { OnPushNotificationMessageHandler, OnTokenReceivedHandler, PushNotificationPermissions } from './pushNotifications';
|
|
4
|
-
export
|
|
4
|
+
export type PushNotificationIdentifyUserInput<ServiceOptions extends PushNotificationServiceOptions = PushNotificationServiceOptions> = {
|
|
5
5
|
/**
|
|
6
6
|
* A User ID associated to the current device.
|
|
7
7
|
*/
|
|
@@ -15,9 +15,9 @@ export declare type PushNotificationIdentifyUserInput<ServiceOptions extends Pus
|
|
|
15
15
|
*/
|
|
16
16
|
options?: ServiceOptions;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
18
|
+
export type PushNotificationRequestPermissionsInput = PushNotificationPermissions;
|
|
19
|
+
export type PushNotificationSetBadgeCountInput = number;
|
|
20
|
+
export type PushNotificationOnNotificationOpenedInput = OnPushNotificationMessageHandler;
|
|
21
|
+
export type PushNotificationOnNotificationReceivedInBackgroundInput = OnPushNotificationMessageHandler;
|
|
22
|
+
export type PushNotificationOnNotificationReceivedInForegroundInput = OnPushNotificationMessageHandler;
|
|
23
|
+
export type PushNotificationOnTokenReceivedInput = OnTokenReceivedHandler;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { EventListenerRemover } from '../../eventListeners';
|
|
2
2
|
import { PushNotificationMessage, PushNotificationPermissionStatus } from '../types';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
3
|
+
export type PushNotificationGetBadgeCountOutput = number | null;
|
|
4
|
+
export type PushNotificationGetLaunchNotificationOutput = PushNotificationMessage | null;
|
|
5
|
+
export type PushNotificationGetPermissionStatusOutput = PushNotificationPermissionStatus;
|
|
6
|
+
export type PushNotificationRequestPermissionsOutput = boolean;
|
|
7
|
+
export type PushNotificationOnNotificationOpenedOutput = EventListenerRemover;
|
|
8
|
+
export type PushNotificationOnNotificationReceivedInBackgroundOutput = EventListenerRemover;
|
|
9
|
+
export type PushNotificationOnNotificationReceivedInForegroundOutput = EventListenerRemover;
|
|
10
|
+
export type PushNotificationOnTokenReceivedOutput = EventListenerRemover;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PushNotificationMessage } from '@aws-amplify/react-native';
|
|
2
2
|
export type { PushNotificationMessage, PushNotificationPermissionStatus, PushNotificationPermissions, } from '@aws-amplify/react-native';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
3
|
+
export type OnTokenReceivedHandler = (token: string) => void;
|
|
4
|
+
export type OnPushNotificationMessageHandler = (message: PushNotificationMessage) => void;
|
|
5
|
+
export type PushNotificationEvent = 'backgroundMessageReceived' | 'foregroundMessageReceived' | 'launchNotificationOpened' | 'notificationOpened' | 'tokenReceived';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPushNotificationUserAgentString = 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
|
+
const getPushNotificationUserAgentString = (action) => (0, utils_1.getAmplifyUserAgent)({
|
|
7
8
|
category: utils_1.Category.PushNotification,
|
|
8
9
|
action,
|
|
9
10
|
});
|
|
10
|
-
|
|
11
|
+
exports.getPushNotificationUserAgentString = getPushNotificationUserAgentString;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
export { getPushNotificationUserAgentString } from './getPushNotificationUserAgentString';
|
|
1
2
|
export { initialize, isInitialized } from './initializationManager';
|
|
2
|
-
export { resolveConfig } from './resolveConfig';
|
|
3
3
|
export { resolveCredentials } from './resolveCredentials';
|
|
4
4
|
export { getToken, setToken } from './tokenManager';
|