@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
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { AWSPinpointProviderCommon } from './common';
|
|
2
|
-
export { PinpointUserInfo } from './common/AWSPinpointProviderCommon/types';
|
|
3
|
-
export { PushNotificationMessage, PushNotificationPermissions, PushNotificationPermissionStatus, } from './pushNotifications/types';
|
|
4
|
-
export { NotificationsConfig, UserInfo } from './types';
|
package/lib/index.js
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
var common_1 = require("./common");
|
|
6
|
-
exports.AWSPinpointProviderCommon = common_1.AWSPinpointProviderCommon;
|
|
7
|
-
var types_1 = require("./pushNotifications/types");
|
|
8
|
-
exports.PushNotificationPermissionStatus = types_1.PushNotificationPermissionStatus;
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
var tslib_1 = require("tslib");
|
|
6
|
+
var utils_1 = require("@aws-amplify/core/internals/utils");
|
|
7
|
+
var PushNotificationError = /** @class */ (function (_super) {
|
|
8
|
+
tslib_1.__extends(PushNotificationError, _super);
|
|
9
|
+
function PushNotificationError(params) {
|
|
10
|
+
var _this = _super.call(this, params) || this;
|
|
11
|
+
// Hack for making the custom error class work when transpiled to es5
|
|
12
|
+
// TODO: Delete the following 2 lines after we change the build target to >= es2015
|
|
13
|
+
_this.constructor = PushNotificationError;
|
|
14
|
+
Object.setPrototypeOf(_this, PushNotificationError.prototype);
|
|
15
|
+
return _this;
|
|
16
|
+
}
|
|
17
|
+
return PushNotificationError;
|
|
18
|
+
}(utils_1.AmplifyError));
|
|
19
|
+
exports.PushNotificationError = PushNotificationError;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AssertionFunction } from '@aws-amplify/core/internals/utils';
|
|
2
|
+
export declare enum PushNotificationValidationErrorCode {
|
|
3
|
+
NoAppId = "NoAppId",
|
|
4
|
+
NoCredentials = "NoCredentials",
|
|
5
|
+
NoRegion = "NoRegion",
|
|
6
|
+
NotInitialized = "NotInitialized"
|
|
7
|
+
}
|
|
8
|
+
export declare const assert: AssertionFunction<PushNotificationValidationErrorCode>;
|
|
9
|
+
export declare const assertIsInitialized: () => void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
var _a;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var utils_1 = require("@aws-amplify/core/internals/utils");
|
|
7
|
+
var utils_2 = require("../utils");
|
|
8
|
+
var PushNotificationError_1 = require("./PushNotificationError");
|
|
9
|
+
var PushNotificationValidationErrorCode;
|
|
10
|
+
(function (PushNotificationValidationErrorCode) {
|
|
11
|
+
PushNotificationValidationErrorCode["NoAppId"] = "NoAppId";
|
|
12
|
+
PushNotificationValidationErrorCode["NoCredentials"] = "NoCredentials";
|
|
13
|
+
PushNotificationValidationErrorCode["NoRegion"] = "NoRegion";
|
|
14
|
+
PushNotificationValidationErrorCode["NotInitialized"] = "NotInitialized";
|
|
15
|
+
})(PushNotificationValidationErrorCode = exports.PushNotificationValidationErrorCode || (exports.PushNotificationValidationErrorCode = {}));
|
|
16
|
+
var pushNotificationValidationErrorMap = (_a = {},
|
|
17
|
+
_a[PushNotificationValidationErrorCode.NoAppId] = {
|
|
18
|
+
message: 'Missing application id.',
|
|
19
|
+
},
|
|
20
|
+
_a[PushNotificationValidationErrorCode.NoCredentials] = {
|
|
21
|
+
message: 'Credentials should not be empty.',
|
|
22
|
+
},
|
|
23
|
+
_a[PushNotificationValidationErrorCode.NoRegion] = {
|
|
24
|
+
message: 'Missing region.',
|
|
25
|
+
},
|
|
26
|
+
_a[PushNotificationValidationErrorCode.NotInitialized] = {
|
|
27
|
+
message: 'Push notification has not been initialized.',
|
|
28
|
+
recoverySuggestion: 'Please make sure to first call `initializePushNotifications`.',
|
|
29
|
+
},
|
|
30
|
+
_a);
|
|
31
|
+
exports.assert = utils_1.createAssertionFunction(pushNotificationValidationErrorMap, PushNotificationError_1.PushNotificationError);
|
|
32
|
+
exports.assertIsInitialized = function () {
|
|
33
|
+
exports.assert(utils_2.isInitialized(), PushNotificationValidationErrorCode.NotInitialized);
|
|
34
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
var PushNotificationError_1 = require("./PushNotificationError");
|
|
6
|
+
exports.PushNotificationError = PushNotificationError_1.PushNotificationError;
|
|
7
|
+
var errorHelpers_1 = require("./errorHelpers");
|
|
8
|
+
exports.assert = errorHelpers_1.assert;
|
|
9
|
+
exports.PushNotificationValidationErrorCode = errorHelpers_1.PushNotificationValidationErrorCode;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { identifyUser } from './providers/pinpoint';
|
|
2
|
-
export {
|
|
1
|
+
export { getBadgeCount, getLaunchNotification, GetLaunchNotificationOutput, getPermissionStatus, GetPermissionStatusOutput, identifyUser, IdentifyUserInput, initializePushNotifications, onNotificationOpened, OnNotificationOpenedInput, OnNotificationOpenedOutput, onNotificationReceivedInBackground, OnNotificationReceivedInBackgroundInput, OnNotificationReceivedInBackgroundOutput, onNotificationReceivedInForeground, OnNotificationReceivedInForegroundInput, OnNotificationReceivedInForegroundOutput, onTokenReceived, OnTokenReceivedInput, OnTokenReceivedOutput, requestPermissions, RequestPermissionsInput, setBadgeCount, SetBadgeCountInput, } from './providers/pinpoint';
|
|
2
|
+
export { PushNotificationMessage } from './types';
|
|
3
|
+
export { PushNotificationError } from './errors';
|
|
@@ -3,7 +3,16 @@
|
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
var pinpoint_1 = require("./providers/pinpoint");
|
|
6
|
+
exports.getBadgeCount = pinpoint_1.getBadgeCount;
|
|
7
|
+
exports.getLaunchNotification = pinpoint_1.getLaunchNotification;
|
|
8
|
+
exports.getPermissionStatus = pinpoint_1.getPermissionStatus;
|
|
6
9
|
exports.identifyUser = pinpoint_1.identifyUser;
|
|
7
|
-
|
|
8
|
-
exports.
|
|
9
|
-
|
|
10
|
+
exports.initializePushNotifications = pinpoint_1.initializePushNotifications;
|
|
11
|
+
exports.onNotificationOpened = pinpoint_1.onNotificationOpened;
|
|
12
|
+
exports.onNotificationReceivedInBackground = pinpoint_1.onNotificationReceivedInBackground;
|
|
13
|
+
exports.onNotificationReceivedInForeground = pinpoint_1.onNotificationReceivedInForeground;
|
|
14
|
+
exports.onTokenReceived = pinpoint_1.onTokenReceived;
|
|
15
|
+
exports.requestPermissions = pinpoint_1.requestPermissions;
|
|
16
|
+
exports.setBadgeCount = pinpoint_1.setBadgeCount;
|
|
17
|
+
var errors_1 = require("./errors");
|
|
18
|
+
exports.PushNotificationError = errors_1.PushNotificationError;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GetBadgeCount } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the current badge count (the number next to your app's icon). This function is safe to call (but will be
|
|
4
|
+
* ignored) even when your React Native app is running on platforms where badges are not supported.
|
|
5
|
+
*
|
|
6
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
7
|
+
* only React Native is supported by this API.
|
|
8
|
+
* @returns A promise that resolves to a number representing the current count displayed on the app badge.
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const badgeCount = await getBadgeCount();
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare const getBadgeCount: GetBadgeCount;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
var utils_1 = require("@aws-amplify/core/internals/utils");
|
|
6
|
+
/**
|
|
7
|
+
* Returns the current badge count (the number next to your app's icon). This function is safe to call (but will be
|
|
8
|
+
* ignored) even when your React Native app is running on platforms where badges are not supported.
|
|
9
|
+
*
|
|
10
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
11
|
+
* only React Native is supported by this API.
|
|
12
|
+
* @returns A promise that resolves to a number representing the current count displayed on the app badge.
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const badgeCount = await getBadgeCount();
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
exports.getBadgeCount = function () {
|
|
19
|
+
throw new utils_1.PlatformNotSupportedError();
|
|
20
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
var tslib_1 = require("tslib");
|
|
6
|
+
var react_native_1 = require("@aws-amplify/react-native");
|
|
7
|
+
var errorHelpers_1 = require("../../../errors/errorHelpers");
|
|
8
|
+
var getBadgeCountNative = react_native_1.loadAmplifyPushNotification().getBadgeCount;
|
|
9
|
+
exports.getBadgeCount = function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
10
|
+
return tslib_1.__generator(this, function (_a) {
|
|
11
|
+
errorHelpers_1.assertIsInitialized();
|
|
12
|
+
return [2 /*return*/, getBadgeCountNative()];
|
|
13
|
+
});
|
|
14
|
+
}); };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { GetLaunchNotification } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the notification which launched your app from a terminated state. The launch notification is consumed by
|
|
4
|
+
* calls to this function and will yield a null result if:
|
|
5
|
+
* 1. It is more than once (i.e. subsequent calls will be null)
|
|
6
|
+
* 2. Another notification was opened while your app was running (either in foreground or background)
|
|
7
|
+
* 3. Your app was brought back to the foreground by some other means (e.g. user tapped the app icon)
|
|
8
|
+
*
|
|
9
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
10
|
+
* only React Native is supported by this API.
|
|
11
|
+
* @returns {Promise<GetLaunchNotificationOutput>} - a promise resolving to {@link PushNotificationMessage} if there is
|
|
12
|
+
* a launch notification and `null` otherwise.
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const launchNotification = await getLaunchNotification();
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare const getLaunchNotification: GetLaunchNotification;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
var utils_1 = require("@aws-amplify/core/internals/utils");
|
|
6
|
+
/**
|
|
7
|
+
* Returns the notification which launched your app from a terminated state. The launch notification is consumed by
|
|
8
|
+
* calls to this function and will yield a null result if:
|
|
9
|
+
* 1. It is more than once (i.e. subsequent calls will be null)
|
|
10
|
+
* 2. Another notification was opened while your app was running (either in foreground or background)
|
|
11
|
+
* 3. Your app was brought back to the foreground by some other means (e.g. user tapped the app icon)
|
|
12
|
+
*
|
|
13
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
14
|
+
* only React Native is supported by this API.
|
|
15
|
+
* @returns {Promise<GetLaunchNotificationOutput>} - a promise resolving to {@link PushNotificationMessage} if there is
|
|
16
|
+
* a launch notification and `null` otherwise.
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const launchNotification = await getLaunchNotification();
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
exports.getLaunchNotification = function () {
|
|
23
|
+
throw new utils_1.PlatformNotSupportedError();
|
|
24
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
var react_native_1 = require("@aws-amplify/react-native");
|
|
6
|
+
var errorHelpers_1 = require("../../../errors/errorHelpers");
|
|
7
|
+
var getLaunchNotificationNative = react_native_1.loadAmplifyPushNotification().getLaunchNotification;
|
|
8
|
+
exports.getLaunchNotification = function () {
|
|
9
|
+
errorHelpers_1.assertIsInitialized();
|
|
10
|
+
return getLaunchNotificationNative();
|
|
11
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { GetPermissionStatus } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a string representing the current status of user permissions to display push notifications. The possible
|
|
4
|
+
* statuses are as follows:
|
|
5
|
+
*
|
|
6
|
+
* * `'shouldRequest'` - No permissions have been requested yet. It is idiomatic at this time to simply request for
|
|
7
|
+
* permissions from the user.
|
|
8
|
+
*
|
|
9
|
+
* * `'shouldExplainThenRequest'` - It is recommended at this time to provide some context or rationale to the user
|
|
10
|
+
* explaining why you want to send them push notifications before requesting for permissions.
|
|
11
|
+
*
|
|
12
|
+
* * `'granted'` - Permissions have been granted by the user. No further actions are needed and their app is ready to
|
|
13
|
+
* display notifications.
|
|
14
|
+
*
|
|
15
|
+
* * `'denied'` - Permissions have been denied by the user. Further attempts to request permissions will no longer
|
|
16
|
+
* trigger a permission dialog. Your app should now either degrade gracefully or prompt your user to grant the
|
|
17
|
+
* permissions needed in their device settings.
|
|
18
|
+
*
|
|
19
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
20
|
+
* only React Native is supported by this API.
|
|
21
|
+
* @return {Promise<GetPermissionStatusOutput>} a promise resolving to a string representing the current status of user
|
|
22
|
+
* selected notification permissions.
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const permissionStatus = await getPermissionStatus();
|
|
26
|
+
*/
|
|
27
|
+
export declare const getPermissionStatus: GetPermissionStatus;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
var utils_1 = require("@aws-amplify/core/internals/utils");
|
|
6
|
+
/**
|
|
7
|
+
* Returns a string representing the current status of user permissions to display push notifications. The possible
|
|
8
|
+
* statuses are as follows:
|
|
9
|
+
*
|
|
10
|
+
* * `'shouldRequest'` - No permissions have been requested yet. It is idiomatic at this time to simply request for
|
|
11
|
+
* permissions from the user.
|
|
12
|
+
*
|
|
13
|
+
* * `'shouldExplainThenRequest'` - It is recommended at this time to provide some context or rationale to the user
|
|
14
|
+
* explaining why you want to send them push notifications before requesting for permissions.
|
|
15
|
+
*
|
|
16
|
+
* * `'granted'` - Permissions have been granted by the user. No further actions are needed and their app is ready to
|
|
17
|
+
* display notifications.
|
|
18
|
+
*
|
|
19
|
+
* * `'denied'` - Permissions have been denied by the user. Further attempts to request permissions will no longer
|
|
20
|
+
* trigger a permission dialog. Your app should now either degrade gracefully or prompt your user to grant the
|
|
21
|
+
* permissions needed in their device settings.
|
|
22
|
+
*
|
|
23
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
24
|
+
* only React Native is supported by this API.
|
|
25
|
+
* @return {Promise<GetPermissionStatusOutput>} a promise resolving to a string representing the current status of user
|
|
26
|
+
* selected notification permissions.
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const permissionStatus = await getPermissionStatus();
|
|
30
|
+
*/
|
|
31
|
+
exports.getPermissionStatus = function () {
|
|
32
|
+
throw new utils_1.PlatformNotSupportedError();
|
|
33
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
var react_native_1 = require("@aws-amplify/react-native");
|
|
6
|
+
var errorHelpers_1 = require("../../../errors/errorHelpers");
|
|
7
|
+
var getPermissionStatusNative = react_native_1.loadAmplifyPushNotification().getPermissionStatus;
|
|
8
|
+
exports.getPermissionStatus = function () {
|
|
9
|
+
errorHelpers_1.assertIsInitialized();
|
|
10
|
+
return getPermissionStatusNative();
|
|
11
|
+
};
|
|
@@ -1,2 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { IdentifyUser } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user
|
|
4
|
+
* profile and activities or actions in your application. Activity can be tracked across devices & platforms by using
|
|
5
|
+
* the same `userId`.
|
|
6
|
+
*
|
|
7
|
+
* @param {IdentifyUserInput} input The input object used to construct requests sent to Pinpoint's UpdateEndpoint
|
|
8
|
+
* API.
|
|
9
|
+
* @throws service: {@link UpdateEndpointException} - Thrown when the underlying Pinpoint service returns an error.
|
|
10
|
+
* @throws validation: {@link PushNotificationValidationErrorCode} - Thrown when the provided parameters or library
|
|
11
|
+
* configuration is incorrect.
|
|
12
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
13
|
+
* only React Native is supported by this API.
|
|
14
|
+
* @returns A promise that will resolve when the operation is complete.
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* // Identify a user with Pinpoint
|
|
18
|
+
* await identifyUser({
|
|
19
|
+
* userId,
|
|
20
|
+
* userProfile: {
|
|
21
|
+
* email: 'userEmail@example.com'
|
|
22
|
+
* customProperties: {
|
|
23
|
+
* phoneNumber: ['555-555-5555'],
|
|
24
|
+
* },
|
|
25
|
+
* }
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* // Identify a user with Pinpoint specific options
|
|
32
|
+
* await identifyUser({
|
|
33
|
+
* userId,
|
|
34
|
+
* userProfile: {
|
|
35
|
+
* email: 'userEmail@example.com'
|
|
36
|
+
* customProperties: {
|
|
37
|
+
* phoneNumber: ['555-555-5555'],
|
|
38
|
+
* },
|
|
39
|
+
* demographic: {
|
|
40
|
+
* platform: 'ios',
|
|
41
|
+
* timezone: 'America/Los_Angeles'
|
|
42
|
+
* }
|
|
43
|
+
* },
|
|
44
|
+
* options: {
|
|
45
|
+
* address: 'device-address',
|
|
46
|
+
* optOut: 'NONE',
|
|
47
|
+
* userAttributes: {
|
|
48
|
+
* interests: ['food']
|
|
49
|
+
* },
|
|
50
|
+
* },
|
|
51
|
+
* });
|
|
52
|
+
*/
|
|
53
|
+
export declare const identifyUser: IdentifyUser;
|
|
@@ -2,8 +2,58 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
var utils_1 = require("@aws-amplify/core/internals/utils");
|
|
6
|
+
/**
|
|
7
|
+
* Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user
|
|
8
|
+
* profile and activities or actions in your application. Activity can be tracked across devices & platforms by using
|
|
9
|
+
* the same `userId`.
|
|
10
|
+
*
|
|
11
|
+
* @param {IdentifyUserInput} input The input object used to construct requests sent to Pinpoint's UpdateEndpoint
|
|
12
|
+
* API.
|
|
13
|
+
* @throws service: {@link UpdateEndpointException} - Thrown when the underlying Pinpoint service returns an error.
|
|
14
|
+
* @throws validation: {@link PushNotificationValidationErrorCode} - Thrown when the provided parameters or library
|
|
15
|
+
* configuration is incorrect.
|
|
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 will resolve when the operation is complete.
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* // Identify a user with Pinpoint
|
|
22
|
+
* await identifyUser({
|
|
23
|
+
* userId,
|
|
24
|
+
* userProfile: {
|
|
25
|
+
* email: 'userEmail@example.com'
|
|
26
|
+
* customProperties: {
|
|
27
|
+
* phoneNumber: ['555-555-5555'],
|
|
28
|
+
* },
|
|
29
|
+
* }
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* // Identify a user with Pinpoint specific options
|
|
36
|
+
* await identifyUser({
|
|
37
|
+
* userId,
|
|
38
|
+
* userProfile: {
|
|
39
|
+
* email: 'userEmail@example.com'
|
|
40
|
+
* customProperties: {
|
|
41
|
+
* phoneNumber: ['555-555-5555'],
|
|
42
|
+
* },
|
|
43
|
+
* demographic: {
|
|
44
|
+
* platform: 'ios',
|
|
45
|
+
* timezone: 'America/Los_Angeles'
|
|
46
|
+
* }
|
|
47
|
+
* },
|
|
48
|
+
* options: {
|
|
49
|
+
* address: 'device-address',
|
|
50
|
+
* optOut: 'NONE',
|
|
51
|
+
* userAttributes: {
|
|
52
|
+
* interests: ['food']
|
|
53
|
+
* },
|
|
54
|
+
* },
|
|
55
|
+
* });
|
|
56
|
+
*/
|
|
57
|
+
exports.identifyUser = function () {
|
|
58
|
+
throw new utils_1.PlatformNotSupportedError();
|
|
59
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
var tslib_1 = require("tslib");
|
|
6
|
+
var utils_1 = require("@aws-amplify/core/internals/utils");
|
|
7
|
+
var pinpoint_1 = require("@aws-amplify/core/internals/providers/pinpoint");
|
|
8
|
+
var errorHelpers_1 = require("../../../errors/errorHelpers");
|
|
9
|
+
var utils_2 = require("../../../utils");
|
|
10
|
+
var utils_3 = require("../utils");
|
|
11
|
+
exports.identifyUser = function (_a) {
|
|
12
|
+
var userId = _a.userId, userProfile = _a.userProfile, options = _a.options;
|
|
13
|
+
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
14
|
+
var _b, credentials, identityId, _c, appId, region, _d, address, optOut, userAttributes;
|
|
15
|
+
return tslib_1.__generator(this, function (_e) {
|
|
16
|
+
switch (_e.label) {
|
|
17
|
+
case 0:
|
|
18
|
+
errorHelpers_1.assertIsInitialized();
|
|
19
|
+
return [4 /*yield*/, utils_2.resolveCredentials()];
|
|
20
|
+
case 1:
|
|
21
|
+
_b = _e.sent(), credentials = _b.credentials, identityId = _b.identityId;
|
|
22
|
+
_c = utils_2.resolveConfig(), appId = _c.appId, region = _c.region;
|
|
23
|
+
_d = options !== null && options !== void 0 ? options : {}, address = _d.address, optOut = _d.optOut, userAttributes = _d.userAttributes;
|
|
24
|
+
pinpoint_1.updateEndpoint({
|
|
25
|
+
address: address,
|
|
26
|
+
channelType: utils_3.getChannelType(),
|
|
27
|
+
optOut: optOut,
|
|
28
|
+
appId: appId,
|
|
29
|
+
category: 'PushNotification',
|
|
30
|
+
credentials: credentials,
|
|
31
|
+
identityId: identityId,
|
|
32
|
+
region: region,
|
|
33
|
+
userAttributes: userAttributes,
|
|
34
|
+
userId: userId,
|
|
35
|
+
userProfile: userProfile,
|
|
36
|
+
userAgentValue: utils_3.getPushNotificationUserAgentString(utils_1.PushNotificationAction.IdentifyUser),
|
|
37
|
+
});
|
|
38
|
+
return [2 /*return*/];
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
};
|
|
@@ -1 +1,11 @@
|
|
|
1
|
+
export { getBadgeCount } from './getBadgeCount';
|
|
2
|
+
export { getLaunchNotification } from './getLaunchNotification';
|
|
3
|
+
export { getPermissionStatus } from './getPermissionStatus';
|
|
1
4
|
export { identifyUser } from './identifyUser';
|
|
5
|
+
export { initializePushNotifications } from './initializePushNotifications';
|
|
6
|
+
export { onNotificationOpened } from './onNotificationOpened';
|
|
7
|
+
export { onNotificationReceivedInBackground } from './onNotificationReceivedInBackground';
|
|
8
|
+
export { onNotificationReceivedInForeground } from './onNotificationReceivedInForeground';
|
|
9
|
+
export { onTokenReceived } from './onTokenReceived';
|
|
10
|
+
export { requestPermissions } from './requestPermissions';
|
|
11
|
+
export { setBadgeCount } from './setBadgeCount';
|
|
@@ -2,6 +2,25 @@
|
|
|
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
|
+
var getBadgeCount_1 = require("./getBadgeCount");
|
|
6
|
+
exports.getBadgeCount = getBadgeCount_1.getBadgeCount;
|
|
7
|
+
var getLaunchNotification_1 = require("./getLaunchNotification");
|
|
8
|
+
exports.getLaunchNotification = getLaunchNotification_1.getLaunchNotification;
|
|
9
|
+
var getPermissionStatus_1 = require("./getPermissionStatus");
|
|
10
|
+
exports.getPermissionStatus = getPermissionStatus_1.getPermissionStatus;
|
|
5
11
|
var identifyUser_1 = require("./identifyUser");
|
|
6
12
|
exports.identifyUser = identifyUser_1.identifyUser;
|
|
7
|
-
|
|
13
|
+
var initializePushNotifications_1 = require("./initializePushNotifications");
|
|
14
|
+
exports.initializePushNotifications = initializePushNotifications_1.initializePushNotifications;
|
|
15
|
+
var onNotificationOpened_1 = require("./onNotificationOpened");
|
|
16
|
+
exports.onNotificationOpened = onNotificationOpened_1.onNotificationOpened;
|
|
17
|
+
var onNotificationReceivedInBackground_1 = require("./onNotificationReceivedInBackground");
|
|
18
|
+
exports.onNotificationReceivedInBackground = onNotificationReceivedInBackground_1.onNotificationReceivedInBackground;
|
|
19
|
+
var onNotificationReceivedInForeground_1 = require("./onNotificationReceivedInForeground");
|
|
20
|
+
exports.onNotificationReceivedInForeground = onNotificationReceivedInForeground_1.onNotificationReceivedInForeground;
|
|
21
|
+
var onTokenReceived_1 = require("./onTokenReceived");
|
|
22
|
+
exports.onTokenReceived = onTokenReceived_1.onTokenReceived;
|
|
23
|
+
var requestPermissions_1 = require("./requestPermissions");
|
|
24
|
+
exports.requestPermissions = requestPermissions_1.requestPermissions;
|
|
25
|
+
var setBadgeCount_1 = require("./setBadgeCount");
|
|
26
|
+
exports.setBadgeCount = setBadgeCount_1.setBadgeCount;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { InitializePushNotifications } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Initialize and set up the push notification category. The category must be first initialized before all other
|
|
4
|
+
* functionalities become available.
|
|
5
|
+
*
|
|
6
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
7
|
+
* only React Native is supported by this API.
|
|
8
|
+
* @remarks
|
|
9
|
+
* It is recommended that this be called as early in your app as possible at the root of your application to allow
|
|
10
|
+
* background processing of notifications.
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* Amplify.configure(config);
|
|
14
|
+
* initializePushNotifications();
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare const initializePushNotifications: InitializePushNotifications;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
var utils_1 = require("@aws-amplify/core/internals/utils");
|
|
6
|
+
/**
|
|
7
|
+
* Initialize and set up the push notification category. The category must be first initialized before all other
|
|
8
|
+
* functionalities become available.
|
|
9
|
+
*
|
|
10
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
11
|
+
* only React Native is supported by this API.
|
|
12
|
+
* @remarks
|
|
13
|
+
* It is recommended that this be called as early in your app as possible at the root of your application to allow
|
|
14
|
+
* background processing of notifications.
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* Amplify.configure(config);
|
|
18
|
+
* initializePushNotifications();
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
exports.initializePushNotifications = function () {
|
|
22
|
+
throw new utils_1.PlatformNotSupportedError();
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const initializePushNotifications: () => Promise<void>;
|