@aws-amplify/notifications 1.6.6-unstable.7762f1a.0 → 2.0.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/README.md +3 -0
- package/in-app-messaging/package.json +7 -0
- package/in-app-messaging/pinpoint/package.json +7 -0
- package/lib/{common/eventListeners/index.d.ts → eventListeners/eventListeners.d.ts} +2 -2
- package/lib/eventListeners/eventListeners.js +38 -0
- package/lib/eventListeners/index.d.ts +2 -0
- package/lib/eventListeners/index.js +9 -0
- package/lib/eventListeners/types.d.ts +10 -0
- package/lib/{InAppMessaging/SessionTracker → eventListeners}/types.js +0 -1
- package/lib/inAppMessaging/errors/InAppMessagingError.d.ts +7 -0
- package/lib/inAppMessaging/errors/InAppMessagingError.js +19 -0
- package/lib/inAppMessaging/errors/assertServiceError.d.ts +2 -0
- package/lib/inAppMessaging/errors/assertServiceError.js +19 -0
- package/lib/inAppMessaging/errors/assertValidationError.d.ts +5 -0
- package/lib/inAppMessaging/errors/assertValidationError.js +17 -0
- package/lib/inAppMessaging/errors/index.d.ts +4 -0
- package/lib/inAppMessaging/errors/index.js +14 -0
- package/lib/inAppMessaging/errors/validation.d.ts +8 -0
- package/lib/inAppMessaging/errors/validation.js +27 -0
- package/lib/inAppMessaging/index.d.ts +2 -0
- package/lib/inAppMessaging/index.js +17 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/clearMessages.d.ts +13 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/clearMessages.js +26 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/dispatchEvent.d.ts +26 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js +56 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +51 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.js +79 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/index.d.ts +11 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/index.js +27 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.d.ts +12 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +57 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.d.ts +16 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +26 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.d.ts +18 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js +27 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.d.ts +18 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js +27 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.d.ts +18 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js +27 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageReceived.d.ts +18 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js +27 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/setConflictHandler.d.ts +32 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +65 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/syncMessages.d.ts +16 -0
- package/lib/inAppMessaging/providers/pinpoint/apis/syncMessages.js +69 -0
- package/lib/inAppMessaging/providers/pinpoint/index.d.ts +2 -0
- package/lib/inAppMessaging/providers/pinpoint/index.js +17 -0
- package/lib/inAppMessaging/providers/pinpoint/types/index.d.ts +4 -0
- package/lib/{InAppMessaging → inAppMessaging/providers/pinpoint/types}/index.js +2 -4
- package/lib/inAppMessaging/providers/pinpoint/types/inputs.d.ts +37 -0
- package/lib/{PushNotification/Platform/types.js → inAppMessaging/providers/pinpoint/types/inputs.js} +0 -1
- package/lib/inAppMessaging/providers/pinpoint/types/options.d.ts +5 -0
- package/lib/{common/AWSPinpointProviderCommon/types.js → inAppMessaging/providers/pinpoint/types/options.js} +0 -1
- package/lib/inAppMessaging/providers/pinpoint/types/outputs.d.ts +17 -0
- package/lib/{common/eventListeners/types.js → inAppMessaging/providers/pinpoint/types/outputs.js} +0 -1
- package/lib/inAppMessaging/providers/pinpoint/types/types.d.ts +19 -0
- package/lib/inAppMessaging/providers/pinpoint/types/types.js +11 -0
- package/lib/inAppMessaging/providers/pinpoint/utils/constants.d.ts +4 -0
- package/lib/inAppMessaging/providers/pinpoint/utils/constants.js +9 -0
- package/lib/{InAppMessaging/Providers/AWSPinpointProvider/utils.d.ts → inAppMessaging/providers/pinpoint/utils/helpers.d.ts} +6 -7
- package/lib/inAppMessaging/providers/pinpoint/utils/helpers.js +264 -0
- package/lib/inAppMessaging/providers/pinpoint/utils/index.d.ts +5 -0
- package/lib/inAppMessaging/providers/pinpoint/utils/index.js +20 -0
- package/lib/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.d.ts +6 -0
- package/lib/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js +169 -0
- package/lib/inAppMessaging/providers/pinpoint/utils/resolveConfig.d.ts +7 -0
- package/lib/inAppMessaging/providers/pinpoint/utils/resolveConfig.js +17 -0
- package/lib/inAppMessaging/providers/pinpoint/utils/resolveCredentials.d.ts +7 -0
- package/lib/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js +16 -0
- package/lib/inAppMessaging/providers/pinpoint/utils/userAgent.d.ts +4 -0
- package/lib/inAppMessaging/providers/pinpoint/utils/userAgent.js +20 -0
- package/lib/inAppMessaging/types/event.d.ts +6 -0
- package/lib/inAppMessaging/types/event.js +4 -0
- package/lib/inAppMessaging/types/index.d.ts +4 -0
- package/lib/inAppMessaging/types/index.js +4 -0
- package/lib/inAppMessaging/types/inputs.d.ts +19 -0
- package/lib/inAppMessaging/types/inputs.js +4 -0
- package/lib/inAppMessaging/types/message.d.ts +44 -0
- package/lib/inAppMessaging/types/message.js +4 -0
- package/lib/inAppMessaging/types/options.d.ts +4 -0
- package/lib/inAppMessaging/types/options.js +4 -0
- package/lib/inAppMessaging/utils/index.d.ts +1 -0
- package/lib/inAppMessaging/utils/index.js +9 -0
- package/lib/inAppMessaging/utils/statusHelpers.d.ts +13 -0
- package/lib/inAppMessaging/utils/statusHelpers.js +27 -0
- package/lib/index.d.ts +0 -6
- package/lib/index.js +0 -10
- package/lib/pushNotifications/errors/PushNotificationError.d.ts +4 -0
- package/lib/pushNotifications/errors/PushNotificationError.js +16 -0
- package/lib/pushNotifications/errors/errorHelpers.d.ts +9 -0
- package/lib/pushNotifications/errors/errorHelpers.js +35 -0
- package/lib/pushNotifications/errors/index.d.ts +2 -0
- package/lib/pushNotifications/errors/index.js +10 -0
- package/lib/pushNotifications/index.d.ts +3 -0
- package/lib/pushNotifications/index.js +19 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.d.ts +14 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.js +22 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js +13 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.d.ts +18 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js +26 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js +13 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.d.ts +27 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js +35 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js +13 -0
- package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.d.ts +53 -0
- package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.js +61 -0
- package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.native.js +31 -0
- package/lib/pushNotifications/providers/pinpoint/apis/index.d.ts +11 -0
- package/lib/pushNotifications/providers/pinpoint/apis/index.js +27 -0
- package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.d.ts +17 -0
- package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js +25 -0
- package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.d.ts +1 -0
- package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js +133 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.d.ts +27 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js +35 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js +12 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.d.ts +43 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js +51 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js +12 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.d.ts +27 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js +35 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js +12 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.d.ts +28 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.js +36 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js +12 -0
- package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.d.ts +32 -0
- package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.js +40 -0
- package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js +13 -0
- package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.d.ts +14 -0
- package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.js +22 -0
- package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.d.ts +2 -0
- package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js +13 -0
- package/lib/pushNotifications/providers/pinpoint/index.d.ts +3 -0
- package/lib/pushNotifications/providers/pinpoint/index.js +17 -0
- package/lib/pushNotifications/providers/pinpoint/types/analytics.d.ts +6 -0
- package/lib/pushNotifications/providers/pinpoint/types/analytics.js +4 -0
- package/lib/pushNotifications/providers/pinpoint/types/apis.d.ts +13 -0
- package/lib/pushNotifications/providers/pinpoint/types/apis.js +4 -0
- package/lib/pushNotifications/providers/pinpoint/types/index.d.ts +6 -0
- package/lib/pushNotifications/providers/pinpoint/types/index.js +4 -0
- 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 +6 -0
- package/lib/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js +43 -0
- package/lib/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.d.ts +7 -0
- package/lib/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js +56 -0
- package/lib/pushNotifications/providers/pinpoint/utils/getChannelType.d.ts +5 -0
- package/lib/pushNotifications/providers/pinpoint/utils/getChannelType.js +25 -0
- package/lib/pushNotifications/providers/pinpoint/utils/index.d.ts +4 -0
- package/lib/pushNotifications/providers/pinpoint/utils/index.js +13 -0
- package/lib/pushNotifications/providers/pinpoint/utils/resolveConfig.d.ts +7 -0
- package/lib/pushNotifications/providers/pinpoint/utils/resolveConfig.js +17 -0
- package/lib/pushNotifications/types/errors.d.ts +3 -0
- package/lib/pushNotifications/types/errors.js +9 -0
- package/lib/pushNotifications/types/index.d.ts +6 -0
- package/lib/pushNotifications/types/index.js +24 -0
- package/lib/pushNotifications/types/inputs.d.ts +24 -0
- package/lib/pushNotifications/types/inputs.js +4 -0
- package/lib/pushNotifications/types/module.d.ts +31 -0
- package/lib/pushNotifications/types/module.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 +4 -0
- package/lib/pushNotifications/types/pushNotifications.js +4 -0
- package/lib/pushNotifications/utils/getPushNotificationUserAgentString.d.ts +2 -0
- package/lib/pushNotifications/utils/getPushNotificationUserAgentString.js +11 -0
- package/lib/pushNotifications/utils/index.d.ts +4 -0
- package/lib/pushNotifications/utils/index.js +15 -0
- package/lib/pushNotifications/utils/initializationManager.d.ts +12 -0
- package/lib/pushNotifications/utils/initializationManager.js +22 -0
- package/lib/pushNotifications/utils/resolveCredentials.d.ts +7 -0
- package/lib/pushNotifications/utils/resolveCredentials.js +16 -0
- package/lib/pushNotifications/utils/tokenManager.d.ts +12 -0
- package/lib/pushNotifications/utils/tokenManager.js +22 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib-esm/{common/eventListeners/index.d.ts → eventListeners/eventListeners.d.ts} +2 -2
- package/lib-esm/eventListeners/eventListeners.js +32 -0
- package/lib-esm/eventListeners/index.d.ts +2 -0
- package/lib-esm/{common → eventListeners}/index.js +0 -3
- package/lib-esm/eventListeners/types.d.ts +10 -0
- package/lib-esm/{PushNotification/Platform → eventListeners}/types.js +1 -1
- package/lib-esm/inAppMessaging/errors/InAppMessagingError.d.ts +7 -0
- package/lib-esm/inAppMessaging/errors/InAppMessagingError.js +15 -0
- package/lib-esm/inAppMessaging/errors/assertServiceError.d.ts +2 -0
- package/lib-esm/inAppMessaging/errors/assertServiceError.js +15 -0
- package/lib-esm/inAppMessaging/errors/assertValidationError.d.ts +5 -0
- package/lib-esm/inAppMessaging/errors/assertValidationError.js +13 -0
- package/lib-esm/inAppMessaging/errors/index.d.ts +4 -0
- package/lib-esm/inAppMessaging/errors/index.js +6 -0
- package/lib-esm/inAppMessaging/errors/validation.d.ts +8 -0
- package/lib-esm/inAppMessaging/errors/validation.js +24 -0
- package/lib-esm/inAppMessaging/index.d.ts +2 -0
- package/lib-esm/inAppMessaging/index.js +3 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/clearMessages.d.ts +13 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/clearMessages.js +22 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.d.ts +26 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js +49 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +51 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.js +75 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.d.ts +11 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.js +13 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.d.ts +12 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +53 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.d.ts +16 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +22 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.d.ts +18 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js +23 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.d.ts +18 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js +23 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.d.ts +18 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js +23 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.d.ts +18 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js +23 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.d.ts +32 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +61 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/syncMessages.d.ts +16 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/apis/syncMessages.js +65 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/index.d.ts +2 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/index.js +3 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/types/index.d.ts +4 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/types/index.js +3 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/types/inputs.d.ts +37 -0
- package/lib-esm/{common/AWSPinpointProviderCommon/types.js → inAppMessaging/providers/pinpoint/types/inputs.js} +1 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/options.d.ts +5 -0
- package/lib-esm/{common/eventListeners/types.js → inAppMessaging/providers/pinpoint/types/options.js} +1 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.d.ts +17 -0
- package/lib-esm/{InAppMessaging/SessionTracker/types.js → inAppMessaging/providers/pinpoint/types/outputs.js} +1 -1
- package/lib-esm/inAppMessaging/providers/pinpoint/types/types.d.ts +19 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/types/types.js +8 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/constants.d.ts +4 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/constants.js +6 -0
- package/lib-esm/{InAppMessaging/Providers/AWSPinpointProvider/utils.d.ts → inAppMessaging/providers/pinpoint/utils/helpers.d.ts} +6 -7
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.js +246 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/index.d.ts +5 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/index.js +7 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.d.ts +6 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js +163 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveConfig.d.ts +7 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveConfig.js +13 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.d.ts +7 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js +12 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/userAgent.d.ts +4 -0
- package/lib-esm/inAppMessaging/providers/pinpoint/utils/userAgent.js +15 -0
- package/lib-esm/inAppMessaging/types/event.d.ts +6 -0
- package/lib-esm/inAppMessaging/types/event.js +3 -0
- package/lib-esm/inAppMessaging/types/index.d.ts +4 -0
- package/lib-esm/inAppMessaging/types/index.js +3 -0
- package/lib-esm/inAppMessaging/types/inputs.d.ts +19 -0
- package/lib-esm/inAppMessaging/types/inputs.js +3 -0
- package/lib-esm/inAppMessaging/types/message.d.ts +44 -0
- package/lib-esm/inAppMessaging/types/message.js +3 -0
- package/lib-esm/inAppMessaging/types/options.d.ts +4 -0
- package/lib-esm/inAppMessaging/types/options.js +3 -0
- package/lib-esm/inAppMessaging/utils/index.d.ts +1 -0
- package/lib-esm/inAppMessaging/utils/index.js +3 -0
- package/lib-esm/inAppMessaging/utils/statusHelpers.d.ts +13 -0
- package/lib-esm/inAppMessaging/utils/statusHelpers.js +21 -0
- package/lib-esm/index.d.ts +0 -6
- package/lib-esm/index.js +1 -5
- package/lib-esm/pushNotifications/errors/PushNotificationError.d.ts +4 -0
- package/lib-esm/pushNotifications/errors/PushNotificationError.js +12 -0
- package/lib-esm/pushNotifications/errors/errorHelpers.d.ts +9 -0
- package/lib-esm/pushNotifications/errors/errorHelpers.js +31 -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 -0
- package/lib-esm/pushNotifications/index.js +4 -0
- 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 +9 -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 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.js +57 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.d.ts +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.js +27 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/index.d.ts +11 -0
- package/lib-esm/pushNotifications/providers/pinpoint/apis/index.js +13 -0
- 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 +129 -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 -0
- package/lib-esm/pushNotifications/providers/pinpoint/index.js +3 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/analytics.d.ts +6 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/analytics.js +3 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/apis.d.ts +13 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/apis.js +3 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/index.d.ts +6 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/index.js +3 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/inputs.d.ts +9 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/inputs.js +3 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/options.d.ts +5 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/options.js +3 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/outputs.d.ts +9 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/outputs.js +3 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/pushNotifications.d.ts +2 -0
- package/lib-esm/pushNotifications/providers/pinpoint/types/pushNotifications.js +3 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.d.ts +6 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js +39 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.d.ts +7 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js +52 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getChannelType.d.ts +5 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/getChannelType.js +21 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/index.d.ts +4 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/index.js +6 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/resolveConfig.d.ts +7 -0
- package/lib-esm/pushNotifications/providers/pinpoint/utils/resolveConfig.js +13 -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 +6 -0
- package/lib-esm/pushNotifications/types/index.js +8 -0
- package/lib-esm/pushNotifications/types/inputs.d.ts +24 -0
- package/lib-esm/pushNotifications/types/inputs.js +3 -0
- package/lib-esm/pushNotifications/types/module.d.ts +31 -0
- package/lib-esm/pushNotifications/types/module.js +3 -0
- package/lib-esm/pushNotifications/types/options.d.ts +4 -0
- package/lib-esm/pushNotifications/types/options.js +3 -0
- package/lib-esm/pushNotifications/types/outputs.d.ts +10 -0
- package/lib-esm/pushNotifications/types/outputs.js +3 -0
- package/lib-esm/pushNotifications/types/pushNotifications.d.ts +4 -0
- package/lib-esm/pushNotifications/types/pushNotifications.js +3 -0
- package/lib-esm/pushNotifications/utils/getPushNotificationUserAgentString.d.ts +2 -0
- package/lib-esm/pushNotifications/utils/getPushNotificationUserAgentString.js +7 -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 +17 -0
- package/lib-esm/pushNotifications/utils/resolveCredentials.d.ts +7 -0
- package/lib-esm/pushNotifications/utils/resolveCredentials.js +12 -0
- package/lib-esm/pushNotifications/utils/tokenManager.d.ts +12 -0
- package/lib-esm/pushNotifications/utils/tokenManager.js +17 -0
- package/lib-esm/tsconfig.tsbuildinfo +1 -0
- package/package.json +104 -38
- package/push-notifications/package.json +7 -0
- package/push-notifications/pinpoint/package.json +7 -0
- package/src/{common/eventListeners/index.ts → eventListeners/eventListeners.ts} +5 -3
- package/src/{common → eventListeners}/index.ts +1 -3
- package/src/{common/eventListeners → eventListeners}/types.ts +6 -2
- package/src/inAppMessaging/errors/InAppMessagingError.ts +21 -0
- package/src/inAppMessaging/errors/assertServiceError.ts +24 -0
- package/src/inAppMessaging/errors/assertValidationError.ts +22 -0
- package/src/inAppMessaging/errors/index.ts +10 -0
- package/src/inAppMessaging/errors/validation.ts +29 -0
- package/src/inAppMessaging/index.ts +39 -0
- package/src/inAppMessaging/providers/pinpoint/apis/clearMessages.ts +26 -0
- package/src/inAppMessaging/providers/pinpoint/apis/dispatchEvent.ts +63 -0
- package/src/inAppMessaging/providers/pinpoint/apis/identifyUser.ts +94 -0
- package/src/inAppMessaging/providers/pinpoint/apis/index.ts +14 -0
- package/src/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.ts +62 -0
- package/src/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.ts +28 -0
- package/src/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.ts +29 -0
- package/src/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.ts +29 -0
- package/src/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.ts +29 -0
- package/src/inAppMessaging/providers/pinpoint/apis/onMessageReceived.ts +29 -0
- package/src/inAppMessaging/providers/pinpoint/apis/setConflictHandler.ts +68 -0
- package/src/inAppMessaging/providers/pinpoint/apis/syncMessages.ts +88 -0
- package/src/inAppMessaging/providers/pinpoint/index.ts +31 -0
- package/src/inAppMessaging/providers/pinpoint/types/index.ts +29 -0
- package/src/inAppMessaging/providers/pinpoint/types/inputs.ts +58 -0
- package/src/inAppMessaging/providers/pinpoint/types/options.ts +9 -0
- package/src/inAppMessaging/providers/pinpoint/types/outputs.ts +24 -0
- package/src/{InAppMessaging/Providers/AWSPinpointProvider → inAppMessaging/providers/pinpoint/types}/types.ts +9 -1
- package/src/inAppMessaging/providers/pinpoint/utils/constants.ts +6 -0
- package/src/{InAppMessaging/Providers/AWSPinpointProvider/utils.ts → inAppMessaging/providers/pinpoint/utils/helpers.ts} +74 -58
- package/src/inAppMessaging/providers/pinpoint/utils/index.ts +18 -0
- package/src/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.ts +210 -0
- package/src/inAppMessaging/providers/pinpoint/utils/resolveConfig.ts +19 -0
- package/src/inAppMessaging/providers/pinpoint/utils/resolveCredentials.ts +20 -0
- package/src/inAppMessaging/providers/pinpoint/utils/userAgent.ts +25 -0
- package/src/inAppMessaging/types/event.ts +14 -0
- package/src/{InAppMessaging → inAppMessaging/types}/index.ts +7 -8
- package/src/inAppMessaging/types/inputs.ts +27 -0
- package/src/inAppMessaging/types/message.ts +62 -0
- package/src/inAppMessaging/types/options.ts +7 -0
- package/src/{PushNotification/Providers → inAppMessaging/utils}/index.ts +5 -1
- package/src/inAppMessaging/utils/statusHelpers.ts +32 -0
- package/src/index.ts +0 -24
- 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 +32 -0
- 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 +39 -0
- package/src/pushNotifications/providers/pinpoint/apis/identifyUser.ts +62 -0
- package/src/pushNotifications/providers/pinpoint/apis/index.ts +14 -0
- package/src/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.ts +209 -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 +34 -0
- 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 +66 -0
- package/src/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.ts +66 -0
- package/src/pushNotifications/providers/pinpoint/utils/getChannelType.ts +25 -0
- package/src/pushNotifications/providers/pinpoint/utils/index.ts +7 -0
- package/src/pushNotifications/providers/pinpoint/utils/resolveConfig.ts +16 -0
- package/src/{InAppMessaging/Providers/index.ts → pushNotifications/types/errors.ts} +3 -1
- package/src/pushNotifications/types/index.ts +9 -0
- package/src/pushNotifications/types/inputs.ts +45 -0
- package/src/pushNotifications/types/module.ts +42 -0
- package/src/pushNotifications/types/options.ts +7 -0
- package/src/pushNotifications/types/outputs.ts +28 -0
- package/src/pushNotifications/types/pushNotifications.ts +17 -0
- package/src/pushNotifications/utils/getPushNotificationUserAgentString.ts +15 -0
- package/src/pushNotifications/utils/index.ts +7 -0
- package/src/pushNotifications/utils/initializationManager.ts +20 -0
- package/src/pushNotifications/utils/resolveCredentials.ts +14 -0
- package/src/pushNotifications/utils/tokenManager.ts +20 -0
- package/lib/.tsbuildinfo +0 -3
- package/lib/InAppMessaging/InAppMessaging.d.ts +0 -57
- package/lib/InAppMessaging/InAppMessaging.js +0 -340
- package/lib/InAppMessaging/InAppMessaging.js.map +0 -1
- package/lib/InAppMessaging/Providers/AWSPinpointProvider/index.d.ts +0 -31
- package/lib/InAppMessaging/Providers/AWSPinpointProvider/index.js +0 -266
- package/lib/InAppMessaging/Providers/AWSPinpointProvider/index.js.map +0 -1
- package/lib/InAppMessaging/Providers/AWSPinpointProvider/types.d.ts +0 -16
- package/lib/InAppMessaging/Providers/AWSPinpointProvider/types.js +0 -11
- package/lib/InAppMessaging/Providers/AWSPinpointProvider/types.js.map +0 -1
- package/lib/InAppMessaging/Providers/AWSPinpointProvider/utils.js +0 -247
- package/lib/InAppMessaging/Providers/AWSPinpointProvider/utils.js.map +0 -1
- package/lib/InAppMessaging/Providers/index.d.ts +0 -1
- package/lib/InAppMessaging/Providers/index.js +0 -7
- package/lib/InAppMessaging/Providers/index.js.map +0 -1
- package/lib/InAppMessaging/SessionTracker/SessionTracker.d.ts +0 -9
- package/lib/InAppMessaging/SessionTracker/SessionTracker.js +0 -68
- 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/index.d.ts +0 -2
- package/lib/InAppMessaging/index.js.map +0 -1
- package/lib/InAppMessaging/types.d.ts +0 -87
- package/lib/InAppMessaging/types.js +0 -12
- package/lib/InAppMessaging/types.js.map +0 -1
- package/lib/Notifications.d.ts +0 -24
- package/lib/Notifications.js +0 -94
- package/lib/Notifications.js.map +0 -1
- package/lib/PushNotification/NotEnabledError.d.ts +0 -3
- package/lib/PushNotification/NotEnabledError.js +0 -16
- package/lib/PushNotification/NotEnabledError.js.map +0 -1
- package/lib/PushNotification/Platform/index.d.ts +0 -2
- package/lib/PushNotification/Platform/index.js +0 -26
- package/lib/PushNotification/Platform/index.js.map +0 -1
- package/lib/PushNotification/Platform/index.native.d.ts +0 -2
- package/lib/PushNotification/Platform/index.native.js +0 -8
- package/lib/PushNotification/Platform/index.native.js.map +0 -1
- package/lib/PushNotification/Platform/types.d.ts +0 -5
- package/lib/PushNotification/Platform/types.js.map +0 -1
- package/lib/PushNotification/PlatformNotSupportedError.d.ts +0 -3
- package/lib/PushNotification/PlatformNotSupportedError.js +0 -16
- package/lib/PushNotification/PlatformNotSupportedError.js.map +0 -1
- package/lib/PushNotification/Providers/AWSPinpointProvider/index.d.ts +0 -15
- package/lib/PushNotification/Providers/AWSPinpointProvider/index.js +0 -114
- package/lib/PushNotification/Providers/AWSPinpointProvider/index.js.map +0 -1
- package/lib/PushNotification/Providers/AWSPinpointProvider/types.d.ts +0 -9
- package/lib/PushNotification/Providers/AWSPinpointProvider/types.js +0 -16
- package/lib/PushNotification/Providers/AWSPinpointProvider/types.js.map +0 -1
- package/lib/PushNotification/Providers/AWSPinpointProvider/utils.d.ts +0 -7
- package/lib/PushNotification/Providers/AWSPinpointProvider/utils.js +0 -58
- package/lib/PushNotification/Providers/AWSPinpointProvider/utils.js.map +0 -1
- package/lib/PushNotification/Providers/index.d.ts +0 -1
- package/lib/PushNotification/Providers/index.js +0 -7
- package/lib/PushNotification/Providers/index.js.map +0 -1
- package/lib/PushNotification/PushNotification.d.ts +0 -39
- package/lib/PushNotification/PushNotification.js +0 -91
- package/lib/PushNotification/PushNotification.js.map +0 -1
- package/lib/PushNotification/PushNotification.native.d.ts +0 -63
- package/lib/PushNotification/PushNotification.native.js +0 -332
- package/lib/PushNotification/PushNotification.native.js.map +0 -1
- package/lib/PushNotification/index.d.ts +0 -2
- package/lib/PushNotification/index.js +0 -9
- package/lib/PushNotification/index.js.map +0 -1
- package/lib/PushNotification/types.d.ts +0 -77
- package/lib/PushNotification/types.js +0 -12
- package/lib/PushNotification/types.js.map +0 -1
- package/lib/PushNotification/utils.d.ts +0 -3
- package/lib/PushNotification/utils.js +0 -81
- package/lib/PushNotification/utils.js.map +0 -1
- package/lib/common/AWSPinpointProviderCommon/index.d.ts +0 -35
- package/lib/common/AWSPinpointProviderCommon/index.js +0 -280
- 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/constants.d.ts +0 -1
- package/lib/common/constants.js +0 -8
- package/lib/common/constants.js.map +0 -1
- package/lib/common/eventListeners/index.js +0 -55
- package/lib/common/eventListeners/index.js.map +0 -1
- package/lib/common/eventListeners/types.d.ts +0 -7
- package/lib/common/eventListeners/types.js.map +0 -1
- package/lib/common/index.d.ts +0 -4
- package/lib/common/index.js +0 -13
- package/lib/common/index.js.map +0 -1
- package/lib/index.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/InAppMessaging/InAppMessaging.d.ts +0 -57
- package/lib-esm/InAppMessaging/InAppMessaging.js +0 -338
- package/lib-esm/InAppMessaging/InAppMessaging.js.map +0 -1
- package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/index.d.ts +0 -31
- package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/index.js +0 -264
- package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/index.js.map +0 -1
- package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/types.d.ts +0 -16
- package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/types.js +0 -9
- package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/types.js.map +0 -1
- package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/utils.js +0 -245
- package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/utils.js.map +0 -1
- package/lib-esm/InAppMessaging/Providers/index.d.ts +0 -1
- package/lib-esm/InAppMessaging/Providers/index.js +0 -4
- package/lib-esm/InAppMessaging/Providers/index.js.map +0 -1
- package/lib-esm/InAppMessaging/SessionTracker/SessionTracker.d.ts +0 -9
- package/lib-esm/InAppMessaging/SessionTracker/SessionTracker.js +0 -65
- 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/index.d.ts +0 -2
- package/lib-esm/InAppMessaging/index.js +0 -5
- package/lib-esm/InAppMessaging/index.js.map +0 -1
- package/lib-esm/InAppMessaging/types.d.ts +0 -87
- package/lib-esm/InAppMessaging/types.js +0 -10
- package/lib-esm/InAppMessaging/types.js.map +0 -1
- package/lib-esm/Notifications.d.ts +0 -24
- package/lib-esm/Notifications.js +0 -92
- package/lib-esm/Notifications.js.map +0 -1
- package/lib-esm/PushNotification/NotEnabledError.d.ts +0 -3
- package/lib-esm/PushNotification/NotEnabledError.js +0 -14
- package/lib-esm/PushNotification/NotEnabledError.js.map +0 -1
- package/lib-esm/PushNotification/Platform/index.d.ts +0 -2
- package/lib-esm/PushNotification/Platform/index.js +0 -24
- package/lib-esm/PushNotification/Platform/index.js.map +0 -1
- package/lib-esm/PushNotification/Platform/index.native.d.ts +0 -2
- package/lib-esm/PushNotification/Platform/index.native.js +0 -6
- package/lib-esm/PushNotification/Platform/index.native.js.map +0 -1
- package/lib-esm/PushNotification/Platform/types.d.ts +0 -5
- package/lib-esm/PushNotification/Platform/types.js.map +0 -1
- package/lib-esm/PushNotification/PlatformNotSupportedError.d.ts +0 -3
- package/lib-esm/PushNotification/PlatformNotSupportedError.js +0 -14
- package/lib-esm/PushNotification/PlatformNotSupportedError.js.map +0 -1
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/index.d.ts +0 -15
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/index.js +0 -112
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/index.js.map +0 -1
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/types.d.ts +0 -9
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/types.js +0 -14
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/types.js.map +0 -1
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/utils.d.ts +0 -7
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/utils.js +0 -56
- package/lib-esm/PushNotification/Providers/AWSPinpointProvider/utils.js.map +0 -1
- package/lib-esm/PushNotification/Providers/index.d.ts +0 -1
- package/lib-esm/PushNotification/Providers/index.js +0 -4
- package/lib-esm/PushNotification/Providers/index.js.map +0 -1
- package/lib-esm/PushNotification/PushNotification.d.ts +0 -39
- package/lib-esm/PushNotification/PushNotification.js +0 -89
- package/lib-esm/PushNotification/PushNotification.js.map +0 -1
- package/lib-esm/PushNotification/PushNotification.native.d.ts +0 -63
- package/lib-esm/PushNotification/PushNotification.native.js +0 -330
- package/lib-esm/PushNotification/PushNotification.native.js.map +0 -1
- package/lib-esm/PushNotification/index.d.ts +0 -2
- package/lib-esm/PushNotification/index.js +0 -5
- package/lib-esm/PushNotification/index.js.map +0 -1
- package/lib-esm/PushNotification/types.d.ts +0 -77
- package/lib-esm/PushNotification/types.js +0 -10
- package/lib-esm/PushNotification/types.js.map +0 -1
- package/lib-esm/PushNotification/utils.d.ts +0 -3
- package/lib-esm/PushNotification/utils.js +0 -79
- package/lib-esm/PushNotification/utils.js.map +0 -1
- package/lib-esm/common/AWSPinpointProviderCommon/index.d.ts +0 -35
- package/lib-esm/common/AWSPinpointProviderCommon/index.js +0 -278
- 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/constants.d.ts +0 -1
- package/lib-esm/common/constants.js +0 -6
- package/lib-esm/common/constants.js.map +0 -1
- package/lib-esm/common/eventListeners/index.js +0 -53
- package/lib-esm/common/eventListeners/index.js.map +0 -1
- package/lib-esm/common/eventListeners/types.d.ts +0 -7
- package/lib-esm/common/eventListeners/types.js.map +0 -1
- package/lib-esm/common/index.d.ts +0 -4
- package/lib-esm/common/index.js.map +0 -1
- package/lib-esm/index.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/InAppMessaging/InAppMessaging.ts +0 -321
- package/src/InAppMessaging/Providers/AWSPinpointProvider/index.ts +0 -323
- package/src/InAppMessaging/SessionTracker/SessionTracker.native.ts +0 -60
- package/src/InAppMessaging/SessionTracker/SessionTracker.ts +0 -78
- package/src/InAppMessaging/SessionTracker/index.ts +0 -6
- package/src/InAppMessaging/SessionTracker/types.ts +0 -11
- package/src/InAppMessaging/types.ts +0 -142
- package/src/Notifications.ts +0 -90
- package/src/PushNotification/NotEnabledError.ts +0 -11
- package/src/PushNotification/Platform/index.native.ts +0 -9
- package/src/PushNotification/Platform/index.ts +0 -22
- package/src/PushNotification/Platform/types.ts +0 -15
- package/src/PushNotification/PlatformNotSupportedError.ts +0 -9
- package/src/PushNotification/Providers/AWSPinpointProvider/index.ts +0 -137
- package/src/PushNotification/Providers/AWSPinpointProvider/types.ts +0 -13
- package/src/PushNotification/Providers/AWSPinpointProvider/utils.ts +0 -79
- package/src/PushNotification/PushNotification.native.ts +0 -386
- package/src/PushNotification/PushNotification.ts +0 -107
- package/src/PushNotification/index.ts +0 -9
- package/src/PushNotification/types.ts +0 -115
- package/src/PushNotification/utils.ts +0 -112
- package/src/common/AWSPinpointProviderCommon/index.ts +0 -291
- package/src/common/AWSPinpointProviderCommon/types.ts +0 -29
- package/src/common/constants.ts +0 -7
- package/src/types.ts +0 -56
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { isInitialized, assertIsInitialized, initialize, } from './statusHelpers';
|
|
@@ -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
|
+
exports.initialize = exports.assertIsInitialized = exports.isInitialized = void 0;
|
|
6
|
+
var statusHelpers_1 = require("./statusHelpers");
|
|
7
|
+
Object.defineProperty(exports, "isInitialized", { enumerable: true, get: function () { return statusHelpers_1.isInitialized; } });
|
|
8
|
+
Object.defineProperty(exports, "assertIsInitialized", { enumerable: true, get: function () { return statusHelpers_1.assertIsInitialized; } });
|
|
9
|
+
Object.defineProperty(exports, "initialize", { enumerable: true, get: function () { return statusHelpers_1.initialize; } });
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sets initialization status to true.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare const initialize: () => void;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the initialization status of In-App Messaging.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const isInitialized: () => boolean;
|
|
13
|
+
export declare function assertIsInitialized(): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
exports.assertIsInitialized = exports.isInitialized = exports.initialize = void 0;
|
|
6
|
+
const errors_1 = require("../errors");
|
|
7
|
+
let initialized = false;
|
|
8
|
+
/**
|
|
9
|
+
* Sets initialization status to true.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
const initialize = () => {
|
|
14
|
+
initialized = true;
|
|
15
|
+
};
|
|
16
|
+
exports.initialize = initialize;
|
|
17
|
+
/**
|
|
18
|
+
* Returns the initialization status of In-App Messaging.
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
const isInitialized = () => initialized;
|
|
23
|
+
exports.isInitialized = isInitialized;
|
|
24
|
+
function assertIsInitialized() {
|
|
25
|
+
(0, errors_1.assertValidationError)((0, exports.isInitialized)(), errors_1.InAppMessagingValidationErrorCode.NotInitialized);
|
|
26
|
+
}
|
|
27
|
+
exports.assertIsInitialized = assertIsInitialized;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { default as Notifications } from './Notifications';
|
|
2
|
-
export { AWSPinpointProviderCommon } from './common';
|
|
3
|
-
export { AWSPinpointUserInfo } from './common/AWSPinpointProviderCommon/types';
|
|
4
|
-
export { InAppMessage, InAppMessageAction, InAppMessageButton, InAppMessageContent, InAppMessageImage, InAppMessageInteractionEvent, InAppMessageLayout, InAppMessageStyle, InAppMessageTextAlign, InAppMessagingConfig, InAppMessagingEvent, } from './InAppMessaging';
|
|
5
|
-
export { PushNotificationMessage, PushNotificationPermissions, PushNotificationPermissionStatus, } from './PushNotification/types';
|
|
6
|
-
export { NotificationsConfig, UserInfo } from './types';
|
package/lib/index.js
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
var Notifications_1 = require("./Notifications");
|
|
6
|
-
exports.Notifications = Notifications_1.default;
|
|
7
|
-
var common_1 = require("./common");
|
|
8
|
-
exports.AWSPinpointProviderCommon = common_1.AWSPinpointProviderCommon;
|
|
9
|
-
var InAppMessaging_1 = require("./InAppMessaging");
|
|
10
|
-
exports.InAppMessageInteractionEvent = InAppMessaging_1.InAppMessageInteractionEvent;
|
|
11
|
-
var types_1 = require("./PushNotification/types");
|
|
12
|
-
exports.PushNotificationPermissionStatus = types_1.PushNotificationPermissionStatus;
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
exports.PushNotificationError = void 0;
|
|
6
|
+
const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
7
|
+
class PushNotificationError extends utils_1.AmplifyError {
|
|
8
|
+
constructor(params) {
|
|
9
|
+
super(params);
|
|
10
|
+
// Hack for making the custom error class work when transpiled to es5
|
|
11
|
+
// TODO: Delete the following 2 lines after we change the build target to >= es2015
|
|
12
|
+
this.constructor = PushNotificationError;
|
|
13
|
+
Object.setPrototypeOf(this, PushNotificationError.prototype);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
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,35 @@
|
|
|
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
|
+
exports.assertIsInitialized = exports.assert = exports.PushNotificationValidationErrorCode = void 0;
|
|
6
|
+
const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
7
|
+
const utils_2 = require("../utils");
|
|
8
|
+
const 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
|
+
const pushNotificationValidationErrorMap = {
|
|
17
|
+
[PushNotificationValidationErrorCode.NoAppId]: {
|
|
18
|
+
message: 'Missing application id.',
|
|
19
|
+
},
|
|
20
|
+
[PushNotificationValidationErrorCode.NoCredentials]: {
|
|
21
|
+
message: 'Credentials should not be empty.',
|
|
22
|
+
},
|
|
23
|
+
[PushNotificationValidationErrorCode.NoRegion]: {
|
|
24
|
+
message: 'Missing region.',
|
|
25
|
+
},
|
|
26
|
+
[PushNotificationValidationErrorCode.NotInitialized]: {
|
|
27
|
+
message: 'Push notification has not been initialized.',
|
|
28
|
+
recoverySuggestion: 'Please make sure to first call `initializePushNotifications`.',
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
exports.assert = (0, utils_1.createAssertionFunction)(pushNotificationValidationErrorMap, PushNotificationError_1.PushNotificationError);
|
|
32
|
+
const assertIsInitialized = () => {
|
|
33
|
+
(0, exports.assert)((0, utils_2.isInitialized)(), PushNotificationValidationErrorCode.NotInitialized);
|
|
34
|
+
};
|
|
35
|
+
exports.assertIsInitialized = assertIsInitialized;
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
exports.PushNotificationValidationErrorCode = exports.assert = exports.PushNotificationError = void 0;
|
|
6
|
+
var PushNotificationError_1 = require("./PushNotificationError");
|
|
7
|
+
Object.defineProperty(exports, "PushNotificationError", { enumerable: true, get: function () { return PushNotificationError_1.PushNotificationError; } });
|
|
8
|
+
var errorHelpers_1 = require("./errorHelpers");
|
|
9
|
+
Object.defineProperty(exports, "assert", { enumerable: true, get: function () { return errorHelpers_1.assert; } });
|
|
10
|
+
Object.defineProperty(exports, "PushNotificationValidationErrorCode", { enumerable: true, get: function () { return errorHelpers_1.PushNotificationValidationErrorCode; } });
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { getBadgeCount, GetBadgeCountOutput, 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';
|
|
@@ -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
|
+
exports.PushNotificationError = exports.setBadgeCount = exports.requestPermissions = exports.onTokenReceived = exports.onNotificationReceivedInForeground = exports.onNotificationReceivedInBackground = exports.onNotificationOpened = exports.initializePushNotifications = exports.identifyUser = exports.getPermissionStatus = exports.getLaunchNotification = exports.getBadgeCount = void 0;
|
|
6
|
+
var pinpoint_1 = require("./providers/pinpoint");
|
|
7
|
+
Object.defineProperty(exports, "getBadgeCount", { enumerable: true, get: function () { return pinpoint_1.getBadgeCount; } });
|
|
8
|
+
Object.defineProperty(exports, "getLaunchNotification", { enumerable: true, get: function () { return pinpoint_1.getLaunchNotification; } });
|
|
9
|
+
Object.defineProperty(exports, "getPermissionStatus", { enumerable: true, get: function () { return pinpoint_1.getPermissionStatus; } });
|
|
10
|
+
Object.defineProperty(exports, "identifyUser", { enumerable: true, get: function () { return pinpoint_1.identifyUser; } });
|
|
11
|
+
Object.defineProperty(exports, "initializePushNotifications", { enumerable: true, get: function () { return pinpoint_1.initializePushNotifications; } });
|
|
12
|
+
Object.defineProperty(exports, "onNotificationOpened", { enumerable: true, get: function () { return pinpoint_1.onNotificationOpened; } });
|
|
13
|
+
Object.defineProperty(exports, "onNotificationReceivedInBackground", { enumerable: true, get: function () { return pinpoint_1.onNotificationReceivedInBackground; } });
|
|
14
|
+
Object.defineProperty(exports, "onNotificationReceivedInForeground", { enumerable: true, get: function () { return pinpoint_1.onNotificationReceivedInForeground; } });
|
|
15
|
+
Object.defineProperty(exports, "onTokenReceived", { enumerable: true, get: function () { return pinpoint_1.onTokenReceived; } });
|
|
16
|
+
Object.defineProperty(exports, "requestPermissions", { enumerable: true, get: function () { return pinpoint_1.requestPermissions; } });
|
|
17
|
+
Object.defineProperty(exports, "setBadgeCount", { enumerable: true, get: function () { return pinpoint_1.setBadgeCount; } });
|
|
18
|
+
var errors_1 = require("./errors");
|
|
19
|
+
Object.defineProperty(exports, "PushNotificationError", { enumerable: true, get: function () { return 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,22 @@
|
|
|
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
|
+
exports.getBadgeCount = void 0;
|
|
6
|
+
const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
7
|
+
/**
|
|
8
|
+
* Returns the current badge count (the number next to your app's icon). This function is safe to call (but will be
|
|
9
|
+
* ignored) even when your React Native app is running on platforms where badges are not supported.
|
|
10
|
+
*
|
|
11
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
12
|
+
* only React Native is supported by this API.
|
|
13
|
+
* @returns A promise that resolves to a number representing the current count displayed on the app badge.
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const badgeCount = await getBadgeCount();
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
const getBadgeCount = async () => {
|
|
20
|
+
throw new utils_1.PlatformNotSupportedError();
|
|
21
|
+
};
|
|
22
|
+
exports.getBadgeCount = getBadgeCount;
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
exports.getBadgeCount = void 0;
|
|
6
|
+
const react_native_1 = require("@aws-amplify/react-native");
|
|
7
|
+
const errorHelpers_1 = require("../../../errors/errorHelpers");
|
|
8
|
+
const { getBadgeCount: getBadgeCountNative } = (0, react_native_1.loadAmplifyPushNotification)();
|
|
9
|
+
const getBadgeCount = async () => {
|
|
10
|
+
(0, errorHelpers_1.assertIsInitialized)();
|
|
11
|
+
return getBadgeCountNative();
|
|
12
|
+
};
|
|
13
|
+
exports.getBadgeCount = getBadgeCount;
|
|
@@ -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,26 @@
|
|
|
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
|
+
exports.getLaunchNotification = void 0;
|
|
6
|
+
const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
7
|
+
/**
|
|
8
|
+
* Returns the notification which launched your app from a terminated state. The launch notification is consumed by
|
|
9
|
+
* calls to this function and will yield a null result if:
|
|
10
|
+
* 1. It is more than once (i.e. subsequent calls will be null)
|
|
11
|
+
* 2. Another notification was opened while your app was running (either in foreground or background)
|
|
12
|
+
* 3. Your app was brought back to the foreground by some other means (e.g. user tapped the app icon)
|
|
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 {Promise<GetLaunchNotificationOutput>} - a promise resolving to {@link PushNotificationMessage} if there is
|
|
17
|
+
* a launch notification and `null` otherwise.
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const launchNotification = await getLaunchNotification();
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
const getLaunchNotification = async () => {
|
|
24
|
+
throw new utils_1.PlatformNotSupportedError();
|
|
25
|
+
};
|
|
26
|
+
exports.getLaunchNotification = getLaunchNotification;
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
exports.getLaunchNotification = void 0;
|
|
6
|
+
const react_native_1 = require("@aws-amplify/react-native");
|
|
7
|
+
const errorHelpers_1 = require("../../../errors/errorHelpers");
|
|
8
|
+
const { getLaunchNotification: getLaunchNotificationNative } = (0, react_native_1.loadAmplifyPushNotification)();
|
|
9
|
+
const getLaunchNotification = async () => {
|
|
10
|
+
(0, errorHelpers_1.assertIsInitialized)();
|
|
11
|
+
return getLaunchNotificationNative();
|
|
12
|
+
};
|
|
13
|
+
exports.getLaunchNotification = getLaunchNotification;
|
|
@@ -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,35 @@
|
|
|
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
|
+
exports.getPermissionStatus = void 0;
|
|
6
|
+
const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
7
|
+
/**
|
|
8
|
+
* Returns a string representing the current status of user permissions to display push notifications. The possible
|
|
9
|
+
* statuses are as follows:
|
|
10
|
+
*
|
|
11
|
+
* * `'shouldRequest'` - No permissions have been requested yet. It is idiomatic at this time to simply request for
|
|
12
|
+
* permissions from the user.
|
|
13
|
+
*
|
|
14
|
+
* * `'shouldExplainThenRequest'` - It is recommended at this time to provide some context or rationale to the user
|
|
15
|
+
* explaining why you want to send them push notifications before requesting for permissions.
|
|
16
|
+
*
|
|
17
|
+
* * `'granted'` - Permissions have been granted by the user. No further actions are needed and their app is ready to
|
|
18
|
+
* display notifications.
|
|
19
|
+
*
|
|
20
|
+
* * `'denied'` - Permissions have been denied by the user. Further attempts to request permissions will no longer
|
|
21
|
+
* trigger a permission dialog. Your app should now either degrade gracefully or prompt your user to grant the
|
|
22
|
+
* permissions needed in their device settings.
|
|
23
|
+
*
|
|
24
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
25
|
+
* only React Native is supported by this API.
|
|
26
|
+
* @return {Promise<GetPermissionStatusOutput>} a promise resolving to a string representing the current status of user
|
|
27
|
+
* selected notification permissions.
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const permissionStatus = await getPermissionStatus();
|
|
31
|
+
*/
|
|
32
|
+
const getPermissionStatus = async () => {
|
|
33
|
+
throw new utils_1.PlatformNotSupportedError();
|
|
34
|
+
};
|
|
35
|
+
exports.getPermissionStatus = getPermissionStatus;
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
exports.getPermissionStatus = void 0;
|
|
6
|
+
const react_native_1 = require("@aws-amplify/react-native");
|
|
7
|
+
const errorHelpers_1 = require("../../../errors/errorHelpers");
|
|
8
|
+
const { getPermissionStatus: getPermissionStatusNative } = (0, react_native_1.loadAmplifyPushNotification)();
|
|
9
|
+
const getPermissionStatus = async () => {
|
|
10
|
+
(0, errorHelpers_1.assertIsInitialized)();
|
|
11
|
+
return getPermissionStatusNative();
|
|
12
|
+
};
|
|
13
|
+
exports.getPermissionStatus = getPermissionStatus;
|
|
@@ -0,0 +1,53 @@
|
|
|
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;
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
exports.identifyUser = void 0;
|
|
6
|
+
const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
7
|
+
/**
|
|
8
|
+
* Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user
|
|
9
|
+
* profile and activities or actions in your application. Activity can be tracked across devices & platforms by using
|
|
10
|
+
* the same `userId`.
|
|
11
|
+
*
|
|
12
|
+
* @param {IdentifyUserInput} input The input object used to construct requests sent to Pinpoint's UpdateEndpoint
|
|
13
|
+
* API.
|
|
14
|
+
* @throws service: {@link UpdateEndpointException} - Thrown when the underlying Pinpoint service returns an error.
|
|
15
|
+
* @throws validation: {@link PushNotificationValidationErrorCode} - Thrown when the provided parameters or library
|
|
16
|
+
* configuration is incorrect.
|
|
17
|
+
* @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
|
|
18
|
+
* only React Native is supported by this API.
|
|
19
|
+
* @returns A promise that will resolve when the operation is complete.
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* // Identify a user with Pinpoint
|
|
23
|
+
* await identifyUser({
|
|
24
|
+
* userId,
|
|
25
|
+
* userProfile: {
|
|
26
|
+
* email: 'userEmail@example.com'
|
|
27
|
+
* customProperties: {
|
|
28
|
+
* phoneNumber: ['555-555-5555'],
|
|
29
|
+
* },
|
|
30
|
+
* }
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* // Identify a user with Pinpoint specific options
|
|
37
|
+
* await identifyUser({
|
|
38
|
+
* userId,
|
|
39
|
+
* userProfile: {
|
|
40
|
+
* email: 'userEmail@example.com'
|
|
41
|
+
* customProperties: {
|
|
42
|
+
* phoneNumber: ['555-555-5555'],
|
|
43
|
+
* },
|
|
44
|
+
* demographic: {
|
|
45
|
+
* platform: 'ios',
|
|
46
|
+
* timezone: 'America/Los_Angeles'
|
|
47
|
+
* }
|
|
48
|
+
* },
|
|
49
|
+
* options: {
|
|
50
|
+
* address: 'device-address',
|
|
51
|
+
* optOut: 'NONE',
|
|
52
|
+
* userAttributes: {
|
|
53
|
+
* interests: ['food']
|
|
54
|
+
* },
|
|
55
|
+
* },
|
|
56
|
+
* });
|
|
57
|
+
*/
|
|
58
|
+
const identifyUser = async () => {
|
|
59
|
+
throw new utils_1.PlatformNotSupportedError();
|
|
60
|
+
};
|
|
61
|
+
exports.identifyUser = identifyUser;
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
exports.identifyUser = void 0;
|
|
6
|
+
const utils_1 = require("@aws-amplify/core/internals/utils");
|
|
7
|
+
const pinpoint_1 = require("@aws-amplify/core/internals/providers/pinpoint");
|
|
8
|
+
const errorHelpers_1 = require("../../../errors/errorHelpers");
|
|
9
|
+
const utils_2 = require("../../../utils");
|
|
10
|
+
const utils_3 = require("../utils");
|
|
11
|
+
const identifyUser = async ({ userId, userProfile, options, }) => {
|
|
12
|
+
(0, errorHelpers_1.assertIsInitialized)();
|
|
13
|
+
const { credentials, identityId } = await (0, utils_2.resolveCredentials)();
|
|
14
|
+
const { appId, region } = (0, utils_3.resolveConfig)();
|
|
15
|
+
const { address, optOut, userAttributes } = options ?? {};
|
|
16
|
+
(0, pinpoint_1.updateEndpoint)({
|
|
17
|
+
address,
|
|
18
|
+
channelType: (0, utils_3.getChannelType)(),
|
|
19
|
+
optOut,
|
|
20
|
+
appId,
|
|
21
|
+
category: 'PushNotification',
|
|
22
|
+
credentials,
|
|
23
|
+
identityId,
|
|
24
|
+
region,
|
|
25
|
+
userAttributes,
|
|
26
|
+
userId,
|
|
27
|
+
userProfile,
|
|
28
|
+
userAgentValue: (0, utils_2.getPushNotificationUserAgentString)(utils_1.PushNotificationAction.IdentifyUser),
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
exports.identifyUser = identifyUser;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { getBadgeCount } from './getBadgeCount';
|
|
2
|
+
export { getLaunchNotification } from './getLaunchNotification';
|
|
3
|
+
export { getPermissionStatus } from './getPermissionStatus';
|
|
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';
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
exports.setBadgeCount = exports.requestPermissions = exports.onTokenReceived = exports.onNotificationReceivedInForeground = exports.onNotificationReceivedInBackground = exports.onNotificationOpened = exports.initializePushNotifications = exports.identifyUser = exports.getPermissionStatus = exports.getLaunchNotification = exports.getBadgeCount = void 0;
|
|
6
|
+
var getBadgeCount_1 = require("./getBadgeCount");
|
|
7
|
+
Object.defineProperty(exports, "getBadgeCount", { enumerable: true, get: function () { return getBadgeCount_1.getBadgeCount; } });
|
|
8
|
+
var getLaunchNotification_1 = require("./getLaunchNotification");
|
|
9
|
+
Object.defineProperty(exports, "getLaunchNotification", { enumerable: true, get: function () { return getLaunchNotification_1.getLaunchNotification; } });
|
|
10
|
+
var getPermissionStatus_1 = require("./getPermissionStatus");
|
|
11
|
+
Object.defineProperty(exports, "getPermissionStatus", { enumerable: true, get: function () { return getPermissionStatus_1.getPermissionStatus; } });
|
|
12
|
+
var identifyUser_1 = require("./identifyUser");
|
|
13
|
+
Object.defineProperty(exports, "identifyUser", { enumerable: true, get: function () { return identifyUser_1.identifyUser; } });
|
|
14
|
+
var initializePushNotifications_1 = require("./initializePushNotifications");
|
|
15
|
+
Object.defineProperty(exports, "initializePushNotifications", { enumerable: true, get: function () { return initializePushNotifications_1.initializePushNotifications; } });
|
|
16
|
+
var onNotificationOpened_1 = require("./onNotificationOpened");
|
|
17
|
+
Object.defineProperty(exports, "onNotificationOpened", { enumerable: true, get: function () { return onNotificationOpened_1.onNotificationOpened; } });
|
|
18
|
+
var onNotificationReceivedInBackground_1 = require("./onNotificationReceivedInBackground");
|
|
19
|
+
Object.defineProperty(exports, "onNotificationReceivedInBackground", { enumerable: true, get: function () { return onNotificationReceivedInBackground_1.onNotificationReceivedInBackground; } });
|
|
20
|
+
var onNotificationReceivedInForeground_1 = require("./onNotificationReceivedInForeground");
|
|
21
|
+
Object.defineProperty(exports, "onNotificationReceivedInForeground", { enumerable: true, get: function () { return onNotificationReceivedInForeground_1.onNotificationReceivedInForeground; } });
|
|
22
|
+
var onTokenReceived_1 = require("./onTokenReceived");
|
|
23
|
+
Object.defineProperty(exports, "onTokenReceived", { enumerable: true, get: function () { return onTokenReceived_1.onTokenReceived; } });
|
|
24
|
+
var requestPermissions_1 = require("./requestPermissions");
|
|
25
|
+
Object.defineProperty(exports, "requestPermissions", { enumerable: true, get: function () { return requestPermissions_1.requestPermissions; } });
|
|
26
|
+
var setBadgeCount_1 = require("./setBadgeCount");
|
|
27
|
+
Object.defineProperty(exports, "setBadgeCount", { enumerable: true, get: function () { return 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;
|