@aws-amplify/notifications 2.0.1-api-v6-models.8035dfc.0 → 2.0.1-api-v6-models.3eb7748.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (641) hide show
  1. package/in-app-messaging/package.json +7 -0
  2. package/in-app-messaging/pinpoint/package.json +7 -0
  3. package/lib/{common/eventListeners/index.d.ts → eventListeners/eventListeners.d.ts} +2 -2
  4. package/lib/{common/eventListeners/index.js → eventListeners/eventListeners.js} +3 -2
  5. package/lib/eventListeners/index.d.ts +2 -0
  6. package/lib/{common → eventListeners}/index.js +0 -3
  7. package/lib/eventListeners/types.d.ts +10 -0
  8. package/lib/{common/AWSPinpointProviderCommon → eventListeners}/types.js +0 -1
  9. package/lib/inAppMessaging/errors/InAppMessagingError.js +0 -1
  10. package/lib/inAppMessaging/errors/assertServiceError.js +0 -1
  11. package/lib/inAppMessaging/errors/assertValidationError.js +0 -1
  12. package/lib/inAppMessaging/errors/index.js +0 -1
  13. package/lib/inAppMessaging/errors/validation.d.ts +1 -1
  14. package/lib/inAppMessaging/errors/validation.js +4 -4
  15. package/lib/inAppMessaging/index.d.ts +1 -1
  16. package/lib/inAppMessaging/index.js +6 -1
  17. package/lib/inAppMessaging/providers/index.d.ts +2 -1
  18. package/lib/inAppMessaging/providers/index.js +11 -6
  19. package/lib/inAppMessaging/providers/pinpoint/apis/dispatchEvent.d.ts +8 -5
  20. package/lib/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js +20 -14
  21. package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +5 -10
  22. package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.js +13 -17
  23. package/lib/inAppMessaging/providers/pinpoint/apis/index.d.ts +6 -0
  24. package/lib/inAppMessaging/providers/pinpoint/apis/index.js +12 -1
  25. package/lib/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.d.ts +12 -0
  26. package/lib/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +57 -0
  27. package/lib/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.d.ts +16 -0
  28. package/lib/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +26 -0
  29. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.d.ts +18 -0
  30. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js +26 -0
  31. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.d.ts +18 -0
  32. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js +26 -0
  33. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.d.ts +18 -0
  34. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js +26 -0
  35. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageReceived.d.ts +18 -0
  36. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js +26 -0
  37. package/lib/inAppMessaging/providers/pinpoint/apis/setConflictHandler.d.ts +6 -6
  38. package/lib/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +8 -7
  39. package/lib/inAppMessaging/providers/pinpoint/apis/syncMessages.d.ts +1 -3
  40. package/lib/inAppMessaging/providers/pinpoint/apis/syncMessages.js +22 -31
  41. package/lib/inAppMessaging/providers/pinpoint/index.d.ts +2 -1
  42. package/lib/inAppMessaging/providers/pinpoint/index.js +6 -1
  43. package/lib/inAppMessaging/providers/pinpoint/types/index.d.ts +3 -3
  44. package/lib/inAppMessaging/providers/pinpoint/types/index.js +0 -3
  45. package/lib/inAppMessaging/providers/pinpoint/types/inputs.d.ts +25 -2
  46. package/lib/inAppMessaging/providers/pinpoint/types/inputs.js +0 -1
  47. package/lib/inAppMessaging/providers/pinpoint/types/options.js +0 -1
  48. package/lib/inAppMessaging/providers/pinpoint/types/outputs.d.ts +17 -0
  49. package/lib/{common/eventListeners/types.js → inAppMessaging/providers/pinpoint/types/outputs.js} +0 -1
  50. package/lib/inAppMessaging/providers/pinpoint/types/types.d.ts +1 -0
  51. package/lib/inAppMessaging/providers/pinpoint/types/types.js +0 -1
  52. package/lib/inAppMessaging/providers/pinpoint/utils/constants.js +0 -1
  53. package/lib/inAppMessaging/providers/pinpoint/utils/helpers.d.ts +1 -2
  54. package/lib/inAppMessaging/providers/pinpoint/utils/helpers.js +1 -5
  55. package/lib/inAppMessaging/providers/pinpoint/utils/index.d.ts +1 -1
  56. package/lib/inAppMessaging/providers/pinpoint/utils/index.js +4 -3
  57. package/lib/inAppMessaging/providers/pinpoint/utils/{processInAppMessages.d.ts → messageProcessingHelpers.d.ts} +3 -0
  58. package/lib/inAppMessaging/providers/pinpoint/utils/{processInAppMessages.js → messageProcessingHelpers.js} +75 -12
  59. package/lib/inAppMessaging/providers/pinpoint/utils/resolveConfig.js +0 -1
  60. package/lib/inAppMessaging/providers/pinpoint/utils/resolveCredentials.d.ts +1 -6
  61. package/lib/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js +0 -1
  62. package/lib/inAppMessaging/providers/pinpoint/utils/userAgent.js +0 -1
  63. package/lib/inAppMessaging/types/event.js +0 -1
  64. package/lib/inAppMessaging/types/index.d.ts +1 -2
  65. package/lib/inAppMessaging/types/index.js +0 -1
  66. package/lib/inAppMessaging/types/inputs.d.ts +1 -3
  67. package/lib/inAppMessaging/types/inputs.js +0 -1
  68. package/lib/inAppMessaging/types/message.js +0 -1
  69. package/lib/inAppMessaging/types/options.d.ts +1 -1
  70. package/lib/inAppMessaging/types/options.js +0 -1
  71. package/lib/inAppMessaging/utils/index.d.ts +1 -0
  72. package/lib/inAppMessaging/utils/index.js +8 -0
  73. package/lib/inAppMessaging/utils/statusHelpers.d.ts +13 -0
  74. package/lib/inAppMessaging/utils/statusHelpers.js +24 -0
  75. package/lib/index.d.ts +0 -4
  76. package/lib/index.js +0 -7
  77. package/lib/pushNotifications/Platform/index.js +0 -1
  78. package/lib/pushNotifications/Platform/index.native.js +0 -1
  79. package/lib/pushNotifications/Platform/types.js +0 -1
  80. package/lib/pushNotifications/errors/PushNotificationError.d.ts +4 -0
  81. package/lib/pushNotifications/errors/PushNotificationError.js +19 -0
  82. package/lib/pushNotifications/errors/errorHelpers.d.ts +9 -0
  83. package/lib/pushNotifications/errors/errorHelpers.js +34 -0
  84. package/lib/pushNotifications/errors/index.d.ts +2 -0
  85. package/lib/pushNotifications/errors/index.js +9 -0
  86. package/lib/pushNotifications/index.d.ts +3 -2
  87. package/lib/pushNotifications/index.js +12 -3
  88. package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.d.ts +14 -0
  89. package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.js +20 -0
  90. package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.d.ts +2 -0
  91. package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js +14 -0
  92. package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.d.ts +18 -0
  93. package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js +24 -0
  94. package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.d.ts +2 -0
  95. package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js +11 -0
  96. package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.d.ts +27 -0
  97. package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js +33 -0
  98. package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.d.ts +2 -0
  99. package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js +11 -0
  100. package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.d.ts +53 -2
  101. package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.js +55 -5
  102. package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.native.d.ts +2 -0
  103. package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.native.js +42 -0
  104. package/lib/pushNotifications/providers/pinpoint/apis/index.d.ts +10 -0
  105. package/lib/pushNotifications/providers/pinpoint/apis/index.js +20 -1
  106. package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.d.ts +17 -0
  107. package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js +23 -0
  108. package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.d.ts +1 -0
  109. package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js +158 -0
  110. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.d.ts +27 -0
  111. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js +33 -0
  112. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.d.ts +2 -0
  113. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js +10 -0
  114. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.d.ts +43 -0
  115. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js +49 -0
  116. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.d.ts +2 -0
  117. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js +10 -0
  118. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.d.ts +27 -0
  119. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js +33 -0
  120. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.d.ts +2 -0
  121. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js +10 -0
  122. package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.d.ts +28 -0
  123. package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.js +34 -0
  124. package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.d.ts +2 -0
  125. package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js +10 -0
  126. package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.d.ts +32 -0
  127. package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.js +38 -0
  128. package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.native.d.ts +2 -0
  129. package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js +11 -0
  130. package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.d.ts +14 -0
  131. package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.js +20 -0
  132. package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.d.ts +2 -0
  133. package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js +11 -0
  134. package/lib/pushNotifications/providers/pinpoint/index.d.ts +3 -1
  135. package/lib/pushNotifications/providers/pinpoint/index.js +10 -1
  136. package/lib/pushNotifications/providers/pinpoint/types/analytics.d.ts +6 -0
  137. package/lib/{inAppMessaging/sessionTracker/types.js → pushNotifications/providers/pinpoint/types/analytics.js} +0 -1
  138. package/lib/pushNotifications/providers/pinpoint/types/apis.d.ts +13 -0
  139. package/lib/{types.js → pushNotifications/providers/pinpoint/types/apis.js} +0 -1
  140. package/lib/pushNotifications/providers/pinpoint/types/index.d.ts +6 -0
  141. package/lib/pushNotifications/providers/pinpoint/types/index.js +4 -0
  142. package/lib/pushNotifications/providers/pinpoint/types/inputs.d.ts +9 -0
  143. package/lib/pushNotifications/providers/pinpoint/types/inputs.js +4 -0
  144. package/lib/pushNotifications/providers/pinpoint/types/options.d.ts +5 -0
  145. package/lib/pushNotifications/providers/pinpoint/types/options.js +4 -0
  146. package/lib/pushNotifications/providers/pinpoint/types/outputs.d.ts +9 -0
  147. package/lib/pushNotifications/providers/pinpoint/types/outputs.js +4 -0
  148. package/lib/pushNotifications/providers/pinpoint/types/pushNotifications.d.ts +2 -0
  149. package/lib/pushNotifications/providers/pinpoint/types/pushNotifications.js +4 -0
  150. package/lib/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.d.ts +5 -0
  151. package/lib/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js +59 -0
  152. package/lib/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.d.ts +6 -0
  153. package/lib/pushNotifications/providers/{AWSPinpointProvider/utils.js → pinpoint/utils/getAnalyticsEvent.js} +8 -10
  154. package/lib/pushNotifications/providers/pinpoint/utils/getChannelType.d.ts +4 -0
  155. package/lib/pushNotifications/providers/pinpoint/utils/getChannelType.js +23 -0
  156. package/lib/pushNotifications/providers/pinpoint/utils/getPushNotificationUserAgentString.d.ts +2 -0
  157. package/lib/pushNotifications/providers/pinpoint/utils/getPushNotificationUserAgentString.js +11 -0
  158. package/lib/pushNotifications/providers/pinpoint/utils/index.d.ts +3 -0
  159. package/lib/pushNotifications/providers/pinpoint/utils/index.js +10 -0
  160. package/lib/pushNotifications/types/errors.d.ts +3 -0
  161. package/lib/pushNotifications/types/errors.js +8 -0
  162. package/lib/pushNotifications/types/index.d.ts +5 -0
  163. package/lib/pushNotifications/types/index.js +6 -0
  164. package/lib/pushNotifications/types/inputs.d.ts +23 -0
  165. package/lib/pushNotifications/types/inputs.js +4 -0
  166. package/lib/pushNotifications/types/options.d.ts +4 -0
  167. package/lib/pushNotifications/types/options.js +4 -0
  168. package/lib/pushNotifications/types/outputs.d.ts +10 -0
  169. package/lib/pushNotifications/types/outputs.js +4 -0
  170. package/lib/pushNotifications/types/pushNotifications.d.ts +5 -0
  171. package/lib/pushNotifications/types/pushNotifications.js +4 -0
  172. package/lib/pushNotifications/utils/index.d.ts +4 -0
  173. package/lib/pushNotifications/utils/index.js +14 -0
  174. package/lib/pushNotifications/utils/initializationManager.d.ts +12 -0
  175. package/lib/pushNotifications/utils/initializationManager.js +23 -0
  176. package/lib/pushNotifications/utils/resolveConfig.d.ts +7 -0
  177. package/lib/pushNotifications/utils/resolveConfig.js +16 -0
  178. package/lib/pushNotifications/utils/resolveCredentials.d.ts +7 -0
  179. package/lib/pushNotifications/utils/resolveCredentials.js +22 -0
  180. package/lib/pushNotifications/utils/tokenManager.d.ts +12 -0
  181. package/lib/pushNotifications/utils/tokenManager.js +19 -0
  182. package/lib/tsconfig.build.tsbuildinfo +8667 -0
  183. package/lib-esm/{common/eventListeners/index.d.ts → eventListeners/eventListeners.d.ts} +2 -2
  184. package/lib-esm/{common/eventListeners/index.js → eventListeners/eventListeners.js} +3 -2
  185. package/lib-esm/eventListeners/index.d.ts +2 -0
  186. package/lib-esm/{common → eventListeners}/index.js +0 -2
  187. package/lib-esm/eventListeners/types.d.ts +10 -0
  188. package/lib-esm/{common/AWSPinpointProviderCommon → eventListeners}/types.js +0 -1
  189. package/lib-esm/inAppMessaging/errors/InAppMessagingError.js +0 -1
  190. package/lib-esm/inAppMessaging/errors/assertServiceError.js +0 -1
  191. package/lib-esm/inAppMessaging/errors/assertValidationError.js +0 -1
  192. package/lib-esm/inAppMessaging/errors/index.js +0 -1
  193. package/lib-esm/inAppMessaging/errors/validation.d.ts +1 -1
  194. package/lib-esm/inAppMessaging/errors/validation.js +4 -4
  195. package/lib-esm/inAppMessaging/index.d.ts +1 -1
  196. package/lib-esm/inAppMessaging/index.js +1 -2
  197. package/lib-esm/inAppMessaging/providers/index.d.ts +2 -1
  198. package/lib-esm/inAppMessaging/providers/index.js +1 -2
  199. package/lib-esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.d.ts +8 -5
  200. package/lib-esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js +19 -13
  201. package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +5 -10
  202. package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.js +14 -18
  203. package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.d.ts +6 -0
  204. package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.js +6 -1
  205. package/lib-esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.d.ts +12 -0
  206. package/lib-esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +54 -0
  207. package/lib-esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.d.ts +16 -0
  208. package/lib-esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +23 -0
  209. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.d.ts +18 -0
  210. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js +23 -0
  211. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.d.ts +18 -0
  212. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js +23 -0
  213. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.d.ts +18 -0
  214. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js +23 -0
  215. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.d.ts +18 -0
  216. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js +23 -0
  217. package/lib-esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.d.ts +6 -6
  218. package/lib-esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +8 -7
  219. package/lib-esm/inAppMessaging/providers/pinpoint/apis/syncMessages.d.ts +1 -3
  220. package/lib-esm/inAppMessaging/providers/pinpoint/apis/syncMessages.js +24 -33
  221. package/lib-esm/inAppMessaging/providers/pinpoint/index.d.ts +2 -1
  222. package/lib-esm/inAppMessaging/providers/pinpoint/index.js +1 -2
  223. package/lib-esm/inAppMessaging/providers/pinpoint/types/index.d.ts +3 -3
  224. package/lib-esm/inAppMessaging/providers/pinpoint/types/index.js +0 -2
  225. package/lib-esm/inAppMessaging/providers/pinpoint/types/inputs.d.ts +25 -2
  226. package/lib-esm/inAppMessaging/providers/pinpoint/types/inputs.js +0 -1
  227. package/lib-esm/inAppMessaging/providers/pinpoint/types/options.js +0 -1
  228. package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.d.ts +17 -0
  229. package/lib-esm/{common/eventListeners/types.js → inAppMessaging/providers/pinpoint/types/outputs.js} +0 -1
  230. package/lib-esm/inAppMessaging/providers/pinpoint/types/types.d.ts +1 -0
  231. package/lib-esm/inAppMessaging/providers/pinpoint/types/types.js +0 -1
  232. package/lib-esm/inAppMessaging/providers/pinpoint/utils/constants.js +0 -1
  233. package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.d.ts +1 -2
  234. package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.js +3 -7
  235. package/lib-esm/inAppMessaging/providers/pinpoint/utils/index.d.ts +1 -1
  236. package/lib-esm/inAppMessaging/providers/pinpoint/utils/index.js +1 -2
  237. package/lib-esm/inAppMessaging/providers/pinpoint/utils/{processInAppMessages.d.ts → messageProcessingHelpers.d.ts} +3 -0
  238. package/lib-esm/inAppMessaging/providers/pinpoint/utils/{processInAppMessages.js → messageProcessingHelpers.js} +74 -13
  239. package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveConfig.js +0 -1
  240. package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.d.ts +1 -6
  241. package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js +0 -1
  242. package/lib-esm/inAppMessaging/providers/pinpoint/utils/userAgent.js +0 -1
  243. package/lib-esm/inAppMessaging/types/event.js +0 -1
  244. package/lib-esm/inAppMessaging/types/index.d.ts +1 -2
  245. package/lib-esm/inAppMessaging/types/index.js +0 -1
  246. package/lib-esm/inAppMessaging/types/inputs.d.ts +1 -3
  247. package/lib-esm/inAppMessaging/types/inputs.js +0 -1
  248. package/lib-esm/inAppMessaging/types/message.js +0 -1
  249. package/lib-esm/inAppMessaging/types/options.d.ts +1 -1
  250. package/lib-esm/inAppMessaging/types/options.js +0 -1
  251. package/lib-esm/inAppMessaging/utils/index.d.ts +1 -0
  252. package/lib-esm/{pushNotifications/providers → inAppMessaging/utils}/index.js +1 -2
  253. package/lib-esm/inAppMessaging/utils/statusHelpers.d.ts +13 -0
  254. package/lib-esm/inAppMessaging/utils/statusHelpers.js +21 -0
  255. package/lib-esm/index.d.ts +0 -4
  256. package/lib-esm/index.js +0 -3
  257. package/lib-esm/pushNotifications/Platform/index.js +0 -1
  258. package/lib-esm/pushNotifications/Platform/index.native.js +0 -1
  259. package/lib-esm/pushNotifications/Platform/types.js +0 -1
  260. package/lib-esm/pushNotifications/errors/PushNotificationError.d.ts +4 -0
  261. package/lib-esm/pushNotifications/errors/PushNotificationError.js +17 -0
  262. package/lib-esm/pushNotifications/errors/errorHelpers.d.ts +9 -0
  263. package/lib-esm/pushNotifications/errors/errorHelpers.js +32 -0
  264. package/lib-esm/pushNotifications/errors/index.d.ts +2 -0
  265. package/lib-esm/pushNotifications/errors/index.js +4 -0
  266. package/lib-esm/pushNotifications/index.d.ts +3 -2
  267. package/lib-esm/pushNotifications/index.js +2 -3
  268. package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.d.ts +14 -0
  269. package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.js +18 -0
  270. package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.d.ts +2 -0
  271. package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js +12 -0
  272. package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.d.ts +18 -0
  273. package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js +22 -0
  274. package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.d.ts +2 -0
  275. package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js +9 -0
  276. package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.d.ts +27 -0
  277. package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js +31 -0
  278. package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.d.ts +2 -0
  279. package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js +9 -0
  280. package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.d.ts +53 -2
  281. package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.js +55 -4
  282. package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.d.ts +2 -0
  283. package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.js +40 -0
  284. package/lib-esm/pushNotifications/providers/pinpoint/apis/index.d.ts +10 -0
  285. package/lib-esm/pushNotifications/providers/pinpoint/apis/index.js +10 -1
  286. package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.d.ts +17 -0
  287. package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js +21 -0
  288. package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.d.ts +1 -0
  289. package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js +156 -0
  290. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.d.ts +27 -0
  291. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js +31 -0
  292. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.d.ts +2 -0
  293. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js +8 -0
  294. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.d.ts +43 -0
  295. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js +47 -0
  296. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.d.ts +2 -0
  297. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js +8 -0
  298. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.d.ts +27 -0
  299. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js +31 -0
  300. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.d.ts +2 -0
  301. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js +8 -0
  302. package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.d.ts +28 -0
  303. package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.js +32 -0
  304. package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.d.ts +2 -0
  305. package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js +8 -0
  306. package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.d.ts +32 -0
  307. package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.js +36 -0
  308. package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.native.d.ts +2 -0
  309. package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js +9 -0
  310. package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.d.ts +14 -0
  311. package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.js +18 -0
  312. package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.d.ts +2 -0
  313. package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js +9 -0
  314. package/lib-esm/pushNotifications/providers/pinpoint/index.d.ts +3 -1
  315. package/lib-esm/pushNotifications/providers/pinpoint/index.js +1 -2
  316. package/lib-esm/pushNotifications/providers/pinpoint/types/analytics.d.ts +6 -0
  317. package/lib-esm/{inAppMessaging/sessionTracker/types.js → pushNotifications/providers/pinpoint/types/analytics.js} +0 -1
  318. package/lib-esm/pushNotifications/providers/pinpoint/types/apis.d.ts +13 -0
  319. package/lib-esm/{types.js → pushNotifications/providers/pinpoint/types/apis.js} +0 -1
  320. package/lib-esm/pushNotifications/providers/pinpoint/types/index.d.ts +6 -0
  321. package/lib-esm/pushNotifications/providers/pinpoint/types/index.js +2 -0
  322. package/lib-esm/pushNotifications/providers/pinpoint/types/inputs.d.ts +9 -0
  323. package/lib-esm/pushNotifications/providers/pinpoint/types/inputs.js +2 -0
  324. package/lib-esm/pushNotifications/providers/pinpoint/types/options.d.ts +5 -0
  325. package/lib-esm/pushNotifications/providers/pinpoint/types/options.js +2 -0
  326. package/lib-esm/pushNotifications/providers/pinpoint/types/outputs.d.ts +9 -0
  327. package/lib-esm/pushNotifications/providers/pinpoint/types/outputs.js +2 -0
  328. package/lib-esm/pushNotifications/providers/pinpoint/types/pushNotifications.d.ts +2 -0
  329. package/lib-esm/pushNotifications/providers/pinpoint/types/pushNotifications.js +2 -0
  330. package/lib-esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.d.ts +5 -0
  331. package/lib-esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js +57 -0
  332. package/lib-esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.d.ts +6 -0
  333. package/lib-esm/pushNotifications/providers/{AWSPinpointProvider/utils.js → pinpoint/utils/getAnalyticsEvent.js} +8 -10
  334. package/lib-esm/pushNotifications/providers/pinpoint/utils/getChannelType.d.ts +4 -0
  335. package/lib-esm/pushNotifications/providers/pinpoint/utils/getChannelType.js +21 -0
  336. package/lib-esm/pushNotifications/providers/pinpoint/utils/getPushNotificationUserAgentString.d.ts +2 -0
  337. package/lib-esm/pushNotifications/providers/pinpoint/utils/getPushNotificationUserAgentString.js +9 -0
  338. package/lib-esm/pushNotifications/providers/pinpoint/utils/index.d.ts +3 -0
  339. package/lib-esm/pushNotifications/providers/pinpoint/utils/index.js +5 -0
  340. package/lib-esm/pushNotifications/types/errors.d.ts +3 -0
  341. package/lib-esm/pushNotifications/types/errors.js +6 -0
  342. package/lib-esm/pushNotifications/types/index.d.ts +5 -0
  343. package/lib-esm/pushNotifications/types/index.js +3 -0
  344. package/lib-esm/pushNotifications/types/inputs.d.ts +23 -0
  345. package/lib-esm/pushNotifications/types/inputs.js +2 -0
  346. package/lib-esm/pushNotifications/types/options.d.ts +4 -0
  347. package/lib-esm/pushNotifications/types/options.js +2 -0
  348. package/lib-esm/pushNotifications/types/outputs.d.ts +10 -0
  349. package/lib-esm/pushNotifications/types/outputs.js +2 -0
  350. package/lib-esm/pushNotifications/types/pushNotifications.d.ts +5 -0
  351. package/lib-esm/pushNotifications/types/pushNotifications.js +2 -0
  352. package/lib-esm/pushNotifications/utils/index.d.ts +4 -0
  353. package/lib-esm/pushNotifications/utils/index.js +6 -0
  354. package/lib-esm/pushNotifications/utils/initializationManager.d.ts +12 -0
  355. package/lib-esm/pushNotifications/utils/initializationManager.js +21 -0
  356. package/lib-esm/pushNotifications/utils/resolveConfig.d.ts +7 -0
  357. package/lib-esm/pushNotifications/utils/resolveConfig.js +14 -0
  358. package/lib-esm/pushNotifications/utils/resolveCredentials.d.ts +7 -0
  359. package/lib-esm/pushNotifications/utils/resolveCredentials.js +20 -0
  360. package/lib-esm/pushNotifications/utils/tokenManager.d.ts +12 -0
  361. package/lib-esm/pushNotifications/utils/tokenManager.js +17 -0
  362. package/lib-esm/tsconfig.build.tsbuildinfo +7115 -0
  363. package/package.json +16 -15
  364. package/push-notifications/package.json +7 -0
  365. package/push-notifications/pinpoint/package.json +7 -0
  366. package/src/{common/eventListeners/index.ts → eventListeners/eventListeners.ts} +5 -3
  367. package/src/{common → eventListeners}/index.ts +1 -2
  368. package/src/{common/eventListeners → eventListeners}/types.ts +6 -2
  369. package/src/inAppMessaging/errors/validation.ts +5 -3
  370. package/src/inAppMessaging/index.ts +18 -0
  371. package/src/inAppMessaging/providers/index.ts +30 -1
  372. package/src/inAppMessaging/providers/pinpoint/apis/dispatchEvent.ts +11 -7
  373. package/src/inAppMessaging/providers/pinpoint/apis/identifyUser.ts +12 -12
  374. package/src/inAppMessaging/providers/pinpoint/apis/index.ts +6 -0
  375. package/src/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.ts +62 -0
  376. package/src/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.ts +28 -0
  377. package/src/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.ts +29 -0
  378. package/src/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.ts +29 -0
  379. package/src/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.ts +29 -0
  380. package/src/inAppMessaging/providers/pinpoint/apis/onMessageReceived.ts +29 -0
  381. package/src/inAppMessaging/providers/pinpoint/apis/setConflictHandler.ts +8 -6
  382. package/src/inAppMessaging/providers/pinpoint/apis/syncMessages.ts +18 -34
  383. package/src/inAppMessaging/providers/pinpoint/index.ts +21 -0
  384. package/src/inAppMessaging/providers/pinpoint/types/index.ts +12 -1
  385. package/src/inAppMessaging/providers/pinpoint/types/inputs.ts +35 -1
  386. package/src/inAppMessaging/providers/pinpoint/types/outputs.ts +24 -0
  387. package/src/inAppMessaging/providers/pinpoint/types/types.ts +2 -0
  388. package/src/inAppMessaging/providers/pinpoint/utils/helpers.ts +3 -20
  389. package/src/inAppMessaging/providers/pinpoint/utils/index.ts +5 -1
  390. package/src/inAppMessaging/providers/pinpoint/utils/{processInAppMessages.ts → messageProcessingHelpers.ts} +57 -7
  391. package/src/inAppMessaging/types/index.ts +3 -1
  392. package/src/inAppMessaging/types/inputs.ts +1 -3
  393. package/src/inAppMessaging/types/options.ts +1 -1
  394. package/src/inAppMessaging/utils/index.ts +8 -0
  395. package/src/inAppMessaging/utils/statusHelpers.ts +32 -0
  396. package/src/index.ts +0 -9
  397. package/src/pushNotifications/errors/PushNotificationError.ts +18 -0
  398. package/src/pushNotifications/errors/errorHelpers.ts +45 -0
  399. package/src/pushNotifications/errors/index.ts +5 -0
  400. package/src/pushNotifications/index.ts +27 -5
  401. package/src/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.ts +13 -0
  402. package/src/pushNotifications/providers/pinpoint/apis/getBadgeCount.ts +21 -0
  403. package/src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.ts +14 -0
  404. package/src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.ts +26 -0
  405. package/src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.ts +14 -0
  406. package/src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.ts +34 -0
  407. package/src/pushNotifications/providers/pinpoint/apis/identifyUser.native.ts +36 -0
  408. package/src/pushNotifications/providers/pinpoint/apis/identifyUser.ts +58 -7
  409. package/src/pushNotifications/providers/pinpoint/apis/index.ts +10 -0
  410. package/src/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.ts +199 -0
  411. package/src/pushNotifications/providers/pinpoint/apis/initializePushNotifications.ts +24 -0
  412. package/src/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.ts +11 -0
  413. package/src/pushNotifications/providers/pinpoint/apis/onNotificationOpened.ts +39 -0
  414. package/src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.ts +12 -0
  415. package/src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.ts +56 -0
  416. package/src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.ts +12 -0
  417. package/src/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.ts +40 -0
  418. package/src/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.ts +11 -0
  419. package/src/pushNotifications/providers/pinpoint/apis/onTokenReceived.ts +39 -0
  420. package/src/pushNotifications/providers/pinpoint/apis/requestPermissions.native.ts +14 -0
  421. package/src/pushNotifications/providers/pinpoint/apis/requestPermissions.ts +39 -0
  422. package/src/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.ts +13 -0
  423. package/src/pushNotifications/providers/pinpoint/apis/setBadgeCount.ts +21 -0
  424. package/src/pushNotifications/providers/pinpoint/index.ts +30 -1
  425. package/src/pushNotifications/providers/pinpoint/types/analytics.ts +14 -0
  426. package/src/pushNotifications/providers/pinpoint/types/apis.ts +54 -0
  427. package/src/pushNotifications/providers/pinpoint/types/index.ts +40 -0
  428. package/src/pushNotifications/providers/pinpoint/types/inputs.ts +31 -0
  429. package/src/pushNotifications/providers/pinpoint/types/options.ts +9 -0
  430. package/src/pushNotifications/providers/pinpoint/types/outputs.ts +34 -0
  431. package/src/pushNotifications/providers/pinpoint/types/pushNotifications.ts +6 -0
  432. package/src/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.ts +65 -0
  433. package/src/pushNotifications/providers/{AWSPinpointProvider/utils.ts → pinpoint/utils/getAnalyticsEvent.ts} +19 -21
  434. package/src/pushNotifications/providers/pinpoint/utils/getChannelType.ts +25 -0
  435. package/src/pushNotifications/providers/pinpoint/utils/getPushNotificationUserAgentString.ts +15 -0
  436. package/src/pushNotifications/providers/pinpoint/utils/index.ts +6 -0
  437. package/src/pushNotifications/{providers/index.ts → types/errors.ts} +3 -1
  438. package/src/pushNotifications/types/index.ts +8 -0
  439. package/src/pushNotifications/types/inputs.ts +45 -0
  440. package/src/pushNotifications/types/options.ts +7 -0
  441. package/src/pushNotifications/types/outputs.ts +28 -0
  442. package/src/pushNotifications/types/pushNotifications.ts +22 -0
  443. package/src/pushNotifications/utils/index.ts +7 -0
  444. package/src/pushNotifications/utils/initializationManager.ts +20 -0
  445. package/src/pushNotifications/utils/resolveConfig.ts +16 -0
  446. package/src/pushNotifications/utils/resolveCredentials.ts +14 -0
  447. package/src/pushNotifications/utils/tokenManager.ts +20 -0
  448. package/lib/.tsbuildinfo +0 -3
  449. package/lib/common/AWSPinpointProviderCommon/index.d.ts +0 -40
  450. package/lib/common/AWSPinpointProviderCommon/index.js +0 -294
  451. package/lib/common/AWSPinpointProviderCommon/index.js.map +0 -1
  452. package/lib/common/AWSPinpointProviderCommon/types.d.ts +0 -10
  453. package/lib/common/AWSPinpointProviderCommon/types.js.map +0 -1
  454. package/lib/common/eventListeners/index.js.map +0 -1
  455. package/lib/common/eventListeners/types.d.ts +0 -7
  456. package/lib/common/eventListeners/types.js.map +0 -1
  457. package/lib/common/index.d.ts +0 -3
  458. package/lib/common/index.js.map +0 -1
  459. package/lib/inAppMessaging/errors/InAppMessagingError.js.map +0 -1
  460. package/lib/inAppMessaging/errors/assertServiceError.js.map +0 -1
  461. package/lib/inAppMessaging/errors/assertValidationError.js.map +0 -1
  462. package/lib/inAppMessaging/errors/index.js.map +0 -1
  463. package/lib/inAppMessaging/errors/validation.js.map +0 -1
  464. package/lib/inAppMessaging/index.js.map +0 -1
  465. package/lib/inAppMessaging/providers/index.js.map +0 -1
  466. package/lib/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js.map +0 -1
  467. package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.js.map +0 -1
  468. package/lib/inAppMessaging/providers/pinpoint/apis/index.js.map +0 -1
  469. package/lib/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js.map +0 -1
  470. package/lib/inAppMessaging/providers/pinpoint/apis/syncMessages.js.map +0 -1
  471. package/lib/inAppMessaging/providers/pinpoint/index.js.map +0 -1
  472. package/lib/inAppMessaging/providers/pinpoint/types/errors.d.ts +0 -9
  473. package/lib/inAppMessaging/providers/pinpoint/types/errors.js +0 -15
  474. package/lib/inAppMessaging/providers/pinpoint/types/errors.js.map +0 -1
  475. package/lib/inAppMessaging/providers/pinpoint/types/index.js.map +0 -1
  476. package/lib/inAppMessaging/providers/pinpoint/types/inputs.js.map +0 -1
  477. package/lib/inAppMessaging/providers/pinpoint/types/options.js.map +0 -1
  478. package/lib/inAppMessaging/providers/pinpoint/types/types.js.map +0 -1
  479. package/lib/inAppMessaging/providers/pinpoint/utils/constants.js.map +0 -1
  480. package/lib/inAppMessaging/providers/pinpoint/utils/helpers.js.map +0 -1
  481. package/lib/inAppMessaging/providers/pinpoint/utils/index.js.map +0 -1
  482. package/lib/inAppMessaging/providers/pinpoint/utils/processInAppMessages.js.map +0 -1
  483. package/lib/inAppMessaging/providers/pinpoint/utils/resolveConfig.js.map +0 -1
  484. package/lib/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js.map +0 -1
  485. package/lib/inAppMessaging/providers/pinpoint/utils/userAgent.js.map +0 -1
  486. package/lib/inAppMessaging/sessionTracker/SessionTracker.d.ts +0 -9
  487. package/lib/inAppMessaging/sessionTracker/SessionTracker.js +0 -67
  488. package/lib/inAppMessaging/sessionTracker/SessionTracker.js.map +0 -1
  489. package/lib/inAppMessaging/sessionTracker/SessionTracker.native.d.ts +0 -10
  490. package/lib/inAppMessaging/sessionTracker/SessionTracker.native.js +0 -53
  491. package/lib/inAppMessaging/sessionTracker/SessionTracker.native.js.map +0 -1
  492. package/lib/inAppMessaging/sessionTracker/index.d.ts +0 -3
  493. package/lib/inAppMessaging/sessionTracker/index.js +0 -8
  494. package/lib/inAppMessaging/sessionTracker/index.js.map +0 -1
  495. package/lib/inAppMessaging/sessionTracker/types.d.ts +0 -6
  496. package/lib/inAppMessaging/sessionTracker/types.js.map +0 -1
  497. package/lib/inAppMessaging/types/config.d.ts +0 -5
  498. package/lib/inAppMessaging/types/config.js +0 -3
  499. package/lib/inAppMessaging/types/config.js.map +0 -1
  500. package/lib/inAppMessaging/types/event.js.map +0 -1
  501. package/lib/inAppMessaging/types/index.js.map +0 -1
  502. package/lib/inAppMessaging/types/inputs.js.map +0 -1
  503. package/lib/inAppMessaging/types/message.js.map +0 -1
  504. package/lib/inAppMessaging/types/options.js.map +0 -1
  505. package/lib/index.js.map +0 -1
  506. package/lib/pushNotifications/NotEnabledError.d.ts +0 -3
  507. package/lib/pushNotifications/NotEnabledError.js +0 -16
  508. package/lib/pushNotifications/NotEnabledError.js.map +0 -1
  509. package/lib/pushNotifications/Platform/index.js.map +0 -1
  510. package/lib/pushNotifications/Platform/index.native.js.map +0 -1
  511. package/lib/pushNotifications/Platform/types.js.map +0 -1
  512. package/lib/pushNotifications/PlatformNotSupportedError.d.ts +0 -3
  513. package/lib/pushNotifications/PlatformNotSupportedError.js +0 -16
  514. package/lib/pushNotifications/PlatformNotSupportedError.js.map +0 -1
  515. package/lib/pushNotifications/index.js.map +0 -1
  516. package/lib/pushNotifications/providers/AWSPinpointProvider/index.d.ts +0 -15
  517. package/lib/pushNotifications/providers/AWSPinpointProvider/index.js +0 -65
  518. package/lib/pushNotifications/providers/AWSPinpointProvider/index.js.map +0 -1
  519. package/lib/pushNotifications/providers/AWSPinpointProvider/types.d.ts +0 -9
  520. package/lib/pushNotifications/providers/AWSPinpointProvider/types.js +0 -16
  521. package/lib/pushNotifications/providers/AWSPinpointProvider/types.js.map +0 -1
  522. package/lib/pushNotifications/providers/AWSPinpointProvider/utils.d.ts +0 -6
  523. package/lib/pushNotifications/providers/AWSPinpointProvider/utils.js.map +0 -1
  524. package/lib/pushNotifications/providers/index.d.ts +0 -1
  525. package/lib/pushNotifications/providers/index.js +0 -7
  526. package/lib/pushNotifications/providers/index.js.map +0 -1
  527. package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.js.map +0 -1
  528. package/lib/pushNotifications/providers/pinpoint/apis/index.js.map +0 -1
  529. package/lib/pushNotifications/providers/pinpoint/index.js.map +0 -1
  530. package/lib/pushNotifications/types.d.ts +0 -71
  531. package/lib/pushNotifications/types.js +0 -12
  532. package/lib/pushNotifications/types.js.map +0 -1
  533. package/lib/pushNotifications/utils.d.ts +0 -3
  534. package/lib/pushNotifications/utils.js +0 -81
  535. package/lib/pushNotifications/utils.js.map +0 -1
  536. package/lib/types.d.ts +0 -39
  537. package/lib/types.js.map +0 -1
  538. package/lib-esm/.tsbuildinfo +0 -3
  539. package/lib-esm/common/AWSPinpointProviderCommon/index.d.ts +0 -40
  540. package/lib-esm/common/AWSPinpointProviderCommon/index.js +0 -292
  541. package/lib-esm/common/AWSPinpointProviderCommon/index.js.map +0 -1
  542. package/lib-esm/common/AWSPinpointProviderCommon/types.d.ts +0 -10
  543. package/lib-esm/common/AWSPinpointProviderCommon/types.js.map +0 -1
  544. package/lib-esm/common/eventListeners/index.js.map +0 -1
  545. package/lib-esm/common/eventListeners/types.d.ts +0 -7
  546. package/lib-esm/common/eventListeners/types.js.map +0 -1
  547. package/lib-esm/common/index.d.ts +0 -3
  548. package/lib-esm/common/index.js.map +0 -1
  549. package/lib-esm/inAppMessaging/errors/InAppMessagingError.js.map +0 -1
  550. package/lib-esm/inAppMessaging/errors/assertServiceError.js.map +0 -1
  551. package/lib-esm/inAppMessaging/errors/assertValidationError.js.map +0 -1
  552. package/lib-esm/inAppMessaging/errors/index.js.map +0 -1
  553. package/lib-esm/inAppMessaging/errors/validation.js.map +0 -1
  554. package/lib-esm/inAppMessaging/index.js.map +0 -1
  555. package/lib-esm/inAppMessaging/providers/index.js.map +0 -1
  556. package/lib-esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js.map +0 -1
  557. package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.js.map +0 -1
  558. package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.js.map +0 -1
  559. package/lib-esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js.map +0 -1
  560. package/lib-esm/inAppMessaging/providers/pinpoint/apis/syncMessages.js.map +0 -1
  561. package/lib-esm/inAppMessaging/providers/pinpoint/index.js.map +0 -1
  562. package/lib-esm/inAppMessaging/providers/pinpoint/types/errors.d.ts +0 -9
  563. package/lib-esm/inAppMessaging/providers/pinpoint/types/errors.js +0 -13
  564. package/lib-esm/inAppMessaging/providers/pinpoint/types/errors.js.map +0 -1
  565. package/lib-esm/inAppMessaging/providers/pinpoint/types/index.js.map +0 -1
  566. package/lib-esm/inAppMessaging/providers/pinpoint/types/inputs.js.map +0 -1
  567. package/lib-esm/inAppMessaging/providers/pinpoint/types/options.js.map +0 -1
  568. package/lib-esm/inAppMessaging/providers/pinpoint/types/types.js.map +0 -1
  569. package/lib-esm/inAppMessaging/providers/pinpoint/utils/constants.js.map +0 -1
  570. package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.js.map +0 -1
  571. package/lib-esm/inAppMessaging/providers/pinpoint/utils/index.js.map +0 -1
  572. package/lib-esm/inAppMessaging/providers/pinpoint/utils/processInAppMessages.js.map +0 -1
  573. package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveConfig.js.map +0 -1
  574. package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js.map +0 -1
  575. package/lib-esm/inAppMessaging/providers/pinpoint/utils/userAgent.js.map +0 -1
  576. package/lib-esm/inAppMessaging/sessionTracker/SessionTracker.d.ts +0 -9
  577. package/lib-esm/inAppMessaging/sessionTracker/SessionTracker.js +0 -64
  578. package/lib-esm/inAppMessaging/sessionTracker/SessionTracker.js.map +0 -1
  579. package/lib-esm/inAppMessaging/sessionTracker/SessionTracker.native.d.ts +0 -10
  580. package/lib-esm/inAppMessaging/sessionTracker/SessionTracker.native.js +0 -50
  581. package/lib-esm/inAppMessaging/sessionTracker/SessionTracker.native.js.map +0 -1
  582. package/lib-esm/inAppMessaging/sessionTracker/index.d.ts +0 -3
  583. package/lib-esm/inAppMessaging/sessionTracker/index.js +0 -5
  584. package/lib-esm/inAppMessaging/sessionTracker/index.js.map +0 -1
  585. package/lib-esm/inAppMessaging/sessionTracker/types.d.ts +0 -6
  586. package/lib-esm/inAppMessaging/sessionTracker/types.js.map +0 -1
  587. package/lib-esm/inAppMessaging/types/config.d.ts +0 -5
  588. package/lib-esm/inAppMessaging/types/config.js +0 -1
  589. package/lib-esm/inAppMessaging/types/config.js.map +0 -1
  590. package/lib-esm/inAppMessaging/types/event.js.map +0 -1
  591. package/lib-esm/inAppMessaging/types/index.js.map +0 -1
  592. package/lib-esm/inAppMessaging/types/inputs.js.map +0 -1
  593. package/lib-esm/inAppMessaging/types/message.js.map +0 -1
  594. package/lib-esm/inAppMessaging/types/options.js.map +0 -1
  595. package/lib-esm/index.js.map +0 -1
  596. package/lib-esm/pushNotifications/NotEnabledError.d.ts +0 -3
  597. package/lib-esm/pushNotifications/NotEnabledError.js +0 -14
  598. package/lib-esm/pushNotifications/NotEnabledError.js.map +0 -1
  599. package/lib-esm/pushNotifications/Platform/index.js.map +0 -1
  600. package/lib-esm/pushNotifications/Platform/index.native.js.map +0 -1
  601. package/lib-esm/pushNotifications/Platform/types.js.map +0 -1
  602. package/lib-esm/pushNotifications/PlatformNotSupportedError.d.ts +0 -3
  603. package/lib-esm/pushNotifications/PlatformNotSupportedError.js +0 -14
  604. package/lib-esm/pushNotifications/PlatformNotSupportedError.js.map +0 -1
  605. package/lib-esm/pushNotifications/index.js.map +0 -1
  606. package/lib-esm/pushNotifications/providers/AWSPinpointProvider/index.d.ts +0 -15
  607. package/lib-esm/pushNotifications/providers/AWSPinpointProvider/index.js +0 -63
  608. package/lib-esm/pushNotifications/providers/AWSPinpointProvider/index.js.map +0 -1
  609. package/lib-esm/pushNotifications/providers/AWSPinpointProvider/types.d.ts +0 -9
  610. package/lib-esm/pushNotifications/providers/AWSPinpointProvider/types.js +0 -14
  611. package/lib-esm/pushNotifications/providers/AWSPinpointProvider/types.js.map +0 -1
  612. package/lib-esm/pushNotifications/providers/AWSPinpointProvider/utils.d.ts +0 -6
  613. package/lib-esm/pushNotifications/providers/AWSPinpointProvider/utils.js.map +0 -1
  614. package/lib-esm/pushNotifications/providers/index.d.ts +0 -1
  615. package/lib-esm/pushNotifications/providers/index.js.map +0 -1
  616. package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.js.map +0 -1
  617. package/lib-esm/pushNotifications/providers/pinpoint/apis/index.js.map +0 -1
  618. package/lib-esm/pushNotifications/providers/pinpoint/index.js.map +0 -1
  619. package/lib-esm/pushNotifications/types.d.ts +0 -71
  620. package/lib-esm/pushNotifications/types.js +0 -10
  621. package/lib-esm/pushNotifications/types.js.map +0 -1
  622. package/lib-esm/pushNotifications/utils.d.ts +0 -3
  623. package/lib-esm/pushNotifications/utils.js +0 -79
  624. package/lib-esm/pushNotifications/utils.js.map +0 -1
  625. package/lib-esm/types.d.ts +0 -39
  626. package/lib-esm/types.js.map +0 -1
  627. package/src/common/AWSPinpointProviderCommon/index.ts +0 -305
  628. package/src/common/AWSPinpointProviderCommon/types.ts +0 -29
  629. package/src/inAppMessaging/providers/pinpoint/types/errors.ts +0 -12
  630. package/src/inAppMessaging/sessionTracker/SessionTracker.native.ts +0 -60
  631. package/src/inAppMessaging/sessionTracker/SessionTracker.ts +0 -80
  632. package/src/inAppMessaging/sessionTracker/index.ts +0 -6
  633. package/src/inAppMessaging/sessionTracker/types.ts +0 -11
  634. package/src/inAppMessaging/types/config.ts +0 -8
  635. package/src/pushNotifications/NotEnabledError.ts +0 -11
  636. package/src/pushNotifications/PlatformNotSupportedError.ts +0 -9
  637. package/src/pushNotifications/providers/AWSPinpointProvider/index.ts +0 -93
  638. package/src/pushNotifications/providers/AWSPinpointProvider/types.ts +0 -13
  639. package/src/pushNotifications/types.ts +0 -114
  640. package/src/pushNotifications/utils.ts +0 -112
  641. package/src/types.ts +0 -56
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ var react_native_1 = require("@aws-amplify/react-native");
6
+ var errorHelpers_1 = require("../../../errors/errorHelpers");
7
+ var requestPermissionsNative = react_native_1.loadAmplifyPushNotification().requestPermissions;
8
+ exports.requestPermissions = function (input) {
9
+ errorHelpers_1.assertIsInitialized();
10
+ return requestPermissionsNative(input);
11
+ };
@@ -0,0 +1,14 @@
1
+ import { SetBadgeCount } from '../types';
2
+ /**
3
+ * Sets the current badge count (the number on the top right corner of your app's icon). Setting the badge count
4
+ * to 0 (zero) will remove the badge from your app's icon. This function is safe to call (but will be ignored) even
5
+ * when your React Native app is running on platforms where badges are not supported.
6
+ *
7
+ * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
8
+ * only React Native is supported by this API.
9
+ * @example
10
+ * ```ts
11
+ * setBadgeCount(42);
12
+ * ```
13
+ */
14
+ export declare const setBadgeCount: SetBadgeCount;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ var utils_1 = require("@aws-amplify/core/internals/utils");
6
+ /**
7
+ * Sets the current badge count (the number on the top right corner of your app's icon). Setting the badge count
8
+ * to 0 (zero) will remove the badge from your app's icon. This function is safe to call (but will be ignored) even
9
+ * when your React Native app is running on platforms where badges are not supported.
10
+ *
11
+ * @throws platform: {@link PlatformNotSupportedError} - Thrown if called against an unsupported platform. Currently,
12
+ * only React Native is supported by this API.
13
+ * @example
14
+ * ```ts
15
+ * setBadgeCount(42);
16
+ * ```
17
+ */
18
+ exports.setBadgeCount = function () {
19
+ throw new utils_1.PlatformNotSupportedError();
20
+ };
@@ -0,0 +1,2 @@
1
+ import { SetBadgeCount } from '../types';
2
+ export declare const setBadgeCount: SetBadgeCount;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ var react_native_1 = require("@aws-amplify/react-native");
6
+ var errorHelpers_1 = require("../../../errors/errorHelpers");
7
+ var setBadgeCountNative = react_native_1.loadAmplifyPushNotification().setBadgeCount;
8
+ exports.setBadgeCount = function (input) {
9
+ errorHelpers_1.assertIsInitialized();
10
+ setBadgeCountNative(input);
11
+ };
@@ -1 +1,3 @@
1
- export { identifyUser } from './apis';
1
+ export { getBadgeCount, getLaunchNotification, getPermissionStatus, identifyUser, initializePushNotifications, onNotificationOpened, onNotificationReceivedInBackground, onNotificationReceivedInForeground, onTokenReceived, requestPermissions, setBadgeCount, } from './apis';
2
+ export { IdentifyUserInput, OnNotificationOpenedInput, OnNotificationReceivedInBackgroundInput, OnNotificationReceivedInForegroundInput, OnTokenReceivedInput, RequestPermissionsInput, SetBadgeCountInput, } from './types/inputs';
3
+ export { GetLaunchNotificationOutput, GetPermissionStatusOutput, OnNotificationOpenedOutput, OnNotificationReceivedInBackgroundOutput, OnNotificationReceivedInForegroundOutput, OnTokenReceivedOutput, } from './types/outputs';
@@ -3,5 +3,14 @@
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  var apis_1 = require("./apis");
6
+ exports.getBadgeCount = apis_1.getBadgeCount;
7
+ exports.getLaunchNotification = apis_1.getLaunchNotification;
8
+ exports.getPermissionStatus = apis_1.getPermissionStatus;
6
9
  exports.identifyUser = apis_1.identifyUser;
7
- //# sourceMappingURL=index.js.map
10
+ exports.initializePushNotifications = apis_1.initializePushNotifications;
11
+ exports.onNotificationOpened = apis_1.onNotificationOpened;
12
+ exports.onNotificationReceivedInBackground = apis_1.onNotificationReceivedInBackground;
13
+ exports.onNotificationReceivedInForeground = apis_1.onNotificationReceivedInForeground;
14
+ exports.onTokenReceived = apis_1.onTokenReceived;
15
+ exports.requestPermissions = apis_1.requestPermissions;
16
+ exports.setBadgeCount = apis_1.setBadgeCount;
@@ -0,0 +1,6 @@
1
+ export declare type PinpointMessageEvent = 'opened_notification' | 'received_background' | 'received_foreground';
2
+ export declare type PinpointMessageEventSource = '_campaign' | '_journey';
3
+ export declare type AnalyticsEventAttributes = {
4
+ source: PinpointMessageEventSource;
5
+ attributes: Record<string, string>;
6
+ };
@@ -2,4 +2,3 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- //# sourceMappingURL=types.js.map
@@ -0,0 +1,13 @@
1
+ import { IdentifyUserInput, OnNotificationOpenedInput, OnNotificationReceivedInBackgroundInput, OnNotificationReceivedInForegroundInput, OnTokenReceivedInput, RequestPermissionsInput, SetBadgeCountInput } from './inputs';
2
+ import { GetBadgeCountOutput, GetLaunchNotificationOutput, GetPermissionStatusOutput, OnNotificationOpenedOutput, OnNotificationReceivedInBackgroundOutput, OnNotificationReceivedInForegroundOutput, OnTokenReceivedOutput, RequestPermissionsOutput } from './outputs';
3
+ export declare type GetBadgeCount = () => Promise<void | GetBadgeCountOutput>;
4
+ export declare type GetLaunchNotification = () => Promise<GetLaunchNotificationOutput>;
5
+ export declare type GetPermissionStatus = () => Promise<GetPermissionStatusOutput>;
6
+ export declare type IdentifyUser = (input: IdentifyUserInput) => Promise<void>;
7
+ export declare type InitializePushNotifications = () => void;
8
+ export declare type RequestPermissions = (input?: RequestPermissionsInput) => Promise<RequestPermissionsOutput>;
9
+ export declare type SetBadgeCount = (input: SetBadgeCountInput) => void;
10
+ export declare type OnNotificationOpened = (input: OnNotificationOpenedInput) => OnNotificationOpenedOutput;
11
+ export declare type OnNotificationReceivedInBackground = (input: OnNotificationReceivedInBackgroundInput) => OnNotificationReceivedInBackgroundOutput;
12
+ export declare type OnNotificationReceivedInForeground = (input: OnNotificationReceivedInForegroundInput) => OnNotificationReceivedInForegroundOutput;
13
+ export declare type OnTokenReceived = (input: OnTokenReceivedInput) => OnTokenReceivedOutput;
@@ -2,4 +2,3 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- //# sourceMappingURL=types.js.map
@@ -0,0 +1,6 @@
1
+ export { AnalyticsEventAttributes, PinpointMessageEvent, PinpointMessageEventSource, } from './analytics';
2
+ export { GetBadgeCount, GetLaunchNotification, GetPermissionStatus, IdentifyUser, InitializePushNotifications, OnNotificationOpened, OnNotificationReceivedInBackground, OnNotificationReceivedInForeground, OnTokenReceived, RequestPermissions, SetBadgeCount, } from './apis';
3
+ export { IdentifyUserInput, OnNotificationOpenedInput, OnNotificationReceivedInBackgroundInput, OnNotificationReceivedInForegroundInput, OnTokenReceivedInput, RequestPermissionsInput, SetBadgeCountInput, } from './inputs';
4
+ export { GetLaunchNotificationOutput, GetPermissionStatusOutput, OnNotificationOpenedOutput, OnNotificationReceivedInBackgroundOutput, OnNotificationReceivedInForegroundOutput, OnTokenReceivedOutput, } from './outputs';
5
+ export { IdentifyUserOptions } from './options';
6
+ export { ChannelType } from './pushNotifications';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import { IdentifyUserOptions } from './options';
2
+ import { PushNotificationIdentifyUserInput, PushNotificationRequestPermissionsInput, PushNotificationSetBadgeCountInput, PushNotificationOnNotificationOpenedInput, PushNotificationOnNotificationReceivedInBackgroundInput, PushNotificationOnNotificationReceivedInForegroundInput, PushNotificationOnTokenReceivedInput } from '../../../types';
3
+ export declare type IdentifyUserInput = PushNotificationIdentifyUserInput<IdentifyUserOptions>;
4
+ export declare type RequestPermissionsInput = PushNotificationRequestPermissionsInput;
5
+ export declare type SetBadgeCountInput = PushNotificationSetBadgeCountInput;
6
+ export declare type OnNotificationOpenedInput = PushNotificationOnNotificationOpenedInput;
7
+ export declare type OnNotificationReceivedInBackgroundInput = PushNotificationOnNotificationReceivedInBackgroundInput;
8
+ export declare type OnNotificationReceivedInForegroundInput = PushNotificationOnNotificationReceivedInForegroundInput;
9
+ export declare type OnTokenReceivedInput = PushNotificationOnTokenReceivedInput;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { PinpointServiceOptions } from '@aws-amplify/core/internals/providers/pinpoint';
2
+ /**
3
+ * Options specific to Pinpoint identityUser.
4
+ */
5
+ export declare type IdentifyUserOptions = PinpointServiceOptions;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import { PushNotificationGetBadgeCountOutput, PushNotificationGetLaunchNotificationOutput, PushNotificationGetPermissionStatusOutput, PushNotificationOnNotificationOpenedOutput, PushNotificationOnNotificationReceivedInBackgroundOutput, PushNotificationOnNotificationReceivedInForegroundOutput, PushNotificationOnTokenReceivedOutput, PushNotificationRequestPermissionsOutput } from '../../../types';
2
+ export declare type GetBadgeCountOutput = PushNotificationGetBadgeCountOutput;
3
+ export declare type GetLaunchNotificationOutput = PushNotificationGetLaunchNotificationOutput;
4
+ export declare type GetPermissionStatusOutput = PushNotificationGetPermissionStatusOutput;
5
+ export declare type RequestPermissionsOutput = PushNotificationRequestPermissionsOutput;
6
+ export declare type OnNotificationOpenedOutput = PushNotificationOnNotificationOpenedOutput;
7
+ export declare type OnNotificationReceivedInBackgroundOutput = PushNotificationOnNotificationReceivedInBackgroundOutput;
8
+ export declare type OnNotificationReceivedInForegroundOutput = PushNotificationOnNotificationReceivedInForegroundOutput;
9
+ export declare type OnTokenReceivedOutput = PushNotificationOnTokenReceivedOutput;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import { updateEndpoint } from '@aws-amplify/core/internals/providers/pinpoint';
2
+ export declare type ChannelType = Parameters<typeof updateEndpoint>[0]['channelType'];
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { OnPushNotificationMessageHandler, PushNotificationEvent } from '../../../types';
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare const createMessageEventRecorder: (event: PushNotificationEvent, callback?: Function) => OnPushNotificationMessageHandler;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ var tslib_1 = require("tslib");
6
+ var pinpoint_1 = require("@aws-amplify/core/internals/providers/pinpoint");
7
+ var core_1 = require("@aws-amplify/core");
8
+ var getAnalyticsEvent_1 = require("./getAnalyticsEvent");
9
+ var getChannelType_1 = require("./getChannelType");
10
+ var utils_1 = require("../../../utils");
11
+ var logger = new core_1.ConsoleLogger('PushNotification.recordMessageEvent');
12
+ /**
13
+ * @internal
14
+ */
15
+ exports.createMessageEventRecorder = function (event, callback) {
16
+ return function (message) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
17
+ var credentials, _a, appId, region;
18
+ return tslib_1.__generator(this, function (_b) {
19
+ switch (_b.label) {
20
+ case 0: return [4 /*yield*/, utils_1.resolveCredentials()];
21
+ case 1:
22
+ credentials = (_b.sent()).credentials;
23
+ _a = utils_1.resolveConfig(), appId = _a.appId, region = _a.region;
24
+ return [4 /*yield*/, recordMessageEvent({
25
+ appId: appId,
26
+ credentials: credentials,
27
+ event: event,
28
+ message: message,
29
+ region: region,
30
+ })];
31
+ case 2:
32
+ _b.sent();
33
+ callback === null || callback === void 0 ? void 0 : callback();
34
+ return [2 /*return*/];
35
+ }
36
+ });
37
+ }); };
38
+ };
39
+ var recordMessageEvent = function (_a) {
40
+ var appId = _a.appId, credentials = _a.credentials, event = _a.event, message = _a.message, region = _a.region;
41
+ return tslib_1.__awaiter(void 0, void 0, void 0, function () {
42
+ var analyticsEvent;
43
+ return tslib_1.__generator(this, function (_b) {
44
+ analyticsEvent = getAnalyticsEvent_1.getAnalyticsEvent(message, event);
45
+ if (!analyticsEvent) {
46
+ logger.debug('A notification missing event information was not recorded');
47
+ return [2 /*return*/];
48
+ }
49
+ return [2 /*return*/, pinpoint_1.record({
50
+ appId: appId,
51
+ category: 'PushNotification',
52
+ channelType: getChannelType_1.getChannelType(),
53
+ credentials: credentials,
54
+ event: analyticsEvent,
55
+ region: region,
56
+ })];
57
+ });
58
+ });
59
+ };
@@ -0,0 +1,6 @@
1
+ import { PinpointAnalyticsEvent } from '@aws-amplify/core/internals/providers/pinpoint';
2
+ import { PushNotificationEvent, PushNotificationMessage } from '../../../types';
3
+ /**
4
+ * @internal
5
+ */
6
+ export declare const getAnalyticsEvent: ({ data }: PushNotificationMessage, event: PushNotificationEvent) => PinpointAnalyticsEvent;
@@ -2,12 +2,12 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- var utils_1 = require("@aws-amplify/core/internals/utils");
6
- var types_1 = require("./types");
7
5
  var ANDROID_CAMPAIGN_ACTIVITY_ID_KEY = 'pinpoint.campaign.campaign_activity_id';
8
6
  var ANDROID_CAMPAIGN_ID_KEY = 'pinpoint.campaign.campaign_id';
9
7
  var ANDROID_CAMPAIGN_TREATMENT_ID_KEY = 'pinpoint.campaign.treatment_id';
10
- exports.logger = new utils_1.ConsoleLogger('PushNotification.AWSPinpointProvider');
8
+ /**
9
+ * @internal
10
+ */
11
11
  exports.getAnalyticsEvent = function (_a, event) {
12
12
  var data = _a.data;
13
13
  if (!data) {
@@ -19,15 +19,14 @@ exports.getAnalyticsEvent = function (_a, event) {
19
19
  }
20
20
  var source = eventAttributes.source, attributes = eventAttributes.attributes;
21
21
  return {
22
- Attributes: attributes,
23
- EventType: source + "." + event,
24
- Timestamp: new Date().toISOString(),
22
+ attributes: attributes,
23
+ name: source + "." + event,
25
24
  };
26
25
  };
27
26
  var getAnalyticsEventAttributes = function (data) {
28
27
  if (data.hasOwnProperty(ANDROID_CAMPAIGN_ID_KEY)) {
29
28
  return {
30
- source: types_1.AWSPinpointMessageEventSource.CAMPAIGN,
29
+ source: '_campaign',
31
30
  attributes: {
32
31
  campaign_activity_id: data[ANDROID_CAMPAIGN_ACTIVITY_ID_KEY],
33
32
  campaign_id: data[ANDROID_CAMPAIGN_ID_KEY],
@@ -40,15 +39,14 @@ var getAnalyticsEventAttributes = function (data) {
40
39
  : data.pinpoint;
41
40
  if (pinpoint === null || pinpoint === void 0 ? void 0 : pinpoint.campaign) {
42
41
  return {
43
- source: types_1.AWSPinpointMessageEventSource.CAMPAIGN,
42
+ source: '_campaign',
44
43
  attributes: pinpoint.campaign,
45
44
  };
46
45
  }
47
46
  if (pinpoint === null || pinpoint === void 0 ? void 0 : pinpoint.journey) {
48
47
  return {
49
- source: types_1.AWSPinpointMessageEventSource.JOURNEY,
48
+ source: '_journey',
50
49
  attributes: pinpoint.journey,
51
50
  };
52
51
  }
53
52
  };
54
- //# sourceMappingURL=utils.js.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare const getChannelType: () => "IN_APP" | "APNS" | "APNS_SANDBOX" | "GCM";
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ var utils_1 = require("@aws-amplify/core/internals/utils");
6
+ var react_native_1 = require("@aws-amplify/react-native");
7
+ var operatingSystem = react_native_1.getOperatingSystem();
8
+ var isAndroid = operatingSystem === 'android';
9
+ var isIos = operatingSystem === 'ios';
10
+ /**
11
+ * @internal
12
+ */
13
+ exports.getChannelType = function () {
14
+ if (isAndroid) {
15
+ // FCM was previously known as GCM and continues to be the channel type in Pinpoint
16
+ return 'GCM';
17
+ }
18
+ if (isIos) {
19
+ // If building in debug mode, use the APNs sandbox
20
+ return global['__DEV__'] ? 'APNS_SANDBOX' : 'APNS';
21
+ }
22
+ throw new utils_1.PlatformNotSupportedError();
23
+ };
@@ -0,0 +1,2 @@
1
+ import { PushNotificationAction } from '@aws-amplify/core/internals/utils';
2
+ export declare const getPushNotificationUserAgentString: (action: PushNotificationAction) => string;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ var utils_1 = require("@aws-amplify/core/internals/utils");
6
+ exports.getPushNotificationUserAgentString = function (action) {
7
+ return utils_1.getAmplifyUserAgent({
8
+ category: utils_1.Category.PushNotification,
9
+ action: action,
10
+ });
11
+ };
@@ -0,0 +1,3 @@
1
+ export { createMessageEventRecorder } from './createMessageEventRecorder';
2
+ export { getChannelType } from './getChannelType';
3
+ export { getPushNotificationUserAgentString } from './getPushNotificationUserAgentString';
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ var createMessageEventRecorder_1 = require("./createMessageEventRecorder");
6
+ exports.createMessageEventRecorder = createMessageEventRecorder_1.createMessageEventRecorder;
7
+ var getChannelType_1 = require("./getChannelType");
8
+ exports.getChannelType = getChannelType_1.getChannelType;
9
+ var getPushNotificationUserAgentString_1 = require("./getPushNotificationUserAgentString");
10
+ exports.getPushNotificationUserAgentString = getPushNotificationUserAgentString_1.getPushNotificationUserAgentString;
@@ -0,0 +1,3 @@
1
+ export declare enum PushNotificationErrorCode {
2
+ NotInitialized = "NotInitialized"
3
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ var PushNotificationErrorCode;
6
+ (function (PushNotificationErrorCode) {
7
+ PushNotificationErrorCode["NotInitialized"] = "NotInitialized";
8
+ })(PushNotificationErrorCode = exports.PushNotificationErrorCode || (exports.PushNotificationErrorCode = {}));
@@ -0,0 +1,5 @@
1
+ export * from './errors';
2
+ export * from './inputs';
3
+ export * from './options';
4
+ export * from './outputs';
5
+ export * from './pushNotifications';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ var tslib_1 = require("tslib");
6
+ tslib_1.__exportStar(require("./errors"), exports);
@@ -0,0 +1,23 @@
1
+ import { UserProfile } from '@aws-amplify/core';
2
+ import { PushNotificationServiceOptions } from './options';
3
+ import { OnPushNotificationMessageHandler, OnTokenReceivedHandler, PushNotificationPermissions } from './pushNotifications';
4
+ export declare type PushNotificationIdentifyUserInput<ServiceOptions extends PushNotificationServiceOptions = PushNotificationServiceOptions> = {
5
+ /**
6
+ * A User ID associated to the current device.
7
+ */
8
+ userId: string;
9
+ /**
10
+ * Additional information about the user and their device.
11
+ */
12
+ userProfile: UserProfile;
13
+ /**
14
+ * Options to be passed to the API.
15
+ */
16
+ options?: ServiceOptions;
17
+ };
18
+ export declare type PushNotificationRequestPermissionsInput = PushNotificationPermissions;
19
+ export declare type PushNotificationSetBadgeCountInput = number;
20
+ export declare type PushNotificationOnNotificationOpenedInput = OnPushNotificationMessageHandler;
21
+ export declare type PushNotificationOnNotificationReceivedInBackgroundInput = OnPushNotificationMessageHandler;
22
+ export declare type PushNotificationOnNotificationReceivedInForegroundInput = OnPushNotificationMessageHandler;
23
+ export declare type PushNotificationOnTokenReceivedInput = OnTokenReceivedHandler;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Base type for service options.
3
+ */
4
+ export declare type PushNotificationServiceOptions = Record<string, unknown>;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import { EventListenerRemover } from '../../eventListeners';
2
+ import { PushNotificationMessage, PushNotificationPermissionStatus } from '../types';
3
+ export declare type PushNotificationGetBadgeCountOutput = number;
4
+ export declare type PushNotificationGetLaunchNotificationOutput = PushNotificationMessage | null;
5
+ export declare type PushNotificationGetPermissionStatusOutput = PushNotificationPermissionStatus;
6
+ export declare type PushNotificationRequestPermissionsOutput = boolean;
7
+ export declare type PushNotificationOnNotificationOpenedOutput = EventListenerRemover;
8
+ export declare type PushNotificationOnNotificationReceivedInBackgroundOutput = EventListenerRemover;
9
+ export declare type PushNotificationOnNotificationReceivedInForegroundOutput = EventListenerRemover;
10
+ export declare type PushNotificationOnTokenReceivedOutput = EventListenerRemover;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import type { PushNotificationMessage } from '@aws-amplify/react-native';
2
+ export type { PushNotificationMessage, PushNotificationPermissionStatus, PushNotificationPermissions, } from '@aws-amplify/react-native';
3
+ export declare type OnTokenReceivedHandler = (token: string) => void;
4
+ export declare type OnPushNotificationMessageHandler = (message: PushNotificationMessage) => void;
5
+ export declare type PushNotificationEvent = 'backgroundMessageReceived' | 'foregroundMessageReceived' | 'launchNotificationsOpened' | 'notificationOpened' | 'tokenReceived';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export { initialize, isInitialized } from './initializationManager';
2
+ export { resolveConfig } from './resolveConfig';
3
+ export { resolveCredentials } from './resolveCredentials';
4
+ export { getToken, setToken } from './tokenManager';
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ var initializationManager_1 = require("./initializationManager");
6
+ exports.initialize = initializationManager_1.initialize;
7
+ exports.isInitialized = initializationManager_1.isInitialized;
8
+ var resolveConfig_1 = require("./resolveConfig");
9
+ exports.resolveConfig = resolveConfig_1.resolveConfig;
10
+ var resolveCredentials_1 = require("./resolveCredentials");
11
+ exports.resolveCredentials = resolveCredentials_1.resolveCredentials;
12
+ var tokenManager_1 = require("./tokenManager");
13
+ exports.getToken = tokenManager_1.getToken;
14
+ exports.setToken = tokenManager_1.setToken;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Sets initialization status to true.
3
+ *
4
+ * @internal
5
+ */
6
+ export declare const initialize: () => Promise<void>;
7
+ /**
8
+ * Returns the initialization status of push notifications.
9
+ *
10
+ * @internal
11
+ */
12
+ export declare const isInitialized: () => boolean;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ var tslib_1 = require("tslib");
6
+ var initialized = false;
7
+ /**
8
+ * Sets initialization status to true.
9
+ *
10
+ * @internal
11
+ */
12
+ exports.initialize = function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
13
+ return tslib_1.__generator(this, function (_a) {
14
+ initialized = true;
15
+ return [2 /*return*/];
16
+ });
17
+ }); };
18
+ /**
19
+ * Returns the initialization status of push notifications.
20
+ *
21
+ * @internal
22
+ */
23
+ exports.isInitialized = function () { return initialized; };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare const resolveConfig: () => {
5
+ appId: string;
6
+ region: string;
7
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ var core_1 = require("@aws-amplify/core");
6
+ var errors_1 = require("../errors");
7
+ /**
8
+ * @internal
9
+ */
10
+ exports.resolveConfig = function () {
11
+ var _a, _b;
12
+ var _c = (_b = (_a = core_1.Amplify.getConfig().Notifications) === null || _a === void 0 ? void 0 : _a.PushNotification.Pinpoint) !== null && _b !== void 0 ? _b : {}, appId = _c.appId, region = _c.region;
13
+ errors_1.assert(!!appId, errors_1.PushNotificationValidationErrorCode.NoAppId);
14
+ errors_1.assert(!!region, errors_1.PushNotificationValidationErrorCode.NoRegion);
15
+ return { appId: appId, region: region };
16
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare const resolveCredentials: () => Promise<{
5
+ credentials: import("@aws-amplify/core/lib-esm/libraryUtils").AWSCredentials;
6
+ identityId: string;
7
+ }>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ var tslib_1 = require("tslib");
6
+ var core_1 = require("@aws-amplify/core");
7
+ var errors_1 = require("../errors");
8
+ /**
9
+ * @internal
10
+ */
11
+ exports.resolveCredentials = function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
12
+ var _a, credentials, identityId;
13
+ return tslib_1.__generator(this, function (_b) {
14
+ switch (_b.label) {
15
+ case 0: return [4 /*yield*/, core_1.fetchAuthSession()];
16
+ case 1:
17
+ _a = _b.sent(), credentials = _a.credentials, identityId = _a.identityId;
18
+ errors_1.assert(!!credentials, errors_1.PushNotificationValidationErrorCode.NoCredentials);
19
+ return [2 /*return*/, { credentials: credentials, identityId: identityId }];
20
+ }
21
+ });
22
+ }); };