@aws-amplify/notifications 2.0.1-console-preview.d745d43.0 → 2.0.1-ssr-api.df60e41.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 (458) hide show
  1. package/lib/eventListeners/eventListeners.js +7 -4
  2. package/lib/eventListeners/index.js +4 -4
  3. package/lib/eventListeners/types.d.ts +2 -2
  4. package/lib/eventListeners/types.js +0 -1
  5. package/lib/inAppMessaging/errors/InAppMessagingError.js +1 -1
  6. package/lib/inAppMessaging/errors/assertServiceError.js +1 -1
  7. package/lib/inAppMessaging/errors/assertValidationError.js +1 -1
  8. package/lib/inAppMessaging/errors/index.js +6 -6
  9. package/lib/inAppMessaging/errors/validation.js +1 -1
  10. package/lib/inAppMessaging/index.d.ts +1 -1
  11. package/lib/inAppMessaging/index.js +12 -11
  12. package/lib/inAppMessaging/providers/pinpoint/apis/clearMessages.d.ts +13 -0
  13. package/lib/inAppMessaging/providers/pinpoint/apis/clearMessages.js +26 -0
  14. package/lib/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js +10 -8
  15. package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +2 -1
  16. package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.js +8 -7
  17. package/lib/inAppMessaging/providers/pinpoint/apis/index.d.ts +1 -0
  18. package/lib/inAppMessaging/providers/pinpoint/apis/index.js +13 -11
  19. package/lib/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +11 -11
  20. package/lib/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +3 -3
  21. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js +3 -3
  22. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js +3 -3
  23. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js +3 -3
  24. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js +3 -3
  25. package/lib/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +2 -2
  26. package/lib/inAppMessaging/providers/pinpoint/apis/syncMessages.js +9 -9
  27. package/lib/inAppMessaging/providers/pinpoint/index.d.ts +1 -1
  28. package/lib/inAppMessaging/providers/pinpoint/index.js +12 -11
  29. package/lib/inAppMessaging/providers/pinpoint/types/index.js +2 -2
  30. package/lib/inAppMessaging/providers/pinpoint/types/inputs.d.ts +8 -8
  31. package/lib/inAppMessaging/providers/pinpoint/types/inputs.js +0 -1
  32. package/lib/inAppMessaging/providers/pinpoint/types/options.d.ts +1 -1
  33. package/lib/inAppMessaging/providers/pinpoint/types/options.js +0 -1
  34. package/lib/inAppMessaging/providers/pinpoint/types/outputs.d.ts +4 -4
  35. package/lib/inAppMessaging/providers/pinpoint/types/outputs.js +0 -1
  36. package/lib/inAppMessaging/providers/pinpoint/types/types.d.ts +6 -6
  37. package/lib/inAppMessaging/providers/pinpoint/types/types.js +1 -1
  38. package/lib/inAppMessaging/providers/pinpoint/utils/constants.js +1 -1
  39. package/lib/inAppMessaging/providers/pinpoint/utils/helpers.d.ts +2 -2
  40. package/lib/inAppMessaging/providers/pinpoint/utils/helpers.js +38 -24
  41. package/lib/inAppMessaging/providers/pinpoint/utils/index.js +11 -11
  42. package/lib/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js +8 -8
  43. package/lib/inAppMessaging/providers/pinpoint/utils/resolveConfig.js +5 -4
  44. package/lib/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js +5 -4
  45. package/lib/inAppMessaging/providers/pinpoint/utils/userAgent.js +3 -3
  46. package/lib/inAppMessaging/types/event.d.ts +2 -2
  47. package/lib/inAppMessaging/types/event.js +0 -1
  48. package/lib/inAppMessaging/types/index.js +0 -1
  49. package/lib/inAppMessaging/types/inputs.d.ts +1 -1
  50. package/lib/inAppMessaging/types/inputs.js +0 -1
  51. package/lib/inAppMessaging/types/message.d.ts +3 -3
  52. package/lib/inAppMessaging/types/message.js +0 -1
  53. package/lib/inAppMessaging/types/options.d.ts +1 -1
  54. package/lib/inAppMessaging/types/options.js +0 -1
  55. package/lib/inAppMessaging/utils/index.js +4 -4
  56. package/lib/inAppMessaging/utils/statusHelpers.js +6 -4
  57. package/lib/index.js +0 -1
  58. package/lib/pushNotifications/errors/PushNotificationError.js +1 -1
  59. package/lib/pushNotifications/errors/errorHelpers.js +5 -4
  60. package/lib/pushNotifications/errors/index.js +4 -4
  61. package/lib/pushNotifications/index.js +13 -13
  62. package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.js +3 -2
  63. package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js +5 -4
  64. package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js +3 -2
  65. package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js +5 -4
  66. package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js +3 -2
  67. package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js +5 -4
  68. package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.js +3 -2
  69. package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.native.js +9 -8
  70. package/lib/pushNotifications/providers/pinpoint/apis/index.js +12 -12
  71. package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js +3 -2
  72. package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js +45 -36
  73. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js +3 -2
  74. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js +5 -4
  75. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js +3 -2
  76. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js +5 -4
  77. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js +3 -2
  78. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js +5 -4
  79. package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.js +3 -2
  80. package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js +5 -4
  81. package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.js +3 -2
  82. package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js +5 -4
  83. package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.js +3 -2
  84. package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js +5 -4
  85. package/lib/pushNotifications/providers/pinpoint/index.js +12 -12
  86. package/lib/pushNotifications/providers/pinpoint/types/analytics.d.ts +3 -3
  87. package/lib/pushNotifications/providers/pinpoint/types/analytics.js +0 -1
  88. package/lib/pushNotifications/providers/pinpoint/types/apis.d.ts +11 -11
  89. package/lib/pushNotifications/providers/pinpoint/types/apis.js +0 -1
  90. package/lib/pushNotifications/providers/pinpoint/types/index.js +0 -1
  91. package/lib/pushNotifications/providers/pinpoint/types/inputs.d.ts +7 -7
  92. package/lib/pushNotifications/providers/pinpoint/types/inputs.js +0 -1
  93. package/lib/pushNotifications/providers/pinpoint/types/options.d.ts +1 -1
  94. package/lib/pushNotifications/providers/pinpoint/types/options.js +0 -1
  95. package/lib/pushNotifications/providers/pinpoint/types/outputs.d.ts +8 -8
  96. package/lib/pushNotifications/providers/pinpoint/types/outputs.js +0 -1
  97. package/lib/pushNotifications/providers/pinpoint/types/pushNotifications.d.ts +1 -1
  98. package/lib/pushNotifications/providers/pinpoint/types/pushNotifications.js +0 -1
  99. package/lib/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.d.ts +3 -2
  100. package/lib/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js +10 -8
  101. package/lib/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.d.ts +3 -2
  102. package/lib/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js +3 -2
  103. package/lib/pushNotifications/providers/pinpoint/utils/getChannelType.d.ts +2 -1
  104. package/lib/pushNotifications/providers/pinpoint/utils/getChannelType.js +4 -3
  105. package/lib/pushNotifications/providers/pinpoint/utils/index.d.ts +2 -1
  106. package/lib/pushNotifications/providers/pinpoint/utils/index.js +7 -5
  107. package/lib/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.js +6 -5
  108. package/lib/pushNotifications/types/errors.js +1 -1
  109. package/lib/pushNotifications/types/index.js +19 -3
  110. package/lib/pushNotifications/types/inputs.d.ts +7 -7
  111. package/lib/pushNotifications/types/inputs.js +0 -1
  112. package/lib/pushNotifications/types/options.d.ts +1 -1
  113. package/lib/pushNotifications/types/options.js +0 -1
  114. package/lib/pushNotifications/types/outputs.d.ts +8 -8
  115. package/lib/pushNotifications/types/outputs.js +0 -1
  116. package/lib/pushNotifications/types/pushNotifications.d.ts +3 -3
  117. package/lib/pushNotifications/types/pushNotifications.js +0 -1
  118. package/lib/pushNotifications/{providers/pinpoint/utils → utils}/getPushNotificationUserAgentString.js +3 -2
  119. package/lib/pushNotifications/utils/index.d.ts +1 -1
  120. package/lib/pushNotifications/utils/index.js +8 -8
  121. package/lib/pushNotifications/utils/initializationManager.js +5 -3
  122. package/lib/pushNotifications/utils/resolveCredentials.js +5 -4
  123. package/lib/pushNotifications/utils/tokenManager.js +5 -3
  124. package/lib/tsconfig.tsbuildinfo +1 -7201
  125. package/lib-esm/eventListeners/eventListeners.js +0 -1
  126. package/lib-esm/eventListeners/index.js +0 -1
  127. package/lib-esm/eventListeners/types.d.ts +2 -2
  128. package/lib-esm/eventListeners/types.js +1 -1
  129. package/lib-esm/inAppMessaging/errors/InAppMessagingError.js +0 -1
  130. package/lib-esm/inAppMessaging/errors/assertServiceError.js +0 -1
  131. package/lib-esm/inAppMessaging/errors/assertValidationError.js +0 -1
  132. package/lib-esm/inAppMessaging/errors/index.js +0 -1
  133. package/lib-esm/inAppMessaging/errors/validation.js +0 -1
  134. package/lib-esm/inAppMessaging/index.d.ts +1 -1
  135. package/lib-esm/inAppMessaging/index.js +1 -2
  136. package/lib-esm/inAppMessaging/providers/pinpoint/apis/clearMessages.d.ts +13 -0
  137. package/lib-esm/inAppMessaging/providers/pinpoint/apis/clearMessages.js +22 -0
  138. package/lib-esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js +0 -1
  139. package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +2 -1
  140. package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.js +0 -1
  141. package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.d.ts +1 -0
  142. package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.js +1 -1
  143. package/lib-esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +0 -1
  144. package/lib-esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +0 -1
  145. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js +0 -1
  146. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js +0 -1
  147. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js +0 -1
  148. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js +0 -1
  149. package/lib-esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +0 -1
  150. package/lib-esm/inAppMessaging/providers/pinpoint/apis/syncMessages.js +0 -1
  151. package/lib-esm/inAppMessaging/providers/pinpoint/index.d.ts +1 -1
  152. package/lib-esm/inAppMessaging/providers/pinpoint/index.js +1 -2
  153. package/lib-esm/inAppMessaging/providers/pinpoint/types/index.js +0 -1
  154. package/lib-esm/inAppMessaging/providers/pinpoint/types/inputs.d.ts +8 -8
  155. package/lib-esm/inAppMessaging/providers/pinpoint/types/inputs.js +1 -1
  156. package/lib-esm/inAppMessaging/providers/pinpoint/types/options.d.ts +1 -1
  157. package/lib-esm/inAppMessaging/providers/pinpoint/types/options.js +1 -1
  158. package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.d.ts +4 -4
  159. package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.js +1 -1
  160. package/lib-esm/inAppMessaging/providers/pinpoint/types/types.d.ts +6 -6
  161. package/lib-esm/inAppMessaging/providers/pinpoint/types/types.js +0 -1
  162. package/lib-esm/inAppMessaging/providers/pinpoint/utils/constants.js +0 -1
  163. package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.d.ts +2 -2
  164. package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.js +0 -1
  165. package/lib-esm/inAppMessaging/providers/pinpoint/utils/index.js +0 -1
  166. package/lib-esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js +0 -1
  167. package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveConfig.js +0 -1
  168. package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js +0 -1
  169. package/lib-esm/inAppMessaging/providers/pinpoint/utils/userAgent.js +0 -1
  170. package/lib-esm/inAppMessaging/types/event.d.ts +2 -2
  171. package/lib-esm/inAppMessaging/types/event.js +1 -1
  172. package/lib-esm/inAppMessaging/types/index.js +1 -1
  173. package/lib-esm/inAppMessaging/types/inputs.d.ts +1 -1
  174. package/lib-esm/inAppMessaging/types/inputs.js +1 -1
  175. package/lib-esm/inAppMessaging/types/message.d.ts +3 -3
  176. package/lib-esm/inAppMessaging/types/message.js +1 -1
  177. package/lib-esm/inAppMessaging/types/options.d.ts +1 -1
  178. package/lib-esm/inAppMessaging/types/options.js +1 -1
  179. package/lib-esm/inAppMessaging/utils/index.js +0 -1
  180. package/lib-esm/inAppMessaging/utils/statusHelpers.js +0 -1
  181. package/lib-esm/index.js +0 -1
  182. package/lib-esm/pushNotifications/errors/PushNotificationError.js +0 -1
  183. package/lib-esm/pushNotifications/errors/errorHelpers.js +0 -1
  184. package/lib-esm/pushNotifications/errors/index.js +0 -1
  185. package/lib-esm/pushNotifications/index.js +0 -1
  186. package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.js +1 -2
  187. package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js +0 -1
  188. package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js +1 -2
  189. package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js +1 -2
  190. package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js +1 -2
  191. package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js +1 -2
  192. package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.js +1 -2
  193. package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.js +2 -3
  194. package/lib-esm/pushNotifications/providers/pinpoint/apis/index.js +0 -1
  195. package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js +0 -1
  196. package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js +30 -23
  197. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js +0 -1
  198. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js +0 -1
  199. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js +0 -1
  200. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js +0 -1
  201. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js +0 -1
  202. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js +0 -1
  203. package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.js +0 -1
  204. package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js +0 -1
  205. package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.js +1 -2
  206. package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js +1 -2
  207. package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.js +0 -1
  208. package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js +0 -1
  209. package/lib-esm/pushNotifications/providers/pinpoint/index.js +0 -1
  210. package/lib-esm/pushNotifications/providers/pinpoint/types/analytics.d.ts +3 -3
  211. package/lib-esm/pushNotifications/providers/pinpoint/types/analytics.js +1 -1
  212. package/lib-esm/pushNotifications/providers/pinpoint/types/apis.d.ts +11 -11
  213. package/lib-esm/pushNotifications/providers/pinpoint/types/apis.js +1 -1
  214. package/lib-esm/pushNotifications/providers/pinpoint/types/index.js +1 -1
  215. package/lib-esm/pushNotifications/providers/pinpoint/types/inputs.d.ts +7 -7
  216. package/lib-esm/pushNotifications/providers/pinpoint/types/inputs.js +1 -1
  217. package/lib-esm/pushNotifications/providers/pinpoint/types/options.d.ts +1 -1
  218. package/lib-esm/pushNotifications/providers/pinpoint/types/options.js +1 -1
  219. package/lib-esm/pushNotifications/providers/pinpoint/types/outputs.d.ts +8 -8
  220. package/lib-esm/pushNotifications/providers/pinpoint/types/outputs.js +1 -1
  221. package/lib-esm/pushNotifications/providers/pinpoint/types/pushNotifications.d.ts +1 -1
  222. package/lib-esm/pushNotifications/providers/pinpoint/types/pushNotifications.js +1 -1
  223. package/lib-esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.d.ts +3 -2
  224. package/lib-esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js +2 -2
  225. package/lib-esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.d.ts +3 -2
  226. package/lib-esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js +0 -1
  227. package/lib-esm/pushNotifications/providers/pinpoint/utils/getChannelType.d.ts +2 -1
  228. package/lib-esm/pushNotifications/providers/pinpoint/utils/getChannelType.js +0 -1
  229. package/lib-esm/pushNotifications/providers/pinpoint/utils/index.d.ts +2 -1
  230. package/lib-esm/pushNotifications/providers/pinpoint/utils/index.js +2 -2
  231. package/lib-esm/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.js +1 -2
  232. package/lib-esm/pushNotifications/types/errors.js +0 -1
  233. package/lib-esm/pushNotifications/types/index.js +4 -1
  234. package/lib-esm/pushNotifications/types/inputs.d.ts +7 -7
  235. package/lib-esm/pushNotifications/types/inputs.js +1 -1
  236. package/lib-esm/pushNotifications/types/options.d.ts +1 -1
  237. package/lib-esm/pushNotifications/types/options.js +1 -1
  238. package/lib-esm/pushNotifications/types/outputs.d.ts +8 -8
  239. package/lib-esm/pushNotifications/types/outputs.js +1 -1
  240. package/lib-esm/pushNotifications/types/pushNotifications.d.ts +3 -3
  241. package/lib-esm/pushNotifications/types/pushNotifications.js +1 -1
  242. package/lib-esm/pushNotifications/{providers/pinpoint/utils → utils}/getPushNotificationUserAgentString.js +0 -1
  243. package/lib-esm/pushNotifications/utils/index.d.ts +1 -1
  244. package/lib-esm/pushNotifications/utils/index.js +1 -2
  245. package/lib-esm/pushNotifications/utils/initializationManager.js +0 -1
  246. package/lib-esm/pushNotifications/utils/resolveCredentials.js +0 -1
  247. package/lib-esm/pushNotifications/utils/tokenManager.js +0 -1
  248. package/lib-esm/tsconfig.tsbuildinfo +1 -7201
  249. package/package.json +51 -14
  250. package/src/inAppMessaging/index.ts +1 -0
  251. package/src/inAppMessaging/providers/pinpoint/apis/clearMessages.ts +26 -0
  252. package/src/inAppMessaging/providers/pinpoint/apis/index.ts +1 -0
  253. package/src/inAppMessaging/providers/pinpoint/index.ts +1 -0
  254. package/src/pushNotifications/providers/pinpoint/apis/getBadgeCount.ts +1 -1
  255. package/src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.ts +1 -1
  256. package/src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.ts +1 -1
  257. package/src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.ts +1 -1
  258. package/src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.ts +1 -1
  259. package/src/pushNotifications/providers/pinpoint/apis/identifyUser.native.ts +5 -2
  260. package/src/pushNotifications/providers/pinpoint/apis/identifyUser.ts +1 -1
  261. package/src/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.ts +50 -40
  262. package/src/pushNotifications/providers/pinpoint/apis/requestPermissions.native.ts +1 -1
  263. package/src/pushNotifications/providers/pinpoint/apis/requestPermissions.ts +1 -1
  264. package/src/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.ts +5 -4
  265. package/src/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.ts +3 -3
  266. package/src/pushNotifications/providers/pinpoint/utils/index.ts +2 -1
  267. package/src/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.ts +1 -1
  268. package/src/pushNotifications/types/pushNotifications.ts +1 -1
  269. package/src/pushNotifications/utils/index.ts +1 -1
  270. package/lib/eventListeners/eventListeners.js.map +0 -1
  271. package/lib/eventListeners/index.js.map +0 -1
  272. package/lib/eventListeners/types.js.map +0 -1
  273. package/lib/inAppMessaging/errors/InAppMessagingError.js.map +0 -1
  274. package/lib/inAppMessaging/errors/assertServiceError.js.map +0 -1
  275. package/lib/inAppMessaging/errors/assertValidationError.js.map +0 -1
  276. package/lib/inAppMessaging/errors/index.js.map +0 -1
  277. package/lib/inAppMessaging/errors/validation.js.map +0 -1
  278. package/lib/inAppMessaging/index.js.map +0 -1
  279. package/lib/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js.map +0 -1
  280. package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.js.map +0 -1
  281. package/lib/inAppMessaging/providers/pinpoint/apis/index.js.map +0 -1
  282. package/lib/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js.map +0 -1
  283. package/lib/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js.map +0 -1
  284. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js.map +0 -1
  285. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js.map +0 -1
  286. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js.map +0 -1
  287. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js.map +0 -1
  288. package/lib/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js.map +0 -1
  289. package/lib/inAppMessaging/providers/pinpoint/apis/syncMessages.js.map +0 -1
  290. package/lib/inAppMessaging/providers/pinpoint/index.js.map +0 -1
  291. package/lib/inAppMessaging/providers/pinpoint/types/index.js.map +0 -1
  292. package/lib/inAppMessaging/providers/pinpoint/types/inputs.js.map +0 -1
  293. package/lib/inAppMessaging/providers/pinpoint/types/options.js.map +0 -1
  294. package/lib/inAppMessaging/providers/pinpoint/types/outputs.js.map +0 -1
  295. package/lib/inAppMessaging/providers/pinpoint/types/types.js.map +0 -1
  296. package/lib/inAppMessaging/providers/pinpoint/utils/constants.js.map +0 -1
  297. package/lib/inAppMessaging/providers/pinpoint/utils/helpers.js.map +0 -1
  298. package/lib/inAppMessaging/providers/pinpoint/utils/index.js.map +0 -1
  299. package/lib/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js.map +0 -1
  300. package/lib/inAppMessaging/providers/pinpoint/utils/resolveConfig.js.map +0 -1
  301. package/lib/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js.map +0 -1
  302. package/lib/inAppMessaging/providers/pinpoint/utils/userAgent.js.map +0 -1
  303. package/lib/inAppMessaging/types/event.js.map +0 -1
  304. package/lib/inAppMessaging/types/index.js.map +0 -1
  305. package/lib/inAppMessaging/types/inputs.js.map +0 -1
  306. package/lib/inAppMessaging/types/message.js.map +0 -1
  307. package/lib/inAppMessaging/types/options.js.map +0 -1
  308. package/lib/inAppMessaging/utils/index.js.map +0 -1
  309. package/lib/inAppMessaging/utils/statusHelpers.js.map +0 -1
  310. package/lib/index.js.map +0 -1
  311. package/lib/pushNotifications/errors/PushNotificationError.js.map +0 -1
  312. package/lib/pushNotifications/errors/errorHelpers.js.map +0 -1
  313. package/lib/pushNotifications/errors/index.js.map +0 -1
  314. package/lib/pushNotifications/index.js.map +0 -1
  315. package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.js.map +0 -1
  316. package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js.map +0 -1
  317. package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js.map +0 -1
  318. package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js.map +0 -1
  319. package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js.map +0 -1
  320. package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js.map +0 -1
  321. package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.js.map +0 -1
  322. package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.native.js.map +0 -1
  323. package/lib/pushNotifications/providers/pinpoint/apis/index.js.map +0 -1
  324. package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js.map +0 -1
  325. package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js.map +0 -1
  326. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js.map +0 -1
  327. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js.map +0 -1
  328. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js.map +0 -1
  329. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js.map +0 -1
  330. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js.map +0 -1
  331. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js.map +0 -1
  332. package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.js.map +0 -1
  333. package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js.map +0 -1
  334. package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.js.map +0 -1
  335. package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js.map +0 -1
  336. package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.js.map +0 -1
  337. package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js.map +0 -1
  338. package/lib/pushNotifications/providers/pinpoint/index.js.map +0 -1
  339. package/lib/pushNotifications/providers/pinpoint/types/analytics.js.map +0 -1
  340. package/lib/pushNotifications/providers/pinpoint/types/apis.js.map +0 -1
  341. package/lib/pushNotifications/providers/pinpoint/types/index.js.map +0 -1
  342. package/lib/pushNotifications/providers/pinpoint/types/inputs.js.map +0 -1
  343. package/lib/pushNotifications/providers/pinpoint/types/options.js.map +0 -1
  344. package/lib/pushNotifications/providers/pinpoint/types/outputs.js.map +0 -1
  345. package/lib/pushNotifications/providers/pinpoint/types/pushNotifications.js.map +0 -1
  346. package/lib/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js.map +0 -1
  347. package/lib/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js.map +0 -1
  348. package/lib/pushNotifications/providers/pinpoint/utils/getChannelType.js.map +0 -1
  349. package/lib/pushNotifications/providers/pinpoint/utils/getPushNotificationUserAgentString.js.map +0 -1
  350. package/lib/pushNotifications/providers/pinpoint/utils/index.js.map +0 -1
  351. package/lib/pushNotifications/types/errors.js.map +0 -1
  352. package/lib/pushNotifications/types/index.js.map +0 -1
  353. package/lib/pushNotifications/types/inputs.js.map +0 -1
  354. package/lib/pushNotifications/types/options.js.map +0 -1
  355. package/lib/pushNotifications/types/outputs.js.map +0 -1
  356. package/lib/pushNotifications/types/pushNotifications.js.map +0 -1
  357. package/lib/pushNotifications/utils/index.js.map +0 -1
  358. package/lib/pushNotifications/utils/initializationManager.js.map +0 -1
  359. package/lib/pushNotifications/utils/resolveConfig.js.map +0 -1
  360. package/lib/pushNotifications/utils/resolveCredentials.js.map +0 -1
  361. package/lib/pushNotifications/utils/tokenManager.js.map +0 -1
  362. package/lib-esm/eventListeners/eventListeners.js.map +0 -1
  363. package/lib-esm/eventListeners/index.js.map +0 -1
  364. package/lib-esm/eventListeners/types.js.map +0 -1
  365. package/lib-esm/inAppMessaging/errors/InAppMessagingError.js.map +0 -1
  366. package/lib-esm/inAppMessaging/errors/assertServiceError.js.map +0 -1
  367. package/lib-esm/inAppMessaging/errors/assertValidationError.js.map +0 -1
  368. package/lib-esm/inAppMessaging/errors/index.js.map +0 -1
  369. package/lib-esm/inAppMessaging/errors/validation.js.map +0 -1
  370. package/lib-esm/inAppMessaging/index.js.map +0 -1
  371. package/lib-esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js.map +0 -1
  372. package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.js.map +0 -1
  373. package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.js.map +0 -1
  374. package/lib-esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js.map +0 -1
  375. package/lib-esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js.map +0 -1
  376. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js.map +0 -1
  377. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js.map +0 -1
  378. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js.map +0 -1
  379. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js.map +0 -1
  380. package/lib-esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js.map +0 -1
  381. package/lib-esm/inAppMessaging/providers/pinpoint/apis/syncMessages.js.map +0 -1
  382. package/lib-esm/inAppMessaging/providers/pinpoint/index.js.map +0 -1
  383. package/lib-esm/inAppMessaging/providers/pinpoint/types/index.js.map +0 -1
  384. package/lib-esm/inAppMessaging/providers/pinpoint/types/inputs.js.map +0 -1
  385. package/lib-esm/inAppMessaging/providers/pinpoint/types/options.js.map +0 -1
  386. package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.js.map +0 -1
  387. package/lib-esm/inAppMessaging/providers/pinpoint/types/types.js.map +0 -1
  388. package/lib-esm/inAppMessaging/providers/pinpoint/utils/constants.js.map +0 -1
  389. package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.js.map +0 -1
  390. package/lib-esm/inAppMessaging/providers/pinpoint/utils/index.js.map +0 -1
  391. package/lib-esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js.map +0 -1
  392. package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveConfig.js.map +0 -1
  393. package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js.map +0 -1
  394. package/lib-esm/inAppMessaging/providers/pinpoint/utils/userAgent.js.map +0 -1
  395. package/lib-esm/inAppMessaging/types/event.js.map +0 -1
  396. package/lib-esm/inAppMessaging/types/index.js.map +0 -1
  397. package/lib-esm/inAppMessaging/types/inputs.js.map +0 -1
  398. package/lib-esm/inAppMessaging/types/message.js.map +0 -1
  399. package/lib-esm/inAppMessaging/types/options.js.map +0 -1
  400. package/lib-esm/inAppMessaging/utils/index.js.map +0 -1
  401. package/lib-esm/inAppMessaging/utils/statusHelpers.js.map +0 -1
  402. package/lib-esm/index.js.map +0 -1
  403. package/lib-esm/pushNotifications/errors/PushNotificationError.js.map +0 -1
  404. package/lib-esm/pushNotifications/errors/errorHelpers.js.map +0 -1
  405. package/lib-esm/pushNotifications/errors/index.js.map +0 -1
  406. package/lib-esm/pushNotifications/index.js.map +0 -1
  407. package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.js.map +0 -1
  408. package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js.map +0 -1
  409. package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js.map +0 -1
  410. package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js.map +0 -1
  411. package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js.map +0 -1
  412. package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js.map +0 -1
  413. package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.js.map +0 -1
  414. package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.js.map +0 -1
  415. package/lib-esm/pushNotifications/providers/pinpoint/apis/index.js.map +0 -1
  416. package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js.map +0 -1
  417. package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js.map +0 -1
  418. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js.map +0 -1
  419. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js.map +0 -1
  420. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js.map +0 -1
  421. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js.map +0 -1
  422. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js.map +0 -1
  423. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js.map +0 -1
  424. package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.js.map +0 -1
  425. package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js.map +0 -1
  426. package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.js.map +0 -1
  427. package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js.map +0 -1
  428. package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.js.map +0 -1
  429. package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js.map +0 -1
  430. package/lib-esm/pushNotifications/providers/pinpoint/index.js.map +0 -1
  431. package/lib-esm/pushNotifications/providers/pinpoint/types/analytics.js.map +0 -1
  432. package/lib-esm/pushNotifications/providers/pinpoint/types/apis.js.map +0 -1
  433. package/lib-esm/pushNotifications/providers/pinpoint/types/index.js.map +0 -1
  434. package/lib-esm/pushNotifications/providers/pinpoint/types/inputs.js.map +0 -1
  435. package/lib-esm/pushNotifications/providers/pinpoint/types/options.js.map +0 -1
  436. package/lib-esm/pushNotifications/providers/pinpoint/types/outputs.js.map +0 -1
  437. package/lib-esm/pushNotifications/providers/pinpoint/types/pushNotifications.js.map +0 -1
  438. package/lib-esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js.map +0 -1
  439. package/lib-esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js.map +0 -1
  440. package/lib-esm/pushNotifications/providers/pinpoint/utils/getChannelType.js.map +0 -1
  441. package/lib-esm/pushNotifications/providers/pinpoint/utils/getPushNotificationUserAgentString.js.map +0 -1
  442. package/lib-esm/pushNotifications/providers/pinpoint/utils/index.js.map +0 -1
  443. package/lib-esm/pushNotifications/types/errors.js.map +0 -1
  444. package/lib-esm/pushNotifications/types/index.js.map +0 -1
  445. package/lib-esm/pushNotifications/types/inputs.js.map +0 -1
  446. package/lib-esm/pushNotifications/types/options.js.map +0 -1
  447. package/lib-esm/pushNotifications/types/outputs.js.map +0 -1
  448. package/lib-esm/pushNotifications/types/pushNotifications.js.map +0 -1
  449. package/lib-esm/pushNotifications/utils/index.js.map +0 -1
  450. package/lib-esm/pushNotifications/utils/initializationManager.js.map +0 -1
  451. package/lib-esm/pushNotifications/utils/resolveConfig.js.map +0 -1
  452. package/lib-esm/pushNotifications/utils/resolveCredentials.js.map +0 -1
  453. package/lib-esm/pushNotifications/utils/tokenManager.js.map +0 -1
  454. /package/lib/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.d.ts +0 -0
  455. /package/lib/pushNotifications/{providers/pinpoint/utils → utils}/getPushNotificationUserAgentString.d.ts +0 -0
  456. /package/lib-esm/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.d.ts +0 -0
  457. /package/lib-esm/pushNotifications/{providers/pinpoint/utils → utils}/getPushNotificationUserAgentString.d.ts +0 -0
  458. /package/src/pushNotifications/{providers/pinpoint/utils → utils}/getPushNotificationUserAgentString.ts +0 -0
@@ -2,13 +2,15 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.addEventListener = exports.notifyEventListenersAndAwaitHandlers = exports.notifyEventListeners = void 0;
5
6
  const eventListeners = {};
6
- exports.notifyEventListeners = (type, ...args) => {
7
+ const notifyEventListeners = (type, ...args) => {
7
8
  eventListeners[type]?.forEach(listener => {
8
9
  listener.handleEvent(...args);
9
10
  });
10
11
  };
11
- exports.notifyEventListenersAndAwaitHandlers = (type, ...args) => Promise.all(Array.from(eventListeners[type] ?? []).map(async (listener) => {
12
+ exports.notifyEventListeners = notifyEventListeners;
13
+ const notifyEventListenersAndAwaitHandlers = (type, ...args) => Promise.all(Array.from(eventListeners[type] ?? []).map(async (listener) => {
12
14
  try {
13
15
  await listener.handleEvent(...args);
14
16
  }
@@ -16,7 +18,8 @@ exports.notifyEventListenersAndAwaitHandlers = (type, ...args) => Promise.all(Ar
16
18
  throw err;
17
19
  }
18
20
  }));
19
- exports.addEventListener = (type, handler) => {
21
+ exports.notifyEventListenersAndAwaitHandlers = notifyEventListenersAndAwaitHandlers;
22
+ const addEventListener = (type, handler) => {
20
23
  // If there is no listener set for the event type, just create it
21
24
  if (!eventListeners[type]) {
22
25
  eventListeners[type] = new Set();
@@ -32,4 +35,4 @@ exports.addEventListener = (type, handler) => {
32
35
  remove: () => listener.remove(),
33
36
  };
34
37
  };
35
- //# sourceMappingURL=eventListeners.js.map
38
+ exports.addEventListener = addEventListener;
@@ -2,8 +2,8 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.notifyEventListenersAndAwaitHandlers = exports.notifyEventListeners = exports.addEventListener = void 0;
5
6
  var eventListeners_1 = require("./eventListeners");
6
- exports.addEventListener = eventListeners_1.addEventListener;
7
- exports.notifyEventListeners = eventListeners_1.notifyEventListeners;
8
- exports.notifyEventListenersAndAwaitHandlers = eventListeners_1.notifyEventListenersAndAwaitHandlers;
9
- //# sourceMappingURL=index.js.map
7
+ Object.defineProperty(exports, "addEventListener", { enumerable: true, get: function () { return eventListeners_1.addEventListener; } });
8
+ Object.defineProperty(exports, "notifyEventListeners", { enumerable: true, get: function () { return eventListeners_1.notifyEventListeners; } });
9
+ Object.defineProperty(exports, "notifyEventListenersAndAwaitHandlers", { enumerable: true, get: function () { return eventListeners_1.notifyEventListenersAndAwaitHandlers; } });
@@ -4,7 +4,7 @@ export interface EventListener<EventHandler extends Function> {
4
4
  handleEvent: EventHandler;
5
5
  remove: () => void;
6
6
  }
7
- export declare type EventType = InAppMessageInteractionEvent | PushNotificationEvent;
8
- export declare type EventListenerRemover = {
7
+ export type EventType = InAppMessageInteractionEvent | PushNotificationEvent;
8
+ export type EventListenerRemover = {
9
9
  remove: () => void;
10
10
  };
@@ -2,4 +2,3 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- //# sourceMappingURL=types.js.map
@@ -2,6 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.InAppMessagingError = void 0;
5
6
  const utils_1 = require("@aws-amplify/core/internals/utils");
6
7
  /**
7
8
  * @internal
@@ -16,4 +17,3 @@ class InAppMessagingError extends utils_1.AmplifyError {
16
17
  }
17
18
  }
18
19
  exports.InAppMessagingError = InAppMessagingError;
19
- //# sourceMappingURL=InAppMessagingError.js.map
@@ -2,6 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.assertServiceError = void 0;
5
6
  const utils_1 = require("@aws-amplify/core/internals/utils");
6
7
  const InAppMessagingError_1 = require("./InAppMessagingError");
7
8
  function assertServiceError(error) {
@@ -16,4 +17,3 @@ function assertServiceError(error) {
16
17
  }
17
18
  }
18
19
  exports.assertServiceError = assertServiceError;
19
- //# sourceMappingURL=assertServiceError.js.map
@@ -2,6 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.assertValidationError = void 0;
5
6
  const InAppMessagingError_1 = require("./InAppMessagingError");
6
7
  const validation_1 = require("./validation");
7
8
  /**
@@ -14,4 +15,3 @@ function assertValidationError(assertion, name) {
14
15
  }
15
16
  }
16
17
  exports.assertValidationError = assertValidationError;
17
- //# sourceMappingURL=assertValidationError.js.map
@@ -2,13 +2,13 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.validationErrorMap = exports.InAppMessagingValidationErrorCode = exports.assertServiceError = exports.assertValidationError = exports.InAppMessagingError = void 0;
5
6
  var InAppMessagingError_1 = require("./InAppMessagingError");
6
- exports.InAppMessagingError = InAppMessagingError_1.InAppMessagingError;
7
+ Object.defineProperty(exports, "InAppMessagingError", { enumerable: true, get: function () { return InAppMessagingError_1.InAppMessagingError; } });
7
8
  var assertValidationError_1 = require("./assertValidationError");
8
- exports.assertValidationError = assertValidationError_1.assertValidationError;
9
+ Object.defineProperty(exports, "assertValidationError", { enumerable: true, get: function () { return assertValidationError_1.assertValidationError; } });
9
10
  var assertServiceError_1 = require("./assertServiceError");
10
- exports.assertServiceError = assertServiceError_1.assertServiceError;
11
+ Object.defineProperty(exports, "assertServiceError", { enumerable: true, get: function () { return assertServiceError_1.assertServiceError; } });
11
12
  var validation_1 = require("./validation");
12
- exports.InAppMessagingValidationErrorCode = validation_1.InAppMessagingValidationErrorCode;
13
- exports.validationErrorMap = validation_1.validationErrorMap;
14
- //# sourceMappingURL=index.js.map
13
+ Object.defineProperty(exports, "InAppMessagingValidationErrorCode", { enumerable: true, get: function () { return validation_1.InAppMessagingValidationErrorCode; } });
14
+ Object.defineProperty(exports, "validationErrorMap", { enumerable: true, get: function () { return validation_1.validationErrorMap; } });
@@ -2,6 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.validationErrorMap = exports.InAppMessagingValidationErrorCode = void 0;
5
6
  var InAppMessagingValidationErrorCode;
6
7
  (function (InAppMessagingValidationErrorCode) {
7
8
  InAppMessagingValidationErrorCode["NoAppId"] = "NoAppId";
@@ -24,4 +25,3 @@ exports.validationErrorMap = {
24
25
  recoverySuggestion: 'Please make sure to first call `initializePushNotifications`.',
25
26
  },
26
27
  };
27
- //# sourceMappingURL=validation.js.map
@@ -1,2 +1,2 @@
1
- export { identifyUser, syncMessages, dispatchEvent, setConflictHandler, initializeInAppMessaging, onMessageReceived, onMessageDisplayed, onMessageDismissed, onMessageActionTaken, notifyMessageInteraction, IdentifyUserInput, DispatchEventInput, SetConflictHandlerInput, OnMessageActionTakenInput, OnMessageDismissedInput, OnMessageDisplayedInput, OnMessageReceivedInput, NotifyMessageInteractionInput, OnMessageReceivedOutput, OnMessageActionTakenOutput, OnMessageDismissedOutput, OnMessageDisplayedOutput, } from './providers/pinpoint';
1
+ export { identifyUser, syncMessages, dispatchEvent, setConflictHandler, initializeInAppMessaging, onMessageReceived, onMessageDisplayed, onMessageDismissed, onMessageActionTaken, notifyMessageInteraction, clearMessages, IdentifyUserInput, DispatchEventInput, SetConflictHandlerInput, OnMessageActionTakenInput, OnMessageDismissedInput, OnMessageDisplayedInput, OnMessageReceivedInput, NotifyMessageInteractionInput, OnMessageReceivedOutput, OnMessageActionTakenOutput, OnMessageDismissedOutput, OnMessageDisplayedOutput, } from './providers/pinpoint';
2
2
  export { InAppMessage, InAppMessageAction, InAppMessageContent, InAppMessageLayout, InAppMessageTextAlign, InAppMessageButton, InAppMessageImage, InAppMessageStyle, } from './types';
@@ -2,15 +2,16 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.clearMessages = exports.notifyMessageInteraction = exports.onMessageActionTaken = exports.onMessageDismissed = exports.onMessageDisplayed = exports.onMessageReceived = exports.initializeInAppMessaging = exports.setConflictHandler = exports.dispatchEvent = exports.syncMessages = exports.identifyUser = void 0;
5
6
  var pinpoint_1 = require("./providers/pinpoint");
6
- exports.identifyUser = pinpoint_1.identifyUser;
7
- exports.syncMessages = pinpoint_1.syncMessages;
8
- exports.dispatchEvent = pinpoint_1.dispatchEvent;
9
- exports.setConflictHandler = pinpoint_1.setConflictHandler;
10
- exports.initializeInAppMessaging = pinpoint_1.initializeInAppMessaging;
11
- exports.onMessageReceived = pinpoint_1.onMessageReceived;
12
- exports.onMessageDisplayed = pinpoint_1.onMessageDisplayed;
13
- exports.onMessageDismissed = pinpoint_1.onMessageDismissed;
14
- exports.onMessageActionTaken = pinpoint_1.onMessageActionTaken;
15
- exports.notifyMessageInteraction = pinpoint_1.notifyMessageInteraction;
16
- //# sourceMappingURL=index.js.map
7
+ Object.defineProperty(exports, "identifyUser", { enumerable: true, get: function () { return pinpoint_1.identifyUser; } });
8
+ Object.defineProperty(exports, "syncMessages", { enumerable: true, get: function () { return pinpoint_1.syncMessages; } });
9
+ Object.defineProperty(exports, "dispatchEvent", { enumerable: true, get: function () { return pinpoint_1.dispatchEvent; } });
10
+ Object.defineProperty(exports, "setConflictHandler", { enumerable: true, get: function () { return pinpoint_1.setConflictHandler; } });
11
+ Object.defineProperty(exports, "initializeInAppMessaging", { enumerable: true, get: function () { return pinpoint_1.initializeInAppMessaging; } });
12
+ Object.defineProperty(exports, "onMessageReceived", { enumerable: true, get: function () { return pinpoint_1.onMessageReceived; } });
13
+ Object.defineProperty(exports, "onMessageDisplayed", { enumerable: true, get: function () { return pinpoint_1.onMessageDisplayed; } });
14
+ Object.defineProperty(exports, "onMessageDismissed", { enumerable: true, get: function () { return pinpoint_1.onMessageDismissed; } });
15
+ Object.defineProperty(exports, "onMessageActionTaken", { enumerable: true, get: function () { return pinpoint_1.onMessageActionTaken; } });
16
+ Object.defineProperty(exports, "notifyMessageInteraction", { enumerable: true, get: function () { return pinpoint_1.notifyMessageInteraction; } });
17
+ Object.defineProperty(exports, "clearMessages", { enumerable: true, get: function () { return pinpoint_1.clearMessages; } });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Clear locally cached messages.
3
+ *
4
+ * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown if In App messaging hasn't been initialized.
5
+ * @returns A promise that will resolve when the operation is complete.
6
+ * @example
7
+ * ```ts
8
+ * // Clear locally cached messages.
9
+ * await clearMessages();
10
+ *
11
+ * ```
12
+ */
13
+ export declare function clearMessages(): Promise<void>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.clearMessages = void 0;
6
+ const core_1 = require("@aws-amplify/core");
7
+ const utils_1 = require("../utils");
8
+ const utils_2 = require("../../../utils");
9
+ /**
10
+ * Clear locally cached messages.
11
+ *
12
+ * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown if In App messaging hasn't been initialized.
13
+ * @returns A promise that will resolve when the operation is complete.
14
+ * @example
15
+ * ```ts
16
+ * // Clear locally cached messages.
17
+ * await clearMessages();
18
+ *
19
+ * ```
20
+ */
21
+ async function clearMessages() {
22
+ (0, utils_2.assertIsInitialized)();
23
+ const key = `${utils_1.PINPOINT_KEY_PREFIX}${utils_1.STORAGE_KEY_SUFFIX}`;
24
+ return await core_1.defaultStorage.removeItem(key);
25
+ }
26
+ exports.clearMessages = clearMessages;
@@ -1,10 +1,13 @@
1
1
  "use strict";
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
+ var __importDefault = (this && this.__importDefault) || function (mod) {
5
+ return (mod && mod.__esModule) ? mod : { "default": mod };
6
+ };
4
7
  Object.defineProperty(exports, "__esModule", { value: true });
5
- const tslib_1 = require("tslib");
8
+ exports.dispatchEvent = void 0;
6
9
  const utils_1 = require("../utils");
7
- const flatten_1 = tslib_1.__importDefault(require("lodash/flatten"));
10
+ const flatten_1 = __importDefault(require("lodash/flatten"));
8
11
  const core_1 = require("@aws-amplify/core");
9
12
  const eventListeners_1 = require("../../../../eventListeners");
10
13
  const errors_1 = require("../../../errors");
@@ -35,20 +38,19 @@ const utils_2 = require("../../../utils");
35
38
  * ```
36
39
  */
37
40
  async function dispatchEvent(input) {
38
- utils_2.assertIsInitialized();
41
+ (0, utils_2.assertIsInitialized)();
39
42
  try {
40
43
  const key = `${utils_1.PINPOINT_KEY_PREFIX}${utils_1.STORAGE_KEY_SUFFIX}`;
41
44
  const cachedMessages = await core_1.defaultStorage.getItem(key);
42
- const messages = await utils_1.processInAppMessages(cachedMessages ? JSON.parse(cachedMessages) : [], input);
43
- const flattenedMessages = flatten_1.default(messages);
45
+ const messages = await (0, utils_1.processInAppMessages)(cachedMessages ? JSON.parse(cachedMessages) : [], input);
46
+ const flattenedMessages = (0, flatten_1.default)(messages);
44
47
  if (flattenedMessages.length > 0) {
45
- eventListeners_1.notifyEventListeners('messageReceived', setConflictHandler_1.conflictHandler(flattenedMessages));
48
+ (0, eventListeners_1.notifyEventListeners)('messageReceived', (0, setConflictHandler_1.conflictHandler)(flattenedMessages));
46
49
  }
47
50
  }
48
51
  catch (error) {
49
- errors_1.assertServiceError(error);
52
+ (0, errors_1.assertServiceError)(error);
50
53
  throw error;
51
54
  }
52
55
  }
53
56
  exports.dispatchEvent = dispatchEvent;
54
- //# sourceMappingURL=dispatchEvent.js.map
@@ -1,3 +1,4 @@
1
+ import { IdentifyUserInput } from '../types';
1
2
  /**
2
3
  * Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user
3
4
  * profile and activities or actions in your application. Activity can be tracked across devices & platforms by using
@@ -47,4 +48,4 @@
47
48
  * },
48
49
  * });
49
50
  */
50
- export declare const identifyUser: ({ userId, userProfile, options, }: import("../../../types").InAppMessagingIdentifyUserInput<import("@aws-amplify/core/lib-esm/providers/pinpoint").PinpointServiceOptions>) => Promise<void>;
51
+ export declare const identifyUser: ({ userId, userProfile, options, }: IdentifyUserInput) => Promise<void>;
@@ -2,6 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.identifyUser = void 0;
5
6
  const utils_1 = require("@aws-amplify/core/internals/utils");
6
7
  const pinpoint_1 = require("@aws-amplify/core/internals/providers/pinpoint");
7
8
  const utils_2 = require("../utils");
@@ -55,12 +56,12 @@ const utils_3 = require("../../../utils");
55
56
  * },
56
57
  * });
57
58
  */
58
- exports.identifyUser = async ({ userId, userProfile, options, }) => {
59
- utils_3.assertIsInitialized();
60
- const { credentials, identityId } = await utils_2.resolveCredentials();
61
- const { appId, region } = utils_2.resolveConfig();
59
+ const identifyUser = async ({ userId, userProfile, options, }) => {
60
+ (0, utils_3.assertIsInitialized)();
61
+ const { credentials, identityId } = await (0, utils_2.resolveCredentials)();
62
+ const { appId, region } = (0, utils_2.resolveConfig)();
62
63
  const { address, optOut, userAttributes } = options ?? {};
63
- pinpoint_1.updateEndpoint({
64
+ (0, pinpoint_1.updateEndpoint)({
64
65
  address,
65
66
  channelType: utils_2.CHANNEL_TYPE,
66
67
  optOut,
@@ -72,7 +73,7 @@ exports.identifyUser = async ({ userId, userProfile, options, }) => {
72
73
  userAttributes,
73
74
  userId,
74
75
  userProfile,
75
- userAgentValue: utils_2.getInAppMessagingUserAgentString(utils_1.InAppMessagingAction.IdentifyUser),
76
+ userAgentValue: (0, utils_2.getInAppMessagingUserAgentString)(utils_1.InAppMessagingAction.IdentifyUser),
76
77
  });
77
78
  };
78
- //# sourceMappingURL=identifyUser.js.map
79
+ exports.identifyUser = identifyUser;
@@ -8,3 +8,4 @@ export { onMessageDismissed } from './onMessageDismissed';
8
8
  export { onMessageDisplayed } from './onMessageDisplayed';
9
9
  export { onMessageActionTaken } from './onMessageActionTaken';
10
10
  export { notifyMessageInteraction } from './notifyMessageInteraction';
11
+ export { clearMessages } from './clearMessages';
@@ -2,24 +2,26 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.clearMessages = exports.notifyMessageInteraction = exports.onMessageActionTaken = exports.onMessageDisplayed = exports.onMessageDismissed = exports.onMessageReceived = exports.initializeInAppMessaging = exports.setConflictHandler = exports.dispatchEvent = exports.syncMessages = exports.identifyUser = void 0;
5
6
  var identifyUser_1 = require("./identifyUser");
6
- exports.identifyUser = identifyUser_1.identifyUser;
7
+ Object.defineProperty(exports, "identifyUser", { enumerable: true, get: function () { return identifyUser_1.identifyUser; } });
7
8
  var syncMessages_1 = require("./syncMessages");
8
- exports.syncMessages = syncMessages_1.syncMessages;
9
+ Object.defineProperty(exports, "syncMessages", { enumerable: true, get: function () { return syncMessages_1.syncMessages; } });
9
10
  var dispatchEvent_1 = require("./dispatchEvent");
10
- exports.dispatchEvent = dispatchEvent_1.dispatchEvent;
11
+ Object.defineProperty(exports, "dispatchEvent", { enumerable: true, get: function () { return dispatchEvent_1.dispatchEvent; } });
11
12
  var setConflictHandler_1 = require("./setConflictHandler");
12
- exports.setConflictHandler = setConflictHandler_1.setConflictHandler;
13
+ Object.defineProperty(exports, "setConflictHandler", { enumerable: true, get: function () { return setConflictHandler_1.setConflictHandler; } });
13
14
  var initializeInAppMessaging_1 = require("./initializeInAppMessaging");
14
- exports.initializeInAppMessaging = initializeInAppMessaging_1.initializeInAppMessaging;
15
+ Object.defineProperty(exports, "initializeInAppMessaging", { enumerable: true, get: function () { return initializeInAppMessaging_1.initializeInAppMessaging; } });
15
16
  var onMessageReceived_1 = require("./onMessageReceived");
16
- exports.onMessageReceived = onMessageReceived_1.onMessageReceived;
17
+ Object.defineProperty(exports, "onMessageReceived", { enumerable: true, get: function () { return onMessageReceived_1.onMessageReceived; } });
17
18
  var onMessageDismissed_1 = require("./onMessageDismissed");
18
- exports.onMessageDismissed = onMessageDismissed_1.onMessageDismissed;
19
+ Object.defineProperty(exports, "onMessageDismissed", { enumerable: true, get: function () { return onMessageDismissed_1.onMessageDismissed; } });
19
20
  var onMessageDisplayed_1 = require("./onMessageDisplayed");
20
- exports.onMessageDisplayed = onMessageDisplayed_1.onMessageDisplayed;
21
+ Object.defineProperty(exports, "onMessageDisplayed", { enumerable: true, get: function () { return onMessageDisplayed_1.onMessageDisplayed; } });
21
22
  var onMessageActionTaken_1 = require("./onMessageActionTaken");
22
- exports.onMessageActionTaken = onMessageActionTaken_1.onMessageActionTaken;
23
+ Object.defineProperty(exports, "onMessageActionTaken", { enumerable: true, get: function () { return onMessageActionTaken_1.onMessageActionTaken; } });
23
24
  var notifyMessageInteraction_1 = require("./notifyMessageInteraction");
24
- exports.notifyMessageInteraction = notifyMessageInteraction_1.notifyMessageInteraction;
25
- //# sourceMappingURL=index.js.map
25
+ Object.defineProperty(exports, "notifyMessageInteraction", { enumerable: true, get: function () { return notifyMessageInteraction_1.notifyMessageInteraction; } });
26
+ var clearMessages_1 = require("./clearMessages");
27
+ Object.defineProperty(exports, "clearMessages", { enumerable: true, get: function () { return clearMessages_1.clearMessages; } });
@@ -2,6 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.initializeInAppMessaging = void 0;
5
6
  const utils_1 = require("@aws-amplify/core/internals/utils");
6
7
  const eventListeners_1 = require("../../../../eventListeners");
7
8
  const helpers_1 = require("../utils/helpers");
@@ -22,36 +23,35 @@ const utils_3 = require("../../../utils");
22
23
  * ```
23
24
  */
24
25
  function initializeInAppMessaging() {
25
- if (utils_3.isInitialized()) {
26
+ if ((0, utils_3.isInitialized)()) {
26
27
  return;
27
28
  }
28
29
  // register with the session listener
29
30
  utils_1.sessionListener.addStateChangeListener(utils_2.sessionStateChangeHandler, true);
30
31
  // wire up default Pinpoint message event handling
31
- eventListeners_1.addEventListener('messageDisplayed', (message) => {
32
- helpers_1.recordAnalyticsEvent(types_1.PinpointMessageEvent.MESSAGE_DISPLAYED, message);
33
- utils_2.incrementMessageCounts(message.id);
32
+ (0, eventListeners_1.addEventListener)('messageDisplayed', (message) => {
33
+ (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_DISPLAYED, message);
34
+ (0, utils_2.incrementMessageCounts)(message.id);
34
35
  });
35
- eventListeners_1.addEventListener('messageDismissed', (message) => {
36
- helpers_1.recordAnalyticsEvent(types_1.PinpointMessageEvent.MESSAGE_DISMISSED, message);
36
+ (0, eventListeners_1.addEventListener)('messageDismissed', (message) => {
37
+ (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_DISMISSED, message);
37
38
  });
38
- eventListeners_1.addEventListener('messageActionTaken', (message) => {
39
- helpers_1.recordAnalyticsEvent(types_1.PinpointMessageEvent.MESSAGE_ACTION_TAKEN, message);
39
+ (0, eventListeners_1.addEventListener)('messageActionTaken', (message) => {
40
+ (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_ACTION_TAKEN, message);
40
41
  });
41
42
  // listen to analytics hub events
42
43
  core_1.Hub.listen('analytics', analyticsListener);
43
- utils_3.initialize();
44
+ (0, utils_3.initialize)();
44
45
  }
45
46
  exports.initializeInAppMessaging = initializeInAppMessaging;
46
47
  function analyticsListener({ payload, }) {
47
48
  const { event, data } = payload;
48
49
  switch (event) {
49
50
  case 'record': {
50
- dispatchEvent_1.dispatchEvent(data);
51
+ (0, dispatchEvent_1.dispatchEvent)(data);
51
52
  break;
52
53
  }
53
54
  default:
54
55
  break;
55
56
  }
56
57
  }
57
- //# sourceMappingURL=initializeInAppMessaging.js.map
@@ -2,6 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.notifyMessageInteraction = void 0;
5
6
  const eventListeners_1 = require("../../../../eventListeners");
6
7
  const utils_1 = require("../../../utils");
7
8
  /**
@@ -19,8 +20,7 @@ const utils_1 = require("../../../utils");
19
20
  * ```
20
21
  */
21
22
  function notifyMessageInteraction({ type, message, }) {
22
- utils_1.assertIsInitialized();
23
- eventListeners_1.notifyEventListeners(type, message);
23
+ (0, utils_1.assertIsInitialized)();
24
+ (0, eventListeners_1.notifyEventListeners)(type, message);
24
25
  }
25
26
  exports.notifyMessageInteraction = notifyMessageInteraction;
26
- //# sourceMappingURL=notifyMessageInteraction.js.map
@@ -2,6 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.onMessageActionTaken = void 0;
5
6
  const eventListeners_1 = require("../../../../eventListeners");
6
7
  const utils_1 = require("../../../utils");
7
8
  /**
@@ -20,8 +21,7 @@ const utils_1 = require("../../../utils");
20
21
  * ```
21
22
  */
22
23
  function onMessageActionTaken(input) {
23
- utils_1.assertIsInitialized();
24
- return eventListeners_1.addEventListener('messageActionTaken', input);
24
+ (0, utils_1.assertIsInitialized)();
25
+ return (0, eventListeners_1.addEventListener)('messageActionTaken', input);
25
26
  }
26
27
  exports.onMessageActionTaken = onMessageActionTaken;
27
- //# sourceMappingURL=onMessageActionTaken.js.map
@@ -2,6 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.onMessageDismissed = void 0;
5
6
  const eventListeners_1 = require("../../../../eventListeners");
6
7
  const utils_1 = require("../../../utils");
7
8
  /**
@@ -20,8 +21,7 @@ const utils_1 = require("../../../utils");
20
21
  * ```
21
22
  */
22
23
  function onMessageDismissed(input) {
23
- utils_1.assertIsInitialized();
24
- return eventListeners_1.addEventListener('messageDismissed', input);
24
+ (0, utils_1.assertIsInitialized)();
25
+ return (0, eventListeners_1.addEventListener)('messageDismissed', input);
25
26
  }
26
27
  exports.onMessageDismissed = onMessageDismissed;
27
- //# sourceMappingURL=onMessageDismissed.js.map
@@ -2,6 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.onMessageDisplayed = void 0;
5
6
  const eventListeners_1 = require("../../../../eventListeners");
6
7
  const utils_1 = require("../../../utils");
7
8
  /**
@@ -20,8 +21,7 @@ const utils_1 = require("../../../utils");
20
21
  * ```
21
22
  */
22
23
  function onMessageDisplayed(input) {
23
- utils_1.assertIsInitialized();
24
- return eventListeners_1.addEventListener('messageDisplayed', input);
24
+ (0, utils_1.assertIsInitialized)();
25
+ return (0, eventListeners_1.addEventListener)('messageDisplayed', input);
25
26
  }
26
27
  exports.onMessageDisplayed = onMessageDisplayed;
27
- //# sourceMappingURL=onMessageDisplayed.js.map
@@ -2,6 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.onMessageReceived = void 0;
5
6
  const eventListeners_1 = require("../../../../eventListeners");
6
7
  const utils_1 = require("../../../utils");
7
8
  /**
@@ -20,8 +21,7 @@ const utils_1 = require("../../../utils");
20
21
  * ```
21
22
  */
22
23
  function onMessageReceived(input) {
23
- utils_1.assertIsInitialized();
24
- return eventListeners_1.addEventListener('messageReceived', input);
24
+ (0, utils_1.assertIsInitialized)();
25
+ return (0, eventListeners_1.addEventListener)('messageReceived', input);
25
26
  }
26
27
  exports.onMessageReceived = onMessageReceived;
27
- //# sourceMappingURL=onMessageReceived.js.map
@@ -2,6 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.setConflictHandler = exports.conflictHandler = void 0;
5
6
  const utils_1 = require("../../../utils");
6
7
  exports.conflictHandler = defaultConflictHandler;
7
8
  /**
@@ -34,7 +35,7 @@ exports.conflictHandler = defaultConflictHandler;
34
35
  * ```
35
36
  */
36
37
  function setConflictHandler(input) {
37
- utils_1.assertIsInitialized();
38
+ (0, utils_1.assertIsInitialized)();
38
39
  exports.conflictHandler = input;
39
40
  }
40
41
  exports.setConflictHandler = setConflictHandler;
@@ -62,4 +63,3 @@ function defaultConflictHandler(messages) {
62
63
  // always return the top sorted
63
64
  return sorted[0];
64
65
  }
65
- //# sourceMappingURL=setConflictHandler.js.map
@@ -2,6 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.syncMessages = void 0;
5
6
  const utils_1 = require("@aws-amplify/core/internals/utils");
6
7
  const pinpoint_1 = require("@aws-amplify/core/internals/providers/pinpoint");
7
8
  const core_1 = require("@aws-amplify/core");
@@ -25,7 +26,7 @@ const utils_3 = require("../../../utils");
25
26
  * ```
26
27
  */
27
28
  async function syncMessages() {
28
- utils_3.assertIsInitialized();
29
+ (0, utils_3.assertIsInitialized)();
29
30
  const messages = await fetchInAppMessages();
30
31
  if (!messages || messages.length === 0) {
31
32
  return;
@@ -35,35 +36,34 @@ async function syncMessages() {
35
36
  await core_1.defaultStorage.setItem(key, JSON.stringify(messages));
36
37
  }
37
38
  catch (error) {
38
- errors_1.assertServiceError(error);
39
+ (0, errors_1.assertServiceError)(error);
39
40
  throw error;
40
41
  }
41
42
  }
42
43
  exports.syncMessages = syncMessages;
43
44
  async function fetchInAppMessages() {
44
45
  try {
45
- const { credentials, identityId } = await utils_2.resolveCredentials();
46
- const { appId, region } = utils_2.resolveConfig();
47
- const endpointId = await pinpoint_1.resolveEndpointId({
46
+ const { credentials, identityId } = await (0, utils_2.resolveCredentials)();
47
+ const { appId, region } = (0, utils_2.resolveConfig)();
48
+ const endpointId = await (0, pinpoint_1.resolveEndpointId)({
48
49
  appId,
49
50
  category: utils_2.CATEGORY,
50
51
  channelType: utils_2.CHANNEL_TYPE,
51
52
  credentials,
52
53
  identityId,
53
54
  region,
54
- userAgentValue: utils_2.getInAppMessagingUserAgentString(utils_1.InAppMessagingAction.SyncMessages),
55
+ userAgentValue: (0, utils_2.getInAppMessagingUserAgentString)(utils_1.InAppMessagingAction.SyncMessages),
55
56
  });
56
57
  const input = {
57
58
  ApplicationId: appId,
58
59
  EndpointId: endpointId,
59
60
  };
60
- const response = await pinpoint_2.getInAppMessages({ credentials, region }, input);
61
+ const response = await (0, pinpoint_2.getInAppMessages)({ credentials, region }, input);
61
62
  const { InAppMessageCampaigns: messages } = response.InAppMessagesResponse ?? {};
62
63
  return messages;
63
64
  }
64
65
  catch (error) {
65
- errors_1.assertServiceError(error);
66
+ (0, errors_1.assertServiceError)(error);
66
67
  throw error;
67
68
  }
68
69
  }
69
- //# sourceMappingURL=syncMessages.js.map
@@ -1,2 +1,2 @@
1
- export { identifyUser, syncMessages, dispatchEvent, setConflictHandler, initializeInAppMessaging, onMessageReceived, onMessageDisplayed, onMessageDismissed, onMessageActionTaken, notifyMessageInteraction, } from './apis';
1
+ export { identifyUser, syncMessages, dispatchEvent, setConflictHandler, initializeInAppMessaging, onMessageReceived, onMessageDisplayed, onMessageDismissed, onMessageActionTaken, notifyMessageInteraction, clearMessages, } from './apis';
2
2
  export { IdentifyUserInput, DispatchEventInput, SetConflictHandlerInput, OnMessageActionTakenInput, OnMessageDismissedInput, OnMessageDisplayedInput, OnMessageReceivedInput, NotifyMessageInteractionInput, OnMessageReceivedOutput, OnMessageActionTakenOutput, OnMessageDismissedOutput, OnMessageDisplayedOutput, } from './types';