@aws-amplify/notifications 2.0.1-console-preview.d745d43.0 → 2.0.1-ssr-api.df60e41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (458) hide show
  1. package/lib/eventListeners/eventListeners.js +7 -4
  2. package/lib/eventListeners/index.js +4 -4
  3. package/lib/eventListeners/types.d.ts +2 -2
  4. package/lib/eventListeners/types.js +0 -1
  5. package/lib/inAppMessaging/errors/InAppMessagingError.js +1 -1
  6. package/lib/inAppMessaging/errors/assertServiceError.js +1 -1
  7. package/lib/inAppMessaging/errors/assertValidationError.js +1 -1
  8. package/lib/inAppMessaging/errors/index.js +6 -6
  9. package/lib/inAppMessaging/errors/validation.js +1 -1
  10. package/lib/inAppMessaging/index.d.ts +1 -1
  11. package/lib/inAppMessaging/index.js +12 -11
  12. package/lib/inAppMessaging/providers/pinpoint/apis/clearMessages.d.ts +13 -0
  13. package/lib/inAppMessaging/providers/pinpoint/apis/clearMessages.js +26 -0
  14. package/lib/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js +10 -8
  15. package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +2 -1
  16. package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.js +8 -7
  17. package/lib/inAppMessaging/providers/pinpoint/apis/index.d.ts +1 -0
  18. package/lib/inAppMessaging/providers/pinpoint/apis/index.js +13 -11
  19. package/lib/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +11 -11
  20. package/lib/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +3 -3
  21. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js +3 -3
  22. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js +3 -3
  23. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js +3 -3
  24. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js +3 -3
  25. package/lib/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +2 -2
  26. package/lib/inAppMessaging/providers/pinpoint/apis/syncMessages.js +9 -9
  27. package/lib/inAppMessaging/providers/pinpoint/index.d.ts +1 -1
  28. package/lib/inAppMessaging/providers/pinpoint/index.js +12 -11
  29. package/lib/inAppMessaging/providers/pinpoint/types/index.js +2 -2
  30. package/lib/inAppMessaging/providers/pinpoint/types/inputs.d.ts +8 -8
  31. package/lib/inAppMessaging/providers/pinpoint/types/inputs.js +0 -1
  32. package/lib/inAppMessaging/providers/pinpoint/types/options.d.ts +1 -1
  33. package/lib/inAppMessaging/providers/pinpoint/types/options.js +0 -1
  34. package/lib/inAppMessaging/providers/pinpoint/types/outputs.d.ts +4 -4
  35. package/lib/inAppMessaging/providers/pinpoint/types/outputs.js +0 -1
  36. package/lib/inAppMessaging/providers/pinpoint/types/types.d.ts +6 -6
  37. package/lib/inAppMessaging/providers/pinpoint/types/types.js +1 -1
  38. package/lib/inAppMessaging/providers/pinpoint/utils/constants.js +1 -1
  39. package/lib/inAppMessaging/providers/pinpoint/utils/helpers.d.ts +2 -2
  40. package/lib/inAppMessaging/providers/pinpoint/utils/helpers.js +38 -24
  41. package/lib/inAppMessaging/providers/pinpoint/utils/index.js +11 -11
  42. package/lib/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js +8 -8
  43. package/lib/inAppMessaging/providers/pinpoint/utils/resolveConfig.js +5 -4
  44. package/lib/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js +5 -4
  45. package/lib/inAppMessaging/providers/pinpoint/utils/userAgent.js +3 -3
  46. package/lib/inAppMessaging/types/event.d.ts +2 -2
  47. package/lib/inAppMessaging/types/event.js +0 -1
  48. package/lib/inAppMessaging/types/index.js +0 -1
  49. package/lib/inAppMessaging/types/inputs.d.ts +1 -1
  50. package/lib/inAppMessaging/types/inputs.js +0 -1
  51. package/lib/inAppMessaging/types/message.d.ts +3 -3
  52. package/lib/inAppMessaging/types/message.js +0 -1
  53. package/lib/inAppMessaging/types/options.d.ts +1 -1
  54. package/lib/inAppMessaging/types/options.js +0 -1
  55. package/lib/inAppMessaging/utils/index.js +4 -4
  56. package/lib/inAppMessaging/utils/statusHelpers.js +6 -4
  57. package/lib/index.js +0 -1
  58. package/lib/pushNotifications/errors/PushNotificationError.js +1 -1
  59. package/lib/pushNotifications/errors/errorHelpers.js +5 -4
  60. package/lib/pushNotifications/errors/index.js +4 -4
  61. package/lib/pushNotifications/index.js +13 -13
  62. package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.js +3 -2
  63. package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js +5 -4
  64. package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js +3 -2
  65. package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js +5 -4
  66. package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js +3 -2
  67. package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js +5 -4
  68. package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.js +3 -2
  69. package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.native.js +9 -8
  70. package/lib/pushNotifications/providers/pinpoint/apis/index.js +12 -12
  71. package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js +3 -2
  72. package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js +45 -36
  73. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js +3 -2
  74. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js +5 -4
  75. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js +3 -2
  76. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js +5 -4
  77. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js +3 -2
  78. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js +5 -4
  79. package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.js +3 -2
  80. package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js +5 -4
  81. package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.js +3 -2
  82. package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js +5 -4
  83. package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.js +3 -2
  84. package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js +5 -4
  85. package/lib/pushNotifications/providers/pinpoint/index.js +12 -12
  86. package/lib/pushNotifications/providers/pinpoint/types/analytics.d.ts +3 -3
  87. package/lib/pushNotifications/providers/pinpoint/types/analytics.js +0 -1
  88. package/lib/pushNotifications/providers/pinpoint/types/apis.d.ts +11 -11
  89. package/lib/pushNotifications/providers/pinpoint/types/apis.js +0 -1
  90. package/lib/pushNotifications/providers/pinpoint/types/index.js +0 -1
  91. package/lib/pushNotifications/providers/pinpoint/types/inputs.d.ts +7 -7
  92. package/lib/pushNotifications/providers/pinpoint/types/inputs.js +0 -1
  93. package/lib/pushNotifications/providers/pinpoint/types/options.d.ts +1 -1
  94. package/lib/pushNotifications/providers/pinpoint/types/options.js +0 -1
  95. package/lib/pushNotifications/providers/pinpoint/types/outputs.d.ts +8 -8
  96. package/lib/pushNotifications/providers/pinpoint/types/outputs.js +0 -1
  97. package/lib/pushNotifications/providers/pinpoint/types/pushNotifications.d.ts +1 -1
  98. package/lib/pushNotifications/providers/pinpoint/types/pushNotifications.js +0 -1
  99. package/lib/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.d.ts +3 -2
  100. package/lib/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js +10 -8
  101. package/lib/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.d.ts +3 -2
  102. package/lib/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js +3 -2
  103. package/lib/pushNotifications/providers/pinpoint/utils/getChannelType.d.ts +2 -1
  104. package/lib/pushNotifications/providers/pinpoint/utils/getChannelType.js +4 -3
  105. package/lib/pushNotifications/providers/pinpoint/utils/index.d.ts +2 -1
  106. package/lib/pushNotifications/providers/pinpoint/utils/index.js +7 -5
  107. package/lib/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.js +6 -5
  108. package/lib/pushNotifications/types/errors.js +1 -1
  109. package/lib/pushNotifications/types/index.js +19 -3
  110. package/lib/pushNotifications/types/inputs.d.ts +7 -7
  111. package/lib/pushNotifications/types/inputs.js +0 -1
  112. package/lib/pushNotifications/types/options.d.ts +1 -1
  113. package/lib/pushNotifications/types/options.js +0 -1
  114. package/lib/pushNotifications/types/outputs.d.ts +8 -8
  115. package/lib/pushNotifications/types/outputs.js +0 -1
  116. package/lib/pushNotifications/types/pushNotifications.d.ts +3 -3
  117. package/lib/pushNotifications/types/pushNotifications.js +0 -1
  118. package/lib/pushNotifications/{providers/pinpoint/utils → utils}/getPushNotificationUserAgentString.js +3 -2
  119. package/lib/pushNotifications/utils/index.d.ts +1 -1
  120. package/lib/pushNotifications/utils/index.js +8 -8
  121. package/lib/pushNotifications/utils/initializationManager.js +5 -3
  122. package/lib/pushNotifications/utils/resolveCredentials.js +5 -4
  123. package/lib/pushNotifications/utils/tokenManager.js +5 -3
  124. package/lib/tsconfig.tsbuildinfo +1 -7201
  125. package/lib-esm/eventListeners/eventListeners.js +0 -1
  126. package/lib-esm/eventListeners/index.js +0 -1
  127. package/lib-esm/eventListeners/types.d.ts +2 -2
  128. package/lib-esm/eventListeners/types.js +1 -1
  129. package/lib-esm/inAppMessaging/errors/InAppMessagingError.js +0 -1
  130. package/lib-esm/inAppMessaging/errors/assertServiceError.js +0 -1
  131. package/lib-esm/inAppMessaging/errors/assertValidationError.js +0 -1
  132. package/lib-esm/inAppMessaging/errors/index.js +0 -1
  133. package/lib-esm/inAppMessaging/errors/validation.js +0 -1
  134. package/lib-esm/inAppMessaging/index.d.ts +1 -1
  135. package/lib-esm/inAppMessaging/index.js +1 -2
  136. package/lib-esm/inAppMessaging/providers/pinpoint/apis/clearMessages.d.ts +13 -0
  137. package/lib-esm/inAppMessaging/providers/pinpoint/apis/clearMessages.js +22 -0
  138. package/lib-esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js +0 -1
  139. package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +2 -1
  140. package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.js +0 -1
  141. package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.d.ts +1 -0
  142. package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.js +1 -1
  143. package/lib-esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +0 -1
  144. package/lib-esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +0 -1
  145. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js +0 -1
  146. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js +0 -1
  147. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js +0 -1
  148. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js +0 -1
  149. package/lib-esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +0 -1
  150. package/lib-esm/inAppMessaging/providers/pinpoint/apis/syncMessages.js +0 -1
  151. package/lib-esm/inAppMessaging/providers/pinpoint/index.d.ts +1 -1
  152. package/lib-esm/inAppMessaging/providers/pinpoint/index.js +1 -2
  153. package/lib-esm/inAppMessaging/providers/pinpoint/types/index.js +0 -1
  154. package/lib-esm/inAppMessaging/providers/pinpoint/types/inputs.d.ts +8 -8
  155. package/lib-esm/inAppMessaging/providers/pinpoint/types/inputs.js +1 -1
  156. package/lib-esm/inAppMessaging/providers/pinpoint/types/options.d.ts +1 -1
  157. package/lib-esm/inAppMessaging/providers/pinpoint/types/options.js +1 -1
  158. package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.d.ts +4 -4
  159. package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.js +1 -1
  160. package/lib-esm/inAppMessaging/providers/pinpoint/types/types.d.ts +6 -6
  161. package/lib-esm/inAppMessaging/providers/pinpoint/types/types.js +0 -1
  162. package/lib-esm/inAppMessaging/providers/pinpoint/utils/constants.js +0 -1
  163. package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.d.ts +2 -2
  164. package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.js +0 -1
  165. package/lib-esm/inAppMessaging/providers/pinpoint/utils/index.js +0 -1
  166. package/lib-esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js +0 -1
  167. package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveConfig.js +0 -1
  168. package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js +0 -1
  169. package/lib-esm/inAppMessaging/providers/pinpoint/utils/userAgent.js +0 -1
  170. package/lib-esm/inAppMessaging/types/event.d.ts +2 -2
  171. package/lib-esm/inAppMessaging/types/event.js +1 -1
  172. package/lib-esm/inAppMessaging/types/index.js +1 -1
  173. package/lib-esm/inAppMessaging/types/inputs.d.ts +1 -1
  174. package/lib-esm/inAppMessaging/types/inputs.js +1 -1
  175. package/lib-esm/inAppMessaging/types/message.d.ts +3 -3
  176. package/lib-esm/inAppMessaging/types/message.js +1 -1
  177. package/lib-esm/inAppMessaging/types/options.d.ts +1 -1
  178. package/lib-esm/inAppMessaging/types/options.js +1 -1
  179. package/lib-esm/inAppMessaging/utils/index.js +0 -1
  180. package/lib-esm/inAppMessaging/utils/statusHelpers.js +0 -1
  181. package/lib-esm/index.js +0 -1
  182. package/lib-esm/pushNotifications/errors/PushNotificationError.js +0 -1
  183. package/lib-esm/pushNotifications/errors/errorHelpers.js +0 -1
  184. package/lib-esm/pushNotifications/errors/index.js +0 -1
  185. package/lib-esm/pushNotifications/index.js +0 -1
  186. package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.js +1 -2
  187. package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js +0 -1
  188. package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js +1 -2
  189. package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js +1 -2
  190. package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js +1 -2
  191. package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js +1 -2
  192. package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.js +1 -2
  193. package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.js +2 -3
  194. package/lib-esm/pushNotifications/providers/pinpoint/apis/index.js +0 -1
  195. package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js +0 -1
  196. package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js +30 -23
  197. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js +0 -1
  198. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js +0 -1
  199. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js +0 -1
  200. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js +0 -1
  201. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js +0 -1
  202. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js +0 -1
  203. package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.js +0 -1
  204. package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js +0 -1
  205. package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.js +1 -2
  206. package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js +1 -2
  207. package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.js +0 -1
  208. package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js +0 -1
  209. package/lib-esm/pushNotifications/providers/pinpoint/index.js +0 -1
  210. package/lib-esm/pushNotifications/providers/pinpoint/types/analytics.d.ts +3 -3
  211. package/lib-esm/pushNotifications/providers/pinpoint/types/analytics.js +1 -1
  212. package/lib-esm/pushNotifications/providers/pinpoint/types/apis.d.ts +11 -11
  213. package/lib-esm/pushNotifications/providers/pinpoint/types/apis.js +1 -1
  214. package/lib-esm/pushNotifications/providers/pinpoint/types/index.js +1 -1
  215. package/lib-esm/pushNotifications/providers/pinpoint/types/inputs.d.ts +7 -7
  216. package/lib-esm/pushNotifications/providers/pinpoint/types/inputs.js +1 -1
  217. package/lib-esm/pushNotifications/providers/pinpoint/types/options.d.ts +1 -1
  218. package/lib-esm/pushNotifications/providers/pinpoint/types/options.js +1 -1
  219. package/lib-esm/pushNotifications/providers/pinpoint/types/outputs.d.ts +8 -8
  220. package/lib-esm/pushNotifications/providers/pinpoint/types/outputs.js +1 -1
  221. package/lib-esm/pushNotifications/providers/pinpoint/types/pushNotifications.d.ts +1 -1
  222. package/lib-esm/pushNotifications/providers/pinpoint/types/pushNotifications.js +1 -1
  223. package/lib-esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.d.ts +3 -2
  224. package/lib-esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js +2 -2
  225. package/lib-esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.d.ts +3 -2
  226. package/lib-esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js +0 -1
  227. package/lib-esm/pushNotifications/providers/pinpoint/utils/getChannelType.d.ts +2 -1
  228. package/lib-esm/pushNotifications/providers/pinpoint/utils/getChannelType.js +0 -1
  229. package/lib-esm/pushNotifications/providers/pinpoint/utils/index.d.ts +2 -1
  230. package/lib-esm/pushNotifications/providers/pinpoint/utils/index.js +2 -2
  231. package/lib-esm/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.js +1 -2
  232. package/lib-esm/pushNotifications/types/errors.js +0 -1
  233. package/lib-esm/pushNotifications/types/index.js +4 -1
  234. package/lib-esm/pushNotifications/types/inputs.d.ts +7 -7
  235. package/lib-esm/pushNotifications/types/inputs.js +1 -1
  236. package/lib-esm/pushNotifications/types/options.d.ts +1 -1
  237. package/lib-esm/pushNotifications/types/options.js +1 -1
  238. package/lib-esm/pushNotifications/types/outputs.d.ts +8 -8
  239. package/lib-esm/pushNotifications/types/outputs.js +1 -1
  240. package/lib-esm/pushNotifications/types/pushNotifications.d.ts +3 -3
  241. package/lib-esm/pushNotifications/types/pushNotifications.js +1 -1
  242. package/lib-esm/pushNotifications/{providers/pinpoint/utils → utils}/getPushNotificationUserAgentString.js +0 -1
  243. package/lib-esm/pushNotifications/utils/index.d.ts +1 -1
  244. package/lib-esm/pushNotifications/utils/index.js +1 -2
  245. package/lib-esm/pushNotifications/utils/initializationManager.js +0 -1
  246. package/lib-esm/pushNotifications/utils/resolveCredentials.js +0 -1
  247. package/lib-esm/pushNotifications/utils/tokenManager.js +0 -1
  248. package/lib-esm/tsconfig.tsbuildinfo +1 -7201
  249. package/package.json +51 -14
  250. package/src/inAppMessaging/index.ts +1 -0
  251. package/src/inAppMessaging/providers/pinpoint/apis/clearMessages.ts +26 -0
  252. package/src/inAppMessaging/providers/pinpoint/apis/index.ts +1 -0
  253. package/src/inAppMessaging/providers/pinpoint/index.ts +1 -0
  254. package/src/pushNotifications/providers/pinpoint/apis/getBadgeCount.ts +1 -1
  255. package/src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.ts +1 -1
  256. package/src/pushNotifications/providers/pinpoint/apis/getLaunchNotification.ts +1 -1
  257. package/src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.ts +1 -1
  258. package/src/pushNotifications/providers/pinpoint/apis/getPermissionStatus.ts +1 -1
  259. package/src/pushNotifications/providers/pinpoint/apis/identifyUser.native.ts +5 -2
  260. package/src/pushNotifications/providers/pinpoint/apis/identifyUser.ts +1 -1
  261. package/src/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.ts +50 -40
  262. package/src/pushNotifications/providers/pinpoint/apis/requestPermissions.native.ts +1 -1
  263. package/src/pushNotifications/providers/pinpoint/apis/requestPermissions.ts +1 -1
  264. package/src/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.ts +5 -4
  265. package/src/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.ts +3 -3
  266. package/src/pushNotifications/providers/pinpoint/utils/index.ts +2 -1
  267. package/src/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.ts +1 -1
  268. package/src/pushNotifications/types/pushNotifications.ts +1 -1
  269. package/src/pushNotifications/utils/index.ts +1 -1
  270. package/lib/eventListeners/eventListeners.js.map +0 -1
  271. package/lib/eventListeners/index.js.map +0 -1
  272. package/lib/eventListeners/types.js.map +0 -1
  273. package/lib/inAppMessaging/errors/InAppMessagingError.js.map +0 -1
  274. package/lib/inAppMessaging/errors/assertServiceError.js.map +0 -1
  275. package/lib/inAppMessaging/errors/assertValidationError.js.map +0 -1
  276. package/lib/inAppMessaging/errors/index.js.map +0 -1
  277. package/lib/inAppMessaging/errors/validation.js.map +0 -1
  278. package/lib/inAppMessaging/index.js.map +0 -1
  279. package/lib/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js.map +0 -1
  280. package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.js.map +0 -1
  281. package/lib/inAppMessaging/providers/pinpoint/apis/index.js.map +0 -1
  282. package/lib/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js.map +0 -1
  283. package/lib/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js.map +0 -1
  284. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js.map +0 -1
  285. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js.map +0 -1
  286. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js.map +0 -1
  287. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js.map +0 -1
  288. package/lib/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js.map +0 -1
  289. package/lib/inAppMessaging/providers/pinpoint/apis/syncMessages.js.map +0 -1
  290. package/lib/inAppMessaging/providers/pinpoint/index.js.map +0 -1
  291. package/lib/inAppMessaging/providers/pinpoint/types/index.js.map +0 -1
  292. package/lib/inAppMessaging/providers/pinpoint/types/inputs.js.map +0 -1
  293. package/lib/inAppMessaging/providers/pinpoint/types/options.js.map +0 -1
  294. package/lib/inAppMessaging/providers/pinpoint/types/outputs.js.map +0 -1
  295. package/lib/inAppMessaging/providers/pinpoint/types/types.js.map +0 -1
  296. package/lib/inAppMessaging/providers/pinpoint/utils/constants.js.map +0 -1
  297. package/lib/inAppMessaging/providers/pinpoint/utils/helpers.js.map +0 -1
  298. package/lib/inAppMessaging/providers/pinpoint/utils/index.js.map +0 -1
  299. package/lib/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js.map +0 -1
  300. package/lib/inAppMessaging/providers/pinpoint/utils/resolveConfig.js.map +0 -1
  301. package/lib/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js.map +0 -1
  302. package/lib/inAppMessaging/providers/pinpoint/utils/userAgent.js.map +0 -1
  303. package/lib/inAppMessaging/types/event.js.map +0 -1
  304. package/lib/inAppMessaging/types/index.js.map +0 -1
  305. package/lib/inAppMessaging/types/inputs.js.map +0 -1
  306. package/lib/inAppMessaging/types/message.js.map +0 -1
  307. package/lib/inAppMessaging/types/options.js.map +0 -1
  308. package/lib/inAppMessaging/utils/index.js.map +0 -1
  309. package/lib/inAppMessaging/utils/statusHelpers.js.map +0 -1
  310. package/lib/index.js.map +0 -1
  311. package/lib/pushNotifications/errors/PushNotificationError.js.map +0 -1
  312. package/lib/pushNotifications/errors/errorHelpers.js.map +0 -1
  313. package/lib/pushNotifications/errors/index.js.map +0 -1
  314. package/lib/pushNotifications/index.js.map +0 -1
  315. package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.js.map +0 -1
  316. package/lib/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js.map +0 -1
  317. package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js.map +0 -1
  318. package/lib/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js.map +0 -1
  319. package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js.map +0 -1
  320. package/lib/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js.map +0 -1
  321. package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.js.map +0 -1
  322. package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.native.js.map +0 -1
  323. package/lib/pushNotifications/providers/pinpoint/apis/index.js.map +0 -1
  324. package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js.map +0 -1
  325. package/lib/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js.map +0 -1
  326. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js.map +0 -1
  327. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js.map +0 -1
  328. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js.map +0 -1
  329. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js.map +0 -1
  330. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js.map +0 -1
  331. package/lib/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js.map +0 -1
  332. package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.js.map +0 -1
  333. package/lib/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js.map +0 -1
  334. package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.js.map +0 -1
  335. package/lib/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js.map +0 -1
  336. package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.js.map +0 -1
  337. package/lib/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js.map +0 -1
  338. package/lib/pushNotifications/providers/pinpoint/index.js.map +0 -1
  339. package/lib/pushNotifications/providers/pinpoint/types/analytics.js.map +0 -1
  340. package/lib/pushNotifications/providers/pinpoint/types/apis.js.map +0 -1
  341. package/lib/pushNotifications/providers/pinpoint/types/index.js.map +0 -1
  342. package/lib/pushNotifications/providers/pinpoint/types/inputs.js.map +0 -1
  343. package/lib/pushNotifications/providers/pinpoint/types/options.js.map +0 -1
  344. package/lib/pushNotifications/providers/pinpoint/types/outputs.js.map +0 -1
  345. package/lib/pushNotifications/providers/pinpoint/types/pushNotifications.js.map +0 -1
  346. package/lib/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js.map +0 -1
  347. package/lib/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js.map +0 -1
  348. package/lib/pushNotifications/providers/pinpoint/utils/getChannelType.js.map +0 -1
  349. package/lib/pushNotifications/providers/pinpoint/utils/getPushNotificationUserAgentString.js.map +0 -1
  350. package/lib/pushNotifications/providers/pinpoint/utils/index.js.map +0 -1
  351. package/lib/pushNotifications/types/errors.js.map +0 -1
  352. package/lib/pushNotifications/types/index.js.map +0 -1
  353. package/lib/pushNotifications/types/inputs.js.map +0 -1
  354. package/lib/pushNotifications/types/options.js.map +0 -1
  355. package/lib/pushNotifications/types/outputs.js.map +0 -1
  356. package/lib/pushNotifications/types/pushNotifications.js.map +0 -1
  357. package/lib/pushNotifications/utils/index.js.map +0 -1
  358. package/lib/pushNotifications/utils/initializationManager.js.map +0 -1
  359. package/lib/pushNotifications/utils/resolveConfig.js.map +0 -1
  360. package/lib/pushNotifications/utils/resolveCredentials.js.map +0 -1
  361. package/lib/pushNotifications/utils/tokenManager.js.map +0 -1
  362. package/lib-esm/eventListeners/eventListeners.js.map +0 -1
  363. package/lib-esm/eventListeners/index.js.map +0 -1
  364. package/lib-esm/eventListeners/types.js.map +0 -1
  365. package/lib-esm/inAppMessaging/errors/InAppMessagingError.js.map +0 -1
  366. package/lib-esm/inAppMessaging/errors/assertServiceError.js.map +0 -1
  367. package/lib-esm/inAppMessaging/errors/assertValidationError.js.map +0 -1
  368. package/lib-esm/inAppMessaging/errors/index.js.map +0 -1
  369. package/lib-esm/inAppMessaging/errors/validation.js.map +0 -1
  370. package/lib-esm/inAppMessaging/index.js.map +0 -1
  371. package/lib-esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js.map +0 -1
  372. package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.js.map +0 -1
  373. package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.js.map +0 -1
  374. package/lib-esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js.map +0 -1
  375. package/lib-esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js.map +0 -1
  376. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js.map +0 -1
  377. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js.map +0 -1
  378. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js.map +0 -1
  379. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js.map +0 -1
  380. package/lib-esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js.map +0 -1
  381. package/lib-esm/inAppMessaging/providers/pinpoint/apis/syncMessages.js.map +0 -1
  382. package/lib-esm/inAppMessaging/providers/pinpoint/index.js.map +0 -1
  383. package/lib-esm/inAppMessaging/providers/pinpoint/types/index.js.map +0 -1
  384. package/lib-esm/inAppMessaging/providers/pinpoint/types/inputs.js.map +0 -1
  385. package/lib-esm/inAppMessaging/providers/pinpoint/types/options.js.map +0 -1
  386. package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.js.map +0 -1
  387. package/lib-esm/inAppMessaging/providers/pinpoint/types/types.js.map +0 -1
  388. package/lib-esm/inAppMessaging/providers/pinpoint/utils/constants.js.map +0 -1
  389. package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.js.map +0 -1
  390. package/lib-esm/inAppMessaging/providers/pinpoint/utils/index.js.map +0 -1
  391. package/lib-esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js.map +0 -1
  392. package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveConfig.js.map +0 -1
  393. package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.js.map +0 -1
  394. package/lib-esm/inAppMessaging/providers/pinpoint/utils/userAgent.js.map +0 -1
  395. package/lib-esm/inAppMessaging/types/event.js.map +0 -1
  396. package/lib-esm/inAppMessaging/types/index.js.map +0 -1
  397. package/lib-esm/inAppMessaging/types/inputs.js.map +0 -1
  398. package/lib-esm/inAppMessaging/types/message.js.map +0 -1
  399. package/lib-esm/inAppMessaging/types/options.js.map +0 -1
  400. package/lib-esm/inAppMessaging/utils/index.js.map +0 -1
  401. package/lib-esm/inAppMessaging/utils/statusHelpers.js.map +0 -1
  402. package/lib-esm/index.js.map +0 -1
  403. package/lib-esm/pushNotifications/errors/PushNotificationError.js.map +0 -1
  404. package/lib-esm/pushNotifications/errors/errorHelpers.js.map +0 -1
  405. package/lib-esm/pushNotifications/errors/index.js.map +0 -1
  406. package/lib-esm/pushNotifications/index.js.map +0 -1
  407. package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.js.map +0 -1
  408. package/lib-esm/pushNotifications/providers/pinpoint/apis/getBadgeCount.native.js.map +0 -1
  409. package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.js.map +0 -1
  410. package/lib-esm/pushNotifications/providers/pinpoint/apis/getLaunchNotification.native.js.map +0 -1
  411. package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.js.map +0 -1
  412. package/lib-esm/pushNotifications/providers/pinpoint/apis/getPermissionStatus.native.js.map +0 -1
  413. package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.js.map +0 -1
  414. package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.native.js.map +0 -1
  415. package/lib-esm/pushNotifications/providers/pinpoint/apis/index.js.map +0 -1
  416. package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.js.map +0 -1
  417. package/lib-esm/pushNotifications/providers/pinpoint/apis/initializePushNotifications.native.js.map +0 -1
  418. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.js.map +0 -1
  419. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationOpened.native.js.map +0 -1
  420. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.js.map +0 -1
  421. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInBackground.native.js.map +0 -1
  422. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.js.map +0 -1
  423. package/lib-esm/pushNotifications/providers/pinpoint/apis/onNotificationReceivedInForeground.native.js.map +0 -1
  424. package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.js.map +0 -1
  425. package/lib-esm/pushNotifications/providers/pinpoint/apis/onTokenReceived.native.js.map +0 -1
  426. package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.js.map +0 -1
  427. package/lib-esm/pushNotifications/providers/pinpoint/apis/requestPermissions.native.js.map +0 -1
  428. package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.js.map +0 -1
  429. package/lib-esm/pushNotifications/providers/pinpoint/apis/setBadgeCount.native.js.map +0 -1
  430. package/lib-esm/pushNotifications/providers/pinpoint/index.js.map +0 -1
  431. package/lib-esm/pushNotifications/providers/pinpoint/types/analytics.js.map +0 -1
  432. package/lib-esm/pushNotifications/providers/pinpoint/types/apis.js.map +0 -1
  433. package/lib-esm/pushNotifications/providers/pinpoint/types/index.js.map +0 -1
  434. package/lib-esm/pushNotifications/providers/pinpoint/types/inputs.js.map +0 -1
  435. package/lib-esm/pushNotifications/providers/pinpoint/types/options.js.map +0 -1
  436. package/lib-esm/pushNotifications/providers/pinpoint/types/outputs.js.map +0 -1
  437. package/lib-esm/pushNotifications/providers/pinpoint/types/pushNotifications.js.map +0 -1
  438. package/lib-esm/pushNotifications/providers/pinpoint/utils/createMessageEventRecorder.js.map +0 -1
  439. package/lib-esm/pushNotifications/providers/pinpoint/utils/getAnalyticsEvent.js.map +0 -1
  440. package/lib-esm/pushNotifications/providers/pinpoint/utils/getChannelType.js.map +0 -1
  441. package/lib-esm/pushNotifications/providers/pinpoint/utils/getPushNotificationUserAgentString.js.map +0 -1
  442. package/lib-esm/pushNotifications/providers/pinpoint/utils/index.js.map +0 -1
  443. package/lib-esm/pushNotifications/types/errors.js.map +0 -1
  444. package/lib-esm/pushNotifications/types/index.js.map +0 -1
  445. package/lib-esm/pushNotifications/types/inputs.js.map +0 -1
  446. package/lib-esm/pushNotifications/types/options.js.map +0 -1
  447. package/lib-esm/pushNotifications/types/outputs.js.map +0 -1
  448. package/lib-esm/pushNotifications/types/pushNotifications.js.map +0 -1
  449. package/lib-esm/pushNotifications/utils/index.js.map +0 -1
  450. package/lib-esm/pushNotifications/utils/initializationManager.js.map +0 -1
  451. package/lib-esm/pushNotifications/utils/resolveConfig.js.map +0 -1
  452. package/lib-esm/pushNotifications/utils/resolveCredentials.js.map +0 -1
  453. package/lib-esm/pushNotifications/utils/tokenManager.js.map +0 -1
  454. /package/lib/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.d.ts +0 -0
  455. /package/lib/pushNotifications/{providers/pinpoint/utils → utils}/getPushNotificationUserAgentString.d.ts +0 -0
  456. /package/lib-esm/pushNotifications/{utils → providers/pinpoint/utils}/resolveConfig.d.ts +0 -0
  457. /package/lib-esm/pushNotifications/{providers/pinpoint/utils → utils}/getPushNotificationUserAgentString.d.ts +0 -0
  458. /package/src/pushNotifications/{providers/pinpoint/utils → utils}/getPushNotificationUserAgentString.ts +0 -0
@@ -2,6 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.onTokenReceived = void 0;
5
6
  const utils_1 = require("@aws-amplify/core/internals/utils");
6
7
  /**
7
8
  * Registers a listener that will be triggered when a token is received. A token will be received:
@@ -29,7 +30,7 @@ const utils_1 = require("@aws-amplify/core/internals/utils");
29
30
  * });
30
31
  * ```
31
32
  */
32
- exports.onTokenReceived = () => {
33
+ const onTokenReceived = () => {
33
34
  throw new utils_1.PlatformNotSupportedError();
34
35
  };
35
- //# sourceMappingURL=onTokenReceived.js.map
36
+ exports.onTokenReceived = onTokenReceived;
@@ -2,10 +2,11 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.onTokenReceived = void 0;
5
6
  const eventListeners_1 = require("../../../../eventListeners");
6
7
  const errorHelpers_1 = require("../../../errors/errorHelpers");
7
- exports.onTokenReceived = input => {
8
- errorHelpers_1.assertIsInitialized();
9
- return eventListeners_1.addEventListener('tokenReceived', input);
8
+ const onTokenReceived = input => {
9
+ (0, errorHelpers_1.assertIsInitialized)();
10
+ return (0, eventListeners_1.addEventListener)('tokenReceived', input);
10
11
  };
11
- //# sourceMappingURL=onTokenReceived.native.js.map
12
+ exports.onTokenReceived = onTokenReceived;
@@ -2,6 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.requestPermissions = void 0;
5
6
  const utils_1 = require("@aws-amplify/core/internals/utils");
6
7
  /**
7
8
  * Requests notification permissions from your user. By default, Amplify requests all supported permissions but you can
@@ -33,7 +34,7 @@ const utils_1 = require("@aws-amplify/core/internals/utils");
33
34
  * });
34
35
  * ```
35
36
  */
36
- exports.requestPermissions = () => {
37
+ const requestPermissions = async () => {
37
38
  throw new utils_1.PlatformNotSupportedError();
38
39
  };
39
- //# sourceMappingURL=requestPermissions.js.map
40
+ exports.requestPermissions = requestPermissions;
@@ -2,11 +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
+ exports.requestPermissions = void 0;
5
6
  const react_native_1 = require("@aws-amplify/react-native");
6
7
  const errorHelpers_1 = require("../../../errors/errorHelpers");
7
- const { requestPermissions: requestPermissionsNative } = react_native_1.loadAmplifyPushNotification();
8
- exports.requestPermissions = input => {
9
- errorHelpers_1.assertIsInitialized();
8
+ const { requestPermissions: requestPermissionsNative } = (0, react_native_1.loadAmplifyPushNotification)();
9
+ const requestPermissions = async (input) => {
10
+ (0, errorHelpers_1.assertIsInitialized)();
10
11
  return requestPermissionsNative(input);
11
12
  };
12
- //# sourceMappingURL=requestPermissions.native.js.map
13
+ exports.requestPermissions = requestPermissions;
@@ -2,6 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.setBadgeCount = void 0;
5
6
  const utils_1 = require("@aws-amplify/core/internals/utils");
6
7
  /**
7
8
  * Sets the current badge count (the number on the top right corner of your app's icon). Setting the badge count
@@ -15,7 +16,7 @@ const utils_1 = require("@aws-amplify/core/internals/utils");
15
16
  * setBadgeCount(42);
16
17
  * ```
17
18
  */
18
- exports.setBadgeCount = () => {
19
+ const setBadgeCount = () => {
19
20
  throw new utils_1.PlatformNotSupportedError();
20
21
  };
21
- //# sourceMappingURL=setBadgeCount.js.map
22
+ exports.setBadgeCount = setBadgeCount;
@@ -2,11 +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
+ exports.setBadgeCount = void 0;
5
6
  const react_native_1 = require("@aws-amplify/react-native");
6
7
  const errorHelpers_1 = require("../../../errors/errorHelpers");
7
- const { setBadgeCount: setBadgeCountNative } = react_native_1.loadAmplifyPushNotification();
8
- exports.setBadgeCount = input => {
9
- errorHelpers_1.assertIsInitialized();
8
+ const { setBadgeCount: setBadgeCountNative } = (0, react_native_1.loadAmplifyPushNotification)();
9
+ const setBadgeCount = input => {
10
+ (0, errorHelpers_1.assertIsInitialized)();
10
11
  setBadgeCountNative(input);
11
12
  };
12
- //# sourceMappingURL=setBadgeCount.native.js.map
13
+ exports.setBadgeCount = setBadgeCount;
@@ -2,16 +2,16 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.setBadgeCount = exports.requestPermissions = exports.onTokenReceived = exports.onNotificationReceivedInForeground = exports.onNotificationReceivedInBackground = exports.onNotificationOpened = exports.initializePushNotifications = exports.identifyUser = exports.getPermissionStatus = exports.getLaunchNotification = exports.getBadgeCount = void 0;
5
6
  var apis_1 = require("./apis");
6
- exports.getBadgeCount = apis_1.getBadgeCount;
7
- exports.getLaunchNotification = apis_1.getLaunchNotification;
8
- exports.getPermissionStatus = apis_1.getPermissionStatus;
9
- exports.identifyUser = apis_1.identifyUser;
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;
17
- //# sourceMappingURL=index.js.map
7
+ Object.defineProperty(exports, "getBadgeCount", { enumerable: true, get: function () { return apis_1.getBadgeCount; } });
8
+ Object.defineProperty(exports, "getLaunchNotification", { enumerable: true, get: function () { return apis_1.getLaunchNotification; } });
9
+ Object.defineProperty(exports, "getPermissionStatus", { enumerable: true, get: function () { return apis_1.getPermissionStatus; } });
10
+ Object.defineProperty(exports, "identifyUser", { enumerable: true, get: function () { return apis_1.identifyUser; } });
11
+ Object.defineProperty(exports, "initializePushNotifications", { enumerable: true, get: function () { return apis_1.initializePushNotifications; } });
12
+ Object.defineProperty(exports, "onNotificationOpened", { enumerable: true, get: function () { return apis_1.onNotificationOpened; } });
13
+ Object.defineProperty(exports, "onNotificationReceivedInBackground", { enumerable: true, get: function () { return apis_1.onNotificationReceivedInBackground; } });
14
+ Object.defineProperty(exports, "onNotificationReceivedInForeground", { enumerable: true, get: function () { return apis_1.onNotificationReceivedInForeground; } });
15
+ Object.defineProperty(exports, "onTokenReceived", { enumerable: true, get: function () { return apis_1.onTokenReceived; } });
16
+ Object.defineProperty(exports, "requestPermissions", { enumerable: true, get: function () { return apis_1.requestPermissions; } });
17
+ Object.defineProperty(exports, "setBadgeCount", { enumerable: true, get: function () { return apis_1.setBadgeCount; } });
@@ -1,6 +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 = {
1
+ export type PinpointMessageEvent = 'opened_notification' | 'received_background' | 'received_foreground';
2
+ export type PinpointMessageEventSource = '_campaign' | '_journey';
3
+ export type AnalyticsEventAttributes = {
4
4
  source: PinpointMessageEventSource;
5
5
  attributes: Record<string, string>;
6
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=analytics.js.map
@@ -1,13 +1,13 @@
1
1
  import { IdentifyUserInput, OnNotificationOpenedInput, OnNotificationReceivedInBackgroundInput, OnNotificationReceivedInForegroundInput, OnTokenReceivedInput, RequestPermissionsInput, SetBadgeCountInput } from './inputs';
2
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;
3
+ export type GetBadgeCount = () => Promise<void | GetBadgeCountOutput>;
4
+ export type GetLaunchNotification = () => Promise<GetLaunchNotificationOutput>;
5
+ export type GetPermissionStatus = () => Promise<GetPermissionStatusOutput>;
6
+ export type IdentifyUser = (input: IdentifyUserInput) => Promise<void>;
7
+ export type InitializePushNotifications = () => void;
8
+ export type RequestPermissions = (input?: RequestPermissionsInput) => Promise<RequestPermissionsOutput>;
9
+ export type SetBadgeCount = (input: SetBadgeCountInput) => void;
10
+ export type OnNotificationOpened = (input: OnNotificationOpenedInput) => OnNotificationOpenedOutput;
11
+ export type OnNotificationReceivedInBackground = (input: OnNotificationReceivedInBackgroundInput) => OnNotificationReceivedInBackgroundOutput;
12
+ export type OnNotificationReceivedInForeground = (input: OnNotificationReceivedInForegroundInput) => OnNotificationReceivedInForegroundOutput;
13
+ export 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=apis.js.map
@@ -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=index.js.map
@@ -1,9 +1,9 @@
1
1
  import { IdentifyUserOptions } from './options';
2
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;
3
+ export type IdentifyUserInput = PushNotificationIdentifyUserInput<IdentifyUserOptions>;
4
+ export type RequestPermissionsInput = PushNotificationRequestPermissionsInput;
5
+ export type SetBadgeCountInput = PushNotificationSetBadgeCountInput;
6
+ export type OnNotificationOpenedInput = PushNotificationOnNotificationOpenedInput;
7
+ export type OnNotificationReceivedInBackgroundInput = PushNotificationOnNotificationReceivedInBackgroundInput;
8
+ export type OnNotificationReceivedInForegroundInput = PushNotificationOnNotificationReceivedInForegroundInput;
9
+ export type OnTokenReceivedInput = PushNotificationOnTokenReceivedInput;
@@ -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=inputs.js.map
@@ -2,4 +2,4 @@ import { PinpointServiceOptions } from '@aws-amplify/core/internals/providers/pi
2
2
  /**
3
3
  * Options specific to Pinpoint identityUser.
4
4
  */
5
- export declare type IdentifyUserOptions = PinpointServiceOptions;
5
+ export type IdentifyUserOptions = PinpointServiceOptions;
@@ -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=options.js.map
@@ -1,9 +1,9 @@
1
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;
2
+ export type GetBadgeCountOutput = PushNotificationGetBadgeCountOutput;
3
+ export type GetLaunchNotificationOutput = PushNotificationGetLaunchNotificationOutput;
4
+ export type GetPermissionStatusOutput = PushNotificationGetPermissionStatusOutput;
5
+ export type RequestPermissionsOutput = PushNotificationRequestPermissionsOutput;
6
+ export type OnNotificationOpenedOutput = PushNotificationOnNotificationOpenedOutput;
7
+ export type OnNotificationReceivedInBackgroundOutput = PushNotificationOnNotificationReceivedInBackgroundOutput;
8
+ export type OnNotificationReceivedInForegroundOutput = PushNotificationOnNotificationReceivedInForegroundOutput;
9
+ export type OnTokenReceivedOutput = PushNotificationOnTokenReceivedOutput;
@@ -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=outputs.js.map
@@ -1,2 +1,2 @@
1
1
  import { updateEndpoint } from '@aws-amplify/core/internals/providers/pinpoint';
2
- export declare type ChannelType = Parameters<typeof updateEndpoint>[0]['channelType'];
2
+ export type ChannelType = Parameters<typeof updateEndpoint>[0]['channelType'];
@@ -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=pushNotifications.js.map
@@ -1,5 +1,6 @@
1
- import { OnPushNotificationMessageHandler, PushNotificationEvent } from '../../../types';
1
+ import { PinpointMessageEvent } from '../types';
2
+ import { OnPushNotificationMessageHandler } from '../../../types';
2
3
  /**
3
4
  * @internal
4
5
  */
5
- export declare const createMessageEventRecorder: (event: PushNotificationEvent, callback?: Function | undefined) => OnPushNotificationMessageHandler;
6
+ export declare const createMessageEventRecorder: (event: PinpointMessageEvent, callback?: Function) => OnPushNotificationMessageHandler;
@@ -2,18 +2,20 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.createMessageEventRecorder = void 0;
5
6
  const pinpoint_1 = require("@aws-amplify/core/internals/providers/pinpoint");
6
7
  const core_1 = require("@aws-amplify/core");
8
+ const utils_1 = require("../../../utils");
7
9
  const getAnalyticsEvent_1 = require("./getAnalyticsEvent");
8
10
  const getChannelType_1 = require("./getChannelType");
9
- const utils_1 = require("../../../utils");
11
+ const resolveConfig_1 = require("./resolveConfig");
10
12
  const logger = new core_1.ConsoleLogger('PushNotification.recordMessageEvent');
11
13
  /**
12
14
  * @internal
13
15
  */
14
- exports.createMessageEventRecorder = (event, callback) => async (message) => {
15
- const { credentials } = await utils_1.resolveCredentials();
16
- const { appId, region } = utils_1.resolveConfig();
16
+ const createMessageEventRecorder = (event, callback) => async (message) => {
17
+ const { credentials } = await (0, utils_1.resolveCredentials)();
18
+ const { appId, region } = (0, resolveConfig_1.resolveConfig)();
17
19
  await recordMessageEvent({
18
20
  appId,
19
21
  credentials,
@@ -23,19 +25,19 @@ exports.createMessageEventRecorder = (event, callback) => async (message) => {
23
25
  });
24
26
  callback?.();
25
27
  };
28
+ exports.createMessageEventRecorder = createMessageEventRecorder;
26
29
  const recordMessageEvent = async ({ appId, credentials, event, message, region, }) => {
27
- const analyticsEvent = getAnalyticsEvent_1.getAnalyticsEvent(message, event);
30
+ const analyticsEvent = (0, getAnalyticsEvent_1.getAnalyticsEvent)(message, event);
28
31
  if (!analyticsEvent) {
29
32
  logger.debug('A notification missing event information was not recorded');
30
33
  return;
31
34
  }
32
- return pinpoint_1.record({
35
+ return (0, pinpoint_1.record)({
33
36
  appId,
34
37
  category: 'PushNotification',
35
- channelType: getChannelType_1.getChannelType(),
38
+ channelType: (0, getChannelType_1.getChannelType)(),
36
39
  credentials,
37
40
  event: analyticsEvent,
38
41
  region,
39
42
  });
40
43
  };
41
- //# sourceMappingURL=createMessageEventRecorder.js.map
@@ -1,6 +1,7 @@
1
1
  import { PinpointAnalyticsEvent } from '@aws-amplify/core/internals/providers/pinpoint';
2
- import { PushNotificationEvent, PushNotificationMessage } from '../../../types';
2
+ import { PinpointMessageEvent } from '../types';
3
+ import { PushNotificationMessage } from '../../../types';
3
4
  /**
4
5
  * @internal
5
6
  */
6
- export declare const getAnalyticsEvent: ({ data }: PushNotificationMessage, event: PushNotificationEvent) => PinpointAnalyticsEvent | null;
7
+ export declare const getAnalyticsEvent: ({ data }: PushNotificationMessage, event: PinpointMessageEvent) => PinpointAnalyticsEvent | null;
@@ -2,13 +2,14 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.getAnalyticsEvent = void 0;
5
6
  const ANDROID_CAMPAIGN_ACTIVITY_ID_KEY = 'pinpoint.campaign.campaign_activity_id';
6
7
  const ANDROID_CAMPAIGN_ID_KEY = 'pinpoint.campaign.campaign_id';
7
8
  const ANDROID_CAMPAIGN_TREATMENT_ID_KEY = 'pinpoint.campaign.treatment_id';
8
9
  /**
9
10
  * @internal
10
11
  */
11
- exports.getAnalyticsEvent = ({ data }, event) => {
12
+ const getAnalyticsEvent = ({ data }, event) => {
12
13
  if (!data) {
13
14
  return null;
14
15
  }
@@ -22,6 +23,7 @@ exports.getAnalyticsEvent = ({ data }, event) => {
22
23
  name: `${source}.${event}`,
23
24
  };
24
25
  };
26
+ exports.getAnalyticsEvent = getAnalyticsEvent;
25
27
  const getAnalyticsEventAttributes = (data) => {
26
28
  if (!data) {
27
29
  return;
@@ -52,4 +54,3 @@ const getAnalyticsEventAttributes = (data) => {
52
54
  };
53
55
  }
54
56
  };
55
- //# sourceMappingURL=getAnalyticsEvent.js.map
@@ -1,4 +1,5 @@
1
+ import { ChannelType } from '../types';
1
2
  /**
2
3
  * @internal
3
4
  */
4
- export declare const getChannelType: () => "IN_APP" | "APNS" | "APNS_SANDBOX" | "GCM" | undefined;
5
+ export declare const getChannelType: () => ChannelType;
@@ -2,15 +2,16 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.getChannelType = void 0;
5
6
  const utils_1 = require("@aws-amplify/core/internals/utils");
6
7
  const react_native_1 = require("@aws-amplify/react-native");
7
- const operatingSystem = react_native_1.getOperatingSystem();
8
+ const operatingSystem = (0, react_native_1.getOperatingSystem)();
8
9
  const isAndroid = operatingSystem === 'android';
9
10
  const isIos = operatingSystem === 'ios';
10
11
  /**
11
12
  * @internal
12
13
  */
13
- exports.getChannelType = () => {
14
+ const getChannelType = () => {
14
15
  if (isAndroid) {
15
16
  // FCM was previously known as GCM and continues to be the channel type in Pinpoint
16
17
  return 'GCM';
@@ -21,4 +22,4 @@ exports.getChannelType = () => {
21
22
  }
22
23
  throw new utils_1.PlatformNotSupportedError();
23
24
  };
24
- //# sourceMappingURL=getChannelType.js.map
25
+ exports.getChannelType = getChannelType;
@@ -1,3 +1,4 @@
1
1
  export { createMessageEventRecorder } from './createMessageEventRecorder';
2
+ export { getAnalyticsEvent } from './getAnalyticsEvent';
2
3
  export { getChannelType } from './getChannelType';
3
- export { getPushNotificationUserAgentString } from './getPushNotificationUserAgentString';
4
+ export { resolveConfig } from './resolveConfig';
@@ -2,10 +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
+ exports.resolveConfig = exports.getChannelType = exports.getAnalyticsEvent = exports.createMessageEventRecorder = void 0;
5
6
  var createMessageEventRecorder_1 = require("./createMessageEventRecorder");
6
- exports.createMessageEventRecorder = createMessageEventRecorder_1.createMessageEventRecorder;
7
+ Object.defineProperty(exports, "createMessageEventRecorder", { enumerable: true, get: function () { return createMessageEventRecorder_1.createMessageEventRecorder; } });
8
+ var getAnalyticsEvent_1 = require("./getAnalyticsEvent");
9
+ Object.defineProperty(exports, "getAnalyticsEvent", { enumerable: true, get: function () { return getAnalyticsEvent_1.getAnalyticsEvent; } });
7
10
  var getChannelType_1 = require("./getChannelType");
8
- exports.getChannelType = getChannelType_1.getChannelType;
9
- var getPushNotificationUserAgentString_1 = require("./getPushNotificationUserAgentString");
10
- exports.getPushNotificationUserAgentString = getPushNotificationUserAgentString_1.getPushNotificationUserAgentString;
11
- //# sourceMappingURL=index.js.map
11
+ Object.defineProperty(exports, "getChannelType", { enumerable: true, get: function () { return getChannelType_1.getChannelType; } });
12
+ var resolveConfig_1 = require("./resolveConfig");
13
+ Object.defineProperty(exports, "resolveConfig", { enumerable: true, get: function () { return resolveConfig_1.resolveConfig; } });
@@ -2,15 +2,16 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.resolveConfig = void 0;
5
6
  const core_1 = require("@aws-amplify/core");
6
- const errors_1 = require("../errors");
7
+ const errors_1 = require("../../../errors");
7
8
  /**
8
9
  * @internal
9
10
  */
10
- exports.resolveConfig = () => {
11
+ const resolveConfig = () => {
11
12
  const { appId, region } = core_1.Amplify.getConfig().Notifications?.PushNotification?.Pinpoint ?? {};
12
- errors_1.assert(!!appId, errors_1.PushNotificationValidationErrorCode.NoAppId);
13
- errors_1.assert(!!region, errors_1.PushNotificationValidationErrorCode.NoRegion);
13
+ (0, errors_1.assert)(!!appId, errors_1.PushNotificationValidationErrorCode.NoAppId);
14
+ (0, errors_1.assert)(!!region, errors_1.PushNotificationValidationErrorCode.NoRegion);
14
15
  return { appId, region };
15
16
  };
16
- //# sourceMappingURL=resolveConfig.js.map
17
+ exports.resolveConfig = resolveConfig;
@@ -2,8 +2,8 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.PushNotificationErrorCode = void 0;
5
6
  var PushNotificationErrorCode;
6
7
  (function (PushNotificationErrorCode) {
7
8
  PushNotificationErrorCode["NotInitialized"] = "NotInitialized";
8
9
  })(PushNotificationErrorCode = exports.PushNotificationErrorCode || (exports.PushNotificationErrorCode = {}));
9
- //# sourceMappingURL=errors.js.map
@@ -1,7 +1,23 @@
1
1
  "use strict";
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
4
18
  Object.defineProperty(exports, "__esModule", { value: true });
5
- const tslib_1 = require("tslib");
6
- tslib_1.__exportStar(require("./errors"), exports);
7
- //# sourceMappingURL=index.js.map
19
+ __exportStar(require("./errors"), exports);
20
+ __exportStar(require("./inputs"), exports);
21
+ __exportStar(require("./options"), exports);
22
+ __exportStar(require("./outputs"), exports);
23
+ __exportStar(require("./pushNotifications"), exports);
@@ -1,7 +1,7 @@
1
1
  import { UserProfile } from '@aws-amplify/core';
2
2
  import { PushNotificationServiceOptions } from './options';
3
3
  import { OnPushNotificationMessageHandler, OnTokenReceivedHandler, PushNotificationPermissions } from './pushNotifications';
4
- export declare type PushNotificationIdentifyUserInput<ServiceOptions extends PushNotificationServiceOptions = PushNotificationServiceOptions> = {
4
+ export type PushNotificationIdentifyUserInput<ServiceOptions extends PushNotificationServiceOptions = PushNotificationServiceOptions> = {
5
5
  /**
6
6
  * A User ID associated to the current device.
7
7
  */
@@ -15,9 +15,9 @@ export declare type PushNotificationIdentifyUserInput<ServiceOptions extends Pus
15
15
  */
16
16
  options?: ServiceOptions;
17
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;
18
+ export type PushNotificationRequestPermissionsInput = PushNotificationPermissions;
19
+ export type PushNotificationSetBadgeCountInput = number;
20
+ export type PushNotificationOnNotificationOpenedInput = OnPushNotificationMessageHandler;
21
+ export type PushNotificationOnNotificationReceivedInBackgroundInput = OnPushNotificationMessageHandler;
22
+ export type PushNotificationOnNotificationReceivedInForegroundInput = OnPushNotificationMessageHandler;
23
+ export type PushNotificationOnTokenReceivedInput = OnTokenReceivedHandler;
@@ -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=inputs.js.map
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Base type for service options.
3
3
  */
4
- export declare type PushNotificationServiceOptions = Record<string, unknown>;
4
+ export type PushNotificationServiceOptions = Record<string, unknown>;
@@ -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=options.js.map
@@ -1,10 +1,10 @@
1
1
  import { EventListenerRemover } from '../../eventListeners';
2
2
  import { PushNotificationMessage, PushNotificationPermissionStatus } from '../types';
3
- export declare type PushNotificationGetBadgeCountOutput = number | null;
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;
3
+ export type PushNotificationGetBadgeCountOutput = number | null;
4
+ export type PushNotificationGetLaunchNotificationOutput = PushNotificationMessage | null;
5
+ export type PushNotificationGetPermissionStatusOutput = PushNotificationPermissionStatus;
6
+ export type PushNotificationRequestPermissionsOutput = boolean;
7
+ export type PushNotificationOnNotificationOpenedOutput = EventListenerRemover;
8
+ export type PushNotificationOnNotificationReceivedInBackgroundOutput = EventListenerRemover;
9
+ export type PushNotificationOnNotificationReceivedInForegroundOutput = EventListenerRemover;
10
+ export type PushNotificationOnTokenReceivedOutput = EventListenerRemover;
@@ -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=outputs.js.map
@@ -1,5 +1,5 @@
1
1
  import type { PushNotificationMessage } from '@aws-amplify/react-native';
2
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';
3
+ export type OnTokenReceivedHandler = (token: string) => void;
4
+ export type OnPushNotificationMessageHandler = (message: PushNotificationMessage) => void;
5
+ export type PushNotificationEvent = 'backgroundMessageReceived' | 'foregroundMessageReceived' | 'launchNotificationOpened' | 'notificationOpened' | 'tokenReceived';
@@ -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=pushNotifications.js.map
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPushNotificationUserAgentString = void 0;
3
4
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
5
  // SPDX-License-Identifier: Apache-2.0
5
6
  const utils_1 = require("@aws-amplify/core/internals/utils");
6
- exports.getPushNotificationUserAgentString = (action) => utils_1.getAmplifyUserAgent({
7
+ const getPushNotificationUserAgentString = (action) => (0, utils_1.getAmplifyUserAgent)({
7
8
  category: utils_1.Category.PushNotification,
8
9
  action,
9
10
  });
10
- //# sourceMappingURL=getPushNotificationUserAgentString.js.map
11
+ exports.getPushNotificationUserAgentString = getPushNotificationUserAgentString;
@@ -1,4 +1,4 @@
1
+ export { getPushNotificationUserAgentString } from './getPushNotificationUserAgentString';
1
2
  export { initialize, isInitialized } from './initializationManager';
2
- export { resolveConfig } from './resolveConfig';
3
3
  export { resolveCredentials } from './resolveCredentials';
4
4
  export { getToken, setToken } from './tokenManager';