@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
@@ -1,332 +0,0 @@
1
- "use strict";
2
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- // SPDX-License-Identifier: Apache-2.0
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- var tslib_1 = require("tslib");
6
- var react_native_1 = require("react-native");
7
- var core_1 = require("@aws-amplify/core");
8
- var rtn_push_notification_1 = require("@aws-amplify/rtn-push-notification");
9
- var common_1 = require("../common");
10
- var NotEnabledError_1 = tslib_1.__importDefault(require("./NotEnabledError"));
11
- var Providers_1 = require("./Providers");
12
- var utils_1 = require("./utils");
13
- var logger = new core_1.ConsoleLogger('Notifications.PushNotification');
14
- var RTN_MODULE = '@aws-amplify/rtn-push-notification';
15
- var BACKGROUND_TASK_TIMEOUT = 25; // seconds
16
- var PushNotification = /** @class */ (function () {
17
- function PushNotification() {
18
- var _this = this;
19
- this.isEnabled = false;
20
- this.config = {};
21
- this.pluggables = [];
22
- /**
23
- * Configure PushNotification
24
- * @param {Object} config - PushNotification configuration object
25
- */
26
- this.configure = function (config) {
27
- if (config === void 0) { config = {}; }
28
- _this.config = tslib_1.__assign(tslib_1.__assign({}, _this.config), config);
29
- logger.debug('configure PushNotification', _this.config);
30
- _this.pluggables.forEach(function (pluggable) {
31
- pluggable.configure(_this.config[pluggable.getProviderName()]);
32
- });
33
- if (_this.pluggables.length === 0) {
34
- _this.addPluggable(new Providers_1.AWSPinpointProvider());
35
- }
36
- return _this.config;
37
- };
38
- /**
39
- * Get a plugin from added plugins
40
- * @param {string} providerName - the name of the plugin to get
41
- */
42
- this.getPluggable = function (providerName) {
43
- var _a;
44
- var pluggable = (_a = _this.pluggables.find(function (pluggable) { return pluggable.getProviderName() === providerName; })) !== null && _a !== void 0 ? _a : null;
45
- if (!pluggable) {
46
- logger.debug("No plugin found with name " + providerName);
47
- }
48
- return pluggable;
49
- };
50
- /**
51
- * Add plugin into PushNotification
52
- * @param {PushNotificationProvider} pluggable - an instance of the plugin
53
- */
54
- this.addPluggable = function (pluggable) {
55
- if (pluggable &&
56
- pluggable.getCategory() === 'Notifications' &&
57
- pluggable.getSubCategory() === 'PushNotification') {
58
- if (_this.getPluggable(pluggable.getProviderName())) {
59
- throw new Error("Pluggable " + pluggable.getProviderName() + " has already been added.");
60
- }
61
- _this.pluggables.push(pluggable);
62
- pluggable.configure(_this.config[pluggable.getProviderName()]);
63
- }
64
- };
65
- /**
66
- * Remove a plugin from added plugins
67
- * @param {string} providerName - the name of the plugin to remove
68
- */
69
- this.removePluggable = function (providerName) {
70
- var index = _this.pluggables.findIndex(function (pluggable) { return pluggable.getProviderName() === providerName; });
71
- if (index === -1) {
72
- logger.debug("No plugin found with name " + providerName);
73
- }
74
- else {
75
- _this.pluggables.splice(index, 1);
76
- }
77
- };
78
- this.enable = function () {
79
- if (_this.isEnabled) {
80
- logger.info('Notification listeners have already been enabled');
81
- return;
82
- }
83
- var _a = _this.nativeEvent, BACKGROUND_MESSAGE_RECEIVED = _a.BACKGROUND_MESSAGE_RECEIVED, FOREGROUND_MESSAGE_RECEIVED = _a.FOREGROUND_MESSAGE_RECEIVED, LAUNCH_NOTIFICATION_OPENED = _a.LAUNCH_NOTIFICATION_OPENED, NOTIFICATION_OPENED = _a.NOTIFICATION_OPENED, TOKEN_RECEIVED = _a.TOKEN_RECEIVED;
84
- if (_this.nativeHeadlessTaskKey) {
85
- // on platforms that can handle headless tasks, register one to broadcast background message received to
86
- // library listeners
87
- react_native_1.AppRegistry.registerHeadlessTask(_this.nativeHeadlessTaskKey, function () { return function (message) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
88
- return tslib_1.__generator(this, function (_a) {
89
- switch (_a.label) {
90
- case 0:
91
- // keep headless task running until handlers have completed their work
92
- return [4 /*yield*/, common_1.notifyEventListenersAndAwaitHandlers(0 /* BACKGROUND_MESSAGE_RECEIVED */, utils_1.normalizeNativeMessage(message))];
93
- case 1:
94
- // keep headless task running until handlers have completed their work
95
- _a.sent();
96
- return [2 /*return*/];
97
- }
98
- });
99
- }); }; });
100
- }
101
- else if (BACKGROUND_MESSAGE_RECEIVED) {
102
- // on platforms that can't handle headless tasks, listen for native background message received event and
103
- // broadcast to library listeners
104
- _this.nativeEventEmitter.addListener(BACKGROUND_MESSAGE_RECEIVED, function (message) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
105
- var err_1;
106
- var _a, _b;
107
- return tslib_1.__generator(this, function (_c) {
108
- switch (_c.label) {
109
- case 0:
110
- _c.trys.push([0, 2, 3, 4]);
111
- return [4 /*yield*/, Promise.race([
112
- common_1.notifyEventListenersAndAwaitHandlers(0 /* BACKGROUND_MESSAGE_RECEIVED */, utils_1.normalizeNativeMessage(message)),
113
- // background tasks will get suspended and all future tasks be deprioritized by the OS if they run for
114
- // more than 30 seconds so we reject with a error in a shorter amount of time to prevent this from
115
- // happening
116
- new Promise(function (_, reject) {
117
- setTimeout(function () {
118
- return reject("onNotificationReceivedInBackground handlers should complete their work within " + BACKGROUND_TASK_TIMEOUT + " seconds, but they did not.");
119
- }, BACKGROUND_TASK_TIMEOUT * 1000);
120
- }),
121
- ])];
122
- case 1:
123
- _c.sent();
124
- return [3 /*break*/, 4];
125
- case 2:
126
- err_1 = _c.sent();
127
- logger.error(err_1);
128
- return [3 /*break*/, 4];
129
- case 3:
130
- // notify native module that handlers have completed their work (or timed out)
131
- (_b = (_a = this.nativeModule).completeNotification) === null || _b === void 0 ? void 0 : _b.call(_a, message.completionHandlerId);
132
- return [7 /*endfinally*/];
133
- case 4: return [2 /*return*/];
134
- }
135
- });
136
- }); });
137
- }
138
- _this.nativeEventEmitter.addListener(
139
- // listen for native foreground message received event and broadcast to library listeners
140
- FOREGROUND_MESSAGE_RECEIVED, function (message) {
141
- common_1.notifyEventListeners(1 /* FOREGROUND_MESSAGE_RECEIVED */, utils_1.normalizeNativeMessage(message));
142
- });
143
- var launchNotificationOpenedListener = LAUNCH_NOTIFICATION_OPENED
144
- ? _this.nativeEventEmitter.addListener(
145
- // listen for native notification opened app (user tapped on notification, opening the app from quit -
146
- // not background - state) event. This is broadcasted to an internal listener only as it is not intended
147
- // for use otherwise as it produces inconsistent results when used within React Native app context
148
- LAUNCH_NOTIFICATION_OPENED, function (message) {
149
- common_1.notifyEventListeners(2 /* LAUNCH_NOTIFICATION_OPENED */, utils_1.normalizeNativeMessage(message));
150
- // once we are done with it we can remove the listener
151
- launchNotificationOpenedListener === null || launchNotificationOpenedListener === void 0 ? void 0 : launchNotificationOpenedListener.remove();
152
- })
153
- : null;
154
- _this.nativeEventEmitter.addListener(
155
- // listen for native notification opened (user tapped on notification, opening the app from background -
156
- // not quit - state) event and broadcast to library listeners
157
- NOTIFICATION_OPENED, function (message) {
158
- common_1.notifyEventListeners(3 /* NOTIFICATION_OPENED */, utils_1.normalizeNativeMessage(message));
159
- // if we are in this state, we no longer need the listener as the app was launched via some other means
160
- launchNotificationOpenedListener === null || launchNotificationOpenedListener === void 0 ? void 0 : launchNotificationOpenedListener.remove();
161
- });
162
- _this.nativeEventEmitter.addListener(
163
- // listen for native new token event, automatically re-register device with provider using new token and
164
- // broadcast to library listeners
165
- TOKEN_RECEIVED, function (_a) {
166
- var token = _a.token;
167
- // avoid a race condition where two endpoints are created with the same token on a fresh install
168
- if (_this.token === token) {
169
- return;
170
- }
171
- _this.token = token;
172
- _this.registerDevice();
173
- common_1.notifyEventListeners(4 /* TOKEN_RECEIVED */, token);
174
- });
175
- _this.isEnabled = true;
176
- };
177
- this.identifyUser = function (userId, userInfo) {
178
- _this.assertIsEnabled();
179
- return Promise.all(_this.pluggables.map(function (pluggable) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
180
- var err_2;
181
- return tslib_1.__generator(this, function (_a) {
182
- switch (_a.label) {
183
- case 0:
184
- _a.trys.push([0, 2, , 3]);
185
- return [4 /*yield*/, pluggable.identifyUser(userId, userInfo)];
186
- case 1:
187
- _a.sent();
188
- return [3 /*break*/, 3];
189
- case 2:
190
- err_2 = _a.sent();
191
- logger.error('Failed to identify user', err_2);
192
- throw err_2;
193
- case 3: return [2 /*return*/];
194
- }
195
- });
196
- }); }));
197
- };
198
- this.getLaunchNotification = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
199
- var _a;
200
- var _b, _c;
201
- return tslib_1.__generator(this, function (_d) {
202
- switch (_d.label) {
203
- case 0:
204
- this.assertIsEnabled();
205
- _a = utils_1.normalizeNativeMessage;
206
- return [4 /*yield*/, ((_c = (_b = this.nativeModule).getLaunchNotification) === null || _c === void 0 ? void 0 : _c.call(_b))];
207
- case 1: return [2 /*return*/, _a.apply(void 0, [_d.sent()])];
208
- }
209
- });
210
- }); };
211
- this.getBadgeCount = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
212
- var _a, _b;
213
- return tslib_1.__generator(this, function (_c) {
214
- this.assertIsEnabled();
215
- return [2 /*return*/, (_b = (_a = this.nativeModule).getBadgeCount) === null || _b === void 0 ? void 0 : _b.call(_a)];
216
- });
217
- }); };
218
- this.setBadgeCount = function (count) {
219
- var _a, _b;
220
- _this.assertIsEnabled();
221
- return (_b = (_a = _this.nativeModule).setBadgeCount) === null || _b === void 0 ? void 0 : _b.call(_a, count);
222
- };
223
- this.getPermissionStatus = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
224
- var _a;
225
- var _b, _c;
226
- return tslib_1.__generator(this, function (_d) {
227
- switch (_d.label) {
228
- case 0:
229
- this.assertIsEnabled();
230
- _a = utils_1.normalizeNativePermissionStatus;
231
- return [4 /*yield*/, ((_c = (_b = this.nativeModule).getPermissionStatus) === null || _c === void 0 ? void 0 : _c.call(_b))];
232
- case 1: return [2 /*return*/, _a.apply(void 0, [_d.sent()])];
233
- }
234
- });
235
- }); };
236
- this.requestPermissions = function (permissions) {
237
- if (permissions === void 0) { permissions = {
238
- alert: true,
239
- badge: true,
240
- sound: true,
241
- }; }
242
- return tslib_1.__awaiter(_this, void 0, void 0, function () {
243
- var _a, _b;
244
- return tslib_1.__generator(this, function (_c) {
245
- this.assertIsEnabled();
246
- return [2 /*return*/, (_b = (_a = this.nativeModule).requestPermissions) === null || _b === void 0 ? void 0 : _b.call(_a, permissions)];
247
- });
248
- });
249
- };
250
- /**
251
- * Background notifications on will start the app (as a headless JS instance running on a background service on
252
- * Android) in the background. Handlers registered via `onNotificationReceivedInBackground` should return Promises if
253
- * it needs to be asynchronous (e.g. to perform some network requests). The app should run in the background as long
254
- * as there are handlers still running (however, if they run for more than 30 seconds on iOS, subsequent tasks could
255
- * get deprioritized!). If it is necessary for a handler to execute while the app is in quit state, it should be
256
- * registered in the application entry point (e.g. index.js) since the application will not fully mount in that case.
257
- *
258
- * @param handler a function to be run when a BACKGROUND_MESSAGE_RECEIVED event is received
259
- * @returns an event listener which should be removed when no longer needed
260
- */
261
- this.onNotificationReceivedInBackground = function (handler) {
262
- _this.assertIsEnabled();
263
- return common_1.addEventListener(0 /* BACKGROUND_MESSAGE_RECEIVED */, handler);
264
- };
265
- this.onNotificationReceivedInForeground = function (handler) {
266
- _this.assertIsEnabled();
267
- return common_1.addEventListener(1 /* FOREGROUND_MESSAGE_RECEIVED */, handler);
268
- };
269
- this.onNotificationOpened = function (handler) {
270
- _this.assertIsEnabled();
271
- return common_1.addEventListener(3 /* NOTIFICATION_OPENED */, handler);
272
- };
273
- this.onTokenReceived = function (handler) {
274
- _this.assertIsEnabled();
275
- return common_1.addEventListener(4 /* TOKEN_RECEIVED */, handler);
276
- };
277
- this.registerDevice = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
278
- var _this = this;
279
- return tslib_1.__generator(this, function (_a) {
280
- return [2 /*return*/, Promise.all(this.pluggables.map(function (pluggable) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
281
- var err_3;
282
- return tslib_1.__generator(this, function (_a) {
283
- switch (_a.label) {
284
- case 0:
285
- _a.trys.push([0, 2, , 3]);
286
- return [4 /*yield*/, pluggable.registerDevice(this.token)];
287
- case 1:
288
- _a.sent();
289
- return [3 /*break*/, 3];
290
- case 2:
291
- err_3 = _a.sent();
292
- logger.error('Failed to register device for push notifications', err_3);
293
- throw err_3;
294
- case 3: return [2 /*return*/];
295
- }
296
- });
297
- }); }))];
298
- });
299
- }); };
300
- this.assertIsEnabled = function () {
301
- if (!_this.isEnabled) {
302
- throw new NotEnabledError_1.default();
303
- }
304
- };
305
- try {
306
- this.nativeModule = rtn_push_notification_1.AmplifyRTNPushNotification;
307
- // If constructing this, Push is configured in the Amplify root config. If the native module is missing at this
308
- // point, throw an error to give a hint that the module is missing.
309
- if (!this.nativeModule) {
310
- throw new Error();
311
- }
312
- var _a = this.nativeModule.getConstants(), NativeEvent = _a.NativeEvent, NativeHeadlessTaskKey = _a.NativeHeadlessTaskKey;
313
- this.nativeEvent = NativeEvent;
314
- this.nativeHeadlessTaskKey = NativeHeadlessTaskKey;
315
- this.nativeEventEmitter = new react_native_1.NativeEventEmitter(rtn_push_notification_1.AmplifyRTNPushNotification);
316
- }
317
- catch (err) {
318
- err.message = "Unable to find " + RTN_MODULE + ". " + err.message;
319
- throw err;
320
- }
321
- }
322
- /**
323
- * Get the name of this module
324
- * @returns {string} name of this module
325
- */
326
- PushNotification.prototype.getModuleName = function () {
327
- return 'PushNotification';
328
- };
329
- return PushNotification;
330
- }());
331
- exports.default = PushNotification;
332
- //# sourceMappingURL=PushNotification.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PushNotification.native.js","sourceRoot":"","sources":["../../src/PushNotification/PushNotification.native.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,6CAA+D;AAC/D,0CAA4D;AAC5D,4EAG4C;AAE5C,oCAKmB;AAEnB,8EAAgD;AAChD,yCAAkD;AAalD,iCAGiB;AAEjB,IAAM,MAAM,GAAG,IAAI,oBAAM,CAAC,gCAAgC,CAAC,CAAC;AAC5D,IAAM,UAAU,GAAG,oCAAoC,CAAC;AACxD,IAAM,uBAAuB,GAAG,EAAE,CAAC,CAAC,UAAU;AAE9C;IAUC;QAAA,iBAmBC;QA5BO,cAAS,GAAG,KAAK,CAAC;QAClB,WAAM,GAAwB,EAAE,CAAC;QAKjC,eAAU,GAA+B,EAAE,CAAC;QAwBpD;;;WAGG;QACH,cAAS,GAAG,UAAC,MAAmC;YAAnC,uBAAA,EAAA,WAAmC;YAC/C,KAAI,CAAC,MAAM,yCAAQ,KAAI,CAAC,MAAM,GAAK,MAAM,CAAE,CAAC;YAE5C,MAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAI,CAAC,MAAM,CAAC,CAAC;YAExD,KAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAA,SAAS;gBAChC,SAAS,CAAC,SAAS,CAAC,KAAI,CAAC,MAAM,CAAC,SAAS,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;YAC/D,CAAC,CAAC,CAAC;YAEH,IAAI,KAAI,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;gBACjC,KAAI,CAAC,YAAY,CAAC,IAAI,+BAAmB,EAAE,CAAC,CAAC;aAC7C;YAED,OAAO,KAAI,CAAC,MAAM,CAAC;QACpB,CAAC,CAAC;QAUF;;;WAGG;QACH,iBAAY,GAAG,UAAC,YAAoB;;YACnC,IAAM,SAAS,SACd,KAAI,CAAC,UAAU,CAAC,IAAI,CACnB,UAAA,SAAS,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;YAClC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;YAC/B,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;YACnD,IAAI,CAAC,kBAAkB,GAAG,IAAI,iCAAkB,CAC/C,kDAA0B,CAC1B,CAAC;SACF;QAAC,OAAO,GAAG,EAAE;YACb,GAAG,CAAC,OAAO,GAAG,oBAAkB,UAAU,UAAK,GAAG,CAAC,OAAS,CAAC;YAC7D,MAAM,GAAG,CAAC;SACV;IACF,CAAC;IAsBD;;;OAGG;IACH,wCAAa,GAAb;QACC,OAAO,kBAAkB,CAAC;IAC3B,CAAC;IAgSF,uBAAC;AAAD,CAAC,AAzVD,IAyVC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/PushNotification/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,uDAA6C;AAApC,qCAAA,OAAO,CAAA;AAChB,iCAIiB;AADhB,mDAAA,gCAAgC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/PushNotification/types.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAqFtC,IAAY,gCAKX;AALD,WAAY,gCAAgC;IAC3C,qDAAiB,CAAA;IACjB,uDAAmB,CAAA;IACnB,qEAAiC,CAAA;IACjC,+FAA2D,CAAA;AAC5D,CAAC,EALW,gCAAgC,GAAhC,wCAAgC,KAAhC,wCAAgC,QAK3C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/PushNotification/utils.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,iCAAiC;AAEjC,iCAIiB;AAEjB,IAAM,gBAAgB,GAAG,UAAU,CAAC;AACpC,IAAM,UAAU,GAAG,KAAK,CAAC;AAEZ,QAAA,+BAA+B,GAAG,UAC9C,YAAa;IAEb,QAAQ,YAAY,EAAE;QACrB,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,UAAC,EAEvB;QADA,YAAG;;IAEK,IAAA,0EAAQ,CAAqB;IACrC,IAAM,WAAW,wBAAQ,CAAC,QAAQ,IAAI,EAAE,QAAQ,UAAA,EAAE,CAAC,CAAE,CAAC;IACtD,4BAAY,CAAC,CAAC,gBAAO,CAAC,WAAW,CAAC,IAAI,EAAE,WAAW,aAAA,EAAE,CAAC,EAAG;AAC1D,CAAC,CAAC;AAEF,IAAM,aAAa,GAAG,UAAC,EAKtB;QAJA,wBAAS,EACT,wBAAS,EACT,sBAAQ,EACR,sBAAQ;IAER,IAAM,UAAU,2EACZ,CAAC,SAAS,IAAI,EAAE,SAAS,WAAA,EAAE,CAAC,GAC5B,CAAC,SAAS,IAAI,EAAE,SAAS,WAAA,EAAE,CAAC,GAC5B,CAAC,QAAQ,IAAI,EAAE,QAAQ,UAAA,EAAE,CAAC,GAC1B,CAAC,QAAQ,IAAI,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CACjD,CAAC;IACF,4BAAY,CAAC,CAAC,gBAAO,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,YAAA,EAAE,CAAC,EAAG;AACxD,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export declare const AMPLIFY_SYMBOL: Symbol;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
- // SPDX-License-Identifier: Apache-2.0
5
- exports.AMPLIFY_SYMBOL = (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function'
6
- ? Symbol.for('amplify_default')
7
- : '@@amplify_default');
8
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACzB,QAAA,cAAc,GAAG,CAC7B,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,UAAU;IAChE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC;IAC/B,CAAC,CAAC,mBAAmB,CACZ,CAAC"}
@@ -1,57 +0,0 @@
1
- import { EventListener } from '../common';
2
- import { UserInfo } from '../types';
3
- import { InAppMessage, InAppMessageInteractionEvent, InAppMessagingInterface, InAppMessagingConfig, InAppMessageConflictHandler, InAppMessagingEvent, InAppMessagingProvider, NotificationsSubCategory, OnMessageInteractionEventHandler } from './types';
4
- export default class InAppMessaging implements InAppMessagingInterface {
5
- private config;
6
- private conflictHandler;
7
- private listeningForAnalyticEvents;
8
- private pluggables;
9
- private storageSynced;
10
- constructor();
11
- /**
12
- * Configure InAppMessaging
13
- * @param {Object} config - InAppMessaging configuration object
14
- */
15
- configure: ({ listenForAnalyticsEvents, ...config }?: InAppMessagingConfig) => InAppMessagingConfig;
16
- /**
17
- * Get the name of this module
18
- * @returns {string} name of this module
19
- */
20
- getModuleName(): NotificationsSubCategory;
21
- /**
22
- * Get a plugin from added plugins
23
- * @param {string} providerName - the name of the plugin to get
24
- */
25
- getPluggable: (providerName: string) => InAppMessagingProvider;
26
- /**
27
- * Add plugin into InAppMessaging
28
- * @param {InAppMessagingProvider} pluggable - an instance of the plugin
29
- */
30
- addPluggable: (pluggable: InAppMessagingProvider) => void;
31
- /**
32
- * Remove a plugin from added plugins
33
- * @param {string} providerName - the name of the plugin to remove
34
- */
35
- removePluggable: (providerName: string) => void;
36
- /**
37
- * Get the map resources that are currently available through the provider
38
- * @param {string} provider
39
- * @returns - Array of available map resources
40
- */
41
- syncMessages: () => Promise<void[]>;
42
- clearMessages: () => Promise<void[]>;
43
- dispatchEvent: (event: InAppMessagingEvent) => Promise<void>;
44
- identifyUser: (userId: string, userInfo: UserInfo) => Promise<void[]>;
45
- onMessageReceived: (handler: OnMessageInteractionEventHandler) => EventListener<OnMessageInteractionEventHandler>;
46
- onMessageDisplayed: (handler: OnMessageInteractionEventHandler) => EventListener<OnMessageInteractionEventHandler>;
47
- onMessageDismissed: (handler: OnMessageInteractionEventHandler) => EventListener<OnMessageInteractionEventHandler>;
48
- onMessageActionTaken: (handler: OnMessageInteractionEventHandler) => EventListener<OnMessageInteractionEventHandler>;
49
- notifyMessageInteraction: (message: InAppMessage, type: InAppMessageInteractionEvent) => void;
50
- setConflictHandler: (handler: InAppMessageConflictHandler) => void;
51
- private analyticsListener;
52
- private syncStorage;
53
- private getMessages;
54
- private setMessages;
55
- private removeMessages;
56
- private defaultConflictHandler;
57
- }