@aws-amplify/notifications 0.0.0-changesets-preid-f620002-20260129130740

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 (581) hide show
  1. package/README.md +3 -0
  2. package/dist/cjs/eventListeners/eventListeners.js +37 -0
  3. package/dist/cjs/eventListeners/eventListeners.js.map +1 -0
  4. package/dist/cjs/eventListeners/index.js +11 -0
  5. package/dist/cjs/eventListeners/index.js.map +1 -0
  6. package/dist/cjs/eventListeners/types.js +6 -0
  7. package/dist/cjs/eventListeners/types.js.map +1 -0
  8. package/dist/cjs/inAppMessaging/errors/InAppMessagingError.js +21 -0
  9. package/dist/cjs/inAppMessaging/errors/InAppMessagingError.js.map +1 -0
  10. package/dist/cjs/inAppMessaging/errors/assertServiceError.js +20 -0
  11. package/dist/cjs/inAppMessaging/errors/assertServiceError.js.map +1 -0
  12. package/dist/cjs/inAppMessaging/errors/assertValidationError.js +18 -0
  13. package/dist/cjs/inAppMessaging/errors/assertValidationError.js.map +1 -0
  14. package/dist/cjs/inAppMessaging/errors/index.js +16 -0
  15. package/dist/cjs/inAppMessaging/errors/index.js.map +1 -0
  16. package/dist/cjs/inAppMessaging/errors/validation.js +29 -0
  17. package/dist/cjs/inAppMessaging/errors/validation.js.map +1 -0
  18. package/dist/cjs/inAppMessaging/index.js +19 -0
  19. package/dist/cjs/inAppMessaging/index.js.map +1 -0
  20. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/clearMessages.js +29 -0
  21. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/clearMessages.js.map +1 -0
  22. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js +60 -0
  23. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js.map +1 -0
  24. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/identifyUser.js +84 -0
  25. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/identifyUser.js.map +1 -0
  26. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/index.js +29 -0
  27. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/index.js.map +1 -0
  28. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +58 -0
  29. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js.map +1 -0
  30. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +29 -0
  31. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js.map +1 -0
  32. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js +30 -0
  33. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js.map +1 -0
  34. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js +30 -0
  35. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js.map +1 -0
  36. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js +30 -0
  37. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js.map +1 -0
  38. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js +30 -0
  39. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js.map +1 -0
  40. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +47 -0
  41. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js.map +1 -0
  42. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/syncMessages.js +72 -0
  43. package/dist/cjs/inAppMessaging/providers/pinpoint/apis/syncMessages.js.map +1 -0
  44. package/dist/cjs/inAppMessaging/providers/pinpoint/index.js +19 -0
  45. package/dist/cjs/inAppMessaging/providers/pinpoint/index.js.map +1 -0
  46. package/dist/cjs/inAppMessaging/providers/pinpoint/types/index.js +9 -0
  47. package/dist/cjs/inAppMessaging/providers/pinpoint/types/index.js.map +1 -0
  48. package/dist/cjs/inAppMessaging/providers/pinpoint/types/inputs.js +6 -0
  49. package/dist/cjs/inAppMessaging/providers/pinpoint/types/inputs.js.map +1 -0
  50. package/dist/cjs/inAppMessaging/providers/pinpoint/types/options.js +6 -0
  51. package/dist/cjs/inAppMessaging/providers/pinpoint/types/options.js.map +1 -0
  52. package/dist/cjs/inAppMessaging/providers/pinpoint/types/outputs.js +6 -0
  53. package/dist/cjs/inAppMessaging/providers/pinpoint/types/outputs.js.map +1 -0
  54. package/dist/cjs/inAppMessaging/providers/pinpoint/types/types.js +13 -0
  55. package/dist/cjs/inAppMessaging/providers/pinpoint/types/types.js.map +1 -0
  56. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/conflictHandlerManager.js +50 -0
  57. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/conflictHandlerManager.js.map +1 -0
  58. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/constants.js +11 -0
  59. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/constants.js.map +1 -0
  60. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/helpers.js +296 -0
  61. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/helpers.js.map +1 -0
  62. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/index.js +25 -0
  63. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/index.js.map +1 -0
  64. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js +169 -0
  65. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js.map +1 -0
  66. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/resolveConfig.js +19 -0
  67. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/resolveConfig.js.map +1 -0
  68. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js +18 -0
  69. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js.map +1 -0
  70. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/userAgent.js +21 -0
  71. package/dist/cjs/inAppMessaging/providers/pinpoint/utils/userAgent.js.map +1 -0
  72. package/dist/cjs/inAppMessaging/types/event.js +6 -0
  73. package/dist/cjs/inAppMessaging/types/event.js.map +1 -0
  74. package/dist/cjs/inAppMessaging/types/index.js +6 -0
  75. package/dist/cjs/inAppMessaging/types/index.js.map +1 -0
  76. package/dist/cjs/inAppMessaging/types/inputs.js +6 -0
  77. package/dist/cjs/inAppMessaging/types/inputs.js.map +1 -0
  78. package/dist/cjs/inAppMessaging/types/message.js +6 -0
  79. package/dist/cjs/inAppMessaging/types/message.js.map +1 -0
  80. package/dist/cjs/inAppMessaging/types/options.js +6 -0
  81. package/dist/cjs/inAppMessaging/types/options.js.map +1 -0
  82. package/dist/cjs/inAppMessaging/utils/index.js +11 -0
  83. package/dist/cjs/inAppMessaging/utils/index.js.map +1 -0
  84. package/dist/cjs/inAppMessaging/utils/statusHelpers.js +29 -0
  85. package/dist/cjs/inAppMessaging/utils/statusHelpers.js.map +1 -0
  86. package/dist/cjs/index.js +3 -0
  87. package/dist/cjs/index.js.map +1 -0
  88. package/dist/cjs/pushNotifications/errors/PushNotificationError.js +18 -0
  89. package/dist/cjs/pushNotifications/errors/PushNotificationError.js.map +1 -0
  90. package/dist/cjs/pushNotifications/errors/errorHelpers.js +37 -0
  91. package/dist/cjs/pushNotifications/errors/errorHelpers.js.map +1 -0
  92. package/dist/cjs/pushNotifications/errors/index.js +12 -0
  93. package/dist/cjs/pushNotifications/errors/index.js.map +1 -0
  94. package/dist/cjs/pushNotifications/index.js +21 -0
  95. package/dist/cjs/pushNotifications/index.js.map +1 -0
  96. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getBadgeCount.js +26 -0
  97. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getBadgeCount.js.map +1 -0
  98. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js +15 -0
  99. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js.map +1 -0
  100. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js +30 -0
  101. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js.map +1 -0
  102. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js +15 -0
  103. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js.map +1 -0
  104. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js +39 -0
  105. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js.map +1 -0
  106. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js +15 -0
  107. package/dist/cjs/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js.map +1 -0
  108. package/dist/cjs/pushNotifications/providers/pinpoint/apis/identifyUser.js +65 -0
  109. package/dist/cjs/pushNotifications/providers/pinpoint/apis/identifyUser.js.map +1 -0
  110. package/dist/cjs/pushNotifications/providers/pinpoint/apis/identifyUser.native.js +37 -0
  111. package/dist/cjs/pushNotifications/providers/pinpoint/apis/identifyUser.native.js.map +1 -0
  112. package/dist/cjs/pushNotifications/providers/pinpoint/apis/index.js +29 -0
  113. package/dist/cjs/pushNotifications/providers/pinpoint/apis/index.js.map +1 -0
  114. package/dist/cjs/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js +29 -0
  115. package/dist/cjs/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js.map +1 -0
  116. package/dist/cjs/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js +153 -0
  117. package/dist/cjs/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js.map +1 -0
  118. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js +39 -0
  119. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js.map +1 -0
  120. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js +14 -0
  121. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js.map +1 -0
  122. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js +55 -0
  123. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js.map +1 -0
  124. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js +14 -0
  125. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js.map +1 -0
  126. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js +39 -0
  127. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js.map +1 -0
  128. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js +14 -0
  129. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js.map +1 -0
  130. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onTokenReceived.js +40 -0
  131. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onTokenReceived.js.map +1 -0
  132. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js +14 -0
  133. package/dist/cjs/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js.map +1 -0
  134. package/dist/cjs/pushNotifications/providers/pinpoint/apis/requestPermissions.js +44 -0
  135. package/dist/cjs/pushNotifications/providers/pinpoint/apis/requestPermissions.js.map +1 -0
  136. package/dist/cjs/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js +15 -0
  137. package/dist/cjs/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js.map +1 -0
  138. package/dist/cjs/pushNotifications/providers/pinpoint/apis/setBadgeCount.js +26 -0
  139. package/dist/cjs/pushNotifications/providers/pinpoint/apis/setBadgeCount.js.map +1 -0
  140. package/dist/cjs/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js +15 -0
  141. package/dist/cjs/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js.map +1 -0
  142. package/dist/cjs/pushNotifications/providers/pinpoint/index.js +19 -0
  143. package/dist/cjs/pushNotifications/providers/pinpoint/index.js.map +1 -0
  144. package/dist/cjs/pushNotifications/providers/pinpoint/types/analytics.js +6 -0
  145. package/dist/cjs/pushNotifications/providers/pinpoint/types/analytics.js.map +1 -0
  146. package/dist/cjs/pushNotifications/providers/pinpoint/types/apis.js +6 -0
  147. package/dist/cjs/pushNotifications/providers/pinpoint/types/apis.js.map +1 -0
  148. package/dist/cjs/pushNotifications/providers/pinpoint/types/index.js +6 -0
  149. package/dist/cjs/pushNotifications/providers/pinpoint/types/index.js.map +1 -0
  150. package/dist/cjs/pushNotifications/providers/pinpoint/types/inputs.js +6 -0
  151. package/dist/cjs/pushNotifications/providers/pinpoint/types/inputs.js.map +1 -0
  152. package/dist/cjs/pushNotifications/providers/pinpoint/types/options.js +6 -0
  153. package/dist/cjs/pushNotifications/providers/pinpoint/types/options.js.map +1 -0
  154. package/dist/cjs/pushNotifications/providers/pinpoint/types/outputs.js +6 -0
  155. package/dist/cjs/pushNotifications/providers/pinpoint/types/outputs.js.map +1 -0
  156. package/dist/cjs/pushNotifications/providers/pinpoint/types/pushNotifications.js +6 -0
  157. package/dist/cjs/pushNotifications/providers/pinpoint/types/pushNotifications.js.map +1 -0
  158. package/dist/cjs/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js +45 -0
  159. package/dist/cjs/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js.map +1 -0
  160. package/dist/cjs/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js +58 -0
  161. package/dist/cjs/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js.map +1 -0
  162. package/dist/cjs/pushNotifications/providers/pinpoint/utils/getChannelType.js +27 -0
  163. package/dist/cjs/pushNotifications/providers/pinpoint/utils/getChannelType.js.map +1 -0
  164. package/dist/cjs/pushNotifications/providers/pinpoint/utils/index.js +19 -0
  165. package/dist/cjs/pushNotifications/providers/pinpoint/utils/index.js.map +1 -0
  166. package/dist/cjs/pushNotifications/providers/pinpoint/utils/inflightDeviceRegistration.js +31 -0
  167. package/dist/cjs/pushNotifications/providers/pinpoint/utils/inflightDeviceRegistration.js.map +1 -0
  168. package/dist/cjs/pushNotifications/providers/pinpoint/utils/resolveConfig.js +19 -0
  169. package/dist/cjs/pushNotifications/providers/pinpoint/utils/resolveConfig.js.map +1 -0
  170. package/dist/cjs/pushNotifications/types/errors.js +11 -0
  171. package/dist/cjs/pushNotifications/types/errors.js.map +1 -0
  172. package/dist/cjs/pushNotifications/types/index.js +13 -0
  173. package/dist/cjs/pushNotifications/types/index.js.map +1 -0
  174. package/dist/cjs/pushNotifications/types/inputs.js +6 -0
  175. package/dist/cjs/pushNotifications/types/inputs.js.map +1 -0
  176. package/dist/cjs/pushNotifications/types/module.js +6 -0
  177. package/dist/cjs/pushNotifications/types/module.js.map +1 -0
  178. package/dist/cjs/pushNotifications/types/options.js +6 -0
  179. package/dist/cjs/pushNotifications/types/options.js.map +1 -0
  180. package/dist/cjs/pushNotifications/types/outputs.js +6 -0
  181. package/dist/cjs/pushNotifications/types/outputs.js.map +1 -0
  182. package/dist/cjs/pushNotifications/types/pushNotifications.js +6 -0
  183. package/dist/cjs/pushNotifications/types/pushNotifications.js.map +1 -0
  184. package/dist/cjs/pushNotifications/utils/getPushNotificationUserAgentString.js +13 -0
  185. package/dist/cjs/pushNotifications/utils/getPushNotificationUserAgentString.js.map +1 -0
  186. package/dist/cjs/pushNotifications/utils/index.js +17 -0
  187. package/dist/cjs/pushNotifications/utils/index.js.map +1 -0
  188. package/dist/cjs/pushNotifications/utils/initializationManager.js +24 -0
  189. package/dist/cjs/pushNotifications/utils/initializationManager.js.map +1 -0
  190. package/dist/cjs/pushNotifications/utils/resolveCredentials.js +18 -0
  191. package/dist/cjs/pushNotifications/utils/resolveCredentials.js.map +1 -0
  192. package/dist/cjs/pushNotifications/utils/tokenManager.js +24 -0
  193. package/dist/cjs/pushNotifications/utils/tokenManager.js.map +1 -0
  194. package/dist/esm/eventListeners/eventListeners.d.ts +4 -0
  195. package/dist/esm/eventListeners/eventListeners.mjs +32 -0
  196. package/dist/esm/eventListeners/eventListeners.mjs.map +1 -0
  197. package/dist/esm/eventListeners/index.d.ts +2 -0
  198. package/dist/esm/eventListeners/index.mjs +2 -0
  199. package/dist/esm/eventListeners/index.mjs.map +1 -0
  200. package/dist/esm/eventListeners/types.d.ts +11 -0
  201. package/dist/esm/eventListeners/types.mjs +2 -0
  202. package/dist/esm/eventListeners/types.mjs.map +1 -0
  203. package/dist/esm/inAppMessaging/errors/InAppMessagingError.d.ts +7 -0
  204. package/dist/esm/inAppMessaging/errors/InAppMessagingError.mjs +19 -0
  205. package/dist/esm/inAppMessaging/errors/InAppMessagingError.mjs.map +1 -0
  206. package/dist/esm/inAppMessaging/errors/assertServiceError.d.ts +2 -0
  207. package/dist/esm/inAppMessaging/errors/assertServiceError.mjs +19 -0
  208. package/dist/esm/inAppMessaging/errors/assertServiceError.mjs.map +1 -0
  209. package/dist/esm/inAppMessaging/errors/assertValidationError.d.ts +5 -0
  210. package/dist/esm/inAppMessaging/errors/assertValidationError.mjs +17 -0
  211. package/dist/esm/inAppMessaging/errors/assertValidationError.mjs.map +1 -0
  212. package/dist/esm/inAppMessaging/errors/index.d.ts +4 -0
  213. package/dist/esm/inAppMessaging/errors/index.mjs +5 -0
  214. package/dist/esm/inAppMessaging/errors/index.mjs.map +1 -0
  215. package/dist/esm/inAppMessaging/errors/validation.d.ts +8 -0
  216. package/dist/esm/inAppMessaging/errors/validation.mjs +27 -0
  217. package/dist/esm/inAppMessaging/errors/validation.mjs.map +1 -0
  218. package/dist/esm/inAppMessaging/index.d.ts +2 -0
  219. package/dist/esm/inAppMessaging/index.mjs +12 -0
  220. package/dist/esm/inAppMessaging/index.mjs.map +1 -0
  221. package/dist/esm/inAppMessaging/providers/pinpoint/apis/clearMessages.d.ts +15 -0
  222. package/dist/esm/inAppMessaging/providers/pinpoint/apis/clearMessages.mjs +31 -0
  223. package/dist/esm/inAppMessaging/providers/pinpoint/apis/clearMessages.mjs.map +1 -0
  224. package/dist/esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.d.ts +31 -0
  225. package/dist/esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.mjs +62 -0
  226. package/dist/esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.mjs.map +1 -0
  227. package/dist/esm/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +53 -0
  228. package/dist/esm/inAppMessaging/providers/pinpoint/apis/identifyUser.mjs +86 -0
  229. package/dist/esm/inAppMessaging/providers/pinpoint/apis/identifyUser.mjs.map +1 -0
  230. package/dist/esm/inAppMessaging/providers/pinpoint/apis/index.d.ts +11 -0
  231. package/dist/esm/inAppMessaging/providers/pinpoint/apis/index.mjs +12 -0
  232. package/dist/esm/inAppMessaging/providers/pinpoint/apis/index.mjs.map +1 -0
  233. package/dist/esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.d.ts +14 -0
  234. package/dist/esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.mjs +58 -0
  235. package/dist/esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.mjs.map +1 -0
  236. package/dist/esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.d.ts +18 -0
  237. package/dist/esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.mjs +28 -0
  238. package/dist/esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.mjs.map +1 -0
  239. package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.d.ts +20 -0
  240. package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.mjs +29 -0
  241. package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.mjs.map +1 -0
  242. package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.d.ts +20 -0
  243. package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.mjs +29 -0
  244. package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.mjs.map +1 -0
  245. package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.d.ts +20 -0
  246. package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.mjs +29 -0
  247. package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.mjs.map +1 -0
  248. package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.d.ts +20 -0
  249. package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.mjs +29 -0
  250. package/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.mjs.map +1 -0
  251. package/dist/esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.d.ts +36 -0
  252. package/dist/esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.mjs +50 -0
  253. package/dist/esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.mjs.map +1 -0
  254. package/dist/esm/inAppMessaging/providers/pinpoint/apis/syncMessages.d.ts +18 -0
  255. package/dist/esm/inAppMessaging/providers/pinpoint/apis/syncMessages.mjs +76 -0
  256. package/dist/esm/inAppMessaging/providers/pinpoint/apis/syncMessages.mjs.map +1 -0
  257. package/dist/esm/inAppMessaging/providers/pinpoint/index.d.ts +2 -0
  258. package/dist/esm/inAppMessaging/providers/pinpoint/index.mjs +12 -0
  259. package/dist/esm/inAppMessaging/providers/pinpoint/index.mjs.map +1 -0
  260. package/dist/esm/inAppMessaging/providers/pinpoint/types/index.d.ts +4 -0
  261. package/dist/esm/inAppMessaging/providers/pinpoint/types/index.mjs +2 -0
  262. package/dist/esm/inAppMessaging/providers/pinpoint/types/index.mjs.map +1 -0
  263. package/dist/esm/inAppMessaging/providers/pinpoint/types/inputs.d.ts +38 -0
  264. package/dist/esm/inAppMessaging/providers/pinpoint/types/inputs.mjs +2 -0
  265. package/dist/esm/inAppMessaging/providers/pinpoint/types/inputs.mjs.map +1 -0
  266. package/dist/esm/inAppMessaging/providers/pinpoint/types/options.d.ts +5 -0
  267. package/dist/esm/inAppMessaging/providers/pinpoint/types/options.mjs +2 -0
  268. package/dist/esm/inAppMessaging/providers/pinpoint/types/options.mjs.map +1 -0
  269. package/dist/esm/inAppMessaging/providers/pinpoint/types/outputs.d.ts +17 -0
  270. package/dist/esm/inAppMessaging/providers/pinpoint/types/outputs.mjs +2 -0
  271. package/dist/esm/inAppMessaging/providers/pinpoint/types/outputs.mjs.map +1 -0
  272. package/dist/esm/inAppMessaging/providers/pinpoint/types/types.d.ts +19 -0
  273. package/dist/esm/inAppMessaging/providers/pinpoint/types/types.mjs +11 -0
  274. package/dist/esm/inAppMessaging/providers/pinpoint/types/types.mjs.map +1 -0
  275. package/dist/esm/inAppMessaging/providers/pinpoint/utils/conflictHandlerManager.d.ts +13 -0
  276. package/dist/esm/inAppMessaging/providers/pinpoint/utils/conflictHandlerManager.mjs +46 -0
  277. package/dist/esm/inAppMessaging/providers/pinpoint/utils/conflictHandlerManager.mjs.map +1 -0
  278. package/dist/esm/inAppMessaging/providers/pinpoint/utils/constants.d.ts +4 -0
  279. package/dist/esm/inAppMessaging/providers/pinpoint/utils/constants.mjs +9 -0
  280. package/dist/esm/inAppMessaging/providers/pinpoint/utils/constants.mjs.map +1 -0
  281. package/dist/esm/inAppMessaging/providers/pinpoint/utils/helpers.d.ts +19 -0
  282. package/dist/esm/inAppMessaging/providers/pinpoint/utils/helpers.mjs +281 -0
  283. package/dist/esm/inAppMessaging/providers/pinpoint/utils/helpers.mjs.map +1 -0
  284. package/dist/esm/inAppMessaging/providers/pinpoint/utils/index.d.ts +6 -0
  285. package/dist/esm/inAppMessaging/providers/pinpoint/utils/index.mjs +7 -0
  286. package/dist/esm/inAppMessaging/providers/pinpoint/utils/index.mjs.map +1 -0
  287. package/dist/esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.d.ts +6 -0
  288. package/dist/esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.mjs +166 -0
  289. package/dist/esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.mjs.map +1 -0
  290. package/dist/esm/inAppMessaging/providers/pinpoint/utils/resolveConfig.d.ts +7 -0
  291. package/dist/esm/inAppMessaging/providers/pinpoint/utils/resolveConfig.mjs +19 -0
  292. package/dist/esm/inAppMessaging/providers/pinpoint/utils/resolveConfig.mjs.map +1 -0
  293. package/dist/esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.d.ts +7 -0
  294. package/dist/esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.mjs +18 -0
  295. package/dist/esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.mjs.map +1 -0
  296. package/dist/esm/inAppMessaging/providers/pinpoint/utils/userAgent.d.ts +4 -0
  297. package/dist/esm/inAppMessaging/providers/pinpoint/utils/userAgent.mjs +19 -0
  298. package/dist/esm/inAppMessaging/providers/pinpoint/utils/userAgent.mjs.map +1 -0
  299. package/dist/esm/inAppMessaging/types/event.d.ts +6 -0
  300. package/dist/esm/inAppMessaging/types/event.mjs +2 -0
  301. package/dist/esm/inAppMessaging/types/event.mjs.map +1 -0
  302. package/dist/esm/inAppMessaging/types/index.d.ts +4 -0
  303. package/dist/esm/inAppMessaging/types/index.mjs +2 -0
  304. package/dist/esm/inAppMessaging/types/index.mjs.map +1 -0
  305. package/dist/esm/inAppMessaging/types/inputs.d.ts +19 -0
  306. package/dist/esm/inAppMessaging/types/inputs.mjs +2 -0
  307. package/dist/esm/inAppMessaging/types/inputs.mjs.map +1 -0
  308. package/dist/esm/inAppMessaging/types/message.d.ts +45 -0
  309. package/dist/esm/inAppMessaging/types/message.mjs +2 -0
  310. package/dist/esm/inAppMessaging/types/message.mjs.map +1 -0
  311. package/dist/esm/inAppMessaging/types/options.d.ts +4 -0
  312. package/dist/esm/inAppMessaging/types/options.mjs +2 -0
  313. package/dist/esm/inAppMessaging/types/options.mjs.map +1 -0
  314. package/dist/esm/inAppMessaging/utils/index.d.ts +1 -0
  315. package/dist/esm/inAppMessaging/utils/index.mjs +2 -0
  316. package/dist/esm/inAppMessaging/utils/index.mjs.map +1 -0
  317. package/dist/esm/inAppMessaging/utils/statusHelpers.d.ts +13 -0
  318. package/dist/esm/inAppMessaging/utils/statusHelpers.mjs +27 -0
  319. package/dist/esm/inAppMessaging/utils/statusHelpers.mjs.map +1 -0
  320. package/dist/esm/index.mjs +2 -0
  321. package/dist/esm/index.mjs.map +1 -0
  322. package/dist/esm/pushNotifications/errors/PushNotificationError.d.ts +4 -0
  323. package/dist/esm/pushNotifications/errors/PushNotificationError.mjs +16 -0
  324. package/dist/esm/pushNotifications/errors/PushNotificationError.mjs.map +1 -0
  325. package/dist/esm/pushNotifications/errors/errorHelpers.d.ts +9 -0
  326. package/dist/esm/pushNotifications/errors/errorHelpers.mjs +35 -0
  327. package/dist/esm/pushNotifications/errors/errorHelpers.mjs.map +1 -0
  328. package/dist/esm/pushNotifications/errors/index.d.ts +2 -0
  329. package/dist/esm/pushNotifications/errors/index.mjs +3 -0
  330. package/dist/esm/pushNotifications/errors/index.mjs.map +1 -0
  331. package/dist/esm/pushNotifications/index.d.ts +3 -0
  332. package/dist/esm/pushNotifications/index.mjs +14 -0
  333. package/dist/esm/pushNotifications/index.mjs.map +1 -0
  334. package/dist/esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.d.ts +16 -0
  335. package/dist/esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.mjs +24 -0
  336. package/dist/esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.mjs.map +1 -0
  337. package/dist/esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.d.ts +2 -0
  338. package/dist/esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.mjs +13 -0
  339. package/dist/esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.mjs.map +1 -0
  340. package/dist/esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.d.ts +20 -0
  341. package/dist/esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.mjs +28 -0
  342. package/dist/esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.mjs.map +1 -0
  343. package/dist/esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.d.ts +2 -0
  344. package/dist/esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.mjs +13 -0
  345. package/dist/esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.mjs.map +1 -0
  346. package/dist/esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.d.ts +29 -0
  347. package/dist/esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.mjs +37 -0
  348. package/dist/esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.mjs.map +1 -0
  349. package/dist/esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.d.ts +2 -0
  350. package/dist/esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.mjs +13 -0
  351. package/dist/esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.mjs.map +1 -0
  352. package/dist/esm/pushNotifications/providers/pinpoint/apis/identifyUser.d.ts +55 -0
  353. package/dist/esm/pushNotifications/providers/pinpoint/apis/identifyUser.mjs +63 -0
  354. package/dist/esm/pushNotifications/providers/pinpoint/apis/identifyUser.mjs.map +1 -0
  355. package/dist/esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.d.ts +2 -0
  356. package/dist/esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.mjs +39 -0
  357. package/dist/esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.mjs.map +1 -0
  358. package/dist/esm/pushNotifications/providers/pinpoint/apis/index.d.ts +11 -0
  359. package/dist/esm/pushNotifications/providers/pinpoint/apis/index.mjs +12 -0
  360. package/dist/esm/pushNotifications/providers/pinpoint/apis/index.mjs.map +1 -0
  361. package/dist/esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.d.ts +19 -0
  362. package/dist/esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.mjs +27 -0
  363. package/dist/esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.mjs.map +1 -0
  364. package/dist/esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.d.ts +1 -0
  365. package/dist/esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.mjs +157 -0
  366. package/dist/esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.mjs.map +1 -0
  367. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.d.ts +29 -0
  368. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.mjs +37 -0
  369. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.mjs.map +1 -0
  370. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.d.ts +2 -0
  371. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.mjs +12 -0
  372. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.mjs.map +1 -0
  373. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.d.ts +45 -0
  374. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.mjs +53 -0
  375. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.mjs.map +1 -0
  376. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.d.ts +2 -0
  377. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.mjs +12 -0
  378. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.mjs.map +1 -0
  379. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.d.ts +29 -0
  380. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.mjs +37 -0
  381. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.mjs.map +1 -0
  382. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.d.ts +2 -0
  383. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.mjs +12 -0
  384. package/dist/esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.mjs.map +1 -0
  385. package/dist/esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.d.ts +30 -0
  386. package/dist/esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.mjs +38 -0
  387. package/dist/esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.mjs.map +1 -0
  388. package/dist/esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.d.ts +2 -0
  389. package/dist/esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.mjs +12 -0
  390. package/dist/esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.mjs.map +1 -0
  391. package/dist/esm/pushNotifications/providers/pinpoint/apis/requestPermissions.d.ts +34 -0
  392. package/dist/esm/pushNotifications/providers/pinpoint/apis/requestPermissions.mjs +42 -0
  393. package/dist/esm/pushNotifications/providers/pinpoint/apis/requestPermissions.mjs.map +1 -0
  394. package/dist/esm/pushNotifications/providers/pinpoint/apis/requestPermissions.native.d.ts +2 -0
  395. package/dist/esm/pushNotifications/providers/pinpoint/apis/requestPermissions.native.mjs +13 -0
  396. package/dist/esm/pushNotifications/providers/pinpoint/apis/requestPermissions.native.mjs.map +1 -0
  397. package/dist/esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.d.ts +16 -0
  398. package/dist/esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.mjs +24 -0
  399. package/dist/esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.mjs.map +1 -0
  400. package/dist/esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.d.ts +2 -0
  401. package/dist/esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.mjs +13 -0
  402. package/dist/esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.mjs.map +1 -0
  403. package/dist/esm/pushNotifications/providers/pinpoint/index.d.ts +3 -0
  404. package/dist/esm/pushNotifications/providers/pinpoint/index.mjs +12 -0
  405. package/dist/esm/pushNotifications/providers/pinpoint/index.mjs.map +1 -0
  406. package/dist/esm/pushNotifications/providers/pinpoint/types/analytics.d.ts +6 -0
  407. package/dist/esm/pushNotifications/providers/pinpoint/types/analytics.mjs +2 -0
  408. package/dist/esm/pushNotifications/providers/pinpoint/types/analytics.mjs.map +1 -0
  409. package/dist/esm/pushNotifications/providers/pinpoint/types/apis.d.ts +13 -0
  410. package/dist/esm/pushNotifications/providers/pinpoint/types/apis.mjs +2 -0
  411. package/dist/esm/pushNotifications/providers/pinpoint/types/apis.mjs.map +1 -0
  412. package/dist/esm/pushNotifications/providers/pinpoint/types/index.d.ts +6 -0
  413. package/dist/esm/pushNotifications/providers/pinpoint/types/index.mjs +2 -0
  414. package/dist/esm/pushNotifications/providers/pinpoint/types/index.mjs.map +1 -0
  415. package/dist/esm/pushNotifications/providers/pinpoint/types/inputs.d.ts +9 -0
  416. package/dist/esm/pushNotifications/providers/pinpoint/types/inputs.mjs +2 -0
  417. package/dist/esm/pushNotifications/providers/pinpoint/types/inputs.mjs.map +1 -0
  418. package/dist/esm/pushNotifications/providers/pinpoint/types/options.d.ts +5 -0
  419. package/dist/esm/pushNotifications/providers/pinpoint/types/options.mjs +2 -0
  420. package/dist/esm/pushNotifications/providers/pinpoint/types/options.mjs.map +1 -0
  421. package/dist/esm/pushNotifications/providers/pinpoint/types/outputs.d.ts +9 -0
  422. package/dist/esm/pushNotifications/providers/pinpoint/types/outputs.mjs +2 -0
  423. package/dist/esm/pushNotifications/providers/pinpoint/types/outputs.mjs.map +1 -0
  424. package/dist/esm/pushNotifications/providers/pinpoint/types/pushNotifications.d.ts +8 -0
  425. package/dist/esm/pushNotifications/providers/pinpoint/types/pushNotifications.mjs +2 -0
  426. package/dist/esm/pushNotifications/providers/pinpoint/types/pushNotifications.mjs.map +1 -0
  427. package/dist/esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.d.ts +6 -0
  428. package/dist/esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.mjs +44 -0
  429. package/dist/esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.mjs.map +1 -0
  430. package/dist/esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.d.ts +7 -0
  431. package/dist/esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.mjs +55 -0
  432. package/dist/esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.mjs.map +1 -0
  433. package/dist/esm/pushNotifications/providers/pinpoint/utils/getChannelType.d.ts +5 -0
  434. package/dist/esm/pushNotifications/providers/pinpoint/utils/getChannelType.mjs +25 -0
  435. package/dist/esm/pushNotifications/providers/pinpoint/utils/getChannelType.mjs.map +1 -0
  436. package/dist/esm/pushNotifications/providers/pinpoint/utils/index.d.ts +5 -0
  437. package/dist/esm/pushNotifications/providers/pinpoint/utils/index.mjs +6 -0
  438. package/dist/esm/pushNotifications/providers/pinpoint/utils/index.mjs.map +1 -0
  439. package/dist/esm/pushNotifications/providers/pinpoint/utils/inflightDeviceRegistration.d.ts +4 -0
  440. package/dist/esm/pushNotifications/providers/pinpoint/utils/inflightDeviceRegistration.mjs +28 -0
  441. package/dist/esm/pushNotifications/providers/pinpoint/utils/inflightDeviceRegistration.mjs.map +1 -0
  442. package/dist/esm/pushNotifications/providers/pinpoint/utils/resolveConfig.d.ts +7 -0
  443. package/dist/esm/pushNotifications/providers/pinpoint/utils/resolveConfig.mjs +18 -0
  444. package/dist/esm/pushNotifications/providers/pinpoint/utils/resolveConfig.mjs.map +1 -0
  445. package/dist/esm/pushNotifications/types/errors.d.ts +3 -0
  446. package/dist/esm/pushNotifications/types/errors.mjs +9 -0
  447. package/dist/esm/pushNotifications/types/errors.mjs.map +1 -0
  448. package/dist/esm/pushNotifications/types/index.d.ts +6 -0
  449. package/dist/esm/pushNotifications/types/index.mjs +2 -0
  450. package/dist/esm/pushNotifications/types/index.mjs.map +1 -0
  451. package/dist/esm/pushNotifications/types/inputs.d.ts +24 -0
  452. package/dist/esm/pushNotifications/types/inputs.mjs +2 -0
  453. package/dist/esm/pushNotifications/types/inputs.mjs.map +1 -0
  454. package/dist/esm/pushNotifications/types/module.d.ts +31 -0
  455. package/dist/esm/pushNotifications/types/module.mjs +2 -0
  456. package/dist/esm/pushNotifications/types/module.mjs.map +1 -0
  457. package/dist/esm/pushNotifications/types/options.d.ts +4 -0
  458. package/dist/esm/pushNotifications/types/options.mjs +2 -0
  459. package/dist/esm/pushNotifications/types/options.mjs.map +1 -0
  460. package/dist/esm/pushNotifications/types/outputs.d.ts +10 -0
  461. package/dist/esm/pushNotifications/types/outputs.mjs +2 -0
  462. package/dist/esm/pushNotifications/types/outputs.mjs.map +1 -0
  463. package/dist/esm/pushNotifications/types/pushNotifications.d.ts +4 -0
  464. package/dist/esm/pushNotifications/types/pushNotifications.mjs +2 -0
  465. package/dist/esm/pushNotifications/types/pushNotifications.mjs.map +1 -0
  466. package/dist/esm/pushNotifications/utils/getPushNotificationUserAgentString.d.ts +2 -0
  467. package/dist/esm/pushNotifications/utils/getPushNotificationUserAgentString.mjs +11 -0
  468. package/dist/esm/pushNotifications/utils/getPushNotificationUserAgentString.mjs.map +1 -0
  469. package/dist/esm/pushNotifications/utils/index.d.ts +4 -0
  470. package/dist/esm/pushNotifications/utils/index.mjs +5 -0
  471. package/dist/esm/pushNotifications/utils/index.mjs.map +1 -0
  472. package/dist/esm/pushNotifications/utils/initializationManager.d.ts +12 -0
  473. package/dist/esm/pushNotifications/utils/initializationManager.mjs +20 -0
  474. package/dist/esm/pushNotifications/utils/initializationManager.mjs.map +1 -0
  475. package/dist/esm/pushNotifications/utils/resolveCredentials.d.ts +7 -0
  476. package/dist/esm/pushNotifications/utils/resolveCredentials.mjs +16 -0
  477. package/dist/esm/pushNotifications/utils/resolveCredentials.mjs.map +1 -0
  478. package/dist/esm/pushNotifications/utils/tokenManager.d.ts +12 -0
  479. package/dist/esm/pushNotifications/utils/tokenManager.mjs +20 -0
  480. package/dist/esm/pushNotifications/utils/tokenManager.mjs.map +1 -0
  481. package/in-app-messaging/package.json +8 -0
  482. package/in-app-messaging/pinpoint/package.json +8 -0
  483. package/package.json +105 -0
  484. package/push-notifications/package.json +8 -0
  485. package/push-notifications/pinpoint/package.json +8 -0
  486. package/src/eventListeners/eventListeners.ts +53 -0
  487. package/src/eventListeners/index.ts +9 -0
  488. package/src/eventListeners/types.ts +18 -0
  489. package/src/inAppMessaging/errors/InAppMessagingError.ts +21 -0
  490. package/src/inAppMessaging/errors/assertServiceError.ts +25 -0
  491. package/src/inAppMessaging/errors/assertValidationError.ts +22 -0
  492. package/src/inAppMessaging/errors/index.ts +10 -0
  493. package/src/inAppMessaging/errors/validation.ts +29 -0
  494. package/src/inAppMessaging/index.ts +39 -0
  495. package/src/inAppMessaging/providers/pinpoint/apis/clearMessages.ts +29 -0
  496. package/src/inAppMessaging/providers/pinpoint/apis/dispatchEvent.ts +75 -0
  497. package/src/inAppMessaging/providers/pinpoint/apis/identifyUser.ts +94 -0
  498. package/src/inAppMessaging/providers/pinpoint/apis/index.ts +14 -0
  499. package/src/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.ts +66 -0
  500. package/src/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.ts +31 -0
  501. package/src/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.ts +33 -0
  502. package/src/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.ts +33 -0
  503. package/src/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.ts +33 -0
  504. package/src/inAppMessaging/providers/pinpoint/apis/onMessageReceived.ts +33 -0
  505. package/src/inAppMessaging/providers/pinpoint/apis/setConflictHandler.ts +46 -0
  506. package/src/inAppMessaging/providers/pinpoint/apis/syncMessages.ts +92 -0
  507. package/src/inAppMessaging/providers/pinpoint/index.ts +31 -0
  508. package/src/inAppMessaging/providers/pinpoint/types/index.ts +29 -0
  509. package/src/inAppMessaging/providers/pinpoint/types/inputs.ts +59 -0
  510. package/src/inAppMessaging/providers/pinpoint/types/options.ts +9 -0
  511. package/src/inAppMessaging/providers/pinpoint/types/outputs.ts +24 -0
  512. package/src/inAppMessaging/providers/pinpoint/types/types.ts +34 -0
  513. package/src/inAppMessaging/providers/pinpoint/utils/conflictHandlerManager.ts +54 -0
  514. package/src/inAppMessaging/providers/pinpoint/utils/constants.ts +6 -0
  515. package/src/inAppMessaging/providers/pinpoint/utils/helpers.ts +392 -0
  516. package/src/inAppMessaging/providers/pinpoint/utils/index.ts +22 -0
  517. package/src/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.ts +216 -0
  518. package/src/inAppMessaging/providers/pinpoint/utils/resolveConfig.ts +21 -0
  519. package/src/inAppMessaging/providers/pinpoint/utils/resolveCredentials.ts +22 -0
  520. package/src/inAppMessaging/providers/pinpoint/utils/userAgent.ts +25 -0
  521. package/src/inAppMessaging/types/event.ts +14 -0
  522. package/src/inAppMessaging/types/index.ts +16 -0
  523. package/src/inAppMessaging/types/inputs.ts +29 -0
  524. package/src/inAppMessaging/types/message.ts +64 -0
  525. package/src/inAppMessaging/types/options.ts +7 -0
  526. package/src/inAppMessaging/utils/index.ts +8 -0
  527. package/src/inAppMessaging/utils/statusHelpers.ts +32 -0
  528. package/src/index.ts +2 -0
  529. package/src/pushNotifications/errors/PushNotificationError.ts +18 -0
  530. package/src/pushNotifications/errors/errorHelpers.ts +47 -0
  531. package/src/pushNotifications/errors/index.ts +5 -0
  532. package/src/pushNotifications/index.ts +32 -0
  533. package/src/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.ts +15 -0
  534. package/src/pushNotifications/providers/pinpoint/apis/getBadgeCount.ts +24 -0
  535. package/src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.ts +16 -0
  536. package/src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.ts +29 -0
  537. package/src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.ts +16 -0
  538. package/src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.ts +37 -0
  539. package/src/pushNotifications/providers/pinpoint/apis/identifyUser.native.ts +51 -0
  540. package/src/pushNotifications/providers/pinpoint/apis/identifyUser.ts +65 -0
  541. package/src/pushNotifications/providers/pinpoint/apis/index.ts +14 -0
  542. package/src/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.ts +228 -0
  543. package/src/pushNotifications/providers/pinpoint/apis/initializePushNotifications.ts +27 -0
  544. package/src/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.ts +12 -0
  545. package/src/pushNotifications/providers/pinpoint/apis/onNotificationOpened.ts +42 -0
  546. package/src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.ts +13 -0
  547. package/src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.ts +59 -0
  548. package/src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.ts +13 -0
  549. package/src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.ts +43 -0
  550. package/src/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.ts +12 -0
  551. package/src/pushNotifications/providers/pinpoint/apis/onTokenReceived.ts +42 -0
  552. package/src/pushNotifications/providers/pinpoint/apis/requestPermissions.native.ts +16 -0
  553. package/src/pushNotifications/providers/pinpoint/apis/requestPermissions.ts +42 -0
  554. package/src/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.ts +14 -0
  555. package/src/pushNotifications/providers/pinpoint/apis/setBadgeCount.ts +24 -0
  556. package/src/pushNotifications/providers/pinpoint/index.ts +34 -0
  557. package/src/pushNotifications/providers/pinpoint/types/analytics.ts +14 -0
  558. package/src/pushNotifications/providers/pinpoint/types/apis.ts +54 -0
  559. package/src/pushNotifications/providers/pinpoint/types/index.ts +44 -0
  560. package/src/pushNotifications/providers/pinpoint/types/inputs.ts +32 -0
  561. package/src/pushNotifications/providers/pinpoint/types/options.ts +9 -0
  562. package/src/pushNotifications/providers/pinpoint/types/outputs.ts +34 -0
  563. package/src/pushNotifications/providers/pinpoint/types/pushNotifications.ts +15 -0
  564. package/src/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.ts +70 -0
  565. package/src/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.ts +68 -0
  566. package/src/pushNotifications/providers/pinpoint/utils/getChannelType.ts +26 -0
  567. package/src/pushNotifications/providers/pinpoint/utils/index.ts +12 -0
  568. package/src/pushNotifications/providers/pinpoint/utils/inflightDeviceRegistration.ts +38 -0
  569. package/src/pushNotifications/providers/pinpoint/utils/resolveConfig.ts +18 -0
  570. package/src/pushNotifications/types/errors.ts +6 -0
  571. package/src/pushNotifications/types/index.ts +9 -0
  572. package/src/pushNotifications/types/inputs.ts +47 -0
  573. package/src/pushNotifications/types/module.ts +42 -0
  574. package/src/pushNotifications/types/options.ts +7 -0
  575. package/src/pushNotifications/types/outputs.ts +28 -0
  576. package/src/pushNotifications/types/pushNotifications.ts +17 -0
  577. package/src/pushNotifications/utils/getPushNotificationUserAgentString.ts +15 -0
  578. package/src/pushNotifications/utils/index.ts +7 -0
  579. package/src/pushNotifications/utils/initializationManager.ts +20 -0
  580. package/src/pushNotifications/utils/resolveCredentials.ts +19 -0
  581. package/src/pushNotifications/utils/tokenManager.ts +20 -0
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ > INTERNAL USE ONLY
2
+
3
+ This package contains the AWS Amplify Notifications category and is intended for internal use only. To integrate Amplify into your app, please use [aws-amplify](https://www.npmjs.com/package/aws-amplify).
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.addEventListener = exports.notifyEventListenersAndAwaitHandlers = exports.notifyEventListeners = void 0;
7
+ const eventListeners = {};
8
+ const notifyEventListeners = (type, ...args) => {
9
+ eventListeners[type]?.forEach(listener => {
10
+ listener.handleEvent(...args);
11
+ });
12
+ };
13
+ exports.notifyEventListeners = notifyEventListeners;
14
+ const notifyEventListenersAndAwaitHandlers = (type, ...args) => Promise.all(Array.from(eventListeners[type] ?? []).map(async (listener) => {
15
+ await listener.handleEvent(...args);
16
+ }));
17
+ exports.notifyEventListenersAndAwaitHandlers = notifyEventListenersAndAwaitHandlers;
18
+ const addEventListener = (type, handler) => {
19
+ // If there is no listener set for the event type, just create it
20
+ if (!eventListeners[type]) {
21
+ eventListeners[type] = new Set();
22
+ }
23
+ const listener = {
24
+ handleEvent: handler,
25
+ remove: () => {
26
+ eventListeners[type].delete(listener);
27
+ },
28
+ };
29
+ eventListeners[type].add(listener);
30
+ return {
31
+ remove: () => {
32
+ listener.remove();
33
+ },
34
+ };
35
+ };
36
+ exports.addEventListener = addEventListener;
37
+ //# sourceMappingURL=eventListeners.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eventListeners.js","sources":["../../../src/eventListeners/eventListeners.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.addEventListener = exports.notifyEventListenersAndAwaitHandlers = exports.notifyEventListeners = void 0;\nconst eventListeners = {};\nconst notifyEventListeners = (type, ...args) => {\n eventListeners[type]?.forEach(listener => {\n listener.handleEvent(...args);\n });\n};\nexports.notifyEventListeners = notifyEventListeners;\nconst notifyEventListenersAndAwaitHandlers = (type, ...args) => Promise.all(Array.from(eventListeners[type] ?? []).map(async (listener) => {\n await listener.handleEvent(...args);\n}));\nexports.notifyEventListenersAndAwaitHandlers = notifyEventListenersAndAwaitHandlers;\nconst 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);\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D,QAAQ,CAAC;AACT,KAAK;AACL,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC;AACtC,IAAI,OAAO;AACX,QAAQ,MAAM,EAAE,MAAM;AACtB,YAAY,QAAQ,CAAC,MAAM,EAAE;AAC7B,QAAQ,CAAC;AACT,KAAK;AACL,CAAC;AACD,OAAO,CAAC,gBAAgB,GAAG,gBAAgB;;"}
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.notifyEventListenersAndAwaitHandlers = exports.notifyEventListeners = void 0;
7
+ var eventListeners_1 = require("./eventListeners");
8
+ Object.defineProperty(exports, "addEventListener", { enumerable: true, get: function () { return eventListeners_1.addEventListener; } });
9
+ Object.defineProperty(exports, "notifyEventListeners", { enumerable: true, get: function () { return eventListeners_1.notifyEventListeners; } });
10
+ Object.defineProperty(exports, "notifyEventListenersAndAwaitHandlers", { enumerable: true, get: function () { return eventListeners_1.notifyEventListenersAndAwaitHandlers; } });
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/eventListeners/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.notifyEventListenersAndAwaitHandlers = exports.notifyEventListeners = void 0;\nvar eventListeners_1 = require(\"./eventListeners\");\nObject.defineProperty(exports, \"addEventListener\", { enumerable: true, get: function () { return eventListeners_1.addEventListener; } });\nObject.defineProperty(exports, \"notifyEventListeners\", { enumerable: true, get: function () { return eventListeners_1.notifyEventListeners; } });\nObject.defineProperty(exports, \"notifyEventListenersAndAwaitHandlers\", { enumerable: true, get: function () { return eventListeners_1.notifyEventListenersAndAwaitHandlers; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oCAAoC,GAAG,OAAO,CAAC,oBAAoB,GAAG,MAAM;AACpF,IAAI,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAClD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;AACxI,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,gBAAgB,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC;AAChJ,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,sCAAsC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,gBAAgB,CAAC,oCAAoC,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":["../../../src/eventListeners/types.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;;"}
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.InAppMessagingError = void 0;
7
+ const utils_1 = require("@aws-amplify/core/internals/utils");
8
+ /**
9
+ * @internal
10
+ */
11
+ class InAppMessagingError extends utils_1.AmplifyError {
12
+ constructor(params) {
13
+ super(params);
14
+ // Hack for making the custom error class work when transpiled to es5
15
+ // TODO: Delete the following 2 lines after we change the build target to >= es2015
16
+ this.constructor = InAppMessagingError;
17
+ Object.setPrototypeOf(this, InAppMessagingError.prototype);
18
+ }
19
+ }
20
+ exports.InAppMessagingError = InAppMessagingError;
21
+ //# sourceMappingURL=InAppMessagingError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InAppMessagingError.js","sources":["../../../../src/inAppMessaging/errors/InAppMessagingError.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.InAppMessagingError = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\n/**\n * @internal\n */\nclass InAppMessagingError extends utils_1.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}\nexports.InAppMessagingError = InAppMessagingError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,mBAAmB,GAAG,MAAM;AACpC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D;AACA;AACA;AACA,MAAM,mBAAmB,SAAS,OAAO,CAAC,YAAY,CAAC;AACvD,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB,QAAQ,KAAK,CAAC,MAAM,CAAC;AACrB;AACA;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,mBAAmB;AAC9C,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC;AAClE,IAAI;AACJ;AACA,OAAO,CAAC,mBAAmB,GAAG,mBAAmB;;"}
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.assertServiceError = assertServiceError;
7
+ const utils_1 = require("@aws-amplify/core/internals/utils");
8
+ const InAppMessagingError_1 = require("./InAppMessagingError");
9
+ function assertServiceError(error) {
10
+ if (!error ||
11
+ error.name === 'Error' ||
12
+ error instanceof TypeError) {
13
+ throw new InAppMessagingError_1.InAppMessagingError({
14
+ name: utils_1.AmplifyErrorCode.Unknown,
15
+ message: 'An unknown error has occurred.',
16
+ underlyingError: error,
17
+ });
18
+ }
19
+ }
20
+ //# sourceMappingURL=assertServiceError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertServiceError.js","sources":["../../../../src/inAppMessaging/errors/assertServiceError.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.assertServiceError = assertServiceError;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst InAppMessagingError_1 = require(\"./InAppMessagingError\");\nfunction assertServiceError(error) {\n if (!error ||\n error.name === 'Error' ||\n error instanceof TypeError) {\n throw new InAppMessagingError_1.InAppMessagingError({\n name: utils_1.AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: error,\n });\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;AAC/C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,qBAAqB,GAAG,OAAO,CAAC,uBAAuB,CAAC;AAC9D,SAAS,kBAAkB,CAAC,KAAK,EAAE;AACnC,IAAI,IAAI,CAAC,KAAK;AACd,QAAQ,KAAK,CAAC,IAAI,KAAK,OAAO;AAC9B,QAAQ,KAAK,YAAY,SAAS,EAAE;AACpC,QAAQ,MAAM,IAAI,qBAAqB,CAAC,mBAAmB,CAAC;AAC5D,YAAY,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,OAAO;AAClD,YAAY,OAAO,EAAE,gCAAgC;AACrD,YAAY,eAAe,EAAE,KAAK;AAClC,SAAS,CAAC;AACV,IAAI;AACJ;;"}
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.assertValidationError = assertValidationError;
7
+ const InAppMessagingError_1 = require("./InAppMessagingError");
8
+ const validation_1 = require("./validation");
9
+ /**
10
+ * @internal
11
+ */
12
+ function assertValidationError(assertion, name) {
13
+ const { message, recoverySuggestion } = validation_1.validationErrorMap[name];
14
+ if (!assertion) {
15
+ throw new InAppMessagingError_1.InAppMessagingError({ name, message, recoverySuggestion });
16
+ }
17
+ }
18
+ //# sourceMappingURL=assertValidationError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertValidationError.js","sources":["../../../../src/inAppMessaging/errors/assertValidationError.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.assertValidationError = assertValidationError;\nconst InAppMessagingError_1 = require(\"./InAppMessagingError\");\nconst validation_1 = require(\"./validation\");\n/**\n * @internal\n */\nfunction assertValidationError(assertion, name) {\n const { message, recoverySuggestion } = validation_1.validationErrorMap[name];\n if (!assertion) {\n throw new InAppMessagingError_1.InAppMessagingError({ name, message, recoverySuggestion });\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,qBAAqB,GAAG,qBAAqB;AACrD,MAAM,qBAAqB,GAAG,OAAO,CAAC,uBAAuB,CAAC;AAC9D,MAAM,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC;AAC5C;AACA;AACA;AACA,SAAS,qBAAqB,CAAC,SAAS,EAAE,IAAI,EAAE;AAChD,IAAI,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC;AACjF,IAAI,IAAI,CAAC,SAAS,EAAE;AACpB,QAAQ,MAAM,IAAI,qBAAqB,CAAC,mBAAmB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAClG,IAAI;AACJ;;"}
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.validationErrorMap = exports.InAppMessagingValidationErrorCode = exports.assertServiceError = exports.assertValidationError = exports.InAppMessagingError = void 0;
7
+ var InAppMessagingError_1 = require("./InAppMessagingError");
8
+ Object.defineProperty(exports, "InAppMessagingError", { enumerable: true, get: function () { return InAppMessagingError_1.InAppMessagingError; } });
9
+ var assertValidationError_1 = require("./assertValidationError");
10
+ Object.defineProperty(exports, "assertValidationError", { enumerable: true, get: function () { return assertValidationError_1.assertValidationError; } });
11
+ var assertServiceError_1 = require("./assertServiceError");
12
+ Object.defineProperty(exports, "assertServiceError", { enumerable: true, get: function () { return assertServiceError_1.assertServiceError; } });
13
+ var validation_1 = require("./validation");
14
+ Object.defineProperty(exports, "InAppMessagingValidationErrorCode", { enumerable: true, get: function () { return validation_1.InAppMessagingValidationErrorCode; } });
15
+ Object.defineProperty(exports, "validationErrorMap", { enumerable: true, get: function () { return validation_1.validationErrorMap; } });
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/inAppMessaging/errors/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.validationErrorMap = exports.InAppMessagingValidationErrorCode = exports.assertServiceError = exports.assertValidationError = exports.InAppMessagingError = void 0;\nvar InAppMessagingError_1 = require(\"./InAppMessagingError\");\nObject.defineProperty(exports, \"InAppMessagingError\", { enumerable: true, get: function () { return InAppMessagingError_1.InAppMessagingError; } });\nvar assertValidationError_1 = require(\"./assertValidationError\");\nObject.defineProperty(exports, \"assertValidationError\", { enumerable: true, get: function () { return assertValidationError_1.assertValidationError; } });\nvar assertServiceError_1 = require(\"./assertServiceError\");\nObject.defineProperty(exports, \"assertServiceError\", { enumerable: true, get: function () { return assertServiceError_1.assertServiceError; } });\nvar validation_1 = require(\"./validation\");\nObject.defineProperty(exports, \"InAppMessagingValidationErrorCode\", { enumerable: true, get: function () { return validation_1.InAppMessagingValidationErrorCode; } });\nObject.defineProperty(exports, \"validationErrorMap\", { enumerable: true, get: function () { return validation_1.validationErrorMap; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAA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
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.validationErrorMap = exports.InAppMessagingValidationErrorCode = void 0;
7
+ var InAppMessagingValidationErrorCode;
8
+ (function (InAppMessagingValidationErrorCode) {
9
+ InAppMessagingValidationErrorCode["NoAppId"] = "NoAppId";
10
+ InAppMessagingValidationErrorCode["NoCredentials"] = "NoCredentials";
11
+ InAppMessagingValidationErrorCode["NoRegion"] = "NoRegion";
12
+ InAppMessagingValidationErrorCode["NotInitialized"] = "NotInitialized";
13
+ })(InAppMessagingValidationErrorCode || (exports.InAppMessagingValidationErrorCode = InAppMessagingValidationErrorCode = {}));
14
+ exports.validationErrorMap = {
15
+ [InAppMessagingValidationErrorCode.NoAppId]: {
16
+ message: 'Missing application id.',
17
+ },
18
+ [InAppMessagingValidationErrorCode.NoCredentials]: {
19
+ message: 'Credentials should not be empty.',
20
+ },
21
+ [InAppMessagingValidationErrorCode.NoRegion]: {
22
+ message: 'Missing region.',
23
+ },
24
+ [InAppMessagingValidationErrorCode.NotInitialized]: {
25
+ message: 'In-app messaging has not been initialized.',
26
+ recoverySuggestion: 'Please make sure to first call `initializeInAppMessaging`.',
27
+ },
28
+ };
29
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sources":["../../../../src/inAppMessaging/errors/validation.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.validationErrorMap = exports.InAppMessagingValidationErrorCode = void 0;\nvar InAppMessagingValidationErrorCode;\n(function (InAppMessagingValidationErrorCode) {\n InAppMessagingValidationErrorCode[\"NoAppId\"] = \"NoAppId\";\n InAppMessagingValidationErrorCode[\"NoCredentials\"] = \"NoCredentials\";\n InAppMessagingValidationErrorCode[\"NoRegion\"] = \"NoRegion\";\n InAppMessagingValidationErrorCode[\"NotInitialized\"] = \"NotInitialized\";\n})(InAppMessagingValidationErrorCode || (exports.InAppMessagingValidationErrorCode = InAppMessagingValidationErrorCode = {}));\nexports.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 `initializeInAppMessaging`.',\n },\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,iCAAiC,GAAG,MAAM;AAC/E,IAAI,iCAAiC;AACrC,CAAC,UAAU,iCAAiC,EAAE;AAC9C,IAAI,iCAAiC,CAAC,SAAS,CAAC,GAAG,SAAS;AAC5D,IAAI,iCAAiC,CAAC,eAAe,CAAC,GAAG,eAAe;AACxE,IAAI,iCAAiC,CAAC,UAAU,CAAC,GAAG,UAAU;AAC9D,IAAI,iCAAiC,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;AAC1E,CAAC,EAAE,iCAAiC,KAAK,OAAO,CAAC,iCAAiC,GAAG,iCAAiC,GAAG,EAAE,CAAC,CAAC;AAC7H,OAAO,CAAC,kBAAkB,GAAG;AAC7B,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,4DAA4D;AACxF,KAAK;AACL,CAAC;;"}
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.clearMessages = exports.notifyMessageInteraction = exports.onMessageActionTaken = exports.onMessageDismissed = exports.onMessageDisplayed = exports.onMessageReceived = exports.initializeInAppMessaging = exports.setConflictHandler = exports.syncMessages = exports.identifyUser = void 0;
7
+ var pinpoint_1 = require("./providers/pinpoint");
8
+ Object.defineProperty(exports, "identifyUser", { enumerable: true, get: function () { return pinpoint_1.identifyUser; } });
9
+ Object.defineProperty(exports, "syncMessages", { enumerable: true, get: function () { return pinpoint_1.syncMessages; } });
10
+ Object.defineProperty(exports, "dispatchEvent", { enumerable: true, get: function () { return pinpoint_1.dispatchEvent; } });
11
+ Object.defineProperty(exports, "setConflictHandler", { enumerable: true, get: function () { return pinpoint_1.setConflictHandler; } });
12
+ Object.defineProperty(exports, "initializeInAppMessaging", { enumerable: true, get: function () { return pinpoint_1.initializeInAppMessaging; } });
13
+ Object.defineProperty(exports, "onMessageReceived", { enumerable: true, get: function () { return pinpoint_1.onMessageReceived; } });
14
+ Object.defineProperty(exports, "onMessageDisplayed", { enumerable: true, get: function () { return pinpoint_1.onMessageDisplayed; } });
15
+ Object.defineProperty(exports, "onMessageDismissed", { enumerable: true, get: function () { return pinpoint_1.onMessageDismissed; } });
16
+ Object.defineProperty(exports, "onMessageActionTaken", { enumerable: true, get: function () { return pinpoint_1.onMessageActionTaken; } });
17
+ Object.defineProperty(exports, "notifyMessageInteraction", { enumerable: true, get: function () { return pinpoint_1.notifyMessageInteraction; } });
18
+ Object.defineProperty(exports, "clearMessages", { enumerable: true, get: function () { return pinpoint_1.clearMessages; } });
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/inAppMessaging/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.clearMessages = exports.notifyMessageInteraction = exports.onMessageActionTaken = exports.onMessageDismissed = exports.onMessageDisplayed = exports.onMessageReceived = exports.initializeInAppMessaging = exports.setConflictHandler = exports.syncMessages = exports.identifyUser = void 0;\nvar pinpoint_1 = require(\"./providers/pinpoint\");\nObject.defineProperty(exports, \"identifyUser\", { enumerable: true, get: function () { return pinpoint_1.identifyUser; } });\nObject.defineProperty(exports, \"syncMessages\", { enumerable: true, get: function () { return pinpoint_1.syncMessages; } });\nObject.defineProperty(exports, \"dispatchEvent\", { enumerable: true, get: function () { return pinpoint_1.dispatchEvent; } });\nObject.defineProperty(exports, \"setConflictHandler\", { enumerable: true, get: function () { return pinpoint_1.setConflictHandler; } });\nObject.defineProperty(exports, \"initializeInAppMessaging\", { enumerable: true, get: function () { return pinpoint_1.initializeInAppMessaging; } });\nObject.defineProperty(exports, \"onMessageReceived\", { enumerable: true, get: function () { return pinpoint_1.onMessageReceived; } });\nObject.defineProperty(exports, \"onMessageDisplayed\", { enumerable: true, get: function () { return pinpoint_1.onMessageDisplayed; } });\nObject.defineProperty(exports, \"onMessageDismissed\", { enumerable: true, get: function () { return pinpoint_1.onMessageDismissed; } });\nObject.defineProperty(exports, \"onMessageActionTaken\", { enumerable: true, get: function () { return pinpoint_1.onMessageActionTaken; } });\nObject.defineProperty(exports, \"notifyMessageInteraction\", { enumerable: true, get: function () { return pinpoint_1.notifyMessageInteraction; } });\nObject.defineProperty(exports, \"clearMessages\", { enumerable: true, get: function () { return pinpoint_1.clearMessages; } });\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,CAAC,CAAC,CAAC,EAAE,CAAC;AAClJ,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,mBAAmB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;AACpI,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,oBAAoB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,UAAU,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;AACtI,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,oBAAoB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,UAAU,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;AACtI,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1I,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,0BAA0B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,UAAU,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,CAAC;AAClJ,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.clearMessages = clearMessages;
7
+ const core_1 = require("@aws-amplify/core");
8
+ const utils_1 = require("../utils");
9
+ const utils_2 = require("../../../utils");
10
+ /**
11
+ * Clear locally cached messages.
12
+ *
13
+ * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
14
+ *
15
+ * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown if In App messaging hasn't been initialized.
16
+ * @returns A promise that will resolve when the operation is complete.
17
+ * @example
18
+ * ```ts
19
+ * // Clear locally cached messages.
20
+ * await clearMessages();
21
+ *
22
+ * ```
23
+ */
24
+ async function clearMessages() {
25
+ (0, utils_2.assertIsInitialized)();
26
+ const key = `${utils_1.PINPOINT_KEY_PREFIX}${utils_1.STORAGE_KEY_SUFFIX}`;
27
+ await core_1.defaultStorage.removeItem(key);
28
+ }
29
+ //# sourceMappingURL=clearMessages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clearMessages.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/clearMessages.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.clearMessages = clearMessages;\nconst core_1 = require(\"@aws-amplify/core\");\nconst utils_1 = require(\"../utils\");\nconst utils_2 = require(\"../../../utils\");\n/**\n * Clear locally cached messages.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\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 */\nasync function clearMessages() {\n (0, utils_2.assertIsInitialized)();\n const key = `${utils_1.PINPOINT_KEY_PREFIX}${utils_1.STORAGE_KEY_SUFFIX}`;\n await core_1.defaultStorage.removeItem(key);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa,GAAG;AAC/B,IAAI,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtC,IAAI,MAAM,GAAG,GAAG,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAC7E,IAAI,MAAM,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC;AAC/C;;"}
@@ -0,0 +1,60 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.dispatchEvent = dispatchEvent;
7
+ const tslib_1 = require("tslib");
8
+ const flatten_js_1 = tslib_1.__importDefault(require("lodash/flatten.js"));
9
+ const core_1 = require("@aws-amplify/core");
10
+ const eventListeners_1 = require("../../../../eventListeners");
11
+ const errors_1 = require("../../../errors");
12
+ const utils_1 = require("../../../utils");
13
+ const utils_2 = require("../utils");
14
+ /**
15
+ * Triggers an In-App message to be displayed. Use this after your campaigns have been synced to the device using
16
+ * {@link syncMessages}. Based on the messages synced and the event passed to this API, it triggers the display
17
+ * of the In-App message that meets the criteria.
18
+ *
19
+ * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
20
+ *
21
+ * @remark
22
+ * If an event would trigger multiple messages, the message closest to expiry will be chosen by default.
23
+ * To change this behavior, you can use the {@link setConflictHandler} API to provide
24
+ * your own logic for resolving message conflicts.
25
+ *
26
+ * @param input The input object that holds the event to be dispatched.
27
+ *
28
+ * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library
29
+ * configuration is incorrect, or if In App messaging hasn't been initialized.
30
+ * @throws service exceptions - Thrown when the underlying Pinpoint service returns an error.
31
+ *
32
+ * @returns A promise that will resolve when the operation is complete.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * // Sync message before disptaching an event
37
+ * await syncMessages();
38
+ *
39
+ * // Dispatch an event
40
+ * await dispatchEvent({ name: 'test_event' });
41
+ * ```
42
+ */
43
+ async function dispatchEvent(input) {
44
+ (0, utils_1.assertIsInitialized)();
45
+ try {
46
+ const key = `${utils_2.PINPOINT_KEY_PREFIX}${utils_2.STORAGE_KEY_SUFFIX}`;
47
+ const cachedMessages = await core_1.defaultStorage.getItem(key);
48
+ const messages = await (0, utils_2.processInAppMessages)(cachedMessages ? JSON.parse(cachedMessages) : [], input);
49
+ const flattenedMessages = (0, flatten_js_1.default)(messages);
50
+ if (flattenedMessages.length > 0) {
51
+ const conflictHandler = (0, utils_2.getConflictHandler)();
52
+ (0, eventListeners_1.notifyEventListeners)('messageReceived', conflictHandler(flattenedMessages));
53
+ }
54
+ }
55
+ catch (error) {
56
+ (0, errors_1.assertServiceError)(error);
57
+ throw error;
58
+ }
59
+ }
60
+ //# sourceMappingURL=dispatchEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatchEvent.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/dispatchEvent.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.dispatchEvent = dispatchEvent;\nconst tslib_1 = require(\"tslib\");\nconst flatten_js_1 = tslib_1.__importDefault(require(\"lodash/flatten.js\"));\nconst core_1 = require(\"@aws-amplify/core\");\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst errors_1 = require(\"../../../errors\");\nconst utils_1 = require(\"../../../utils\");\nconst utils_2 = require(\"../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 * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\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 input The input object that holds the event to be dispatched.\n *\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 *\n * @returns A promise that will resolve when the operation is complete.\n *\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 */\nasync function dispatchEvent(input) {\n (0, utils_1.assertIsInitialized)();\n try {\n const key = `${utils_2.PINPOINT_KEY_PREFIX}${utils_2.STORAGE_KEY_SUFFIX}`;\n const cachedMessages = await core_1.defaultStorage.getItem(key);\n const messages = await (0, utils_2.processInAppMessages)(cachedMessages ? JSON.parse(cachedMessages) : [], input);\n const flattenedMessages = (0, flatten_js_1.default)(messages);\n if (flattenedMessages.length > 0) {\n const conflictHandler = (0, utils_2.getConflictHandler)();\n (0, eventListeners_1.notifyEventListeners)('messageReceived', conflictHandler(flattenedMessages));\n }\n }\n catch (error) {\n (0, errors_1.assertServiceError)(error);\n throw error;\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AAChC,MAAM,YAAY,GAAG,OA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;AAC7G,QAAQ;AACR,IAAI;AACJ,IAAI,OAAO,KAAK,EAAE;AAClB,QAAQ,IAAI,QAAQ,CAAC,kBAAkB,EAAE,KAAK,CAAC;AAC/C,QAAQ,MAAM,KAAK;AACnB,IAAI;AACJ;;"}
@@ -0,0 +1,84 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.identifyUser = void 0;
7
+ const utils_1 = require("@aws-amplify/core/internals/utils");
8
+ const pinpoint_1 = require("@aws-amplify/core/internals/providers/pinpoint");
9
+ const utils_2 = require("../utils");
10
+ const utils_3 = require("../../../utils");
11
+ /**
12
+ * Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user
13
+ * profile and activities or actions in your application. Activity can be tracked across devices & platforms by using
14
+ * the same `userId`.
15
+ *
16
+ * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
17
+ *
18
+ * @param input The input object that conforms to {@link IdentifyUserInput} used to construct requests sent to Pinpoint's UpdateEndpoint
19
+ * API.
20
+ * @throws service: {@link UpdateEndpointException} - Thrown when the underlying Pinpoint service returns an error.
21
+ * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library
22
+ * configuration is incorrect, or if In App messaging hasn't been initialized.
23
+ * @returns A promise that will resolve when the operation is complete.
24
+ * @example
25
+ * ```ts
26
+ * // Identify a user with Pinpoint
27
+ * await identifyUser({
28
+ * userId,
29
+ * userProfile: {
30
+ * email: 'userEmail@example.com'
31
+ * customProperties: {
32
+ * phoneNumber: ['555-555-5555'],
33
+ * },
34
+ * }
35
+ * });
36
+ * ```
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * // Identify a user with Pinpoint specific options
41
+ * await identifyUser({
42
+ * userId,
43
+ * userProfile: {
44
+ * email: 'userEmail@example.com'
45
+ * customProperties: {
46
+ * phoneNumber: ['555-555-5555'],
47
+ * },
48
+ * demographic: {
49
+ * platform: 'ios',
50
+ * timezone: 'America/Los_Angeles'
51
+ * }
52
+ * },
53
+ * options: {
54
+ * address: 'device-address',
55
+ * optOut: 'NONE',
56
+ * userAttributes: {
57
+ * interests: ['food']
58
+ * },
59
+ * },
60
+ * });
61
+ */
62
+ const identifyUser = async (input) => {
63
+ const { userId, userProfile, options } = input;
64
+ (0, utils_3.assertIsInitialized)();
65
+ const { credentials, identityId } = await (0, utils_2.resolveCredentials)();
66
+ const { appId, region } = (0, utils_2.resolveConfig)();
67
+ const { address, optOut, userAttributes } = options ?? {};
68
+ await (0, pinpoint_1.updateEndpoint)({
69
+ address,
70
+ channelType: utils_2.CHANNEL_TYPE,
71
+ optOut,
72
+ appId,
73
+ category: utils_2.CATEGORY,
74
+ credentials,
75
+ identityId,
76
+ region,
77
+ userAttributes,
78
+ userId,
79
+ userProfile,
80
+ userAgentValue: (0, utils_2.getInAppMessagingUserAgentString)(utils_1.InAppMessagingAction.IdentifyUser),
81
+ });
82
+ };
83
+ exports.identifyUser = identifyUser;
84
+ //# sourceMappingURL=identifyUser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identifyUser.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/identifyUser.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.identifyUser = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst pinpoint_1 = require(\"@aws-amplify/core/internals/providers/pinpoint\");\nconst utils_2 = require(\"../utils\");\nconst utils_3 = require(\"../../../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 * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @param input The input object that conforms to {@link IdentifyUserInput} 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 */\nconst identifyUser = async (input) => {\n const { userId, userProfile, options } = input;\n (0, utils_3.assertIsInitialized)();\n const { credentials, identityId } = await (0, utils_2.resolveCredentials)();\n const { appId, region } = (0, utils_2.resolveConfig)();\n const { address, optOut, userAttributes } = options ?? {};\n await (0, pinpoint_1.updateEndpoint)({\n address,\n channelType: utils_2.CHANNEL_TYPE,\n optOut,\n appId,\n category: utils_2.CATEGORY,\n credentials,\n identityId,\n region,\n userAttributes,\n userId,\n userProfile,\n userAgentValue: (0, utils_2.getInAppMessagingUserAgentString)(utils_1.InAppMessagingAction.IdentifyUser),\n });\n};\nexports.identifyUser = identifyUser;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,YAAY,GAAG,MAAM;AAC7B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,UAAU,GAAG,OAAO,CAA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YAAY,GAAG,YAAY;;"}
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.clearMessages = exports.notifyMessageInteraction = exports.onMessageActionTaken = exports.onMessageDisplayed = exports.onMessageDismissed = exports.onMessageReceived = exports.initializeInAppMessaging = exports.setConflictHandler = exports.syncMessages = exports.identifyUser = void 0;
7
+ var identifyUser_1 = require("./identifyUser");
8
+ Object.defineProperty(exports, "identifyUser", { enumerable: true, get: function () { return identifyUser_1.identifyUser; } });
9
+ var syncMessages_1 = require("./syncMessages");
10
+ Object.defineProperty(exports, "syncMessages", { enumerable: true, get: function () { return syncMessages_1.syncMessages; } });
11
+ var dispatchEvent_1 = require("./dispatchEvent");
12
+ Object.defineProperty(exports, "dispatchEvent", { enumerable: true, get: function () { return dispatchEvent_1.dispatchEvent; } });
13
+ var setConflictHandler_1 = require("./setConflictHandler");
14
+ Object.defineProperty(exports, "setConflictHandler", { enumerable: true, get: function () { return setConflictHandler_1.setConflictHandler; } });
15
+ var initializeInAppMessaging_1 = require("./initializeInAppMessaging");
16
+ Object.defineProperty(exports, "initializeInAppMessaging", { enumerable: true, get: function () { return initializeInAppMessaging_1.initializeInAppMessaging; } });
17
+ var onMessageReceived_1 = require("./onMessageReceived");
18
+ Object.defineProperty(exports, "onMessageReceived", { enumerable: true, get: function () { return onMessageReceived_1.onMessageReceived; } });
19
+ var onMessageDismissed_1 = require("./onMessageDismissed");
20
+ Object.defineProperty(exports, "onMessageDismissed", { enumerable: true, get: function () { return onMessageDismissed_1.onMessageDismissed; } });
21
+ var onMessageDisplayed_1 = require("./onMessageDisplayed");
22
+ Object.defineProperty(exports, "onMessageDisplayed", { enumerable: true, get: function () { return onMessageDisplayed_1.onMessageDisplayed; } });
23
+ var onMessageActionTaken_1 = require("./onMessageActionTaken");
24
+ Object.defineProperty(exports, "onMessageActionTaken", { enumerable: true, get: function () { return onMessageActionTaken_1.onMessageActionTaken; } });
25
+ var notifyMessageInteraction_1 = require("./notifyMessageInteraction");
26
+ Object.defineProperty(exports, "notifyMessageInteraction", { enumerable: true, get: function () { return notifyMessageInteraction_1.notifyMessageInteraction; } });
27
+ var clearMessages_1 = require("./clearMessages");
28
+ Object.defineProperty(exports, "clearMessages", { enumerable: true, get: function () { return clearMessages_1.clearMessages; } });
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/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.clearMessages = exports.notifyMessageInteraction = exports.onMessageActionTaken = exports.onMessageDisplayed = exports.onMessageDismissed = exports.onMessageReceived = exports.initializeInAppMessaging = exports.setConflictHandler = exports.syncMessages = exports.identifyUser = void 0;\nvar identifyUser_1 = require(\"./identifyUser\");\nObject.defineProperty(exports, \"identifyUser\", { enumerable: true, get: function () { return identifyUser_1.identifyUser; } });\nvar syncMessages_1 = require(\"./syncMessages\");\nObject.defineProperty(exports, \"syncMessages\", { enumerable: true, get: function () { return syncMessages_1.syncMessages; } });\nvar dispatchEvent_1 = require(\"./dispatchEvent\");\nObject.defineProperty(exports, \"dispatchEvent\", { enumerable: true, get: function () { return dispatchEvent_1.dispatchEvent; } });\nvar setConflictHandler_1 = require(\"./setConflictHandler\");\nObject.defineProperty(exports, \"setConflictHandler\", { enumerable: true, get: function () { return setConflictHandler_1.setConflictHandler; } });\nvar initializeInAppMessaging_1 = require(\"./initializeInAppMessaging\");\nObject.defineProperty(exports, \"initializeInAppMessaging\", { enumerable: true, get: function () { return initializeInAppMessaging_1.initializeInAppMessaging; } });\nvar onMessageReceived_1 = require(\"./onMessageReceived\");\nObject.defineProperty(exports, \"onMessageReceived\", { enumerable: true, get: function () { return onMessageReceived_1.onMessageReceived; } });\nvar onMessageDismissed_1 = require(\"./onMessageDismissed\");\nObject.defineProperty(exports, \"onMessageDismissed\", { enumerable: true, get: function () { return onMessageDismissed_1.onMessageDismissed; } });\nvar onMessageDisplayed_1 = require(\"./onMessageDisplayed\");\nObject.defineProperty(exports, \"onMessageDisplayed\", { enumerable: true, get: function () { return onMessageDisplayed_1.onMessageDisplayed; } });\nvar onMessageActionTaken_1 = require(\"./onMessageActionTaken\");\nObject.defineProperty(exports, \"onMessageActionTaken\", { enumerable: true, get: function () { return onMessageActionTaken_1.onMessageActionTaken; } });\nvar notifyMessageInteraction_1 = require(\"./notifyMessageInteraction\");\nObject.defineProperty(exports, \"notifyMessageInteraction\", { enumerable: true, get: function () { return notifyMessageInteraction_1.notifyMessageInteraction; } });\nvar clearMessages_1 = require(\"./clearMessages\");\nObject.defineProperty(exports, \"clearMessages\", { enumerable: true, get: function () { return clearMessages_1.clearMessages; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,GAAG,MAAM;AACpS,IAAI,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;AAC9C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;AAC9H,IAAI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AG,EAAE,YAAY,EAAE,OAAO,oBAAoB,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;AAChJ,IAAI,oBAAoB,GAAG,OAAO,CAAC,sBAAsB,CAAC;AAC1D,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,oBAAoB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,oBAAoB,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;AAChJ,IAAI,sBAAsB,GAAG,OAAO,CAAC,wBAAwB,CAAC;AAC9D,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,sBAAsB,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC;AACtJ,IAAI,0BAA0B,GAAG,OAAO,CAAC,4BAA4B,CAAC;AACtE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,0BAA0B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,0BAA0B,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,CAAC;AAClK,IAAI,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAChD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;;"}
@@ -0,0 +1,58 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.initializeInAppMessaging = initializeInAppMessaging;
7
+ const utils_1 = require("@aws-amplify/core/internals/utils");
8
+ const core_1 = require("@aws-amplify/core");
9
+ const eventListeners_1 = require("../../../../eventListeners");
10
+ const helpers_1 = require("../utils/helpers");
11
+ const types_1 = require("../types");
12
+ const utils_2 = require("../utils");
13
+ const utils_3 = require("../../../utils");
14
+ const dispatchEvent_1 = require("./dispatchEvent");
15
+ /**
16
+ * Initialize and set up in-app messaging category. This API needs to be called to enable other InAppMessaging APIs.
17
+ *
18
+ * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
19
+ *
20
+ * @remarks
21
+ * Make sure to call this early in your app at the root entry point after configuring Amplify.
22
+ * @example
23
+ * ```ts
24
+ * Amplify.configure(config);
25
+ * initializeInAppMessaging();
26
+ * ```
27
+ */
28
+ function initializeInAppMessaging() {
29
+ if ((0, utils_3.isInitialized)()) {
30
+ return;
31
+ }
32
+ // register with the session listener
33
+ utils_1.sessionListener.addStateChangeListener(utils_2.sessionStateChangeHandler, true);
34
+ // wire up default Pinpoint message event handling
35
+ (0, eventListeners_1.addEventListener)('messageDisplayed', (message) => {
36
+ (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_DISPLAYED, message);
37
+ (0, utils_2.incrementMessageCounts)(message.id);
38
+ });
39
+ (0, eventListeners_1.addEventListener)('messageDismissed', (message) => {
40
+ (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_DISMISSED, message);
41
+ });
42
+ (0, eventListeners_1.addEventListener)('messageActionTaken', (message) => {
43
+ (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_ACTION_TAKEN, message);
44
+ });
45
+ // listen to analytics hub events
46
+ core_1.Hub.listen('analytics', analyticsListener);
47
+ (0, utils_3.initialize)();
48
+ }
49
+ function analyticsListener({ payload, }) {
50
+ const { event, data } = payload;
51
+ switch (event) {
52
+ case 'record': {
53
+ (0, dispatchEvent_1.dispatchEvent)(data);
54
+ break;
55
+ }
56
+ }
57
+ }
58
+ //# sourceMappingURL=initializeInAppMessaging.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initializeInAppMessaging.js","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.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.initializeInAppMessaging = initializeInAppMessaging;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst core_1 = require(\"@aws-amplify/core\");\nconst eventListeners_1 = require(\"../../../../eventListeners\");\nconst helpers_1 = require(\"../utils/helpers\");\nconst types_1 = require(\"../types\");\nconst utils_2 = require(\"../utils\");\nconst utils_3 = require(\"../../../utils\");\nconst dispatchEvent_1 = require(\"./dispatchEvent\");\n/**\n * Initialize and set up in-app messaging category. This API needs to be called to enable other InAppMessaging APIs.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\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 */\nfunction initializeInAppMessaging() {\n if ((0, utils_3.isInitialized)()) {\n return;\n }\n // register with the session listener\n utils_1.sessionListener.addStateChangeListener(utils_2.sessionStateChangeHandler, true);\n // wire up default Pinpoint message event handling\n (0, eventListeners_1.addEventListener)('messageDisplayed', (message) => {\n (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_DISPLAYED, message);\n (0, utils_2.incrementMessageCounts)(message.id);\n });\n (0, eventListeners_1.addEventListener)('messageDismissed', (message) => {\n (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_DISMISSED, message);\n });\n (0, eventListeners_1.addEventListener)('messageActionTaken', (message) => {\n (0, helpers_1.recordAnalyticsEvent)(types_1.PinpointMessageEvent.MESSAGE_ACTION_TAKEN, message);\n });\n // listen to analytics hub events\n core_1.Hub.listen('analytics', analyticsListener);\n (0, utils_3.initialize)();\n}\nfunction analyticsListener({ payload, }) {\n const { event, data } = payload;\n switch (event) {\n case 'record': {\n (0, dispatchEvent_1.dispatchEvent)(data);\n break;\n }\n default:\n break;\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,wBAAwB,GAAG,wBAAwB;AAC3D,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC;AAC9D,MAAM,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAC7C,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wBAAwB,GAAG;AACpC,IAAI,IAAI,IAAI,OAAO,CAAC,aAAa,GAAG,EAAE;AACtC,QAAQ;AACR,IAAI;AACJ;AACA,IAAI,OAAO,CAAC,eAAe,CAAC,sBAAsB,CAAC,OAAO,CAAC,yBAAyB,EAAE,IAAI,CAAC;AAC3F;AACA,IAAI,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,CAAC,OAAO,KAAK;AAC5E,QAAQ,IAAI,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,OAAO,CAAC;AACpG,QAAQ,IAAI,OAAO,CAAC,sBAAsB,EAAE,OAAO,CAAC,EAAE,CAAC;AACvD,IAAI,CAAC,CAAC;AACN,IAAI,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,CAAC,OAAO,KAAK;AAC5E,QAAQ,IAAI,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,OAAO,CAAC;AACpG,IAAI,CAAC,CAAC;AACN,IAAI,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,oBAAoB,EAAE,CAAC,OAAO,KAAK;AAC9E,QAAQ,IAAI,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,CAAC,oBAAoB,EAAE,OAAO,CAAC;AACvG,IAAI,CAAC,CAAC;AACN;AACA,IAAI,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,iBAAiB,CAAC;AACrD,IAAI,IAAI,OAAO,CAAC,UAAU,GAAG;AAC7B;AACA,SAAS,iBAAiB,CAAC,EAAE,OAAO,GAAG,EAAE;AACzC,IAAI,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,OAAO;AACnC,IAAI,QAAQ,KAAK;AACjB,QAAQ,KAAK,QAAQ,EAAE;AACvB,YAAY,IAAI,eAAe,CAAC,aAAa,EAAE,IAAI,CAAC;AACpD,YAAY;AACZ,QAAQ;AAGR;AACA;;"}
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.notifyMessageInteraction = notifyMessageInteraction;
7
+ const eventListeners_1 = require("../../../../eventListeners");
8
+ const utils_1 = require("../../../utils");
9
+ /**
10
+ * Notifies the respective listener of the specified type with the message given.
11
+ *
12
+ * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.
13
+ *
14
+ * @param {NotifyMessageInteractionInput} input - The input object that holds the type and message.
15
+ * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library
16
+ * configuration is incorrect, or if In App messaging hasn't been initialized.
17
+ * @example
18
+ * ```ts
19
+ * onMessageRecieved((message) => {
20
+ * // Show end users the In-App message and notify event listeners
21
+ * notifyMessageInteraction({ type: 'messageDisplayed', message });
22
+ * });
23
+ * ```
24
+ */
25
+ function notifyMessageInteraction({ type, message, }) {
26
+ (0, utils_1.assertIsInitialized)();
27
+ (0, eventListeners_1.notifyEventListeners)(type, message);
28
+ }
29
+ //# sourceMappingURL=notifyMessageInteraction.js.map