@aws-amplify/notifications 2.0.14 → 2.0.15-node-20-action.f356afc.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.
Files changed (151) hide show
  1. package/dist/cjs/eventListeners/eventListeners.js.map +1 -1
  2. package/dist/cjs/eventListeners/index.js.map +1 -1
  3. package/dist/cjs/eventListeners/types.js.map +1 -1
  4. package/dist/cjs/inAppMessaging/errors/InAppMessagingError.js.map +1 -1
  5. package/dist/cjs/inAppMessaging/errors/assertServiceError.js.map +1 -1
  6. package/dist/cjs/inAppMessaging/errors/assertValidationError.js.map +1 -1
  7. package/dist/cjs/inAppMessaging/errors/index.js.map +1 -1
  8. package/dist/cjs/inAppMessaging/errors/validation.js.map +1 -1
  9. package/dist/cjs/inAppMessaging/index.js.map +1 -1
  10. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/clearMessages.js.map +1 -1
  11. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js.map +1 -1
  12. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/identifyUser.js.map +1 -1
  13. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/index.js.map +1 -1
  14. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js.map +1 -1
  15. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js.map +1 -1
  16. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js.map +1 -1
  17. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js.map +1 -1
  18. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js.map +1 -1
  19. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js.map +1 -1
  20. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js.map +1 -1
  21. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/syncMessages.js.map +1 -1
  22. package/dist/cjs/inAppMessaging/providers/pinpoint/index.js.map +1 -1
  23. package/dist/cjs/inAppMessaging/providers/pinpoint/types/index.js.map +1 -1
  24. package/dist/cjs/inAppMessaging/providers/pinpoint/types/inputs.js.map +1 -1
  25. package/dist/cjs/inAppMessaging/providers/pinpoint/types/options.js.map +1 -1
  26. package/dist/cjs/inAppMessaging/providers/pinpoint/types/outputs.js.map +1 -1
  27. package/dist/cjs/inAppMessaging/providers/pinpoint/types/types.js.map +1 -1
  28. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/constants.js.map +1 -1
  29. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/helpers.js.map +1 -1
  30. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/index.js.map +1 -1
  31. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js.map +1 -1
  32. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/resolveConfig.js.map +1 -1
  33. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js.map +1 -1
  34. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/userAgent.js.map +1 -1
  35. package/dist/cjs/inAppMessaging/types/event.js.map +1 -1
  36. package/dist/cjs/inAppMessaging/types/index.js.map +1 -1
  37. package/dist/cjs/inAppMessaging/types/inputs.js.map +1 -1
  38. package/dist/cjs/inAppMessaging/types/message.js.map +1 -1
  39. package/dist/cjs/inAppMessaging/types/options.js.map +1 -1
  40. package/dist/cjs/inAppMessaging/utils/index.js.map +1 -1
  41. package/dist/cjs/inAppMessaging/utils/statusHelpers.js.map +1 -1
  42. package/dist/cjs/pushNotifications/errors/PushNotificationError.js.map +1 -1
  43. package/dist/cjs/pushNotifications/errors/errorHelpers.js.map +1 -1
  44. package/dist/cjs/pushNotifications/errors/index.js.map +1 -1
  45. package/dist/cjs/pushNotifications/index.js.map +1 -1
  46. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getBadgeCount.js.map +1 -1
  47. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js.map +1 -1
  48. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js.map +1 -1
  49. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js.map +1 -1
  50. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js.map +1 -1
  51. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js.map +1 -1
  52. package/dist/cjs/pushNotifications/providers/pinpoint/apis/identifyUser.js.map +1 -1
  53. package/dist/cjs/pushNotifications/providers/pinpoint/apis/identifyUser.native.js.map +1 -1
  54. package/dist/cjs/pushNotifications/providers/pinpoint/apis/index.js.map +1 -1
  55. package/dist/cjs/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js.map +1 -1
  56. package/dist/cjs/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js.map +1 -1
  57. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js.map +1 -1
  58. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js.map +1 -1
  59. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js.map +1 -1
  60. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js.map +1 -1
  61. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js.map +1 -1
  62. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js.map +1 -1
  63. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onTokenReceived.js.map +1 -1
  64. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js.map +1 -1
  65. package/dist/cjs/pushNotifications/providers/pinpoint/apis/requestPermissions.js.map +1 -1
  66. package/dist/cjs/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js.map +1 -1
  67. package/dist/cjs/pushNotifications/providers/pinpoint/apis/setBadgeCount.js.map +1 -1
  68. package/dist/cjs/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js.map +1 -1
  69. package/dist/cjs/pushNotifications/providers/pinpoint/index.js.map +1 -1
  70. package/dist/cjs/pushNotifications/providers/pinpoint/types/analytics.js.map +1 -1
  71. package/dist/cjs/pushNotifications/providers/pinpoint/types/apis.js.map +1 -1
  72. package/dist/cjs/pushNotifications/providers/pinpoint/types/index.js.map +1 -1
  73. package/dist/cjs/pushNotifications/providers/pinpoint/types/inputs.js.map +1 -1
  74. package/dist/cjs/pushNotifications/providers/pinpoint/types/options.js.map +1 -1
  75. package/dist/cjs/pushNotifications/providers/pinpoint/types/outputs.js.map +1 -1
  76. package/dist/cjs/pushNotifications/providers/pinpoint/types/pushNotifications.js.map +1 -1
  77. package/dist/cjs/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js.map +1 -1
  78. package/dist/cjs/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js.map +1 -1
  79. package/dist/cjs/pushNotifications/providers/pinpoint/utils/getChannelType.js.map +1 -1
  80. package/dist/cjs/pushNotifications/providers/pinpoint/utils/index.js.map +1 -1
  81. package/dist/cjs/pushNotifications/providers/pinpoint/utils/resolveConfig.js.map +1 -1
  82. package/dist/cjs/pushNotifications/types/errors.js.map +1 -1
  83. package/dist/cjs/pushNotifications/types/index.js.map +1 -1
  84. package/dist/cjs/pushNotifications/types/inputs.js.map +1 -1
  85. package/dist/cjs/pushNotifications/types/module.js.map +1 -1
  86. package/dist/cjs/pushNotifications/types/options.js.map +1 -1
  87. package/dist/cjs/pushNotifications/types/outputs.js.map +1 -1
  88. package/dist/cjs/pushNotifications/types/pushNotifications.js.map +1 -1
  89. package/dist/cjs/pushNotifications/utils/getPushNotificationUserAgentString.js.map +1 -1
  90. package/dist/cjs/pushNotifications/utils/index.js.map +1 -1
  91. package/dist/cjs/pushNotifications/utils/initializationManager.js.map +1 -1
  92. package/dist/cjs/pushNotifications/utils/resolveCredentials.js.map +1 -1
  93. package/dist/cjs/pushNotifications/utils/tokenManager.js.map +1 -1
  94. package/dist/esm/eventListeners/eventListeners.mjs.map +1 -1
  95. package/dist/esm/inAppMessaging/errors/InAppMessagingError.mjs.map +1 -1
  96. package/dist/esm/inAppMessaging/errors/assertServiceError.mjs.map +1 -1
  97. package/dist/esm/inAppMessaging/errors/assertValidationError.mjs.map +1 -1
  98. package/dist/esm/inAppMessaging/errors/validation.mjs.map +1 -1
  99. package/dist/esm/inAppMessaging/providers/pinpoint/apis/clearMessages.mjs.map +1 -1
  100. package/dist/esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.mjs.map +1 -1
  101. package/dist/esm/inAppMessaging/providers/pinpoint/apis/identifyUser.mjs.map +1 -1
  102. package/dist/esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.mjs.map +1 -1
  103. package/dist/esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.mjs.map +1 -1
  104. package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.mjs.map +1 -1
  105. package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.mjs.map +1 -1
  106. package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.mjs.map +1 -1
  107. package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.mjs.map +1 -1
  108. package/dist/esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.mjs.map +1 -1
  109. package/dist/esm/inAppMessaging/providers/pinpoint/apis/syncMessages.mjs.map +1 -1
  110. package/dist/esm/inAppMessaging/providers/pinpoint/types/types.mjs.map +1 -1
  111. package/dist/esm/inAppMessaging/providers/pinpoint/utils/constants.mjs.map +1 -1
  112. package/dist/esm/inAppMessaging/providers/pinpoint/utils/helpers.mjs.map +1 -1
  113. package/dist/esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.mjs.map +1 -1
  114. package/dist/esm/inAppMessaging/providers/pinpoint/utils/resolveConfig.mjs.map +1 -1
  115. package/dist/esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.mjs.map +1 -1
  116. package/dist/esm/inAppMessaging/providers/pinpoint/utils/userAgent.mjs.map +1 -1
  117. package/dist/esm/inAppMessaging/utils/statusHelpers.mjs.map +1 -1
  118. package/dist/esm/pushNotifications/errors/PushNotificationError.mjs.map +1 -1
  119. package/dist/esm/pushNotifications/errors/errorHelpers.mjs.map +1 -1
  120. package/dist/esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.mjs.map +1 -1
  121. package/dist/esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.mjs.map +1 -1
  122. package/dist/esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.mjs.map +1 -1
  123. package/dist/esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.mjs.map +1 -1
  124. package/dist/esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.mjs.map +1 -1
  125. package/dist/esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.mjs.map +1 -1
  126. package/dist/esm/pushNotifications/providers/pinpoint/apis/identifyUser.mjs.map +1 -1
  127. package/dist/esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.mjs.map +1 -1
  128. package/dist/esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.mjs.map +1 -1
  129. package/dist/esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.mjs.map +1 -1
  130. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.mjs.map +1 -1
  131. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.mjs.map +1 -1
  132. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.mjs.map +1 -1
  133. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.mjs.map +1 -1
  134. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.mjs.map +1 -1
  135. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.mjs.map +1 -1
  136. package/dist/esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.mjs.map +1 -1
  137. package/dist/esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.mjs.map +1 -1
  138. package/dist/esm/pushNotifications/providers/pinpoint/apis/requestPermissions.mjs.map +1 -1
  139. package/dist/esm/pushNotifications/providers/pinpoint/apis/requestPermissions.native.mjs.map +1 -1
  140. package/dist/esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.mjs.map +1 -1
  141. package/dist/esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.mjs.map +1 -1
  142. package/dist/esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.mjs.map +1 -1
  143. package/dist/esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.mjs.map +1 -1
  144. package/dist/esm/pushNotifications/providers/pinpoint/utils/getChannelType.mjs.map +1 -1
  145. package/dist/esm/pushNotifications/providers/pinpoint/utils/resolveConfig.mjs.map +1 -1
  146. package/dist/esm/pushNotifications/types/errors.mjs.map +1 -1
  147. package/dist/esm/pushNotifications/utils/getPushNotificationUserAgentString.mjs.map +1 -1
  148. package/dist/esm/pushNotifications/utils/initializationManager.mjs.map +1 -1
  149. package/dist/esm/pushNotifications/utils/resolveCredentials.mjs.map +1 -1
  150. package/dist/esm/pushNotifications/utils/tokenManager.mjs.map +1 -1
  151. package/package.json +103 -102
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/utils/helpers.ts"],"sourcesContent":[null],"names":["recordCore"],"mappings":";;;;;;;;;AAAA;AACA;AAqBA,MAAM,aAAa,GAAG,gBAAgB,CAAC;AAEvC,IAAI,aAAa,GAA4B,EAAE,CAAC;AAChD,IAAI,mBAAmB,GAA4B,EAAE,CAAC;AACtD,IAAI,gBAAgB,GAA4B,EAAE,CAAC;MAEtC,MAAM,GAAG,IAAI,aAAa,CAAC,+BAA+B,EAAE;MAE5D,oBAAoB,GAAG,C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AE,OAAO;AAC1B,IAAA,QAAQ,EAAE,QAAQ;AAClB,IAAA,WAAW,EAAE,WAAW;AACxB,CAAA;;;;"}
1
+ {"version":3,"file":"helpers.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/utils/helpers.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ConsoleLogger } from '@aws-amplify/core';\nimport { InAppMessagingAction } from '@aws-amplify/core/internals/utils';\nimport isEmpty from 'lodash/isEmpty.js';\nimport { record as recordCore } from '@aws-amplify/core/internals/providers/pinpoint';\nimport { resolveConfig } from './resolveConfig';\nimport { resolveCredentials } from './resolveCredentials';\nimport { CATEGORY } from './constants';\nimport { getInAppMessagingUserAgentString } from './userAgent';\nconst DELIVERY_TYPE = 'IN_APP_MESSAGE';\nlet eventNameMemo = {};\nlet eventAttributesMemo = {};\nlet eventMetricsMemo = {};\nexport const logger = new ConsoleLogger('InAppMessaging.Pinpoint.Utils');\nexport const recordAnalyticsEvent = (event, message) => {\n const { appId, region } = resolveConfig();\n const { id, metadata } = message;\n resolveCredentials()\n .then(({ credentials, identityId }) => {\n recordCore({\n appId,\n category: CATEGORY,\n credentials,\n event: {\n name: event,\n attributes: {\n // only include campaign_id field if we have one\n ...(id && { campaign_id: id }),\n delivery_type: DELIVERY_TYPE,\n treatment_id: metadata?.treatmentId,\n },\n },\n identityId,\n region,\n userAgentValue: getInAppMessagingUserAgentString(InAppMessagingAction.NotifyMessageInteraction),\n });\n })\n .catch(e => {\n // An error occured while fetching credentials or persisting the event to the buffer\n logger.warn('Failed to record event.', e);\n });\n};\nexport const getStartOfDay = () => {\n const now = new Date();\n now.setHours(0, 0, 0, 0);\n return now.toISOString();\n};\nexport const matchesEventType = ({ CampaignId, Schedule }, { name: eventType }) => {\n const { EventType } = Schedule?.EventFilter?.Dimensions ?? {};\n const memoKey = `${CampaignId}:${eventType}`;\n if (!eventNameMemo.hasOwnProperty(memoKey)) {\n eventNameMemo[memoKey] = !!EventType?.Values?.includes(eventType);\n }\n return eventNameMemo[memoKey];\n};\nexport const matchesAttributes = ({ CampaignId, Schedule }, { attributes = {} }) => {\n const { Attributes } = Schedule?.EventFilter?.Dimensions ?? {};\n if (isEmpty(Attributes)) {\n // if message does not have attributes defined it does not matter what attributes are on the event\n return true;\n }\n if (isEmpty(attributes)) {\n // if message does have attributes but the event does not then it always fails the check\n return false;\n }\n const memoKey = `${CampaignId}:${JSON.stringify(attributes)}`;\n if (!eventAttributesMemo.hasOwnProperty(memoKey)) {\n eventAttributesMemo[memoKey] =\n !Attributes ||\n Object.entries(Attributes).every(([key, { Values }]) => Values?.includes(attributes[key]));\n }\n return eventAttributesMemo[memoKey];\n};\nexport const matchesMetrics = ({ CampaignId, Schedule }, { metrics = {} }) => {\n const { Metrics } = Schedule?.EventFilter?.Dimensions ?? {};\n if (isEmpty(Metrics)) {\n // if message does not have metrics defined it does not matter what metrics are on the event\n return true;\n }\n if (isEmpty(metrics)) {\n // if message does have metrics but the event does not then it always fails the check\n return false;\n }\n const memoKey = `${CampaignId}:${JSON.stringify(metrics)}`;\n if (!eventMetricsMemo.hasOwnProperty(memoKey)) {\n eventMetricsMemo[memoKey] =\n !Metrics ||\n Object.entries(Metrics).every(([key, { ComparisonOperator, Value }]) => {\n const compare = getComparator(ComparisonOperator);\n // if there is some unknown comparison operator, treat as a comparison failure\n return compare && !!Value ? compare(Value, metrics[key]) : false;\n });\n }\n return eventMetricsMemo[memoKey];\n};\nexport const getComparator = (operator) => {\n switch (operator) {\n case 'EQUAL':\n return (metricsVal, eventVal) => metricsVal === eventVal;\n case 'GREATER_THAN':\n return (metricsVal, eventVal) => metricsVal < eventVal;\n case 'GREATER_THAN_OR_EQUAL':\n return (metricsVal, eventVal) => metricsVal <= eventVal;\n case 'LESS_THAN':\n return (metricsVal, eventVal) => metricsVal > eventVal;\n case 'LESS_THAN_OR_EQUAL':\n return (metricsVal, eventVal) => metricsVal >= eventVal;\n default:\n return undefined;\n }\n};\nexport const isBeforeEndDate = ({ Schedule, }) => {\n if (!Schedule?.EndDate) {\n return true;\n }\n return new Date() < new Date(Schedule.EndDate);\n};\nexport const isQuietTime = (message) => {\n const { Schedule } = message;\n if (!Schedule?.QuietTime) {\n return false;\n }\n const pattern = /^[0-2]\\d:[0-5]\\d$/; // basic sanity check, not a fully featured HH:MM validation\n const { Start, End } = Schedule.QuietTime;\n if (!Start ||\n !End ||\n Start === End ||\n !pattern.test(Start) ||\n !pattern.test(End)) {\n return false;\n }\n const now = new Date();\n const start = new Date(now);\n const end = new Date(now);\n const [startHours, startMinutes] = Start.split(':');\n const [endHours, endMinutes] = End.split(':');\n start.setHours(Number.parseInt(startHours, 10), Number.parseInt(startMinutes, 10), 0, 0);\n end.setHours(Number.parseInt(endHours, 10), Number.parseInt(endMinutes, 10), 0, 0);\n // if quiet time includes midnight, bump the end time to the next day\n if (start > end) {\n end.setDate(end.getDate() + 1);\n }\n const isQuietTime = now >= start && now <= end;\n if (isQuietTime) {\n logger.debug('message filtered due to quiet time', message);\n }\n return isQuietTime;\n};\nexport const clearMemo = () => {\n eventNameMemo = {};\n eventAttributesMemo = {};\n eventMetricsMemo = {};\n};\n// in the pinpoint console when a message is created with a Modal or Full Screen layout,\n// it is assigned a layout value of MOBILE_FEED or OVERLAYS respectively in the message payload.\n// In the future, Pinpoint will be updating the layout values in the aforementioned scenario\n// to MODAL and FULL_SCREEN.\n//\n// This utility acts as a safeguard to ensure that:\n// - 1. the usage of MOBILE_FEED and OVERLAYS as values for message layouts are not leaked\n// outside the Pinpoint provider\n// - 2. Amplify correctly handles the legacy layout values from Pinpoint after they are updated\nexport const interpretLayout = (layout) => {\n if (layout === 'MOBILE_FEED') {\n return 'MODAL';\n }\n if (layout === 'OVERLAYS') {\n return 'FULL_SCREEN';\n }\n // cast as PinpointInAppMessage['InAppMessage']['Layout'] allows `string` as a value\n return layout;\n};\nexport const extractContent = ({ InAppMessage: message, }) => {\n return (message?.Content?.map(content => {\n const { BackgroundColor, BodyConfig, HeaderConfig, ImageUrl, PrimaryBtn, SecondaryBtn, } = content;\n const defaultPrimaryButton = PrimaryBtn?.DefaultConfig;\n const defaultSecondaryButton = SecondaryBtn?.DefaultConfig;\n const extractedContent = {};\n if (BackgroundColor) {\n extractedContent.container = {\n style: {\n backgroundColor: BackgroundColor,\n },\n };\n }\n if (HeaderConfig) {\n extractedContent.header = {\n // Default to empty string in rare cases we don't have a Header value\n content: HeaderConfig.Header ?? '',\n style: {\n color: HeaderConfig.TextColor,\n textAlign: HeaderConfig.Alignment?.toLowerCase(),\n },\n };\n }\n if (BodyConfig) {\n extractedContent.body = {\n // Default to empty string in rare cases we don't have a Body value\n content: BodyConfig.Body ?? '',\n style: {\n color: BodyConfig.TextColor,\n textAlign: BodyConfig.Alignment?.toLowerCase(),\n },\n };\n }\n if (ImageUrl) {\n extractedContent.image = {\n src: ImageUrl,\n };\n }\n if (defaultPrimaryButton) {\n extractedContent.primaryButton = {\n // Default to empty string in rare cases we don't have a Text value\n title: defaultPrimaryButton.Text ?? '',\n action: defaultPrimaryButton.ButtonAction,\n url: defaultPrimaryButton.Link,\n style: {\n backgroundColor: defaultPrimaryButton.BackgroundColor,\n borderRadius: defaultPrimaryButton.BorderRadius,\n color: defaultPrimaryButton.TextColor,\n },\n };\n }\n if (defaultSecondaryButton) {\n extractedContent.secondaryButton = {\n // Default to empty string in rare cases we don't have a Text value\n title: defaultSecondaryButton.Text ?? '',\n action: defaultSecondaryButton.ButtonAction,\n url: defaultSecondaryButton.Link,\n style: {\n backgroundColor: defaultSecondaryButton.BackgroundColor,\n borderRadius: defaultSecondaryButton.BorderRadius,\n color: defaultSecondaryButton.TextColor,\n },\n };\n }\n return extractedContent;\n }) ?? []);\n};\nexport const extractMetadata = ({ InAppMessage, Priority, Schedule, TreatmentId, }) => ({\n customData: InAppMessage?.CustomConfig,\n endDate: Schedule?.EndDate,\n priority: Priority,\n treatmentId: TreatmentId,\n});\n"],"names":["recordCore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,oBAAoB,CAAC,YAAY;AACnE,oBAAoB,KAAK,EAAE,oBAAoB,CAAC,SAAS;AACzD,iBAAiB;AACjB,aAAa,CAAC;AACd,SAAS;AACT,QAAQ,IAAI,sBAAsB,EAAE;AACpC,YAAY,gBAAgB,CAAC,eAAe,GAAG;AAC/C;AACA,gBAAgB,KAAK,EAAE,sBAAsB,CAAC,IAAI,IAAI,EAAE;AACxD,gBAAgB,MAAM,EAAE,sBAAsB,CAAC,YAAY;AAC3D,gBAAgB,GAAG,EAAE,sBAAsB,CAAC,IAAI;AAChD,gBAAgB,KAAK,EAAE;AACvB,oBAAoB,eAAe,EAAE,sBAAsB,CAAC,eAAe;AAC3E,oBAAoB,YAAY,EAAE,sBAAsB,CAAC,YAAY;AACrE,oBAAoB,KAAK,EAAE,sBAAsB,CAAC,SAAS;AAC3D,iBAAiB;AACjB,aAAa,CAAC;AACd,SAAS;AACT,QAAQ,OAAO,gBAAgB,CAAC;AAChC,KAAK,CAAC,IAAI,EAAE,EAAE;AACd,EAAE;AACU,MAAC,eAAe,GAAG,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,GAAG,MAAM;AACxF,IAAI,UAAU,EAAE,YAAY,EAAE,YAAY;AAC1C,IAAI,OAAO,EAAE,QAAQ,EAAE,OAAO;AAC9B,IAAI,QAAQ,EAAE,QAAQ;AACtB,IAAI,WAAW,EAAE,WAAW;AAC5B,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"messageProcessingHelpers.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAqBA,MAAM,uBAAuB,GAAG,2CAA2C,CAAC;AAC5E,MAAM,uBAAuB,GAAG,2CAA2C,CAAC;AAC5E,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,qCAAqC,CAAC,CAAC;AAExE,IAAI,sBAAsB,GAAyB,EAAE,CAAC;A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CAAC;AAED,eAAe,aAAa,CAAC,SAAiB,EAAA;AAC7C,IAAA,MAAM,QAAQ,GAAG,MAAM,gBAAgB,EAAE,CAAC;;AAE1C,IAAA,OAAO,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,aAAa,GAAG,MAAa;AAClC,IAAA,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IACvB,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACzB,IAAA,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC;AAC1B,CAAC;;;;"}
1
+ {"version":3,"file":"messageProcessingHelpers.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { extractContent, extractMetadata, interpretLayout, isBeforeEndDate, matchesAttributes, matchesEventType, matchesMetrics, } from './helpers';\nimport { defaultStorage, ConsoleLogger } from '@aws-amplify/core';\nconst MESSAGE_DAILY_COUNT_KEY = 'pinpointProvider_inAppMessages_dailyCount';\nconst MESSAGE_TOTAL_COUNT_KEY = 'pinpointProvider_inAppMessages_totalCount';\nconst logger = new ConsoleLogger('InAppMessaging.processInAppMessages');\nlet sessionMessageCountMap = {};\nexport async function processInAppMessages(messages, event) {\n let highestPrioritySeen;\n let acc = [];\n for (let index = 0; index < messages.length; index++) {\n const message = messages[index];\n const messageQualifies = matchesEventType(message, event) &&\n matchesAttributes(message, event) &&\n matchesMetrics(message, event) &&\n isBeforeEndDate(message) &&\n (await isBelowCap(message));\n // filter all qualifying messages returning only those that are of (relative) highest priority\n if (messageQualifies) {\n // have not yet encountered message with priority\n if (!highestPrioritySeen) {\n // this message has priority, so reset the accumulator with this message only\n if (message.Priority) {\n highestPrioritySeen = message.Priority;\n acc = [message];\n }\n else {\n // this message also has no priority, so just add this message to accumulator\n acc.push(message);\n }\n // have previously encountered message with priority, so only messages with priority matter now\n }\n else if (message.Priority) {\n // this message has higher priority (lower number), so reset the accumulator with this message only\n if (message.Priority < highestPrioritySeen) {\n highestPrioritySeen = message.Priority;\n acc = [message];\n // this message has the same priority, so just add this message to accumulator\n }\n else if (message.Priority === highestPrioritySeen) {\n acc.push(message);\n }\n }\n }\n }\n return normalizeMessages(acc);\n}\nexport function sessionStateChangeHandler(state) {\n if (state === 'started') {\n // reset all session counts\n sessionMessageCountMap = {};\n }\n}\nexport async function incrementMessageCounts(messageId) {\n const { sessionCount, dailyCount, totalCount } = await getMessageCounts(messageId);\n setSessionCount(messageId, sessionCount + 1);\n setDailyCount(dailyCount + 1);\n await setTotalCount(messageId, totalCount + 1);\n}\nfunction normalizeMessages(messages) {\n return messages.map(message => {\n const { CampaignId, InAppMessage } = message;\n return {\n // Default to empty string in rare cases we don't have a campaignId\n id: CampaignId ?? '',\n content: extractContent(message),\n // Default to TOP_BANNER layout in rare cases we don't have a Layout\n layout: InAppMessage?.Layout\n ? interpretLayout(InAppMessage.Layout)\n : 'TOP_BANNER',\n metadata: extractMetadata(message),\n };\n });\n}\nasync function isBelowCap({ CampaignId, SessionCap, DailyCap, TotalCap, }) {\n const { sessionCount, dailyCount, totalCount } = await getMessageCounts(CampaignId);\n return ((!SessionCap || sessionCount < SessionCap) &&\n (!DailyCap || dailyCount < DailyCap) &&\n (!TotalCap || totalCount < TotalCap));\n}\nasync function getMessageCounts(messageId) {\n let messageCounts = {\n sessionCount: 0,\n dailyCount: 0,\n totalCount: 0,\n };\n try {\n // only return true counts if there is a messageId else default to 0\n if (messageId)\n messageCounts = {\n sessionCount: getSessionCount(messageId),\n dailyCount: await getDailyCount(),\n totalCount: await getTotalCount(messageId),\n };\n return messageCounts;\n }\n catch (err) {\n logger.error('Failed to get message counts from storage', err);\n // If there are no cached counts or there is an error,\n // we default to 0 allowing all the messages to be eligible\n return messageCounts;\n }\n}\nfunction getSessionCount(messageId) {\n return sessionMessageCountMap[messageId] ?? 0;\n}\nfunction setSessionCount(messageId, count) {\n sessionMessageCountMap[messageId] = count;\n}\nfunction setDailyCount(count) {\n const dailyCount = {\n count,\n lastCountTimestamp: getStartOfDay(),\n };\n try {\n defaultStorage.setItem(MESSAGE_DAILY_COUNT_KEY, JSON.stringify(dailyCount));\n }\n catch (err) {\n logger.error('Failed to save daily message count to storage', err);\n }\n}\nfunction setTotalCountMap(countMap) {\n try {\n defaultStorage.setItem(MESSAGE_TOTAL_COUNT_KEY, JSON.stringify(countMap));\n }\n catch (err) {\n logger.error('Failed to save total count to storage', err);\n }\n}\nasync function setTotalCount(messageId, count) {\n const totalCountMap = await getTotalCountMap();\n const updatedMap = {\n ...totalCountMap,\n [messageId]: count,\n };\n setTotalCountMap(updatedMap);\n}\nasync function getDailyCount() {\n const today = getStartOfDay();\n const item = await defaultStorage.getItem(MESSAGE_DAILY_COUNT_KEY);\n // Parse stored count or initialize as empty count\n const counter = item\n ? JSON.parse(item)\n : { count: 0, lastCountTimestamp: today };\n // If the stored counter timestamp is today, use it as the count, otherwise reset to 0\n return counter.lastCountTimestamp === today ? counter.count : 0;\n}\nasync function getTotalCountMap() {\n const item = await defaultStorage.getItem(MESSAGE_TOTAL_COUNT_KEY);\n // Parse stored count map or initialize as empty\n return item ? JSON.parse(item) : {};\n}\nasync function getTotalCount(messageId) {\n const countMap = await getTotalCountMap();\n // Return stored count or initialize as empty count\n return countMap[messageId] || 0;\n}\nconst getStartOfDay = () => {\n const now = new Date();\n now.setHours(0, 0, 0, 0);\n return now.toISOString();\n};\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA,MAAM,uBAAuB,GAAG,2CAA2C,CAAC;AAC5E,MAAM,uBAAuB,GAAG,2CAA2C,CAAC;AAC5E,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,qCAAqC,CAAC,CAAC;AACxE,IAAI,sBAAsB,GAAG,EAAE,CAAC;AACzB,eAAe,oBAAoB,CAAC,Q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,CAAC,KAAK,GAAG,CAAC,CAAC;AACpE,CAAC;AACD,eAAe,gBAAgB,GAAG;AAClC,IAAI,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;AACvE;AACA,IAAI,OAAO,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;AACxC,CAAC;AACD,eAAe,aAAa,CAAC,SAAS,EAAE;AACxC,IAAI,MAAM,QAAQ,GAAG,MAAM,gBAAgB,EAAE,CAAC;AAC9C;AACA,IAAI,OAAO,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC;AACD,MAAM,aAAa,GAAG,MAAM;AAC5B,IAAI,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;AAC3B,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAC7B,IAAI,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC;AAC7B,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolveConfig.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/utils/resolveConfig.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;AACA;AAQA;;AAEG;AACI,MAAM,aAAa,GAAG,MAAK;AACjC,IAAA,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC,SAAS,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,QAAQ,IAAI,EAAE,CAAC;IACnE,qBAAqB,CAAC,CAAC,CAAC,KAAK,EAAE,iCAAiC,CAAC,OAAO,CAAC,CAAC;IAC1E,qBAAqB,CAAC,CAAC,CAAC,MAAM,EAAE,iCAAiC,CAAC,QAAQ,CAAC,CAAC;AAC5E,IAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC1B;;;;"}
1
+ {"version":3,"file":"resolveConfig.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/utils/resolveConfig.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { InAppMessagingValidationErrorCode, assertValidationError, } from '../../../errors';\n/**\n * @internal\n */\nexport const resolveConfig = () => {\n const { appId, region } = Amplify.getConfig().Notifications?.InAppMessaging?.Pinpoint ?? {};\n assertValidationError(!!appId, InAppMessagingValidationErrorCode.NoAppId);\n assertValidationError(!!region, InAppMessagingValidationErrorCode.NoRegion);\n return { appId, region };\n};\n"],"names":[],"mappings":";;;;;AAAA;AACA;AAGA;AACA;AACA;AACY,MAAC,aAAa,GAAG,MAAM;AACnC,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,QAAQ,IAAI,EAAE,CAAC;AAChG,IAAI,qBAAqB,CAAC,CAAC,CAAC,KAAK,EAAE,iCAAiC,CAAC,OAAO,CAAC,CAAC;AAC9E,IAAI,qBAAqB,CAAC,CAAC,CAAC,MAAM,EAAE,iCAAiC,CAAC,QAAQ,CAAC,CAAC;AAChF,IAAI,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC7B;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolveCredentials.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/utils/resolveCredentials.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAAA;AACA;AAQA;;AAEG;AACU,MAAA,kBAAkB,GAAG,YAAW;IAC5C,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,gBAAgB,EAAE,CAAC;IAC7D,qBAAqB,CACpB,CAAC,CAAC,WAAW,EACb,iCAAiC,CAAC,aAAa,CAC/C,CAAC;AACF,IAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;AACpC;;;;"}
1
+ {"version":3,"file":"resolveCredentials.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/utils/resolveCredentials.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { fetchAuthSession } from '@aws-amplify/core';\nimport { InAppMessagingValidationErrorCode, assertValidationError, } from '../../../errors';\n/**\n * @internal\n */\nexport const resolveCredentials = async () => {\n const { credentials, identityId } = await fetchAuthSession();\n assertValidationError(!!credentials, InAppMessagingValidationErrorCode.NoCredentials);\n return { credentials, identityId };\n};\n"],"names":[],"mappings":";;;;;AAAA;AACA;AAGA;AACA;AACA;AACY,MAAC,kBAAkB,GAAG,YAAY;AAC9C,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,gBAAgB,EAAE,CAAC;AACjE,IAAI,qBAAqB,CAAC,CAAC,CAAC,WAAW,EAAE,iCAAiC,CAAC,aAAa,CAAC,CAAC;AAC1F,IAAI,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;AACvC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"userAgent.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/utils/userAgent.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AASM,SAAU,0BAA0B,CACzC,MAA4B,EAAA;AAE5B,IAAA,OAAO,yBAAyB,CAAC;QAChC,QAAQ,EAAE,QAAQ,CAAC,cAAc;QACjC,MAAM;AACN,KAAA,CAAC,CAAC;AACJ,CAAC;AAEK,SAAU,gCAAgC,CAAC,MAA4B,EAAA;AAC5E,IAAA,OAAO,mBAAmB,CAAC;QAC1B,QAAQ,EAAE,QAAQ,CAAC,cAAc;QACjC,MAAM;AACN,KAAA,CAAC,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"userAgent.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/utils/userAgent.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Category, getAmplifyUserAgentObject, getAmplifyUserAgent, } from '@aws-amplify/core/internals/utils';\nexport function getInAppMessagingUserAgent(action) {\n return getAmplifyUserAgentObject({\n category: Category.InAppMessaging,\n action,\n });\n}\nexport function getInAppMessagingUserAgentString(action) {\n return getAmplifyUserAgent({\n category: Category.InAppMessaging,\n action,\n });\n}\n"],"names":[],"mappings":";;AAAA;AACA;AAEO,SAAS,0BAA0B,CAAC,MAAM,EAAE;AACnD,IAAI,OAAO,yBAAyB,CAAC;AACrC,QAAQ,QAAQ,EAAE,QAAQ,CAAC,cAAc;AACzC,QAAQ,MAAM;AACd,KAAK,CAAC,CAAC;AACP,CAAC;AACM,SAAS,gCAAgC,CAAC,MAAM,EAAE;AACzD,IAAI,OAAO,mBAAmB,CAAC;AAC/B,QAAQ,QAAQ,EAAE,QAAQ,CAAC,cAAc;AACzC,QAAQ,MAAM;AACd,KAAK,CAAC,CAAC;AACP;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"statusHelpers.mjs","sources":["../../../../../src/inAppMessaging/utils/statusHelpers.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;AACA;AAOA,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB;;;;AAIG;AACI,MAAM,UAAU,GAAG,MAAK;IAC9B,WAAW,GAAG,IAAI,CAAC;AACpB,EAAE;AAEF;;;;AAIG;MACU,aAAa,GAAG,MAAM,YAAY;SAE/B,mBAAmB,GAAA;IAClC,qBAAqB,CACpB,aAAa,EAAE,EACf,iCAAiC,CAAC,cAAc,CAChD,CAAC;AACH;;;;"}
1
+ {"version":3,"file":"statusHelpers.mjs","sources":["../../../../src/inAppMessaging/utils/statusHelpers.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { InAppMessagingValidationErrorCode, assertValidationError, } from '../errors';\nlet initialized = false;\n/**\n * Sets initialization status to true.\n *\n * @internal\n */\nexport const initialize = () => {\n initialized = true;\n};\n/**\n * Returns the initialization status of In-App Messaging.\n *\n * @internal\n */\nexport const isInitialized = () => initialized;\nexport function assertIsInitialized() {\n assertValidationError(isInitialized(), InAppMessagingValidationErrorCode.NotInitialized);\n}\n"],"names":[],"mappings":";;;;AAAA;AACA;AAEA,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;AACA;AACA;AACA;AACA;AACY,MAAC,UAAU,GAAG,MAAM;AAChC,IAAI,WAAW,GAAG,IAAI,CAAC;AACvB,EAAE;AACF;AACA;AACA;AACA;AACA;AACY,MAAC,aAAa,GAAG,MAAM,YAAY;AACxC,SAAS,mBAAmB,GAAG;AACtC,IAAI,qBAAqB,CAAC,aAAa,EAAE,EAAE,iCAAiC,CAAC,cAAc,CAAC,CAAC;AAC7F;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PushNotificationError.mjs","sources":["../../../../../src/pushNotifications/errors/PushNotificationError.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AAOM,MAAO,qBAAsB,SAAQ,YAAY,CAAA;AACtD,IAAA,WAAA,CAAY,MAA0B,EAAA;QACrC,KAAK,CAAC,MAAM,CAAC,CAAC;;;AAId,QAAA,IAAI,CAAC,WAAW,GAAG,qBAAqB,CAAC;QACzC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;KAC7D;AACD;;;;"}
1
+ {"version":3,"file":"PushNotificationError.mjs","sources":["../../../../src/pushNotifications/errors/PushNotificationError.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyError, } from '@aws-amplify/core/internals/utils';\nexport class PushNotificationError extends AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = PushNotificationError;\n Object.setPrototypeOf(this, PushNotificationError.prototype);\n }\n}\n"],"names":[],"mappings":";;AAAA;AACA;AAEO,MAAM,qBAAqB,SAAS,YAAY,CAAC;AACxD,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB,QAAQ,KAAK,CAAC,MAAM,CAAC,CAAC;AACtB;AACA;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,qBAAqB,CAAC;AACjD,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;AACrE,KAAK;AACL;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"errorHelpers.mjs","sources":["../../../../../src/pushNotifications/errors/errorHelpers.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;AACA;IAUY,oCAKX;AALD,CAAA,UAAY,mCAAmC,EAAA;AAC9C,IAAA,mCAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,mCAAA,CAAA,eAAA,CAAA,GAAA,eAA+B,CAAA;AAC/B,IAAA,mCAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACrB,IAAA,mCAAA,CAAA,gBAAA,CAAA,GAAA,gBAAiC,CAAA;AAClC,CAAC,EALW,mCAAmC,KAAnC,mCAAmC,GAK9C,EAAA,CAAA,CAAA,CAAA;AAED,MAAM,kCAAkC,GACvC;AACC,IAAA,CAAC,mCAAmC,CAAC,OAAO,GAAG;AAC9C,QAAA,OAAO,EAAE,yBAAyB;AAClC,KAAA;AACD,IAAA,CAAC,mCAAmC,CAAC,aAAa,GAAG;AACpD,QAAA,OAAO,EAAE,kCAAkC;AAC3C,KAAA;AACD,IAAA,CAAC,mCAAmC,CAAC,QAAQ,GAAG;AAC/C,QAAA,OAAO,EAAE,iBAAiB;AAC1B,KAAA;AACD,IAAA,CAAC,mCAAmC,CAAC,cAAc,GAAG;AACrD,QAAA,OAAO,EAAE,6CAA6C;AACtD,QAAA,kBAAkB,EACjB,+DAA+D;AAChE,KAAA;CACD,CAAC;AAEU,MAAA,MAAM,GAClB,uBAAuB,CACtB,kCAAkC,EAClC,qBAAqB,EACpB;AAEI,MAAM,mBAAmB,GAAG,MAAK;IACvC,MAAM,CAAC,aAAa,EAAE,EAAE,mCAAmC,CAAC,cAAc,CAAC,CAAC;AAC7E;;;;"}
1
+ {"version":3,"file":"errorHelpers.mjs","sources":["../../../../src/pushNotifications/errors/errorHelpers.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { createAssertionFunction, } from '@aws-amplify/core/internals/utils';\nimport { isInitialized } from '../utils/initializationManager';\nimport { PushNotificationError } from './PushNotificationError';\nexport var PushNotificationValidationErrorCode;\n(function (PushNotificationValidationErrorCode) {\n PushNotificationValidationErrorCode[\"NoAppId\"] = \"NoAppId\";\n PushNotificationValidationErrorCode[\"NoCredentials\"] = \"NoCredentials\";\n PushNotificationValidationErrorCode[\"NoRegion\"] = \"NoRegion\";\n PushNotificationValidationErrorCode[\"NotInitialized\"] = \"NotInitialized\";\n})(PushNotificationValidationErrorCode || (PushNotificationValidationErrorCode = {}));\nconst pushNotificationValidationErrorMap = {\n [PushNotificationValidationErrorCode.NoAppId]: {\n message: 'Missing application id.',\n },\n [PushNotificationValidationErrorCode.NoCredentials]: {\n message: 'Credentials should not be empty.',\n },\n [PushNotificationValidationErrorCode.NoRegion]: {\n message: 'Missing region.',\n },\n [PushNotificationValidationErrorCode.NotInitialized]: {\n message: 'Push notification has not been initialized.',\n recoverySuggestion: 'Please make sure to first call `initializePushNotifications`.',\n },\n};\nexport const assert = createAssertionFunction(pushNotificationValidationErrorMap, PushNotificationError);\nexport const assertIsInitialized = () => {\n assert(isInitialized(), PushNotificationValidationErrorCode.NotInitialized);\n};\n"],"names":[],"mappings":";;;;AAAA;AACA;AAIU,IAAC,oCAAoC;AAC/C,CAAC,UAAU,mCAAmC,EAAE;AAChD,IAAI,mCAAmC,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AAC/D,IAAI,mCAAmC,CAAC,eAAe,CAAC,GAAG,eAAe,CAAC;AAC3E,IAAI,mCAAmC,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;AACjE,IAAI,mCAAmC,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;AAC7E,CAAC,EAAE,mCAAmC,KAAK,mCAAmC,GAAG,EAAE,CAAC,CAAC,CAAC;AACtF,MAAM,kCAAkC,GAAG;AAC3C,IAAI,CAAC,mCAAmC,CAAC,OAAO,GAAG;AACnD,QAAQ,OAAO,EAAE,yBAAyB;AAC1C,KAAK;AACL,IAAI,CAAC,mCAAmC,CAAC,aAAa,GAAG;AACzD,QAAQ,OAAO,EAAE,kCAAkC;AACnD,KAAK;AACL,IAAI,CAAC,mCAAmC,CAAC,QAAQ,GAAG;AACpD,QAAQ,OAAO,EAAE,iBAAiB;AAClC,KAAK;AACL,IAAI,CAAC,mCAAmC,CAAC,cAAc,GAAG;AAC1D,QAAQ,OAAO,EAAE,6CAA6C;AAC9D,QAAQ,kBAAkB,EAAE,+DAA+D;AAC3F,KAAK;AACL,CAAC,CAAC;AACU,MAAC,MAAM,GAAG,uBAAuB,CAAC,kCAAkC,EAAE,qBAAqB,EAAE;AAC7F,MAAC,mBAAmB,GAAG,MAAM;AACzC,IAAI,MAAM,CAAC,aAAa,EAAE,EAAE,mCAAmC,CAAC,cAAc,CAAC,CAAC;AAChF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getBadgeCount.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/getBadgeCount.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AAKA;;;;;;;;;;;AAWG;AACU,MAAA,aAAa,GAAkB,YAAW;IACtD,MAAM,IAAI,yBAAyB,EAAE,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"getBadgeCount.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/getBadgeCount.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';\n/**\n * Returns the current badge count (the number next to your app's icon). This function is safe to call (but will be\n * ignored) even when your React Native app is running on platforms where badges are not supported.\n *\n * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,\n * only React Native is supported by this API.\n * @returns A promise that resolves to a number representing the current count displayed on the app badge.\n * @example\n * ```ts\n * const badgeCount = await getBadgeCount();\n * ```\n */\nexport const getBadgeCount = async () => {\n throw new PlatformNotSupportedError();\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,aAAa,GAAG,YAAY;AACzC,IAAI,MAAM,IAAI,yBAAyB,EAAE,CAAC;AAC1C;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getBadgeCount.native.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAMA,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,GAAG,2BAA2B,EAAE,CAAC;AAEhE,MAAA,aAAa,GAAkB,YAAW;AACtD,IAAA,mBAAmB,EAAE,CAAC;IACtB,OAAO,mBAAmB,EAAE,CAAC;AAC9B;;;;"}
1
+ {"version":3,"file":"getBadgeCount.native.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { loadAmplifyPushNotification } from '@aws-amplify/react-native';\nimport { assertIsInitialized } from '../../../errors/errorHelpers';\nconst { getBadgeCount: getBadgeCountNative } = loadAmplifyPushNotification();\nexport const getBadgeCount = async () => {\n assertIsInitialized();\n return getBadgeCountNative();\n};\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,GAAG,2BAA2B,EAAE,CAAC;AACjE,MAAC,aAAa,GAAG,YAAY;AACzC,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,OAAO,mBAAmB,EAAE,CAAC;AACjC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getLaunchNotification.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AAMA;;;;;;;;;;;;;;;AAeG;AACU,MAAA,qBAAqB,GAA0B,YAAW;IACtE,MAAM,IAAI,yBAAyB,EAAE,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"getLaunchNotification.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';\n/**\n * Returns the notification which launched your app from a terminated state. The launch notification is consumed by\n * calls to this function and will yield a null result if:\n * 1. It is more than once (i.e. subsequent calls will be null)\n * 2. Another notification was opened while your app was running (either in foreground or background)\n * 3. Your app was brought back to the foreground by some other means (e.g. user tapped the app icon)\n *\n * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,\n * only React Native is supported by this API.\n * @returns {Promise<GetLaunchNotificationOutput>} - a promise resolving to {@link PushNotificationMessage} if there is\n * a launch notification and `null` otherwise.\n * @example\n * ```ts\n * const launchNotification = await getLaunchNotification();\n * ```\n */\nexport const getLaunchNotification = async () => {\n throw new PlatformNotSupportedError();\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,qBAAqB,GAAG,YAAY;AACjD,IAAI,MAAM,IAAI,yBAAyB,EAAE,CAAC;AAC1C;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getLaunchNotification.native.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAMA,MAAM,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,GAC3D,2BAA2B,EAAE,CAAC;AAElB,MAAA,qBAAqB,GAA0B,YAAW;AACtE,IAAA,mBAAmB,EAAE,CAAC;IACtB,OAAO,2BAA2B,EAAE,CAAC;AACtC;;;;"}
1
+ {"version":3,"file":"getLaunchNotification.native.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { loadAmplifyPushNotification } from '@aws-amplify/react-native';\nimport { assertIsInitialized } from '../../../errors/errorHelpers';\nconst { getLaunchNotification: getLaunchNotificationNative } = loadAmplifyPushNotification();\nexport const getLaunchNotification = async () => {\n assertIsInitialized();\n return getLaunchNotificationNative();\n};\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA,MAAM,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,GAAG,2BAA2B,EAAE,CAAC;AACjF,MAAC,qBAAqB,GAAG,YAAY;AACjD,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,OAAO,2BAA2B,EAAE,CAAC;AACzC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getPermissionStatus.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AAKA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AACU,MAAA,mBAAmB,GAAwB,YAAW;IAClE,MAAM,IAAI,yBAAyB,EAAE,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"getPermissionStatus.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';\n/**\n * Returns a string representing the current status of user permissions to display push notifications. The possible\n * statuses are as follows:\n *\n * * `'shouldRequest'` - No permissions have been requested yet. It is idiomatic at this time to simply request for\n * permissions from the user.\n *\n * * `'shouldExplainThenRequest'` - It is recommended at this time to provide some context or rationale to the user\n * explaining why you want to send them push notifications before requesting for permissions.\n *\n * * `'granted'` - Permissions have been granted by the user. No further actions are needed and their app is ready to\n * display notifications.\n *\n * * `'denied'` - Permissions have been denied by the user. Further attempts to request permissions will no longer\n * trigger a permission dialog. Your app should now either degrade gracefully or prompt your user to grant the\n * permissions needed in their device settings.\n *\n * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,\n * only React Native is supported by this API.\n * @return {Promise<GetPermissionStatusOutput>} a promise resolving to a string representing the current status of user\n * selected notification permissions.\n * @example\n * ```ts\n * const permissionStatus = await getPermissionStatus();\n */\nexport const getPermissionStatus = async () => {\n throw new PlatformNotSupportedError();\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,mBAAmB,GAAG,YAAY;AAC/C,IAAI,MAAM,IAAI,yBAAyB,EAAE,CAAC;AAC1C;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getPermissionStatus.native.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAMA,MAAM,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,GACvD,2BAA2B,EAAE,CAAC;AAElB,MAAA,mBAAmB,GAAwB,YAAW;AAClE,IAAA,mBAAmB,EAAE,CAAC;IACtB,OAAO,yBAAyB,EAAE,CAAC;AACpC;;;;"}
1
+ {"version":3,"file":"getPermissionStatus.native.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { loadAmplifyPushNotification } from '@aws-amplify/react-native';\nimport { assertIsInitialized } from '../../../errors/errorHelpers';\nconst { getPermissionStatus: getPermissionStatusNative } = loadAmplifyPushNotification();\nexport const getPermissionStatus = async () => {\n assertIsInitialized();\n return getPermissionStatusNative();\n};\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA,MAAM,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,GAAG,2BAA2B,EAAE,CAAC;AAC7E,MAAC,mBAAmB,GAAG,YAAY;AAC/C,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,OAAO,yBAAyB,EAAE,CAAC;AACvC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"identifyUser.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/identifyUser.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDG;AACU,MAAA,YAAY,GAAiB,YAAW;IACpD,MAAM,IAAI,yBAAyB,EAAE,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"identifyUser.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/identifyUser.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';\n/**\n * Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user\n * profile and activities or actions in your application. Activity can be tracked across devices & platforms by using\n * the same `userId`.\n *\n * @param {IdentifyUserInput} input The input object used to construct requests sent to Pinpoint's UpdateEndpoint\n * API.\n * @throws service: {@link UpdateEndpointException} - Thrown when the underlying Pinpoint service returns an error.\n * @throws validation: {@link PushNotificationValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect.\n * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,\n * only React Native is supported by this API.\n * @returns A promise that will resolve when the operation is complete.\n * @example\n * ```ts\n * // Identify a user with Pinpoint\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * }\n * });\n * ```\n *\n * @example\n * ```ts\n * // Identify a user with Pinpoint specific options\n * await identifyUser({\n * userId,\n * userProfile: {\n * email: 'userEmail@example.com'\n * customProperties: {\n * phoneNumber: ['555-555-5555'],\n * },\n * demographic: {\n * platform: 'ios',\n * timezone: 'America/Los_Angeles'\n * }\n * },\n * options: {\n * address: 'device-address',\n * optOut: 'NONE',\n * userAttributes: {\n * interests: ['food']\n * },\n * },\n * });\n */\nexport const identifyUser = async () => {\n throw new PlatformNotSupportedError();\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,YAAY,GAAG,YAAY;AACxC,IAAI,MAAM,IAAI,yBAAyB,EAAE,CAAC;AAC1C;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"identifyUser.native.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/identifyUser.native.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AAYO,MAAM,YAAY,GAAiB,OAAO,EAChD,MAAM,EACN,WAAW,EACX,OAAO,GACP,KAAI;AACJ,IAAA,mBAAmB,EAAE,CAAC;IACtB,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,kBAAkB,EAAE,CAAC;IAC/D,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;IAC1C,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;AAC1D,IAAA,cAAc,CAAC;QACd,OAAO;QACP,WAAW,EAAE,cAAc,EAAE;QAC7B,MAAM;QACN,KAAK;AACL,QAAA,QAAQ,EAAE,kBAAkB;QAC5B,WAAW;QACX,UAAU;QACV,MAAM;QACN,cAAc;QACd,MAAM;QACN,WAAW;AACX,QAAA,cAAc,EAAE,kCAAkC,CACjD,sBAAsB,CAAC,YAAY,CACnC;AACD,KAAA,CAAC,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"identifyUser.native.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/identifyUser.native.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PushNotificationAction } from '@aws-amplify/core/internals/utils';\nimport { updateEndpoint } from '@aws-amplify/core/internals/providers/pinpoint';\nimport { assertIsInitialized } from '../../../errors/errorHelpers';\nimport { getPushNotificationUserAgentString, resolveCredentials, } from '../../../utils';\nimport { getChannelType, resolveConfig } from '../utils';\nexport const identifyUser = async ({ userId, userProfile, options, }) => {\n assertIsInitialized();\n const { credentials, identityId } = await resolveCredentials();\n const { appId, region } = resolveConfig();\n const { address, optOut, userAttributes } = options ?? {};\n updateEndpoint({\n address,\n channelType: getChannelType(),\n optOut,\n appId,\n category: 'PushNotification',\n credentials,\n identityId,\n region,\n userAttributes,\n userId,\n userProfile,\n userAgentValue: getPushNotificationUserAgentString(PushNotificationAction.IdentifyUser),\n });\n};\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AAMY,MAAC,YAAY,GAAG,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,KAAK;AACzE,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,kBAAkB,EAAE,CAAC;AACnE,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;AAC9C,IAAI,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;AAC9D,IAAI,cAAc,CAAC;AACnB,QAAQ,OAAO;AACf,QAAQ,WAAW,EAAE,cAAc,EAAE;AACrC,QAAQ,MAAM;AACd,QAAQ,KAAK;AACb,QAAQ,QAAQ,EAAE,kBAAkB;AACpC,QAAQ,WAAW;AACnB,QAAQ,UAAU;AAClB,QAAQ,MAAM;AACd,QAAQ,cAAc;AACtB,QAAQ,MAAM;AACd,QAAQ,WAAW;AACnB,QAAQ,cAAc,EAAE,kCAAkC,CAAC,sBAAsB,CAAC,YAAY,CAAC;AAC/F,KAAK,CAAC,CAAC;AACP;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"initializePushNotifications.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/initializePushNotifications.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AAKA;;;;;;;;;;;;;;AAcG;AACI,MAAM,2BAA2B,GAAgC,MAAK;IAC5E,MAAM,IAAI,yBAAyB,EAAE,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"initializePushNotifications.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/initializePushNotifications.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';\n/**\n * Initialize and set up the push notification category. The category must be first initialized before all other\n * functionalities become available.\n *\n * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,\n * only React Native is supported by this API.\n * @remarks\n * It is recommended that this be called as early in your app as possible at the root of your application to allow\n * background processing of notifications.\n * @example\n * ```ts\n * Amplify.configure(config);\n * initializePushNotifications();\n * ```\n */\nexport const initializePushNotifications = () => {\n throw new PlatformNotSupportedError();\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,2BAA2B,GAAG,MAAM;AACjD,IAAI,MAAM,IAAI,yBAAyB,EAAE,CAAC;AAC1C;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"initializePushNotifications.native.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;AAAA;AACA;AA0BA,MAAM,EACL,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,YAAY,EACZ,oBAAoB,GACpB,GAAG,2BAA2B,EAAE,CAAC;AAElC,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,gCAAgC,CAAC,CAAC;AAEnE,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE5B,MAAM,2BAA2B,GAAG,MAAW;IACrD,IAAI,aAAa,EAAE,EAAE;AACpB,QAAA,MAAM,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC;QAC5D,OAAO;AACP,KAAA;AACD,IAAA,kBAAkB,EAAE,CAAC;AACrB,IAAA,qBAAqB,EAAE,CAAC;AACxB,IAAA,UAAU,EAAE,CAAC;AACd,EAAE;AAEF,MAAM,kBAAkB,GAAG,MAAW;AACrC,IAAA,IAAI,gCAEI,CAAC;IACT,MAAM,EAAE,WAAW,EA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,IAAA,uCAAuC,EAAE,MAAM,CAC/C,CACD,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,OAAO,OAAe,KAAmB;IAC/D,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,kBAAkB,EAAE,CAAC;IAC/D,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;AAC1C,IAAA,MAAM,cAAc,CAAC;QACpB,OAAO;QACP,KAAK;AACL,QAAA,QAAQ,EAAE,kBAAkB;QAC5B,WAAW;QACX,MAAM;QACN,WAAW,EAAE,cAAc,EAAE;QAC7B,UAAU;AACV,QAAA,cAAc,EAAE,kCAAkC,CACjD,sBAAsB,CAAC,2BAA2B,CAClD;AACD,KAAA,CAAC,CAAC;AACJ,CAAC;;;;"}
1
+ {"version":3,"file":"initializePushNotifications.native.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ConsoleLogger } from '@aws-amplify/core';\nimport { PushNotificationAction } from '@aws-amplify/core/internals/utils';\nimport { updateEndpoint } from '@aws-amplify/core/internals/providers/pinpoint';\nimport { loadAmplifyPushNotification } from '@aws-amplify/react-native';\nimport { addEventListener, notifyEventListeners, notifyEventListenersAndAwaitHandlers, } from '../../../../eventListeners';\nimport { getPushNotificationUserAgentString, getToken, initialize, isInitialized, resolveCredentials, setToken, } from '../../../utils';\nimport { createMessageEventRecorder, getChannelType, resolveConfig, } from '../utils';\nconst { addMessageEventListener, addTokenEventListener, completeNotification, getConstants, registerHeadlessTask, } = loadAmplifyPushNotification();\nconst logger = new ConsoleLogger('Notifications.PushNotification');\nconst BACKGROUND_TASK_TIMEOUT = 25; // seconds\nexport const initializePushNotifications = () => {\n if (isInitialized()) {\n logger.info('Push notifications have already been enabled');\n return;\n }\n addNativeListeners();\n addAnalyticsListeners();\n initialize();\n};\nconst addNativeListeners = () => {\n let launchNotificationOpenedListener;\n const { NativeEvent, NativeHeadlessTaskKey } = getConstants();\n const { BACKGROUND_MESSAGE_RECEIVED, FOREGROUND_MESSAGE_RECEIVED, LAUNCH_NOTIFICATION_OPENED, NOTIFICATION_OPENED, TOKEN_RECEIVED, } = NativeEvent;\n // on platforms that can handle headless tasks, register one to broadcast background message received to\n // library listeners\n if (NativeHeadlessTaskKey) {\n registerHeadlessTask(async (message) => {\n // keep headless task running until handlers have completed their work\n await notifyEventListenersAndAwaitHandlers('backgroundMessageReceived', message);\n });\n }\n else if (BACKGROUND_MESSAGE_RECEIVED) {\n // on platforms that can't handle headless tasks, listen for native background message received event and\n // broadcast to library listeners\n addMessageEventListener(BACKGROUND_MESSAGE_RECEIVED, async (message, completionHandlerId) => {\n // keep background task running until handlers have completed their work\n try {\n await Promise.race([\n notifyEventListenersAndAwaitHandlers('backgroundMessageReceived', message),\n // background tasks will get suspended and all future tasks be deprioritized by the OS if they run for\n // more than 30 seconds so we reject with a error in a shorter amount of time to prevent this from\n // happening\n new Promise((_, reject) => {\n setTimeout(() => reject(`onNotificationReceivedInBackground handlers should complete their work within ${BACKGROUND_TASK_TIMEOUT} seconds, but they did not.`), BACKGROUND_TASK_TIMEOUT * 1000);\n }),\n ]);\n }\n catch (err) {\n logger.error(err);\n }\n finally {\n // notify native module that handlers have completed their work (or timed out)\n if (completionHandlerId) {\n completeNotification(completionHandlerId);\n }\n }\n });\n }\n addMessageEventListener(\n // listen for native foreground message received event and broadcast to library listeners\n FOREGROUND_MESSAGE_RECEIVED, message => {\n notifyEventListeners('foregroundMessageReceived', message);\n });\n launchNotificationOpenedListener = LAUNCH_NOTIFICATION_OPENED\n ? addMessageEventListener(\n // listen for native notification opened app (user tapped on notification, opening the app from quit -\n // not background - state) event. This is broadcasted to an internal listener only as it is not intended\n // for use otherwise as it produces inconsistent results when used within React Native app context\n LAUNCH_NOTIFICATION_OPENED, message => {\n notifyEventListeners('launchNotificationOpened', message);\n // once we are done with it we can remove the listener\n launchNotificationOpenedListener?.remove();\n })\n : null;\n addMessageEventListener(\n // listen for native notification opened (user tapped on notification, opening the app from background -\n // not quit - state) event and broadcast to library listeners\n NOTIFICATION_OPENED, message => {\n notifyEventListeners('notificationOpened', message);\n // if we are in this state, we no longer need the listener as the app was launched via some other means\n launchNotificationOpenedListener?.remove();\n });\n addTokenEventListener(\n // listen for native new token event, automatically re-register device with provider using new token and\n // broadcast to library listeners\n TOKEN_RECEIVED, async (token) => {\n // avoid a race condition where two endpoints are created with the same token on a fresh install\n if (getToken() === token) {\n return;\n }\n setToken(token);\n notifyEventListeners('tokenReceived', token);\n try {\n await registerDevice(token);\n }\n catch (err) {\n logger.error('Failed to register device for push notifications', err);\n throw err;\n }\n });\n};\nconst addAnalyticsListeners = () => {\n let launchNotificationOpenedListenerRemover;\n // wire up default Pinpoint message event handling\n addEventListener('backgroundMessageReceived', createMessageEventRecorder('received_background'));\n addEventListener('foregroundMessageReceived', createMessageEventRecorder('received_foreground'));\n launchNotificationOpenedListenerRemover = addEventListener('launchNotificationOpened', createMessageEventRecorder('opened_notification', \n // once we are done with it we can remove the listener\n launchNotificationOpenedListenerRemover?.remove));\n addEventListener('notificationOpened', createMessageEventRecorder('opened_notification', \n // if we are in this state, we no longer need the listener as the app was launched via some other means\n launchNotificationOpenedListenerRemover?.remove));\n};\nconst registerDevice = async (address) => {\n const { credentials, identityId } = await resolveCredentials();\n const { appId, region } = resolveConfig();\n await updateEndpoint({\n address,\n appId,\n category: 'PushNotification',\n credentials,\n region,\n channelType: getChannelType(),\n identityId,\n userAgentValue: getPushNotificationUserAgentString(PushNotificationAction.InitializePushNotifications),\n });\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;AACA;AAQA,MAAM,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,YAAY,EAAE,oBAAoB,GAAG,GAAG,2BAA2B,EAAE,CAAC;AACpJ,MAAM,MAAM,G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AC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"onNotificationOpened.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationOpened.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AAUA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AACI,MAAM,oBAAoB,GAAyB,MAAK;IAC9D,MAAM,IAAI,yBAAyB,EAAE,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"onNotificationOpened.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationOpened.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';\n/**\n * Registers a listener that will be triggered when a notification is opened by user.\n *\n * @param {OnNotificationOpenedInput} input - A callback handler to be invoked with the opened\n * {@link PushNotificationMessage}.\n * @returns {OnNotificationOpenedOutput} - An object with a remove function to remove the listener.\n * @example\n * ```ts\n * // Register a listener\n * onNotificationOpened(message => {\n * doSomething(message);\n * });\n * ```\n * @example\n * ```ts\n * // Register multiple listeners\n * onNotificationOpened(message => {\n * doSomething(message);\n * });\n *\n * onNotificationOpened(message => {\n * doSomethingElse(message);\n * });\n * ```\n */\nexport const onNotificationOpened = () => {\n throw new PlatformNotSupportedError();\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,oBAAoB,GAAG,MAAM;AAC1C,IAAI,MAAM,IAAI,yBAAyB,EAAE,CAAC;AAC1C;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"onNotificationOpened.native.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAMa,MAAA,oBAAoB,GAAyB,KAAK,IAAG;AACjE,IAAA,mBAAmB,EAAE,CAAC;AACtB,IAAA,OAAO,gBAAgB,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;AACtD;;;;"}
1
+ {"version":3,"file":"onNotificationOpened.native.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { addEventListener } from '../../../../eventListeners';\nimport { assertIsInitialized } from '../../../errors/errorHelpers';\nexport const onNotificationOpened = input => {\n assertIsInitialized();\n return addEventListener('notificationOpened', input);\n};\n"],"names":[],"mappings":";;;AAAA;AACA;AAGY,MAAC,oBAAoB,GAAG,KAAK,IAAI;AAC7C,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,OAAO,gBAAgB,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;AACzD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"onNotificationReceivedInBackground.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCG;AACI,MAAM,kCAAkC,GAC9C,MAAK;IACJ,MAAM,IAAI,yBAAyB,EAAE,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"onNotificationReceivedInBackground.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';\n/**\n * Registers a listener that will be triggered when a notification is received while app is in a background state.\n *\n * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,\n * only React Native is supported by this API.\n * @param {OnNotificationReceivedInBackgroundInput} input - A callback handler to be invoked with the received\n * {@link PushNotificationMessage}.\n * @returns {OnNotificationReceivedInBackgroundOutput} - An object with a remove function to remove the listener.\n * @remarks Notifications received while app is in a quit state will start the app (as a headless JS instance running\n * on a background service on Android) in the background. Handlers registered via this function should return promises\n * if it needs to be asynchronous (e.g. to perform some network requests). The app should run in the background as long\n * as there are handlers still running (however, if they run for more than 30 seconds on iOS, subsequent tasks could\n * get deprioritized!). If it is necessary for a handler to execute while the app is in quit state, it should be\n * registered in the application entry point (e.g. index.js) since the application will not fully mount in that case.\n * @example\n * ```ts\n * // Register a listener\n * onNotificationReceivedInBackground(message => {\n * doSomething(message);\n * });\n * ```\n * @example\n * ```ts\n * // Register multiple listeners\n * onNotificationReceivedInBackground(message => {\n * doSomething(message);\n * });\n *\n * onNotificationReceivedInBackground(message => {\n * doSomethingElse(message);\n * });\n * ```\n * @example\n * ```ts\n * // Register async listener\n * onNotificationReceivedInBackground(async message => {\n * await doSomething(message);\n * console.log(`did something with ${message}`);\n * });\n * ```\n */\nexport const onNotificationReceivedInBackground = () => {\n throw new PlatformNotSupportedError();\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,kCAAkC,GAAG,MAAM;AACxD,IAAI,MAAM,IAAI,yBAAyB,EAAE,CAAC;AAC1C;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"onNotificationReceivedInBackground.native.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAMa,MAAA,kCAAkC,GAC9C,KAAK,IAAG;AACP,IAAA,mBAAmB,EAAE,CAAC;AACtB,IAAA,OAAO,gBAAgB,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;AAC7D;;;;"}
1
+ {"version":3,"file":"onNotificationReceivedInBackground.native.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { addEventListener } from '../../../../eventListeners';\nimport { assertIsInitialized } from '../../../errors/errorHelpers';\nexport const onNotificationReceivedInBackground = input => {\n assertIsInitialized();\n return addEventListener('backgroundMessageReceived', input);\n};\n"],"names":[],"mappings":";;;AAAA;AACA;AAGY,MAAC,kCAAkC,GAAG,KAAK,IAAI;AAC3D,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,OAAO,gBAAgB,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;AAChE;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"onNotificationReceivedInForeground.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AAUA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AACI,MAAM,kCAAkC,GAC9C,MAAK;IACJ,MAAM,IAAI,yBAAyB,EAAE,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"onNotificationReceivedInForeground.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';\n/**\n * Registers a listener that will be triggered when a notification is received while app is in a foreground state.\n *\n * @param {OnNotificationReceivedInForegroundInput} input - A callback handler to be invoked with the received\n * {@link PushNotificationMessage}.\n * @returns {OnNotificationReceivedInForegroundOutput} - An object with a remove function to remove the listener.\n * @example\n * ```ts\n * // Register a listener\n * onNotificationReceivedInForeground(message => {\n * doSomething(message);\n * });\n * ```\n * @example\n * ```ts\n * // Register multiple listeners\n * onNotificationReceivedInForeground(message => {\n * doSomething(message);\n * });\n *\n * onNotificationReceivedInForeground(message => {\n * doSomethingElse(message);\n * });\n * ```\n */\nexport const onNotificationReceivedInForeground = () => {\n throw new PlatformNotSupportedError();\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,kCAAkC,GAAG,MAAM;AACxD,IAAI,MAAM,IAAI,yBAAyB,EAAE,CAAC;AAC1C;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"onNotificationReceivedInForeground.native.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAMa,MAAA,kCAAkC,GAC9C,KAAK,IAAG;AACP,IAAA,mBAAmB,EAAE,CAAC;AACtB,IAAA,OAAO,gBAAgB,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;AAC7D;;;;"}
1
+ {"version":3,"file":"onNotificationReceivedInForeground.native.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { addEventListener } from '../../../../eventListeners';\nimport { assertIsInitialized } from '../../../errors/errorHelpers';\nexport const onNotificationReceivedInForeground = input => {\n assertIsInitialized();\n return addEventListener('foregroundMessageReceived', input);\n};\n"],"names":[],"mappings":";;;AAAA;AACA;AAGY,MAAC,kCAAkC,GAAG,KAAK,IAAI;AAC3D,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,OAAO,gBAAgB,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;AAChE;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"onTokenReceived.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/onTokenReceived.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AASA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;AACI,MAAM,eAAe,GAAoB,MAAK;IACpD,MAAM,IAAI,yBAAyB,EAAE,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"onTokenReceived.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/onTokenReceived.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';\n/**\n * Registers a listener that will be triggered when a token is received. A token will be received:\n * 1. On every app launch, including the first install\n * 2. When a token changes (this may happen if the service invalidates the token for any reason)\n *\n * @param {OnTokenReceivedInput} input - A callback handler to be invoked with the token.\n * @returns {OnTokenReceivedOutput} - An object with a remove function to remove the listener.\n * @example\n * ```ts\n * // Register a listener\n * onTokenReceived(message => {\n * doSomething(message);\n * });\n * ```\n * @example\n * ```ts\n * // Register multiple listeners\n * onTokenReceived(message => {\n * doSomething(message);\n * });\n *\n * onTokenReceived(message => {\n * doSomethingElse(message);\n * });\n * ```\n */\nexport const onTokenReceived = () => {\n throw new PlatformNotSupportedError();\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,eAAe,GAAG,MAAM;AACrC,IAAI,MAAM,IAAI,yBAAyB,EAAE,CAAC;AAC1C;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"onTokenReceived.native.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAMa,MAAA,eAAe,GAAoB,KAAK,IAAG;AACvD,IAAA,mBAAmB,EAAE,CAAC;AACtB,IAAA,OAAO,gBAAgB,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;AACjD;;;;"}
1
+ {"version":3,"file":"onTokenReceived.native.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { addEventListener } from '../../../../eventListeners';\nimport { assertIsInitialized } from '../../../errors/errorHelpers';\nexport const onTokenReceived = input => {\n assertIsInitialized();\n return addEventListener('tokenReceived', input);\n};\n"],"names":[],"mappings":";;;AAAA;AACA;AAGY,MAAC,eAAe,GAAG,KAAK,IAAI;AACxC,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,OAAO,gBAAgB,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;AACpD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"requestPermissions.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/requestPermissions.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BG;AACU,MAAA,kBAAkB,GAAuB,YAAW;IAChE,MAAM,IAAI,yBAAyB,EAAE,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"requestPermissions.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/requestPermissions.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';\n/**\n * Requests notification permissions from your user. By default, Amplify requests all supported permissions but you can\n * choose not to request specific permissions. The resulting promise will resolve to true if requested permissions are\n * granted (or have previously been granted) or false otherwise. Not all specific permissions are supported by platforms\n * your React Native app can run on but will be safely ignored even on those platforms. Currently supported permissions:\n *\n * * `alert`: When set to true, requests the ability to display notifications to the user.\n *\n * * `sound`: When set to true, requests the ability to play a sound in response to notifications.\n *\n * * `badge`: When set to true, requests the ability to update the app's badge.\n *\n * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,\n * only React Native is supported by this API.\n * @returns A promise that resolves to true if requested permissions are granted or have already previously been\n * granted or false otherwise.\n * @example\n * ```ts\n * // Request all permissions by default\n * const arePermissionsGranted = await requestPermissions();\n *\n * @example\n * ```ts\n * // Prevent requesting specific permissions\n * const arePermissionsGranted = await requestPermissions({\n * sound: false,\n * badge: false\n * });\n * ```\n */\nexport const requestPermissions = async () => {\n throw new PlatformNotSupportedError();\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,kBAAkB,GAAG,YAAY;AAC9C,IAAI,MAAM,IAAI,yBAAyB,EAAE,CAAC;AAC1C;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"requestPermissions.native.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/requestPermissions.native.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAMA,MAAM,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,GACrD,2BAA2B,EAAE,CAAC;MAElB,kBAAkB,GAAuB,OAAM,KAAK,KAAG;AACnE,IAAA,mBAAmB,EAAE,CAAC;AACtB,IAAA,OAAO,wBAAwB,CAAC,KAAK,CAAC,CAAC;AACxC;;;;"}
1
+ {"version":3,"file":"requestPermissions.native.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/requestPermissions.native.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { loadAmplifyPushNotification } from '@aws-amplify/react-native';\nimport { assertIsInitialized } from '../../../errors/errorHelpers';\nconst { requestPermissions: requestPermissionsNative } = loadAmplifyPushNotification();\nexport const requestPermissions = async (input) => {\n assertIsInitialized();\n return requestPermissionsNative(input);\n};\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA,MAAM,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,GAAG,2BAA2B,EAAE,CAAC;AAC3E,MAAC,kBAAkB,GAAG,OAAO,KAAK,KAAK;AACnD,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,OAAO,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAC3C;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"setBadgeCount.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/setBadgeCount.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AAKA;;;;;;;;;;;AAWG;AACI,MAAM,aAAa,GAAkB,MAAK;IAChD,MAAM,IAAI,yBAAyB,EAAE,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"setBadgeCount.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/setBadgeCount.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';\n/**\n * Sets the current badge count (the number on the top right corner of your app's icon). Setting the badge count\n * to 0 (zero) will remove the badge from your app's icon. This function is safe to call (but will be ignored) even\n * when your React Native app is running on platforms where badges are not supported.\n *\n * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,\n * only React Native is supported by this API.\n * @example\n * ```ts\n * setBadgeCount(42);\n * ```\n */\nexport const setBadgeCount = () => {\n throw new PlatformNotSupportedError();\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,aAAa,GAAG,MAAM;AACnC,IAAI,MAAM,IAAI,yBAAyB,EAAE,CAAC;AAC1C;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"setBadgeCount.native.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAMA,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,GAAG,2BAA2B,EAAE,CAAC;AAEhE,MAAA,aAAa,GAAkB,KAAK,IAAG;AACnD,IAAA,mBAAmB,EAAE,CAAC;IACtB,mBAAmB,CAAC,KAAK,CAAC,CAAC;AAC5B;;;;"}
1
+ {"version":3,"file":"setBadgeCount.native.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { loadAmplifyPushNotification } from '@aws-amplify/react-native';\nimport { assertIsInitialized } from '../../../errors/errorHelpers';\nconst { setBadgeCount: setBadgeCountNative } = loadAmplifyPushNotification();\nexport const setBadgeCount = input => {\n assertIsInitialized();\n setBadgeCountNative(input);\n};\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,GAAG,2BAA2B,EAAE,CAAC;AACjE,MAAC,aAAa,GAAG,KAAK,IAAI;AACtC,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,mBAAmB,CAAC,KAAK,CAAC,CAAC;AAC/B;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"createMessageEventRecorder.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;AAAA;AACA;AAeA,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,qCAAqC,CAAC,CAAC;AAExE;;AAEG;AACI,MAAM,0BAA0B,GACtC,CACC,KAA2B,EAC3B,QAAmB,KAEpB,OAAM,OAAO,KAAG;AACf,IAAA,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,kBAAkB,EAAE,CAAC;IACnD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;AAC1C,IAAA,MAAM,kBAAkB,CAAC;QACxB,KAAK;QACL,WAAW;QACX,KAAK;QACL,OAAO;QACP,MAAM;AACN,KAAA,CAAC,CAAC;IACH,QAAQ,IAAI,CAAC;AACd,EAAE;AAEH,MAAM,kBAAkB,GAAG,OAAO,EACjC,KAAK,EACL,WAAW,EACX,KAAK,EACL,OAAO,EACP,MAAM,GAON,KAAmB;IACnB,MAAM,cAAc,GAAG,iBAAiB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACzD,IAAI,CAAC,cAAc,EAAE;AACpB,QAAA,MAAM,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;QAC1E,OAAO;AACP,KAAA;AACD,IAAA,OAAO,MAAM,CAAC;QACb,KAAK;AACL,QAAA,QAAQ,EAAE,kBAAkB;QAC5B,WAAW,EAAE,cAAc,EAAE;QAC7B,WAAW;AACX,QAAA,KAAK,EAAE,cAAc;QACrB,MAAM;AACN,KAAA,CAAC,CAAC;AACJ,CAAC;;;;"}
1
+ {"version":3,"file":"createMessageEventRecorder.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { record } from '@aws-amplify/core/internals/providers/pinpoint';\nimport { ConsoleLogger } from '@aws-amplify/core';\nimport { resolveCredentials } from '../../../utils';\nimport { getAnalyticsEvent } from './getAnalyticsEvent';\nimport { getChannelType } from './getChannelType';\nimport { resolveConfig } from './resolveConfig';\nconst logger = new ConsoleLogger('PushNotification.recordMessageEvent');\n/**\n * @internal\n */\nexport const createMessageEventRecorder = (event, callback) => async (message) => {\n const { credentials } = await resolveCredentials();\n const { appId, region } = resolveConfig();\n await recordMessageEvent({\n appId,\n credentials,\n event,\n message,\n region,\n });\n callback?.();\n};\nconst recordMessageEvent = async ({ appId, credentials, event, message, region, }) => {\n const analyticsEvent = getAnalyticsEvent(message, event);\n if (!analyticsEvent) {\n logger.debug('A notification missing event information was not recorded');\n return;\n }\n return record({\n appId,\n category: 'PushNotification',\n channelType: getChannelType(),\n credentials,\n event: analyticsEvent,\n region,\n });\n};\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;AAOA,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,qCAAqC,CAAC,CAAC;AACxE;AACA;AACA;AACY,MAAC,0BAA0B,GAAG,CAAC,KAAK,EAAE,QAAQ,KAAK,OAAO,OAAO,KAAK;AAClF,IAAI,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,kBAAkB,EAAE,CAAC;AACvD,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;AAC9C,IAAI,MAAM,kBAAkB,CAAC;AAC7B,QAAQ,KAAK;AACb,QAAQ,WAAW;AACnB,QAAQ,KAAK;AACb,QAAQ,OAAO;AACf,QAAQ,MAAM;AACd,KAAK,CAAC,CAAC;AACP,IAAI,QAAQ,IAAI,CAAC;AACjB,EAAE;AACF,MAAM,kBAAkB,GAAG,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK;AACtF,IAAI,MAAM,cAAc,GAAG,iBAAiB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAC7D,IAAI,IAAI,CAAC,cAAc,EAAE;AACzB,QAAQ,MAAM,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;AAClF,QAAQ,OAAO;AACf,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,QAAQ,KAAK;AACb,QAAQ,QAAQ,EAAE,kBAAkB;AACpC,QAAQ,WAAW,EAAE,cAAc,EAAE;AACrC,QAAQ,WAAW;AACnB,QAAQ,KAAK,EAAE,cAAc;AAC7B,QAAQ,MAAM;AACd,KAAK,CAAC,CAAC;AACP,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getAnalyticsEvent.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AAMA,MAAM,gCAAgC,GACrC,wCAAwC,CAAC;AAC1C,MAAM,uBAAuB,GAAG,+BAA+B,CAAC;AAChE,MAAM,iCAAiC,GAAG,gCAAgC,CAAC;AAE3E;;AAEG;AACU,MAAA,iBAAiB,GAAG,CAChC,EAAE,IAAI,EAA2B,EACjC,KAA2B,KACO;IAClC,IAAI,CAAC,IAAI,EAAE;AACV,QAAA,OAAO,IAAI,CAAC;AACZ,KAAA;AACD,IAAA,MAAM,eAAe,GAAG,2BAA2B,CAAC,IAAI,CAAC,CAAC;IAC1D,IAAI,CAAC,eAAe,EAAE;AACrB,QAAA,OAAO,IAAI,CAAC;AACZ,KAAA;AACD,IAAA,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,eAAe,CAAC;IAC/C,OAAO;QACN,UAAU;AACV,QAAA,IAAI,EAAE,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,KAAK,CAAE,CAAA;KAC1B,CAAC;AACH,EAAE;AAEF,MAAM,2BAA2B,GAAG,CACnC,IAAqC,KACI;IACzC,IAAI,CAAC,IAAI,EAAE;QACV,OAAO;AACP,KAAA;AACD,IAAA,IAAI,IAAI,CAAC,cAAc,CAAC,uBAAuB,CAAC,EAAE;QACjD,OAAO;AACN,YAAA,MAAM,EAAE,WAAW;AACnB,YAAA,UAAU,EAAE;AACX,gBAAA,oBAAoB,EAAE,IAAI,CAAC,gCAAgC,CAAW;AACtE,gBAAA,WAAW,EAAE,IAAI,CAAC,uBAAuB,CAAW;AACpD,gBAAA,YAAY,EAAE,IAAI,CAAC,iCAAiC,CAAW;AAC/D,aAAA;SACD,CAAC;AACF,KAAA;AACD,IAAA,MAAM,QAAQ,GACb,OAAO,IAAI,CAAC,QAAQ,KAAK,QAAQ;UAC9B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC;AAC3B,UAAE,IAAI,CAAC,QAAQ,CAAC;IAClB,IAAI,QAAQ,EAAE,QAAQ,EAAE;QACvB,OAAO;AACN,YAAA,MAAM,EAAE,WAAW;YACnB,UAAU,EAAE,QAAQ,CAAC,QAAQ;SAC7B,CAAC;AACF,KAAA;IACD,IAAI,QAAQ,EAAE,OAAO,EAAE;QACtB,OAAO;AACN,YAAA,MAAM,EAAE,UAAU;YAClB,UAAU,EAAE,QAAQ,CAAC,OAAO;SAC5B,CAAC;AACF,KAAA;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"getAnalyticsEvent.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst ANDROID_CAMPAIGN_ACTIVITY_ID_KEY = 'pinpoint.campaign.campaign_activity_id';\nconst ANDROID_CAMPAIGN_ID_KEY = 'pinpoint.campaign.campaign_id';\nconst ANDROID_CAMPAIGN_TREATMENT_ID_KEY = 'pinpoint.campaign.treatment_id';\n/**\n * @internal\n */\nexport const getAnalyticsEvent = ({ data }, event) => {\n if (!data) {\n return null;\n }\n const eventAttributes = getAnalyticsEventAttributes(data);\n if (!eventAttributes) {\n return null;\n }\n const { source, attributes } = eventAttributes;\n return {\n attributes,\n name: `${source}.${event}`,\n };\n};\nconst getAnalyticsEventAttributes = (data) => {\n if (!data) {\n return;\n }\n if (data.hasOwnProperty(ANDROID_CAMPAIGN_ID_KEY)) {\n return {\n source: '_campaign',\n attributes: {\n campaign_activity_id: data[ANDROID_CAMPAIGN_ACTIVITY_ID_KEY],\n campaign_id: data[ANDROID_CAMPAIGN_ID_KEY],\n treatment_id: data[ANDROID_CAMPAIGN_TREATMENT_ID_KEY],\n },\n };\n }\n const pinpoint = typeof data.pinpoint === 'string'\n ? JSON.parse(data.pinpoint)\n : data.pinpoint;\n if (pinpoint?.campaign) {\n return {\n source: '_campaign',\n attributes: pinpoint.campaign,\n };\n }\n if (pinpoint?.journey) {\n return {\n source: '_journey',\n attributes: pinpoint.journey,\n };\n }\n};\n"],"names":[],"mappings":"AAAA;AACA;AACA,MAAM,gCAAgC,GAAG,wCAAwC,CAAC;AAClF,MAAM,uBAAuB,GAAG,+BAA+B,CAAC;AAChE,MAAM,iCAAiC,GAAG,gCAAgC,CAAC;AAC3E;AACA;AACA;AACY,MAAC,iBAAiB,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,KAAK;AACtD,IAAI,IAAI,CAAC,IAAI,EAAE;AACf,QAAQ,OAAO,IAAI,CAAC;AACpB,KAAK;AACL,IAAI,MAAM,eAAe,GAAG,2BAA2B,CAAC,IAAI,CAAC,CAAC;AAC9D,IAAI,IAAI,CAAC,eAAe,EAAE;AAC1B,QAAQ,OAAO,IAAI,CAAC;AACpB,KAAK;AACL,IAAI,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,eAAe,CAAC;AACnD,IAAI,OAAO;AACX,QAAQ,UAAU;AAClB,QAAQ,IAAI,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AAClC,KAAK,CAAC;AACN,EAAE;AACF,MAAM,2BAA2B,GAAG,CAAC,IAAI,KAAK;AAC9C,IAAI,IAAI,CAAC,IAAI,EAAE;AACf,QAAQ,OAAO;AACf,KAAK;AACL,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,uBAAuB,CAAC,EAAE;AACtD,QAAQ,OAAO;AACf,YAAY,MAAM,EAAE,WAAW;AAC/B,YAAY,UAAU,EAAE;AACxB,gBAAgB,oBAAoB,EAAE,IAAI,CAAC,gCAAgC,CAAC;AAC5E,gBAAgB,WAAW,EAAE,IAAI,CAAC,uBAAuB,CAAC;AAC1D,gBAAgB,YAAY,EAAE,IAAI,CAAC,iCAAiC,CAAC;AACrE,aAAa;AACb,SAAS,CAAC;AACV,KAAK;AACL,IAAI,MAAM,QAAQ,GAAG,OAAO,IAAI,CAAC,QAAQ,KAAK,QAAQ;AACtD,UAAU,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC;AACnC,UAAU,IAAI,CAAC,QAAQ,CAAC;AACxB,IAAI,IAAI,QAAQ,EAAE,QAAQ,EAAE;AAC5B,QAAQ,OAAO;AACf,YAAY,MAAM,EAAE,WAAW;AAC/B,YAAY,UAAU,EAAE,QAAQ,CAAC,QAAQ;AACzC,SAAS,CAAC;AACV,KAAK;AACL,IAAI,IAAI,QAAQ,EAAE,OAAO,EAAE;AAC3B,QAAQ,OAAO;AACf,YAAY,MAAM,EAAE,UAAU;AAC9B,YAAY,UAAU,EAAE,QAAQ,CAAC,OAAO;AACxC,SAAS,CAAC;AACV,KAAK;AACL,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getChannelType.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/utils/getChannelType.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAMA,MAAM,eAAe,GAAG,kBAAkB,EAAE,CAAC;AAC7C,MAAM,SAAS,GAAG,eAAe,KAAK,SAAS,CAAC;AAChD,MAAM,KAAK,GAAG,eAAe,KAAK,KAAK,CAAC;AAExC;;AAEG;AACI,MAAM,cAAc,GAAG,MAAkB;AAC/C,IAAA,IAAI,SAAS,EAAE;;AAEd,QAAA,OAAO,KAAK,CAAC;AACb,KAAA;AACD,IAAA,IAAI,KAAK,EAAE;;QAEV,OAAO,OAAO,GAAG,cAAc,GAAG,MAAM,CAAC;AACzC,KAAA;IACD,MAAM,IAAI,yBAAyB,EAAE,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"getChannelType.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/utils/getChannelType.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PlatformNotSupportedError } from '@aws-amplify/core/internals/utils';\nimport { getOperatingSystem } from '@aws-amplify/react-native';\nconst operatingSystem = getOperatingSystem();\nconst isAndroid = operatingSystem === 'android';\nconst isIos = operatingSystem === 'ios';\n/**\n * @internal\n */\nexport const getChannelType = () => {\n if (isAndroid) {\n // FCM was previously known as GCM and continues to be the channel type in Pinpoint\n return 'GCM';\n }\n if (isIos) {\n // If building in debug mode, use the APNs sandbox\n return __DEV__ ? 'APNS_SANDBOX' : 'APNS';\n }\n throw new PlatformNotSupportedError();\n};\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA,MAAM,eAAe,GAAG,kBAAkB,EAAE,CAAC;AAC7C,MAAM,SAAS,GAAG,eAAe,KAAK,SAAS,CAAC;AAChD,MAAM,KAAK,GAAG,eAAe,KAAK,KAAK,CAAC;AACxC;AACA;AACA;AACY,MAAC,cAAc,GAAG,MAAM;AACpC,IAAI,IAAI,SAAS,EAAE;AACnB;AACA,QAAQ,OAAO,KAAK,CAAC;AACrB,KAAK;AACL,IAAI,IAAI,KAAK,EAAE;AACf;AACA,QAAQ,OAAO,OAAO,GAAG,cAAc,GAAG,MAAM,CAAC;AACjD,KAAK;AACL,IAAI,MAAM,IAAI,yBAAyB,EAAE,CAAC;AAC1C;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolveConfig.mjs","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/utils/resolveConfig.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;AACA;AAKA;;AAEG;AACI,MAAM,aAAa,GAAG,MAAK;AACjC,IAAA,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC,SAAS,EAAE,CAAC,aAAa,EAAE,gBAAgB,EAAE,QAAQ,IAAI,EAAE,CAAC;IACrE,MAAM,CAAC,CAAC,CAAC,KAAK,EAAE,mCAAmC,CAAC,OAAO,CAAC,CAAC;IAC7D,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,mCAAmC,CAAC,QAAQ,CAAC,CAAC;AAC/D,IAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC1B;;;;"}
1
+ {"version":3,"file":"resolveConfig.mjs","sources":["../../../../../../src/pushNotifications/providers/pinpoint/utils/resolveConfig.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { assert, PushNotificationValidationErrorCode } from '../../../errors';\n/**\n * @internal\n */\nexport const resolveConfig = () => {\n const { appId, region } = Amplify.getConfig().Notifications?.PushNotification?.Pinpoint ?? {};\n assert(!!appId, PushNotificationValidationErrorCode.NoAppId);\n assert(!!region, PushNotificationValidationErrorCode.NoRegion);\n return { appId, region };\n};\n"],"names":[],"mappings":";;;;AAAA;AACA;AAGA;AACA;AACA;AACY,MAAC,aAAa,GAAG,MAAM;AACnC,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,aAAa,EAAE,gBAAgB,EAAE,QAAQ,IAAI,EAAE,CAAC;AAClG,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,EAAE,mCAAmC,CAAC,OAAO,CAAC,CAAC;AACjE,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,mCAAmC,CAAC,QAAQ,CAAC,CAAC;AACnE,IAAI,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC7B;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"errors.mjs","sources":["../../../../../src/pushNotifications/types/errors.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;IAEY,0BAEX;AAFD,CAAA,UAAY,yBAAyB,EAAA;AACpC,IAAA,yBAAA,CAAA,gBAAA,CAAA,GAAA,gBAAiC,CAAA;AAClC,CAAC,EAFW,yBAAyB,KAAzB,yBAAyB,GAEpC,EAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"errors.mjs","sources":["../../../../src/pushNotifications/types/errors.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport var PushNotificationErrorCode;\n(function (PushNotificationErrorCode) {\n PushNotificationErrorCode[\"NotInitialized\"] = \"NotInitialized\";\n})(PushNotificationErrorCode || (PushNotificationErrorCode = {}));\n"],"names":[],"mappings":"AAAA;AACA;AACU,IAAC,0BAA0B;AACrC,CAAC,UAAU,yBAAyB,EAAE;AACtC,IAAI,yBAAyB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;AACnE,CAAC,EAAE,yBAAyB,KAAK,yBAAyB,GAAG,EAAE,CAAC,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getPushNotificationUserAgentString.mjs","sources":["../../../../../src/pushNotifications/utils/getPushNotificationUserAgentString.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AAOa,MAAA,kCAAkC,GAAG,CACjD,MAA8B,KAE9B,mBAAmB,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC,gBAAgB;IACnC,MAAM;AACN,CAAA;;;;"}
1
+ {"version":3,"file":"getPushNotificationUserAgentString.mjs","sources":["../../../../src/pushNotifications/utils/getPushNotificationUserAgentString.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Category, getAmplifyUserAgent, } from '@aws-amplify/core/internals/utils';\nexport const getPushNotificationUserAgentString = (action) => getAmplifyUserAgent({\n category: Category.PushNotification,\n action,\n});\n"],"names":[],"mappings":";;AAAA;AACA;AAEY,MAAC,kCAAkC,GAAG,CAAC,MAAM,KAAK,mBAAmB,CAAC;AAClF,IAAI,QAAQ,EAAE,QAAQ,CAAC,gBAAgB;AACvC,IAAI,MAAM;AACV,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"initializationManager.mjs","sources":["../../../../../src/pushNotifications/utils/initializationManager.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AAEA,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB;;;;AAIG;AACU,MAAA,UAAU,GAAG,YAAW;IACpC,WAAW,GAAG,IAAI,CAAC;AACpB,EAAE;AAEF;;;;AAIG;MACU,aAAa,GAAG,MAAM;;;;"}
1
+ {"version":3,"file":"initializationManager.mjs","sources":["../../../../src/pushNotifications/utils/initializationManager.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nlet initialized = false;\n/**\n * Sets initialization status to true.\n *\n * @internal\n */\nexport const initialize = async () => {\n initialized = true;\n};\n/**\n * Returns the initialization status of push notifications.\n *\n * @internal\n */\nexport const isInitialized = () => initialized;\n"],"names":[],"mappings":"AAAA;AACA;AACA,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;AACA;AACA;AACA;AACA;AACY,MAAC,UAAU,GAAG,YAAY;AACtC,IAAI,WAAW,GAAG,IAAI,CAAC;AACvB,EAAE;AACF;AACA;AACA;AACA;AACA;AACY,MAAC,aAAa,GAAG,MAAM;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolveCredentials.mjs","sources":["../../../../../src/pushNotifications/utils/resolveCredentials.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAQA;;AAEG;AACU,MAAA,kBAAkB,GAAG,YAAW;IAC5C,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,gBAAgB,EAAE,CAAC;IAC7D,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE,mCAAmC,CAAC,aAAa,CAAC,CAAC;AACzE,IAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;AACpC;;;;"}
1
+ {"version":3,"file":"resolveCredentials.mjs","sources":["../../../../src/pushNotifications/utils/resolveCredentials.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { fetchAuthSession } from '@aws-amplify/core';\nimport { assert, PushNotificationValidationErrorCode, } from '../errors/errorHelpers';\n/**\n * @internal\n */\nexport const resolveCredentials = async () => {\n const { credentials, identityId } = await fetchAuthSession();\n assert(!!credentials, PushNotificationValidationErrorCode.NoCredentials);\n return { credentials, identityId };\n};\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACY,MAAC,kBAAkB,GAAG,YAAY;AAC9C,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,gBAAgB,EAAE,CAAC;AACjE,IAAI,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE,mCAAmC,CAAC,aAAa,CAAC,CAAC;AAC7E,IAAI,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;AACvC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"tokenManager.mjs","sources":["../../../../../src/pushNotifications/utils/tokenManager.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AAEA,IAAI,KAAa,CAAC;AAElB;;;;AAIG;AACU,MAAA,QAAQ,GAAG,CAAC,QAAgB,KAAI;IAC5C,KAAK,GAAG,QAAQ,CAAC;AAClB,EAAE;AAEF;;;;AAIG;MACU,QAAQ,GAAG,MAAM;;;;"}
1
+ {"version":3,"file":"tokenManager.mjs","sources":["../../../../src/pushNotifications/utils/tokenManager.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nlet token;\n/**\n * Sets token.\n *\n * @internal\n */\nexport const setToken = (newToken) => {\n token = newToken;\n};\n/**\n * Returns the current token.\n *\n * @internal\n */\nexport const getToken = () => token;\n"],"names":[],"mappings":"AAAA;AACA;AACA,IAAI,KAAK,CAAC;AACV;AACA;AACA;AACA;AACA;AACY,MAAC,QAAQ,GAAG,CAAC,QAAQ,KAAK;AACtC,IAAI,KAAK,GAAG,QAAQ,CAAC;AACrB,EAAE;AACF;AACA;AACA;AACA;AACA;AACY,MAAC,QAAQ,GAAG,MAAM;;;;"}