@aws-amplify/notifications 2.0.1-console-preview.8f82e46.0 → 2.0.1-console-preview.b278dcb.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/{common/eventListeners/index.js → eventListeners/eventListeners.js} +0 -1
- package/lib/eventListeners/index.d.ts +2 -0
- package/lib/{common → eventListeners}/index.js +0 -3
- package/{lib-esm/common → lib}/eventListeners/types.d.ts +2 -2
- package/lib/{common/AWSPinpointProviderCommon → eventListeners}/types.js +0 -1
- package/lib/inAppMessaging/errors/InAppMessagingError.js +0 -1
- package/lib/inAppMessaging/errors/assertServiceError.js +0 -1
- package/lib/inAppMessaging/errors/assertValidationError.js +0 -1
- package/lib/inAppMessaging/errors/index.js +0 -1
- package/lib/inAppMessaging/errors/validation.d.ts +0 -1
- package/lib/inAppMessaging/errors/validation.js +0 -5
- package/lib/inAppMessaging/index.js +0 -1
- package/lib/inAppMessaging/providers/index.js +0 -1
- package/lib/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js +2 -3
- package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +4 -6
- package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.js +8 -12
- package/lib/inAppMessaging/providers/pinpoint/apis/index.js +0 -1
- package/lib/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +12 -16
- package/lib/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +2 -3
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js +2 -3
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js +2 -3
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js +2 -3
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js +2 -3
- package/lib/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +0 -1
- package/lib/inAppMessaging/providers/pinpoint/apis/syncMessages.js +6 -17
- package/lib/inAppMessaging/providers/pinpoint/index.js +0 -1
- package/lib/inAppMessaging/providers/pinpoint/types/index.d.ts +0 -1
- package/lib/inAppMessaging/providers/pinpoint/types/index.js +0 -3
- package/lib/inAppMessaging/providers/pinpoint/types/inputs.js +0 -1
- package/lib/inAppMessaging/providers/pinpoint/types/options.js +0 -1
- package/lib/inAppMessaging/providers/pinpoint/types/outputs.d.ts +1 -1
- package/lib/inAppMessaging/providers/pinpoint/types/outputs.js +0 -1
- package/lib/inAppMessaging/providers/pinpoint/types/types.js +0 -1
- package/lib/inAppMessaging/providers/pinpoint/utils/constants.js +0 -1
- package/lib/inAppMessaging/providers/pinpoint/utils/helpers.d.ts +1 -1
- package/lib/inAppMessaging/providers/pinpoint/utils/helpers.js +2 -2
- package/lib/inAppMessaging/providers/pinpoint/utils/index.js +0 -1
- package/lib/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.d.ts +1 -1
- package/lib/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js +1 -4
- package/lib/inAppMessaging/providers/pinpoint/utils/resolveConfig.js +0 -1
- package/lib/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js +0 -1
- package/lib/inAppMessaging/providers/pinpoint/utils/userAgent.js +0 -1
- package/lib/inAppMessaging/types/event.js +0 -1
- package/lib/inAppMessaging/types/index.d.ts +0 -1
- package/lib/inAppMessaging/types/index.js +0 -1
- package/lib/inAppMessaging/types/inputs.d.ts +1 -3
- package/lib/inAppMessaging/types/inputs.js +0 -1
- 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 +0 -1
- package/lib/inAppMessaging/utils/statusHelpers.js +0 -1
- package/lib/index.d.ts +0 -4
- package/lib/index.js +0 -7
- package/lib/pushNotifications/errors/PushNotificationError.d.ts +4 -0
- package/lib/pushNotifications/errors/PushNotificationError.js +19 -0
- package/lib/pushNotifications/errors/errorHelpers.d.ts +9 -0
- package/lib/pushNotifications/errors/errorHelpers.js +34 -0
- package/lib/pushNotifications/errors/index.d.ts +2 -0
- package/lib/pushNotifications/errors/index.js +9 -0
- package/lib/pushNotifications/index.d.ts +3 -2
- package/lib/pushNotifications/index.js +12 -3
- package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.d.ts +14 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.js +20 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js +14 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.d.ts +18 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js +24 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js +11 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.d.ts +27 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js +33 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js +11 -0
- package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.d.ts +53 -2
- package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.js +55 -5
- package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.native.js +42 -0
- package/lib/pushNotifications/providers/pinpoint/apis/index.d.ts +10 -0
- package/lib/pushNotifications/providers/pinpoint/apis/index.js +20 -1
- package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.d.ts +17 -0
- package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js +23 -0
- package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.d.ts +1 -0
- package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js +158 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.d.ts +27 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js +33 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js +10 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.d.ts +43 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js +49 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js +10 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.d.ts +27 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js +33 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js +10 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.d.ts +28 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.js +34 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js +10 -0
- package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.d.ts +32 -0
- package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.js +38 -0
- package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js +11 -0
- package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.d.ts +14 -0
- package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.js +20 -0
- package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js +11 -0
- package/lib/pushNotifications/providers/pinpoint/index.d.ts +3 -1
- package/lib/pushNotifications/providers/pinpoint/index.js +10 -1
- package/lib/pushNotifications/providers/pinpoint/types/analytics.d.ts +6 -0
- package/lib/{common/eventListeners/types.js → pushNotifications/providers/pinpoint/types/analytics.js} +0 -1
- package/lib/pushNotifications/providers/pinpoint/types/apis.d.ts +13 -0
- package/lib/{inAppMessaging/sessionTracker/types.js → pushNotifications/providers/pinpoint/types/apis.js} +0 -1
- package/lib/pushNotifications/providers/pinpoint/types/index.d.ts +6 -0
- package/lib/pushNotifications/{Platform/types.js → providers/pinpoint/types/index.js} +0 -1
- package/lib/pushNotifications/providers/pinpoint/types/inputs.d.ts +9 -0
- package/lib/pushNotifications/providers/pinpoint/types/inputs.js +4 -0
- package/lib/pushNotifications/providers/pinpoint/types/options.d.ts +5 -0
- package/lib/pushNotifications/providers/pinpoint/types/options.js +4 -0
- package/lib/pushNotifications/providers/pinpoint/types/outputs.d.ts +9 -0
- package/lib/pushNotifications/providers/pinpoint/types/outputs.js +4 -0
- package/lib/pushNotifications/providers/pinpoint/types/pushNotifications.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/types/pushNotifications.js +4 -0
- package/lib/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.d.ts +5 -0
- package/lib/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js +59 -0
- package/lib/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.d.ts +6 -0
- package/lib/pushNotifications/providers/{AWSPinpointProvider/utils.js → pinpoint/utils/getAnalyticsEvent.js} +8 -10
- package/lib/pushNotifications/providers/pinpoint/utils/getChannelType.d.ts +4 -0
- package/lib/pushNotifications/providers/pinpoint/utils/getChannelType.js +23 -0
- package/lib/pushNotifications/providers/pinpoint/utils/getPushNotificationUserAgentString.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/utils/getPushNotificationUserAgentString.js +11 -0
- package/lib/pushNotifications/providers/pinpoint/utils/index.d.ts +3 -0
- package/lib/pushNotifications/providers/pinpoint/utils/index.js +10 -0
- package/lib/pushNotifications/types/errors.d.ts +3 -0
- package/lib/pushNotifications/types/errors.js +8 -0
- package/lib/pushNotifications/types/index.d.ts +5 -0
- package/lib/pushNotifications/types/index.js +6 -0
- package/lib/pushNotifications/types/inputs.d.ts +23 -0
- package/lib/pushNotifications/types/inputs.js +4 -0
- package/lib/pushNotifications/types/options.d.ts +4 -0
- package/lib/pushNotifications/types/options.js +4 -0
- package/lib/pushNotifications/types/outputs.d.ts +10 -0
- package/lib/pushNotifications/types/outputs.js +4 -0
- package/lib/pushNotifications/types/pushNotifications.d.ts +5 -0
- package/lib/pushNotifications/types/pushNotifications.js +4 -0
- package/lib/pushNotifications/utils/index.d.ts +4 -0
- package/lib/pushNotifications/utils/index.js +14 -0
- package/lib/pushNotifications/utils/initializationManager.d.ts +12 -0
- package/lib/pushNotifications/utils/initializationManager.js +23 -0
- package/lib/pushNotifications/utils/resolveConfig.d.ts +7 -0
- package/lib/pushNotifications/utils/resolveConfig.js +16 -0
- package/lib/pushNotifications/utils/resolveCredentials.d.ts +7 -0
- package/lib/pushNotifications/utils/resolveCredentials.js +22 -0
- package/lib/pushNotifications/utils/tokenManager.d.ts +12 -0
- package/lib/pushNotifications/utils/tokenManager.js +19 -0
- package/lib/tsconfig.build.tsbuildinfo +8589 -0
- package/lib-esm/{common/eventListeners/index.js → eventListeners/eventListeners.js} +0 -1
- package/lib-esm/eventListeners/index.d.ts +2 -0
- package/lib-esm/{common → eventListeners}/index.js +0 -2
- package/{lib/common → lib-esm}/eventListeners/types.d.ts +2 -2
- package/lib-esm/{common/AWSPinpointProviderCommon → eventListeners}/types.js +0 -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.d.ts +0 -1
- package/lib-esm/inAppMessaging/errors/validation.js +0 -5
- package/lib-esm/inAppMessaging/index.js +0 -1
- package/lib-esm/inAppMessaging/providers/index.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js +1 -2
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +4 -6
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.js +9 -13
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +4 -7
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +1 -2
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js +1 -2
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js +1 -2
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js +1 -2
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js +1 -2
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/syncMessages.js +8 -19
- package/lib-esm/inAppMessaging/providers/pinpoint/index.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/index.d.ts +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/index.js +0 -2
- package/lib-esm/inAppMessaging/providers/pinpoint/types/inputs.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/options.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.d.ts +1 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.js +0 -1
- 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 +1 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.js +2 -2
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/index.js +0 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.d.ts +1 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js +1 -4
- 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.js +0 -1
- package/lib-esm/inAppMessaging/types/index.d.ts +0 -1
- package/lib-esm/inAppMessaging/types/index.js +0 -1
- package/lib-esm/inAppMessaging/types/inputs.d.ts +1 -3
- package/lib-esm/inAppMessaging/types/inputs.js +0 -1
- package/lib-esm/inAppMessaging/types/message.js +0 -1
- package/lib-esm/inAppMessaging/types/options.d.ts +1 -1
- package/lib-esm/inAppMessaging/types/options.js +0 -1
- package/lib-esm/inAppMessaging/utils/index.js +0 -1
- package/lib-esm/inAppMessaging/utils/statusHelpers.js +0 -1
- package/lib-esm/index.d.ts +0 -4
- package/lib-esm/index.js +0 -3
- package/lib-esm/pushNotifications/errors/PushNotificationError.d.ts +4 -0
- package/lib-esm/pushNotifications/errors/PushNotificationError.js +17 -0
- package/lib-esm/pushNotifications/errors/errorHelpers.d.ts +9 -0
- package/lib-esm/pushNotifications/errors/errorHelpers.js +32 -0
- package/lib-esm/pushNotifications/errors/index.d.ts +2 -0
- package/lib-esm/pushNotifications/errors/index.js +4 -0
- package/lib-esm/pushNotifications/index.d.ts +3 -2
- package/lib-esm/pushNotifications/index.js +2 -3
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.d.ts +14 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.js +18 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.d.ts +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js +12 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.d.ts +18 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js +22 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.d.ts +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js +9 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.d.ts +27 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js +31 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.d.ts +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js +9 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.d.ts +53 -2
- package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.js +55 -4
- package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.d.ts +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.js +40 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/index.d.ts +10 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/index.js +10 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.d.ts +17 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js +21 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.d.ts +1 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js +156 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.d.ts +27 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js +31 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.d.ts +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js +8 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.d.ts +43 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js +47 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.d.ts +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js +8 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.d.ts +27 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js +31 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.d.ts +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js +8 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.d.ts +28 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.js +32 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.d.ts +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js +8 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.d.ts +32 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.js +36 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.native.d.ts +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js +9 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.d.ts +14 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.js +18 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.d.ts +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js +9 -0
- package/lib-esm/pushNotifications/providers/pinpoint/index.d.ts +3 -1
- package/lib-esm/pushNotifications/providers/pinpoint/index.js +1 -2
- package/lib-esm/pushNotifications/providers/pinpoint/types/analytics.d.ts +6 -0
- package/lib-esm/{common/eventListeners/types.js → pushNotifications/providers/pinpoint/types/analytics.js} +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/apis.d.ts +13 -0
- package/lib-esm/{inAppMessaging/sessionTracker/types.js → pushNotifications/providers/pinpoint/types/apis.js} +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/index.d.ts +6 -0
- package/lib-esm/pushNotifications/{Platform/types.js → providers/pinpoint/types/index.js} +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/types/inputs.d.ts +9 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/inputs.js +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/options.d.ts +5 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/options.js +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/outputs.d.ts +9 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/outputs.js +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/pushNotifications.d.ts +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/pushNotifications.js +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.d.ts +5 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js +57 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.d.ts +6 -0
- package/lib-esm/pushNotifications/providers/{AWSPinpointProvider/utils.js → pinpoint/utils/getAnalyticsEvent.js} +8 -10
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getChannelType.d.ts +4 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getChannelType.js +21 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getPushNotificationUserAgentString.d.ts +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getPushNotificationUserAgentString.js +9 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/index.d.ts +3 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/index.js +5 -0
- package/lib-esm/pushNotifications/types/errors.d.ts +3 -0
- package/lib-esm/pushNotifications/types/errors.js +6 -0
- package/lib-esm/pushNotifications/types/index.d.ts +5 -0
- package/lib-esm/pushNotifications/types/index.js +3 -0
- package/lib-esm/pushNotifications/types/inputs.d.ts +23 -0
- package/lib-esm/pushNotifications/types/inputs.js +2 -0
- package/lib-esm/pushNotifications/types/options.d.ts +4 -0
- package/lib-esm/pushNotifications/types/options.js +2 -0
- package/lib-esm/pushNotifications/types/outputs.d.ts +10 -0
- package/lib-esm/pushNotifications/types/outputs.js +2 -0
- package/lib-esm/pushNotifications/types/pushNotifications.d.ts +5 -0
- package/lib-esm/pushNotifications/types/pushNotifications.js +2 -0
- package/lib-esm/pushNotifications/utils/index.d.ts +4 -0
- package/lib-esm/pushNotifications/utils/index.js +6 -0
- package/lib-esm/pushNotifications/utils/initializationManager.d.ts +12 -0
- package/lib-esm/pushNotifications/utils/initializationManager.js +21 -0
- package/lib-esm/pushNotifications/utils/resolveConfig.d.ts +7 -0
- package/lib-esm/pushNotifications/utils/resolveConfig.js +14 -0
- package/lib-esm/pushNotifications/utils/resolveCredentials.d.ts +7 -0
- package/lib-esm/pushNotifications/utils/resolveCredentials.js +20 -0
- package/lib-esm/pushNotifications/utils/tokenManager.d.ts +12 -0
- package/lib-esm/pushNotifications/utils/tokenManager.js +17 -0
- package/lib-esm/tsconfig.build.tsbuildinfo +7080 -0
- package/package.json +12 -12
- package/push-notifications/package.json +4 -4
- package/src/{common → eventListeners}/index.ts +1 -6
- package/src/{common/eventListeners → eventListeners}/types.ts +2 -2
- package/src/inAppMessaging/errors/validation.ts +0 -4
- package/src/inAppMessaging/providers/pinpoint/apis/dispatchEvent.ts +1 -1
- package/src/inAppMessaging/providers/pinpoint/apis/identifyUser.ts +9 -8
- package/src/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.ts +4 -6
- package/src/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.ts +1 -1
- package/src/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.ts +1 -1
- package/src/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.ts +1 -1
- package/src/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.ts +1 -1
- package/src/inAppMessaging/providers/pinpoint/apis/onMessageReceived.ts +1 -1
- package/src/inAppMessaging/providers/pinpoint/apis/syncMessages.ts +12 -29
- package/src/inAppMessaging/providers/pinpoint/types/index.ts +0 -1
- package/src/inAppMessaging/providers/pinpoint/types/outputs.ts +1 -1
- package/src/inAppMessaging/providers/pinpoint/utils/helpers.ts +2 -4
- package/src/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.ts +2 -4
- package/src/inAppMessaging/types/index.ts +0 -1
- package/src/inAppMessaging/types/inputs.ts +1 -3
- package/src/inAppMessaging/types/options.ts +1 -1
- package/src/index.ts +0 -9
- package/src/pushNotifications/errors/PushNotificationError.ts +18 -0
- package/src/pushNotifications/errors/errorHelpers.ts +45 -0
- package/src/pushNotifications/errors/index.ts +5 -0
- package/src/pushNotifications/index.ts +27 -5
- package/src/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.ts +13 -0
- package/src/pushNotifications/providers/pinpoint/apis/getBadgeCount.ts +21 -0
- package/src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.ts +14 -0
- package/src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.ts +26 -0
- package/src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.ts +14 -0
- package/src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.ts +34 -0
- package/src/pushNotifications/providers/pinpoint/apis/identifyUser.native.ts +36 -0
- package/src/pushNotifications/providers/pinpoint/apis/identifyUser.ts +58 -7
- package/src/pushNotifications/providers/pinpoint/apis/index.ts +10 -0
- package/src/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.ts +199 -0
- package/src/pushNotifications/providers/pinpoint/apis/initializePushNotifications.ts +24 -0
- package/src/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.ts +11 -0
- package/src/pushNotifications/providers/pinpoint/apis/onNotificationOpened.ts +39 -0
- package/src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.ts +12 -0
- package/src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.ts +56 -0
- package/src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.ts +12 -0
- package/src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.ts +40 -0
- package/src/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.ts +11 -0
- package/src/pushNotifications/providers/pinpoint/apis/onTokenReceived.ts +39 -0
- package/src/pushNotifications/providers/pinpoint/apis/requestPermissions.native.ts +14 -0
- package/src/pushNotifications/providers/pinpoint/apis/requestPermissions.ts +39 -0
- package/src/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.ts +13 -0
- package/src/pushNotifications/providers/pinpoint/apis/setBadgeCount.ts +21 -0
- package/src/pushNotifications/providers/pinpoint/index.ts +30 -1
- package/src/pushNotifications/providers/pinpoint/types/analytics.ts +14 -0
- package/src/pushNotifications/providers/pinpoint/types/apis.ts +54 -0
- package/src/pushNotifications/providers/pinpoint/types/index.ts +40 -0
- package/src/pushNotifications/providers/pinpoint/types/inputs.ts +31 -0
- package/src/pushNotifications/providers/pinpoint/types/options.ts +9 -0
- package/src/pushNotifications/providers/pinpoint/types/outputs.ts +34 -0
- package/src/pushNotifications/providers/pinpoint/types/pushNotifications.ts +6 -0
- package/src/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.ts +65 -0
- package/src/pushNotifications/providers/{AWSPinpointProvider/utils.ts → pinpoint/utils/getAnalyticsEvent.ts} +19 -21
- package/src/pushNotifications/providers/pinpoint/utils/getChannelType.ts +25 -0
- package/src/pushNotifications/providers/pinpoint/utils/getPushNotificationUserAgentString.ts +15 -0
- package/src/pushNotifications/providers/pinpoint/utils/index.ts +6 -0
- package/src/pushNotifications/{providers/index.ts → types/errors.ts} +3 -1
- package/src/pushNotifications/types/index.ts +8 -0
- package/src/pushNotifications/types/inputs.ts +45 -0
- package/src/pushNotifications/types/options.ts +7 -0
- package/src/pushNotifications/types/outputs.ts +28 -0
- package/src/pushNotifications/types/pushNotifications.ts +22 -0
- package/src/pushNotifications/utils/index.ts +7 -0
- package/src/pushNotifications/utils/initializationManager.ts +20 -0
- package/src/pushNotifications/utils/resolveConfig.ts +16 -0
- package/src/pushNotifications/utils/resolveCredentials.ts +14 -0
- package/src/pushNotifications/utils/tokenManager.ts +20 -0
- package/lib/.tsbuildinfo +0 -3
- package/lib/common/AWSPinpointProviderCommon/index.d.ts +0 -39
- package/lib/common/AWSPinpointProviderCommon/index.js +0 -289
- package/lib/common/AWSPinpointProviderCommon/index.js.map +0 -1
- package/lib/common/AWSPinpointProviderCommon/types.d.ts +0 -10
- package/lib/common/AWSPinpointProviderCommon/types.js.map +0 -1
- package/lib/common/eventListeners/index.js.map +0 -1
- package/lib/common/eventListeners/types.js.map +0 -1
- package/lib/common/index.d.ts +0 -3
- package/lib/common/index.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/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/errors.d.ts +0 -9
- package/lib/inAppMessaging/providers/pinpoint/types/errors.js +0 -15
- package/lib/inAppMessaging/providers/pinpoint/types/errors.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/sessionTracker/SessionTracker.d.ts +0 -9
- package/lib/inAppMessaging/sessionTracker/SessionTracker.js +0 -67
- package/lib/inAppMessaging/sessionTracker/SessionTracker.js.map +0 -1
- package/lib/inAppMessaging/sessionTracker/SessionTracker.native.d.ts +0 -10
- package/lib/inAppMessaging/sessionTracker/SessionTracker.native.js +0 -53
- package/lib/inAppMessaging/sessionTracker/SessionTracker.native.js.map +0 -1
- package/lib/inAppMessaging/sessionTracker/index.d.ts +0 -3
- package/lib/inAppMessaging/sessionTracker/index.js +0 -8
- package/lib/inAppMessaging/sessionTracker/index.js.map +0 -1
- package/lib/inAppMessaging/sessionTracker/types.d.ts +0 -6
- package/lib/inAppMessaging/sessionTracker/types.js.map +0 -1
- package/lib/inAppMessaging/types/config.d.ts +0 -5
- package/lib/inAppMessaging/types/config.js +0 -3
- package/lib/inAppMessaging/types/config.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/NotEnabledError.d.ts +0 -3
- package/lib/pushNotifications/NotEnabledError.js +0 -16
- package/lib/pushNotifications/NotEnabledError.js.map +0 -1
- package/lib/pushNotifications/Platform/index.d.ts +0 -2
- package/lib/pushNotifications/Platform/index.js +0 -26
- package/lib/pushNotifications/Platform/index.js.map +0 -1
- package/lib/pushNotifications/Platform/index.native.d.ts +0 -2
- package/lib/pushNotifications/Platform/index.native.js +0 -8
- package/lib/pushNotifications/Platform/index.native.js.map +0 -1
- package/lib/pushNotifications/Platform/types.d.ts +0 -5
- package/lib/pushNotifications/Platform/types.js.map +0 -1
- package/lib/pushNotifications/PlatformNotSupportedError.d.ts +0 -3
- package/lib/pushNotifications/PlatformNotSupportedError.js +0 -16
- package/lib/pushNotifications/PlatformNotSupportedError.js.map +0 -1
- package/lib/pushNotifications/index.js.map +0 -1
- package/lib/pushNotifications/providers/AWSPinpointProvider/index.d.ts +0 -15
- package/lib/pushNotifications/providers/AWSPinpointProvider/index.js +0 -65
- package/lib/pushNotifications/providers/AWSPinpointProvider/index.js.map +0 -1
- package/lib/pushNotifications/providers/AWSPinpointProvider/types.d.ts +0 -9
- package/lib/pushNotifications/providers/AWSPinpointProvider/types.js +0 -16
- package/lib/pushNotifications/providers/AWSPinpointProvider/types.js.map +0 -1
- package/lib/pushNotifications/providers/AWSPinpointProvider/utils.d.ts +0 -6
- package/lib/pushNotifications/providers/AWSPinpointProvider/utils.js.map +0 -1
- package/lib/pushNotifications/providers/index.d.ts +0 -1
- package/lib/pushNotifications/providers/index.js +0 -7
- package/lib/pushNotifications/providers/index.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/apis/index.js.map +0 -1
- package/lib/pushNotifications/providers/pinpoint/index.js.map +0 -1
- package/lib/pushNotifications/types.d.ts +0 -71
- package/lib/pushNotifications/types.js +0 -12
- package/lib/pushNotifications/types.js.map +0 -1
- package/lib/pushNotifications/utils.d.ts +0 -3
- package/lib/pushNotifications/utils.js +0 -81
- package/lib/pushNotifications/utils.js.map +0 -1
- package/lib/types.d.ts +0 -39
- package/lib/types.js +0 -5
- package/lib/types.js.map +0 -1
- package/lib-esm/.tsbuildinfo +0 -3
- package/lib-esm/common/AWSPinpointProviderCommon/index.d.ts +0 -39
- package/lib-esm/common/AWSPinpointProviderCommon/index.js +0 -287
- package/lib-esm/common/AWSPinpointProviderCommon/index.js.map +0 -1
- package/lib-esm/common/AWSPinpointProviderCommon/types.d.ts +0 -10
- package/lib-esm/common/AWSPinpointProviderCommon/types.js.map +0 -1
- package/lib-esm/common/eventListeners/index.js.map +0 -1
- package/lib-esm/common/eventListeners/types.js.map +0 -1
- package/lib-esm/common/index.d.ts +0 -3
- package/lib-esm/common/index.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/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/errors.d.ts +0 -9
- package/lib-esm/inAppMessaging/providers/pinpoint/types/errors.js +0 -13
- package/lib-esm/inAppMessaging/providers/pinpoint/types/errors.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/sessionTracker/SessionTracker.d.ts +0 -9
- package/lib-esm/inAppMessaging/sessionTracker/SessionTracker.js +0 -64
- package/lib-esm/inAppMessaging/sessionTracker/SessionTracker.js.map +0 -1
- package/lib-esm/inAppMessaging/sessionTracker/SessionTracker.native.d.ts +0 -10
- package/lib-esm/inAppMessaging/sessionTracker/SessionTracker.native.js +0 -50
- package/lib-esm/inAppMessaging/sessionTracker/SessionTracker.native.js.map +0 -1
- package/lib-esm/inAppMessaging/sessionTracker/index.d.ts +0 -3
- package/lib-esm/inAppMessaging/sessionTracker/index.js +0 -5
- package/lib-esm/inAppMessaging/sessionTracker/index.js.map +0 -1
- package/lib-esm/inAppMessaging/sessionTracker/types.d.ts +0 -6
- package/lib-esm/inAppMessaging/sessionTracker/types.js.map +0 -1
- package/lib-esm/inAppMessaging/types/config.d.ts +0 -5
- package/lib-esm/inAppMessaging/types/config.js +0 -1
- package/lib-esm/inAppMessaging/types/config.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/NotEnabledError.d.ts +0 -3
- package/lib-esm/pushNotifications/NotEnabledError.js +0 -14
- package/lib-esm/pushNotifications/NotEnabledError.js.map +0 -1
- package/lib-esm/pushNotifications/Platform/index.d.ts +0 -2
- package/lib-esm/pushNotifications/Platform/index.js +0 -24
- package/lib-esm/pushNotifications/Platform/index.js.map +0 -1
- package/lib-esm/pushNotifications/Platform/index.native.d.ts +0 -2
- package/lib-esm/pushNotifications/Platform/index.native.js +0 -6
- package/lib-esm/pushNotifications/Platform/index.native.js.map +0 -1
- package/lib-esm/pushNotifications/Platform/types.d.ts +0 -5
- package/lib-esm/pushNotifications/Platform/types.js.map +0 -1
- package/lib-esm/pushNotifications/PlatformNotSupportedError.d.ts +0 -3
- package/lib-esm/pushNotifications/PlatformNotSupportedError.js +0 -14
- package/lib-esm/pushNotifications/PlatformNotSupportedError.js.map +0 -1
- package/lib-esm/pushNotifications/index.js.map +0 -1
- package/lib-esm/pushNotifications/providers/AWSPinpointProvider/index.d.ts +0 -15
- package/lib-esm/pushNotifications/providers/AWSPinpointProvider/index.js +0 -63
- package/lib-esm/pushNotifications/providers/AWSPinpointProvider/index.js.map +0 -1
- package/lib-esm/pushNotifications/providers/AWSPinpointProvider/types.d.ts +0 -9
- package/lib-esm/pushNotifications/providers/AWSPinpointProvider/types.js +0 -14
- package/lib-esm/pushNotifications/providers/AWSPinpointProvider/types.js.map +0 -1
- package/lib-esm/pushNotifications/providers/AWSPinpointProvider/utils.d.ts +0 -6
- package/lib-esm/pushNotifications/providers/AWSPinpointProvider/utils.js.map +0 -1
- package/lib-esm/pushNotifications/providers/index.d.ts +0 -1
- package/lib-esm/pushNotifications/providers/index.js +0 -4
- package/lib-esm/pushNotifications/providers/index.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/apis/index.js.map +0 -1
- package/lib-esm/pushNotifications/providers/pinpoint/index.js.map +0 -1
- package/lib-esm/pushNotifications/types.d.ts +0 -71
- package/lib-esm/pushNotifications/types.js +0 -10
- package/lib-esm/pushNotifications/types.js.map +0 -1
- package/lib-esm/pushNotifications/utils.d.ts +0 -3
- package/lib-esm/pushNotifications/utils.js +0 -79
- package/lib-esm/pushNotifications/utils.js.map +0 -1
- package/lib-esm/types.d.ts +0 -39
- package/lib-esm/types.js +0 -3
- package/lib-esm/types.js.map +0 -1
- package/src/common/AWSPinpointProviderCommon/index.ts +0 -300
- package/src/common/AWSPinpointProviderCommon/types.ts +0 -29
- package/src/inAppMessaging/providers/pinpoint/types/errors.ts +0 -12
- package/src/inAppMessaging/sessionTracker/SessionTracker.native.ts +0 -60
- package/src/inAppMessaging/sessionTracker/SessionTracker.ts +0 -80
- package/src/inAppMessaging/sessionTracker/index.ts +0 -6
- package/src/inAppMessaging/sessionTracker/types.ts +0 -11
- package/src/inAppMessaging/types/config.ts +0 -8
- package/src/pushNotifications/NotEnabledError.ts +0 -11
- package/src/pushNotifications/Platform/index.native.ts +0 -9
- package/src/pushNotifications/Platform/index.ts +0 -22
- package/src/pushNotifications/Platform/types.ts +0 -15
- package/src/pushNotifications/PlatformNotSupportedError.ts +0 -9
- package/src/pushNotifications/providers/AWSPinpointProvider/index.ts +0 -93
- package/src/pushNotifications/providers/AWSPinpointProvider/types.ts +0 -13
- package/src/pushNotifications/types.ts +0 -114
- package/src/pushNotifications/utils.ts +0 -112
- package/src/types.ts +0 -56
- /package/lib/{common/eventListeners/index.d.ts → eventListeners/eventListeners.d.ts} +0 -0
- /package/lib-esm/{common/eventListeners/index.d.ts → eventListeners/eventListeners.d.ts} +0 -0
- /package/src/{common/eventListeners/index.ts → eventListeners/eventListeners.ts} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { OnNotificationOpened } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Registers a listener that will be triggered when a notification is opened by user.
|
|
4
|
+
*
|
|
5
|
+
* @param {OnNotificationOpenedInput} input - A callback handler to be invoked with the opened
|
|
6
|
+
* {@link PushNotificationMessage}.
|
|
7
|
+
* @returns {OnNotificationOpenedOutput} - An object with a remove function to remove the listener.
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* // Register a listener
|
|
11
|
+
* onNotificationOpened(message => {
|
|
12
|
+
* doSomething(message);
|
|
13
|
+
* });
|
|
14
|
+
* ```
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* // Register multiple listeners
|
|
18
|
+
* onNotificationOpened(message => {
|
|
19
|
+
* doSomething(message);
|
|
20
|
+
* });
|
|
21
|
+
*
|
|
22
|
+
* onNotificationOpened(message => {
|
|
23
|
+
* doSomethingElse(message);
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare const onNotificationOpened: OnNotificationOpened;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';
|
|
4
|
+
/**
|
|
5
|
+
* Registers a listener that will be triggered when a notification is opened by user.
|
|
6
|
+
*
|
|
7
|
+
* @param {OnNotificationOpenedInput} input - A callback handler to be invoked with the opened
|
|
8
|
+
* {@link PushNotificationMessage}.
|
|
9
|
+
* @returns {OnNotificationOpenedOutput} - An object with a remove function to remove the listener.
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* // Register a listener
|
|
13
|
+
* onNotificationOpened(message => {
|
|
14
|
+
* doSomething(message);
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* // Register multiple listeners
|
|
20
|
+
* onNotificationOpened(message => {
|
|
21
|
+
* doSomething(message);
|
|
22
|
+
* });
|
|
23
|
+
*
|
|
24
|
+
* onNotificationOpened(message => {
|
|
25
|
+
* doSomethingElse(message);
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export var onNotificationOpened = function () {
|
|
30
|
+
throw new PlatformNotSupportedError();
|
|
31
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { addEventListener } from '../../../../eventListeners';
|
|
4
|
+
import { assertIsInitialized } from '../../../errors/errorHelpers';
|
|
5
|
+
export var onNotificationOpened = function (input) {
|
|
6
|
+
assertIsInitialized();
|
|
7
|
+
return addEventListener('notificationOpened', input);
|
|
8
|
+
};
|
package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { OnNotificationReceivedInBackground } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Registers a listener that will be triggered when a notification is received while app is in a background state.
|
|
4
|
+
*
|
|
5
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
6
|
+
* only React Native is supported by this API.
|
|
7
|
+
* @param {OnNotificationReceivedInBackgroundInput} input - A callback handler to be invoked with the received
|
|
8
|
+
* {@link PushNotificationMessage}.
|
|
9
|
+
* @returns {OnNotificationReceivedInBackgroundOutput} - An object with a remove function to remove the listener.
|
|
10
|
+
* @remarks Notifications received while app is in a quit state will start the app (as a headless JS instance running
|
|
11
|
+
* on a background service on Android) in the background. Handlers registered via this function should return promises
|
|
12
|
+
* if it needs to be asynchronous (e.g. to perform some network requests). The app should run in the background as long
|
|
13
|
+
* as there are handlers still running (however, if they run for more than 30 seconds on iOS, subsequent tasks could
|
|
14
|
+
* get deprioritized!). If it is necessary for a handler to execute while the app is in quit state, it should be
|
|
15
|
+
* registered in the application entry point (e.g. index.js) since the application will not fully mount in that case.
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* // Register a listener
|
|
19
|
+
* onNotificationReceivedInBackground(message => {
|
|
20
|
+
* doSomething(message);
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* // Register multiple listeners
|
|
26
|
+
* onNotificationReceivedInBackground(message => {
|
|
27
|
+
* doSomething(message);
|
|
28
|
+
* });
|
|
29
|
+
*
|
|
30
|
+
* onNotificationReceivedInBackground(message => {
|
|
31
|
+
* doSomethingElse(message);
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* // Register async listener
|
|
37
|
+
* onNotificationReceivedInBackground(async message => {
|
|
38
|
+
* await doSomething(message);
|
|
39
|
+
* console.log(`did something with ${message}`);
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare const onNotificationReceivedInBackground: OnNotificationReceivedInBackground;
|
package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';
|
|
4
|
+
/**
|
|
5
|
+
* Registers a listener that will be triggered when a notification is received while app is in a background state.
|
|
6
|
+
*
|
|
7
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
8
|
+
* only React Native is supported by this API.
|
|
9
|
+
* @param {OnNotificationReceivedInBackgroundInput} input - A callback handler to be invoked with the received
|
|
10
|
+
* {@link PushNotificationMessage}.
|
|
11
|
+
* @returns {OnNotificationReceivedInBackgroundOutput} - An object with a remove function to remove the listener.
|
|
12
|
+
* @remarks Notifications received while app is in a quit state will start the app (as a headless JS instance running
|
|
13
|
+
* on a background service on Android) in the background. Handlers registered via this function should return promises
|
|
14
|
+
* if it needs to be asynchronous (e.g. to perform some network requests). The app should run in the background as long
|
|
15
|
+
* as there are handlers still running (however, if they run for more than 30 seconds on iOS, subsequent tasks could
|
|
16
|
+
* get deprioritized!). If it is necessary for a handler to execute while the app is in quit state, it should be
|
|
17
|
+
* registered in the application entry point (e.g. index.js) since the application will not fully mount in that case.
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* // Register a listener
|
|
21
|
+
* onNotificationReceivedInBackground(message => {
|
|
22
|
+
* doSomething(message);
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* // Register multiple listeners
|
|
28
|
+
* onNotificationReceivedInBackground(message => {
|
|
29
|
+
* doSomething(message);
|
|
30
|
+
* });
|
|
31
|
+
*
|
|
32
|
+
* onNotificationReceivedInBackground(message => {
|
|
33
|
+
* doSomethingElse(message);
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* // Register async listener
|
|
39
|
+
* onNotificationReceivedInBackground(async message => {
|
|
40
|
+
* await doSomething(message);
|
|
41
|
+
* console.log(`did something with ${message}`);
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export var onNotificationReceivedInBackground = function () {
|
|
46
|
+
throw new PlatformNotSupportedError();
|
|
47
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { addEventListener } from '../../../../eventListeners';
|
|
4
|
+
import { assertIsInitialized } from '../../../errors/errorHelpers';
|
|
5
|
+
export var onNotificationReceivedInBackground = function (input) {
|
|
6
|
+
assertIsInitialized();
|
|
7
|
+
return addEventListener('backgroundMessageReceived', input);
|
|
8
|
+
};
|
package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { OnNotificationReceivedInForeground } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Registers a listener that will be triggered when a notification is received while app is in a foreground state.
|
|
4
|
+
*
|
|
5
|
+
* @param {OnNotificationReceivedInForegroundInput} input - A callback handler to be invoked with the received
|
|
6
|
+
* {@link PushNotificationMessage}.
|
|
7
|
+
* @returns {OnNotificationReceivedInForegroundOutput} - An object with a remove function to remove the listener.
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* // Register a listener
|
|
11
|
+
* onNotificationReceivedInForeground(message => {
|
|
12
|
+
* doSomething(message);
|
|
13
|
+
* });
|
|
14
|
+
* ```
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* // Register multiple listeners
|
|
18
|
+
* onNotificationReceivedInForeground(message => {
|
|
19
|
+
* doSomething(message);
|
|
20
|
+
* });
|
|
21
|
+
*
|
|
22
|
+
* onNotificationReceivedInForeground(message => {
|
|
23
|
+
* doSomethingElse(message);
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare const onNotificationReceivedInForeground: OnNotificationReceivedInForeground;
|
package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';
|
|
4
|
+
/**
|
|
5
|
+
* Registers a listener that will be triggered when a notification is received while app is in a foreground state.
|
|
6
|
+
*
|
|
7
|
+
* @param {OnNotificationReceivedInForegroundInput} input - A callback handler to be invoked with the received
|
|
8
|
+
* {@link PushNotificationMessage}.
|
|
9
|
+
* @returns {OnNotificationReceivedInForegroundOutput} - An object with a remove function to remove the listener.
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* // Register a listener
|
|
13
|
+
* onNotificationReceivedInForeground(message => {
|
|
14
|
+
* doSomething(message);
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* // Register multiple listeners
|
|
20
|
+
* onNotificationReceivedInForeground(message => {
|
|
21
|
+
* doSomething(message);
|
|
22
|
+
* });
|
|
23
|
+
*
|
|
24
|
+
* onNotificationReceivedInForeground(message => {
|
|
25
|
+
* doSomethingElse(message);
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export var onNotificationReceivedInForeground = function () {
|
|
30
|
+
throw new PlatformNotSupportedError();
|
|
31
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { addEventListener } from '../../../../eventListeners';
|
|
4
|
+
import { assertIsInitialized } from '../../../errors/errorHelpers';
|
|
5
|
+
export var onNotificationReceivedInForeground = function (input) {
|
|
6
|
+
assertIsInitialized();
|
|
7
|
+
return addEventListener('foregroundMessageReceived', input);
|
|
8
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { OnTokenReceived } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Registers a listener that will be triggered when a token is received. A token will be received:
|
|
4
|
+
* 1. On every app launch, including the first install
|
|
5
|
+
* 2. When a token changes (this may happen if the service invalidates the token for any reason)
|
|
6
|
+
*
|
|
7
|
+
* @param {OnTokenReceivedInput} input - A callback handler to be invoked with the token.
|
|
8
|
+
* @returns {OnTokenReceivedOutput} - An object with a remove function to remove the listener.
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* // Register a listener
|
|
12
|
+
* onTokenReceived(message => {
|
|
13
|
+
* doSomething(message);
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* // Register multiple listeners
|
|
19
|
+
* onTokenReceived(message => {
|
|
20
|
+
* doSomething(message);
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* onTokenReceived(message => {
|
|
24
|
+
* doSomethingElse(message);
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare const onTokenReceived: OnTokenReceived;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';
|
|
4
|
+
/**
|
|
5
|
+
* Registers a listener that will be triggered when a token is received. A token will be received:
|
|
6
|
+
* 1. On every app launch, including the first install
|
|
7
|
+
* 2. When a token changes (this may happen if the service invalidates the token for any reason)
|
|
8
|
+
*
|
|
9
|
+
* @param {OnTokenReceivedInput} input - A callback handler to be invoked with the token.
|
|
10
|
+
* @returns {OnTokenReceivedOutput} - An object with a remove function to remove the listener.
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* // Register a listener
|
|
14
|
+
* onTokenReceived(message => {
|
|
15
|
+
* doSomething(message);
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* // Register multiple listeners
|
|
21
|
+
* onTokenReceived(message => {
|
|
22
|
+
* doSomething(message);
|
|
23
|
+
* });
|
|
24
|
+
*
|
|
25
|
+
* onTokenReceived(message => {
|
|
26
|
+
* doSomethingElse(message);
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export var onTokenReceived = function () {
|
|
31
|
+
throw new PlatformNotSupportedError();
|
|
32
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { addEventListener } from '../../../../eventListeners';
|
|
4
|
+
import { assertIsInitialized } from '../../../errors/errorHelpers';
|
|
5
|
+
export var onTokenReceived = function (input) {
|
|
6
|
+
assertIsInitialized();
|
|
7
|
+
return addEventListener('tokenReceived', input);
|
|
8
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { RequestPermissions } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Requests notification permissions from your user. By default, Amplify requests all supported permissions but you can
|
|
4
|
+
* choose not to request specific permissions. The resulting promise will resolve to true if requested permissions are
|
|
5
|
+
* granted (or have previously been granted) or false otherwise. Not all specific permissions are supported by platforms
|
|
6
|
+
* your React Native app can run on but will be safely ignored even on those platforms. Currently supported permissions:
|
|
7
|
+
*
|
|
8
|
+
* * `alert`: When set to true, requests the ability to display notifications to the user.
|
|
9
|
+
*
|
|
10
|
+
* * `sound`: When set to true, requests the ability to play a sound in response to notifications.
|
|
11
|
+
*
|
|
12
|
+
* * `badge`: When set to true, requests the ability to update the app's badge.
|
|
13
|
+
*
|
|
14
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
15
|
+
* only React Native is supported by this API.
|
|
16
|
+
* @returns A promise that resolves to true if requested permissions are granted or have already previously been
|
|
17
|
+
* granted or false otherwise.
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* // Request all permissions by default
|
|
21
|
+
* const arePermissionsGranted = await requestPermissions();
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* // Prevent requesting specific permissions
|
|
26
|
+
* const arePermissionsGranted = await requestPermissions({
|
|
27
|
+
* sound: false,
|
|
28
|
+
* badge: false
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare const requestPermissions: RequestPermissions;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';
|
|
4
|
+
/**
|
|
5
|
+
* Requests notification permissions from your user. By default, Amplify requests all supported permissions but you can
|
|
6
|
+
* choose not to request specific permissions. The resulting promise will resolve to true if requested permissions are
|
|
7
|
+
* granted (or have previously been granted) or false otherwise. Not all specific permissions are supported by platforms
|
|
8
|
+
* your React Native app can run on but will be safely ignored even on those platforms. Currently supported permissions:
|
|
9
|
+
*
|
|
10
|
+
* * `alert`: When set to true, requests the ability to display notifications to the user.
|
|
11
|
+
*
|
|
12
|
+
* * `sound`: When set to true, requests the ability to play a sound in response to notifications.
|
|
13
|
+
*
|
|
14
|
+
* * `badge`: When set to true, requests the ability to update the app's badge.
|
|
15
|
+
*
|
|
16
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
17
|
+
* only React Native is supported by this API.
|
|
18
|
+
* @returns A promise that resolves to true if requested permissions are granted or have already previously been
|
|
19
|
+
* granted or false otherwise.
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* // Request all permissions by default
|
|
23
|
+
* const arePermissionsGranted = await requestPermissions();
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* // Prevent requesting specific permissions
|
|
28
|
+
* const arePermissionsGranted = await requestPermissions({
|
|
29
|
+
* sound: false,
|
|
30
|
+
* badge: false
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export var requestPermissions = function () {
|
|
35
|
+
throw new PlatformNotSupportedError();
|
|
36
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { loadAmplifyPushNotification } from '@aws-amplify/react-native';
|
|
4
|
+
import { assertIsInitialized } from '../../../errors/errorHelpers';
|
|
5
|
+
var requestPermissionsNative = loadAmplifyPushNotification().requestPermissions;
|
|
6
|
+
export var requestPermissions = function (input) {
|
|
7
|
+
assertIsInitialized();
|
|
8
|
+
return requestPermissionsNative(input);
|
|
9
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SetBadgeCount } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Sets the current badge count (the number on the top right corner of your app's icon). Setting the badge count
|
|
4
|
+
* to 0 (zero) will remove the badge from your app's icon. This function is safe to call (but will be ignored) even
|
|
5
|
+
* when your React Native app is running on platforms where badges are not supported.
|
|
6
|
+
*
|
|
7
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
8
|
+
* only React Native is supported by this API.
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* setBadgeCount(42);
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare const setBadgeCount: SetBadgeCount;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';
|
|
4
|
+
/**
|
|
5
|
+
* Sets the current badge count (the number on the top right corner of your app's icon). Setting the badge count
|
|
6
|
+
* to 0 (zero) will remove the badge from your app's icon. This function is safe to call (but will be ignored) even
|
|
7
|
+
* when your React Native app is running on platforms where badges are not supported.
|
|
8
|
+
*
|
|
9
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
10
|
+
* only React Native is supported by this API.
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* setBadgeCount(42);
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export var setBadgeCount = function () {
|
|
17
|
+
throw new PlatformNotSupportedError();
|
|
18
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { loadAmplifyPushNotification } from '@aws-amplify/react-native';
|
|
4
|
+
import { assertIsInitialized } from '../../../errors/errorHelpers';
|
|
5
|
+
var setBadgeCountNative = loadAmplifyPushNotification().setBadgeCount;
|
|
6
|
+
export var setBadgeCount = function (input) {
|
|
7
|
+
assertIsInitialized();
|
|
8
|
+
setBadgeCountNative(input);
|
|
9
|
+
};
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export { identifyUser } from './apis';
|
|
1
|
+
export { getBadgeCount, getLaunchNotification, getPermissionStatus, identifyUser, initializePushNotifications, onNotificationOpened, onNotificationReceivedInBackground, onNotificationReceivedInForeground, onTokenReceived, requestPermissions, setBadgeCount, } from './apis';
|
|
2
|
+
export { IdentifyUserInput, OnNotificationOpenedInput, OnNotificationReceivedInBackgroundInput, OnNotificationReceivedInForegroundInput, OnTokenReceivedInput, RequestPermissionsInput, SetBadgeCountInput, } from './types/inputs';
|
|
3
|
+
export { GetLaunchNotificationOutput, GetPermissionStatusOutput, OnNotificationOpenedOutput, OnNotificationReceivedInBackgroundOutput, OnNotificationReceivedInForegroundOutput, OnTokenReceivedOutput, } from './types/outputs';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
export { identifyUser } from './apis';
|
|
4
|
-
//# sourceMappingURL=index.js.map
|
|
3
|
+
export { getBadgeCount, getLaunchNotification, getPermissionStatus, identifyUser, initializePushNotifications, onNotificationOpened, onNotificationReceivedInBackground, onNotificationReceivedInForeground, onTokenReceived, requestPermissions, setBadgeCount, } from './apis';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare type PinpointMessageEvent = 'opened_notification' | 'received_background' | 'received_foreground';
|
|
2
|
+
export declare type PinpointMessageEventSource = '_campaign' | '_journey';
|
|
3
|
+
export declare type AnalyticsEventAttributes = {
|
|
4
|
+
source: PinpointMessageEventSource;
|
|
5
|
+
attributes: Record<string, string>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IdentifyUserInput, OnNotificationOpenedInput, OnNotificationReceivedInBackgroundInput, OnNotificationReceivedInForegroundInput, OnTokenReceivedInput, RequestPermissionsInput, SetBadgeCountInput } from './inputs';
|
|
2
|
+
import { GetBadgeCountOutput, GetLaunchNotificationOutput, GetPermissionStatusOutput, OnNotificationOpenedOutput, OnNotificationReceivedInBackgroundOutput, OnNotificationReceivedInForegroundOutput, OnTokenReceivedOutput, RequestPermissionsOutput } from './outputs';
|
|
3
|
+
export declare type GetBadgeCount = () => Promise<void | GetBadgeCountOutput>;
|
|
4
|
+
export declare type GetLaunchNotification = () => Promise<GetLaunchNotificationOutput>;
|
|
5
|
+
export declare type GetPermissionStatus = () => Promise<GetPermissionStatusOutput>;
|
|
6
|
+
export declare type IdentifyUser = (input: IdentifyUserInput) => Promise<void>;
|
|
7
|
+
export declare type InitializePushNotifications = () => void;
|
|
8
|
+
export declare type RequestPermissions = (input?: RequestPermissionsInput) => Promise<RequestPermissionsOutput>;
|
|
9
|
+
export declare type SetBadgeCount = (input: SetBadgeCountInput) => void;
|
|
10
|
+
export declare type OnNotificationOpened = (input: OnNotificationOpenedInput) => OnNotificationOpenedOutput;
|
|
11
|
+
export declare type OnNotificationReceivedInBackground = (input: OnNotificationReceivedInBackgroundInput) => OnNotificationReceivedInBackgroundOutput;
|
|
12
|
+
export declare type OnNotificationReceivedInForeground = (input: OnNotificationReceivedInForegroundInput) => OnNotificationReceivedInForegroundOutput;
|
|
13
|
+
export declare type OnTokenReceived = (input: OnTokenReceivedInput) => OnTokenReceivedOutput;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { AnalyticsEventAttributes, PinpointMessageEvent, PinpointMessageEventSource, } from './analytics';
|
|
2
|
+
export { GetBadgeCount, GetLaunchNotification, GetPermissionStatus, IdentifyUser, InitializePushNotifications, OnNotificationOpened, OnNotificationReceivedInBackground, OnNotificationReceivedInForeground, OnTokenReceived, RequestPermissions, SetBadgeCount, } from './apis';
|
|
3
|
+
export { IdentifyUserInput, OnNotificationOpenedInput, OnNotificationReceivedInBackgroundInput, OnNotificationReceivedInForegroundInput, OnTokenReceivedInput, RequestPermissionsInput, SetBadgeCountInput, } from './inputs';
|
|
4
|
+
export { GetLaunchNotificationOutput, GetPermissionStatusOutput, OnNotificationOpenedOutput, OnNotificationReceivedInBackgroundOutput, OnNotificationReceivedInForegroundOutput, OnTokenReceivedOutput, } from './outputs';
|
|
5
|
+
export { IdentifyUserOptions } from './options';
|
|
6
|
+
export { ChannelType } from './pushNotifications';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IdentifyUserOptions } from './options';
|
|
2
|
+
import { PushNotificationIdentifyUserInput, PushNotificationRequestPermissionsInput, PushNotificationSetBadgeCountInput, PushNotificationOnNotificationOpenedInput, PushNotificationOnNotificationReceivedInBackgroundInput, PushNotificationOnNotificationReceivedInForegroundInput, PushNotificationOnTokenReceivedInput } from '../../../types';
|
|
3
|
+
export declare type IdentifyUserInput = PushNotificationIdentifyUserInput<IdentifyUserOptions>;
|
|
4
|
+
export declare type RequestPermissionsInput = PushNotificationRequestPermissionsInput;
|
|
5
|
+
export declare type SetBadgeCountInput = PushNotificationSetBadgeCountInput;
|
|
6
|
+
export declare type OnNotificationOpenedInput = PushNotificationOnNotificationOpenedInput;
|
|
7
|
+
export declare type OnNotificationReceivedInBackgroundInput = PushNotificationOnNotificationReceivedInBackgroundInput;
|
|
8
|
+
export declare type OnNotificationReceivedInForegroundInput = PushNotificationOnNotificationReceivedInForegroundInput;
|
|
9
|
+
export declare type OnTokenReceivedInput = PushNotificationOnTokenReceivedInput;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PushNotificationGetBadgeCountOutput, PushNotificationGetLaunchNotificationOutput, PushNotificationGetPermissionStatusOutput, PushNotificationOnNotificationOpenedOutput, PushNotificationOnNotificationReceivedInBackgroundOutput, PushNotificationOnNotificationReceivedInForegroundOutput, PushNotificationOnTokenReceivedOutput, PushNotificationRequestPermissionsOutput } from '../../../types';
|
|
2
|
+
export declare type GetBadgeCountOutput = PushNotificationGetBadgeCountOutput;
|
|
3
|
+
export declare type GetLaunchNotificationOutput = PushNotificationGetLaunchNotificationOutput;
|
|
4
|
+
export declare type GetPermissionStatusOutput = PushNotificationGetPermissionStatusOutput;
|
|
5
|
+
export declare type RequestPermissionsOutput = PushNotificationRequestPermissionsOutput;
|
|
6
|
+
export declare type OnNotificationOpenedOutput = PushNotificationOnNotificationOpenedOutput;
|
|
7
|
+
export declare type OnNotificationReceivedInBackgroundOutput = PushNotificationOnNotificationReceivedInBackgroundOutput;
|
|
8
|
+
export declare type OnNotificationReceivedInForegroundOutput = PushNotificationOnNotificationReceivedInForegroundOutput;
|
|
9
|
+
export declare type OnTokenReceivedOutput = PushNotificationOnTokenReceivedOutput;
|