@aws-amplify/notifications 1.6.6-api-v6-models.3f48fe3.0 → 2.0.1-console-preview.deaebd5.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 (303) hide show
  1. package/README.md +3 -0
  2. package/lib/common/AWSPinpointProviderCommon/index.d.ts +6 -1
  3. package/lib/common/AWSPinpointProviderCommon/index.js +31 -17
  4. package/lib/common/AWSPinpointProviderCommon/index.js.map +1 -1
  5. package/lib/common/eventListeners/types.d.ts +2 -2
  6. package/lib/common/index.d.ts +0 -1
  7. package/lib/common/index.js +0 -2
  8. package/lib/common/index.js.map +1 -1
  9. package/{lib-esm/InAppMessaging → lib/inAppMessaging}/index.d.ts +1 -1
  10. package/lib/{InAppMessaging → inAppMessaging}/index.js +2 -2
  11. package/lib/inAppMessaging/index.js.map +1 -0
  12. package/lib/inAppMessaging/providers/index.d.ts +1 -0
  13. package/lib/{InAppMessaging/Providers → inAppMessaging/providers}/index.js +2 -2
  14. package/lib/inAppMessaging/providers/index.js.map +1 -0
  15. package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +2 -0
  16. package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.js +9 -0
  17. package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.js.map +1 -0
  18. package/lib/inAppMessaging/providers/pinpoint/apis/index.d.ts +1 -0
  19. package/lib/inAppMessaging/providers/pinpoint/apis/index.js +7 -0
  20. package/lib/inAppMessaging/providers/pinpoint/apis/index.js.map +1 -0
  21. package/lib/inAppMessaging/providers/pinpoint/index.d.ts +1 -0
  22. package/lib/inAppMessaging/providers/pinpoint/index.js +7 -0
  23. package/lib/inAppMessaging/providers/pinpoint/index.js.map +1 -0
  24. package/lib/inAppMessaging/providers/pinpoint/types/types.js.map +1 -0
  25. package/lib/{InAppMessaging/Providers/AWSPinpointProvider → inAppMessaging/providers/pinpoint/utils}/utils.d.ts +3 -4
  26. package/lib/{InAppMessaging/Providers/AWSPinpointProvider → inAppMessaging/providers/pinpoint/utils}/utils.js +16 -20
  27. package/lib/inAppMessaging/providers/pinpoint/utils/utils.js.map +1 -0
  28. package/lib/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/SessionTracker.js +7 -8
  29. package/lib/inAppMessaging/sessionTracker/SessionTracker.js.map +1 -0
  30. package/lib/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/SessionTracker.native.js +2 -2
  31. package/lib/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/SessionTracker.native.js.map +1 -1
  32. package/lib/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/index.js.map +1 -1
  33. package/lib/inAppMessaging/sessionTracker/types.js.map +1 -0
  34. package/lib/{InAppMessaging → inAppMessaging}/types.js.map +1 -1
  35. package/lib/index.d.ts +2 -3
  36. package/lib/index.js +3 -5
  37. package/lib/index.js.map +1 -1
  38. package/lib/pushNotifications/NotEnabledError.js.map +1 -0
  39. package/lib/pushNotifications/Platform/index.js.map +1 -0
  40. package/lib/pushNotifications/Platform/index.native.js.map +1 -0
  41. package/lib/pushNotifications/Platform/types.js.map +1 -0
  42. package/lib/pushNotifications/PlatformNotSupportedError.js.map +1 -0
  43. package/lib/{PushNotification → pushNotifications}/index.d.ts +1 -1
  44. package/lib/{PushNotification → pushNotifications}/index.js +2 -2
  45. package/lib/pushNotifications/index.js.map +1 -0
  46. package/lib/{PushNotification/Providers → pushNotifications/providers}/AWSPinpointProvider/index.js +3 -52
  47. package/lib/pushNotifications/providers/AWSPinpointProvider/index.js.map +1 -0
  48. package/lib/pushNotifications/providers/AWSPinpointProvider/types.js.map +1 -0
  49. package/{lib-esm/PushNotification/Providers → lib/pushNotifications/providers}/AWSPinpointProvider/utils.d.ts +1 -2
  50. package/lib/{PushNotification/Providers → pushNotifications/providers}/AWSPinpointProvider/utils.js +2 -6
  51. package/lib/pushNotifications/providers/AWSPinpointProvider/utils.js.map +1 -0
  52. package/lib/pushNotifications/providers/index.d.ts +1 -0
  53. package/lib/pushNotifications/providers/index.js +7 -0
  54. package/lib/pushNotifications/providers/index.js.map +1 -0
  55. package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.d.ts +2 -0
  56. package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.js +9 -0
  57. package/lib/pushNotifications/providers/pinpoint/apis/identifyUser.js.map +1 -0
  58. package/lib/pushNotifications/providers/pinpoint/apis/index.d.ts +1 -0
  59. package/lib/pushNotifications/providers/pinpoint/apis/index.js +7 -0
  60. package/lib/pushNotifications/providers/pinpoint/apis/index.js.map +1 -0
  61. package/lib/pushNotifications/providers/pinpoint/index.d.ts +1 -0
  62. package/lib/pushNotifications/providers/pinpoint/index.js +7 -0
  63. package/lib/pushNotifications/providers/pinpoint/index.js.map +1 -0
  64. package/lib/pushNotifications/types.js.map +1 -0
  65. package/lib/pushNotifications/utils.js.map +1 -0
  66. package/lib/types.d.ts +2 -2
  67. package/lib-esm/common/AWSPinpointProviderCommon/index.d.ts +6 -1
  68. package/lib-esm/common/AWSPinpointProviderCommon/index.js +24 -10
  69. package/lib-esm/common/AWSPinpointProviderCommon/index.js.map +1 -1
  70. package/lib-esm/common/eventListeners/types.d.ts +2 -2
  71. package/lib-esm/common/index.d.ts +0 -1
  72. package/lib-esm/common/index.js +0 -1
  73. package/lib-esm/common/index.js.map +1 -1
  74. package/{lib/InAppMessaging → lib-esm/inAppMessaging}/index.d.ts +1 -1
  75. package/lib-esm/{InAppMessaging → inAppMessaging}/index.js +1 -1
  76. package/lib-esm/inAppMessaging/index.js.map +1 -0
  77. package/lib-esm/inAppMessaging/providers/index.d.ts +1 -0
  78. package/lib-esm/inAppMessaging/providers/index.js +4 -0
  79. package/lib-esm/inAppMessaging/providers/index.js.map +1 -0
  80. package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +2 -0
  81. package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.js +6 -0
  82. package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.js.map +1 -0
  83. package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.d.ts +1 -0
  84. package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.js +4 -0
  85. package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.js.map +1 -0
  86. package/lib-esm/inAppMessaging/providers/pinpoint/index.d.ts +1 -0
  87. package/lib-esm/inAppMessaging/providers/pinpoint/index.js +4 -0
  88. package/lib-esm/inAppMessaging/providers/pinpoint/index.js.map +1 -0
  89. package/lib-esm/inAppMessaging/providers/pinpoint/types/types.js.map +1 -0
  90. package/lib-esm/{InAppMessaging/Providers/AWSPinpointProvider → inAppMessaging/providers/pinpoint/utils}/utils.d.ts +3 -4
  91. package/lib-esm/{InAppMessaging/Providers/AWSPinpointProvider → inAppMessaging/providers/pinpoint/utils}/utils.js +15 -19
  92. package/lib-esm/inAppMessaging/providers/pinpoint/utils/utils.js.map +1 -0
  93. package/lib-esm/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/SessionTracker.js +1 -2
  94. package/lib-esm/inAppMessaging/sessionTracker/SessionTracker.js.map +1 -0
  95. package/lib-esm/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/SessionTracker.native.js +1 -1
  96. package/lib-esm/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/SessionTracker.native.js.map +1 -1
  97. package/lib-esm/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/index.js.map +1 -1
  98. package/lib-esm/inAppMessaging/sessionTracker/types.js.map +1 -0
  99. package/lib-esm/{InAppMessaging → inAppMessaging}/types.js.map +1 -1
  100. package/lib-esm/index.d.ts +2 -3
  101. package/lib-esm/index.js +2 -3
  102. package/lib-esm/index.js.map +1 -1
  103. package/lib-esm/pushNotifications/NotEnabledError.js.map +1 -0
  104. package/lib-esm/pushNotifications/Platform/index.js.map +1 -0
  105. package/lib-esm/pushNotifications/Platform/index.native.js.map +1 -0
  106. package/lib-esm/pushNotifications/Platform/types.js.map +1 -0
  107. package/lib-esm/pushNotifications/PlatformNotSupportedError.js.map +1 -0
  108. package/lib-esm/{PushNotification → pushNotifications}/index.d.ts +1 -1
  109. package/lib-esm/{PushNotification → pushNotifications}/index.js +1 -1
  110. package/lib-esm/pushNotifications/index.js.map +1 -0
  111. package/lib-esm/{PushNotification/Providers → pushNotifications/providers}/AWSPinpointProvider/index.js +4 -53
  112. package/lib-esm/pushNotifications/providers/AWSPinpointProvider/index.js.map +1 -0
  113. package/lib-esm/pushNotifications/providers/AWSPinpointProvider/types.js.map +1 -0
  114. package/{lib/PushNotification/Providers → lib-esm/pushNotifications/providers}/AWSPinpointProvider/utils.d.ts +1 -2
  115. package/lib-esm/{PushNotification/Providers → pushNotifications/providers}/AWSPinpointProvider/utils.js +1 -5
  116. package/lib-esm/pushNotifications/providers/AWSPinpointProvider/utils.js.map +1 -0
  117. package/lib-esm/pushNotifications/providers/index.d.ts +1 -0
  118. package/lib-esm/pushNotifications/providers/index.js +4 -0
  119. package/lib-esm/pushNotifications/providers/index.js.map +1 -0
  120. package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.d.ts +2 -0
  121. package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.js +6 -0
  122. package/lib-esm/pushNotifications/providers/pinpoint/apis/identifyUser.js.map +1 -0
  123. package/lib-esm/pushNotifications/providers/pinpoint/apis/index.d.ts +1 -0
  124. package/lib-esm/pushNotifications/providers/pinpoint/apis/index.js +4 -0
  125. package/lib-esm/pushNotifications/providers/pinpoint/apis/index.js.map +1 -0
  126. package/lib-esm/pushNotifications/providers/pinpoint/index.d.ts +1 -0
  127. package/lib-esm/pushNotifications/providers/pinpoint/index.js +4 -0
  128. package/lib-esm/pushNotifications/providers/pinpoint/index.js.map +1 -0
  129. package/lib-esm/pushNotifications/types.js.map +1 -0
  130. package/lib-esm/pushNotifications/utils.js.map +1 -0
  131. package/lib-esm/types.d.ts +2 -2
  132. package/package.json +127 -76
  133. package/src/common/AWSPinpointProviderCommon/index.ts +25 -11
  134. package/src/common/eventListeners/types.ts +2 -2
  135. package/src/common/index.ts +0 -1
  136. package/src/{InAppMessaging → inAppMessaging}/index.ts +1 -1
  137. package/src/{InAppMessaging/Providers → inAppMessaging/providers}/index.ts +1 -1
  138. package/src/inAppMessaging/providers/pinpoint/apis/identifyUser.ts +11 -0
  139. package/src/{PushNotification/Providers → inAppMessaging/providers/pinpoint/apis}/index.ts +1 -1
  140. package/src/inAppMessaging/providers/pinpoint/index.ts +4 -0
  141. package/src/{InAppMessaging/Providers/AWSPinpointProvider → inAppMessaging/providers/pinpoint/utils}/utils.ts +17 -30
  142. package/src/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/SessionTracker.native.ts +1 -1
  143. package/src/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/SessionTracker.ts +4 -2
  144. package/src/index.ts +2 -4
  145. package/src/{PushNotification → pushNotifications}/index.ts +1 -1
  146. package/src/{PushNotification/Providers → pushNotifications/providers}/AWSPinpointProvider/index.ts +4 -41
  147. package/src/{PushNotification/Providers → pushNotifications/providers}/AWSPinpointProvider/utils.ts +1 -15
  148. package/src/pushNotifications/providers/index.ts +4 -0
  149. package/src/pushNotifications/providers/pinpoint/apis/identifyUser.ts +11 -0
  150. package/src/pushNotifications/providers/pinpoint/apis/index.ts +4 -0
  151. package/src/pushNotifications/providers/pinpoint/index.ts +4 -0
  152. package/src/types.ts +2 -2
  153. package/lib/InAppMessaging/InAppMessaging.d.ts +0 -57
  154. package/lib/InAppMessaging/InAppMessaging.js +0 -340
  155. package/lib/InAppMessaging/InAppMessaging.js.map +0 -1
  156. package/lib/InAppMessaging/Providers/AWSPinpointProvider/index.d.ts +0 -31
  157. package/lib/InAppMessaging/Providers/AWSPinpointProvider/index.js +0 -266
  158. package/lib/InAppMessaging/Providers/AWSPinpointProvider/index.js.map +0 -1
  159. package/lib/InAppMessaging/Providers/AWSPinpointProvider/types.js.map +0 -1
  160. package/lib/InAppMessaging/Providers/AWSPinpointProvider/utils.js.map +0 -1
  161. package/lib/InAppMessaging/Providers/index.d.ts +0 -1
  162. package/lib/InAppMessaging/Providers/index.js.map +0 -1
  163. package/lib/InAppMessaging/SessionTracker/SessionTracker.js.map +0 -1
  164. package/lib/InAppMessaging/SessionTracker/types.js.map +0 -1
  165. package/lib/InAppMessaging/index.js.map +0 -1
  166. package/lib/Notifications.d.ts +0 -24
  167. package/lib/Notifications.js +0 -94
  168. package/lib/Notifications.js.map +0 -1
  169. package/lib/PushNotification/NotEnabledError.js.map +0 -1
  170. package/lib/PushNotification/Platform/index.js.map +0 -1
  171. package/lib/PushNotification/Platform/index.native.js.map +0 -1
  172. package/lib/PushNotification/Platform/types.js.map +0 -1
  173. package/lib/PushNotification/PlatformNotSupportedError.js.map +0 -1
  174. package/lib/PushNotification/Providers/AWSPinpointProvider/index.js.map +0 -1
  175. package/lib/PushNotification/Providers/AWSPinpointProvider/types.js.map +0 -1
  176. package/lib/PushNotification/Providers/AWSPinpointProvider/utils.js.map +0 -1
  177. package/lib/PushNotification/Providers/index.d.ts +0 -1
  178. package/lib/PushNotification/Providers/index.js +0 -7
  179. package/lib/PushNotification/Providers/index.js.map +0 -1
  180. package/lib/PushNotification/PushNotification.d.ts +0 -39
  181. package/lib/PushNotification/PushNotification.js +0 -91
  182. package/lib/PushNotification/PushNotification.js.map +0 -1
  183. package/lib/PushNotification/PushNotification.native.d.ts +0 -63
  184. package/lib/PushNotification/PushNotification.native.js +0 -332
  185. package/lib/PushNotification/PushNotification.native.js.map +0 -1
  186. package/lib/PushNotification/index.js.map +0 -1
  187. package/lib/PushNotification/types.js.map +0 -1
  188. package/lib/PushNotification/utils.js.map +0 -1
  189. package/lib/common/constants.d.ts +0 -1
  190. package/lib/common/constants.js +0 -8
  191. package/lib/common/constants.js.map +0 -1
  192. package/lib-esm/InAppMessaging/InAppMessaging.d.ts +0 -57
  193. package/lib-esm/InAppMessaging/InAppMessaging.js +0 -338
  194. package/lib-esm/InAppMessaging/InAppMessaging.js.map +0 -1
  195. package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/index.d.ts +0 -31
  196. package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/index.js +0 -264
  197. package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/index.js.map +0 -1
  198. package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/types.js.map +0 -1
  199. package/lib-esm/InAppMessaging/Providers/AWSPinpointProvider/utils.js.map +0 -1
  200. package/lib-esm/InAppMessaging/Providers/index.d.ts +0 -1
  201. package/lib-esm/InAppMessaging/Providers/index.js +0 -4
  202. package/lib-esm/InAppMessaging/Providers/index.js.map +0 -1
  203. package/lib-esm/InAppMessaging/SessionTracker/SessionTracker.js.map +0 -1
  204. package/lib-esm/InAppMessaging/SessionTracker/types.js.map +0 -1
  205. package/lib-esm/InAppMessaging/index.js.map +0 -1
  206. package/lib-esm/Notifications.d.ts +0 -24
  207. package/lib-esm/Notifications.js +0 -92
  208. package/lib-esm/Notifications.js.map +0 -1
  209. package/lib-esm/PushNotification/NotEnabledError.js.map +0 -1
  210. package/lib-esm/PushNotification/Platform/index.js.map +0 -1
  211. package/lib-esm/PushNotification/Platform/index.native.js.map +0 -1
  212. package/lib-esm/PushNotification/Platform/types.js.map +0 -1
  213. package/lib-esm/PushNotification/PlatformNotSupportedError.js.map +0 -1
  214. package/lib-esm/PushNotification/Providers/AWSPinpointProvider/index.js.map +0 -1
  215. package/lib-esm/PushNotification/Providers/AWSPinpointProvider/types.js.map +0 -1
  216. package/lib-esm/PushNotification/Providers/AWSPinpointProvider/utils.js.map +0 -1
  217. package/lib-esm/PushNotification/Providers/index.d.ts +0 -1
  218. package/lib-esm/PushNotification/Providers/index.js +0 -4
  219. package/lib-esm/PushNotification/Providers/index.js.map +0 -1
  220. package/lib-esm/PushNotification/PushNotification.d.ts +0 -39
  221. package/lib-esm/PushNotification/PushNotification.js +0 -89
  222. package/lib-esm/PushNotification/PushNotification.js.map +0 -1
  223. package/lib-esm/PushNotification/PushNotification.native.d.ts +0 -63
  224. package/lib-esm/PushNotification/PushNotification.native.js +0 -330
  225. package/lib-esm/PushNotification/PushNotification.native.js.map +0 -1
  226. package/lib-esm/PushNotification/index.js.map +0 -1
  227. package/lib-esm/PushNotification/types.js.map +0 -1
  228. package/lib-esm/PushNotification/utils.js.map +0 -1
  229. package/lib-esm/common/constants.d.ts +0 -1
  230. package/lib-esm/common/constants.js +0 -6
  231. package/lib-esm/common/constants.js.map +0 -1
  232. package/src/InAppMessaging/InAppMessaging.ts +0 -321
  233. package/src/InAppMessaging/Providers/AWSPinpointProvider/index.ts +0 -323
  234. package/src/Notifications.ts +0 -90
  235. package/src/PushNotification/PushNotification.native.ts +0 -386
  236. package/src/PushNotification/PushNotification.ts +0 -107
  237. package/src/common/constants.ts +0 -7
  238. /package/lib/{InAppMessaging/Providers/AWSPinpointProvider → inAppMessaging/providers/pinpoint/types}/types.d.ts +0 -0
  239. /package/lib/{InAppMessaging/Providers/AWSPinpointProvider → inAppMessaging/providers/pinpoint/types}/types.js +0 -0
  240. /package/lib/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/SessionTracker.d.ts +0 -0
  241. /package/lib/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/SessionTracker.native.d.ts +0 -0
  242. /package/lib/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/index.d.ts +0 -0
  243. /package/lib/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/index.js +0 -0
  244. /package/lib/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/types.d.ts +0 -0
  245. /package/lib/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/types.js +0 -0
  246. /package/lib/{InAppMessaging → inAppMessaging}/types.d.ts +0 -0
  247. /package/lib/{InAppMessaging → inAppMessaging}/types.js +0 -0
  248. /package/lib/{PushNotification → pushNotifications}/NotEnabledError.d.ts +0 -0
  249. /package/lib/{PushNotification → pushNotifications}/NotEnabledError.js +0 -0
  250. /package/lib/{PushNotification → pushNotifications}/Platform/index.d.ts +0 -0
  251. /package/lib/{PushNotification → pushNotifications}/Platform/index.js +0 -0
  252. /package/lib/{PushNotification → pushNotifications}/Platform/index.native.d.ts +0 -0
  253. /package/lib/{PushNotification → pushNotifications}/Platform/index.native.js +0 -0
  254. /package/lib/{PushNotification → pushNotifications}/Platform/types.d.ts +0 -0
  255. /package/lib/{PushNotification → pushNotifications}/Platform/types.js +0 -0
  256. /package/lib/{PushNotification → pushNotifications}/PlatformNotSupportedError.d.ts +0 -0
  257. /package/lib/{PushNotification → pushNotifications}/PlatformNotSupportedError.js +0 -0
  258. /package/lib/{PushNotification/Providers → pushNotifications/providers}/AWSPinpointProvider/index.d.ts +0 -0
  259. /package/lib/{PushNotification/Providers → pushNotifications/providers}/AWSPinpointProvider/types.d.ts +0 -0
  260. /package/lib/{PushNotification/Providers → pushNotifications/providers}/AWSPinpointProvider/types.js +0 -0
  261. /package/lib/{PushNotification → pushNotifications}/types.d.ts +0 -0
  262. /package/lib/{PushNotification → pushNotifications}/types.js +0 -0
  263. /package/lib/{PushNotification → pushNotifications}/utils.d.ts +0 -0
  264. /package/lib/{PushNotification → pushNotifications}/utils.js +0 -0
  265. /package/lib-esm/{InAppMessaging/Providers/AWSPinpointProvider → inAppMessaging/providers/pinpoint/types}/types.d.ts +0 -0
  266. /package/lib-esm/{InAppMessaging/Providers/AWSPinpointProvider → inAppMessaging/providers/pinpoint/types}/types.js +0 -0
  267. /package/lib-esm/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/SessionTracker.d.ts +0 -0
  268. /package/lib-esm/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/SessionTracker.native.d.ts +0 -0
  269. /package/lib-esm/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/index.d.ts +0 -0
  270. /package/lib-esm/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/index.js +0 -0
  271. /package/lib-esm/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/types.d.ts +0 -0
  272. /package/lib-esm/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/types.js +0 -0
  273. /package/lib-esm/{InAppMessaging → inAppMessaging}/types.d.ts +0 -0
  274. /package/lib-esm/{InAppMessaging → inAppMessaging}/types.js +0 -0
  275. /package/lib-esm/{PushNotification → pushNotifications}/NotEnabledError.d.ts +0 -0
  276. /package/lib-esm/{PushNotification → pushNotifications}/NotEnabledError.js +0 -0
  277. /package/lib-esm/{PushNotification → pushNotifications}/Platform/index.d.ts +0 -0
  278. /package/lib-esm/{PushNotification → pushNotifications}/Platform/index.js +0 -0
  279. /package/lib-esm/{PushNotification → pushNotifications}/Platform/index.native.d.ts +0 -0
  280. /package/lib-esm/{PushNotification → pushNotifications}/Platform/index.native.js +0 -0
  281. /package/lib-esm/{PushNotification → pushNotifications}/Platform/types.d.ts +0 -0
  282. /package/lib-esm/{PushNotification → pushNotifications}/Platform/types.js +0 -0
  283. /package/lib-esm/{PushNotification → pushNotifications}/PlatformNotSupportedError.d.ts +0 -0
  284. /package/lib-esm/{PushNotification → pushNotifications}/PlatformNotSupportedError.js +0 -0
  285. /package/lib-esm/{PushNotification/Providers → pushNotifications/providers}/AWSPinpointProvider/index.d.ts +0 -0
  286. /package/lib-esm/{PushNotification/Providers → pushNotifications/providers}/AWSPinpointProvider/types.d.ts +0 -0
  287. /package/lib-esm/{PushNotification/Providers → pushNotifications/providers}/AWSPinpointProvider/types.js +0 -0
  288. /package/lib-esm/{PushNotification → pushNotifications}/types.d.ts +0 -0
  289. /package/lib-esm/{PushNotification → pushNotifications}/types.js +0 -0
  290. /package/lib-esm/{PushNotification → pushNotifications}/utils.d.ts +0 -0
  291. /package/lib-esm/{PushNotification → pushNotifications}/utils.js +0 -0
  292. /package/src/{InAppMessaging/Providers/AWSPinpointProvider → inAppMessaging/providers/pinpoint/types}/types.ts +0 -0
  293. /package/src/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/index.ts +0 -0
  294. /package/src/{InAppMessaging/SessionTracker → inAppMessaging/sessionTracker}/types.ts +0 -0
  295. /package/src/{InAppMessaging → inAppMessaging}/types.ts +0 -0
  296. /package/src/{PushNotification → pushNotifications}/NotEnabledError.ts +0 -0
  297. /package/src/{PushNotification → pushNotifications}/Platform/index.native.ts +0 -0
  298. /package/src/{PushNotification → pushNotifications}/Platform/index.ts +0 -0
  299. /package/src/{PushNotification → pushNotifications}/Platform/types.ts +0 -0
  300. /package/src/{PushNotification → pushNotifications}/PlatformNotSupportedError.ts +0 -0
  301. /package/src/{PushNotification/Providers → pushNotifications/providers}/AWSPinpointProvider/types.ts +0 -0
  302. /package/src/{PushNotification → pushNotifications}/types.ts +0 -0
  303. /package/src/{PushNotification → pushNotifications}/utils.ts +0 -0
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ > INTERNAL USE ONLY
2
+
3
+ This package contains the AWS Amplify Notifications category and is intended for internal use only. To integrate Amplify into your app, please use [aws-amplify](https://www.npmjs.com/package/aws-amplify).
@@ -1,4 +1,4 @@
1
- import { ConsoleLogger } from '@aws-amplify/core';
1
+ import { ConsoleLogger } from '@aws-amplify/core/internals/utils';
2
2
  import { Event as AWSPinpointAnalyticsEvent } from '@aws-amplify/core/internals/aws-clients/pinpoint';
3
3
  import { NotificationsCategory, NotificationsSubCategory, NotificationsProvider, UserInfo } from '../../types';
4
4
  import { AWSPinpointUserInfo } from './types';
@@ -32,4 +32,9 @@ export default abstract class AWSPinpointProviderCommon implements Notifications
32
32
  private getEndpointId;
33
33
  private getCredentials;
34
34
  private assertNotEmptyConfiguration;
35
+ /**
36
+ * transfer the first letter of the keys to lowercase
37
+ * @param {Object} obj - the object need to be transferred
38
+ */
39
+ private transferKeyToUpperCase;
35
40
  }
@@ -3,8 +3,8 @@
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  var tslib_1 = require("tslib");
6
+ var utils_1 = require("@aws-amplify/core/internals/utils");
6
7
  var core_1 = require("@aws-amplify/core");
7
- var cache_1 = require("@aws-amplify/cache");
8
8
  var pinpoint_1 = require("@aws-amplify/core/internals/aws-clients/pinpoint");
9
9
  var uuid_1 = require("uuid");
10
10
  var AWSPinpointProviderCommon = /** @class */ (function () {
@@ -75,17 +75,17 @@ var AWSPinpointProviderCommon = /** @class */ (function () {
75
75
  var customUserAgentDetails;
76
76
  if (_this.getSubCategory() === 'PushNotification') {
77
77
  customUserAgentDetails = {
78
- category: core_1.Category.PushNotification,
79
- action: core_1.PushNotificationAction.None,
78
+ category: utils_1.Category.PushNotification,
79
+ action: utils_1.PushNotificationAction.None,
80
80
  };
81
81
  }
82
82
  else {
83
83
  customUserAgentDetails = {
84
- category: core_1.Category.InAppMessaging,
85
- action: core_1.InAppMessagingAction.None,
84
+ category: utils_1.Category.InAppMessaging,
85
+ action: utils_1.InAppMessagingAction.None,
86
86
  };
87
87
  }
88
- return core_1.getAmplifyUserAgent(customUserAgentDetails);
88
+ return utils_1.getAmplifyUserAgent(customUserAgentDetails);
89
89
  };
90
90
  this.recordAnalyticsEvent = function (event) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
91
91
  var _a, _b, appId, credentials, endpointId, region, input, err_3;
@@ -171,8 +171,8 @@ var AWSPinpointProviderCommon = /** @class */ (function () {
171
171
  ChannelType: endpointInfo.channelType,
172
172
  Address: address !== null && address !== void 0 ? address : endpointInfo.address,
173
173
  Attributes: tslib_1.__assign(tslib_1.__assign({}, endpointInfo.attributes), attributes),
174
- Demographic: tslib_1.__assign({ AppVersion: appVersion, Make: make, Model: model, ModelVersion: version, Platform: platform }, core_1.transferKeyToUpperCase(tslib_1.__assign(tslib_1.__assign({}, endpointInfo.demographic), demographic))),
175
- Location: core_1.transferKeyToUpperCase(tslib_1.__assign(tslib_1.__assign({}, endpointInfo.location), location_1)),
174
+ Demographic: tslib_1.__assign({ AppVersion: appVersion, Make: make, Model: model, ModelVersion: version, Platform: platform }, this.transferKeyToUpperCase(tslib_1.__assign(tslib_1.__assign({}, endpointInfo.demographic), demographic))),
175
+ Location: this.transferKeyToUpperCase(tslib_1.__assign(tslib_1.__assign({}, endpointInfo.location), location_1)),
176
176
  Metrics: tslib_1.__assign(tslib_1.__assign({}, endpointInfo.metrics), metrics),
177
177
  OptOut: optOut !== null && optOut !== void 0 ? optOut : endpointInfo.optOut,
178
178
  User: {
@@ -204,7 +204,7 @@ var AWSPinpointProviderCommon = /** @class */ (function () {
204
204
  cacheKey = this.getSubCategory() === 'PushNotification'
205
205
  ? this.getProviderName() + "_" + appId
206
206
  : this.getSubCategory() + ":" + this.getProviderName() + ":" + appId;
207
- return [4 /*yield*/, cache_1.Cache.getItem(cacheKey)];
207
+ return [4 /*yield*/, core_1.Cache.getItem(cacheKey)];
208
208
  case 1:
209
209
  cachedEndpointId = _a.sent();
210
210
  // Found in cache, just return it
@@ -214,7 +214,7 @@ var AWSPinpointProviderCommon = /** @class */ (function () {
214
214
  endpointId = uuid_1.v4();
215
215
  ttl = 1000 * 60 * 60 * 24 * 365 * 100;
216
216
  expiration = new Date().getTime() + ttl;
217
- cache_1.Cache.setItem(cacheKey, endpointId, {
217
+ core_1.Cache.setItem(cacheKey, endpointId, {
218
218
  expires: expiration,
219
219
  priority: 1,
220
220
  });
@@ -223,19 +223,19 @@ var AWSPinpointProviderCommon = /** @class */ (function () {
223
223
  });
224
224
  }); };
225
225
  this.getCredentials = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
226
- var credentials, err_5;
226
+ var session, err_5;
227
227
  return tslib_1.__generator(this, function (_a) {
228
228
  switch (_a.label) {
229
229
  case 0:
230
230
  _a.trys.push([0, 2, , 3]);
231
- return [4 /*yield*/, core_1.Credentials.get()];
231
+ return [4 /*yield*/, core_1.fetchAuthSession()];
232
232
  case 1:
233
- credentials = _a.sent();
234
- if (!credentials) {
233
+ session = _a.sent();
234
+ if (!session.credentials) {
235
235
  this.logger.debug('no credentials found');
236
236
  return [2 /*return*/, null];
237
237
  }
238
- return [2 /*return*/, core_1.Credentials.shear(credentials)];
238
+ return [2 /*return*/, tslib_1.__assign(tslib_1.__assign({}, session.credentials), { identityId: session.identityId })];
239
239
  case 2:
240
240
  err_5 = _a.sent();
241
241
  this.logger.error('Error getting credentials:', err_5);
@@ -250,8 +250,22 @@ var AWSPinpointProviderCommon = /** @class */ (function () {
250
250
  throw new Error('One or more of credentials, appId or region is not configured');
251
251
  }
252
252
  };
253
- this.config = { storage: new core_1.StorageHelper().getStorage() };
254
- this.clientInfo = (_a = core_1.ClientDevice.clientInfo()) !== null && _a !== void 0 ? _a : {};
253
+ /**
254
+ * transfer the first letter of the keys to lowercase
255
+ * @param {Object} obj - the object need to be transferred
256
+ */
257
+ this.transferKeyToUpperCase = function (obj) {
258
+ var ret = {};
259
+ for (var key in obj) {
260
+ if (obj.hasOwnProperty(key)) {
261
+ var transferredKey = key[0].toUpperCase() + key.slice(1);
262
+ ret[transferredKey] = _this.transferKeyToUpperCase(obj[key]);
263
+ }
264
+ }
265
+ return ret;
266
+ };
267
+ // this.config = { storage: new StorageHelper().getStorage() };
268
+ this.clientInfo = (_a = utils_1.ClientDevice.clientInfo()) !== null && _a !== void 0 ? _a : {};
255
269
  this.logger = logger;
256
270
  }
257
271
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/AWSPinpointProviderCommon/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,0CAW2B;AAC3B,4CAA2C;AAC3C,6EAM0D;AAC1D,6BAAkC;AAUlC;IAYC,mCAAY,MAAM;QAAlB,iBAIC;;QATS,WAAM,GAAwB,EAAE,CAAC;QACjC,wBAAmB,GAAG,KAAK,CAAC;QAC5B,gBAAW,GAAG,KAAK,CAAC;QAqC9B,iBAAY,GAAG,UAAO,MAAc,EAAE,QAAkB;;;;;6BACnD,CAAC,IAAI,CAAC,WAAW,EAAjB,wBAAiB;wBACpB,qBAAM,IAAI,CAAC,IAAI,EAAE,EAAA;;wB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E;gBACtB,IAAI,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBAC5B,IAAM,cAAc,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBAC3D,GAAG,CAAC,cAAc,CAAC,GAAG,KAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;iBAC5D;aACD;YACD,OAAO,GAAG,CAAC;QACZ,CAAC,CAAC;QAnQD,+DAA+D;QAC/D,IAAI,CAAC,UAAU,SAAG,oBAAY,CAAC,UAAU,EAAE,mCAAI,EAAE,CAAC;QAClD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,+CAAW,GAAX;QACC,OAAO,yBAAyB,CAAC,QAAQ,CAAC;IAC3C,CAAC;IAOD;;OAEG;IACH,mDAAe,GAAf;QACC,OAAO,yBAAyB,CAAC,YAAY,CAAC;IAC/C,CAAC;IAED,6CAAS,GAAT,UAAU,MAAW;QAAX,uBAAA,EAAA,WAAW;QACpB,IAAI,CAAC,MAAM,yCAAQ,IAAI,CAAC,MAAM,GAAK,MAAM,CAAE,CAAC;QAC5C,IAAI,CAAC,MAAM,CAAC,KAAK,CAChB,eAAa,IAAI,CAAC,eAAe,EAAE,GAAG,IAAI,CAAC,cAAc,EAAE,aAAU,EACrE,IAAI,CAAC,MAAM,CACX,CAAC;QACF,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAzCM,kCAAQ,GAA0B,eAAe,CAAC;IAClD,sCAAY,GAAG,aAAa,CAAC;IA6QrC,gCAAC;CAAA,AAjRD,IAiRC;kBAjR6B,yBAAyB"}
@@ -1,5 +1,5 @@
1
- import { InAppMessageInteractionEvent } from '../../InAppMessaging/types';
2
- import { PushNotificationEvent } from '../../PushNotification/types';
1
+ import { InAppMessageInteractionEvent } from '../../inAppMessaging/types';
2
+ import { PushNotificationEvent } from '../../pushNotifications/types';
3
3
  export interface EventListener<EventHandler extends Function> {
4
4
  handleEvent: EventHandler;
5
5
  remove: () => void;
@@ -1,4 +1,3 @@
1
1
  export { default as AWSPinpointProviderCommon } from './AWSPinpointProviderCommon';
2
- export { AMPLIFY_SYMBOL } from './constants';
3
2
  export { addEventListener, notifyEventListeners, notifyEventListenersAndAwaitHandlers, } from './eventListeners';
4
3
  export { EventListener, EventType } from './eventListeners/types';
@@ -4,8 +4,6 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  var AWSPinpointProviderCommon_1 = require("./AWSPinpointProviderCommon");
6
6
  exports.AWSPinpointProviderCommon = AWSPinpointProviderCommon_1.default;
7
- var constants_1 = require("./constants");
8
- exports.AMPLIFY_SYMBOL = constants_1.AMPLIFY_SYMBOL;
9
7
  var eventListeners_1 = require("./eventListeners");
10
8
  exports.addEventListener = eventListeners_1.addEventListener;
11
9
  exports.notifyEventListeners = eventListeners_1.notifyEventListeners;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,yEAAmF;AAA1E,gEAAA,OAAO,CAA6B;AAC7C,yCAA6C;AAApC,qCAAA,cAAc,CAAA;AACvB,mDAI0B;AAHzB,4CAAA,gBAAgB,CAAA;AAChB,gDAAA,oBAAoB,CAAA;AACpB,gEAAA,oCAAoC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,yEAAmF;AAA1E,gEAAA,OAAO,CAA6B;AAC7C,mDAI0B;AAHzB,4CAAA,gBAAgB,CAAA;AAChB,gDAAA,oBAAoB,CAAA;AACpB,gEAAA,oCAAoC,CAAA"}
@@ -1,2 +1,2 @@
1
- export { default } from './InAppMessaging';
1
+ export { identifyUser } from './providers/pinpoint';
2
2
  export { InAppMessage, InAppMessageAction, InAppMessageButton, InAppMessageContent, InAppMessageImage, InAppMessageInteractionEvent, InAppMessageLayout, InAppMessageStyle, InAppMessageTextAlign, InAppMessagingConfig, InAppMessagingEvent, } from './types';
@@ -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
- var InAppMessaging_1 = require("./InAppMessaging");
6
- exports.default = InAppMessaging_1.default;
5
+ var pinpoint_1 = require("./providers/pinpoint");
6
+ exports.identifyUser = pinpoint_1.identifyUser;
7
7
  var types_1 = require("./types");
8
8
  exports.InAppMessageInteractionEvent = types_1.InAppMessageInteractionEvent;
9
9
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/inAppMessaging/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,iDAAoD;AAA3C,kCAAA,YAAY,CAAA;AACrB,iCAYiB;AANhB,+CAAA,4BAA4B,CAAA"}
@@ -0,0 +1 @@
1
+ export { identifyUser } from './pinpoint/apis';
@@ -2,6 +2,6 @@
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 AWSPinpointProvider_1 = require("./AWSPinpointProvider");
6
- exports.AWSPinpointProvider = AWSPinpointProvider_1.default;
5
+ var apis_1 = require("./pinpoint/apis");
6
+ exports.identifyUser = apis_1.identifyUser;
7
7
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/inAppMessaging/providers/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,wCAA+C;AAAtC,8BAAA,YAAY,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { UserInfo } from '../../../../types';
2
+ export declare function identifyUser(userId: string, userInfo: UserInfo): Promise<void>;
@@ -0,0 +1,9 @@
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
+ function identifyUser(userId, userInfo) {
6
+ throw new Error('WIP');
7
+ }
8
+ exports.identifyUser = identifyUser;
9
+ //# sourceMappingURL=identifyUser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identifyUser.js","sourceRoot":"","sources":["../../../../../src/inAppMessaging/providers/pinpoint/apis/identifyUser.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAItC,SAAgB,YAAY,CAC3B,MAAc,EACd,QAAkB;IAElB,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC;AALD,oCAKC"}
@@ -0,0 +1 @@
1
+ export { identifyUser } from './identifyUser';
@@ -0,0 +1,7 @@
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 identifyUser_1 = require("./identifyUser");
6
+ exports.identifyUser = identifyUser_1.identifyUser;
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/inAppMessaging/providers/pinpoint/apis/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,+CAA8C;AAArC,sCAAA,YAAY,CAAA"}
@@ -0,0 +1 @@
1
+ export { identifyUser } from './apis';
@@ -0,0 +1,7 @@
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 apis_1 = require("./apis");
6
+ exports.identifyUser = apis_1.identifyUser;
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/inAppMessaging/providers/pinpoint/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,+BAAsC;AAA7B,8BAAA,YAAY,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/inAppMessaging/providers/pinpoint/types/types.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAoBtC,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IAClC,yEAA8C,CAAA;IAC9C,yEAA8C,CAAA;IAC9C,0EAA+C,CAAA;AAChD,CAAC,EAJW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAIlC"}
@@ -1,9 +1,8 @@
1
- import { ConsoleLogger } from '@aws-amplify/core';
1
+ import { ConsoleLogger } from '@aws-amplify/core/internals/utils';
2
2
  import type { InAppMessageCampaign as PinpointInAppMessage } from '@aws-amplify/core/internals/aws-clients/pinpoint';
3
- import { InAppMessage, InAppMessageContent, InAppMessageLayout, InAppMessagingEvent } from '../../types';
4
- import { AWSPinpointMessageEvent, MetricsComparator } from './types';
3
+ import { InAppMessage, InAppMessageContent, InAppMessageLayout, InAppMessagingEvent } from '../../../types';
4
+ import { AWSPinpointMessageEvent, MetricsComparator } from '../types/types';
5
5
  export declare const logger: ConsoleLogger;
6
- export declare const dispatchInAppMessagingEvent: (event: string, data: any, message?: string) => void;
7
6
  export declare const recordAnalyticsEvent: (event: AWSPinpointMessageEvent, message: InAppMessage) => void;
8
7
  export declare const getStartOfDay: () => string;
9
8
  export declare const matchesEventType: ({ CampaignId, Schedule }: PinpointInAppMessage, { name: eventType }: InAppMessagingEvent) => any;
@@ -3,32 +3,28 @@
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  var tslib_1 = require("tslib");
6
- var core_1 = require("@aws-amplify/core");
6
+ var utils_1 = require("@aws-amplify/core/internals/utils");
7
7
  var isEmpty_1 = tslib_1.__importDefault(require("lodash/isEmpty"));
8
- var common_1 = require("../../../common");
9
8
  var DELIVERY_TYPE = 'IN_APP_MESSAGE';
10
9
  var eventNameMemo = {};
11
10
  var eventAttributesMemo = {};
12
11
  var eventMetricsMemo = {};
13
- exports.logger = new core_1.ConsoleLogger('InAppMessaging.AWSPinpointProvider');
14
- exports.dispatchInAppMessagingEvent = function (event, data, message) {
15
- core_1.Hub.dispatch('inAppMessaging', { event: event, data: data, message: message }, 'InAppMessaging', common_1.AMPLIFY_SYMBOL);
16
- };
12
+ exports.logger = new utils_1.ConsoleLogger('InAppMessaging.AWSPinpointProvider');
17
13
  exports.recordAnalyticsEvent = function (event, message) {
18
- if (core_1.Amplify.Analytics && typeof core_1.Amplify.Analytics.record === 'function') {
19
- var id = message.id, metadata = message.metadata;
20
- core_1.Amplify.Analytics.record({
21
- name: event,
22
- attributes: {
23
- campaign_id: id,
24
- delivery_type: DELIVERY_TYPE,
25
- treatment_id: metadata === null || metadata === void 0 ? void 0 : metadata.treatmentId,
26
- },
27
- });
28
- }
29
- else {
30
- exports.logger.debug('Analytics module is not registered into Amplify');
31
- }
14
+ // TODO(V6) : Add back recording here without validation
15
+ // if (Amplify.Analytics && typeof Amplify.Analytics.record === 'function') {
16
+ // const { id, metadata } = message;
17
+ // Amplify.Analytics.record({
18
+ // name: event,
19
+ // attributes: {
20
+ // campaign_id: id,
21
+ // delivery_type: DELIVERY_TYPE,
22
+ // treatment_id: metadata?.treatmentId,
23
+ // },
24
+ // });
25
+ // } else {
26
+ // logger.debug('Analytics module is not registered into Amplify');
27
+ // }
32
28
  };
33
29
  exports.getStartOfDay = function () {
34
30
  var now = new Date();
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/inAppMessaging/providers/pinpoint/utils/utils.ts"],"names":[],"mappings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AsB,CAAC,YAAY;oBACjD,KAAK,EAAE,sBAAsB,CAAC,SAAS;iBACvC;aACD,CAAC;SACF;QACD,OAAO,gBAAgB,CAAC;IACzB,CAAC,oCAAK,EAAE,CACR,CAAC;AACH,CAAC,CAAC;AAEW,QAAA,eAAe,GAAG,UAAC,EAKT;QAJtB,8BAAY,EACZ,sBAAQ,EACR,sBAAQ,EACR,4BAAW;IAC0C,OAAA,CAAC;QACtD,UAAU,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,YAAY;QACtC,OAAO,EAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO;QAC1B,QAAQ,EAAE,QAAQ;QAClB,WAAW,EAAE,WAAW;KACxB,CAAC;AALoD,CAKpD,CAAC"}
@@ -3,13 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
4
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
5
  // SPDX-License-Identifier: Apache-2.0
6
- var core_1 = require("@aws-amplify/core");
6
+ var utils_1 = require("@aws-amplify/core/internals/utils");
7
7
  var noop_1 = tslib_1.__importDefault(require("lodash/noop"));
8
8
  // Per https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
9
9
  var hidden;
10
10
  var visibilityChange;
11
- var isBrowser = core_1.browserOrNode().isBrowser;
12
- if (isBrowser && document) {
11
+ if (utils_1.isBrowser && document) {
13
12
  if (typeof document.hidden !== 'undefined') {
14
13
  hidden = 'hidden';
15
14
  visibilityChange = 'visibilitychange';
@@ -23,32 +22,32 @@ if (isBrowser && document) {
23
22
  visibilityChange = 'webkitvisibilitychange';
24
23
  }
25
24
  }
26
- var logger = new core_1.ConsoleLogger('InAppMessagingSessionTracker');
25
+ var logger = new utils_1.ConsoleLogger('InAppMessagingSessionTracker');
27
26
  var SessionTracker = /** @class */ (function () {
28
27
  function SessionTracker(sessionStateChangeHandler) {
29
28
  var _this = this;
30
29
  if (sessionStateChangeHandler === void 0) { sessionStateChangeHandler = noop_1.default; }
31
30
  this.start = function () {
32
- if (isBrowser) {
31
+ if (utils_1.isBrowser) {
33
32
  document === null || document === void 0 ? void 0 : document.addEventListener(visibilityChange, _this.visibilityChangeHandler);
34
33
  }
35
34
  return _this.getSessionState();
36
35
  };
37
36
  this.end = function () {
38
- if (isBrowser) {
37
+ if (utils_1.isBrowser) {
39
38
  document === null || document === void 0 ? void 0 : document.removeEventListener(visibilityChange, _this.visibilityChangeHandler);
40
39
  }
41
40
  return _this.getSessionState();
42
41
  };
43
42
  this.getSessionState = function () {
44
- if (isBrowser && document && !document[hidden]) {
43
+ if (utils_1.isBrowser && document && !document[hidden]) {
45
44
  return 'started';
46
45
  }
47
46
  // If, for any reason, document is undefined the session will never start
48
47
  return 'ended';
49
48
  };
50
49
  this.visibilityChangeHandler = function () {
51
- if (!isBrowser || !document) {
50
+ if (!utils_1.isBrowser || !document) {
52
51
  return;
53
52
  }
54
53
  if (document[hidden]) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionTracker.js","sourceRoot":"","sources":["../../../src/inAppMessaging/sessionTracker/SessionTracker.ts"],"names":[],"mappings":";;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,2DAG2C;AAC3C,6DAA+B;AAO/B,2EAA2E;AAC3E,IAAI,MAAc,CAAC;AACnB,IAAI,gBAAwB,CAAC;AAE7B,IAAI,iBAAS,IAAI,QAAQ,EAAE;IAC1B,IAAI,OAAO,QAAQ,CAAC,MAAM,KAAK,WAAW,EAAE;QAC3C,MAAM,GAAG,QAAQ,CAAC;QAClB,gBAAgB,GAAG,kBAAkB,CAAC;KACtC;SAAM,IAAI,OAAO,QAAQ,CAAC,UAAU,CAAC,KAAK,WAAW,EAAE;QACvD,MAAM,GAAG,UAAU,CAAC;QACpB,gBAAgB,GAAG,oBAAoB,CAAC;KACxC;SAAM,IAAI,OAAO,QAAQ,CAAC,cAAc,CAAC,KAAK,WAAW,EAAE;QAC3D,MAAM,GAA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AC5D,CAAC;IA0CF,qBAAC;AAAD,CAAC,AA/CD,IA+CC"}
@@ -3,14 +3,14 @@
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  var tslib_1 = require("tslib");
6
- var core_1 = require("@aws-amplify/core");
6
+ var utils_1 = require("@aws-amplify/core/internals/utils");
7
7
  var react_native_1 = require("react-native");
8
8
  var noop_1 = tslib_1.__importDefault(require("lodash/noop"));
9
9
  var isActive = function (appState) { return appState === 'active'; };
10
10
  var isInactive = function (appState) {
11
11
  return appState === 'inactive' || appState === 'background';
12
12
  };
13
- var logger = new core_1.ConsoleLogger('InAppMessagingSessionTracker');
13
+ var logger = new utils_1.ConsoleLogger('InAppMessagingSessionTracker');
14
14
  var SessionTracker = /** @class */ (function () {
15
15
  function SessionTracker(sessionStateChangeHandler) {
16
16
  var _this = this;
@@ -1 +1 @@
1
- {"version":3,"file":"SessionTracker.native.js","sourceRoot":"","sources":["../../../src/InAppMessaging/SessionTracker/SessionTracker.native.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,0CAA4D;AAC5D,6CAAwD;AACxD,6DAA+B;AAO/B,IAAM,QAAQ,GAAG,UAAA,QAAQ,IAAI,OAAA,QAAQ,KAAK,QAAQ,EAArB,CAAqB,CAAC;AACnD,IAAM,UAAU,GAAG,UAAA,QAAQ;IAC1B,OAAA,QAAQ,KAAK,UAAU,IAAI,QAAQ,KAAK,YAAY;AAApD,CAAoD,CAAC;AAEtD,IAAM,MAAM,GAAG,IAAI,oBAAM,CAAC,8BAA8B,CAAC,CAAC;AAE1D;IAIC,wBAAY,yBAA2D;QAAvE,iBAGC;QAHW,0CAAA,EAAA,4BAAuD,cAAI;QAKvE,UAAK,GAAG;YACP,uBAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAI,CAAC,qBAAqB,CAAC,CAAC;YAChE,OAAO,KAAI,CAAC,eAAe,EAAE,CAAC;QAC/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C;aAC1C;YACD,uDAAuD;YACvD,KAAI,CAAC,eAAe,GAAG,YAAY,CAAC;QACrC,CAAC,CAAC;QAnCD,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC;QAChC,IAAI,CAAC,yBAAyB,GAAG,yBAAyB,CAAC;IAC5D,CAAC;IAkCF,qBAAC;AAAD,CAAC,AAzCD,IAyCC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/InAppMessaging/SessionTracker/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,4EAA6D;AAE7D,kBAAe,wBAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/inAppMessaging/sessionTracker/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,4EAA6D;AAE7D,kBAAe,wBAAc,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/inAppMessaging/sessionTracker/types.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/InAppMessaging/types.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAmItC,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACvC,2EAA2C,CAAA;IAC3C,6EAA6C,CAAA;IAC7C,6EAA6C,CAAA;IAC7C,mFAAmD,CAAA;AACpD,CAAC,EALW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAKvC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/inAppMessaging/types.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAmItC,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACvC,2EAA2C,CAAA;IAC3C,6EAA6C,CAAA;IAC7C,6EAA6C,CAAA;IAC7C,mFAAmD,CAAA;AACpD,CAAC,EALW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAKvC"}
package/lib/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- export { default as Notifications } from './Notifications';
2
1
  export { AWSPinpointProviderCommon } from './common';
3
2
  export { AWSPinpointUserInfo } from './common/AWSPinpointProviderCommon/types';
4
- export { InAppMessage, InAppMessageAction, InAppMessageButton, InAppMessageContent, InAppMessageImage, InAppMessageInteractionEvent, InAppMessageLayout, InAppMessageStyle, InAppMessageTextAlign, InAppMessagingConfig, InAppMessagingEvent, } from './InAppMessaging';
5
- export { PushNotificationMessage, PushNotificationPermissions, PushNotificationPermissionStatus, } from './PushNotification/types';
3
+ export { InAppMessage, InAppMessageAction, InAppMessageButton, InAppMessageContent, InAppMessageImage, InAppMessageInteractionEvent, InAppMessageLayout, InAppMessageStyle, InAppMessageTextAlign, InAppMessagingConfig, InAppMessagingEvent, } from './inAppMessaging';
4
+ export { PushNotificationMessage, PushNotificationPermissions, PushNotificationPermissionStatus, } from './pushNotifications/types';
6
5
  export { NotificationsConfig, UserInfo } from './types';
package/lib/index.js CHANGED
@@ -2,12 +2,10 @@
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 Notifications_1 = require("./Notifications");
6
- exports.Notifications = Notifications_1.default;
7
5
  var common_1 = require("./common");
8
6
  exports.AWSPinpointProviderCommon = common_1.AWSPinpointProviderCommon;
9
- var InAppMessaging_1 = require("./InAppMessaging");
10
- exports.InAppMessageInteractionEvent = InAppMessaging_1.InAppMessageInteractionEvent;
11
- var types_1 = require("./PushNotification/types");
7
+ var inAppMessaging_1 = require("./inAppMessaging");
8
+ exports.InAppMessageInteractionEvent = inAppMessaging_1.InAppMessageInteractionEvent;
9
+ var types_1 = require("./pushNotifications/types");
12
10
  exports.PushNotificationPermissionStatus = types_1.PushNotificationPermissionStatus;
13
11
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,iDAA2D;AAAlD,wCAAA,OAAO,CAAiB;AAEjC,mCAAqD;AAA5C,6CAAA,yBAAyB,CAAA;AAElC,mDAY0B;AANzB,wDAAA,4BAA4B,CAAA;AAO7B,kDAIkC;AADjC,mDAAA,gCAAgC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,mCAAqD;AAA5C,6CAAA,yBAAyB,CAAA;AAElC,mDAY0B;AANzB,wDAAA,4BAA4B,CAAA;AAO7B,mDAImC;AADlC,mDAAA,gCAAgC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotEnabledError.js","sourceRoot":"","sources":["../../src/pushNotifications/NotEnabledError.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC;IAA6C,2CAAK;IACjD;QAAA,YACC,kBACC,+GAA+G,CAC/G,SAED;QADA,KAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;;IAC/B,CAAC;IACF,sBAAC;AAAD,CAAC,AAPD,CAA6C,KAAK,GAOjD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pushNotifications/Platform/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAItC,IAAM,iBAAiB,GAAG,UAAC,IAAY;;IACtC,aAAO,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,SAAS,0CAAE,QAAQ,CAAC,IAAI,EAAE;AAC7C,CAAC,CAAC;AAEF,IAAM,KAAK,GAAG;IACb,IAAI,iBAAiB,CAAC,SAAS,CAAC;QAAE,OAAO,SAAS,CAAC;IACnD,IAAI,iBAAiB,CAAC,UAAU,CAAC;QAAE,OAAO,KAAK,CAAC;IAChD,IAAI,iBAAiB,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAC/C,IAAI,iBAAiB,CAAC,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC;IAC7C,IAAI,iBAAiB,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAC;IAC/C,IAAI,iBAAiB,CAAC,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC;IAC5C,OAAO,SAAS,CAAC;AAClB,CAAC,CAAC;AAEF,IAAM,EAAE,GAAG,KAAK,EAAE,CAAC;AAEN,QAAA,QAAQ,GAAsB,EAAE,EAAE,IAAA,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../src/pushNotifications/Platform/index.native.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,6CAA0D;AAGlD,IAAA,+BAAE,CAAoB;AAEjB,QAAA,QAAQ,GAAsB,EAAE,EAAE,IAAA,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/pushNotifications/Platform/types.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlatformNotSupportedError.js","sourceRoot":"","sources":["../../src/pushNotifications/PlatformNotSupportedError.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC;IAAuD,qDAAK;IAC3D;QAAA,YACC,kBAAM,4CAA4C,CAAC,SAEnD;QADA,KAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;;IACzC,CAAC;IACF,gCAAC;AAAD,CAAC,AALD,CAAuD,KAAK,GAK3D"}
@@ -1,2 +1,2 @@
1
- export { default } from './PushNotification';
1
+ export { identifyUser } from './providers/pinpoint';
2
2
  export { PushNotificationEvent, PushNotificationMessage, PushNotificationPermissionStatus, } from './types';
@@ -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
- var PushNotification_1 = require("./PushNotification");
6
- exports.default = PushNotification_1.default;
5
+ var pinpoint_1 = require("./providers/pinpoint");
6
+ exports.identifyUser = pinpoint_1.identifyUser;
7
7
  var types_1 = require("./types");
8
8
  exports.PushNotificationPermissionStatus = types_1.PushNotificationPermissionStatus;
9
9
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pushNotifications/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,iDAAoD;AAA3C,kCAAA,YAAY,CAAA;AACrB,iCAIiB;AADhB,mDAAA,gCAAgC,CAAA"}