@aws-amplify/notifications 2.0.14 → 2.0.15-unstable.76af8d7.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":"setBadgeCount.js","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/setBadgeCount.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAEA,MAA8E,OAAA,GAAA,OAAA,CAAA,mCAAA,CAAA,CAAA;AAG9E;;;;;;;;;;;AAWG;AACI,MAAM,aAAa,GAAkB,MAAK;IAChD,MAAM,IAAI,OAAyB,CAAA,yBAAA,EAAE,CAAC;AACvC,CAAC,CAAC;AAFW,OAAA,CAAA,aAAa,GAExB,aAAA;;"}
1
+ {"version":3,"file":"setBadgeCount.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/setBadgeCount.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setBadgeCount = void 0;\nconst utils_1 = require(\"@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 */\nconst setBadgeCount = () => {\n throw new utils_1.PlatformNotSupportedError();\n};\nexports.setBadgeCount = setBadgeCount;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AAC/B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa,GAAG,MAAM;AAC5B,IAAI,MAAM,IAAI,OAAO,CAAC,yBAAyB,EAAE,CAAC;AAClD,CAAC,CAAC;AACF,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"setBadgeCount.native.js","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAEA,MAAwE,cAAA,GAAA,OAAA,CAAA,2BAAA,CAAA,CAAA;AACxE,MAAmE,cAAA,GAAA,OAAA,CAAA,8BAAA,CAAA,CAAA;AAGnE,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,GAAG,IAAA,cAA2B,CAAA,2BAAA,GAAE,CAAC;AAEtE,MAAM,aAAa,GAAkB,KAAK,IAAG;IACnD,IAAA,cAAA,CAAA,mBAAmB,GAAE,CAAC;IACtB,mBAAmB,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC,CAAC;AAHW,OAAA,CAAA,aAAa,GAGxB,aAAA;;"}
1
+ {"version":3,"file":"setBadgeCount.native.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setBadgeCount = void 0;\nconst react_native_1 = require(\"@aws-amplify/react-native\");\nconst errorHelpers_1 = require(\"../../../errors/errorHelpers\");\nconst { setBadgeCount: setBadgeCountNative } = (0, react_native_1.loadAmplifyPushNotification)();\nconst setBadgeCount = input => {\n (0, errorHelpers_1.assertIsInitialized)();\n setBadgeCountNative(input);\n};\nexports.setBadgeCount = setBadgeCount;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AAC/B,MAAM,cAAc,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAC5D,MAAM,cAAc,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;AAC/D,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,GAAG,IAAI,cAAc,CAAC,2BAA2B,GAAG,CAAC;AACjG,MAAM,aAAa,GAAG,KAAK,IAAI;AAC/B,IAAI,IAAI,cAAc,CAAC,mBAAmB,GAAG,CAAC;AAC9C,IAAI,mBAAmB,CAAC,KAAK,CAAC,C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AAA,CAAA,cAAA,CAAA,OAAA,EAAA,oCAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,MAAA,CAAA,kCAAkC,CAAA,EAAA,EAAA,CAAA,CAAA;AAClC,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,oCAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,MAAA,CAAA,kCAAkC,CAAA,EAAA,EAAA,CAAA,CAAA;AAClC,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,iBAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,MAAA,CAAA,eAAe,CAAA,EAAA,EAAA,CAAA,CAAA;AACf,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,oBAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,MAAA,CAAA,kBAAkB,CAAA,EAAA,EAAA,CAAA,CAAA;AAClB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,eAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,MAAA,CAAA,aAAa,CAAA,EAAA,EAAA,CAAA;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/pushNotifications/providers/pinpoint/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setBadgeCount = exports.requestPermissions = exports.onTokenReceived = exports.onNotificationReceivedInForeground = exports.onNotificationReceivedInBackground = exports.onNotificationOpened = exports.initializePushNotifications = exports.identifyUser = exports.getPermissionStatus = exports.getLaunchNotification = exports.getBadgeCount = void 0;\nvar apis_1 = require(\"./apis\");\nObject.defineProperty(exports, \"getBadgeCount\", { enumerable: true, get: function () { return apis_1.getBadgeCount; } });\nObject.defineProperty(exports, \"getLaunchNotification\", { enumerable: true, get: function () { return apis_1.getLaunchNotification; } });\nObject.defineProperty(exports, \"getPermissionStatus\", { enumerable: true, get: function () { return apis_1.getPermissionStatus; } });\nObject.defineProperty(exports, \"identifyUser\", { enumerable: true, get: function () { return apis_1.identifyUser; } });\nObject.defineProperty(exports, \"initializePushNotifications\", { enumerable: true, get: function () { return apis_1.initializePushNotifications; } });\nObject.defineProperty(exports, \"onNotificationOpened\", { enumerable: true, get: function () { return apis_1.onNotificationOpened; } });\nObject.defineProperty(exports, \"onNotificationReceivedInBackground\", { enumerable: true, get: function () { return apis_1.onNotificationReceivedInBackground; } });\nObject.defineProperty(exports, \"onNotificationReceivedInForeground\", { enumerable: true, get: function () { return apis_1.onNotificationReceivedInForeground; } });\nObject.defineProperty(exports, \"onTokenReceived\", { enumerable: true, get: function () { return apis_1.onTokenReceived; } });\nObject.defineProperty(exports, \"requestPermissions\", { enumerable: true, get: function () { return apis_1.requestPermissions; } });\nObject.defineProperty(exports, \"setBadgeCount\", { enumerable: true, get: function () { return apis_1.setBadgeCount; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,kCAAkC,GAAG,OAAO,CAAC,kCAAkC,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,2BAA2B,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AAClW,IAAI,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC/B,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eA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O,MAAM,CAAC,kCAAkC,CAAC,EAAE,EAAE,CAAC,CAAC;AACnK,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,iBAAiB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC,CAAC;AAC7H,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,oBAAoB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC,CAAC;AACnI,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"analytics.js","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/types/analytics.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;"}
1
+ {"version":3,"file":"analytics.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/types/analytics.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"apis.js","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/types/apis.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;"}
1
+ {"version":3,"file":"apis.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/types/apis.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/types/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/types/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"inputs.js","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/types/inputs.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;"}
1
+ {"version":3,"file":"inputs.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/types/inputs.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"options.js","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/types/options.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;"}
1
+ {"version":3,"file":"options.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/types/options.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"outputs.js","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/types/outputs.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;"}
1
+ {"version":3,"file":"outputs.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/types/outputs.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"pushNotifications.js","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/types/pushNotifications.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;"}
1
+ {"version":3,"file":"pushNotifications.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/types/pushNotifications.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"createMessageEventRecorder.js","sources":["../../../../../../../src/pushNotifications/providers/pin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D,OAAO,IAAA,iBAAM,EAAC;QACb,KAAK;AACL,QAAA,QAAQ,EAAE,kBAAkB;QAC5B,WAAW,EAAE,IAAA,gBAAA,CAAA,cAAc,GAAE;QAC7B,WAAW;AACX,QAAA,KAAK,EAAE,cAAc;QACrB,MAAM;AACN,KAAA,CAAC,CAAC;AACJ,CAAC;;"}
1
+ {"version":3,"file":"createMessageEventRecorder.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createMessageEventRecorder = void 0;\nconst pinpoint_1 = require(\"@aws-amplify/core/internals/providers/pinpoint\");\nconst core_1 = require(\"@aws-amplify/core\");\nconst utils_1 = require(\"../../../utils\");\nconst getAnalyticsEvent_1 = require(\"./getAnalyticsEvent\");\nconst getChannelType_1 = require(\"./getChannelType\");\nconst resolveConfig_1 = require(\"./resolveConfig\");\nconst logger = new core_1.ConsoleLogger('PushNotification.recordMessageEvent');\n/**\n * @internal\n */\nconst createMessageEventRecorder = (event, callback) => async (message) => {\n const { credentials } = await (0, utils_1.resolveCredentials)();\n const { appId, region } = (0, resolveConfig_1.resolveConfig)();\n await recordMessageEvent({\n appId,\n credentials,\n event,\n message,\n region,\n });\n callback?.();\n};\nexports.createMessageEventRecorder = createMessageEventRecorder;\nconst recordMessageEvent = async ({ appId, credentials, event, message, region, }) => {\n const analyticsEvent = (0, getAnalyticsEvent_1.getAnalyticsEvent)(message, event);\n if (!analyticsEvent) {\n logger.debug('A notification missing event information was not recorded');\n return;\n }\n return (0, pinpoint_1.record)({\n appId,\n category: 'PushNotification',\n channelType: (0, getChannelType_1.getChannelType)(),\n credentials,\n event: analyticsEvent,\n region,\n });\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAA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;AACtF,IAAI,IAAI,CAAC,cAAc,EAAE;AACzB,QAAQ,MAAM,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;AAClF,QAAQ,OAAO;AACf,KAAK;AACL,IAAI,OAAO,IAAI,UAAU,CAAC,MAAM,EAAE;AAClC,QAAQ,KAAK;AACb,QAAQ,QAAQ,EAAE,kBAAkB;AACpC,QAAQ,WAAW,EAAE,IAAI,gBAAgB,CAAC,cAAc,GAAG;AAC3D,QAAQ,WAAW;AACnB,QAAQ,KAAK,EAAE,cAAc;AAC7B,QAAQ,MAAM;AACd,KAAK,CAAC,CAAC;AACP,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getAnalyticsEvent.js","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;AACI,MAAM,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,CAAC,CAAC;AAhBW,OAAA,CAAA,iBAAiB,GAgB5B,iBAAA,CAAA;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.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getAnalyticsEvent = void 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 */\nconst 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};\nexports.getAnalyticsEvent = getAnalyticsEvent;\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":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,iBAAiB,GAAG,KAAK,CAAC,CAAC;AACnC,MAAM,gCAAgC,GAAG,wCAAwC,CAAC;AAClF,MAAM,uBAAuB,GAAG,+BAA+B,CAAC;AAChE,MAAM,iCAAiC,GAAG,gCAAgC,CAAC;AAC3E;AACA;AACA;AACA,MAAM,iBAAiB,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,KAAK;AAC/C,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,e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OAAO;AACxC,SAAS,CAAC;AACV,KAAK;AACL,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getChannelType.js","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/utils/getChannelType.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAEA,MAA8E,OAAA,GAAA,OAAA,CAAA,mCAAA,CAAA,CAAA;AAC9E,MAA+D,cAAA,GAAA,OAAA,CAAA,2BAAA,CAAA,CAAA;AAG/D,MAAM,eAAe,GAAG,IAAA,cAAA,CAAA,kBAAkB,GAAE,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,OAAyB,CAAA,yBAAA,EAAE,CAAC;AACvC,CAAC,CAAC;AAVW,OAAA,CAAA,cAAc,GAUzB,cAAA;;"}
1
+ {"version":3,"file":"getChannelType.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/utils/getChannelType.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getChannelType = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst react_native_1 = require(\"@aws-amplify/react-native\");\nconst operatingSystem = (0, react_native_1.getOperatingSystem)();\nconst isAndroid = operatingSystem === 'android';\nconst isIos = operatingSystem === 'ios';\n/**\n * @internal\n */\nconst 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 utils_1.PlatformNotSupportedError();\n};\nexports.getChannelType = getChannelType;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,cAAc,GAAG,KAAK,CAAC,CAAC;AAChC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,cAAc,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAC5D,MAAM,eAAe,GAAG,IAAI,cAAc,CAAC,kBAAkB,GAAG,CAAC;AACjE,MAAM,SAAS,GAAG,eAAe,KAAK,SAAS,CAAC;AAChD,MAAM,KAAK,GAAG,eAAe,KAAK,KAAK,CAAC;AACxC;AACA;AACA;AACA,MAAM,cAAc,GAAG,MAAM;AAC7B,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,OAAO,CAAC,yBAAyB,EAAE,CAAC;AAClD,CAAC,CAAC;AACF,OAAO,CAAC,cAAc,GAAG,cAAc;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/utils/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAEA,IAA0E,4BAAA,GAAA,OAAA,CAAA,8BAAA,CAAA,CAAA;AAAjE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,4BAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,4BAAA,CAAA,0BAA0B,CAAA,EAAA,EAAA,CAAA,CAAA;AACnC,IAAwD,mBAAA,GAAA,OAAA,CAAA,qBAAA,CAAA,CAAA;AAA/C,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,mBAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,mBAAA,CAAA,iBAAiB,CAAA,EAAA,EAAA,CAAA,CAAA;AAC1B,IAAkD,gBAAA,GAAA,OAAA,CAAA,kBAAA,CAAA,CAAA;AAAzC,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,gBAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,gBAAA,CAAA,cAAc,CAAA,EAAA,EAAA,CAAA,CAAA;AACvB,IAAgD,eAAA,GAAA,OAAA,CAAA,iBAAA,CAAA,CAAA;AAAvC,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,eAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,eAAA,CAAA,aAAa,CAAA,EAAA,EAAA,CAAA;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/utils/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveConfig = exports.getChannelType = exports.getAnalyticsEvent = exports.createMessageEventRecorder = void 0;\nvar createMessageEventRecorder_1 = require(\"./createMessageEventRecorder\");\nObject.defineProperty(exports, \"createMessageEventRecorder\", { enumerable: true, get: function () { return createMessageEventRecorder_1.createMessageEventRecorder; } });\nvar getAnalyticsEvent_1 = require(\"./getAnalyticsEvent\");\nObject.defineProperty(exports, \"getAnalyticsEvent\", { enumerable: true, get: function () { return getAnalyticsEvent_1.getAnalyticsEvent; } });\nvar getChannelType_1 = require(\"./getChannelType\");\nObject.defineProperty(exports, \"getChannelType\", { enumerable: true, get: function () { return getChannelType_1.getChannelType; } });\nvar resolveConfig_1 = require(\"./resolveConfig\");\nObject.defineProperty(exports, \"resolveConfig\", { enumerable: true, get: function () { return resolveConfig_1.resolveConfig; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,0BAA0B,GAAG,KAAK,CAAC,CAAC;AACzH,IAAI,4BAA4B,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;AAC3E,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,4BAA4B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,4BAA4B,CAAC,0BAA0B,CAAC,EAAE,EAAE,CAAC,CAAC;AACzK,IAAI,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACzD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,mBAAmB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,mBAAmB,CAAC,iBAAiB,CAAC,EAAE,EAAE,CAAC,CAAC;AAC9I,IAAI,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AACnD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,gBAAgB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,gBAAgB,CAAC,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC;AACrI,IAAI,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACjD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolveConfig.js","sources":["../../../../../../../src/pushNotifications/providers/pinpoint/utils/resolveConfig.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAEA,MAA4C,MAAA,GAAA,OAAA,CAAA,mBAAA,CAAA,CAAA;AAC5C,MAA8E,QAAA,GAAA,OAAA,CAAA,iBAAA,CAAA,CAAA;AAE9E;;AAEG;AACI,MAAM,aAAa,GAAG,MAAK;AACjC,IAAA,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GACtB,cAAO,CAAC,SAAS,EAAE,CAAC,aAAa,EAAE,gBAAgB,EAAE,QAAQ,IAAI,EAAE,CAAC;IACrE,IAAA,QAAA,CAAA,MAAM,EAAC,CAAC,CAAC,KAAK,EAAE,QAAmC,CAAA,mCAAA,CAAC,OAAO,CAAC,CAAC;IAC7D,IAAA,QAAA,CAAA,MAAM,EAAC,CAAC,CAAC,MAAM,EAAE,QAAmC,CAAA,mCAAA,CAAC,QAAQ,CAAC,CAAC;AAC/D,IAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC1B,CAAC,CAAC;AANW,OAAA,CAAA,aAAa,GAMxB,aAAA;;"}
1
+ {"version":3,"file":"resolveConfig.js","sources":["../../../../../../src/pushNotifications/providers/pinpoint/utils/resolveConfig.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveConfig = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst errors_1 = require(\"../../../errors\");\n/**\n * @internal\n */\nconst resolveConfig = () => {\n const { appId, region } = core_1.Amplify.getConfig().Notifications?.PushNotification?.Pinpoint ?? {};\n (0, errors_1.assert)(!!appId, errors_1.PushNotificationValidationErrorCode.NoAppId);\n (0, errors_1.assert)(!!region, errors_1.PushNotificationValidationErrorCode.NoRegion);\n return { appId, region };\n};\nexports.resolveConfig = resolveConfig;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AAC/B,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC5C;AACA;AACA;AACA,MAAM,aAAa,GAAG,MAAM;AAC5B,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,aAAa,EAAE,gBAAgB,EAAE,QAAQ,IAAI,EAAE,CAAC;AACzG,IAAI,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,mCAAmC,CAAC,OAAO,CAAC,CAAC;AACxF,IAAI,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,mCAAmC,CAAC,QAAQ,CAAC,CAAC;AAC1F,IAAI,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC7B,CAAC,CAAC;AACF,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sources":["../../../../../src/pushNotifications/types/errors.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAEA,CAAA,UAAY,yBAAyB,EAAA;AACpC,IAAA,yBAAA,CAAA,gBAAA,CAAA,GAAA,gBAAiC,CAAA;AAClC,CAAC,EAFW,OAAyB,CAAA,yBAAA,KAAzB,iCAAyB,GAEpC,EAAA,CAAA,CAAA;;"}
1
+ {"version":3,"file":"errors.js","sources":["../../../../src/pushNotifications/types/errors.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PushNotificationErrorCode = void 0;\nvar PushNotificationErrorCode;\n(function (PushNotificationErrorCode) {\n PushNotificationErrorCode[\"NotInitialized\"] = \"NotInitialized\";\n})(PushNotificationErrorCode = exports.PushNotificationErrorCode || (exports.PushNotificationErrorCode = {}));\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,yBAAyB,GAAG,KAAK,CAAC,CAAC;AAE3C,CAAC,UAAU,yBAAyB,EAAE;AACtC,IAAI,yBAAyB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;AACnE,CAAC,EAA8B,OAAO,CAAC,yBAAyB,KAAK,OAAO,CAAC,yBAAyB,GAAG,EAAE,CAAC,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/pushNotifications/types/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAEA,OAAyB,CAAA,YAAA,CAAA,OAAA,CAAA,UAAA,CAAA,EAAA,OAAA,CAAA,CAAA;AACzB,OAAyB,CAAA,YAAA,CAAA,OAAA,CAAA,UAAA,CAAA,EAAA,OAAA,CAAA,CAAA;AACzB,OAAyB,CAAA,YAAA,CAAA,OAAA,CAAA,UAAA,CAAA,EAAA,OAAA,CAAA,CAAA;AACzB,OAA0B,CAAA,YAAA,CAAA,OAAA,CAAA,WAAA,CAAA,EAAA,OAAA,CAAA,CAAA;AAC1B,OAA0B,CAAA,YAAA,CAAA,OAAA,CAAA,WAAA,CAAA,EAAA,OAAA,CAAA,CAAA;AAC1B,OAAoC,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA,CAAA;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/pushNotifications/types/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./errors\"), exports);\ntslib_1.__exportStar(require(\"./inputs\"), exports);\ntslib_1.__exportStar(require(\"./module\"), exports);\ntslib_1.__exportStar(require(\"./options\"), exports);\ntslib_1.__exportStar(require(\"./outputs\"), exports);\ntslib_1.__exportStar(require(\"./pushNotifications\"), exports);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AACjC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,CAAC;AACnD,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,CAAC;AACnD,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,CAAC;AACnD,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC;AACpD,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC;AACpD,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAAE,OAAO,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"inputs.js","sources":["../../../../../src/pushNotifications/types/inputs.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;"}
1
+ {"version":3,"file":"inputs.js","sources":["../../../../src/pushNotifications/types/inputs.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sources":["../../../../../src/pushNotifications/types/module.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;"}
1
+ {"version":3,"file":"module.js","sources":["../../../../src/pushNotifications/types/module.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"options.js","sources":["../../../../../src/pushNotifications/types/options.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;"}
1
+ {"version":3,"file":"options.js","sources":["../../../../src/pushNotifications/types/options.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"outputs.js","sources":["../../../../../src/pushNotifications/types/outputs.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;"}
1
+ {"version":3,"file":"outputs.js","sources":["../../../../src/pushNotifications/types/outputs.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"pushNotifications.js","sources":["../../../../../src/pushNotifications/types/pushNotifications.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;"}
1
+ {"version":3,"file":"pushNotifications.js","sources":["../../../../src/pushNotifications/types/pushNotifications.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getPushNotificationUserAgentString.js","sources":["../../../../../src/pushNotifications/utils/getPushNotificationUserAgentString.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;AACA;AACA,MAI2C,OAAA,GAAA,OAAA,CAAA,mCAAA,CAAA,CAAA;AAEpC,MAAM,kCAAkC,GAAG,CACjD,MAA8B,KAE9B,IAAA,OAAA,CAAA,mBAAmB,EAAC;IACnB,QAAQ,EAAE,OAAQ,CAAA,QAAA,CAAC,gBAAgB;IACnC,MAAM;AACN,CAAA,CAAC,CAAC;AANS,OAAA,CAAA,kCAAkC,GAM3C,kCAAA;;"}
1
+ {"version":3,"file":"getPushNotificationUserAgentString.js","sources":["../../../../src/pushNotifications/utils/getPushNotificationUserAgentString.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getPushNotificationUserAgentString = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst getPushNotificationUserAgentString = (action) => (0, utils_1.getAmplifyUserAgent)({\n category: utils_1.Category.PushNotification,\n action,\n});\nexports.getPushNotificationUserAgentString = getPushNotificationUserAgentString;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,kCAAkC,GAAG,KAAK,CAAC,CAAC;AACpD;AACA;AACA,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,kCAAkC,GAAG,CAAC,MAAM,KAAK,IAAI,OAAO,CAAC,mBAAmB,EAAE;AACxF,IAAI,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,gBAAgB;AAC/C,IAAI,MAAM;AACV,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,kCAAkC,GAAG,kCAAkC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/pushNotifications/utils/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAEA,IAA0F,oCAAA,GAAA,OAAA,CAAA,sCAAA,CAAA,CAAA;AAAjF,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,oCAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,oCAAA,CAAA,kCAAkC,CAAA,EAAA,EAAA,CAAA,CAAA;AAC3C,IAAoE,uBAAA,GAAA,OAAA,CAAA,yBAAA,CAAA,CAAA;AAA3D,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,YAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,uBAAA,CAAA,UAAU,CAAA,EAAA,EAAA,CAAA,CAAA;AAAE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,eAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,uBAAA,CAAA,aAAa,CAAA,EAAA,EAAA,CAAA,CAAA;AAClC,IAA0D,oBAAA,GAAA,OAAA,CAAA,sBAAA,CAAA,CAAA;AAAjD,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,oBAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,oBAAA,CAAA,kBAAkB,CAAA,EAAA,EAAA,CAAA,CAAA;AAC3B,IAAoD,cAAA,GAAA,OAAA,CAAA,gBAAA,CAAA,CAAA;AAA3C,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,UAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,cAAA,CAAA,QAAQ,CAAA,EAAA,EAAA,CAAA,CAAA;AAAE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,UAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,cAAA,CAAA,QAAQ,CAAA,EAAA,EAAA,CAAA;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/pushNotifications/utils/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setToken = exports.getToken = exports.resolveCredentials = exports.isInitialized = exports.initialize = exports.getPushNotificationUserAgentString = void 0;\nvar getPushNotificationUserAgentString_1 = require(\"./getPushNotificationUserAgentString\");\nObject.defineProperty(exports, \"getPushNotificationUserAgentString\", { enumerable: true, get: function () { return getPushNotificationUserAgentString_1.getPushNotificationUserAgentString; } });\nvar initializationManager_1 = require(\"./initializationManager\");\nObject.defineProperty(exports, \"initialize\", { enumerable: true, get: function () { return initializationManager_1.initialize; } });\nObject.defineProperty(exports, \"isInitialized\", { enumerable: true, get: function () { return initializationManager_1.isInitialized; } });\nvar resolveCredentials_1 = require(\"./resolveCredentials\");\nObject.defineProperty(exports, \"resolveCredentials\", { enumerable: true, get: function () { return resolveCredentials_1.resolveCredentials; } });\nvar tokenManager_1 = require(\"./tokenManager\");\nObject.defineProperty(exports, \"getToken\", { enumerable: true, get: function () { return tokenManager_1.getToken; } });\nObject.defineProperty(exports, \"setToken\", { enumerable: true, get: function () { return tokenManager_1.setToken; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,kCAAkC,GAAG,KAAK,CAAC,CAAC;AACpK,IAAI,oCAAoC,GAAG,OAAO,CAAC,sCAAsC,CAAC,CAAC;AAC3F,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,oCAAoC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,oCAAoC,CAAC,kCAAkC,CAAC,EAAE,EAAE,CAAC,CAAC;AACjM,IAAI,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;AACjE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,uBAAuB,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC;AACpI,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,uBAAuB,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC,CAAC;AAC1I,IAAI,oBAAoB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC3D,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,oBAAoB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,oBAAoB,CAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC,CAAC;AACjJ,IAAI,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC/C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,cAAc,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;AACvH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,cAAc,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"initializationManager.js","sources":["../../../../../src/pushNotifications/utils/initializationManager.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAEA,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB;;;;AAIG;AACI,MAAM,UAAU,GAAG,YAAW;IACpC,WAAW,GAAG,IAAI,CAAC;AACpB,CAAC,CAAC;AAFW,OAAA,CAAA,UAAU,GAErB,UAAA,CAAA;AAEF;;;;AAIG;AACI,MAAM,aAAa,GAAG,MAAM,WAAW,CAAC;AAAlC,OAAA,CAAA,aAAa,GAAqB,aAAA;;"}
1
+ {"version":3,"file":"initializationManager.js","sources":["../../../../src/pushNotifications/utils/initializationManager.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isInitialized = exports.initialize = void 0;\nlet initialized = false;\n/**\n * Sets initialization status to true.\n *\n * @internal\n */\nconst initialize = async () => {\n initialized = true;\n};\nexports.initialize = initialize;\n/**\n * Returns the initialization status of push notifications.\n *\n * @internal\n */\nconst isInitialized = () => initialized;\nexports.isInitialized = isInitialized;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,UAAU,GAAG,KAAK,CAAC,CAAC;AACpD,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;AACA;AACA;AACA;AACA;AACA,MAAM,UAAU,GAAG,YAAY;AAC/B,IAAI,WAAW,GAAG,IAAI,CAAC;AACvB,CAAC,CAAC;AACF,OAAO,CAAC,UAAU,GAAG,UAAU,CAAC;AAChC;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa,GAAG,MAAM,WAAW,CAAC;AACxC,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolveCredentials.js","sources":["../../../../../src/pushNotifications/utils/resolveCredentials.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAEA,MAAqD,MAAA,GAAA,OAAA,CAAA,mBAAA,CAAA,CAAA;AACrD,MAGgC,cAAA,GAAA,OAAA,CAAA,wBAAA,CAAA,CAAA;AAEhC;;AAEG;AACI,MAAM,kBAAkB,GAAG,YAAW;IAC5C,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,MAAgB,CAAA,gBAAA,GAAE,CAAC;IAC7D,IAAA,cAAA,CAAA,MAAM,EAAC,CAAC,CAAC,WAAW,EAAE,cAAmC,CAAA,mCAAA,CAAC,aAAa,CAAC,CAAC;AACzE,IAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;AACpC,CAAC,CAAC;AAJW,OAAA,CAAA,kBAAkB,GAI7B,kBAAA;;"}
1
+ {"version":3,"file":"resolveCredentials.js","sources":["../../../../src/pushNotifications/utils/resolveCredentials.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveCredentials = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst errorHelpers_1 = require(\"../errors/errorHelpers\");\n/**\n * @internal\n */\nconst resolveCredentials = async () => {\n const { credentials, identityId } = await (0, core_1.fetchAuthSession)();\n (0, errorHelpers_1.assert)(!!credentials, errorHelpers_1.PushNotificationValidationErrorCode.NoCredentials);\n return { credentials, identityId };\n};\nexports.resolveCredentials = resolveCredentials;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,kBAAkB,GAAG,KAAK,CAAC,CAAC;AACpC,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,cAAc,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AACzD;AACA;AACA;AACA,MAAM,kBAAkB,GAAG,YAAY;AACvC,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,MAAM,CAAC,gBAAgB,GAAG,CAAC;AAC7E,IAAI,IAAI,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,WAAW,EAAE,cAAc,CAAC,mCAAmC,CAAC,aAAa,CAAC,CAAC;AAChH,IAAI,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;AACvC,CAAC,CAAC;AACF,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"tokenManager.js","sources":["../../../../../src/pushNotifications/utils/tokenManager.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAEA,IAAI,KAAa,CAAC;AAElB;;;;AAIG;AACI,MAAM,QAAQ,GAAG,CAAC,QAAgB,KAAI;IAC5C,KAAK,GAAG,QAAQ,CAAC;AAClB,CAAC,CAAC;AAFW,OAAA,CAAA,QAAQ,GAEnB,QAAA,CAAA;AAEF;;;;AAIG;AACI,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC;AAAvB,OAAA,CAAA,QAAQ,GAAe,QAAA;;"}
1
+ {"version":3,"file":"tokenManager.js","sources":["../../../../src/pushNotifications/utils/tokenManager.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getToken = exports.setToken = void 0;\nlet token;\n/**\n * Sets token.\n *\n * @internal\n */\nconst setToken = (newToken) => {\n token = newToken;\n};\nexports.setToken = setToken;\n/**\n * Returns the current token.\n *\n * @internal\n */\nconst getToken = () => token;\nexports.getToken = getToken;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC,CAAC;AAC7C,IAAI,KAAK,CAAC;AACV;AACA;AACA;AACA;AACA;AACA,MAAM,QAAQ,GAAG,CAAC,QAAQ,KAAK;AAC/B,IAAI,KAAK,GAAG,QAAQ,CAAC;AACrB,CAAC,CAAC;AACF,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5B;AACA;AACA;AACA;AACA;AACA,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC;AAC7B,OAAO,CAAC,QAAQ,GAAG,QAAQ;;"}
@@ -1 +1 @@
1
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H;;;;"}
1
+ {"version":3,"file":"eventListeners.mjs","sources":["../../../src/eventListeners/eventListeners.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst eventListeners = {};\nexport const notifyEventListeners = (type, ...args) => {\n eventListeners[type]?.forEach(listener => {\n listener.handleEvent(...args);\n });\n};\nexport const notifyEventListenersAndAwaitHandlers = (type, ...args) => Promise.all(Array.from(eventListeners[type] ?? []).map(async (listener) => {\n try {\n await listener.handleEvent(...args);\n }\n catch (err) {\n throw err;\n }\n}));\nexport const addEventListener = (type, handler) => {\n // If there is no listener set for the event type, just create it\n if (!eventListeners[type]) {\n eventListeners[type] = new Set();\n }\n const listener = {\n handleEvent: handler,\n remove: () => {\n eventListeners[type].delete(listener);\n },\n };\n eventListeners[type].add(listener);\n return {\n remove: () => listener.remove(),\n };\n};\n"],"names":[],"mappings":"AAAA;AACA;AACA,MAAM,cAAc,GAAG,EAAE,CAAC;AACd,MAAC,oBAAoB,GAAG,CAAC,IAAI,EAAE,GAAG,IAAI,KAAK;AACvD,IAAI,cAAc,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,QAAQ,IAAI;AAC9C,QAAQ,QAAQ,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC;AACtC,KAAK,CAAC,CAAC;AACP,EAAE;AACU,MAAC,oCAAoC,GAAG,CAAC,IAAI,EAAE,GAAG,IAAI,KAAK,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,QAAQ,KAAK;AAClJ,IAAI,IAAI;AACR,QAAQ,MAAM,QAAQ,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC;AAC5C,KAAK;AACL,IAAI,OAAO,GAAG,EAAE;AAChB,QAAQ,MAAM,GAAG,CAAC;AAClB,KAAK;AACL,CAAC,CAAC,EAAE;AACQ,MAAC,gBAAgB,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK;AACnD;AACA,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;AAC/B,QAAQ,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;AACzC,KAAK;AACL,IAAI,MAAM,QAAQ,GAAG;AACrB,QAAQ,WAAW,EAAE,OAAO;AAC5B,QAAQ,MAAM,EAAE,MAAM;AACtB,YAAY,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAClD,SAAS;AACT,KAAK,CAAC;AACN,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACvC,IAAI,OAAO;AACX,QAAQ,MAAM,EAAE,MAAM,QAAQ,CAAC,MAAM,EAAE;AACvC,KAAK,CAAC;AACN;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"InAppMessagingError.mjs","sources":["../../../../../src/inAppMessaging/errors/InAppMessagingError.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AAOA;;AAEG;AACG,MAAO,mBAAoB,SAAQ,YAAY,CAAA;AACpD,IAAA,WAAA,CAAY,MAA0B,EAAA;QACrC,KAAK,CAAC,MAAM,CAAC,CAAC;;;AAId,QAAA,IAAI,CAAC,WAAW,GAAG,mBAAmB,CAAC;QACvC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;KAC3D;AACD;;;;"}
1
+ {"version":3,"file":"InAppMessagingError.mjs","sources":["../../../../src/inAppMessaging/errors/InAppMessagingError.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';\n/**\n * @internal\n */\nexport class InAppMessagingError 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 = InAppMessagingError;\n Object.setPrototypeOf(this, InAppMessagingError.prototype);\n }\n}\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACO,MAAM,mBAAmB,SAAS,YAAY,CAAC;AACtD,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB,QAAQ,KAAK,CAAC,MAAM,CAAC,CAAC;AACtB;AACA;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,mBAAmB,CAAC;AAC/C,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;AACnE,KAAK;AACL;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"assertServiceError.mjs","sources":["../../../../../src/inAppMessaging/errors/assertServiceError.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAQM,SAAU,kBAAkB,CACjC,KAAc,EAAA;AAEd,IAAA,IACC,CAAC,KAAK;QACL,KAAsB,CAAC,IAAI,KAAK,OAAO;QACxC,KAAK,YAAY,SAAS,EACzB;QACD,MAAM,IAAI,mBAAmB,CAAC;YAC7B,IAAI,EAAE,gBAAgB,CAAC,OAAO;AAC9B,YAAA,OAAO,EAAE,gCAAgC;AACzC,YAAA,eAAe,EAAE,KAAK;AACtB,SAAA,CAAC,CAAC;AACH,KAAA;AACF;;;;"}
1
+ {"version":3,"file":"assertServiceError.mjs","sources":["../../../../src/inAppMessaging/errors/assertServiceError.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyErrorCode, } from '@aws-amplify/core/internals/utils';\nimport { InAppMessagingError } from './InAppMessagingError';\nexport function assertServiceError(error) {\n if (!error ||\n error.name === 'Error' ||\n error instanceof TypeError) {\n throw new InAppMessagingError({\n name: AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: error,\n });\n }\n}\n"],"names":[],"mappings":";;;AAAA;AACA;AAGO,SAAS,kBAAkB,CAAC,KAAK,EAAE;AAC1C,IAAI,IAAI,CAAC,KAAK;AACd,QAAQ,KAAK,CAAC,IAAI,KAAK,OAAO;AAC9B,QAAQ,KAAK,YAAY,SAAS,EAAE;AACpC,QAAQ,MAAM,IAAI,mBAAmB,CAAC;AACtC,YAAY,IAAI,EAAE,gBAAgB,CAAC,OAAO;AAC1C,YAAY,OAAO,EAAE,gCAAgC;AACrD,YAAY,eAAe,EAAE,KAAK;AAClC,SAAS,CAAC,CAAC;AACX,KAAK;AACL;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"assertValidationError.mjs","sources":["../../../../../src/inAppMessaging/errors/assertValidationError.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAQA;;AAEG;AACa,SAAA,qBAAqB,CACpC,SAAkB,EAClB,IAAuC,EAAA;IAEvC,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAEjE,IAAI,CAAC,SAAS,EAAE;QACf,MAAM,IAAI,mBAAmB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC,CAAC;AACrE,KAAA;AACF;;;;"}
1
+ {"version":3,"file":"assertValidationError.mjs","sources":["../../../../src/inAppMessaging/errors/assertValidationError.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { InAppMessagingError } from './InAppMessagingError';\nimport { validationErrorMap, } from './validation';\n/**\n * @internal\n */\nexport function assertValidationError(assertion, name) {\n const { message, recoverySuggestion } = validationErrorMap[name];\n if (!assertion) {\n throw new InAppMessagingError({ name, message, recoverySuggestion });\n }\n}\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACO,SAAS,qBAAqB,CAAC,SAAS,EAAE,IAAI,EAAE;AACvD,IAAI,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;AACrE,IAAI,IAAI,CAAC,SAAS,EAAE;AACpB,QAAQ,MAAM,IAAI,mBAAmB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC,CAAC;AAC7E,KAAK;AACL;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"validation.mjs","sources":["../../../../../src/inAppMessaging/errors/validation.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;IAIY,kCAKX;AALD,CAAA,UAAY,iCAAiC,EAAA;AAC5C,IAAA,iCAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,iCAAA,CAAA,eAAA,CAAA,GAAA,eAA+B,CAAA;AAC/B,IAAA,iCAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACrB,IAAA,iCAAA,CAAA,gBAAA,CAAA,GAAA,gBAAiC,CAAA;AAClC,CAAC,EALW,iCAAiC,KAAjC,iCAAiC,GAK5C,EAAA,CAAA,CAAA,CAAA;AAEY,MAAA,kBAAkB,GAC9B;AACC,IAAA,CAAC,iCAAiC,CAAC,OAAO,GAAG;AAC5C,QAAA,OAAO,EAAE,yBAAyB;AAClC,KAAA;AACD,IAAA,CAAC,iCAAiC,CAAC,aAAa,GAAG;AAClD,QAAA,OAAO,EAAE,kCAAkC;AAC3C,KAAA;AACD,IAAA,CAAC,iCAAiC,CAAC,QAAQ,GAAG;AAC7C,QAAA,OAAO,EAAE,iBAAiB;AAC1B,KAAA;AACD,IAAA,CAAC,iCAAiC,CAAC,cAAc,GAAG;AACnD,QAAA,OAAO,EAAE,4CAA4C;AACrD,QAAA,kBAAkB,EACjB,+DAA+D;AAChE,KAAA;;;;;"}
1
+ {"version":3,"file":"validation.mjs","sources":["../../../../src/inAppMessaging/errors/validation.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport var InAppMessagingValidationErrorCode;\n(function (InAppMessagingValidationErrorCode) {\n InAppMessagingValidationErrorCode[\"NoAppId\"] = \"NoAppId\";\n InAppMessagingValidationErrorCode[\"NoCredentials\"] = \"NoCredentials\";\n InAppMessagingValidationErrorCode[\"NoRegion\"] = \"NoRegion\";\n InAppMessagingValidationErrorCode[\"NotInitialized\"] = \"NotInitialized\";\n})(InAppMessagingValidationErrorCode || (InAppMessagingValidationErrorCode = {}));\nexport const validationErrorMap = {\n [InAppMessagingValidationErrorCode.NoAppId]: {\n message: 'Missing application id.',\n },\n [InAppMessagingValidationErrorCode.NoCredentials]: {\n message: 'Credentials should not be empty.',\n },\n [InAppMessagingValidationErrorCode.NoRegion]: {\n message: 'Missing region.',\n },\n [InAppMessagingValidationErrorCode.NotInitialized]: {\n message: 'In-app messaging has not been initialized.',\n recoverySuggestion: 'Please make sure to first call `initializePushNotifications`.',\n },\n};\n"],"names":[],"mappings":"AAAA;AACA;AACU,IAAC,kCAAkC;AAC7C,CAAC,UAAU,iCAAiC,EAAE;AAC9C,IAAI,iCAAiC,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AAC7D,IAAI,iCAAiC,CAAC,eAAe,CAAC,GAAG,eAAe,CAAC;AACzE,IAAI,iCAAiC,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;AAC/D,IAAI,iCAAiC,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;AAC3E,CAAC,EAAE,iCAAiC,KAAK,iCAAiC,GAAG,EAAE,CAAC,CAAC,CAAC;AACtE,MAAC,kBAAkB,GAAG;AAClC,IAAI,CAAC,iCAAiC,CAAC,OAAO,GAAG;AACjD,QAAQ,OAAO,EAAE,yBAAyB;AAC1C,KAAK;AACL,IAAI,CAAC,iCAAiC,CAAC,aAAa,GAAG;AACvD,QAAQ,OAAO,EAAE,kCAAkC;AACnD,KAAK;AACL,IAAI,CAAC,iCAAiC,CAAC,QAAQ,GAAG;AAClD,QAAQ,OAAO,EAAE,iBAAiB;AAClC,KAAK;AACL,IAAI,CAAC,iCAAiC,CAAC,cAAc,GAAG;AACxD,QAAQ,OAAO,EAAE,4CAA4C;AAC7D,QAAQ,kBAAkB,EAAE,+DAA+D;AAC3F,KAAK;AACL;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"clearMessages.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/apis/clearMessages.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;AACA;AAQA;;;;;;;;;;;AAWG;AACI,eAAe,aAAa,GAAA;AAClC,IAAA,mBAAmB,EAAE,CAAC;AACtB,IAAA,MAAM,GAAG,GAAG,CAAA,EAAG,mBAAmB,CAAG,EAAA,kBAAkB,EAAE,CAAC;AAC1D,IAAA,OAAO,MAAM,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC7C;;;;"}
1
+ {"version":3,"file":"clearMessages.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/clearMessages.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { defaultStorage } from '@aws-amplify/core';\nimport { STORAGE_KEY_SUFFIX, PINPOINT_KEY_PREFIX } from '../utils';\nimport { assertIsInitialized } from '../../../utils';\n/**\n * Clear locally cached messages.\n *\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown if In App messaging hasn't been initialized.\n * @returns A promise that will resolve when the operation is complete.\n * @example\n * ```ts\n * // Clear locally cached messages.\n * await clearMessages();\n *\n * ```\n */\nexport async function clearMessages() {\n assertIsInitialized();\n const key = `${PINPOINT_KEY_PREFIX}${STORAGE_KEY_SUFFIX}`;\n return await defaultStorage.removeItem(key);\n}\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAe,aAAa,GAAG;AACtC,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,MAAM,GAAG,GAAG,CAAC,EAAE,mBAAmB,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC;AAC9D,IAAI,OAAO,MAAM,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAChD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"dispatchEvent.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/apis/dispatchEvent.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;AAAA;AACA;AAiBA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACI,eAAe,aAAa,CAAC,KAAyB,EAAA;AAC5D,IAAA,mBAAmB,EAAE,CAAC;IACtB,IAAI;AACH,QAAA,MAAM,GAAG,GAAG,CAAA,EAAG,mBAAmB,CAAG,EAAA,kBAAkB,EAAE,CAAC;QAC1D,MAAM,cAAc,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACzD,MAAM,QAAQ,GAAmB,MAAM,oBAAoB,CAC1D,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,EAChD,KAAK,CACL,CAAC;AACF,QAAA,MAAM,iBAAiB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5C,QAAA,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;YACjC,oBAAoB,CACnB,iBAAiB,EACjB,eAAe,CAAC,iBAAiB,CAAC,CAClC,CAAC;AACF,SAAA;AACD,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;QACf,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAC1B,QAAA,MAAM,KAAK,CAAC;AACZ,KAAA;AACF;;;;"}
1
+ {"version":3,"file":"dispatchEvent.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/dispatchEvent.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PINPOINT_KEY_PREFIX, STORAGE_KEY_SUFFIX, processInAppMessages, } from '../utils';\nimport flatten from 'lodash/flatten.js';\nimport { defaultStorage } from '@aws-amplify/core';\nimport { notifyEventListeners } from '../../../../eventListeners';\nimport { assertServiceError } from '../../../errors';\nimport { conflictHandler } from './setConflictHandler';\nimport { assertIsInitialized } from '../../../utils';\n/**\n * Triggers an In-App message to be displayed. Use this after your campaigns have been synced to the device using\n * {@link syncMessages}. Based on the messages synced and the event passed to this API, it triggers the display\n * of the In-App message that meets the criteria.\n *\n * @remark\n * If an event would trigger multiple messages, the message closest to expiry will be chosen by default.\n * To change this behavior, you can use the {@link setConflictHandler} API to provide\n * your own logic for resolving message conflicts.\n *\n * @param DispatchEventInput The input object that holds the event to be dispatched.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @throws service exceptions - Thrown when the underlying Pinpoint service returns an error.\n * @returns A promise that will resolve when the operation is complete.\n * @example\n * ```ts\n * // Sync message before disptaching an event\n * await syncMessages();\n *\n * // Dispatch an event\n * await dispatchEvent({ name: 'test_event' });\n * ```\n */\nexport async function dispatchEvent(input) {\n assertIsInitialized();\n try {\n const key = `${PINPOINT_KEY_PREFIX}${STORAGE_KEY_SUFFIX}`;\n const cachedMessages = await defaultStorage.getItem(key);\n const messages = await processInAppMessages(cachedMessages ? JSON.parse(cachedMessages) : [], input);\n const flattenedMessages = flatten(messages);\n if (flattenedMessages.length > 0) {\n notifyEventListeners('messageReceived', conflictHandler(flattenedMessages));\n }\n }\n catch (error) {\n assertServiceError(error);\n throw error;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAe,aAAa,CAAC,KAAK,EAAE;AAC3C,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,IAAI;AACR,QAAQ,MAAM,GAAG,GAAG,CAAC,EAAE,mBAAmB,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC;AAClE,QAAQ,MAAM,cAAc,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AACjE,QAAQ,MAAM,QAAQ,GAAG,MAAM,oBAAoB,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,CAAC;AAC7G,QAAQ,MAAM,iBAAiB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACpD,QAAQ,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;AAC1C,YAAY,oBAAoB,CAAC,iBAAiB,EAAE,eAAe,CAAC,iBAAiB,CAAC,CAAC,CAAC;AACxF,SAAS;AACT,KAAK;AACL,IAAI,OAAO,KAAK,EAAE;AAClB,QAAQ,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAClC,QAAQ,MAAM,KAAK,CAAC;AACpB,KAAK;AACL;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"identifyUser.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/apis/identifyUser.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AAkBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDG;AACI,MAAM,YAAY,GAAG,OAAO,EAClC,MAAM,EACN,WAAW,EACX,OAAO,GACY,KAAmB;AACtC,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;AACP,QAAA,WAAW,EAAE,YAAY;QACzB,MAAM;QACN,KAAK;AACL,QAAA,QAAQ,EAAE,QAAQ;QAClB,WAAW;QACX,UAAU;QACV,MAAM;QACN,cAAc;QACd,MAAM;QACN,WAAW;AACX,QAAA,cAAc,EAAE,gCAAgC,CAC/C,oBAAoB,CAAC,YAAY,CACjC;AACD,KAAA,CAAC,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"identifyUser.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/identifyUser.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { InAppMessagingAction } from '@aws-amplify/core/internals/utils';\nimport { updateEndpoint, } from '@aws-amplify/core/internals/providers/pinpoint';\nimport { CATEGORY, CHANNEL_TYPE, getInAppMessagingUserAgentString, resolveConfig, resolveCredentials, } from '../utils';\nimport { assertIsInitialized } from '../../../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 {IdentifyUserParameters} params 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 InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\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 ({ 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: CHANNEL_TYPE,\n optOut,\n appId,\n category: CATEGORY,\n credentials,\n identityId,\n region,\n userAttributes,\n userId,\n userProfile,\n userAgentValue: getInAppMessagingUserAgentString(InAppMessagingAction.IdentifyUser),\n });\n};\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AAKA;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,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,YAAY;AACjC,QAAQ,MAAM;AACd,QAAQ,KAAK;AACb,QAAQ,QAAQ,EAAE,QAAQ;AAC1B,QAAQ,WAAW;AACnB,QAAQ,UAAU;AAClB,QAAQ,MAAM;AACd,QAAQ,cAAc;AACtB,QAAQ,MAAM;AACd,QAAQ,WAAW;AACnB,QAAQ,cAAc,EAAE,gCAAgC,CAAC,oBAAoB,CAAC,YAAY,CAAC;AAC3F,KAAK,CAAC,CAAC;AACP;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"initializeInAppMessaging.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;AAAA;AACA;AAYA;;;;;;;;;;AAUG;SACa,wBAAwB,GAAA;IACvC,IAAI,aAAa,EAAE,EAAE;QACpB,OAAO;AACP,KAAA;;AAED,IAAA,eAAe,CAAC,sBAAsB,CAAC,yBAAyB,EAAE,IAAI,CAAC,CAAC;;AAGxE,IAAA,gBAAgB,CAAC,kBAAkB,EAAE,CAAC,OAAqB,KAAI;AAC9D,QAAA,oBAAoB,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AACtE,QAAA,sBAAsB,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AACpC,KAAC,CAAC,CAAC;AACH,IAAA,gBAAgB,CAAC,kBAAkB,EAAE,CAAC,OAAqB,KAAI;AAC9D,QAAA,oBAAoB,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AACvE,KAAC,CAAC,CAAC;AACH,IAAA,gBAAgB,CAAC,oBAAoB,EAAE,CAAC,OAAqB,KAAI;AAChE,QAAA,oBAAoB,CAAC,oBAAoB,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;AAC1E,KAAC,CAAC,CAAC;;AAGH,IAAA,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;AAE3C,IAAA,UAAU,EAAE,CAAC;AACd,CAAC;AAED,SAAS,iBAAiB,CAAC,EAC1B,OAAO,GAC2D,EAAA;AAClE,IAAA,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;AAChC,IAAA,QAAQ,KAAK;QACZ,KAAK,QAAQ,EAAE;YACd,aAAa,CAAC,IAAI,CAAC,CAAC;YACpB,MAAM;AACN,SAAA;AAGD,KAAA;AACF;;;;"}
1
+ {"version":3,"file":"initializeInAppMessaging.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { sessionListener } from '@aws-amplify/core/internals/utils';\nimport { addEventListener } from '../../../../eventListeners';\nimport { recordAnalyticsEvent } from '../utils/helpers';\nimport { PinpointMessageEvent } from '../types';\nimport { Hub } from '@aws-amplify/core';\nimport { dispatchEvent } from './dispatchEvent';\nimport { incrementMessageCounts, sessionStateChangeHandler } from '../utils';\nimport { isInitialized, initialize } from '../../../utils';\n/**\n * Initialize and set up in-app messaging category. This API needs to be called to enable other InAppMessaging APIs.\n *\n * @remarks\n * Make sure to call this early in your app at the root entry point after configuring Amplify.\n * @example\n * ```ts\n * Amplify.configure(config);\n * initializeInAppMessaging();\n * ```\n */\nexport function initializeInAppMessaging() {\n if (isInitialized()) {\n return;\n }\n // register with the session listener\n sessionListener.addStateChangeListener(sessionStateChangeHandler, true);\n // wire up default Pinpoint message event handling\n addEventListener('messageDisplayed', (message) => {\n recordAnalyticsEvent(PinpointMessageEvent.MESSAGE_DISPLAYED, message);\n incrementMessageCounts(message.id);\n });\n addEventListener('messageDismissed', (message) => {\n recordAnalyticsEvent(PinpointMessageEvent.MESSAGE_DISMISSED, message);\n });\n addEventListener('messageActionTaken', (message) => {\n recordAnalyticsEvent(PinpointMessageEvent.MESSAGE_ACTION_TAKEN, message);\n });\n // listen to analytics hub events\n Hub.listen('analytics', analyticsListener);\n initialize();\n}\nfunction analyticsListener({ payload, }) {\n const { event, data } = payload;\n switch (event) {\n case 'record': {\n dispatchEvent(data);\n break;\n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ifyMessageInteraction.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAMA;;;;;;;;;;;;;AAaG;SACa,wBAAwB,CAAC,EACxC,IAAI,EACJ,OAAO,GACwB,EAAA;AAC/B,IAAA,mBAAmB,EAAE,CAAC;AACtB,IAAA,oBAAoB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACrC;;;;"}
1
+ {"version":3,"file":"notifyMessageInteraction.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { notifyEventListeners } from '../../../../eventListeners';\nimport { assertIsInitialized } from '../../../utils';\n/**\n * Notifies the respective listener of the specified type with the message given.\n *\n * @param {NotifyMessageInteractionInput} input - The input object that holds the type and message.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @example\n * ```ts\n * onMessageRecieved((message) => {\n * // Show end users the In-App message and notify event listeners\n * notifyMessageInteraction({ type: 'messageDisplayed', message });\n * });\n * ```\n */\nexport function notifyMessageInteraction({ type, message, }) {\n assertIsInitialized();\n notifyEventListeners(type, message);\n}\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,wBAAwB,CAAC,EAAE,IAAI,EAAE,OAAO,GAAG,EAAE;AAC7D,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,oBAAoB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACxC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"onMessageActionTaken.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAOA;;;;;;;;;;;;;;AAcG;AACG,SAAU,oBAAoB,CACnC,KAAgC,EAAA;AAEhC,IAAA,mBAAmB,EAAE,CAAC;AACtB,IAAA,OAAO,gBAAgB,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;AACtD;;;;"}
1
+ {"version":3,"file":"onMessageActionTaken.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.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 '../../../utils';\n/**\n * Registers a callback that will be invoked on `messageActionTaken` events.\n *\n * @param {OnMessageActionTakenInput} input - The input object that holds the callback handler.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns {OnMessageActionTakenOutput} - An object that holds a remove method to stop listening to events.\n * @example\n * ```ts\n * onMessageActionTaken((message) => {\n * // use the message\n * console.log(message.id);\n * });\n * ```\n */\nexport function onMessageActionTaken(input) {\n assertIsInitialized();\n return addEventListener('messageActionTaken', input);\n}\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,oBAAoB,CAAC,KAAK,EAAE;AAC5C,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,OAAO,gBAAgB,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;AACzD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"onMessageDismissed.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAOA;;;;;;;;;;;;;;AAcG;AACG,SAAU,kBAAkB,CACjC,KAA8B,EAAA;AAE9B,IAAA,mBAAmB,EAAE,CAAC;AACtB,IAAA,OAAO,gBAAgB,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;AACpD;;;;"}
1
+ {"version":3,"file":"onMessageDismissed.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.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 '../../../utils';\n/**\n * Registers a callback that will be invoked on `messageDismissed` events.\n *\n * @param {OnMessageDismissedInput} input - The input object that holds the callback handler.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns {OnMessageDismissedOutput} - An object that holds a remove method to stop listening to events.\n * @example\n * ```ts\n * onMessageDismissed((message) => {\n * // use the message\n * console.log(message.id);\n * });\n * ```\n */\nexport function onMessageDismissed(input) {\n assertIsInitialized();\n return addEventListener('messageDismissed', input);\n}\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,kBAAkB,CAAC,KAAK,EAAE;AAC1C,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,OAAO,gBAAgB,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;AACvD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"onMessageDisplayed.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAOA;;;;;;;;;;;;;;AAcG;AACG,SAAU,kBAAkB,CACjC,KAA8B,EAAA;AAE9B,IAAA,mBAAmB,EAAE,CAAC;AACtB,IAAA,OAAO,gBAAgB,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;AACpD;;;;"}
1
+ {"version":3,"file":"onMessageDisplayed.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.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 '../../../utils';\n/**\n * Registers a callback that will be invoked on `messageDisplayed` events.\n *\n * @param {OnMessageDisplayedInput} input - The input object that holds the callback handler.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns {OnMessageDismissedOutput} - An object that holds a remove method to stop listening to events.\n * @example\n * ```ts\n * onMessageDisplayed((message) => {\n * // use the message\n * \t console.log(message.id);\n * });\n * ```\n */\nexport function onMessageDisplayed(input) {\n assertIsInitialized();\n return addEventListener('messageDisplayed', input);\n}\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,kBAAkB,CAAC,KAAK,EAAE;AAC1C,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,OAAO,gBAAgB,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;AACvD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"onMessageReceived.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/apis/onMessageReceived.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAOA;;;;;;;;;;;;;;AAcG;AACG,SAAU,iBAAiB,CAChC,KAA6B,EAAA;AAE7B,IAAA,mBAAmB,EAAE,CAAC;AACtB,IAAA,OAAO,gBAAgB,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;AACnD;;;;"}
1
+ {"version":3,"file":"onMessageReceived.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/onMessageReceived.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 '../../../utils';\n/**\n * Registers a callback that will be invoked on `messageReceived` events.\n *\n * @param {OnMessageReceivedInput} input - The input object that holds the callback handler.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns {OnMessageReceivedOutput} - An object that holds a remove method to stop listening to events.\n * @example\n * ```ts\n * onMessageReceived((message) => {\n * // use the message\n * console.log(message.id);\n * });\n * ```\n */\nexport function onMessageReceived(input) {\n assertIsInitialized();\n return addEventListener('messageReceived', input);\n}\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,KAAK,EAAE;AACzC,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,OAAO,gBAAgB,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;AACtD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"setConflictHandler.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/apis/setConflictHandler.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AAMO,IAAI,eAAe,GACzB,uBAAuB;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACG,SAAU,kBAAkB,CAAC,KAA8B,EAAA;AAChE,IAAA,mBAAmB,EAAE,CAAC;IACtB,eAAe,GAAG,KAAK,CAAC;AACzB,CAAC;AAED,SAAS,sBAAsB,CAAC,QAAwB,EAAA;;;IAGvD,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAI;AACrC,QAAA,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC;AACrC,QAAA,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC;;QAErC,IAAI,QAAQ,KAAK,QAAQ,EAAE;AAC1B,YAAA,OAAO,CAAC,CAAC;AACT,SAAA;;AAED,QAAA,IAAI,QAAQ,IAAI,CAAC,QAAQ,EAAE;YAC1B,OAAO,CAAC,CAAC,CAAC;AACV,SAAA;;AAED,QAAA,IAAI,CAAC,QAAQ,IAAI,QAAQ,EAAE;AAC1B,YAAA,OAAO,CAAC,CAAC;AACT,SAAA;;QAED,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AACzD,KAAC,CAAC,CAAC;;AAEH,IAAA,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;AAClB;;;;"}
1
+ {"version":3,"file":"setConflictHandler.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/setConflictHandler.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { assertIsInitialized } from '../../../utils';\nexport let conflictHandler = defaultConflictHandler;\n/**\n * Set a conflict handler that will be used to resolve conflicts that may emerge\n * when matching events with synced messages.\n *\n * @remark\n * The conflict handler is not persisted across app restarts and so must be set again before dispatching an event for\n * any custom handling to take effect.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @param SetConflictHandlerInput: The input object that holds the conflict handler to be used.\n * @example\n * ```ts\n * // Sync messages before dispatching an event\n * await syncMessages();\n *\n * // Example custom conflict handler\n * const myConflictHandler = (messages) => {\n * \t\t// Return a random message\n * \t\tconst randomIndex = Math.floor(Math.random() * messages.length);\n * \t\treturn messages[randomIndex];\n * };\n *\n * // Set the conflict handler\n * setConflictHandler(myConflictHandler);\n *\n * // Dispatch an event\n * await dispatchEvent({ name: 'test_event' });\n * ```\n */\nexport function setConflictHandler(input) {\n assertIsInitialized();\n conflictHandler = input;\n}\nfunction defaultConflictHandler(messages) {\n // default behavior is to return the message closest to expiry\n // this function assumes that messages processed by providers already filters out expired messages\n const sorted = messages.sort((a, b) => {\n const endDateA = a.metadata?.endDate;\n const endDateB = b.metadata?.endDate;\n // if both message end dates are falsy or have the same date string, treat them as equal\n if (endDateA === endDateB) {\n return 0;\n }\n // if only message A has an end date, treat it as closer to expiry\n if (endDateA && !endDateB) {\n return -1;\n }\n // if only message B has an end date, treat it as closer to expiry\n if (!endDateA && endDateB) {\n return 1;\n }\n // otherwise, compare them\n return new Date(endDateA) < new Date(endDateB) ? -1 : 1;\n });\n // always return the top sorted\n return sorted[0];\n}\n"],"names":[],"mappings":";;AAAA;AACA;AAEU,IAAC,eAAe,GAAG,uBAAuB;AACpD;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;AACO,SAAS,kBAAkB,CAAC,KAAK,EAAE;AAC1C,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,eAAe,GAAG,KAAK,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB,CAAC,QAAQ,EAAE;AAC1C;AACA;AACA,IAAI,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;AAC3C,QAAQ,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC;AAC7C,QAAQ,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC;AAC7C;AACA,QAAQ,IAAI,QAAQ,KAAK,QAAQ,EAAE;AACnC,YAAY,OAAO,CAAC,CAAC;AACrB,SAAS;AACT;AACA,QAAQ,IAAI,QAAQ,IAAI,CAAC,QAAQ,EAAE;AACnC,YAAY,OAAO,CAAC,CAAC,CAAC;AACtB,SAAS;AACT;AACA,QAAQ,IAAI,CAAC,QAAQ,IAAI,QAAQ,EAAE;AACnC,YAAY,OAAO,CAAC,CAAC;AACrB,SAAS;AACT;AACA,QAAQ,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAChE,KAAK,CAAC,CAAC;AACP;AACA,IAAI,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;AACrB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"syncMessages.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/apis/syncMessages.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;AAAA;AACA;AAyBA;;;;;;;;;;;;;;AAcG;AACI,eAAe,YAAY,GAAA;AACjC,IAAA,mBAAmB,EAAE,CAAC;AACtB,IAAA,MAAM,QAAQ,GAAG,MAAM,kBAAkB,EAAE,CAAC;IAC5C,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QACvC,OAAO;AACP,KAAA;IACD,IAAI;AACH,QAAA,MAAM,GAAG,GAAG,CAAA,EAAG,mBAAmB,CAAG,EAAA,kBAAkB,EAAE,CAAC;AAC1D,QAAA,MAAM,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC5D,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;QACf,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAC1B,QAAA,MAAM,KAAK,CAAC;AACZ,KAAA;AACF,CAAC;AAED,eAAe,kBAAkB,GAAA;IAChC,IAAI;QACH,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,kBAAkB,EAAE,CAAC;QAC/D,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;AAC1C,QAAA,MAAM,UAAU,GAAG,MAAM,iBAAiB,CAAC;YAC1C,KAAK;AACL,YAAA,QAAQ,EAAE,QAAQ;AAClB,YAAA,WAAW,EAAE,YAAY;YACzB,WAAW;YACX,UAAU;YACV,MAAM;AACN,YAAA,cAAc,EAAE,gCAAgC,CAC/C,oBAAoB,CAAC,YAAY,CACjC;AACD,SAAA,CAAC,CAAC;AAEH,QAAA,MAAM,KAAK,GAA0B;AACpC,YAAA,aAAa,EAAE,KAAK;AACpB,YAAA,UAAU,EAAE,UAAU;SACtB,CAAC;AACF,QAAA,MAAM,QAAQ,GAA2B,MAAM,gBAAgB,CAC9D,EAAE,WAAW,EAAE,MAAM,EAAE,EACvB,KAAK,CACL,CAAC;QACF,MAAM,EAAE,qBAAqB,EAAE,QAAQ,EAAE,GACxC,QAAQ,CAAC,qBAAqB,IAAI,EAAE,CAAC;AACtC,QAAA,OAAO,QAAQ,CAAC;AAChB,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;QACf,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAC1B,QAAA,MAAM,KAAK,CAAC;AACZ,KAAA;AACF;;;;"}
1
+ {"version":3,"file":"syncMessages.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/syncMessages.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { InAppMessagingAction } from '@aws-amplify/core/internals/utils';\nimport { resolveEndpointId } from '@aws-amplify/core/internals/providers/pinpoint';\nimport { defaultStorage } from '@aws-amplify/core';\nimport { resolveConfig, resolveCredentials, getInAppMessagingUserAgentString, STORAGE_KEY_SUFFIX, PINPOINT_KEY_PREFIX, CATEGORY, CHANNEL_TYPE, } from '../utils';\nimport { getInAppMessages, } from '@aws-amplify/core/internals/aws-clients/pinpoint';\nimport { assertServiceError, } from '../../../errors';\nimport { assertIsInitialized } from '../../../utils';\n/**\n * Fetch and persist messages from Pinpoint campaigns.\n * Calling this API is necessary to trigger InApp messages on the device.\n *\n * @throws service exceptions - Thrown when the underlying Pinpoint service returns an error.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns A promise that will resolve when the operation is complete.\n * @example\n * ```ts\n * // Sync InApp messages with Pinpoint and device.\n * await syncMessages();\n *\n * ```\n */\nexport async function syncMessages() {\n assertIsInitialized();\n const messages = await fetchInAppMessages();\n if (!messages || messages.length === 0) {\n return;\n }\n try {\n const key = `${PINPOINT_KEY_PREFIX}${STORAGE_KEY_SUFFIX}`;\n await defaultStorage.setItem(key, JSON.stringify(messages));\n }\n catch (error) {\n assertServiceError(error);\n throw error;\n }\n}\nasync function fetchInAppMessages() {\n try {\n const { credentials, identityId } = await resolveCredentials();\n const { appId, region } = resolveConfig();\n const endpointId = await resolveEndpointId({\n appId,\n category: CATEGORY,\n channelType: CHANNEL_TYPE,\n credentials,\n identityId,\n region,\n userAgentValue: getInAppMessagingUserAgentString(InAppMessagingAction.SyncMessages),\n });\n const input = {\n ApplicationId: appId,\n EndpointId: endpointId,\n };\n const response = await getInAppMessages({ credentials, region }, input);\n const { InAppMessageCampaigns: messages } = response.InAppMessagesResponse ?? {};\n return messages;\n }\n catch (error) {\n assertServiceError(error);\n throw error;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAe,YAAY,GAAG;AACrC,IAAI,mBAAmB,EAAE,CAAC;AAC1B,IAAI,MAAM,QAAQ,GAAG,MAAM,kBAAkB,EAAE,CAAC;AAChD,IAAI,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAC5C,QAAQ,OAAO;AACf,KAAK;AACL,IAAI,IAAI;AACR,QAAQ,MAAM,GAAG,GAAG,CAAC,EA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C;AACpB,KAAK;AACL;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/types/types.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;IAsBY,qBAIX;AAJD,CAAA,UAAY,oBAAoB,EAAA;AAC/B,IAAA,oBAAA,CAAA,mBAAA,CAAA,GAAA,0BAA8C,CAAA;AAC9C,IAAA,oBAAA,CAAA,mBAAA,CAAA,GAAA,0BAA8C,CAAA;AAC9C,IAAA,oBAAA,CAAA,sBAAA,CAAA,GAAA,wBAA+C,CAAA;AAChD,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,GAI/B,EAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"types.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/types/types.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport var PinpointMessageEvent;\n(function (PinpointMessageEvent) {\n PinpointMessageEvent[\"MESSAGE_DISPLAYED\"] = \"_inapp.message_displayed\";\n PinpointMessageEvent[\"MESSAGE_DISMISSED\"] = \"_inapp.message_dismissed\";\n PinpointMessageEvent[\"MESSAGE_ACTION_TAKEN\"] = \"_inapp.message_clicked\";\n})(PinpointMessageEvent || (PinpointMessageEvent = {}));\n"],"names":[],"mappings":"AAAA;AACA;AACU,IAAC,qBAAqB;AAChC,CAAC,UAAU,oBAAoB,EAAE;AACjC,IAAI,oBAAoB,CAAC,mBAAmB,CAAC,GAAG,0BAA0B,CAAC;AAC3E,IAAI,oBAAoB,CAAC,mBAAmB,CAAC,GAAG,0BAA0B,CAAC;AAC3E,IAAI,oBAAoB,CAAC,sBAAsB,CAAC,GAAG,wBAAwB,CAAC;AAC5E,CAAC,EAAE,oBAAoB,KAAK,oBAAoB,GAAG,EAAE,CAAC,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.mjs","sources":["../../../../../../../src/inAppMessaging/providers/pinpoint/utils/constants.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACO,MAAM,mBAAmB,GAAG,WAAW;AACvC,MAAM,kBAAkB,GAAG,iBAAiB;AAC5C,MAAM,QAAQ,GAAG,iBAAiB;AAClC,MAAM,YAAY,GAAG;;;;"}
1
+ {"version":3,"file":"constants.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/utils/constants.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const PINPOINT_KEY_PREFIX = 'Pinpoint';\nexport const STORAGE_KEY_SUFFIX = '_inAppMessages';\nexport const CATEGORY = 'InAppMessaging';\nexport const CHANNEL_TYPE = 'IN_APP';\n"],"names":[],"mappings":"AAAA;AACA;AACY,MAAC,mBAAmB,GAAG,WAAW;AAClC,MAAC,kBAAkB,GAAG,iBAAiB;AACvC,MAAC,QAAQ,GAAG,iBAAiB;AAC7B,MAAC,YAAY,GAAG;;;;"}